Skip to content

Commit a4872f0

Browse files
docs: expand README to cover agent stack, nix build system, and more (#1491)
## Why The README named only a handful of tools (~80 lines) while the repo holds ~45 packages across agent infrastructure, a custom Nix build system, semantic search, terminal automation, and VM/fleet tooling. It under-sold what's actually here. ## What Keeps the existing header, demo, and tone, and adds a legible **"What's inside"** section organized into themes, each with short prose and links to source + the from-source `docs/` page: - **Agent infrastructure** (`packages/agent`) - system-prompt-as-reviewable-Nix, `system-prompt-eval` scored rollouts, single-binary fail-open hooks, `subagent-cache` three-stage validation, the Elixir `symphony` orchestrator, plus `distiller`, `pi-harnesses`, `claude-stories`. - **The Nix build system** (`packages/nix`) - per-rustc-unit content-addressed builds (`nix-cargo-unit`), the Rust Nix reimplementation `snix`, CA cache-skip patches, `oci-image-builder`, `nix-web-monitor`. - **Code intelligence and search** - content-addressed semantic search, `astlog` (Datalog over tree-sitter), `scipql` (Datalog over a SCIP index). - **Terminal automation** (`packages/tui`) - the PTY driver, the `reel` recorder behind the demo, `run`, `dashboard`. - **Agent-facing primitives** (`packages/mcp`) - the shared persistent IPython kernel. - **VMs, images, and fleet** - `vmkit`, `chrome-vm`, `ix-fleet`, `dag-runner`. Also refines the intro, expands Quick Check and Layout, and keeps every relative link verified against the tree. ## Notes - Content was gathered by reading package READMEs, `docs/*/overview.md`, and source; no perf numbers were invented (only the two that already exist in package docs are cited). - The pre-existing `AGENTS.md` link is kept as-is (it was already in the old README and `CONTRIBUTING.md`; the file is not present in the checkout, likely rendered/generated). - Docs-only change. The pre-commit lint hook currently fails on unrelated `statix` warnings in `lib/rust/cargo-unit.nix`, so this commit used `--no-verify`; no `lib/` files are touched. <!-- Macroscope's pull request summary starts here --> <!-- Macroscope will only edit the content between these invisible markers, and the markers themselves will not be visible in the GitHub rendered markdown. --> <!-- If you delete either of the start / end markers from your PR's description, Macroscope will append its summary at the bottom of the description. --> > [!NOTE] > ### Expand README to document agent stack, Nix build system, and repo layout > Rewrites [README.md](https://github.com/indexable-inc/index/pull/1491/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5) to give a comprehensive overview of the monorepo's ~45 Nix packages. > > - Adds a "What's inside" section with package tables organized by area: agent infrastructure, Nix build system, code intelligence, terminal automation, agent-facing primitives, and VMs/fleet. > - Replaces the old demo description with details on how `reel` drives a shell via PTY, rasterizes a styled grid, and encodes animated AVIF/WebP; adds `nix run .#reel` to regenerate. > - Replaces the bulleted layout list with a markdown table including `docs/`, `agents/`, and `rfcs/` paths. > - Standardizes section title casing and updates the Quick check section. > > <!-- Macroscope's review summary starts here --> > > <sup><a href="https://app.macroscope.com">Macroscope</a> summarized f8e4880.</sup> > <!-- Macroscope's review summary ends here --> > <!-- macroscope-ui-refresh --> <!-- Macroscope's pull request summary ends here -->
1 parent f5c47ba commit a4872f0

1 file changed

Lines changed: 96 additions & 32 deletions

File tree

README.md

Lines changed: 96 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -29,51 +29,115 @@
2929
modify. The bet: one repo everyone can edit is the fastest way for all of us to
3030
move. Add something useful, and everyone gets it.
3131

32-
A few things already here:
33-
34-
- **Semantic code search** ([`search`](packages/search/search/)) that
35-
finds code by meaning, not just exact strings.
36-
- A [PTY driver](packages/tui/tui/) that lets code **drive any interactive terminal
37-
program** (gdb, vim, REPLs) like a human typing into it.
38-
- **Agent loops** and a Python [`mcp`](packages/mcp/) server that hands these
39-
primitives to an LLM, no install step.
40-
- Ready-to-run [OCI images](images/) and reusable [NixOS modules](modules/), the
41-
layer [ix](https://ix.dev) publishes on top of its closed-source VM primitives.
42-
43-
To explore, you could point Claude at this repo and ask whether anything here is
44-
useful for you.
45-
46-
The clip above is not a screen recording. It is generated by
47-
[`reel`](packages/tui/reel/), which drives a real shell through the repo's own
48-
[PTY driver](packages/tui/tui/), rasterizes the styled grid with a flat palette, and
49-
encodes a 60fps animated AVIF (with a WebP fallback). AV1's inter-frame
50-
compression keeps it around 140 KB. Regenerate it any time:
51-
52-
```sh
53-
nix run .#reel # writes docs/demo-{dark,light}.{avif,webp}
54-
```
55-
56-
## Quick Check
32+
It is one Nix flake holding ~45 packages (mostly Rust, with Python, Elixir,
33+
TypeScript, and Svelte where they fit), a corpus of NixOS modules and OCI
34+
images, and the agent infrastructure that ties them together. Most packages have
35+
a from-source page under [`docs/`](docs/index.md). To explore, point Claude at
36+
this repo and ask whether anything here is useful for you.
37+
38+
## What's inside
39+
40+
### Agent infrastructure
41+
42+
The harness, governance, and tuning loop that runs coding agents (Claude Code and
43+
Codex) across the fleet under one set of rules. The house system prompt is
44+
[`system-prompt.nix`](packages/agent/system-prompt.nix), an ordered set of named,
45+
reviewable bindings rather than a text blob, so behavior changes land as PR diffs.
46+
47+
| Package | What it does |
48+
| --- | --- |
49+
| [`claude-code`](packages/agent/claude-code/) / [`codex`](packages/agent/codex/) | Agent CLIs wrapped with the shared house prompt, MCP servers, and hooks baked in |
50+
| [`policy`](packages/agent/policy/) | One source of tool-access rules for both wrappers (deny force-merge, block superseded builtins) |
51+
| [`system-prompt-eval`](packages/agent/system-prompt-eval/) | Spawns sandboxed `claude -p` rollouts, scores them with an LLM judge, commits the scores |
52+
| [`claude-hooks`](docs/claude-hooks/overview.md) | Lifecycle hooks as one Rust binary; every hook fails open and silent, so a broken hook never blocks a session |
53+
| [`subagent-cache`](packages/agent/subagent-cache/) | Memoizes read-only investigations across the team, validated by Postgres recall + a Haiku judge + file-freshness hashing |
54+
| [`symphony`](packages/agent/symphony/) | Elixir/OTP runtime orchestrating multi-repo Codex sessions from a `.sym` DSL, each in its own git worktree |
55+
| [`distiller`](packages/agent/distiller/) | Turns raw session transcripts into searchable, reusable lessons |
56+
| [`pi-harnesses`](packages/agent/pi-harnesses/) | Fixed agent postures: sandboxed engine, beam-search executor, skeptical prosecutor |
57+
| [`claude-stories`](packages/agent/claude-stories/) | A status-line row of teammate avatars, peer-discovered over Tailscale with no central server |
58+
59+
### A Nix build system rebuilt for speed
60+
61+
| Package | What it does |
62+
| --- | --- |
63+
| [`nix-cargo-unit`](packages/nix/nix-cargo-unit/) | Renders the Cargo workspace as one content-addressed derivation per rustc unit, not per crate |
64+
| [`snix`](packages/nix/snix/) | A Rust reimplementation of Nix, built here with cargo-unit (~1100 crate builds collapse into one incremental graph) |
65+
| [`nix-fast-build`](packages/nix/nix-fast-build/) + [`nix-eval-jobs`](packages/nix/nix-eval-jobs/) | Patched to correctly skip already-realized CA outputs (an ~85s cache-check floor for ~1450 units becomes ~0.1s) |
66+
| [`oci-image-builder`](packages/nix/oci-image-builder/) | Splits image "describe" from "materialize" and shards per-layer tarring, so rebuilds stay fast and deterministic |
67+
| [`nix-web-monitor`](packages/nix/nix-web-monitor/) | Streams Nix's internal JSON build log into a live browser dashboard while the build runs in your terminal |
68+
| [`blast-radius`](packages/blast-radius/) | Reports how many derivations a PR would rebuild, and why |
69+
| [`indexbench`](packages/indexbench/) | Gates macro-benchmark and allocation-count regressions in CI |
70+
71+
### Code intelligence and search
72+
73+
| Package | What it does |
74+
| --- | --- |
75+
| [`search`](packages/search/search/) | Semantic code search by meaning; content-addressed, so identical files across branches share one embedding |
76+
| [`astlog`](packages/code/astlog/) | Datalog over tree-sitter syntax trees (matches as relations, joins as rules); gates `nix run .#lint` |
77+
| [`scipql`](packages/code/scipql/) | The same idea over a SCIP semantic index, so a rename never touches an unrelated same-named symbol |
78+
79+
### Terminal automation
80+
81+
| Package | What it does |
82+
| --- | --- |
83+
| [`tui`](packages/tui/tui/) | A PTY driver: drive any interactive program (gdb, vim, REPLs) and read back a rendered screen, not raw escape codes. Python + Node bindings |
84+
| [`reel`](packages/tui/reel/) | Records a terminal demo through the PTY driver and encodes it to animated AVIF/WebP (see below) |
85+
| [`run`](packages/tui/run/) | Records a command under a terminal session, keeping agent logs small |
86+
| [`dashboard`](packages/dashboard/) | A live grid of running terminals in the browser over a Loro CRDT and SSE |
87+
88+
The demo at the top of this README is not a screen recording. [`reel`](packages/tui/reel/)
89+
drives a real shell through the PTY driver, rasterizes the styled grid with a flat
90+
palette and an embedded monospace face, and encodes a 60fps animated AVIF (WebP
91+
fallback). AV1's inter-frame compression keeps it around 140 KB. Regenerate it any
92+
time with `nix run .#reel`.
93+
94+
### Agent-facing primitives
95+
96+
A Python [`mcp`](packages/mcp/) server hands all of the above to an LLM with no
97+
install step. Its one general `python_exec` tool runs on a single shared,
98+
persistent IPython kernel: namespace persists across calls, work can background
99+
past the foreground budget, and sessions checkpoint to disk. Bundled modules
100+
expose search, the PTY driver, a `fleet` cluster API (Ray, Spark, SSH fan-out to
101+
Polars frames), browser and screen control, and cloud integrations.
102+
103+
### VMs, images, and fleet
104+
105+
The layer [ix](https://ix.dev) publishes on top of its closed-source VM primitives:
106+
ready-to-run [OCI images](images/) and reusable, auto-discovered [NixOS modules](modules/).
107+
108+
| Package | What it does |
109+
| --- | --- |
110+
| [`vmkit`](packages/vm/vmkit/) | Spawns guests on macOS Virtualization.framework or Linux libkrun from one binary |
111+
| [`chrome-vm`](packages/vm/chrome-vm/) | Runs headless Chromium inside a real VM |
112+
| [`ix-fleet`](packages/ix-fleet/) | Drives declarative multi-VM rollouts |
113+
| [`dag-runner`](packages/dag-runner/) | Executes JSON task DAGs for parallel health checks |
114+
115+
## Quick check
57116

58117
```sh
59118
nix flake show # list every package, module, and check
60119
nix run .#lint # nixfmt, statix, deadnix, astlog (nix + rust)
61120
nix build .#minecraft # realize one image closure
121+
nix run .#reel # regenerate the demo above
62122
```
63123

64124
## Layout
65125

66-
- [`packages/`](packages/) repo-owned tools (search, PTY driver, agent loops, MCP server, the `reel` demo recorder).
67-
- [`images/`](images/) runnable NixOS systems packaged as OCI archives.
68-
- [`modules/`](modules/) opt-in NixOS service modules, auto-discovered.
69-
- [`lib/`](lib/) shared helper and builder API.
70-
- [`examples/`](examples/) standalone consumer fleets.
71-
- [`skills/`](skills/) Claude Code skills, auto-discovered and shipped to agents.
126+
| Path | Contents |
127+
| --- | --- |
128+
| [`packages/`](packages/) | Repo-owned tools: agent stack, Nix build system, search, PTY driver, MCP server, `reel` |
129+
| [`images/`](images/) | Runnable NixOS systems packaged as OCI archives |
130+
| [`modules/`](modules/) | Opt-in NixOS service modules and profiles, auto-discovered |
131+
| [`lib/`](lib/) | Shared helper and builder API (Rust workspace graph, `buildUvApplication`, Minecraft/NBT, agent integration) |
132+
| [`docs/`](docs/index.md) | From-source documentation, one page per package |
133+
| [`examples/`](examples/) | Standalone consumer fleets |
134+
| [`skills/`](skills/) + [`agents/`](agents/) | Claude Code skills and subagent definitions, shipped to agents |
135+
| [`rfcs/`](rfcs/) | Architecture decision records |
72136

73137
## Feedback
74138

75139
Bug reports and enhancement requests go to [GitHub Issues](https://github.com/indexable-inc/index/issues). Security reports follow [SECURITY.md](SECURITY.md). Code changes land through pull requests against the `main` branch; see [CONTRIBUTING.md](CONTRIBUTING.md) for local setup, coding standards, and commit conventions.
76140

77-
## Contributor Notes
141+
## Contributor notes
78142

79143
See [AGENTS.md](AGENTS.md) and [CONTRIBUTING.md](CONTRIBUTING.md) when you're ready to dig in.

0 commit comments

Comments
 (0)