moss-harness: Instructions file for Codex

AGENTS.md

moss-harness AGENTS.md is an instructions file for Codex, OpenCode from cybernetix-lab/moss-harness. It costs 7,368 tokens per session, scanned A, original, MIT.

Instructions for a six-role multi-agent system: Coordinator, Planner, Reviewer, Executor, Evaluator, and Memory Curator. The roles divide work such as understanding requests, planning, coding, checking results, and preserving useful context.

In plain words
What is it for?
Use them when configuring agent teams, choosing who handles a task, defining team protocols, or maintaining the shared roster.
Why use it?
They make responsibilities and permissions clear when several agents share a task, reducing duplicated or conflicting work.

Instructions file for CodexOpenCode

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

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

Reuse

Borrowing it

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

README.md
[![agentmods](https://agentmods.dev/badge/instructions/cybernetix-lab/moss-harness/agents-md.svg)](https://agentmods.dev/instructions/cybernetix-lab/moss-harness/agents-md)
Your own site
<a href="https://agentmods.dev/instructions/cybernetix-lab/moss-harness/agents-md"><img src="https://agentmods.dev/badge/instructions/cybernetix-lab/moss-harness/agents-md.svg" alt="Measured on agentmods" height="20"></a>
Per session 7,368 This file is loaded in full into every session.
When invoked 7,368 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.1 $0.07368 $0.07368
Opus 5 $0.03684 $0.03684
Sonnet 5 $0.01474 $0.01474
Haiku 4.5 $0.00737 $0.00737

Measured 6d ago against content hash 311ef394bd32, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

moss-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 6d 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 · 768 lines

How it starts

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

Agent 配置指南

本文档详细说明项目中所有 Agent 的配置、职责和使用方法。

Agent 概述与自组织架构

本项目采用六角色多 Agent 架构,基于系统论、控制论和信息论设计,通过职责分离避免自评乐观偏差,同时维持高信噪比。

架构演进:当前的六个角色(Coordinator, Planner, Reviewer, Executor, Evaluator, Memory Curator)在系统设计中作为角色分类(Role Categories/Lanes)。针对不同场景的任务,每一角色下会不断沉淀出对应的专家 Agent(Expert Agents),而基础的角色 Agent 则作为通用的 Backup(兜底) 存在。这体现了 Agent 系统的自组织和涌现能力。

当前建模约定

  • 六角色是职责泳道,不是六个固定实例。
  • configs/orchestration/agent-registry.yaml 中的 lanes 只描述每条泳道的输入、输出、认领策略和选择规则。
  • members 是 Team Roster,也是成员唯一真相源,描述 Backup、Expert、Candidate 三类成员。
  • lanes.member_source 用于声明某条泳道应从哪一组成员中选择执行者。
  • agents 保留为向后兼容模板视图,便于旧脚本或旧文档继续读取基础配置。
角色分类 (Role) 职责 核心能力 工具权限 Backup Agent 专家 Agent 示例
Coordinator 协调 意图识别、需求澄清、任务分发 只读 coordinator api_coordinator
Planner 规划 需求分析、任务分解、方案设计 只读 planner db_planner
Reviewer 计划审查 风险识别、方案评估、改进建议 只读 reviewer sec_reviewer
Executor 执行 代码实现、测试编写、自测验证 读写+执行 executor frontend_executor
Evaluator 评估 质量评估、需求验证、结论输出 只读+测试 evaluator perf_evaluator
Memory Curator 记忆策展 上下文压缩、信息归档、信噪比控制 只读+执行 memory_curator doc_curator

团队协作与自组织机制

基于系统进化,团队引入了以下三大核心机制,使得 Agent 团队能够真正地“自主运转”:

1. 团队名册与持久化队友 (Team Roster & Teammates)

  • 持久化身份:Agent 不再是调用完即销毁的临时对象(Subagent),而是长驻的、有明确身份和生命周期的队友(Teammate)。
  • 名册与邮箱:系统维护一份团队名册(Team Roster)。每个 Agent 都有自己独立的邮箱(Inbox)独立循环(Independent Loop),能够反复接手任务并保持上下文隔离。

2. 结构化团队协议 (Team Protocols)

  • 协议消息:团队协作不仅依靠自然语言,还引入了结构化协议(ProtocolEnvelope)
  • 请求与响应:如“计划审批(plan_approval)”或“优雅关机(shutdown)”等关键协作,必须带有唯一的 request_id,并被记录在请求追踪表中(RequestRecord)。
  • 状态机:每个请求都具备明确的流转状态(如 pending / approved / rejected),确保多 Agent 协作时的过程可检查、状态可恢复。

3. 自主认领与执行 (Autonomous Claiming)

  • 自主找活:Agent 并非总是等待主控者点名分配任务。处于空闲(IDLE)状态的 Agent 会在每轮循环中先检查个人邮箱,随后带着角色过滤条件扫描公共任务板(Task Board)。
  • 专家优先:当任务板出现新任务时,带有对应领域标签的专家 Agent(如 frontend_executor)会优先触发认领(claim_task)。
  • 原子化认领与兜底:认领动作是原子的,且会被记录到事件日志(Claim Event Log)中。若任务长时间无专家认领,则由通用的 Backup Agent(如 executor)兜底认领。在认领后,Agent 会重新注入身份提示,带着明确的目标恢复工作(WORK)。

Read the full file on GitHub · 768 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. 6d ago First seen · 768 lines · 7,368 tokens per session scan A 311ef394bd32

Subscribe to this mod's changes

moss-harness AGENTS.md is an instructions file published in the GitHub repository cybernetix-lab/moss-harness (135 stars, last pushed 3mo ago), licensed MIT. It adds 7,368 tokens to every session, about $0.0368 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.

Related

Other instructions, from other repositories

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,296 tokens

codex AGENTS.md

AGENTS.md instructions for openai/codex, covering rust/codex-rs, the codex-core crate, code review rules, crate api surface and model visible context.

openai/codex · 5,182 tokens

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 · 6,785 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, applying the notice (cutover) and fallback chain (never fail the build).

microsoft/vscode · 5,001 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,469 tokens

spec-kit AGENTS.md

AGENTS.md instructions for github/spec-kit, covering agents.md, about spec kit and specify, quickstart — add a new integration in 5 steps, integration architecture and integrationmanifest — file tracking.

github/spec-kit · 7,104 tokens