Skip to content

Delete inert report.requiredSections from director packages - #588

Merged
TheGreatAxios merged 1 commit into
mainfrom
cl-6969-reportrequiredsections-is-inert-metadata-that-reads-as-the-report
Aug 24, 2026
Merged

Delete inert report.requiredSections from director packages#588
TheGreatAxios merged 1 commit into
mainfrom
cl-6969-reportrequiredsections-is-inert-metadata-that-reads-as-the-report

Conversation

@TheGreatAxios

Copy link
Copy Markdown
Collaborator

Closes CL-6969.

Verification that the field is inert: grepped every reference to requiredSections and ReportContract across src/. Outside of the type definition (types.ts), each director's package.ts declaration, and each package's .test.ts assertion checking it against the same hardcoded list, nothing reads it. registry.ts never touches pkg.report. hasReportEnvelope() in src/subagent/report.ts independently hardcodes ["Summary", "Findings", "Blockers", "Paths"] in its own REPORT_ENVELOPE_HEADINGS constant. buildSubAgentReportContract() in src/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 declared requiredSections. The only place the field is consumed for anything besides re-declaring itself is registry.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, deleting hasReportEnvelope's string-matching entirely. Deriving the envelope from requiredSections now would be replaced by that work anyway. The project also prefers deleting a primitive over reorganizing it when nothing consumes it.

Changes:

  • Removed ReportContract and the report field from DirectorPackage (src/agent/directors/types.ts), its re-export (index.ts)
  • Removed the report: { requiredSections: [...] } declaration from all 16 director packages
  • Removed the now-dangling requiredSections test in each package's test file and the registry-wide assertion in registry.test.ts
  • Added a test in src/prompts.test.ts pinning the one real mechanism: buildSubAgentReportContract()'s rendered headings satisfy hasReportEnvelope(), 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

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().
@linear-code

linear-code Bot commented Aug 24, 2026

Copy link
Copy Markdown

CL-6969

@TheGreatAxios
TheGreatAxios merged commit 995f458 into main Aug 24, 2026
5 checks passed
TheGreatAxios added a commit that referenced this pull request Aug 24, 2026
Resolved against the writePaths removal (#591) and requiredSections
removal (#588): kept this branch's directorId gate key, dropped every
writePaths reference including the registry guard test, since the field
no longer exists.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant