Skip to content

Refactor application ports into context-specific modules#141

Open
danielbdyer wants to merge 1 commit into
mainfrom
codex/refactor-application-ports-into-modules-h2oibv
Open

Refactor application ports into context-specific modules#141
danielbdyer wants to merge 1 commit into
mainfrom
codex/refactor-application-ports-into-modules-h2oibv

Conversation

@danielbdyer
Copy link
Copy Markdown
Owner

Motivation

  • Organize the monolithic application port surface by bounded context to improve clarity and ownership of side-effect boundaries.
  • Reduce ambiguous runtime names and align port types with the context that owns them for easier reasoning and future refactors.
  • Make imports more explicit across composition/infrastructure/runtime so modules depend on a smaller, intention-revealing surface.

Description

  • Split lib/application/ports.ts into context-specific files under lib/application/ports/: execution-ports.ts, intervention-ports.ts, observation-ports.ts, governance-ports.ts, and infrastructure-ports.ts, and kept lib/application/ports.ts as a thin compatibility barrel that re-exports the new modules.
  • Moved interfaces and Context.Tags into their owning modules and renamed execution-facing types to context-aligned names (for example ExecutionScenarioRunnerPort, ExecutionScenarioStepResult, ExecutionInterpreterMode) while providing backward-compatible aliases where needed.
  • Updated imports across lib/application, lib/composition, lib/infrastructure, and lib/runtime to reference the new context modules (examples: composition layer wiring, local runtime runner, dashboard/MCP adapters, execution pipeline modules).
  • Added a Port Ownership section to lib/application/README.md documenting which bounded context owns each port module.

Testing

  • Ran npm run types (which performs the build + type-check) and the type check completed successfully.

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant