Skip to content

docs: tell quickstart readers the setup wizard exists - #3573

Merged
kojiwakayama merged 3 commits into
mainfrom
fix/dx-20260811-b2-16
Aug 11, 2026
Merged

kojiwakayama merged 3 commits into
mainfrom
fix/dx-20260811-b2-16

Conversation

@kojiwakayama

@kojiwakayama kojiwakayama commented Aug 11, 2026 •

Copy link
Copy Markdown
Contributor

Found during a DX dogfood walk of the published getting-started flow.

Symptom

The quickstart told readers to run:

npm create veryfront@latest support-agent

and then said only: "The ai-agent starter is the default. Pass -- --template <template> when you want a different starting point." The page presents scaffolding as one automatic step.

In a real terminal that command does not scaffold anything. It stops and waits:

Let's set up your project.
Choose a starter template:
  ● AI Agent
    Minimal
    ...

and blocks indefinitely — there is no timeout and no non-interactive fallback once a tty is present. Answering that prompt reveals the wizard is not one question but three: Choose a starter template:, then Select runtime:, then Initialize Git?. None of "wizard", "Select runtime", or "Initialize Git" appeared anywhere in the published docs for npm create.

Reproduced against this tree with a pty driver on cli/main.ts init probe-app: blocked on the template prompt until the harness killed it; with two Enters it walked template -> runtime -> git and stalled on git.

Root cause

Doc drift, not a CLI defect. shouldRunWizard() (cli/commands/init/interactive-wizard.ts) returns true whenever --template is absent, and runInteractiveWizard() then prompts for template (line 129), runtime (line 155) and git (line 184). The quickstart documented the one invocation that trips this gate while describing the outcome of the invocation that does not.

Fix

  • docs/getting-started/quickstart.md: the documented command now passes -- --template ai-agent, and the prose says what omitting it does (three-question wizard) and what happens in non-interactive shells (ai-agent, Node.js, no git).
  • docs/getting-started/create-project.md: replaces "The wizard preselects the ai-agent template" with all three questions and their preselected answers, plus the two ways to skip the wizard.

No CLI behaviour changes.

Regression test

cli/commands/init/interactive-wizard.test.ts — it lives next to the gate it protects, so the doc claim and the code that makes it true fail together:

  • reads the quickstart's create command, extracts --template, and asserts shouldRunWizard() returns false for it. Drop the flag from the doc and the test fails.
  • asserts create-project.md contains every SETUP_COPY prompt string verbatim. Add or rename a wizard prompt and the test fails until the page is updated.

Both failed before the doc edits (shouldRunWizard returned true; the page did not contain "Choose a starter template:") and pass after.

Verification

Doc claims checked against real CLI output, not just source:

  • init probe-app in a pty: blocks on Choose a starter template: with AI Agent preselected; two Enters expose Select runtime: (Node.js preselected) and Initialize Git? (Yes preselected).
  • init probe-app --template ai-agent in a pty: no prompt at all, straight to install, ✓ probe-app ready, and no .git in the scaffold — confirming --template skips the runtime and git questions too.
  • scripts/docs/validate-guides.ts passes (one pre-existing unrelated warning).

Summary by CodeRabbit

  • Documentation
    • Updated the quickstart guide with the recommended ai-agent template and clarified interactive and non-interactive setup behavior.
    • Expanded project creation guidance to explain wizard prompts, default selections, and how to bypass the wizard.
  • Tests
    • Added validation to ensure getting-started documentation stays aligned with the interactive project creation experience.

@coderabbitai

coderabbitai Bot commented Aug 11, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@kojiwakayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 32 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: a94c9d98-dbdd-4c59-9d4b-21e9d1935d92

📥 Commits

Reviewing files that changed from the base of the PR and between fe4600b and 3c8879d.

📒 Files selected for processing (1)
  • docs/getting-started/create-project.md
📝 Walkthrough

Walkthrough

The getting-started documentation now describes interactive wizard prompts and non-interactive defaults. Tests read the documentation and verify that key commands and prompt labels match wizard behavior.

Changes

Wizard documentation alignment

Layer / File(s) Summary
Document wizard behavior
docs/getting-started/create-project.md, docs/getting-started/quickstart.md
The documentation describes the template, runtime, and Git prompts, their defaults, non-interactive behavior, and the effect of --template.
Validate documentation contracts
cli/commands/init/interactive-wizard.test.ts
Tests read the getting-started documentation and verify the documented template command and wizard prompt labels.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested reviewers: kwakayama, ariskemper

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main documentation change: informing quickstart readers about the setup wizard.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/dx-20260811-b2-16

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ccfb5f64eb

ℹ️ 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".

Comment thread docs/getting-started/quickstart.md Outdated
The quickstart's create command omitted --template, so in a real terminal
it opened a blocking three-prompt wizard the page never mentioned. Pass
--template ai-agent in the documented command and describe the wizard
(template, runtime, git) on the create-project page.

Adds a regression test that ties both pages to shouldRunWizard() and
SETUP_COPY so wizard changes cannot silently outrun the docs.

Found during a DX dogfood walk.
@kojiwakayama
kojiwakayama force-pushed the fix/dx-20260811-b2-16 branch from ccfb5f6 to fe4600b Compare August 11, 2026 09:59

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
cli/commands/init/interactive-wizard.test.ts (1)

47-69: 🗄️ Data Integrity & Integration | 🔵 Trivial | ⚡ Quick win

Assert the complete documentation contract.

Line 58 accepts any value after --template, so the test passes if the quickstart uses an unsupported template. Lines 62-66 check prompt presence only, so they do not protect prompt order or defaults. Assert -- --template ai-agent, verify the prompt positions, and check the three documented defaults.

Proposed assertions
       const template = /--template\s+([a-z0-9-]+)/.exec(createCommand)?.[1];
+      assertStringIncludes(createCommand, "-- --template ai-agent");
+      assertEquals(template, "ai-agent");
       assertEquals(shouldRunWizard({ template }), false);
...
-      for (const prompt of [SETUP_COPY.template, SETUP_COPY.runtime, SETUP_COPY.git]) {
+      const prompts = [SETUP_COPY.template, SETUP_COPY.runtime, SETUP_COPY.git];
+      for (const prompt of prompts) {
         assertStringIncludes(createProject, prompt);
       }
+      const positions = prompts.map((prompt) => createProject.indexOf(prompt));
+      assertEquals(positions, [...positions].sort((a, b) => a - b));
+      for (const defaultText of ["preselects ai-agent", "preselects Node.js", "preselects Yes"]) {
+        assertStringIncludes(createProject, defaultText);
+      }

This protects the documented command and the wizard prompt contract shown in the supplied context.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@cli/commands/init/interactive-wizard.test.ts` around lines 47 - 69,
Strengthen the “getting-started docs match wizard behaviour” tests: require the
quickstart create command to contain the exact “-- --template ai-agent” argument
and verify that it disables shouldRunWizard. In the create-project documentation
test, assert SETUP_COPY.template, SETUP_COPY.runtime, and SETUP_COPY.git appear
in that order, and validate each prompt’s documented default value rather than
only checking prompt presence.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/getting-started/create-project.md`:
- Around line 29-30: Update the keyboard instruction in the getting-started
prompt to explicitly say users can change an answer first, using concise,
active, present-tense language.

---

Nitpick comments:
In `@cli/commands/init/interactive-wizard.test.ts`:
- Around line 47-69: Strengthen the “getting-started docs match wizard
behaviour” tests: require the quickstart create command to contain the exact “--
--template ai-agent” argument and verify that it disables shouldRunWizard. In
the create-project documentation test, assert SETUP_COPY.template,
SETUP_COPY.runtime, and SETUP_COPY.git appear in that order, and validate each
prompt’s documented default value rather than only checking prompt presence.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 38715925-cf95-4e88-a493-aeb8f4ee2529

📥 Commits

Reviewing files that changed from the base of the PR and between 718355c and fe4600b.

📒 Files selected for processing (3)
  • cli/commands/init/interactive-wizard.test.ts
  • docs/getting-started/create-project.md
  • docs/getting-started/quickstart.md

Comment thread docs/getting-started/create-project.md Outdated
@kojiwakayama
kojiwakayama added this pull request to the merge queue Aug 11, 2026
Merged via the queue into main with commit 22bd355 Aug 11, 2026
57 of 60 checks passed
@kojiwakayama
kojiwakayama deleted the fix/dx-20260811-b2-16 branch August 11, 2026 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant