[recipes] Add install-time wiki/crm surface toggles to bootstrap - #64
[recipes] Add install-time wiki/crm surface toggles to bootstrap#64alanshurafa wants to merge 1 commit into
Conversation
Surfaces are on by default for a zero-setup first run, but users who only want part of the stack need a way to opt out (or explicitly opt in) at install time instead of editing the script. Adds --enable/ --disable alongside the existing --bundle, plus a plan-time "Surfaces:" summary and a re-check hint for whatever's left disabled. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6148ac0b3
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| // --yes. --dry-run never reaches this (it returns before main's confirm | ||
| // call), so it is not part of this check. | ||
| function shouldPrompt(flags) { | ||
| return Boolean(process.stdout.isTTY) && !flags.yes; |
There was a problem hiding this comment.
Require stdin TTY before prompting
When stdout is a TTY but stdin is a pipe, this still enters confirm() and waits for input/EOF that a user cannot provide; for example, a terminal run like tail -f /dev/null | node bootstrap.mjs --project-ref ... hangs at Proceed? instead of proceeding prompt-free as the new piped-run behavior describes. Check process.stdin.isTTY as well before showing the interactive prompt.
Useful? React with 👍 / 👎.
Contribution Type
/recipes)What does this do?
Makes the fresh-install experience "enabled by default, easy to opt out" for the Wiki and CRM surfaces. The installer already defaulted to the
wiki-crmbundle; this adds discoverable install-time toggles so you don't have to know bundle names or edit the script:--disable crm/--disable wiki(comma-list): opt a surface out.--enable wiki,crm: explicit set (replaces the default).--bundle <name>: unchanged, still works as an explicit alias.Precedence
--bundle>--enable> default-minus---disable; the three combinations are mutually exclusive and fail fast with clear messages. The plan now prints a plain-languageSurfaces: Wiki (enabled), CRM (disabled)line, an interactiveProceed? [Y/n]confirm (TTY-only, skipped by--yesand never reached under--dry-run), and — for anything left disabled — an actionable hint pointing at either a re-run or the dashboard's existing "Re-check now" flow.Design note
"Composing surfaces" is a lookup, not a re-merge: each legal
{wiki, crm}combination already exists as a hand-orderedBUNDLESentry, so surface selection maps to an existing bundle key and the schema/function dependency order can't drift. No SQL, no schema changes, no new deps (stdlib Node).Manual verification
node --checkclean.--dry-runacross default /--disable crm/--disable wiki/--disable wiki,crm/--enable crm/--bundle wiki— each resolves to the correct pre-ordered bundle; Surfaces line correct; zero network calls; zero prompts.--dry-run </dev/null) confirmed prompt-free (no hang) — the confirm is gated onprocess.stdout.isTTY && !--yes.--enable+--disable,--bundle+--enable, unknown surface, empty list.markdownlint-cli2 --config .github/.markdownlint.jsoncon the README: 0 errors.The live apply/deploy/verify paths are unchanged (only the resolved bundle values feed them), so this carries no new live-project gate beyond the installer's existing first-run acceptance step.
Checklist
README.mdwith prerequisites, step-by-step instructions, and expected outcomemetadata.jsonhas all required fields🤖 Generated with Claude Code