88 行
1.3 KiB
Markdown
88 行
1.3 KiB
Markdown
# Template: TDD Plan
|
|
|
|
## Purpose
|
|
为复杂实现任务提供统一的 `.plans/*.md` 结构,确保实施 agent 拿到的是高密度执行计划,而不是松散说明。
|
|
|
|
## When to Use
|
|
- Code 阶段的复杂任务
|
|
- Alignment 阶段的缺口补齐任务
|
|
|
|
## Inputs
|
|
- `SPECS/*.md`
|
|
- 现有代码现状
|
|
- 当前任务范围
|
|
|
|
## Outputs
|
|
- `.plans/YYYY-MM-DD-<slug>.md`
|
|
|
|
## Primary Agent/Model
|
|
`GPT-5.4 Pro xhigh`
|
|
|
|
## Secondary Agent/Model
|
|
`Claude Opus 4.6`
|
|
|
|
## Required Skills
|
|
- `tdd-planning`
|
|
|
|
## Steps
|
|
1. 明确约束和依赖。
|
|
2. 定义接口契约。
|
|
3. 分阶段列出测试与实现顺序。
|
|
|
|
## Exit Criteria
|
|
- 实现 agent 无需回看完整 Spec 就能开始做 TDD
|
|
|
|
## Failure Recovery
|
|
- 如果计划没有测试场景或验收标准,计划不合格
|
|
|
|
## Related Templates
|
|
- [`todo-yaml-template.md`](./todo-yaml-template.md)
|
|
|
|
## Template
|
|
```markdown
|
|
# TDD Plan: <Feature>
|
|
|
|
## Goal
|
|
-
|
|
|
|
## Scope
|
|
- Included:
|
|
- Excluded:
|
|
|
|
## Constraints
|
|
-
|
|
|
|
## Current State
|
|
-
|
|
|
|
## Architecture
|
|
- Modules touched:
|
|
- Dependency order:
|
|
|
|
## Interface Contract
|
|
- Public API:
|
|
- Input:
|
|
- Output:
|
|
- Errors:
|
|
|
|
## Test Plan
|
|
1. Failing test:
|
|
2. Minimal implementation:
|
|
3. Refactor:
|
|
|
|
## Phases
|
|
### Phase 1
|
|
-
|
|
|
|
### Phase 2
|
|
-
|
|
|
|
## Validation
|
|
- Unit tests:
|
|
- Integration tests:
|
|
- Lint/build:
|
|
|
|
## Acceptance Criteria
|
|
-
|
|
```
|