Code review updates and moving the prp-review step to before the Commit.

This commit is contained in:
sean-eskerium
2025-10-31 22:21:40 -04:00
parent ea88d754d4
commit a292ce2dfb
26 changed files with 769 additions and 201 deletions

View File

@@ -66,7 +66,7 @@ So that <benefit/value>
Use these files to implement the feature:
<find and list the files that are relevant to the feature describe why they are relevant in bullet points. If there are new files that need to be created to implement the feature, list them in an h3 'New Files' section. inlcude line numbers for the relevant sections>
<find and list the files that are relevant to the feature describe why they are relevant in bullet points. If there are new files that need to be created to implement the feature, list them in an h3 'New Files' section. include line numbers for the relevant sections>
## Relevant research docstring

View File

@@ -1,6 +1,6 @@
# Code Review
# Review and Fix
Review implemented work against a PRP specification to ensure code quality, correctness, and adherence to project standards.
Review implemented work against a PRP specification, identify issues, and automatically fix blocker/major problems before committing.
## Variables
@@ -87,3 +87,34 @@ Return ONLY valid JSON (no markdown, no explanations) save to [report-#.json] in
}
}
```
## Fix Issues
After generating the review report, automatically fix blocker and major issues:
**Parse the Report:**
- Read the generated `PRPs/reports/report-#.json` file
- Extract all issues with severity "blocker" or "major"
**Apply Fixes:**
For each blocker/major issue:
1. Read the file mentioned in `file_path`
2. Apply the fix described in `issue_resolution`
3. Log what was fixed
**Re-validate:**
- Rerun linters: `uv run ruff check src/ --fix`
- Rerun type checker: `uv run mypy src/`
- Rerun tests: `uv run pytest tests/ -v`
**Report Results:**
- If all blockers fixed and validation passes → Output "✅ All critical issues fixed, validation passing"
- If fixes failed or validation still failing → Output "⚠️ Some issues remain" with details
- Minor issues can be left for manual review later
**Important:**
- Only fix blocker/major issues automatically
- Minor issues should be left in the report for human review
- If a fix might break something, skip it and note in output
- Run validation after ALL fixes applied, not after each individual fix