npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

opencode-completion-gate

v1.3.1

Published

OpenCode plugin: per-session quality gate that blocks declaring done until configured assertions pass

Readme

opencode-completion-gate

npm version CI License: MIT

Per-session quality gate that blocks an agent from declaring a task "done" until configured assertions pass (build green, unit tests green, PR policies green, LLM self-review…).

Installation

npm install opencode-completion-gate

Add the plugin to your OpenCode configuration:

opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["opencode-completion-gate"]
}

Quick start

  1. Instruct the agent: "Fix X until completion."
  2. Type /gate (enables the gate for this session).
  3. The agent works; each time it goes idle the gate runs your assertions.
  4. All pass → ✅ Completion gate passed (...) appears once and the agent may report done.
  5. Something fails → the agent is re-prompted with the failure evidence and keeps fixing until it passes or hits the retry cap.
  6. /gate off when you're done.
/gate          # enable (same as /gate on)
/gate status   # e.g. "Completion gate: ENABLED · retries=1 · lastOutcome=fail · extraCommand=none · mode=combined · maxRetries=3 (config)"
/gate off      # disable for this session
/gate --only "npm run test-ci" --retries 5  # run only this command with its own retry cap

Configuration

Config lives per project at <project-root>/.opencode/completion-gate.json (re-read on every gated turn end):

{
  "enabled": true,
  "maxRetries": 3,
  "assertions": [
    { "type": "command", "name": "build", "run": "dotnet build --nologo -v q", "timeoutSeconds": 300 },
    { "type": "command", "name": "unit-tests", "run": "dotnet test --no-build --nologo -v q", "timeoutSeconds": 600 }
  ]
}

Assertion types: command, ado-pr, opencode-review. See completion-gate-plugin.md for the full schema, ADO PR polling, review sessions, diagnostics (gate-diag.log), and troubleshooting.

Orchestration launchers can arm the first session without a chat message by setting OPENCODE_GATE_BOOTSTRAP_COMMAND_B64 (or OPENCODE_GATE_BOOTSTRAP_COMMAND) and optionally OPENCODE_GATE_BOOTSTRAP_MAX_RETRIES. The retry override is honored for command-only bootstrap sessions and takes precedence over the project's maxRetries; combined mode uses the project value. Bootstrap settings are captured during plugin initialization, with a fallback read when the first session is created, and are consumed once.