From 19a7af512249a135b9b9f8d479399ca7911dc976 Mon Sep 17 00:00:00 2001 From: wuyangfan <1102042793@qq.com> Date: Sat, 16 May 2026 23:31:14 +0800 Subject: [PATCH 1/2] docs: add coding agent guide --- docs/.vitepress/config.mts | 1 + docs/guide/coding-agents.md | 118 ++++++++++++++++++++++++++++++++++++ docs/guide/create.md | 2 + docs/guide/index.md | 2 + docs/guide/migrate.md | 2 +- 5 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 docs/guide/coding-agents.md diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 50a7573fd3..d059058e3f 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -73,6 +73,7 @@ const guideSidebar = [ { text: 'CI', link: '/guide/ci' }, { text: 'Commit Hooks', link: '/guide/commit-hooks' }, { text: 'Monorepo Guide', link: '/guide/monorepo' }, + { text: 'Coding Agents', link: '/guide/coding-agents' }, { text: 'Troubleshooting', link: '/guide/troubleshooting' }, ], }, diff --git a/docs/guide/coding-agents.md b/docs/guide/coding-agents.md new file mode 100644 index 0000000000..5281cb047e --- /dev/null +++ b/docs/guide/coding-agents.md @@ -0,0 +1,118 @@ +# Coding Agents + +This page is a compact command guide for AI coding agents and humans directing them. Read this before automating Vite+ workflows so arguments are sent to the right command and validation uses the Vite+ command surface. + +## Quick Rules + +- Run `vp help` and `vp help ` before guessing command syntax. +- Prefer non-interactive flags in automated runs, such as `--no-interactive`, when a command supports them. +- Keep Vite+ command options before `--`; put template or underlying-tool options after `--` only where the command documents forwarding. +- Prefer `vp check` for local validation loops because it runs the configured format, lint, and type-check workflow together. +- Use `vp run ` for project scripts. Do not call package-manager scripts directly unless you specifically need package-manager behavior. + +## Forwarding Arguments + +`--` separates Vite+ options from options that should be forwarded to another tool. The most common case is `vp create