How the work was done: one-page prompts, a small local
model in a loop, and a person at every GPU gate.
One loop: a prompt goes in, STATUS.md comes out, and
tools/drive either starts the next session or stops for the person who
owns the GPU.
Two models and one person build redbluegreen.
The small model has a small context, and the GPU has no undo. The
method splits the work so each side does what it can do safely.
The roles:
A 27B local model (Qwen) in the pi coding agent writes
the implementation, one unit per one-page prompt.
A larger model drives. It plans the units, checks each fact in
kernel and ROCm source, reviews every handoff, and bisects the hangs.
A person runs every GPU step by hand and decides at every
gate.
Our docs follow four rules:
Every line is at most 80 columns.
Every doc is at most 60 lines.
Every doc has a story shape: why, what, next.
No doc repeats a fact another doc owns.
tools/doclint, a checker in sh and awk, enforces the
first two. A person reviews the rest. Agent reports obey the same
rules.
Three rules keep the development autonomous:
Read files by line range and pipe build output through tail.
Context is the scarce resource.
Never create a GPU queue from inside an agent session. The
agent's own model shares the GPU, and a hang ends the session.
Report a wrong doc fact as stale. Never fix it or trust it
silently.
A prompt is a thin launcher.
It holds facts the driver verified, a goal, a verification loop,
and a handoff. The handoff rewrites docs/STATUS.md with
one of four states:
done
in progress
ready for GPU test
blocked
tools/drive reads that line and starts the next
session. It stops when the unit is done or a person must act.
Two pi extensions shape each session:
One hands off at 40k context tokens instead of compacting.
Prompt processing runs at about 200 tokens per second, so a long
context costs minutes per turn.
The other nudges the model when a turn ends with reasoning and
no action.
The model server runs one slot with the speculative decoder on.
The rules that cost resets take one line each in
docs/lessons.md, with the date:
The EOP buffer is
required.
The CP buffers are COHERENT.
A kernel asks the assembler for 8 more VGPRs than the code uses.
No new mapping while another process is busy.
One run first.
The bisect kernels are committed as the record. A future hang gets
bisected against the same set.
Reading source finds candidates. Only a run settles them, and the
first run is one run.