Skip to main content
Close a pull request when the generated code has fundamental issues that make refinement inefficient. This protects code quality and allows you to iterate on your prompt before creating a new generation request.
Post-Code-Generation Options: Merge | Close (this page) | Refine PRChoose Close when: Critical gaps exist that block merge, the architectural approach is fundamentally flawed, or regeneration is more efficient than refinement.

Close Criteria

Choose Close when any of these conditions exist:
ConditionReason
Critical gaps >0Security vulnerabilities, broken core functionality, architectural violations
Architectural approach flawedFundamental design requires complete rework
Scope misalignmentImplementation doesn’t match original requirements
Refinement inefficientWould require 3+ iterations or exceeds effort to regenerate
Critical Gap Examples:
  • 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

ConditionDecision
Critical gaps >0 OR fundamental issuesCLOSE
Major gaps 3 or fewer, no critical gapsREFINE
Zero critical gaps, minor gaps onlyMERGE

When to Close vs. Refine

ScenarioCloseRefine
Architectural approach wrongYes
Critical gaps presentYes
Would require 3+ iterationsYes
Faster to regenerateYes
Minor implementation fixes neededYes
Architecture soundYes

Closing Process

1

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
2

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
3

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
4

Refine your prompt

Before creating a new request:
  • Update prompt with clearer requirements
  • Add missing context or constraints
  • Reference specific patterns to follow
  • Address root causes identified in review

After Closing

  1. PR closed - Generated code discarded
  2. Refine prompt - Improve specifications based on learnings
  3. Create new request - Submit refined prompt to Blitzy
  4. New AAP generated - Fresh plan based on improved prompt
  5. New PR created - Better code generated from improved specifications
Closing preserves momentum by preventing technical debt from flawed implementations, creating a cleaner starting point, applying lessons learned, and avoiding inefficient incremental patching.

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