drydock(乾塢) 是做什麼的?
在船廠鋪下龍骨:一個儲存庫,一個共享骨架,每個貢獻者都繼承它。此技能為環境搭建骨架,將「人人都能交付」轉變為「人人都用同一套設計語言交付」——它會建立五個表面,以最低限度填入種子,將它們連接到負責填充的流程(launch 寫入 CONTEXT/ADR;launch C5 沈積和程式碼審查沈積標準),並回報哪些已存在、哪些已建立,以及哪些刻意保持空白。
四大支柱及其實際存放位置:
| 支柱 | 表面 |
|---|---|
| Context(共享背景) | CONTEXT.md(詞彙表)+ docs/business/ + docs/adr/ + OMC wiki |
| Rules(邊界) | CLAUDE.md(精簡入口:慣例、原則、索引)+ docs/standards/ |
| Tools(可組合能力) | .omc/skills/ + .mcp.json + scripts/ |
| Standards(驗船協會) | design-system/(設計 Token、元件、模式)+ docs/standards/ |
隱喻地圖:船廠是共享設施;驗船協會(docs/standards/ + design-system/)制定船隻必須通過的規則才能適航;乾塢鋪下龍骨;launch 交付船隻。
使用時機
- 開始一個人類與代理都會在上面開發的儲存庫
- 一個儲存庫,知識只存在於人腦和聊天記錄中,而非檔案中
- 入職:新夥伴或新代理應透過閱讀來繼承背景,而非發問
不使用時機
- 沒有協作者的拋棄式原型
- 已執行此骨架的儲存庫(改用
--check)
工作流程
1. 偵測(絕不覆寫)
在寫入任何內容前盤點現有項目:
CLAUDE.md是否存在?AGENTS.md是否存在?(規則:若任一存在,則在原地擴充它;建立缺少的那個為指向另一個的單行指標;絕不同時建立兩個全新檔案)CONTEXT.md、docs/adr/、docs/standards/、docs/business/、design-system/、.omc/skills/、.mcp.json、scripts/、.gitattributes——哪些存在,哪些缺失?- OMC 是否已安裝?——僅在 OMC session 內執行時值得檢查;在 OMC 外部執行時則靜默跳過此檢查(骨架在 OMC 有無的情況下皆可運作)
先回報地圖,然後採取行動。
2. 決定文件語言,然後僅詢問偵測無法回答的事項
生成骨架檔案的文件語言是由檔案支援的決定,而非對話狀態。請嚴格使用以下合約:
{
"schemaVersion": 1,
"authority": { "path": "CONTEXT.md", "frontmatterKey": "documentLanguage" },
"canonicalSources": ["CLAUDE.md", "README.md"],
"askOn": ["missing", "mixed", "conflict", "low-confidence", "invalid-explicit", "script-ambiguous"],
"tagPattern": "^[a-z]{2,3}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}|[0-9]{3}))?$",
"scriptVariants": ["zh-Hans", "zh-Hant"],
"seedCompanionPrefixes": { "en": "en", "zh-Hans": "zh-Hans", "zh-Hant": "zh-Hant" },
"stableTokens": [
"CONTEXT.md", "documentLanguage", "/oh-my-claudecode:launch", "--serial",
"plan", "execute", "review", "verify", "blockedBy", "blocked_by",
"pending", "in_progress", "completed", "failed", "ready-for-agent",
"id", "name", "description", "triggers", "mcpServers", "```",
"<Project>", "<term>", "<feature-slug>"
]
}
決策順序:
- 當前呼叫中有明確的人類選擇且有效時,則使用該選擇。將其正規化為穩定的 BCP-47 風格標籤:語言小寫、書寫系統首字大寫、地區大寫。無效的明確輸入必須詢問一次,而非猜測。
- 否則,從
CONTEXT.md頂部的 YAML frontmatter 讀取documentLanguage。一個有效且無書寫系統歧義的標籤在全新的 Drydock 與 Launch 呼叫中具有權威性。若持久的標籤是裸zh或僅地區的繁體/簡體中文,則在此權威層級詢問一次;絕不以來源推論繞過它。 - 若標記不存在或無效,則依序檢查規範來源:
CLAUDE.md,然後README.md。僅在每個可用來源都有一種明確的主要語言,且所有可用來源都同意同一個正規化標籤時才進行推論。當其他來源缺失或為空時,一個明確的來源就足夠。 - 中文必須解析為明確的書寫系統限定標籤:
zh-Hans或zh-Hant(可選地區後綴)。裸zh和僅地區的中文標籤是書寫系統歧義的,必須詢問一次,而非選擇附屬版本。附屬版本的選擇使用最長的語言/書寫系統前綴:zh-Hans-*選擇zh-Hans附屬版本,zh-Hant-*選擇zh-Hant附屬版本;將完整的正規化標籤(例如zh-Hans-CN)保留在CONTEXT.md中。 - 缺少可用來源、混合語言內容、衝突標籤、低信賴度推論、無效明確輸入,或書寫系統歧義的中文,必須觸發一次批次語言問題。不要猜測。若沒有可用的答案,則在寫入本地化產物之前停止。
- 在 scaffold 之前,將解析出的標籤寫入
CONTEXT.md中確切的穩定 frontmatter 金鑰documentLanguage(建立或擴充其 frontmatter,且不翻譯該金鑰)。這個可見的檔案是初始化報告的語言權威;不建立任何 daemon、隱藏分類帳或執行時期狀態。
只有散文和使用者面對面的標籤/可本地化值會跟隨所選語言;結構化金鑰保持語言穩定。保持路徑、斜線指令、旗標、程式碼圍籬、佔位符、frontmatter 金鑰與機器語義值、YAML/JSON 金鑰、生命週期 Token、狀態列舉、ID、blockedBy、公開團隊 blocked_by,以及解析器/控制 Token 的位元組穩定。
語言解析後,再詢問剩餘的問題:
- 套件/技術棧(用於標準和設計系統種子)
- 此儲存庫是否有 UI?(無 UI → design-system/ 建立為附說明的存根,或應要求跳過)
- 問題追蹤器位置(GitHub / GitLab / local
.scratch/)——V1 版 harbor intake 僅支援 GitHub;同時記錄 maintainer 的 intake 溝通權威(問題評論、標籤變更)——由 navigator 的地圖 home 與 harbor 的 intake 佇列消費
3. Scaffold(建立缺少的表面——種子以文件語言呈現)
CLAUDE.md # 精簡入口——見種子 A
CONTEXT.md # 詞彙表——見種子 B
.gitattributes # * text=auto eol=lf (消除 Windows 上的 CRLF 警告噪音)
docs/adr/0001-adopt-shipyard-harness.md
docs/standards/architecture.md # 種子 C
docs/standards/data.md
docs/standards/process.md
docs/business/README.md # 種子 D
design-system/README.md # 種子 E(僅 UI 儲存庫;否則為存根)
design-system/tokens/README.md
.omc/skills/README.md # 種子 F
.mcp.json # {"mcpServers": {}}
scripts/README.md
種子範例是參考附屬版本,而非合併負載。解析 documentLanguage 後,僅選取一個附屬版本;不要從另一個附屬版本重複輸出標題或標籤。使用最長匹配的語言/書寫系統前綴:en-* 使用英文,zh-Hans-* 使用簡體中文,zh-Hant-* 使用繁體中文,而種子 B 將完整的解析標籤寫入 documentLanguage。對於任何其他有效標籤,將英文標準附屬版本翻譯一次,同時保留上述每個穩定 Token。
在生成種子散文之前,使用 agent-doc-discipline 工具調用並套用其規則;僅當每個規則都是可檢查的且帶有原因,每個表面無需聊天記錄即可自描述,以及引用來源而非假定來源時,種子散文才算準備就緒。夥伴或代理應能僅透過閱讀就根據種子內容採取行動。
種子 A — CLAUDE.md,en(精簡入口;若檔案存在則在原地擴充):
# <Project> — Agent & Human Shipyard
## Project conventions
- <language/framework/package manager/naming — list what matters, skip the rest>
## Architecture principles
- <the 3-5 principles most often violated in this project>
## Standards index (full text in docs/standards/)
- Architecture: docs/standards/architecture.md
- Data: docs/standards/data.md
- Process: docs/standards/process.md
## Decision records (full text in docs/adr/; load-bearing ones listed here)
- ADR-0001: adopt shipyard harness
## Shared background
- Glossary: CONTEXT.md | Business knowledge: docs/business/ | Decision context: docs/adr/
## Agent guide
- Delivery follows the canonical workflow plan → execute → review → verify; `/oh-my-claudecode:launch` is an optional governed delivery pipeline (opt-in, invoke explicitly)
- On term conflicts CONTEXT.md wins; new terms are recorded the moment they settle
- Reusable capability goes to .omc/skills/; UI patterns go to design-system/
種子 A — zh-Hans 附屬版本(結構一致,二選一按文件語言呈現):
# <Project> — Agent & Human Shipyard
## 项目约定
- <language/framework/package manager/naming — list what matters, skip the rest>
## 架构原则
- <the 3-5 principles most often violated in this project>
## 规范索引(全文在 docs/standards/)
- 架构规范: docs/standards/architecture.md
- 数据规范: docs/standards/data.md
- 流程规范: docs/standards/process.md
## 决策记录(全文在 docs/adr/,此处只列 load-bearing 的)
- ADR-0001: adopt shipyard harness
## 共享背景
- 术语: CONTEXT.md | 业务知识: docs/business/ | 决策背景: docs/adr/
## Agent 指南
- 交付遵循 canonical 工作流 plan → execute → review → verify;`/oh-my-claudecode:launch` 是可选的受治理交付管道(opt-in,需要时显式调用)
- 术语冲突以 CONTEXT.md 为准;新术语当场补录
- 可复用能力沉淀到 .omc/skills/;UI 模式沉淀到 design-system/
種子 A — zh-Hant 附屬版本(結構一致,只渲染此版本):
# <Project> — Agent & Human Shipyard
## 專案約定
- <language/framework/package manager/naming — list what matters, skip the rest>
## 架構原則
- <the 3-5 principles most often violated in this project>
## 規範索引(全文在 docs/standards/)
- 架構規範: docs/standards/architecture.md
- 資料規範: docs/standards/data.md
- 流程規範: docs/standards/process.md
## 決策記錄(全文在 docs/adr/,此處只列 load-bearing 項目)
- ADR-0001: adopt shipyard harness
## 共享背景
- 詞彙: CONTEXT.md | 業務知識: docs/business/ | 決策背景: docs/adr/
## Agent 指南
- 交付遵循 canonical 工作流 plan → execute → review → verify;`/oh-my-claudecode:launch` 是可選的治理交付管道(opt-in,必須明確呼叫)
- 術語衝突以 CONTEXT.md 為準;新術語確定時立即補錄
- 可重用能力沉澱到 .omc/skills/;UI 模式沉澱到 design-system/
種子 B — CONTEXT.md(穩定的 frontmatter 金鑰是語言權威):
en:
---
documentLanguage: en
---
# Glossary
One entry per term: definition, boundaries, one resolved ambiguity. Agents write here the moment a term is settled. Vocabulary here is law for all specs, tickets, and code naming.
## <term>
- Definition:
- Boundary: (is X, not Y)
- Resolved ambiguity:
zh-Hans:
---
documentLanguage: zh-Hans
---
# 术语表
一条术语一个条目:定义、边界、一个已解决的歧义。术语敲定的当下写入。词汇对所有 spec、ticket、代码命名具有法律效力。
## <term>
- 定义:
- 边界: (是 X,不是 Y)
- 已解决的歧义:
zh-Hant:
---
documentLanguage: zh-Hant
---
# 詞彙表
每個術語一個條目:定義、邊界、一個已解決的歧義。術語確定時立即寫入。這裡的詞彙是所有 spec、ticket 與程式碼命名的準則。
## <term>
- 定義:
- 邊界: (是 X,不是 Y)
- 已解決的歧義:
種子 C — docs/standards/architecture.md(data.md / process.md 形狀相同;散文以文件語言呈現):
# Architecture Standards
Rule-shaped, checkable writing; every rule carries a "why". Empty sections are legal — sediment is gradual.
## Module boundaries
## Error handling
## Dependency direction
種子 D — docs/business/README.md:
# Business Knowledge
Decision background and business rules. Format suggestion: one article answers one business question, opening paragraph states why it matters.
A new teammate (human or agent) reading this directory should be able to answer "why does this product direction exist".
種子 E — design-system/README.md:
# Design System
## tokens/ Design tokens (colors/type/spacing, machine-readable JSON preferred)
## components/ Component contracts (purpose, variants, misuse)
## patterns/ Interaction patterns (forms, feedback, loading, empty states — sediment reused patterns)
種子 F — .omc/skills/README.md:
# Project Skills
Reusable capabilities sedimented by this project: specialized tools, prompt templates, specialized practices.
One skill per file `.omc/skills/<name>.md`, frontmatter must contain a stable ASCII `id` plus name + description +
**non-empty triggers** (loader validation hard requirement: missing or empty means the skill is never loaded):
```markdown
---
id: project-release-check
name: project-release-check
description: Apply this repository's release readiness rules
triggers:
- "project release check"
---
# Project Release Check
Follow the repository-specific release checklist and report evidence.
```
The literal YAML keys `id`, `name`, `description`, and `triggers` never localize. `id` and other machine-semantic values stay ASCII and stable; the scalar display values for `name`, `description`, and `triggers`, plus Markdown headings and prose, may localize. A non-Latin display name remains loadable because the explicit ASCII `id` is stable.
Bar for admission matches skillify: if it can be Googled in 5 minutes it is not a skill;
write "this project's specific decision discipline", not generic tutorials.
.mcp.json 種子:{"mcpServers": {}}——伺服器在真正需要工具整合時才加入,而非預先加入。
4. 連接治理循環(這才是讓它成為船廠,而非資料夾的關鍵)
告知使用者,並依賴以下流程來填補骨架:
- launch 在決策確定時寫入 CONTEXT.md 詞彙、ADR 與 docs/business/(留下紙本記錄)
- launch C5 沈積 / code-review 沉積標準
- navigator 消費 CONTEXT.md 與 docs/standards/ 來做出脈絡感知的決策
- harbor 消費 docs/standards/ 與設計系統來驗證規範議題