Validates a mainspec and its slices via 3-subagent consensus plus expert review, then *applies* impactful fixes directly to the spec files. No human-in-the-loop summary or approval — agent-first. Touches `specs/<feature>/.validated` as its final committed action.
58
66%
Does it follow best practices?
Run evals on this skill
Adds up to 20 points to the overall score
View guide
Critical
Do not install without reviewing
Fix and improve this skill with Tessl
tessl review fix ./skills/sdd/spec-validate/SKILL.mdValidate a mainspec and its slices using parallel foreground subagents for high-confidence issue detection, then apply the impactful findings as fixes directly to the spec files. Agent-first: no human-in-the-loop. Invoked headless by the harness dispatcher, walks the consensus → classify → fix → sentinel protocol, and exits.
Invoked by the dispatcher as: claude -p "/spec-validate <feature>", run from inside the feature worktree (the dispatcher cds into it — there is no print-mode --cwd flag).
Single argument: <feature> — kebab-case feature slug.
Inputs read from disk (paths relative to cwd):
specs/<feature>/mainspec.mdspecs/<feature>/slices/*.mdOutputs to disk:
specs/<feature>/mainspec.md and/or specs/<feature>/slices/*.md for impactful findings.specs/<feature>/validation-log.md — audit trail: all consensus findings, classification (impactful vs. nitpick), and which fixes were applied. For observability; not load-bearing for the dispatcher.specs/<feature>/.validated (empty sentinel).Completion protocol (in order):
specs/<feature>/validation-log.md capturing every finding, classification, and what was changed.git add all changes (edited spec files + validation-log.md), commit, push.touch specs/<feature>/.validated.git add the sentinel, commit, push.The sentinel is the final commit-and-push action. The dispatcher uses only the sentinel to advance to implementation.
Idempotency:
specs/<feature>/.validated already exists, exit immediately.specs/<feature>/mainspec.md does not exist, exit silently — the dispatcher's state machine should not have fired this skill yet; planning has not completed.Spawn 3 parallel subagents (always 3 — this is the agent-first default, no runtime override) to independently review the spec. Each agent gets the same prompt and reviews independently — consensus on issues indicates higher confidence. Only give file paths to the subagent (mainspec.md plus each slice file).
Spawn all 3 agents in parallel in a single message using the Task tool. Do NOT use run_in_background. All agents run concurrently and return summarized results automatically.
Task(
description="Spec validation A",
subagent_type="general-purpose",
model="opus",
prompt="[Validation prompt below with spec content inserted]"
)
Task(
description="Spec validation B",
subagent_type="general-purpose",
model="opus",
prompt="[Identical prompt]"
)
Task(
description="Spec validation C",
subagent_type="general-purpose",
model="opus",
prompt="[Identical prompt]"
)All three agents execute concurrently and return summarized findings directly.
Each agent receives this prompt (insert the actual spec content):
Do you see any flaw in this spec plan? Starting from the mainspec to its corresponding slices. Do you see any gap in logic or anything that was missed?
Ground your answers in the actual codebase referenced in the spec.
## Spec to Validate
**Mainspec Path:** [path]
**Slices:**
[For each slice, insert file path to slice]
## Output Guidance
For each issue include: which slice/section, codebase file path / line numbers, what the problem is, and suggested fix if possible.Wait for all agents to return their summaries before proceeding.
After subagent results are collected, perform an expert validation pass. This happens after Phase 1 so you can focus expert review on areas the subagents flagged.
Read the mainspec and slice files to understand the spec content for expert consultation.
Expert skills are named expert-*. Based on the spec content, identify which experts apply and invoke them:
ls .claude/skills/ | grep expert (do not use Glob, as it may not resolve symlinks).expert-* skills are relevant.skill: "expert-*" to get domain-specific validation guidance.With expert context, review the spec for domain-specific issues:
Collect expert findings — Keep track of any issues identified during expert review. These are merged with subagent findings in Phase 3.
This is where spec-validate diverges from a human-facing validator: we do not summarize and present consensus to a user. We classify findings ourselves and apply impactful ones directly as edits to the spec files.
Two findings are "the same" if they:
Apply deduplication across all 3 subagent findings + expert findings.
Group deduplicated findings by how many subagents identified them:
| Consensus | Confidence |
|---|---|
| 3/3 found | Very High |
| 2/3 found | High |
| 1/3 found | Medium |
Discard 1/3 findings. They are low-confidence and not worth automatic application. Only 3/3 and 2/3 findings, plus expert findings flagged as blocking by the expert, are candidates for fixing.
For each candidate finding, classify as impactful or nitpick:
Impactful — Would mislead the implementing agent. Examples:
./prds/<feature>/run-prd-test.sh and require exit 0 as the PRD-completion criterion)→ Apply the fix.
Nitpick — Would not change implementation outcomes. Examples:
→ Skip the fix, log the finding.
When in doubt, ask: would an implementation agent reading only this spec produce different code if this finding were addressed? If yes → impactful. If no → nitpick.
Edit the affected mainspec and slice files directly. Use the Edit tool. For each fix:
validation-log.md what was changed and why.If a finding lists multiple possible fixes, pick the one most consistent with the rest of the spec and the codebase patterns.
specs/<feature>/validation-log.mdStructure:
# Validation Log: <feature>
## Subagent consensus
### 3/3 (Very High Confidence)
- **[Applied]** Slice 1.2 / Signal section — finding text — fix applied: <description>
- **[Skipped: nitpick]** Slice 2.1 / Wording — finding text — reason for skip
### 2/3 (High Confidence)
- **[Applied]** ...
- **[Skipped: nitpick]** ...
### 1/3 (Discarded)
- Slice X.Y / ... — finding text — discarded (low confidence)
## Expert findings
- **[Applied]** [Expert: react-expert] Slice 2.3 — finding text — fix applied: <description>
- **[Skipped: nitpick]** ...
## Summary
- Total findings: N
- Impactful fixes applied: M
- Nitpicks skipped: K
- Discarded (1/3): LAfter all edits and the log are written:
git add specs/<feature>/
git commit -m "spec-validate: applied <M> impactful fixes to <feature>"
git push
touch specs/<feature>/.validated
git add specs/<feature>/.validated
git commit -m "spec-validate: sentinel for <feature>"
git pushThe sentinel must be the final commit-and-push — only after all artifacts are in place. The dispatcher uses only the sentinel to advance.
3a7a725
Also appears in
since Aug 20, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.