Skip to content

refactor: reduce internal barrel imports#651

Merged
jayscambler merged 1 commit intorefactor/generation-recovery-servicefrom
refactor/internal-barrel-reduction
Apr 9, 2026
Merged

refactor: reduce internal barrel imports#651
jayscambler merged 1 commit intorefactor/generation-recovery-servicefrom
refactor/internal-barrel-reduction

Conversation

@jayscambler
Copy link
Copy Markdown
Contributor

Summary

  • split direct implementation modules out from broad barrels for the LLM judge and codegen registry
  • switch several internal runtime/control-plane imports to the new direct modules
  • keep public barrel exports stable while reducing internal coupling

TDD / DRY framing

This is the next stacked architectural PR after #650.

Test-first work:

  • added direct-import regression tests first
  • extracted implementation modules
  • rewired internal consumers to import directly
  • preserved external/public re-export surfaces through existing barrel files

Changes

New direct modules

  • ts/src/judge/llm-judge.ts
  • ts/src/scenarios/codegen/registry.ts

Barrel files kept as public compatibility surfaces

  • ts/src/judge/index.ts
  • ts/src/scenarios/codegen/index.ts

Internal imports moved off barrels in runtime paths

  • ts/src/execution/task-runner.ts
  • ts/src/mcp/server.ts
  • ts/src/scenarios/agent-task-factory.ts
  • ts/src/investigation/engine.ts
  • ts/src/simulation/engine.ts
  • ts/src/knowledge/solver.ts

New tests

  • ts/tests/internal-module-imports.test.ts

Validation

  • cd ts && npx vitest run tests/internal-module-imports.test.ts tests/judge.test.ts tests/codegen.test.ts tests/task-runner.test.ts tests/generation-loop.test.ts
  • cd ts && npm run lint

Follow-up

After this PR, the major remaining architectural recommendation is the state-transition / state-machine work for GenerationRunner and mission workflows.

@jayscambler jayscambler merged commit 5e6ed22 into refactor/generation-recovery-service Apr 9, 2026
4 checks passed
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