bots-garden/mini-mepublic Fork
⑂ main
Commits
⬇ Clone ▾
git clone https://git.rickub.com/bots-garden/mini-me.git
git clone ssh://git@rickub.com/bots-garden/mini-me.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

Download ZIP
🛟 Updated. 04a9101 · on main · k33g · 15d ago
README.en.md · 238 lines · 18.3 KBmarkdown
Blame HistoryOpen raw

dev.team — a team of agents that helps you code

Version française

Five mm agents for a 32 GB MacBook Air: a coordinator you talk to, and four specialists it calls with the built-in ask_agent tool, one at a time. A hook unloads each model when the team hands over, so only one model is in memory at a time.

The coordinator's three routes

Agent File Header title Model (llmman) Tools Job
coordinator agent.yaml 🧭 Coordinator Qwen3.5 4B · 3.4 GB ask_agent only picks the route, hands over, reports to you
reformulator agent.reformulator.yaml 📝 Reformulator Gemma 4 12B · 7.3 GB bash (reading), ask_user, lsp (reading) turns a code request into a task brief; asks you what only you can decide
coder agent.coder.yaml 🛠️ Coder Mellum2 12B-A2.5B · 8.1 GB bash, files, lsp; a gofmt hook fixes, adds, changes code; runs the tests
reviewer agent.reviewer.yaml 🔎 Reviewer Gemma 4 12B · 7.3 GB bash, files (tests only), lsp (reading) reads the diff, runs the tests, writes its own edge-case tests, VERDICT: PASS / FAIL
tutor agent.tutor.yaml 📘 Tutor Mellum2 12B-A2.5B · 8.1 GB fetch_content, save_answer, bash, files, lsp (reading) answers questions with a mini tutorial; saves it on request

The full model ids are hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M, hf.co/unsloth/gemma-4-12b-it-GGUF:Q4_K_M and hf.co/JetBrains/Mellum2-12B-A2.5B-Instruct-GGUF-Q4_K_M:Q4_K_M.

The three routes

The coordinator reads the request and picks one route (its prompt, in agent.yaml):

  • A — code to write or change (a bug, a feature, a rename, tests): reformulator → coder → reviewer. If the reviewer answers VERDICT: FAIL, the coder fixes once and the reviewer checks again. Then the coordinator reports: who did what, the files, the tests, the verdict.
  • B — a question, a lesson, advice ("how do I…", "what is…", "explique-moi…"): the tutor, and its answer is given as it is.
  • C — only a review of existing code: the reviewer.

The team works on the code in workspace/, which is empty in the repository: put your project there (a git repository, so that the reviewer can read git diff), or ask the team to create one. The measurements below were made on textstats, a small Go practice package with a known bug (WordCount and several spaces), which this folder no longer ships.

One model in memory at a time

Hooks unload a model at each hand-off

The ticket's constraint: when the team switches agent, the current model leaves memory. That is not left to the models (a small model forgets to call unload_model: 4 times out of 5 with MiniCPM5 2B in demos/unload-models). Two hooks of the coordinator do it, with hooks/unload.js (copied from demos/unload-models):

Hook When Unloads
preAsk → unload.js self the coordinator has decided to call an agent, before that agent starts the coordinator's own 4B
postAsk → unload.js asked the agent has answered, before the coordinator reads the answer the agent's 12B

llmman reloads a model by itself on the next request, so the coordinator's 4B comes back alone to read each answer. Both hooks have onError: warn: a failed unload costs memory, not the hand-off. The four specialists have unloadModels: false: no unload_model tool to think about.

Two models are shared on purpose: the reformulator and the reviewer use Gemma 4 12B, the coder and the tutor Mellum2. Peak memory: one 12B model, about 8 GB plus its KV cache at a 32k window.

The coder's formatter hook

agent.coder.yaml has its own postToolCall hook: after each write_file or edit_file on a .go file, hooks/gofmt.js runs gofmt -w on it. The prompt asked for gofmt and Mellum2 skipped it in every measured run. When gofmt cannot parse the file, its error goes back to the model as context.

The Go language server

The four specialists have an lsp block with gopls for .go files; the coordinator has no tool but ask_agent, by design. Each prompt says what to use it for:

Agent Uses lsp for
coder references before changing a signature, rename to rename an identifier everywhere, diagnostics after a change
reviewer references on every function the diff touches, diagnostics on each changed file
reformulator references and symbols, to name the files a change touches
tutor hover and definition on a symbol of the code a question is about

Only the coder may rename; the others' prompts forbid it. gopls finds the go.mod of a project in a sub-folder of workspace/ by itself, although the agents run from workspace/ (measured with textstats).

Prerequisites

  • llmman serving on its default address, with the three models:

    llmman pull hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M
    llmman pull hf.co/unsloth/gemma-4-12b-it-GGUF:Q4_K_M
    llmman pull hf.co/JetBrains/Mellum2-12B-A2.5B-Instruct-GGUF-Q4_K_M:Q4_K_M
    llmman serve
    
  • Node.js (the hooks), Go ≥ 1.24 and git (the reviewer reads git diff).

  • gopls on the PATH: go install golang.org/x/tools/gopls@latest (then $(go env GOPATH)/bin in the PATH). Without it, each specialist starts with a warning and no lsp tool.

  • mm built at the repository root: go build -o mm .

Layout: agents read-only, code read-write

team/ read-only, workspace/ read-write

demos/dev.team/
├── sbxenv.yaml, start-zed.sh, stop-zed.sh   the sandbox — never mounted
├── README.*, dev-team-*.{drawio,svg,png}    this documentation
├── team/        the agents and their hooks  → mounted READ-ONLY
└── workspace/   your code (empty in the repository), .mm/  → the read-write workspace

The agents' files are what decides what the team may do: their prompts, their tools, yolo, the hooks. A team member with bash and write_file could rewrite them, and the next start would run its version. So they live in team/, which the sandbox mounts with readOnly: true, apart from the code the team changes. Docker also recommends keeping the environment file outside every mounted directory, so that an agent cannot change the commands your host runs: sbxenv.yaml and the scripts stay at the root of demos/dev.team/, which is not mounted.

mm finds the coordinator through AGENT_CONFIG, set in sbxenv.yaml; the other agents and the hooks are found next to it (mmConfigs paths and $MM_CONFIG_DIR are relative to team/agent.yaml). Sessions and traces go to workspace/.mm/, the session's working directory.

Run

In a sandbox, with Zed

cd demos/dev.team
sbx setup ssh             # once
./start-zed.sh            # sbx env create --env-arg DEV_TEAM_DIR=$PWD, then Zed on workspace/
./stop-zed.sh             # removes the sandbox; team/ and workspace/ stay on the host

start-zed.sh passes the folder of sbxenv.yaml as the argument DEV_TEAM_DIR; sbxenv.yaml builds AGENT_CONFIG=<DEV_TEAM_DIR>/team/agent.yaml from it. In a terminal of the sandbox, from workspace/: mm -tui (it reads AGENT_CONFIG).

To check, once the sandbox is up: sbx version (sbx env needs 0.39.0 or newer, which is also past CVE-2026-18171, a way to write into a read-only mount in 0.35.0–0.38.0); in the sandbox, echo $AGENT_CONFIG, ls "$(dirname "$AGENT_CONFIG")" and touch "$(dirname "$AGENT_CONFIG")/x", which must fail.

On the host

cd demos/dev.team/workspace
AGENT_CONFIG=$PWD/../team/agent.yaml ../../../mm -tui
../../../mm -config ../team/agent.yaml -tui      # the same
../../../mm -config ../team/agent.yaml -p "…"    # one request, then exit (the reformulator cannot ask you anything)

The sandbox publishes ports 8080, 6060 and 5050 to the same ports on the host (ports in sbxenv.yaml, applied at creation): a server started in the sandbox must listen on 0.0.0.0 to be reached on http://localhost:8080.

On the host nothing makes team/ read-only: that protection is the sandbox's.

In the window, the header names the agent at work: mm [🧭 Coordinator] · qwen3.5-4b:Q4_K_M @ llmman, then mm [🛠️ Coder] · … · asked by mm [🧭 Coordinator] during a hand-off.

yolo: true in agent.yaml and in every mmConfigs entry: hand-offs, commands and file writes run without asking. To approve each hand-off and read the prompt the coordinator wrote: AGENT_YOLO=false before mm.

Each specialist also works alone, e.g. mm -config ../team/agent.tutor.yaml from workspace/ (alone, they ask before each command and file change, except the tutor).

Examples to try

Put a project in workspace/, as a git repository with its last state committed, so that the reviewer's git diff shows only the team's change. The examples call it my-app.

Route Request What should happen
A Fix the bug in my-app: <what goes wrong, with an input and the expected output>. brief → fix + a test case → reviewer VERDICT: PASS
A Add a function to my-app that returns the most frequent words of a text. the reformulator asks you how many, case, punctuation, return type (in -p: it chooses and lists its ASSUMPTIONS)
A Rename <OldName> to <NewName> everywhere in my-app. brief → lsp rename + tests → review
B What is the difference between strings.Split and strings.Fields? a mini tutorial
B Explain table-driven tests in Go, using my-app/<file>_test.go as the example. the tutor reads the file and builds the lesson on its real code
B Explique-moi les goroutines avec un petit exemple, et sauve-le dans goroutines.md. a tutorial in French, saved with save_answer
C Review the code in my-app and tell me what is wrong. findings with file:line, tests, verdict

Measured results

llmman on the user's 32 GB machine, 2026-10-25, on the textstats practice package (playground/ in the tables), before workspace/ was emptied.

Each agent alone

Agent Task Result Time
coder the WordCount bug fixed with strings.Fields, 4 test cases added, tests green 351 s
reviewer review of that fix git diff, tests, its own review_test.go, VERDICT: PASS 151 s
tutor table-driven tests on playground/textstats_test.go 3 runs out of 3 read the file and teach on its real map[string]int table 12–19 s
reformulator "a function that gives the most frequent words" reads the code, calls ask_user; with nobody to answer (-p), lists its choices under ASSUMPTIONS 62 s

What these runs changed in the files:

  • coder: once, after a failed edit_file, Mellum2 wrote a tool call that never closed and ran to max_tokens (8192): most of the 351 s. max_tokens is now 4096, which halves what such a call costs.
  • tutor: the first version answered in 24 s but showed "a typical" test file it had invented. The prompt now makes read_file its first action when a file is named.
  • reformulator: the first version did not list its choices, and put "top N" out of scope for "the most frequent words". The prompt now names what only the user decides, and the brief has an ASSUMPTIONS section.

Does the team need a decision model?

The question of the ticket. A decider (see demos/decision-*) would pay off if the coordinator chose the wrong route. Measured: the coordinator (Qwen3.5 4B, reasoning off) on 12 requests — 5 code changes, 5 questions (2 in French), 2 reviews — 12 out of 12 to the right agent. A decider would add a model and a call for nothing. Where one could help later, to be measured first: spotting a request too vague to code (a noul question before the reformulator), or reading the reviewer's verdict.

The whole team

Through the coordinator, -p, AGENT_YOLO=true; llmman's loaded models sampled every 2 seconds.

Run Route Result Time
bug fix, 1st A VERDICT: PASS, but the coder looped on plan update and was called twice; the report said "no changes" 685 s
bug fix, 2nd (after the fixes below) A one call per agent, VERDICT: PASS, formatted, an exact report 398 s
"explique-moi strings.Split et strings.Fields" B the tutor answers in French, correct 49 s
"the most frequent words", 1st A failed: the reviewer tested a behaviour not in the brief and hit its 20 turns; the coordinator re-asked it, then called the coder 4 times; tests red at the end 52 min
"the most frequent words", 2nd (after the fixes below) A failed: a good brief (top 3), then the coder hit the cut-off failure and the coordinator re-asked it; the reviewer kept VERDICT: FAIL (2 of its 7 cases); stopped by the 30-minute limit of the measurement 30 min

Memory: within the team's hand-offs, never two models loaded at the same time: 4B → Gemma → 4B → Mellum2 → 4B → Gemma → 4B. The one overlap seen (the first 3 minutes of the last run) was a Mellum2 left loaded by a measurement run before the team started: the hooks unload the models of the hand-offs, not a model something else loaded.

In short: bug fixes, lessons and reviews work; new features do not yet. The weak link is the coder: on a feature, Mellum2 writes tool calls that repeat themselves until max_tokens, and the 4B coordinator then re-asks it despite its prompt. Try agent.coder.ornith.yaml for features (see below).

What the runs changed:

  • coder: no plan tool (Mellum2 called plan update in a loop); "add test cases, keep the existing ones"; the gofmt hook.
  • reviewer: its tests cover the brief's ACCEPTANCE and REQUIREMENTS only, a failing case of its own is a finding (no rewriting until it passes), gofmt -l and removed test cases are findings, maxTurns 20 → 12 (then 16, see below).
  • coordinator: maxTurns 8 → 6; "never re-ask an agent with a new prompt"; the report takes the files from the coder's and the reviewer's answers.

With the Go language server

Measured after adding lsp (gopls v0.24.0):

Agent Task Result Time
coder, 1st prompt "Rename LineCount to CountLines everywhere in playground" called rename without new_name, then copied the hint literally: the function became new_name, and the report said "renamed to CountLines" 18 s
coder, with a filled-in example in the prompt the same 3 runs out of 3: lsp rename → CountLines, tests green 5–10 s
reviewer review of that rename run 1: a tool call that repeated itself, stopped by mm; run 2: references + 2 diagnostics, a real finding (the test's error message still says LineCount: rename changes identifiers, not strings), VERDICT: FAIL 200 s, 167 s

The reviewer's prompt also had to say to run git diff inside playground/: from the folder above it, git reads mm's repository, where playground/ is ignored, and the diff is empty. Its maxTurns is now 16: 12 cut a normal review (13 calls) before its verdict.

Which coder?

The ticket allows questioning its model choices, so the coder was measured alone on the reformulator's brief for "the most frequent words", against a hidden test made of the brief's acceptance cases (copied in after the run), go vet and gofmt:

Coder Runs correct Time per run Formatted
Mellum2 12B-A2.5B Instruct (agent.coder.yaml) 2 out of 3 129 s, 132 s, 639 s (the failure) no (before the hook)
Ornith 1.5 9B, reasoning on (agent.coder.ornith.yaml) 2 out of 2 783 s, 810 s yes

Mellum2 stays the default, as the ticket chose: about 6 times faster, and right 2 times out of 3. Its failure mode is the one seen above: a tool call that repeats itself until max_tokens. Ornith is the steadier choice when time matters less: point mmConfigs.coder.path at agent.coder.ornith.yaml (6.7 GB, so it changes nothing to the memory peak).

Limits

  • The reformulator's bash is read-only by its prompt only. It has no file tools, but bash could write; with yolo: true nothing asks. For a guarantee, add a preToolCall hook that refuses commands that write (see demos/hooks).
  • The team can write anywhere in workspace/, not only in playground/. Once, before the split, a member wrote a main.go next to agent.yaml, which broke mm's go vet ./.... In the sandbox it can no longer touch team/; check git status after a run.
  • -p cannot ask you anything: the reformulator then chooses and says so.
  • Each reload costs time: unloading at every hand-off trades seconds of loading for memory. On a machine with more memory, remove the preAsk hook to keep the 4B loaded.
  • When ask_agent is refused (yolo: false and you say no), the 4B coordinator tends to try another agent rather than stop; after a failed hand-off, it re-asks the agent although its prompt says not to (maxTurns: 6 bounds it).
  • A model already loaded before the team starts (by another agent, or llmman run) stays loaded beside the team's: unload it first (curl -s http://127.0.0.1:17434/api/generate -d '{"model":"…","keep_alive":0}').

Files

demos/dev.team/
├── sbxenv.yaml                the sandbox: workspace/ read-write, team/ read-only, AGENT_CONFIG
├── start-zed.sh, stop-zed.sh  create the sandbox and open workspace/ in Zed; remove it
├── team/                      read-only in the sandbox
│   ├── agent.yaml             coordinator (🧭)
│   ├── agent.reformulator.yaml    📝
│   ├── agent.coder.yaml       🛠️
│   ├── agent.coder.ornith.yaml    🛠️ the coder on Ornith 1.5 9B (steadier, slower)
│   ├── agent.reviewer.yaml    🔎
│   ├── agent.tutor.yaml       📘 (the "prof" configuration of ticket 152, adapted)
│   └── hooks/                 unload.js (one model in memory at a time), gofmt.js (the coder's formatter)
├── workspace/                 read-write: empty in the repository (.gitkeep) — your project goes here;
│                              .mm/ (sessions, traces) is created on the first run
├── dev-team-flow.*            diagram: the three routes (.drawio .svg .png)
├── dev-team-memory.*          diagram: the unloads (.drawio .svg .png)
└── dev-team-sandbox.*         diagram: the sandbox mounts (.drawio .svg .png)

The diagrams are generated by .claude/skills/drawio-fancy-diagram/generator/examples/dev_team.py demos/dev.team.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
# dev.team — a team of agents that helps you code

*[Version française](README.fr.md)*

Five `mm` agents for a 32 GB MacBook Air: a coordinator you talk to, and four specialists it calls with the built-in `ask_agent` tool, one at a time. A hook unloads each model when the team hands over, so **only one model is in memory at a time**.

![The coordinator's three routes](dev-team-flow.svg)

| Agent | File | Header title | Model (llmman) | Tools | Job |
|---|---|---|---|---|---|
| coordinator | `agent.yaml` | 🧭 Coordinator | Qwen3.5 4B · 3.4 GB | `ask_agent` only | picks the route, hands over, reports to you |
| reformulator | `agent.reformulator.yaml` | 📝 Reformulator | Gemma 4 12B · 7.3 GB | `bash` (reading), `ask_user`, `lsp` (reading) | turns a code request into a task brief; asks you what only you can decide |
| coder | `agent.coder.yaml` | 🛠️ Coder | Mellum2 12B-A2.5B · 8.1 GB | `bash`, files, `lsp`; a `gofmt` hook | fixes, adds, changes code; runs the tests |
| reviewer | `agent.reviewer.yaml` | 🔎 Reviewer | Gemma 4 12B · 7.3 GB | `bash`, files (tests only), `lsp` (reading) | reads the diff, runs the tests, writes its own edge-case tests, `VERDICT: PASS / FAIL` |
| tutor | `agent.tutor.yaml` | 📘 Tutor | Mellum2 12B-A2.5B · 8.1 GB | `fetch_content`, `save_answer`, `bash`, files, `lsp` (reading) | answers questions with a mini tutorial; saves it on request |

The full model ids are `hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M`, `hf.co/unsloth/gemma-4-12b-it-GGUF:Q4_K_M` and `hf.co/JetBrains/Mellum2-12B-A2.5B-Instruct-GGUF-Q4_K_M:Q4_K_M`.

## The three routes

The coordinator reads the request and picks one route (its prompt, in `agent.yaml`):

- **A — code to write or change** (a bug, a feature, a rename, tests): reformulator → coder → reviewer. If the reviewer answers `VERDICT: FAIL`, the coder fixes **once** and the reviewer checks again. Then the coordinator reports: who did what, the files, the tests, the verdict.
- **B — a question, a lesson, advice** ("how do I…", "what is…", "explique-moi…"): the tutor, and its answer is given as it is.
- **C — only a review** of existing code: the reviewer.

The team works on the code in **`workspace/`**, which is empty in the repository: put your project there (a git repository, so that the reviewer can read `git diff`), or ask the team to create one. The measurements below were made on `textstats`, a small Go practice package with a known bug (`WordCount` and several spaces), which this folder no longer ships.

## One model in memory at a time

![Hooks unload a model at each hand-off](dev-team-memory.svg)

The ticket's constraint: when the team switches agent, the current model leaves memory. That is not left to the models (a small model forgets to call `unload_model`: 4 times out of 5 with MiniCPM5 2B in `demos/unload-models`). Two hooks of the coordinator do it, with `hooks/unload.js` (copied from `demos/unload-models`):

| Hook | When | Unloads |
|---|---|---|
| `preAsk` → `unload.js self` | the coordinator has decided to call an agent, before that agent starts | the coordinator's own 4B |
| `postAsk` → `unload.js asked` | the agent has answered, before the coordinator reads the answer | the agent's 12B |

llmman reloads a model by itself on the next request, so the coordinator's 4B comes back alone to read each answer. Both hooks have `onError: warn`: a failed unload costs memory, not the hand-off. The four specialists have `unloadModels: false`: no `unload_model` tool to think about.

Two models are shared on purpose: the reformulator and the reviewer use Gemma 4 12B, the coder and the tutor Mellum2. **Peak memory: one 12B model**, about 8 GB plus its KV cache at a 32k window.

### The coder's formatter hook

`agent.coder.yaml` has its own `postToolCall` hook: after each `write_file` or `edit_file` on a `.go` file, `hooks/gofmt.js` runs `gofmt -w` on it. The prompt asked for `gofmt` and Mellum2 skipped it in every measured run. When gofmt cannot parse the file, its error goes back to the model as context.

### The Go language server

The four specialists have an `lsp` block with gopls for `.go` files; the coordinator has no tool but `ask_agent`, by design. Each prompt says what to use it for:

| Agent | Uses `lsp` for |
|---|---|
| coder | `references` before changing a signature, `rename` to rename an identifier everywhere, `diagnostics` after a change |
| reviewer | `references` on every function the diff touches, `diagnostics` on each changed file |
| reformulator | `references` and `symbols`, to name the files a change touches |
| tutor | `hover` and `definition` on a symbol of the code a question is about |

Only the coder may `rename`; the others' prompts forbid it. gopls finds the `go.mod` of a project in a sub-folder of `workspace/` by itself, although the agents run from `workspace/` (measured with `textstats`).

## Prerequisites

- **llmman** serving on its default address, with the three models:

  ```bash
  llmman pull hf.co/unsloth/Qwen3.5-4B-GGUF:Q4_K_M
  llmman pull hf.co/unsloth/gemma-4-12b-it-GGUF:Q4_K_M
  llmman pull hf.co/JetBrains/Mellum2-12B-A2.5B-Instruct-GGUF-Q4_K_M:Q4_K_M
  llmman serve
  ```

- **Node.js** (the hooks), **Go** ≥ 1.24 and **git** (the reviewer reads `git diff`).
- **gopls** on the `PATH`: `go install golang.org/x/tools/gopls@latest` (then `$(go env GOPATH)/bin` in the `PATH`). Without it, each specialist starts with a warning and no `lsp` tool.
- **mm** built at the repository root: `go build -o mm .`

## Layout: agents read-only, code read-write

![team/ read-only, workspace/ read-write](dev-team-sandbox.svg)

```
demos/dev.team/
├── sbxenv.yaml, start-zed.sh, stop-zed.sh   the sandbox — never mounted
├── README.*, dev-team-*.{drawio,svg,png}    this documentation
├── team/        the agents and their hooks  → mounted READ-ONLY
└── workspace/   your code (empty in the repository), .mm/  → the read-write workspace
```

The agents' files are what decides what the team may do: their prompts, their tools, `yolo`, the hooks. A team member with `bash` and `write_file` could rewrite them, and the next start would run its version. So they live in `team/`, which the sandbox mounts with `readOnly: true`, apart from the code the team changes. Docker also recommends keeping the environment file outside every mounted directory, so that an agent cannot change the commands your host runs: `sbxenv.yaml` and the scripts stay at the root of `demos/dev.team/`, which is not mounted.

mm finds the coordinator through `AGENT_CONFIG`, set in `sbxenv.yaml`; the other agents and the hooks are found next to it (`mmConfigs` paths and `$MM_CONFIG_DIR` are relative to `team/agent.yaml`). Sessions and traces go to `workspace/.mm/`, the session's working directory.

## Run

### In a sandbox, with Zed

```bash
cd demos/dev.team
sbx setup ssh             # once
./start-zed.sh            # sbx env create --env-arg DEV_TEAM_DIR=$PWD, then Zed on workspace/
./stop-zed.sh             # removes the sandbox; team/ and workspace/ stay on the host
```

`start-zed.sh` passes the folder of `sbxenv.yaml` as the argument `DEV_TEAM_DIR`; `sbxenv.yaml` builds `AGENT_CONFIG=<DEV_TEAM_DIR>/team/agent.yaml` from it. In a terminal of the sandbox, from `workspace/`: `mm -tui` (it reads `AGENT_CONFIG`).

To check, once the sandbox is up: `sbx version` (`sbx env` needs 0.39.0 or newer, which is also past CVE-2026-18171, a way to write into a read-only mount in 0.35.0–0.38.0); in the sandbox, `echo $AGENT_CONFIG`, `ls "$(dirname "$AGENT_CONFIG")"` and `touch "$(dirname "$AGENT_CONFIG")/x"`, which must fail.

### On the host

```bash
cd demos/dev.team/workspace
AGENT_CONFIG=$PWD/../team/agent.yaml ../../../mm -tui
../../../mm -config ../team/agent.yaml -tui      # the same
../../../mm -config ../team/agent.yaml -p "…"    # one request, then exit (the reformulator cannot ask you anything)
```

The sandbox publishes ports 8080, 6060 and 5050 to the same ports on the host (`ports` in `sbxenv.yaml`, applied at creation): a server started in the sandbox must listen on `0.0.0.0` to be reached on `http://localhost:8080`.

On the host nothing makes `team/` read-only: that protection is the sandbox's.

In the window, the header names the agent at work: `mm [🧭 Coordinator] · qwen3.5-4b:Q4_K_M @ llmman`, then `mm [🛠️ Coder] · … · asked by mm [🧭 Coordinator]` during a hand-off.

`yolo: true` in `agent.yaml` and in every `mmConfigs` entry: hand-offs, commands and file writes run without asking. To approve each hand-off and read the prompt the coordinator wrote: `AGENT_YOLO=false` before `mm`.

Each specialist also works alone, e.g. `mm -config ../team/agent.tutor.yaml` from `workspace/` (alone, they ask before each command and file change, except the tutor).

## Examples to try

Put a project in `workspace/`, as a git repository with its last state committed, so that the reviewer's `git diff` shows only the team's change. The examples call it `my-app`.

| Route | Request | What should happen |
|---|---|---|
| A | `Fix the bug in my-app: <what goes wrong, with an input and the expected output>.` | brief → fix + a test case → reviewer `VERDICT: PASS` |
| A | `Add a function to my-app that returns the most frequent words of a text.` | the reformulator asks you how many, case, punctuation, return type (in `-p`: it chooses and lists its ASSUMPTIONS) |
| A | `Rename <OldName> to <NewName> everywhere in my-app.` | brief → `lsp rename` + tests → review |
| B | `What is the difference between strings.Split and strings.Fields?` | a mini tutorial |
| B | `Explain table-driven tests in Go, using my-app/<file>_test.go as the example.` | the tutor reads the file and builds the lesson on its real code |
| B | `Explique-moi les goroutines avec un petit exemple, et sauve-le dans goroutines.md.` | a tutorial in French, saved with `save_answer` |
| C | `Review the code in my-app and tell me what is wrong.` | findings with file:line, tests, verdict |

## Measured results

llmman on the user's 32 GB machine, 2026-10-25, on the `textstats` practice package (`playground/` in the tables), before `workspace/` was emptied.

### Each agent alone

| Agent | Task | Result | Time |
|---|---|---|---|
| coder | the `WordCount` bug | fixed with `strings.Fields`, 4 test cases added, tests green | 351 s |
| reviewer | review of that fix | `git diff`, tests, its own `review_test.go`, `VERDICT: PASS` | 151 s |
| tutor | table-driven tests on `playground/textstats_test.go` | 3 runs out of 3 read the file and teach on its real `map[string]int` table | 12–19 s |
| reformulator | "a function that gives the most frequent words" | reads the code, calls `ask_user`; with nobody to answer (`-p`), lists its choices under ASSUMPTIONS | 62 s |

What these runs changed in the files:

- **coder**: once, after a failed `edit_file`, Mellum2 wrote a tool call that never closed and ran to `max_tokens` (8192): most of the 351 s. `max_tokens` is now 4096, which halves what such a call costs.
- **tutor**: the first version answered in 24 s but showed "a typical" test file it had invented. The prompt now makes `read_file` its first action when a file is named.
- **reformulator**: the first version did not list its choices, and put "top N" out of scope for "the most frequent words". The prompt now names what only the user decides, and the brief has an ASSUMPTIONS section.

### Does the team need a decision model?

The question of the ticket. A decider (see `demos/decision-*`) would pay off if the coordinator chose the wrong route. Measured: the coordinator (Qwen3.5 4B, reasoning off) on 12 requests — 5 code changes, 5 questions (2 in French), 2 reviews — **12 out of 12 to the right agent**. A decider would add a model and a call for nothing. Where one could help later, to be measured first: spotting a request too vague to code (a noul question before the reformulator), or reading the reviewer's verdict.

### The whole team

Through the coordinator, `-p`, `AGENT_YOLO=true`; llmman's loaded models sampled every 2 seconds.

| Run | Route | Result | Time |
|---|---|---|---|
| bug fix, 1st | A | `VERDICT: PASS`, but the coder looped on `plan update` and was called twice; the report said "no changes" | 685 s |
| bug fix, 2nd (after the fixes below) | A | one call per agent, `VERDICT: PASS`, formatted, an exact report | 398 s |
| "explique-moi strings.Split et strings.Fields" | B | the tutor answers in French, correct | 49 s |
| "the most frequent words", 1st | A | **failed**: the reviewer tested a behaviour not in the brief and hit its 20 turns; the coordinator re-asked it, then called the coder 4 times; tests red at the end | 52 min |
| "the most frequent words", 2nd (after the fixes below) | A | **failed**: a good brief (top 3), then the coder hit the cut-off failure and the coordinator re-asked it; the reviewer kept `VERDICT: FAIL` (2 of its 7 cases); stopped by the 30-minute limit of the measurement | 30 min |

**Memory: within the team's hand-offs, never two models loaded at the same time**: 4B → Gemma → 4B → Mellum2 → 4B → Gemma → 4B. The one overlap seen (the first 3 minutes of the last run) was a Mellum2 left loaded by a measurement run before the team started: the hooks unload the models of the hand-offs, not a model something else loaded.

**In short: bug fixes, lessons and reviews work; new features do not yet.** The weak link is the coder: on a feature, Mellum2 writes tool calls that repeat themselves until `max_tokens`, and the 4B coordinator then re-asks it despite its prompt. Try `agent.coder.ornith.yaml` for features (see below).

What the runs changed:

- **coder**: no `plan` tool (Mellum2 called `plan update` in a loop); "add test cases, keep the existing ones"; the `gofmt` hook.
- **reviewer**: its tests cover the brief's ACCEPTANCE and REQUIREMENTS only, a failing case of its own is a finding (no rewriting until it passes), `gofmt -l` and removed test cases are findings, `maxTurns` 20 → 12 (then 16, see below).
- **coordinator**: `maxTurns` 8 → 6; "never re-ask an agent with a new prompt"; the report takes the files from the coder's and the reviewer's answers.

### With the Go language server

Measured after adding `lsp` (gopls v0.24.0):

| Agent | Task | Result | Time |
|---|---|---|---|
| coder, 1st prompt | "Rename LineCount to CountLines everywhere in playground" | called `rename` without `new_name`, then copied the hint literally: the function became `new_name`, and the report said "renamed to CountLines" | 18 s |
| coder, with a filled-in example in the prompt | the same | 3 runs out of 3: `lsp rename` → `CountLines`, tests green | 5–10 s |
| reviewer | review of that rename | run 1: a tool call that repeated itself, stopped by mm; run 2: `references` + 2 `diagnostics`, a real finding (the test's error message still says `LineCount`: `rename` changes identifiers, not strings), `VERDICT: FAIL` | 200 s, 167 s |

The reviewer's prompt also had to say to run `git diff` **inside** `playground/`: from the folder above it, git reads mm's repository, where `playground/` is ignored, and the diff is empty. Its `maxTurns` is now 16: 12 cut a normal review (13 calls) before its verdict.

### Which coder?

The ticket allows questioning its model choices, so the coder was measured alone on the reformulator's brief for "the most frequent words", against a hidden test made of the brief's acceptance cases (copied in after the run), `go vet` and `gofmt`:

| Coder | Runs correct | Time per run | Formatted |
|---|---|---|---|
| Mellum2 12B-A2.5B Instruct (`agent.coder.yaml`) | 2 out of 3 | 129 s, 132 s, 639 s (the failure) | no (before the hook) |
| Ornith 1.5 9B, reasoning on (`agent.coder.ornith.yaml`) | 2 out of 2 | 783 s, 810 s | yes |

Mellum2 stays the default, as the ticket chose: about 6 times faster, and right 2 times out of 3. Its failure mode is the one seen above: a tool call that repeats itself until `max_tokens`. Ornith is the steadier choice when time matters less: point `mmConfigs.coder.path` at `agent.coder.ornith.yaml` (6.7 GB, so it changes nothing to the memory peak).

## Limits

- **The reformulator's bash is read-only by its prompt only.** It has no file tools, but `bash` could write; with `yolo: true` nothing asks. For a guarantee, add a `preToolCall` hook that refuses commands that write (see `demos/hooks`).
- **The team can write anywhere in `workspace/`, not only in `playground/`.** Once, before the split, a member wrote a `main.go` next to `agent.yaml`, which broke mm's `go vet ./...`. In the sandbox it can no longer touch `team/`; check `git status` after a run.
- **`-p` cannot ask you anything**: the reformulator then chooses and says so.
- **Each reload costs time**: unloading at every hand-off trades seconds of loading for memory. On a machine with more memory, remove the `preAsk` hook to keep the 4B loaded.
- When `ask_agent` is refused (`yolo: false` and you say no), the 4B coordinator tends to try another agent rather than stop; after a failed hand-off, it re-asks the agent although its prompt says not to (`maxTurns: 6` bounds it).
- A model already loaded before the team starts (by another agent, or `llmman run`) stays loaded beside the team's: unload it first (`curl -s http://127.0.0.1:17434/api/generate -d '{"model":"…","keep_alive":0}'`).

## Files

```
demos/dev.team/
├── sbxenv.yaml                the sandbox: workspace/ read-write, team/ read-only, AGENT_CONFIG
├── start-zed.sh, stop-zed.sh  create the sandbox and open workspace/ in Zed; remove it
├── team/                      read-only in the sandbox
│   ├── agent.yaml             coordinator (🧭)
│   ├── agent.reformulator.yaml    📝
│   ├── agent.coder.yaml       🛠️
│   ├── agent.coder.ornith.yaml    🛠️ the coder on Ornith 1.5 9B (steadier, slower)
│   ├── agent.reviewer.yaml    🔎
│   ├── agent.tutor.yaml       📘 (the "prof" configuration of ticket 152, adapted)
│   └── hooks/                 unload.js (one model in memory at a time), gofmt.js (the coder's formatter)
├── workspace/                 read-write: empty in the repository (.gitkeep) — your project goes here;
│                              .mm/ (sessions, traces) is created on the first run
├── dev-team-flow.*            diagram: the three routes (.drawio .svg .png)
├── dev-team-memory.*          diagram: the unloads (.drawio .svg .png)
└── dev-team-sandbox.*         diagram: the sandbox mounts (.drawio .svg .png)
```

The diagrams are generated by `.claude/skills/drawio-fancy-diagram/generator/examples/dev_team.py demos/dev.team`.