universal-dev-standards 6.0.0 → 6.1.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/bundled/ai/options/commit-message/bilingual.ai.yaml +19 -1
- package/bundled/ai/standards/checkin-standards.ai.yaml +3 -3
- package/bundled/ai/standards/documentation-writing-standards.ai.yaml +1 -1
- package/bundled/ai/standards/frontend-design-standards.ai.yaml +33 -3
- package/bundled/ai/standards/push-standards.ai.yaml +14 -3
- package/bundled/ai/standards/requirement-engineering.ai.yaml +42 -3
- package/bundled/ai/standards/self-review-protocol.ai.yaml +15 -10
- package/bundled/ai/standards/verification-evidence.ai.yaml +88 -5
- package/bundled/core/checkin-standards.md +3 -3
- package/bundled/core/documentation-writing-standards.md +1 -1
- package/bundled/core/feature-discovery-standards.md +191 -0
- package/bundled/core/frontend-design-standards.md +93 -4
- package/bundled/core/multi-environment-e2e-testing.md +195 -0
- package/bundled/core/push-standards.md +82 -0
- package/bundled/core/requirement-engineering.md +2 -2
- package/bundled/core/self-review-protocol.md +13 -8
- package/bundled/core/verification-evidence.md +170 -10
- package/bundled/locales/COVERAGE.md +27 -21
- package/bundled/locales/zh-CN/CHANGELOG.md +26 -3
- package/bundled/locales/zh-CN/CLAUDE.md +1 -1
- package/bundled/locales/zh-CN/MAINTENANCE.md +42 -661
- package/bundled/locales/zh-CN/README.md +10 -10
- package/bundled/locales/zh-CN/SECURITY.md +2 -2
- package/bundled/locales/zh-CN/ai/options/commit-message/bilingual.ai.yaml +6 -1
- package/bundled/locales/zh-CN/core/browser-compatibility-standards.md +17 -7
- package/bundled/locales/zh-CN/core/cost-budget-test.md +1 -1
- package/bundled/locales/zh-CN/core/cross-flow-regression.md +8 -7
- package/bundled/locales/zh-CN/core/flaky-test-management.md +1 -1
- package/bundled/locales/zh-CN/core/flow-based-testing.md +8 -8
- package/bundled/locales/zh-CN/core/frontend-design-standards.md +1 -1
- package/bundled/locales/zh-CN/core/full-coverage-testing.md +74 -2
- package/bundled/locales/zh-CN/core/license-compliance.md +3 -1
- package/bundled/locales/zh-CN/core/logging-standards.md +83 -7
- package/bundled/locales/zh-CN/core/mock-boundary.md +58 -6
- package/bundled/locales/zh-CN/core/packaging-standards.md +2 -1
- package/bundled/locales/zh-CN/core/pipeline-security-gates.md +24 -4
- package/bundled/locales/zh-CN/core/prompt-regression.md +1 -1
- package/bundled/locales/zh-CN/core/replay-test.md +1 -1
- package/bundled/locales/zh-CN/core/requirement-engineering.md +1 -1
- package/bundled/locales/zh-CN/core/security-testing.md +24 -7
- package/bundled/locales/zh-CN/core/self-review-protocol.md +17 -12
- package/bundled/locales/zh-CN/core/smoke-test.md +1 -1
- package/bundled/locales/zh-CN/core/verification-evidence.md +252 -41
- package/bundled/locales/zh-CN/docs/CHEATSHEET.md +6 -2
- package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +16 -25
- package/bundled/locales/zh-CN/docs/user/GLOSSARY.md +1 -1
- package/bundled/locales/zh-CN/options/commit-message/bilingual.md +10 -3
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +21 -19
- package/bundled/locales/zh-CN/skills/brainstorm-assistant/guide.md +14 -11
- package/bundled/locales/zh-CN/skills/dev-methodology/guide.md +1 -1
- package/bundled/locales/zh-CN/skills/logging-guide/SKILL.md +29 -6
- package/bundled/locales/zh-CN/skills/spec-derivation/guide.md +1 -1
- package/bundled/locales/zh-TW/CHANGELOG.md +26 -3
- package/bundled/locales/zh-TW/CLAUDE.md +1 -1
- package/bundled/locales/zh-TW/MAINTENANCE.md +32 -8
- package/bundled/locales/zh-TW/README.md +10 -10
- package/bundled/locales/zh-TW/SECURITY.md +2 -2
- package/bundled/locales/zh-TW/ai/options/commit-message/bilingual.ai.yaml +6 -1
- package/bundled/locales/zh-TW/core/cost-budget-test.md +1 -1
- package/bundled/locales/zh-TW/core/flaky-test-management.md +1 -1
- package/bundled/locales/zh-TW/core/flow-based-testing.md +8 -8
- package/bundled/locales/zh-TW/core/frontend-design-standards.md +1 -1
- package/bundled/locales/zh-TW/core/license-compliance.md +3 -1
- package/bundled/locales/zh-TW/core/logging-standards.md +2 -2
- package/bundled/locales/zh-TW/core/mock-boundary.md +1 -1
- package/bundled/locales/zh-TW/core/packaging-standards.md +2 -1
- package/bundled/locales/zh-TW/core/pipeline-security-gates.md +24 -4
- package/bundled/locales/zh-TW/core/prompt-regression.md +1 -1
- package/bundled/locales/zh-TW/core/replay-test.md +1 -1
- package/bundled/locales/zh-TW/core/requirement-engineering.md +1 -1
- package/bundled/locales/zh-TW/core/security-testing.md +24 -7
- package/bundled/locales/zh-TW/core/self-review-protocol.md +16 -11
- package/bundled/locales/zh-TW/core/smoke-test.md +1 -1
- package/bundled/locales/zh-TW/core/verification-evidence.md +260 -31
- package/bundled/locales/zh-TW/docs/CHEATSHEET.md +6 -2
- package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +16 -25
- package/bundled/locales/zh-TW/docs/user/GLOSSARY.md +1 -1
- package/bundled/locales/zh-TW/options/commit-message/bilingual.md +10 -3
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +21 -19
- package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +14 -11
- package/bundled/locales/zh-TW/skills/dev-methodology/guide.md +1 -1
- package/bundled/locales/zh-TW/skills/logging-guide/SKILL.md +29 -6
- package/bundled/locales/zh-TW/skills/spec-derivation/guide.md +1 -1
- package/bundled/skills/brainstorm-assistant/SKILL.md +22 -20
- package/bundled/skills/brainstorm-assistant/guide.md +10 -7
- package/bundled/skills/spec-driven-dev/SKILL.md +11 -0
- package/package.json +3 -3
- package/src/commands/init.js +58 -17
- package/standards-registry.json +10 -10
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
id: bilingual
|
|
5
5
|
meta:
|
|
6
6
|
parent: commit-message
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.1.0"
|
|
8
8
|
description: Bilingual format for mixed teams
|
|
9
9
|
|
|
10
10
|
best_for:
|
|
@@ -92,6 +92,15 @@ rules:
|
|
|
92
92
|
Never omit the Chinese body section.
|
|
93
93
|
priority: required
|
|
94
94
|
|
|
95
|
+
- id: mid-conversation-language-drift-check
|
|
96
|
+
trigger: AI assistant switching from heavy non-target-language content (code, logs, English docs) back to user-facing prose in a long conversation
|
|
97
|
+
instruction: |
|
|
98
|
+
Before writing the next user-facing paragraph, confirm it will be in
|
|
99
|
+
the target bilingual language without waiting for the user to point
|
|
100
|
+
out drift. If the user has already flagged drift, correct immediately
|
|
101
|
+
in the next response — do not repeat apologies or delay the fix.
|
|
102
|
+
priority: recommended
|
|
103
|
+
|
|
95
104
|
anti_patterns:
|
|
96
105
|
- id: mixed-language-body
|
|
97
106
|
description: Mixing English and Chinese in the same paragraph
|
|
@@ -119,6 +128,15 @@ anti_patterns:
|
|
|
119
128
|
|
|
120
129
|
Closes #123
|
|
121
130
|
|
|
131
|
+
- id: language-drift-unnoticed
|
|
132
|
+
description: AI assistant keeps replying in a non-target language after processing heavy non-target-language content, only correcting after repeated user complaints
|
|
133
|
+
bad_example: |
|
|
134
|
+
[long conversation with heavy English code/log excerpts]
|
|
135
|
+
Assistant: "Let's proceed to the next 단계..." (drifted, no self-check)
|
|
136
|
+
good_example: |
|
|
137
|
+
[long conversation with heavy English code/log excerpts]
|
|
138
|
+
Assistant self-checks before replying, then continues in the target language without being asked: "接下來我們處理下一步驟..."
|
|
139
|
+
|
|
122
140
|
examples:
|
|
123
141
|
simple: "feat(auth): Add login form. 新增登入表單."
|
|
124
142
|
with_body: |
|
|
@@ -12,8 +12,8 @@ standard:
|
|
|
12
12
|
- "Documentation: docs updated, CHANGELOG updated"
|
|
13
13
|
|
|
14
14
|
meta:
|
|
15
|
-
version: "2.
|
|
16
|
-
updated: "2026-
|
|
15
|
+
version: "2.2.0"
|
|
16
|
+
updated: "2026-07-09"
|
|
17
17
|
source: core/checkin-standards.md
|
|
18
18
|
description: Quality gates that must be passed before committing code
|
|
19
19
|
|
|
@@ -128,7 +128,7 @@ standard:
|
|
|
128
128
|
priority: required
|
|
129
129
|
- id: test-before-commit
|
|
130
130
|
trigger: before committing
|
|
131
|
-
instruction: Run all test
|
|
131
|
+
instruction: Run all relevant tests locally (directly exercised code plus tests affected by the change; use test impact analysis tooling if the project has it), review coverage. When scope is unclear or the change touches shared/core paths, run the full suite instead.
|
|
132
132
|
priority: required
|
|
133
133
|
- id: no-wip-commits
|
|
134
134
|
trigger: writing commit message
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
|
|
4
4
|
id: documentation-writing-standards
|
|
5
5
|
meta:
|
|
6
|
-
version: "1.
|
|
6
|
+
version: "1.2.0"
|
|
7
7
|
updated: "2026-03-17"
|
|
8
8
|
source: core/documentation-writing-standards.md
|
|
9
9
|
description: Documentation requirements based on project types (enhanced ADR, LLM writing, quality metrics, translation-friendly)
|
|
@@ -1,17 +1,20 @@
|
|
|
1
1
|
# Frontend Design Standards - AI Optimized
|
|
2
2
|
# Source: core/frontend-design-standards.md
|
|
3
3
|
# Based on: DEC-029 (awesome-design-md, MIT), DEC-030 (OpenAI Frontend Guide)
|
|
4
|
-
# Version: 1.
|
|
4
|
+
# Version: 1.1.0
|
|
5
5
|
|
|
6
6
|
id: frontend-design-standards
|
|
7
7
|
meta:
|
|
8
|
-
version: "1.
|
|
9
|
-
updated: "2026-
|
|
8
|
+
version: "1.1.0"
|
|
9
|
+
updated: "2026-07-10"
|
|
10
10
|
source: core/frontend-design-standards.md
|
|
11
11
|
description: |
|
|
12
12
|
DESIGN.md 前端設計標準:9 段結構、語義色彩 token、字體角色、
|
|
13
13
|
間距比例、UI 硬性約束與 anti-pattern 清單。
|
|
14
14
|
適用所有含前端介面的專案。
|
|
15
|
+
v1.1.0 新增選填擴充:YAML frontmatter token 註冊表 +
|
|
16
|
+
{category.token} 內插語法 + components 結構化綁定
|
|
17
|
+
(借鑑 DEC-029 上游演化,Trial,不影響既有 5-token 治理收斂)。
|
|
15
18
|
|
|
16
19
|
# DESIGN.md 必填 9 段結構
|
|
17
20
|
design_md_sections:
|
|
@@ -78,6 +81,24 @@ design_md_sections:
|
|
|
78
81
|
description: "AI Agent 快速讀取的設計意圖摘要"
|
|
79
82
|
required_fields: [style_summary, key_constraints, tone]
|
|
80
83
|
|
|
84
|
+
# 選填擴充:token 內插語法 + 結構化 components 綁定(v1.1.0,Trial)
|
|
85
|
+
# 不影響上方 5-token/4-role/7-step 治理收斂;是既有 token 的機器可解析層,非新增 token 的許可證。
|
|
86
|
+
optional_extensions:
|
|
87
|
+
token_interpolation:
|
|
88
|
+
status: optional_trial
|
|
89
|
+
description: "DESIGN.md 可選填 YAML frontmatter 宣告 colors/typography/rounded/spacing token 字典,正文用 {category.token} 語法引用"
|
|
90
|
+
frontmatter_keys: [colors, typography, rounded, spacing]
|
|
91
|
+
syntax: "{category.token}"
|
|
92
|
+
rule: "frontmatter 的 colors 必須對應 5 個必要語義 token;引用不存在的 category.token 視為驗證錯誤,非靜默 fallback"
|
|
93
|
+
structured_components:
|
|
94
|
+
status: optional_trial
|
|
95
|
+
description: "Section 4(Component Styling)可選填 components: 區塊,把元件綁定到 {category.token} 引用"
|
|
96
|
+
rule: "components: 區塊內每個值都必須是 {category.token} 引用,禁止直接寫 hex/px 原始值"
|
|
97
|
+
not_adopted:
|
|
98
|
+
- "不隨附 lint CLI(上游有獨立 @google/design.md npm 套件,本標準不綁定特定驗證工具)"
|
|
99
|
+
- "不做框架專屬匯出格式(React/Vue/CSS-in-JS 產生器)"
|
|
100
|
+
- "不擴增 5/4/7 token 數量(內插語法讓既有 token 可引用,不是加 token 的理由)"
|
|
101
|
+
|
|
81
102
|
# 語義色彩 5 個必要 token
|
|
82
103
|
semantic_color_tokens:
|
|
83
104
|
required:
|
|
@@ -265,6 +286,15 @@ rules:
|
|
|
265
286
|
禁止將首頁設計成 Dashboard Grid。
|
|
266
287
|
priority: required
|
|
267
288
|
|
|
289
|
+
- id: respect-token-interpolation-if-present
|
|
290
|
+
trigger: "當 DESIGN.md 含 YAML frontmatter token 註冊表時(v1.1.0 選填擴充)"
|
|
291
|
+
instruction: |
|
|
292
|
+
解析 {category.token} 引用時一律對照 frontmatter 實際值,
|
|
293
|
+
不得憑記憶或猜測填入色值/尺寸。
|
|
294
|
+
引用不存在的 category.token 視為錯誤,向使用者回報而非靜默略過。
|
|
295
|
+
若 DESIGN.md 沒有 frontmatter,此規則不適用(擴充為選填,非強制)。
|
|
296
|
+
priority: recommended
|
|
297
|
+
|
|
268
298
|
# 快速參考表
|
|
269
299
|
quick_reference:
|
|
270
300
|
semantic_tokens:
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
id: push-standards
|
|
2
2
|
meta:
|
|
3
|
-
version: "1.
|
|
4
|
-
updated: "2026-
|
|
3
|
+
version: "1.1.0"
|
|
4
|
+
updated: "2026-07-09"
|
|
5
5
|
source: skills/push/SKILL.md
|
|
6
6
|
description: "Git push safety gates, protected branch detection, force-push guardrails, and push receipt audit trail"
|
|
7
7
|
|
|
@@ -14,6 +14,14 @@ config:
|
|
|
14
14
|
default: ["lint", "test"]
|
|
15
15
|
optional: ["ac-coverage", "type-check", "security-scan"]
|
|
16
16
|
description: "Quality gates to run before pushing"
|
|
17
|
+
test_scope:
|
|
18
|
+
default: "full"
|
|
19
|
+
choices: ["full", "changed"]
|
|
20
|
+
description: >-
|
|
21
|
+
"changed" runs only the diff-affected test subset via the project's
|
|
22
|
+
test impact analysis tooling (e.g. `vitest --changed`), if configured.
|
|
23
|
+
Fast local pre-check only — never a substitute for the project's own
|
|
24
|
+
CI/full-suite run, which remains the authoritative gate.
|
|
17
25
|
|
|
18
26
|
receipt:
|
|
19
27
|
output:
|
|
@@ -58,7 +66,10 @@ rules:
|
|
|
58
66
|
instruction: |
|
|
59
67
|
Run all configured push_gates in sequence:
|
|
60
68
|
- lint: run project lint command (from uds.project.yaml or detected)
|
|
61
|
-
- test: run project test command
|
|
69
|
+
- test: run project test command, respecting config.push_gates.test_scope —
|
|
70
|
+
"full" (default) runs the complete suite; "changed" runs only the
|
|
71
|
+
diff-affected subset via the project's test impact tooling if configured.
|
|
72
|
+
A "changed" pre-check does not replace the project's CI/full-suite run.
|
|
62
73
|
If any gate fails: abort push, display which gate failed, suggest fix.
|
|
63
74
|
If --skip-gates flag: run push without gates, mark gates_skipped: true in receipt.
|
|
64
75
|
|
|
@@ -3,10 +3,14 @@
|
|
|
3
3
|
|
|
4
4
|
id: requirement-engineering
|
|
5
5
|
meta:
|
|
6
|
-
version: "1.
|
|
7
|
-
updated: "2026-
|
|
6
|
+
version: "1.1.0"
|
|
7
|
+
updated: "2026-07-10"
|
|
8
8
|
source: methodologies/guides/requirement-engineering-guide.md
|
|
9
|
-
description:
|
|
9
|
+
description: |
|
|
10
|
+
Requirements engineering lifecycle, elicitation, specification, and validation standards.
|
|
11
|
+
v1.1.0 adds checklist_generation: dynamic per-spec CHK### quality checklist
|
|
12
|
+
(5 dimensions, source-traceability tags), operationalizing the existing
|
|
13
|
+
static Validation Checklist / IEEE 830 quality_characteristics below.
|
|
10
14
|
|
|
11
15
|
# Reference Standards
|
|
12
16
|
references:
|
|
@@ -118,6 +122,41 @@ srs_structure:
|
|
|
118
122
|
- Modifiable (easy to change)
|
|
119
123
|
- Traceable (origin and implementation linkable)
|
|
120
124
|
|
|
125
|
+
# 需求品質檢核清單生成(spec-kit /checklist 借鑑,2026-07-10 回頭對齊評估新增)
|
|
126
|
+
# 把上方 srs_structure.quality_characteristics(IEEE 830 8 大品質特性)從靜態參考文字
|
|
127
|
+
# 操作化成可對特定 spec 動態產生的逐項檢核清單——不是「作者自我檢查一次」的固定清單,
|
|
128
|
+
# 是「這份 spec 本身夠不夠完整/清楚/一致/可量測/可追溯」的單元測試。
|
|
129
|
+
checklist_generation:
|
|
130
|
+
format: "CHK### [dimension] <yes/no question about the spec's own quality> [tag(s)]"
|
|
131
|
+
append_only: true
|
|
132
|
+
dimensions:
|
|
133
|
+
- id: completeness
|
|
134
|
+
maps_to: Complete (IEEE 830)
|
|
135
|
+
checks_for: "遺漏的情境、未處理的邊界案例、未記載的 NFR"
|
|
136
|
+
- id: clarity
|
|
137
|
+
maps_to: Unambiguous (IEEE 830)
|
|
138
|
+
checks_for: "模糊詞彙(appropriate/fast/user-friendly)、未定義代名詞"
|
|
139
|
+
- id: consistency
|
|
140
|
+
maps_to: Consistent (IEEE 830)
|
|
141
|
+
checks_for: "spec 內部或跨 spec 的矛盾陳述"
|
|
142
|
+
- id: measurability
|
|
143
|
+
maps_to: Verifiable (IEEE 830)
|
|
144
|
+
checks_for: "未量化的 NFR、無法測試的驗收條件"
|
|
145
|
+
- id: coverage
|
|
146
|
+
maps_to: Traceable (IEEE 830)
|
|
147
|
+
checks_for: "無法追溯到來源(利害關係人需求/商業目標)的需求"
|
|
148
|
+
traceability_tags:
|
|
149
|
+
"[Spec §X.Y]": "有依據——引用具體 spec 段落"
|
|
150
|
+
"[Gap]": "spec 沒提到,無段落可引用"
|
|
151
|
+
"[Ambiguity]": "spec 有提到但用詞允許多種解讀"
|
|
152
|
+
"[Conflict]": "≥2 個 spec 段落互相矛盾,須都引用"
|
|
153
|
+
"[Assumption]": "揭露 spec 依賴的未言明假設"
|
|
154
|
+
rules:
|
|
155
|
+
- "至少 80% 的產出項目須帶 [Spec §X.Y] 標籤——若多數是 [Gap]/[Assumption],代表 spec 本身太薄弱,不是產生器的問題"
|
|
156
|
+
- "產生前最多問 5 個適應性釐清問題(無法從 spec 推斷的領域脈絡);超過 5 個代表該回 Discuss 階段而非繼續問"
|
|
157
|
+
- "append-only:對修訂後的 spec 重跑,接續編號新增項目,不重新編號或刪除舊項目;被解決的項目標記 [Resolved: <修訂說明>],不刪除"
|
|
158
|
+
boundary: "檢查對象是 spec 本身的品質,非程式碼;不取代/不重疊 acceptance-criteria-traceability 標準的 AC↔測試覆蓋率檢查(那個問「測試有沒有涵蓋 spec」,這個問「spec 本身夠不夠格拿去寫測試」)"
|
|
159
|
+
|
|
121
160
|
# SMART Requirements
|
|
122
161
|
smart:
|
|
123
162
|
S: { label: Specific, example: "Display 'Invalid email format' error" }
|
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
|
|
4
4
|
id: self-review-protocol
|
|
5
5
|
meta:
|
|
6
|
-
version: "1.
|
|
7
|
-
updated: "2026-
|
|
6
|
+
version: "1.1.0"
|
|
7
|
+
updated: "2026-07-09"
|
|
8
8
|
source: core/self-review-protocol.md
|
|
9
|
-
description: Mandatory self-review pass on large markdown edits before commit; catches
|
|
9
|
+
description: Mandatory self-review pass on large markdown edits before commit; catches 7 categories of internal cross-reference inconsistencies that internal reasoning routinely misses
|
|
10
10
|
|
|
11
11
|
trigger_conditions:
|
|
12
12
|
mandatory:
|
|
@@ -44,7 +44,7 @@ inconsistency_categories:
|
|
|
44
44
|
- id: 3
|
|
45
45
|
name: count_drift
|
|
46
46
|
description: Explicit number in text out of sync with actual count
|
|
47
|
-
example: "self-audit has 4 questions" but list has 7
|
|
47
|
+
example: '"self-audit has 4 questions" but list has 7'
|
|
48
48
|
check: grep for "N questions", "N rows", "N items" and verify
|
|
49
49
|
- id: 4
|
|
50
50
|
name: stale_template
|
|
@@ -61,6 +61,11 @@ inconsistency_categories:
|
|
|
61
61
|
description: Example contradicts current rule or latest case experience
|
|
62
62
|
example: example shows D1/D2/D3 but rule says D3 not mandatory
|
|
63
63
|
check: every concrete value in examples consistent with current rules
|
|
64
|
+
- id: 7
|
|
65
|
+
name: language_consistency
|
|
66
|
+
description: Non-target-language contamination, same-paragraph language mixing, or inconsistent project terminology within one document
|
|
67
|
+
example: a zh-TW paragraph contains Japanese kana or Korean hangul characters; or "XSPEC"/"gate"/"pipeline" spelled inconsistently across the same file
|
|
68
|
+
check: scan for out-of-place scripts (Japanese kana U+3040-U+30FF, Korean hangul U+AC00-U+D7A3) outside expected sections, same-paragraph language mixing, and inconsistent spelling of established project terms
|
|
64
69
|
|
|
65
70
|
procedure:
|
|
66
71
|
step_1:
|
|
@@ -69,7 +74,7 @@ procedure:
|
|
|
69
74
|
when: after editing, before committing
|
|
70
75
|
step_2:
|
|
71
76
|
name: walk_categories
|
|
72
|
-
description: Apply
|
|
77
|
+
description: Apply 7 categories above against the file
|
|
73
78
|
step_3:
|
|
74
79
|
name: fix_in_same_commit
|
|
75
80
|
description: If issues found, edit in place and include fixes in same commit
|
|
@@ -84,13 +89,13 @@ recording_formats:
|
|
|
84
89
|
format: '> **v{X.Y.(Z+1)} Self-review pass {YYYY-MM-DD}**: {N} issues found, {M} fixed in same commit'
|
|
85
90
|
adr_dec:
|
|
86
91
|
location: '## Follow-up Tracking table'
|
|
87
|
-
format: '| Self-review pass | This DEC | ✅ YYYY-MM-DD (
|
|
92
|
+
format: '| Self-review pass | This DEC | ✅ YYYY-MM-DD (7 categories, no issues) |'
|
|
88
93
|
xspec_sdd_delta:
|
|
89
94
|
location: after non-modification list section (e.g. §N.6)
|
|
90
|
-
format: '> Self-review pass: YYYY-MM-DD (
|
|
95
|
+
format: '> Self-review pass: YYYY-MM-DD (7 categories, no issues)'
|
|
91
96
|
commit_message_body:
|
|
92
97
|
location: last line of commit body
|
|
93
|
-
format: 'Self-review (protocol v1.
|
|
98
|
+
format: 'Self-review (protocol v1.1.0): N issues found, M applied in same commit / 0 found.'
|
|
94
99
|
|
|
95
100
|
distinction_from_other_practices:
|
|
96
101
|
code_review:
|
|
@@ -139,6 +144,6 @@ examples_in_the_wild:
|
|
|
139
144
|
note: first SKILL.md edit to pass self-review pre-commit; preceded by 2 patch cycles (v1.1.0->v1.1.1 with 3 issues, v1.2.0->v1.2.1 with 6 issues) that motivated this standard
|
|
140
145
|
|
|
141
146
|
self_review:
|
|
142
|
-
date: "2026-
|
|
147
|
+
date: "2026-07-09"
|
|
143
148
|
issues_found: 0
|
|
144
|
-
notes:
|
|
149
|
+
notes: Added category 7 (language_consistency) per XSPEC-324; re-read whole file, no internal inconsistencies detected
|
|
@@ -8,12 +8,14 @@ standard:
|
|
|
8
8
|
description: 驗證證據標準,強化 anti-hallucination
|
|
9
9
|
|
|
10
10
|
meta:
|
|
11
|
-
version: "1.
|
|
12
|
-
updated: "2026-
|
|
11
|
+
version: "1.2.0"
|
|
12
|
+
updated: "2026-07-17"
|
|
13
13
|
source: core/verification-evidence.md
|
|
14
14
|
description: >
|
|
15
15
|
驗證證據標準 — Iron Law: 無驗證證據不可聲稱完成。
|
|
16
16
|
v1.1.0: Evidence must specify which environment layer it was collected from (XSPEC-204).
|
|
17
|
+
v1.2.0: Evidence itself must be validated — a tool can fail silently and its
|
|
18
|
+
output is indistinguishable from a real result (XSPEC-340).
|
|
17
19
|
inspired_by: superpowers/verification-before-completion
|
|
18
20
|
|
|
19
21
|
guidelines:
|
|
@@ -23,8 +25,55 @@ standard:
|
|
|
23
25
|
- "驗收證據必須標明收集自哪個環境層次(local / UAT / PRD)"
|
|
24
26
|
- "回歸測試必須展示 RED → GREEN 循環"
|
|
25
27
|
- "代理報告 success ≠ 實際 success,需獨立驗證"
|
|
28
|
+
- "**工具回報 success ≠ 實際 success**——驗證指令本身可能沒跑起來,而其輸出與真結果無法區分"
|
|
26
29
|
- "驗證輸出截斷至合理長度(2000 字元)但保留關鍵資訊"
|
|
27
30
|
|
|
31
|
+
# 以下不構成驗證證據。原本只存在於 zh-TW 譯文裡(英文來源與本檔皆無)——
|
|
32
|
+
# v1.2.0 一併升上來源與本檔(XSPEC-340 R4:譯文比來源更完整,且無 gate 會報)。
|
|
33
|
+
non_evidence_claims:
|
|
34
|
+
- claim: "「已完成」"
|
|
35
|
+
why: "無可觀察的輸出"
|
|
36
|
+
- claim: "「應該可以了」"
|
|
37
|
+
why: "未執行驗證"
|
|
38
|
+
- claim: "「我改了程式碼」"
|
|
39
|
+
why: "修改 ≠ 驗證"
|
|
40
|
+
- claim: "「測試應該會通過」"
|
|
41
|
+
why: "預測 ≠ 事實"
|
|
42
|
+
- claim: "「指令回傳 0」"
|
|
43
|
+
why: "僅當該指令確實可能量到該主張時才算——見 evidence_validity"
|
|
44
|
+
|
|
45
|
+
# ── v1.2.0 證據有效性(XSPEC-340)──
|
|
46
|
+
# Iron Law 擋的是「沒有證據就宣稱完成」。這一層擋的是相反的失敗:
|
|
47
|
+
# 證據有、指令跑了、exit_code 是 0,**而那個輸出毫無意義**,因為指令根本沒量到東西。
|
|
48
|
+
# 這不是幻覺(幻覺是「沒查就編」,anti-hallucination 已涵蓋)——這裡什麼都沒編,
|
|
49
|
+
# 是**查了,而查詢工具騙了你**。
|
|
50
|
+
evidence_validity:
|
|
51
|
+
description: "證據本身是否成立——驗證指令是否真的執行、是否真的量到它宣稱的東西"
|
|
52
|
+
rules:
|
|
53
|
+
- name: "exit_code 的語意依工具而定"
|
|
54
|
+
detail: >
|
|
55
|
+
exit_code = 0 代表成功,只在「該工具成功時回 0」的前提下成立。
|
|
56
|
+
當工具在受測狀態下**設計上就會失敗**時,其非 0 不帶有關於受測物的任何資訊——
|
|
57
|
+
改看輸出內容。反向亦然:非 0 不足以證明受測物壞了。
|
|
58
|
+
- name: "空輸出 / 查無 / 0 ≠ 不存在"
|
|
59
|
+
detail: >
|
|
60
|
+
斷言「不存在」之前,須先確立查詢工具**執行成功**:不是 command not found、
|
|
61
|
+
不是權限不足、參數沒有被中間的 shell 吃掉。**查無之前,先確認查詢工具有在運作。**
|
|
62
|
+
- name: "判斷存在與否的指令不得丟棄 stderr"
|
|
63
|
+
detail: >
|
|
64
|
+
抑制 stderr(`2>/dev/null` 及等價作法)消掉的正是「這個工具壞了」的那條通道,
|
|
65
|
+
於是失敗會穿上與真陰性一模一樣的外衣。
|
|
66
|
+
- name: "管線的 exit code 不屬於其中任何單一階段"
|
|
67
|
+
detail: >
|
|
68
|
+
`set -o pipefail` 下 `producer | grep -q pattern` 會繼承 producer 的非 0,
|
|
69
|
+
grep 中不中都無關。需要依內容決策時:**先接住輸出,再判斷**。
|
|
70
|
+
provenance: >
|
|
71
|
+
證據來自 2026-07-17 單一 agent(Claude Opus 4.8)單日的十次實例,
|
|
72
|
+
記錄於 AsiaOstrich XSPEC-340;其中 exit_code=0 四次為假、exit_code≠0 兩次為真
|
|
73
|
+
且依 VE-002 行動摧毀了健康的產物。樣本密集但來源單一——然而每個失敗都源自
|
|
74
|
+
**工具本身的語意**(sudo / gpg / pipefail / POSIX exit code)而非模型的性質,
|
|
75
|
+
故任何驅動同一批工具的 agent 都暴露在同樣的陷阱下。
|
|
76
|
+
|
|
28
77
|
evidence_format:
|
|
29
78
|
fields:
|
|
30
79
|
- name: command
|
|
@@ -62,7 +111,12 @@ standard:
|
|
|
62
111
|
trust_rules:
|
|
63
112
|
- "代理聲稱「已完成」→ 檢查 verification_evidence 是否存在"
|
|
64
113
|
- "verification_evidence 為空 → 標記為未驗證"
|
|
65
|
-
|
|
114
|
+
# v1.2.0 修訂:原文為「exit_code ≠ 0 → 標記為驗證失敗」,無條件成立。
|
|
115
|
+
# 該規則在 2026-07-17 兩次把**完全正常**的加密備份判為失敗並刪除——
|
|
116
|
+
# 主機依設計不存私鑰,gpg 對正常檔案必然回非 0。故加上前提。
|
|
117
|
+
- "exit_code ≠ 0 → 標記為驗證失敗——**除非**該工具在受測狀態下設計上就回非 0(見 VE-007),此時改依輸出內容判斷"
|
|
118
|
+
- "exit_code = 0 但該指令不可能量到它宣稱的東西 → 標記為未驗證"
|
|
119
|
+
- "證據斷言「不存在」(0/空/查無)→ 未證明查詢工具執行成功前,標記為未驗證"
|
|
66
120
|
- "多個驗證步驟 → 所有步驟都必須通過"
|
|
67
121
|
|
|
68
122
|
rules:
|
|
@@ -72,7 +126,9 @@ standard:
|
|
|
72
126
|
priority: critical
|
|
73
127
|
- id: VE-002
|
|
74
128
|
trigger: "exit_code ≠ 0"
|
|
75
|
-
action:
|
|
129
|
+
action: >
|
|
130
|
+
標記驗證失敗,啟動 fix loop——**前提是已確認該工具在此狀態下成功時回 0**(見 VE-007)。
|
|
131
|
+
未確認就啟動 fix loop 等於對健康的產物動手。
|
|
76
132
|
priority: high
|
|
77
133
|
- id: VE-003
|
|
78
134
|
trigger: "Bug fix 無 RED-GREEN 循環"
|
|
@@ -97,6 +153,28 @@ standard:
|
|
|
97
153
|
要求補充環境層次聲明,或在 environment-stratification-matrix 中標記為 ⚠️/❌。
|
|
98
154
|
priority: high
|
|
99
155
|
|
|
156
|
+
# ── v1.2.0 證據有效性規則(XSPEC-340)──
|
|
157
|
+
validity_rules:
|
|
158
|
+
- id: VE-007
|
|
159
|
+
trigger: "驗證工具在受測狀態下**依設計**回非 0(例:主機刻意不存私鑰時的 gpg --list-packets)"
|
|
160
|
+
action: >
|
|
161
|
+
VE-002 不適用。改依輸出內容判斷;**不得對健康的產物啟動 fix loop**。
|
|
162
|
+
priority: critical
|
|
163
|
+
- id: VE-008
|
|
164
|
+
trigger: "證據斷言「不存在」(exit_code 0、輸出為 0/空/查無)"
|
|
165
|
+
action: >
|
|
166
|
+
該證據不成立,直到證明查詢工具本身執行成功(非 command not found、非權限失敗、
|
|
167
|
+
參數未被上游 shell 吃掉)。重跑且不抑制 stderr。
|
|
168
|
+
priority: high
|
|
169
|
+
- id: VE-009
|
|
170
|
+
trigger: "判斷存在與否的驗證指令抑制了 stderr(`2>/dev/null` 或等價作法)"
|
|
171
|
+
action: "證據不成立。以可見 stderr 重跑。"
|
|
172
|
+
priority: high
|
|
173
|
+
- id: VE-010
|
|
174
|
+
trigger: "證據的 exit_code 來自管線(尤其在 `set -o pipefail` 下)"
|
|
175
|
+
action: "該 exit code 不歸屬於任何單一階段。先接住輸出,再依內容判斷。"
|
|
176
|
+
priority: medium
|
|
177
|
+
|
|
100
178
|
physical_spec:
|
|
101
179
|
type: checklist
|
|
102
180
|
validator:
|
|
@@ -105,6 +183,11 @@ physical_spec:
|
|
|
105
183
|
checks:
|
|
106
184
|
- "完成聲明是否附帶 verification_evidence"
|
|
107
185
|
- "evidence 是否包含所有必填欄位"
|
|
108
|
-
|
|
186
|
+
# v1.2.0 修訂:原文為「exit_code 是否為 0(成功)」——它把 0 直接等同於成功,
|
|
187
|
+
# 正是 XSPEC-340 §A 十個實例中四次誤報的來源。
|
|
188
|
+
- "exit_code 是否為 0——且**該工具成功時確實回 0**(見 VE-007)"
|
|
189
|
+
- "證據若斷言「不存在」,是否已證明查詢工具執行成功(VE-008)"
|
|
190
|
+
- "判斷存在與否的指令是否抑制了 stderr(VE-009)"
|
|
191
|
+
- "exit_code 是否來自管線而非受測指令本身(VE-010)"
|
|
109
192
|
- "Bug fix 是否有 RED → GREEN 循環證據"
|
|
110
193
|
- "有外部服務依賴的 AC 是否標明 environment_layer"
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> **Language**: English | [繁體中文](../locales/zh-TW/core/checkin-standards.md)
|
|
4
4
|
|
|
5
|
-
**Version**: 1.
|
|
6
|
-
**Last Updated**: 2026-
|
|
5
|
+
**Version**: 1.8.0
|
|
6
|
+
**Last Updated**: 2026-07-09
|
|
7
7
|
**Applicability**: All software projects using version control
|
|
8
8
|
**Scope**: partial
|
|
9
9
|
**Industry Standards**: SWEBOK v4.0 Chapter 6
|
|
@@ -96,7 +96,7 @@ pytest --cov=src tests/
|
|
|
96
96
|
```
|
|
97
97
|
|
|
98
98
|
**Verification**:
|
|
99
|
-
- Run all test
|
|
99
|
+
- Run all relevant tests locally (see "All relevant tests pass" above — directly exercised code plus tests affected by the change, via test impact analysis tooling if the project has it); when scope is unclear, or the change touches shared/core paths, run the full suite instead
|
|
100
100
|
- Review test coverage report
|
|
101
101
|
- Ensure new code paths are tested
|
|
102
102
|
|
|
@@ -818,7 +818,7 @@ Track translation status in translated document headers:
|
|
|
818
818
|
---
|
|
819
819
|
translation_status: current | needs_update | in_progress
|
|
820
820
|
source_version: 1.2.0
|
|
821
|
-
source_hash:
|
|
821
|
+
source_hash: a1b2c3d4e5f6 # first 12 chars of `git hash-object <source>`
|
|
822
822
|
translated_by: human | machine | machine+human-review
|
|
823
823
|
last_synced: 2026-03-17
|
|
824
824
|
---
|