pub enum Command {
Show 52 variants
Help(HelpArgs),
Init(InitArgs),
Onboard(OnboardArgs),
Hooks(HooksArgs),
Index(IndexArgs),
Read(ReadArgs),
Ledger(LedgerCmd),
Policy(PolicyCmd),
VerifyEffects(VerifyEffectsArgs),
Trace(TraceArgs),
Sync(SyncArgs),
Hydrate(HydrateArgs),
Audit(AuditCmd),
Mcp(McpCmd),
Skill(SkillArgs),
Bootstrap(BootstrapArgs),
Watch(WatchArgs),
List(ListArgs),
Callers(CallersArgs),
Callees(CalleesArgs),
ContextFor(ContextForArgs),
Repair(RepairArgs),
Gc(GcArgs),
Scratch(ScratchCmd),
Worktree(WorktreeCmd),
Search(SearchArgs),
References(ReferencesArgs),
Scopes(ScopesCmd),
Conclusions(ConclusionsCmd),
Recipe(RecipeCmd),
Map(MapArgs),
Think(ThinkCmd),
Sidecar(SidecarCmd),
Investigate(InvestigateArgs),
Status(StatusArgs),
Impact(ImpactArgs),
Checklist(ChecklistArgs),
Invariant(InvariantCmd),
PrepareChange(PrepareChangeArgs),
Since(SinceArgs),
Endpoints(EndpointsArgs),
Architecture(ArchitectureArgs),
DeadCode(DeadCodeArgs),
TestSummary(TestSummaryArgs),
Feedback(FeedbackCmd),
AnnotateCommit(AnnotateCommitArgs),
TaskClose(TaskCloseArgs),
Scorecard(ScorecardArgs),
Probe(ProbeCmd),
Trust(TrustArgs),
Workflow(WorkflowArgs),
Repo(RepoCmd),
}Variants§
Help(HelpArgs)
On-demand feature docs: syntax, examples, gotchas. asd help lists the
catalog; asd help <feature> details one; --publish writes the shared
cross-tool help index.
Init(InitArgs)
Initialize an ASD repository and install git hooks.
Onboard(OnboardArgs)
Plan K t-005: one-shot post-clone setup. Runs init → index → conclusions import in the right order so a new developer (or
their agent) gets a fully usable ASD project in one command.
Idempotent — re-runs are safe.
Hooks(HooksArgs)
Show installed ASD git hooks and their current status.
Index(IndexArgs)
Walk source files under a directory and build the FTS + ASG
index. Re-runnable; idempotent. (Aliased as reindex to
match the MCP mcp__asd__reindex tool name.)
Read(ReadArgs)
Read a symbol, its effects, and recent ledger entries.
Plan D t-003: also accepts code_read (MCP-era alias).
Ledger(LedgerCmd)
Ledger operations.
Policy(PolicyCmd)
Policy introspection (requires –policy / ASD_POLICY).
VerifyEffects(VerifyEffectsArgs)
Verify a symbol’s declared effects against its source. Reports each as
verified or unverified (unverified = source unreadable or no adapter for
that language). --write persists results. Use before trusting
impact’s effect set on a symbol you’re about to edit.
Trace(TraceArgs)
Run a program under the ASD runtime tracer and ingest observed effects (Python only — uses sys.settrace via tools/asd_tracer.py).
Sync(SyncArgs)
Mirror ASG state into the .asd/v1/ on-disk sidecar so it can
travel with git commit.
Hydrate(HydrateArgs)
Read the .asd/v1/ sidecar back into ASG. Inverse of sync.
Used to restore state after a fresh git clone.
Audit(AuditCmd)
Read back audit events (ledger mutations, policy evaluations, effect declarations) emitted to the JSONL audit log.
Mcp(McpCmd)
Install, uninstall, or check asd-mcp registration in agent tools.
Skill(SkillArgs)
Install ASD’s agent Skill (SKILL.md) into detected agent skill dirs.
Bootstrap(BootstrapArgs)
Print a paste-into-your-agent block that installs + connects ASD (+ CTX).
Watch(WatchArgs)
Watch the repo and re-index automatically on source changes.
List(ListArgs)
List indexed symbols, effects, or ledger entries.
Callers(CallersArgs)
Show symbols that call the given symbol (direct or transitive).
Plan D t-003: also accepts callers_of (MCP-era alias).
Callees(CalleesArgs)
Show symbols called by the given symbol (direct or transitive).
Plan D t-003: also accepts callees_of (MCP-era alias).
ContextFor(ContextForArgs)
Assemble agent query context for one or more symbols. Returns signature, callers/callees, effects, invariants, hazards, and ledger.
Repair(RepairArgs)
Scan the ASG for integrity issues (orphaned refs, malformed blobs, stale
call graph edges) and optionally apply safe auto-corrections.
By default runs read-only (dry-run); pass --fix to apply corrections.
Gc(GcArgs)
Garbage-collect the ASG store: preview by default, reporting what a
sweep would reclaim; --sweep deletes, --vacuum shrinks the file, and
--unpin-legacy releases milestones distilled before AgentStateGraph
v1.2.2. Takes the store’s write lock while sweeping, so other ASD
writers wait rather than lose data.
Scratch(ScratchCmd)
Working notes scoped to a symbol or investigation, with a
promote-to-ledger path. Local-only; not synced by asd sync.
Worktree(WorktreeCmd)
Plan-scoped git worktrees: isolated files + HEAD per unit of work so
parallel agents can’t clobber each other. start, work, then finish
to merge back + tear down.
Search(SearchArgs)
Ranked concept search over indexed symbols.
Plan D t-003: also accepts code_search and code_query (MCP-era aliases).
References(ReferencesArgs)
Exact-symbol references via literal text scan + index definition lookup.
Use this when you want rg-style completeness on a concrete identifier
(no tokenization, no BM25). Requires rg on PATH.
Scopes(ScopesCmd)
List named scope aliases defined in .asd/scopes.toml. Discoverability
for the --scope and --paths flags supported by search and friends.
Conclusions(ConclusionsCmd)
View ledger entries bucketed by the six Plan B conclusion classes (decisions, classifications, mappings, hazards, recipes, followups).
Recipe(RecipeCmd)
Plan C t-004: structured change-intent recipes. Returns per-file action plans (Delete / Gate / Run / KeepAsCovered / Review) for known task families.
Map(MapArgs)
Plan C t-007: initial-read project summary. Walks the indexed project, identifies package boundaries, and tags test files (fast-test / diagnostic-test). Writes Ownership ledger entries with role tags so the next session inherits the mental model.
Think(ThinkCmd)
Plan G t-003: capture agent thinking. Subcommands: speculate (Hypothesis), model (MentalModel), failed (FailedAttempt), question (OpenQuestion), list. See docs/initial-read-prompt.md.
Sidecar(SidecarCmd)
Sidecar utilities. migrate flips a repo from the legacy .asd/v1/
layout (Plan A) to the compact .asd/conclusions/ layout (Plan B).
Investigate(InvestigateArgs)
Broad feature archaeology: search → expand call chains, invariants, hazards, and effects for the top matching entry points in one pass.
Status(StatusArgs)
Show index health: age, symbol count, and optionally dirty source files.
Impact(ImpactArgs)
Blast-radius analysis before editing a symbol: transitive callers, aggregated effects, invariants/hazards, affected tests, and recent git touches.
Checklist(ChecklistArgs)
Structured pre-edit checklist: files to inspect, invariants to preserve, tests to run, known hazards, and effects to verify. Markdown or JSON output.
Invariant(InvariantCmd)
Record, list, and remove invariants attached to symbols.
Shortcut for asd ledger {append,list,withdraw} --kind invariant.
PrepareChange(PrepareChangeArgs)
One-call agent-ready context package for a planned change: design invariants, layer-grouped entry points, likely edit files, affected tests, effects, and recent git touches — all composed in a single JSON response.
Since(SinceArgs)
Symbols in files changed since a commit + combined blast radius. PR-review workflow: pass the base SHA to get full impact without knowing any symbol names upfront. Supports –agent, –intent, –depth.
Endpoints(EndpointsArgs)
List cross-service endpoints (HTTP routes/clients, pub-sub) and match
in-repo client calls to the routes that serve them. A client call with NO
matching route is a candidate contract-drift signal (a caller reaching an
endpoint the server no longer serves). --export emits a service manifest
for cross-repo matching.
Architecture(ArchitectureArgs)
One-call “orient me” overview: languages, packages, layers, routes, and call-graph hotspots for a cold agent. Supports –agent.
DeadCode(DeadCodeArgs)
Functions/methods with no inbound call edges (CANDIDATE dead code).
Excludes route handlers, tests, and main/dunder methods. Candidates only —
a symbol may still be reached via reflection, a framework entrypoint, or a
cross-language boundary the call graph doesn’t span; confirm with
asd references <name> before deleting. Supports –agent.
TestSummary(TestSummaryArgs)
Read test-runner output on stdin; emit a compact failures-only summary (cargo/pytest parsed precisely, others via generic scan). Supports –agent.
Feedback(FeedbackCmd)
Record and list search-quality feedback verdicts for (query, symbol) pairs.
AnnotateCommit(AnnotateCommitArgs)
Derive ledger annotations from a git commit and optionally write them. Reads changed files and the commit message, resolves touched symbols, and suggests (or records) decisions, invariants, proofs, and hazards.
TaskClose(TaskCloseArgs)
Close an active task: write proof and optional validation entries to the ledger for all symbols affected by HEAD, tagged with CTX plan/task provenance.
Scorecard(ScorecardArgs)
Benchmark scorecard across the five ASD dimensions: truth, feedback, change, uncertainty, and workflow.
Probe(ProbeCmd)
Golden benchmark harness: run structural assertions against ASD command output to catch ranking/classification regressions.
Trust(TrustArgs)
State Trust Score: machine-readable rollup of index freshness, sidecar status, ledger density, dirty files, and concept gaps. Answers: “can I rely on ASD for the current task?” in a single call.
Workflow(WorkflowArgs)
Task workflow session history: evidence quality, workflow type, and
missing steps across recent asd task-close invocations.
Repo(RepoCmd)
Manage the shared ASD repo registry at ~/.config/asd/repos.toml. Subcommands: add, list, use, rm, show.
Trait Implementations§
Source§impl FromArgMatches for Command
impl FromArgMatches for Command
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Command
impl Subcommand for Command
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommand