universal-dev-standards 5.14.0 → 5.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. package/bin/uds.js +2 -0
  2. package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +31 -0
  3. package/bundled/ai/standards/ai-instruction-standards.ai.yaml +190 -3
  4. package/bundled/ai/standards/forward-derivation-standards.ai.yaml +23 -0
  5. package/bundled/ai/standards/knowledge-graph-memory.ai.yaml +83 -0
  6. package/bundled/core/acceptance-criteria-traceability.md +46 -0
  7. package/bundled/core/ai-instruction-standards.md +136 -11
  8. package/bundled/core/forward-derivation-standards.md +19 -0
  9. package/bundled/core/knowledge-graph-memory.md +119 -0
  10. package/bundled/locales/COVERAGE.md +226 -0
  11. package/bundled/locales/zh-CN/CHANGELOG.md +42 -3
  12. package/bundled/locales/zh-CN/README.md +1 -1
  13. package/bundled/locales/zh-CN/SECURITY.md +1 -1
  14. package/bundled/locales/zh-CN/core/acceptance-criteria-traceability.md +46 -0
  15. package/bundled/locales/zh-CN/core/ai-instruction-standards.md +111 -5
  16. package/bundled/locales/zh-CN/core/forward-derivation-standards.md +19 -0
  17. package/bundled/locales/zh-CN/skills/ac-coverage/SKILL.md +194 -0
  18. package/bundled/locales/zh-CN/skills/adr-assistant/SKILL.md +135 -40
  19. package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +217 -63
  20. package/bundled/locales/zh-CN/skills/brainstorm-assistant/guide.md +599 -0
  21. package/bundled/locales/zh-CN/skills/commands/brainstorm.md +92 -25
  22. package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +78 -16
  23. package/bundled/locales/zh-CN/skills/contract-test-assistant/SKILL.md +85 -26
  24. package/bundled/locales/zh-CN/skills/deploy-assistant/SKILL.md +189 -0
  25. package/bundled/locales/zh-CN/skills/dev-methodology/SKILL.md +110 -0
  26. package/bundled/locales/zh-CN/skills/dev-methodology/guide.md +255 -0
  27. package/bundled/locales/zh-CN/skills/dev-workflow-guide/SKILL.md +70 -11
  28. package/bundled/locales/zh-CN/skills/journey-test-assistant/SKILL.md +209 -0
  29. package/bundled/locales/zh-CN/skills/knowledge-graph/SKILL.md +58 -0
  30. package/bundled/locales/zh-CN/skills/knowledge-graph/guide.md +74 -0
  31. package/bundled/locales/zh-CN/skills/migration-assistant/SKILL.md +125 -8
  32. package/bundled/locales/zh-CN/skills/observability-assistant/guide.md +188 -0
  33. package/bundled/locales/zh-CN/skills/orchestrate/SKILL.md +173 -0
  34. package/bundled/locales/zh-CN/skills/plan/SKILL.md +240 -0
  35. package/bundled/locales/zh-CN/skills/push/SKILL.md +242 -0
  36. package/bundled/locales/zh-CN/skills/retrospective-assistant/SKILL.md +104 -36
  37. package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +88 -32
  38. package/bundled/locales/zh-CN/skills/runbook-assistant/guide.md +216 -0
  39. package/bundled/locales/zh-CN/skills/skill-builder/SKILL.md +149 -0
  40. package/bundled/locales/zh-CN/skills/slo-assistant/guide.md +188 -0
  41. package/bundled/locales/zh-CN/skills/spec-derivation/SKILL.md +86 -0
  42. package/bundled/locales/zh-CN/skills/spec-derivation/guide.md +476 -0
  43. package/bundled/locales/zh-CN/skills/spec-driven-dev/SKILL.md +155 -81
  44. package/bundled/locales/zh-CN/skills/sweep/SKILL.md +151 -0
  45. package/bundled/locales/zh-CN/skills/testing-guide/SKILL.md +207 -110
  46. package/bundled/locales/zh-TW/CHANGELOG.md +46 -3
  47. package/bundled/locales/zh-TW/README.md +1 -1
  48. package/bundled/locales/zh-TW/SECURITY.md +1 -1
  49. package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +46 -0
  50. package/bundled/locales/zh-TW/core/ai-instruction-standards.md +130 -5
  51. package/bundled/locales/zh-TW/core/browser-compatibility-standards.md +222 -5
  52. package/bundled/locales/zh-TW/core/contract-testing-standards.md +184 -5
  53. package/bundled/locales/zh-TW/core/cross-flow-regression.md +192 -5
  54. package/bundled/locales/zh-TW/core/forward-derivation-standards.md +19 -0
  55. package/bundled/locales/zh-TW/core/knowledge-graph-memory.md +127 -0
  56. package/bundled/locales/zh-TW/core/release-readiness-gate.md +186 -5
  57. package/bundled/locales/zh-TW/core/self-review-protocol.md +9 -1
  58. package/bundled/locales/zh-TW/skills/ac-coverage/SKILL.md +192 -0
  59. package/bundled/locales/zh-TW/skills/adr-assistant/SKILL.md +21 -42
  60. package/bundled/locales/zh-TW/skills/ai-collaboration-standards/SKILL.md +5 -1
  61. package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +212 -59
  62. package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +266 -579
  63. package/bundled/locales/zh-TW/skills/commands/brainstorm.md +91 -26
  64. package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +77 -15
  65. package/bundled/locales/zh-TW/skills/contract-test-assistant/SKILL.md +75 -16
  66. package/bundled/locales/zh-TW/skills/deploy-assistant/SKILL.md +187 -0
  67. package/bundled/locales/zh-TW/skills/dev-methodology/SKILL.md +108 -0
  68. package/bundled/locales/zh-TW/skills/dev-methodology/guide.md +255 -0
  69. package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +125 -64
  70. package/bundled/locales/zh-TW/skills/journey-test-assistant/SKILL.md +222 -0
  71. package/bundled/locales/zh-TW/skills/knowledge-graph/SKILL.md +56 -0
  72. package/bundled/locales/zh-TW/skills/knowledge-graph/guide.md +74 -0
  73. package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +128 -11
  74. package/bundled/locales/zh-TW/skills/observability-assistant/guide.md +188 -0
  75. package/bundled/locales/zh-TW/skills/orchestrate/SKILL.md +173 -0
  76. package/bundled/locales/zh-TW/skills/plan/SKILL.md +240 -0
  77. package/bundled/locales/zh-TW/skills/project-structure-guide/SKILL.md +5 -1
  78. package/bundled/locales/zh-TW/skills/push/SKILL.md +242 -0
  79. package/bundled/locales/zh-TW/skills/retrospective-assistant/SKILL.md +94 -28
  80. package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +84 -28
  81. package/bundled/locales/zh-TW/skills/runbook-assistant/guide.md +216 -0
  82. package/bundled/locales/zh-TW/skills/skill-builder/SKILL.md +165 -0
  83. package/bundled/locales/zh-TW/skills/slo-assistant/guide.md +188 -0
  84. package/bundled/locales/zh-TW/skills/spec-derivation/SKILL.md +83 -0
  85. package/bundled/locales/zh-TW/skills/spec-derivation/guide.md +476 -0
  86. package/bundled/locales/zh-TW/skills/spec-driven-dev/SKILL.md +148 -77
  87. package/bundled/locales/zh-TW/skills/sweep/SKILL.md +149 -0
  88. package/bundled/locales/zh-TW/skills/testing-guide/SKILL.md +141 -44
  89. package/bundled/skills/adr-assistant/SKILL.md +1 -1
  90. package/bundled/skills/ai-collaboration-standards/SKILL.md +1 -1
  91. package/bundled/skills/ai-friendly-architecture/SKILL.md +1 -1
  92. package/bundled/skills/ai-instruction-standards/SKILL.md +1 -1
  93. package/bundled/skills/api-design-assistant/SKILL.md +1 -1
  94. package/bundled/skills/audit-assistant/SKILL.md +1 -1
  95. package/bundled/skills/brainstorm-assistant/SKILL.md +142 -106
  96. package/bundled/skills/brainstorm-assistant/guide.md +256 -661
  97. package/bundled/skills/ci-cd-assistant/SKILL.md +1 -1
  98. package/bundled/skills/commands/brainstorm.md +51 -30
  99. package/bundled/skills/contract-test-assistant/SKILL.md +1 -1
  100. package/bundled/skills/database-assistant/SKILL.md +1 -1
  101. package/bundled/skills/deploy-assistant/SKILL.md +1 -1
  102. package/bundled/skills/documentation-guide/SKILL.md +1 -1
  103. package/bundled/skills/error-code-guide/SKILL.md +1 -1
  104. package/bundled/skills/git-workflow-guide/SKILL.md +1 -1
  105. package/bundled/skills/incident-response-assistant/SKILL.md +1 -1
  106. package/bundled/skills/journey-test-assistant/SKILL.md +1 -1
  107. package/bundled/skills/knowledge-graph/SKILL.md +58 -0
  108. package/bundled/skills/knowledge-graph/guide.md +69 -0
  109. package/bundled/skills/logging-guide/SKILL.md +1 -1
  110. package/bundled/skills/observability-assistant/SKILL.md +1 -1
  111. package/bundled/skills/orchestrate/SKILL.md +1 -1
  112. package/bundled/skills/plan/SKILL.md +1 -1
  113. package/bundled/skills/pr-automation-assistant/SKILL.md +1 -1
  114. package/bundled/skills/project-structure-guide/SKILL.md +1 -1
  115. package/bundled/skills/push/SKILL.md +1 -1
  116. package/bundled/skills/retrospective-assistant/SKILL.md +1 -1
  117. package/bundled/skills/reverse-engineer/SKILL.md +1 -1
  118. package/bundled/skills/runbook-assistant/SKILL.md +1 -1
  119. package/bundled/skills/security-assistant/SKILL.md +1 -1
  120. package/bundled/skills/security-scan-assistant/SKILL.md +1 -1
  121. package/bundled/skills/slo-assistant/SKILL.md +1 -1
  122. package/bundled/skills/sweep/SKILL.md +1 -1
  123. package/bundled/skills/testing-guide/SKILL.md +1 -1
  124. package/package.json +2 -2
  125. package/src/commands/check.js +80 -0
  126. package/src/commands/init.js +8 -1
  127. package/src/commands/update.js +49 -14
  128. package/src/i18n/messages.js +32 -5
  129. package/src/installers/skills-installer.js +49 -0
  130. package/src/lint/i18n.js +424 -0
  131. package/src/utils/config-manager.js +39 -0
  132. package/src/utils/skills-installer.js +39 -7
  133. package/standards-registry.json +16 -4
  134. package/bundled/locales/zh-TW/docs/SKILL-FALLBACK-GUIDE.md +0 -407
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Guide CI/CD pipeline design, configuration, and optimization.
6
6
  Use when: setting up pipelines, optimizing build times, configuring deployment stages.
7
- Keywords: CI/CD, pipeline, GitHub Actions, deployment, build, 持續整合, 持續部署.
7
+ Keywords: CI/CD, pipeline, GitHub Actions, deployment, build.
8
8
  allowed-tools: Read, Grep, Glob
9
9
  argument-hint: "[pipeline config or stage | Pipeline 配置或階段]"
10
10
  ---
@@ -6,9 +6,9 @@ argument-hint: "[problem or feature idea | 問題或功能構想]"
6
6
 
7
7
  # Brainstorm Assistant | 腦力激盪助手
8
8
 
9
- Structured ideation before specification writing. Transform vague ideas into actionable feature proposals through guided brainstorming.
9
+ Structured ideation before specification writing. Transform vague ideas into actionable feature proposals through a persona-ensemble brainstorm.
10
10
 
11
- 在撰寫規格前進行結構化發想。透過引導式腦力激盪,將模糊構想轉化為可執行的功能提案。
11
+ 在撰寫規格前進行結構化發想。透過 persona 集成式腦力激盪,將模糊構想轉化為可執行的功能提案。
12
12
 
13
13
  ## Usage | 用法
14
14
 
@@ -19,33 +19,37 @@ Structured ideation before specification writing. Transform vague ideas into act
19
19
  ## Workflow | 工作流程
20
20
 
21
21
  ```
22
- FRAME ──► DIVERGE ──► CONVERGE ──► OUTPUT
23
- 定義問題 發散思考 收斂評估 輸出提案
22
+ PRE-FLIGHT ──► FRAME ──► DIVERGE ──────────► CONVERGE ─────────► OUTPUT
23
+ 防錨定 定義問題 persona 集成+透鏡 多評審面板+硬角色反駁 輸出提案
24
24
  ```
25
25
 
26
- | Phase | Goal | Key Techniques | 目標 |
27
- |-------|------|----------------|------|
26
+ | Phase | Goal | Key Techniques (v3) | 目標 |
27
+ |-------|------|---------------------|------|
28
+ | **PRE-FLIGHT** | Prevent AI anchoring | User writes 3 ideas first; no analogy seed | 防止錨定 |
28
29
  | **FRAME** | Define problem clearly | 5 Whys, HMW, Stakeholder Map | 清楚定義問題 |
29
- | **DIVERGE** | Generate many ideas | HMW, SCAMPER, Six Thinking Hats | 產生大量想法 |
30
- | **CONVERGE** | Evaluate and rank | Evaluation Matrix, Dot Voting | 評估與排序 |
30
+ | **DIVERGE** | Force viewpoint diversity | Persona ensemble + diversity lenses | 逼出視角多樣性 |
31
+ | **CONVERGE** | Bias-checked selection | Multi-critic panel + Devil's Advocate/Steelman | 降偏誤選擇 |
31
32
  | **OUTPUT** | Actionable report | Brainstorm Report template | 可執行的報告 |
32
33
 
33
34
  ## Techniques | 技法
34
35
 
35
36
  | Technique | Best For | 適用場景 |
36
37
  |-----------|----------|----------|
37
- | **5 Whys** | Finding root causes | 找到根本原因 |
38
- | **HMW** | Reframing problems as opportunities | 將問題重構為機會 |
39
- | **SCAMPER** | Improving existing features | 改善現有功能 |
40
- | **Six Thinking Hats** | Multi-perspective analysis | 多角度分析 |
41
- | **Dot Voting** | Quick prioritization | 快速排序 |
38
+ | **Persona ensemble** | Forced viewpoint diversity (v3 core) | 強制視角多樣性(v3 核心) |
39
+ | **Diversity lenses** | Analogical / reversal / morphological | 突破顯而易見區 |
40
+ | **Multi-critic panel** | Bias-reduced scoring (v3 core) | 降偏誤評分(v3 核心) |
41
+ | **Devil's Advocate + Steelman** | Hard-role rebuttal | 硬角色反駁 |
42
+ | **5 Whys / HMW / SCAMPER / Six Hats** | Classic framing & divergence | 經典框定與發散 |
42
43
 
43
44
  ## Examples | 範例
44
45
 
45
46
  ```bash
46
- /brainstorm # Start interactive session
47
- /brainstorm "user retention" # Brainstorm around a topic
48
- /brainstorm --technique scamper # Use a specific technique
47
+ /brainstorm # Start interactive session
48
+ /brainstorm "user retention" # Brainstorm around a topic
49
+ /brainstorm --enhanced "user retention" # Parallel persona ensemble (if host supports it)
50
+ /brainstorm --personas "designer,economist,skeptic" # Custom personas
51
+ /brainstorm --lens analogical "onboarding" # Force the analogical lens
52
+ /brainstorm --quick "reduce checkout friction" # Fast 3-idea mode
49
53
  ```
50
54
 
51
55
  ## Output Format | 輸出格式
@@ -57,9 +61,10 @@ FRAME ──► DIVERGE ──► CONVERGE ──► OUTPUT
57
61
  [Refined problem from FRAME phase]
58
62
 
59
63
  ## Top 3 Recommendations
60
- 1. **[Idea]** — Score: X.X — [Why recommended]
61
- 2. **[Idea]** — Score: X.X — [Why recommended]
62
- 3. **[Idea]** — Score: X.X — [Why recommended]
64
+ 1. **[Idea]** — Agg. X.X ✓ Passed rebuttal Persona: [..] — [Why recommended]
65
+
66
+ ## Diversity Note
67
+ [How many distinct personas/lenses the surviving ideas span]
63
68
 
64
69
  ## Next Steps
65
70
  - [ ] Proceed to `/requirement` with top idea
@@ -83,26 +88,36 @@ After brainstorming, the typical workflow is:
83
88
 
84
89
  | Input | AI Action |
85
90
  |-------|-----------|
86
- | `/brainstorm` | 詢問要探討的主題或問題,進入 FRAME 階段 |
87
- | `/brainstorm "topic"` | 以指定主題開始,進入 FRAME 階段 |
88
- | `/brainstorm --technique <name>` | 使用指定技法開始 DIVERGE 階段 |
91
+ | `/brainstorm` | 啟動 PRE-FLIGHT,請使用者先寫 問題+3 想法+反向排除 |
92
+ | `/brainstorm "topic"` | 以指定主題啟動 PRE-FLIGHT,再進入 FRAME |
93
+ | `/brainstorm --personas "a,b,c"` | 以自訂 persona 組進入 DIVERGE |
94
+ | `/brainstorm --lens <name>` | 以指定多樣性透鏡為主進入 DIVERGE |
95
+ | `/brainstorm --enhanced` | 若宿主支援子代理則平行跑 persona/評審,否則靜默退回 baseline |
89
96
 
90
97
  ### Interaction Script | 互動腳本
91
98
 
99
+ #### PRE-FLIGHT Phase
100
+ 1. 請使用者先寫 問題(一句)+3 個初始想法+最不想要的解法類型
101
+ 2. 拒絕「像 X 但給 Y」種子,改寫為底層問題
102
+
103
+ 🛑 **STOP**: 收到三項輸入前不生成任何想法(`--skip-preflight` 例外,顯示錨定警告)
104
+
92
105
  #### FRAME Phase
93
- 1. 釐清問題陳述(使用 5 Whys 或 HMW)
94
- 2. 確認問題定義
106
+ 1. 釐清問題陳述(5 Whys 找根因)
107
+ 2. 重構為 HMW 問題;識別利害關係人
95
108
 
96
109
  🛑 **STOP**: 問題定義後等待使用者確認
97
110
 
98
111
  #### DIVERGE Phase
99
- 1. 使用選定技法生成想法
100
- 2. 鼓勵數量優先於品質
101
- 3. 列出所有想法
112
+ 1. 逐一以預設 persona(領域專家/懷疑者/跨域類比者/成本約束者/使用者代言)思維鏈生成想法
113
+ 2. **分支隔離**:生成各 persona 時不互相預覽,全部產完才一起呈現
114
+ 3. 至少套用一個多樣性透鏡(類比/假設反轉/形態矩陣)
115
+ 4. 以多樣性(覆蓋的 persona/透鏡數)而非數量為繼續門檻
102
116
 
103
117
  #### CONVERGE Phase
104
- 1. 以評估矩陣(可行性、影響力、成本)評分
105
- 2. 排序前 3
118
+ 1. 以 3 個獨立評審(工程可行性/使用者影響/策略一致)各自評分後聚合
119
+ 2. 對前 3 名跑硬角色 Devil's Advocate(論證會失敗)+ Steelman;使用者以 (a)修改/(b)反駁/(c)移除 回應
120
+ 3. 排序並標記通過反駁的想法
106
121
 
107
122
  🛑 **STOP**: 展示 Brainstorm Report 後等待使用者決定下一步
108
123
 
@@ -110,7 +125,9 @@ After brainstorming, the typical workflow is:
110
125
 
111
126
  | Stop Point | 等待內容 |
112
127
  |-----------|---------|
128
+ | PRE-FLIGHT 提交前 | 收到使用者三項輸入 |
113
129
  | 問題定義後 | 確認問題正確 |
130
+ | 反駁輪每個反對理由 | 使用者 (a)/(b)/(c) 回應 |
114
131
  | 報告展示後 | 決定進入 `/requirement` 或 `/sdd` |
115
132
 
116
133
  ### Error Handling | 錯誤處理
@@ -118,10 +135,14 @@ After brainstorming, the typical workflow is:
118
135
  | Error Condition | AI Action |
119
136
  |-----------------|-----------|
120
137
  | 主題太廣泛 | 引導縮小範圍 |
121
- | 指定的技法不存在 | 列出可用技法供選擇 |
138
+ | 使用「像 X 但給 Y」種子 | 改寫為底層問題再繼續(反種子 guardrail) |
139
+ | 指定的 persona/透鏡不存在 | 列出可用選項供選擇 |
140
+ | `--enhanced` 但宿主不支援子代理 | 靜默退回 baseline,照常進行 |
141
+ | 前 3 名全來自同一 persona/透鏡 | 標示並在輸出前再跑一個透鏡 |
122
142
 
123
143
  ## References | 參考
124
144
 
125
145
  * [Brainstorm Assistant Skill](../brainstorm-assistant/SKILL.md)
146
+ * [Brainstorm Assistant Guide](../brainstorm-assistant/guide.md)
126
147
  * [Requirement Assistant](../requirement-assistant/SKILL.md)
127
148
  * [Spec-Driven Development](../spec-driven-dev/SKILL.md)
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  [UDS] Guide contract testing strategy for APIs and microservices.
6
6
  Use when: API contracts, microservices, consumer-driven testing, provider verification.
7
- Keywords: contract test, Pact, OpenAPI, consumer-driven, provider, 合約測試, API 合約.
7
+ Keywords: contract test, Pact, OpenAPI, consumer-driven, provider.
8
8
  allowed-tools: Read, Write, Glob, Grep
9
9
  argument-hint: "[verify | consumer | provider | 策略選擇]"
10
10
  ---
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Guide database design, migration, and query optimization.
6
6
  Use when: schema design, migration planning, query optimization, index strategy.
7
- Keywords: database, schema, migration, SQL, index, query, 資料庫, 遷移, 查詢.
7
+ Keywords: database, schema, migration, SQL, index, query.
8
8
  allowed-tools: Read, Grep, Glob
9
9
  argument-hint: "[schema or migration to review | 要審查的 schema 或遷移]"
10
10
  ---
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Guide reliable deployments without CI/CD platforms (GitHub Actions / GitLab CI).
6
6
  Use when: deploying to VPS, air-gapped servers, or environments without CI/CD infrastructure.
7
- Keywords: deployment, no-cicd, shell script, blue-green, smoke test, rollback, 無CI/CD, 部署.
7
+ Keywords: deployment, no-cicd, shell script, blue-green, smoke test, rollback.
8
8
  allowed-tools: Read, Bash(cat VERSION:*), Bash(git describe:*), Bash(which nginx:*), Bash(which rsync:*)
9
9
  argument-hint: "[project type | 專案類型: node/python/docker/go]"
10
10
  ---
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Guide documentation structure, content requirements, and project documentation best practices.
6
6
  Use when: creating README, documentation, docs folder, project setup, technical docs.
7
- Keywords: README, docs, documentation, CONTRIBUTING, CHANGELOG, ARCHITECTURE, API docs, 文件, 說明文件, 技術文件.
7
+ Keywords: README, docs, documentation, CONTRIBUTING, CHANGELOG, ARCHITECTURE, API docs.
8
8
  ---
9
9
 
10
10
  # Documentation Guide
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Design consistent error codes following the PREFIX_CATEGORY_NUMBER format.
6
6
  Use when: defining error codes, creating error handling, designing APIs.
7
- Keywords: error code, error handling, error format, API errors, 錯誤碼, 錯誤處理.
7
+ Keywords: error code, error handling, error format, API errors.
8
8
  ---
9
9
 
10
10
  # Error Code Guide
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Guide Git branching strategies, branch naming, and merge operations.
6
6
  Use when: creating branches, merging, pull requests, Git workflow questions.
7
- Keywords: branch, merge, PR, pull request, GitFlow, GitHub Flow, 分支, 合併, 工作流程.
7
+ Keywords: branch, merge, PR, pull request, GitFlow, GitHub Flow.
8
8
  ---
9
9
 
10
10
  # Git Workflow Guide
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Guide incident response, root cause analysis, and post-mortem documentation.
6
6
  Use when: production incident, outage response, post-mortem writing, RCA.
7
- Keywords: incident, outage, post-mortem, RCA, root cause, 事故, 故障, 根因分析.
7
+ Keywords: incident, outage, post-mortem, RCA, root cause.
8
8
  allowed-tools: Read, Write, Grep, Glob
9
9
  argument-hint: "[incident description or severity | 事故描述或嚴重程度]"
10
10
  ---
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: journey-test-assistant
3
3
  scope: partial
4
- description: "[UDS] 從專案描述生成連貫使用者旅程測試計畫(TESTPLAN)與 E2E 骨架"
4
+ description: "[UDS] Generate coherent user journey test plans (TESTPLAN) and E2E skeletons from project description."
5
5
  allowed-tools: Read, Write, Grep, Glob
6
6
  argument-hint: "[project description | --analyze | --archetype A1|A2|A3]"
7
7
  status: stable
@@ -0,0 +1,58 @@
1
+ ---
2
+ name: knowledge-graph
3
+ scope: partial
4
+ description: "[UDS] Trace spec/decision/code impact chains via a knowledge graph (engine or Markdown fallback)"
5
+ allowed-tools: Read, Glob, Grep, Bash(curl:*)
6
+ argument-hint: "[artifact id, e.g. XSPEC-205 | 產物 id]"
7
+ ---
8
+
9
+ # Knowledge Graph | 知識圖
10
+
11
+ > **Language**: English | [繁體中文](../../locales/zh-TW/skills/knowledge-graph/SKILL.md)
12
+
13
+ Answer structural questions across specs, decisions, and code — *"what is the full impact chain of XSPEC-205?"* — using the [Knowledge Graph Memory](../../core/knowledge-graph-memory.md) relationship schema. Works with or without a graph engine.
14
+
15
+ 回答橫跨規格、決策與程式碼的結構性問題——*「XSPEC-205 的完整影響鏈是什麼?」*——依據[知識圖記憶標準](../../core/knowledge-graph-memory.md)的關係 schema。有無圖引擎皆可運作。
16
+
17
+ > **Implements**: XSPEC-237 Phase 5 — knowledge-graph skill (EngramGraph opt-in)
18
+
19
+ ## Mode Selection | 模式選擇
20
+
21
+ Detect which mode to use **before** answering:
22
+
23
+ | Condition | Mode |
24
+ |-----------|------|
25
+ | `ENGRAM_URL` set, or a local graph engine responds on `/health` | Service mode (engine) |
26
+ | Otherwise | Degraded mode (Markdown) |
27
+
28
+ ## Workflow | 工作流程
29
+
30
+ 1. **Resolve the target** — normalise the argument to a canonical id (`XSPEC-205`, `DEC-062`, a function name).
31
+ 2. **Choose mode** — probe for a graph engine (service) else fall back (degraded).
32
+ 3. **Service mode (AC-5b)** — issue a single multi-hop query and present the returned chain, including cross-domain links (code → spec → decision):
33
+ ```bash
34
+ curl -s -X POST "$ENGRAM_URL/graph/impact-analysis" \
35
+ -H 'content-type: application/json' \
36
+ -d '{"nodeId":"XSPEC-205","maxHops":3}'
37
+ ```
38
+ 4. **Degraded mode (AC-5a)** — with no engine, read the target document, follow its `impacts`/`impacted_by`/`supersedes`/`related` front-matter and inline `[[ref]]` links by reading the linked files, and assemble the chain manually (bounded by reading depth).
39
+ 5. **Present the chain** — list the connected Specs and Decisions, the edge type for each hop, and (if present) each node's `confidence`, highest first.
40
+ 6. **State the mode used** — always say whether the answer came from the engine or Markdown fallback, so completeness is clear.
41
+
42
+ ## Relationship Schema | 關係 schema
43
+
44
+ See [knowledge-graph-memory](../../core/knowledge-graph-memory.md). Front-matter fields: `related`, `impacts`, `impacted_by`, `supersedes`, `implements`. Edge derivation: Decision `impacts` Spec → IMPACTS; Decision `supersedes` Decision → SUPERSEDES.
45
+
46
+ 關係欄位與邊推導見[知識圖記憶標準](../../core/knowledge-graph-memory.md)。
47
+
48
+ ## Next Steps Guidance | 下一步引導
49
+
50
+ - If degraded mode hit a reading-depth limit, tell the user a graph engine (e.g. EngramGraph) would give a complete chain, and how to set `ENGRAM_URL`.
51
+ - If a referenced id was not found, surface it as a dangling reference to fix.
52
+ - Offer to add missing `impacts`/`impacted_by` front-matter to the documents you traversed.
53
+
54
+ ## Reference | 參考
55
+
56
+ - Standard: [core/knowledge-graph-memory.md](../../core/knowledge-graph-memory.md)
57
+ - Engine (opt-in): [EngramGraph](https://github.com/AsiaOstrich/EngramGraph) — `engramgraph`
58
+ - Detailed guide: [guide.md](guide.md)
@@ -0,0 +1,69 @@
1
+ # Knowledge Graph — Detailed Guide | 詳細指南
2
+
3
+ Companion to [SKILL.md](SKILL.md). Worked examples of both operating modes and the engine API.
4
+
5
+ [SKILL.md](SKILL.md) 的配套說明。兩種運作模式的範例與引擎 API。
6
+
7
+ ---
8
+
9
+ ## 1. Service Mode (graph engine) | 服務模式
10
+
11
+ When an EngramGraph-compatible engine is reachable, a single query returns the full chain.
12
+
13
+ ### Impact analysis | 影響分析
14
+
15
+ ```bash
16
+ curl -s -X POST "$ENGRAM_URL/graph/impact-analysis" \
17
+ -H 'content-type: application/json' \
18
+ -d '{"nodeId":"XSPEC-205","maxHops":3}'
19
+ # => { "nodeId": "XSPEC-205",
20
+ # "decisions": [ {"id":"DEC-062","title":"...","via":"direct"},
21
+ # {"id":"DEC-069","title":"...","via":"supersedes"} ] }
22
+ ```
23
+
24
+ `via: "direct"` means the decision IMPACTS the spec directly; `via: "supersedes"` means it reaches the spec through a SUPERSEDES chain (≤ `maxHops`).
25
+
26
+ ### Confidence feedback (SAGE) | 信心回饋
27
+
28
+ ```bash
29
+ curl -s -X POST "$ENGRAM_URL/graph/ingest" \
30
+ -H 'content-type: application/json' \
31
+ -d '{"type":"test_fail","functionId":"src/a.ts#execute"}'
32
+ ```
33
+
34
+ Lowers the node's confidence; reads then surface higher-confidence nodes first.
35
+
36
+ ---
37
+
38
+ ## 2. Degraded Mode (Markdown only) | 降級模式
39
+
40
+ No engine required. Reconstruct the chain by reading files:
41
+
42
+ 1. Read the target document (e.g. `XSPEC-205`).
43
+ 2. Collect ids from its front-matter (`impacts`, `impacted_by`, `supersedes`, `related`) and inline `[[ref]]` links.
44
+ 3. For each id, read that document and repeat up to the desired hop depth.
45
+ 4. Classify each id by prefix (`XSPEC-*`/`SPEC-*` → Spec; `DEC-*`/`ADR-*` → Decision) and report the edges.
46
+
47
+ ```bash
48
+ # find the documents
49
+ grep -rl "id: XSPEC-205" --include='*.md' .
50
+ # discover outbound references
51
+ grep -nE "(impacts|impacted_by|supersedes|related):|\[\[(XSPEC|DEC|ADR)-" path/to/XSPEC-205.md
52
+ ```
53
+
54
+ Degraded mode is always correct but bounded by how many files you read; cross-domain code links (function → spec) are usually only available in service mode.
55
+
56
+ ---
57
+
58
+ ## 3. Equivalence | 等價性
59
+
60
+ Both modes produce the **same answer shape** (a list of connected Specs/Decisions with edge types). Service mode is faster and more complete (it can include code→spec→decision hops); degraded mode is the universal fallback. Always tell the user which mode produced the answer.
61
+
62
+ 兩種模式產生**相同形狀的答案**。服務模式更快更完整;降級模式為通用後備。務必告知使用者答案來自哪種模式。
63
+
64
+ ---
65
+
66
+ ## Reference | 參考
67
+
68
+ - [core/knowledge-graph-memory.md](../../core/knowledge-graph-memory.md)
69
+ - [EngramGraph](https://github.com/AsiaOstrich/EngramGraph)
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Implement structured logging with proper log levels and sensitive data handling.
6
6
  Use when: adding logging, debugging, setting up observability.
7
- Keywords: logging, log level, structured logging, observability, 日誌, 記錄, 結構化日誌.
7
+ Keywords: logging, log level, structured logging, observability.
8
8
  ---
9
9
 
10
10
  # Logging Guide
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Guide observability setup, metrics design, and alerting configuration.
6
6
  Use when: new service instrumentation, SLO definition, alert design, maturity assessment.
7
- Keywords: observability, metrics, traces, golden signals, alerting, SLO, 可觀測性, 告警.
7
+ Keywords: observability, metrics, traces, golden signals, alerting, SLO.
8
8
  allowed-tools: Read, Write, Grep, Glob
9
9
  argument-hint: "[service name or observability topic | 服務名稱或可觀測性主題]"
10
10
  ---
@@ -5,7 +5,7 @@ scope: universal
5
5
  description: |
6
6
  Orchestrate multi-task execution plans using Claude's native Agent tool (DAG-based, no external engine).
7
7
  Use when: executing a plan.json file with parallel/sequential task dependencies.
8
- Keywords: orchestrate, plan, execute, DAG, task plan, 編排, 執行計畫, 並行.
8
+ Keywords: orchestrate, plan, execute, DAG, task plan.
9
9
  argument-hint: "<plan.json> [--dry-run]"
10
10
  ---
11
11
 
@@ -5,7 +5,7 @@ scope: universal
5
5
  description: |
6
6
  Generate plan.json from Spec documents, OpenSpec changes, or free-text requirements.
7
7
  Use when: converting specifications into executable task plans for /orchestrate.
8
- Keywords: plan, spec, task plan, 計畫, 規格, 任務, plan.json, DAG.
8
+ Keywords: plan, spec, task plan, plan.json, DAG.
9
9
  argument-hint: "[spec-file.md | openspec-dir/ | \"requirement text\" | (interactive)]"
10
10
  ---
11
11
 
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Guide pull request creation, review automation, and merge strategies.
6
6
  Use when: creating PRs, automating reviews, configuring merge policies.
7
- Keywords: pull request, PR, merge, review, GitHub, GitLab, 合併請求, 審查.
7
+ Keywords: pull request, PR, merge, review, GitHub, GitLab.
8
8
  allowed-tools: Read, Grep, Glob, Bash(git:*, gh:*)
9
9
  argument-hint: "[branch name or PR number | 分支名稱或 PR 編號]"
10
10
  ---
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Guide for organizing project directories following language-specific best practices.
6
6
  Use when: creating projects, reorganizing structure, adding modules, setting up builds, deciding file placement.
7
- Keywords: project, structure, directory, layout, gitignore, scaffold, 專案結構, 目錄, file placement, utils, helpers, shared, where to put, 檔案歸檔.
7
+ Keywords: project, structure, directory, layout, gitignore, scaffold, file placement, utils, helpers, shared, where to put.
8
8
  ---
9
9
 
10
10
  # Project Structure Guide
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  AI-assisted safety layer for git push operations with quality gates and collaboration guardrails.
6
6
  Use when: pushing commits, force pushing, pushing to protected branches, pushing feature branches.
7
- Keywords: git push, force push, protected branch, quality gate, push receipt, PR automation, 推送, 保護分支, 品質閘門.
7
+ Keywords: git push, force push, protected branch, quality gate, push receipt, PR automation.
8
8
  allowed-tools: Read, Bash(git:*), Bash(npm:*), Bash(pnpm:*), Bash(yarn:*), Bash(bun:*)
9
9
  argument-hint: "[--force] [--target <branch>] [--skip-gates] [--no-pr]"
10
10
  ---
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  [UDS] Guide structured team retrospectives for Sprint and Release cycles.
6
6
  Use when: sprint end, release post-mortem, iteration review, process improvement.
7
- Keywords: retrospective, retro, sprint review, lessons learned, action items, 回顧, 檢討, 持續改善.
7
+ Keywords: retrospective, retro, sprint review, lessons learned, action items.
8
8
  allowed-tools: Read, Write, Glob, Grep
9
9
  argument-hint: "[sprint | release | actions | --technique starfish]"
10
10
  ---
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: reverse
3
3
  scope: partial
4
- description: "[UDS] System archeology reverse engineer code across Logic, Data, and Runtime dimensions"
4
+ description: "[UDS] System archeology - reverse engineer code across Logic, Data, and Runtime dimensions"
5
5
  allowed-tools: Read, Grep, Glob, Bash(pg_dump:*), Bash(mysql:*), Bash(sqlite3:*), Bash(npm run:*), Bash(cat:*), Bash(docker:*)
6
6
  argument-hint: "[spec|data|runtime|bdd|tdd] <input>"
7
7
  disable-model-invocation: true
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Guide runbook creation, maintenance, and drill exercises.
6
6
  Use when: writing runbooks, planning drills, auditing runbook coverage, post-incident runbook updates.
7
- Keywords: runbook, operations, drill, on-call, procedure, 操作手冊, 演練.
7
+ Keywords: runbook, operations, drill, on-call, procedure.
8
8
  allowed-tools: Read, Write, Grep, Glob
9
9
  argument-hint: "[create|drill|coverage] [alert name or type | 告警名稱或類型]"
10
10
  ---
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Guide security review and vulnerability assessment following OWASP standards.
6
6
  Use when: security audit, vulnerability check, secure coding review, threat modeling.
7
- Keywords: security, OWASP, vulnerability, authentication, authorization, 安全, 漏洞, 認證.
7
+ Keywords: security, OWASP, vulnerability, authentication, authorization.
8
8
  allowed-tools: Read, Grep, Glob
9
9
  argument-hint: "[module or file to audit | 要審計的模組或檔案]"
10
10
  ---
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Guide automated security scanning, dependency auditing, and secret detection.
6
6
  Use when: dependency audit, CVE scanning, secret detection, license compliance.
7
- Keywords: scan, audit, CVE, dependency, secret, SBOM, vulnerability, 掃描, 漏洞.
7
+ Keywords: scan, audit, CVE, dependency, secret, SBOM, vulnerability.
8
8
  allowed-tools: Read, Grep, Glob, Bash(npm:audit, npx:*)
9
9
  argument-hint: "[scan type or target | 掃描類型或目標]"
10
10
  ---
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Guide SLI selection, SLO setting, and Error Budget management.
6
6
  Use when: defining service quality targets, setting up SLO-based alerting, Error Budget policy.
7
- Keywords: SLI, SLO, SLA, Error Budget, burn rate, service level, 服務等級.
7
+ Keywords: SLI, SLO, SLA, Error Budget, burn rate, service level.
8
8
  allowed-tools: Read, Write, Grep, Glob
9
9
  argument-hint: "[create|review|budget] [service name | 服務名稱]"
10
10
  ---
@@ -4,7 +4,7 @@ scope: universal
4
4
  description: |
5
5
  Scan codebase for debug artifacts and code quality issues; optionally auto-fix safe patterns.
6
6
  Use when: before committing, during PR review, or periodic codebase cleanup.
7
- Keywords: sweep, debug cleanup, console.log, debugger, TODO, ts-any, code quality, 掃描, 清理.
7
+ Keywords: sweep, debug cleanup, console.log, debugger, TODO, ts-any, code quality.
8
8
  allowed-tools: Read, Grep, Glob, Bash(find:*), Edit, Write
9
9
  argument-hint: "[--fix] [--report] [--path <dir>] [--exclude <pattern>]"
10
10
  ---
@@ -5,7 +5,7 @@ description: |
5
5
  Testing pyramid and test writing standards for UT/IT/ST/E2E.
6
6
  Supports ISTQB and Industry Pyramid frameworks.
7
7
  Use when: writing tests, discussing test coverage, test strategy, or test naming.
8
- Keywords: test, unit, integration, e2e, coverage, mock, ISTQB, SIT, 測試, 單元, 整合, 端對端.
8
+ Keywords: test, unit, integration, e2e, coverage, mock, ISTQB, SIT.
9
9
  ---
10
10
 
11
11
  # Testing Guide
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-dev-standards",
3
- "version": "5.14.0",
3
+ "version": "5.16.0",
4
4
  "description": "CLI tool for adopting Universal Development Standards",
5
5
  "keywords": [
6
6
  "documentation",
@@ -70,7 +70,7 @@
70
70
  "@vitest/coverage-v8": "^4.1.5",
71
71
  "ajv": "^8.20.0",
72
72
  "ajv-formats": "^3.0.1",
73
- "eslint": "10.4.0",
73
+ "eslint": "10.4.1",
74
74
  "glob": "^13.0.1",
75
75
  "globals": "17.6.0",
76
76
  "husky": "^9.1.7",
@@ -38,6 +38,7 @@ import { StandardValidator } from '../utils/standard-validator.js';
38
38
  import { WorkflowGate } from '../utils/workflow-gate.js';
39
39
  import { t, setLanguage, isLanguageExplicitlySet } from '../i18n/messages.js';
40
40
  import { guardAgainstSelfAdoption } from '../utils/detect-self-adoption.js';
41
+ import { lintAll as lintI18nAll, partitionFindings as partitionI18nFindings } from '../lint/i18n.js';
41
42
 
42
43
  /**
43
44
  * Display the summary of file integrity status
@@ -243,6 +244,15 @@ function displayAdoptionStatus(manifest, msg, common, repoInfo) {
243
244
  export async function checkCommand(options = {}) {
244
245
  const projectPath = process.cwd();
245
246
 
247
+ // Handle --i18n option early — i18n lint is meant to be runnable both
248
+ // inside UDS source (lint canonical + locale variants) and inside
249
+ // adopter projects (lint installed locale variants). It does not require
250
+ // adoption-drift checks, so we short-circuit before guardAgainstSelfAdoption.
251
+ if (options.i18n) {
252
+ await runI18nLint(projectPath, options);
253
+ return;
254
+ }
255
+
246
256
  // Refuse to run inside the UDS source repo itself.
247
257
  // See DEC-044 / XSPEC-071 — adoption-drift check makes no sense for the
248
258
  // source repo. `--force` bypasses (e.g. private forks of UDS).
@@ -1837,3 +1847,73 @@ function displayWorkflowStatus(projectPath) {
1837
1847
  // Silently skip if workflow gate not available
1838
1848
  }
1839
1849
  }
1850
+
1851
+ // ============================================================
1852
+ // i18n Lint (XSPEC-239 — P1-CLI-5)
1853
+ // ============================================================
1854
+
1855
+ /**
1856
+ * Run i18n lint across canonical + locale variants and print findings.
1857
+ * Exits 1 if any error-level findings are detected.
1858
+ *
1859
+ * @param {string} projectPath
1860
+ * @param {object} options - CLI options (currently honors options.json)
1861
+ */
1862
+ async function runI18nLint(projectPath, options = {}) {
1863
+ const findings = lintI18nAll({ projectPath });
1864
+ const { errors, warnings, infos } = partitionI18nFindings(findings);
1865
+
1866
+ if (options.json) {
1867
+ console.log(JSON.stringify({
1868
+ summary: {
1869
+ errors: errors.length,
1870
+ warnings: warnings.length,
1871
+ infos: infos.length,
1872
+ },
1873
+ findings,
1874
+ }, null, 2));
1875
+ if (errors.length > 0) process.exitCode = 1;
1876
+ return;
1877
+ }
1878
+
1879
+ console.log();
1880
+ console.log(chalk.bold('UDS i18n Lint (XSPEC-239)'));
1881
+ console.log(chalk.gray('─'.repeat(50)));
1882
+ console.log();
1883
+
1884
+ if (findings.length === 0) {
1885
+ console.log(chalk.green(' ✓ No i18n violations found.'));
1886
+ console.log();
1887
+ return;
1888
+ }
1889
+
1890
+ // Display errors first
1891
+ for (const f of errors) {
1892
+ console.log(chalk.red(` ✗ [${f.rule}]`));
1893
+ console.log(chalk.red(` ${f.file}:${f.line}`));
1894
+ console.log(chalk.gray(` ${f.message}`));
1895
+ console.log();
1896
+ }
1897
+ for (const f of warnings) {
1898
+ console.log(chalk.yellow(` ⚠ [${f.rule}]`));
1899
+ console.log(chalk.yellow(` ${f.file}:${f.line}`));
1900
+ console.log(chalk.gray(` ${f.message}`));
1901
+ console.log();
1902
+ }
1903
+
1904
+ // Info findings are collapsed to a summary line to avoid flooding output
1905
+ // (e.g. many locale files still lack source_hash). They never fail the gate.
1906
+ if (infos.length > 0) {
1907
+ console.log(chalk.cyan(` ℹ ${infos.length} locale file(s) lack source_hash — silent content drift cannot be detected for them.`));
1908
+ console.log(chalk.gray(' Stamp source_hash (sha256[:12] of canonical) when a locale is verified in sync to enable detection.'));
1909
+ console.log();
1910
+ }
1911
+
1912
+ console.log(chalk.gray('─'.repeat(50)));
1913
+ console.log(` ${chalk.red('Errors:')} ${errors.length} ${chalk.yellow('Warnings:')} ${warnings.length} ${chalk.cyan('Info:')} ${infos.length}`);
1914
+ console.log();
1915
+
1916
+ if (errors.length > 0) {
1917
+ process.exitCode = 1;
1918
+ }
1919
+ }