THE BOOK IS THE SOURCE OF TRUTH. IF IT'S NOT IN THE BOOK, IT DOESN'T EXIST.
Core principle: The Book is the single index of all engineering knowledge. If it's not indexed, it's not governed.
When to invoke
- Initializing DDD on a new project (
.ddd/does not exist) - Adding or updating references in the Book manifest
- Releasing a new Book version
- Managing object passports
- Synchronizing the Book with existing project artifacts (ADRs, CONTEXT.md, AGENTS.md)
- Validating Book integrity
- When the project stack changes (new dependency, framework upgrade, database change)
When NOT to use
- Managing a specific change's evidence — use
ddd-scope - Verifying conformance of a change — use
ddd-verify - Auditing existing code for documentation debt — use
ddd-audit
What it does
Initialize
- Create
.ddd/directory structure (see SPEC.md §7.1 for layout) - Create initial
book.yamlmanifest withschema_version: 0.1.0 - Detect and record project stack — scan manifest files, lockfiles, config files. See
references/stack-detection.md(inddd-scope) for the full procedure. Populate.ddd/project-context.yaml. NEVER guess from parametric memory. - Index existing project artifacts (requirements, ADRs, CONTEXT.md) as Book references with independence levels
- Generate initial
knowledge-map.yamlwith domains derived from detected stack - Determine conformance profile (Lite or Assurance)
Synchronize
- Scan for new or updated ADRs, requirements, and project docs
- Re-scan project stack if dependencies or config files changed — update
project-context.yaml, flag dependencies without matching evidence lock entries - Update Book manifest references with correct independence levels
- Regenerate
trace-matrix.yamlas a view of the evidence graph
Validate
- Check every Book reference exists and is accessible
- Check evidence lock entries have valid content digests
- Check no revoked entries are still cited in claims
- Check supersession chains are consistent
- Check
project-context.yamlis current — compare detected stack against recorded stack, flag drift - Check all dependencies used by DDD-governed code have evidence lock entries
Release
- Compute manifest digest (sha256 of all referenced artifact digests)
- Tag the Book version (semver)
- Validate all referenced artifacts before release
Manage passports
Create and update object passports for responsibility-bearing design units. See references/passport-schema.md for the full schema and passport-required criteria.
Passports SHOULD reference domain models via domain_sources when a model exists.
Artifacts managed
| Artifact | Location | Purpose |
|---|---|---|
| Book manifest | .ddd/book.yaml |
Root of the Book, indexes all artifacts |
| Project context | .ddd/project-context.yaml |
Governed tech stack, runtime, dependencies, architecture |
| Knowledge Map | .ddd/knowledge-map.yaml |
Relevant engineering domains, gaps, and package links |
| Evidence lock | .ddd/evidence.lock |
Immutable external-source provenance |
| Claim ledger | .ddd/claims.yaml |
Atomic assertions requiring support |
| Trace matrix | .ddd/trace-matrix.yaml |
Generated view of evidence graph |
| Passports | .ddd/passports/ |
Object design contracts |
| Decisions | .ddd/decisions/ |
DDD decisions (ADRs) |
| Models | .ddd/models/ |
Domain, state, threat, architecture models |
Examples
Rationalization table
| Excuse | Reality |
|---|---|
| "I can initialize without stack detection" | Stack detection drives evidence acquisition, drift detection, and adapter selection. Skip it and every downstream skill has garbage input. |
| "The Book doesn't need validation, I just created it" | New Books can have broken references, missing evidence lock entries, and stale constraints. Validate after every change. |
| "Passports are overkill for this component" | If it owns state, crosses a boundary, or has high failure impact, it needs a passport. Check the criteria in references/passport-schema.md. |
| "I'll update project-context.yaml later" | Every skill reads it. If it's stale, evidence acquisition uses wrong versions, drift detection produces false positives, and grounding traces to wrong APIs. |
Self-improvement
- Did Book validation surface any issues? If yes, the synchronization step missed something — improve the sync scan.
- Are there artifacts in
.ddd/not referenced bybook.yaml? If so, the manifest is incomplete — add them. - Did stack detection produce
unknownfields that could have been detected? Improve the detection logic or add config file patterns.
Spec reference
- SPEC.md §7 (Artifacts), §9.8 (Stack detection), §11 (Object Passports), §17 (Versioning and Migration)