agent-harness AGENTS.md

agent-harness AGENTS.md is an instructions file for Codex, OpenCode from SUNRNEHUI/agent-harness. It costs 1,481 tokens per session, scanned A, original, MIT.

A set of project instructions for agent-harness, a runtime-neutral system for making coding-agent work reliable across sessions and models. It explains when to use native plans, saved task records, or audited workflows.

In plain words
What is it for?
Use it when developing or testing agent-harness, including its plans, saved records, validators, scripts, package structure, and TDD-based checks.
Why use it?
It helps agents preserve important task state, follow approval boundaries, and verify work without storing private reasoning or secrets.

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/sunrnehui/agent-harness/agents-md
Clone the repo
git clone --depth 1 https://github.com/SUNRNEHUI/agent-harness

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 agent-harness AGENTS.md

README.md
[![agentmods](https://agentmods.dev/badge/instructions/sunrnehui/agent-harness/agents-md.svg)](https://agentmods.dev/instructions/sunrnehui/agent-harness/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/sunrnehui/agent-harness/agents-md"><img src="https://agentmods.dev/badge/instructions/sunrnehui/agent-harness/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 1,481 This file is loaded in full into every session.
When invoked 1,481 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.01481 $0.01481
Opus 5 $0.00740 $0.00740
Sonnet 5 $0.00296 $0.00296
Haiku 4.5 $0.00148 $0.00148

Measured 4d ago against content hash 8dead16216ee, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

agent-harness 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 4d 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 · 117 lines

How it starts

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

AGENTS.md

本文件是 agent-harness 项目的项目级规则。它覆盖用户级通用规则中与本项目冲突的部分。

项目定位

本仓库维护一个运行时中立、Plan-native 的可靠性 skill。它复用 Codex、Claude Code、Grok 等运行时的原生规划,只在任务需要跨会话、跨模型或强审计时增加持久状态。

核心原则:

  • 默认选择能可靠完成任务的最轻模式:Native、Portable、Audited。
  • Native 使用运行时原生 Plan,不写 harness 文件,也不复制计划。
  • Portable 只保存 contract.jsonevents.jsonlcapsule.mdcontract.json 是唯一可变真相。
  • Audited 才启用 typed receipts、Production State Witness、受保护 TDD chronology、evaluator 和更强 fencing。
  • 并行是执行选择,不是模式;只有责任边界独立且收益高于协调成本时才使用 worker。
  • Portable 核心只保存可观察事实,不保存 chain-of-thought、完整聊天、provider reasoning、secret 或 in-flight 外部副作用。
  • 保持 legacy handoff-v1 Full artifact 可恢复,不静默迁移或破坏旧格式。
  • provider/model slug 只能存在于 runtime profile 或 adapter,不进入 Portable contract。

主要文件

  • skills/agent-harness/:唯一、完整、可直接安装的 runtime Skill 包。
  • skills/agent-harness/SKILL.md:Skill 入口协议和触发说明。
  • skills/agent-harness/VERSION:当前发布版本的单一来源。
  • README.md / README.zh-CN.md:公开说明,必须保持英文和中文同步。
  • skills/agent-harness/references/:运行时按需加载的协议材料。
  • skills/agent-harness/templates/:运行时需要的 artifact 与 worker 模板。
  • skills/agent-harness/scripts/:控制器、validator、status、TDD 和 witness 运行时脚本。
  • tests/:行为、拒绝边界和开放包结构契约测试;不得放进 runtime Skill 包。
  • scripts/package_skill.py:校验、复制并比较权威 skills/ 包,不维护第二份文件白名单。
  • scripts/sync_version.py:从 Skill 包内的 VERSION 同步公开版本引用。
  • docs/legacy/:不进入 runtime 的历史 prompt、旧协议说明和开发工具。

修改规则

  • 修改 skill 行为时,优先改行为测试,再改 Skill 包内的 SKILL.mdreferences/、模板和脚本。
  • 修改公开行为或版本时,必须同步 README.mdREADME.zh-CN.md
  • 修改当前版本时,先改 Skill 包内的 VERSION,再运行 python3 scripts/sync_version.py --fix --date YYYY-MM-DD
  • skills/agent-harness/ 目录本身就是 runtime 权威边界;新增 runtime 文件不需要再登记白名单。
  • repository-only 测试、fixture、历史文档和维护工具不得进入 Skill 包。
  • 不要把 workspace/.harness/、缓存、session 日志、私有配置或生成 artifact 加入 runtime 包。
  • 不要把本地安装目录 ~/.codex/skills/agent-harness 当成源码。源码以本仓库为准。
  • README.mdREADME.zh-CN.md 的标题结构必须一致。
  • Skill 包内的 SKILL.md 默认不超过 750 words,agents/openai.yaml 不超过 120 words。
  • 保持 diff 小而聚焦,不做无关重排、格式化或重命名。

TDD 和验证

Read the full file on GitHub · 117 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. 4d ago First seen · 117 lines · 1,481 tokens per session scan A 8dead16216ee

Subscribe to this mod's changes

agent-harness AGENTS.md is an instructions file published in the GitHub repository SUNRNEHUI/agent-harness (2 stars, last pushed 6d ago), licensed MIT. It adds 1,481 tokens to every session, about $0.0074 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-31.