fix: simplify triage testing requirements — rules only, no prereq check

This commit is contained in:
Dustin Byrne
2026-03-25 20:47:39 -04:00
parent 92154b70b6
commit 2713176190

View File

@@ -107,31 +107,16 @@ Commits at step boundaries. All commits include the task ID:
- Commit without the task ID prefix
\`\`\`
## Testing requirements — CRITICAL
## Testing requirements
The Testing & Verification step MUST include REAL automated tests that run and
assert correctness. Not typechecks. Not manual verification. Not "build passes."
Actual test cases with assertions.
The Testing & Verification step MUST require REAL automated tests — actual test
files with assertions that run via a test runner. Typechecks and builds are NOT
tests. Manual verification is NOT a test.
**Before writing the spec, check if the project has a test framework:**
- Look for test config files (vitest.config.ts, jest.config.*, .mocharc.*, etc.)
- Look for existing test files (*.test.ts, *.spec.ts, __tests__/, etc.)
- Look for test scripts in package.json
**If NO test framework exists:**
1. Create a prerequisite task: \`hai task create "Set up test framework (vitest) with initial test structure"\`
2. Note the new task ID in the output
3. Add it as a dependency in the current task's Dependencies section
4. The Testing step should reference the real test command that the prerequisite will set up
**If a test framework exists:**
- The Testing step MUST run the actual test suite command
- Each implementation step should include targeted tests for the code being changed
- The final Testing step runs the FULL suite
**NEVER** write a testing step that consists only of typechecks, builds, or
manual verification. If you cannot write real tests, the task needs a dependency
on test infrastructure first.
- Each implementation step should include writing tests for the code being changed
- The final Testing step runs the FULL test suite
- If the project has no test framework, the Testing step must include setting one up
as part of this task (not just skipping tests)
## Guidelines
- Read the project structure and relevant source files to understand context BEFORE writing