waggle-lens-code 0.4.0

The symbol lens (design doc 20): mint-time source-code structure via tree-sitter tags — extraction, the arena outline, the budget-fitted render. Daemon-side only; never compiled to wasm.
Documentation

A token is a ~30-byte attributed name for an artifact. Mint one for a file, hand off the one-line reference instead of the contents, and the consumer pulls only the slices it needs — grep and windowed reads through the token, under byte budgets. Every stage lands in a payload-free event log: who resolved, who read, who ran, what stalled. Corrections and revocations travel through the reference to every holder.

The full case — the handoff problem, the bee that solved it, the architecture at all three radii — lives in the essay and WHY.md. The systems-paper treatment, The Dance and the Field: Name Semantics for Handoffs Between Distributed Agents, is in paper/ (build with tectonic waggle.tex; the latest CI build is attached to the paper-latest release).

Install & first handoff

cargo install waggle-cli                          # on crates.io
claude mcp add waggle -- waggle serve --stdio     # ...and the same line in Codex/Cursor
waggle init                                       # the 5-line agent stub, into CLAUDE.md/AGENTS.md
waggle mint --target "file://$PWD/q3-report.md" --snapshot
#  → { "token": "b2uQyZUC",
#      "handoff": "resolve b2uQyZUC via waggle for your working context" }

waggle search --token b2uQyZUC --pattern "pricing"   # grep THROUGH the token
waggle read   --token b2uQyZUC --lines 40-80         # a window, never the whole artifact
waggle funnel --token b2uQyZUC                       # { "resolve": 1, "read": 2, "run": 1 }

just demo runs the whole arc against a throwaway store. The documentation map holds the eleven guides in reading order — five-minute loop, harness wiring, federation, the Cloudflare edge, the tmux switchboard.

Status

v0.1.0 on crates.io; the 0.3 feature set is complete on main — the full verb loop, snapshots, federation, the edge tier, Ed25519 trust, the spec with conformance vectors, and the tmux switchboard. Every claim is a passing test in CI (three-OS matrix + wasm + live Miniflare edge; ~170 tests). Measured numbers live in benches/PERF.md.

In design: interrogation telemetry — convergence classification of consumer traces, receipt-driven model routing, and distilling accepted reading paths into scaffolds for weaker model families. This README will be rewritten around the implemented system when that work lands (P5 of the plan).

License

MIT OR Apache-2.0, at your option.