Heavy3 Code Audit — Prompt Excerpts
Excerpt 1: Smart Detection Workflow (from skill/SKILL.md)
Technique: Decision tree + explicit confirmation gates
## Smart Detection
**When `/h3` is invoked without explicit targets, automatically detect intent and confirm with user.**
### Detection Priority
| Priority | Condition | Action |
|----------|-----------|--------|
| 1 | Explicit argument provided | Execute directly, no confirmation |
| 2 | Uncommitted changes exist | Confirm: review changes? |
| 3 | No changes + plan detected | Confirm: review the plan? |
| 4 | No changes + no plan | Ask: review commits or specify target? |
Analysis: Uses a graded decision tree to eliminate ambiguity at invocation. Each priority level has exactly one action and one confirmation template. Prevents the "what should I review?" dead-end by checking git state first.
Excerpt 2: Council Role Differentiation (from docs/METHODOLOGY.md)
Technique: Role-specialized system prompts with distinct model selection rationale
## The Council
Three specialized reviewers, each with web search:
| Role | Model | Focus | Search |
|------|-------|-------|--------|
| **Correctness Expert** | GPT 5.5 | Bugs, logic errors, edge cases, race conditions | Bing |
| **Performance Critic** | Gemini 3.1 Pro | N+1 queries, memory leaks, scaling bottlenecks | Exa |
| **Security Analyst** | Grok 4 | Vulnerabilities, auth issues, data exposure | Exa |
**Why Grok 4 for Security?**
Grok 4 was selected as Security Analyst based on independent security benchmarks:
| Benchmark | Score |
| Kilo AI Exploit Test | 100% detection on advanced exploits |
| WMDP-Cyber | 79-81% accuracy (vulnerability detection, reverse engineering) |
Analysis: Evidence-based model selection — each role is assigned to a model based on published benchmark performance in that domain, not by default. This is "research-anchored role assignment," distinct from generic "use GPT for X" heuristics.
Technique: Structured comparison table as a deterministic output contract
## The Synthesis Table (Trademark Feature)
| Aspect | Correctness (GPT 5.5) | Performance (Gemini 3.1) | Security (Grok 4) |
|--------|----------------------|----------------------|---------------------|
| **Focus** | Bugs, Logic, Edge Cases | Scaling, Memory, N+1 | Vulnerabilities, Auth |
| **Findings** | ❌ Null check missing | ⚠️ Potential N+1 query | ✅ No issues found |
| **Verdict** | REQUEST CHANGES | APPROVE WITH NOTES | APPROVE |
**What you get:**
- **Consensus Issues** - Problems flagged by 2+ reviewers (high confidence)
- **Notable Findings** - Unique insights from each specialist
- **Final Recommendation** - APPROVE / APPROVE WITH CHANGES / REQUEST CHANGES
- **Priority Actions** - Ranked list of fixes
Analysis: Forced-format output contract. The synthesis table is a mandatory output structure that makes cross-model consensus visible at a glance, with explicit classification of "consensus" (2+ models agree) vs. "unique finding" (single-model insight). Defines exactly three verdicts and prevents ambiguous outputs.