DLD is implemented as a set of Claude Code skills. All user interaction happens through skills — scripts and utilities are support infrastructure only.
Skills are markdown files with YAML frontmatter in .claude/skills/, following the established pattern used by OpenSpec, Spec Kit, and IIC Kit.
Bootstraps DLD in a repository. Interactive. Run once per project.
- Asks whether the project is flat or namespaced
- If namespaced, asks for the initial namespace list
- Creates
dld.config.yamlat the repo root - Creates the
decisions/directory (and namespace subdirectories if applicable) - Optionally creates a development practices manifest (see below) — suggested but skippable
- Adds DLD agent instructions to
CLAUDE.md:- Instruction to use
/dld-lookupwhen encountering@decision(DL-XXX)annotations before modifying annotated code - Brief description of the DLD workflow
- Instruction to use
The primary skill. Records a single decision in one conversation.
- Collects context from the developer (what, why, what it affects)
- Checks for related existing decisions by code references, tags, and keywords
- Asks clarifying questions if needed to articulate rationale (max 3-5, not an interrogation)
- Assigns the next sequential ID (derived by scanning existing files)
- Creates the decision record file in the appropriate directory
- Sets status to
proposed - Regenerates
INDEX.md - Reads the practices manifest (if it exists) for awareness of project conventions
- Suggests next step: implement the decision or record another
For larger features that need multiple decisions.
- Takes a feature description from the developer
- Helps break it down into discrete decisions
- Assigns a shared tag for grouping
- Creates multiple decision records in sequence, each with its own rationale
- All created as
proposed - Reads the practices manifest for awareness of project conventions
- Regenerates
INDEX.md - Suggests next step: implement decisions in order
Takes one or more proposed decisions and implements them.
- Reads the referenced decision(s)
- Reads the practices manifest — this is where manifest guidance is most directly applied (testing practices, code style, error handling conventions, etc.)
- Makes the code changes
- Adds
@decision(DL-XXX)annotations to affected code - Updates the decision's
referencesfield with actual code locations - Flips status from
proposedtoaccepted - Regenerates
INDEX.md - Suggests next step: record another decision, or run audit
Scans for drift between decisions and code.
- Finds
@decisionannotations in code, checks they reference valid, accepted decisions - Finds code changes to annotated methods/classes that weren't accompanied by decision updates (compares against last audit commit)
- Identifies decisions whose referenced code no longer exists
- Reports findings, suggests remediation
- Records audit metadata (see "Run Tracking" below)
Generates two spec projections from the decision log:
decisions/SNAPSHOT.md— Detailed per-decision reference. Every active decision with its rationale summary and code references. Organized by namespace (namespaced) or tag (flat).decisions/OVERVIEW.md— High-level narrative synthesis. Prose document that explains the system's current design by synthesizing across decisions. Includes Mermaid diagrams for architecture, flows, and decision relationships.
- Reads all
accepteddecisions (excludes superseded/deprecated/proposed) - Resolves supersession chains
- Generates SNAPSHOT.md first (structured reference), then OVERVIEW.md (narrative synthesis from the snapshot)
- Records snapshot metadata (see "Run Tracking" below)
Quick overview of the decision log state.
- Total decisions by status (proposed, accepted, deprecated, superseded)
- Recent decisions
- Decisions grouped by tag or namespace
- Last audit time and any unresolved drift warnings
- Last snapshot generation time
Look up specific decisions. Primary use case: the AI agent encounters @decision(DL-XXX) in code and needs to read the referenced decision before modifying annotated code. Also usable by the developer to query by ID, tag, code path, or keyword.
- By ID:
/dld-lookup DL-047 - By tag:
/dld-lookup tag:payment-gateway - By code path:
/dld-lookup path:src/billing/vat.ts - Returns the full decision record(s)
The audit and snapshot skills need to know what happened since their last run to focus their work effectively.
A decisions/.dld-state.yaml file tracks this:
audit:
last_run: 2026-03-07T14:30:00Z
commit_hash: a1b2c3d4e5f6 # the commit at which the last audit ran
snapshot:
last_run: 2026-03-05T10:00:00Z
decisions_included: 47 # highest DL-ID included in last snapshot- Audit uses
commit_hashto diff only changes since the last audit (git diff <hash>..HEADon annotated files) - Snapshot uses
decisions_included(orlast_runtimestamp) to identify new/changed decisions since the last generation, then regenerates the full snapshot incorporating updates
This file is managed automatically by the skills, never edited manually.
A lightweight document that captures guiding development principles for the project. Inspired by IIC Kit's constitution concept but intentionally lighter — it's a practices guide, not a governance framework.
Provides the AI agent with project-specific development conventions when making decisions and implementing code. Examples:
- "Always use test-driven development"
- "Minimum 80% test coverage for new code"
- "Use dependency injection, avoid static singletons"
- "All API endpoints must validate input with Zod schemas"
- "Follow the existing error handling pattern using Result types"
- Flat projects:
decisions/PRACTICES.md - Namespaced projects:
decisions/PRACTICES.mdfor shared practices, plus optionaldecisions/records/<namespace>/PRACTICES.mdfor namespace-specific practices
Namespace-level practices extend (not replace) the root-level practices. If both exist, skills read both, with namespace-specific practices taking precedence on conflicts.
Simple markdown — no rigid schema. The manifest is meant to be read by the AI agent as context, not parsed programmatically.
# Development Practices
## Testing
- Use test-driven development for all new features
- Minimum 80% test coverage for new code
- Integration tests required for all API endpoints
## Code Style
- Use Result types for error handling, avoid throwing exceptions
- All API input validated with Zod schemas
- Prefer composition over inheritance
## Architecture
- All external service calls go through adapter interfaces
- Database access only through repository pattern| Skill | How it uses the manifest |
|---|---|
/dld-decide |
Awareness — may reference relevant practices when helping structure the decision |
/dld-plan |
Awareness — considers practices when breaking down a feature into decisions |
/dld-implement |
Primary consumer — applies practices directly when writing code (testing approach, patterns, conventions) |
/dld-audit |
Could flag implementations that appear to violate stated practices |
/dld-init suggests creating a practices manifest during setup. The developer can:
- Accept and fill it in (skill helps with structured questions about their practices)
- Skip it entirely (can be added later at any time)
/dld-init (once)
│
├── /dld-decide ←──────────────────┐
│ │ │
│ ▼ │
│ /dld-implement ────────────────┘
│ │ (record more decisions)
│ ▼
│ /dld-audit (periodic)
│ │
│ ▼
│ /dld-snapshot (periodic)
│
└── /dld-plan ──→ creates multiple decisions
│ via /dld-decide logic
▼
/dld-implement (for each)
Utility (anytime):
/dld-status — overview of decision log state
/dld-lookup — query specific decisions (also used automatically
by the agent when encountering @decision annotations)
.claude/
skills/
dld-common/scripts/ # Shared utilities
common.sh
next-id.sh
regenerate-index.sh
update-status.sh
dld-init/
SKILL.md
scripts/
create-config.sh
create-directories.sh
create-empty-index.sh
dld-decide/
SKILL.md
scripts/
create-decision.sh
dld-implement/
SKILL.md
scripts/
update-references.sh
dld-lookup/
SKILL.md
dld-plan/ # V2
SKILL.md
dld-status/ # V2
SKILL.md
dld-audit/ # V2
SKILL.md
scripts/
find-annotations.sh
update-audit-state.sh
dld-snapshot/ # V3
SKILL.md
scripts/
collect-active-decisions.sh
update-snapshot-state.sh
dld-audit-auto/
SKILL.md
dld-retrofit/
SKILL.md
dld.config.yaml # project configuration
decisions/
INDEX.md # auto-generated decision index
SNAPSHOT.md # detailed per-decision reference
OVERVIEW.md # narrative synthesis with diagrams
PRACTICES.md # development practices manifest (optional)
.dld-state.yaml # run tracking for audit/snapshot
records/ # decision records subdirectory
DL-001.md # decision records (flat mode)
DL-002.md
billing/ # namespace directories (namespaced mode)
PRACTICES.md # namespace-specific practices (optional)
DL-001.md
DL-004.md
auth/
DL-002.md
DL-005.md
- Low ceremony —
/dld-decideis one conversation, not a pipeline. Developer describes the decision, skill structures it, done. - Prerequisite validation — Each skill checks that DLD is initialized, that referenced decisions exist, etc. Clear error messages with remediation commands.
- Next-step suggestions — Every skill ends with a suggestion of what to do next.
- Context injection — Skills read
dld.config.yamlto understand project structure (flat vs namespaced, namespace list, decisions directory). - Manifest awareness — Core skills read
PRACTICES.mdfor project conventions, with/dld-implementas the primary consumer. - Index regeneration — Any skill that creates or modifies decisions regenerates
INDEX.mdautomatically. - Run tracking — Audit and snapshot skills track when they last ran for incremental operation.
- CLAUDE.md integration —
/dld-initadds instructions so the agent respects@decisionannotations even outside explicit DLD skill invocations.
/dld-init— without it nothing works/dld-decide— the core workflow/dld-implement— closes the decision-to-code loop/dld-lookup— enables the agent to respect@decisionannotations
/dld-plan— multi-decision feature planning/dld-status— quick overview/dld-audit— drift detection
/dld-snapshot— generated spec projection