QA Changelog Analyzer
Purpose
Analyze code changes (git diff, commit history, branch comparisons) to determine testing impact. Map changed files to modules/components, identify affected tests, and produce actionable recommendations: tests to run (regression scope), tests to update (if source changed), and tests to add (if new code uncovered).
Trigger Phrases
- "What tests should I run for this PR?"
- "Analyze git diff for test impact"
- "Changelog analysis" / "Change impact report"
- "Which tests are affected by [branch/commit]?"
- "Recommend regression scope for [changes]"
- "Tests to add/update for recent commits"
Workflow
- Read git diff — Staged (
git diff --cached), committed (git diff HEAD~1..HEAD), or between branches (git diff base..HEAD)
- Map changed files to modules — Use directory structure, package/import conventions, or config (see
references/git-analysis-patterns.md)
- Identify affected test files — Coverage-based, path-based, or import-based mapping
- Recommend:
- Tests to run — Regression scope (must run, should run, optional)
- Tests to update — If source changed and tests may be outdated
- Tests to add — If new code has no coverage
Change Analysis
| Change Type |
Action |
Recommendation |
| New files |
Need new tests |
Add unit/integration tests; flag for qa-task-creator |
| Modified files |
Check existing coverage |
Run existing tests; update if assertions/source diverged |
| Deleted files |
Remove/update related tests |
Remove obsolete tests; update imports in remaining tests |
| Renamed/moved files |
Update imports in tests |
Fix import paths; run affected tests |
| Config changes |
Validate environment |
Run env-specific/smoke tests; verify config loading |
See references/impact-mapping.md for mapping strategies.
Output Deliverables
- Change Impact Report — Summary of changed files, modules affected, and impact level
- Recommended Regression Scope — Must run / Should run / Optional test lists
- Task Suggestions for qa-task-creator — Add tests, update tests, remove obsolete tests
Change Impact Report Template
# Change Impact Report — [Branch/PR/Commit]
## Summary
| Change Type | Count | Modules Affected |
|-------------|-------|------------------|
| Added | N | [list] |
| Modified | N | [list] |
| Deleted | N | [list] |
## Regression Scope
### Must Run (High Impact)
- [test file paths]
### Should Run (Medium Impact)
- [test file paths]
### Optional (Low Impact)
- [test file paths]
## Task Suggestions
- **Add:** [new modules/files needing tests]
- **Update:** [tests that may need assertion/import updates]
- **Remove:** [obsolete tests for deleted code]
Integration with Other Skills
| Need |
Skill |
Usage |
| Create tasks from recommendations |
qa-task-creator |
Pass task suggestions for add/update/remove |
| Coverage data for mapping |
qa-coverage-analyzer |
Which tests cover changed files |
| Risk prioritization |
qa-risk-analyzer |
Combine with risk scores for regression order |
| Git diff patterns |
— |
references/git-analysis-patterns.md |
| Impact mapping |
— |
references/impact-mapping.md |
Scope
Can do (autonomous):
- Parse git diff (staged, committed, between branches)
- Map changed files to modules/components
- Identify affected test files (path, import, or coverage-based)
- Produce change impact report and regression scope
- Generate task suggestions for qa-task-creator
Cannot do (requires confirmation):
- Run tests or generate coverage (consume existing data)
- Modify source or test code
- Exclude files from analysis without justification
Will not do (out of scope):
- Execute tests or deployments
- Modify git history or branches
- Override project-specific mapping without config
Quality Checklist
Troubleshooting
| Symptom |
Likely Cause |
Fix |
| No changed files |
Wrong diff range or branch |
Verify git diff range; check branch names |
| Module mapping empty |
Unclear structure |
Use directory convention; add impact-mapping config |
| Too many tests in scope |
Broad imports or coverage |
Narrow to direct tests first; use risk prioritization |
| Missing coverage data |
qa-coverage-analyzer not run |
Use path/import mapping as fallback |
| Renamed files not detected |
Git rename detection off |
Use git diff -M or --find-renames |
| Config changes missed |
Only tracking source files |
Include config paths in analysis (e.g. .env, config/) |
Reference Files
| Topic |
Reference |
| Git diff parsing, file-to-module mapping |
references/git-analysis-patterns.md |
| Mapping code changes to test recommendations |
references/impact-mapping.md |
1---2name: qa-changelog-analyzer3description: Analyze git diff and commit history to recommend which tests to add, update, or run based on code changes.4---56# QA Changelog Analyzer78## Purpose910Analyze code changes (git diff, commit history, branch comparisons) to determine testing impact. Map changed files to modules/components, identify affected tests, and produce actionable recommendations: **tests to run** (regression scope), **tests to update** (if source changed), and **tests to add** (if new code uncovered).1112## Trigger Phrases1314- "What tests should I run for this PR?"15- "Analyze git diff for test impact"16- "Changelog analysis" / "Change impact report"17- "Which tests are affected by [branch/commit]?"18- "Recommend regression scope for [changes]"19- "Tests to add/update for recent commits"2021## Workflow22231. **Read git diff** — Staged (`git diff --cached`), committed (`git diff HEAD~1..HEAD`), or between branches (`git diff base..HEAD`)242. **Map changed files to modules** — Use directory structure, package/import conventions, or config (see `references/git-analysis-patterns.md`)253. **Identify affected test files** — Coverage-based, path-based, or import-based mapping264. **Recommend:**27 - **Tests to run** — Regression scope (must run, should run, optional)28 - **Tests to update** — If source changed and tests may be outdated29 - **Tests to add** — If new code has no coverage3031## Change Analysis3233| Change Type | Action | Recommendation |34|-------------|--------|-----------------|35| **New files** | Need new tests | Add unit/integration tests; flag for qa-task-creator |36| **Modified files** | Check existing coverage | Run existing tests; update if assertions/source diverged |37| **Deleted files** | Remove/update related tests | Remove obsolete tests; update imports in remaining tests |38| **Renamed/moved files** | Update imports in tests | Fix import paths; run affected tests |39| **Config changes** | Validate environment | Run env-specific/smoke tests; verify config loading |4041See `references/impact-mapping.md` for mapping strategies.4243## Output Deliverables44451. **Change Impact Report** — Summary of changed files, modules affected, and impact level462. **Recommended Regression Scope** — Must run / Should run / Optional test lists473. **Task Suggestions for qa-task-creator** — Add tests, update tests, remove obsolete tests4849### Change Impact Report Template5051```markdown52# Change Impact Report — [Branch/PR/Commit]5354## Summary55| Change Type | Count | Modules Affected |56|-------------|-------|------------------|57| Added | N | [list] |58| Modified | N | [list] |59| Deleted | N | [list] |6061## Regression Scope6263### Must Run (High Impact)64- [test file paths]6566### Should Run (Medium Impact)67- [test file paths]6869### Optional (Low Impact)70- [test file paths]7172## Task Suggestions73- **Add:** [new modules/files needing tests]74- **Update:** [tests that may need assertion/import updates]75- **Remove:** [obsolete tests for deleted code]76```7778## Integration with Other Skills7980| Need | Skill | Usage |81|------|-------|-------|82| Create tasks from recommendations | qa-task-creator | Pass task suggestions for add/update/remove |83| Coverage data for mapping | qa-coverage-analyzer | Which tests cover changed files |84| Risk prioritization | qa-risk-analyzer | Combine with risk scores for regression order |85| Git diff patterns | — | `references/git-analysis-patterns.md` |86| Impact mapping | — | `references/impact-mapping.md` |8788## Scope8990**Can do (autonomous):**91- Parse git diff (staged, committed, between branches)92- Map changed files to modules/components93- Identify affected test files (path, import, or coverage-based)94- Produce change impact report and regression scope95- Generate task suggestions for qa-task-creator9697**Cannot do (requires confirmation):**98- Run tests or generate coverage (consume existing data)99- Modify source or test code100- Exclude files from analysis without justification101102**Will not do (out of scope):**103- Execute tests or deployments104- Modify git history or branches105- Override project-specific mapping without config106107## Quality Checklist108109- [ ] Git diff correctly parsed (staged/committed/branch)110- [ ] Changed files mapped to modules111- [ ] Affected tests identified (path, import, or coverage)112- [ ] Regression scope categorized (must/should/optional)113- [ ] Task suggestions actionable for qa-task-creator114- [ ] No hardcoded paths; respect project structure115- [ ] Config changes flagged for env validation116117## Troubleshooting118119| Symptom | Likely Cause | Fix |120|---------|--------------|-----|121| No changed files | Wrong diff range or branch | Verify `git diff` range; check branch names |122| Module mapping empty | Unclear structure | Use directory convention; add `impact-mapping` config |123| Too many tests in scope | Broad imports or coverage | Narrow to direct tests first; use risk prioritization |124| Missing coverage data | qa-coverage-analyzer not run | Use path/import mapping as fallback |125| Renamed files not detected | Git rename detection off | Use `git diff -M` or `--find-renames` |126| Config changes missed | Only tracking source files | Include config paths in analysis (e.g. `.env`, `config/`) |127128## Reference Files129130| Topic | Reference |131|-------|-----------|132| Git diff parsing, file-to-module mapping | `references/git-analysis-patterns.md` |133| Mapping code changes to test recommendations | `references/impact-mapping.md` |