gitwtfhub

wtf is opencode-review-enforcement?

codedeficient/opencode-review-enforcement — explained in plain English

Analysis updated 2026-05-18

1TypeScriptAudience · developerComplexity · 3/5LicenseSetup · moderate

TL;DR

A plugin for OpenCode AI agents that blocks git pushes unless every commit has an attached, verified code review note.

Mindmap

mindmap
  root((review enforcement))
    What it does
      Attach review notes
      Block unreviewed pushes
      Gate via pre-push hook
    Tech stack
      TypeScript
      Git notes
      OpenCode plugin API
    Use cases
      Enforce code review policy
      Review pull requests by number
      Spawn AI reviewer subagents
    Audience
      Developers
      Teams using AI coding agents

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Why would anyone build with this?

REASON 1

Block git pushes that contain commits without an attached review note.

REASON 2

Have an AI agent automatically spawn a reviewer subagent before pushing.

REASON 3

Review an entire pull request by referencing its number instead of a commit hash.

REASON 4

Exempt old commits from review while enforcing it on everything going forward.

What's in the stack?

TypeScriptGitOpenCode

How it stacks up

codedeficient/opencode-review-enforcement0xkinno/neuralvault0xmayurrr/ai-contractauditor
Stars111
LanguageTypeScriptTypeScriptTypeScript
Setup difficultymoderatehardeasy
Complexity3/54/52/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you spin it up?

Difficulty · moderate Time to first run · 30min

Requires OpenCode 1.17+, Git, and copying plugin, command, agent, and hook files into your project's .opencode and .husky directories.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

Wtf does this do

This project makes sure code reviews actually happen before code gets pushed, specifically for people using OpenCode, a tool where AI agents help write code. It works by attaching review notes directly to git commits and then blocking any push that includes a commit missing one of those notes. The flow works like this: you make a commit as usual, then either type a review command yourself or let your AI agent spawn a dedicated reviewer to check the commit. Once that review finishes, the plugin automatically attaches its output as a git note on that commit. A pre push hook then checks every commit you are about to push and only allows the push through if every single one has a review note attached. Setting it up means copying a plugin file, a command file, and an agent file into specific folders inside your project, then adding a small script block to your existing pre push hook. You also create a baseline file containing the commit hash of your last exempt commit, so that only new commits going forward are required to have reviews, not your entire existing history. Once running, you can trigger a review by typing a slash command with a commit hash, or by having your AI agent spawn a reviewer subagent to do it for you, and that reviewer only has read only access to git and the GitHub command line tool. You can also review an entire pull request by referencing its number, and the tool will find and mark the commit at the tip of that pull request. It requires a fairly recent version of OpenCode, Git itself, and optionally the GitHub command line tool if you want to review pull requests by number rather than by individual commit. It is released under the MIT license.

Yoink these prompts

Prompt 1
Help me install opencode-review-enforcement into my project's .opencode folder.
Prompt 2
Explain how the pre-push hook decides whether to block a push.
Prompt 3
Walk me through setting a .review-baseline file for my repository.
Prompt 4
How does this plugin resolve which commit to attach a review note to?

Frequently asked questions

wtf is opencode-review-enforcement?

A plugin for OpenCode AI agents that blocks git pushes unless every commit has an attached, verified code review note.

What language is opencode-review-enforcement written in?

Mainly TypeScript. The stack also includes TypeScript, Git, OpenCode.

What license does opencode-review-enforcement use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is opencode-review-enforcement to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is opencode-review-enforcement for?

Mainly developer.

View the repo → Decode another repo

This repo across BitVibe Labs

Don't trust strangers blindly. Verify against the repo.