| name | definition-of-done |
| description | Applicability-aware Definition of Done checklist. Core checks apply to every task; overlay checks activate only when the applicability manifest says the surface exists. Binary verification — pass or fail. Triggers at Phase 4 completion and Phase 5 entry. |
Definition of Done
Overview
Every task carries a DoD core baseline. Overlay checks are selected from the applicability manifest and only evaluated when the task actually touches that surface. A task is not complete until every active check is verified. Each check is binary (pass/fail) with a specified verification method and a tag:
automatable: must be verified by tool output
judgement: may call an LLM or human reviewer
When to Use
- Phase 4 completion: Verify all DoD items after execution
- Phase 5 entry: DoD verification is the first step of the quality gate for active overlays
- Manual: Any time task completion needs verification
Applicability Model
- Core baseline checks apply to every task.
- Overlay checks activate only when
applicability_manifest marks the relevant surface as active.
- Any suppressed overlay must include a concrete
not_applicable reason tied to task class or repo evidence.
Overlay Activation Trigger Table
This table is the authoritative mapping of change_surface flags and task class to DoD overlay check IDs. It is consumed by the deterministic dod_overlays evaluator. Any change here must be mirrored in tests/backtest/evaluators/dod_overlays.sh.
| Overlay | Check IDs | Trigger Expression |
|---|
| Security | 5, 6, 7, 8, 9 | new_attack_surface OR auth_change OR external_integration |
| Observability | 10, 11, 12, 13, 14 | runtime_path_change OR user_facing_operation |
| Integration | 18, 19, 20 | service_boundary_change OR external_integration OR api_change OR data_format_change |
| Content | 21, 22 | task_classification == "docs" or human-facing output is in scope |
| Implementation Interface / Productionization | 23, 24, 25, 26 | service_boundary_change OR external_integration OR api_change OR data_format_change OR runtime_path_change OR user_facing_operation when an interface or production claim is active |
Overlay checks that are not activated by this table must be reported as not_applicable with a concrete reason in the manifest's section_policy.
Mixed Acceptance Criteria Shapes
Acceptance criteria may arrive as strings or structured Given/When/Then objects.
Extraction rules:
- If an item is an object, read its
.then field as the criterion text and preserve any id and measurable_post_condition in the verification record.
- If an item is a string, use the string directly.
- Do not mark a task done if the evaluation path drops an upstream
id or measurable_post_condition.
Core Baseline Checks
Code Quality
| # | Check | Tag | Scope | Verification | Blocks On |
|---|
| 1 | All linters pass | automatable | core | Automated: LDD gate | Any violation |
| 2 | All tests pass | automatable | core | Automated: TDD suite | Any failure |
| 3 | Code complexity within budget | automatable | core | Automated: configured cyclomatic-complexity threshold only | Exceeding configured complexity ceiling |
| 4 | No code slop or stub patterns | automatable | core | Automated: anti-slop scanner | TODO, FIXME, PLACEHOLDER, todo!(), unimplemented!(), panic!(\"not implemented\"), NotImplementedError, pass, empty placeholder bodies, commented-out code, fake/mock placeholder logic in shipped code |
Reuse & Patterns
| # | Check | Tag | Scope | Verification | Blocks On |
|---|
| 15 | Reuse analysis confirmed | automatable | core | Automated: reuse-analysis output | Reimplementation detected |
| 16 | Existing conventions followed | automatable | core | Automated: bin/adlc convention-scan --file <changed-file> --json when target repo conventions are present | Open convention-scan issue |
| 17 | Antipattern checklist cleared | automatable | core | Automated: anti-slop plus antipattern scanner outputs | Known antipattern used |
| 28 | Repo convention waivers explicit | automatable | core | Convention scan or task output records file, rule, and reason for every waiver | Silent convention waiver, missing reason, or waived rule not tied to a file |
| 29 | Honesty contract satisfied | automatable | core | Build Brief schema plus emit-work-items --require-ready; artifact outputs expose no_overclaim and limitations when required | Missing honesty_contract, missing no-external-claims skip reason, missing docs honesty section requirement, or missing artifact no_overclaim / limitations fields |
| 30 | Performance envelope satisfied | automatable | core | Build Brief schema plus emit-work-items --require-ready; benchmark-required tasks record benchmark evidence before closeout | Missing performance_envelope, missing no-data-path skip reason, missing input scale or hot-path complexity, missing benchmark spec, or missing benchmark evidence |
| 31 | Task sizing satisfied | automatable | core | Build Brief schema plus emit-work-items --require-ready; task_sizing declares one module, one coherent structured file-set, or an atomic cross-module reason | Missing task_sizing, split-required task, broad multi-module surface without coherent file-set or atomic reason, code-module creation without module_plan, or size-only split/pass rationale |
| 32 | Ponytail minimality admitted | automatable | core | Automated: bin/adlc ponytail-admit --build-brief <brief> --diff-file <final.diff> --json when a final diff exists | Missing two-field minimality_contract, unapproved dependency diff, or removed validation/error/security/accessibility anatomy without waiver |
| 33 | Compatibility evidence satisfied | automatable | core | Automated: bin/adlc contract-surface-inventory plus bin/adlc compatibility-evidence --build-brief <brief> --inventory <inventory> --json when a published surface is touched | Missing named contract surface, missing verification predicate, generic compatibility claim, missing compatibility_evidence_refs, or absent migration/deprecation evidence for a breaking surface change |
No DoD check may use file size, line count, or SLOC as a criterion. Split decisions are based on responsibility, side effects, coordinator boundaries, and repo conventions, never size.
Security Overlay
| # | Check | Tag | Scope | Verification | Blocks On |
|---|
| 5 | STRIDE threat model complete | judgement | overlay | Council: Security Auditor | Missing categories |
| 6 | STRIDE mitigations implemented | judgement | overlay | Council review with cited implementation evidence | Unimplemented mitigations |
| 7 | OWASP Top 10 scan clean | automatable | overlay | Automated: SAST scan | High/Critical findings |
| 8 | No hardcoded secrets | automatable | overlay | Automated: pattern scan | Any match |
| 9 | Input validation at trust boundaries | judgement | overlay | Council review | Missing validation |
Observability Overlay
| # | Check | Tag | Scope | Verification | Blocks On |
|---|
| 10 | Error logging at failure points | automatable | overlay | Automated: AST scan | Missing error logs |
| 11 | Audit logging for state changes | automatable | overlay | Automated: AST scan | Missing audit logs |
| 12 | Operational logging for health | automatable | overlay | Automated: AST scan | Missing general logs |
| 13 | Log format matches convention | automatable | overlay | Automated: format check | Format mismatch |
| 14 | Correlation IDs propagate | automatable | overlay | Automated: pattern check | Missing correlation |
Integration Overlay
| # | Check | Tag | Scope | Verification | Blocks On |
|---|
| 18 | Integration wiring complete | automatable | overlay | Automated: registration check | Missing wiring, dead routes, unwired providers, unused flags/config, placeholder entry points |
| 19 | Scalability concerns documented | judgement | overlay | Council review | Undocumented |
| 20 | Degradation strategy defined | judgement | overlay | Council review | Missing strategy |
Content Overlay (human-facing output only)
| # | Check | Tag | Scope | Verification | Blocks On |
|---|
| 21 | Stop-slop gate passed | judgement | overlay | Slop judge plus scoring output | Score < 35/50 |
| 22 | Voice/brand compliance | judgement | overlay | Voice / brand review | Voice mismatch |
Implementation Interface / Productionization Overlay
| # | Check | Tag | Scope | Verification | Blocks On |
|---|
| 23 | Implementation Interface preserved | judgement | overlay | Council review plus schema/CLI evidence | Missing or changed implementation_interface_contract, reuse, consumes/emits, minimum fields, invariants, integration points, or validation gates |
| 24 | Productionization Gate bounded | automatable | overlay | Build Brief schema plus emit-work-items --require-ready | Missing productionization_gate for active production claim |
| 25 | Production-ready evidence present | automatable | overlay | Readiness report | overclaimed_production_ready, missing validation evidence, no-overclaim, reliability failure modes, owner, rollback, runbook/observability, or security/privacy posture |
| 26 | No-Overclaim respected | judgement | overlay | Code review and PR closeout evidence | Shipped code, ticket text, or PR summary claims support beyond the Coverage State |
Domain Adaptation
SWElfare: Core baseline always applies. Security, observability, integration, and content overlays activate only when the applicability manifest says the surface exists.
Ratatosk: Core baseline applies to every task. Security overlay → trade execution STRIDE. Observability overlay → trade/risk logging. Integration overlay → exchange API wiring. Content overlay → briefing slop gate.
Magnus: Core baseline applies to every task. Security overlay → brand STRIDE. Observability overlay → content performance logging. Integration overlay → platform integration. Content overlay → always active for user-facing copy.
Verification Schema
{
"task_id": "TASK-001",
"task_classification": "build_validation",
"applicability_manifest": {
"security_overlay": { "status": "not_applicable", "reason": "No new attack surface or trust boundary changes." },
"observability_overlay": { "status": "not_applicable", "reason": "No new runtime path or user-facing operation." },
"integration_overlay": { "status": "active", "reason": "Build wiring changed and must be verified." },
"content_overlay": { "status": "not_applicable", "reason": "No human-facing output changed." }
},
"active_checks": ["1", "2", "3", "4", "15", "16", "17", "18"],
"dod_checks": {
"ldd_pass": { "status": true, "evidence": "ruff: 0 violations, mypy: 0 errors" },
"tdd_pass": { "status": true, "evidence": "42 passed, 0 failed", "coverage": 87 },
"complexity_ok": { "status": true, "evidence": "max configured cyclomatic complexity: 8" },
"no_code_slop": { "status": true, "evidence": "0 violations: no TODO/FIXME/PLACEHOLDER, no stub bodies, no NotImplementedError, no commented-out code" },
"stride_complete": { "status": true, "threats": 6, "mitigations": 4 },
"stride_implemented": { "status": true, "evidence": "4/4 mitigations present" },
"owasp_clean": { "status": true, "findings": 0 },
"no_secrets": { "status": true, "evidence": "0 matches" },
"input_validation": { "status": true, "evidence": "council approved" },
"error_logging": { "status": true, "error_points": 3 },
"audit_logging": { "status": true, "audit_points": 2 },
"general_logging": { "status": true, "general_points": 5 },
"log_format": { "status": true, "evidence": "structured JSON" },
"correlation_ids": { "status": true, "evidence": "propagated" },
"reuse_confirmed": { "status": true, "reimplementations": 0 },
"conventions_followed": { "status": true, "evidence": "convention-scan: pass for changed Rust files" },
"repo_convention_waivers_explicit": { "status": true, "evidence": "0 waivers, or each waiver records file/rule/reason" },
"honesty_contract_satisfied": { "status": true, "evidence": "honesty_contract present; artifact outputs include no_overclaim and limitations when required" },
"performance_envelope_satisfied": { "status": true, "evidence": "performance_envelope present; data-path tasks define scale and complexity, benchmark_required decisions are explicit, and required benchmark evidence is recorded" },
"task_sizing_satisfied": { "status": true, "evidence": "task_sizing present; work is one module, a coherent structured file-set, or atomic cross-module work with an explicit reason" },
"compatibility_evidence_satisfied": { "status": true, "evidence": "contract-surface-inventory plus compatibility-evidence report: pass with a verification predicate and compatibility_evidence_refs" },
"antipatterns_cleared": { "status": true, "violations": 0 },
"wiring_complete": { "status": true, "upstream": 2, "downstream": 1 },
"scalability_documented": { "status": true },
"degradation_defined": { "status": true },
"slop_gate": { "status": true, "score": 42 },
"voice_compliance": { "status": true },
"implementation_interface_preserved": { "status": true },
"productionization_gate_bounded": { "status": true },
"production_ready_evidence_present": { "status": true },
"no_overclaim_respected": { "status": true }
},
"all_passed": true,
"timestamp": "2026-04-05T12:00:00Z"
}
Enforcement
- DoD verification runs automatically at Phase 4 completion for the core baseline and any active overlays
- Any failed active check blocks pipeline progression to Phase 6
- Failed checks produce specific remediation guidance
- No partial passes — ALL active checks must be green
- Scaffolding artifacts are never considered done. Any remaining stub, placeholder, or partial wiring fails DoD.
- Mixed acceptance-criteria handlers that lose an upstream
id or measurable_post_condition fail DoD verification.
- Repo-convention failures block DoD unless every waiver is explicit and present in task output.
- Honesty contracts block DoD unless each executable task either carries does-not-do / limitations / unsafe-claims requirements or explicitly declares no external claims.
- Performance envelopes block DoD unless each executable task either defines expected input scale, hot-path complexity, benchmark requirement, and benchmark evidence when required, or uses structured
applicability=not_applicable with a meaningful reason.
- Task sizing blocks DoD unless each executable task declares one module, one coherent structured file-set, or atomic cross-module work with an atomicity reason; code-module creation and explicit module-plan sizing bases require a real module plan, while coherent non-code file sets do not; split-required tasks stay blocked until decomposed.
- File size, line count, and SLOC are not valid DoD criteria.