一键导入
phase-checkpoint
Run checkpoint criteria after completing a phase. Use after /phase-start completes all tasks to verify quality gates before proceeding.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Run checkpoint criteria after completing a phase. Use after /phase-start completes all tasks to verify quality gates before proceeding.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate EXECUTION_PLAN.md and scoped AGENTS.md files for a feature. Use after /feature-technical-spec to create the task breakdown.
Generate the greenfield execution plan plus root and scoped AGENTS.md files. Use after /technical-spec to create the phased task breakdown.
Guide discovery and discussion to determine how an AI coding agent can autonomously run and verify a specific user flow end to end. Use when the user asks what would be needed to test a flow, prove an app works, create an E2E/self-test harness, make agent verification repeatable, or evaluate whether an existing test setup lets the agent verify behavior. This skill is for shaping the verification approach before implementation: read the repo's product docs and existing verification contracts, identify the real user flow and channel under test, uncover missing controllable state or external dependencies, ask focused questions, and produce a concrete agent-runnable verification plan only after the flow is understood.
Exploratory conversation before /product-spec. Asks one question at a time, runs background research for open-source/off-the-shelf alternatives, and writes DISCOVERY_NOTES.md. Use when the user has an idea but hasn't scoped it yet.
Define feature requirements (problem, users, scope, acceptance criteria) through guided Q&A and write FEATURE_SPEC.md. Use when starting a new feature.
Define technical approach (architecture, integration points, data model) for a feature through guided Q&A and write FEATURE_TECHNICAL_SPEC.md. Use after /feature-spec.
| name | phase-checkpoint |
| description | Run checkpoint criteria after completing a phase. Use after /phase-start completes all tasks to verify quality gates before proceeding. |
| argument-hint | ["phase-number"] |
| allowed-tools | Bash, Read, Edit, Glob, Grep, Task, AskUserQuestion, WebFetch, WebSearch |
Phase $1 is complete. Run the checkpoint criteria from EXECUTION_PLAN.md.
AUTONOMY RULE: Never invoke skills via the Skill tool mid-checkpoint — it creates a turn boundary that breaks procedural flow. Use the Task tool (subagent) for any delegated work. Do NOT use AskUserQuestion during the checkpoint — it pauses the auto-advance chain. If something is ambiguous, use a deterministic default and report it.
Copy this checklist and track progress:
Phase Checkpoint Progress:
- [ ] Step 1: Context detection
- [ ] Step 2: Plan status guard
- [ ] Step 3: Tool availability & config
- [ ] Step 4: Local verification (automated, optional, manual)
- [ ] Step 5: Cross-model review (Codex)
- [ ] Step 6: Production verification
- [ ] Step 7: State update
- [ ] Step 8: Generate report
- [ ] Step 9: Auto-advance check
Determine working context:
If CWD matches */features/*:
If CWD matches */plans/greenfield*:
Otherwise:
Directory Guard: Confirm EXECUTION_PLAN.md exists. If not, STOP and tell user to cd into the scoped directory containing the active execution plan. If plans/greenfield/EXECUTION_PLAN.md exists in the current directory, tell them to cd plans/greenfield first.
Context Check: If context is below 40% remaining, run /compact first.
Read PROJECT_ROOT/plans/PLAN_STATUS.md if it exists.
plans/greenfield/ for greenfield
mode, or features/<name>/ for feature mode.plans/archive/ or features/archive/, STOP. Archived plans
are historical context only.Current status is not active, STOP and report that the current plan is
not implementable.Current plan does not match the current scoped path, STOP. Report the
current active plan path and tell the user to run /phase-checkpoint $1 from
that directory instead.Check which optional tools are available:
| Tool | Check Method | Fallback |
|---|---|---|
| ExecuteAutomation Playwright | Check for mcp__playwright__* | Next in chain |
| Browser MCP | Check for mcp__browsermcp__* | Next in chain |
| Chrome DevTools MCP | mcp__chrome-devtools__list_pages | Manual verification |
| code-simplifier | Check if agent type available | Skip |
| Codex CLI | codex --version | Skip cross-model review |
Browser fallback chain: ExecuteAutomation → Browser MCP → Microsoft Playwright → Chrome DevTools → Manual
Read .claude/verification-config.json from PROJECT_ROOT. If missing entirely, run /configure-verification. Omitted keys mean those checks are not configured — skip them rather than blocking.
Read .claude/settings.local.json for cross-model review config:
{
"codexReview": {
"enabled": true,
"triggerOn": ["phase-checkpoint"]
}
}
If codexReview is not configured, default to enabled: true when Codex CLI is available.
IMPORTANT: All local verification must pass before production verification.
See VERIFICATION.md for detailed check procedures. See also DEFERRED_QUEUE.md for the deferred review queue format and processing rules.
Run these using commands from verification-config (skip any that are not configured):
commands.test) — skip if not in configcommands.typecheck) — skip if not in configcommands.lint) — skip if not in configcommands.build) — skip if not in configcommands.mutation_test) — skip if not in configdevServer.command) — skip if not in configIf commands.mutation_test is configured, treat failures as a local verification
failure (it is part of the quality gate).
MANUAL:DEFER → enqueue to deferred review queue (see DEFERRED_QUEUE.md)MANUAL (blocking) → stop checkpoint and stop auto-advanceFor external integrations, follow DOCS_PROTOCOL.md to fetch latest documentation.
Purpose: Get a second opinion from a different AI model to catch blind spots.
This step runs if ALL of these conditions are true:
codex --version succeeds)codexReview.enabled is true (or not configured, defaulting to true)"phase-checkpoint" is in codexReview.triggerOn (or not configured)IMPORTANT — Invocation Method: Do NOT invoke /codex-review via the Skill tool.
The Skill tool creates a turn boundary that breaks the checkpoint's procedural flow
and prevents auto-advance from continuing. Use the Task tool instead.
Gather phase context:
# Identify technologies from changed files for --research flag
# Check package.json, imports in changed files
Launch Task subagent to perform the Codex review inline:
subagent_type: general-purposesecurity).claude/skills/codex-review/SKILL.md and follow Steps 1-5
b. Read supporting files as needed (CODEX_INVOCATION.md, PROMPT_TEMPLATE.md, EVALUATION_PRACTICES.md)
c. Return structured JSON with status, critical_issues, recommendations, positive_findingsThe Task tool returns results to the current turn, preserving checkpoint state.
Process results from the Task subagent:
| Codex Status | Checkpoint Action |
|---|---|
pass | Continue, note in report |
pass_with_notes | Auto-implement recommendations, continue |
needs_attention | Auto-implement all findings, continue |
skipped | Note unavailable, continue |
error | Note error, continue |
When Codex returns findings (pass_with_notes or needs_attention), implement
them automatically. Do NOT ask the user — this keeps the auto-advance chain flowing.
Launch Task subagent to implement all findings:
subagent_type: general-purposeRe-run automated verification (same commands from Step 4):
Handle re-verification results:
| Outcome | Action |
|---|---|
| All checks pass | Commit: git add -u && git commit -m "fix: address Codex review findings (phase $1 checkpoint)", note "{N} findings auto-fixed" in report |
| Any check fails | Revert: git checkout -- ., note "fixes reverted — broke verification" in report, log findings to deferred queue |
Git safety notes:
git add -u (tracked files only) — never git add -A which can stage untracked artifactsgit checkout -- . reverts working tree changes without needing git reset --hardContinue to Step 6 regardless of outcome — Codex findings never block.
Cross-Model Review (Codex):
- Status: PASS | PASS WITH NOTES | NEEDS ATTENTION | SKIPPED
- Findings: {N} critical, {M} recommendations
- Auto-implemented: {X} fixes applied, {Y} skipped (too vague)
- Verification: PASSED | REVERTED (logged to deferred queue)
Skip this step (mark as SKIPPED) if:
$CODEX_SANDBOX is set) — /codex-review detects this automaticallycodexReview.enabled is explicitly false--skip-codex flag passed to checkpointBLOCKED until all Local Verification passes.
When local passes, verify:
After checkpoint passes, update .claude/phase-state.json:
{
"phases": [{
"number": 1,
"status": "CHECKPOINTED",
"completed_at": "{ISO timestamp}",
"checkpoint": {
"tests_passed": true,
"type_check_passed": true,
"lint_passed": true,
"security_passed": true,
"mutation_tests_passed": true,
"coverage_percent": 85,
"manual_verified": true,
"codex_review": {
"status": "pass | pass_with_notes | needs_attention | skipped",
"critical_issues": 0,
"recommendations": 2,
"auto_fixed": 2,
"fix_skipped": 0,
"fix_reverted": false
}
}
}]
}
Write checkpoint report to .claude/verification/phase-$1.md and append to .claude/verification-log.jsonl.
Phase $1 Checkpoint Results
===========================
Tool Availability:
- ExecuteAutomation Playwright: ✓ | ✗
- Browser MCP: ✓ | ✗
- Chrome DevTools MCP: ✓ | ✗
- code-simplifier: ✓ | ✗
- Codex CLI: ✓ | ✗
## Local Verification
Automated Checks:
- Tests: PASSED | FAILED
- Type Check: PASSED | FAILED | SKIPPED
- Linting: PASSED | FAILED | SKIPPED
- Build: PASSED | FAILED | SKIPPED
- Mutation Tests: PASSED | FAILED | SKIPPED
- Security: PASSED | FAILED
Optional Checks:
- Browser Verification: PASSED | SKIPPED
- Target: {URL}
- Tech Debt: PASSED | NOTES | SKIPPED
Manual Checks:
- Automated: {X} items
- Blocking manual: {Y} items
- Deferred: {Z} items (queued for later review)
- Total deferred queue: {M} items across {P} phases
Local Verification: ✓ PASSED | ✗ FAILED
---
## Cross-Model Review (Codex)
Status: PASS | PASS WITH NOTES | NEEDS ATTENTION | SKIPPED
{If not skipped}
- Findings: {N} critical, {M} recommendations
- Auto-implemented: {X} fixes applied, {Y} skipped (too vague)
- Verification: PASSED | REVERTED (logged to deferred queue)
{If reverted}
- Reverted fixes logged to deferred queue for later review
{/If}
{/If}
---
## Production Verification
{items or "Blocked: Complete local verification first"}
---
Overall: Ready to proceed | Issues to address
See AUTO_ADVANCE.md for auto-advance logic.
Summary: If all checks pass and no blocking manual items remain, automatically invoke /phase-prep {N+1}. MANUAL:DEFER items are queued and do not block.
Codex review and auto-advance: Codex findings are auto-implemented inline. If fixes pass re-verification they are committed; if they fail, they are reverted and logged to the deferred queue. Either way, auto-advance is never blocked.
| Situation | Action |
|---|---|
EXECUTION_PLAN.md not found in working directory | STOP and tell user to cd into the project directory containing EXECUTION_PLAN.md |
verification-config.json missing entirely | Run /configure-verification to auto-detect; omitted keys in an existing config are intentional and should be skipped |
Automated check command fails to execute (e.g., npm not found) | Mark that specific check as FAILED (not SKIPPED), continue remaining checks, and report tool failure in summary |
| Codex CLI times out or returns an error | Mark cross-model review as SKIPPED with reason, do NOT block checkpoint, suggest manual /codex-review afterward |
| Auto-implemented Codex fixes break re-verification | Revert changes with git checkout -- ., log findings to deferred queue, and continue without blocking |
If both local AND production verification fail:
/phase-start $1 to address failing tasks before re-running checkpointIf blocking manual verification items remain after auto-verify:
/phase-checkpoint $1 after manual resolutionIf verification config file is missing entirely:
/configure-verification to auto-detectIf auto-advance chain should stop:
/phase-checkpoint $1 again after resolving issues"If a tool consistently fails mid-checkpoint:
If Codex review times out or errors:
/codex-review manually after checkpoint if desiredIf Codex finds critical issues:
git add -u and continuegit checkout -- . and log to deferred queueREMINDER: Local verification must pass before production verification. If any local check fails, stop and report — do not proceed to production checks.