- 创建 agents/ 模块化目录结构 - 添加 step.schema.json 和 rework.schema.json (JSON Schema draft-07) - 添加 output-contract.md 和 rework-contract.md 契约文档 - 添加 policy/strict.md 核心规则 - 添加 playbooks/ 执行线路模板 - 重构根 AGENTS.md 为入口文件 - 添加向后兼容性测试 (25 tests passed) - 验证与 gxd-subagent-shim 0.2.3 兼容 Task 10: 验证向后兼容性 - 10.1 Step JSON 兼容性验证通过 - 10.2 Output Contract 8 章节顺序验证通过 - 10.3 Rework JSON 兼容性验证通过 |
||
|---|---|---|
| .. | ||
| contracts | ||
| playbooks | ||
| policy | ||
| templates | ||
| tests | ||
| CHANGELOG.md | ||
| README.md | ||
| VERSION | ||
README.md
AGENTS Policy Modules
本目录包含模块化的 AGENTS 策略文件,用于 Subagent Orchestrator 的规范定义。
目录结构
agents/
├── README.md # 本文件 - 模块索引与兼容性说明
├── VERSION # 版本号文件 (当前: 0.3.0)
├── CHANGELOG.md # 版本演进历史
├── MIGRATION.md # 迁移指南
│
├── policy/
│ └── strict.md # Hard Rules + Mandatory Pipeline
│
├── contracts/
│ ├── output-contract.md # 8-section Output Contract
│ └── rework-contract.md # Rework JSON 结构与规则
│
├── templates/
│ ├── step.schema.json # Step JSON Schema (draft-07)
│ ├── rework.schema.json # Rework JSON Schema (draft-07)
│ ├── step-example.json # Step JSON 示例
│ └── rework-example.json # Rework JSON 示例
│
└── playbooks/
├── README.md # Playbook 索引
└── feature-e2e-git-readme.md # Feature + E2E + Git + README 模板
模块说明
| 模块 | 路径 | 说明 |
|---|---|---|
| Policy | policy/strict.md |
稳定的核心规则集,包含 Hard Rules 和 Mandatory Pipeline |
| Output Contract | contracts/output-contract.md |
执行型 Subagent 输出必须包含的 8 个章节 |
| Rework Contract | contracts/rework-contract.md |
返工 JSON 结构和收敛规则 |
| Step Schema | templates/step.schema.json |
Step JSON 的 JSON Schema 定义 |
| Rework Schema | templates/rework.schema.json |
Rework JSON 的 JSON Schema 定义 |
| Playbooks | playbooks/ |
可复用的执行线路模板 |
兼容性
最低 Shim 版本
- gxd-subagent-shim >= 0.2.3
Policy 版本
当前 policy_version: 0.3.0
Step JSON 中的 policy_version 字段应与本目录的 VERSION 文件保持一致。版本不匹配时,shim 会记录警告但不会阻断执行。
向后兼容性保证
- Step JSON 结构与 shim 0.2.3 完全兼容
- Output Contract 8 个章节名称和顺序保持不变
- Rework JSON 结构与现有 shim 校验兼容
使用方式
- 根
AGENTS.md作为入口文件,引用本目录下的模块 - Orchestrator 在构造 Step JSON 时,参考
templates/step.schema.json - 执行型 Subagent 输出必须遵循
contracts/output-contract.md - 返工时使用
contracts/rework-contract.md定义的结构
版本历史
详见 CHANGELOG.md