Skip to content

docs: use --target for the documented veryfront install commands - #3558

Merged
kojiwakayama merged 2 commits into
mainfrom
fix/dx-20260811-0742-7
Aug 11, 2026
Merged

docs: use --target for the documented veryfront install commands#3558
kojiwakayama merged 2 commits into
mainfrom
fix/dx-20260811-0742-7

Conversation

@kojiwakayama

@kojiwakayama kojiwakayama commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Symptom

Found by a DX dogfood walk of https://veryfront.com/docs/code/getting-started/installation against published CLI 0.1.1228.

The "Coding-agent setup" section says starter templates include AGENTS.md and that older projects can install the same guide with:

veryfront install agents

Running that in a fresh project writes a different file:

$ veryfront install agents

  Installing AI integrations...

  ✓ SKILL.md

  ✓ Your AI assistants now know Veryfront!

Exit 0, no warning. The reader is told they are getting AGENTS.md and ends up with SKILL.md — a file the surrounding docs never mention. The same wrong command form appears in docs/guides/coding-agents.md, including the four tool-specific one-liners (veryfront install claude-code, cursor, copilot, windsurf).

Reproduced against this tree at fe5d5b895 (the v0.1.1228 release commit), so it is not already fixed.

Root cause

install takes its tool target from --target only:

// cli/commands/install/handler.ts
export const parseInstallArgs = createArgParser(InstallArgsSchema, {
  target: { keys: ["target", "t"], type: "string" },
  ...
});

There is no positional spec, so the bare agents token lands in args._ and is dropped. installCommand then sees target === undefined and falls through to the interactive picker; in a non-TTY it returns the auto-detected defaults, and detect.ts marks skill as always-suggested and agents as never auto-detected — hence SKILL.md.

veryfront install --target agents writes AGENTS.md exactly as the prose describes, so the CLI behaviour is intact and the documented invocation was wrong. This is filed as a doc bug per the dogfood classification. Making the positional an alias for --target would be the alternative fix; that is a CLI behaviour change and is deliberately out of scope here.

Fix

Corrects the documented invocations to the supported --target form in docs/getting-started/installation.md and docs/guides/coding-agents.md, and adds one sentence noting that the flagless form opens the interactive picker. No CLI code changed.

Regression test

tests/docs/cli-install-commands.test.ts (Deno BDD).

It lives in tests/docs/ because that is where this repo already keeps docs-contract tests that read docs/** (guide-contracts.test.ts, guide-code-examples.test.ts), and because the bug is fully reproducible in-process — no browser, no deployment, no credentials — so it runs in the pre-push gate.

The test does not hard-code the corrected string. It extracts every veryfront install ... line from shell fences under docs/getting-started, docs/guides and docs/concepts, feeds each through the real parseCliArgsparseInstallArgsparseTargetFlag pipeline, and asserts:

  1. every documented install command actually selects a target instead of being silently ignored, and
  2. the pages that promise AGENTS.md document a command whose resolved target maps to AGENTS.md in the install registry.

Confirmed failing before the doc change, for the right reason:

- [
-   "docs/getting-started/installation.md: veryfront install agents",
-   "docs/guides/coding-agents.md: veryfront install agents",
-   "docs/guides/coding-agents.md: veryfront install claude-code",
-   "docs/guides/coding-agents.md: veryfront install copilot",
-   "docs/guides/coding-agents.md: veryfront install cursor",
-   "docs/guides/coding-agents.md: veryfront install windsurf",
- ]
+ []

AssertionError: docs/getting-started/installation.md promises AGENTS.md but
documents no install command that writes it (writes: nothing)

Two existing contracts pinned the old snippet (tests/docs/guide-contracts.test.ts, tests/docs/guide-code-examples.test.ts); both are updated to the corrected form.

Verification

  • deno test tests/docs/ — 51 passed, 0 failed
  • deno test cli/commands/install/ — 15 passed, 0 failed
  • deno task docs:validate — all 1226 doc links OK
  • Original symptom rerun against this worktree's build: veryfront install --target agents✓ AGENTS.md
  • Full pre-push suite passed

Summary by CodeRabbit

  • Documentation

    • Updated installation instructions to use the veryfront install --target <agent> command format.
    • Added guidance for interactive target selection when running veryfront install without a target.
    • Clarified setup steps for tools that generate AGENTS.md.
  • Tests

    • Added automated checks to ensure documented installation commands specify valid targets.
    • Updated documentation tests for the new command syntax.

`veryfront install` reads its tool target from `--target` only; a bare
positional is silently dropped and the command falls back to auto-detection,
which in a fresh project writes SKILL.md. The installation and coding-agents
pages both printed `veryfront install agents` while promising AGENTS.md.

Adds a docs contract test that runs every `veryfront install ...` line in the
published docs through the real CLI arg pipeline and asserts it selects a
target, plus that the pages promising AGENTS.md document a command that
actually writes it.
@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: 16 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: e2dcdb87-51a7-4974-af90-d34d2a304b37

📥 Commits

Reviewing files that changed from the base of the PR and between b8fc20c and 7357d32.

📒 Files selected for processing (2)
  • docs/guides/coding-agents.md
  • tests/docs/cli-install-commands.test.ts
📝 Walkthrough

Walkthrough

The documentation now uses explicit --target installation commands. New contract tests parse documented commands through the CLI and verify target selection, including AGENTS.md coverage.

Changes

Installation target alignment

Layer / File(s) Summary
Update installation commands
docs/getting-started/installation.md, docs/guides/coding-agents.md
The guides use veryfront install --target <target> and describe the interactive picker.
Validate documented commands
tests/docs/cli-install-commands.test.ts, tests/docs/guide-code-examples.test.ts, tests/docs/guide-contracts.test.ts
New and updated tests parse documented commands through the CLI and verify explicit targets and AGENTS.md coverage.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Possibly related PRs

Suggested reviewers: kwakayama, ariskemper

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main documentation change: updating documented install commands to use the --target option.
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 💡 1
📝 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-0742-7

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: b8fc20c09d

ℹ️ 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/guides/coding-agents.md Outdated

@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

🤖 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 `@tests/docs/cli-install-commands.test.ts`:
- Around line 19-33: Update DOC_DIRS to include every published documentation
root, and update listDocFiles to collect both .md and .mdx files while
preserving recursive directory traversal. Ensure the DocumentedInstall scan
covers all supported documentation formats and locations.
🪄 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: 146472da-db0b-4466-ac5a-5a2f0f925f34

📥 Commits

Reviewing files that changed from the base of the PR and between fe5d5b8 and b8fc20c.

📒 Files selected for processing (5)
  • docs/getting-started/installation.md
  • docs/guides/coding-agents.md
  • tests/docs/cli-install-commands.test.ts
  • tests/docs/guide-code-examples.test.ts
  • tests/docs/guide-contracts.test.ts

Comment thread tests/docs/cli-install-commands.test.ts
Review follow-up. multiSelect returns the auto-detected selections
immediately when stdout is not a TTY (cli/ui/components/multi-select.ts),
so `veryfront install` with no --target never prompts in CI, behind a
pipe, or from a coding agent; it installs whatever detect.ts suggested,
which for a project with nothing to detect is SKILL.md. That is the
exact trap this PR documents, so the new sentence has to say so.

Also narrows the test docstring to name the three published guide dirs
it actually scans, matching guide-contracts.test.ts and
guide-code-examples.test.ts.
@kojiwakayama

Copy link
Copy Markdown
Contributor Author

CI note: unrelated flake in coverage shard 8/8 (now green after rerun)

The first run of 7357d32af failed one job. It was not caused by this PR, and a
rerun of the same commit passed. Recording the evidence so nobody re-litigates it.

Failure

HTTP Bundle Cache ... returns a signal-less cache follower after its bounded wait
AssertionError: Values are not equal.
-   false
+   true
    at src/transforms/esm/http-cache.test.ts:803
FAILED | 577 passed (3267 steps) | 1 failed (1 step)

coverage gate and tests (unit) only failed downstream of that shard.

Why it isn't this PR

  1. This branch touches five files: two docs/**/*.md and three tests/docs/*.ts.
    It never touches src/transforms/.
  2. scripts/test/coverage-ci.ts walks UNIT_COVERAGE_ROOTS = ["src", "cli"] and
    runs with --ignore=tests, so none of this PR's files are even loaded by the
    shard that failed.
  3. The failing test is already on main — it arrived in 43f5e28 ("allow cold
    remote modules to finish fetching", fix: allow cold remote modules to finish fetching #3553), which merged before this branch.
  4. Running the exact shard-8 file list locally at this commit: 578 passed, 0 failed.

Why it flakes

Line 803 is assertEquals(followerSettled, true) immediately after
await time.tickAsync(HTTP_MODULE_FETCH_MAX_WAIT_MS) plus a single
await time.runMicrotasks(). The follower rejects through several await hops
(withMockFetch__runWithOutboundFetchTransportForTests → the
followerOutcome.then that sets the flag), so one microtask drain is not
guaranteed to be enough on a loaded runner. It is a fake-timer settling race, not
a product defect.

For a human: worth a follow-up on src/transforms/esm/http-cache.test.ts:803
to drain until settled rather than once. Out of scope for a docs PR, so I have not
touched it here.

@kojiwakayama
kojiwakayama added this pull request to the merge queue Aug 11, 2026
Merged via the queue into main with commit 125f290 Aug 11, 2026
57 of 60 checks passed
@kojiwakayama
kojiwakayama deleted the fix/dx-20260811-0742-7 branch August 11, 2026 08:00
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