feat: add AGENTS.md#358
Conversation
走查新增 改动
预期代码审查工作量🎯 1 (平凡) | ⏱️ ~3 分钟 诗歌
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 0/1 reviews remaining, refill in 60 minutes.Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (2)
AGENTS.md (2)
89-96: 为构建流程代码围栏补全语言标识(MD040)第 89 行的构建流程围栏使用了 ``` 但未指定语言;建议同样改为
text,保持 lint 干净。✅ 建议改法
-LCAP_RELEASE=1 pnpm build +```text +LCAP_RELEASE=1 pnpm build → turbo run build (按依赖顺序) → basic: Rollup 打包 → dist/ + typings/ → vue2: Webpack 构建 → dist/ → vue3: Rspack 构建 → dist/ → react: 自定义构建 → dist/ -``` +```🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@AGENTS.md` around lines 89 - 96, Add a language identifier to the fenced code block that contains the build steps (the triple backticks surrounding the lines starting with "LCAP_RELEASE=1 pnpm build ... → react: 自定义构建 → dist/"); change the opening ``` to ```text so the block is explicitly marked as "text" and satisfies MD040 linting while leaving the block contents unchanged.
7-19: 为代码围栏补全语言标识(MD040)第 7 行的树状结构代码围栏使用了 ``` 但未指定语言;按 markdownlint-cli2 要求应补全语言标识(例如
text),避免 lint 失败。✅ 建议改法
-``` +```text lcap-template/ ├── packages/ │ ├── basic/ # 通用纯函数库,不依赖框架 │ ├── vue2/ # Vue 2 框架应用模板 │ ├── vue3/ # Vue 3 框架应用模板 │ └── react/ # React 框架应用模板 ├── mini-folder/ │ ├── taro/ # Taro 小程序应用模板 │ └── build/ # 小程序构建配置 ├── scripts/ # 根目录脚本 └── docs/ # 文档输出目录 -``` +```🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@AGENTS.md` around lines 7 - 19, The fenced code block in AGENTS.md (the tree diagram between the triple backticks) lacks a language identifier which triggers markdownlint MD040; update the opening fence from ``` to include a neutral language label such as ```text so the block becomes ```text, leaving the block contents unchanged; ensure only the opening fence is modified and the closing ``` remains as-is.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@AGENTS.md`:
- Around line 54-55: Replace the literal --username and --password placeholders
in the pnpm run deploy example with references to environment variables or CI
secrets to avoid showing credentials in docs; specifically update the example
invocation that contains the flags --username and --password to instead use
environment-backed values (e.g., use "$DEPLOY_USER" and "$DEPLOY_PASS" or
instruct readers to export DEPLOY_USER/DEPLOY_PASS or use CI secret injection)
or provide an alternative auth method, and update the surrounding text to
instruct using environment variables/CI secrets rather than inline plaintext
credentials.
- Around line 24-26: Update the pnpm minimum version in AGENTS.md to match
package.json's packageManager value by changing the pnpm requirement from ">= 8"
to ">= 9.10.0" (or explicitly mention "pnpm@9.10.0+") so the document aligns
with the packageManager field; ensure the textual entry referencing pnpm in
AGENTS.md and any adjacent version notes reflect the same "pnpm@9.10.0"
baseline.
---
Nitpick comments:
In `@AGENTS.md`:
- Around line 89-96: Add a language identifier to the fenced code block that
contains the build steps (the triple backticks surrounding the lines starting
with "LCAP_RELEASE=1 pnpm build ... → react: 自定义构建 → dist/"); change the opening
``` to ```text so the block is explicitly marked as "text" and satisfies MD040
linting while leaving the block contents unchanged.
- Around line 7-19: The fenced code block in AGENTS.md (the tree diagram between
the triple backticks) lacks a language identifier which triggers markdownlint
MD040; update the opening fence from ``` to include a neutral language label
such as ```text so the block becomes ```text, leaving the block contents
unchanged; ensure only the opening fence is modified and the closing ``` remains
as-is.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
| - **Node.js**: >= 18 | ||
| - **pnpm**: >= 8 (packageManager: pnpm@9.10.0) | ||
| - **Turbo**: 构建编排 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
git ls-files | grep -i "agent"Repository: netease-lcap/lcap-template
Length of output: 80
🏁 Script executed:
cat AGENTS.mdRepository: netease-lcap/lcap-template
Length of output: 2756
🏁 Script executed:
fd "package" --type f | head -20Repository: netease-lcap/lcap-template
Length of output: 402
🏁 Script executed:
cat package.json | head -30Repository: netease-lcap/lcap-template
Length of output: 912
🏁 Script executed:
rg "packageManager|pnpm" package.jsonRepository: netease-lcap/lcap-template
Length of output: 234
🏁 Script executed:
rg "pnpm" --type json packages/ | grep -i versionRepository: netease-lcap/lcap-template
Length of output: 52
统一 pnpm 最低版本要求至 9.10.0+
package.json 中 packageManager 字段指定的版本为 pnpm@9.10.0,但 AGENTS.md 第 25 行写的是 >= 8,两者不一致。建议更新文档以避免混淆开发者。
建议改法
-- **pnpm**: >= 8 (packageManager: pnpm@9.10.0)
+- **pnpm**: >= 9.10.0 (packageManager: pnpm@9.10.0)🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@AGENTS.md` around lines 24 - 26, Update the pnpm minimum version in AGENTS.md
to match package.json's packageManager value by changing the pnpm requirement
from ">= 8" to ">= 9.10.0" (or explicitly mention "pnpm@9.10.0+") so the
document aligns with the packageManager field; ensure the textual entry
referencing pnpm in AGENTS.md and any adjacent version notes reflect the same
"pnpm@9.10.0" baseline.
| pnpm run deploy --platform a --username b --password c | ||
| ``` |
There was a problem hiding this comment.
避免在文档示例中直接出现账号/密码参数(安全最佳实践)
第 54 行的部署示例将 --username / --password 以明文参数形式写在命令行里。即使是占位符,实际使用时也很容易被复制粘贴成真实凭据,造成泄漏风险。建议改为:使用环境变量(或 CI secret)并在文档中示例 --username "$DEPLOY_USER" / --password "$DEPLOY_PASS",或提供不带明文密码的认证方式。
✅ 建议改法示例
-pnpm run deploy --platform a --username b --password c
+pnpm run deploy --platform a --username "$DEPLOY_USER" --password "$DEPLOY_PASS"📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| pnpm run deploy --platform a --username b --password c | |
| ``` | |
| pnpm run deploy --platform a --username "$DEPLOY_USER" --password "$DEPLOY_PASS" |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@AGENTS.md` around lines 54 - 55, Replace the literal --username and
--password placeholders in the pnpm run deploy example with references to
environment variables or CI secrets to avoid showing credentials in docs;
specifically update the example invocation that contains the flags --username
and --password to instead use environment-backed values (e.g., use
"$DEPLOY_USER" and "$DEPLOY_PASS" or instruct readers to export
DEPLOY_USER/DEPLOY_PASS or use CI secret injection) or provide an alternative
auth method, and update the surrounding text to instruct using environment
variables/CI secrets rather than inline plaintext credentials.
Summary by CodeRabbit