Reference

Command Reference

Pick a command for the question your agent is working on: find relevant code, investigate a pattern, explore an alternative, or check a change. Start with the examples below; the complete reference lists the full CLI. Ordinary analysis is local and credential-free; explicitly enabled network features are inventoried on the security page.

Use roam --json <command> for structured analysis results. Read the verdict together with its scope and any incomplete checks. Run roam <command> --help for the installed version's arguments and options.

How to read this reference

Start with your task, not the size of the command list. The groups below offer entry points for code investigation, implementation choices and change checks. See the homepage examples for the questions behind these tools.

TierWhat it coversWhen to reach for it
Tier 1 — Investigation and change checksunderstand · retrieve · context · preflight · critiqueOrient in a repository, gather relevant source, and check a proposed change.
Tier 2 — Focused analysisimpact · affected-tests · test-gaps · safe-delete · clones · pr-risk · verify-imports · algo (legacy alias: math)Investigate a specific relationship, risk or implementation choice.
Tier 3 — Agent / MCPmcp · mcp-setup · agent-export · skill-generate · minimap · agent-contextWiring Roam into Claude Code, Cursor, Codex, your own agent.
Tier 4 — CI / enterprisepr-analyze · pr-comment-render · attest · audit-trail-export · audit-trail-verify · --sarifProduction CI gates, audit evidence, signed attestations.
Tier 5 — Specialized workflowsAdditional commands in the complete reference below.Check the command's help and prerequisites for your particular task.

Five commands to start with

Useful starting points, not a complete workflow or the MCP core preset. Connect Roam and build the index first; refresh it as the code changes.

VerbWhat it doesExample
understand Repository overview: layers, sizes, hotspots and entry points. roam understand
retrieve Ranked source passages for a task, using text search and indexed code relationships. roam retrieve "where is auth?"
context Files + line ranges to read before changing a symbol, prioritised by callers and tests. roam context AuthService
preflight Blast radius, affected tests, complexity, fitness rules — all in one verdict. roam preflight AuthService
critique Inspect a patch for related code and risks beyond the edited lines. Export the intended Git diff to change.patch and check that Git succeeded. Use a non-empty patch and replace the example intent with your change’s purpose. Saved clone evidence must be current and complete for that check to count as complete; read summary.review_source and partial_success. roam --json critique --input change.patch --intent "Round checkout totals"

Exploration

CommandWhat it does
roam search <pattern>Symbol search by name substring; BM25/FTS5 reranking when --explain is set
roam symbol <name>Show symbol definition, callers, and callees
roam file <path>Detailed file info: complexity, ownership, recent changes
roam impact <name>Indexed dependents and files a change could affect, within the reported traversal limits
roam trace <a> <b>k-shortest paths between two symbols in the call graph
roam tourOnboarding tour: top symbols, reading order, entry points, language breakdown, stats
roam diagnose <name>Root-cause ranking for a failing symbol
roam ask "<question>"Natural-language intent dispatch over the recipe registry

Health & Quality

CommandWhat it does
roam healthComposite health score (0-100) with risk breakdown
roam health --gateSame, but exits non-zero on threshold breach
roam complexityRank functions by cognitive complexity to choose code worth investigating. This measures branching and nesting, not runtime speed or correctness.
roam debtTech-debt aggregate; --roi ranks refactor candidates
roam check-rulesRun all built-in + community rule packs
roam test-gaps --changedFind changed symbols without indexed test connections or imported coverage evidence. Also accepts explicit file paths; it does not run tests.
roam why-slowRuntime hotspots from ingested traces

Refactoring

CommandWhat it does
roam suggest-refactoringTop-N refactor candidates by ROI
roam plan-refactor <name>Propose refactoring steps using indexed relationships; review and test the resulting changes
roam mutate move <sym> <file>Preview a move and supported import updates; --apply writes changes
roam simulate move <sym> <file>What-if architecture — clone the graph and apply a move
roam clones --persistDetect AST-level clones; persist to clone_pairs for critique
roam migration-planCurrent architecture → target architecture roadmap
roam stale-refs [--gate] [--fix preview|apply] [--attest path]Find dangling file references — markdown links / HTML href-src / backtick paths / anchors whose target is missing. Index-free. Supports SARIF, in-toto attestations, LSP code actions, repo-config (--init), and --root for monorepos.

Security & Governance

CommandWhat it does
roam taintInspect source-to-sink findings under the selected rules. Distinguish dataflow evidence from co-occurrence; neither proves exploitability.
roam vuln-reachQuery reachability of ingested vulnerabilities; --cve scopes to one CVE, --from to one entry point
roam adversarialAdversarial architecture review — challenges your changes by composing diff + cycles + clusters + layers + detectors
roam cga emitSign an in-toto v1 Code Graph Attestation
roam cga verifyVerify a CGA attestation (cosign-aware)
roam attestProof-carrying PR attestation — bundles diff, risk, breaking changes, and fitness for a commit range

Multi-Agent & MCP

CommandWhat it does
roam mcpStart the MCP server (stdio transport)
roam mcp --list-toolsPrint every MCP tool exposed by the active preset (default: 17 tools including the roam_expand_toolset meta-tool; 246 in full)
roam mcp-setup <client>Generate config for Claude Code, Cursor, Windsurf, VS Code, Gemini CLI, Codex CLI
roam fleet planPartition work across N agents (Louvain + co-change + PageRank)
roam orchestrateMulti-agent coordination plan with conflict-aware partitions
roam skill-generateEmit a SKILL.md file from the Capability Registry

Output Modes

Place global output flags before the command. Format support varies; for example, --sarif applies only to the supported analysis commands below.

FlagEffect
--jsonStable JSON envelope with schema versioning. For agent + script consumption.
--sarifSARIF 2.1.0 — for GitHub Code Scanning. Supported on SARIF-capable analysis commands including health, complexity, dead, smells, clones, vulns, taint, secrets, n1, dark-matter, supply-chain, critique, stale-refs. Run roam --help for the live list.
--agentCompact JSON + 500-token default budget. Optimised for sub-agent CLI calls.
--budget <n>Cap output to N tokens (0 = unlimited).
--select <expr>Project JSON with .field, [N], or [START:END]; repeatable and implies JSON.

Interpret evidence before acting

Read the verdict together with scope, resolution, metric definitions, partial_success, truncation, and skipped-check reasons. Exit zero does not mean every check ran or every finding is resolved.

Global flags go before the command: roam --detail algo or roam --json ai-readiness. Compare Git structure with roam semantic-diff --base HEAD~1. Use roam plan-refactor SymbolName for a symbol and roam split path/to/file.ts for a file.

magic-numbers defaults to the current directory, respects discovery exclusions, and includes monorepo workspaces. Relative JavaScript imports can resolve to TypeScript source through extension substitution; this is not a complete compiler or bundler resolver.

Investigate algorithm choices

roam algo looks for source patterns that may have a better approach and pairs findings with catalogued alternatives. Your agent gets a place to inspect and an option to evaluate, not just a warning that a function is complex.

roam index
roam --json algo

For each candidate, inspect the matched source and the stated assumptions. Check inputs, ordering and side effects, then test correctness and measure performance before adopting a replacement. Refresh the index after code changes. An empty or partial scan is not proof that every algorithm is appropriate.

Run an example: repeated membership checks or needed positions?

With Roam installed, start in an empty folder and save this as lookup.js. The first function repeatedly searches an array; the second builds a membership lookup once. The third needs positions.

function countAllowed(values, allowed) {
  let count = 0;
  for (const value of values) {
    if (allowed.indexOf(value) !== -1) count++;
  }
  return count;
}

function countAllowedWithSet(values, allowed) {
  const lookup = new Set(allowed);
  let count = 0;
  for (const value of values) {
    if (lookup.has(value)) count++;
  }
  return count;
}

function findPositions(values, allowed) {
  const positions = [];
  for (const value of values) {
    positions.push(allowed.indexOf(value));
  }
  return positions;
}

Index the file and ask for the repeated-lookup candidates:

git init --quiet
git add -- lookup.js
roam --json index
roam --json algo --task loop-lookup --path lookup.js

This synthetic fixture was run with Roam 14.1.0 on 13 September 2026 (UTC). These are selected fields from findings[0], not the full JSON response:

{
  "location": "lookup.js:1",
  "symbol_name": "countAllowed",
  "task_id": "loop-lookup",
  "suggested_way": "set-prebuilt",
  "confidence": "medium"
}

The scan reported countAllowed; it did not flag the existing set lookup or the position-returning function for this task. Inspect summary.partial_success, summary.truncated, summary.detectors_failed and summary.scoped_paths in the full response. This example checks one file and one task. If a scan is partial, investigate reported candidates, inspect the failures, and rerun failed checks before drawing conclusions from missing findings.

For ordinary, unchanged arrays of strings, the set version preserves the count, including repeated input values. It allocates a separate lookup, so weigh construction cost and memory against the workload. Keep the position lookup when callers need offsets: findPositions(["admin", "guest"], ["guest", "admin", "admin"]) returns [1, 0]; Set.has cannot supply those first-match positions or the missing-value sentinel -1.

Value semantics also matter: with [NaN] as both inputs, countAllowed returns 0 and the set version returns 1. Test the real input contract, mutation and callers before replacing a lookup. No speedup was measured.

The CLI command is algo; math remains a legacy alias. For MCP, select the review preset and restart the server; roam_algo is not in the default core preset. Check the connected tool list.

Preview a specific code edit

roam mutate supports move, rename, add-call and extract operations. The agent supplies the operation and its arguments. Roam previews the planned edits by default; --apply writes them to source files.

Example: preview moving an indexed handle_login function. Replace the name and destination with ones from your repository.

roam --json mutate move handle_login src/auth/login.py

Inspect the proposed edits and warnings before applying. Move uses indexed references for supported import updates; that is not complete language or dependency resolution. Review the diff, refresh the index and run the project's tests and build after an applied change.

Try a change on the graph first

roam simulate applies one requested move, extract, merge or delete operation to a copy of the indexed graph and compares structural metrics. It does not edit source files or choose an architecture for you.

Example: compare the graph before and after a proposed move. Replace this example symbol and path with your own.

roam --json simulate move handle_login src/auth/login.py

Use the result to investigate a proposal, not to approve an edit. A move changes file placement in the model while keeping its edges, so topology-based metrics can stay unchanged. These metrics do not establish runtime performance or behavior after an actual refactor.

Where to find more

See a complete workflow: the worked verification example shows how to bind a run, collect checks, review a change and verify its evidence bundle.

Complete Reference

Auto-generated from the CLI command registry and complete first docstring paragraphs. Every canonical command + alias has a direct link; inspect the same surface with roam --help-all.

Getting Started

CommandDescription
roam askRun the recipe that matches a free-form query.
roam workflowInspect a workflow recipe DAG, review lenses, and next commands.
roam indexBuild or rebuild the codebase index.
roam index-exportExport the roam index as a portable, integrity-checked tarball.
roam index-importImport a portable roam index bundle into the current repo.
roam watchWatch for file changes and auto-re-index incrementally.
roam initInitialize Roam for this project: index + config.
roam hooksManage git hook integration for automatic re-indexing.
roam resetDelete the index DB and rebuild from scratch.
roam cleanRemove orphaned entries from the index (files no longer on disk).
roam configManage per-project roam configuration (.roam/config.json).
roam doctorDiagnose environment setup: Python, dependencies, and index state.
roam understandSingle-call codebase comprehension — everything in one shot.
roam dashboardUnified codebase status: health, hotspots, debt, bus factor, AI rot.
roam tourGenerate a codebase onboarding tour.
roam describeAuto-generate a project description for AI coding agents.
roam minimapGenerate a compact codebase minimap for CLAUDE.md injection.
roam agent-exportGenerate an AI agent context file from the roam index.
roam wsManage multi-repo workspaces with cross-repo dependency tracking.
roam schemaShow the roam JSON envelope schema and validate output files.
roam mcpStart the roam MCP server.
roam mcp-setupGenerate MCP server config for AI coding platforms.
roam mcp-statusReport MCP server status: preset, tools, backpressure, cache, watcher.
roam ci-setupGenerate CI/CD pipeline config for roam-code integration.
roam adrsDiscover Architecture Decision Records and link them to code modules.
roam auditOne-shot codebase architecture audit.
roam changelogList commits since the last tag, optionally as a markdown draft.
roam exit-codesList every roam exit code with its meaning.
roam pluginsInspect roam plugins discovered via entry points / ROAM_PLUGIN_MODULES.
roam pre-commitInstall or preview a roam-critique pre-commit git hook.
roam recipesList every ``roam ask`` recipe with intent + example queries.
roam versionPrint the installed roam-code version (and check PyPI with --check).
roam index-statsReport .roam index size, row counts, and fragmentation.
roam statsAggregate metrics: language, role, kind counts + recent activity.
roam telemetryShow local telemetry: slowest commands + recent runs.
roam surfacePrint the canonical capability surface (commands, aliases, MCP tools, maturity).
roam surface-gapsFind gaps between CLI registration, MCP exposure, and documentation.
roam commandsList the repo's runnable commands, classified + evidence-backed.
roam explain-commandShow what a command does, what it depends on, and how stale-index sensitive it is.
roam db-checkIntegrity sweep over the local index. Reports orphans, broken edges, missing FTS, etc.

Daily Workflow

CommandDescription
roam preflightRun a pre-change safety checklist for a symbol, file, or staged changes.
roam permitStructural-permission verdict facade for AI agents + W198 issuance.
roam postmortemReplay current detectors against past commits.
roam pr-replayGenerate a PR Replay report.
roam service-reportGenerate a one-command service-engagement report.
roam reachability-triageEmit zero-egress vulnerability reachability facts.
roam guardCheck breaking-change risk for SYMBOL before editing.
roam guard-prRun the full Roam Guard pipeline in one call.
roam guard-doctorPreflight + health check before running roam guard-pr.
roam guard-initBootstrap `.roam/` + optional rule-pack stub for Roam Guard.
roam guard-cleanPrune `.roam/verdict-log.jsonl` to its last N entries.
roam guard-diffShow the verdict delta between two bundle snapshots.
roam guard-historyShow recent pr-bundles + their last-known verdict.
roam guard-rulesInspect / validate / test Roam Guard verification rule packs.
roam proof-bundleCompose and emit the AgentChangeProofBundle v1 from a pr-bundle.
roam verdictCompute the closed-enum verdict for a proof bundle.
roam verification-contractEmit the G3 verification contract for changed files + mode + policy.
roam bench-compileRun a controlled A/B between vanilla / static / compile prompt modes.
roam agent-planDecompose partitions into dependency-ordered multi-agent tasks.
roam agent-contextGenerate per-worker context: write scope, read-only deps, and contracts.
roam pr-riskCompute risk score for pending changes.
roam pr-prepOne-shot pre-PR fitness check: diff + critique + pr-risk.
roam pr-analyzeAnalyse a PR diff for structural risk and AI-likelihood.
roam pr-bundleProof-carrying PR bundle (R26 -- Roam Review MVP differentiator).
roam pr-comment-renderRender a markdown PR comment from a pr-analyze envelope.
roam rules-validateLint a `.roam/rules.yml` file before shipping it to your team.
roam metrics-pushPush metrics-only summary to Roam Cloud Lite.
roam audit-trail-verifyVerify SHA-256 chain integrity of a roam audit trail.
roam audit-trail-exportExport the audit trail for procurement / compliance review.
roam audit-trail-conformance-checkScore the audit trail against an EU AI Act Article 12 checklist.
roam article-12-checkEU AI Act Article 12 readiness assessment for the indexed repo.
roam capabilitiesEmit the capability registry — every command's machine-readable shape.
roam skill-generateGenerate an agent-runtime skill manifest from the capability registry.
roam compareStructural diff between two roam indices.
roam migration-planGenerate an ordered migration plan with risk + blast-radius per step.
roam dogfoodRun audit, PR analysis and optional audit-trail checks together.
roam dogfood-aggregateAggregate the dogfood eval corpus into a backlog/triage view.
roam suppressSuppress a math / over-fetch / missing-index / auth-gaps finding.
roam pr-diffShow structural impact of pending changes.
roam evidence-diffDiff two ``ChangeEvidence`` packets.
roam evidence-doctorDiagnose a ``ChangeEvidence`` packet's health.
roam evidence-oscalEmit an OSCAL v1.2 document (Control Mapping or Assessment Results).
roam api-changesDetect breaking and non-breaking API changes vs a git ref.
roam semantic-diffShow structural change summary vs a git ref.
roam test-gapsFind changed symbols without test-connection or coverage evidence.
roam affectedIdentify affected files/modules from a git diff via dependency graph.
roam attestGenerate a proof-carrying PR attestation.
roam review-requestEmit the brief to hand a different-family reviewer.
roam review-acceptRecord a review outcome as a receipt the verdict gate can read.
roam review-verifyRe-derive the review verdict from the artifact's CURRENT bytes.
roam adversarialAdversarial architecture review -- challenge your changes.
roam verifyVerify changed files follow codebase conventions.
roam verify-importsValidate import/require statements against the indexed symbol table.
roam diffShow blast radius: what code is affected by your changes.
roam contextGet the minimal context needed to safely modify a symbol.
roam hoverShow a one-line architectural summary for SYMBOL.
roam retrieveReturn ranked code spans for a free-form task.
roam critiqueVerify a patch against the indexed graph.
roam fleetGraph-aware planner for multi-agent code work.
roam affected-testsTrace from a changed symbol or file to test files that exercise it.
roam test-impactList tests transitively reachable from symbols changed in <range>.
roam diagnoseRoot cause analysis for a failing SYMBOL.
roam why-failFind recently-changed symbols transitively reached by a failing test.
roam recommendRecommend related symbols using call-graph, co-change, and clone signals.
roam apiList the public API surface (exported public symbols).
roam disambiguateList every symbol matching SYMBOL with disambiguators.
roam annotateAnnotate a symbol or file with a persistent note.
roam annotationsList annotations for a symbol, file, or the whole project.
roam planGenerate a structured execution plan for modifying code.
roam compileCompile TASK (freeform string) into an agent-consumable envelope.
roam compile-statsShow distribution stats over the compile telemetry log.
roam savingsMaterialize the local episode ledger and report admissible savings evidence.
roam savings-backfillWrite a value-redacted historical episode snapshot for repeated-pattern discovery.
roam compile-cacheManage the persistent envelope cache.
roam compile-daemonS2-lite warm compile server (per-repo, manual lifecycle, fail-open).
roam envelope-diffCompare two compile envelopes A and B. Reports probe-family and classifier deltas. With --baseline, A is a prompt; the matching baseline replaces B.
roam dispatch-traceEmit the classifier + dispatch decision tree for PROMPT.
roam syntax-checkCheck files for syntax errors using tree-sitter AST parsing.
roam triageManage security finding suppressions.
roam oracleContainer for the five v12.1 boolean oracles.
roam memoryRepo-local agent memory.
roam runsPer-agent-run event ledger.
roam lawsSelf-installing constitution.
roam constitutionRepo-local agent constitution -- capstone for agent-OS substrates.
roam agents-mdGenerate an ``AGENTS.md`` describing this codebase to AI agents.
roam nextSuggest the next roam command based on current repo state.
roam briefOne-page agent briefing covering mode / next / highlights / pr-bundle / runs.
roam replayRe-narrate a past run and (optionally) rerun its commands.
roam agent-scoreAggregate runs and score each agent on a 0..100 composite.
roam modeShow, switch, or query the active agent mode.
roam intent-checkVerify INTENDED_COMMAND would be allowed by the active mode.
roam leaseMulti-agent lease system.

Codebase Health

CommandDescription
roam healthShow code health: cycles, god components, bottlenecks.
roam smellsDetect code smells: brain methods, god classes, deep nesting, and more.
roam magic-numbersScan source for hardcoded numeric constants that should be named constants. Python via ``ast``; JS/TS/Go/Rust/Java/Ruby/C/C# via tree-sitter (with a regex fallback when the grammar isn't available). Defaults to the current directory, including monorepo workspaces; respects discovery exclusions and skips test files.
roam calc-inventoryEnumerate computed-numeric fields + their formulas from the AST.
roam calc-probeEmpirically compare rounding implementations on tie-boundary inputs.
roam calc-goldenGolden-master calculation oracle: extract / audit / check.
roam compiler-healthOne envelope per compiler health snapshot.
roam compiler-corpusCompile every prompt in a corpus file and aggregate the pipeline metrics.
roam vibe-checkDetect AI code anti-patterns and compute AI rot score.
roam llm-smellsDetect LLM-API integration anti-patterns.
roam collapseDetect unavailable sources collapsed into benign defaults.
roam ai-readinessEstimate how effectively AI agents can work on this codebase (0-100).
roam check-rulesRun structural governance rules against the indexed codebase.
roam dict-consistencyAudit string-keyed dicts in a Python file for cross-dict consistency. Would have caught W181 (refactor_move missing from 4 parallel registries) in one call.
roam ai-ratioInspect AI-associated patterns; this is not an authorship detector.
roam weatherRank files by churn x complexity score (highest-leverage refactoring targets).
roam timelineShow commits that touched the file owning <symbol>.
roam debtHotspot-weighted technical debt prioritization.
roam complexityShow cognitive complexity metrics for functions and methods.
roam py-typesShow Python type-annotation health for the indexed project.
roam py-modernModern-Python adoption: walrus, match, PEP 604/585/695, f-strings.
roam pytest-fixturesShow the pytest fixture chain for SYMBOL, or a project summary.
roam test-hermeticityScan Python test files for non-hermetic patterns (AI-test flakiness risk).
roam algoDetect suboptimal algorithms and suggest better approaches.
roam agent-optOptimize roam's agent-contract surface: find weak envelope/description shape.
roam observability-optReview raw print candidates and their diagnostic context.
roam n1Detect implicit N+1 I/O patterns in ORM models.
roam over-fetchDetect models that serialize more fields than necessary in API responses.
roam missing-indexDetect queries that filter or sort on columns without indexes.
roam alertsDetect health degradation trends and generate actionable alerts.
roam fitnessRun architectural fitness functions from .roam/fitness.yaml.
roam forecastPredict when metrics will exceed thresholds using trend analysis.
roam bisectFind which snapshots caused architectural degradation.
roam ingest-traceIngest runtime trace data and match spans to symbols.
roam profile-importRank source spans from a sampled py-spy/speedscope JSON profile.
roam hotspotsShow runtime hotspots comparing static analysis vs runtime data.
roam why-slowFind runtime hotspots — symbols slow under real production traffic.
roam eval-retrieveRun the retrieval eval harness over a labeled task set.
roam boundarySurface public-by-accident exports + changed-range layer violations.
roam vue-emitsFind Vue child emits without matching handlers in resolved parent usages.
roam rules-suggestSuggest ``.roam/rules.yml`` rules and CI gates from recurring findings.

Architecture

CommandDescription
roam mapShow project skeleton with entry points and key symbols.
roam graph-exportExport the indexed graph for external tooling.
roam graph-statsReport density, connected components, and degree statistics.
roam graph-diffStructural diff between two graph snapshots.
roam architecture-driftArchitectural-trend report over a sliding window of snapshots.
roam layersShow dependency layers and violations.
roam clustersShow code clusters and directory mismatches.
roam cyclesList strongly-connected components (import/call cycles) of the symbol graph.
roam cycle-breakRecommend minimal symbol extractions that break file dependency cycles.
roam spectralSpectral bisection: Fiedler vector partition tree.
roam couplingShow temporal coupling: file pairs that change together.
roam dark-matterDetect dark matter: file pairs that co-change but have no structural link.
roam effectsShow what functions DO — side-effect classification.
roam side-effectsClassify symbols by their side effects (none / io_read / io_write / mutation / process / unknown).
roam idempotencyClassify symbols by idempotency (idempotent / non_idempotent / unknown).
roam causal-graphBuild per-symbol causal graphs (input → sink data dependencies).
roam tx-boundariesClassify functions by transactional safety.
roam cutMinimum cut analysis — find fragile domain boundaries.
roam simulateCounterfactual architecture simulator.
roam orchestratePartition the codebase for parallel multi-agent work.
roam partitionGenerate a multi-agent partition manifest with conflict analysis.
roam entry-pointsEntry point catalog with protocol classification.
roam patternsDetect common architectural patterns in the codebase.
roam safe-zonesIdentify safe refactoring boundaries for a symbol or file.
roam visualizeGenerate a Mermaid or DOT architecture diagram.
roam x-langShow cross-language symbol bridges detected in the project.
roam fingerprintTopology fingerprint for cross-repo comparison.
roam clonesDetect near-duplicate code via AST structural hashing.

Exploration

CommandDescription
roam atShow the code at FILE:LINE plus the enclosing symbol (and callers).
roam search-semanticFind symbols by natural language query (hybrid BM25 + vector + packs).
roam completeReturn left-anchored prefix completions for the given partial.
roam grepContext-enriched grep with reachability, clone, and bridge annotations.
roam refs-textAudit literal strings across the project: per-surface refs + verdict.
roam history-grepThrough-history search using git pickaxe (-S / -G).
roam fileShow file skeleton: all definitions with signatures.
roam symbolShow definition, callers, and callees for SYMBOL.
roam moduleShow directory contents: exports, signatures, deps.
roam traceShow shortest path between two symbols.
roam depsShow file import/imported-by relationships.
roam usesShow all consumers of SYMBOL: callers, importers, inheritors.
roam fanShow fan-in/fan-out: most connected symbols or files.
roam impactShow indexed dependents a change to SYMBOL could affect.
roam relateShow how a set of symbols relate to each other.
roam endpointsList all detected REST/GraphQL/gRPC endpoints with handlers.
roam metricsShow unified metrics for a file or symbol.
roam findingsQuery the central findings registry (cross-detector view).

Reports & CI

CommandDescription
roam reportRun a compound report preset — multiple commands in one shot.
roam budgetCheck pending changes against architectural budgets.
roam breakingDetect potential breaking changes vs a git ref.
roam coverage-gapsFind entry points with no path to a required gate symbol.
roam auth-gapsFind endpoints missing authentication or authorization checks.
roam orphan-routesFind backend API routes that have no frontend consumers (dead endpoints).
roam bus-factorDetect knowledge loss risk per module (bus factor analysis).
roam simulate-departureSimulate what happens when a developer leaves the team.
roam suggest-reviewersSuggest optimal code reviewers for changed files.
roam blame-reviewersSuggest reviewers for a diff by git-blame line ownership.
roam dev-profileAnalyze developer commit patterns and behavioral metrics.
roam ownerShow code ownership: who owns a file or directory.
roam codeownersAnalyze CODEOWNERS coverage and ownership distribution.
roam driftDetect ownership drift: where declared owners differ from actual contributors.
roam secretsScan for hardcoded secrets, API keys, tokens, and passwords.
roam ignore-driftReport files git tracks despite a `.gitignore` rule that claims to exclude them.
roam supply-chainDependency risk dashboard: pin coverage, risk scoring, supply-chain health.
roam riskShow domain-weighted risk ranking of symbols.
roam migration-safetyCheck migration files for non-idempotent (unsafe if run twice) operations.
roam api-driftDetect mismatches between backend API responses and frontend type definitions.
roam path-coverageFind critical untested paths from entry points to sensitive sinks.
roam capsuleExport the structural graph as a portable JSON capsule.
roam rulesEvaluate custom governance rules defined in .roam/rules/.
roam vuln-mapIngest vulnerability scanner reports and match to codebase symbols.
roam vuln-reachQuery reachability of ingested vulnerabilities through the call graph.
roam vulnsScan and manage vulnerability inventory.
roam sbomGenerate a Software Bill of Materials (SBOM) enriched with call-graph reachability.
roam taintReach-analysis from rule sources to sinks over the indexed edges.
roam cgaCode Graph Attestation: sign-ready in-toto evidence over the index.
roam congestionDetect developer congestion: files with too many concurrent authors.
roam compatibilityDetect outbound surface regressions vs a baseline snapshot.

Refactoring

CommandDescription
roam deadShow unreferenced exported symbols (dead code).
roam orphan-importsList imports that don't resolve to any indexed module / installed package.
roam flag-deadDetect potentially stale feature flag code (conditionally-dead code).
roam duplicatesDetect semantically duplicate functions via structural similarity.
roam safe-deleteCheck if SYMBOL can be safely deleted.
roam delete-checkGate the working diff on surviving references to deleted symbols / files.
roam splitAnalyze a file's internal structure and suggest how to split it.
roam fn-couplingShow function-level temporal coupling (hidden dependencies).
roam doc-driftVerify concrete prose claims in Markdown docs against repository state.
roam doc-stalenessDetect concrete docstring claims that no longer match the code.
roam docs-coverageAnalyze exported-symbol doc coverage and stale docs in one report.
roam docs-indexFind orphaned planning memos and broken local Markdown links.
roam stale-refsFind dangling file references — markdown links, HTML href/src, backtick paths.
roam lspRun the roam-stale-refs language server on stdin/stdout (LSP).
roam suggest-refactoringRank symbols that are likely to yield high-value refactoring wins.
roam plan-refactorBuild an ordered refactoring plan for a symbol (use split for a file).
roam conventionsAuto-detect codebase naming, file, import, and export conventions.
roam sketchShow compact structural skeleton of a directory.
roam test-mapMap a symbol identifier or file path to its test coverage.
roam test-pyramidCount tests by kind (unit/integration/e2e/smoke), flag inverted pyramids.
roam whyExplain why a symbol matters — role, reach, criticality, verdict.
roam invariantsDiscover implicit contracts for symbols.
roam intentLink documentation to code -- find what docs describe what code.
roam closureCompute the minimal set of changes needed when modifying SYMBOL.
roam mutateSyntax-less agentic editing.
roam test-scaffoldGenerate test file skeletons from indexed symbols.

Other

CommandDescription
roam churnRank files by churn x complexity score (highest-leverage refactoring targets). Legacy alias of roam weather.
roam digestHealth trend timeline, anomaly detection, per-metric tracking, and CI gates. Legacy alias of roam trends.
roam mathDetect suboptimal algorithms and suggest better approaches. Legacy alias of roam algo.
roam onboardSingle-call codebase comprehension — everything in one shot. Legacy alias of roam understand.
roam refsShow all consumers of SYMBOL: callers, importers, inheritors. Legacy alias of roam uses.
roam snapshotHealth trend timeline, anomaly detection, per-metric tracking, and CI gates. Legacy alias of roam trends.
roam trendHealth trend timeline, anomaly detection, per-metric tracking, and CI gates. Legacy alias of roam trends.