AgentPrecept AGENTS.md

Project instructions for AgentPrecept, an agent workflow that uses an auto-pilot mode and design-before-implementation rules.

In plain words
What is it for?
Use them when working in an AgentPrecept project that requires design documents, handoff and memory files, checklist management, and regular self-checks.
Why use it?
They define actions the agent should take automatically, such as reading project records, updating checklists, and recording lessons, so important project work is not skipped.

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

Made for: Codex, OpenCode.

Per session 5,095 This file is loaded in full into every session.
When invoked 5,095 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.05095 $0.05095
Opus 5 $0.02547 $0.02547
Sonnet 5 $0.01019 $0.01019
Haiku 4.5 $0.00509 $0.00509

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

Security

Grade A, and why

AgentPrecept 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 3d 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 · 289 lines

How it starts

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

AGENTS.md — agentprecept

复制到项目根目录。Agent 每次会话自动读取。

Auto-Pilot 模式(默认开启)

以下全部流程自动执行,除非用户在当前对话中明确:

  • 说"停"/"跳过"/"不用"中断当前动作
  • 修改本文件(AGENTS.md)变更流程规则
  • 要求暂停或切换模式

无人打断 = 无例外执行。Agent 不得等待提醒、不得跳过、不得事后补做。Auto-Pilot 高于 EXPLORE/PRECISE 模式——即使 EXPLORE 模式下也不得跳过自动动作。


默认行为(无条件执行)

以下行为不需要触发条件,每个会话默认执行。Agent 不得跳过:

  • 会话首次启动:读 docs/project-graph.yamldocs/HANDOFF.mddocs/MEMORY.md
  • 完成任一模块后:检查 checklist 中是否有对应测试任务,没有则追加
  • checklist 粒度:每项 checklist 必须在 1-3 个 commit 内完成。若某项预估需 5+ commit,Agent 必须拆成多个 checklist item。粒度标准:人类 review ≤ 5 分钟。架构边界(project-graph structure 的模块划分)即 checklist 的天然切割线
  • 每 5 轮对话:自问两件事——"有没有该写但还没写的设计文档?"+"有没有该追加到 MEMORY.md 的教训但还没写?"
  • 项目首次初始化后:提醒创建 docs/HANDOFF.mddocs/MEMORY.md 空模板
  • ⏳ 待补检测:会话首次启动时,若 docs/ 中 ⏳ 待撰写状态的文档超过 3 份,Agent 应主动提醒"有 N 份文档待补充,要我填充吗?"。用户确认后按设计先行原则逐份填充——先出草稿→标注[NEEDS_HUMAN_REVIEW]→等确认→再写
  • 狗粮检查:agentprecept 自身项目必须通过以下自检,否则先修再继续:① L2_D01 反映当前架构 ② init 脚本引用的 templates/ 文件全部存在 ③ project-graph relations 不为空(有代码时)④ AGENTS/SKILL/instructions 关键规则一致。agentprecept 自身必须吃自己的狗粮
  • 记忆自动生长:Agent 在对话中发现新的用户偏好、项目约束、踩坑教训时,同一 turn 内立即追加docs/MEMORY.md 对应小节。追加前先 grep 确认无相似条目(不凭记忆判断);已有条目可更新(替换旧行),不可重复追加。追加后读回验证格式正确。用户说"记住"→立即追加。会话结束前回顾确认全部已写入。模板注释(<!-- ... -->)仅第一次追加时删除
  • MCP 缺失检测:当项目已有 AGENTS.md 但 mcp_agentprecept_* tools 不可用时,Agent 应提示用户配置 MCP(agentprecept setup 或手动编辑 mcp.json)
  • Hook/CI 检测:每次会话启动时检查 .git/hooks/pre-commit.github/workflows/ 是否存在。缺失 → 提示 agentprecept hooks installagentprecept init --ci。CI gate 是唯一不可跳过的硬拦截——没装等于没有防线
  • 模板外脑:docs/ 只有核心 8 文件。需要 API 契约、测试策略、部署方案等模板时,Agent 应知道从 agentprecept 仓库的 templates/(37 个)和 methodology/(16 篇)按需取用
  • 反馈提示:HANDOFF 状态为 [CLOSING] 时,Agent 应提示:"如果这次体验有用,花 2 分钟在 GitHub 填反馈模板"
  • 分支纪律:涉及架构/重命名/多文件(>10 文件)的变更必须在独立分支上执行。pre-commit hook 强制拦截 main/master 分支上 >10 文件的 commit(可 --no-verify 跳过);CI gate 维度 11 不可跳过
  • 自选维度检查:每 5 轮对话检查自选维度(用户旅程/定位审计/复用/社区就绪度)是否退化。agentprecept audit --gate 报告末尾有自选清单
  • 版本规则:严格 semver。PATCH(v0.4.1)修 bug 不增删功能——累积 3+ 修复或 1 个关键修复后发布;MINOR(v0.5.0)新增向后兼容功能,每个功能独立发版不等累积;MAJOR(v1.0.0)破坏性变更。升级方式:全量(pip install -U agentprecept),11KB wheel 不搞增量
  • 发版铁律:任何版本发布到 GitHub/PyPI 前,必须完成 audit --gate FAIL 0 验证 + 将验证结果展示给用户 + 等待用户明确确认("发"/"发布"/"publish"/"go ahead")。Agent 严禁未经用户确认私自打 tag、push、或 twine upload。这条规则高于任何自动化——即使 Auto-Pilot 也不得跳过
  • 批量创建文件:> 15 个文件时 → 分子代理并行(单个子代理 ≤ 15 文件,超时 180s。依据:世界模拟器 37 文件迁移时 230s 超时)

Read the full file on GitHub · 289 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. 3d ago First seen · 289 lines · 5,095 tokens per session scan A 40cb1dce26e9

Subscribe to this mod's changes

AgentPrecept AGENTS.md is an instructions file published in the GitHub repository rg8diaoa/AgentPrecept (9 stars, last pushed 2mo ago), licensed MIT. It adds 5,095 tokens to every session, about $0.0255 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.

Related

Other instructions, from other repositories