14 tasks · 4 phases · 2026-10-04

Organize can take every manual Mockup Lab action

Organize gets a second op family for every Registry and file action. Removals ask first, one undo covers spine, registry and files, and a fenced Claude run wires states into files the app cannot click through.

~20Actions gained
14Tasks
4Phases
The gist

Asked to declare states on before-hes-back.html, Organize said none of its ops can edit a mockup file and handed back /cr-frames. This plan gives it lab actions covering every manual Registry and file action. It also exposes the spine ops the applier already supports. Removals ask first, and one undo spans spine, registry and files.

The problem

Organize parses only SpineEdits. Registry actions (declare/read/edit states, rename, status, merge, versions, shelve, archive, delete, implementation links, filing) and file writes have no op. Splits are allowed only inside question options and skip the spine placement the manual split does. Eight working spine ops are never named in the prompt.

The specific file uses data-go buttons, which neither the harness reader nor the frame listener recognise, so even the Registry's own Declare button fails on it.

Approach

A second op family for lab actions

OrganizeLabAction is applied through the same DesignRegistryStore methods the Registry buttons call, with the same spine side effects (takes moved on merge and removed on delete). The spine applier stays untouched apart from four small clear/unlink ops. The rejected alternative folded registry ops into SpineEdit, which would couple the pure spine applier to the registry store and to disk.

One batch, fixed order

Files, then registry, then splits, then spine. A split group can name the spine screen it draws, so one turn can declare, split, link and set step states, which is the sequence the screenshot needed.

Fenced wiring run

When declared states have nothing clickable to reach them, a second run gets only Read and Edit(<that file>) under dontAsk. Verified on CLI 2.1.289: an Edit to a second file is denied. The app checks the manifest and crSetState afterwards and adopts the states.

Decisions made for you

Judgment call

Rename, move and status apply without asking

They are fully undoable and remove nothing. The Registry conversation treats them as never-pre-ticked. Organize treats them like spine renames. To reverse, add them to the gated list in OrganizeLabAction.asksFirst.

Judgment call

Placement is composed, not called

"Place… (reads the file)" is itself an AI proposal reviewed in a sheet. Organize reaches the same result with fileMockup + declareStates + split + linkTake, so no nested AI call is made.

The work

Phase 1 — Op surface

5 tasks
  • Add spine ops clearStepScreen, clearBeatScreen, clearFlowLoop, unlinkTake (unlinkTake asks first)
  • Advertise addBeat, editBeat, removeBeat, moveBeat, moveStep, setWayKind, renameScreen, setLoopPart in the Organize contract
  • Add OrganizeLabAction model, parser and describer
  • Add OrganizeLabApplier for registry, spine-side effects, splits and makeFlowFromFile
  • Gate destructive lab actions into questions; let question options carry lab actions

Phase 2 — States and wiring

4 tasks
  • Make the frame-contract listener and harness reader attribute-agnostic (fixes data-go)
  • Add a wireability check for declared states
  • Add the fenced wiring run (Read + Edit of one file, dontAsk) and verify its result
  • Add a tool-policy parameter to ClaudeDirectInvoker / CLIProvider.buildCommand

Phase 3 — Prompt, undo, panel

3 tasks
  • Give the prompt the registry context: units, statuses, shelf/archive, versions, implementation, unfiled files
  • Unify undo across spine, registry and files
  • Show lab actions and wiring progress in OrganizePanel

Phase 4 — Verify

4 tasks
  • xcodebuild + verify-build-product
  • Standalone harness: parser, gating, applier order, listener/wireability on before-hes-back.html
  • Live fenced wiring run against a scratch copy of a Peregrine mockup with no switcher
  • In-app check of the before-hes-back request (Sarah)

Risks & edge cases

Edge case

Wiring is verified structurally

The app confirms the manifest and listener exist, not that each state renders as labelled.

Edge case

File undo can be refused

Undo is all-or-nothing: any later change to the spine, the registry or a written file disables it for the whole batch.

Cost

Larger prompt, costly wiring run

Registry context adds tokens to each request. A fenced wiring run cost $2.10 (4 turns) in testing because it still loads the user CLAUDE.md.

Verification

Runtime unverified

The panel and end-to-end flow are compile-checked here; the before-hes-back request needs a run in the app.

Out of scope

Generating a mockup for a spine screen, spine history restore, and Start the spine over keep their own surfaces (Sarah, 2026-10-04).

Final review

The design reuses the store methods the UI already calls, so parity follows the manual paths. The weakest point is the fenced wiring run: a second AI pass with structural verification only.

74/100

Sound shape and a verified permission fence; runtime behaviour in the panel and the quality of AI-written listeners are unproven.