@@ -1,7 +1,6 @@
11 # mini-coding-agent (`mini` for short)
22
33 A fast, transparent, config-first terminal coding agent for one user at a time.
4-A careful Zig port of mini-coder.
54
65 This file holds intent, direction, and guardrails — not a description of the
76 code. The source is the source of truth for behavior. If a fact can be learned
@@ -19,18 +18,6 @@ by reading the code, it does not belong here; keep this file short.
1918 Node, no `node_modules`, no post-install scripts, no supply chain beyond what
2019 the code needs.
2120
22-## Provenance
23-
24-This project is a port. Its references are behavioral and structural, not
25-templates to copy:
26-
27-- `../mini-coder/` — the TypeScript implementation. The behavior specification.
28- Port its behavior, never its code.
29-- `../tiny-c-agent/` — a careful C port of the same design. The detail reference
30- for the low-level work: the four wire protocols, streaming reassembly, diff
31- capture, UTF-8 and base64 handling, session durability. Consult its structure
32- and its comments when porting those layers.
33-
3421 ## Direction
3522
3623 Deferred, not rejected. Do not build unless explicitly promoted:
@@ -56,8 +43,8 @@ Hard constraints. Do not cross these without explicit direction:
5643 full-screen cell grid.
5744 - **The provider layer is in-tree.** Implement the wire protocols directly —
5845 `openai-completions`, `openai-responses`, `anthropic-messages`,
59- `google-generative-ai`. Never depend on another harness's provider code.
60-- **Write original code.** `../mini-coder/` is a behavioral reference only.
46+ `google-generative-ai`. Never depend on an external provider library.
47+- **Write original code.** Copy nothing from another project.
6148 - **No sandbox or permission layer.** Tools run with the user's permissions;
6249 isolation is an environment concern, not the agent's.
6350 - **No loop limits.** No max turns, tool calls, token budgets, or agent-imposed
@@ -68,7 +55,7 @@ Hard constraints. Do not cross these without explicit direction:
6855 a provider's catalog or env vars.
6956 - **Minimal context.** The model sees the configured system prompt plus
7057 explicitly opted-in resource files — never reminders, hidden blocks, or
71- harness meta-text.
58+ injected meta-text.
7259 - **The agent never imports the TUI.** Headless and TUI are two projections of
7360 the same agent events; the TUI owns no agent or provider semantics.
7461
@@ -98,8 +85,8 @@ Hard constraints. Do not cross these without explicit direction:
9885
9986 ## Memory
10087
101-The port's reason for existing is that manual memory bookkeeping was the C port's
102-largest fragility. Do not reintroduce it.
88+Manual memory bookkeeping is the largest fragility a program of this shape can
89+carry. Do not reintroduce it.
10390
10491 - One allocator, chosen at startup, threaded explicitly. Long-lived state and
10592 per-turn scratch are separate lifetimes, not one global pool.