Repository navigation
Done
Labels
ready-for-agentFully specified, ready for an AFK agent
Description
Parent
What to build
Accept's second way out opens a draft PR with the map and writes nothing to the checkout; the map shows from plotkeeper's copy until the PR merges. A PR closed unmerged leaves the map on show with a way forward. #753, "Accepting" ("Open a draft PR", "Following the PR") and user stories 26-30.
Acceptance criteria
- Open a draft PR reuses Back a law's draft-PR flow: a detached temporary worktree in the data folder, branch
first-map/<id>, the user's git identity, a push toorigin,gh pr create --draft; nothing is written to the checkout. - The accepted map is kept as
first-map/<project>.pending.jsonwith the PR's number and branch, read by ticket 4's third step. - The button is muted with a reason when
ghis missing orgh auth statusfails. - The server asks
gh pr view <number> --json state,mergedAtfor the pending PR, under the map fetch's cooldown and in-flight guard:MERGEDdeletes the pending file;CLOSEDkeeps it, and the head says "Map not in the repo" with Write to<path>, Open a draft PR and Discard;OPENchanges nothing; any error, timeout or unreadable answer changes nothing. - The promotion PR gets no Map diff or Ratify items, and its brief takes the existing quiet path; no code overrides it.
- Tests with a stub
ghand git remote: the flow writes nothing to the checkout; each lookup answer above; fromCLOSED, each of the three actions works. - Snap fixtures: "Map waiting on PR #N" and "Map not in the repo" with its actions.
-
docs/studio/behaviour/map.mddescribes the PR path.
Reading
- Studio map: First map — plotkeeper drafts a repository's first map (Onboarding of #474) #753: the spec, "Accepting".
server/src/back_a_law.rs:604-740: the draft-PR flow to reuse.server/src/prs.rs:71-74,175-195,253-264: why the tray's lookups can't follow this PR.local-evidence/2026-11-27-onboarding-grilling/``reports/decisions.md: every round's decisions and the facts checked (Daniel's machine only).
Touches
- Files:
server/src/map_draft.rs,server/src/back_a_law.rs,server/src/map.rs,ui/map-draft.ts,ui/map.ts,scripts/snap/fixtures-map.ts,docs/studio/behaviour/map.md - Session: auto mode
- Route: strong · effort high — a persisted pending map,
ghlookups whose errors must not delete it, and the push across a trust boundary
Metadata
Metadata
Assignees
Labels
ready-for-agentFully specified, ready for an AFK agent
Activity
system-map.jsonto the checkout #764Studio map: Accept writes system-map.json to the checkout (#764)
Studio map: Accept opens a draft PR, follows it, and recovers when it…
Studio map: First map — plotkeeper drafts a repository's first map (#753
danielrispler commentedon Nov 28, 2026
Resolved in PR #776 (squash e6034bf on main), spec #753. Built on the integration branch as 9179325: Accept opens a draft PR, follows it, and recovers when it closes; e727296 finds an earlier PR when pressed again.
Route outcome: strong·high claude/opus → pass | 22m