@octavio.bot/review
v0.1.5
Published
CLI for OpenCode-powered pull request review checks
Readme
@octavio.bot/review
CI-first PR review CLI that returns a pass/fail result and writes report artifacts.
What It Does
- Builds PR context from changed files.
- Instructs OpenCode to write artifacts directly to disk using an artifact schema.
- Validates artifacts in host runtime.
- Applies fail policy from profile config or instruction frontmatter.
No GitHub review comments are created or updated.
Run Published CLI
bunx --bun @octavio.bot/review@latest review --owner acme --repo web --pr 123 --workdir .Initialize Octavio in your repository:
bunx --bun @octavio.bot/review@latest init --workdir .This scaffolds:
.octavio/review.config.json.github/workflows/review-check.yml
The generated workflow defaults to OPENCODE_MODEL=opencode/minimax-m2.5-free and sets OPENCODE_API_KEY to an empty fallback (''). If you move to a non-free model, set repository secret OPENCODE_API_KEY.
CLI binary name: octavio-review.
OpenCode Detection and Install
- The CLI checks for
opencodebefore running reviews. - Local default is detect-only. If missing, the CLI prints install steps and exits.
- CI default (
GITHUB_ACTIONS=true) auto-installs OpenCode when missing. --install-opencodeforces local auto-install.
Manual install command:
curl -fsSL https://opencode.ai/install | bashHelpful commands:
bunx --bun @octavio.bot/review@latest doctor
bunx --bun @octavio.bot/review@latest install-opencodeEnvironment
GITHUB_TOKEN=...
OPENCODE_HOSTNAME=127.0.0.1
OPENCODE_PORT=4096
# OPENCODE_MODEL=... (optional; OpenCode default is used if omitted)
# OPENCODE_API_KEY=... (required for OpenCode Zen in CI)Free OpenCode Zen model options:
opencode/minimax-m2.5-freeopencode/glm-5-free
Local Source Development
From repo root:
bun install
bun run review-bot --owner acme --repo web --pr 123 --instructions-profile balanced --workdir .Build and packaging notes:
bun run review-cli:buildbuilds the CLI bundle and syncs prompt markdown intoapps/review-bot-cli/prompts/bun run syncfrom repo root runs the CLIsynctask through Turborepo and refreshes generated prompts- Prompt source-of-truth lives in
packages/prompts/prompts/*.md; the app-levelprompts/directory is generated for publishing
Optional flags:
--report-output path/to/review.md--findings-output path/to/confidence.json--result-output path/to/result.json--instructions-profile balanced--artifact-execution agent|host--install-opencode
Init flags:
--workdir path/to/repo--force(overwrite existing scaffolded files)
Instruction Profiles
Instruction resolution order:
--instructions(explicit path)--instructions-profilefrom.octavio/review.config.jsondefaultProfilefrom.octavio/review.config.json@octavio.bot/promptspackage default (balanced)
Policy resolution order:
- profile policy from
.octavio/review.config.json(policy.failOn) - instruction frontmatter policy (
policy.fail_on)
This repository includes three profiles in .octavio/review.config.json:
balancedstylingsecurity(includes PR metadata/code mismatch checks)
Artifact Outputs
Default artifact schema writes these files into artifacts/:
review.md- human-readable review reportconfidence.json- machine-readable summary and findings
confidence.json requires:
summary(string)overallConfidence(low|medium|high)findings(array withid,severity,title,path,line,comment)meta(object)
Workflows
- Review workflow:
.github/workflows/review-check.yml- Runs profile matrix (
balanced,styling,security) withmax-parallel: 1 - Uses
bunx --bun @octavio.bot/review@latest - Defaults to
OPENCODE_MODEL=opencode/minimax-m2.5-free - Uses
OPENCODE_API_KEY: ${{ secrets.OPENCODE_API_KEY || '' }} - Uploads
review.md,confidence.json, andresult.json
- Runs profile matrix (
- CI workflow:
.github/workflows/ci.yml- Includes smoke test:
bunx --bun @octavio.bot/review@latest doctor
- Includes smoke test:
- Publish workflow:
.github/workflows/publish-review.yml- Manual only (
workflow_dispatch) - Publishes from
apps/review-bot-cliusing npm trusted publishing (OIDC)
- Manual only (
Troubleshooting
- If runs fail after changing models, set repository secret
OPENCODE_API_KEY. - If OpenCode is unreachable, verify
OPENCODE_HOSTNAMEandOPENCODE_PORT. - If GitHub API requests fail, verify
GITHUB_TOKENpermissions.
