| name | validate-handoff |
| description | Validate the contract between skill phases to catch broken handoffs early. This is the "schema validation at agent boundaries" pattern from distributed systems. |
| metadata | {"author":"cascadian-gamers","version":"1.0"} |
Validate Handoff
Validate the contract between skill phases to catch broken handoffs early. This is the "schema validation at agent boundaries" pattern from distributed systems.
When to Run
Called automatically at phase transitions in create-spec and implement-and-review-loop. Can also be invoked standalone to check spec integrity.
Contracts
Requirements → HLD
Validate that the HLD addresses every requirement:
- Read all FR-* and NFR-* IDs from the Requirements section.
- Check the HLD's "Requirements Traceability" section.
- FAIL if any FR/NFR is not mapped to at least one HLD component.
- WARN if an HLD component doesn't trace back to any requirement (gold-plating).
HLD → LLD
Validate that the LLD covers every HLD component:
- Read all "Major Modules" from the HLD.
- Check the LLD's "Component Design" section.
- FAIL if any HLD module has no corresponding LLD component.
- WARN if the LLD introduces components not in the HLD (scope creep).
LLD → Task Plan
Validate that every LLD component has implementation tasks:
- Read all components from the LLD.
- Check the Task Plan's detailed task definitions.
- FAIL if any LLD component has no task covering it.
- WARN if a task references files not mentioned in the LLD.
Task Plan → Implementation
Validate that completed tasks match their definition of done:
- For each task marked
[x], read its Definition of Done.
- Check that each criterion is verifiable (file exists, test passes, build succeeds).
- FAIL if a completed task has unmet criteria.
Implementation → Review
Validate that the review covers all changed files:
- Compare
git diff --name-only against the review findings.
- WARN if a changed file has zero findings (may indicate the reviewer missed it).
Output
Handoff Validation: Requirements → HLD
✅ FR-1 → System Context (AgentCore Memory)
✅ FR-2 → Data Flow (read path)
✅ FR-3 → Data Flow (chronological ordering)
❌ NFR-3 → NOT MAPPED (failure resilience)
Result: FAIL — 1 unmapped requirement
Rules
- Run validation BEFORE presenting the phase output to the user. Catch gaps before they propagate.
- FAIL blocks the phase transition. The gap must be addressed before moving on.
- WARN is informational — present it but don't block.
- This is a quality gate, not a creativity gate. Don't block good designs because they don't perfectly match requirements wording — use judgment on semantic equivalence.
- Refer to the user as "The Brougham 22".