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/codex-closeout.md

View on GitHub
# Quick / Codex Closeout

## Summary

For small changes: fix the scope, verify Codex advice against the actual code, and stop when the result is clean.

## Target selection decision tree

1. Working tree is dirty
   - Recommended: uncommitted changes only
   - base: `HEAD`
   - Include untracked files
2. PR branch / feature branch has commits
   - Recommended: `upstream..HEAD` or `origin/main..HEAD`
   - If working tree is also dirty, use `AskUserQuestion` to choose: uncommitted only / all / commits only
3. Clean tree with no branch diff
   - Recommended: most recent 1 commit
   - Most recent 5 commits if needed
4. User specified `--base` / `--commit`
   - Honor the explicit specification

## Advisory rule

Codex findings are advisory — they are reference opinions, not facts.

Always do the following:

- Read the cited location in the actual code
- Confirm reproducibility with the diff and tests
- Separate into accepted findings / rejected findings
- For each rejected finding, document why it was not adopted

## Stop-on-clean

Stop-on-clean: do not run additional reviews just for appearance after a clean result.

Example:

- Codex review: no major issues
- Focused tests: pass
- Manual spot check: pass

Stop in this state. Run additional heavy reviews only before release, for security-sensitive changes, spec source-of-truth changes, or when the user explicitly requests one.

## Helper contract

`harness/scripts/harness-review-closeout.sh` is a helper that locks down the execution plan for lightweight closeout.

Supported inputs:

- `--dry-run`
- `--parallel-tests`
- `--base REF`
- `--commit REF`
- `--uncommitted`
- `--test CMD`
- `--json`

Examples:

```bash
bash harness/scripts/harness-review-closeout.sh --dry-run --uncommitted
bash harness/scripts/harness-review-closeout.sh --base origin/main --parallel-tests --test "bash harness/tests/test-harness-review-governance.sh"
bash harness/scripts/harness-review-closeout.sh --commit HEAD --json
```

If Codex is unavailable:

- Fall back to full manual pass
- Do not treat failure as success
- Record `codex_available: false` in the final report

## Final report

Required fields:

- review command
- tests
- accepted findings
- rejected findings
- clean result
- fallback reason

Minimum JSON structure:

```json
{
  "schema_version": "harness-review-closeout.v1",
  "target": "working_tree | branch_range | commit",
  "base_ref": "HEAD",
  "review_command": "bash harness/scripts/codex-companion.sh review --base HEAD --json",
  "tests": [],
  "accepted_findings": [],
  "rejected_findings": [],
  "clean_result": true,
  "codex_available": true,
  "fallback": ""
}
```
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: 194kUpdated Claude CodeCodexVerifiedInstall