Scan & Review Workflow
Perform a rigorous internal review of all changes before marking work complete or creating a pull request.
The Scan & Review workflow performs a rigorous, structured validation of all changes made during a session before work is marked complete.
It applies a high-discipline internal review framework to ensure that modifications are:
- Aligned with existing codebase patterns
- Production-ready
- Free from common anti-patterns
- Consistent with architectural and security constraints
This workflow is designed to function as a final quality gate before creating a pull request or completing a task.
When to Use Scan & Review
Use this workflow:
- Before marking a task complete
- Before creating a pull request
- After a large refactor
- After implementing complex business logic
- When modifying authentication, security, or performance-sensitive code
- When reviewing AI-generated changes for correctness
It is especially valuable in high-assurance or regulated environments.
What the Workflow Does
Once executed, Scan & Review systematically evaluates all session changes and applies a multi-phase internal review protocol.
1. Expert-Level Role Instantiation
The agent adopts a senior-specialist perspective aligned with the project’s domain and stack.
It evaluates code under realistic constraints such as:
- Framework compatibility
- Performance boundaries
- Security considerations
- Codebase conventions
2. Chain-of-Verification
For complex logic or architecture decisions, the workflow internally:
- Drafts an initial evaluation
- Generates verification questions
- Validates assumptions
- Refines conclusions
This helps surface subtle logic flaws or integration risks.
3. Anti-Pattern Detection
The review explicitly avoids:
- Generic boilerplate disconnected from context
- Over-engineering
- Hallucinated APIs
- Outdated framework patterns
- Dependency mismatches
- Architectural conflicts
4. Context Boundary Enforcement
If repository context is available, the workflow:
- Prioritizes actual project patterns
- Matches naming conventions
- Aligns with existing structure
- Avoids introducing incompatible approaches
Hard rule: If the project uses pattern X, it will not suggest pattern Y unless refactoring is explicitly requested.
5. Production-Readiness Validation
Each modified file is evaluated for:
- Edge case handling
- Error consistency
- Compatibility with existing dependencies
- Simplicity and maintainability
- Architectural alignment
6. Multi-Perspective Risk Analysis
For architectural or high-impact changes, the workflow evaluates:
- Technical feasibility
- Maintainability
- Performance implications
- Security exposure
- Simplicity vs complexity
Full Prefilled Prompt
When selected, the Scan & Review workflow inserts:
Before marking complete, conduct a systematic review of all changes.
It then activates the full internal Elite Prompting Framework, which includes:
- Role-based constraint prompting
- Chain-of-verification (CoVe protocol)
- Anti-pattern learning
- Structured reasoning phases
- Confidence calibration
- Context boundary enforcement
- Iterative internal refinement
- Constraint-first processing
- Multi-perspective synthesis
- Meta-prompt optimization
All internal processing remains silent. The user receives only the refined evaluation.
Output Structure
The final response includes:
- Summary of total files reviewed
- Issues categorized by severity (Low / Medium / High / Critical)
- Blocking issues (if any)
- Architectural or structural concerns
- Remediation guidance
- Explicit confirmation of production readiness OR a clear list of required fixes
Example Use Case
You complete a feature implementing role-based access control.
Before creating a PR:
- Launch Scan & Review.
- Send the prefilled prompt.
- Review the structured output.
- Address any blocking issues identified.
- Re-run Scan & Review if necessary.
- Create a pull request once confirmed production-ready.
This provides a disciplined final checkpoint before code leaves the sandbox.
Scope and Boundaries
Scan & Review:
- Does not automatically modify files
- Does not auto-commit changes
- Does not auto-create pull requests
- Operates within the active session
It is a validation and quality-enforcement workflow, not an execution workflow.
The Scan & Review workflow ensures that AI-assisted development maintains enterprise-level rigor, reducing risk while preserving development speed.