docs: use --target for the documented veryfront install commands - #3558
Conversation
`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.
|
Warning Review limit reached
Next review available in: 16 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the 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 configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe documentation now uses explicit ChangesInstallation target alignment
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
💡 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".
There was a problem hiding this comment.
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
📒 Files selected for processing (5)
docs/getting-started/installation.mddocs/guides/coding-agents.mdtests/docs/cli-install-commands.test.tstests/docs/guide-code-examples.test.tstests/docs/guide-contracts.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.
CI note: unrelated flake in
|
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.mdand that older projects can install the same guide with:Running that in a fresh project writes a different file:
Exit 0, no warning. The reader is told they are getting
AGENTS.mdand ends up withSKILL.md— a file the surrounding docs never mention. The same wrong command form appears indocs/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
installtakes its tool target from--targetonly:There is no
positionalspec, so the bareagentstoken lands inargs._and is dropped.installCommandthen seestarget === undefinedand falls through to the interactive picker; in a non-TTY it returns the auto-detected defaults, anddetect.tsmarksskillas always-suggested andagentsas never auto-detected — henceSKILL.md.veryfront install --target agentswritesAGENTS.mdexactly 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--targetwould 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
--targetform indocs/getting-started/installation.mdanddocs/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 readdocs/**(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 underdocs/getting-started,docs/guidesanddocs/concepts, feeds each through the realparseCliArgs→parseInstallArgs→parseTargetFlagpipeline, and asserts:AGENTS.mddocument a command whose resolved target maps toAGENTS.mdin the install registry.Confirmed failing before the doc change, for the right reason:
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 faileddeno test cli/commands/install/— 15 passed, 0 faileddeno task docs:validate— all 1226 doc links OKveryfront install --target agents→✓ AGENTS.mdSummary by CodeRabbit
Documentation
veryfront install --target <agent>command format.veryfront installwithout a target.AGENTS.md.Tests