agent-doc-discipline
它能做什么
这项技能为 AI 智能体阅读并据以行动的文档设定了写作标准,例如说明、规格和工单。适合为智能体编写指南、并希望它无需额外解释即可运行的人。
适用场景
- ✓当你编写或修改 AI 智能体将要据以行动的说明、规格或工单的时候。
- ✓当你创建智能体技能文件或项目指南文档的时候。
- ✓当你想检查一个没有任何聊天记录的全新智能体能否遵循某份文档的时候。
技能链接
https://github.com/Yeachan-Heo/oh-my-claudecode/blob/main/skills/agent-doc-discipline/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“请重写这些设置说明,让一个全新的 AI 智能体无需任何额外解释也能遵循。”
每周 5 个新技能,1 分钟读完。
工作原理
智能体会应用一套写作规则:每条规则都可以检验,并附有其理由;步骤排在参考资料之前;每个事实只有一个权威出处。它适用于智能体为了行动而阅读的文档,而不适用于供人阅读的背景材料。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Agent Doc Discipline
Use this skill to apply a writing-time discipline while creating or editing any document an agent consumes to act: the five surfaces (CLAUDE.md, GLOSSARY.md, docs/standards/, design-system/, .omc/skills/), specs, tickets, and skill files. The test a document must pass: a fresh agent session can act on it by reading alone.
Mandatory when: drydock generates surface seeds, the launch C5 sediment pass writes a lesson into a slot. Opt-in for every other edit — but any edit to an agent-facing document should survive these rules.
When Not to Use
Documents written for humans only: docs/business/ narrative, ADR decision stories, READMEs for human onboarding. They may still follow the rules where it costs nothing, but they are not held to this discipline.
The Discipline
Write for a reader with no chat history. The document is self-describing: nothing leans on "as discussed", a prior session, or knowledge that lives in someone's head. Test: a brand-new agent session can act on the document by reading alone.
Every rule checkable and carrying a why. No "keep it clean" — write the observable condition and the reason. Test: an agent can decide pass/fail from the text alone, and the why is stated next to the rule.
One meaning, one home. Each rule or definition has a single authoritative place; duplication is drift waiting to happen. Test: changing a behavior is a one-place edit.
Never restate what the environment confesses. Package scripts, directory layouts, --help output are lookups, not documents — a copied lookup goes stale. Document only what cannot be found by looking: the unwritten convention, the reason behind a choice, the gotcha. Test: every line survives "can this be looked up elsewhere?".
Steps first, reference behind, rare material behind a pointer. What to do, in order, at the top; consult-on-demand rules below; low-frequency material pushed behind a pointer whose wording names the branches that should trigger reaching it. Test: the next action is findable within the first screen.
Every step ends on a completion criterion. Done must be tellable from not-done — a vague bound invites premature completion. Test: for each step, "how do I know this is finished?" has an answer in the text.
A procedure longer than two steps is numbered. The numbers are stable references: a reader can name step 3, follow the order, and jump without re-reading. An unnumbered procedure of many steps makes the reader hold the order in their head. Test: every procedure of three or more steps carries its numbers.
A list is capped at what a reader holds in one glance. A list that outgrows the reader's grasp loses its point — nothing in it is findable. A longer enumeration becomes structure (a table, subsections) or splits. This governs the writing of documents; it never touches the machinery of a gate or a batched decision, which lives in the methodology, not the prose. Test: every list in the document fits in one glance, and any longer enumeration has become structure.
Deferred and scheduled work states when. A document that defers work to a later step, session, or release states that timing next to the work it defers — "when" is a fact the reader needs to act, and an unstated deferral reads as an unstarted one. The timing is stated in the prose only; it never rebinds a checkpoint the methodology pushes right deliberately. Test: every deferral in the document carries its when.
Close on a next action a reader can start now. A report, ticket, or session-close pointer ends not with a summary but with the one next step a reader can begin in under two minutes — the destination, the pointer, or the command. A close that only summarizes makes the reader re-derive what to do first. Test: the last line answers "what do I do next?" without scrolling up.
Re-state the position each time the reader rejoins. A document a returning reader touches mid-flight (a long spec, a run report, a map Notes section) opens the new material with where things stand — step, phase, or decision count — before adding anything new. Test: a reader arriving cold can locate the current state in the first two lines of the newest section.
Prompt the positive. State the target behavior; a prohibition is reserved for hard guardrails and is always paired with the positive target. Test: every prohibition in the document names the thing to do instead.
**Scr
常见问题
这是为人类阅读的文档准备的吗?
主要不是。它面向智能体为行动而阅读的文档,而商业叙述和面向人的入门指南不受此约束。
在这项技能下,什么样的规则才算好?
规则必须是智能体能够根据文本判断为通过或不通过的内容,并且必须说明其存在的理由。
为什么要避免重复事实?
每个事实都应该只有一个权威的位置,因为重复的文字往往会过时而产生偏差。
详情
作者的原始描述
Writing-time discipline for documents agents consume (the five surfaces, specs, tickets, .omc/skills/) — every rule checkable and carrying a why, steps before reference, one meaning in one home, no restating what the environment already says. Mandatory at drydock seed generation and the launch C5 sediment pass; opt-in for any other agent-facing doc edit. The companion of minimal-code-discipline: that one disciplines code, this one disciplines papers.
热度
- GitHub 星标
- 41k
- 排名
- #6989
- 许可证
- MIT
- 更新时间
- 2026/11/2
评论
- …