feat: wizard remediation — password mask, hooks preview, headless (IUH-M02) #431

Merged
jason.woltje merged 1 commits from feat/wizard-remediation into main 2026-04-05 17:47:54 +00:00
Owner

Summary

  • AC-3: Replace plaintext password prompt with masked reader (promptMasked) that suppresses echo and requires password confirmation. Min-8-char validation is preserved.
  • AC-4: Add hooksPreviewStage in the wizard (between runtime detection and skills selection) showing each hook event/matcher/command and prompting for user consent. Add mosaic config hooks list|enable|disable for post-install hook management.
  • AC-5: Add headless install path to runConfigWizard and bootstrapFirstUser, activated by MOSAIC_ASSUME_YES=1 or non-TTY stdin. All required env vars are documented in packages/mosaic/README.md.

Test plan

  • pnpm --filter @mosaicstack/mosaic lint — passes (0 errors)
  • pnpm --filter @mosaicstack/mosaic typecheck — no new errors (pre-existing @mosaicstack/brain etc. module errors unchanged)
  • pnpm format:check — passes
  • pnpm --filter @mosaicstack/mosaic test — 20 spec files pass (185 tests), 1 pre-existing failure (cli-smoke.spec.ts) unchanged
  • New spec files: masked-prompt.spec.ts (3 tests), hooks-preview.spec.ts (6 tests), config.spec.ts extended (+8 tests for hooks subcommands)
  • Manual: mosaic gateway install with MOSAIC_ASSUME_YES=1 and required env vars set — completes without prompts
  • Manual: mosaic wizard with Claude detected — shows hooks preview stage
  • Manual: mosaic config hooks list — shows installed hooks table

Closes #426

🤖 Generated with Claude Code

## Summary - AC-3: Replace plaintext password prompt with masked reader (`promptMasked`) that suppresses echo and requires password confirmation. Min-8-char validation is preserved. - AC-4: Add `hooksPreviewStage` in the wizard (between runtime detection and skills selection) showing each hook event/matcher/command and prompting for user consent. Add `mosaic config hooks list|enable|disable` for post-install hook management. - AC-5: Add headless install path to `runConfigWizard` and `bootstrapFirstUser`, activated by `MOSAIC_ASSUME_YES=1` or non-TTY stdin. All required env vars are documented in `packages/mosaic/README.md`. ## Test plan - [ ] `pnpm --filter @mosaicstack/mosaic lint` — passes (0 errors) - [ ] `pnpm --filter @mosaicstack/mosaic typecheck` — no new errors (pre-existing `@mosaicstack/brain` etc. module errors unchanged) - [ ] `pnpm format:check` — passes - [ ] `pnpm --filter @mosaicstack/mosaic test` — 20 spec files pass (185 tests), 1 pre-existing failure (`cli-smoke.spec.ts`) unchanged - [ ] New spec files: `masked-prompt.spec.ts` (3 tests), `hooks-preview.spec.ts` (6 tests), `config.spec.ts` extended (+8 tests for hooks subcommands) - [ ] Manual: `mosaic gateway install` with `MOSAIC_ASSUME_YES=1` and required env vars set — completes without prompts - [ ] Manual: `mosaic wizard` with Claude detected — shows hooks preview stage - [ ] Manual: `mosaic config hooks list` — shows installed hooks table Closes #426 🤖 Generated with [Claude Code](https://claude.com/claude-code)
jason.woltje added 1 commit 2026-04-05 17:36:36 +00:00
feat: wizard remediation — password mask, hooks preview, headless (IUH-M02)
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/pr/ci Pipeline was successful
d5d7a9ab43
Implements three wizard UX gaps identified in issue #426:

AC-3: Replace plaintext password prompt in bootstrapFirstUser with a
masked reader (promptMasked) that suppresses echo and requires the user
to type their password twice to confirm. Min-8-chars validation is
preserved and applied after both entries agree.

AC-4: Add a hooks-preview stage (hooksPreviewStage) between
runtimeSetupStage and skillsSelectStage in the wizard. The stage
parses hooks-config.json, displays each hook event/matcher/command,
and prompts the user for consent before installation. Declined → state
recorded with accepted=false. Also adds `mosaic config hooks list|enable|
disable` subcommands to manage installed hooks in ~/.claude/ post-install.

AC-5: Add headless install path to runConfigWizard and bootstrapFirstUser
gated on MOSAIC_ASSUME_YES=1 or !process.stdin.isTTY. Env-var-driven
configuration with required-var validation and non-zero exit on missing
or invalid inputs. Documents all env vars in packages/mosaic/README.md.

Closes #426

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje force-pushed feat/wizard-remediation from d5d7a9ab43 to eca863b282 2026-04-05 17:44:39 +00:00 Compare
jason.woltje merged commit cd8b1f666d into main 2026-04-05 17:47:54 +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: mosaicstack/stack#431