Skip to main content

Module commands

Module commands 

Source
Expand description

Command implementations for the scc CLI (docs/API_AND_INTEGRATIONS.md §4).

Structs§

TaskContextArtifact
THE one complete task artifact (transport parity): the enriched task pack AND its surface delta derived together, from ONE builder.

Enums§

SetupHarness

Functions§

build_enriched_task_pack
pack with scorer + beads + hindsight and its post-enrichment token count. NO Surface delta, NO ContextLedger mutation, NO visibility side effects. Pack-only callers (context compress, build_task_pack) MUST use this — NEVER build_task_context, which also builds a delta and records its rendered ids in the ledger: throwing the delta away would mark Surface APIs “already visible” the agent never saw, breaking the ledger invariant (ledger = content actually shown to the agent).
build_task_context
Build the complete task artifact: scorer + beads + hindsight enrichment for the pack, then the SAME-scorer task delta against the ledger. hook keeps the whole focus within the §37 1500-token cap (the delta gets what the pack leaves); an explicit budget caps the total; the default gives the delta its own task_delta slice.
build_task_pack
half built by the pure build_enriched_task_pack — NO delta, NO ledger side effects. New transports should call build_task_context directly so the delta ships with the pack.
cmd_adapters
scc adapters — list enabled adapters with their declared capability scope (security audit; docs/SECURITY.md §6). --json dumps the full capability manifests instead.
cmd_atlas
scc atlas [--budget N] [--json] — the full System Atlas.
cmd_beads
scc beads — list active (in-progress) tasks from .beads/issues.jsonl (task state, not system facts).
cmd_check_invariants
scc verify –graph-invariants: structural checks for CI.
cmd_checkpoint_load
cmd_checkpoint_save
cmd_ci_check
scc ci check (docs/DEPLOYMENT_AND_INFRA.md §3, EPIC-180 CI policies): graph invariants + drift severity policy. Exits nonzero on violation.
cmd_cochange
scc cochange: print the git co-change pairs (files changed together across commits) and, when an indexed store exists, enrich its components with the signal.
cmd_context_component
cmd_context_docs
scc context docs <dependency> — external library docs via Context7 (labeled external; never mixed with repository facts).
cmd_context_flow
cmd_context_startup
scc context startup [--budget N] — the Wave 14 startup artifact: the Atlas + Surface fusion, deterministic per epoch (prompt-cache stable). Records what the session just showed in the context ledger so task deltas suppress already-visible APIs.
cmd_context_structural
scc context structural --files <paths...> | --task "<goal>" [--budget N] — the Structural Source product surface (fixwave Item 7): the per-file signature/structural representation of the requested files, or of the files matched to a task goal. Returns the rendered text so every transport (CLI, MCP) shares one implementation.
cmd_context_subagent
Subagent context policy (SCC-107, docs/API_AND_INTEGRATIONS.md §5): a narrower, tighter-budget task pack with explicit scope boundaries so delegated agents start from the same system model without re-deriving it.
cmd_context_task
scc context task <goal> [--budget N] [--json] [--hook] — the complete task focus. Text and JSON are TWO VIEWS OF ONE ARTIFACT built by build_task_context: JSON carries {pack, delta, delta_ids}, text prints pack content followed by the delta — identical derivation, no transport downgrades quality.
cmd_context_task_json
The complete task artifact as JSON — the same derivation as CLI text ({pack, delta, delta_ids}); serialization is the only difference.
cmd_diagram
scc diagram — SCC-native architecture diagram (SPEC-SCC-VIEWER §1). L1 nodes plus capped architectural edges plus flow subgraphs, as Mermaid (default) or dependency-free SVG. Deterministic: same index, same bytes.
cmd_diff
cmd_doctor
scc doctor — integration health from THE Integration Registry (scc_indexer::adapters::integration_registry), offline, read-only and fast. Default never touches the network and never spawns a subprocess: every row is answered from local state only (config flags, binary on PATH, files present, evidence already in the graph). --deep may start LOCAL subprocesses (pyright/tsserver handshakes); --network may test remote endpoints (Context7). --strict turns warnings into a nonzero exit; --json emits the machine-readable report.
cmd_drift
cmd_export
cmd_history
cmd_impact
cmd_import
cmd_important
scc important [--limit N] [--component C] [--task G] [--json] — the fast “where do I pay attention first” answer (audit item 3). Global mode ranks by architectural centrality (global PPR + badges); –task re-ranks by task PPR and renders TASK-CRITICAL SYMBOLS. –component filters to one component substring. No new MCP tool: the section also ships inside startup/task context.
cmd_index
cmd_index_paths
cmd_ingest_runtime
cmd_init
cmd_languages
scc languages — generated support matrix. Never hand-maintain a second list in CLI copy.
cmd_lessons_add
scc lessons add <text> — append one durable lesson to <root>/.scc/lessons.jsonl (the Hindsight memory bank). The bank is ingested into the System IR with scc import hindsight .scc/lessons.jsonl.
cmd_lessons_list
scc lessons — list stored lessons from the System IR (most important first, same ordering as the context-pack enrichment).
cmd_list_components
cmd_list_flows
cmd_mcp
cmd_operations
scc operations [--describe ID]: introspection over the registry.
cmd_overview
cmd_plugin_check
scc plugin check: verify live plugins against .scc/plugins.lock.
cmd_plugin_describe
scc plugin describe <id>.
cmd_plugin_doctor
scc plugin doctor.
cmd_plugin_invoke
scc plugin invoke <operation> [json-input].
cmd_plugin_list
scc plugin list: enabled plugins with lock entries (engine owns the set).
cmd_plugin_lock
scc plugin lock: write .scc/plugins.lock from the live set.
cmd_query
cmd_rpc
scc rpc --stdio: structured JSON-RPC (SDK subprocess mode).
cmd_runtime_reconcile
cmd_runtime_status
cmd_scan
cmd_serve
cmd_setup_claude
cmd_setup_detected
scc setup (no subcommand): install for every detected harness and print one summary, including the manual steps setup cannot perform (Codex hooks live in user scope). scc setup all skips detection and installs for every harness unconditionally.
cmd_snap
scc snap — Snapcompact-style bitmap export (SPEC-SCC-VIEWER §3). Default OFF: requires --out text plus --png (or config context.snap_enabled) to render; otherwise prints the map text and the pinned Pillow recipe so the operator sees exactly what would ship.
cmd_snapshot_diff
cmd_snapshot_save
cmd_snapshot_show
cmd_status
cmd_surface
scc surface [--task "<goal>"] [--budget N] [--explain] — the System Surface Map: the actual callable API layer, global or task-personalized. BOTH modes run the ONE authoritative service — build_surface (Global or Task) — so the CLI, MCP, hermes, and the SDKs render the same artifact for the same request (no parallel pipelines). The rendered entries are recorded in the context ledger.
cmd_system
cmd_verify
cmd_view
scc view — local web viewer (SPEC-SCC-VIEWER §2). Serves the loopback viewer routes on an ephemeral port (or --port), then opens the browser unless --no-open.
cmd_watch
detect_harnesses