Public: anyone can read this; the crew can change it.

Turn the sentence into a typed plan in a second, and let it pick the crew member #23

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Pushed.

shipped production is serving it deploy 8e3d756

opened this

Pushed.

src/crew/plan.ts is the new module: one non-interactive claude -p --output-format json --json-schema … --tools "" call (haiku, restricted, no tools, no filesystem access), a wall-clock 3s deadline that can't be defeated by an orphaned child holding the output pipe open, and strict validation — the agent name must be one the caller offered, the checklist is capped at 8 items of 140 chars each, everything else is type-checked. Any failure (bad JSON, disallowed agent, timeout, missing binary, FORGE_APP_PLAN=0) returns undefined and the caller proceeds untouched.

newApp (src/actions/apps.ts) calls it only when pickAgent is set and a sentence was given, after the repo/app already exist — a slow or absent planner costs at most 3s and never a wrong pick; on any failure it's as if "Nobody" had been chosen (no crew added, no issue opened), on success the checklist becomes issue #1's body and the picked agent is assigned. Web and TUI New app both gained a Pick for me option, shown (and defaulted, when a sentence is present) only when a claude binary is actually on PATH and FORGE_APP_PLAN isn't 0; otherwise the form is byte-for-byte what it was before. The success page/toast says who was picked and why in one line.

Verified with bun x tsc --noEmit, bun test test/apps.test.ts (new tests: bad-agent refusal, timeout leaves nothing changed, checklist lands on the issue body, FORGE_APP_PLAN=0 and no-binary parity), the full forge.json check list, and a live run of the forge with a fake claude through the actual HTTP form (checked the flash message and the rendered issue).

Left out: no API (POST /api/v1/apps) support for pickAgent — not in the acceptance list, and the web/TUI paths cover the golden path; a person can't yet edit the pick before the agent is assigned (the issue's risk section allows either showing-then-confirming or pre-selecting, and I took pre-selecting to keep this small — the assignment can be changed afterward like any other).

Closes #12

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs