🔧 chore(templates): align agent templates and docs

- drop implementation-plan template and references
- add AGENT_RULES.local.md precedence in templates
- add plan meta guidance and CN updates
This commit is contained in:
csh
2026-01-23 11:37:29 +08:00
parent efb93f14c1
commit eb75036b64
8 changed files with 138 additions and 199 deletions
+28 -5
View File
@@ -14,8 +14,7 @@ templates/
│ ├── tech-stack.template.md
│ ├── architecture.template.md
│ ├── progress.template.md
── decisions.template.md
│ └── implementation-plan.template.md
── decisions.template.md
├── prompts/ # 提示词库模板
│ ├── README.md
│ ├── system/
@@ -82,13 +81,13 @@ scripts\sync_templates.bat -project-root C:\path\to\project -full
project/
├── AGENTS.md # 路由中心(主入口)
├── AGENT_RULES.md # 执行流程
├── AGENT_RULES.local.md # 项目私有规则(可选,手动维护)
├── memory-bank/ # 项目上下文
│ ├── project-brief.md
│ ├── tech-stack.md
│ ├── architecture.md
│ ├── progress.md
── decisions.md
│ └── implementation-plan.md
── decisions.md
└── docs/prompts/ # 提示词库
├── README.md
├── system/agent-behavior.md
@@ -123,7 +122,6 @@ project/
| `architecture.template.md` | 架构设计、模块职责 |
| `progress.template.md` | 开发进度追踪 |
| `decisions.template.md` | 架构决策记录(ADR) |
| `implementation-plan.template.md` | 当前实施计划 |
### prompts/
@@ -138,6 +136,31 @@ project/
### AGENT_RULES.template.md
执行流程规范,定义 AI 的工作循环和约束。
如需项目私有规则,建议创建 `AGENT_RULES.local.md`,其优先级高于 `AGENT_RULES.md`
且不会被同步脚本覆盖。
### 示例:不跑测试的计划提示词
当你需要修改代码但暂时不运行测试时,可用以下提示词生成“可执行且不失败”的实施计划:
```text
你是 Codex。先使用 $brainstorming。
目标:修改 <模块/功能>,细节如下:<你的需求>
约束:
- 不跑任何测试(test/ci),但允许做可通过的局部验证(格式化/静态检查/人工 diff)。
- Plan 不能包含任何必然失败或未确认的任务;所有依赖必须在 brainstorming 阶段确认清楚。
- 采用 writing-plans 的固定头部格式,且在 `---` 之后追加 `## Plan Meta`
- Plan Group: <X>
- Parent Plan: <docs/plans/...-design.md>
- Verification Scope: local
- Verification Gate: must-pass
流程:
1) 先完成 brainstorming,并输出设计文档 `docs/plans/YYYY-MM-DD-<topic>-design.md`。
2) 询问我“是否进入 `docs/plans/` 实施计划编写阶段”,确认后使用 writing-plans 生成实现计划。
3) 实现计划内明确标注每步要改的文件与命令;验证步骤只包含可通过的局部验证,不包含测试。
4) 执行计划并更新 `memory-bank/progress.md`。
```
### AGENTS.template.md