원클릭으로
validate-phase
Post-build quality gate. Identifies test gaps and spawns nyquist-auditor to fill them.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Post-build quality gate. Identifies test gaps and spawns nyquist-auditor to fill them.
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Run multiple phases hands-free. Chains discuss, plan, build, and verify automatically.
Start a new project. Deep questioning, research, requirements, and roadmap.
Execute all plans in a phase. Spawns agents to build in parallel, commits atomically.
Configure settings: depth, model profiles, features, git, and gates.
Execute the next logical step automatically. No prompts, no decisions — just do it.
Systematic debugging with hypothesis testing. Persistent across sessions.
| name | validate-phase |
| description | Post-build quality gate. Identifies test gaps and spawns nyquist-auditor to fill them. |
| allowed-tools | Read, Write, Bash, Glob, Grep, Task, AskUserQuestion |
| argument-hint | <phase-number> [--auto] |
STOP -- DO NOT READ THIS FILE. You are already reading it. This prompt was injected into your context by Claude Code's plugin system. Using the Read tool on this SKILL.md file wastes tokens. Begin executing Step 1 immediately.
References: @references/ui-brand.md
You are the orchestrator for /pbr:validate-phase. This skill identifies validation gaps in a completed phase -- requirements without tests, tests that fail, or verify commands without automated coverage -- and spawns the nyquist-auditor agent to fill them. Your job is to collect gaps, present them, delegate test generation, and write VALIDATION.md.
Reference: skills/shared/context-budget.md for the universal orchestrator rules.
Reference: skills/shared/agent-type-resolution.md for agent type fallback when spawning Task() subagents.
Additionally for this skill:
Before ANY tool calls, display this banner:
+==============================================================+
| PLAN-BUILD-RUN > VALIDATING PHASE {N} |
+==============================================================+
Where {N} is the phase number from $ARGUMENTS. Then proceed to Step 1.
Before any phase-modifying operations (writing VALIDATION.md, spawning agents), acquire a claim:
acquireClaim(phaseDir, sessionId)
If the claim fails (another session owns this phase), display: "Another session owns this phase. Use /pbr:progress to see active claims."
On completion or error (including all exit paths), release the claim:
releaseClaim(phaseDir, sessionId)
.planning/config.json exists.planning/phases/{NN}-{slug}/Parse $ARGUMENTS according to skills/shared/phase-argument-parsing.md.
| Argument | Meaning |
|---|---|
3 | Validate phase 3 |
3 --auto | Validate phase 3, skip interactive gap confirmation |
| (no number) | Use current phase from STATE.md |
Execute these steps in order.
$ARGUMENTS for phase number and --auto flag
--auto is present: set auto_mode = true. Log: "Auto mode enabled -- skipping gap confirmation prompt".planning/config.json
CRITICAL (hook-enforced): Write .active-skill NOW. Write the text "validate" to .planning/.active-skill using the Write tool..planning/phases/{NN}-{slug}/.planning/phases/{NN}-{slug}/.planning/STATE.mdValidation errors:
If phase directory not found:
+==============================================================+
| ERROR |
+==============================================================+
Phase {N} not found in .planning/phases/. Run /pbr:status to see available phases.
If no SUMMARY.md files:
+==============================================================+
| ERROR |
+==============================================================+
Phase {N} hasn't been built yet.
**To fix:** Run `/pbr:build {N}` first.
If no PLAN.md files:
+==============================================================+
| ERROR |
+==============================================================+
Phase {N} has no plans.
**To fix:** Run `/pbr:plan-phase {N}` first.
PLAN-*.md files in the phase directory:
must_haves from frontmatter (truths, artifacts, key_links)<verify> commands from each <task> elementSUMMARY-*.md files in the phase directory:
key_files from frontmatter*.test.js, *.test.ts (Jest/Vitest)test_*.py (pytest)*_test.go (Go)*.spec.js, *.spec.ts (Mocha/Jasmine)<verify> command in plans: run it, record pass/fail{
task_id: "string",
requirement: "from must_have",
gap_type: "no_test_file | test_fails | no_automated_command",
impl_file: "path/to/file"
}
Display gap summary table:
Validation Gap Summary
| Task ID | Requirement | Gap Type | Impl File |
|---------|-------------|----------|-----------|
| T1 | {req} | {type} | {file} |
If zero gaps:
/pbr:review {N}If gaps found and --auto flag set:
Skip confirmation, proceed directly to Step 4.
If gaps found without --auto:
Use AskUserQuestion:
question: "Found {N} validation gaps. Spawn nyquist-auditor to generate tests?"
header: "Validation Gaps"
options:
- label: "Yes" description: "Generate tests for all gaps"
- label: "No" description: "Skip test generation, save gap report only"
Display: Spawning nyquist-auditor... (est. 2-5 min)
Build spawn prompt with:
<files_to_read> block listing: all PLAN.md files, all SUMMARY.md files, implementation files from gaps<gaps> XML block with the gap list from Step 2:<gaps>
<gap task_id="{id}" gap_type="{type}" impl_file="{file}">
{requirement text}
</gap>
...
</gaps>
Spawn the agent:
Task({
subagent_type: "pbr:nyquist-auditor",
prompt: <auditor prompt with gaps and files_to_read>
})
Parse agent return for completion marker:
GAPS FILLED -- all gaps resolvedPARTIAL -- some gaps remainESCALATE -- critical issues foundCRITICAL: Write VALIDATION.md NOW. Do not skip this step.
Template reference: Read ${CLAUDE_PLUGIN_ROOT}/templates/VALIDATION.md.tmpl for the standard validation format (test infrastructure, sampling rate, per-task verification map, Wave 0 requirements).
Write .planning/phases/{NN}-{slug}/VALIDATION.md with this structure:
Frontmatter:
---
phase: {NN}
phase_slug: "{slug}"
status: "green|yellow|red"
gaps_total: {N}
gaps_resolved: {M}
gaps_escalated: {K}
---
Status values:
green -- all gaps resolved or no gaps foundyellow -- some gaps resolved, some remainred -- escalations exist or critical gaps unresolvedBody:
## Requirement-to-Test Mapping
| Task ID | Requirement | Test File | Command | Status |
|---------|-------------|-----------|---------|--------|
| T1 | {req} | {file} | {cmd} | PASS |
| T2 | {req} | - | - | GAP |
## Escalated Gaps
{If any escalated gaps, list them here with details}
{If none: "No escalated gaps."}
If status is green or yellow (all gaps resolved or partially resolved):
+==============================================================+
| VALIDATION COMPLETE |
+==============================================================+
Phase {N} validation: {status}
Gaps found: {total} | Resolved: {resolved} | Remaining: {remaining}
NEXT UP:
/pbr:review {N} -- run verification checks
/pbr:validate-phase {N} -- re-validate (if yellow)
If status is red (escalations exist):
+==============================================================+
| VALIDATION: ESCALATIONS |
+==============================================================+
Phase {N} validation: RED
Gaps found: {total} | Resolved: {resolved} | Escalated: {escalated}
NEXT UP:
/pbr:build {N} --gaps-only -- fix implementation bugs
/pbr:validate-phase {N} -- re-validate after fixes
Delete .planning/.active-skill if it exists. This must happen on all paths (success, partial, and failure) before reporting results.
Release any multi-session claim acquired in the sync step.
If the Task() spawn fails, display:
+==============================================================+
| ERROR |
+==============================================================+
Nyquist-auditor failed to complete.
**To fix:** Review gaps manually or retry with `/pbr:validate-phase {N}`.
Write VALIDATION.md with current gap status (status: red). Clean up and STOP.
If plans have empty must_haves:
| File | Purpose | When |
|---|---|---|
.planning/phases/{NN}-{slug}/VALIDATION.md | Validation report with test mapping | Step 5 |
.planning/.active-skill | Session lock | Step 1 (created), Cleanup (deleted) |
/pbr:validate-phase after fixes triggers fresh gap detection