Communitygithub.com

agent-doc-discipline

用於撰寫代理文件時的紀律規範(五大面向、規格、工單、.omc/skills/)— 每條規則皆可校驗且附帶原因,步驟在參考之前,一個意義只歸屬一個位置,不重述環境已知資訊。在 drydock 種子生成與 launch C5 sediment pass 時為強制執行;其他代理導向文件編輯則為選用。為 minimal-code-discipline 的對應規範:後者約束程式碼,前者約束文件。

agent-doc-discipline 是什麼?

agent-doc-discipline 是專為代理使用之文件所設計的撰寫時紀律規範,適用於五大面向(CLAUDE.md、CONTEXT.md、docs/standards/、design-system/、.omc/skills/)、規格、工單以及技能檔案。其核心原則是:**一個全新的代理工作階段只需讀取文件即可據以行動**,無需依賴聊天歷史或人類補充說明。 此紀律強制應用於 drydock 種子生成及 launch C5 sediment pass 的寫入階段,對其他代理導向文件編輯則為選用。它包含多項可校驗的規則:每條規則必須附帶原因且可獨立判斷通過與否;每個意義僅歸屬一個權威位置,避免重複導致的偏移;步驟優先於參考,且每個步驟結尾須有明確的完成標準;禁止重述環境中可查詢的資訊(如套件腳本、目錄結構);僅記錄無法從環境中獲得的隱性知識。同時要求引導正面行為,僅在設定硬性護欄時才使用禁止語句,並需搭配對應的正面目標。 在每次編輯時,需清理過時或冗餘的內容,但不得發明不存在的刪除項目;任何句子若模型預設即會遵守,應予以刪除以減輕負擔。此紀律與 minimal-code-discipline 互為表裡,前者規範文件,後者規範程式碼。

相容平台✓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 的新對話。

說明文件

代理文件紀律

使用此技能在建立或編輯任何代理會讀取以採取行動的文件時,套用撰寫時的紀律。這些文件包括五大面向(CLAUDE.md、CONTEXT.md、docs/standards/、design-system/、.omc/skills/)、規格、工單及技能檔案。文件必須通過的測試是:一個全新的代理工作階段只需讀取該文件即可據以行動。

強制使用時機:drydock 生成表面種子時、launch C5 sediment pass 將經驗寫入插槽時。其他編輯則為選用——但任何對代理導向文件的編輯都應能承受這些規則的考驗。

何時不使用

僅供人類閱讀的文件: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

相關技能