okf: Instructions file for Codex

AGENTS.md

okf AGENTS.md is an instructions file for Codex, OpenCode from superops-team/okf. It costs 2,221 tokens per session, scanned A, original, Apache-2.0.

Chinese-language development instructions for OKF, a Go toolkit that stores and checks knowledge in Markdown files and also provides a command-line tool and an MCP server. SDD means writing a design before coding, and TDD means writing tests before implementation.

In plain words
What is it for?
Use them when changing OKF, running its Go builds and tests, checking the Markdown knowledge base, testing the MCP server, or following the project's SDD-to-TDD process.
Why use it?
They define a required workflow and many checks for proving that changes are implemented, tested, formatted, and consistent with the specification.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

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

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

Your own site · 80×15
<a href="https://agentmods.dev/instructions/superops-team/okf/agents-md"><img src="https://agentmods.dev/badge/instructions/superops-team/okf/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 2,221 This file is loaded in full into every session.
When invoked 2,221 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.02221 $0.02221
Opus 5.5 $0.00888 $0.00888
Sonnet 5.5 $0.00444 $0.00444
Haiku 4.5 $0.00222 $0.00222

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

Security

Grade A, and why

okf 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 · 73 lines

How it starts

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

AGENTS.md — OKF 项目开发规范

项目概述

okf 是 Go 实现的 OKF(Open Knowledge Format)v0.2 知识库工具链,包含 CLI(cmd/okf)、解析/校验/查询核心(pkg/parser、pkg/lint、pkg/query、pkg/okf)、Git 集成(pkg/git)、MCP 服务器(pkg/mcp)。知识库以 Markdown 概念文件 + frontmatter 组织,遵循「一切皆 .md 概念」心智模型。当前开发分支为 main,变更管理走 openspec/changes/<change-id>/(SDD)。

常用命令

  • 构建:go build ./...
  • 静态检查:go vet ./...、staticcheck ./...
  • 全量测试:go test ./...、并发检测 go test ./... -race、随机序 go test -shuffle=on ./...
  • 单测:go test ./pkg/convert -run TestConvertPDF -v
  • 知识库校验:okf lint(docs/knowledge 应 0 errors)
  • MCP 端到端:python3 test_mcp.py
  • 环境硬约束:Go 1.26.0(toolchain go1.26.7);文档转换依赖 downmark v0.10.0 精确锁定(go.mod 非浮动)
  • 约束栈总入口(合入前置门槛):tools/gauntlet.sh(build/vet/gofmt/staticcheck/test -race/覆盖率≥60%/shuffle/变异 4-4/真实执行,fail-on-first)

开发工作流(SDD → TDD → 覆盖 → 一致性)

任何需求变更必须按以下流程,缺一不可:

  1. SDD:在 openspec/changes/<change-id>/ 编写 proposal.md/design.md/spec.md(spec 用 Requirement+Scenario 表述);tasks.md 按 P0-P4 拆解;P0-P4 仅表依赖顺序,全部完成才算完成
  2. TDD:先写测试(red)→ 最小实现(green)→ 重构(refactor)
  3. 接线与覆盖:每个 Requirement 必须有实现入口 + 测试用例;spec 每个 Scenario 映射到测试(覆盖矩阵逐项打勾);未接线/未测试的需求不计入完成
  4. 一致性对照:落地后输出 conformance.md(spec ↔ 实现 ↔ 测试 对齐度 fully/aligned/partial/gap),作为合入前置门槛
  5. 回归:go build/vet/test ./... + python3 test_mcp.py 全绿

19 维开发规范(验收标准,全部强制)

  1. 上下文逻辑连贯:改动必须与既有代码路径/主链路一致(先核对实际实现,不凭印象),避免误导实现
  2. 杜绝空谈:每个需求/场景有落地依据与可执行验收点;无据可依的内容不得写入 spec
  3. 消除歧义:默认值/命名/识别优先级/错误类型等必须定案并写入 spec,不留 Open Question
  4. 语义精准:术语、错误类型、边界条件表述无多义,避免大模型/实现者理解偏差
  5. SDD/TDD 适配:测试可先行(fixtures/golden 先备齐、测试顺序明确),TDD red 阶段不被阻塞
  6. 最小化实现:只改必要文件,不侵入核心。示例:文档导入 = cmd_add 前置转换层,不改 CollectFiles/SmartImportSource/ImportResult/watch 配置
  7. 向下兼容:Go 版本升级、依赖引入必须评估存量影响并文档化(README/Release Notes 标注最低版本、行为变更)
  8. 破坏性影响梳理:行为变更(如 okf add <非md> 由静默跳过变自动转换)必须在 CLI 帮助与 README 声明
  9. 风险预判:临时目录清理(defer RemoveAll)、输入超限/转换超时/损坏/扫描文件等异常路径必须有明确处理与测试
  10. 可行性评估:先本地验证核心链路(编译/转换/解析),再定方案;技术不可行及时暴露而非绕过
  11. 分层任务/测试/排期:任务依赖清晰、测试规划完整;排期仅表先后顺序,不构成交付边界
  12. 可扩展性:扩展成本低(如加格式只增映射 + downmark 包);关键前置决策(如身份/重导入语义)在方案阶段定案
  13. 拒绝过度设计:不引入空转开关、冗余抽象、多余字段/错误类型(用既有机制,如 Patterns glob、downmark 错误透传)
  14. 小而高效:用最少代码变更实现核心收益;改动面控制在必要文件
  15. 持续优化:代码逻辑优雅直观,避免绕路与重复
  16. 架构统一:风格一致、不割裂;新增能力走前置管道,不塞进核心导入逻辑
  17. 全需求接线与覆盖测试:每个需求必须有实现函数/入口 + 对应测试;没有接线和测试的开发不算完成
  18. 排期仅表依赖:不得只开发 P0 就宣称完成;全量落地、全测试绿、一致性对照通过才算完成
  19. spec-实现一致性对照:落地后逐条核对 spec Scenario 与实现/测试,输出 conformance.md;partial/gap 必须给出原因与后续任务

Read the full file on GitHub · 73 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 First seen · 73 lines · 2,221 tokens per session scan A 18a70114b40b

Subscribe to this mod's changes

okf AGENTS.md is an instructions file published in the GitHub repository superops-team/okf (37 stars, last pushed 16d ago), licensed Apache-2.0. It adds 2,221 tokens to every session, about $0.0089 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

okf AGENTS.md compared with instructions from other repositories

okf AGENTS.md next to 6 instructions from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
okf AGENTS.mdsuperops-team/okfInstructions file3716d agoApache-2.0A2,221Codex, OpenCode
vscode buildNext.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA9,719GitHub Copilot
next.js AGENTS.mdvercel/next.jsInstructions file143ktodayMITA7,461Codex, OpenCode
langchain AGENTS.mdlangchain-ai/langchainInstructions file149kyesterdayMITA4,680Codex, OpenCode
vscode oss-third-party-notices.instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA5,516GitHub Copilot
vscode copilot-instructions.mdmicrosoft/vscodeInstructions file195kyesterdayMITA3,093GitHub Copilot
deepseek-harness AGENTS.mddeepseek-ai/deepseek-harnessInstructions file274k2d agoMITA4,313Codex, OpenCode