跳至正文
OpenAgentSkill
浏览已开放 · 目录记录日期 2026-11-21 · 自动更新和账户服务暂时关闭。
浏览器与自动化

comet-verify

Phase 4 of Comet Classic — verify a change, record evidence, and drive repair loops.

rpamis · 已有静态检查记录

安装与使用

运行命令前先阅读来源与依赖说明。复制命令不会自动安装或执行。

npx skills add rpamis/comet --skill comet-verify

技能说明


name: comet-verify description: "Phase 4 of Comet Classic — verify a change, record evidence, and drive repair loops."

Comet Phase 4: Verify

Before starting or recovering, read and follow comet-classic/reference/classic-layout.md. Every OpenSpec CLI call in this file must use the adapter, and every file path must use the <classic-*> logical roots bound by that protocol.

Prerequisites

  • Code committed (Phase 3 complete)
  • All tasks.md tasks completed

Steps

0a. Output Language Constraint

Verification reports must use the configured Comet artifact language from comet state get <name> language.

0b. Entry State Verification (Entry Check)

Use the stable comet CLI described in comet-classic/reference/scripts.md, then run entry verification. When resuming from any entry point, first run the recovery check in comet-classic/reference/context-recovery.md:

comet state select <change-name>
comet state check <change-name> verify

Proceed to Step 1 after verification passes. The script outputs specific failure reasons when verification fails.

If the select / check output is BLOCKED because bound_branch does not match the current branch, immediately pause under comet-classic/reference/decision-point.md and let the user choose one option: switch back to the bound branch and rerun entry verification, or run comet state rebind <change-name> after the user explicitly confirms the current branch should take over this change, then rerun entry verification. Do not switch branches or rebind on your own.

Idempotency: All verify checks are safe to repeat. If verify_result is already pass, verification is complete and archive should continue; keep branch_status: pending until archive changes are committed and final branch handling finishes. If verify_result is pending, start verification from the beginning.

1. Scale Assessment

Execute scale assessment:

comet state scale <change-name>

The script automatically counts tasks, delta spec count, changed file count, determines light or full verification mode, and sets the verify_mode field. Decision rule (any condition triggers full): tasks > 3, delta spec capabilities > 1, changed files > 8.

comet state scale resolves the commit baseline from the plan's base-ref and falls back to state base_ref when the plan is unavailable. Verify does not reread plan frontmatter or maintain a second manual scale calculation.

Before verification begins, handle uncommitted changes through comet-classic/reference/dirty-worktree.md protocol. Verify phase special handling:

  1. If dirty diff clearly belongs to the current change, it is verification input. Continue verification, but do not modify or commit implementation, tests, tasks, delta specs, or the Design Doc in verify
  2. If dirty diff is only a verify phase artifact such as a verification report draft, may continue and record state in verify phase
  3. If dirty diff shows implementation but tasks.md remains unchecked, treat it as lagging build state. This has one valid next action: run verify-fail, return to build, verify evidence, and update task state without asking whether to accept incomplete tasks
  4. If dirty diff cannot be attributed or belongs to another change, report a stop condition through the dirty-worktree protocol. Do not disguise attribution failure as a continue/ignore choice

When repair or state reconciliation must return to build, run:

comet state transition <change-name> verify-fail

Override mechanism: If the agent or user believes the automated assessment is inappropriate, override at any time with comet state set <change-name> verify_mode <light|full>.

1b. Automatic Verification Repair and Exception Decisions

Run comet state get <change-name> verify_failures first to read the persisted consecutive failure count. Automatically return to build for the first 3 repairable failures: report the failures, run comet state transition <change-name> verify-fail, then invoke /comet-build without asking for confirmation.

The report must list:

  • Failed items
  • Whether CRITICAL or IMPORTANT (build failure, test failure, security issues, core acceptance scenario failure, lightweight code review correctness/security/edge-case issue)
  • Recommended handling approach

Uncertainty principle: Use a lower severity when evidence is unclear. Reserve CRITICAL for build failures, test failures, and security issues; use IMPORTANT for confirmed core-acceptance or correctness failures; mark ambiguous findings WARNING or SUGGESTION.

Handle failures as follows:

  • CRITICAL/IMPORTANT or objectively repairable in-scope issues: automatically return to build below the retry limit. Do not manufacture a "whether to fix" decision, and never accept these as deviations
  • WARNING/SUGGESTION whose fix introduces a behavior, scope, or risk tradeoff: use comet-classic/reference/decision-point.md to ask whether to fix or accept. Record the reason and impact scope when accepted
  • WARNING/SUGGESTION with a safe, local, tradeoff-free fix: repair automatically below the retry limit; low severity alone does not justify a pause

Only accepting WARNING/SUGGESTION deviations or choosing a strategy after the 4th failure is a user decision point. When verify_failures >= 3, do not automatically execute another verify-fail. Offer only "Continue fixing" or "Stop this workflow and seek an external decision" under the decision protocol. Record the next failure and return to build only after the user chooses continue. CRITICAL/IMPORTANT findings are never waivable.

2. Artifact Context Loading (Hash On-Demand Read)

When verification needs to read OpenSpec artifacts, first check whether they have changed since the design phase:

comet state get <change-name> handoff_hash
comet handoff <change-name> --hash-only
  • Read the two standard outputs separately. If they match and both are non-empty
阅读完整来源 ↗