Skip to main content

Crate scc_cli

Crate scc_cli 

Source
Expand description

System Context Compiler CLI, daemon, MCP server, and Claude Code plugin.

Modules§

agents_md
Marker-aware replacement of the <!-- SCC-SECTION --> managed block in AGENTS.md (and equivalent instruction files).
bench
Benchmark harness (docs/TEST_PLAN.md §16, EPIC-240): generate synthetic repositories and measure cold index / incremental / task-pack latency.
benchagent
Agent-run recorder and baseline harness (SCC-002, docs/TEST_PLAN.md §9).
benchatlas
Atlas recall benchmark v2 (Wave 8 §57): structured recall of independently documented ground truth against the startup System Atlas, with precision and token-density metrics and per-gap diagnosis.
benchctx
Context benchmark (docs/TEST_PLAN.md §84–87, M0/M4): score task packs against the ground-truth corpus in benchmarks/tasks.json.
benchloop
Deterministic agent-loop comparison: baseline vs SCC vs Ripwire.
benchres
Differential resolution benchmark (SCC-126): how much does LSP resolution improve on the native resolver? For each fixture repo in benchmarks/tasks.json the benchmark:
benchret
Retrieval Recall@k / MRR over benchmarks/tasks.json gold.
commands
Command implementations for the scc CLI (docs/API_AND_INTEGRATIONS.md §4).
compress
Pluggable constrained compression (docs/CONTEXT_COMPILER.md §7, SCC-072) and cross-harness capsule export (docs/G7).
embed_cli
Thin CLI shell: cmd_embed renders embeddings.build; the scorer, reranker, policy, and constructor live in scc_engine::inference (single implementation — DoD 5: no transport reimplements ranking).
httpd
Local daemon (docs/DEPLOYMENT_AND_INFRA.md §2): loopback HTTP API per docs/openapi.yaml + filesystem watcher with debounced incremental re-indexing.
kinds
mcp
MCP server (docs/API_AND_INTEGRATIONS.md §2, EPIC-080).
plugin
Claude Code integration (EPIC-100, docs/API_AND_INTEGRATIONS.md §5).
plugin_hermes
Hermes plugin (M10) — native Hermes plugin package per https://hermes-agent.nousresearch.com/docs/developer-guide/plugins: plugin.yaml + register(ctx) exposing the ten semantic tools as native Hermes tools, plus a bundled skill. scc setup hermes installs it into ~/.hermes/plugins/scc/ and enables it.
plugin_omp
Oh My Pi (OMP) integration (docs/API_AND_INTEGRATIONS.md §5, P0).
resolve
scc resolve --lsp: upgrade EXTRACTED call edges to RESOLVED through every available semantic backend (Wave 4 §23): .py -> pyright, TS/JS -> typescript-language-server. Requires an existing index; missing tools degrade with a hint (exit 0).
viewer
Web viewer, architecture diagram, and snap-bitmap recipe (SPEC-SCC-VIEWER): human-readable HTML over the live store, a deterministic Mermaid/SVG diagram from the L1 architecture layer, and the repo-map text plus pinned Pillow recipe behind scc snap.

Structs§

Compiler

Enums§

CliError

Constants§

CHECKPOINT_FILE
CONFIG_FILE
DB_FILE
SCC_DIR

Functions§

checkpoint_path
compiler
Build a ready compiler with freshness state.
config_path
Config stays in the repo (read-only is fine): it is repository intent, not SCC state.
db_path
ensure_scc_ignored
Ensure .scc/ is gitignored so the index cache never pollutes the repo’s own git status or gets committed — except committable project files (intent.yaml, plugins.toml, plugins.lock). Delegates to the engine; the preserved-file list lives there.
export_ccg
Narsil-CCG-compatible layered export (docs §44): L0 manifest, L1 architecture, L2 symbols.
export_ir
export_jsonl
JSONL export: one JSON object per line (repository, snapshot, then entities/relationships/flows/invariants/evidence records).
find_root
Locate the repository root: walk up from cwd looking for .git or an existing .scc dir; otherwise use cwd.
flow_kind_str
index_and_recompile
is_store_corruption
True when an indexing failure is store corruption surfacing anywhere in the error chain (open, mid-index read, recompile) — not just at open. Corruption can hide behind a valid header and detonate on first touch of a bad page, so the write path retries from quarantine on any of these.
load_config
open_store
open_store_recovering
recompile
relative_of
Repo-relative path of a file under root, or None if it escapes.
report_quarantine
resilient_index
Run an index write; on store corruption anywhere in the attempt, quarantine the database and retry exactly once from scratch.
resolve_and_recompile
Run semantic resolution on demand (--resolve), then recompile the derived layer so graphs/flows/atlas reflect the promoted edges.
scc_dir
stale_paths
Compute repository-relative paths whose indexed snapshot no longer matches the working tree: modified, deleted, AND added files, from ONE authoritative scan diffed against the indexed inventory — a newly created relevant file must make the model non-current, and indexed files are never re-read when the scan already hashed them (one read+hash per file per freshness check, not two). Same scan the indexer uses, so both sides share one notion of “repository file” (git-ignored and configured-ignored paths excluded).
state_dir
SCC state directory: the repo’s .scc/ by default; SCC_STATE_DIR relocates writable state (database, checkpoint) so the repository itself can be mounted read-only (docs/DEPLOYMENT_AND_INFRA.md §3: read-only repo

Type Aliases§

Result