refactor(monorepo): remove root cmd entrypoints
This commit is contained in:
@@ -30,8 +30,8 @@ As of now:
|
||||
- the original five `docs/tests/orch-skill/` cases also include recorded real subagent-forward runs captured on `2026-03-19`, with spawned leader and worker agents using the packaged `skills/orch/` and `skills/inbox/` bundles
|
||||
- a council-review skill forward-test plan directory now exists under `docs/tests/council-review-skill/`, with a shared execution contract and nine council workflow scenarios covering end-to-end flow, unanimous-only defaults, timeout/before-tally errors, explicit minority reporting, invalid report filters, strict tally semantics, malformed reviewer JSON, and target-file inputs
|
||||
- an execution-roadmap workflow now exists under `docs/roadmaps/active/` and `docs/roadmaps/archive/` for agent-level work traces and completion archives
|
||||
- a forward-looking web product monorepo plan now exists under `docs/web-product-monorepo.md`, defining the recommended React frontend, `chi` HTTP service, `cmd/orchd` entrypoint, and shared application/query layering for future web work
|
||||
- the Phase 1 web-product skeleton is now in place, including root `pnpm` workspace files, a standalone React app under `apps/web`, an initial OpenAPI/events contract under `api/`, and a new `cmd/orchd` HTTP service backed by `internal/app`, `internal/query`, and `internal/httpapi`
|
||||
- a forward-looking web product monorepo plan now exists under `docs/web-product-monorepo.md`, defining the recommended React frontend, `chi` HTTP service, and the package-owned `orchd` runtime path for future web work
|
||||
- the Phase 1 web-product skeleton is now in place, including root `pnpm` workspace files, a standalone React app under `apps/web`, an initial OpenAPI/events contract under `api/`, and the package-owned `orchd` backend runtime
|
||||
- `orchd` now serves a minimal read-only web API with `chi`, including `/health`, runs list/detail, run task list, blocked-task list, and thread detail endpoints backed by the existing SQLite state
|
||||
- HTTP tests now cover the initial read-only `orchd` slice, and the new frontend workspace builds successfully with `pnpm run web:build`
|
||||
- Phase 2 frontend work has now started by bootstrapping `apps/web` with copied-in `cadence-ui` tokens and foundational components for button, input, textarea, dialog, form, tabs, card, badge, and alert, with the shared token stylesheet loaded from the frontend entrypoint
|
||||
@@ -116,12 +116,10 @@ Goal:
|
||||
|
||||
Recommended shape:
|
||||
|
||||
- `cmd/inbox`
|
||||
- `cmd/orch`
|
||||
- `internal/db`
|
||||
- `internal/store`
|
||||
- `internal/protocol`
|
||||
- `internal/cli`
|
||||
- `packages/coord-core`
|
||||
- `packages/inbox-runtime`
|
||||
- `packages/orch-runtime`
|
||||
- compatibility shims only at the root if still needed temporarily
|
||||
|
||||
Definition of done:
|
||||
|
||||
@@ -393,10 +391,7 @@ Add:
|
||||
- `apps/web`
|
||||
- `api/openapi.yaml`
|
||||
- `api/events.md`
|
||||
- `cmd/orchd`
|
||||
- `internal/app`
|
||||
- `internal/query`
|
||||
- `internal/httpapi`
|
||||
- `packages/orchd-runtime`
|
||||
|
||||
Definition of done:
|
||||
|
||||
@@ -412,10 +407,10 @@ Completed so far:
|
||||
|
||||
- root `package.json`, `pnpm-workspace.yaml`, and `pnpm-lock.yaml` now define the monorepo JS workspace
|
||||
- `apps/web` now contains a Vite + React + TypeScript + TanStack Router + TanStack Query frontend shell
|
||||
- `cmd/orchd` now opens the shared SQLite database, applies migrations, and serves a `chi` router with graceful shutdown handling
|
||||
- `internal/query` now exposes run list/detail, run tasks, blocked-task, and thread-detail read models for the web surface
|
||||
- `internal/app` now provides a thin web-service boundary over the new read service
|
||||
- `internal/httpapi` now owns HTTP routing, JSON/error helpers, and the initial read-only endpoints
|
||||
- `packages/orchd-runtime/cmd/orchd` now opens the shared SQLite database, applies migrations, and serves a `chi` router with graceful shutdown handling
|
||||
- `packages/orchd-runtime/internal/query` now exposes run list/detail, run tasks, blocked-task, and thread-detail read models for the web surface
|
||||
- `packages/orchd-runtime/internal/app` now provides a thin web-service boundary over the new read service
|
||||
- `packages/orchd-runtime/internal/httpapi` now owns HTTP routing, JSON/error helpers, and the initial read-only endpoints
|
||||
- `api/openapi.yaml` now documents the implemented read-only endpoints and response shapes
|
||||
- `api/events.md` now captures the planned SSE contract for the next realtime slice
|
||||
- `go test ./...` covers the new HTTP slice, and `pnpm run web:build` succeeds for the frontend workspace
|
||||
@@ -494,16 +489,16 @@ Completed so far:
|
||||
- the repository-level migration design is captured in `docs/skill-workspace-monorepo.md`
|
||||
- the target package split now distinguishes `coord-core`, runtime packages, skill bundles, and support apps
|
||||
- the migration plan now defines phased extraction for `coord-core`, `inbox-runtime`, `orch-runtime`, `orchd-runtime`, and `repo-memory-runtime`
|
||||
- root `go.work` now includes the current root module plus the initial runtime package module roots under `packages/`
|
||||
- `pnpm-workspace.yaml` now includes `packages/*`, and root `package.json` now exposes monorepo bundle planning and validation scripts
|
||||
- root `go.work` now includes the package-owned runtime module roots under `packages/`
|
||||
- `pnpm-workspace.yaml` now includes `packages/*`, and root `package.json` now exposes monorepo bundle planning, validation, and Go package test scripts
|
||||
- initial module roots now exist for `packages/coord-core`, `packages/inbox-runtime`, `packages/orch-runtime`, `packages/orchd-runtime`, and `packages/repo-memory-runtime`
|
||||
- `scripts/skill-bundles.json` now records the first package-oriented skill bundle metadata, including the future `repo-memory` runtime mapping
|
||||
- `scripts/package_skill_runtimes.sh` now provides a declarative bundle plan/validate scaffold that targets package paths rather than hardcoded root runtime paths
|
||||
- `packages/coord-core/db` now owns the shared SQLite open, pragmas, migrations, and coordination schema files
|
||||
- `packages/coord-core/protocol` now owns the shared JSON and CLI error helpers used across the coordination stack
|
||||
- `packages/coord-core/store` now owns the shared inbox, orch, and council store logic plus its coordination-domain tests
|
||||
- root coordination runtimes under `cmd/`, `internal/cli/`, `internal/app/`, `internal/httpapi/`, and `internal/query/` now import `coord-core` instead of depending on root `internal/db`, `internal/store`, or root `internal/protocol`
|
||||
- `go test ./...` still passes for the root module, and `go test ./...` passes inside `packages/coord-core`
|
||||
- package-owned coordination runtimes now depend on `packages/coord-core` instead of root `internal/db`, `internal/store`, or root `internal/protocol`
|
||||
- package-oriented Go validation now runs through the workspace runtime packages, and `packages/coord-core` passes `go test ./...`
|
||||
- `packages/inbox-runtime/cmd/inbox` plus `packages/inbox-runtime/internal/cli/inbox` now provide a package-owned inbox runtime and pass `go test ./...`
|
||||
- `packages/orch-runtime/cmd/orch` plus `packages/orch-runtime/internal/cli/orch` now provide a package-owned orch runtime and pass `go test ./...`
|
||||
- `scripts/skill-bundles.json` now marks `inbox`, `orch`, and `council-review` as ready package-backed bundles
|
||||
@@ -513,8 +508,8 @@ Completed so far:
|
||||
- `packages/repo-memory-runtime/cmd/briefdb` plus its package-local `internal/brief` and `internal/store` now provide a package-owned repo-memory runtime and pass `go test ./...`
|
||||
- `skills/repo-memory/` now exists with `SKILL.md`, `agents/openai.yaml`, and a bundled `assets/briefdb` binary produced by the declarative packaging flow
|
||||
- `docs/tests/repo-memory-skill/` now exists with a README plus an initial forward-test case covering search-before-add and durable entry retrieval through the bundled skill
|
||||
- root `cmd/inbox`, `cmd/orch`, and `cmd/orchd` now act as compatibility shims that invoke package-owned runtimes instead of root-owned runtime implementations
|
||||
- legacy root runtime implementation directories under `internal/` have been removed now that package-owned runtimes and package-backed skill bundles are in place
|
||||
- legacy root `cmd/` compatibility shims have also been removed, so package-owned runtimes under `packages/*/cmd/*` are now the only maintained Go entrypoints
|
||||
|
||||
Remaining:
|
||||
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
# Remove Root Cmd Compatibility Shims
|
||||
|
||||
## Status
|
||||
|
||||
- `completed`
|
||||
|
||||
## Owner
|
||||
|
||||
- Codex
|
||||
|
||||
## Started At
|
||||
|
||||
- `2026-03-20`
|
||||
|
||||
## Goal
|
||||
|
||||
- Remove the legacy root `cmd/` compatibility shims now that package-owned runtimes are the source of truth, and clean up the remaining current docs and test indexes that still point at deleted root runtime paths.
|
||||
|
||||
## Scope
|
||||
|
||||
- remove root `cmd/inbox`, `cmd/orch`, and `cmd/orchd`
|
||||
- update current docs and test-plan indexes that still reference removed root runtime paths
|
||||
- keep package-owned runtime workflows and skill packaging validated after the cleanup
|
||||
|
||||
## Checklist
|
||||
|
||||
- [x] inspect remaining references to root `cmd/` and deleted root `internal/` runtime paths
|
||||
- [x] update current docs and test indexes to point at package-owned runtime paths
|
||||
- [x] remove the root `cmd/` files and any now-unneeded root shim wiring
|
||||
- [x] validate package-owned runtime and skill packaging workflows after the cleanup
|
||||
- [x] update roadmap state and archive this workstream if complete
|
||||
|
||||
## Files
|
||||
|
||||
- `docs/roadmaps/archive/remove-root-cmd-compat-shims.md`
|
||||
- `cmd/`
|
||||
- `docs/implementation-roadmap.md`
|
||||
- `docs/tests/`
|
||||
- `docs/skill-workspace-monorepo.md`
|
||||
- `docs/web-product-monorepo.md`
|
||||
- `go.mod`
|
||||
|
||||
## Decisions
|
||||
|
||||
- treat archived roadmaps as historical records; fix only current source-of-truth docs and current test indexes unless a broken archived reference blocks real workflows
|
||||
|
||||
## Blockers
|
||||
|
||||
- none
|
||||
|
||||
## Next Step
|
||||
|
||||
- continue routine feature work on top of the package-owned runtime workspace without recreating root-owned Go entrypoints
|
||||
|
||||
## Completion Summary
|
||||
|
||||
- updated the current inbox and orch test-plan indexes so they now point at package-owned runtime test files instead of deleted root `internal/cli/*` paths
|
||||
- removed the root `cmd/` compatibility shims and the now-unneeded root Go module files so package-owned runtimes under `packages/*/cmd/*` are the only maintained Go entrypoints
|
||||
- added a root `pnpm run go:test` script that validates package-owned Go runtimes directly, replacing reliance on a root Go module
|
||||
- synchronized the current implementation and web monorepo docs with the package-owned runtime layout after the cleanup
|
||||
@@ -143,7 +143,7 @@ This package owns the inbox worker-facing runtime.
|
||||
It should contain:
|
||||
|
||||
- `cmd/inbox/main.go`
|
||||
- CLI command wiring currently under `internal/cli/inbox`
|
||||
- package-local CLI command wiring under `internal/cli/inbox`
|
||||
- inbox-specific packaging tests
|
||||
|
||||
It depends on `coord-core`.
|
||||
@@ -155,7 +155,7 @@ This package owns the orch leader-facing runtime.
|
||||
It should contain:
|
||||
|
||||
- `cmd/orch/main.go`
|
||||
- CLI command wiring currently under `internal/cli/orch`
|
||||
- package-local CLI command wiring under `internal/cli/orch`
|
||||
- worktree-specific runtime helpers currently owned only by orch
|
||||
|
||||
It depends on `coord-core`.
|
||||
@@ -170,9 +170,9 @@ This package owns the HTTP and read-model runtime for the operator web surface.
|
||||
It should contain:
|
||||
|
||||
- `cmd/orchd/main.go`
|
||||
- current `internal/httpapi`
|
||||
- current `internal/query`
|
||||
- current `internal/app/web.go`
|
||||
- package-local `internal/httpapi`
|
||||
- package-local `internal/query`
|
||||
- package-local `internal/app/web.go`
|
||||
|
||||
It depends on `coord-core`.
|
||||
|
||||
@@ -446,6 +446,9 @@ This migration does not require:
|
||||
- moving every support app into `packages/`
|
||||
- forcing every skill to own its own runtime package when runtime reuse is intentional
|
||||
|
||||
The migration does remove root runtime ownership once package-owned runtimes are in place.
|
||||
Root `cmd/` and root `internal/` are not part of the long-term target shape.
|
||||
|
||||
## Success Criteria
|
||||
|
||||
The migration is complete when:
|
||||
|
||||
@@ -62,7 +62,7 @@ Unless a case says otherwise:
|
||||
|
||||
## Relationship To Automated Tests
|
||||
|
||||
The current best executable reference is [internal/cli/inbox/integration_test.go](../../../internal/cli/inbox/integration_test.go).
|
||||
The current best executable reference is [integration_test.go](../../../packages/inbox-runtime/internal/cli/inbox/integration_test.go).
|
||||
|
||||
When this Markdown plan is expanded:
|
||||
|
||||
|
||||
@@ -118,12 +118,12 @@ Allowed status values in this roadmap:
|
||||
|
||||
The Markdown test-plan set starts at zero, but these automated tests already exist and should be used as source material when writing the docs:
|
||||
|
||||
- [integration_test.go](../../../internal/cli/inbox/integration_test.go#L12) `TestInboxLifecycle`
|
||||
- [integration_test.go](../../../internal/cli/inbox/integration_test.go#L176) `TestInboxFailLifecycle`
|
||||
- [integration_test.go](../../../internal/cli/inbox/integration_test.go#L243) `TestInboxRenewWaitReplyAndCancel`
|
||||
- [integration_test.go](../../../internal/cli/inbox/integration_test.go#L392) `TestInboxWatchListUnreadAndAppend`
|
||||
- [integration_test.go](../../../internal/cli/inbox/integration_test.go#L549) `TestInboxUnreadReadCursor`
|
||||
- [integration_test.go](../../../internal/cli/inbox/integration_test.go#L639) `TestInboxJSONErrorsAndExitCodes`
|
||||
- [integration_test.go](../../../packages/inbox-runtime/internal/cli/inbox/integration_test.go#L12) `TestInboxLifecycle`
|
||||
- [integration_test.go](../../../packages/inbox-runtime/internal/cli/inbox/integration_test.go#L176) `TestInboxFailLifecycle`
|
||||
- [integration_test.go](../../../packages/inbox-runtime/internal/cli/inbox/integration_test.go#L243) `TestInboxRenewWaitReplyAndCancel`
|
||||
- [integration_test.go](../../../packages/inbox-runtime/internal/cli/inbox/integration_test.go#L392) `TestInboxWatchListUnreadAndAppend`
|
||||
- [integration_test.go](../../../packages/inbox-runtime/internal/cli/inbox/integration_test.go#L549) `TestInboxUnreadReadCursor`
|
||||
- [integration_test.go](../../../packages/inbox-runtime/internal/cli/inbox/integration_test.go#L639) `TestInboxJSONErrorsAndExitCodes`
|
||||
|
||||
These tests do not remove the need for the Markdown plan. They only reduce discovery work.
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ Unless a case says otherwise:
|
||||
|
||||
## Relationship To Automated Tests
|
||||
|
||||
The current best executable reference is [internal/cli/orch/integration_test.go](../../../internal/cli/orch/integration_test.go).
|
||||
The current best executable reference is [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go).
|
||||
|
||||
When this Markdown plan expands:
|
||||
|
||||
|
||||
+41
-41
@@ -123,47 +123,47 @@ Allowed status values in this roadmap:
|
||||
|
||||
The Markdown test-plan set starts at zero, but these automated tests already exist and should be used as source material when writing the docs:
|
||||
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L12) `TestOrchRunDispatchReconcileLifecycle`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L184) `TestOrchDependencyBlockedAndAnswerFlow`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L458) `TestOrchDispatchRejectsNonReadyTask`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L512) `TestOrchDispatchCreatesStrictWorktree`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L631) `TestOrchStrictWorktreeRejectsDirtyRepoWithoutBaseRef`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L680) `TestOrchStrictWorktreeAllowsExplicitBaseRefOnDirtyRepo`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L733) `TestOrchDispatchAutoEnablesWorktreeForCodeLikeTask`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L782) `TestOrchDispatchDoesNotAutoEnableWorktreeForNonCodeTask`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L829) `TestOrchWaitWakesOnBlockedEvent`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L944) `TestOrchWaitTimesOutWithoutMatchingEvent`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L981) `TestOrchRetryCreatesNewAttempt`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L1079) `TestOrchReassignCancelsOldThreadAndDispatchesNewAttempt`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L1186) `TestOrchCancelTaskAndRun`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L1315) `TestOrchCleanupRemovesCompletedWorktree`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L1402) `TestOrchCouncilStartDispatchesThreeReviewers`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L1545) `TestOrchCouncilWaitWakesWhenAllReviewersComplete`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L1678) `TestOrchCouncilWaitTimesOutWhenReviewersIncomplete`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L1715) `TestOrchCouncilTallyGroupsReviewerFindingsNormal`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L1813) `TestOrchCouncilTallyStrictKeepsDistinctProposals`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L1873) `TestOrchCouncilReportDefaultShowsConsensusAndMajority`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L1950) `TestOrchCouncilReportShowAllIncludesMinority`
|
||||
- [integration_test.go](../../../internal/cli/orch/integration_test.go#L1979) `TestOrchCouncilReportJSONShape`
|
||||
- [command_contracts_core_test.go](../../../internal/cli/orch/command_contracts_core_test.go) `TestOrchRunShowReturnsRunSummaryAndTaskCounts`
|
||||
- [command_contracts_core_test.go](../../../internal/cli/orch/command_contracts_core_test.go) `TestOrchRunShowRejectsMissingRun`
|
||||
- [command_contracts_core_test.go](../../../internal/cli/orch/command_contracts_core_test.go) `TestOrchTaskAddRejectsInvalidAcceptanceJSON`
|
||||
- [command_contracts_core_test.go](../../../internal/cli/orch/command_contracts_core_test.go) `TestOrchTaskAddRejectsInvalidPriority`
|
||||
- [command_contracts_core_test.go](../../../internal/cli/orch/command_contracts_core_test.go) `TestOrchReadyOrdersByPriorityAndRespectsLimit`
|
||||
- [command_contracts_edges_test.go](../../../internal/cli/orch/command_contracts_edges_test.go) `TestOrchAnswerAcceptsPayloadJSONWithoutBody`
|
||||
- [command_contracts_edges_test.go](../../../internal/cli/orch/command_contracts_edges_test.go) `TestOrchAnswerRejectsEmptyBodyAndPayload`
|
||||
- [command_contracts_edges_test.go](../../../internal/cli/orch/command_contracts_edges_test.go) `TestOrchCleanupRejectsAttemptWithoutTask`
|
||||
- [command_contracts_edges_test.go](../../../internal/cli/orch/command_contracts_edges_test.go) `TestOrchCleanupReturnsNoMatchingWorkWhenFiltersMiss`
|
||||
- [command_contracts_remaining_test.go](../../../internal/cli/orch/command_contracts_remaining_test.go) `TestOrchRunInitCreatesNewRun`
|
||||
- [command_contracts_remaining_test.go](../../../internal/cli/orch/command_contracts_remaining_test.go) `TestOrchDispatchCreatesAttemptAndThreadForReadyTask`
|
||||
- [command_contracts_remaining_test.go](../../../internal/cli/orch/command_contracts_remaining_test.go) `TestOrchBlockedListsLatestQuestionForBlockedTask`
|
||||
- [command_contracts_remaining_test.go](../../../internal/cli/orch/command_contracts_remaining_test.go) `TestOrchStatusReturnsRunSummaryAndTaskList`
|
||||
- [command_contracts_remaining_test.go](../../../internal/cli/orch/command_contracts_remaining_test.go) `TestOrchReconcileMapsFailedThreadToTerminalTaskState`
|
||||
- [command_contracts_remaining_test.go](../../../internal/cli/orch/command_contracts_remaining_test.go) `TestOrchWorkflowStrictWorktreeDispatchToCleanup`
|
||||
- [command_contracts_remaining_test.go](../../../internal/cli/orch/command_contracts_remaining_test.go) `TestOrchWorkflowCouncilReviewEndToEnd`
|
||||
- [council_report_contracts_test.go](../../../internal/cli/orch/council_report_contracts_test.go) `TestOrchCouncilReportRejectsBeforeTally`
|
||||
- [council_report_contracts_test.go](../../../internal/cli/orch/council_report_contracts_test.go) `TestOrchCouncilReportRejectsInvalidShow`
|
||||
- [council_report_contracts_test.go](../../../internal/cli/orch/council_report_contracts_test.go) `TestOrchCouncilReportDefaultsToConsensusForOnlyUnanimousRun`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L12) `TestOrchRunDispatchReconcileLifecycle`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L184) `TestOrchDependencyBlockedAndAnswerFlow`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L458) `TestOrchDispatchRejectsNonReadyTask`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L512) `TestOrchDispatchCreatesStrictWorktree`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L631) `TestOrchStrictWorktreeRejectsDirtyRepoWithoutBaseRef`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L680) `TestOrchStrictWorktreeAllowsExplicitBaseRefOnDirtyRepo`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L733) `TestOrchDispatchAutoEnablesWorktreeForCodeLikeTask`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L782) `TestOrchDispatchDoesNotAutoEnableWorktreeForNonCodeTask`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L829) `TestOrchWaitWakesOnBlockedEvent`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L944) `TestOrchWaitTimesOutWithoutMatchingEvent`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L981) `TestOrchRetryCreatesNewAttempt`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L1079) `TestOrchReassignCancelsOldThreadAndDispatchesNewAttempt`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L1186) `TestOrchCancelTaskAndRun`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L1315) `TestOrchCleanupRemovesCompletedWorktree`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L1402) `TestOrchCouncilStartDispatchesThreeReviewers`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L1545) `TestOrchCouncilWaitWakesWhenAllReviewersComplete`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L1678) `TestOrchCouncilWaitTimesOutWhenReviewersIncomplete`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L1715) `TestOrchCouncilTallyGroupsReviewerFindingsNormal`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L1813) `TestOrchCouncilTallyStrictKeepsDistinctProposals`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L1873) `TestOrchCouncilReportDefaultShowsConsensusAndMajority`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L1950) `TestOrchCouncilReportShowAllIncludesMinority`
|
||||
- [integration_test.go](../../../packages/orch-runtime/internal/cli/orch/integration_test.go#L1979) `TestOrchCouncilReportJSONShape`
|
||||
- [command_contracts_core_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_core_test.go) `TestOrchRunShowReturnsRunSummaryAndTaskCounts`
|
||||
- [command_contracts_core_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_core_test.go) `TestOrchRunShowRejectsMissingRun`
|
||||
- [command_contracts_core_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_core_test.go) `TestOrchTaskAddRejectsInvalidAcceptanceJSON`
|
||||
- [command_contracts_core_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_core_test.go) `TestOrchTaskAddRejectsInvalidPriority`
|
||||
- [command_contracts_core_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_core_test.go) `TestOrchReadyOrdersByPriorityAndRespectsLimit`
|
||||
- [command_contracts_edges_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_edges_test.go) `TestOrchAnswerAcceptsPayloadJSONWithoutBody`
|
||||
- [command_contracts_edges_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_edges_test.go) `TestOrchAnswerRejectsEmptyBodyAndPayload`
|
||||
- [command_contracts_edges_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_edges_test.go) `TestOrchCleanupRejectsAttemptWithoutTask`
|
||||
- [command_contracts_edges_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_edges_test.go) `TestOrchCleanupReturnsNoMatchingWorkWhenFiltersMiss`
|
||||
- [command_contracts_remaining_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_remaining_test.go) `TestOrchRunInitCreatesNewRun`
|
||||
- [command_contracts_remaining_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_remaining_test.go) `TestOrchDispatchCreatesAttemptAndThreadForReadyTask`
|
||||
- [command_contracts_remaining_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_remaining_test.go) `TestOrchBlockedListsLatestQuestionForBlockedTask`
|
||||
- [command_contracts_remaining_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_remaining_test.go) `TestOrchStatusReturnsRunSummaryAndTaskList`
|
||||
- [command_contracts_remaining_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_remaining_test.go) `TestOrchReconcileMapsFailedThreadToTerminalTaskState`
|
||||
- [command_contracts_remaining_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_remaining_test.go) `TestOrchWorkflowStrictWorktreeDispatchToCleanup`
|
||||
- [command_contracts_remaining_test.go](../../../packages/orch-runtime/internal/cli/orch/command_contracts_remaining_test.go) `TestOrchWorkflowCouncilReviewEndToEnd`
|
||||
- [council_report_contracts_test.go](../../../packages/orch-runtime/internal/cli/orch/council_report_contracts_test.go) `TestOrchCouncilReportRejectsBeforeTally`
|
||||
- [council_report_contracts_test.go](../../../packages/orch-runtime/internal/cli/orch/council_report_contracts_test.go) `TestOrchCouncilReportRejectsInvalidShow`
|
||||
- [council_report_contracts_test.go](../../../packages/orch-runtime/internal/cli/orch/council_report_contracts_test.go) `TestOrchCouncilReportDefaultsToConsensusForOnlyUnanimousRun`
|
||||
|
||||
These tests do not remove the need for the Markdown plan. They only reduce discovery work.
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ The recommended direction is:
|
||||
|
||||
- keep a single monorepo
|
||||
- add a standalone frontend app under `apps/web`
|
||||
- add a standalone HTTP backend entrypoint under `cmd/orchd`
|
||||
- add a standalone HTTP backend entrypoint, now owned under `packages/orchd-runtime/cmd/orchd`
|
||||
- keep the current Go repository as the backend source of truth
|
||||
- evolve the backend by introducing shared application services and UI-oriented query layers
|
||||
- avoid building the web backend by shelling out to the existing CLIs
|
||||
@@ -113,9 +113,9 @@ Recommended stack:
|
||||
The frontend should consume only HTTP APIs and event streams from the backend.
|
||||
It should never read SQLite directly and should not depend on CLI output parsing.
|
||||
|
||||
### `cmd/orchd`
|
||||
### `packages/orchd-runtime`
|
||||
|
||||
The backend HTTP service should start as a new Go binary under `cmd/orchd`.
|
||||
The backend HTTP service should live in a package-owned runtime with its Go binary under `packages/orchd-runtime/cmd/orchd`.
|
||||
|
||||
Responsibilities:
|
||||
|
||||
@@ -124,9 +124,9 @@ Responsibilities:
|
||||
- load the same database as the CLI tools
|
||||
- use shared application services rather than reimplementing logic
|
||||
|
||||
The existing `cmd/orch` and `cmd/inbox` binaries should remain available as operator and debugging tools.
|
||||
The existing orch and inbox runtimes should remain available as operator and debugging tools through their package-owned binaries under `packages/orch-runtime/cmd/orch` and `packages/inbox-runtime/cmd/inbox`.
|
||||
|
||||
### `internal/app`
|
||||
### `packages/orchd-runtime/internal/app`
|
||||
|
||||
This package should become the shared application-service layer.
|
||||
|
||||
@@ -142,7 +142,7 @@ It should own business actions that currently sit mostly in CLI command handlers
|
||||
|
||||
Both CLI commands and HTTP handlers should call into this layer.
|
||||
|
||||
### `internal/query`
|
||||
### `packages/orchd-runtime/internal/query`
|
||||
|
||||
This package should hold read models specifically shaped for the web UI.
|
||||
|
||||
@@ -156,7 +156,7 @@ Examples:
|
||||
|
||||
These should be query-oriented models rather than raw database table mirrors.
|
||||
|
||||
### `internal/httpapi`
|
||||
### `packages/orchd-runtime/internal/httpapi`
|
||||
|
||||
This package should hold the web transport layer.
|
||||
|
||||
@@ -257,9 +257,9 @@ The current project already has strong backend assets:
|
||||
The backend should therefore evolve in-place:
|
||||
|
||||
1. keep the current store and schema as the persistence foundation
|
||||
2. extract shared application actions into `internal/app`
|
||||
3. add UI-oriented read models in `internal/query`
|
||||
4. add `cmd/orchd` and `internal/httpapi`
|
||||
2. extract shared application actions into the orchd runtime app layer
|
||||
3. add UI-oriented read models in the orchd runtime query layer
|
||||
4. add the orchd runtime package and its HTTP transport layer
|
||||
5. attach the React frontend after the API contract stabilizes
|
||||
|
||||
This is safer than first attempting a large repo split or backend rewrite.
|
||||
@@ -325,10 +325,10 @@ The goal is to avoid rewriting product boundaries just because the storage engin
|
||||
Add:
|
||||
|
||||
- `apps/web`
|
||||
- `cmd/orchd`
|
||||
- `internal/httpapi`
|
||||
- `internal/app`
|
||||
- `internal/query`
|
||||
- `packages/orchd-runtime/cmd/orchd`
|
||||
- `packages/orchd-runtime/internal/httpapi`
|
||||
- `packages/orchd-runtime/internal/app`
|
||||
- `packages/orchd-runtime/internal/query`
|
||||
- `api/openapi.yaml`
|
||||
- `api/events.md`
|
||||
- root JS workspace files such as `package.json` and `pnpm-workspace.yaml`
|
||||
@@ -409,10 +409,10 @@ The current codebase should be adapted incrementally.
|
||||
|
||||
Recommended rules:
|
||||
|
||||
- keep `cmd/orch` and `cmd/inbox` working while the HTTP layer is introduced
|
||||
- keep the package-owned `orch` and `inbox` binaries working while the HTTP layer is introduced
|
||||
- move business logic out of command handlers only when the shared service abstraction is clear
|
||||
- do not rewrite `store` just to match HTTP names
|
||||
- let the frontend shape drive `internal/query`, not the table layout alone
|
||||
- let the frontend shape drive the orchd runtime query layer, not the table layout alone
|
||||
- avoid introducing duplicate orchestration logic between CLI and HTTP
|
||||
|
||||
## Immediate Recommended Next Step
|
||||
@@ -420,7 +420,7 @@ Recommended rules:
|
||||
If the project begins this web-product milestone, the first implementation slice should be:
|
||||
|
||||
1. scaffold the monorepo workspace files and `apps/web`
|
||||
2. add `cmd/orchd` with a `chi` router and a minimal health or runs endpoint
|
||||
2. add the `orchd` runtime package with a `chi` router and a minimal health or runs endpoint
|
||||
3. introduce the first shared application or query boundary rather than letting handlers call storage ad hoc
|
||||
4. write the initial API contract in `api/openapi.yaml`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user