OpenCode-GraphAgent AGENTS.md

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

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/lexwdex/opencode-graphagent/agents-md
Clone the repo
git clone --depth 1 https://github.com/LeXwDeX/OpenCode-GraphAgent

Made for: Codex, OpenCode.

Per session 6,953 This file is loaded in full into every session.
When invoked 6,953 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.06953 $0.06953
Opus 5 $0.03476 $0.03476
Sonnet 5 $0.01391 $0.01391
Haiku 4.5 $0.00695 $0.00695

Measured yesterday against content hash 01607d5804c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, 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 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.

AGENTS.md · 393 lines

How it starts

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

  • To regenerate the JavaScript SDK, run ./packages/sdk/js/script/build.ts.
  • The default branch in this repo is main.

Git Workflow (铁律)

feat/**, fix/** ──PR(Typecheck + Unit Tests 门禁)──▶ dev ──push 触发全量测试──▶
    dev ──手动 release-fork──▶ prerelease 测试版
    dev ──PR(全量测试门禁)──▶ main ──手动 release-fork──▶ 正式版

分层门禁dev 是快速集成层(Typecheck + Unit Tests (linux);E2E 不阻塞),main 是正式质量门禁(Typecheck + 全量 Unit Tests + E2E)。所有改动通过 PR 流转,禁止直推 maindev(由 GitHub Rulesets 强制)。

Branch 直推 PR 门禁 CI 触发 Purpose
{type}/** ✅ 允许 push 不触发;PR 触发目标分支门禁 开发分支,频繁变更
dev ❌ 禁止 PR 必须通过 Typecheck + Unit Tests (linux) ✅ push 触发 Typecheck + 全量测试 快速集成层
main ❌ 禁止 PR 必须通过 Typecheck + Unit Tests + E2E (linux + windows) + SpecGit Acceptance ✅ push 触发全量 正式质量门禁 + 发版

流程

  1. main 切出 feat/**fix/** 分支开发
  2. PR → dev(Typecheck + Unit Tests (linux) 门禁,快速合并)
  3. push 到 dev 自动触发全量测试验证
  4. dev 手动 release-fork → 产出 prerelease 测试版
  5. PR devmain(全量测试门禁:Typecheck + Unit Tests + E2E)
  6. 合并到 main 后手动 release-fork → 产出正式版

Rulesets(GitHub Settings → Rules → Rulesets)

  • protect-main:禁止直推/删除/force-push;PR 需通过 5 项检查(Typecheck、Unit Tests (linux)、E2E Tests (linux)、E2E Tests (windows)、SpecGit Acceptance)
  • protect-dev:禁止直推/删除/force-push;PR 需通过 Typecheck
  • branch-naming:只允许创建 feat/**fix/**chore/**docs/**refactor/**test/**release/**hotfix/** 前缀的新分支

CI 配置

  • ci-typecheck.yml:push 到 main/dev + PR → main/dev 时触发;除 lint + typecheck 外还跑 test:dag-core DAG 核心行为/覆盖率门禁(10min 超时)
  • ci-test.yml:push 到 main/dev + PR → main/dev 时触发全量测试(cancel-in-progress: false 保证跑完);Linux unit-tests job 额外校验生成物新鲜度(packages/clientpackages/sdk/jscheck:generated)并跑 HttpAPI 契约门禁(test:httpapi:ci
  • specgit-accept.yml:仅 PR → main 时触发;安装 pinned [email protected],等 spec_git/policy.yaml required_checks 全部到终态后运行 specgit finish --json 产出 SpecGit Acceptance 裁决
  • release-fork.yml:手动 workflow_dispatch 是唯一真实构建路径(push 到 main/dev 仅注册不构建);从 dev 发布自动产出 X.Y.Z-dev.N prerelease,从 main 发布 X.Y.Z 并标 Latest

Read the full file on GitHub · 393 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 · 393 lines · 6,953 tokens per session scan A 01607d5804c0

Subscribe to this mod's changes

OpenCode-GraphAgent AGENTS.md is an instructions file published in the GitHub repository LeXwDeX/OpenCode-GraphAgent (111 stars, last pushed 3d ago), licensed MIT. It adds 6,953 tokens to every session, about $0.0348 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.