anchorlaw AGENTS.md

Project-specific instructions for Anchorlaw, a language-independent protocol for checking whether software claims can be verified. They describe required session setup, testing, and the project's Judge-led development process.

In plain words
What is it for?
Checking the repository state, running its Python tests, handling protocol-document changes, and coordinating Scout, Worker, and Judge roles during implementation.
Why use it?
They give coding agents the project's rules and required checks, reducing the chance of changes that ignore its workflow or verification standards.

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/unknowbug/anchorlaw/agents-md
Clone the repo
git clone --depth 1 https://github.com/unknowbug/anchorlaw

Made for: Codex, OpenCode.

Per session 2,141 This file is loaded in full into every session.
When invoked 2,141 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.02141 $0.02141
Opus 5 $0.01071 $0.01071
Sonnet 5 $0.00428 $0.00428
Haiku 4.5 $0.00214 $0.00214

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

Security

Grade A, and why

anchorlaw 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 2d 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 · 74 lines

How it starts

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

Anchorlaw 项目 AGENTS.md(项目级常驻指令)

本文件是索引——协议知识按需加载(协议 v0.19 §14 Anchor Skill Manifest + §15 Execution Topology),铁律正文在对应 skill 里,不在本文件常驻。 宿主说明:DSH(DeepSeek Harness)适配层入口见 dsh/AGENTS.md(当前维护);Reasonix 宿主格式自 v0.18 起停止维护并归档(archive/reasonix/,Fork 可恢复自行迭代)。

〇、开始工作前(每个 session 必做)

  1. git status 确认工作区状态(远程 = github.com/unknowbug/anchorlaw
  2. 跑测试确认基线全绿:python -m pytest --rootdir=python python/tests -q(命令行被沙箱拦截时改用 DSH 沙箱感知包装:python dsh/scripts/run_tests_sandbox.py --rootdir=python python/tests -q --basetemp=<非点前缀路径>——DSH Windows 沙箱封存 0o700 目录导致 pytest tmp 机制失效,该脚本改 0o755 后跑基线测试;basetemp 用非点前缀目录避免 scanner 跳过隐藏目录)
  3. 若改动涉及协议文档:同步核对 §8 Maturity§11 全称声称审计表,证据必须跟着走

一、项目定位(一句话)

Anchorlaw 是语言无关的代码验证协议——唯物实践论三律的代码化:

  • 第一律(可检验)@anchor.test 把声称绑到可执行验证
  • 第二律(可证伪)@anchor.idk 诚实声明边界 + staleness(90 天自动升级)
  • 第三律(可挑战):协议 §12 规则挑战流程——FP 证据强制规则降级/删除

二、主工作流(Judge 驱动流水线,v0.11)

编程是构建型任务(域内:输入契约已确认;探索型任务如 RE 在域外,见协议 §15.1/§16.1 input-contract confirmation criterion)——由 Judge 驱动:主会话扮演 Judge 角色持有验收判据,派 Scout 起草规范、派 Worker 实施,每段以「Judge 点头」收敛。需求发掘不在本协议内——它属于独立的需求协议(Scout 驱动 + 人机对话),其产出(已确认需求文档 + 技术约束规范;架构设计归 stage-1 产出)作为本流水线的输入契约。权威正文在 协议 §15(输入契约 + 四段流水线 + 角色定义),本文件只索引不复制。

输入契约 + 四段流水线(每段以 Judge 点头终止): 0. 输入契约 — 已确认需求文档 + 技术约束规范由外部需求协议交接(主机交付即实施授权,§16.1);Judge 从输入推导验收判据,无输入不得开工

  1. 实施规范 — Judge 派 scout 起草变量名/模块化/框架边界 → Judge 审过才进规划
  2. 实施计划 — Judge 基于规范划模块
  3. 并行实施 — 多 worker 按模块并行写码 → 每模块 Judge 审查,点头并入 / 打回修改
  4. 交付 — Judge 总审 + 隔离 judge 独立验收 → 人类授予 confirmed

验收判据先行(v0.11;v0.14 输入契约分层):判据(声称 + @anchor.test 验证载体 + @anchor.idk 边界)由 Judge 从输入契约(外部需求 + 技术约束规范;架构设计属 stage-1 产出)推导,实施前确定;实现朝判据收敛,review 意见对照判据。权威正文 协议 §15.4

judge 触发点与验证终止门禁(v0.12;v0.15 修订)——只索引不复制:

  • Judge 五触发点(输入契约接受 / 规范审查 / 计划批准 / 模块并入 / 交付验收)+ 意见分级 → 执行清单见对应 judge skill
  • 终止门禁(外部测试集 / 三层意见分级 / 判据满足即完成 + 同一判据 3 轮不收敛 → 流程硬停止 + Judge 提交 Review 情况与问题详细报告交人类判定 / §12 通道)→ 协议 §15.4;AGENTS 不复制正文——镜像不同步正是 review 循环的根因
  • 关键节点隔离验收:模块并入前 + 交付前 MUST 派隔离 judge subprocess(自评≠审查)

Read the full file on GitHub · 74 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. 2d ago First seen · 74 lines · 2,141 tokens per session scan A db04de9d55ff

Subscribe to this mod's changes

anchorlaw AGENTS.md is an instructions file published in the GitHub repository unknowbug/anchorlaw (5 stars, last pushed 6d ago), licensed MIT. It adds 2,141 tokens to every session, about $0.0107 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.