OpenCode-GraphAgent: Instructions file for Codex

AGENTS.md

OpenCode-GraphAgent AGENTS.md is an instructions file for Codex, OpenCode from LeXwDeX/OpenCode-GraphAgent. It costs 4,020 tokens per session, scanned A, original, MIT.

Repository instructions that define how developers should use Git, branches, pull requests, releases, and automated tests. A pull request is a proposed code change that must pass the required checks before merging.

In plain words
What is it for?
Use them when choosing branch names, opening pull requests, running checks, triggering releases, and following the repository's TypeScript and SDK workflow.
Why use it?
They reduce accidental changes to protected branches and make the path from development to testing and release consistent.

Instructions file for CodexOpenCode

Written for Codex and OpenCode: the file is AGENTS.md. Also seen: mentions AGENTS.md; mentions OpenCode.

This is LeXwDeX/OpenCode-GraphAgent's own configuration. It tells Codex and 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/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/LeXwDeX/OpenCode-GraphAgent

Made for: Codex, 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 OpenCode-GraphAgent AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/lexwdex/opencode-graphagent/agents-md/github.svg)](https://agentmods.dev/instructions/lexwdex/opencode-graphagent/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/lexwdex/opencode-graphagent/agents-md"><img src="https://agentmods.dev/badge/instructions/lexwdex/opencode-graphagent/agents-md/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 OpenCode-GraphAgent AGENTS.md

Your own site · 80×15
<a href="https://agentmods.dev/instructions/lexwdex/opencode-graphagent/agents-md"><img src="https://agentmods.dev/badge/instructions/lexwdex/opencode-graphagent/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 4,020 This file is loaded in full into every session.
When invoked 4,020 The same file — it is already loaded in full.
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.04020 $0.04020
Opus 5.5 $0.01608 $0.01608
Sonnet 5.5 $0.00804 $0.00804
Haiku 4.5 $0.00402 $0.00402

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

Security

Grade A, and why

OpenCode-GraphAgent 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 6d 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 · 142 lines

How it starts

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

AGENTS.md

Guidance for coding agents in GraphAgent, an opencode fork with a DAG workflow engine. This file records repository facts and secondary development constraints. Apply the nearest nested AGENTS.md to each changed package. Verify factual claims against current source, package scripts, and workflows; do not treat a development rule as proof that a check has passed.

Scope and layout

  • GraphAgent v1 is in focused maintenance, as described in README.md: DAG configuration, curated workflow templates, and reproducible defect fixes. Stability and data-integrity defects may receive narrow compatibility patches. Keep changes within this scope.
  • Bun workspace + Turbo. Runtime pins have one source each: Bun in package.json (packageManager), Node in .node-version, Go in config_assistant/go.mod. bun run toolchain:check and .husky/pre-push reject any differing runtime patch; CI and container builds read the same pins. Electron owns its embedded Node runtime; VSCode extension host types retain their own compatibility major.
  • packages/core: DAG engine primitives (src/dag/ — store/projector/sql, exported as ./dag/core/* and ./dag/*) plus DB schema/migrations ownership.
  • packages/opencode: agent runtime. Services compose in AppLayer (src/effect/app-runtime.ts). Effect v4 (beta) rules, makeRuntime/InstanceState, tool-schema, and module-shape contracts are owned by packages/opencode/AGENTS.md (pattern reference: packages/opencode/specs/effect/migration.md).
  • Curated workflow YAML, composable blocks, and reusable worker prompts live in LeXwDeX/opencode-dag-config. Release builds embed its snapshot through DAG_TEMPLATES_DIR (packages/opencode/script/generate.ts). Local builds without that variable omit builtin templates and use project/global libraries. Curated configuration-only changes belong in the configuration repo; runtime routing and policy prompts still live here.

Secondary development constraints

  • Before behavior changes, record Why, Scope, Approach, and Acceptance. Read the affected package rules and existing regression tests. Keep fixes focused; do not combine unrelated cleanup or dependency upgrades.
  • Keep database schemas and migrations in packages/core. Generate schema changes with bun run migration there. Include the migration under src/database/migration/, schema.json, src/database/migration.gen.ts, and src/database/schema.gen.ts together. Preserve existing data and test both new databases and upgrades.
  • Persist DAG lifecycle changes through the existing Dag/EventV2 path. Keep projectors limited to database writes. Preserve replay idempotency and keep projection guards consistent with the transition tables.
  • Preserve workflow locking, execution-attempt identity, directory ownership, and pause/cancel/recovery behavior. Cover affected stale completion, restart, deletion, and lease-release paths. Do not assume cross-process locking or exactly-once execution.
  • Use InstanceState for state owned by a directory. Bind subscriptions, child processes, and background work to scopes with finalizers. Preserve application-scoped supervision that must survive directory disposal. Test resource release when changing lifecycle behavior.
  • Preserve public HTTP shapes, event identities, and durable event versions. Update producers, consumers, manifests, generated clients, and scenarios together when changing a contract. Provide explicit compatibility handling for persisted formats.
  • Keep tool parameter schemas object-rooted. Validate arguments and apply the tool's permission policy before side effects. Preserve interruption and defect propagation. Follow the relevant tool rules in packages/opencode/AGENTS.md or packages/core/src/tool/AGENTS.md.
  • Keep dependency manifests, the workspace catalog, lockfiles, overrides, and patches consistent. Match native wrappers to their platform packages. Change runtime pins at their declared sources and verify affected CI, containers, and Nix builds. Use real Nix builds to regenerate hashes.
  • Use isolated sessions, temporary data, and task-owned test processes. Preserve the user's active chats, configuration, and running services. Keep credentials out of logs and fixtures. Security audits use model reasoning over business logic and source; do not use external DayBreak tools.

Read the full file on GitHub · 142 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. 6d ago Changed · +1 lines · +135 tokens per session b9a0ac8b416e
  2. 9d ago Changed · -24 lines · -323 tokens per session 164d0ee481e8
  3. 11d ago Changed · +5 lines · +209 tokens per session b9296485aeb8
  4. 12d ago Changed · +1 lines · +47 tokens per session 135713b51480
  5. 14d ago Changed · +35 lines · +169 tokens per session c2315c414ccb
  6. 18d ago Changed · +26 lines · +990 tokens per session 6d19ff16617b
  7. 20d ago Changed · +23 lines · +827 tokens per session 78404d2afa30
  8. 23d ago Changed · +1 lines · +90 tokens per session cdd55d04c00f
  9. 24d ago Changed · +5 lines · +111 tokens per session 22f899aac13b
  10. 1mo ago First seen · 69 lines · 1,765 tokens per session scan A 02361ec977b6

Subscribe to this mod's changes

OpenCode-GraphAgent AGENTS.md is an instructions file published in the GitHub repository LeXwDeX/OpenCode-GraphAgent (114 stars, last pushed yesterday), licensed MIT. It adds 4,020 tokens to every session, about $0.0161 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-08-30.

Related

Other instructions, from other repositories

vscode buildNext.instructions.md

Working notes and architecture documentation for the new esbuild-based build system in build/next. Use when making changes to the new build pipeline (transpile/bundle commands, NLS plugin, source-map handling, resource copying, or self-hosting watch tasks).

microsoft/vscode · 9,649 tokens

next.js AGENTS.md

AGENTS.md instructions for vercel/next.js, covering next.js development guide, codebase structure, monorepo overview, core package: packages/next and other important packages.

vercel/next.js · 7,549 tokens

vscode oss-third-party-notices.instructions.md

Instructions for microsoft/vscode, covering vs code oss third-party-notices pipeline, architecture, pipeline flow in ci, cache eligibility and rollout and applying the notice (cutover).

microsoft/vscode · 5,262 tokens

langchain AGENTS.md

AGENTS.md instructions for langchain-ai/langchain, covering global development guidelines for the langchain monorepo, corridor security analysis, project architecture and context, monorepo structure and development tools & commands.

langchain-ai/langchain · 4,680 tokens

vscode copilot-instructions.md

Copilot instructions for microsoft/vscode, covering vs code copilot instructions, project overview, root folders, core architecture (src/ folder) and built-in extensions (extensions/ folder).

microsoft/vscode · 2,731 tokens

deno copilot-instructions.md

Copilot instructions for denoland/deno, covering deno development guide for github copilot, network access, high level overview, key directories and key files to understand first.

denoland/deno · 3,077 tokens