Problem
The prd-task-planner writes ## TDD Mode sections with test file paths, framework names, and test commands (prd-task-planner.md:163-184), but it has no Bash access and never validates these specs against reality. It can write:
- Wrong test file paths (don't match project conventions)
- Wrong framework imports (
jest when the project uses vitest)
- Wrong test commands
The planner already has Glob and Grep tools — it just lacks the instruction to validate.
Proposed Fix
Add to prd-task-planner.md after line 102 (testing patterns discovery):
- **Validate before writing TDD specs**: Before writing `## TDD Mode` sections, verify with Glob/Grep:
- Test file paths follow the actual project convention (don't guess — check existing test files)
- The test framework import pattern matches what exists (e.g., `import { describe } from 'vitest'` not `from 'jest'`)
- The test command works (check package.json scripts or equivalent)
- If you can't confirm these, omit the `## TDD Mode` section and note in the task
that the implementer should discover test infrastructure independently
This is the "sprint contract" pattern — only write specs you can verify.
Effort
~10 minutes — prompt addition in 1 file.
Problem
The
prd-task-plannerwrites## TDD Modesections with test file paths, framework names, and test commands (prd-task-planner.md:163-184), but it has no Bash access and never validates these specs against reality. It can write:jestwhen the project usesvitest)The planner already has
GlobandGreptools — it just lacks the instruction to validate.Proposed Fix
Add to
prd-task-planner.mdafter line 102 (testing patterns discovery):This is the "sprint contract" pattern — only write specs you can verify.
Effort
~10 minutes — prompt addition in 1 file.