.claude/skills/phase-checkpoint/SKILL.md
Run checkpoint criteria after completing a phase. Use after /phase-start completes all tasks to verify quality gates before proceeding.
npx skillsauth add benjaminshoemaker/ai_coding_project_base phase-checkpointInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
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: Tool availability & config
- [ ] Step 3: Local verification (automated, optional, manual)
- [ ] Step 4: Cross-model review (Codex)
- [ ] Step 5: Production verification
- [ ] Step 6: State update
- [ ] Step 7: Generate report
- [ ] Step 8: 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.
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 3):
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 5 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.
testing
Audit project alignment with VISION.md, identify SDLC gaps, and generate feature proposals. Use when reviewing strategic direction or planning new features.
development
Run code-verification on a specific task. Use to verify a single task's acceptance criteria after implementation.
testing
Resolve Vercel preview deployment URL for the current git branch. Invoked by browser-verification when deployment.enabled is true, or directly to check deployment status. Use to check deployment status or when browser verification needs a URL.
tools
Discover and sync all toolkit-using projects with the latest skills. Use when skills are modified, after the post-commit hook reminds you, or to batch-sync multiple projects.