Post-implementation final validation — verify end-to-end traceability, constitution compliance, and requirement fulfillment across all artifacts and code changes.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
After ALL implementation batches are complete, perform a comprehensive final validation that the entire chain from requirements to implementation is complete and consistent. This is the completeness quality gate — the last gate before the feature is declared done.
READ-ONLY ANALYSIS: Do not modify source code files. Only write to checkpoint/traceability artifacts. Output a structured migration report with actionable feedback.
Constitution Authority: The project constitution ($APPMOD_DIR/constitution.md) is non-negotiable. Constitution violations are automatically CRITICAL and require implementation fixes — not dilution, reinterpretation, or silent ignoring of the principle.
$KIT_ROOTis provided by the calling agent. All$KIT_ROOT/paths below use that value.
Run script once from repo root and parse JSON for FEATURE_DIR and AVAILABLE_DOCS. Derive absolute paths:
$APPMOD_DIR/constitution.mdBash example: $KIT_ROOT/skills/scripts/bash/check-prerequisites.sh --json --require-tasks --include-tasks
PowerShell example: $KIT_ROOT/skills/scripts/powershell/check-prerequisites.ps1 -Json -RequireTasks -IncludeTasks
Abort with an error message if any required file is missing. For single quotes in args like "I'm Groot", use escape syntax: e.g 'I'''m Groot' (or double-quote if possible: "I'm Groot").
REQUIRED — all must be loaded:
| Artifact | Path | Purpose |
|---|---|---|
| Constitution | $APPMOD_DIR/constitution.md | Principle compliance validation |
| Specification | FEATURE_DIR/spec.md | Original requirements (REQ-XXX) + acceptance criteria + scope baseline |
| Plan | FEATURE_DIR/plan.md | Architecture, phases, plan items |
| Tasks | FEATURE_DIR/tasks.md | Task list with [Plan:X.Y] references, completion status |
REQUIRED — all checkpoints:
| Checkpoint | Path | Validates |
|---|---|---|
| spec-to-plan | FEATURE_DIR/checkpoints/spec-to-plan.yaml | REQ-XXX → Plan items |
| plan-to-tasks | FEATURE_DIR/checkpoints/plan-to-tasks.yaml | Plan items → Tasks |
| tasks-to-impl | FEATURE_DIR/checkpoints/tasks-to-impl.yaml | Tasks → Code changes |
Validate each checkpoint has passed with 100% coverage:
For each checkpoint file:
validation.passed == truevalidation.errors[] and validation.warnings[]Checkpoint validation report:
## Checkpoint Validation
| Checkpoint | Status | Coverage | Errors | Warnings |
|------------|--------|----------|--------|----------|
| spec-to-plan.yaml | ✓ PASS | 100% | 0 | 0 |
| plan-to-tasks.yaml | ✓ PASS | 100% | 0 | 1 |
| tasks-to-impl.yaml | ✗ FAIL | 96% | 2 | 0 |
Any checkpoint with passed != true or coverage < 100% → CRITICAL ERROR
tasks.md for all tasks and their [X] / [ ] statustasks-to-impl.yaml checkpoint:
[X] in tasks.md MUST have corresponding files_changed in the checkpoint[X] in tasks.md[ ] (incomplete) that was plannedRead the traceability data already persisted in tasks-to-impl.yaml by ImplementationAgent (each task entry has upstream_trace with plan_item, requirements, and full_trace).
tasks-to-impl.yaml:
upstream_trace is present and completeupstream_trace.requirementsSave verification result to FEATURE_DIR/checkpoints/traceability-matrix.yaml: