redbluegreen wiki

Method

How the work was done: one-page prompts, a small local model in a loop, and a person at every GPU gate.

one-page prompt facts the driver verified goal, verification loop handoff launches agent session a 27B local model (Qwen) writes the unit shares the GPU rewrites STATUS.md done in progress ready for GPU test blocked reads tools/drive decides loop again, or stop loop again a person must act the person decides at the gate runs the GPU steps one run first gives results what the run printed records lessons.md one rule, dated into the next prompt budget: hand off at 40k tokens, prompt processing about 200 tokens per second rule 7: an agent never creates a GPU queue, because its own model shares the GPU
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:

  1. A 27B local model (Qwen) in the pi coding agent writes the implementation, one unit per one-page prompt.
  2. A larger model drives. It plans the units, checks each fact in kernel and ROCm source, reviews every handoff, and bisects the hangs.
  3. A person runs every GPU step by hand and decides at every gate.

Our docs follow four rules:

  1. Every line is at most 80 columns.
  2. Every doc is at most 60 lines.
  3. Every doc has a story shape: why, what, next.
  4. 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:

  1. Read files by line range and pipe build output through tail. Context is the scarce resource.
  2. Never create a GPU queue from inside an agent session. The agent's own model shares the GPU, and a hang ends the session.
  3. 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:

  1. done
  2. in progress
  3. ready for GPU test
  4. 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:

  1. 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.
  2. 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:

  1. The EOP buffer is required.
  2. The CP buffers are COHERENT.
  3. A kernel asks the assembler for 8 more VGPRs than the code uses.
  4. No new mapping while another process is busy.
  5. 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.

Sources