feat: TypeScript installation wizard with @clack/prompts TUI #1

Merged
jason.woltje merged 2 commits from feature/wizard-installer into main 2026-02-21 18:25:52 +00:00
Owner

Summary

  • Replaces bash mosaic-init with a modern 9-stage TypeScript wizard using @clack/prompts
  • Configures SOUL.md (agent identity), USER.md (user profile), TOOLS.md (tool reference)
  • Detects installed runtimes (Claude, Codex, OpenCode) and configures MCP sequential-thinking
  • Skills catalog with categorized selection (8 categories, ~100 skills)
  • Quick Start (~2 min) and Advanced modes
  • HeadlessPrompter for --non-interactive and CI usage
  • ConfigService abstraction layer designed for future DB migration (SQLite/Postgres)
  • Bundled as single dist/mosaic-wizard.mjs (547 KB) via tsdown — no node_modules needed at runtime
  • mosaic init prefers wizard when Node.js 18+ is available, falls back to bash
  • remote-install.sh updated with Node.js detection and wizard preference
  • 30 tests covering template engine, builder functions, wizard stages, and full integration

Architecture

Three-layer design inspired by OpenClaw:

  • Flow Logic (wizard.ts + stages/*.ts) — pure business logic
  • Prompt Abstraction (WizardPrompter interface) — 10+ methods
  • Implementations — ClackPrompter (interactive TUI), HeadlessPrompter (CI/tests)

Test plan

  • pnpm typecheck passes
  • pnpm build produces dist/mosaic-wizard.mjs
  • pnpm test — 30/30 tests pass (unit + integration)
  • Integration tests verify SOUL.md/USER.md output parity with mosaic-init
  • CLI overrides correctly bypass prompt stages
  • Code review completed — fixed path injection, double-write, validation gaps
## Summary - Replaces bash `mosaic-init` with a modern 9-stage TypeScript wizard using `@clack/prompts` - Configures SOUL.md (agent identity), USER.md (user profile), TOOLS.md (tool reference) - Detects installed runtimes (Claude, Codex, OpenCode) and configures MCP sequential-thinking - Skills catalog with categorized selection (8 categories, ~100 skills) - Quick Start (~2 min) and Advanced modes - HeadlessPrompter for `--non-interactive` and CI usage - ConfigService abstraction layer designed for future DB migration (SQLite/Postgres) - Bundled as single `dist/mosaic-wizard.mjs` (547 KB) via tsdown — no node_modules needed at runtime - `mosaic init` prefers wizard when Node.js 18+ is available, falls back to bash - `remote-install.sh` updated with Node.js detection and wizard preference - 30 tests covering template engine, builder functions, wizard stages, and full integration ## Architecture Three-layer design inspired by OpenClaw: - **Flow Logic** (wizard.ts + stages/*.ts) — pure business logic - **Prompt Abstraction** (WizardPrompter interface) — 10+ methods - **Implementations** — ClackPrompter (interactive TUI), HeadlessPrompter (CI/tests) ## Test plan - [x] `pnpm typecheck` passes - [x] `pnpm build` produces dist/mosaic-wizard.mjs - [x] `pnpm test` — 30/30 tests pass (unit + integration) - [x] Integration tests verify SOUL.md/USER.md output parity with mosaic-init - [x] CLI overrides correctly bypass prompt stages - [x] Code review completed — fixed path injection, double-write, validation gaps
jason.woltje added 2 commits 2026-02-21 18:25:37 +00:00
Introduce user profile (USER.md) and machine tool reference (TOOLS.md)
as first-class framework files. Both ship as generic defaults and are
personalized via mosaic init.

- Add USER.md/TOOLS.md defaults and parameterized templates
- Update AGENTS.md load order (6 → 8 steps)
- Update SOUL.md: default name "Assistant", add trash/mental-notes guardrails
- Update install.sh: preserve USER.md/TOOLS.md on reinstall
- Update mosaic-init: interactive USER.md + TOOLS.md generation
- Update mosaic-doctor: existence checks for new files
- Update mosaic launcher: inject USER.md/TOOLS.md into runtime prompt
- Update README: architecture diagram, generic-repo policy note

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace bash mosaic-init with a modern 9-stage wizard:
- SOUL.md identity, USER.md profile, TOOLS.md configuration
- Runtime detection (Claude, Codex, OpenCode) + MCP setup
- Skills catalog with categorized selection
- Quick Start and Advanced modes
- HeadlessPrompter for --non-interactive and CI usage
- ConfigService abstraction layer for future DB migration
- Bundled as single dist/mosaic-wizard.mjs via tsdown
- mosaic init now prefers wizard when Node.js is available
- 30 tests covering stages, templates, and integration

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
jason.woltje merged commit 6a84f7e210 into main 2026-02-21 18:25:52 +00:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: mosaic/bootstrap#1