universal-dev-standards 6.4.0 → 6.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/bundled/ai/standards/agent-dispatch.ai.yaml +162 -0
  2. package/bundled/ai/standards/ai-friendly-architecture.ai.yaml +1 -1
  3. package/bundled/ai/standards/ai-instruction-standards.ai.yaml +190 -15
  4. package/bundled/ai/standards/class-level-fix.ai.yaml +38 -3
  5. package/bundled/ai/standards/commit-message.ai.yaml +2 -0
  6. package/bundled/ai/standards/model-selection.ai.yaml +370 -72
  7. package/bundled/ai/standards/mutation-testing.ai.yaml +105 -2
  8. package/bundled/ai/standards/project-structure.ai.yaml +1 -1
  9. package/bundled/ai/standards/security-standards.ai.yaml +22 -1
  10. package/bundled/ai/standards/spec-driven-development.ai.yaml +59 -2
  11. package/bundled/ai/standards/test-governance.ai.yaml +49 -2
  12. package/bundled/ai/standards/testing.ai.yaml +49 -3
  13. package/bundled/ai/standards/translation-lifecycle-standards.ai.yaml +4 -4
  14. package/bundled/ai/standards/verification-evidence.ai.yaml +48 -4
  15. package/bundled/core/class-level-fix.md +26 -3
  16. package/bundled/core/model-selection.md +383 -125
  17. package/bundled/core/mutation-testing.md +41 -2
  18. package/bundled/core/test-governance.md +22 -2
  19. package/bundled/core/translation-lifecycle-standards.md +6 -6
  20. package/bundled/core/verification-evidence.md +42 -3
  21. package/bundled/locales/zh-CN/CHANGELOG.md +12 -3
  22. package/bundled/locales/zh-CN/README.md +1 -1
  23. package/bundled/locales/zh-CN/SECURITY.md +1 -1
  24. package/bundled/locales/zh-CN/core/model-selection.md +375 -60
  25. package/bundled/locales/zh-CN/core/mutation-testing.md +1 -1
  26. package/bundled/locales/zh-CN/core/test-governance.md +1 -1
  27. package/bundled/locales/zh-CN/core/translation-lifecycle-standards.md +1 -1
  28. package/bundled/locales/zh-CN/core/verification-evidence.md +1 -1
  29. package/bundled/locales/zh-CN/docs/CHEATSHEET.md +7 -12
  30. package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +10 -15
  31. package/bundled/locales/zh-TW/CHANGELOG.md +37 -3
  32. package/bundled/locales/zh-TW/README.md +1 -1
  33. package/bundled/locales/zh-TW/SECURITY.md +1 -1
  34. package/bundled/locales/zh-TW/core/class-level-fix.md +22 -7
  35. package/bundled/locales/zh-TW/core/model-selection.md +385 -47
  36. package/bundled/locales/zh-TW/core/mutation-testing.md +45 -6
  37. package/bundled/locales/zh-TW/core/test-governance.md +22 -3
  38. package/bundled/locales/zh-TW/core/translation-lifecycle-standards.md +1 -1
  39. package/bundled/locales/zh-TW/core/verification-evidence.md +33 -6
  40. package/bundled/locales/zh-TW/docs/CHEATSHEET.md +7 -12
  41. package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +10 -15
  42. package/bundled/locales/zh-TW/integrations/claude-code/README.md +31 -5
  43. package/package.json +1 -1
  44. package/src/utils/reference-sync.js +83 -16
  45. package/standards-registry.json +20 -8
@@ -0,0 +1,162 @@
1
+ # Agent Dispatch & Parallel Coordination - AI Optimized
2
+ # Source: core/agent-dispatch.md
3
+ # Inspired by Superpowers dispatching-parallel-agents / subagent-driven-development (MIT)
4
+ #
5
+ # Reinstated by XSPEC-362 R5a. This file was removed in 6.0.0 as part of the
6
+ # XSPEC-086 Phase 2 / DEC-049 migration, which moved the machine-readable copy to
7
+ # dev-autopilot as canonical owner. That owner entered maintenance mode on 2026-04-28,
8
+ # so the machine-readable form has had no maintained home since — while
9
+ # core/agent-dispatch.md continued to ship in the npm bundle. Adopters installing with
10
+ # `--format ai` therefore received the prose nowhere and the rules not at all.
11
+
12
+ standard:
13
+ id: agent-dispatch
14
+ name: Agent Dispatch & Parallel Coordination
15
+ description: AI 子代理的並行派遣、工作協調與狀態回報標準
16
+
17
+ meta:
18
+ version: "1.0.0"
19
+ updated: "2026-03-20"
20
+ source: core/agent-dispatch.md
21
+ description: "並行派遣、獨立域判準、狀態回報協定、prompt 設計原則"
22
+ inspired_by: superpowers/dispatching-parallel-agents
23
+ reinstated:
24
+ in_version: "unreleased" # 由 bump-version 於發版時決定,此處不預先宣稱版本號
25
+ reason: >
26
+ XSPEC-362 R5a。6.0.0(XSPEC-086 Phase 2 / DEC-049)將機器可讀版遷至 dev-autopilot 作為
27
+ canonical 位置後移除本檔;該 canonical owner 於 2026-04-28 進入維護模式,
28
+ 機器可讀版自此無人維護,而散文版仍隨 bundle 出貨。此為出貨缺口,非刻意的能力刪減。
29
+
30
+ scope:
31
+ covers: "怎麼派 — 並行安全、獨立域判準、狀態回報協定、prompt 設計"
32
+ does_not_cover: "派給誰、想多深 — 見 model-selection 標準(模型軸 × effort 軸)"
33
+ boundary_rule: >
34
+ 並行安全規則屬於本標準。model-selection 及其衍生的 agent 定義必須「引用」本標準,
35
+ 不得重寫一份——兩份並行安全規則會各自漂移,而漂移的樣子與正常的樣子無從分辨。
36
+
37
+ guidelines:
38
+ - "派遣前必須識別獨立域 — 無共享可變狀態才可並行"
39
+ - "每個子代理的 prompt 必須聚焦、自足、輸出格式明確"
40
+ - "子代理完成時必須回報四態之一"
41
+ - "並行代理返回後,先檢查檔案衝突再跑完整測試"
42
+
43
+ core_principle:
44
+ id: independence_before_parallelism
45
+ statement: "在並行派遣代理之前,先驗證其任務域彼此獨立(無共享可變狀態)"
46
+ independent_domain_criterion: "無共享可變狀態(no shared mutable state)"
47
+
48
+ prompt_design_principles:
49
+ - id: focused
50
+ name_zh: "聚焦"
51
+ rule: "每個代理只處理單一問題域,不混合無關任務"
52
+ - id: self_contained
53
+ name_zh: "自足"
54
+ rule: "prompt 包含執行所需的完整上下文;代理不需額外提問或搜尋"
55
+ note: >
56
+ 子代理載入的是「主 session 工作目錄」的專案指示與技能清單,不是它實際要操作的那個 repo 的。
57
+ 同 repo 派工時規則會自行到位;跨 repo 派工時,目標 repo 的規則完全不在 context 中——
58
+ commit 格式、測試指令、授權邊界若未寫進 prompt,就等於不存在。
59
+ note_correction:
60
+ corrected_on: "2026-08-12"
61
+ previous_claim: "子代理不會自動載入目標專案的專案指示,也無法呼叫目標專案的技能"
62
+ why_it_was_wrong: >
63
+ 該陳述在宿主文件與實測下都不成立:子代理會載入 CLAUDE.md 階層,也能經 Skill 工具呼叫技能。
64
+ 真正的限制是「載入的是哪一份」——主 session 工作目錄的那一份。
65
+ why_the_distinction_matters: >
66
+ 只寫「不會載入」的話,下一個讀宿主文件的人會判定本規則已過時而移除它,
67
+ 而跨 repo 的缺口仍然存在。差別在「哪一份」,不在「有沒有」。
68
+ measurement: >
69
+ 2026-08-12:自工作目錄為 repo A 的 session 派出一個被禁用所有工具的子代理,
70
+ 要它僅憑啟動時的 context 說出看得到哪些 CLAUDE.md,答完後才准跑 pwd。
71
+ 結果:context 內只有使用者層 ~/.claude/CLAUDE.md 與 repo A 的 CLAUDE.md;
72
+ 目標 repo B 的不在其中;pwd 回傳 repo A。
73
+ host_documentation_agrees: >
74
+ 宿主文件的措辭是「every level of the CLAUDE.md hierarchy the main conversation loads」——
75
+ 載重的是 the main conversation 這幾個字。
76
+ host_layer_artifact: integrations/claude-code/dispatch-template.md
77
+ - id: specific_output
78
+ name_zh: "明確輸出"
79
+ rule: "明確定義期望的回報格式"
80
+
81
+ status_protocol:
82
+ description: "子代理完成時必須回報四態之一"
83
+ states:
84
+ - id: DONE
85
+ description: "任務成功完成"
86
+ orchestrator_action: "繼續下一個任務"
87
+ - id: DONE_WITH_CONCERNS
88
+ description: "完成,但有需要記錄的疑慮"
89
+ orchestrator_action: "記錄疑慮,繼續"
90
+ - id: NEEDS_CONTEXT
91
+ description: "需要更多上下文才能完成"
92
+ orchestrator_action: "注入上下文後重新派遣(不是重試)"
93
+ - id: BLOCKED
94
+ description: "無法完成,需要升級"
95
+ orchestrator_action: "升級模型層級或拆分任務(層級選擇見 model-selection)"
96
+ decision_flow: |
97
+ 代理完成工作
98
+ ├── 全部驗收標準達成? → DONE
99
+ ├── 標準達成但有疑慮? → DONE_WITH_CONCERNS
100
+ ├── 缺少資訊無法繼續? → NEEDS_CONTEXT
101
+ └── 根本上無法完成? → BLOCKED
102
+
103
+ conflict_detection:
104
+ description: "並行代理返回時,orchestrator 必須執行的檢查"
105
+ steps:
106
+ - "檢查檔案衝突 — 是否有多個代理修改了同一個檔案"
107
+ - "執行完整測試套件 — 合併所有變更後驗證整合"
108
+ - "解決衝突 — 自動處理或標記交由人工審查"
109
+
110
+ rules:
111
+ - id: AD-001
112
+ trigger: "多個代理編輯同一個檔案"
113
+ action: "標記衝突,要求合併解決"
114
+ priority: critical
115
+ - id: AD-002
116
+ trigger: "代理回報 BLOCKED"
117
+ action: "升級模型層級並重試一次(層級選擇判準見 model-selection)"
118
+ priority: high
119
+ - id: AD-003
120
+ trigger: "所有並行代理完成"
121
+ action: "執行完整測試套件以驗證整合"
122
+ priority: high
123
+
124
+ examples:
125
+ good_parallel_independent:
126
+ description: "兩個代理處理獨立模組 — 無共享檔案,可安全並行"
127
+ agents:
128
+ - task: "為 /api/users 端點加上 rate limiting"
129
+ files: ["src/api/users.ts", "src/api/users.test.ts"]
130
+ - task: "為 /api/products 端點加上快取"
131
+ files: ["src/api/products.ts", "src/api/products.test.ts"]
132
+ bad_parallel_dependent:
133
+ description: "兩個代理修改共享狀態 — 同一檔案,會衝突"
134
+ agents:
135
+ - task: "重構資料庫連線池"
136
+ files: ["src/db.ts"]
137
+ - task: "加上連線重試邏輯"
138
+ files: ["src/db.ts"]
139
+
140
+ related_standards:
141
+ - id: model-selection
142
+ relationship: >
143
+ model-selection 管「派給誰、想多深」(模型軸 × effort 軸),本標準管「怎麼派」。
144
+ 兩者互補;AD-002 的「升級模型層級」其判準定義在 model-selection,不在這裡。
145
+ - id: git-worktree
146
+ relationship: "並行代理若必須在同一 repo 工作,以 worktree 隔離取代共享工作區"
147
+ - id: agent-communication-protocol
148
+ relationship: "代理之間的訊息格式;本標準只規範對 orchestrator 的狀態回報"
149
+
150
+ physical_spec:
151
+ type: checklist
152
+ validator:
153
+ type: ai_review
154
+ rule: "檢查並行派遣前是否驗證過任務域獨立性,且每個代理都回報了四態之一"
155
+ checks:
156
+ - "並行派遣前是否確認任務域無共享可變狀態"
157
+ - "每個子代理的 prompt 是否聚焦於單一問題域"
158
+ - "prompt 是否自足(含目標專案的關鍵規則,不倚賴代理自行載入)"
159
+ - "prompt 是否明確定義回報格式"
160
+ - "子代理是否回報 DONE / DONE_WITH_CONCERNS / NEEDS_CONTEXT / BLOCKED 之一"
161
+ - "並行代理返回後是否檢查檔案衝突"
162
+ - "合併所有變更後是否執行完整測試套件"
@@ -59,7 +59,7 @@ principles:
59
59
  rule: Enable understanding through configuration and entry point analysis
60
60
  key_files:
61
61
  - .ai-context.yaml
62
- - package.json / pyproject.toml
62
+ - "package.json / pyproject.toml / go.mod / Cargo.toml / pom.xml / build.gradle / Gemfile"
63
63
  - Entry point files
64
64
  - QUICK-REF.md files
65
65
 
@@ -3,30 +3,205 @@
3
3
 
4
4
  id: ai-instruction-standards
5
5
  meta:
6
- version: "1.1.0"
7
- updated: "2026-05-28"
6
+ version: "2.1.0"
7
+ updated: "2026-08-12"
8
8
  source: core/ai-instruction-standards.md
9
- description: Best practices for creating AI instruction files (root and skill level) with universal/project-specific separation and i18n strategy
9
+ description: Best practices for creating AI instruction files (root and skill level) with universal/project-specific separation, i18n strategy, and a detailed cross-tool support matrix
10
10
 
11
+ # ─────────────────────────────────────────────
12
+ # 工具支援清單 (2026-04-28 更新)
13
+ # ─────────────────────────────────────────────
11
14
  supported_tools:
15
+
16
+ # CLI / Agent 型(終端機代理)
12
17
  - tool: Claude Code
13
- file: CLAUDE.md
14
- format: Markdown
18
+ vendor: Anthropic
19
+ category: cli_agent
20
+ primary_file: CLAUDE.md
21
+ additional_files:
22
+ - path: .claude/rules/*.md
23
+ note: glob-based conditional rules
24
+ workflow_mechanism: Skills (.claude/skills/*.md → /{skill-name})
25
+ subagent_config: .claude/agents/
26
+ mcp_support: true
27
+ hooks: true
28
+ notes: Hierarchical CLAUDE.md (global → project → subdir); most advanced hook system
29
+
30
+ - tool: Gemini CLI
31
+ vendor: Google
32
+ category: cli_agent
33
+ primary_file: GEMINI.md
34
+ workflow_mechanism: ".gemini/commands/*.toml → /{command-name}; supports !{shell} inline"
35
+ subagent_config: .gemini/agents/
36
+ mcp_support: true
37
+ hooks: false
38
+ notes: "1M context window; A2A remote agents; free tier with Google account; Apache 2.0 open source"
39
+
40
+ - tool: OpenAI Codex CLI
41
+ vendor: OpenAI
42
+ category: cli_agent
43
+ primary_file: AGENTS.md
44
+ additional_files:
45
+ - path: AGENTS.override.md
46
+ note: temporary override, highest priority
47
+ - path: ~/.codex/AGENTS.md
48
+ note: global fallback
49
+ workflow_mechanism: "Local team commands; /review (non-destructive code review)"
50
+ subagent_config: .codex/agents/
51
+ mcp_support: true
52
+ hooks: true
53
+ notes: "Direct Agents SDK integration; spawn_agents_on_csv batch processing; AGENTS.md traverses from Git root to cwd"
54
+
55
+ - tool: OpenCode
56
+ vendor: Open Source
57
+ category: cli_agent
58
+ primary_file: AGENTS.md
59
+ additional_files:
60
+ - path: CLAUDE.md
61
+ note: auto-recognized for migration compatibility
62
+ workflow_mechanism: "No custom slash commands; /init /undo /redo /share built-in"
63
+ subagent_config: .opencode/agents/
64
+ mcp_support: true
65
+ hooks: true
66
+ notes: "75+ LLM providers; CLAUDE.md backward-compatible; HTTP API for programmatic control; 95K+ GitHub stars"
67
+
68
+ # AI-native IDE / 編輯器整合
15
69
  - tool: Cursor
16
- file: .cursorrules
17
- format: Markdown
70
+ vendor: Anysphere
71
+ category: ide
72
+ primary_file: .cursor/rules/*.mdc
73
+ deprecated_file: .cursorrules
74
+ additional_files:
75
+ - path: AGENTS.md
76
+ note: also supported for agent context
77
+ workflow_mechanism: "@-mentions for context; /multitask for parallel subagents; no custom slash commands"
78
+ subagent_config: Background Agents (cloud VM); /multitask inline
79
+ mcp_support: true
80
+ hooks: true
81
+ notes: ".cursorrules is DEPRECATED — migrate to .cursor/rules/*.mdc with MDC frontmatter (description, globs, alwaysApply); Background Agents run on cloud Ubuntu VM; BugBot auto-reviews PRs"
82
+
83
+ - tool: GitHub Copilot
84
+ vendor: GitHub / Microsoft
85
+ category: ide
86
+ primary_file: .github/copilot-instructions.md
87
+ additional_files:
88
+ - path: .github/instructions/*.instructions.md
89
+ note: conditional, file-glob scoped (applyTo frontmatter)
90
+ - path: .github/prompts/*.prompt.md
91
+ note: reusable task templates, exposed as slash commands
92
+ - path: .github/agents/*.agent.md
93
+ note: custom agents with fine-grained tool access
94
+ - path: AGENTS.md
95
+ note: also recognized
96
+ workflow_mechanism: ".github/prompts/*.prompt.md → /{prompt-name}; .github/agents/*.agent.md → named agents"
97
+ subagent_config: ".github/agents/*.agent.md; Local/CLI/Cloud/Third-party 4 deployment models"
98
+ mcp_support: true
99
+ hooks: true
100
+ notes: "Organization-level instructions for enterprise; priority: personal > repo > org; multi-model (Claude, GPT-5, Gemini)"
101
+
18
102
  - tool: Windsurf
19
- file: .windsurfrules
20
- format: Markdown
103
+ vendor: Codeium
104
+ category: ide
105
+ primary_file: .windsurfrules
106
+ additional_files:
107
+ - path: .windsurf/rules/*.md
108
+ note: MDC frontmatter, structured rules
109
+ - path: AGENTS.md
110
+ note: auto-recognized; subdir scope via location-based activation
111
+ workflow_mechanism: ".windsurf/workflows/*.md → /{workflow-name}; nestable workflows"
112
+ subagent_config: "Up to 5 parallel agents (Wave 13); each in isolated Git worktree"
113
+ mcp_support: true
114
+ hooks: true
115
+ notes: "Arena Mode: compare multiple agents on same task; SWE-1.5 proprietary coding model; MDM enterprise policy deployment; VS Code extension compatible"
116
+
21
117
  - tool: Cline
22
- file: .clinerules
23
- format: Markdown
118
+ vendor: Open Source
119
+ category: ide
120
+ primary_file: .clinerules
121
+ workflow_mechanism: Chat-based, no custom slash commands
122
+ subagent_config: null
123
+ mcp_support: true
124
+ hooks: false
125
+ notes: VS Code extension; MCP-first design
126
+
127
+ # ─────────────────────────────────────────────
128
+ # 跨工具通用標準:AGENTS.md
129
+ # ─────────────────────────────────────────────
130
+ cross_tool_standard:
131
+ file: AGENTS.md
132
+ description: |
133
+ AGENTS.md is emerging as the de-facto cross-tool instruction standard.
134
+ Supported by: Gemini CLI, OpenAI Codex CLI, OpenCode, GitHub Copilot, Windsurf, Cursor.
135
+ Recommendation: use AGENTS.md as the universal baseline, then add tool-specific files for advanced features.
136
+ supported_by:
137
+ - Gemini CLI
138
+ - OpenAI Codex CLI
139
+ - OpenCode
140
+ - GitHub Copilot
141
+ - Windsurf
142
+ - Cursor
143
+ not_supported_by:
144
+ - Claude Code # uses CLAUDE.md; AGENTS.md not auto-recognized
145
+ - Cline # uses .clinerules
146
+
147
+ # ─────────────────────────────────────────────
148
+ # Slash Commands / Workflow 機制對照
149
+ # ─────────────────────────────────────────────
150
+ workflow_mechanisms:
151
+ - tool: Claude Code
152
+ mechanism: Skills
153
+ file_pattern: .claude/skills/{name}/SKILL.md
154
+ trigger: "/{skill-name}"
155
+ shareable: true
156
+ notes: Supports allowed-tools, scope, argument-hint frontmatter
157
+
158
+ - tool: Gemini CLI
159
+ mechanism: Custom Commands
160
+ file_pattern: ".gemini/commands/{name}.toml (or {namespace}/{name}.toml)"
161
+ trigger: "/{command-name} or /{namespace}:{name}"
162
+ shareable: true
163
+ notes: "Supports !{shell} inline execution; MCP prompts auto-exposed as slash commands"
164
+
165
+ - tool: Windsurf
166
+ mechanism: Workflows
167
+ file_pattern: .windsurf/workflows/{name}.md
168
+ trigger: "/{workflow-name}"
169
+ shareable: true
170
+ notes: Nestable; manual trigger only (not auto-invoked by Cascade)
171
+
24
172
  - tool: GitHub Copilot
25
- file: .github/copilot-instructions.md
26
- format: Markdown
173
+ mechanism: Prompt Files + Agent Skills
174
+ file_pattern: ".github/prompts/{name}.prompt.md"
175
+ trigger: "/{prompt-name}"
176
+ shareable: true
177
+ notes: ".github/agents/*.agent.md for specialized agents with tool access control"
178
+
179
+ - tool: Cursor
180
+ mechanism: None (native)
181
+ file_pattern: null
182
+ trigger: "@-mentions, /multitask"
183
+ shareable: false
184
+ notes: No custom slash command system; use rules files for persistent behavior
185
+
186
+ - tool: OpenAI Codex CLI
187
+ mechanism: Team Commands
188
+ file_pattern: local team config
189
+ trigger: custom
190
+ shareable: false
191
+ notes: Limited; primary interaction via chat
192
+
27
193
  - tool: OpenCode
28
- file: .opencode/instructions.md
29
- format: Markdown
194
+ mechanism: None (native)
195
+ file_pattern: null
196
+ trigger: Built-in only (/init /undo /redo /share)
197
+ shareable: false
198
+ notes: No custom slash command system
199
+
200
+ - tool: Cline
201
+ mechanism: None
202
+ file_pattern: null
203
+ trigger: null
204
+ shareable: false
30
205
 
31
206
  content_types:
32
207
  universal:
@@ -7,13 +7,17 @@ standard:
7
7
  description: 類別層修正標準——修正瞄準集合,不是瞄準成員
8
8
 
9
9
  meta:
10
- version: "1.0.0"
11
- updated: "2026-08-10"
10
+ version: "1.1.0"
11
+ updated: "2026-08-14"
12
12
  source: core/class-level-fix.md
13
13
  description: >
14
14
  一個缺陷幾乎從不孤單,它是某個集合的一員。修掉被指出的那一員,
15
15
  集合裡其餘的原封不動,而沒有東西會通知你下一個在哪。
16
16
  本標準要求修正瞄準集合:指出可窮舉集合,並加上一個「走訪」而非「列舉」該集合的檢查。
17
+ v1.1.0:新增負向控制的極限聲明(CLF-007:通過一次只證明認得那一個案例,
18
+ 不證明認得該規則的每一種違反);新增窄涵蓋登記規則(CLF-008,與
19
+ verification-evidence VE-012 共用:涵蓋缺口須登記到帶到期日的例外清冊,
20
+ 單純揭露不滿足本條)。
17
21
 
18
22
  iron_law: >
19
23
  修一個缺陷之前,先指出它所屬的可窮舉集合,並加上一個走訪該集合的檢查。
@@ -63,6 +67,11 @@ standard:
63
67
  granularity: per_subset
64
68
  why_per_subset: >
65
69
  一道涵蓋五份清單、卻只對第一份測過的檢查,是一道涵蓋一份清單的檢查。
70
+ limitation: >
71
+ 一次通過的負向控制只證明一個已知壞案例能到達檢查器的失敗路徑,
72
+ 不證明檢查器認得該規則的每一種違反。一道 grep 閘可以 fail-closed 得很完美,
73
+ 卻守著一個拼字而不是一個行為——合成成員證明的是線路接通了,不是那張網夠寬,
74
+ 足以抓住它自稱要抓的東西。
66
75
 
67
76
  output_requirement:
68
77
  must_print: ["實際檢查的數量(分母)", "被排除的數量"]
@@ -82,6 +91,24 @@ standard:
82
91
  逐份清冊——一種宣告一道檢查,各自知道自己的基準與條目形狀。
83
92
  說出清冊有幾份,並確認每一份都有檢查。
84
93
 
94
+ # ── v1.1.0 窄涵蓋登記規則(B-01 借鑒,與 verification-evidence VE-012 共用同一條要求)──
95
+ narrow_coverage_registration:
96
+ description: "當一道閘門的實際涵蓋面窄於它所服務的規則時,只寫一句話揭露是不夠的——揭露必須登記,不能只揭露"
97
+ why: >
98
+ 散文式揭露很便宜,比擴大涵蓋面便宜得多。每一道被審過一次的窄閘門都會長出一段
99
+ 誠實的文字,然後永遠維持窄下去。揭露本身不換來任何東西;只有配上一個能證明
100
+ 它沒有淪為永久藉口的機制,它才換得到東西。
101
+ requirement: >
102
+ 任何這一類已記錄的涵蓋缺口,必須同時登記到一份帶到期日的例外清冊——一份獨立於
103
+ 標準本文之外的清單,指名缺口、說明成因、並附上覆核或到期日期。沒有登記到這種
104
+ 清冊裡的揭露,不滿足本條。
105
+ falsifiable_condition: >
106
+ 若某條目連續兩期清冊審查都未變動,該揭露就已經變成逃生口,本條對該條目失效——
107
+ 不是「部分滿足」,是失效。清冊機制本身(放在哪裡、什麼格式、多久審一次)留給
108
+ 採用它的專案自行決定;本標準要求的是「有這麼一份東西存在,且條目會動」。
109
+ shared_with: verification-evidence
110
+ shared_rule_id: VE-012
111
+
85
112
  anti_patterns:
86
113
  - pattern: "修掉被回報的那一員就結案"
87
114
  why: "集合沒有變;下一個成員會以新事故的形式抵達"
@@ -93,6 +120,8 @@ standard:
93
120
  why: "證明的是那一個成員,不是那個類別"
94
121
  - pattern: "`✓ all pass` 而沒有分母"
95
122
  why: "掃了全部與什麼都沒掃,輸出一模一樣"
123
+ - pattern: "一句揭露文字,沒有登記到帶到期日的例外清冊"
124
+ why: "比擴大涵蓋面便宜,而且沒有任何東西逼它改變"
96
125
 
97
126
  rules:
98
127
  - id: CLF-001
@@ -113,6 +142,12 @@ standard:
113
142
  - id: CLF-006
114
143
  rule: "集合無法走訪時,須記錄理由與解除條件"
115
144
  severity: warning
145
+ - id: CLF-007
146
+ rule: "宣稱一道類別層檢查『涵蓋』某規則前,須指出檢查辨識的是規則的字面/語法特徵,還是它想守護的行為——通過一次負向控制只證明檢查器認得那一個案例"
147
+ severity: warning
148
+ - id: CLF-008
149
+ rule: "當閘門的實際涵蓋面窄於它所服務的規則時,該缺口必須登記到一份帶到期日的例外清冊,單純寫下揭露文字不滿足本條(與 verification-evidence VE-012 共用)"
150
+ severity: warning
116
151
 
117
152
  # 本標準自己沒有自動閘門——依它自己的規則,這件事必須寫下來而不是暗示強制力存在
118
153
  enforcement:
@@ -131,7 +166,7 @@ standard:
131
166
 
132
167
  related:
133
168
  - id: verification-evidence
134
- relation: "同一族:工具靜默失敗時,其輸出與真結果無從分辨。本標準是同一件事套用在**範圍**而非**執行**上"
169
+ relation: "同一族:工具靜默失敗時,其輸出與真結果無從分辨。本標準是同一件事套用在**範圍**而非**執行**上;也與本標準共用「窄涵蓋必須登記」規則(VE-012 / CLF-008)"
135
170
  - id: anti-hallucination
136
171
  relation: "那個防「沒查」;這個防「查了其中一個,卻對全部下結論」"
137
172
 
@@ -120,6 +120,8 @@ physical_spec:
120
120
 
121
121
  enforcement:
122
122
  hook_type: PreCommit
123
+ trigger: UserPromptSubmit
123
124
  script_ref: "scripts/hooks/validate-commit-msg.js"
125
+ hook_script: "scripts/hooks/validate-commit-msg.js"
124
126
  severity: error
125
127
  timeout_ms: 500