diff --git a/templates/AGENT_RULES.template.md b/templates/AGENT_RULES.template.md index 5044a910..f8514d8c 100644 --- a/templates/AGENT_RULES.template.md +++ b/templates/AGENT_RULES.template.md @@ -233,6 +233,12 @@ python {{PLAYBOOK_SCRIPTS}}/main_loop.py finish \ 3. 必要时更新 `progress.md` 上半部分摘要和相关 memory 4. 检查 `git status --short` 与 diff 5. 只提交当前 Plan 相关改动 +- 当前 Plan 相关改动包括但不限于: + - 本轮代码、配置、测试、模板改动 + - 当前 Plan 文件(创建、补充、勾选 Task、记录结果等) + - `memory-bank/progress.md` 中本轮 `workflow-state`、`plan-status` + 与摘要更新 + - 必要 memory 更新,例如 `active-context.md`、`decisions.md` - 不得由 `main_loop.py finish` 自动执行 `git commit` - 不得把用户已有改动或其他 Plan 的改动混入当前 Plan commit - 如 Plan `done` 后没有 diff,必须在回复中说明无提交原因 diff --git a/tests/test_sync_templates_placeholders.py b/tests/test_sync_templates_placeholders.py index 15e7512c..3412f9ac 100644 --- a/tests/test_sync_templates_placeholders.py +++ b/tests/test_sync_templates_placeholders.py @@ -150,6 +150,9 @@ class SyncTemplatesPlaceholdersTests(unittest.TestCase): self.assertIn( "不得由 `main_loop.py finish` 自动执行 `git commit`", rules_template ) + self.assertIn("当前 Plan 文件", rules_template) + self.assertIn("`memory-bank/progress.md`", rules_template) + self.assertIn("必要 memory 更新", rules_template) self.assertIn("工作区保持干净后再领取下一个 Plan", rules_template) def test_sync_templates_replaces_playbook_scripts_without_main_language_support(