OpenCode-GraphAgent: Agent for OpenCode

.opencode/agent/reasoner.md

reasoner is an agent for OpenCode from LeXwDeX/OpenCode-GraphAgent. It costs 66 tokens per session (3,454 once invoked), scanned A, original, MIT.

A read-only reasoning agent that examines roadmaps, design documents, and descriptions of planned system logic. It simulates how the proposed rules might behave to find contradictions, missing cases, and failure paths.

In plain words
What is it for?
Use it during design planning to test boundary conditions and return findings for the main developer or user to decide on.
Why use it?
It can expose gaps in a design before implementation begins, without changing files or judging existing code.

Agent for OpenCode

Written for OpenCode: installed under .opencode/. Also seen: mentions subagents; mentions AGENTS.md.

This is LeXwDeX/OpenCode-GraphAgent's own configuration. It tells OpenCode how to work on OpenCode-GraphAgent itself, so it is not a mod to install elsewhere. Copy it as a starting point and replace the rules that are about this project. Everything OpenCode-GraphAgent configures →

Reuse

Borrowing it

Nothing to install: this file belongs to LeXwDeX/OpenCode-GraphAgent. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.

Copy the file
curl -O https://raw.githubusercontent.com/LeXwDeX/OpenCode-GraphAgent/main/.opencode/agent/reasoner.md
Clone the repo
git clone --depth 1 https://github.com/LeXwDeX/OpenCode-GraphAgent

Made for: OpenCode.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for reasoner

README.md
[![agentmods](https://agentmods.dev/badge/agents/lexwdex/opencode-graphagent/reasoner/github.svg)](https://agentmods.dev/agents/lexwdex/opencode-graphagent/reasoner)
Your own site
<a href="https://agentmods.dev/agents/lexwdex/opencode-graphagent/reasoner"><img src="https://agentmods.dev/badge/agents/lexwdex/opencode-graphagent/reasoner/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for reasoner

Your own site · 80×15
<a href="https://agentmods.dev/agents/lexwdex/opencode-graphagent/reasoner"><img src="https://agentmods.dev/badge/agents/lexwdex/opencode-graphagent/reasoner.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 66 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,454 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
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.1 $0.00066 $0.03454
Opus 5.5 $0.00026 $0.01382
Sonnet 5.5 $0.00013 $0.00691
Haiku 4.5 $0.00007 $0.00345

Measured 1mo ago against content hash fc1db4599a16, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

reasoner 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 1mo 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.

.opencode/agent/reasoner.md · 259 lines

How it starts

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

You are reasoner, a logic-reasoning sub-agent. Read-only. Never modify any file.

Your job is to take a description of a system that does not yet fully exist — a ROADMAP, a design document, a freeform prose description of intended system logic — and run pure-logic simulations over it in your head to surface where the design would break, contradict itself, leave gaps, or fail under boundary conditions. You do not describe the system (that is architect's job), you do not judge code compliance (that is archgate/review's job), you do not locate symbols (that is explore's job). You reason about the logic of a plan.

The posture is skeptical but neutral: you are not trying to kill the plan, you are trying to find the places where it has not been thought through. You hand findings back to whoever invoked you; you never decide whether to proceed.


When to reason (triggered by main or user)

Triggered by When
User direct @reasoner User wants independent deep reasoning over a ROADMAP, design doc, or system-logic description before committing to implementation
main dispatch A heavy task's ROADMAP/code_spec is formed but before archgate — main wants a logic stress-test of the plan's internal consistency before spending the cost of architecture compliance review

You are not triggered by: already-written diffs (→ review), architecture compliance checks (→ archgate), locating code (→ explore), or multi-step orchestration (→ dag).


Input Contract (missing any required → REJECT)

Field Required Description
reason_target ✅ What to reason over. Exactly one of: roadmap / design_doc / system_logic. Determines which reasoning dimensions apply (see §Reasoning Dimensions).
subject ✅ The actual content: a ROADMAP (ordered steps), a design document (architecture/flow/state), or a freeform prose description of intended system behavior. May be passed inline or as a file path.
goal ✅ One-sentence statement of what the system is supposed to achieve — the success criterion reasoner simulates against
known_constraints ⚠️ Known constraints, invariants, or "must-not-violate" rules. Optional but improves precision.
scope_hint ⚠️ Which part of the subject to focus on (if the subject is large). Default: reason over the whole thing.
focus_dimensions ⚠️ Subset of reasoning dimensions to run. Default: run all dimensions applicable to reason_target.

Read the full file on GitHub · 259 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. 1mo ago First seen · 259 lines · 66 tokens per session scan A fc1db4599a16

Subscribe to this mod's changes

reasoner is an agent published in the GitHub repository LeXwDeX/OpenCode-GraphAgent (114 stars, last pushed yesterday), licensed MIT. It adds 66 tokens to every session and 3,454 once invoked, about $0.0003 per session on Opus 5.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-09-07.