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,190 @@
|
|
|
1
|
+
---
|
|
2
|
+
source: ../../../core/turn-completion-integrity.md
|
|
3
|
+
source_version: 1.3.0
|
|
4
|
+
translation_version: 1.3.0
|
|
5
|
+
last_synced: 2026-09-08
|
|
6
|
+
source_hash: c396baa28423
|
|
7
|
+
status: current
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# 回合收尾完整性
|
|
11
|
+
|
|
12
|
+
> **Language**: [English](../../../core/turn-completion-integrity.md) | 繁體中文
|
|
13
|
+
|
|
14
|
+
**版本**: 1.3.0
|
|
15
|
+
**最後更新**: 2026-09-08
|
|
16
|
+
**適用範圍**: 任何由 agent 結束回合、把控制權交還給人的執行環境
|
|
17
|
+
**Scope**: universal
|
|
18
|
+
**產業標準**: 不宣稱任何來源——由實際觀察到的失敗歸納,見「證據」
|
|
19
|
+
|
|
20
|
+
---
|
|
21
|
+
|
|
22
|
+
## 目的
|
|
23
|
+
|
|
24
|
+
agent 寫下「我接著做 X」,然後結束回合,而 X 沒有做。
|
|
25
|
+
|
|
26
|
+
人讀到的是一句描述著從未發生的工作的話。沒有任何錯誤、沒有任何檢查變紅,
|
|
27
|
+
逐字稿讀起來像有進展。下一個回合從一個「人以為比實際更前面」的狀態開始。
|
|
28
|
+
|
|
29
|
+
這不是知識上的失敗——agent 說對了下一步。這是**收尾**的失敗:
|
|
30
|
+
回合結束在工作本該開始的那一刻。
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## 規則
|
|
35
|
+
|
|
36
|
+
**R1.** 若 agent 最後一則訊息做出了第一人稱的下一步宣告,
|
|
37
|
+
回合**不得**結束,除非那件事做了,或說出它卡在什麼。
|
|
38
|
+
|
|
39
|
+
**R2.** 「卡在什麼」的意思是逐項指名每一件事在等誰、等什麼。
|
|
40
|
+
「主要的都做完了」不是卡點陳述;
|
|
41
|
+
「部署等你的金鑰,文件不卡任何人而我現在就做」才是。
|
|
42
|
+
|
|
43
|
+
**R3.** 只寫在 agent 指令裡的規則不是執法。R1 必須**在回合結束的那一刻**、
|
|
44
|
+
由**不是 agent 的東西**來判斷。
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## R3 為什麼存在
|
|
49
|
+
|
|
50
|
+
這條規則的指令形式曾寫進某專案的 agent 指令,
|
|
51
|
+
而**在讀到它的同一個 session 內就被違反**。
|
|
52
|
+
接著它被寫成已發布的標準、標為 optional、沒有任何檢查器在讀,
|
|
53
|
+
七天後同樣的違反再來一次。
|
|
54
|
+
|
|
55
|
+
指令是一種輸入。失敗發生在一個決策點——「我正要結束這個回合」——
|
|
56
|
+
而一個在那一刻不會被讀到的輸入,就是沒有在生效。
|
|
57
|
+
一般形式是:**一項有文件而在其決策點上沒有執法的要求,是建議;
|
|
58
|
+
它的遵循度不是很高,是沒有被量過。**
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## 這個檢查**不得**做的事
|
|
63
|
+
|
|
64
|
+
**R4. 不得因為「永遠還有待辦」而擋。** repo 永遠有未關的 TODO,
|
|
65
|
+
待辦清單永遠有項目。一道每個回合都為真的閘門會被關掉,然後它什麼都不保護。
|
|
66
|
+
這個檢查**只**在 agent 於那則訊息裡做出的宣告上觸發。
|
|
67
|
+
|
|
68
|
+
**R5. 一律 fail open。** 任何錯誤——讀不到逐字稿、欄位缺、JSON 壞掉、
|
|
69
|
+
結構不符——都**必須**讓回合結束。一支會把 session 困住的 hook 比沒有 hook 糟,
|
|
70
|
+
因為人唯一的救援手段是把它關掉,而他會永久關掉它。
|
|
71
|
+
|
|
72
|
+
**R6. 阻擋要有上界。** 檢查**必須**同時具備
|
|
73
|
+
(a) 兩次阻擋之間的冷卻期,與
|
|
74
|
+
(b) **滾動時窗**內的阻擋次數上限。
|
|
75
|
+
|
|
76
|
+
以 session 計且永不重置的上限不是安全閥——它是一個有延遲的關閉開關,
|
|
77
|
+
而且會在「這條規則最重要的那種長 session」裡安靜地自我解除。
|
|
78
|
+
|
|
79
|
+
---
|
|
80
|
+
|
|
81
|
+
## 使用者可以結束回合,而 agent 的用字說不出這件事
|
|
82
|
+
|
|
83
|
+
**R9.** 檢查**必須**豁免由人要求結束的回合,
|
|
84
|
+
而且**必須**從人自己最近一則訊息判斷,不是從 agent 的訊息判斷。
|
|
85
|
+
|
|
86
|
+
這條規則的存在是因為它的缺席被量到過一次——就在本標準上線後的第一次真實觸發。
|
|
87
|
+
人寫的是「先暫停,我要回家了」;agent 照做並列出回來要接的事;
|
|
88
|
+
檢查把它讀成未兌現的承諾並擋下。
|
|
89
|
+
|
|
90
|
+
偵測器對樣式的判斷沒有錯。**由指令結束的回合,與由未兌現承諾結束的回合,
|
|
91
|
+
在 agent 的用字上一模一樣**,因為兩種情況下 agent 都在指名自己現在不做的工作。
|
|
92
|
+
那則訊息裡沒有任何東西分得出來,所以只讀那則訊息的檢查也分不出來。
|
|
93
|
+
|
|
94
|
+
**R10.** 叫停樣式**必須**寫窄,而且它的語料**必須**包含
|
|
95
|
+
「只是含有停止字眼的工作指令」。誤豁免不是漏擋一次,
|
|
96
|
+
而是把檢查在該 session 的剩餘時間全部靜音。
|
|
97
|
+
實作期間該樣式曾比對到「先停用那份硬編碼清單,改成走訪註冊表」
|
|
98
|
+
——一句要求做事的指令,被讀成叫停。
|
|
99
|
+
|
|
100
|
+
**R11.** 檢查自己的攔阻訊息會以人的回合回到逐字稿。
|
|
101
|
+
它**必須**認得出自己的輸出,並在尋找人的最後一則訊息時略過它。
|
|
102
|
+
|
|
103
|
+
沒有這一條,R9 只會生效一次。攔阻訊息會在下一次執行成為「人最近一則訊息」,
|
|
104
|
+
真正那句叫停被蓋在它後面,豁免就消失——而且是靜默地、
|
|
105
|
+
只在它被建立的那種情境裡消失。
|
|
106
|
+
|
|
107
|
+
這與「偵測器比對到解釋它的散文」同一族,再往前一步:**檢查讀到自己的輸出。**
|
|
108
|
+
在攔阻訊息裡帶一個固定標記字串,略過任何含有它的人類回合。
|
|
109
|
+
|
|
110
|
+
**R12.** 檢查**必須**認得出 R2 所定義的那個結束方式。
|
|
111
|
+
一個執行 R2 卻看不見逐項卡點清單的檢查,會擋下標準自己要求的唯一停法
|
|
112
|
+
——它在懲罰正確行為,而那比漏抓一次違規更快被拆掉。
|
|
113
|
+
|
|
114
|
+
辨識需要三個條件,實測拿掉任何一個都會壞:
|
|
115
|
+
|
|
116
|
+
| 條件 | 為什麼 |
|
|
117
|
+
|---|---|
|
|
118
|
+
| 兩項以上的清單 | 只有一項帶歸屬的是句子,不是逐項列出 |
|
|
119
|
+
| 歸屬詞出現在訊息任何位置,不要求每項都有 | 真實寫法把它放在前言——「剩下的每一項都卡在你手上,逐項列:」——而要求每項都有,第一次拿真實訊息一比就漏 |
|
|
120
|
+
| 沒有含糊的完成語 | 「其餘都做完了」正是 R2 拒絕的摘要;靠這種句子把剩下的帶過的清單,是穿著清單外衣的摘要 |
|
|
121
|
+
|
|
122
|
+
🔴 **歸屬詞的搜尋必須排除檢查自己的結構。**
|
|
123
|
+
「要你決定什麼」這個標題本身含有「要你」,於是一份「已經做完了什麼」的清單,
|
|
124
|
+
靠著它上方的標題就滿足了歸屬條件。**偵測器讀到了自己的結構**——與 R11 同一個失敗,低一層。
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
## 語言涵蓋是正確性問題,不是翻譯工作
|
|
129
|
+
|
|
130
|
+
這個檢查讀的是 agent 寫的散文,所以**它的偵測器與語言綁定**。
|
|
131
|
+
一個只帶著某一種語言樣式的偵測器,出貨給以另一種語言工作的採用者,
|
|
132
|
+
會得到一支裝好了、每回合都執行、exit 0、而**結構上永遠不會觸發**的 hook。
|
|
133
|
+
每一個可觀察的訊號,都與「agent 表現良好」一模一樣。
|
|
134
|
+
|
|
135
|
+
**R7.** 每一個支援的語言**必須**以 locale 包出貨,
|
|
136
|
+
各自帶著**自己的語料**(必須擋的案例與必須放行的案例),
|
|
137
|
+
而該包的自測**必須**在 CI 裡跑。語料不過的 locale 包不出貨。
|
|
138
|
+
|
|
139
|
+
**R8.** 語言沒有對應包的採用者**必須**被告知這個檢查對他們是失效的。
|
|
140
|
+
在這裡沉默,等於把本標準要防的失敗在上一層重演一次。
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## 偵測器比對什麼
|
|
145
|
+
|
|
146
|
+
形狀是:**第一人稱未來標記,接一個動作動詞,在同一個句子裡**,再減掉三個排除項。
|
|
147
|
+
|
|
148
|
+
| 元素 | 作用 | 缺了會怎樣 |
|
|
149
|
+
|---|---|---|
|
|
150
|
+
| 第一人稱+未來標記 | 把宣告與描述分開 | 會比對到被引述回來的使用者原話 |
|
|
151
|
+
| 動作動詞 | 把「做」與「講」分開 | 「我來解釋為什麼」會算成工作 |
|
|
152
|
+
| 限定同一句 | 讓兩半保持相關 | 一個否定子句與後面一個真承諾會併成一個不匹配 |
|
|
153
|
+
| 排除報告動詞 | 「我會說/提/記」不是工作 | 檢查會在自己的摘要上觸發 |
|
|
154
|
+
| 排除否定 | 「我不會改那個」是決定,不是承諾 | 一句拒絕會被讀成承諾 |
|
|
155
|
+
| 排除引用與表格 | 樣式的**例子**不是樣式的**實例** | 檢查會在自己的文件上觸發 |
|
|
156
|
+
|
|
157
|
+
上表每一個排除項,都是因為它的缺席在測試中造成過一次誤擋才加上去的。
|
|
158
|
+
少做其中任何一項的實作,會重現那次誤擋。
|
|
159
|
+
|
|
160
|
+
---
|
|
161
|
+
|
|
162
|
+
## 證據
|
|
163
|
+
|
|
164
|
+
單一專案的觀察,2026-08 至 2026-09:
|
|
165
|
+
|
|
166
|
+
| 觀察 | 次數 |
|
|
167
|
+
|---|---|
|
|
168
|
+
| 使用者就「說了下一步卻沒做」提出同一個抱怨 | 5 |
|
|
169
|
+
| 指令形式已存在、而在同一個 session 內被違反 | ≥1 |
|
|
170
|
+
| 偵測器版本被自己原始碼或例子中的樣式打敗 | 5 |
|
|
171
|
+
| 上線前被語料抓到的偵測器誤擋 | 3 |
|
|
172
|
+
|
|
173
|
+
最後一列就是 R7 的論據。五個偵測器缺陷裡有三個**只因為語料存在**才被抓到;
|
|
174
|
+
出貨出去的那兩個,正是沒有任何案例涵蓋的那兩個。
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## 檢查清單
|
|
179
|
+
|
|
180
|
+
- [ ] 檢查在回合結束時執行,不是寫成給 agent 的指令
|
|
181
|
+
- [ ] 每一條失敗路徑都不阻擋、直接放行
|
|
182
|
+
- [ ] 冷卻期與滾動時窗上限兩者都在
|
|
183
|
+
- [ ] 每個出貨語言都有語料,而語料在 CI 裡跑
|
|
184
|
+
- [ ] 語言不支援的採用者被告知檢查失效
|
|
185
|
+
- [ ] 檢查不讀取 repo 狀態(未關的 TODO、待辦清單)
|
|
186
|
+
- [ ] 由人要求結束的回合被豁免,且由人的訊息判斷
|
|
187
|
+
- [ ] 叫停語料包含「含有停止字眼的工作指令」
|
|
188
|
+
- [ ] 檢查認得出自己的攔阻訊息,不把它讀成人說的話
|
|
189
|
+
- [ ] 檢查認得出 R2 定義的逐項卡點結束,而且不擋它
|
|
190
|
+
- [ ] 歸屬詞的搜尋排除檢查自己的標題與結構
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# UDS 速查表
|
|
2
2
|
|
|
3
|
-
> Quick reference for all UDS features | Last updated: 2026-
|
|
3
|
+
> Quick reference for all UDS features | Last updated: 2026-09-14
|
|
4
4
|
|
|
5
5
|
**Language**: [English](../../../docs/user/CHEATSHEET.md) | 繁體中文 | [简体中文](../../zh-CN/docs/CHEATSHEET.md)
|
|
6
6
|
|
|
@@ -12,13 +12,27 @@
|
|
|
12
12
|
|---------|-------------|
|
|
13
13
|
| `uds list` | List available standards |
|
|
14
14
|
| `uds init` | Initialize standards in current project |
|
|
15
|
-
| `uds
|
|
16
|
-
| `uds
|
|
15
|
+
| `uds config` | Manage UDS configuration and project settings |
|
|
16
|
+
| `uds hitl` | Human-in-the-Loop controls |
|
|
17
|
+
| `uds configure` | Alias for "uds config" — Modify project settings |
|
|
18
|
+
| `uds check` | Check file integrity and adoption status (quick validation). For deep health diagnosis, use "uds audit" |
|
|
19
|
+
| `uds lint` | Check spec dependency validity and size against installed specs (specs/*.md) |
|
|
20
|
+
| `uds simulate` | Simulate a standard check with input (Predictive Validation) |
|
|
21
|
+
| `uds fix` | Auto-fix standard violations (Self-Healing) |
|
|
17
22
|
| `uds update` | Update standards to latest version |
|
|
18
23
|
| `uds skills` | List installed Claude Code skills |
|
|
19
|
-
| `uds
|
|
20
|
-
| `uds
|
|
21
|
-
| `uds
|
|
24
|
+
| `uds audit` | Deep health diagnosis with pattern detection and feedback (strategic). For quick file check, use "uds check" |
|
|
25
|
+
| `uds deps` | Compare the versions you test against the versions your declared ranges resolve to |
|
|
26
|
+
| `uds uninstall` | Remove UDS standards, integrations, skills, and hooks |
|
|
27
|
+
| `uds compile` | Compile enforcement standards into hook configurations |
|
|
28
|
+
| `uds report` | Analyze hook telemetry and show adoption report |
|
|
29
|
+
| `uds release` | Manage release process (promote, deploy, manifest, verify) |
|
|
30
|
+
| `uds spec` | Manage lightweight micro-specs for vibe coding. For full spec lifecycle with review, use "/sdd" |
|
|
31
|
+
| `uds quickstart` | Interactive workflow guide — find the right commands quickly |
|
|
32
|
+
| `uds agent` | Manage UDS agents for AI tools |
|
|
33
|
+
| `uds ai-context` | Manage .ai-context.yaml configuration for AI-friendly architecture |
|
|
34
|
+
| `uds mcp` | MCP server commands for AI tool integration |
|
|
35
|
+
| `uds run` | Run a project command by intent (test/lint/build/security) via uds.project.yaml |
|
|
22
36
|
|
|
23
37
|
## 💬 斜線命令
|
|
24
38
|
|
|
@@ -204,6 +218,7 @@
|
|
|
204
218
|
| `data-migration-testing` | Data Migration Testing |
|
|
205
219
|
| `data-pipeline` | Data Pipeline Standards |
|
|
206
220
|
| `database-standards` | This standard defines guidelines for database desi |
|
|
221
|
+
| `deferred-item-exit` | Several standards require documents that **produce |
|
|
207
222
|
| `deployment-standards` | This standard defines guidelines for safely deploy |
|
|
208
223
|
| `deprecation-standards` | Deprecation & Sunset Standards |
|
|
209
224
|
| `design-document-standards` | Design Document Standards |
|
|
@@ -302,6 +317,7 @@
|
|
|
302
317
|
| `timeout-standards` | Timeout Standards |
|
|
303
318
|
| `token-budget` | Token Budget Zone Standard |
|
|
304
319
|
| `translation-lifecycle-standards` | Translation lifecycle standards: MISSING vs OUTDAT |
|
|
320
|
+
| `turn-completion-integrity` | An agent writes *"I'll do X next"* and then ends t |
|
|
305
321
|
| `user-journey-testing` | User Journey Testing Standard |
|
|
306
322
|
| `user-story-mapping` | User Story Mapping Standards |
|
|
307
323
|
| `verification-evidence` | Establish an "Iron Law" that no task can be claime |
|
|
@@ -323,6 +339,7 @@
|
|
|
323
339
|
| `check-ai-agent-sync.ps1` | Check Ai Agent Sync |
|
|
324
340
|
| `check-ai-agent-sync.sh` | AI Agent Sync Checker |
|
|
325
341
|
| `check-ai-yaml-parses.mjs` | Every shipped .ai.yaml must parse, and must parse |
|
|
342
|
+
| `check-bump-sync-roundtrip.mjs` | check-bump-sync-roundtrip — 測「跑完 bump 之後 check 必須通 |
|
|
326
343
|
| `check-cli-docs-sync.ps1` | Check Cli Docs Sync |
|
|
327
344
|
| `check-cli-docs-sync.sh` | CLI-to-Documentation Sync Checker |
|
|
328
345
|
| `check-commands-sync.ps1` | Check Commands Sync |
|
|
@@ -332,6 +349,7 @@
|
|
|
332
349
|
| `check-docs-integrity.sh` | Documentation Integrity Checker |
|
|
333
350
|
| `check-docs-sync.ps1` | Check Docs Sync |
|
|
334
351
|
| `check-docs-sync.sh` | Documentation Sync Checker |
|
|
352
|
+
| `check-error-exit.mjs` | 🔴 沒填就是沒設定,而沒設定會 exit 2, |
|
|
335
353
|
| `check-external-references.mjs` | External Reference Checker (SPEC-SELFDIAG-001 REQ- |
|
|
336
354
|
| `check-orphan-specs.ps1` | Check Orphan Specs |
|
|
337
355
|
| `check-orphan-specs.sh` | Orphan Spec Detection Script |
|
|
@@ -345,6 +363,7 @@
|
|
|
345
363
|
| `check-standards-reference-sync.sh` | check-standards-reference-sync.sh |
|
|
346
364
|
| `check-standards-sync.ps1` | Check Standards Sync |
|
|
347
365
|
| `check-standards-sync.sh` | Standards Consistency Checker |
|
|
366
|
+
| `check-translation-hash-ratchet.sh` | XSPEC-392 R6 棘輪:新的翻譯必須帶 source_hash,既有的欠債冷凍為基線。 |
|
|
348
367
|
| `check-translation-sync.ps1` | Check Translation Sync |
|
|
349
368
|
| `check-translation-sync.sh` | Translation Sync Checker |
|
|
350
369
|
| `check-usage-docs-sync.ps1` | Check if usage documentation needs to be regenerat |
|
|
@@ -356,7 +375,9 @@
|
|
|
356
375
|
| `convert-md-to-yaml.mjs` | Markdown to AI-YAML Conversion Script |
|
|
357
376
|
| `fix-manifest-paths.ps1` | Fix Manifest Paths |
|
|
358
377
|
| `fix-manifest-paths.sh` | Manifest Path Fixer |
|
|
378
|
+
| `generate-adoption-skills.mjs` | Self-Adoption Skill Copy Generator and Drift Gate |
|
|
359
379
|
| `generate-docs.mjs` | Look up the release date for `version` from CHANGE |
|
|
380
|
+
| `generate-llms-txt.mjs` | llms.txt Generator and Drift Gate — XSPEC-385 |
|
|
360
381
|
| `generate-locale-coverage.mjs` | Locale Coverage Generator |
|
|
361
382
|
| `generate-version-manifest.mjs` | Generate Version Manifest (SPEC-SELFDIAG-001 REQ-9 |
|
|
362
383
|
| `install-hooks.mjs` | Install Hooks |
|
|
@@ -45,7 +45,7 @@ status: current
|
|
|
45
45
|
◯ Windsurf (.windsurfrules)
|
|
46
46
|
◯ Cline (.clinerules)
|
|
47
47
|
◯ GitHub Copilot (.github/copilot-instructions.md)
|
|
48
|
-
◯ Google Antigravity (
|
|
48
|
+
◯ Google Antigravity (.agents/AGENTS.md) - Gemini Agent
|
|
49
49
|
── AGENTS.md Tools ──
|
|
50
50
|
◯ OpenAI Codex (AGENTS.md) - OpenAI Codex CLI
|
|
51
51
|
◯ OpenCode (AGENTS.md) - Open-source AI coding agent
|
|
@@ -68,7 +68,7 @@ status: current
|
|
|
68
68
|
| **Windsurf** | `.windsurfrules` | Plaintext | Windsurf IDE 規則檔 |
|
|
69
69
|
| **Cline** | `.clinerules` | Plaintext | Cline 擴展規則檔 |
|
|
70
70
|
| **GitHub Copilot** | `.github/copilot-instructions.md` | Markdown | Copilot 自訂指示 |
|
|
71
|
-
| **Google Antigravity** |
|
|
71
|
+
| **Google Antigravity** | `.agents/AGENTS.md` | Markdown | Gemini Agent 系統指令 |
|
|
72
72
|
| **OpenAI Codex** | `AGENTS.md` | Markdown | OpenAI Codex CLI |
|
|
73
73
|
| **OpenCode** | `AGENTS.md` | Markdown | 開源 AI 編碼 Agent(與 Codex 共用檔案) |
|
|
74
74
|
| **Gemini CLI** | `GEMINI.md` | Markdown | Google Gemini CLI |
|
|
@@ -626,21 +626,26 @@ uds init
|
|
|
626
626
|
```
|
|
627
627
|
? Select content level:
|
|
628
628
|
❯ Standard (推薦) - Summary + links to full docs
|
|
629
|
-
Full Embed - All rules in one file (larger)
|
|
630
629
|
Minimal - Core rules only (smallest)
|
|
631
630
|
```
|
|
632
631
|
|
|
633
632
|
### 說明
|
|
634
633
|
|
|
635
|
-
決定 AI
|
|
634
|
+
決定 AI 工具整合檔案中嵌入多少標準內容。
|
|
635
|
+
|
|
636
|
+
> **第三個模式 `full`(Full Embed)已於 UDS 6.9.0 移除。**
|
|
637
|
+
> 它從來沒有產生過與 `index` 不同的檔案——產生器只在 `minimal` 上分支,
|
|
638
|
+
> 因此兩者在實測的 24 組(工具 × 語言)組合中輸出逐位元相同。
|
|
639
|
+
> `--content-mode full` 仍然接受,並解析為 `index`;manifest 中記錄的 `full`
|
|
640
|
+
> 會在下一次執行時改寫為 `index`。**任何專案拿到的檔案都不會改變**,
|
|
641
|
+
> 因為兩個模式本來就產生相同的位元組。詳見 XSPEC-357 R7。
|
|
636
642
|
|
|
637
643
|
### 選項
|
|
638
644
|
|
|
639
|
-
| 模式 |
|
|
640
|
-
|
|
641
|
-
| **Standard
|
|
642
|
-
| **
|
|
643
|
-
| **Minimal** | 最小 | 低 | 舊專案遷移 |
|
|
645
|
+
| 模式 | 內容 | 適用情境 |
|
|
646
|
+
|------|------|----------|
|
|
647
|
+
| **Standard**(`index`,推薦) | 標準索引 + MUST/SHOULD 任務對照表 | 大多數專案 |
|
|
648
|
+
| **Minimal**(`minimal`) | 僅檔案參考 | 由 Skills 提供任務指引的專案 |
|
|
644
649
|
|
|
645
650
|
### 詳細說明
|
|
646
651
|
|
|
@@ -714,47 +719,17 @@ uds init
|
|
|
714
719
|
- ✅ 希望 AI 遵守規範但不想檔案太大
|
|
715
720
|
- ✅ AI 工具會讀取專案檔案
|
|
716
721
|
|
|
717
|
-
#### Full Embed
|
|
718
|
-
|
|
719
|
-
**生成內容**:完整嵌入所有規則
|
|
720
|
-
|
|
721
|
-
```markdown
|
|
722
|
-
## Anti-Hallucination Protocol
|
|
723
|
-
Reference: .standards/anti-hallucination.md
|
|
724
|
-
|
|
725
|
-
### Core Principle
|
|
726
|
-
You are an AI assistant that prioritizes accuracy over confidence...
|
|
727
|
-
|
|
728
|
-
### Evidence-Based Analysis
|
|
729
|
-
1. **File Reading Requirement**
|
|
730
|
-
- You MUST read files before analyzing them
|
|
731
|
-
- Do not guess APIs, class names, or library versions
|
|
732
|
-
...
|
|
733
|
-
|
|
734
|
-
---
|
|
735
|
-
|
|
736
|
-
## Commit Message Standards
|
|
737
|
-
Reference: .standards/commit-message.ai.yaml
|
|
722
|
+
#### Full Embed 模式(已移除)
|
|
738
723
|
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
### Commit Types
|
|
743
|
-
| Type | Description | Example |
|
|
744
|
-
| feat | New feature | feat(auth): add OAuth2 login |
|
|
745
|
-
...
|
|
746
|
-
```
|
|
724
|
+
這一節原本描述一個把完整規則內文嵌進整合檔案的模式,宣稱能「**保證**」AI
|
|
725
|
+
看到所有標準,並產生「比 Index 大 3-5 倍」的檔案。
|
|
747
726
|
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
-
|
|
751
|
-
- 檔案大小可能是 Index 的 3-5 倍
|
|
727
|
+
**這些從來都沒有被實作。** `full` 與 `index` 走同一條程式路徑、寫出相同的位元組。
|
|
728
|
+
它也不可能照描述運作:`.standards/` 約 248k token,遠超過任何整合檔案裝得下的量。
|
|
729
|
+
該模式已於 UDS 6.9.0 移除(XSPEC-357 R7),現在解析為 `index`。
|
|
752
730
|
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
- ✅ AI 可能不讀取外部檔案
|
|
756
|
-
- ✅ 不能容許 AI 遺漏任何規則
|
|
757
|
-
- ✅ 新團隊導入,確保完全了解規範
|
|
731
|
+
若你當初是為了合規理由選擇它,你拿到的一直都是 `index` 的輸出,
|
|
732
|
+
因此產生的檔案不會有任何改變。
|
|
758
733
|
|
|
759
734
|
### 決策流程
|
|
760
735
|
|
|
@@ -763,19 +738,8 @@ Reference: .standards/commit-message.ai.yaml
|
|
|
763
738
|
│
|
|
764
739
|
▼
|
|
765
740
|
┌─────────────────────────────┐
|
|
766
|
-
│
|
|
767
|
-
|
|
768
|
-
│
|
|
769
|
-
┌───┴───┐
|
|
770
|
-
│ │
|
|
771
|
-
是 否
|
|
772
|
-
│ │
|
|
773
|
-
▼ ▼
|
|
774
|
-
Index Full
|
|
775
|
-
│
|
|
776
|
-
▼
|
|
777
|
-
┌─────────────────────────────┐
|
|
778
|
-
│ 是否有嚴格合規要求? │
|
|
741
|
+
│ 是否已安裝 Skills 並由它 │
|
|
742
|
+
│ 提供任務指引? │
|
|
779
743
|
└─────────────────────────────┘
|
|
780
744
|
│
|
|
781
745
|
┌───┴───┐
|
|
@@ -783,10 +747,7 @@ Index Full
|
|
|
783
747
|
是 否
|
|
784
748
|
│ │
|
|
785
749
|
▼ ▼
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
舊專案遷移 / 想要最小改動? → Minimal
|
|
750
|
+
Minimal Index
|
|
790
751
|
```
|
|
791
752
|
|
|
792
753
|
### 使用案例
|
|
@@ -794,11 +755,11 @@ Index Full
|
|
|
794
755
|
| 案例 | 推薦模式 | 理由 |
|
|
795
756
|
|------|----------|------|
|
|
796
757
|
| 新創團隊的 SaaS 專案 | **Index** | 平衡效率與規範 |
|
|
797
|
-
| 銀行核心系統 | **
|
|
758
|
+
| 銀行核心系統 | **Index** | 索引會列出每一條適用標準與適用時機 |
|
|
798
759
|
| 個人 side project | **Minimal** | 輕量就好 |
|
|
799
760
|
| 開源專案 | **Index** | 讓貢獻者 AI 知道規範 |
|
|
800
761
|
| 從舊設定遷移 | **Minimal** | 保留現有設定 |
|
|
801
|
-
| 新導入 AI 的傳統企業 | **
|
|
762
|
+
| 新導入 AI 的傳統企業 | **Index** | 與已移除的 `full` 模式產出相同 |
|
|
802
763
|
|
|
803
764
|
---
|
|
804
765
|
|
|
@@ -895,8 +856,8 @@ uds init -y \
|
|
|
895
856
|
--test-levels unit,integration \
|
|
896
857
|
--content-mode index
|
|
897
858
|
|
|
898
|
-
#
|
|
899
|
-
uds init -y --content-mode
|
|
859
|
+
# 最小化整合檔案(由 Skills 提供任務指引)
|
|
860
|
+
uds init -y --content-mode minimal
|
|
900
861
|
|
|
901
862
|
# 生成 AGENTS.md 通用摘要(--yes 模式預設生成)
|
|
902
863
|
uds init -y --agents-md
|