Skip to main content
Use Refine PR to iteratively improve generated code through targeted feedback. The approach and architecture are correct, but specific implementations need modification.
Post-Code-Generation Options: Merge | Close | Refine PR (this page)Choose Refine when: The generated code is fundamentally sound but has specific gaps that need addressing.

Refine PR Prompt Format

Structure your feedback using critical directives:

Decision Matrix

Apply this matrix to determine whether to refine or close: If changes fall outside the scope of your original request, they belong in a separate run. Do not expand scope during refinement.

Refinement Workflow

1

Identify gaps

Review the generated code and document specific issues:
  • File locations - Exact paths and line numbers
  • Current behavior - What the code does now
  • Required behavior - What it should do
  • Acceptance criteria - How to verify the fix
Focus on whether gaps are in scope (original request) or out of scope (new requirements).
2

Submit Refine PR request

Paste your structured feedback into Blitzy using the Refine PR prompt format above. Blitzy updates the PR with targeted changes.

Best Practices

  • Reference exact file paths and line numbers
  • Describe concrete changes, not vague improvements
  • Provide measurable success criteria
  • Only request changes within original requirements
  • Flag scope creep as separate tasks
  • Use multiple refinements as needed to fill gaps
  • Point to existing code examples in your codebase
  • Specify architectural patterns to follow
  • Maintain consistency with current implementation

Submodule PRs During Refinement

Do not close or merge submodule PRs while refinement cycles are in progress. Refine PR reads from submodule branches - closing them causes build failures or incomplete refinements. Wait until all refinement rounds are complete and the main repository PR is merged before touching submodule PRs.
See Merge - Projects with Submodules for the correct merge order.

When to Close Instead

Choose Close over Refine when:
  • Architectural approach is fundamentally wrong
  • Scope has expanded beyond original request
  • Starting fresh would be faster than iterative fixes

Merge Pull Request

Criteria for accepting generated code

Close Pull Request

When to discard and restart