| doc_type | api |
|---|---|
| title | CLI reference |
acdd provides a command-line interface and a stdio MCP server. Run acdd --help or append --help to any command for accepted arguments. Commands other than serve print readable Markdown by default. Pass global --format json to retain machine-readable JSON output.
| Option | Behavior |
|---|---|
--root <PATH> |
Workspace for all commands. Defaults to the current directory; ACDD_WORKSPACE_ROOT can set it. |
--db <PATH> |
Code-index path, relative to the selected root. Defaults to <root>/.acdd/code-map.sqlite; ACDD_DB can set it. Does not select the state store. |
--state-db <PATH> |
State SQLite database path override (ACDD_STATE_DB). Defaults to state_db in acdd.yaml (.acdd/state.sqlite under the primary Git worktree). |
--config <PATH> |
Root-confined ACDD YAML configuration; ACDD_CONFIG can set it. Explicit missing files fail. Defaults to <root>/acdd.yaml when present. |
--profile <REF> |
Explicit gate profile name (base | code | audit | documentation) or root-confined YAML path ([:<sha256_prefix>]); ACDD_PROFILE can set it. |
| `--format markdown | json` |
build, scan, and delta also accept a positional workspace path. Either form selects the workspace; when both are supplied, they must resolve to the same directory.
Selections resolve once per invocation. Flags override their environment variables.
Profile resolution checks --profile / ACDD_PROFILE, spec frontmatter profile:,
specs.<collection>.profile in acdd.yaml, profiles_dirs, .acdd/profile.yaml
(automatic workspace default when present, else embedded code), and embedded
baselines (base, code, audit, documentation). Use --in-place (or git.isolation: in_place in a profile)
for single-checkout execution; use --profile audit with --goal for read-only
code review and security scanning, and --profile documentation for compiler-free
living documentation and acdd-rule updates.
State-store resolution uses --state-db, state_db in acdd.yaml, and
<primary_worktree>/.acdd/state.sqlite discovered via git rev-parse --path-format=absolute --git-common-dir.
Owned runner children (agent sessions claiming gates) receive selected paths and
session identity (ACDD_CONFIG, ACDD_PROFILE, ACDD_DB, ACDD_STATE_DB, ACDD_AGENT_SESSION_ID)
without mutating the parent environment. Command processes (project build, lint,
and test commands executed by command gates) execute in a sanitized environment
where internal ACDD orchestration variables are scrubbed, preventing cross-workspace
configuration pollution. Concurrent in-process invocations retain separate selections.
serve retains the selected config and profile for its lifetime, including
module visibility, task loaders, request policy, refreshes and reloads. Selected
worktrees rebase root-relative settings. delta --config validates the selected
adapter and uses the guarded rebuild path when policy changes; without an
explicit config, delta retains the persisted index adapter. Missing or malformed
explicit selections fail before index publication.
acdd scan .
acdd build .
acdd build /path/to/repository --output /path/to/index.sqlite
acdd delta . src/module.py src/other.pyscan reports admitted files without writing an index. build creates a full index. delta updates the listed changed or deleted paths in an existing index. build and scan accept --adapter <PATH> for a configuration file inside the workspace; reads use the selected configuration. Conflicting --adapter and --config paths fail.
query, docs, and ast grep open the index through open_or_rebuild: a missing or schema-incompatible index is built automatically. An existing index is not refreshed just because source files changed; run build or delta to update those results.
acdd read notes.txt --start-line 20 --line-count 40
acdd read notes.txt --mode search --pattern 'timeout' --context 2
acdd read notes.txt --mode search --pattern 'error|warning' --regex
acdd read docs/reference/tasks.md --mode outline
acdd read src/engine/reader.rs --selector acdd_read_tool
acdd read notes.txt --mode delta --baseline HEAD
acdd read notes.txt --mode raw --output-file exports/read.txtread uses the same layered reader as MCP acdd_read. The positional path is
required; --selector selects a symbol within that file. Alternatively, pass a
symbol selector as the positional value with --mode snippet. Auto mode selects
snippet for --selector, search for --pattern, and lines otherwise.
Core text modes run without an index. Markdown outline requires docs; code
outline and snippet require codemap. Use --max-body-lines and --leading-lines
to bound symbol output, then --source-offset with the previous --generation
for continuation. See the reader contract for
text bounds, exports, sensitive paths, task badges, and conditional hints.
acdd query overview
acdd query overview --aspects entrypoints
acdd query overview --aspects entrypoints_with_tests
acdd query overview --aspects topology
acdd query search 'parse*' --kind function --limit 30
acdd query search 'takes:GateProfile'
acdd query search 'returns:Result'
acdd query inspect 'src/module.py:parse' --show-source
acdd query explain 'src/module.py:parse'
acdd query impact 'src/module.py:parse' --depth 1
acdd query impact --changes staged --depth 1
acdd query tests 'src/module.py:parse' --direction inbound
acdd query remove 'src/module.py:parse'
acdd query analyze 'SELECT name FROM nodes ORDER BY name'
acdd query run slice 'src/module.py:parse' --depth 1 --limit 30
acdd query run slice src/db --limit 30
acdd query run untested src/core --limit 30
acdd query run implementations LanguageLinker --limit 30
acdd query run duplicates --level symbol --min-lines 10 --limit 30
acdd query run duplicates src --level file --limit 30
acdd query run dead_tails --path crates/acdd-state --limit 30
acdd --format json query overviewquery overview --aspects accepts comma-separated aspect names. entrypoints excludes tests; entrypoints_with_tests includes them in the same entrypoints result. Repeat the chosen aspect and use --limit, --offset, and the previous page's --generation to continue a bounded aspect page.
topology is opt-in and returns paged module statistics and dependency edges;
see the MCP reference for grouping
and role rules. Directory slices include bounded inbound and outbound boundary
summaries. CLI and MCP read the same index and return the same graph data.
query impact defaults to one edge and accepts exactly one symbol selector or --changes staged|unstaged|head; --path can restrict a change view to a workspace-relative path. Use --limit from 1 to 100 (default 100) for page size and --offset to request a later page; a nonzero offset requires the preceding page's --generation. A change view returns changed symbols, impacted nodes and tests, plus explicit unmapped changes. It maps ranges only when the selected Git postimage matches the indexed file, and sets complete to false when some changes cannot be mapped. Its continuation generation binds the graph and captured Git change snapshot. Depth-one results include the selected edge on each non-seed node; full detail includes stored edge evidence. query run impact keeps its depth 2 default; both accept --depth to override it. query tests also accepts --direction outbound for dependencies of a test. query run accepts overview, inspect, explain, impact, slice, unwired, sql, untested, implementations, duplicates, and dead_tails. query analyze accepts an indexed path, an empty target for the workspace, or one read-only SELECT/WITH statement. Its diagnostic form computes cycles; the MCP form requires include_cycles: true.
The CLI query inspect --show-source returns the indexed symbol's source range after checking the file digest. Use --source-offset with --generation from the previous source page to continue. CLI and MCP source continuations always require that explicit token; missing or stale tokens return an error and a restart hint. Source pages stop at complete-line boundaries; an individually oversized line returns a budget error rather than partial code. See limits and freshness.
--format is global and can be placed before or after a subcommand. Markdown
uses the shared operation-aware renderer and keeps traversal evidence visible:
explain distinguishes exact calls from candidate relationships, deeper impact
paths retain their available predecessor evidence, and graph-backed test results
show ordered, linked test-to-target paths with only producer-supplied roles.
Lexical test suggestions remain explicitly unverified. JSON mode preserves the
returned semantic value for clients that parse stdout.
query inspect and query explain include paged analysis_gaps for the selected source span. Each gap names its reason, path, line, scope symbol, and resolver evidence. Explain edge rows retain both public endpoint IDs, kind, path, line, and direction relative to the query; full detail also includes stored evidence. Rust trait-object calls report trait_object_dispatch; indexed macro invocations report macro_expansion_not_analyzed while retaining their macro-declaration navigation edge. Exact call edges use calls; bounded branch-join navigation uses possible_calls with confidence possible. Inbound impact follows possible calls, and removal analysis treats candidate callers as incoming dependencies.
acdd docs search 'dependency' --doc-type architecture
acdd docs get 'docs/architecture/indexing.md' --section 'Ownership and data flow'
acdd ast grep 'print($VALUE)' --lang python --path srcdocs reads indexed documents. ast grep reads admitted file paths from the index, narrows them with FTS terms, and parses matching source after checking its indexed digest. Both can trigger the missing or incompatible-index rebuild described above; ast grep also requires a compiled language profile. docs search accepts --component and --limit; ast grep accepts --limit.
acdd lint
acdd lint crates/acdd-state --categories arch,docs --severity warn
acdd lint --rule INV-CORE-LEAF --format json
acdd lint --categories all --limit 50 --offset 0acdd lint [TARGET] runs the unified language-agnostic lint engine over .acdd/code-map.sqlite (matching MCP code_map_lint):
--categories: comma-separatedarch,duplicates,dead_tails,cycles,syntax,docs, orall(omitted defaults toarch,syntax,docs).--rule <ID>: repeat or pass comma-separated rule/invariant IDs to filter evaluated diagnostics.--severity <warn|error>: minimum diagnostic severity threshold.--limit,--offset,--generation,--detail <compact|full>: standard generational paging matchingcode_map_lint.- Exits non-zero when
summary.errors > 0.
For ast grep, a --limit from 1 through 100 (default 100) returns the same
JSON matches page object as MCP AST search, including applicable continuation
and total-status fields. CLI limits 101..10000 retain the aggregate matches
array, limit, and truncated result. That larger CLI-only range is outside
shared page parity.
0.6 replaces nested task / plan / workflow / milestone / checkpoint
commands with one flat Run / GateProfile lifecycle CLI backed by
crates/acdd-state and src/state_bridge/. See state, tasks & lifecycle
for schemas, state machines, locks, candidate verification, and error codes.
acdd init [--force]
acdd draft <collection> <slug> [--prefix PREFIX] [--title "Title"] [--profile PROFILE]init [--force]: Writes starteracdd.yaml,.acdd/profile.yaml(inherit: codewhencodemodule is enabled, otherwiseinherit: base), and the canonical.acdd/protection block in.gitignore, verifying viagit check-ignorethat.acdd/state.sqliteis ignored and.acdd/profile.yamlstays trackable.draft <collection> <slug>: Creates the next sequentially zero-padded specification Markdown file in the configuredspecs.<collection>directory (milestonesorplansby default).
acdd start [<spec>] [--goal TEXT] [--name RUN_NAME] [--profile PROFILE] [--scope PATH ...] [--target-base REF] [--worktree | --in-place] [--worktree-path PATH]
acdd status [--run RUN_ID_OR_NAME]
acdd list [--workspace NAME] [--status active|completed|cancelled] [--include-tombstones] [--limit 1..100] [--offset N] [--generation GEN]
acdd show [<node>] [--run RUN_ID_OR_NAME]
acdd context [<node>] [--run RUN_ID_OR_NAME] [--worker WORKER_ID]
acdd next [--run RUN_ID_OR_NAME] [--limit N]
acdd roadmap [spec_id] [--collection NAME] [--ready] [--active] [--tasks]start: Starts a newRunfrom a spec file (<spec>) or an ephemeral--goal(materializing.acdd/run/<run_id>/spec.md, attaching--scopeglobs as task scope or frontmatterowners:on taskless profiles likeaudit). Selectsworktree(--worktree,--worktree-path,--target-base) or--in-placeisolation (neutralizingsave.post: committononewhile preservingsave.immutable: true).status,list,show,next,context,roadmap: Read-only queries (StateQuery).listsupports--include-tombstonesfor cleared/completed/cancelledrun_tombstonesand stableruns.generationpaging.showrenders the full run tree or a specific node cursor (<gate>,<task_ref>,<task_ref>.<gate>).nextlists currently schedulable node cursors and topological execution waves.contextexecutes overSQLITE_OPEN_READ_ONLYand refreshes the 6-tier budgetedClaimRespwithout mutating claim state or advancingclaim_revision(auto-selecting the active or single ready node when<node>is omitted, failing closed on ambiguity); configure it as aPostCompactandSessionStart(compact)hook in agent environments to reload current contract and blackboard context automatically after context compactions.roadmapshows cross-collection in-progress runs, dependency waves, critical-path ordering, scope-overlap markers, and optional per-spec task drill-down (--tasksor<spec_id>); it never creates.acdd/state.sqliteand does not validate--profilewhen that flag is omitted.
acdd claim [<node>] [--run RUN] [--worker ID] [--session-fingerprint FP] [--force] [--steal-remote] [--worktree PATH]
acdd verify <node> [--run RUN] [--worker ID] [--test TARGET] [--claim-revision REV] [--worktree PATH]
acdd submit <node> --action pass|reject [--run RUN] [--worker ID] [--claim-revision REV] [--test TARGET] [--evidence JSON_OR_@PATH] [--findings JSON_OR_@PATH] [--invariant ID ...] [--summary TEXT] [--allow-main] [--worktree PATH]claim: Claims<node>(or auto-selects the next ready cursor when<node>is omitted) under optimistic concurrency (claim_revision+node_version), returning the 6-tier budgetedClaimResp(contract+guidance,unresolved_findings,pre_task_slice,dependency_receipts,blackboard,context_lenses). Pass--forceto take over an active claim (--steal-remoterequired across different host session fingerprints).verify: Executes the node'scommand:,call:,checks:(DomainProvider), and write-scope perimeter barrier without advancing state.--testpasses the targeted test filter to{test_filter}andcode.seam(for example onbuildgates).submit: Submits--action passor--action rejectforclaim_revision. Oncommandgates, omitting cached proof automatically triggers verification. Review gates require--evidence(JSON or@path);rejectrequires structured--findings(JSON or@path, with optionalkind:defect | architectural_drift). Passingreceipt: truewithsave.post: commitcreates the scoped plumbing delivery commit (refusingmain/masterunless--allow-main). When the gate declaressave.report,--action passmaterializes the.mdor.jsonreport atomically and returnsreport_pathinSubmitResp.
Use acdd snapshot save|restore|list|clear [<target>] [--all] [--rev N] [--run RUN] [--delete] [--older-than DUR] [--worktree PATH] to manage checkpoints. --run keeps per-task refs refs/acdd/snapshots/<run_id>/<task_ref>/r<rev>. Without --run, an active-run task ref stays on that task; any other label uses refs/acdd/snapshots/_adhoc/<label>/r<rev>. --delete is clear; with --rev or --older-than and no --run, it targets standalone refs even when an active run task exists. --older-than accepts <N><s|m|h|d|w>. See task snapshots.
acdd extend-scope <node> --path PATH [--path PATH ...] --reason TEXT [--run RUN] [--worker ID]
acdd reopen <node> [--run RUN] [--cascade] [--reason TEXT]
acdd sync [--run RUN] [--rebind-profile]
acdd subtask <task_ref> <subtask_ref> --status pending|in_progress|completed|cancelled [--evidence TEXT] [--run RUN]
acdd blackboard [--action read|post] [--run RUN] [--node CURSOR] [--recipient-node CURSOR] [--subtask-ref REF] [--gate GATE] [--author WORKER] [--topic draft|notes|findings|blockers|decisions|deferred] [--payload TEXT] [--status open|acknowledged|resolved|carried_over] [--limit N] [--offset N] [--generation GEN]extend-scope: Expandsadmitted_scopeafter conflict checks against other claimed incomplete tasks (blocking.acdd/**andprotected_pathswithOUT_OF_SCOPE_CHANGES).reopen: Reopens a gate or task container;--cascademarks downstreamin_progress/completeddependent tasks stale.sync: Reconciles spec edits into an active run;--rebind-profilerebinds non-completed gates against the latest profile.subtask: Transitions subtask state; terminalcompletedorcancelledrequires non-empty--evidence.blackboard: Reads or posts scoped collaboration messages (open | acknowledged | resolved | carried_over) across topicsdraft | notes | findings | blockers | decisions | deferred.
acdd clear [<run_id>] [--run RUN] [--reason TEXT] [--force]clear: Cancels/clears a run intorun_tombstones(terminal_status = 'cleared')and cleans managed worktrees (--forceoverrides dirty worktree checks).- Task branch integration: Headless
acdd runwaves land completed task branches internally viarebase-ff(integrate_task_branch); manual worktree runs integrate via standardgit mergeorgit rebase, and terminal verification confirms content equivalence by GitTreeOid(TASK_NOT_INTEGRATED).
acdd run [--run RUN] [--jobs N] [--allow-main] [--dry-run]acdd run drives the active Run across topological DAG waves using the
resolved GateProfile:
- Executes mechanical
command:/call:gates directly viaverify+submit. - Spawns configured
roles.<role>.runnerprocesses for role-assigned gates (clamped to--jobs 1whengit.isolation: in_place), streaming child output and collecting accepted submissions. --dry-runcomputes schedulable waves without mutating storage or spawning runners.- Role-assigned gates without a configured
runner:command fail closed withWORKFLOW_RUNNER_REQUIRED(manual/subagent orchestration usesclaim->verify->submitdirectly).
acdd --root /path/to/repository serve
acdd reload
acdd guide init [--force]
acdd guide query
acdd guide lifecycle --format json
acdd guide acdd
acdd guide gates
acdd guide subtasks
acdd guide code
acdd guide docs
acdd tool <domain>_<name> [--args JSON] [--run RUN] [--node CURSOR] [--worktree PATH]serve/reload: Starts the stdio MCP server (20 built-in tools + activeDomainProvider<domain>_<name>plugin tools) or reloads running MCP server processes viaSIGHUP.guide: Returns capability-filtered guidance across the 11 topics (query,init,adapter,validate,code,ast,docs,lifecycle,acdd,gates,subtasks).tool: Invokes a<domain>_<name>plugin tool exposed by an activeDomainProviderwith JSON arguments validated againstDomainToolDef.input_schema.
acdd validate [<PATH>]validate [<PATH>]: Routes through the single canonical validator (acdd_state::validate+acdd_state::usecases::deps) to validateacdd.yaml(load_adapter_report, rejecting legacy0.5.xkeys withCONFIG_MIGRATION_REQUIRED), active.acdd/profile.yaml(requiring bound commands whenmodules.stateis enabled),DomainProvidercapabilities, and spec files fail-closed (collection prefixes, zero-padded digits, unarchived terminal specs, task DAG cycles, cross-spec/cross-workspacedepends_on, scope globs, and protected paths). When<PATH>is omitted, validates the full workspace configuration, active profile, and configuredspecs:collections. For manual upgrading from0.5.x, see the 0.6.0 migration guide.