open-plan-annotator AGENTS.md

Instructions for a local tool that opens a browser page when an AI coding assistant finishes making a plan, so a person can review and annotate it before coding starts.

In plain words
What is it for?
Reviewing and annotating plans in Claude Code or OpenCode, installing the needed runtime, and starting the local review page.
Why use it?
It gives developers a visual way to inspect and comment on a plan before code is written, while handling the tool's local runtime and browser server.

Instructions file for CodexOpenCode

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add instructions/ndom91/open-plan-annotator/agents-md
Clone the repo
git clone --depth 1 https://github.com/ndom91/open-plan-annotator

Made for: Codex, OpenCode.

Per session 2,333 This file is loaded in full into every session.
When invoked 2,333 The same file — it is already loaded in full.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.02333 $0.02333
Opus 5 $0.01167 $0.01167
Sonnet 5 $0.00467 $0.00467
Haiku 4.5 $0.00233 $0.00233

Measured 2d ago against content hash 853149615e03, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

open-plan-annotator AGENTS.md scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

AGENTS.md · 127 lines

How it starts

The opening of the file, as written. The whole thing — 127 lines — stays where its author put it; the contents beside it link to each section on GitHub.

open-plan-annotator: Development Guide

What This Is

A fully local Claude Code plugin that intercepts ExitPlanMode hook events and opens a browser UI for reviewing and annotating plans before code is written. Ships as a package-managed platform runtime binary (compiled via bun build --compile) that embeds the React UI. Also works as an OpenCode plugin via the @opencode-ai/plugin SDK.

Architecture

Claude Code path:
  SessionStart hook fires
    → scripts/install-runtime.mjs   (Node: ensures per-platform runtime binary is present)
      → If missing: fetches @open-plan-annotator/runtime-<platform>-<arch>@<version>
        tarball from the npm registry, verifies dist.integrity, extracts the
        compiled Bun binary into packages/runtime-<platform>-<arch>/bin/.
      → If present: exits 0 immediately (fast path).

  ExitPlanMode hook fires
    → bin/open-plan-annotator.mjs   (Node wrapper: buffers stdin, resolves runtime package, delegates)
      → packages/runtime-<platform>-<arch>/bin/open-plan-annotator  (compiled Bun binary)
        → Reads hook JSON from stdin
        → Starts HTTP server on ephemeral port
        → Opens browser to the UI
        → Blocks until user approves/denies
        → Writes hook response JSON to stdout

OpenCode path:
  Agent calls annotate_plan tool
    → opencode/index.js             (OpenCode plugin entry, loaded via package.json "main")
      → opencode/bridge.js          (constructs fake HookEvent, spawns binary)
        → bin/open-plan-annotator.mjs → binary (same as above)
      → Parses HookOutput, returns approval/feedback to agent

The OpenCode plugin bridges to the same binary by constructing a Claude-format HookEvent payload and parsing the HookOutput response. This means there is only one server/UI codepath.

Runtime distribution

The main npm package (open-plan-annotator) is small and ships no compiled binary. Per-platform binaries live in their own runtime packages (@open-plan-annotator/runtime-darwin-arm64, -darwin-x64, -linux-arm64, -linux-x64), each compiled with bun build --compile --target=bun-<platform>. These are listed as optionalDependencies so npm install picks the right one automatically.

Read the full file on GitHub · 127 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 127 lines · 2,333 tokens per session scan A 853149615e03

Subscribe to this mod's changes

open-plan-annotator AGENTS.md is an instructions file published in the GitHub repository ndom91/open-plan-annotator (90 stars, last pushed 15d ago), licensed MIT. It adds 2,333 tokens to every session, about $0.0117 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.