Cycle step 6 · /sdd validate
Validation — four axes, one verdict
Code that compiles is not necessarily code that works, and code that works is not necessarily code that honours the intent. SDD validation covers four axes — technical, functional, business, governance — and the code is never finished until the SPEC is synchronized (Drift Lock).
Axis 1 — Technical validation
The objective baseline: the project's toolchain, run in full and reported as a table. No judgement, just facts.
| Check | Command | Result |
|---|---|---|
| Lint | [project command] | PASS / FAIL |
| Types | [type-check] | PASS / FAIL |
| Unit tests | [test] | PASS / FAIL |
| Integration tests | [test:integration] | PASS / FAIL |
| Build | [build] | PASS / FAIL |
| Coverage | [coverage] | X% |
NEVER validate code that fails the tests. NEVER validate code containing unresolved TODO-JNSP: markers (JNSP: Je Ne Sais Pas — "I don't know") — these markers are questions awaiting a human decision, not cosmetic details.
Axis 2 — Functional validation
The functional axis confronts the code with the SPEC's test cases, criterion by criterion — against the code itself, not only against the tests. Specified inputs respected, processing steps followed, output format produced, every edge case covered by a test, every acceptance criterion checked off. On the team side, functional validation is carried by the QA Engineer, and usability — UX, accessibility, performance — by QA together with the PM.
Axis 3 — Business validation
Business validation, carried by the Product Manager, asks the question tests do not ask: is the intent honoured, and are the targeted outcomes achievable? The Drift Criterion of the parent Intent is re-read: is the observable signal of intent betrayal absent? This is the axis where fidelity to the intent is checked — a semantic defect that no toolchain detects.
Axis 4 — Governance validation
The four Tier 1 agents — AIAD-AI-ACT, AIAD-RGPD, AIAD-RGAA, AIAD-RGESN — are applied via the regulatory-veto skill. Each holds a right of veto: a VETO blocks, a WARN requires a remediation plan before merge. This validation is not optional for the projects concerned.
When a governance agent cannot decide — a standard not applicable with certainty, missing information — it returns UNKNOWN. That verdict is treated as a VETO: you do not merge on a regulatory doubt. This is the governance flavour of the JNSP policy.
Verification is designed, not bought
Doctrine v1.9 makes a bet: the quality of verification depends first on the design of the process — what is checked, when and by whom — rather than on the power of the model doing the review. This is a position, not a demonstrated result: the evidence converges, but no single piece is sufficient on its own. It translates into four rules.
| Rule | What it implies | Strength of support |
|---|---|---|
| The critical conversation happens first at the Execution Gate | What you want is discussed at the Gate; code review then checks conformity with an intent already discussed. It detects what was misunderstood; it does not discover what you wanted. | Process rule |
| Two classes of defects | Structurally detectable defects (compilation, types, tooled architecture rules, secrets) are delegated to tooling and agents. Semantic defects — fidelity to the intent, business correctness, design boundaries — remain under human review, relying on the Stranger Test. | Process rule |
| Separate the producer from the critic | When review is entrusted to an agent, AIAD recommends — without mandating — a reviewer from a different model family than the producing agent. The cost (several providers, contracts, GDPR analysis) must be weighed. The package supports it via /sdd validate --cross-model (additive-only review in a fresh context). | One 2026 study, on mathematics problems rather than code: 35% false rejections in self-review versus 2% in cross-review |
| Design before testing step by step | In an agent loop, complete upfront design — architecture, types, edge cases, contracts, in other words a SPEC — appears more effective than incremental TDD. | An indication to be confirmed, not a rule: 3 to 8.5 times more tokens with no net gain for incremental TDD, in an exploratory 2026 experiment |
Review exemplars
An organisation's review knowledge — what a senior reviewer spots and why — can be extracted into annotated examples, versioned in dedicated files (for example .aiad/review-exemplars/) and loaded only in review sessions — not in the AGENT-GUIDE, which is injected into every session and reserved for permanent instructions. Roblox described this practice in 2026. An exemplar is built from real reviews, revised like an artifact, and retired when it no longer reflects the team's standards.
Verification Tax
A 2026 literature review uses this name for the gap between the productivity gain in writing code and the much smaller gain in delivering reliable software. The term describes what the upfront investment in SPEC and Gate seeks to reduce. The team-side corollary: efficiency is not quality — a faster review is not a better review (see the role of the QA Engineer).
A composition of skills, with no duplication
/sdd validate is the most composite command of the cycle: it implements no logic of its own but composes three reusable skills — ears-validator (coverage of §3's testable criteria), drift-detection (code ↔ SPEC gaps on the diff) and regulatory-veto (the 4 Tier 1 standards). Each skill is also invoked elsewhere in the cycle (/sdd gate, /sdd drift-check, /sdd security…): the logic lives in one place, and the commands orchestrate it.
The verdict
| Verdict | Meaning | Action |
|---|---|---|
| VALIDATED | Validation passed on all four axes | Proceed to the Drift Lock (/sdd drift-check) |
| FIXES | Minor, localized gaps | List them, relaunch the agent on the precise points |
| REJECTED | Structural failure | Imprecise SPEC → Human Learning · agent wrong despite a clear SPEC → Lesson Learned |
| JNSP | Validation undecidable | Question(s) for the human — never downgrade to "minor fixes" to push the merge through |
The Human Learning / Lesson Learned distinction is essential for continuous improvement: the former documents a gap between human intent and delivery (the SPEC was the problem), the latter a recurring agent error (the execution was the problem). Both feed the AGENT-GUIDE.
Verdict: JNSP — validation impossible without a human decision
What is validated: <PASS axes>
What blocks: <undecidable areas with § ref>
Question(s) for the human: <actionable rephrasing>
The complementary roles — /sdd security and /sdd audit
Two audit commands extend validation for high-stakes features, with reports persisted in .aiad/metrics/:
| Command | Scope | Persistence |
|---|---|---|
/sdd security | OWASP Top 10, secrets management, agent permissions (minimal necessary permissions), data exposure, AI-ACT/RGPD compliance | .aiad/metrics/security/YYYY-MM-DD-SPEC-NNN.md |
/sdd audit | Code ↔ SPEC conformity, introduced technical debt (complexity, coupling, readability), consistency with the AGENT-GUIDE | .aiad/metrics/audit/YYYY-MM-DD-SPEC-NNN.md |
/sdd security: after any feature touching access control, user data, secrets or an AI component — recommended before any critical PR, with a frontier model. /sdd audit: for features with high technical stakes, or after several iterations on the same component. The persisted reports feed the metrics and the retrospectives.