Analyze test suite for speed and redundancy, create optimization issues
Analyzes test suite for speed and redundancy, creating optimization issues.
/plugin marketplace add bryonjacob/aug/plugin install aug-dev@augAutonomous analysis to identify slow and redundant tests, create optimization issues.
/test-optimize # Analyze all modules
/test-optimize src/auth # Analyze specific module
/test-optimize --dry-run # Report only, don't create issues
Check for .testaudit.yaml:
If missing:
version: 1
modules:
src/auth:
test_count: 0
total_duration_ms: 0
avg_duration_ms: 0
slow_tests: 0
last_analyzed_commit: <current-HEAD>
last_analyzed_date: <now-ISO8601>
Find all directories with CLAUDE.md - these define modules for analysis.
If no CLAUDE.md files found:
Error: No modules found (no CLAUDE.md files)
Run '/docsaudit' first to create CLAUDE.md hierarchy.
Use test-optimization skill for domain knowledge on:
Run slowtests to identify bottlenecks:
just slowtests 50
If unavailable, run tests directly with timing output.
Use test-optimization skill prioritization formula:
gh issue list --search "is:open [test-optimization]" --json number,title,body
Skip opportunities with similar existing issues.
For each new opportunity:
[test-optimization] <Short description>
## Current State
- Test file: <file>
- Slow tests: <count> (avg: <ms>ms, target: <50ms)
- Redundant tests: <count>
- DRY opportunities: <count>
## Issues
[Speed, redundancy, and DRY issues identified]
## Approach
[Prioritized fix steps]
## Expected Improvement
- Speed: <current>ms -> <target>ms
- Maintainability: <tests removed/consolidated>
## Acceptance Criteria
- [ ] All tests run in <50ms each
- [ ] Coverage maintained at 96%
- [ ] just check-all passes
Update .testaudit.yaml with current analysis results.
Test Suite Optimization Report
==============================
Analyzed modules: <N>
Module Test Health:
<module>: <tests> tests, <duration>s total, <avg>ms avg
Opportunities found: <N>
Issues created: <list>
Next: /work <issue-number>
--dry-run: Report only, don't create issues or update state<module-path>: Analyze only specified module/docsaudit--dry-run/docsaudit first)just slowtests)