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-multi-role-dev

v0.3.0

Published

Multi-Role Development Workflow for OpenCode: 10 governed roles, deterministic Python verifier, human-approved gates G1-G4.

Readme

Multi-Role Development Workflow — plugin para OpenCode V2

Port del plugin multi-role-dev de Google Antigravity a OpenCode V2. Mantiene el verificador determinista en Python (stdlib, sin cambios), los 10 roles, el skill dev-workflow, los gates G1–G4 con human-in-the-loop y el guard fail-closed, usando primitivas nativas de OpenCode.

Estado

Esqueleto funcional. La capa dependiente de Antigravity fue reemplazada:

| Antigravity | OpenCode V2 | |---|---| | hooks.json + PreToolUse | ctx.permission.hook("evaluate") (muta effect/message) | | Stop hook | ctx.session.hook("context", "experimental.idle") + ctx.storage anti-loop | | verifier_mcp.py (18 tools) | tools verifier_* sobre verify.py (mismo verifier_core.py) | | invoke_subagent / send_message | ctx.session.create + ctx.session.prompt + ctx.session.wait | | run_workflow / run_iteration.py | tool mrd_run_iteration (olas paralelas) | | ask_question | tool question del humano + mrd_ask_gate para persistir approver/ts | | role-registry.json + transcript | ctx.storage (sesión → rol/profundidad) | | agy -p --model <slug> | modelos agnósticos: inherit por defecto o intents resueltos contra ctx.model.list() |

Instalación

npm install -g opencode-multi-role-dev

En opencode.jsonc:

{
  "$schema": "https://opencode.ai/config.json",
  "plugins": ["opencode-multi-role-dev"]
}

Requiere Python 3 en el PATH. El verificador es stdlib-only: no hay pip install.

La primera vez que el plugin ve un repo con .agents/harness.json, instala las 10 definiciones de rol en <repo>/.opencode/agents/mrd-*.md (solo crea archivos faltantes; nunca sobrescribe). Si no aparecen en el selector, ejecutá /reload.

Uso

/dev-workflow Start a new multi-role development request in this repository
/dev-workflow Resume the active multi-role development iteration
/dev-workflow Inspect DoD status, pending gates, and verification evidence

El Coordinator presentará los resúmenes L0 y pedirá aprobación humana en cada gate. No existe auto-aprobación: en modo headless, un gate sin respuesta humana detiene el flujo y genera una tarjeta de escalado.

Configuración agnóstica de modelos

.agents/harness.json (todos los campos opcionales):

{
  "active_model_preset": "native-inherit",   // native-inherit | cost-optimized | review-heavy
  "model_intents": {
    "explorer": "fast",
    "code-reviewer": "strong"
  },
  "model_overrides": {
    "code-reviewer": "anthropic/claude-sonnet-5-5#high"
  }
}

Intents: inherit (default, hereda el modelo de la sesión), fast, balanced, strong, cheapest, highest-context. Se resuelven contra los modelos disponibles en la sesión; si no hay metadatos de coste/contexto, se cae a inherit. Los slugs concretos de Antigravity (gemini-4-neon-xhigh, etc.) no se usan.

Gates y trazabilidad

El Coordinator usa el tool question de OpenCode (choices Approve / Reject / Changes requested + respuesta libre) para preguntar al humano, y luego mrd_ask_gate persiste exactamente esa respuesta con approver=<nombre> y ts en events.ndjson. No hay auto-aprobación: si no hay humano que responda, el flujo se detiene y genera una tarjeta ESC-NNN.md. verifier_core.update_req_state es la segunda capa: se niega a avanzar sin G1+G2 y exige G4 para done.

Estructura

src/        plugin (index, guard, verifier, agents, skill, handback, orchestrator, registry, events)
python/     common.py, verifier_core.py, verifier_mcp.py, verify.py  (sin cambios)
agents/     fuentes de los 10 roles (frontmatter V2; permisos se generan desde harness.json)
skills/     dev-workflow/SKILL.md + references
templates/  harness.default.json (adaptado a intents de modelo)

Validación

npm run typecheck
npm test        # incluye un ciclo G1→G4 real a través de PythonBridge
npm publish --dry-run

El test de integración crea un proyecto temporal, corre intake → G1 → G2 → auditoría C1 → verified → G4 → done, y verifica dos cosas críticas: que done se rechaza antes de G4, y que events.ndjson contiene approver=Jose y gate_g4_approved.

Escalados y worktrees

Cuando una iteración no alcanza APPROVED, se agota max_cycles o falla una ola, mrd_run_iteration escribe una tarjeta numerada ESC-NNN.md bajo <harness>/items/<REQ>/escalations/ con decisión requerida, opciones, recomendación y rutas de evidencia. El Coordinator la presenta al humano vía question.

Si git.enabled: true, el par implementer↔reviewer corre en un worktree creado con ctx.worktree.create. Al aprobarse el review se hace ctx.worktree.remove; si la remoción falla, la ruta se conserva y se reporta en la tarjeta/escalado para que el humano pueda recuperar el trabajo.

Publicación

npm publish --dry-run pasa limpio (35 archivos, sin .pyc). El login está activo (tun4z), pero el registry exige 2FA para publicar (E403) y el token OAuth de npm login no dispara el prompt de OTP. Dos formas de cerrarlo:

Opción A — OTP explícito (código de 6 dígitos del authenticator):

npm publish --access public --otp <codigo>

Opción B — token granular con bypass 2FA (recomendado para CI):

  1. Crear token en https://www.npmjs.com/settings/tun4z/tokens/granular-access/new con permiso Read/Write sobre el paquete y la casilla Bypass two-factor authentication marcada.
  2. Exportarlo y publicar:
$env:NPM_TOKEN = "<token>"
npm publish --access public