universal-dev-standards 6.7.5 → 6.9.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.
- package/bin/uds.js +19 -2
- package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +14 -2
- package/bundled/ai/standards/adr-standards.ai.yaml +14 -2
- package/bundled/ai/standards/ai-instruction-standards.ai.yaml +6 -6
- package/bundled/ai/standards/code-review.ai.yaml +13 -3
- package/bundled/ai/standards/commit-message.ai.yaml +8 -4
- package/bundled/ai/standards/deferred-item-exit.ai.yaml +225 -0
- package/bundled/ai/standards/feature-discovery-standards.ai.yaml +14 -2
- package/bundled/ai/standards/governance-layer.ai.yaml +128 -2
- package/bundled/ai/standards/logging.ai.yaml +2 -2
- package/bundled/ai/standards/retrospective-standards.ai.yaml +14 -2
- package/bundled/ai/standards/reverse-engineering-standards.ai.yaml +73 -2
- package/bundled/ai/standards/security-standards.ai.yaml +2 -2
- package/bundled/ai/standards/spec-driven-development.ai.yaml +14 -2
- package/bundled/ai/standards/tech-debt-standards.ai.yaml +87 -3
- package/bundled/ai/standards/turn-completion-integrity.ai.yaml +131 -0
- package/bundled/core/acceptance-criteria-traceability.md +5 -2
- package/bundled/core/adr-standards.md +26 -2
- package/bundled/core/ai-instruction-standards.md +9 -7
- package/bundled/core/code-review-checklist.md +5 -2
- package/bundled/core/context-aware-loading.md +1 -1
- package/bundled/core/deferred-item-exit.md +254 -0
- package/bundled/core/feature-discovery-standards.md +5 -1
- package/bundled/core/governance-layer.md +114 -2
- package/bundled/core/retrospective-standards.md +4 -2
- package/bundled/core/reverse-engineering-standards.md +81 -2
- package/bundled/core/spec-driven-development.md +8 -2
- package/bundled/core/tech-debt-standards.md +67 -8
- package/bundled/core/turn-completion-integrity.md +196 -0
- package/bundled/hooks/check-dangerous-cmd.mjs +60 -0
- package/bundled/hooks/check-logging-standard.mjs +59 -0
- package/bundled/hooks/check-turn-completion.mjs +233 -0
- package/bundled/hooks/inject-standards.mjs +183 -0
- package/bundled/hooks/telemetry-wrapper.mjs +77 -0
- package/bundled/hooks/turn-completion/detect.mjs +99 -0
- package/bundled/hooks/turn-completion/locales/en.mjs +159 -0
- package/bundled/hooks/turn-completion/locales/zh-TW.mjs +166 -0
- package/bundled/hooks/validate-commit-msg.mjs +104 -0
- package/bundled/locales/zh-CN/CHANGELOG.md +65 -3
- package/bundled/locales/zh-CN/CLAUDE.md +1 -1
- package/bundled/locales/zh-CN/README.md +7 -7
- package/bundled/locales/zh-CN/SECURITY.md +1 -1
- package/bundled/locales/zh-CN/core/adr-standards.md +1 -1
- package/bundled/locales/zh-CN/core/ai-instruction-standards.md +10 -8
- package/bundled/locales/zh-CN/core/governance-layer.md +118 -6
- package/bundled/locales/zh-CN/core/retrospective-standards.md +1 -1
- package/bundled/locales/zh-CN/core/tech-debt-standards.md +71 -4
- package/bundled/locales/zh-CN/core/turn-completion-integrity.md +190 -0
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +27 -6
- package/bundled/locales/zh-CN/docs/CLI-INIT-OPTIONS.md +29 -68
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +172 -24
- package/bundled/locales/zh-CN/docs/USAGE-MODES-COMPARISON.md +1 -2
- package/bundled/locales/zh-CN/integrations/google-antigravity/{INSTRUCTIONS.md → AGENTS.md} +1 -1
- package/bundled/locales/zh-CN/integrations/google-antigravity/README.md +3 -3
- package/bundled/locales/zh-CN/skills/agents/README.md +1 -1
- package/bundled/locales/zh-CN/skills/atdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/bdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +22 -12
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/guide.md +12 -9
- package/bundled/locales/zh-CN/skills/code-review-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/commands/brainstorm.md +17 -13
- package/bundled/locales/zh-CN/skills/commands/config.md +0 -1
- package/bundled/locales/zh-CN/skills/commands/init.md +1 -2
- package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/contract-test-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/dev-methodology/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/observability-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/project-structure-guide/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/release-standards/SKILL.md +3 -0
- package/bundled/locales/zh-CN/skills/requirement-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +3 -0
- package/bundled/locales/zh-CN/skills/reverse-engineer/tdd-analysis.md +13 -23
- package/bundled/locales/zh-CN/skills/runbook-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/slo-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-CN/skills/tdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-CN/skills/workflows/README.md +2 -11
- package/bundled/locales/zh-TW/CHANGELOG.md +65 -3
- package/bundled/locales/zh-TW/CLAUDE.md +1 -1
- package/bundled/locales/zh-TW/README.md +7 -7
- package/bundled/locales/zh-TW/SECURITY.md +1 -1
- package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +2 -0
- package/bundled/locales/zh-TW/core/adr-standards.md +26 -5
- package/bundled/locales/zh-TW/core/ai-instruction-standards.md +10 -8
- package/bundled/locales/zh-TW/core/code-review-checklist.md +2 -0
- package/bundled/locales/zh-TW/core/container-image-standards.md +2 -2
- package/bundled/locales/zh-TW/core/contract-testing-standards.md +2 -2
- package/bundled/locales/zh-TW/core/cross-flow-regression.md +8 -7
- package/bundled/locales/zh-TW/core/data-contract.md +2 -2
- package/bundled/locales/zh-TW/core/data-migration-testing.md +2 -2
- package/bundled/locales/zh-TW/core/data-pipeline.md +2 -2
- package/bundled/locales/zh-TW/core/deferred-item-exit.md +251 -0
- package/bundled/locales/zh-TW/core/documentation-writing-standards.md +228 -3
- package/bundled/locales/zh-TW/core/full-coverage-testing.md +15 -2
- package/bundled/locales/zh-TW/core/governance-layer.md +118 -5
- package/bundled/locales/zh-TW/core/iac-design-principles.md +2 -2
- package/bundled/locales/zh-TW/core/incident-response.md +2 -2
- package/bundled/locales/zh-TW/core/model-provenance.md +4 -2
- package/bundled/locales/zh-TW/core/pii-classification.md +42 -6
- package/bundled/locales/zh-TW/core/prd-standards.md +4 -2
- package/bundled/locales/zh-TW/core/product-metrics-standards.md +4 -2
- package/bundled/locales/zh-TW/core/release-readiness-gate.md +2 -2
- package/bundled/locales/zh-TW/core/resource-cost-boundary.md +2 -2
- package/bundled/locales/zh-TW/core/retrospective-standards.md +5 -3
- package/bundled/locales/zh-TW/core/reverse-engineering-standards.md +83 -5
- package/bundled/locales/zh-TW/core/runbook.md +2 -2
- package/bundled/locales/zh-TW/core/schema-evolution.md +2 -2
- package/bundled/locales/zh-TW/core/secret-management-standards.md +2 -2
- package/bundled/locales/zh-TW/core/slo-sli.md +2 -2
- package/bundled/locales/zh-TW/core/spec-driven-development.md +2 -0
- package/bundled/locales/zh-TW/core/tech-debt-standards.md +71 -4
- package/bundled/locales/zh-TW/core/turn-completion-integrity.md +190 -0
- package/bundled/locales/zh-TW/core/user-journey-testing.md +2 -2
- package/bundled/locales/zh-TW/core/user-story-mapping.md +2 -2
- package/bundled/locales/zh-TW/core/verification-oracle.md +2 -2
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +27 -6
- package/bundled/locales/zh-TW/docs/CLI-INIT-OPTIONS.md +29 -68
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +172 -24
- package/bundled/locales/zh-TW/docs/USAGE-MODES-COMPARISON.md +1 -2
- package/bundled/locales/zh-TW/integrations/google-antigravity/{INSTRUCTIONS.md → AGENTS.md} +1 -1
- package/bundled/locales/zh-TW/integrations/google-antigravity/README.md +3 -3
- package/bundled/locales/zh-TW/skills/adr-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/agents/README.md +1 -1
- package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +22 -12
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +12 -9
- package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/commands/brainstorm.md +17 -13
- package/bundled/locales/zh-TW/skills/commands/config.md +0 -1
- package/bundled/locales/zh-TW/skills/commands/init.md +1 -2
- package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/contract-test-assistant/SKILL.md +2 -1
- package/bundled/locales/zh-TW/skills/dev-methodology/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/knowledge-graph/guide.md +2 -2
- package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +1 -1
- package/bundled/locales/zh-TW/skills/observability-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/project-discovery/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/project-structure-guide/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/release-standards/SKILL.md +3 -0
- package/bundled/locales/zh-TW/skills/requirement-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +3 -0
- package/bundled/locales/zh-TW/skills/reverse-engineer/tdd-analysis.md +13 -23
- package/bundled/locales/zh-TW/skills/runbook-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/slo-assistant/SKILL.md +1 -0
- package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +2 -0
- package/bundled/locales/zh-TW/skills/workflows/README.md +2 -11
- package/bundled/skills/agents/README.md +1 -1
- package/bundled/skills/atdd-assistant/SKILL.md +2 -0
- package/bundled/skills/bdd-assistant/SKILL.md +2 -0
- package/bundled/skills/brainstorm-assistant/SKILL.md +31 -13
- package/bundled/skills/brainstorm-assistant/guide.md +9 -6
- package/bundled/skills/code-review-assistant/SKILL.md +1 -0
- package/bundled/skills/commands/brainstorm.md +12 -9
- package/bundled/skills/commands/config.md +0 -1
- package/bundled/skills/commands/init.md +2 -3
- package/bundled/skills/commit-standards/SKILL.md +2 -0
- package/bundled/skills/contract-test-assistant/SKILL.md +1 -0
- package/bundled/skills/dev-methodology/SKILL.md +4 -0
- package/bundled/skills/observability-assistant/SKILL.md +1 -0
- package/bundled/skills/project-discovery/SKILL.md +1 -0
- package/bundled/skills/project-structure-guide/SKILL.md +1 -0
- package/bundled/skills/release-standards/SKILL.md +3 -0
- package/bundled/skills/requirement-assistant/SKILL.md +2 -0
- package/bundled/skills/reverse-engineer/SKILL.md +3 -0
- package/bundled/skills/reverse-engineer/tdd-analysis.md +16 -23
- package/bundled/skills/runbook-assistant/SKILL.md +1 -0
- package/bundled/skills/slo-assistant/SKILL.md +1 -0
- package/bundled/skills/tdd-assistant/SKILL.md +2 -0
- package/bundled/skills/workflows/README.md +2 -11
- package/bundled/templates/.ai-context.yaml.template +194 -0
- package/bundled/templates/CLAUDE.md.template +145 -0
- package/bundled/templates/DESIGN.md +237 -0
- package/bundled/templates/SKILL-BRIEF-TEMPLATE.md +57 -0
- package/bundled/templates/SKILL-CANDIDATES.md +39 -0
- package/bundled/templates/gates/check-error-exit.mjs +309 -0
- package/bundled/templates/mcp-config.json +10 -0
- package/bundled/templates/methodology-template.yaml +209 -0
- package/bundled/templates/migration-template.md +408 -0
- package/bundled/templates/requirement-checklist.md +410 -0
- package/bundled/templates/requirement-document-template.md +591 -0
- package/bundled/templates/requirement-template.md +881 -0
- package/bundled/templates/reverse-spec-template.md +409 -0
- package/bundled/templates/test-case-template.md +74 -0
- package/bundled/templates/test-plan-template.md +74 -0
- package/package.json +9 -5
- package/src/commands/audit.js +82 -0
- package/src/commands/check.js +66 -10
- package/src/commands/init.js +161 -16
- package/src/commands/lint.js +96 -0
- package/src/commands/quickstart.js +16 -13
- package/src/commands/update.js +286 -14
- package/src/compilers/claude-code-compiler.js +4 -1
- package/src/config/ai-agent-paths.js +62 -17
- package/src/core/constants.js +42 -11
- package/src/core/manifest.js +201 -3
- package/src/core/paths.js +2 -2
- package/src/i18n/messages.js +9 -32
- package/src/installers/hooks-installer.js +167 -75
- package/src/installers/integration-installer.js +9 -5
- package/src/prompts/init.js +14 -14
- package/src/reconciler/actual-state-scanner.js +14 -3
- package/src/utils/detector.js +21 -1
- package/src/utils/effect-boundary.js +1093 -0
- package/src/utils/hasher.js +229 -9
- package/src/utils/hook-stats.js +1 -1
- package/src/utils/integration-generator.js +100 -4
- package/src/utils/reference-sync.js +4 -1
- package/src/utils/skills-installer.js +17 -3
- package/src/utils/spec-linter.js +35 -76
- package/src/utils/yaml-generator.js +51 -9
- package/standards-registry.json +31 -8
- package/src/commands/sync.js +0 -133
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../core/deferred-item-exit.md
|
|
3
|
+
source_version: 1.0.0
|
|
4
|
+
translation_version: 1.0.0
|
|
5
|
+
last_synced: 2026-08-24
|
|
6
|
+
source_hash: e76ef99c88a5
|
|
7
|
+
status: current
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 延後項目出口標準
|
|
11
|
+
|
|
12
|
+
> **Language**: [English](../../../core/deferred-item-exit.md) | 繁體中文
|
|
13
|
+
|
|
14
|
+
**版本**: 1.0.0
|
|
15
|
+
**最後更新**: 2026-08-24
|
|
16
|
+
**適用**: 任何標準要求產出、且可能記下延後項目的文件
|
|
17
|
+
**範圍**: universal
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 目的
|
|
22
|
+
|
|
23
|
+
有一批標準會要求產出**會產生延後項目**的文件——ADR 的既受風險與「之後再決定」、
|
|
24
|
+
規格的未納入清單、retrospective 的 action items、探索矩陣裡未確認的候選、
|
|
25
|
+
review 的非阻斷建議、AC 報告的缺口。每一條標準都規定了那份文件要怎麼寫好,
|
|
26
|
+
**沒有一條規定那些項目之後去哪**。
|
|
27
|
+
|
|
28
|
+
於是它們哪裡也沒去。項目被記下、文件被核准,**那筆紀錄就是終點**。
|
|
29
|
+
沒有東西會再提起它,因為承載它的只有一份已被視為完成的檔案裡的一段文字。
|
|
30
|
+
|
|
31
|
+
**本標準補上那個缺失的關係:延後項目必須離開文件。**
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## 本標準的寫法,以及為什麼這樣寫
|
|
36
|
+
|
|
37
|
+
**讀下面任何一條要求之前先讀這一段。它拘束它們全部。**
|
|
38
|
+
|
|
39
|
+
UDS 定義**活動**,採用層負責**編排**(DEC-049;見 [MIGRATION-v6](../../../docs/MIGRATION-v6.md) §2)。
|
|
40
|
+
6.0.0 依該決策移除八條機器可讀標準,其中七條正是工作流狀態協定。
|
|
41
|
+
**一份寫成編排協定的標準屬於採用層,不屬於這裡。**
|
|
42
|
+
|
|
43
|
+
本標準受此拘束的分界:
|
|
44
|
+
|
|
45
|
+
| 這裡容許——**what** | 這裡不容許——**how** |
|
|
46
|
+
|---|---|
|
|
47
|
+
| artefact 之間必須存在的關係 | artefact 必須通過的狀態機 |
|
|
48
|
+
| 一項宣稱要算作證據所必須具備的性質 | 必須產出該宣稱的 pipeline 階段 |
|
|
49
|
+
| 一份回報必須保留的區別 | 回報格式、工具或 schema |
|
|
50
|
+
| 延後項目必須有出口 | 哪一個 issue tracker/看板/檔案是那個出口 |
|
|
51
|
+
|
|
52
|
+
**下面每一條要求都寫成「必須存在什麼關係」,絕不寫成「應使用什麼機制維持它」。**
|
|
53
|
+
UDS 本來就有一整類這個形狀的標準——[acceptance-criteria-traceability](acceptance-criteria-traceability.md)
|
|
54
|
+
要求每一條 AC 都能被某個測試到達,而不規定用什麼維持那條可達性。
|
|
55
|
+
本標準是同一個形狀,套用在延後項目上。
|
|
56
|
+
|
|
57
|
+
**直說它的後果**:本標準**不附帶任何閘門**。它只說什麼必須為真。
|
|
58
|
+
有沒有東西在檢查,是採用專案的決定——而 DEX-004 是用來讓那個決定沒辦法被默默做掉的。
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 不變量
|
|
63
|
+
|
|
64
|
+
**一個記錄在文件裡的延後項目,必須在該文件之外有一個可追蹤的出口,而該出口的識別字必須寫在文件裡、緊鄰該項目。**
|
|
65
|
+
|
|
66
|
+
### 什麼算延後項目
|
|
67
|
+
|
|
68
|
+
任何被該文件記錄為**現在不做、不由這份文件做**的項目。措辭變化無窮——
|
|
69
|
+
「待決定」「第一版未納入」「另案處理」「尚未實作」「之後再看」「既受風險」「這個我們先放著」。
|
|
70
|
+
**措辭不是定義**;定義是該項目相對於「這份文件所了結的那份工作」的狀態。見[錨點](#錨點走訪結構不走訪措辭)。
|
|
71
|
+
|
|
72
|
+
### 什麼算出口
|
|
73
|
+
|
|
74
|
+
**刻意不指定。** issue、tracked TODO、manifest 條目、backlog 檔案的一列、
|
|
75
|
+
專案已經在跑的任何工單系統——全都算。判準是**「這個項目離開文件了嗎」**,不是「用了什麼工具」。
|
|
76
|
+
|
|
77
|
+
一個出口要滿足不變量,下列三條必須同時成立:
|
|
78
|
+
|
|
79
|
+
| # | 關係 | 何時失敗 |
|
|
80
|
+
|---|---|---|
|
|
81
|
+
| 1 | 出口存在於這份文件之外 | 該項目唯一的紀錄就是這份文件的文字 |
|
|
82
|
+
| 2 | 出口可由一個寫在文件裡的識別字定址 | 文件寫著「之後再處理」而沒有任何可定址的東西 |
|
|
83
|
+
| 3 | 產出該文件的那次變更落地**之後**,出口仍然解析得到 | 出口被同一次變更關閉、刪除或取代 |
|
|
84
|
+
|
|
85
|
+
第 3 條不是假想。兩個實際觀察到的洩漏,都同時滿足第 1、2 條而仍然遺失項目:
|
|
86
|
+
|
|
87
|
+
- 待辦寫進**會被本次合併關閉的 issue**。文件指向一筆在工作被接受的當下就停止存在的紀錄。
|
|
88
|
+
- 待辦寫進出口的**留言而非本體**,被後續留言推走。出口解析得到;讀出口卻讀不到那個項目。
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## 要求
|
|
93
|
+
|
|
94
|
+
| ID | 要求 | 嚴重度 |
|
|
95
|
+
|---|---|---|
|
|
96
|
+
| **DEX-001** | 文件裡記下的延後項目,在文件之外有可追蹤的出口,且文件在該項目旁載明出口識別字 | error |
|
|
97
|
+
| **DEX-002** | 產出該文件的變更落地之後,出口仍然解析得到,且仍承載該項目 | error |
|
|
98
|
+
| **DEX-003** | 本標準的每一條要求都可表述為 artefact 之間可判定的關係。不能如此表述的要求不得進入本標準 | error |
|
|
99
|
+
| **DEX-004** | 被提出作為本標準證據的檢查,已被觀察到對刻意違規的樣本回報失敗。從未紅過的檢查不是可採信的證據 | error |
|
|
100
|
+
| **DEX-005** | 驗證確立「那個出口**承載這個項目**」——而不只是「識別字解析得到」 | error |
|
|
101
|
+
| **DEX-006** | 「有連結且已驗證內容」與「有連結但內容未驗證」回報為兩個相異狀態。合併為單一通過狀態即不滿足 DEX-005 | error |
|
|
102
|
+
| **DEX-007** | 「這裡有一個延後項目」的錨點,是可由該文件自身既定結構窮舉出來的位置 | error |
|
|
103
|
+
| **DEX-008** | 以措辭清單補充結構錨點時,明示其涵蓋率未知,且其綠燈不被回報為完整 | warning |
|
|
104
|
+
| **DEX-009** | 該判定所用的任何窗口或閾值,載明來歷,或標為未校準 | warning |
|
|
105
|
+
|
|
106
|
+
---
|
|
107
|
+
|
|
108
|
+
## 一條無法被檢查的要求,不是這裡的要求
|
|
109
|
+
|
|
110
|
+
**DEX-003 是對本標準自身內容的約束。** 上面每一條都指名了 artefact 與它們之間的關係,
|
|
111
|
+
使得讀的人——或專案自己建的東西——可以判定它成不成立。
|
|
112
|
+
**一條無法被判定的要求不屬於這裡**,不論它聽起來多正確。
|
|
113
|
+
|
|
114
|
+
理由是量出來的,不是美學:在這一類規則之下第一次大批產出文件,**五項延後項目全部漏掉**。
|
|
115
|
+
規則被理解了,人也稱職。缺的是任何一個能分辨「滿足它的文件」與「不滿足它的文件」的東西。
|
|
116
|
+
|
|
117
|
+
### 一支從未紅過的檢查
|
|
118
|
+
|
|
119
|
+
**DEX-004 講的是什麼算證據,不是要你去建什麼。**
|
|
120
|
+
**一支從未失敗過的檢查,與一支不可能失敗的檢查,輸出一模一樣。**
|
|
121
|
+
在它被觀察到「對一個刻意違規的樣本回報失敗」之前,它不是「規則成立」的證據,
|
|
122
|
+
只是「有東西跑過」的證據。
|
|
123
|
+
|
|
124
|
+
證明檢查非空跑的做法、以及為何必須逐子集而非整體進行,見 [class-level-fix](class-level-fix.md);
|
|
125
|
+
「exit 0」為何不等於「它在工作」,見 [verification-evidence](verification-evidence.md)。
|
|
126
|
+
**兩者都不在此複述。**
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## 連結存在,不等於連結有效
|
|
131
|
+
|
|
132
|
+
一個寫在延後項目旁邊的識別字,製造出「有出口」的外觀。
|
|
133
|
+
那個出口**有沒有承載**這個項目,是另一個問題,而兩個答案不能互換。
|
|
134
|
+
|
|
135
|
+
命名這條規則的實例:文件寫著「與 issue #19 一併決定」,而 #19 裡根本沒有這件事。
|
|
136
|
+
上面第 1、2、3 條全部成立,項目照樣不見了。
|
|
137
|
+
**一道只問識別字在不在的閘門會放行這份文件**,而它印出的綠燈,
|
|
138
|
+
與它印在出口都為真的文件上的綠燈,逐位元相同。
|
|
139
|
+
|
|
140
|
+
### 兩態,不得合併為一
|
|
141
|
+
|
|
142
|
+
確立 DEX-005 需要讀出口的內容,成本明顯高於讀文件。
|
|
143
|
+
**DEX-005 不要求一步到位做到每一處。** 它要求的是「差別必須看得見」:
|
|
144
|
+
|
|
145
|
+
| 狀態 | 意義 |
|
|
146
|
+
|---|---|
|
|
147
|
+
| **有連結且已驗證內容** | 讀過出口,它承載這個項目 |
|
|
148
|
+
| **有連結但內容未驗證** | 識別字在;它有沒有承載這個項目,未知 |
|
|
149
|
+
| **無出口** | 違反 DEX-001 |
|
|
150
|
+
|
|
151
|
+
把前兩態合併成單一通過數,不是通往規則的捷徑——那正是這條規則要防的缺陷,
|
|
152
|
+
被制度化並給了一個編號。**一個被回報成通過的未知,比一個被回報成未知的未知更糟**,
|
|
153
|
+
因為後者還找得到。
|
|
154
|
+
|
|
155
|
+
若一個專案今天只做得起便宜的那一半,那屬於 [verification-evidence](verification-evidence.md) VE-012
|
|
156
|
+
與 [class-level-fix](class-level-fix.md) CLF-008 已經在管的涵蓋缺口:
|
|
157
|
+
**必須帶日期登記,不能只在文字裡揭露一次。** 此處不複述。
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
## 錨點:走訪結構,不走訪措辭
|
|
162
|
+
|
|
163
|
+
判定「這裡有沒有延後項目」時,**走訪文件的結構**。
|
|
164
|
+
結構由「要求產出這份文件的那條標準」所定義,因此可窮舉。
|
|
165
|
+
**措辭不可窮舉,而且沒有任何一張措辭清單能被證明是完整的。**
|
|
166
|
+
|
|
167
|
+
| 文件 | 延後項目出現的結構位置 |
|
|
168
|
+
|---|---|
|
|
169
|
+
| ADR | `Consequences` → **Bad**/**Accepted risk**;`Links`;被考慮而未採用的選項 |
|
|
170
|
+
| 規格 | 未納入/不在本版的段落;open questions;待確認的 assumptions |
|
|
171
|
+
| Retrospective | `Action Items`;`Previous Action Items Review` 中仍為 Open 的列;附理由 Cancelled 的項目 |
|
|
172
|
+
| 功能探索 | 零打勾候選;`dead_code_candidates`;升級為人工觀察的候選 |
|
|
173
|
+
| Code review | 本次未改而被接受的非阻斷留言類別(`⚠️ IMPORTANT`、`💡 SUGGESTION`、`[SUGGESTION]`、`[NIT]`)|
|
|
174
|
+
| AC 覆蓋率報告 | `Gaps` → **Uncovered AC**/**Partial AC**;`Threshold Exceptions`;`Action Items` |
|
|
175
|
+
|
|
176
|
+
### 仍然要用措辭清單時
|
|
177
|
+
|
|
178
|
+
合法——結構走訪抓得到待在自己段落裡的項目,抓不到被丟進一段敘述文字裡的那一個。
|
|
179
|
+
但此時 **DEX-008 隨即適用**:該清單的涵蓋率未知,這件事必須明說,
|
|
180
|
+
而它的綠燈不得被讀成「沒有漏掉任何延後項目」。
|
|
181
|
+
一張含「待決定」與「未納入」的清單,對「這一點我們先放著」這句話**什麼也沒說**。
|
|
182
|
+
|
|
183
|
+
**一道自行列舉範圍的閘門,正確到有人新增第四個成員為止**——
|
|
184
|
+
[class-level-fix](class-level-fix.md) 是這個失敗的通則形式。
|
|
185
|
+
措辭清單在構造上就是那個失敗;它可以用,但不能信。
|
|
186
|
+
|
|
187
|
+
### 閾值必須帶著來歷
|
|
188
|
+
|
|
189
|
+
**DEX-009。** 「識別字必須出現在項目後 3 行內」這類判準,決定了建立其上的一切的召回率。
|
|
190
|
+
若沒有東西記下 3 是怎麼來的,就沒有人能評估把它改成 2 或 5,
|
|
191
|
+
也沒有人分得出它是量出來的還是猜的。
|
|
192
|
+
**寫下那個數字的來歷,或標為未校準。** 兩者都可接受;沉默不行。
|
|
193
|
+
|
|
194
|
+
**一個沒有來歷的閾值,是一個沒有人能檢查的決定。**
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
## 反模式
|
|
199
|
+
|
|
200
|
+
| 反模式 | 為什麼失敗 |
|
|
201
|
+
|---|---|
|
|
202
|
+
| 記下延後項目,然後核准文件 | 文件是唯一的載體,而它現在被視為完成了 |
|
|
203
|
+
| 出口被產出該文件的同一次變更關閉 | 指標在工作進行中解析得到,工作結束後就不再解析得到 |
|
|
204
|
+
| 項目寫進出口的留言,不是出口本體 | 出口解析得到;讀出口卻讀不到那個項目 |
|
|
205
|
+
| 檢查識別字在不在 | 「在」與「對」印出同一個綠 |
|
|
206
|
+
| 已驗證與未驗證的連結共用一個通過狀態 | 把上一列的缺陷變成永久的,還給了它一個編號 |
|
|
207
|
+
| 把措辭清單當成「延後」的定義 | 正確到有人換一種寫法為止,而沒有東西會說 |
|
|
208
|
+
| 沒有記下來歷的窗口大小 | 它決定整個判定的召回率,而沒有人能檢查它 |
|
|
209
|
+
| 從未被觀察到失敗的檢查 | 與一支不可能失敗的檢查無從分辨 |
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## 什麼在執行本標準
|
|
214
|
+
|
|
215
|
+
**UDS 側沒有任何東西在執行,而這件事是被記錄的,不是被暗示的。**
|
|
216
|
+
UDS 陳述關係;有沒有東西去判定它,依上面的[寫法約束](#本標準的寫法以及為什麼這樣寫),是採用專案的決定。
|
|
217
|
+
|
|
218
|
+
本標準做的事,是讓那個決定顯形:DEX-003 保證這裡每一條**能**被判定,
|
|
219
|
+
DEX-004 固定「一次判定要算數需要什麼」,DEX-006/DEX-008 固定「一次不完整的判定容許印出什麼」。
|
|
220
|
+
一個採用本標準而什麼都沒建的專案**並未違反它**——
|
|
221
|
+
但它同樣不能宣稱自己的延後項目有出口,因為它沒有任何可採信的證據說明有。
|
|
222
|
+
|
|
223
|
+
**重啟條件**:若 UDS 開始出貨那些文件本身,而不只是出貨要求產出它們的標準,
|
|
224
|
+
走訪[錨點](#錨點走訪結構不走訪措辭)那張表所列的結構位置就在本 repo 內變得可能,
|
|
225
|
+
屆時誠實的做法是去跑它。
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## 會產出延後項目的標準
|
|
230
|
+
|
|
231
|
+
下列各條都指回這裡;**沒有一條複述規則**,因為同一條規則的六份副本會往六個方向腐壞。
|
|
232
|
+
|
|
233
|
+
- [adr-standards](adr-standards.md) — 既受風險、負面後果、被考慮而未採用的選項
|
|
234
|
+
- [spec-driven-development](spec-driven-development.md) — 未納入項目、open questions、待確認的 assumptions
|
|
235
|
+
- [retrospective-standards](retrospective-standards.md) — action items,以及仍為 Open 的上期項目
|
|
236
|
+
- `feature-discovery-standards` — 未確認候選與 `dead_code_candidates`
|
|
237
|
+
- [code-review-checklist](code-review-checklist.md) — 本次未改而被接受的非阻斷留言
|
|
238
|
+
- [acceptance-criteria-traceability](acceptance-criteria-traceability.md) — 涵蓋缺口、閾值例外、報告的 action items
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
242
|
+
## 與其他標準的關係
|
|
243
|
+
|
|
244
|
+
- [acceptance-criteria-traceability](acceptance-criteria-traceability.md) — 上一層的同一個形狀:
|
|
245
|
+
它要求每條 AC 都能被驗證項到達,而不規定用什麼維持。本標準要求每個延後項目都能被出口到達。
|
|
246
|
+
- [class-level-fix](class-level-fix.md) — 提供 DEX-004 所要求證據的產生程序;
|
|
247
|
+
也是 DEX-008 所揭露之措辭清單失敗的通則形式。
|
|
248
|
+
- [verification-evidence](verification-evidence.md) — VE-012 的帶到期日例外清冊,
|
|
249
|
+
正是 DEX-006 那群「未驗證」項目該被登記進去的地方,而不是揭露一次就放著。
|
|
250
|
+
- [self-review-protocol](self-review-protocol.md) — 自我複查抓得到矛盾、抓不到缺漏;
|
|
251
|
+
沒有出口的延後項目正是缺漏。
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
source: ../../../core/documentation-writing-standards.md
|
|
3
3
|
source_version: 1.2.0
|
|
4
4
|
translation_version: 1.2.0
|
|
5
|
-
last_synced: 2026-
|
|
5
|
+
last_synced: 2026-07-23
|
|
6
|
+
source_hash: 9d2d83e23aef
|
|
6
7
|
status: current
|
|
7
8
|
---
|
|
8
9
|
|
|
@@ -13,6 +14,9 @@ status: current
|
|
|
13
14
|
**版本**: 1.2.0
|
|
14
15
|
**最後更新**: 2026-03-17
|
|
15
16
|
**適用範圍**: 所有軟體專案(新建、重構、遷移、維護)
|
|
17
|
+
**範圍**: partial
|
|
18
|
+
**業界標準**: OpenAPI 3.1、AsyncAPI 2.6、JSON Schema 2020-12、WCAG 2.1(文件無障礙)
|
|
19
|
+
**參考**: [openapis.org](https://www.openapis.org/)
|
|
16
20
|
|
|
17
21
|
---
|
|
18
22
|
|
|
@@ -118,6 +122,38 @@ status: current
|
|
|
118
122
|
|
|
119
123
|
---
|
|
120
124
|
|
|
125
|
+
## 文件語言設定
|
|
126
|
+
|
|
127
|
+
文件語言與 [commit-message-guide.md](commit-message-guide.md) 共用 `output_language` 設定。此統一設定控制專案中所有書面輸出的語言。
|
|
128
|
+
|
|
129
|
+
### 語言選項
|
|
130
|
+
|
|
131
|
+
| 設定值 | Commit 訊息 | 文件 |
|
|
132
|
+
|--------------|----------------|---------------|
|
|
133
|
+
| `english` | 僅英文 | 僅英文 |
|
|
134
|
+
| `traditional-chinese` | 僅繁體中文 | 僅繁體中文 |
|
|
135
|
+
| `bilingual` | 英文 + 中文 | 分層雙語(見下方) |
|
|
136
|
+
|
|
137
|
+
### 文件分層(雙語模式)
|
|
138
|
+
|
|
139
|
+
當 `output_language` 設為 `bilingual` 時,文件遵循三層系統:
|
|
140
|
+
|
|
141
|
+
| 層級 | 文件 | 行為 | 理由 |
|
|
142
|
+
|------|-----------|----------|-----------|
|
|
143
|
+
| **L1 — 必要** | Commit 訊息、CHANGELOG.md、PR 說明 | 自動雙語 | 直接由語言設定控制 |
|
|
144
|
+
| **L2 — 建議** | README.md、CONTRIBUTING.md、ADR/ | AI 建議雙語 | 開發者最常閱讀 |
|
|
145
|
+
| **L3 — 不受影響** | ARCHITECTURE.md、API.md、DATABASE.md、DEPLOYMENT.md、MIGRATION.md | 遵循顯示語言 | 技術規格;雙語會造成過多冗餘 |
|
|
146
|
+
|
|
147
|
+
### 雙語文件格式
|
|
148
|
+
|
|
149
|
+
使用段落層級雙語格式,與雙語 commit 訊息內文一致:
|
|
150
|
+
|
|
151
|
+
- 英文段落在前,接著空一行,然後是中文段落
|
|
152
|
+
- 程式碼區塊和表格只寫一次(不重複)
|
|
153
|
+
- 章節標題使用 `|` 分隔:`## Installation | 安裝`
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
121
157
|
## 核心原則
|
|
122
158
|
|
|
123
159
|
> **文件是程式碼的延伸,應與程式碼同等重視。好的文件能減少溝通成本、加速新人上手、降低維護風險。**
|
|
@@ -502,17 +538,61 @@ version: 2.1.0
|
|
|
502
538
|
last_updated: 2026-01-24
|
|
503
539
|
owner: auth-team
|
|
504
540
|
status: stable
|
|
541
|
+
dependencies:
|
|
542
|
+
- user-service
|
|
543
|
+
- token-service
|
|
505
544
|
---
|
|
506
545
|
```
|
|
507
546
|
|
|
508
547
|
**模式 2:清晰的章節標記**
|
|
509
548
|
|
|
549
|
+
使用 AI 能辨識的一致章節標題:
|
|
550
|
+
|
|
510
551
|
```markdown
|
|
511
552
|
## Overview / 概述
|
|
553
|
+
[此元件/API 的簡短說明]
|
|
554
|
+
|
|
512
555
|
## Quick Start / 快速開始
|
|
556
|
+
[開始使用的最少步驟]
|
|
557
|
+
|
|
513
558
|
## API Reference / API 參考
|
|
559
|
+
[詳細的 API 文件]
|
|
560
|
+
|
|
514
561
|
## Configuration / 配置
|
|
562
|
+
[配置選項與預設值]
|
|
563
|
+
|
|
515
564
|
## Troubleshooting / 故障排除
|
|
565
|
+
[常見問題與解決方法]
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
**模式 3:明確範例**
|
|
569
|
+
|
|
570
|
+
提供帶有清晰情境的完整、可執行範例:
|
|
571
|
+
|
|
572
|
+
```markdown
|
|
573
|
+
### 範例:建立使用者
|
|
574
|
+
|
|
575
|
+
**前置條件**:
|
|
576
|
+
- 有效的 API 金鑰
|
|
577
|
+
- Admin 角色
|
|
578
|
+
|
|
579
|
+
**請求**:
|
|
580
|
+
```bash
|
|
581
|
+
curl -X POST https://api.example.com/v1/users \
|
|
582
|
+
-H "Authorization: Bearer $API_KEY" \
|
|
583
|
+
-H "Content-Type: application/json" \
|
|
584
|
+
-d '{"name": "John", "email": "john@example.com"}'
|
|
585
|
+
```
|
|
586
|
+
|
|
587
|
+
**回應**(201 Created):
|
|
588
|
+
```json
|
|
589
|
+
{
|
|
590
|
+
"id": "usr_123",
|
|
591
|
+
"name": "John",
|
|
592
|
+
"email": "john@example.com",
|
|
593
|
+
"created_at": "2026-01-24T10:30:00Z"
|
|
594
|
+
}
|
|
595
|
+
```
|
|
516
596
|
```
|
|
517
597
|
|
|
518
598
|
### LLM 最佳化寫作規則
|
|
@@ -552,6 +632,8 @@ last_validated: 2026-03-17
|
|
|
552
632
|
|
|
553
633
|
### 為 AI 程式碼生成撰寫
|
|
554
634
|
|
|
635
|
+
當文件將用於生成程式碼時:
|
|
636
|
+
|
|
555
637
|
**包含明確限制**:
|
|
556
638
|
|
|
557
639
|
```markdown
|
|
@@ -564,6 +646,18 @@ last_validated: 2026-03-17
|
|
|
564
646
|
| role | string | 列舉: "admin", "user", "guest" |
|
|
565
647
|
```
|
|
566
648
|
|
|
649
|
+
**明確錯誤情境**:
|
|
650
|
+
|
|
651
|
+
```markdown
|
|
652
|
+
## 錯誤回應
|
|
653
|
+
|
|
654
|
+
| 情境 | HTTP 狀態碼 | 錯誤碼 | 訊息 |
|
|
655
|
+
|----------|-------------|------------|---------|
|
|
656
|
+
| Email 無效 | 400 | INVALID_EMAIL | "Email format is invalid" |
|
|
657
|
+
| 使用者已存在 | 409 | DUPLICATE_USER | "User with this email already exists" |
|
|
658
|
+
| 缺少認證 | 401 | UNAUTHORIZED | "Authentication required" |
|
|
659
|
+
```
|
|
660
|
+
|
|
567
661
|
**明確業務邏輯**:
|
|
568
662
|
|
|
569
663
|
```markdown
|
|
@@ -572,7 +666,34 @@ last_validated: 2026-03-17
|
|
|
572
666
|
1. 基礎折扣 = 0%
|
|
573
667
|
2. 若客戶類型為 "VIP",加 20%
|
|
574
668
|
3. 若訂單總額 > $100,加 5%
|
|
575
|
-
4.
|
|
669
|
+
4. 若優惠券代碼有效,加上優惠券折扣
|
|
670
|
+
5. 最大總折扣 = 50%
|
|
671
|
+
6. 折扣套用於小計(不含稅)
|
|
672
|
+
```
|
|
673
|
+
|
|
674
|
+
### AI 提示詞整合
|
|
675
|
+
|
|
676
|
+
對於定義 AI 輔助工作流程的文件:
|
|
677
|
+
|
|
678
|
+
**內嵌提示詞範本**:
|
|
679
|
+
|
|
680
|
+
```markdown
|
|
681
|
+
## AI 程式碼審查提示詞
|
|
682
|
+
|
|
683
|
+
審查程式碼變更時,使用以下提示詞:
|
|
684
|
+
|
|
685
|
+
```
|
|
686
|
+
Review this code change for:
|
|
687
|
+
1. Security vulnerabilities (OWASP Top 10)
|
|
688
|
+
2. Performance issues
|
|
689
|
+
3. Error handling completeness
|
|
690
|
+
4. Adherence to [project-conventions.md]
|
|
691
|
+
|
|
692
|
+
Provide feedback in this format:
|
|
693
|
+
- 🔴 Critical: [Must fix before merge]
|
|
694
|
+
- 🟡 Important: [Should address]
|
|
695
|
+
- 🟢 Suggestion: [Nice to have]
|
|
696
|
+
```
|
|
576
697
|
```
|
|
577
698
|
|
|
578
699
|
---
|
|
@@ -590,6 +711,46 @@ last_validated: 2026-03-17
|
|
|
590
711
|
| JSON Schema 對齊 | 與 JSON Schema 完全相容 |
|
|
591
712
|
| Webhooks 支援 | 一級 webhook 文件 |
|
|
592
713
|
| `type` 陣列 | 支援 `"type": ["string", "null"]` |
|
|
714
|
+
| `$ref` 與屬性並存 | 可在同一物件中參照並擴充 |
|
|
715
|
+
|
|
716
|
+
**OpenAPI 3.1 Schema 範例**:
|
|
717
|
+
|
|
718
|
+
```yaml
|
|
719
|
+
openapi: 3.1.0
|
|
720
|
+
info:
|
|
721
|
+
title: 使用者 API
|
|
722
|
+
version: 2.1.0
|
|
723
|
+
paths:
|
|
724
|
+
/users:
|
|
725
|
+
post:
|
|
726
|
+
summary: 建立新使用者
|
|
727
|
+
requestBody:
|
|
728
|
+
required: true
|
|
729
|
+
content:
|
|
730
|
+
application/json:
|
|
731
|
+
schema:
|
|
732
|
+
$ref: '#/components/schemas/CreateUserRequest'
|
|
733
|
+
responses:
|
|
734
|
+
'201':
|
|
735
|
+
description: 使用者已建立
|
|
736
|
+
content:
|
|
737
|
+
application/json:
|
|
738
|
+
schema:
|
|
739
|
+
$ref: '#/components/schemas/User'
|
|
740
|
+
components:
|
|
741
|
+
schemas:
|
|
742
|
+
CreateUserRequest:
|
|
743
|
+
type: object
|
|
744
|
+
required: [name, email]
|
|
745
|
+
properties:
|
|
746
|
+
name:
|
|
747
|
+
type: string
|
|
748
|
+
minLength: 1
|
|
749
|
+
maxLength: 100
|
|
750
|
+
email:
|
|
751
|
+
type: string
|
|
752
|
+
format: email
|
|
753
|
+
```
|
|
593
754
|
|
|
594
755
|
### AsyncAPI 2.6 用於事件驅動 API
|
|
595
756
|
|
|
@@ -605,6 +766,21 @@ channels:
|
|
|
605
766
|
publish:
|
|
606
767
|
message:
|
|
607
768
|
$ref: '#/components/messages/OrderCreated'
|
|
769
|
+
components:
|
|
770
|
+
messages:
|
|
771
|
+
OrderCreated:
|
|
772
|
+
payload:
|
|
773
|
+
type: object
|
|
774
|
+
properties:
|
|
775
|
+
orderId:
|
|
776
|
+
type: string
|
|
777
|
+
customerId:
|
|
778
|
+
type: string
|
|
779
|
+
totalAmount:
|
|
780
|
+
type: number
|
|
781
|
+
createdAt:
|
|
782
|
+
type: string
|
|
783
|
+
format: date-time
|
|
608
784
|
```
|
|
609
785
|
|
|
610
786
|
---
|
|
@@ -677,11 +853,60 @@ last_synced: 2026-03-17
|
|
|
677
853
|
|
|
678
854
|
| 項目 | 標準 |
|
|
679
855
|
|------|----------|
|
|
680
|
-
| 同步更新 |
|
|
856
|
+
| 同步更新 | **自動 AI 行為**:完成程式碼變更後,AI 必須檢查哪些文件受影響並列為提醒。詳見下方 [AI 行為:自動文件影響檢查](#自動文件影響檢查) |
|
|
681
857
|
| 版本標記 | 文件頂部標記版本與更新日期 |
|
|
682
858
|
| 審查納入 | 程式碼審查需包含文件變更 |
|
|
683
859
|
| 定期檢視 | 每季檢視文件是否過時 |
|
|
684
860
|
|
|
861
|
+
### 自動文件影響檢查
|
|
862
|
+
|
|
863
|
+
**這是一項自動 AI 行為** — AI 助手必須在完成任何程式碼修改任務後執行此檢查,無需等待使用者詢問。
|
|
864
|
+
|
|
865
|
+
**工作流程:**
|
|
866
|
+
|
|
867
|
+
1. 完成程式碼變更後,識別哪些檔案被修改
|
|
868
|
+
2. 對每個修改的檔案,檢查是否有文件引用它(README、CLI 文件、API 文件、規格、skills、翻譯)
|
|
869
|
+
3. 若發現受影響的文件,附加提醒區塊並提供**建議指令**:
|
|
870
|
+
|
|
871
|
+
```
|
|
872
|
+
---
|
|
873
|
+
📋 **Documentation Impact**
|
|
874
|
+
The following documents may need updating:
|
|
875
|
+
- `README.md` — describes changed CLI option `--xxx`
|
|
876
|
+
→ `/docs readme`
|
|
877
|
+
- `docs/CLI-INIT-OPTIONS.md` — references modified function `promptXxx()`
|
|
878
|
+
→ manual update or `/docs generate`
|
|
879
|
+
- `locales/zh-TW/docs/CLI-INIT-OPTIONS.md` — translation of modified source
|
|
880
|
+
→ `/docs translate docs/CLI-INIT-OPTIONS.md --lang zh-TW`
|
|
881
|
+
|
|
882
|
+
Or run `/docs impact` for a full analysis.
|
|
883
|
+
---
|
|
884
|
+
```
|
|
885
|
+
|
|
886
|
+
4. 若無文件受影響,靜默略過
|
|
887
|
+
5. **不自動修改文件** — 僅列出提醒並等待使用者確認
|
|
888
|
+
|
|
889
|
+
**指令建議對照:**
|
|
890
|
+
|
|
891
|
+
| 受影響文件 | 建議指令 |
|
|
892
|
+
|-------------------|-------------------|
|
|
893
|
+
| README.md | `/docs readme` |
|
|
894
|
+
| API 文件 | `/docs api` |
|
|
895
|
+
| 產生的文件(cheatsheet、參考文件) | `/docs generate` |
|
|
896
|
+
| 翻譯檔案(`locales/`) | `/docs translate <source-file> --lang <lang>` |
|
|
897
|
+
| 規格檔案、skill 檔案、其他文件 | 手動更新(建議具體檔案路徑) |
|
|
898
|
+
| 多個文件受影響 | `/docs impact` 取得完整概覽 |
|
|
899
|
+
|
|
900
|
+
**檢查範圍:**
|
|
901
|
+
|
|
902
|
+
| 文件類型 | 對照檢查 |
|
|
903
|
+
|--------------|---------------|
|
|
904
|
+
| CLI 文件(`docs/`) | 修改的函式、CLI 選項、指令 |
|
|
905
|
+
| 規格檔案(`docs/specs/`) | 修改的介面、schema、工作流程 |
|
|
906
|
+
| Skills(`skills/`) | 修改的行為、標準參考 |
|
|
907
|
+
| 翻譯(`locales/`) | 任何有翻譯的已修改原始檔案 |
|
|
908
|
+
| README、CHANGELOG | 修改的公開 API、功能、配置 |
|
|
909
|
+
|
|
685
910
|
### 審查清單
|
|
686
911
|
|
|
687
912
|
提交文件前:
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
source: ../../../core/full-coverage-testing.md
|
|
3
3
|
source_version: 1.1.0
|
|
4
4
|
translation_version: 1.1.0
|
|
5
|
-
last_synced: 2026-
|
|
6
|
-
source_hash:
|
|
5
|
+
last_synced: 2026-07-23
|
|
6
|
+
source_hash: 8ca921c68533
|
|
7
7
|
status: current
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -196,6 +196,18 @@ CI 會回報 AC 覆蓋率。若超過 20% 的 AC 沒有 `@ac` 標籤的測試,
|
|
|
196
196
|
|
|
197
197
|
對步驟 1 的**每條** legacy 錯誤分支,驗證新系統有對應 handler。無對映者標 `not_implemented`(XSPEC-199)並 **block**。產出涵蓋完整推導清單的**「遺漏錯誤分支」gap 報告**——而非僅抽樣通過。
|
|
198
198
|
|
|
199
|
+
```markdown
|
|
200
|
+
## Error-Path Gap Report — <module>
|
|
201
|
+
|
|
202
|
+
| Legacy branch (error type / code) | New-system handler | Status |
|
|
203
|
+
|-----------------------------------|--------------------|--------|
|
|
204
|
+
| PaymentDeclinedException → 402 | PaymentService.handleDecline | MAPPED |
|
|
205
|
+
| GatewayTimeout → retry+fallback | (none found) | not_implemented — BLOCK |
|
|
206
|
+
| ValidationError → 422 + field list | InputValidator | MAPPED |
|
|
207
|
+
|
|
208
|
+
**Branches: N total · M mapped · K not_implemented (block if K>0)**
|
|
209
|
+
```
|
|
210
|
+
|
|
199
211
|
### 步驟 3 — 降級/Fallback 對等(R3)
|
|
200
212
|
|
|
201
213
|
legacy 降級模式(外部服務失敗時的 fallback、重試、部分結果)因只在失敗時才執行而容易被漏。驗證新系統保留對應降級行為,避免「正常路徑一致、失敗時行為迥異」:
|
|
@@ -241,6 +253,7 @@ legacy 降級模式(外部服務失敗時的 fallback、重試、部分結果
|
|
|
241
253
|
- `unit-testing.ai.yaml` — 單元測試範圍與組織
|
|
242
254
|
- `integration-testing.ai.yaml` — 整合測試模式
|
|
243
255
|
- `deployment-standards.ai.yaml` — 部署閘門需求
|
|
256
|
+
- `flaky-test-management.md` — 間歇性失敗處理:會 flaky 的測試**不算**通過的測試。在覆蓋率數字被計入閘門之前,間歇性失敗必須依該標準被隔離(quarantine)/設定重試預算(retry-budget)/根因排除——否則「全覆蓋」會掩蓋非決定性的缺口。
|
|
244
257
|
- `behavior-snapshot.md` — 錯誤回應差分 oracle(遷移錯誤路徑完整性,軸⑨)
|
|
245
258
|
- `migration-assistant` skill — legacy 例外/錯誤碼 derive + 降級對等(XSPEC-288)
|
|
246
259
|
- XSPEC-178 — 完整規格與實作階段
|