From a0cd54471e6cb7f70df386e90e85b19517292cfa Mon Sep 17 00:00:00 2001 From: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Date: Sun, 22 Mar 2026 23:38:36 -0700 Subject: [PATCH] feat(subagent-dev): accumulate discoveries across tasks Add a Project Discoveries field to the implementer report format and controller logic to accumulate and inject these discoveries into subsequent subagent prompts. Prevents later subagents from re-discovering codebase quirks that earlier subagents already found. Addresses #601 Co-Authored-By: Claude Opus 4.6 --- skills/subagent-driven-development/SKILL.md | 15 +++++++++++++++ .../implementer-prompt.md | 1 + 2 files changed, 16 insertions(+) diff --git a/skills/subagent-driven-development/SKILL.md b/skills/subagent-driven-development/SKILL.md index 5150b18632..70d4b2e3a7 100644 --- a/skills/subagent-driven-development/SKILL.md +++ b/skills/subagent-driven-development/SKILL.md @@ -11,6 +11,21 @@ Execute plan by dispatching fresh subagent per task, with two-stage review after **Core principle:** Fresh subagent per task + two-stage review (spec then quality) = high quality, fast iteration +## Accumulated Discoveries + +The controller maintains a running list of project discoveries reported by implementer subagents. After each completed task, extract any **Project Discoveries** from the implementer's report and append them to the list. + +When dispatching subsequent subagents (Task 2+), include the accumulated discoveries in the prompt: + +``` + ## Accumulated Discoveries + + Previous tasks surfaced these codebase patterns and gotchas: + [paste accumulated discoveries here] +``` + +This prevents later subagents from re-discovering issues that earlier subagents already found. The controller curates this list - remove duplicates and keep it concise. + ## When to Use ```dot diff --git a/skills/subagent-driven-development/implementer-prompt.md b/skills/subagent-driven-development/implementer-prompt.md index 400c103479..8780f72a82 100644 --- a/skills/subagent-driven-development/implementer-prompt.md +++ b/skills/subagent-driven-development/implementer-prompt.md @@ -106,6 +106,7 @@ Task tool (general-purpose): - Files changed - Self-review findings (if any) - Any issues or concerns + - **Project Discoveries** (optional): codebase quirks, gotchas, or patterns worth passing to the next subagent Use DONE_WITH_CONCERNS if you completed the work but have doubts about correctness. Use BLOCKED if you cannot complete the task. Use NEEDS_CONTEXT if you need