feat: add test-first validation gate in Do phase
This commit is contained in:
@@ -165,3 +165,29 @@ Before your final commit, verify:
|
||||
- [ ] Every logical step has its own commit
|
||||
- [ ] Output summary is complete and accurate
|
||||
- [ ] Branch name follows convention
|
||||
|
||||
## Test-First Gate
|
||||
|
||||
Before the Maker's output is accepted, the orchestrator validates that tests were included.
|
||||
|
||||
### Validation Logic
|
||||
|
||||
Read `do-maker-files.txt`. Check if any file path matches common test patterns:
|
||||
- `*test*`, `*spec*`, `*.test.*`, `*.spec.*`, `*_test.*`, `*_spec.*`
|
||||
- Files in directories named `test/`, `tests/`, `__tests__/`, `spec/`
|
||||
|
||||
For writing domain projects, this gate is skipped.
|
||||
|
||||
### Outcomes
|
||||
|
||||
| Result | Action |
|
||||
|--------|--------|
|
||||
| Test files found | Pass — proceed to Check phase |
|
||||
| No test files, code domain | **Warn** — emit WARNING event, note in do-maker.md |
|
||||
| No test files + Creator specified tests | **Block** — re-run Maker with test instruction (1 retry) |
|
||||
| Writing domain | Skip gate entirely |
|
||||
|
||||
The block case triggers a targeted re-run with prompt:
|
||||
"The proposal specified these test cases: <test strategy section>. No test files
|
||||
were found in your changes. Add the specified tests before finishing."
|
||||
This is one retry within the Do phase, not a full PDCA cycle.
|
||||
|
||||
Reference in New Issue
Block a user