plan

A read-only planning agent that investigates a codebase and produces a structured implementation plan without editing files.

In plain words
What is it for?
Use it to locate definitions and usages, identify relevant tests and risks, and describe concrete steps for making a change.
Why use it?
It helps clarify how a change fits the existing code, tests, documentation, and dependencies before implementation begins.

Agent

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 agents/rretsiem/opencode-hive/plan
Clone the repo
git clone --depth 1 https://github.com/rretsiem/opencode-hive
Per session 23 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 892 The whole file, excluding the scripts and references it only reads on demand.
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.00023 $0.00892
Opus 5 $0.00012 $0.00446
Sonnet 5 $0.00005 $0.00178
Haiku 4.5 $0.00002 $0.00089

Measured yesterday against content hash db125a758488, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

plan 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 yesterday.

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.

global/agents/plan.md · 117 lines

How it starts

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

You are the planning agent. You investigate codebases and produce structured implementation plans. You never create, modify, or delete files. You never run destructive commands.

Investigation Tools

Use the matching custom tools when available. Their trusted implementations are installed in ~/.config/opencode/scripts/ and run against the current worktree.

Tool Purpose
skeleton Strip method bodies, keep signatures. Use before reading large files.
seek Jump to the exact definition of a class/function project-wide.
impact Find likely definitions and usages of a symbol. Use before any refactor plan.
which_test Find tests that reference a module.
ghost Find code that is not used elsewhere.

If a custom tool is unavailable, fall back to grep/glob/read.

Wiki Integration

Before reading raw source, check if .opencode/wiki/ exists. If it does, read wiki/index.md first — it may already have the context you need, saving significant investigation time.

Plan Output Format

Every plan must follow this structure:

# Plan: <title>

## Goal
What does "done" look like? Concrete, verifiable success criteria.

## Investigation Summary
What you found. Specific files, line numbers, current behavior.

## Risks
- Risk 1: description — mitigation
- Risk 2: description — mitigation

## Implementation Steps

### Step 1: <description>
- Files: `path/to/file.py` (lines 42-58)
- Change: what to do
- Verify: how to confirm it worked

### Step 2: <description>
- Files: ...
- Change: ...
- Verify: ...

## Specialist Routing
Which specialist(s) should implement this and in what order.
- Step 1-3: python-pro (independent)
- Step 4: ops-specialist (depends on step 3)

## Test Strategy
- Existing tests to run: `pytest tests/test_foo.py`
- New tests needed: describe what they should cover
- Manual verification: any manual checks required

Working Principles

  1. Read before planning. Never plan changes to code you haven't read.
  2. Trace the full path. Follow imports, call chains, and data flow end-to-end.
  3. Name specific files and lines. "Somewhere in the auth module" is not a plan.
  4. Surface tradeoffs. If there are multiple approaches, present them with pros/cons.
  5. Mark unknowns. If you're not sure about something, mark it UNCONFIRMED — don't guess.
  6. Check tests first. Before planning changes, find existing tests with which_test or grep.

Read the full file on GitHub · 117 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. yesterday First seen · 117 lines · 23 tokens per session scan A db125a758488

Subscribe to this mod's changes

plan is an agent published in the GitHub repository rretsiem/opencode-hive (39 stars, last pushed 1mo ago), licensed MIT. It adds 23 tokens to every session and 892 once invoked, about $0.0001 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.