Metadata
sdd-verify2.0gentleman-programmingMITWhen It’s Triggered
The orchestrator launchessdd-verify when:
- User runs
/sdd-verify - All tasks are marked complete
- User wants to validate implementation before archiving
What It Does
Step 1: Check Completeness
Verifies ALL tasks are done:Step 2: Check Correctness (Static Specs Match)
For EACH spec requirement and scenario, searches the codebase for structural evidence:Step 3: Check Coherence (Design Match)
Verifies design decisions were followed:Step 4: Check Testing (Static)
Verifies test files exist and cover the right scenarios:Step 4b: Run Tests (Real Execution)
Detects the project’s test runner and executes the tests:Step 4c: Build & Type Check (Real Execution)
Detects and runs the build/type-check command:Step 4d: Coverage Validation (Real Execution)
Runs with coverage only ifrules.verify.coverage_threshold is set in openspec/config.yaml:
Step 5: Spec Compliance Matrix (Behavioral Validation)
This is the most important step. Cross-references EVERY spec scenario against the actual test run results from Step 4b to build behavioral evidence. For each scenario from the specs, finds which test(s) cover it and what the result was:Step 6: Persist Verification Report
Saves to:- openspec mode:
openspec/changes/{change-name}/verify-report.md - engram mode: Observation with topic_key
sdd/{change-name}/verify-report - none mode: Returns inline only
Step 7: Return Summary
Returns the full verification report.Verification Report Format
Example Verification Report
Rules
- ALWAYS read the actual source code — don’t trust summaries
- ALWAYS execute tests — static analysis alone is not verification
- A spec scenario is only COMPLIANT when a test that covers it has PASSED
- Compare against SPECS first (behavioral correctness), DESIGN second (structural correctness)
- Be objective — report what IS, not what should be
- CRITICAL issues = must fix before archive
- WARNINGS = should fix but won’t block
- SUGGESTIONS = improvements, not blockers
- DO NOT fix any issues — only report them. The orchestrator decides what to do.
- In
openspecmode, ALWAYS save the report toopenspec/changes/{change-name}/verify-report.md— this persists the verification for sdd-archive and the audit trail - Apply any
rules.verifyfromopenspec/config.yaml - Return a structured envelope with:
status,executive_summary,detailed_report,artifacts,next_recommended, andrisks
Version 2.0 Features
v2.0 introduced:Real Execution
- Runs tests and captures results
- Runs build and type-check commands
- Reports exit codes and errors
Spec Compliance Matrix
- Cross-references spec scenarios with test results
- Assigns compliance status: COMPLIANT / FAILING / UNTESTED / PARTIAL
- Requires passing tests as proof of behavioral correctness
Coverage Validation
- Optional coverage threshold enforcement
- Per-file coverage for changed files
- Configurable via
rules.verify.coverage_threshold
Behavioral Evidence
- A spec scenario is only COMPLIANT if a test PASSED
- Code existence is not sufficient — must have runtime proof
Related
- Implementer — Implements the code that this sub-agent validates
- Archiver — Archives the change after verification passes
- OpenSpec Convention