This is an early release preview. You may encounter bugs.
Mache logo
Unclaimed

Tool coding memory

Mache

lean-ctx sits between coding agents and your codebase, compressing file reads and shell output before they hit the model

B 76/100 GitHub score ? This grade is derived from GitHub signals, not user votes. Open for the full breakdown.
Discussion

01 / Summary

About Mache.

Mache projects structured data into a navigable graph. A declarative schema points at a structured source (JSON documents, SQLite databases, or source code), and the projection is exposed as Model Context Protocol (MCP) tools or as a mounted filesystem, so an agent can traverse the topology instead of reading flat files. The same engine covers CVE feeds (NVD, KEV), Notion exports, Trivy scan results, Terraform, Markdown, LLM conversation logs, and audit trails as well as Go and Rust source.

Code intelligence is the deepest projection. Nineteen MCP tools wrap the projected graph (18 read-surface tools plus writefile), spanning repo orientation, structural navigation, call-chain tracing in both directions, 14 structural smell rules, and an edit path that validates, formats, and splices a file, falling back to draft mode on reject. Parsing is delegated to ley-line-open: leyline parse produces the ast database every source projection reads, covering 27 of 28 languages.

Two optional tiers enrich the base graph. An LSP pass drives a real language server such as rust-analyzer or gopls for type information and diagnostics, and an embedding-carrying database enables semantic search. Both can be baked into a prebuilt .db or spawned on demand.

HTTP is the canonical transport: one shared local daemon serves every project and routes per session through the MCP roots protocol, with a one-time global setup installing a launchd or systemd user supervisor and registering the daemon with Claude Code and detected editors. A --stdio escape hatch exists for CI, sandboxes, and headless agents. Projected databases move between machines as content-addressed bundles through a local directory or an OCI registry, and the production deployment shape is a distroless OCI image with a co-located ley-line daemon reached over a Unix socket.

  • Schema-driven projections: one declarative schema maps JSON, SQLite, or source into a graph of nodes and edges
  • Two access surfaces: the same graph is served as MCP tools or mounted as a filesystem, with write-back
  • Code navigation: finddefinition, resolveref, search, listdirectory, and readfile work on structure rather than string match
  • Reference tracing: findcallers, findcallees, getimpact, and getdataflow follow edges backed by node_ref evidence
  • Repo orientation: getoverview, getarchitecture, getdiagram, and Louvain-based getcommunities
  • Structural rules: find_smells applies 14 rules, 5 of which need an enriched database
  • Optional enrichment tiers: gettypeinfo and getdiagnostics from an LSP pass, semanticsearch from embedding vectors
  • Multi-repo serving: --mount NAME=PATH federates find_callers across repositories
  • Portable cache: mache cache pushes, pulls, and verifies content-addressed database bundles over a directory or OCI transport
  • Schema inference: --infer derives groupings from data using formal concept analysis and greedy entropy
  • Go API: build.ParseWithSchema and ParseWithSchemaRef run the projection without the CLI

02 / Discussion CREDIBILITY-GATED

Discussion

Reading is open to everyone. Posting and voting need a verified identity or a GitHub grade of B or higher.

  • No discussions yet.

04 / Build

Build with Mache.

Browse the catalog for frameworks, tools, and harnesses, each scored on real GitHub credibility.

Get Mache →

Browse the catalog