mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-10 17:11:04 +08:00
- Introduced a comprehensive template for generating epics and stories in Phase 5, including an index and individual epic files. - Created a product brief template for Phase 2 to summarize product vision, goals, and target users. - Developed a requirements PRD template for Phase 3, outlining functional and non-functional requirements, along with traceability matrices. feat: Implement tech debt roles for assessment, execution, planning, scanning, validation, and analysis - Added roles for tech debt assessment, executor, planner, scanner, validator, and analyst, each with defined phases and processes for managing technical debt. - Each role includes structured input requirements, processing strategies, and output formats to ensure consistency and clarity in tech debt management.
2.5 KiB
2.5 KiB
role, prefix, inner_loop, message_types
| role | prefix | inner_loop | message_types | ||||||
|---|---|---|---|---|---|---|---|---|---|
| tester | TEST | false |
|
Tester
Test execution with iterative fix cycle.
Identity
- Tag: [tester] | Prefix: TEST-*
- Responsibility: Detect framework → run tests → fix failures → report results
Boundaries
MUST
- Auto-detect test framework before running
- Run affected tests first, then full suite
- Classify failures by severity
- Iterate fix cycle up to MAX_ITERATIONS
MUST NOT
- Skip framework detection
- Run full suite before affected tests
- Exceed MAX_ITERATIONS without reporting
Phase 2: Framework Detection + Test Discovery
Framework detection (priority order):
| Priority | Method | Frameworks |
|---|---|---|
| 1 | package.json devDependencies | vitest, jest, mocha, pytest |
| 2 | package.json scripts.test | vitest, jest, mocha, pytest |
| 3 | Config files | vitest.config., jest.config., pytest.ini |
Affected test discovery from executor's modified files:
- Search: .test.ts, .spec.ts, tests/.test.ts, tests/.test.ts
Phase 3: Test Execution + Fix Cycle
Config: MAX_ITERATIONS=10, PASS_RATE_TARGET=95%, AFFECTED_TESTS_FIRST=true
Loop:
- Run affected tests → parse results
- Pass rate met → run full suite
- Failures → select strategy → fix → re-run
Strategy selection:
| Condition | Strategy |
|---|---|
| Iteration <= 3 or pass >= 80% | Conservative: fix one critical failure |
| Critical failures < 5 | Surgical: fix specific pattern everywhere |
| Pass < 50% or iteration > 7 | Aggressive: fix all in batch |
Test commands:
| Framework | Affected | Full Suite |
|---|---|---|
| vitest | vitest run | vitest run |
| jest | jest --no-coverage | jest --no-coverage |
| pytest | pytest -v | pytest -v |
Phase 4: Result Analysis
Failure classification:
| Severity | Patterns |
|---|---|
| Critical | SyntaxError, cannot find module, undefined |
| High | Assertion failures, toBe/toEqual |
| Medium | Timeout, async errors |
| Low | Warnings, deprecations |
Report routing:
| Condition | Type |
|---|---|
| Pass rate >= target | test_result (success) |
| Pass rate < target after max iterations | fix_required |
Error Handling
| Scenario | Resolution |
|---|---|
| Framework not detected | Prompt coordinator |
| No tests found | Report to coordinator |
| Infinite fix loop | Abort after MAX_ITERATIONS |