Skip to content

Studio map: drafting on the server, the Map draft, writers, reviewers, retry, redraft, discard #762

Done

Description

@danielrispler

Parent

#753

What to build

Draft the map starts a batch of writers that name and describe the parts, a reviewer per group on its purposes, and a stored Map draft that survives a restart. #753, "The drafting run".

Acceptance criteria

  • Parts split into at most 4 groups, by zone then size; a writer per group, prompted as the trial's brief: name, caption and purpose only, every purpose cited, not_written over guessing, JSON in the answer.
  • When a group's writer lands, its reviewer starts (joining the batch) over that group's part:<id>/purpose items, with ticket 16's prompt and First map wording; its folder holds the skeleton with that group's text only.
  • The Map draft is kept as first-map/<project>.json in the data folder: the skeleton, each group's state, writer output, verdicts and edits; it survives a restart and is deleted on Discard.
  • A writer or reviewer that times out, fails or answers no JSON marks its group failed with the reason; the rest stand; Retry runs that group again, joining the batch.
  • Redraft this part runs one writer over one part with the flag's verdict and reason in its prompt, then that part's reviewer.
  • Discard mid-batch cancels the batch, frees the slot and deletes the draft; a pause mid-batch keeps stored groups, the failed one retryable after Resume; a restart keeps stored groups and marks a dead run's group failed and retryable.
  • Page commands start, retry, redraft and discard; tests with a stub claude answering canned JSON cover groups landing in order, a failed group retried alone, a redraft, Discard, a pause and a restart.
  • docs/studio/behaviour/background-runs.md describes First map's runs; system-map.json follows the new module.

Reading

Touches

  • Files: new server/src/map_draft.rs, server/src/api.rs, docs/studio/behaviour/background-runs.md, system-map.json
  • Session: auto mode
  • Route: strong · effort high — a stored type (the Map draft) and the batch's early ends

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions