Prior sessions left three different missions spread across the docs: - docs/MISSION-MANIFEST.md: Harness Foundation (complete) - docs/TASKS.md: Storage Abstraction Retrofit (P1-P4 done, P5 pending) - docs/scratchpads/mvp-20260312.md: MVP mission (stale) Reset the working state to a single clean mission focused on what actually needs to happen next: unify the mosaic CLI, add first-class commands for every sub-package, fix the gateway bootstrap token recovery dead-end, and stitch the install UX end-to-end. Changes: - Move Harness Foundation manifest + PRD to docs/archive/missions/harness-20260321/ - Move Storage Abstraction TASKS.md to docs/archive/missions/storage-abstraction/ - Scaffold new docs/MISSION-MANIFEST.md for cli-unification-20260404 with 8 milestones (M1 done via PR #398, M2 in-progress via this PR) - Scaffold new docs/TASKS.md with per-milestone task breakdown, dependencies, agent assignments, and token estimates - Scaffold docs/scratchpads/cli-unification-20260404.md with full planning decisions, gateway bootstrap bug root cause analysis, telemetry architecture notes, and open risks Left intact: - docs/PRD.md (v0.1.0, 1005 lines) — still the long-term target - docs/PRD-TUI_Improvements.md — active TUI work - docs/scratchpads/* historical task scratchpads — append-only breadcrumbs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
11 KiB
11 KiB
Tasks — CLI Unification & E2E First-Run
Single-writer: orchestrator only. Workers read but never modify.
Mission: cli-unification-20260404 Schema:
| id | status | description | issue | agent | branch | depends_on | estimate | notes |Status values:not-started|in-progress|done|blocked|failed|needs-qaAgent values:codex|sonnet|haiku|opus|glm-5|—(auto)
Milestone 1 — Kill legacy @mosaicstack/cli (done)
| id | status | description | issue | agent | branch | depends_on | estimate | notes |
|---|---|---|---|---|---|---|---|---|
| CU-01-01 | done | Delete packages/cli directory; update workspace + docs references | #398 | opus | chore/remove-cli-package-duplicate | — | 5K | Merged c39433c3. 6685 LOC−. |
Milestone 2 — Archive stale mission + scaffold new mission (in-progress)
| id | status | description | issue | agent | branch | depends_on | estimate | notes |
|---|---|---|---|---|---|---|---|---|
| CU-02-01 | in-progress | Move stale MISSION-MANIFEST / TASKS / PRD-Harness to docs/archive/ | — | opus | docs/mission-cli-unification | CU-01-01 | 3K | Harness + storage missions done. |
| CU-02-02 | in-progress | Scaffold new MISSION-MANIFEST.md, TASKS.md, scratchpad | — | opus | docs/mission-cli-unification | CU-02-01 | 5K | This file + manifest + scratchpad |
| CU-02-03 | not-started | PR review, merge, branch cleanup | — | opus | docs/mission-cli-unification | CU-02-02 | 2K | Must be green CI + merged |
Milestone 3 — Gateway bootstrap token recovery
| id | status | description | issue | agent | branch | depends_on | estimate | notes |
|---|---|---|---|---|---|---|---|---|
| CU-03-01 | not-started | Design recovery flow (filesystem-signed nonce vs authenticated cookie vs rescue CLI flag) | — | opus | — | CU-02-03 | 8K | Spike |
| CU-03-02 | not-started | Server: add recovery/rotate endpoint on apps/gateway/src/admin (gated by design from CU-03-01) | — | sonnet | — | CU-03-01 | 12K | |
| CU-03-03 | not-started | CLI: mosaic gateway login — interactive BetterAuth sign-in, persist session |
— | sonnet | — | CU-03-02 | 10K | |
| CU-03-04 | not-started | CLI: mosaic gateway config rotate-token — mint new admin token via authenticated API |
— | sonnet | — | CU-03-03 | 8K | |
| CU-03-05 | not-started | CLI: mosaic gateway config recover-token — execute the recovery flow from CU-03-01 |
— | sonnet | — | CU-03-03 | 10K | |
| CU-03-06 | not-started | Install UX: fix the "user exists, no token" dead-end in runInstall bootstrapFirstUser path | — | sonnet | — | CU-03-05 | 8K | |
| CU-03-07 | not-started | Tests: integration tests for each recovery path (happy + error) | — | sonnet | — | CU-03-06 | 10K | |
| CU-03-08 | not-started | Code review + remediation | — | haiku | — | CU-03-07 | 4K |
Milestone 4 — mosaic --help alphabetize + grouping
| id | status | description | issue | agent | branch | depends_on | estimate | notes |
|---|---|---|---|---|---|---|---|---|
| CU-04-01 | not-started | Enable configureHelp({ sortSubcommands: true }) on root program and each subgroup |
— | sonnet | — | CU-02-03 | 3K | |
| CU-04-02 | not-started | Group commands into sections (Runtime, Gateway, Framework, Platform) in help output | — | sonnet | — | CU-04-01 | 5K | |
| CU-04-03 | not-started | Verify help snapshots render readably; update any docs with stale output | — | haiku | — | CU-04-02 | 3K |
Milestone 5 — Sub-package CLI surface
Pattern: each sub-package exports
register<Name>Command(program: Command)co-located with the library code (proven by@mosaicstack/quality-rails). Wire intopackages/mosaic/src/cli.ts.
| id | status | description | issue | agent | branch | depends_on | estimate | notes |
|---|---|---|---|---|---|---|---|---|
| CU-05-01 | not-started | mosaic forge — subcommands: run, status, resume, personas list |
— | sonnet | — | CU-02-03 | 18K | User priority |
| CU-05-02 | not-started | mosaic storage — subcommands: status, tier show, tier switch, export, import, migrate |
— | sonnet | — | CU-02-03 | 15K | |
| CU-05-03 | not-started | mosaic queue — subcommands: list, stats, pause/resume, jobs tail, drain |
— | sonnet | — | CU-02-03 | 12K | |
| CU-05-04 | not-started | mosaic memory — subcommands: search, stats, insights list, preferences list |
— | sonnet | — | CU-02-03 | 12K | |
| CU-05-05 | not-started | mosaic brain — subcommands: projects list/create, missions list, tasks list, conversations list |
— | sonnet | — | CU-02-03 | 15K | |
| CU-05-06 | not-started | mosaic auth — subcommands: users list/create/delete, sso list, sso test, sessions list |
— | sonnet | — | CU-03-03 | 15K | needs gateway login |
| CU-05-07 | not-started | mosaic log — subcommands: tail, search, export, level <level> |
— | sonnet | — | CU-02-03 | 10K | |
| CU-05-08 | not-started | mosaic macp — subcommands: tasks list, submit, gate, events tail |
— | sonnet | — | CU-02-03 | 12K | |
| CU-05-09 | not-started | Wire all eight register<Name>Command calls into packages/mosaic/src/cli.ts |
— | haiku | — | CU-05-01…8 | 3K | |
| CU-05-10 | not-started | Integration test: mosaic <cmd> --help exits 0 for every new command |
— | haiku | — | CU-05-09 | 5K |
Milestone 6 — mosaic telemetry
| id | status | description | issue | agent | branch | depends_on | estimate | notes |
|---|---|---|---|---|---|---|---|---|
| CU-06-01 | not-started | Add @mosaicstack/telemetry-client-js as dependency of @mosaicstack/mosaic from Gitea registry |
— | sonnet | — | CU-02-03 | 3K | |
| CU-06-02 | not-started | mosaic telemetry local — status, tail, Jaeger link (wraps existing apps/gateway/src/tracing.ts) |
— | sonnet | — | CU-06-01 | 8K | |
| CU-06-03 | not-started | mosaic telemetry — status, opt-in, opt-out, test, upload (uses telemetry-client-js) |
— | sonnet | — | CU-06-01 | 12K | Dry-run mode when server endpoint not yet live |
| CU-06-04 | not-started | Persistent consent state in mosaic config; disabled by default | — | sonnet | — | CU-06-03 | 5K | |
| CU-06-05 | not-started | Tests + code review | — | haiku | — | CU-06-04 | 5K |
Milestone 7 — Unified first-run UX
| id | status | description | issue | agent | branch | depends_on | estimate | notes |
|---|---|---|---|---|---|---|---|---|
| CU-07-01 | not-started | tools/install.sh: after npm install, hand off to mosaic wizard then mosaic gateway install |
— | sonnet | — | CU-03-06 | 10K | |
| CU-07-02 | not-started | mosaic wizard and mosaic gateway install coordination: shared state, no duplicate prompts |
— | sonnet | — | CU-07-01 | 12K | |
| CU-07-03 | not-started | Post-install verification step: "gateway healthy, tui connects, admin token on file" | — | sonnet | — | CU-07-02 | 8K | |
| CU-07-04 | not-started | End-to-end test on a clean container from scratch | — | haiku | — | CU-07-03 | 8K |
Milestone 8 — Docs + release
| id | status | description | issue | agent | branch | depends_on | estimate | notes |
|---|---|---|---|---|---|---|---|---|
| CU-08-01 | not-started | Update README.md with new command tree, install flow, and feature list | — | sonnet | — | CU-07-04 | 8K | |
| CU-08-02 | not-started | Update docs/guides/user-guide.md with all new sub-package commands | — | sonnet | — | CU-08-01 | 10K | |
| CU-08-03 | not-started | Version bump @mosaicstack/mosaic, publish to Gitea registry |
— | opus | — | CU-08-02 | 3K | |
| CU-08-04 | not-started | Release notes, tag v0.1.0-rc.N, publish release on Gitea |
— | opus | — | CU-08-03 | 3K |