feat: add TypeScript installation wizard with @clack/prompts TUI

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>
This commit is contained in:
2026-02-21 12:22:44 -06:00
parent 9ccd13fae7
commit cdd3ca07be
45 changed files with 20193 additions and 1 deletions

View File

@@ -37,8 +37,21 @@ if [ ! -f "$WORK_DIR/bootstrap/install.sh" ]; then
exit 1
fi
echo "[mosaic] Running install..."
cd "$WORK_DIR/bootstrap"
# Prefer TypeScript wizard if Node.js 18+ and bundle are available
WIZARD_BIN="$WORK_DIR/bootstrap/dist/mosaic-wizard.mjs"
if command -v node >/dev/null 2>&1 && [ -f "$WIZARD_BIN" ]; then
NODE_MAJOR="$(node -e 'console.log(process.versions.node.split(".")[0])')"
if [ "$NODE_MAJOR" -ge 18 ] 2>/dev/null; then
echo "[mosaic] Running wizard installer (Node.js $NODE_MAJOR detected)..."
node "$WIZARD_BIN" --source-dir "$WORK_DIR/bootstrap"
echo "[mosaic] Cleaning up temporary files..."
exit 0
fi
fi
echo "[mosaic] Running legacy install..."
bash install.sh
echo "[mosaic] Cleaning up temporary files..."