Skip to content

tim-hub/powerball-harness / harness/skills/harness-review

harness-review

Verified

Multi-angle code and plan review with security, scope, and UI profiles. Use when reviewing code, plans, PRs, or running pre-merge quality gates.

references/dual-review.md

View on GitHub
# Dual Review (--dual)

Run Claude Reviewer and Codex Reviewer in parallel to improve review quality through different model perspectives.

## Prerequisites

- Codex CLI must be installed (verify with `"${CLAUDE_SKILL_DIR}/../../scripts/codex-companion.sh" setup --json`)
- If Codex is unavailable, falls back to Claude-only review

## Execution Flow

1. Check Codex availability

   ```bash
   CODEX_AVAILABLE="$(bash "${CLAUDE_SKILL_DIR}/../../scripts/codex-companion.sh" setup --json 2>/dev/null | jq -r '.ready // false')"
   ```

2. Launch Claude Reviewer via the Task tool (standard review flow)

3. If Codex is available, launch `"${CLAUDE_SKILL_DIR}/../../scripts/codex-companion.sh" review` in parallel

   ```bash
   # If BASE_REF is provided, specify --base. Use --json for structured output
   bash "${CLAUDE_SKILL_DIR}/../../scripts/codex-companion.sh" review --base "${BASE_REF:-HEAD~1}" --json
   ```

4. Wait for both results

5. Verdict merge rules (evaluated in this order):
   - Both APPROVE -> `APPROVE`
   - Either is REQUEST_CHANGES -> `REQUEST_CHANGES` (adopt the stricter verdict)
   - `critical_issues` are combined from both lists (no deduplication)
   - `major_issues` are combined from both lists (no deduplication)
   - `recommendations` are deduplicated and combined

## Output Format

Adds a `dual_review` field to the standard `review-result.v1` schema:

```json
{
  "schema_version": "review-result.v1",
  "verdict": "APPROVE | REQUEST_CHANGES",
  "dual_review": {
    "claude_verdict": "APPROVE | REQUEST_CHANGES",
    "codex_verdict": "APPROVE | REQUEST_CHANGES | unavailable | timeout",
    "merged_verdict": "APPROVE | REQUEST_CHANGES",
    "divergence_notes": "Reason when verdicts diverge. E.g.: Claude detected a major issue in Performance, Codex found no issues"
  },
  "critical_issues": [],
  "major_issues": [],
  "observations": [],
  "recommendations": []
}
```

### Special Values for `codex_verdict`

| Value | Meaning |
|-------|---------|
| `"unavailable"` | Codex CLI is not installed or unavailable |
| `"timeout"` | Codex review timed out (no response within 120 seconds) |

## Fallback

- **Codex unavailable**: Execute Claude-only and record `codex_verdict: "unavailable"`
- **Codex timeout**: Adopt Claude's verdict as-is and record `codex_verdict: "timeout"`
- **Codex review output invalid**: Treat as parse failure and record `codex_verdict: "unavailable"`

In all fallback cases, the Claude-only review result becomes the final verdict.

## Divergence Notes Format

When verdicts match (`claude_verdict == codex_verdict`), set `divergence_notes` to an empty string.

When verdicts diverge, record in the following format:

```
Claude: REQUEST_CHANGES (Security - SQL injection risk)
Codex: APPROVE (assessed the same location as no issue)
Adopted: REQUEST_CHANGES (prioritize the stricter verdict)
```
rea-analysis-optimizationmorluto/reaOptimize REA providers and shared analysis workflows for agent context, latency, CPU, and memory while preserving correctness and Evidence. Use for analysis bottlenecks and cache or query design; CI/test-suite optimization belongs to rea-ci-tests-audit.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-ci-tests-auditmorluto/reaAudit REA CI and test suites for correctness, fixture drift, false passes, and measured performance; use for suite or workflow investigations and efficiency changes, rather than ordinary feature testing or a single test failure.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
rea-tool-designmorluto/reaAudit, investigate, design, or change REA investigation tools, CLI/MCP contracts, provider capabilities, and Evidence semantics.Stars: 472kUpdated Claude CodeCodexVerifiedInstall
ponytail-auditDietrichGebert/ponytailQuality audit of the whole repo: bugs, security, real load, missing tests, speed, and what to delete. Most important first.Stars: 196kUpdated Claude CodeCodexVerifiedInstall