graff — a fast agentic coding harness in Zig: multi-provider, MCP, workflows, DGM evolution loop, TS/Python SDKs
Python
Move root notes, images, and the desktop launch script into docs/
justrach1e47309108fa
diff --git a/README.md b/README.mdindex 0b11d1c7..45899090 100644--- a/README.md+++ b/README.md@@ -306,7 +306,7 @@ On the 3-task spine (exact-reply + file-ops + fix-fib) graff was **19.9s /Same model, same endpoint, the older Rust codegraff used **4.3×** the memoryand **~14×** the disk for a dead-heat turn. Method:-[architecture.md](architecture.md).+[docs/architecture.md](docs/architecture.md).</details>@@ -436,9 +436,9 @@ The repository is organized as follows:| `src/`, `TUI/` | harness + terminal || `apps/` | desktop (Electron) and iOS || `graff-evals/` | live, in-house, FrontierHarness |-| `docs/` | ADRs, images, install, embedding |+| `docs/` | ADRs, architecture, images, install, embedding || `sdk/` | generated TypeScript / Python |-| `scripts/` | tier-1/2, PTY probes, release |+| `scripts/` | tier-1/2, PTY probes, release, desktop launch |Desktop code lives in `apps/native`; evaluation tooling lives in `graff-evals`.@@ -459,7 +459,7 @@ Docs-only pushes skip it. In-house PR fixtures: `graff-evals/`Build on Apple Silicon macOS 14+ with Bun, Zig, and Xcode command-line tools:```sh-./script/build_and_run.sh+./scripts/build_and_run.sh```The development bundle starts its own local server and uses local development@@ -492,4 +492,4 @@ licence is perpetual unless they breach it. Commercial permission withoutcopyleft exists only if **both authors grant it jointly in writing**, and isrevocable.-<p align="center"><sub>Built in Zig 0.17 dev · <a href="LICENSE">AGPL-3.0 (modified)</a> · <a href="architecture.md">architecture.md</a> · <a href="CHANGELOG.md">CHANGELOG</a> · <a href="uxlog.md">uxlog.md</a></sub></p>+<p align="center"><sub>Built in Zig 0.17 dev · <a href="LICENSE">AGPL-3.0 (modified)</a> · <a href="docs/architecture.md">architecture</a> · <a href="CHANGELOG.md">CHANGELOG</a> · <a href="docs/uxlog.md">uxlog</a></sub></p>diff --git a/apps/native/README.md b/apps/native/README.mdindex d9b71e5b..3d49fb5f 100644--- a/apps/native/README.md+++ b/apps/native/README.md@@ -300,7 +300,7 @@ than that flag refuses localhost.so the result is on screen without a click.The design and what is deliberately left out are in-`plans/2026-09-03-browser-sidecar.md`. The sidebar footer names the tab's graff+`docs/proposals/2026-09-03-browser-sidecar.md`. The sidebar footer names the tab's graffsession (`native-…`, the `--resume` target); clicking it copies thecommand that continues the same conversation in a terminal.diff --git a/apps/native/electron/README.md b/apps/native/electron/README.mdindex 49279432..e12b3925 100644--- a/apps/native/electron/README.md+++ b/apps/native/electron/README.md@@ -1,6 +1,6 @@# Electron desktop trial-Run `./script/build_and_run.sh` from the repository root, or use the Codex Run+Run `./scripts/build_and_run.sh` from the repository root, or use the Codex Runaction. It builds the production UI with Bun, packages Chromium, Bun, graff,and the SwiftUI Activity sheet, then opens `zig-out/electron/Codegraff.app`.Builds currently target Apple Silicon macOS 14+; Liquid Glass uses macOS 26+.diff --git a/docs/adr/dev-desktop-identity.md b/docs/adr/dev-desktop-identity.mdindex e0873319..25976b26 100644--- a/docs/adr/dev-desktop-identity.md+++ b/docs/adr/dev-desktop-identity.md@@ -14,7 +14,7 @@ of opening a development desktop, preventing side-by-side testing.`zig-out/electron-dev/Codegraff Dev.app`, bundle ID `dev.codegraff.app`.A bundled development marker selects the name `Codegraff Dev` and a separateElectron user-data directory before acquiring the single-instance lock.-`script/build_and_run.sh` builds and launches this variant by default and only+`scripts/build_and_run.sh` builds and launches this variant by default and onlystops this checkout's previous dev process. The release build remains unchanged.Development startup does not automatically configure external MCP clients, anddiff --git a/architecture.md b/docs/architecture.mdsimilarity index 99%rename from architecture.mdrename to docs/architecture.mdindex ab419629..8f68f7ef 100644--- a/architecture.md+++ b/docs/architecture.md@@ -1,8 +1,8 @@# Architecture-`simple-harness` is a terminal agentic loop built with Zig 0.17 dev and one-vendored TUI dependency. It talks to-two LLM providers, runs tools (including subagents and MCP servers) in+Codegraff is a coding agent built with Zig 0.17. The terminal pager is+first-party (`TUI/`); the desktop app is `apps/native`. The harness talks to+LLM providers, runs tools (including subagents and MCP servers) inparallel, and compacts its own context. This document explains how thepieces fit together.@@ -475,7 +475,7 @@ automatic semantic verification, and fleet-wide behavioral consumption remaindeferred.The pre-existing append-only `Trajectory` DGM ledger and its record shapes remainunchanged. See-[`docs/behavioral-trajectories.md`](docs/behavioral-trajectories.md).+[`behavioral-trajectories.md`](behavioral-trajectories.md).## Local learning engine@@ -519,7 +519,7 @@ appends a new transaction rather than deleting history. `fleet.zig`marks the verified learned agent as local activation authority so later remoteelite merges cannot replace that name. Full schemas, operational guidance,privacy implications, and the unimplemented collective-learning design are in-[`docs/local-learning.md`](docs/local-learning.md).+[`local-learning.md`](local-learning.md).## Compactiondiff --git a/TODO.md b/docs/archive/v0.0.193-handoff.mdsimilarity index 100%rename from TODO.mdrename to docs/archive/v0.0.193-handoff.mddiff --git a/codegraff.png b/docs/images/codegraff.pngsimilarity index 100%rename from codegraff.pngrename to docs/images/codegraff.pngdiff --git a/comparison.png b/docs/images/comparison.pngsimilarity index 100%rename from comparison.pngrename to docs/images/comparison.pngdiff --git a/token-efficient-loop.png b/docs/images/token-efficient-loop.pngsimilarity index 100%rename from token-efficient-loop.pngrename to docs/images/token-efficient-loop.pngdiff --git a/docs/memory-architecture.md b/docs/memory-architecture.mdindex d3fae57b..5bc6cfa3 100644--- a/docs/memory-architecture.md+++ b/docs/memory-architecture.md@@ -4,7 +4,7 @@ A design for pulling memory **into graff's core** as a pluggable, evolvablelayer — rather than leaving it scattered across history/compaction/sessions orbolted on as an external MCP. Companion to[hyperagents.md](hyperagents.md) (the DGM/MAP-Elites evolution loop) and-[architecture.md](../architecture.md) (the harness internals + perf budgets).+[architecture.md](architecture.md) (the harness internals + perf budgets).Framing borrowed from **ALMA** (Automated meta-Learning of Memory designs forAgentic systems, [arXiv:2602.07755](https://arxiv.org/abs/2602.07755)): thediff --git a/plans/2026-06-15-gui-port-review-handoff.md b/docs/proposals/2026-06-15-gui-port-review-handoff.mdsimilarity index 100%rename from plans/2026-06-15-gui-port-review-handoff.mdrename to docs/proposals/2026-06-15-gui-port-review-handoff.mddiff --git a/plans/2026-09-03-browser-sidecar.md b/docs/proposals/2026-09-03-browser-sidecar.mdsimilarity index 100%rename from plans/2026-09-03-browser-sidecar.mdrename to docs/proposals/2026-09-03-browser-sidecar.mddiff --git a/Agentic_Operating_System.md b/docs/proposals/Agentic_Operating_System.mdsimilarity index 100%rename from Agentic_Operating_System.mdrename to docs/proposals/Agentic_Operating_System.mddiff --git a/graff-dgm.md b/docs/proposals/graff-dgm.mdsimilarity index 100%rename from graff-dgm.mdrename to docs/proposals/graff-dgm.mddiff --git a/phase2-escalation.md b/docs/proposals/phase2-escalation.mdsimilarity index 100%rename from phase2-escalation.mdrename to docs/proposals/phase2-escalation.mddiff --git a/vision.md b/docs/proposals/vision.mdsimilarity index 100%rename from vision.mdrename to docs/proposals/vision.mddiff --git a/uxlog.md b/docs/uxlog.mdsimilarity index 100%rename from uxlog.mdrename to docs/uxlog.mddiff --git a/script/build_and_run.sh b/scripts/build_and_run.shsimilarity index 100%rename from script/build_and_run.shrename to scripts/build_and_run.shdiff --git a/socials/release-post/linkedin.md b/social/release-post/linkedin.mdsimilarity index 100%rename from socials/release-post/linkedin.mdrename to social/release-post/linkedin.mddiff --git a/socials/release-post/linkedin2.md b/social/release-post/linkedin2.mdsimilarity index 100%rename from socials/release-post/linkedin2.mdrename to social/release-post/linkedin2.mddiff --git a/socials/release-post/live-evals-295.md b/social/release-post/live-evals-295.mdsimilarity index 100%rename from socials/release-post/live-evals-295.mdrename to social/release-post/live-evals-295.mddiff --git a/socials/release-post/twitter.md b/social/release-post/twitter.mdsimilarity index 96%rename from socials/release-post/twitter.mdrename to social/release-post/twitter.mdindex 58f63ec6..1dbce669 100644--- a/socials/release-post/twitter.md+++ b/social/release-post/twitter.md@@ -1,6 +1,6 @@# graff launch thread (coworker framing)-A nine-post X thread mirroring the LinkedIn launch: Graff as a continual learning coding coworker. Same story beats as socials/release-post/linkedin2.md, cut for X.+A nine-post X thread mirroring the LinkedIn launch: Graff as a continual learning coding coworker. Same story beats as social/release-post/linkedin2.md, cut for X.Every tweet is 280 characters or fewer. Tweet 1 has no link. Tweet copy contains no em dashes or backticks.@@ -112,7 +112,7 @@ Optional extras if you want denser media: Tweet 5 can use /social/graff-launch-0## Source verification map-- Binary and memory methodology: architecture.md and benchmarks/README.md+- Binary and memory methodology: docs/architecture.md and benchmarks/README.md- ultracode multi-agent mode: src/mainloop.zig, README.md- Evolutionary / lineage archive: README.md (An evolutionary harness), src/trace.zig- Local promotion semantics: src/fleet.zig (promoteAgents) and src/commands_session.zig (/agents promote)diff --git a/src/agent_eval.zig b/src/agent_eval.zigindex 1b497386..adfbc266 100644--- a/src/agent_eval.zig+++ b/src/agent_eval.zig@@ -259,7 +259,7 @@ pub fn runEval(self: *Agent, note: []const u8) !ExecResult {}if (telemetry.g_telem) |t| {const run_id: []const u8 = &scoring.g_run_id;- // Genome-send (graff-dgm.md §B): the eval genome is this agent's own+ // Genome-send (docs/proposals/graff-dgm.md §B): the eval genome is this agent's own// persona, never spawned via runSub, so its prompt_text never reached// the worker. A cell only promotes when harness_scores joins to a// harness_genomes row, so ride the genome text over on a `propose`