Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
03cba71
Studio map: plotkeeper map check, and a check of a map given as text …
danielrispler Nov 27, 2026
d035684
Merge issue-754-map-check into issue-753-first-map
danielrispler Nov 27, 2026
124fc12
Studio map: the map reads from the default branch, else the checkout,…
danielrispler Nov 27, 2026
6180109
Studio: the runner's batch and the FirstMap run kind (#758)
danielrispler Nov 27, 2026
1481b26
Merge issue-757-map-read-order into issue-753-first-map
danielrispler Nov 27, 2026
3a6830d
Studio map: share the Map text review's prompt, with its wording as p…
danielrispler Nov 27, 2026
a414f60
Merge remote-tracking branch 'origin/issue-753-first-map' into issue-…
danielrispler Nov 27, 2026
c8e76c4
Merge issue-758-runner-batch into issue-753-first-map
danielrispler Nov 27, 2026
9ab2c1e
Studio map: the free scan, `plotkeeper map scan` (#755)
danielrispler Nov 27, 2026
e86438e
Merge remote-tracking branch 'origin/issue-753-first-map' into issue-…
danielrispler Nov 27, 2026
485864a
Merge issue-759-cheap into issue-753-first-map
danielrispler Nov 27, 2026
4f6ba77
Studio: starting plotkeeper in a git repository registers it (#756)
danielrispler Nov 27, 2026
b0cc8fe
Merge origin/issue-753-first-map into issue-756-startup-register
danielrispler Nov 27, 2026
e4c8c94
Studio: PR briefs while the map is not committed
danielrispler Nov 27, 2026
0ef8748
Merge remote-tracking branch 'origin/issue-753-first-map' into issue-…
danielrispler Nov 27, 2026
0305604
Merge remote-tracking branch 'origin/main' into issue-753-first-map
danielrispler Nov 27, 2026
528c9c0
Merge branch 'issue-756-startup-register' into issue-753-first-map
danielrispler Nov 27, 2026
80b6859
Studio map: the scan lists an unbuilt, unimported top-level folder as…
danielrispler Nov 27, 2026
b006663
Merge remote-tracking branch 'origin/issue-753-first-map' into issue-…
danielrispler Nov 27, 2026
7c9599b
Merge branch 'issue-767-cheap' into issue-753-first-map
danielrispler Nov 27, 2026
83d3e09
Merge origin/main into issue-753-first-map
danielrispler Nov 27, 2026
47ab204
Merge branch 'issue-755-free-scan' into issue-753-first-map
danielrispler Nov 27, 2026
b95f2d2
Studio map: the scan screen, grey plates, lines, Draft the map and th…
danielrispler Nov 27, 2026
884f7b4
Merge remote-tracking branch 'origin/main' into issue-753-first-map
danielrispler Nov 27, 2026
97ad62e
Merge branch 'issue-760-scan-screen' into issue-753-first-map
danielrispler Nov 27, 2026
b1916a0
Studio map: editing the skeleton, Ignore, loose files, Merge and Spli…
danielrispler Nov 27, 2026
27fd906
Merge branch 'issue-761-skeleton-edits' into issue-753-first-map
danielrispler Nov 27, 2026
12fd813
Studio map: drafting on the server, the Map draft, writers, reviewers…
danielrispler Nov 27, 2026
6fd77bd
Merge branch 'issue-762-map-draft' into issue-753-first-map
danielrispler Nov 27, 2026
381486a
Studio map: the Map draft on the map, progress, review, edit, redraft…
danielrispler Nov 27, 2026
f7e74c6
Merge origin/main into issue-753-first-map
danielrispler Nov 27, 2026
d7a465e
Merge branch 'issue-763-draft-review' into issue-753-first-map
danielrispler Nov 27, 2026
ec9c3c8
Merge origin/main into issue-753-first-map
danielrispler Nov 27, 2026
5972eae
Studio map: Accept writes system-map.json to the checkout (#764)
danielrispler Nov 27, 2026
f3cef26
Merge remote-tracking branch 'origin/issue-753-first-map' into issue-…
danielrispler Nov 27, 2026
51fa1f2
Merge issue-764-accept-write into issue-753-first-map
danielrispler Nov 27, 2026
9179325
Studio map: Accept opens a draft PR, follows it, and recovers when it…
danielrispler Nov 27, 2026
ba08a6e
Merge issue-765-draft-pr into issue-753-first-map
danielrispler Nov 27, 2026
51a3b09
Studio map: Keep it current card with the agent line and an Actions w…
danielrispler Nov 27, 2026
8be7654
Merge issue-766-keep-current into issue-753-first-map
danielrispler Nov 27, 2026
cc6290e
README: Quick start names First map and links the map doc (#769)
danielrispler Nov 27, 2026
506c13b
Merge issue-769-readme into issue-753-first-map
danielrispler Nov 27, 2026
dfdb323
Studio map: every end of a run is told, and a verdict counts once (#7…
danielrispler Nov 27, 2026
e727296
Studio map: Open a draft PR pressed again finds its PR; a merged PR's…
danielrispler Nov 27, 2026
f1280bd
Studio map: a push's brief update is placed by the uncommitted map to…
danielrispler Nov 27, 2026
a96de23
Studio map: the review's standards items, and map check compared with…
danielrispler Nov 27, 2026
9d0e852
Merge remote-tracking branch 'origin/issue-753-first-map' into issue-…
danielrispler Nov 27, 2026
bb3c28c
Studio map: a turn end's fetch no longer keeps the pending PR from be…
danielrispler Nov 27, 2026
7022b4b
Merge issue-753-review-fixes into issue-753-first-map
danielrispler Nov 27, 2026
0c7e0f6
Studio map: the outside review's four findings (#753)
danielrispler Nov 27, 2026
3194475
Studio map: the scan lists every tracked file no part owns as loose, …
danielrispler Nov 28, 2026
8064e74
Merge issue-753-loose-nonco into issue-753-first-map
danielrispler Nov 28, 2026
9dfc3d2
Studio map: a loose row's Ignore leaves its folder out of the map, an…
danielrispler Nov 28, 2026
5cd2f04
Merge origin/main into issue-753-first-map
danielrispler Nov 28, 2026
88c63ee
Merge issue-753-loose-ignore into issue-753-first-map
danielrispler Nov 28, 2026
21bbd93
Merge remote-tracking branch 'origin/main' into issue-753-first-map
danielrispler Nov 28, 2026
bbdf5d9
Merge origin/main into issue-753-first-map [skip ci]
danielrispler Nov 28, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ macOS (Apple Silicon and Intel) and Linux (x86_64 and arm64, a desktop as the ta

Summaries default to `claude -p` (`claude` on your login shell's `PATH`); Settings picks another CLI or API-key writer.

A git repository with no map opens on **First map**: a free scan, then **Draft the map** with Claude Code, then **Accept** writes `system-map.json` or opens a draft PR ([how it works](docs/studio/behaviour/map.md#the-map-draft-on-the-map)).

- **Daily use:** `npm i -g plotkeeper && plotkeeper` (avoids ~70 s offline `npx` wait; or `npx --prefer-offline plotkeeper`).
- **CLI:** `plotkeeper install` (`--yes` for scripts), `plotkeeper uninstall` (undoes wiring, keeps history; [details](docs/studio/plugin.md)), `plotkeeper --version`.
- **From source** (Rust): `git clone ... && npm ci && npm start`.
Expand Down
2 changes: 1 addition & 1 deletion core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub use qwen::CAPABILITIES as QWEN_CAPABILITIES;
pub use session::{
Agent, Answer, BlockedCommand, BlockedStatus, Decision, Identity, Kind, Parent, Prompt,
Question, Sender, Session, SinceSeen, Source, Span, State, Status, Step, Stopped, Subagent,
Turn,
Turn, project_of,
};
pub use studio::{BranchQuery, Selection, Studio, TaskFacts, TaskQuery};
pub use transcript::{Context, LogEntry, SubagentLog, SubagentLogFile, Transcript};
Expand Down
5 changes: 3 additions & 2 deletions core/src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,9 @@ impl Identity {
}

/// The project a folder whose root is `root` belongs to (spec #659): a task's worktree
/// `<main>/.claude/worktrees/<task>` belongs to `<main>`, any other root to itself.
pub(crate) fn project_of(root: &str) -> &str {
/// `<main>/.claude/worktrees/<task>` belongs to `<main>`, any other root to itself. The server's start-up registration
/// maps the folder plotkeeper started in through it too (spec #753, "Projects").
pub fn project_of(root: &str) -> &str {
const MARK: &str = "/.claude/worktrees/";
match root.rfind(MARK) {
Some(at) if at > 0 && root.len() > at + MARK.len() => &root[..at],
Expand Down
6 changes: 6 additions & 0 deletions docs/studio/CONTEXT.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,12 @@ _Avoid_: Command menu, help
**Draft**:
What Daniel has typed into a session's prompt and not sent yet, as the studio follows his keys. The studio types into a terminal only once he has no draft there and has stopped typing for 3 seconds.

**First map**:
plotkeeper drafting a repository's first system map: a free scan, a few questions, then agents that name and describe the parts, a reviewer, and Daniel's accept (spec #753).

**Map draft**:
First map's output before it is accepted: kept by plotkeeper, never in the repository; accepting it writes the map, discarding it leaves nothing.

**Presence file**:
The empty file `present` in the studio's data folder, kept while the window is focused, so Claude Code's Remote Control skips a phone push Daniel would see on screen. Blur, quit and the app's start delete it, and the terminal daemon deletes it when the app's connection drops, unless it dropped the app for falling behind.

Expand Down
39 changes: 31 additions & 8 deletions docs/studio/behaviour/background-runs.md

Large diffs are not rendered by default.

77 changes: 75 additions & 2 deletions docs/studio/behaviour/map.md

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions docs/studio/behaviour/plotkeeper.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
## The page and its address

- It listens on 127.0.0.1 only, on port 47800, or the next free port after it.
- Each start has a random token. The browser opens `http://127.0.0.1:<port>/?token=<token>`; the server answers with a cookie (`plotkeeper`, HttpOnly, SameSite=Strict) and sends the browser on to `/`, so the token leaves the address bar. Every other request needs the cookie.
- Each start has a random token. The browser opens `http://127.0.0.1:<port>/?token=<token>`; the server answers with a cookie (`plotkeeper`, HttpOnly, SameSite=Strict) and sends the browser on to `/`, so the token leaves the address bar. Every other request needs the cookie. A start in a git repository adds `#project=<path>` to the address, its project's main checkout percent-encoded; the fragment never reaches the server and outlives the redirect, and the page opens on that project's map when the saved list holds it, then drops the fragment from the address, so a reload opens on the last viewed project (#756).
- A request whose Host is not `127.0.0.1:<port>` or `localhost:<port>`, or whose Origin, when it has one, is not one of those, is refused with 403, as is a request with no cookie or a wrong token.
- The page is the built `dist/`, embedded in the program when it is built (a build without `dist/` serves nothing).
- The map is the page's main content, under a heading read only by assistive tech. The page's first Tab shows a "Skip to the map" link at the top bar's start; Enter on it moves focus past the session list into the map (#461).
Expand All @@ -22,7 +22,7 @@

## One plotkeeper per data folder

The first start holds a lock on `plotkeeper.lock` in the data folder and writes its port, token and version to `plotkeeper.running.json` there (mode 0600). A second start finds the lock held, opens the browser on the first one's address and exits. When the first one's version differs from its own, it first prints "plotkeeper <old> is still running; stop it (Ctrl+C) and run again to use <new>" (#439); it never stops the first one, whose background runs go on. A running file from before #439, with no version, opens the page with no notice. After it takes the lock and refreshes the hook copies, the first start asks in the terminal before it wires the harnesses it finds with no answer yet, and serves whatever the answer; with no terminal it asks nothing, wires nothing and prints `plotkeeper install --yes` (#434, [plugin.md](../plugin.md)). Its summary, question and wiring lines go to stderr, so stdout's first line is the page's address. A second start while the first is still starting, or waiting on its question, finds no address within 2 seconds and exits saying so. A second start never asks. While no harness is wired, because the user declined or the start had no terminal, the Map view's head, which shows with or without a session open, says "Not recording: no agent is wired. Run `plotkeeper install` in a terminal to wire them." (#437). The page asks the server (`wired`, read afresh from install's record each time) when it opens and at each focus, so the line goes once `plotkeeper install` wires a harness, with no restart of the page or the server; it has no Dismiss. Ctrl+C (or SIGTERM) stops the server, removes that file and frees the lock; the stores write by temp file and rename, so a stop never leaves one half written.
The first start holds a lock on `plotkeeper.lock` in the data folder and writes its port, token and version to `plotkeeper.running.json` there (mode 0600). A second start finds the lock held, opens the browser on the first one's address and exits. Started in a git repository, it first sends its folder to the first one's `register_folder` command, with the token from the running file as the page's cookie, so the first one adds its project to the saved list and sends the page the new list; the address it opens names that project. A failed call is said on stderr and the page opens anyway, on the last viewed project (#756, [sessions](sessions.md)). When the first one's version differs from its own, it first prints "plotkeeper <old> is still running; stop it (Ctrl+C) and run again to use <new>" (#439); it never stops the first one, whose background runs go on. A running file from before #439, with no version, opens the page with no notice. After it takes the lock and refreshes the hook copies, the first start asks in the terminal before it wires the harnesses it finds with no answer yet, and serves whatever the answer; with no terminal it asks nothing, wires nothing and prints `plotkeeper install --yes` (#434, [plugin.md](../plugin.md)). Its summary, question and wiring lines go to stderr, so stdout's first line is the page's address. A second start while the first is still starting, or waiting on its question, finds no address within 2 seconds and exits saying so. A second start never asks. While no harness is wired, because the user declined or the start had no terminal, the Map view's head, which shows with or without a session open, says "Not recording: no agent is wired. Run `plotkeeper install` in a terminal to wire them." (#437). The page asks the server (`wired`, read afresh from install's record each time) when it opens and at each focus, so the line goes once `plotkeeper install` wires a harness, with no restart of the page or the server; it has no Dismiss. Ctrl+C (or SIGTERM) stops the server, removes that file and frees the lock; the stores write by temp file and rename, so a stop never leaves one half written.

At start it applies the writer `settings.json` names (`summaries.writer`, `claude` by default), so summaries are written with it before any page opens. A start asks `gh` about the PRs of the sessions' repositories once and writes the PR briefs of at most 3 ready PRs whose head moved within the catch-up window (`briefBackfill.hours`, 2 by default; the older `catchUp.hours` is still read), the newest first, always with `claude -p`; any other ready PR is written when its brief is opened (see [PR briefs](pr-briefs.md)). The writer's failures reach the page as `writer-notice`; see [cards](cards.md).

Expand Down
2 changes: 1 addition & 1 deletion docs/studio/behaviour/pr-briefs.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ The project header's quiet dot, the rail's row, the session row's brief mark and
`write_pr_brief` is the one call into the writer (`understanding/src/pr_brief.rs`). The model is `prBriefs.model` in `settings.json` ([settings](../settings.md)), Opus by default, read on each write, and serves the writer, the claim check and the retry alike; the effort, `prBriefs.effort`, serves the writer and the retry only, low by default; the claim check always runs at `claude`'s own effort, so a faster writer never comes with a laxer checker (#450, [Measured](#measured-450)). Briefs are always written with `claude -p`, whatever `summaries.writer` says. The writer is sandboxed with no tools: everything it reads is in the facts, which `build_facts` assembles from `gh` (`fetch_meta`) and `git` (`gather`):

- The PR's title and body, the spec or ticket it closes (the lowest-numbered of them, trimmed to the sections the writer needs), its checks' conclusions. `fetch_meta` also keeps every issue the PR closes (`closing`), which pre-flight matches through, with each one's parent ([the system map](map.md), "Pre-flight"). The closing issues are noted as the brief is written, so a pre-flight's "You expected …" line reaches only the briefs written after that pre-flight was made; a brief stored before it carries none.
- The map at the PR's head (or as of its birth for an older PR), the map's diff, and the parts the diff touches with their tier (Daniel's tier overrides the map's), laws, the tagged tests that back each law and whether this PR changed one, and the flows through them.
- The map at the PR's head (or as of its birth for an older PR), the map's diff, and the parts the diff touches with their tier (Daniel's tier overrides the map's), laws, the tagged tests that back each law and whether this PR changed one, and the flows through them. A repository that never committed a map still gets a brief: the server passes in the map it read from the main checkout or from the accepted map waiting on its draft PR ([the map's source](map.md)), and that map places the parts and decides the chapters. The brief has no map-diff chapter, and its map note says "the map is not in the repository yet". A push's update of the brief (whether it fogs nothing, and the Since you read brief) is placed by that map too.
- **Shape**, decided by code: a touched part fogs when its tier is Core, or Interface-only and named in the map diff. Up to two fogging parts is a **single story**; more is **chapters by behaviour** (2 to 4, each one behaviour lighting every part it crosses), with an overview when a flow changed. SHAPE also names the map's Core parts under Daniel's tiers, the ones a chapter's gist depends on.
- The diff, hunk by hunk inside a 64 KiB budget (`BUDGET`): the logic files of the parts that must be lit first, then other parts' logic, then tests, then the rest, smaller files first within each. What was cut goes into a "DIFF NOT SENT" note, and the budget record says how much was sent and cut. The stored brief keeps its `partial_facts` (#488): the cut and partial files with the bytes sent and cut, the claim check's error, and the diff's source languages no extractor of the map reads. The reader shows them as one "Partial facts · N" chip (#491), one line per missing input; a brief stored before them, or a part catch-up, has only its `partial` flag and says "The diff was cut" without the list.

Expand Down
2 changes: 1 addition & 1 deletion docs/studio/behaviour/sessions.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ A session with blocked commands waiting shows "N blocked commands waiting" ("1 b

### Projects

plotkeeper keeps its own list of projects, `projects.json` in the data folder (`server/src/projects.rs`, #381). A repository joins it the first time a session is seen in it, as the session's project, unless it is temporary. It stays after its sessions end or are deleted, and leaves only through Remove project, in the "⋯" menu of a project header with no live session (a project with live sessions would join again at their next event). That menu opens under its button, its end edge at the button's, and flips over the button or to its other side at the window's edges, placed by CSS through the popover's implicit anchor as the rail's "⋯" menu is (#458); a removed project comes back only when a session is active in it after the removal. The list's groups are read from it: every saved project has a header even with no live session, as its header only, after the projects with sessions, in the order they joined, except a gone or temporary one, which has a header only while it has a live session (a session Clear landed hid counts). **A project's header has two controls** (spec #659, #674). Its chevron, before the name and shown only while the group has live sessions, folds and unfolds the group: it is named "Sessions of <project>", carries `aria-expanded` as the subagent chevrons do, and its hint reads "Fold or unfold its sessions"; the fold is kept across updates. Its name always shows that project's map, the shown project's included (a session's panel of another project closes, as before); it has no `aria-expanded`, and its hint keeps the project's path and says "Show its map". A saved project with no live session shows no chevron. The snap `projectChevron` checks it, and the a11y pass checks its name. A saved project whose folder was moved or deleted is gone: the list hides it while it has no live session, and with one its header's name is struck through; the server still lists it, so its header comes back on its own when its folder exists again. In the Map view, opened on it as the last viewed project or from a live session's header, it shows "This folder is gone", its path and Remove project where its map would be, never an error, and nothing reads its map.
plotkeeper keeps its own list of projects, `projects.json` in the data folder (`server/src/projects.rs`, #381). A repository joins it the first time a session is seen in it, as the session's project, unless it is temporary. **Start-up registration** (spec #753, "Projects", #756): `plotkeeper` started in a folder inside a git repository also adds that folder's project, with no session: its git top level, by the lookup sessions use, and for a task's worktree `<main>/.claude/worktrees/<task>` its main checkout `<main>`; any other worktree is its own project, as for sessions. A folder in no git repository adds nothing, and a temporary one is not saved. A removed project comes back, as starting plotkeeper in it asks for it. A first start adds it in process; a second sends its folder to the running server ([Starting plotkeeper](plotkeeper.md)). Either way the page it opens shows that project's map, not the last viewed one. It stays after its sessions end or are deleted, and leaves only through Remove project, in the "⋯" menu of a project header with no live session (a project with live sessions would join again at their next event). That menu opens under its button, its end edge at the button's, and flips over the button or to its other side at the window's edges, placed by CSS through the popover's implicit anchor as the rail's "⋯" menu is (#458); a removed project comes back only when a session is active in it after the removal. The list's groups are read from it: every saved project has a header even with no live session, as its header only, after the projects with sessions, in the order they joined, except a gone or temporary one, which has a header only while it has a live session (a session Clear landed hid counts). **A project's header has two controls** (spec #659, #674). Its chevron, before the name and shown only while the group has live sessions, folds and unfolds the group: it is named "Sessions of <project>", carries `aria-expanded` as the subagent chevrons do, and its hint reads "Fold or unfold its sessions"; the fold is kept across updates. Its name always shows that project's map, the shown project's included (a session's panel of another project closes, as before); it has no `aria-expanded`, and its hint keeps the project's path and says "Show its map". A saved project with no live session shows no chevron. The snap `projectChevron` checks it, and the a11y pass checks its name. A saved project whose folder was moved or deleted is gone: the list hides it while it has no live session, and with one its header's name is struck through; the server still lists it, so its header comes back on its own when its folder exists again. In the Map view, opened on it as the last viewed project or from a live session's header, it shows "This folder is gone", its path and Remove project where its map would be, never an error, and nothing reads its map.

**Temporary folders** (spec #659): a folder under `/tmp`, `/private/tmp`, `/var/folders` or `/private/var/folders` (macOS's per-user temporary folder lives under the last two) is temporary, so scratchpads and trial repos never pile up. The server never saves a new one, and lists one an earlier build saved marked temporary, as it marks gone ones; `projects.json` is not rewritten for it, so it too leaves only through Remove project. A live session in a temporary folder is still listed, under its folder's header, until it ends.

Expand Down
Loading