[!IMPORTANT] Run an AI-assisted PR code review using multi-layer lenses with confidence scoring.
Instructions
When the user asks to perform this workflow, execute the following steps:
🕵️♂️ AI Code Review OrchestratorGoal: Evaluate PR diffs for security, logic, and architecture.
Step 1 — Scope & Skills
- Check scope:
git diff origin/<base>...HEAD --name-only. - Sync requirements: if a ticket key or PR URL exists, fetch the intent.
- Load global skills:
common-code-review,common-security-audit,common-owasp,common-llm-security. - Load framework skills: P0/P1 rules from
AGENTS.md. - If ticket/PR context exists, prefer
review-ticketfor specialist fanout.
Step 2 — Multi-Layer Review (Applying Lenses)
Load common-code-review. If synced references are available, use <SKILLS>/common/common-code-review/references/lenses.md; otherwise apply these lenses directly:
- Security (Mandatory).
- Logic & Correctness.
- Silent Failures.
- Type Design.
- AI Safety if LLM code exists.
- Vibe Security using
<SKILLS>/common/common-security-audit/references/vibe-security-scan.mdfor AI-generated or fast-moving changes. - Testing.
Step 3 — Confidence Filter & Report
- Confidence filter: report findings only when confidence is
>= 76/100. - Report format: use
<SKILLS>/common/common-code-review/references/report.mdif synced; otherwise use the Output Template below.
Step 4 — Verdict
- Present the report.
- Ask for one verdict:
APPROVE,CHANGES REQUESTED, orBLOCKED.
Step 5 — Batch Reporting
- Do not post the full report as one comment.
- Post each finding as a separate thread at the file and line.
- Post one summary verdict comment.
- If using
review-ticket, publish only after user approvesspecialist-pr-commenter-batch.
Step 6 — Implementation Planning
- Initialize
task.md. - Apply
common-tddfor code changes.
Step 7 — Skill Feedback Loop (Mandatory)
For every BLOCKER or MAJOR finding, answer: "Was there an active skill that should have prevented this?"
- YES: Fix the skill's
SKILL.md(Anti-Patterns) andevals/evals.json. - NO: If recurring, create a new skill via
common-skill-creator.
Output Template
- Findings:
- Verdict:
- Next action: