All commands accept --root <path>. If omitted, CDAD uses the current directory.
Creates the CDAD folder layout and cdad.config.json.
cdad initChecks that required CDAD folders exist.
cdad doctorCreates a durable goal record as JSON and Markdown.
cdad goal new GOAL-ID \
--objective "..." \
--scope-in "..." \
--scope-out "..." \
--constraint "..." \
--risk "..." \
--quality-bar "..." \
--verify "..."Output:
docs/specs/<GOAL-ID>.goal.jsondocs/specs/<GOAL-ID>.goal.md
Validates goal records.
cdad goal validate --reportOutput:
agent/reports/<GOAL-ID>-goal-validation.json
Validates Markdown prompt/design/spec files for required CDAD sections and basic consistency.
cdad design validate docs/specs/my-design.md --reportChecks:
- objective
- scope in
- scope out
- constraints
- risks
- verification
- approval boundaries
- objective/scope-out conflicts
- token/security risk coverage in verification
- constraint/approval-boundary alignment
Creates a task packet as canonical JSON and reviewable Markdown.
cdad packet new TASK-ID \
--goal-id GOAL-ID \
--objective "..." \
--why-now "..." \
--context path/to/file \
--constraint "..." \
--verify "..." \
--reference docs/specs/GOAL-ID.goal.json \
--priority 1 \
--risk 4 \
--value 5Output:
agent/packets/<TASK-ID>.jsonagent/packets/<TASK-ID>.md
Regenerates packet Markdown from JSON.
cdad packet render TASK-IDUpdates packet lifecycle state.
cdad packet status TASK-ID --status NeedsApproval
cdad packet status TASK-ID --status Blocked
cdad packet status TASK-ID --status ReadyStatuses:
DraftReadyInProgressPassedBlockedNeedsApprovalAmbiguous
Links or repairs packet-to-goal traceability.
cdad packet link-goal TASK-ID GOAL-IDValidates packet schemas.
cdad validate --strict-paths --report--strict-paths checks local relevant_context paths exist.
Selects the next unblocked open packet.
cdad next --heuristic dependency-first
cdad next --heuristic risk-first
cdad next --heuristic value-first
cdad next --heuristic dependency-first --jsonBuilds a ranked context bundle for one packet.
cdad context TASK-ID --budget 12000Output:
agent/verification/<TASK-ID>-context.md
The bundle includes explicit packet context, references, related source files, tests, decisions, architecture notes, and specs.
Detects likely verification commands without running them.
cdad verificationRuns packet verification commands and writes evidence.
cdad verify TASK-IDIf runnable verification passes, CDAD updates:
- packet status to
Passed - verification evidence paths
- packet Markdown rendering
Appends a resumable progress entry and updates the packet progress snapshot.
cdad progress add TASK-ID \
--result Passed \
--file src/example.py \
--verification "tests passed" \
--next "Create next packet."Shows goal -> packet -> evidence -> progress.
cdad trace
cdad trace --json --output agent/reports/trace.jsonChecks goal-to-packet coverage.
cdad coverage --reportOutput:
agent/reports/goal-coverage.json
Emits workflow metrics.
cdad benchmark --output agent/benchmarks/metrics.jsonMetrics:
- packet count
- passed packet count
- verification pass rate
- context bundle token estimate
- verification evidence count
- progress entry count
- rework mentions
- average time to verified packet
Converts JSON or Markdown artifacts to TOON-style compact notation for lower context footprint.
cdad toon agent/packets/AUTH-ML-01.json --output agent/packets/AUTH-ML-01.toon --stats
cdad toon docs/specs/magic-link-design.md --format md --output docs/specs/magic-link-design.toonEfficiency guidance:
- JSON -> TOON is the preferred path because CDAD JSON is already typed and structured.
- Markdown -> TOON is best-effort: headings and bullets are preserved, but the converter must infer structure.
- Use
--statsbefore adopting a TOON export in an integration. Structured packet JSON should shrink; prose-heavy Markdown can grow. - Keep canonical artifacts as JSON/Markdown; use TOON as a runtime context export.
Generates thin agent integration templates.
cdad integration generate --agent codex --force
cdad integration generate --agent claude-code --force
cdad integration generate --agent cursor --force
cdad integration generate --agent github-copilot --force
cdad integration generate --all --forceRuns CDAD quality gates for CI.
cdad ciConfigured by cdad.config.json.