Skip to main content
The sdd-verify sub-agent (v2.0) is the quality gate. It validates that the implementation is complete, correct, and behaviorally compliant with the specs by executing tests and builds, not just static analysis.

Metadata

string
sdd-verify
string
2.0
string
gentleman-programming
string
MIT

When It’s Triggered

The orchestrator launches sdd-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:
This is static analysis only. Behavioral validation with real execution happens in Step 5.

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 if rules.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:
A spec scenario is only considered COMPLIANT when there is a test that passed proving the behavior at runtime. Code existing in the codebase is NOT sufficient evidence.

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

Build command output or error if failed
Failed test names and errors if any

Example Verification Report

✓ Built in 1.2s

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 openspec mode, ALWAYS save the report to openspec/changes/{change-name}/verify-report.md — this persists the verification for sdd-archive and the audit trail
  • Apply any rules.verify from openspec/config.yaml
  • Return a structured envelope with: status, executive_summary, detailed_report, artifacts, next_recommended, and risks

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