Communitygithub.com

agent-doc-discipline

编写时为智能体消费的文档施加纪律约束(五大表面、规格说明、任务卡片、.omc/skills/)——每条规则可检查且附有理由,步骤在前引用在后,一个含义只有一个归宿,不重复环境已告知的内容。在 drydock 种子生成和 launch C5 沉淀物扫描中强制使用;其他面向智能体的文档编辑则为可选。与 minimal-code-discipline 相辅相成:后者约束代码,本技能约束文档。

agent-doc-discipline 是什么?

Agent Doc Discipline 是一项旨在规范面向 AI 智能体文档编写质量的技能。它定义了八大核心纪律,确保文档能被全新的智能体会话独立理解并执行,无需依赖任何聊天历史或外部知识。每条纪律都附带可客观测试的通过标准,并强调“一个含义只有一个归宿”“不重复环境已告知的内容”等原则,避免信息漂移和冗余。该技能在 drydock 种子生成和 launch C5 沉淀物扫描等特定流程中强制启用,在其他编辑场景中可选使用,但鼓励所有面向智能体的文档都遵循。它支持五大智能体文档表面(CLAUDE.md、CONTEXT.md、docs/standards/、design-system/、.omc/skills/),以及规格说明、任务卡片和技能文件。通过严格的编写纪律,Agent Doc Discipline 能显著降低因文档质量不佳导致的智能体误读和执行偏差,是构建可靠 AI 代理工作流的核心基础设施。

兼容平台✓Claude Code~Codex CLI~Cursor
npx skills add https://github.com/Yeachan-Heo/oh-my-claudecode/tree/main/skills/agent-doc-discipline

在你喜欢的 AI 中提问

打开一个已预加载此 Agent Skill 的新对话。

文档

Agent Doc Discipline

使用此技能在创建或编辑智能体消费以执行的任何文档时施加编写时纪律:五大表面(CLAUDE.md、CONTEXT.md、docs/standards/、design-system/、.omc/skills/)、规格说明、任务卡片和技能文件。文档必须通过的测试:一个新的智能体会话仅通过阅读即可执行。

强制使用于:当 drydock 生成表面种子时,以及 launch C5 沉淀物扫描将经验教训写入槽位时。对于所有其他编辑为可选——但任何对面向智能体文档的编辑都应经受这些规则的检验。

何时不使用

仅面向人类的文档:docs/business/ 叙述、ADR 决策故事、面向人类入职的 README。它们仍然可以在不增加成本的情况下遵循这些规则,但不强制执行此纪律。

纪律

为没有聊天历史的读者编写。 文档是自描述的:不依赖“如之前讨论过的”、先前的会话或存在于某个人脑海中的知识。测试: 一个全新的智能体会话仅通过阅读文档即可执行。

每条规则可检查且附有理由。 不要写“保持整洁”——写下可观察的条件和原因。测试: 智能体仅凭文本即可判断通过/失败,且理由紧邻规则陈述。

一个含义,一个归宿。 每个规则或定义只有一个权威位置;重复意味着即将发生漂移。测试: 改变一个行为只需一处编辑。

绝不重复环境已告知的内容。 包脚本、目录布局、--help 输出是可查询的内容,不是文档——复制可查询的内容会过时。只记录无法通过查找获得的内容:未写明的约定、选择背后的原因、陷阱。测试: 每一行都能经受“这能否在别处查到?”的检验。

步骤在前,引用在后,稀有材料通过指针引用。 要做什么,按顺序,放在顶部;按需查阅的规则放在后面;低频材料被推到指针后面,其措辞应指明触发访问该材料的分支。测试: 下一个动作应在第一屏内可找到。

每个步骤以完成标准结束。 “完成”必须能与“未完成”区分——模糊的边界会诱使过早完成。测试: 对于每个步骤,“我怎么知道这步完成了?”在文本中有答案。

提示积极行为。 陈述目标行为;禁止性语句仅用于硬性防护栏,且必须始终与积极目标配对。测试: 文档中的每个禁止性语句都要指明要做的替代行为。

边写边清理藤壶。 当文档包含过时或冗余的材料时,在同一次编辑中将其移除;当没有时,只添加必要的材料,且不要发明删除。一个模型默认已经遵守的句子为加载付费却毫无益处——删除整个句子。测试: 每次重读一行都要论证其价值,针对“与默认行为相比这改变了什么?”,并且在编辑过程中发现的任何过时或冗余材料都被移除。

验证

在报告文档更改完成之前,确认:

  • 新的会话能够在无需向人类询问任何内容的情况下执行
  • 每条规则都是可检查的并陈述了理由;没有规则重复可查询的内容
  • 含义只存在于一个地方;指针指明了其触发分支
  • 在编辑过程中发现的过时或冗余材料已被移除,同时有效的无关内容得以保留

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ai-slop-cleaner

Clean AI-generated code slop with a regression-safe, deletion-first workflow and optional reviewer-only mode

ask

Process-first advisor routing for Claude, Codex, Gemini, Antigravity, Grok, or Cursor via `omc ask`, with artifact capture and no raw CLI assembly

ask-navigator

Shipyard

autopilot

Full autonomous execution from idea to working code

autoresearch

Stateful single-mission improvement loop with strict evaluator contract, markdown decision logs, and max-runtime stop behavior

cancel

Cancel any active OMC mode (autopilot, ralph, ultragoal, swarm, ultrapilot, pipeline, team) and clean up retired legacy state

configure-notifications

Configure notification integrations (Telegram, Discord, Slack) via natural language

debug

Diagnose the current OMC session or repo state using logs, traces, state, and focused reproduction

deepinit

Deep codebase initialization with hierarchical AGENTS.md documentation

deep-interview

Socratic deep interview with mathematical ambiguity gating before explicit execution approval

drydock

Lay the keel of the shipyard harness in any repo — the 4-pillar shared environment (Context, Rules, Tools, Standards) across 5 surfaces (CLAUDE.md, skills, design-system, mcp/cli, shared context) so that every human and agent inherits the same design language and anyone can ship. Run once per repo; re-run with --check to audit drift.

execute

Carry an approved task through to working, verified code

external-context

Invoke parallel document-specialist agents for external web searches and documentation lookup

graph

Deterministic orchestration graph runtime - declarative DAG pipelines with journal-based crash recovery

harbor

Harbor intake for external work — the captain only handles unresolved decisions. Sweeps incoming issues and PRs, verifies every claim before disposition, reuses every decision already made, and hands the maintainer a docket whose pending items each carry one question with options, recommendation, impact and evidence. Agent-autonomous for facts and for actions covered by standing authorization; signed for every new judgment. Never merges.

hud

Configure HUD display options (layout, presets, display elements)

launch

Shipyard

loft

Loft the shape before cutting steel — answer a design question that prose cannot settle by building a throwaway artifact: a pure logic module in a clickable shell, or structurally different UI variants behind one route. The captain reacts to the artifact; the answer folds into the decision; the artifact never docks. Use when a design question stalls in words, when a navigator map carries a loft ticket, or when a spec discussion reaches

minimal-code-discipline

YAGNI-ladder coding discipline for writing changes — existence-first, reuse before writing, dependency ladder, shortest correct diff, with non-negotiables that must never be minimized away

omc-doctor

Diagnose and fix oh-my-claudecode installation issues

相关技能