github yvgude/lean-ctx v3.2.7

latest releases: v3.7.3, vscode-v0.1.0, v3.7.1...
one month ago

Added

  • Context Engine Wiring: Connected all modular Context Layer components into a live, end-to-end pipeline. Nine previously test-only modules now run in production:
    • ContextLedger tracks every file the model has seen (path, mode, token count) across the session — enabling pressure detection and smart re-injection.
    • StructuredIntent is automatically created on every task change (set_task), extracting task type, targets, scope, language hint, and urgency from the query.
    • Task-aware compression (task_aware_compress): When a StructuredIntent is active, the aggressive read mode uses intent-focused compression (e.g., FixBug keeps error paths, Refactor keeps interfaces). Falls back to standard compression when no intent exists.
    • Intent-based relevance (compute_relevance_from_intent): ctx_preload uses structured intent targets and scope for richer file relevance scoring instead of plain keyword matching.
    • Deficit detection: After preloading, the system compares the ContextLedger against the active intent to identify missing files and suggests them to the agent.
    • Role-based context depth: ctx_agent register now classifies the agent role (Coder, Reviewer, Debugger, Planner, etc.) and returns recommended context settings (preferred mode, file limits, budget ratio).
    • Structured handoff packages: ctx_handoff create now builds a HandoffPackage with intent snapshot and context window state, enabling richer context transfer between agents.
  • Pipeline architecture (core/pipeline.rs): Formal layer contracts with input/output types, per-layer metrics, and a composable pipeline orchestrator.
  • Cross-agent knowledge sharing: Agents in the same project can share findings via scratchpad with automatic deduplication.
  • New CLI compression patterns: Added compressors for jest, mocha, tofu (OpenTofu/Terraform), ps, df, du, ping, and jq output. Also added routing for linting tools (eslint, pylint, rubocop, golangci-lint), build tools (gradle, mvn, cmake, meson), and monorepo tools (nx, turbo, lerna, rush).
  • Intent-aware auto mode selection: ctx_read now considers the active StructuredIntent when choosing the optimal read mode, matching file content to the current task type.
  • Graph heat seeding from intent: StructuredIntent targets are used as seed nodes for the knowledge graph heatmap, improving relevance scoring for related files.

Refactored

  • God-file splits: Major codebase restructuring for maintainability:
    • server.rs (2185 lines) → server/mod.rs + server/dispatch.rs + server/execute.rs + server/helpers.rs
    • cli.rs (1847 lines) → cli/mod.rs + cli/shell_init.rs
    • main.rs (1475 lines) → 19 lines (logic moved to cli/)
    • hooks.rs (1518 lines) → hooks/mod.rs + hooks/agents.rs
    • tool_defs.rs (1095 lines) → tool_defs/mod.rs + tool_defs/granular.rs
  • LITM end_block activation: The Lost-In-The-Middle end_block (findings, test results, next steps) is now injected at the end of instructions, not just begin_block.
  • Intent system unification: intent_engine (task classification) and intent_protocol (tool-call tracking) are now connected — IntentRecord carries TaskType.
  • Task-type-aware IB filter: The information bottleneck filter adapts its structural weights based on the detected task type (FixBug prioritizes error lines, Test prioritizes assertions).

Fixed

  • Antigravity MCP config: Removed autoApprove and use absolute binary path for compatibility.
  • PathJail auto-allowlist: IDE config directories (.codex/, .claude/, .cursor/) are automatically allowed in PathJail.

Upgrade

cargo install lean-ctx          # or
npm update -g lean-ctx-bin      # or
brew upgrade lean-ctx

Full Changelog: v3.2.7...v3.2.7

Don't miss a new lean-ctx release

NewReleases is sending notifications on new releases.