feat(agents): stacked-PR notice in system_prompt_template #473
No reviewers
Labels
No labels
area:agents
area:dashboard
area:database
area:design
area:design-review
area:flows
area:infra
area:meta
area:security
area:sessions
area:webhook
area:workdir
security
type:bug
type:chore
type:meta
type:user-story
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
charles/claude-hooks!473
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "boss/464"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Append a
${if:parent_pr}…${endif}block to every per-typesystem_prompt_templateso a stacked dispatch (#462) tells the agent its base branch is the parent PR — notmain— and that an unexpectedsynchronizedevent is the rebase cascade, not a misroute.interpolatePromptTemplategains the new conditional syntax; pruning runs before the regular${var}pass so the unstacked path leaks no fragment.Closes #464
Test plan
bun x turbo run typecheckclean (4 packages)bun x @biomejs/biome@^2 check ./format .clean (only pre-existing infos inworkdir.test.ts)bun test— 2193 pass, 0 fail across the workspacebuildPrompt-level "stacked notice on / off" with the AC wording verbatimExtend `interpolatePromptTemplate` with a `${if:NAME}…${endif}` conditional block so the per-type templates can carry text that's only rendered when the matching variable is set. Append the stacked-PR notice — "Your work is stacked on PR #N. Your base branch is `pr/N`, not `main`. … your PR will be automatically rebased — do not panic if you see an unexpected `synchronized` event." — to every per-type `system_prompt_template` in `config/agents.json` so a stacked dispatch (#462) reads the heads-up before its task body, and an unstacked dispatch sees no fragment at all. Closes #464 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>Conditional interpolation logic, two-pass ordering, and all 6 per-type templates are correct. AC wording matches issue #464 verbatim. Tests cover set/unset paths, orphan-leak prevention, multi-block independence, and every shipped template via the live
agents.jsonread. CI green.