Skip to content

Barrel-split large multi-domain server files (checkInfra, layeredIntelligence, seriesAutopilot) #2842

Description

@atomantic

Problem

server/lib/editorial/checkInfra.js (~2635 lines), server/services/layeredIntelligence.js (~2631), and server/services/pipeline/seriesAutopilot.js (~2541) each hold many small well-factored exports spanning several distinct sub-domains — no single-function violation, but file-level SRP is stretched.

Approach (decided)

Apply the same barrel-split treatment used for arcPlanner.js (#1152): e.g. layeredIntelligence/{config,dedup,handoff,outcomes}.js + a re-exporting barrel. Preserve existing deep imports via the barrel.

Acceptance

  • Each file split by sub-domain behind a re-export barrel; imports + tests unchanged/passing; barrel/README enforcement satisfied.

Found by the /do:better audit (2026-07-21). Deferred from automated remediation because it is a large/high-churn structural change best landed deliberately rather than auto-merged.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions