Skip to content

feat(subagent-dev): accumulate discoveries across tasks#887

Open
mvanhorn wants to merge 1 commit intoobra:mainfrom
mvanhorn:osc/601-accumulate-discoveries-sdd
Open

feat(subagent-dev): accumulate discoveries across tasks#887
mvanhorn wants to merge 1 commit intoobra:mainfrom
mvanhorn:osc/601-accumulate-discoveries-sdd

Conversation

@mvanhorn
Copy link
Copy Markdown
Contributor

What problem are you trying to solve?

When using subagent-driven-development, each subagent starts completely fresh. Knowledge discovered during one task is invisible to the next. Real example from #601: Task 9 discovered that Drizzle ORM wraps PostgresError inside DrizzleQueryError (check error.cause). Task 10 hit the same issue independently, debugged it from scratch, and fixed it again. Wasted tokens and time.

Two independent users confirmed this in #601. @Koroqe built a file-based workaround in their own project to fix it.

What does this PR change?

Adds a Project Discoveries field to the implementer report format and controller logic to accumulate and inject those discoveries into subsequent subagent prompts. 16 lines across 2 files.

Is this change appropriate for the core library?

Yes. This affects the SDD controller-subagent coordination pattern, which is core infrastructure. It follows the existing "controller curates context for subagents" architecture. No new concepts, no new files, no domain-specific behavior.

What alternatives did you consider?

  1. File-based persistence (like @Koroqe's workaround): Have subagents write discoveries to a file and later subagents read it. Rejected because it adds filesystem state and breaks the controller-curates-context pattern. The controller already constructs prompts - this extends that.
  2. Full project briefing system (test commands, patterns, imports): More comprehensive but larger scope. This can be a follow-up if discoveries prove useful.

Does this PR contain multiple unrelated changes?

No. Both changes serve the same purpose: one adds the report field, the other adds the accumulation and injection logic.

Existing PRs

Environment tested

Harness Harness version Model Model version/ID
Claude Code 2.1+ Claude claude-opus-4-6

Evaluation

The initial prompt was reviewing #601 and proposing a minimal implementation. This is a Markdown instruction change, so evaluation is structural: verified frontmatter parses correctly, template fences are balanced, report format includes the new field, and the new SKILL.md section follows existing voice and structure. The change is small enough that its correctness is verifiable by reading the 16-line diff.

Rigor

  • If this is a skills change: I used superpowers:writing-skills and completed adversarial pressure testing (paste results below)
  • This change was tested adversarially, not just on the happy path
  • I did not modify carefully-tuned content (Red Flags table, rationalizations, "human partner" language) without extensive evals showing the change is an improvement

No carefully-tuned content was modified. The change adds a new section and a new report field. Adversarial check: the Project Discoveries field is marked optional so subagents that have nothing to report skip it without friction.

Verification

Frontmatter valid: name=subagent-driven-development
Template well-formed: 2 backtick fences (balanced)
Report format includes all fields including new Project Discoveries
New section "Accumulated Discoveries" found at line 14 and 21 of SKILL.md

Human review

  • A human has reviewed the COMPLETE proposed diff before submission

Addresses #601.

This contribution was developed with AI assistance (Claude Code).

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 obra#601

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

claude-code Claude Code (Anthropic CLI) issues enhancement New feature or request subagents Subagent-driven development and dispatch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants