PROJECT 07 / 18AGENT DEVELOPER TOOLSPYTHON

Published CLI · v0.3.1

Infinite Context.

Give interrupted development work a durable memory.

SQLitelocal metadata store
6distilled prompt sections
v0.3.1observed GitHub release
01 / IDEA02 / SYSTEM03 / PLAYGROUND04 / DECISIONS05 / SOURCE
01 / THE IDEA

A closer look.

A local project-memory CLI that captures repository structure, Git state, runtime clues, and developer intent. It turns snapshots into searchable history, Markdown handoff files, compact restore prompts, and reports of file drift.

A diff shows what changed, but rarely preserves the goal, decisions, and failure state around that change. This project keeps those signals together so a developer or coding agent can resume with an inspectable account of the work.

01

Capture the work around the code

Snapshots join source layout and Git diffs with pins, failure clues, goals, tasks, decisions, and open questions.

02

Readable handoff artifacts

Agent-facing Markdown files separate overview, architecture, behavior, decisions, and recent changes. A mode-aware compiler also emits one restore prompt.

03

Budgeted context packets

A deterministic distiller allocates an approximate character budget across six sections and truncates their text. It is predictable and inspectable without a remote summarization call.

04

Search and drift inspection

Local full-text search finds saved context. Restore validation reports branch or file divergence, while snapshot comparison reveals changes in captured work state.

02 / UNDER THE SURFACE

Capture → compress → resume

Four capture planes converge on a local snapshot, then branch into inspection and handoff artifacts.

DRAG TO PAN · SELECT A NODE · + / − TO ZOOM

Read the architecture as text
  1. Project command — The CLI exposes one-off snapshots and live sessions with a project-root option. The service resolves local layout and coordinates the capture stages. The snippet is an illustrative CLI invocation.
  2. Capture policy — Configuration merges defaults, global settings, and repository settings. INFCTX_TOKEN_BUDGET can override the prompt budget; the default scan cap is 1,500 files.
  3. Repository structure — scan_structural produces structural context and file fingerprints; scan_behavioral extracts test surfaces, scripts, and call hints from captured files.
  4. Working set — build_working_set combines Git status, recent diffs, pins, and runtime clues. Its next-action heuristic prioritizes failing tests, then failed commands, then changed or pinned files.
  5. Runtime clues — The service summarizes a local terminal log into successful and failed commands, stack traces, and failing tests, then applies configured redaction patterns.
  6. Intent and decisions — An explicit goal, saved decisions, and ingested chat state supply the intent plane. The service preserves open questions and signal-source metadata as structured context.
  7. Snapshot assembly — The service assembles a Snapshot with structural, behavioral, intent, working-set, and fingerprint data. It stores metrics such as captured-file count and active-task count.
  8. Local persistence — Each snapshot is saved as a JSON file and a serialized payload in SQLite. Local memory can therefore be inspected independently of any one agent.
  9. Context graph — ContextGraphStore receives captured file paths and behavioral call hints, then writes the local context graph. This is a lightweight captured graph, not a claim of complete static analysis.
  10. Packet distillation — compile_packet constructs project, structure, behavior, working-set, decision, and restore sections, then trims each to a share of an approximate character budget.
  11. Restore prompt — PromptCompiler selects a short prefix for Copilot, Claude Code, a generic agent, or a human, then joins the six packet sections with headings.
  12. Agent briefs — The service regenerates overview, architecture, decisions, behavioral, recent_changes, and instructions Markdown files from captured state.
  13. Local search — Generated prompt text is inserted into a full-text search table. Search orders matching documents by BM25 and returns compact snippets with their source and key.
  14. Drift validation — validate_restore compares the captured branch, path existence, file size, and SHA-1 digest with current files. It reports stale, missing, changed, and still-valid items; it does not roll back code.
  15. Snapshot comparison — compare_snapshots compares captured fingerprints and working-state sets between two snapshots, allowing work history to be inspected separately from the current Git diff.
03 / INTERACTIVE STUDY

Pack a restore brief

Change a modeled repository size and the prompt budget to see how six sections share the available context space.

CHANGE THE INPUTS

Illustrative input volume. The section allocation follows compile_packet: 24 / 18 / 18 / 18 / 10 / 12 percent of max(240, budget × 4) characters. No repository is scanned in your browser.

ILLUSTRATIVE MODELLIVE

04 / ENGINEERING CHOICES

Why it works this way.

01

Persist before presentation

The full snapshot is saved before generating compressed prompts, so a small handoff can link back to richer captured context.

02

Use a transparent budget heuristic

The distiller approximates tokens as four characters and divides sections by fixed weights. This is a practical length control, not an exact tokenizer guarantee.

03

Validate rather than overwrite

Restore checks current state against fingerprints and reports divergence. It does not automatically replace the checkout with old file contents.

05 / OPEN THE SOURCE

Trace it back.

Implementation details, examples, and project documentation.

Scope & limitations

  • Captured context depends on scan patterns, local logs, and supplied intent; it is not a complete record of every development action.
  • Token budgets are approximate character budgets, and restore validation checks drift rather than reconstructing or rolling back the code.

Architecture and descriptions reflect the linked repository snapshot. The playground explains a mechanism; it does not execute the repository or report measured performance.