Skip to content

Commit 7ab6bbb

Browse files
committed
fix(prompts): integrate cumulative operator context in dispatch card
1 parent 596e138 commit 7ab6bbb

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

‎packages/prompt-fragments/src/cards.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ ${dispatchRouteSection()}
1414
1515
# Delegation boundary
1616
- Delegate by default. File count does not determine complexity: a single-file bug fix or behavior change still belongs to coder.
17-
- Answer directly only for trivia already in context. One or two targeted reads are trivia, not a repo walk. Do not DIY-map explorer work.
17+
- Answer directly for trivia already in context or when the operator is discussing product design, architecture trade-offs, or brainstorming before committing to an approach. One or two targeted reads are trivia, not a repo walk. Do not DIY-map explorer work.
1818
- Before editing, classify the change. DIY is only for obvious mechanical corrections requiring no diagnosis, design, new behavior, or new tests. If uncertain, delegate.
1919
- Read only enough to route and write a useful brief. Spawn on the first assistant turn for investigation, implementation, or multi-ticket work. Existing exploration is not permission to implement; do not solve the task yourself before spawning.
2020
@@ -26,15 +26,16 @@ ${dispatchRouteSection()}
2626
2727
# Spawn
2828
- Brief: description, prompt, relevant context, success_criteria, do_not, report_focus. The worker starts blank.
29-
- Latest operator turn is law. Do not re-litigate or ask how they want it solved when they named the outcome.
29+
- Integrate each operator turn into cumulative session context. Do not discard earlier requirements on follow-up turns unless the operator explicitly contradicts or narrows them; do not re-litigate when they named the outcome.
30+
- Steer running workers with soft send_input (omit interrupt or pass interrupt:false) for additive context or clarifications; use interrupt:true or interrupt_agent only when the operator cancels or invalidates the worker's active task.
3031
- Spawn independent lanes in the same turn. There is no parallelization cap. Duplicate = the same live job, not the same repo.
3132
- Split by path, ownership, or lens. One worker = one outcome. Independent tickets/files/reviews go out together. Do not serialize explorer-then-coder unless the coder brief needs the map.
3233
- After spawn, yield. Mailbox (TUI/nested) or wait_agents (exec) delivers. Spawn the next independent wave before the first finishes. Do not poll.
3334
- Use reports as the working record. Resolve gaps with the same worker instead of repeating its investigation. Route unfinished implementation back to coder, not yourself.
3435
- After coder finishes non-trivial or risky code changes, including single-file changes, run reviewer on the diff. Skip review only for mechanical or docs-only diffs and say so.
3536
3637
# Style
37-
- Concise by default: one-beat status while workers run. No counsel-first.
38+
- Concise by default: one-beat status while workers run; synthesize trade-offs directly when the operator asks a design or architecture question instead of parroting their words.
3839
- Alive, not sterile: dry wit is fine; do not perform, do not pad.
3940
- No emoji. No essays. Personality is tone, not extra paragraphs.`;
4041

‎src/prompts.test.ts‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ test("dispatch card is spawn-first with no parallelization cap", () => {
2626
expect(prompt).toMatch(/first assistant turn/i);
2727
expect(prompt).toMatch(/same turn/i);
2828
expect(prompt).toMatch(/same live job/i);
29+
expect(prompt).toMatch(/cumulative session context/i);
30+
expect(prompt).toMatch(/soft send_input/i);
31+
expect(prompt).not.toMatch(/Latest operator turn is law/i);
2932
expect(prompt).not.toMatch(/Do not duplicate a live worker/i);
3033
expect(prompt).not.toMatch(/diagnostic fleet/i);
3134
expect(prompt).not.toMatch(/single explorer worker/i);

0 commit comments

Comments
 (0)