Metadata-Version: 2.5
Name: magoo-pr
Version: 0.1.0
Summary: Adversarial code review across AI tools and models, powered by Crossby.
Project-URL: Homepage, https://github.com/ivanviragine/magoo-pr
Project-URL: Repository, https://github.com/ivanviragine/magoo-pr
Project-URL: Documentation, https://github.com/ivanviragine/magoo-pr#readme
Project-URL: Issues, https://github.com/ivanviragine/magoo-pr/issues
Author: Ivan Viragine
License-Expression: MIT
License-File: LICENSE
Keywords: adversarial,ai,automation,code-review,git,pull-request
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Quality Assurance
Classifier: Topic :: Software Development :: Version Control :: Git
Requires-Python: >=3.11
Requires-Dist: crossby<0.64.0,>=0.63.2
Requires-Dist: pydantic>=2.0
Requires-Dist: pyyaml>=6.0
Requires-Dist: rich>=13.0
Requires-Dist: structlog>=24.0
Requires-Dist: typer<0.26,>=0.12
Provides-Extra: dev
Requires-Dist: mypy>=1.14; extra == 'dev'
Requires-Dist: pre-commit>=3.7; extra == 'dev'
Requires-Dist: pytest-cov>=5.0; extra == 'dev'
Requires-Dist: pytest>=8.0; extra == 'dev'
Requires-Dist: ruff>=0.4; extra == 'dev'
Requires-Dist: types-pyyaml>=6.0; extra == 'dev'
Description-Content-Type: text/markdown

# Magoo PR

**Adversarial code review across AI tools and models, powered by Crossby.**

Magoo PR uses Crossby to run independent review passes with Claude Code,
Codex, Antigravity CLI, and other supported tools. Mix tools and models in
the same review by assigning them to different lenses and stages.
[Crossby](https://github.com/ivanviragine/crossby)

Each review starts with a blind, diff-only baseline and lens-focused reviewers.
A fresh challenger tries to refute their drafts. After reconciliation,
a **second challenge checks the proposed report**, including findings promoted
from the baseline. Magoo PR produces a report only when receipts verify that
the required turns completed and every candidate was accounted for.

- **Get evidence you can act on.** Findings include the location, trigger,
  impact, and suggested action. The report records why candidates were dropped
  and what still needs verification before release.
- **Choose who sees the code.** Assign tools, models, and effort by stage or
  review lens. Preview the provider companies and set an allowlist before any
  model runs.
- **Verify the next revision.** Compare with `--prior last` to keep finding IDs
  across reviews and check claimed fixes against the saved and current code.
- **Control what lands on GitHub.** Start with local drafts. When you choose to
  post, Magoo checks the PR revision and inline anchors, skips equivalent
  comments, and submits a single review.

## Get started

```bash
uv tool install git+https://github.com/ivanviragine/magoo-pr.git
magoo tools
magoo local -r quick
magoo report last --open
```

You need Python 3.11+, Git, and at least one headless AI CLI supported by Crossby
(Claude Code, Codex, Antigravity CLI, Cursor, Copilot, or OpenCode) with provider
authentication. Magoo PR installs Crossby as a dependency. GitHub PR reviews and
posting also require an authenticated `gh` CLI.

`magoo local` captures uncommitted changes in a disposable worktree and leaves
your checkout, index, branch, and stash alone. Each recipe runs the full review
sequence. `quick` uses medium effort and a concise reporting policy.

| Target | Command |
| --- | --- |
| Uncommitted changes | `magoo local` or `magoo local --staged` |
| A branch against a base | `magoo branch feat/retry-backoff --base main` |
| A GitHub pull request | `magoo pr 2469` |
| A stashed change | `magoo stash 'stash@{0}'` |
| Guided launcher | `magoo start` |

## Preview and tune a review

```bash
magoo check pr 2469 -r deep --post never
magoo explain -r deep --stage final-challenge
```

`check` lists the resolved seats, provider routes, and backend restrictions
without starting a model. Run the command it prints with `--plan` to require the
review to match the preview. `deep` runs four specialist reviewer seats across
Codex, Claude, and Antigravity CLI. Use `standard` for a single reviewer covering
all nine lenses, `paranoid` for high-impact changes, or `ci` for concise P0/P1
reporting.

You can assign a different model to Phase 9 without writing YAML.

```bash
magoo check pr 2469 -r standard --tool claude \
  --seat security:claude:claude-opus-5.5:high \
  --seat correctness,concurrency:codex:gpt-6.2:xhigh \
  --final-challenge-tool codex --final-challenge-model gpt-6.2 \
  --final-challenge-effort high --providers openai,anthropic --post never
```

Use `magoo recipe new my-team --from deep --user` to save a reusable recipe,
`magoo recipe new my-team --interactive --user` to build one, or
`magoo pr --help` for the per-run options. [Configuration and recipes](docs/configuration.md)

## Work with the results

```bash
magoo runs
magoo report last --open
magoo resume 3
magoo local --prior last
magoo post last --walk
```

Markdown, HTML, JSON, and receipt artifacts live under
`~/.magoo/projects/<repo>-<hash>/runs/<N>/` by default. For CI or a coding agent,
run a target command with `--json` and use the exit code and receipt status.
`magoo setup` installs the bundled review and recipe skills for supported
coding agents. Add `--global` to install them for your user account.
[Artifacts and exit codes](docs/artifacts-and-exit-codes.md) ·
[GitHub comment delivery](docs/comment-delivery.md)

The receipts verify that the required review stages completed, the baseline
seal held, and assigned lenses and candidates were accounted for. Evidence
quality still depends on the models and the material they could inspect.
Magoo asks Crossby to enforce read-only turns and reports the blind baseline's
isolation status for the selected backend.
[Trust, isolation, and known limits](docs/trust-and-isolation.md)

## Contributing

Run the tests, Ruff, mypy, and package checks before opening a PR.
[Contribution guide](CONTRIBUTING.md)

Magoo is MIT licensed.
