{{PLATFORM_NAME}} 规则 — 模板
仅在项目中检测到相应平台时生成。各平台的检测信号如下。
此文件被封装在受管理的块中。代理在更新时会在标记之间重新生成内容;标记外的人为编辑将被保留。
<!-- AGENTS-GENERATED-START --> # {{PLATFORM_RULES_HEADER}} {{PLATFORM_SPECIFIC_CONTENT}} <!-- AGENTS-GENERATED-END -->平台检测与输出
| Platform | Detection signal | Output file | Content mapping |
|---|---|---|---|
| Cursor | .cursorrulesexists or.cursor/directory | .cursorrules | AGENTS.md sections: Setup commands, Code Style, Hard Rules, Prohibitions |
| GitHub Copilot | .github/copilot-instructions.mdexists | .github/copilot-instructions.md | Flat instructions: Setup, Code Style, Testing |
| Gemini CLI | GEMINI.mdexists or.gemini/directory | GEMINI.md | System prompt style: Overview, Commands, Conventions |
| Windsurf | .windsurfrulesexists or.windsurf/directory | .windsurfrules | Progressive disclosure: Tech Stack, Rules, Testing |
| Codex | Already covered by AGENTS.md (native support) | — | AGENTS.md is the primary file |
填写规则
{{PLATFORM_NAME}}
平台名称:“Cursor”,“GitHub Copilot”,“Gemini CLI”,“Windsurf”。
{{PLATFORM_RULES_HEADER}}
特定平台标题:
- 光标:
# 项目规则:{PROJECT_NAME} - Copilot:
# Copilot 指令 - 双子座:
# Gemini CLI 指南 - 风帆冲浪:
# 风帆冲浪规则
{{PLATFORM_SPECIFIC_CONTENT}}
根据 AGENTS.md 调整,但使用特定平台的格式:
- 光标:按严重程度逐步显示。包含不良/良好代码示例。
- Copilot:扁平化的 Markdown。保持简短——Copilot 的上下文窗口有限。
- 双子座:系统提示风格。第二人称,指导性。
- 帆板:逐步披露。包含级联规则。
生成规则
- 仅针对项目中实际检测到的平台生成。
- 每个文件保持在200行以内——它们是AGENTS.md的补充,而不是替代品。
- 包含指向 AGENTS.md 的指针:
> 完整规则见 @AGENTS.md - 使用受管理的代码块(
<!-- AGENTS-GENERATED-START -->/<!-- AGENTS-GENERATED-END -->)来保留人工编辑。