Close Criteria
Choose Close when any of these conditions exist:| Condition | Reason |
|---|---|
| Critical gaps >0 | Security vulnerabilities, broken core functionality, architectural violations |
| Architectural approach flawed | Fundamental design requires complete rework |
| Scope misalignment | Implementation doesn’t match original requirements |
| Refinement inefficient | Would require 3+ iterations or exceeds effort to regenerate |
- Security vulnerabilities or credential exposure
- Broken core functionality preventing deployment
- Data corruption or loss potential
- Architectural violations requiring structural changes
- Breaking changes without migration path
Decision Matrix
| Condition | Decision |
|---|---|
| Critical gaps >0 OR fundamental issues | CLOSE |
| Major gaps 3 or fewer, no critical gaps | REFINE |
| Zero critical gaps, minor gaps only | MERGE |
When to Close vs. Refine
| Scenario | Close | Refine |
|---|---|---|
| Architectural approach wrong | Yes | |
| Critical gaps present | Yes | |
| Would require 3+ iterations | Yes | |
| Faster to regenerate | Yes | |
| Minor implementation fixes needed | Yes | |
| Architecture sound | Yes |
Closing Process
Document critical gaps
For each critical gap, document:
- Location - File path and line numbers
- Issue - What is fundamentally wrong
- Impact - Why it blocks merge
- Root cause - Why the generation failed
Identify root cause
Determine why the generation failed:
- Unclear prompt - Requirements not specific enough
- Missing context - Insufficient codebase information
- Wrong approach - AAP needed different strategy
- Specification issues - Project guide incomplete or ambiguous
Close PR with explanation
Post a clear explanation in the PR:
- State the Close decision
- List critical gaps
- Explain why regeneration is preferred
- Provide next steps
After Closing
- PR closed - Generated code discarded
- Refine prompt - Improve specifications based on learnings
- Create new request - Submit refined prompt to Blitzy
- New AAP generated - Fresh plan based on improved prompt
- New PR created - Better code generated from improved specifications
Related Guides
Merge Pull Request
Criteria for accepting generated code
Refine Pull Request
When to iterate on the current PR
Prompt Engineering
Improve prompts to reduce failures