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.
Files changed (213) hide show
  1. package/bin/uds.js +19 -2
  2. package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +14 -2
  3. package/bundled/ai/standards/adr-standards.ai.yaml +14 -2
  4. package/bundled/ai/standards/ai-instruction-standards.ai.yaml +6 -6
  5. package/bundled/ai/standards/code-review.ai.yaml +13 -3
  6. package/bundled/ai/standards/commit-message.ai.yaml +8 -4
  7. package/bundled/ai/standards/deferred-item-exit.ai.yaml +225 -0
  8. package/bundled/ai/standards/feature-discovery-standards.ai.yaml +14 -2
  9. package/bundled/ai/standards/governance-layer.ai.yaml +128 -2
  10. package/bundled/ai/standards/logging.ai.yaml +2 -2
  11. package/bundled/ai/standards/retrospective-standards.ai.yaml +14 -2
  12. package/bundled/ai/standards/reverse-engineering-standards.ai.yaml +73 -2
  13. package/bundled/ai/standards/security-standards.ai.yaml +2 -2
  14. package/bundled/ai/standards/spec-driven-development.ai.yaml +14 -2
  15. package/bundled/ai/standards/tech-debt-standards.ai.yaml +87 -3
  16. package/bundled/ai/standards/turn-completion-integrity.ai.yaml +131 -0
  17. package/bundled/core/acceptance-criteria-traceability.md +5 -2
  18. package/bundled/core/adr-standards.md +26 -2
  19. package/bundled/core/ai-instruction-standards.md +9 -7
  20. package/bundled/core/code-review-checklist.md +5 -2
  21. package/bundled/core/context-aware-loading.md +1 -1
  22. package/bundled/core/deferred-item-exit.md +254 -0
  23. package/bundled/core/feature-discovery-standards.md +5 -1
  24. package/bundled/core/governance-layer.md +114 -2
  25. package/bundled/core/retrospective-standards.md +4 -2
  26. package/bundled/core/reverse-engineering-standards.md +81 -2
  27. package/bundled/core/spec-driven-development.md +8 -2
  28. package/bundled/core/tech-debt-standards.md +67 -8
  29. package/bundled/core/turn-completion-integrity.md +196 -0
  30. package/bundled/hooks/check-dangerous-cmd.mjs +60 -0
  31. package/bundled/hooks/check-logging-standard.mjs +59 -0
  32. package/bundled/hooks/check-turn-completion.mjs +233 -0
  33. package/bundled/hooks/inject-standards.mjs +183 -0
  34. package/bundled/hooks/telemetry-wrapper.mjs +77 -0
  35. package/bundled/hooks/turn-completion/detect.mjs +99 -0
  36. package/bundled/hooks/turn-completion/locales/en.mjs +159 -0
  37. package/bundled/hooks/turn-completion/locales/zh-TW.mjs +166 -0
  38. package/bundled/hooks/validate-commit-msg.mjs +104 -0
  39. package/bundled/locales/zh-CN/CHANGELOG.md +65 -3
  40. package/bundled/locales/zh-CN/CLAUDE.md +1 -1
  41. package/bundled/locales/zh-CN/README.md +7 -7
  42. package/bundled/locales/zh-CN/SECURITY.md +1 -1
  43. package/bundled/locales/zh-CN/core/adr-standards.md +1 -1
  44. package/bundled/locales/zh-CN/core/ai-instruction-standards.md +10 -8
  45. package/bundled/locales/zh-CN/core/governance-layer.md +118 -6
  46. package/bundled/locales/zh-CN/core/retrospective-standards.md +1 -1
  47. package/bundled/locales/zh-CN/core/tech-debt-standards.md +71 -4
  48. package/bundled/locales/zh-CN/core/turn-completion-integrity.md +190 -0
  49. package/bundled/locales/zh-CN/docs/CHEATSHEET.md +27 -6
  50. package/bundled/locales/zh-CN/docs/CLI-INIT-OPTIONS.md +29 -68
  51. package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +172 -24
  52. package/bundled/locales/zh-CN/docs/USAGE-MODES-COMPARISON.md +1 -2
  53. package/bundled/locales/zh-CN/integrations/google-antigravity/{INSTRUCTIONS.md → AGENTS.md} +1 -1
  54. package/bundled/locales/zh-CN/integrations/google-antigravity/README.md +3 -3
  55. package/bundled/locales/zh-CN/skills/agents/README.md +1 -1
  56. package/bundled/locales/zh-CN/skills/atdd-assistant/SKILL.md +2 -0
  57. package/bundled/locales/zh-CN/skills/bdd-assistant/SKILL.md +2 -0
  58. package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +22 -12
  59. package/bundled/locales/zh-CN/skills/brainstorm-assistant/guide.md +12 -9
  60. package/bundled/locales/zh-CN/skills/code-review-assistant/SKILL.md +1 -0
  61. package/bundled/locales/zh-CN/skills/commands/brainstorm.md +17 -13
  62. package/bundled/locales/zh-CN/skills/commands/config.md +0 -1
  63. package/bundled/locales/zh-CN/skills/commands/init.md +1 -2
  64. package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +2 -0
  65. package/bundled/locales/zh-CN/skills/contract-test-assistant/SKILL.md +1 -0
  66. package/bundled/locales/zh-CN/skills/dev-methodology/SKILL.md +2 -0
  67. package/bundled/locales/zh-CN/skills/observability-assistant/SKILL.md +1 -0
  68. package/bundled/locales/zh-CN/skills/project-structure-guide/SKILL.md +1 -0
  69. package/bundled/locales/zh-CN/skills/release-standards/SKILL.md +3 -0
  70. package/bundled/locales/zh-CN/skills/requirement-assistant/SKILL.md +2 -0
  71. package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +3 -0
  72. package/bundled/locales/zh-CN/skills/reverse-engineer/tdd-analysis.md +13 -23
  73. package/bundled/locales/zh-CN/skills/runbook-assistant/SKILL.md +1 -0
  74. package/bundled/locales/zh-CN/skills/slo-assistant/SKILL.md +1 -0
  75. package/bundled/locales/zh-CN/skills/tdd-assistant/SKILL.md +2 -0
  76. package/bundled/locales/zh-CN/skills/workflows/README.md +2 -11
  77. package/bundled/locales/zh-TW/CHANGELOG.md +65 -3
  78. package/bundled/locales/zh-TW/CLAUDE.md +1 -1
  79. package/bundled/locales/zh-TW/README.md +7 -7
  80. package/bundled/locales/zh-TW/SECURITY.md +1 -1
  81. package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +2 -0
  82. package/bundled/locales/zh-TW/core/adr-standards.md +26 -5
  83. package/bundled/locales/zh-TW/core/ai-instruction-standards.md +10 -8
  84. package/bundled/locales/zh-TW/core/code-review-checklist.md +2 -0
  85. package/bundled/locales/zh-TW/core/container-image-standards.md +2 -2
  86. package/bundled/locales/zh-TW/core/contract-testing-standards.md +2 -2
  87. package/bundled/locales/zh-TW/core/cross-flow-regression.md +8 -7
  88. package/bundled/locales/zh-TW/core/data-contract.md +2 -2
  89. package/bundled/locales/zh-TW/core/data-migration-testing.md +2 -2
  90. package/bundled/locales/zh-TW/core/data-pipeline.md +2 -2
  91. package/bundled/locales/zh-TW/core/deferred-item-exit.md +251 -0
  92. package/bundled/locales/zh-TW/core/documentation-writing-standards.md +228 -3
  93. package/bundled/locales/zh-TW/core/full-coverage-testing.md +15 -2
  94. package/bundled/locales/zh-TW/core/governance-layer.md +118 -5
  95. package/bundled/locales/zh-TW/core/iac-design-principles.md +2 -2
  96. package/bundled/locales/zh-TW/core/incident-response.md +2 -2
  97. package/bundled/locales/zh-TW/core/model-provenance.md +4 -2
  98. package/bundled/locales/zh-TW/core/pii-classification.md +42 -6
  99. package/bundled/locales/zh-TW/core/prd-standards.md +4 -2
  100. package/bundled/locales/zh-TW/core/product-metrics-standards.md +4 -2
  101. package/bundled/locales/zh-TW/core/release-readiness-gate.md +2 -2
  102. package/bundled/locales/zh-TW/core/resource-cost-boundary.md +2 -2
  103. package/bundled/locales/zh-TW/core/retrospective-standards.md +5 -3
  104. package/bundled/locales/zh-TW/core/reverse-engineering-standards.md +83 -5
  105. package/bundled/locales/zh-TW/core/runbook.md +2 -2
  106. package/bundled/locales/zh-TW/core/schema-evolution.md +2 -2
  107. package/bundled/locales/zh-TW/core/secret-management-standards.md +2 -2
  108. package/bundled/locales/zh-TW/core/slo-sli.md +2 -2
  109. package/bundled/locales/zh-TW/core/spec-driven-development.md +2 -0
  110. package/bundled/locales/zh-TW/core/tech-debt-standards.md +71 -4
  111. package/bundled/locales/zh-TW/core/turn-completion-integrity.md +190 -0
  112. package/bundled/locales/zh-TW/core/user-journey-testing.md +2 -2
  113. package/bundled/locales/zh-TW/core/user-story-mapping.md +2 -2
  114. package/bundled/locales/zh-TW/core/verification-oracle.md +2 -2
  115. package/bundled/locales/zh-TW/docs/CHEATSHEET.md +27 -6
  116. package/bundled/locales/zh-TW/docs/CLI-INIT-OPTIONS.md +29 -68
  117. package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +172 -24
  118. package/bundled/locales/zh-TW/docs/USAGE-MODES-COMPARISON.md +1 -2
  119. package/bundled/locales/zh-TW/integrations/google-antigravity/{INSTRUCTIONS.md → AGENTS.md} +1 -1
  120. package/bundled/locales/zh-TW/integrations/google-antigravity/README.md +3 -3
  121. package/bundled/locales/zh-TW/skills/adr-assistant/SKILL.md +1 -1
  122. package/bundled/locales/zh-TW/skills/agents/README.md +1 -1
  123. package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +2 -0
  124. package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +2 -0
  125. package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +22 -12
  126. package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +12 -9
  127. package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +1 -0
  128. package/bundled/locales/zh-TW/skills/commands/brainstorm.md +17 -13
  129. package/bundled/locales/zh-TW/skills/commands/config.md +0 -1
  130. package/bundled/locales/zh-TW/skills/commands/init.md +1 -2
  131. package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +2 -0
  132. package/bundled/locales/zh-TW/skills/contract-test-assistant/SKILL.md +2 -1
  133. package/bundled/locales/zh-TW/skills/dev-methodology/SKILL.md +2 -0
  134. package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +1 -1
  135. package/bundled/locales/zh-TW/skills/knowledge-graph/guide.md +2 -2
  136. package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +1 -1
  137. package/bundled/locales/zh-TW/skills/observability-assistant/SKILL.md +1 -0
  138. package/bundled/locales/zh-TW/skills/project-discovery/SKILL.md +1 -0
  139. package/bundled/locales/zh-TW/skills/project-structure-guide/SKILL.md +1 -0
  140. package/bundled/locales/zh-TW/skills/release-standards/SKILL.md +3 -0
  141. package/bundled/locales/zh-TW/skills/requirement-assistant/SKILL.md +2 -0
  142. package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +3 -0
  143. package/bundled/locales/zh-TW/skills/reverse-engineer/tdd-analysis.md +13 -23
  144. package/bundled/locales/zh-TW/skills/runbook-assistant/SKILL.md +1 -0
  145. package/bundled/locales/zh-TW/skills/slo-assistant/SKILL.md +1 -0
  146. package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +2 -0
  147. package/bundled/locales/zh-TW/skills/workflows/README.md +2 -11
  148. package/bundled/skills/agents/README.md +1 -1
  149. package/bundled/skills/atdd-assistant/SKILL.md +2 -0
  150. package/bundled/skills/bdd-assistant/SKILL.md +2 -0
  151. package/bundled/skills/brainstorm-assistant/SKILL.md +31 -13
  152. package/bundled/skills/brainstorm-assistant/guide.md +9 -6
  153. package/bundled/skills/code-review-assistant/SKILL.md +1 -0
  154. package/bundled/skills/commands/brainstorm.md +12 -9
  155. package/bundled/skills/commands/config.md +0 -1
  156. package/bundled/skills/commands/init.md +2 -3
  157. package/bundled/skills/commit-standards/SKILL.md +2 -0
  158. package/bundled/skills/contract-test-assistant/SKILL.md +1 -0
  159. package/bundled/skills/dev-methodology/SKILL.md +4 -0
  160. package/bundled/skills/observability-assistant/SKILL.md +1 -0
  161. package/bundled/skills/project-discovery/SKILL.md +1 -0
  162. package/bundled/skills/project-structure-guide/SKILL.md +1 -0
  163. package/bundled/skills/release-standards/SKILL.md +3 -0
  164. package/bundled/skills/requirement-assistant/SKILL.md +2 -0
  165. package/bundled/skills/reverse-engineer/SKILL.md +3 -0
  166. package/bundled/skills/reverse-engineer/tdd-analysis.md +16 -23
  167. package/bundled/skills/runbook-assistant/SKILL.md +1 -0
  168. package/bundled/skills/slo-assistant/SKILL.md +1 -0
  169. package/bundled/skills/tdd-assistant/SKILL.md +2 -0
  170. package/bundled/skills/workflows/README.md +2 -11
  171. package/bundled/templates/.ai-context.yaml.template +194 -0
  172. package/bundled/templates/CLAUDE.md.template +145 -0
  173. package/bundled/templates/DESIGN.md +237 -0
  174. package/bundled/templates/SKILL-BRIEF-TEMPLATE.md +57 -0
  175. package/bundled/templates/SKILL-CANDIDATES.md +39 -0
  176. package/bundled/templates/gates/check-error-exit.mjs +309 -0
  177. package/bundled/templates/mcp-config.json +10 -0
  178. package/bundled/templates/methodology-template.yaml +209 -0
  179. package/bundled/templates/migration-template.md +408 -0
  180. package/bundled/templates/requirement-checklist.md +410 -0
  181. package/bundled/templates/requirement-document-template.md +591 -0
  182. package/bundled/templates/requirement-template.md +881 -0
  183. package/bundled/templates/reverse-spec-template.md +409 -0
  184. package/bundled/templates/test-case-template.md +74 -0
  185. package/bundled/templates/test-plan-template.md +74 -0
  186. package/package.json +9 -5
  187. package/src/commands/audit.js +82 -0
  188. package/src/commands/check.js +66 -10
  189. package/src/commands/init.js +161 -16
  190. package/src/commands/lint.js +96 -0
  191. package/src/commands/quickstart.js +16 -13
  192. package/src/commands/update.js +286 -14
  193. package/src/compilers/claude-code-compiler.js +4 -1
  194. package/src/config/ai-agent-paths.js +62 -17
  195. package/src/core/constants.js +42 -11
  196. package/src/core/manifest.js +201 -3
  197. package/src/core/paths.js +2 -2
  198. package/src/i18n/messages.js +9 -32
  199. package/src/installers/hooks-installer.js +167 -75
  200. package/src/installers/integration-installer.js +9 -5
  201. package/src/prompts/init.js +14 -14
  202. package/src/reconciler/actual-state-scanner.js +14 -3
  203. package/src/utils/detector.js +21 -1
  204. package/src/utils/effect-boundary.js +1093 -0
  205. package/src/utils/hasher.js +229 -9
  206. package/src/utils/hook-stats.js +1 -1
  207. package/src/utils/integration-generator.js +100 -4
  208. package/src/utils/reference-sync.js +4 -1
  209. package/src/utils/skills-installer.js +17 -3
  210. package/src/utils/spec-linter.js +35 -76
  211. package/src/utils/yaml-generator.js +51 -9
  212. package/standards-registry.json +31 -8
  213. package/src/commands/sync.js +0 -133
@@ -0,0 +1,145 @@
1
+ # CLAUDE.md Template
2
+ # CLAUDE.md 範本
3
+
4
+ > Copy this file to your project root as `CLAUDE.md` or `.cursorrules`.
5
+ >
6
+ > 將此檔案複製到專案根目錄,命名為 `CLAUDE.md` 或 `.cursorrules`。
7
+
8
+ ---
9
+
10
+ # Project AI Collaboration Guidelines
11
+ # 專案 AI 協作規範
12
+
13
+ ## 1. Certainty Labels | 確定性標籤
14
+
15
+ When analyzing code or making statements, use these tags:
16
+
17
+ 分析程式碼或陳述事實時,使用以下標籤:
18
+
19
+ | Tag | Use When | 使用時機 |
20
+ |-----|----------|---------|
21
+ | `[Confirmed]` / `[已確認]` | Direct evidence from code/docs | 直接來自程式碼/文件的證據 |
22
+ | `[Inferred]` / `[推測]` | Logical deduction from evidence | 基於證據的邏輯推論 |
23
+ | `[Assumption]` / `[假設]` | Based on common patterns | 基於常見模式(需驗證) |
24
+ | `[Unknown]` / `[未知]` | Information not available | 資訊不可得 |
25
+
26
+ **Rules | 規則**:
27
+ - Always cite sources: `[Source: Code] file.ts:42`
28
+ - Never fabricate APIs, configs, or requirements
29
+ - Ask for clarification when unsure
30
+
31
+ ---
32
+
33
+ ## 2. Recommendations | 建議原則
34
+
35
+ When presenting multiple options, **always include a recommendation**:
36
+
37
+ 提供多個選項時,**必須包含推薦選項**:
38
+
39
+ ```
40
+ Options:
41
+ 1. Option A - description
42
+ 2. Option B - description
43
+ 3. Option C - description
44
+
45
+ **Recommended: Option A** because [reasoning]
46
+ ```
47
+
48
+ ---
49
+
50
+ ## 3. Quality Gates | 質量關卡
51
+
52
+ Before suggesting a commit, verify:
53
+
54
+ 建議 commit 前,驗證:
55
+
56
+ - [ ] Build passes (zero errors, zero warnings)
57
+ - [ ] All tests pass
58
+ - [ ] Code follows project standards
59
+ - [ ] New code has tests
60
+
61
+ **Never auto-execute git commands.** Show commands and wait for user confirmation.
62
+
63
+ **不要自動執行 git 指令。** 顯示指令並等待使用者確認。
64
+
65
+ ---
66
+
67
+ ## 4. Project Structure | 專案結構
68
+
69
+ <!-- Customize this section for your project -->
70
+ <!-- 依專案需求自訂此區塊 -->
71
+
72
+ ### Directories | 目錄
73
+
74
+ | Directory | Purpose | gitignore? |
75
+ |-----------|---------|------------|
76
+ | `src/` | Source code | No |
77
+ | `tests/` | Test files | No |
78
+ | `dist/` | Build output | **Yes** |
79
+
80
+ <!-- Common build artifacts — uncomment relevant lines in your .gitignore: -->
81
+ <!-- node_modules/ # Node.js -->
82
+ <!-- __pycache__/ # Python -->
83
+ <!-- .venv/ # Python virtualenv -->
84
+ <!-- target/ # Java Maven / Rust -->
85
+ <!-- dist/ # General -->
86
+ <!-- build/ # General -->
87
+
88
+ ### Conventions | 慣例
89
+
90
+ - Source files: `src/`
91
+ - Test files: `tests/` or colocated with source
92
+ - Build output: `dist/` (gitignored)
93
+
94
+ ---
95
+
96
+ ## 5. Project-Specific Rules | 專案特定規則
97
+
98
+ <!-- Add your project-specific rules here -->
99
+ <!-- 在此新增專案特定規則 -->
100
+
101
+ ### Build Commands | 建置指令
102
+
103
+ <!-- Commands vary by ecosystem. Uncomment and adjust for your project: -->
104
+ <!-- Node.js: npm run build && npm test -->
105
+ <!-- Python: python -m build && python -m pytest -->
106
+ <!-- Go: go build ./... && go test ./... -->
107
+ <!-- Java (Maven): mvn package && mvn test -->
108
+ <!-- Rust: cargo build && cargo test -->
109
+
110
+ ```bash
111
+ # Development build
112
+ {{BUILD_COMMAND}}
113
+
114
+ # Run tests
115
+ {{TEST_COMMAND}}
116
+
117
+ # Lint check
118
+ {{LINT_COMMAND}}
119
+ ```
120
+
121
+ ### Output Language | 產出語言
122
+
123
+ This project uses **English** commit messages.
124
+ <!-- Options: English | Traditional Chinese | Bilingual -->
125
+
126
+ ### Conversation Language | 對話語言
127
+
128
+ AI should respond in **Traditional Chinese**.
129
+ <!-- Options: English | Traditional Chinese -->
130
+
131
+ ---
132
+
133
+ ## Reference | 參考
134
+
135
+ This template is based on [universal-dev-standards](https://github.com/AsiaOstrich/universal-dev-standards):
136
+
137
+ - [Anti-Hallucination Standards](https://github.com/AsiaOstrich/universal-dev-standards/blob/main/core/anti-hallucination.md)
138
+ - [Check-in Standards](https://github.com/AsiaOstrich/universal-dev-standards/blob/main/core/checkin-standards.md)
139
+ - [Project Structure](https://github.com/AsiaOstrich/universal-dev-standards/blob/main/core/project-structure.md)
140
+
141
+ ---
142
+
143
+ ## License | 授權
144
+
145
+ This template is released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
@@ -0,0 +1,237 @@
1
+ # DESIGN.md — [專案名稱] 前端設計規格
2
+
3
+ > **版本**: 1.0.0
4
+ > **更新日期**: YYYY-MM-DD
5
+ > **標準依據**: UDS `frontend-design-standards` v1.0.0
6
+ >
7
+ > **說明**: 本文件是給 AI Agent 和人類開發者讀的設計規格書。
8
+ > 請填寫所有 9 個段落(`<!-- FILL: ... -->` 標記的地方)並移除所有注釋說明。
9
+ > 建立後將本文件放置在專案根目錄,與 README.md 同層。
10
+
11
+ ---
12
+
13
+ ## 1. Visual Theme & Mood
14
+
15
+ <!-- FILL: 定義整體視覺風格與情感基調。這是 AI Agent 生成 UI 時的最高層次約束。 -->
16
+ <!-- 範例:
17
+ - **Theme**: Minimal, professional, data-dense
18
+ - **Mood**: Calm, focused, trustworthy
19
+ - **Inspiration**: Linear app, Stripe dashboard
20
+ - **Dark Mode**: Primary (dark-first design)
21
+ -->
22
+
23
+ - **Theme**: [填入一行風格描述,例:Clean, modern, approachable]
24
+ - **Mood**: [填入情感品質,例:Friendly, energetic, reliable]
25
+ - **Inspiration**: [填入參考產品或設計風格,例:Notion, GitHub, Vercel]
26
+ - **Dark Mode**: [primary / secondary / unsupported]
27
+
28
+ ---
29
+
30
+ ## 2. Color Palette
31
+
32
+ <!-- FILL: 定義語義色彩 token 系統。5 個核心 token 均為必填。
33
+ 使用 token 名稱而非直接在程式碼中使用 hex 值。
34
+ 命名規則:kebab-case,與標準完全一致。 -->
35
+
36
+ ### Semantic Tokens(必填,5 個)
37
+
38
+ - **background**: `#______` — [填入:頁面底色說明]
39
+ - **surface**: `#______` — [填入:卡片、面板底色說明]
40
+ - **primary-text**: `#______` — [填入:主要文字顏色說明]
41
+ - **muted-text**: `#______` — [填入:次要文字、placeholder 說明]
42
+ - **accent**: `#______` — [填入:強調色、CTA 按鈕說明(全站只能 1 個 accent)]
43
+
44
+ ### Extended Tokens(選填)
45
+
46
+ <!-- 選填,如需要可加入以下 token -->
47
+ <!-- - **error**: `#______` -->
48
+ <!-- - **warning**: `#______` -->
49
+ <!-- - **success**: `#______` -->
50
+ <!-- - **border**: `#______` -->
51
+ <!-- - **overlay**: `rgba(______)` -->
52
+
53
+ ---
54
+
55
+ ## 3. Typography
56
+
57
+ <!-- FILL: 定義字體家族與排版角色。
58
+ 重要約束:最多 2 個字體家族(display 系列 + body 系列,可以是同一個)。
59
+ 4 個角色均為必填。 -->
60
+
61
+ ### Font Families(最多 2 個)
62
+
63
+ - **Display font**: [字體名稱] — 用於 display、headline 角色
64
+ - **Body font**: [字體名稱] — 用於 body、caption 角色(可與 display 相同)
65
+
66
+ ### Typographic Scale(4 個角色,均必填)
67
+
68
+ - **display**: [填入大小,需 ≥ 48px], weight [700], line-height [1.1] — 英雄標題、Splash 文字
69
+ - **headline**: [填入大小,範圍 24–32px], weight [600], line-height [1.3] — 區段標題、卡片標題
70
+ - **body**: 16px, weight 400, line-height 1.6 — 段落、主要內容
71
+ - **caption**: [填入大小,範圍 12–14px], weight 400, line-height 1.4 — 標籤、Metadata、輔助說明
72
+
73
+ ---
74
+
75
+ ## 4. Component Styling
76
+
77
+ <!-- FILL: 定義 UI 元件的視覺規則。
78
+ 邊框圓角、按鈕變體、輸入框、卡片均為必填。 -->
79
+
80
+ ### Border Radius
81
+
82
+ - **sm**: [填入,建議 4px] — 小型元素、徽章
83
+ - **md**: [填入,建議 8px] — 按鈕、輸入框
84
+ - **lg**: [填入,建議 12px] — 卡片、Modal
85
+ - **full**: 9999px — Pill 徽章、圓形頭像
86
+
87
+ ### Buttons
88
+
89
+ - **Primary**: `accent` 背景色,白色文字,`md` 圓角
90
+ - **Secondary**: `surface` 背景色,`primary-text` 文字,`md` 圓角,1px border
91
+ - **Ghost**: 透明背景,`accent` 文字,無邊框
92
+
93
+ <!-- FILL: 如有其他按鈕變體可在此新增 -->
94
+
95
+ ### Input Fields
96
+
97
+ - Background: `surface`
98
+ - Border: 1px solid `border`(若有定義)
99
+ - Focus ring: 2px solid `accent`
100
+ - Border radius: `md`
101
+ - Placeholder color: `muted-text`
102
+
103
+ ### Cards / Panels
104
+
105
+ - Background: `surface`
106
+ - Border: [填入:1px solid border / none / custom]
107
+ - Shadow: [填入:elevation-1 / none]
108
+ - Padding: `space-4` (24px)
109
+ - Border radius: `lg`
110
+
111
+ ---
112
+
113
+ ## 5. Layout & Spacing
114
+
115
+ <!-- FILL: 定義間距比例(必須使用 8px 基底的標準步進值)與網格系統。
116
+ 7 個間距 token 均為必填(注意:沒有 space-7)。 -->
117
+
118
+ ### Spacing Scale(8px 基底,7 個步進值,均必填)
119
+
120
+ - **space-1**: 4px — 圖示內距、緊湊元素
121
+ - **space-2**: 8px — 預設元素內距
122
+ - **space-3**: 16px — 元件內部間距
123
+ - **space-4**: 24px — 區塊間距、網格欄距
124
+ - **space-5**: 32px — 元件之間的間距
125
+ - **space-6**: 48px — 主要區段之間
126
+ - **space-8**: 64px — 頁面層級分隔
127
+
128
+ ### Grid System
129
+
130
+ - **Columns**: [填入,建議 12 欄]
131
+ - **Gutter**: space-4 (24px)
132
+ - **Max content width**: [填入,建議 1280px]
133
+ - **Page padding**: space-4 (24px) on mobile / space-6 (48px) on desktop
134
+
135
+ ---
136
+
137
+ ## 6. Depth & Shadow System
138
+
139
+ <!-- FILL: 定義陰影層次系統,至少需要 3 個 elevation 層級。
140
+ 陰影用於建立視覺層次,不依賴顏色變化。 -->
141
+
142
+ - **elevation-0**: no shadow — 扁平元素、緊貼背景的內容
143
+ - **elevation-1**: `[填入 CSS shadow]` — 卡片靜止態、懸浮元素
144
+ - **elevation-2**: `[填入 CSS shadow]` — 下拉選單、Tooltip
145
+ - **elevation-3**: `[填入 CSS shadow]` — Modal、Dialog、Drawer
146
+
147
+ <!-- 選填:
148
+ - **elevation-4**: `[填入 CSS shadow]` — 全畫面 overlay
149
+ -->
150
+
151
+ <!-- 範例(暗色主題):
152
+ - **elevation-1**: `0 1px 2px rgba(0,0,0,0.4)`
153
+ - **elevation-2**: `0 4px 8px rgba(0,0,0,0.3)`
154
+ - **elevation-3**: `0 8px 24px rgba(0,0,0,0.5)`
155
+ -->
156
+
157
+ ---
158
+
159
+ ## 7. Design Guidelines & Anti-patterns
160
+
161
+ <!-- FILL: UI 硬性約束與禁止模式清單。
162
+ 這是約束式 prompting 的核心——限制自由度以提升 UI 品質一致性。
163
+ 硬性約束至少 4 條,反模式至少 5 條(本模板已提供最低要求,請保留)。 -->
164
+
165
+ ### UI Hard Constraints
166
+
167
+ - 每頁最多 **1 個 H1**
168
+ - 頁面區段不超過 **6 個**
169
+ - 字體家族最多 **2 個**
170
+ - 強調色最多 **1 個**(禁止混用多個 accent 色)
171
+ - [填入:其他專案特定的硬性約束]
172
+
173
+ ### Anti-patterns(禁止模式)
174
+
175
+ - **禁止** floating badge(浮動徽章,脫離內容無歸屬)
176
+ - **禁止** generic card layout(完全相同的卡片堆疊作為主要內容)
177
+ - **禁止** dashboard grid as homepage(行銷首頁設計成數據儀表板)
178
+ - **禁止** competing CTAs(同畫面出現多個等重 CTA 按鈕)
179
+ - **禁止** color-only differentiation(僅用顏色區分狀態,無其他提示)
180
+ - [填入:其他專案特定的禁止模式]
181
+
182
+ ### Design Principles(選填)
183
+
184
+ <!-- 可以新增正向指導原則(非禁止事項)
185
+ 範例:
186
+ - 優先使用文字解決,而非堆砌元件(Restraint over complexity)
187
+ - 每個設計決定必須有功能理由,裝飾性元素需要明確理由
188
+ -->
189
+
190
+ ---
191
+
192
+ ## 8. Responsive Behavior
193
+
194
+ <!-- FILL: 定義斷點規則與響應式原則。
195
+ 必須採用 Mobile-first 方式(min-width media queries)。
196
+ 至少定義 3 個斷點(mobile / tablet / desktop)。 -->
197
+
198
+ ### Breakpoints(Mobile-first)
199
+
200
+ - **xs** (base): < 480px — 小型手機
201
+ - **sm**: ≥ 768px — 平板
202
+ - **md**: ≥ 1024px — 筆記型電腦
203
+ - **lg**: ≥ 1280px — 桌上型電腦
204
+ - **xl**: ≥ 1536px — 寬螢幕(選填)
205
+
206
+ ### Rules
207
+
208
+ - 採用 Mobile-first CSS(min-width 媒體查詢)
209
+ - xs / sm:單欄佈局
210
+ - md+:多欄佈局
211
+ - 行動裝置觸控目標最小 **44×44px**
212
+ - 導覽列在 sm 以下收合為漢堡選單或底部導覽列
213
+ - [填入:其他專案特定的響應式規則]
214
+
215
+ ---
216
+
217
+ ## 9. Agent Prompt References
218
+
219
+ <!-- FILL: AI Agent 快速讀取的設計意圖摘要。
220
+ AI Agent 應優先讀取此段落作為生成 UI 的整體定向。
221
+ Style Summary 限 1–2 句,Key Constraints 使用條列式。 -->
222
+
223
+ ### Style Summary
224
+
225
+ [填入 1–2 句描述整體設計意圖。例:
226
+ 「深色、簡約、以數據為核心的介面。專業美學,優先考慮資訊清晰度而非裝飾性。」]
227
+
228
+ ### Key Constraints for AI Generation
229
+
230
+ - 所有顏色必須使用語義 token 名稱(background, surface, accent),禁止在元件中硬編碼 hex 值
231
+ - 每頁只有 1 個 H1;區段數量 ≤ 6
232
+ - `accent` 是唯一允許的強調色
233
+ - [填入:其他最關鍵的設計約束]
234
+
235
+ ### Tone
236
+
237
+ [填入設計應帶給使用者的感受。例:「沉穩、自信、技術感。類似 Linear 或 Vercel 的 Dashboard 美學。」]
@@ -0,0 +1,57 @@
1
+ # Skill Brief: /{skill-name}
2
+
3
+ > **Purpose | 用途**: Minimal viable spec for Simple Skills — no XSPEC needed
4
+ > Simple Skill 的最小可行規格,不需建立 XSPEC
5
+ >
6
+ > **Time to fill | 填寫時間**: ~10 minutes
7
+ >
8
+ > **When to use | 適用條件**:
9
+ > All 4 judgment questions in `/process-to-skill` answered "No"
10
+ > `/process-to-skill` 的 4 個判斷問題全部回答「否」
11
+
12
+ ---
13
+
14
+ ## Trigger Context | 觸發情境
15
+
16
+ When would you reach for this Skill?
17
+ 什麼情況下會想用這個 Skill?
18
+
19
+ > Example: "When I need to create a DEC record and sync TECH-RADAR"
20
+
21
+ ---
22
+
23
+ ## Problem Statement | 問題陳述
24
+
25
+ Without this Skill, how do you do it now? Why is that a problem?
26
+ 沒有這個 Skill 時,現在怎麼做?為什麼不好?
27
+
28
+ > Example: "Manually recall steps each time; easy to forget updating TECH-RADAR"
29
+
30
+ ---
31
+
32
+ ## Core Steps | 核心步驟
33
+
34
+ (3–7 ordered steps | 3~7 個有序步驟)
35
+
36
+ 1.
37
+ 2.
38
+ 3.
39
+
40
+ ---
41
+
42
+ ## Acceptance Criteria | 驗收條件
43
+
44
+ (2–3 items | 2~3 條)
45
+
46
+ - **AC-1**: After execution, {artifact} exists and is correctly formatted
47
+ 執行後,{具體產物} 存在且格式正確
48
+ - **AC-2**: {Critical step} is not skipped
49
+ {關鍵步驟} 不被跳過
50
+
51
+ ---
52
+
53
+ ## Out of Scope | 不涵蓋的部分
54
+
55
+ (Explicit boundaries to prevent scope creep | 明確邊界,防止 Skill 膨脹)
56
+
57
+ -
@@ -0,0 +1,39 @@
1
+ # Skill Candidates | Skill 候選清單
2
+
3
+ > **The 3-Times Rule | 3 次法則**
4
+ >
5
+ > Same process done manually ≥ 3 times → record here → at 3 → run `/process-to-skill`
6
+ > 同一流程手動執行 ≥ 3 次 → 記錄於此 → 達 3 次 → 執行 `/process-to-skill`
7
+
8
+ ## How to Use | 使用方式
9
+
10
+ 1. When you notice a repeated process, add a row to Candidates below
11
+ 發現重複流程時,在「候選清單」表格新增一行
12
+ 2. Each time you repeat it manually, increment the Count
13
+ 每次重複手動執行時,更新「執行次數」
14
+ 3. When Count reaches 3, mark Trigger ✅ and run `/process-to-skill`
15
+ 次數達 3 時,觸發欄填 ✅,執行 `/process-to-skill`
16
+
17
+ ---
18
+
19
+ ## Candidates | 候選清單
20
+
21
+ | Name | Process Description | Count | Trigger | Skill |
22
+ |------|---------------------|:-----:|:-------:|-------|
23
+ | (example) /example | Step A → Step B → Step C → commit | 2 | - | - |
24
+
25
+ ---
26
+
27
+ ## Completed | 已完成
28
+
29
+ | Skill | Created | Type | Notes |
30
+ |-------|---------|:----:|-------|
31
+ | (example) /borrow | 2026-04-10 | Simple | External source borrowing flow |
32
+
33
+ ---
34
+
35
+ ## Deprecated | 已廢棄
36
+
37
+ | Skill | Deprecated | Reason | Superseded By |
38
+ |-------|-----------|--------|--------------|
39
+ | — | — | — | — |