cocode: Instructions file for Codex

AGENTS.md

cocode AGENTS.md is an instructions file for Codex, OpenCode from cocode-agency/cocode. It costs 1,500 tokens per session, scanned A, original, MIT.

Repository instructions that explain the layout and boundaries of the Cocode project, which has separate graphical, terminal, and agent-runtime parts.

In plain words
What is it for?
Use them when navigating Cocode, deciding where a change belongs, or connecting the graphical and terminal clients to the agent runtime.
Why use it?
They help coding agents change the correct part of a multi-project repository and avoid mixing responsibilities between components.

Instructions file for CodexOpenCode

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

This is cocode-agency/cocode's own configuration. It tells Codex and OpenCode how to work on cocode 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 cocode configures →

Reuse

Borrowing it

Nothing to install: this file belongs to cocode-agency/cocode. 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/cocode-agency/cocode/main/AGENTS.md
Clone the repo
git clone --depth 1 https://github.com/cocode-agency/cocode

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 cocode AGENTS.md

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/cocode-agency/cocode/agents-md"><img src="https://agentmods.dev/badge/instructions/cocode-agency/cocode/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,500 This file is loaded in full into every session.
When invoked 1,500 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.01500 $0.01500
Opus 5.5 $0.00600 $0.00600
Sonnet 5.5 $0.00300 $0.00300
Haiku 4.5 $0.00150 $0.00150

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

Security

Grade A, and why

cocode 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 2mo 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 · 124 lines

How it starts

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

AGENTS.md

Cocode 产品由三个 同级目录 组成:桌面/Web GUI、终端 TUI、Agent 运行时(harness)。本文件在 git 仓库根目录,覆盖整个工作区;各子目录有独立 pnpm workspace 与依赖。

仓库布局

./
  AGENTS.md           ← 本文件
  cocode-gui/         桌面 / Web GUI(含 .dev/guide、.dev/rfc)
  cocode-tui/         终端 TUI(含 .dev/rfc)
  cocode-host-supervisor/  DSH Host 生命周期与 runtime staging

不要在 GUI/TUI 目录中修改 DSH agent loop;Host 生命周期与 runtime staging 统一在 cocode-host-supervisor/ 维护。

仓库边界

目录 职责 连 harness 的方式
cocode-gui/ 品牌 UI、设计系统、Host 客户端 HTTP POST + 双 WebSocket → dsh web
cocode-tui/ 终端 UI、JSON-RPC 客户端 stdio NDJSON-RPC → jsonrpc-agent 子进程
cocode-host-supervisor/ DSH Host 生命周期、runtime staging、Cocode Host 插件 —

跨目录需求:上游 DSH 负责通用运行时能力,Cocode Host Supervisor 负责 Host 组合与 staging,GUI/TUI 侧消费 wire API;Cocode 产品行为统一落在 GUI 的插件包或 Host 插件中。

cocode-gui/

cocode-gui/
  .dev/
    guide/               设计系统(design-system.html 为视觉权威)
    rfc/                 GUI 相关 RFC(pending/、implemented/)
  src/main.ts
  packages/
    connection/          Host 传输(@cocode/gui-connection)
    ui/                  设计令牌与 UI 基元(@cocode/ui)

分层:传输 → app 内 runtime/(会话状态,零 React)→ 呈现(React/Electron + packages/ui)。

.dev/ 下除 guide/、rfc/ 外的本地 scratch 不入库;RFC 写在 cocode-gui/.dev/rfc/,不要堆在仓库根。

cd cocode-gui
pnpm install
pnpm run dev          # Electron desktop client (default)
pnpm run dev:web      # browser-only, e.g. design-system.html
pnpm run typecheck

联调:cd ../cocode-host-supervisor && pnpm dsh web(默认 http://127.0.0.1:3080)。

Host 参考:cocode-host-supervisor/packages/host-supervisor/。

cocode-tui/

cocode-tui/
  .dev/
    rfc/                 TUI 相关 RFC(pending/、implemented/)
  src/main.ts
  packages/
    connection/          JSON-RPC 传输(@cocode/tui-connection)

TUI 通过 @deepseek-ai/dsh-sdk-client 封装 spawn + session.event 流;技能/slash 走 session.prompt 文本路径。RFC 写在 cocode-tui/.dev/rfc/。

cd cocode-tui
pnpm install
pnpm run dev
pnpm run typecheck

Read the full file on GitHub · 124 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. 2mo ago Changed · +4 lines · +37 tokens per session f40f7d1d0999
  2. 2mo ago First seen · 120 lines · 1,463 tokens per session scan A f66af62a639d

Subscribe to this mod's changes

cocode AGENTS.md is an instructions file published in the GitHub repository cocode-agency/cocode (167 stars, last pushed 2mo ago), licensed MIT. It adds 1,500 tokens to every session, about $0.0060 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

cocode AGENTS.md compared with instructions from other repositories

cocode AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
cocode AGENTS.mdcocode-agency/cocodeInstructions file1672mo agoMITA1,500Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA9,719GitHub Copilot
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA5,516GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149ktodayMITA4,680Codex, OpenCode
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA3,093GitHub Copilot
vscode model-prompts.instructions.mdmicrosoft/vscodeInstructions file195ktodayMITA2,022GitHub Copilot