feat(auto-pm): fan [Spike & plan] out to the concurrency, one PENDING-locked ticket per agent (#1327) - #1364
Merged
Merged
Conversation
…-locked ticket per agent (#1327) The rotation's spike job now fans out like draining does: the sweep asks for the open tickets with no sibling at all, locks a batch of them by pre-creating each ticket's .spike.md/.plan.md as PENDING:<AGENT_ID> placeholders — one pathspec-scoped commit, pushed by the daemon since cloud agents cannot push (#1320) — and starts one pinned agent per locked ticket. A stale lock (still a placeholder, older than 60 min, no open PR touching it) is released before enumeration, so a dead agent cannot brick its ticket. Lock failure falls back to the stock single unpinned agent, the pre-#1327 behaviour. The readers learn what a placeholder is: a PENDING sibling reads as locked, not spiked/planned, so the dashboard does not claim work that has not happened, and a lock placeholder plan promotes no quick-win. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
suleimansh
marked this pull request as ready for review
July 29, 2026 01:21
Member
Author
|
@brillout This PR also touch the spike_and_plan.md |
brillout
reviewed
Jul 29, 2026
| @@ -1,5 +1,7 @@ | |||
| Spike & plan every ticket that has no spike or plan yet, most important first. | |||
|
|
|||
| A `.spike.md` or `.plan.md` that already exists counts even when it only reads `PENDING:<agent>` — that placeholder is another agent's claim on the ticket, so leave both files alone and skip the ticket. | |||
Member
|
Couple of smells:
Does this PR introduce AI slop (I think yes) and how much? Let's further gauge and keep on the radar how much AI slop the code has (helps us take the right decisions). |
Member
Author
|
Both code smells fixed in #1394 |
suleimansh
added a commit
that referenced
this pull request
Jul 30, 2026
… -> 6h (#1364 review) (#1394) The lock commit pushed HEAD:<current branch>, publishing whatever branch the daemon's checkout was on and leaving main-forked machines blind to the locks. It now pushes to origin's default branch, and only when the checkout is on it — HEAD:main from a feature branch would carry foreign commits onto main. Skips are logged. SPIKE_LOCK_STALE_MS becomes 6 hours: spiking and planning can take hours, and staleness release is recovery, ideally never needed. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Member
|
It makes me think that reading the That said, we can be less careful about AI slop for TF's experimental parts. |
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.
Closes nothing yet — the code half of #1327; the maintainer's Spike & plan prompt rewrite composes on top.
What this does
Clicking [Trigger routine now] with
Concurrent agents = N, the other routines unticked, and an empty queue now spins up N concurrent Spike & plan agents, one ticket each — the fan-out beat #1327 asks for.AutoPmJob.fansOut(declared on the spike job only) lets a rotation job batch like draining does (auto-pm.ts). Each agent gets apinnedSpikeJobprompt — the pin is appended to the stock preset so the maintainer's coming prompt rewrite can't silently lose it.spike-locks.ts): before agents start, the daemon pre-creates each ticket's.spike.md/.plan.mdasPENDING:<AGENT_ID>placeholders — one pathspec-scoped batch commit, pushed to the current branch. The daemon pushes, not the agents, per the Goal: fire 10Spike & planagents concurrently #1327 thread agreement (cloud sessions can't push, Web runs complete their work but cannot push: cloud container has no GitHub write access unless the account's Claude GitHub app covers the repo #1320). Push failure keeps the batch (the commit still guards local forks) and logs.gh, open PR).locked, notspiked/planned(dashboard/tickets.ts), contributes no effort, and a placeholder plan promotes no quick-win (fails closed inplanned-quick-wins.ts, now tested).Fallbacks
Missing seams, zero candidates, or a lock that claimed nothing all degrade to the exact pre-#1327 behaviour (one unpinned agent / rotation advance). No settings changes needed —
autoPmConcurrency(#1204) already exists and caps the batch.Tests
spike-locks.test.ts: acquire (batch commit, pathspec scope, push, lost-race skip, commit rollback, push-failure tolerance) and release (stale / young / open-PR / unreadable-PR / uncommitted / real-sibling cases).auto-pm.test.ts: fan-out to concurrency, partial locks, lock-failure fallback, seamless fallback, in-flight ticket pinning, rotation advance on nothing-to-spike, pinned-prompt shape, catalog flag.tickets.test.ts/planned-quick-wins.test.ts: PENDING placeholders read as locks and promote nothing.the-framework: 1630 pass · framework-dashboard: 653 pass.
🤖 Generated with Claude Code