paprika-loop
Build a three.js page in a loop
The loop is a driver in this plugin, not this session: it runs claude -p once per iteration (a builder session that makes as many improvements as fit, then a read-only judge session that scores the page against the brief and writes the next three improvements), commits after each, and keeps the best-scored commit tagged paprika-loop/best. Each session starts with a fresh context and reads paprika-loop/LATEST.md (the last builder's section and the last judge's verdict, cut from paprika-loop/PROGRESS.md, which holds every session's), so a long build never fills one context window. The loop runs until the time is up, also after the page has everything the brief asks for. This session writes the brief and starts the loop.
- Write the brief with the brief phase of
paprika-make(${CLAUDE_PLUGIN_ROOT}/skills/paprika-make/SKILL.md, "The brief", read whole): its questions and its reference pictures first, since the person is here now and not while the loop runs (a request that names no pictures starts the reference subagent of its "Finding pictures" paragraph before the first question, and the person picks from what it finds), then the brief file, written with the Write tool in its own call before the driver starts, so the brief is kept when the start fails. It holds what the page is, what it must have and the pictures to work from, in that section's shape, written topaprika-loop/PROMPT.mdin the project's folder (a new empty folder when the person has none). Its numberedMust havelist is what each judge scores. A project that already has aBRIEF.mdand nopaprika-loop/PROMPT.mdyet starts from a copy of it; an existing PROMPT.md is the person's and stays as it is. The sheets the brief phase writes (LOOK.md,CHARACTERS.md,DESIGN.md,refs/sheets/) sit at the project root besidepaprika-loop/, and PROMPT.md's## Sheetssection names them, as BRIEF.md's does; each loop session reads them fresh, so the person's edit to one lands at the next session. The loop's own sessions have no person: they search the web only when PROMPT.md says to, and generate a model only when PROMPT.md's Sheets or a CHARACTERS.md Source line grants it. The time is in minutes; a request with no time gets 60. - Start the driver in the background, from the project's folder:
- an installed plugin:
node ${CLAUDE_PLUGIN_ROOT}/src/cli.js loop --minutes 120 --prompt-file paprika-loop/PROMPT.md - a clone of the repo (
${CLAUDE_PLUGIN_ROOT}/src/cli.tsexists):bun run ${CLAUDE_PLUGIN_ROOT}/src/cli.ts loop --minutes 120 --prompt-file paprika-loop/PROMPT.mdAdd--model <id>when the person names a model. A scene to rebuild from pictures (photographs or artwork) gets them inrefs/of the project folder and--builder-prompt ${CLAUDE_PLUGIN_ROOT}/skills/paprika-loop/builder-scene.md --judge-prompt ${CLAUDE_PLUGIN_ROOT}/skills/paprika-loop/judge-scene.md. The driver needsclaudeandgiton PATH and makes a git repository in the folder when there is none.
- an installed plugin:
- Tell the person where to watch, then stop:
paprika-loop/PROMPT.mdis their brief and theirs to change at any time; a change they ask for in this session is written there, the running session reads the changed lines at its next tool call, and later sessions start from the new text.paprika-loop/PROGRESS.mdis the agents' notes (one section per session),paprika-loop/loop.jsonthe scores, tokens and commits so far (how far along the loop is), andpaprika-loop/REPORT.mdappears when the time is up, with the best commit andgit checkout paprika-loop/bestto see it. Do not wait for the loop, poll it, or build anything yourself in this session: the loop's sessions own the page until it ends.
The same command runs from a terminal without this session.