You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(qa): Add caching to skip unchanged checks on re-run #228
When /qa is run multiple times on the same issue (common during gap analysis and fix iterations), it re-runs all checks from scratch even when code hasn't changed. Adding caching would skip unchanged checks and improve iteration speed.
Current Behavior
Each /qa run executes:
Type safety checks
Security scans (Semgrep)
Scope analysis
Build verification
Test execution
All checks run every time, even if only documentation changed since last run.
Proposed Behavior
Cache check results keyed by:
File content hash (or git tree hash)
Check type
Configuration hash
On re-run:
Compute current file hashes
Compare against cached hashes
Skip checks where inputs unchanged
Re-run only affected checks
Merge cached + fresh results
Cache Invalidation
Code changes → re-run type safety, security, scope
scripts/qa/qa-cache-cli.ts - CLI for shell script integration
.claude/skills/qa/scripts/quality-checks.sh - Cache integration in QA checks
Test Results
961 tests passed ✅
Build: Passed ✅
Test coverage: qa-cache.ts has dedicated test file covering all ACs
Test Fix Applied
Fixed state-update-cli.test.ts tests that were failing when SEQUANT_ORCHESTRATOR was set in the environment. Tests now explicitly clear this variable to ensure consistent behavior.
Activity
admarble commentedon Feb 1, 2026
Planning: QA Caching Implementation
Acceptance Criteria Checklist
--no-cacheflag forces fresh runDerived ACs (from quality planning)
Verification Criteria Summary
--no-cache→ all checks execute freshImplementation Plan
Phase 1: Cache Infrastructure
src/lib/workflow/qa-cache.ts- cache module with diffHash computationPhase 2: quality-checks.sh Integration
3. Add
--use-cache,--no-cache,--cache-dir,--cache-keyparameters4. Wrap expensive checks (Semgrep, build, security) with cache lookup
Phase 3: QA Skill Integration
5. Update SKILL.md with cache orchestration and output template
6. Add "Cache Status" section to QA output
Phase 4: Testing & Documentation
7. Integration tests for all AC scenarios
8. Document caching behavior
Key Decisions
.sequant/.cache/qa/--no-cacheflagAssumptions to Validate
git diff main...HEADis correct base for change detection.sequant/.cache/qa/is acceptable cache locationOpen Questions
Estimated effort: Medium (new module + shell script changes + skill update)
Recommended workflow:
spec → exec → qafeat(#228): Add caching to QA checks for improved performance
admarble commentedon Feb 1, 2026
Implementation Progress Update
AC Coverage Summary
--no-cacheflag forces fresh runKey Files Changed
src/lib/workflow/qa-cache.tssrc/lib/workflow/qa-cache.test.tsscripts/qa/qa-cache-cli.ts.claude/skills/qa/scripts/quality-checks.sh--use-cache/--no-cacheflags.claude/skills/qa/SKILL.mdTest Results
Quality Plan Alignment
Derived ACs: 3/3 addressed (AC-6, AC-7, AC-8)
PR Created
PR #232: #232
Next Steps
/qa 228)/qatwice on a branch to verify cache hit on second runadmarble commentedon Feb 1, 2026
Implementation Progress Update
AC Coverage Summary
src/lib/workflow/qa-cache.ts:420-439-set()method caches results with diff/config hashessrc/lib/workflow/qa-cache.ts:398-408- Hash comparison inget()invalidates on mismatch--no-cacheflag forces fresh run.claude/skills/qa/scripts/quality-checks.sh:29-31- Flag disables caching.claude/skills/qa/scripts/quality-checks.sh:103-127-print_cache_status()functionsrc/lib/workflow/qa-cache.ts:391-414- TTL, diff hash, and config hash checksKey Files Changed
src/lib/workflow/qa-cache.ts- Core caching module (528 LOC)src/lib/workflow/qa-cache.test.ts- Comprehensive tests (675 LOC, 29 tests)scripts/qa/qa-cache-cli.ts- CLI for shell script integration.claude/skills/qa/scripts/quality-checks.sh- Cache integration in QA checksTest Results
qa-cache.tshas dedicated test file covering all ACsTest Fix Applied
Fixed
state-update-cli.test.tstests that were failing whenSEQUANT_ORCHESTRATORwas set in the environment. Tests now explicitly clear this variable to ensure consistent behavior.PR Status
PR #232 is open and ready for review: #232
Self-Evaluation
qa-cache-cli.ts) has no dedicated tests, but it's a thin wrapper and the core logic is well-tested🤖 Generated with Claude Code
feat(#228): Add caching to QA checks for improved performance
feat(#228): Add caching to QA checks for improved performance (#232)
docs: Add QA caching and testgen auto-detection to changelog and what…