Loading...
Loading...
Compare original and translation side by side
| When the user mentions... | Read |
|---|---|
| Auditing an existing file | |
| Testing, TDD, test conventions | |
| 当用户提到... | 读取 |
|---|---|
| 审核现有文件 | |
| 测试、TDD、测试规范 | |
@import/init@import/initapps/web/AGENTS.mdapps/web/AGENTS.md@importundefined@importundefined
**Path-scoped rules** (Claude Code `.claude/rules/`) — instructions that only load when the agent touches matching files:
```markdown
**路径范围规则**(Claude Code `.claude/rules/`)——仅当Agent修改匹配路径的文件时才会加载的指令:
```markdown
**Scoped sub-files** — AGENTS.md or CLAUDE.md in subdirectories, loaded on demand when the agent works in that area.
Choose the mechanism that matches the harness. The principle is the same: move content to where it loads only when relevant, instead of deleting it.
**范围子文件**——存放在子目录下的AGENTS.md或CLAUDE.md,仅当Agent处理该目录内容时按需加载。
选择匹配你所用框架的机制即可,核心原则不变:把内容移动到仅在相关场景下才加载的位置,而不是直接删除。undefinedundefinedpackages/ui/AGENTS.mdapps/api/AGENTS.md
**Build leaf-first** — write deepest files first. Parents summarize children's AGENTS.md files, not raw code.
**Scoped files can be richer** — entry points, invariants, and pitfalls are appropriate in a file that only loads for one service.packages/ui/AGENTS.mdapps/api/AGENTS.md
**从叶子节点开始构建**——先写最深层的文件,父文件汇总子目录AGENTS.md的内容,而不是直接汇总原始代码。
**范围文件可以更丰富**——仅给单个服务加载的文件里可以包含入口点、不变量、常见陷阱这类内容。undefinedundefinedcf-typegendb:migratedotnet ef database updatecf-typegendb:migratedotnet ef database update
A Reference Docs section is fine — only add a pointer if the agent genuinely needs to read it before working in that area.
可以加参考文档板块——仅当Agent在该领域工作前确实需要读取对应内容时才添加引用指针。@import@importclaudeMdExcludes.claude/settings.local.json{
"claudeMdExcludes": [
"**/other-team/CLAUDE.md",
"/repo/root/unrelated-service/.claude/rules/**"
]
}.claude/settings.local.jsonclaudeMdExcludes{
"claudeMdExcludes": [
"**/other-team/CLAUDE.md",
"/repo/root/unrelated-service/.claude/rules/**"
]
}devbuildstartfile:linedevbuildstart文件:行号