Repository navigation
Studio map: First map — plotkeeper drafts a repository's first map (#753) - #776
Merged
Merged
Conversation
…754) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… else a pending PR (#757) read_map tries system-map.json on the default branch, then the main checkout's working tree, then the accepted map waiting on a draft PR in the data folder (first-map/<project>.pending.json). MapState gains `from`, `pending` and `problems`; Status gains `not-git`. For a checkout map that reads, the Map view's payload runs system_map::check on the working tree and the page shows its problems as a banner under the head. The head shows "Map not committed yet", "Map waiting on PR #N" or "Map not in the repo" in the ref's place. A folder in no git repository says "Not a git repository: no map" and offers no prompt or Pre-flight. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
A batch is several runs queued as one request (`Runner::submit_batch`): they take the project's slot together and start together, each with its own folder, limit and status, and the slot frees when the last ends. A run that joins a running batch (`Runner::join`) starts at once; Discard (`Runner::cancel_batch`) cancels every run through `Runner::cancel`, queued first. The batch is kept in each run's `run.json`, so a restart finds every run of it again. `Kind::FirstMap` reads only: Read, Glob and Grep, no setup, no checks gate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
…arameters Worker: opencode/deepseek-v4.1-flash-free
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
A start adds its folder's project to the saved list with no session: its git root by the lookup sessions use, mapped through project_of, so a task's worktree joins its main checkout and any other worktree is its own; a non-git folder adds nothing. A first start registers in process; a second sends its folder to the running server's new register_folder command with the server's token as the cookie. Either way the address carries #project=<path>, and the page opens on that project's map ahead of the last viewed one, then drops the fragment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
Worker: opencode/deepseek-v4.1-flash-free
… a reference-copy candidate (#755) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
…e prompt (#760) A git repository whose map status is the empty state opens on the free scan. The page asks the new `map_scan` command once per open; the server (`server/src/map_scan.rs`) scans the main checkout, runs `check_text` on the skeleton in memory and adds the computed edges as `import` links, and answers with each part's file count, the read and unread languages (the scan gains `read_languages`) and whether `claude` is found. `ui/map-scan.ts` draws the parts as grey `.plate.draft` plates with their folder and file count, no fog, badges or footprints, fitted to the canvas, the links as lines, and a panel with the languages line, Draft the map with its time hint and "Uses your Claude Code plan" (muted with a reason when `claude` is not found, the copy-prompt then leading), and a copy-prompt that carries the skeleton and asks for `npx plotkeeper map check` until it passes. Nothing is written. A failed scan keeps the old "No map yet" prompt. CONTEXT.md gains First map and Map draft. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
#761) On the scan screen the person may fix the grouping before drafting; none of it is needed and nothing is written. The skeleton is a value the page holds (`ui/map.ts`): each edit goes to the new `map_scan_edit` command with the skeleton, one after another, and the server (`server/src/map_scan.rs`) makes the edit in memory, runs `check_text` on the result and answers with the scan screen's reply, its lines computed again. The reply gains the reference-copy candidates (ticked while the skeleton ignores them), the loose files and tests, and the subfolders each part would split into. - Ignore: ticking a candidate adds it to `ignored` and drops the part paths inside it; unticking it makes it a part when no part covers it. - Loose files and tests: one row a folder, given to a part or a new part, as the folder whole when no part's path is inside it, else by file. - A plate's press opens Merge into… and Split by subfolders, muted with a reason when its folders have no subfolders of code. Part paths never nest, so ownership never hangs on the parts' order. Each answer redraws the plates and lines and patches the panel in place, so it stays open at its scroll and keeps its focus; a merge or a split focuses the plate it leaves. The scan exposes `is_code`, `is_test` and `folder_title` for the server. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
…, retry, redraft, discard (#762) Draft the map splits the skeleton's parts into at most 4 groups, by zone then size, and starts one batch of read-only writers prompted with the trial's brief. When a group's writer lands its reviewer joins the batch, with the Map text review's prompt in First map's wording over the group's purposes, its folder holding the skeleton with that group's text alone. The Map draft is kept in `first-map/<project>.json` and survives a restart; a failed group is retried alone, Redraft this part gives one writer the part's flag, and Discard cancels the batch and deletes the draft. The runner tells every module that listens of a run's end, not only the first, and a batch keeps its project's slot while its run's end is told, so the reviewer joined then starts before a request queued behind the batch and the queue never splits a draft. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
… and tiers (#763) Draft the map waits for an edit on its way and starts the drafting run with the skeleton it left. While a Map draft exists the Map view shows it in the scan's place: plates fill in as groups land, "being checked" until the reviewer answers; a failed group says why with Retry; a card a part edits name, caption and purpose in place, shows a flag with its verdict, reason and cited lines, sets the tier (Interface to start, with the Core line) and offers Redraft this part. Accept is locked until every reviewer answered; Discard asks, then returns to the scan. Each answer and each map-landed patches the screen, so a field being typed in keeps its words and focus. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
- smoke.sh runs plotkeeper map check before the npm install folder is removed, so the launcher is still on the PATH. - system-map's scan matches a workspace glob by characters, not bytes: a member folder named past ASCII no longer panics, and a pattern with two stars matches a one-letter folder. - A closed PR's Write whose replace question got a no opens no Keep it current card. - The fetch after a merge no longer takes the pending PR lookup's cooldown slot, so the Map open right after still follows the PR. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
…code or not (#753) The free scan listed only code files as loose, but the map check asks a part or an ignore for every tracked file, so Accept refused almost any repository with docs, configs or hidden folders (observability-sdk at 7894bdf: 91 of 111 files unowned). Now the scan and the scan screen list every tracked file no part owns and no ignored folder holds, code or not, hidden or not, tests apart as before; the map file itself is never loose, as the check ignores it. Home gives such a file a part or a new part like any loose file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
…d Unignore brings it back (#753) Each loose-file or loose-test row on the scan screen offers Ignore beside Add. It sends the new `ignore-folder` edit through `map_scan_edit`, which adds the folder to the skeleton's `ignored`, so its files leave the loose lists and the check (`check_text` and `plotkeeper map check` alike) needs no part for them. The server refuses it on the root, on a path that is not a folder of loose files, and on a folder that holds a part's files, and the panel mutes it there with the reason. The folders so ignored are listed under Ignored folders, each with Unignore, which takes the folder out of `ignored` again. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
danielrispler
marked this pull request as ready for review
November 28, 2026 10:42
3 tasks
Conflicts kept both sides: #774's run warning beside the batch in runner.rs's Stored and submit, and RunView's warning beside the first-map kind in ui/types.ts. npm run check passed locally (2006 tests). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr
This was referenced Nov 28, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Spec #753: plotkeeper drafts a repository's first map. Closes #754, #755, #756, #757, #758, #759, #760, #761, #762, #763, #764, #765, #766, #767, #768, #769.
Summary
A repository with no
system-map.jsonnow gets one through the Studio map, from a free scan to an accepted map:Reading the map now falls back in order (#757):
plotkeeper map check(and a check of a map given as text, #754) uses the same check assystem-map check. PR briefs are placed by the uncommitted map while the map is not committed yet (#767). The README's Quick start names First map (#769).Tests removed or merged
the_map_comes_from_origins_default_branch_not_the_working_tree,a_default_branch_without_the_file_is_the_empty_state,a_file_that_does_not_read_is_unreadable_with_its_problem(server/src/map/tests.rs)the_map_reads_the_default_branch_else_the_checkout_else_a_pending_pra_micro_world_has_no_bash_and_writes_only_its_own_folder(server/tests/runner.rs)a_kind_with_no_shell_reads_and_writes_only_where_it_maythe_module_that_asked_for_a_run_is_told_its_end_once_also_at_a_pick_up(server/tests/runner.rs)every_module_that_listens_is_told_a_runs_end_once_also_at_a_pick_up_and_past_one_that_panicsthe page opens on the last viewed project's map, else the first project's(ui/tests/layout.test.mjs)the page opens on the project its address asks for, else the last viewed project's map, else the first project'sthe README is at most 850 wordsthe README is at most 900 words(cap raised, Daniel's call)None was tagged
@law:.Evidence
Real run (#768) on observability-sdk at 7894bdf, through the product with the 88c63ee build:
Scan → skeleton: 34
.claude/files ignored (8 presses, one per folder row). The other loose files got parts with 7 Add presses: Root (the root's own files,.changeset/,docs/agents/,scripts/), Src (src/'s own files,src/__tests__/) and Wiki (wiki/, whole).Draft: 7 parts, 10 import links, 2 groups. Took 59 s from Draft the map to the last reviewer's answer, with no retries or failures.
Review: 6 purposes supported. 1 overreach on fastify: "logs each request's start … with duration and status code", where the start log has no status code and is off by default. The writers listed 6 things they left out rather than guess.
Accept: Write system-map.json passed on the first press, with no replace question. The page showed "Map not committed yet" and Keep it current. Open a draft PR was not pressed. In the clone,
git statusshows only?? system-map.json.Check:
plotkeeper map checkin the clone printedok: 7 parts own 77 files (34 ignored); 10 links: 10 import (10 proven, 0 unproven) … 0 laws.Time: 3 min 30 s from opening the page to accepted.
An earlier attempt, on a build from before 3194475: $0.356 and 51 s, but Accept was refused because 91 non-code files were unowned and the scan had not listed them. This led to 3194475, which lists every unowned tracked file as loose, and 9dfc3d2, which adds Ignore on loose rows.
Trial before this run (one group): writer $0.19, reviewer $0.23, $0.42 total, about 1.2 min, 11 links.
Checks:
npm run checkpassed at every merge intoissue-753-first-mapand at 88c63ee.npm run snap:allpassed 261 fixtures;mapScanNarrowfailed once under machine load 81–107 and passed on rerun (a fixture this diff adds; not reproduced since).CI: the first run at 88c63ee failed three server tests that also failed on main: their recorded log aged out of the 30-day prune (#792, fixed by #793, merged in at 21bbd93). At 21bbd93, ubuntu failed
back_a_law::dismiss_waits_until_the_proof_is_done_with_the_runs_folderonce (macos was cancelled with it), and the rerun of the failed jobs passed. That test,prove_runand the runner's hold are unchanged from main. The likely cause is a race:prove_runwrites Proven (server/src/back_a_law.rs:806) before its hold drops when the function returns, so a Dismiss in that window is refused.Outside review
Model
gemini-4-neon-medium, one round. cost: 4.5 min, 435023 tokens.segment_matchessliced bytes and panicked on a non-ASCII path: fixed (0c7e0f6). Not reported by the correctness pass.pressPendingopened Keep it current after a cancelled replace: fixed (0c7e0f6). Not reported by the correctness pass.fetchused up the pending PR's follow cooldown: fixed (0c7e0f6). Not reported by the correctness pass; the spec review had reported a neighbouring one (a merged PR's file deleted whether or not that turn's fetch ran), fixed in bb3c28c.Known limits
.claude/takes one press per subfolder row: 8 in Studio map: a real First map run on observability-sdk #768's run (follow-up Studio map: one Ignore for a loose parent folder with only subfolder rows #790).gh pr list --headkeeps the map it was opened with.git fetchkeeps failing, a merged PR's pending copy stays until a fetch passes.Merge Danger
Door: two-way
New screens and commands only show for a project with no map; an existing map reads as before (default branch first). Nothing migrates stored data.
Blast Radius: moderate
Touches the runner (batches, several end listeners), start-up registration of every git repository plotkeeper starts in, and map reading order. A First map run spends the person's own
claude -pquota (one writer and one reviewer per group, at most 4 groups).🤖 Generated with Claude Code
https://claude.ai/code/session_01CVqACd5v8kQPDauf9TyDYr