Skip to main content

Module core

Module core 

Source

Modules§

a2a
active_inference
Active Inference Preload — predictive context loading.
adaptive
adaptive_thresholds
agent_budget
agent_lease
Bounded, payload-free ownership leases for multi-agent mutation planning.
anchor
Hash-anchored line identifiers — the shared spine of anchored editing (epic #1008 / GL#1009).
anomaly
Anomaly detection using Welford’s online algorithm for running mean/variance and triggering alerts at >3x standard deviation.
anti_interrupt
Anti-Interruption Score (F7) — cognitive impact metrics beyond token savings.
archive
archive_fts
attribution
Deterministic identifiers and grouping for savings attribution records.
audit_trail
auto_mode_resolver
autonomy_drivers
bandit
Bandit-based read-mode selection for ctx_read auto-mode. This is core OSS infrastructure for optimizing read modes, distinct from the commercial Adaptive Intensity feature (Section 8) which governs Solution Intelligence intensity levels.
benchmark_compare
billing
v4 billing-plane substrate: canonical plans, registry-backed entitlements, and usage metering derived from the signed savings ledger. Billing substrate for the canonical v4 Community/Pro/Team/Enterprise ladder.
bm25_cache
bm25_index
bounce_tracker
budget_tracker
Runtime budget tracking against role limits.
budgets
cache
call_graph
canonical
Canonical JSON serialization and Ed25519 signatures for signed artifacts.
capabilities
capsule_transport
Local reference transport for authenticated OCLA A2A capsule delivery (P11).
causal_attribution
Causal outcome attribution (OSS stub).
claim_extractor
Claim Extraction — decomposes context pipeline outputs into verifiable claims.
code_health
Native code-health engine — clean code as a token-cost lever.
codebook
cognitive
Cognitive Budget Allocator (F3) — Miller’s Law for LLM context.
command_cwd
Which directory a command’s segments actually run in (GH #1661, #1662).
community
Community detection on the code graph.
compact_directive
Store for the agent-driven conversation-compaction directive (#1570 P1).
compliance
Framework compliance mappings + coverage reports (GL #424, H3 Epic A).
compliance_report
Signed CISO compliance report (GL #677) — “the deliverable a CISO shows auditors”.
compressor
config
conformance
Conformance & reproducibility scorecard (conformance-v1, EPIC 12.17).
consolidation
Consolidation engine for provider data — hippocampal sleep replay.
consolidation_engine
Canonical session→knowledge consolidation (#995 Phase 4).
content_cache
Resident, bounded file-content cache shared across the search-index build and ctx_search (issue #148).
content_chunk
Universal content chunk — the atomic unit of the Context Engine.
context_admission
Context admission: the one local decision every governed source passes before it is cached, compressed, indexed or delivered.
context_artifacts
context_capsule
Payload-free, delta-capable contract for multi-agent context handoffs.
context_checkpoint
Typed ContextCheckpointV1 projections.
context_deficit
context_field
Context Field Theory (CFT) – unified potential function for context items.
context_handles
Context Handles – sparse, lazy references to context items.
context_ir
context_ledger
context_os
context_overhead
Honest accounting of the fixed per-turn context lean-ctx injects (GitHub #361).
context_overlay
Reversible context overlays — user/policy manipulations that modify context items without changing source files (“synaptic modulation”).
context_policies
Context Policy Engine – declarative rules for context governance.
context_prefetch
Predictive context pre-loading (OSS stub).
context_proof_v2
ContextProofV2 — Claim-based verification schema.
context_quality
Context Quality System — shared vocabulary for quality evidence.
context_radar
contracts
cooccurrence
Hebbian file co-access graph — “files that fire together, wire together”.
cost_per_outcome
crash_log
Persistent crash log for panic diagnosability.
cross_source_edges
Cross-source graph edges — connects external data to code via the graph index.
cross_source_hints
Cross-source hints — lateral connections between cortical columns.
data_dir
decision_loop
End-to-end wiring from task triage through execution-value assessment.
decision_loop_runtime
Compatibility adapter from MCP events to the canonical execution lifecycle.
deep_queries
Tree-sitter deep queries for extracting imports, call sites, and type definitions.
degradation_policy
dense_backend
diagnostics_store
Active compiler/linter diagnostics as a context-priority signal (#499).
echo_ratio
Echo Ratio computation — output-to-input token ratio.
edit_metering
Edit-efficiency metering (#1008, honest-metering philosophy #361).
editor_registry
editor_signal
Editor focus signal (#500).
embedding_index
Persistent, incremental embedding index.
embeddings
Embedding engine for semantic code search.
energy
Electricity-footprint estimate for saved tokens.
enterprise_handshake
Legacy one-way notification adapter; not an authenticated runtime session.
entropy
episodic_memory
Episodic Memory — persistent cross-session experiences with outcomes.
error
etpao
ETPAO: Effective Tokens per Accepted Outcome (#1318).
eval_ab
Deterministic with/without output-quality eval (#232).
eval_harness
Retrieval evaluation harness for lean-ctx hybrid search.
events
evidence_bundle
Evidence bundle generator (evidence-bundle-v1, GL #425, H3 Epic A).
evidence_ledger
execution_ledger
Append-only, task-aware execution ledger.
execution_lifecycle
Canonical execution lifecycle and subordinate Decision Spine state.
execution_protocol
Strict validation for the typed execution protocol carried by one lifecycle run.
extension_registry
Pluggable read-modes, compressors, and chunkers (extension-registry-v1).
extractors
Format extractors & format-aware chunkers (extractors-v1, EPIC 12.13).
feedback
finops_export
FinOps cost/savings export (GL #402): CloudZero CBF, Vantage, FOCUS CSV.
gain
git_cache
TTL-based cache for git command results.
gotcha_tracker
grammar_usage
Persistent per-extension signature-backend telemetry (GH #690 Phase 2).
graph_context
Graph-driven context loading — automatically includes related files based on Property Graph proximity and token budgeting.
graph_export
graph_index
graph_provider
handle
Stable cross-turn symbol handles: path#name@Lline.
hasher
Central hashing utility using BLAKE3.
heatmap
hebbian_cache
Hebbian Co-Access Cache with Boltzmann-Temperature Eviction.
hnsw
Lightweight HNSW (Hierarchical Navigable Small World) index for approximate nearest neighbors.
home
homeostasis
Homeostatic Memory Guard — Proactive multi-level resource management.
host_coverage
Host coverage — what the context gateway can actually see and stop per host.
html_crush
Deterministic HTML content extractor — extracts article/main content from web pages, converts to clean markdown, discards boilerplate (#1124).
hybrid_search
Hybrid search combining BM25 (lexical) with dense vector search.
ib
Task-aware Information Bottleneck compression (F1).
ide_permissions
Read the active IDE’s tool-permission configuration and resolve an effective action for a lean-ctx tool, so lean-ctx can mirror (“inherit”) the user’s IDE permission rules instead of forming a second, ungoverned execution path.
import
Import facts from local AI coding-session histories.
import_resolver
Import-to-file resolution (AST-driven import strings → project paths).
index_admission
Admission control for heavy index builds (#685).
index_bundle
Encrypted index bundles for the hosted Personal Index (GL #392).
index_orchestrator
index_progress
Shared progress counters for index builds (BM25, semantic, graph). Build code reports here; CLI / status_json read snapshots. Decouples builders from the orchestrator (no module cycles).
ingestion
Ingestion front-door (ingestion-spec-v1).
input_filters
Inbound content filters (GL #675) — the input side of the Great Filter.
integration_proof
Executable end-to-end proof for the task decision pipeline.
intent_engine
intent_protocol
interrupt
User-initiated cooperative cancellation (Ctrl-C / SIGINT).
introspect
Cognition introspection — proves that each scientific subsystem is wired and actually active at runtime.
io_boundary
io_health
journal
json_crush
Deterministic JSON crusher — single source of truth for structural JSON compaction (#934, Headroom “Smart Crusher” port, GitLab #935).
jsonc
knowledge
knowledge_bridge
Cross-Agent Knowledge Bridge — controlled sharing of high-confidence facts between agents.
knowledge_embedding
Embedding-based Knowledge Retrieval for ctx_knowledge.
knowledge_provider_extract
Knowledge auto-extraction from provider data (issues, PRs, DB schemas).
knowledge_relations
knowledge_router
Runtime routing from task references to bounded context bundles.
language_capabilities
litm
litm_calibration
Empirical LITM placement calibration (#539, EFF-2).
live_evidence_ledger
Bounded, append-only evidence emitted for completed live tool calls.
llm_enhance
Optional LLM enhancement layer.
loop_detection
mcp_catalog
MCP Tool-Catalog Federation (#210) — Engine pillar.
mcp_manifest
mdl_mode
MDL Read Mode (F8) — structural descriptions for compact code representation.
measurement
Customer-facing A/B measurement for unoptimized baselines and lean-ctx treatment.
memory_archive
Multi-store, lossless memory archive (#995 Phase 1).
memory_guard
Process-level RAM guardian with adaptive eviction and hard OOM protection.
memory_lifecycle
Memory Lifecycle Management — consolidation, decay, compaction, archival.
memory_policy
memory_scheduler
FSRS-based Context Memory Scheduler (F5).
metering
Local, append-only metering for the free product.
mode_predictor
multi_repo
nudge
Nudge economy for budget advisories (#1570 P2, DCP-inspired).
ocla
Open Context & Token Lifecycle Architecture (OCLA) public OSS contract.
ocla_bus
OCLA Event Bus (P2 / Track B — Event-Backbone).
ocp
Open Context Protocol (OCP) v0.1 export adapter.
openapi
OpenAPI 3.0 document for the public /v1 surface, generated from a single in-code endpoint inventory (endpoints). The HTTP route that serves it lives in http_server; the SSOT lives here so it stays compiled and drift-tested without the http-server feature.
opencode_config
Single source of truth for locating OpenCode’s global config file.
outcome
Outcome contracts, local signal adapters, and deterministic evaluation.
output_sanitizer
Output sanitizer: detects and cleans degenerate model artifacts from compressed output.
output_verification
path_resolve
Shared path-resolution for tool handlers.
pathjail
paths
Typed XDG base-directory resolvers for lean-ctx (GH #408 / GL #602).
pathutil
patterns
persona
Context personas (persona-spec-v1).
pipeline
Context Pipeline
policy
Context Policy Packs v1 — Policies-as-Code (GL #489).
pop_pruning
preservation
pro_triggers
Local, contextual Pro conversion nudges.
procedural_memory
Procedural Memory — recurring workflow detection and template storage.
process_guard
Global concurrency limiter for lean-ctx processes.
product_capabilities
Canonical v4 product-capability registry.
profiles
Agent profiles — workload-specific configurations.
property_graph
Property Graph Engine — SQLite-backed code knowledge graph.
protocol
provenance
Durable provenance records for file edits and git checkpoints.
provider_bandit
Provider Bandit — Thompson Sampling for provider selection.
provider_cache
Provider caching awareness — helps LLM providers cache repeated context.
providers
quality
quality_scorecard
Human/judge rubric for code-review answers (correctness, completeness, …).
rabin_karp
read_reuse_operator
Pure native-Read response shaping shared by Local and Via Edge.
reference_docs
Generated reference documentation.
relevance_tracker
Proactive context expansion (#1122): automatically injects previously compressed data when it becomes relevant to the current request.
roles
Role-based access control for agent governance.
rule_artifacts
The committed LEAN-CTX.md rule artifacts as (relative_path, content) pairs — the single source shared by the regenerator (gen_rules example) and the drift gate (tests/rules_drift.rs) so the project copy and the rust/ copy can never disagree.
rules_canonical
Canonical rules source — single source of truth for all lean-ctx guidance.
rules_channel
Cross-channel rule deduplication policy (#684).
saliency
Saliency Map — information-theoretic chunk ranking and deduplication.
sandbox
savings_footer
savings_ledger
Verified Savings Ledger (G1) — the per-event, auditable counterfactual store.
savings_tracker
Per-session compression accounting, persisted when the tracker is dropped.
scent_field
Stigmergic scent field for zero-token multi-agent coordination (#540, EFF-3).
scorecard
Reproducible scorecard (#211): one command → compression savings + retrieval recall/MRR + latency over a fixed, deterministic scenario matrix.
search_group_operator
Pure deterministic grouping/ranking candidate for grep-style search output.
search_index
Resident line-search index for ctx_search (Phase 1 of the efficiency epic).
search_reranking
Post-RRF Reranking Pipeline for code-aware search.
secret_detection
security_events
Provable security events for the value surface.
security_posture
Unified, human-facing view of lean-ctx’s two independent security planes:
semantic
Semantic code intelligence on top of the tree-sitter structure.
semantic_cache
sensitivity
Per-item sensitivity model with a uniform policy floor (#212).
server_capabilities
GET /v1/capabilities — runtime discovery of what this lean-ctx instance supports, so any client (any language) can branch on real features instead of trial calls. The HTTP route lives in http_server; the payload builder lives here so it stays compiled (and drift-tested) without the http-server feature.
session
session_token
setup_report
shadow
Counterfactual cost and quality reporting for completed tasks.
shared_context
shell_allowlist
Shell allowlist with AST-based command parsing.
signatures
Signature extraction — regex fallback layer.
solution_auto_capture
Heuristics for recognizing solution decisions from edit context.
solution_commercial
Commercial Solution Intelligence API stubs. All functions return enterprise license errors in OSS builds. Full implementations live in lean-ctx-enterprise/crates/intelligence/.
solution_tracker
solution_types
Backward-compatible re-export of the Solution Intelligence types that live in core::knowledge. Kept on purpose for library users (#1923). Backward-compatible Solution Intelligence type exports.
spreading_activation
Spreading activation — associative retrieval over a weighted graph.
startup_guard
stats
storage_maintenance
Daemon-safe storage maintenance.
surprise
Predictive Surprise Scoring — conditional entropy relative to LLM knowledge.
symbol_map
tabular_crush
Deterministic tabular (CSV/TSV) crusher — columnar redundancy factoring for delimited data (#982, Headroom tabular-compressor port, GitLab Epic #973).
task_briefing
task_relevance
task_spine
Canonical task lineage with immutable async/blocking execution scopes.
tdd_schema
telemetry
Telemetry and metrics collection following OpenTelemetry GenAI conventions.
telemetry_aggregate
Privacy-safe daily telemetry aggregation.
telemetry_consent
Disclosure, consent and environment rules for default-on telemetry.
telemetry_v2
Privacy-bounded, versioned telemetry event contract.
terse
Terse Compression Engine
theme
threshold_learning
Online-learned per-extension compression-threshold deltas (#538, EFF-1).
tokenizer_translation_driver
tokens
tool_profiles
triage
trust
Open trust primitives for identity, classification, policy, and evidence.
value
Value surface: makes what lean-ctx did visible outside the dashboard — subtly, outside the model’s context, and with every number provable.
value_gate
End-to-end task value assessment: execution cost → outcome → CPAO.
verbosity
Behavioral Verbosity Learning (F10) — adaptive compression recommendations.
wasserstein
Wasserstein Token Allocator (F4) — Optimal Transport for context budgets.
web
Web & research context layer.
work_graph
Bounded Work Graph for multi-agent orchestration (P11 / DIM 4).
work_graph_store
Crash-safe, project-scoped persistence for the local bounded Work Graph.
workflow
wrapped
yaml_crush
Deterministic YAML crusher — structural compaction for YAML documents (#985, Headroom YAML-compressor port, GitLab Epic #973).