Repository navigation
Prototype uncertain passages inline before the first build (LIVE_SPIKES) - #454
Open
MaggieAppleton wants to merge 10 commits into
Open
MaggieAppleton wants to merge 10 commits into
MaggieAppleton wants to merge 10 commits into
Conversation
MaggieAppleton
force-pushed
the
living-spikes
branch
from
October 10, 2026 10:36
05048ec to
d6a24ef
Compare
MaggieAppleton
added this pull request to stack #455
October 10, 2026 11:10
MaggieAppleton
force-pushed
the
living-spikes
branch
from
October 10, 2026 11:31
d6a24ef to
d9af340
Compare
MaggieAppleton
force-pushed
the
living-spikes
branch
from
October 10, 2026 12:47
d9af340 to
1bf0a7e
Compare
MaggieAppleton
marked this pull request as ready for review
October 10, 2026 12:49
MaggieAppleton
force-pushed
the
living-spikes
branch
from
October 10, 2026 13:24
64fd0fa to
dab8f3b
Compare
MaggieAppleton
force-pushed
the
living-spikes
branch
from
October 10, 2026 13:52
dab8f3b to
ac08a10
Compare
MaggieAppleton
force-pushed
the
living-spikes
branch
2 times, most recently
from
October 10, 2026 15:26
e74839f to
7e06a78
Compare
MaggieAppleton
force-pushed
the
living-spikes
branch
from
October 10, 2026 17:04
7e06a78 to
3a3dc67
Compare
MaggieAppleton
force-pushed
the
living-spikes
branch
2 times, most recently
from
October 10, 2026 18:34
92ea8fd to
6ffad08
Compare
MaggieAppleton
force-pushed
the
living-spikes
branch
from
October 10, 2026 19:45
6ffad08 to
1338fe2
Compare
…build Behind LIVE_SPIKES=on (also on with LIVE_BUILD=on), a SpikeScout scans a document 20 seconds after a person's edit settles, only while it has no live build. It judges at most five unseen prose blocks per scan with one Jev noul each (>= 0.6; explicit-uncertainty matching when Jev is absent or fails) and keeps at most three spikes active. A hit becomes an investigation marked as a spike, attributed to the last editor and authorized on that person's live repository connection; with no connection nothing is created. A "Prototyping…" Callout is placed directly under the passage after the record persists, and is rewritten in place when the spike completes or stops. Removing the callout dismisses the spike, and a passage whose digest has a spike never re-triggers. Spike runs get run-scoped upload_investigation_image and submit_spike_result tools; the server builds the report from the headline, findings, recommendation and uploaded images. Spikes stay out of the investigation list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A claimed spike checks out chopin/spike-<id> in the disposable worktree, gets a prompt to build the smallest prototype, upload screenshots and report with submit_spike_result, and relays the server's run-scoped tool list through the stdio bridge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Scope image uploads to spike runs with a three-image cap and a per-run citation check, and raise the connector body limit only for that tool. Make LIVE_SPIKES independent of LIVE_BUILD. Persist a placing state before a callout is published and recover in place. Stage callouts with copied, rebased decision and comment anchors. Keep human edits inside a callout by placing new state in a sibling. Leave passages unjudged when Jev fails, keep approved over-capacity passages for later scans, and dismiss deleted callouts after a living build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Spike runs get a connector-local upload_image_file that reads a PNG, JPEG or WebP from the run worktree and forwards it, so agents no longer emit base64 and the prompt asks for 1280x800 Playwright screenshots. Callouts read Queued until their run is claimed, and runs dispatch in creation order. A scan that leaves passages unjudged follows up in five seconds, passages already above a spike callout are skipped, and deleting a callout stops its spike on the edit rather than the next scan. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…y frees Copilot CLI in ACP mode rejects client-provided stdio MCP servers, so every spike failed without a result. A spike run whose agent accepts HTTP servers now gets a per-run streamable-HTTP bridge on 127.0.0.1, guarded by a random bearer token and closed with the run, that relays the run's Chopin tools and adds upload_image_file. Agents without HTTP support keep the stdio bridge. A scan that stopped at the active-spike cap never judged the waiting passages until another edit. It now resumes when a spike record changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
MaggieAppleton
force-pushed
the
living-spikes
branch
from
October 10, 2026 20:11
1338fe2 to
0b7f0bb
Compare
…d lock Concurrent upload_investigation_image calls in one run now share one per-run set and reserve their slot before awaiting storage, so neither overwrites the other and the three-image cap holds. A spike placement deferred while a first build locks editing is retried when the lock releases and when the room opens unlocked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A crashed connector left its lock behind and blocked every later start until someone removed the file. A lock naming a process that no longer exists is now stale and replaced; a live or unreadable lock still refuses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A queued first build already holds the editing lock, so a spike that finished while the build waited had its callout deferred until after the build. The spike refresh may now update its callout under a build that is only queued, rebinding the build and its approved graph to the callout-only revision in the same commit, and the build claim waits (bounded) for those results to land. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
While a document is being written, Jev notices passages that a quick prototype would de-risk. The editing person's connected coding agent builds it on a throwaway
chopin/spike-<id>branch with no permission prompt. A Callout under the passage shows "Prototyping…", then findings, a recommendation and screenshots. Deleting the callout dismisses the spike.Behind
LIVE_SPIKES=on.What changed
SpikeScoutwatches a document after edits settle (20s) and asks Jev which passages are worth prototyping, bounded per document and per pass.spikeSchemain@chopin/experiment) own placement and dismissal state; the Callout is only a projection.spike-placement.ts) inserts and rewrites the Callout in place under the passage.spike-host.ts) runs each spike as an investigation on the editing person's connector.apps/connector) checks outchopin/spike-<id>for spike runs and uses a spike-specific prompt; it never pushes.upload_investigation_image(at most 3 per run) andsubmit_spike_result.LIVE_SPIKESconfig flag, startup description, and the e2e Jev fixture.Flow
sequenceDiagram participant E as Editor participant S as SpikeScout participant J as Jev participant H as Server (investigation) participant C as Connector coding agent E->>S: Edit settles (20s) S->>J: Per passage (bounded) J-->>S: Passage worth prototyping S->>H: Investigation on editor's connection H->>C: Spike run on chopin/spike-id C->>H: upload_investigation_image (up to 3) C->>H: submit_spike_result H->>H: Persist spike record and document H-->>E: Callout rewritten in placePersistence precedes publication: the spike record and document commit before the callout is broadcast.
Safety notes
Screenshots
Testing
On 10 Oct I ran this end to end on github.com/MaggieAppleton/margin with a Copilot coding agent (
copilot --acp --allow-all):Follow-up fixes from that run, now in this branch:
upload_image_file, follow-up scans beyond 5 passages, Queued state in creation order, no re-spike of a passage that already has a callout, and immediate cancel on callout deletion.upload_image_file, and a scan stopped at the 3-spike cap resumes when a spike finishes, fails or is dismissed. Connector test covers the HTTP bridge, its token check and the worktree path guard.upload_investigation_imagecalls in one run no longer overwrite each other's upload record (3-image cap holds under concurrency), and a spike result deferred by a first build's lock now lands when the lock releases or the room reopens. Unit tests inroutes.test.tsandspike-host.test.ts. A connector workspace lock whose process has exited is now replaced instead of blocking startup (workspace.test.ts).Verified end to end (second run, 10 Oct) with
copilot --acp --allow-allon github.com/MaggieAppleton/margin:spike-host.test.ts(queued build: result lands, thenclaimImplementationstarts) andtasks/routes.test.ts(claim waits for results first). Server and webbun test,bun run types,bun run buildandbun run cipass.Stack note
Stacked on #453, which is stacked on #452, #451 and #450. Base is
living-build-ui. Merge rebase-only, after the lower PRs land.🤖 Generated with Claude Code