BriefComposer sends the predecessor report twice when an enrich role name equals handoff.from #683

Closed
opened 2026-09-24 17:11:07 +00:00 by jared · 1 comment
Owner

Problem

brief_composer.rb compose builds { node:, instructions:, brief:, handoff: handoff_json }.merge(enriched_facts). handoff_json carries the immediate predecessor's content. An enrich entry that is a role name resolves through latest_handoff_content(from_agent_type:), which returns the same row on first entry. Two nodes always enter from the role they enrich: seam-designer enriches change-auditor (poodr-implementation.yaml:26, poodr-ticket-implementation.yaml:33) and test-writer enriches seam-designer (poodr-implementation.yaml:43, poodr-ticket-implementation.yaml:50). Role reports measure median 1,587 chars, max 8,497, so the duplicate can cost up to 8.5k of a 10,000-unit hook cap. The enrich entry is still needed on re-entry (for example test-reviewer fail routes back to test-writer, where handoff.from is test-reviewer).

Reproduce

n/a: design audit finding, not a runtime defect.

Approach

In BriefComposer#enriched_facts, skip a role-name entry whose resolved content equals handoff content (or whose name equals handoff.from). Keep the key with a marker like "same as handoff" so charters that name the fact still find it.

Required work:

  • Red test: compose with handoff.from == enriched role yields the content once.
  • Red test: compose with a different handoff.from yields both.
  • Composer change.

Evidence

#676 audit note from the seam-designer and test-writer rows plus the handoff-path check of brief_composer.rb:17-36.

Origin

  • Trigger: #676 enrich-fact audit, run in session 9434289b
  • Improvised this session: none
  • Chain: oversized or duplicated brief facts <- enrich lists chosen per node without a per-role byte audit <- DESIGN (map enrich model)
  • Root candidate: this ticket
  • Where: the map/charter/composer paths named in the draft
  • Parent: #676
  • Session: 9434289b-c48f-4a8a-8add-0d82068e2c3f
  • Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/9434289b-c48f-4a8a-8add-0d82068e2c3f.jsonl

Skeptic verdict: CREATE (os-backlog:ticket-skeptic, session 9434289b, citations verified).

## Problem brief_composer.rb `compose` builds `{ node:, instructions:, brief:, handoff: handoff_json }.merge(enriched_facts)`. handoff_json carries the immediate predecessor's content. An enrich entry that is a role name resolves through `latest_handoff_content(from_agent_type:)`, which returns the same row on first entry. Two nodes always enter from the role they enrich: seam-designer enriches change-auditor (poodr-implementation.yaml:26, poodr-ticket-implementation.yaml:33) and test-writer enriches seam-designer (poodr-implementation.yaml:43, poodr-ticket-implementation.yaml:50). Role reports measure median 1,587 chars, max 8,497, so the duplicate can cost up to 8.5k of a 10,000-unit hook cap. The enrich entry is still needed on re-entry (for example test-reviewer fail routes back to test-writer, where handoff.from is test-reviewer). ## Reproduce n/a: design audit finding, not a runtime defect. ## Approach In BriefComposer#enriched_facts, skip a role-name entry whose resolved content equals handoff content (or whose name equals handoff.from). Keep the key with a marker like `"same as handoff"` so charters that name the fact still find it. Required work: - [ ] Red test: compose with handoff.from == enriched role yields the content once. - [ ] Red test: compose with a different handoff.from yields both. - [ ] Composer change. ## Evidence #676 audit note from the seam-designer and test-writer rows plus the handoff-path check of brief_composer.rb:17-36. ## Origin - Trigger: #676 enrich-fact audit, run in session 9434289b - Improvised this session: none - Chain: oversized or duplicated brief facts <- enrich lists chosen per node without a per-role byte audit <- DESIGN (map enrich model) - Root candidate: this ticket - Where: the map/charter/composer paths named in the draft - Parent: #676 - Session: 9434289b-c48f-4a8a-8add-0d82068e2c3f - Transcript: /home/jared/.claude/projects/-home-jared-dev-cc-os/9434289b-c48f-4a8a-8add-0d82068e2c3f.jsonl Skeptic verdict: CREATE (os-backlog:ticket-skeptic, session 9434289b, citations verified).
Author
Owner

Resolution

Done: BriefComposer#enriched_facts sends the predecessor report once when handoff.from is an enriched role

Evidence: shipped in commit 70b0cfcf (#690) with tests

Follow-ups: none

## Resolution **Done:** BriefComposer#enriched_facts sends the predecessor report once when handoff.from is an enriched role **Evidence:** shipped in commit 70b0cfcf (#690) with tests **Follow-ups:** none
jared closed this issue 2026-09-24 20:10:11 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
jared/cc-os#683
No description provided.