roll: Instructions file for Codex

AGENTS.md

roll AGENTS.md is an instructions file for Codex, OpenCode from seanyao/roll. It costs 1,862 tokens per session, scanned A, original, MIT.

Repository instructions for roll, a TypeScript tool that coordinates coding-agent work through repeated planning, execution, feedback, and correction cycles. They also describe its package structure and communication rules.

In plain words
What is it for?
Use them when modifying roll's TypeScript packages, command-line interface, integrations, or web components, and when deciding where a new capability belongs.
Why use it?
They help contributors preserve the project's architectural boundaries and keep new features connected to its feedback loop. They also clarify language and output expectations.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/seanyao/roll/agents-md"><img src="https://agentmods.dev/badge/instructions/seanyao/roll/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 1,862 This file is loaded in full into every session.
When invoked 1,862 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.01862 $0.01862
Opus 5.5 $0.00745 $0.00745
Sonnet 5.5 $0.00372 $0.00372
Haiku 4.5 $0.00186 $0.00186

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

Security

Grade A, and why

roll 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 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.

AGENTS.md · 86 lines

How it starts

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

Roll — Agent 操作手册

roll 的引擎是 TypeScript(packages/),CLI 全 TS-native;main 即发布线。 The engine is TypeScript (packages/), the CLI is fully TS-native; main ships. 按"反馈闭环 + 能力域分层"设计。给在本仓干活的 agent / loop 读。

0. 这是什么(一句话)

roll 是一个按反馈闭环设计的 agent harness:把 LLM agent 当黑盒,用反馈闭环优化对它的控制力。它是一台分层的 TS 控制器——把目标拆成 cycle、调度 agent 执行、感知结果、按主干对账修正。

1. 当前形态

CLI 全 TypeScript:packages/cli/bin/roll.js → dispatch(),未知命令打 usage(无回落引擎)。发布为单一 npm 包 @seanyao/roll,CLI 经 esbuild 打平成 dist/roll.mjs。

包 能力域
spec 类型 + i18n catalog(层间契约的单一真相)
core 领域逻辑:编排、backlog、对账、评分、成本、dossier(纯函数为主)
infra 副作用适配:git / gh / 文件系统 / 进程
cli 命令面 + loop runner + 桥接
web 站点

lib/ 是运行时伴生数据(价格快照、i18n 文案目录)。skills/ 是 submodule(见 §6)。分层与不变量详见 docs/architecture.md。

2. 沟通

  • 用用户语言回答;代码/git/注释用英文;UI 输出跟随多语言设置(locale 单语呈现,不混排)。
  • 简洁,讲结果(outcome),不复述实现、不走查代码。
  • 自然、同事口吻;成功失败一致的温度。

3. 架构不变量(动手前必须守)

  1. 反馈闭环是脊柱:核心作动(编排)→ 控制平面传感/评分/限幅(可观测/Evals/Guardrails)→ 反哺。别把功能做成互不相干的孤岛。
  2. 能力域分层 = 每个能力域一个家:Orchestration / Sandboxing / Tool Use / Context Engineering / Observability / Evals / Guardrails。新代码先问"它属哪个域",进那个域的包(6 包:spec/core/infra/daemon/cli/web),别又摊回多载体。
  3. 守黑盒边界(外层 harness):token 级压缩、工具 schema 强制、单次 ReAct 委派内层 agent。
  4. event-driven,不中央编排:多 loop 独立、经 artifact 协调,单 loop 故障不塌全局。
  5. 主干即真相:Done ≡ 已合进 main 分支;退出码不算数,事后对账。
  6. 失败要响(fail-loud):连续失败 → PAUSE + 记录 + 问 owner;不做静默自愈/自动 fallback 链。
  7. 持久优先:状态从不可变事件流重建,不存独立缓存;写在前、原子 append。
  8. 有界且可逆:一 cycle 一小故事、fresh 上下文、TCR green-or-revert、feature 可整体回退。
  9. 反馈带 Goodhart 护栏:评分信号不自动激活,只生成"待人确认"候选;human-on-the-loop。

4. 标准

  • TS:strict、禁 any、函数式、早返回。类型是层与层之间的契约——不退回 stdout 文本解析 / heredoc 生成脚本。
  • TCR:Test → 绿则 commit / 红则 revert。无 WIP commit。
  • 测试:单测覆盖每个公共入口;行为契约用 Vitest 冻结快照(toMatchSnapshot)守护——见 docs/difftest-freeze-paradigm.md。
  • Git:main 走 PR + 2 checks(fix/feat/refactor 一律建分支);不 --no-verify;不提交密钥;身份动态读 git config。
  • DoD:docs = code = product:凡改变用户可见行为、命令面、输出文案、站点或交付视图的 story/fix,同一交付必须更新所触及的 README/docs/guide/site/help;文档漂移按缺陷处理。
  • DoD: docs = code = product: any story/fix that changes user-visible behavior, commands, output copy, site, or delivery views must update the touched README/docs/guide/site/help in the same delivery; doc drift is a defect.
  • 不做:无关重构、投机抽象、改变现有命令的可观察行为而不带测试。

Read the full file on GitHub · 86 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 · 86 lines · 1,862 tokens per session scan A ae0f9ed9aeb7

Subscribe to this mod's changes

roll AGENTS.md is an instructions file published in the GitHub repository seanyao/roll (14 stars, last pushed 2mo ago), licensed MIT. It adds 1,862 tokens to every session, about $0.0074 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,715 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,461 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

deepseek-harness AGENTS.md

AGENTS.md instructions for deepseek-ai/deepseek-harness, covering agents.md, pre-stable apis and released session data, repository layout, commands and host sandbox failures.

deepseek-ai/deepseek-harness · 4,261 tokens