From bdb903cf69f0068b85cfce99c28ff81ad6083ba3 Mon Sep 17 00:00:00 2001 From: Mosaic fleet seat orch-01 Date: Thu, 27 Aug 2026 19:53:51 +0000 Subject: [PATCH] docs: T78 official CLI capability migration contract (#1458) --- docs/PRD.md | 9 + docs/ROADMAP.md | 4 +- docs/SITEMAP.md | 1 + docs/requirements/cli-capability-migration.md | 748 ++++++++++++++++++ 4 files changed, 761 insertions(+), 1 deletion(-) create mode 100644 docs/requirements/cli-capability-migration.md diff --git a/docs/PRD.md b/docs/PRD.md index 016165f9..36965619 100644 --- a/docs/PRD.md +++ b/docs/PRD.md @@ -882,3 +882,12 @@ Objective: for alpha 0.0.50, the release cannot publish, report, or display work ### Out of scope The canonical dispatcher/control-plane vertical slice (work graph, execution attempts, fenced leases, typed check-in, independent verifier dispatch) is decided post-alpha (SDLC-D-033, option B). Multi-pipeline verification certificates (SDLC-D-034 option B) are post-alpha. Full AF-1..AF-4 objective matrices and Mission Control portfolio surfaces are post-alpha. + +## Official CLI Capability and Tool Migration Workstream (T78) + +Normative contract on integration trunk `next`: +[docs/requirements/cli-capability-migration.md](./requirements/cli-capability-migration.md): +migrates agent-facing operations from directly invoked scripts into documented, first-class +`mosaic` CLI command groups, together with the central-registry resolver, capability catalog, +adapter boundary, and phased legacy-tool-tree decommission the migration requires. The contract +carries its own implementation hold and delivery stages. diff --git a/docs/ROADMAP.md b/docs/ROADMAP.md index 306f9f78..d03ab7e2 100644 --- a/docs/ROADMAP.md +++ b/docs/ROADMAP.md @@ -12,7 +12,9 @@ design; scoping one requires its own PRD section or requirements doc plus review. Phases are product phases. The in-flight platform workstreams (KBN-100/101 -kanban SOT implementation, FCM #758, FCOM #766, TESS, RI #1275, and the other +kanban SOT implementation, FCM #758, FCOM #766, TESS, RI #1275, T78 CLI +capability migration +([requirements](./requirements/cli-capability-migration.md)), and the other Part II contracts in the PRD) run as parallel tracks under their own issues and are prerequisites where noted. diff --git a/docs/SITEMAP.md b/docs/SITEMAP.md index 71a4699c..13b1345a 100644 --- a/docs/SITEMAP.md +++ b/docs/SITEMAP.md @@ -18,6 +18,7 @@ - [Active task rollup](TASKS.md) — orchestrator-owned work state; workers do not modify it. - [MVP mission manifest](MISSION-MANIFEST.md) — control-plane mission rollup; activity and status remain under its authorized owner. - [Documentation catalog and truth audit](reports/documentation/2026-08-10-docs-catalog-audit.md) — complete baseline inventory, evidence labels, broken-link clusters, and migration recommendations. +- [CLI capability migration requirements](requirements/cli-capability-migration.md): T78 official CLI capability and tool migration contract, normative contract with implementation hold (M0). ## Protected current authority and executable books diff --git a/docs/requirements/cli-capability-migration.md b/docs/requirements/cli-capability-migration.md new file mode 100644 index 00000000..a12c0134 --- /dev/null +++ b/docs/requirements/cli-capability-migration.md @@ -0,0 +1,748 @@ +--- +kind: spec +status: active +source_of_truth: true +--- + +# Official Mosaic CLI Capability and Tool Migration + +- **Workstream:** T78 +- **Status:** active requirements contract, implementation held by the M0 gates +- **Decision authority:** Jason Woltje +- **Design owner:** Vision +- **Integration trunk:** `next` + +This contract is authoritative only on the integration trunk `next`. Branch copies are proposals. +Publication does not authorize implementation until the M0 milestone, task-graph, interface, and +partition gates pass. + +## 1. Purpose + +Migrate agent-facing operations from directly invoked scripts into documented, first-class command +groups in the existing TypeScript and Node.js `mosaic` CLI. The CLI becomes the stable interface +for operators, agents, the webUI, future seat containers, and future `mosaicd` execution. + +The mission also phases out the installed `~/.config/mosaic/tools` script surface. Existing scripts +may remain private compatibility adapters only while measured consumers still require them. + +## 2. Product alignment + +Items 1 through 3 implement PRD D8 and D12: + +1. The CLI is the primary execution surface. +2. The webUI uses Gateway APIs backed by the same official capability contracts. +3. A missing official capability is built before a webUI bypass is accepted. + +This contract adds one explicit extension beyond D8 and D12: no harness, skill, or agent receives a +separate business-logic path around the CLI and Gateway capability contract. + +This contract does not replace the fleet north star, issue `#1382`, the fleet configuration +contract `#758`, the exact fleet communications contract `#766`, or future container and `mosaicd` +specifications. It defines the interfaces those tracks consume. + +## 3. Fixed decisions + +| ID | Decision | +| ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | +| T78-D1 | Extend the existing official TypeScript and Node.js `mosaic` CLI. A second Python or shell entrypoint is forbidden. | +| T78-D2 | Expose documented groups such as `mosaic git`, `mosaic comms`, and `mosaic ci`. A generic public `mosaic tools` passthrough is forbidden. | +| T78-D3 | Resolve homes, endpoints, sockets, tool locations, and runtime paths through the central registry and one typed resolver. Commands do not hard-code them. | +| T78-D4 | One rootless container per seat is the target sandbox. It has a read-only root filesystem, no container-runtime socket, and lifecycle through future `mosaicd`. | +| T78-D5 | Dispatch is per-site. Localhost `orch-01` alone dispatches USC-seat implementation. Homelab `orch-01` alone dispatches homelab-seat implementation and homelab-owned surfaces. | +| T78-D6 | Tmux and fleet-comms remain temporary communications adapters behind a transport-neutral CLI contract. | +| T78-D7 | Decommissioning is phased and mechanically enforced. Removal requires zero measured consumers and a discriminating planted-reference control. | + +Derived security boundary: + +- `~/.mosaic/tools` is canonical working source during migration. It is not automatically trusted + runtime installation state. +- Reviewed source is promoted into installed or packaged runtime artifacts. +- A multi-writer brain-repository push must not silently replace credential-bearing executable code + used by every seat. + +## 4. Explicitly rejected alternatives + +| Alternative | Rejection reason | +| ---------------------------------------------------- | ------------------------------------------------------------------------------------------------------ | +| Separate Python CLI | Creates a second contract, release path, and policy surface. | +| Public `mosaic tools