You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The on-before-mergeable run (the follow-up fired after setReadyForMerge()) writes its output to a branch nobody merges:
* the-framework/surge-pricing-followup
22be1cf Record surge pricing decision and business knowledge <- DECISIONS.md + KNOWLEDGE-BASE.md
main: has neither file
So the #556 quality TODO entries and the #537 business-knowledge docs only exist on a stranded branch. The next run branches from main and cannot see them, which defeats #537: the knowledge docs only work if the next run can read them.
Why it happens
The follow-up is spawned as a plain framework prompt child (runOnBeforeMergeable -> spawnPromptRun). That child gets the full #326 system prompt, including the ### Session name step:
If the repository has uncommitted changes, create a commit
Create a <SESSION_NAME>
Create a new branch the-framework/<SESSION_NAME> and git checkout it
Call setSessionName(<SESSION_NAME>)
So before writing anything, the follow-up commits, branches, and checks out a new branch, then writes its output there. The step is correct for a session; the follow-up is not a session, it is a follow-up to one.
The fix
Skip the session-name step for this run so it stays on the session's current branch, where its output rides to review and merges with the work.
Two ways:
MVP (implemented): spawn the follow-up --vanilla. That drops the whole built-in System prompt #326 prompt, and with it the ### Session name step, so no new branch. The follow-up prompt is self-contained (it names the TODO file and the knowledge docs itself), and the always-on emit protocols stay. One flag.
Targeted (alternative): drop only the ## Before starting changes section, keeping the rest of the built-in prompt. More precise, a little more plumbing.
Scoped to the on-before-mergeable queueing run only. The maintainability/security preset runs are also follow-ups, but each is a separate focused refactor that arguably wants its own branch/PR, so they are left as they are.
One decision for review
Confirm the intended landing spot is the session's current branch (so the output merges with the work). Both #556 (TODO entries) and #537 (knowledge docs) read that way. The related setting idea (fire the follow-up eagerly on setReadyForMerge() vs only after the actual merge) is orthogonal: on the session branch, it lands correctly either way.
What we found
The on-before-mergeable run (the follow-up fired after
setReadyForMerge()) writes its output to a branch nobody merges:So the #556 quality TODO entries and the #537 business-knowledge docs only exist on a stranded branch. The next run branches from
mainand cannot see them, which defeats #537: the knowledge docs only work if the next run can read them.Why it happens
The follow-up is spawned as a plain
framework promptchild (runOnBeforeMergeable->spawnPromptRun). That child gets the full #326 system prompt, including the### Session namestep:So before writing anything, the follow-up commits, branches, and checks out a new branch, then writes its output there. The step is correct for a session; the follow-up is not a session, it is a follow-up to one.
The fix
Skip the session-name step for this run so it stays on the session's current branch, where its output rides to review and merges with the work.
Two ways:
--vanilla. That drops the whole built-in System prompt #326 prompt, and with it the### Session namestep, so no new branch. The follow-up prompt is self-contained (it names the TODO file and the knowledge docs itself), and the always-on emit protocols stay. One flag.## Before starting changessection, keeping the rest of the built-in prompt. More precise, a little more plumbing.Scoped to the on-before-mergeable queueing run only. The maintainability/security preset runs are also follow-ups, but each is a separate focused refactor that arguably wants its own branch/PR, so they are left as they are.
One decision for review
Confirm the intended landing spot is the session's current branch (so the output merges with the work). Both #556 (TODO entries) and #537 (knowledge docs) read that way. The related setting idea (fire the follow-up eagerly on
setReadyForMerge()vs only after the actual merge) is orthogonal: on the session branch, it lands correctly either way.