Delete inert report.requiredSections from director packages - #588
Merged
TheGreatAxios merged 1 commit intoAug 24, 2026
Conversation
Every director declared report.requiredSections, but nothing read it except its own definition sites and a test assertion checking it matched a hardcoded list. It never drove hasReportEnvelope() (which independently hardcodes the four headings in report.ts) and was never rendered into any prompt — the real enforcement is buildSubAgentReportContract(), spliced unconditionally into the base prompt. CL-6946 will replace the whole four-heading envelope with a schema-validated submit_result, so building this into a real mechanism now would be thrown away; delete the dead config instead. Added a test pinning that the one real mechanism stays internally consistent: buildSubAgentReportContract()'s rendered headings satisfy hasReportEnvelope().
TheGreatAxios
enabled auto-merge
August 24, 2026 00:06
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes CL-6969.
Verification that the field is inert: grepped every reference to
requiredSectionsandReportContractacrosssrc/. Outside of the type definition (types.ts), each director'spackage.tsdeclaration, and each package's.test.tsassertion checking it against the same hardcoded list, nothing reads it.registry.tsnever touchespkg.report.hasReportEnvelope()insrc/subagent/report.tsindependently hardcodes["Summary", "Findings", "Blockers", "Paths"]in its ownREPORT_ENVELOPE_HEADINGSconstant.buildSubAgentReportContract()insrc/agent/prompts.ts(spliced unconditionally into every sub-agent's base prompt) also hardcodes the four headings as literal markdown. Neither derives anything from a director's declaredrequiredSections. The only place the field is consumed for anything besides re-declaring itself isregistry.test.ts, which asserted it contained the same four strings every package already hardcoded.Why delete instead of wire it up: CL-6946 (queued behind the on-hold CL-6940 epic, not implemented here) plans to replace this whole four-heading markdown envelope with a schema-validated
submit_result, deletinghasReportEnvelope's string-matching entirely. Deriving the envelope fromrequiredSectionsnow would be replaced by that work anyway. The project also prefers deleting a primitive over reorganizing it when nothing consumes it.Changes:
ReportContractand thereportfield fromDirectorPackage(src/agent/directors/types.ts), its re-export (index.ts)report: { requiredSections: [...] }declaration from all 16 director packagesrequiredSectionstest in each package's test file and the registry-wide assertion inregistry.test.tssrc/prompts.test.tspinning the one real mechanism:buildSubAgentReportContract()'s rendered headings satisfyhasReportEnvelope(), so the two hardcoded heading lists can't silently drift out of sync now that there's no third copy to catch it.Test plan
bun run check(lint, typecheck, build, test) green — 5362 pass, 0 fail