Fix plan generation skipping TDD for config/tooling tasks#855
Fix plan generation skipping TDD for config/tooling tasks#855chuanghiduoc wants to merge 2 commits intoobra:mainfrom
Conversation
writing-plans mentioned TDD only in passing ("DRY. YAGNI. TDD.") without
enforcement. When early tasks involved configuration or tooling, the
planner rationalized skipping TDD and the reviewer had no criteria to
catch it.
Changes:
- Add HARD-GATE requiring RED-GREEN-REFACTOR for every code-producing task
- Add guidance for "untestable" tasks (config, build pipeline, scaffolding)
- Add anti-pattern section for "tests at the end" plans
- Add TDD Structure category to plan reviewer checklist
There was a problem hiding this comment.
Pull request overview
This PR tightens the “writing-plans” skill and its plan reviewer prompt to explicitly enforce TDD (RED/GREEN/REFACTOR) per task, especially preventing plans from deferring tests to the end when early tasks are configuration/tooling.
Changes:
- Added a
<HARD-GATE>section toskills/writing-plans/SKILL.mdrequiring TDD structure for code-producing tasks, including guidance for “untestable” seeming tasks. - Added an explicit anti-pattern warning against “tests at the end” plans.
- Updated
skills/writing-plans/plan-document-reviewer-prompt.mdto include “TDD Structure” in the reviewer checklist.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| skills/writing-plans/SKILL.md | Introduces mandatory TDD gating and guidance to prevent plans skipping tests during config/tooling tasks. |
| skills/writing-plans/plan-document-reviewer-prompt.md | Adds reviewer criteria to catch non-TDD task ordering and deferred-test plans. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- HARD-GATE: add explicit refactor step to match RED-GREEN-REFACTOR name - Narrow scope from "produces or modifies code" to "introduces or changes behavior" — refactor-only tasks rely on existing tests instead - Reviewer prompt: align with SKILL.md wording (RED-GREEN-REFACTOR + commit)
|
Thanks for the review! All 3 comments addressed in c44a6d6:
|
Summary
Fixes #853 — Plans generated by
writing-plansdid not enforce TDD structure, especially when early tasks involved configuration or tooling. The plan reviewer also lacked TDD criteria, allowing non-TDD plans to pass review.Root cause
Two gaps in the planning pipeline:
writing-plans/SKILL.mdmentioned TDD only in passing ("DRY. YAGNI. TDD.") without enforcement. No<HARD-GATE>, no anti-rationalization guidance. When early tasks were config/tooling, the planner skipped TDD for those — and the habit carried to subsequent tasks.plan-document-reviewer-prompt.mdchecked Completeness, Spec Alignment, Task Decomposition, and Buildability — but had no TDD criteria. Non-TDD plans were approved without question.Changes
skills/writing-plans/SKILL.md:<HARD-GATE>requiring RED-GREEN-REFACTOR for every code-producing taskskills/writing-plans/plan-document-reviewer-prompt.md:Test plan