universal-dev-standards 5.17.0 → 6.0.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 (539) hide show
  1. package/bin/uds.js +13 -135
  2. package/bundled/ai/standards/acceptance-criteria-traceability.ai.yaml +13 -4
  3. package/bundled/ai/standards/accessibility-standards.ai.yaml +1 -1
  4. package/bundled/ai/standards/ai-response-navigation.ai.yaml +15 -2
  5. package/bundled/ai/standards/api-design-standards.ai.yaml +27 -4
  6. package/bundled/ai/standards/behavior-snapshot.ai.yaml +86 -9
  7. package/bundled/ai/standards/checkin-standards.ai.yaml +2 -2
  8. package/bundled/ai/standards/code-review.ai.yaml +2 -2
  9. package/bundled/ai/standards/context-aware-loading.ai.yaml +3 -3
  10. package/bundled/ai/standards/data-migration-testing.ai.yaml +79 -3
  11. package/bundled/ai/standards/deprecation-standards.ai.yaml +10 -2
  12. package/bundled/ai/standards/developer-memory.ai.yaml +4 -3
  13. package/bundled/ai/standards/flow-based-testing.ai.yaml +2 -2
  14. package/bundled/ai/standards/forward-derivation-standards.ai.yaml +26 -2
  15. package/bundled/ai/standards/full-coverage-testing.ai.yaml +34 -2
  16. package/bundled/ai/standards/git-worktree.ai.yaml +3 -3
  17. package/bundled/ai/standards/logging.ai.yaml +97 -3
  18. package/bundled/ai/standards/mock-boundary.ai.yaml +48 -2
  19. package/bundled/ai/standards/model-provenance.ai.yaml +297 -0
  20. package/bundled/ai/standards/model-selection.ai.yaml +11 -2
  21. package/bundled/ai/standards/observability-standards.ai.yaml +10 -0
  22. package/bundled/ai/standards/performance-standards.ai.yaml +46 -1
  23. package/bundled/ai/standards/pii-classification.ai.yaml +15 -1
  24. package/bundled/ai/standards/pipeline-security-gates.ai.yaml +10 -0
  25. package/bundled/ai/standards/privacy-standards.ai.yaml +2 -2
  26. package/bundled/ai/standards/project-context-memory.ai.yaml +2 -2
  27. package/bundled/ai/standards/refactoring-standards.ai.yaml +68 -3
  28. package/bundled/ai/standards/resource-cost-boundary.ai.yaml +279 -0
  29. package/bundled/ai/standards/reverse-engineering-standards.ai.yaml +55 -2
  30. package/bundled/ai/standards/security-testing.ai.yaml +13 -2
  31. package/bundled/ai/standards/skill-standard-alignment-check.ai.yaml +37 -2
  32. package/bundled/ai/standards/user-journey-testing.ai.yaml +107 -0
  33. package/bundled/ai/standards/verification-oracle.ai.yaml +278 -0
  34. package/bundled/ai/standards/versioning.ai.yaml +32 -38
  35. package/bundled/core/acceptance-criteria-traceability.md +15 -5
  36. package/bundled/core/accessibility-standards.md +8 -4
  37. package/bundled/core/ai-friendly-architecture.md +1 -1
  38. package/bundled/core/ai-response-navigation.md +31 -3
  39. package/bundled/core/anti-sycophancy-prompting.md +1 -1
  40. package/bundled/core/api-design-standards.md +92 -7
  41. package/bundled/core/audit-trail.md +119 -0
  42. package/bundled/core/behavior-snapshot.md +94 -7
  43. package/bundled/core/browser-compatibility-standards.md +15 -2
  44. package/bundled/core/checkin-standards.md +9 -2
  45. package/bundled/core/code-review-checklist.md +10 -2
  46. package/bundled/core/container-image-standards.md +97 -0
  47. package/bundled/core/context-aware-loading.md +2 -2
  48. package/bundled/core/cost-budget-test.md +1 -1
  49. package/bundled/core/cross-flow-regression.md +3 -2
  50. package/bundled/core/data-contract.md +104 -0
  51. package/bundled/core/data-migration-testing.md +90 -0
  52. package/bundled/core/data-pipeline.md +113 -0
  53. package/bundled/core/deprecation-standards.md +16 -2
  54. package/bundled/core/developer-memory.md +13 -8
  55. package/bundled/core/documentation-writing-standards.md +1 -1
  56. package/bundled/core/error-code-standards.md +4 -3
  57. package/bundled/core/flaky-test-management.md +1 -1
  58. package/bundled/core/flow-based-testing.md +3 -3
  59. package/bundled/core/forward-derivation-standards.md +33 -5
  60. package/bundled/core/full-coverage-testing.md +72 -0
  61. package/bundled/core/git-worktree.md +4 -4
  62. package/bundled/core/guides/performance-guide.md +1 -1
  63. package/bundled/core/guides/security-guide.md +1 -1
  64. package/bundled/core/health-check-standards.md +2 -2
  65. package/bundled/core/iac-design-principles.md +97 -0
  66. package/bundled/core/incident-response.md +119 -0
  67. package/bundled/core/license-compliance.md +2 -0
  68. package/bundled/core/logging-standards.md +78 -2
  69. package/bundled/core/mock-boundary.md +54 -2
  70. package/bundled/core/model-provenance.md +181 -0
  71. package/bundled/core/model-selection.md +27 -2
  72. package/bundled/core/packaging-standards.md +1 -0
  73. package/bundled/core/performance-standards.md +96 -2
  74. package/bundled/core/pii-classification.md +148 -0
  75. package/bundled/core/pipeline-security-gates.md +22 -2
  76. package/bundled/core/postmortem-standards.md +2 -0
  77. package/bundled/core/prd-standards.md +91 -0
  78. package/bundled/core/privacy-standards.md +14 -3
  79. package/bundled/core/product-metrics-standards.md +100 -0
  80. package/bundled/core/project-context-memory.md +8 -2
  81. package/bundled/core/prompt-regression.md +1 -1
  82. package/bundled/core/refactoring-standards.md +44 -3
  83. package/bundled/core/replay-test.md +1 -1
  84. package/bundled/core/resource-cost-boundary.md +180 -0
  85. package/bundled/core/reverse-engineering-standards.md +66 -2
  86. package/bundled/core/runbook.md +113 -0
  87. package/bundled/core/schema-evolution.md +105 -0
  88. package/bundled/core/secret-management-standards.md +110 -0
  89. package/bundled/core/security-testing.md +26 -2
  90. package/bundled/core/self-review-protocol.md +2 -2
  91. package/bundled/core/skill-standard-alignment-check.md +53 -0
  92. package/bundled/core/slo-sli.md +109 -0
  93. package/bundled/core/smoke-test.md +1 -1
  94. package/bundled/core/tech-debt-standards.md +1 -1
  95. package/bundled/core/test-data-standards.md +2 -2
  96. package/bundled/core/user-journey-testing.md +102 -0
  97. package/bundled/core/user-story-mapping.md +96 -0
  98. package/bundled/core/verification-oracle.md +167 -0
  99. package/bundled/core/versioning.md +133 -109
  100. package/bundled/locales/COVERAGE.md +84 -73
  101. package/bundled/locales/zh-CN/CHANGELOG.md +71 -6
  102. package/bundled/locales/zh-CN/CLAUDE.md +1 -1
  103. package/bundled/locales/zh-CN/README.md +22 -9
  104. package/bundled/locales/zh-CN/SECURITY.md +1 -1
  105. package/bundled/locales/zh-CN/adoption/DAILY-WORKFLOW-GUIDE.md +2 -2
  106. package/bundled/locales/zh-CN/core/acceptance-criteria-traceability.md +4 -6
  107. package/bundled/locales/zh-CN/core/accessibility-standards.md +1 -1
  108. package/bundled/locales/zh-CN/core/adversarial-test.md +226 -0
  109. package/bundled/locales/zh-CN/core/agent-behavior-discipline.md +187 -0
  110. package/bundled/locales/zh-CN/core/ai-response-navigation.md +32 -6
  111. package/bundled/locales/zh-CN/core/anti-sycophancy-prompting.md +1 -1
  112. package/bundled/locales/zh-CN/core/api-design-standards.md +1 -1
  113. package/bundled/locales/zh-CN/core/behavior-snapshot.md +335 -0
  114. package/bundled/locales/zh-CN/core/browser-compatibility-standards.md +229 -0
  115. package/bundled/locales/zh-CN/core/cd-deployment-strategies.md +135 -0
  116. package/bundled/locales/zh-CN/core/chaos-injection-tests.md +130 -0
  117. package/bundled/locales/zh-CN/core/checkin-standards.md +1 -1
  118. package/bundled/locales/zh-CN/core/code-review-checklist.md +1 -1
  119. package/bundled/locales/zh-CN/core/container-security.md +535 -0
  120. package/bundled/locales/zh-CN/core/context-aware-loading.md +1 -1
  121. package/bundled/locales/zh-CN/core/contract-testing-standards.md +191 -0
  122. package/bundled/locales/zh-CN/core/cost-budget-test.md +86 -0
  123. package/bundled/locales/zh-CN/core/cross-flow-regression.md +199 -0
  124. package/bundled/locales/zh-CN/core/data-migration-testing.md +217 -0
  125. package/bundled/locales/zh-CN/core/deployment-standards.md +328 -9
  126. package/bundled/locales/zh-CN/core/deprecation-standards.md +1 -1
  127. package/bundled/locales/zh-CN/core/developer-memory.md +2 -2
  128. package/bundled/locales/zh-CN/core/disaster-recovery-drill.md +87 -0
  129. package/bundled/locales/zh-CN/core/documentation-structure.md +1 -1
  130. package/bundled/locales/zh-CN/core/documentation-writing-standards.md +1 -1
  131. package/bundled/locales/zh-CN/core/error-code-standards.md +2 -2
  132. package/bundled/locales/zh-CN/core/feature-manifest-standard.md +222 -0
  133. package/bundled/locales/zh-CN/core/flaky-test-management.md +87 -0
  134. package/bundled/locales/zh-CN/core/flow-based-testing.md +284 -0
  135. package/bundled/locales/zh-CN/core/forward-derivation-standards.md +3 -4
  136. package/bundled/locales/zh-CN/core/full-coverage-testing.md +197 -0
  137. package/bundled/locales/zh-CN/core/git-worktree.md +1 -1
  138. package/bundled/locales/zh-CN/core/governance-layer.md +160 -0
  139. package/bundled/locales/zh-CN/core/guides/performance-guide.md +515 -0
  140. package/bundled/locales/zh-CN/core/guides/security-guide.md +494 -0
  141. package/bundled/locales/zh-CN/core/knowledge-graph-memory.md +128 -0
  142. package/bundled/locales/zh-CN/core/license-compliance.md +129 -0
  143. package/bundled/locales/zh-CN/core/llm-output-validation.md +192 -0
  144. package/bundled/locales/zh-CN/core/logging-standards.md +130 -8
  145. package/bundled/locales/zh-CN/core/mock-boundary.md +109 -0
  146. package/bundled/locales/zh-CN/core/model-selection.md +28 -5
  147. package/bundled/locales/zh-CN/core/mutation-testing.md +106 -0
  148. package/bundled/locales/zh-CN/core/no-cicd-deployment.md +219 -0
  149. package/bundled/locales/zh-CN/core/packaging-standards.md +76 -5
  150. package/bundled/locales/zh-CN/core/pipeline-security-gates.md +126 -0
  151. package/bundled/locales/zh-CN/core/policy-as-code-testing.md +203 -0
  152. package/bundled/locales/zh-CN/core/privacy-standards.md +1 -1
  153. package/bundled/locales/zh-CN/core/project-context-memory.md +1 -1
  154. package/bundled/locales/zh-CN/core/prompt-regression.md +88 -0
  155. package/bundled/locales/zh-CN/core/property-based-testing.md +87 -0
  156. package/bundled/locales/zh-CN/core/release-quality-manifest.md +207 -0
  157. package/bundled/locales/zh-CN/core/release-readiness-gate.md +193 -0
  158. package/bundled/locales/zh-CN/core/replay-test.md +102 -0
  159. package/bundled/locales/zh-CN/core/reverse-engineering-standards.md +46 -1
  160. package/bundled/locales/zh-CN/core/rollback-standards.md +120 -0
  161. package/bundled/locales/zh-CN/core/sast-advanced.md +309 -0
  162. package/bundled/locales/zh-CN/core/secure-op.md +328 -0
  163. package/bundled/locales/zh-CN/core/security-testing.md +96 -0
  164. package/bundled/locales/zh-CN/core/self-review-protocol.md +167 -0
  165. package/bundled/locales/zh-CN/core/server-ops-security.md +507 -0
  166. package/bundled/locales/zh-CN/core/smoke-test.md +79 -0
  167. package/bundled/locales/zh-CN/core/spec-driven-development.md +39 -3
  168. package/bundled/locales/zh-CN/core/supply-chain-attestation.md +131 -0
  169. package/bundled/locales/zh-CN/core/versioning.md +1 -1
  170. package/bundled/locales/zh-CN/docs/CHEATSHEET.md +31 -6
  171. package/bundled/locales/zh-CN/docs/FEATURE-REFERENCE.md +61 -34
  172. package/bundled/locales/zh-CN/docs/MIGRATION-v6.md +88 -0
  173. package/bundled/locales/zh-CN/docs/USAGE-MODES-COMPARISON.md +2 -2
  174. package/bundled/locales/zh-CN/docs/USER-MANUAL.md +14 -14
  175. package/bundled/locales/zh-CN/docs/specs/system/memory-adoption-strategy.md +105 -0
  176. package/bundled/locales/zh-CN/docs/user/FAQ.md +132 -0
  177. package/bundled/locales/zh-CN/docs/user/GETTING-STARTED.md +144 -0
  178. package/bundled/locales/zh-CN/docs/user/GLOSSARY.md +178 -0
  179. package/bundled/locales/zh-CN/docs/user/README.md +70 -0
  180. package/bundled/locales/zh-CN/docs/user/TROUBLESHOOTING.md +190 -0
  181. package/bundled/locales/zh-CN/integrations/github-copilot/COPILOT-CHAT-REFERENCE.md +1 -1
  182. package/bundled/locales/zh-CN/integrations/github-copilot/README.md +1 -1
  183. package/bundled/locales/zh-CN/integrations/github-copilot/skills-mapping.md +3 -3
  184. package/bundled/locales/zh-CN/integrations/opencode/skills-mapping.md +3 -3
  185. package/bundled/locales/zh-CN/methodologies/guides/sdd-guide.md +836 -0
  186. package/bundled/locales/zh-CN/options/changelog/auto-generated.md +166 -0
  187. package/bundled/locales/zh-CN/options/changelog/keep-a-changelog.md +140 -0
  188. package/bundled/locales/zh-CN/options/code-review/automated-review.md +214 -0
  189. package/bundled/locales/zh-CN/options/code-review/pair-programming.md +166 -0
  190. package/bundled/locales/zh-CN/options/code-review/pr-review.md +167 -0
  191. package/bundled/locales/zh-CN/options/documentation/api-docs.md +191 -0
  192. package/bundled/locales/zh-CN/options/documentation/markdown-docs.md +150 -0
  193. package/bundled/locales/zh-CN/options/documentation/wiki-style.md +131 -0
  194. package/bundled/locales/zh-CN/options/project-structure/kotlin.md +144 -0
  195. package/bundled/locales/zh-CN/options/project-structure/php.md +168 -0
  196. package/bundled/locales/zh-CN/options/project-structure/ruby.md +156 -0
  197. package/bundled/locales/zh-CN/options/project-structure/rust.md +136 -0
  198. package/bundled/locales/zh-CN/options/project-structure/swift.md +165 -0
  199. package/bundled/locales/zh-CN/options/testing/contract-testing.md +237 -0
  200. package/bundled/locales/zh-CN/options/testing/industry-pyramid.md +200 -0
  201. package/bundled/locales/zh-CN/options/testing/istqb-framework.md +144 -0
  202. package/bundled/locales/zh-CN/options/testing/performance-testing.md +251 -0
  203. package/bundled/locales/zh-CN/options/testing/security-testing.md +192 -0
  204. package/bundled/locales/zh-CN/skills/README.md +89 -126
  205. package/bundled/locales/zh-CN/skills/ac-coverage/SKILL.md +5 -7
  206. package/bundled/locales/zh-CN/skills/adr-assistant/SKILL.md +1 -1
  207. package/bundled/locales/zh-CN/skills/agents/code-architect.md +263 -0
  208. package/bundled/locales/zh-CN/skills/agents/doc-writer.md +410 -0
  209. package/bundled/locales/zh-CN/skills/agents/reviewer.md +357 -0
  210. package/bundled/locales/zh-CN/skills/agents/spec-analyst.md +410 -0
  211. package/bundled/locales/zh-CN/skills/agents/test-specialist.md +368 -0
  212. package/bundled/locales/zh-CN/skills/ai-collaboration-standards/SKILL.md +2 -2
  213. package/bundled/locales/zh-CN/skills/ai-friendly-architecture/SKILL.md +2 -2
  214. package/bundled/locales/zh-CN/skills/ai-instruction-standards/SKILL.md +1 -1
  215. package/bundled/locales/zh-CN/skills/atdd-assistant/acceptance-criteria-guide.md +1 -1
  216. package/bundled/locales/zh-CN/skills/atdd-assistant/atdd-workflow.md +3 -4
  217. package/bundled/locales/zh-CN/skills/audit-assistant/SKILL.md +2 -2
  218. package/bundled/locales/zh-CN/skills/bdd-assistant/guide.md +1 -2
  219. package/bundled/locales/zh-CN/skills/brainstorm-assistant/SKILL.md +109 -13
  220. package/bundled/locales/zh-CN/skills/brainstorm-assistant/guide.md +30 -8
  221. package/bundled/locales/zh-CN/skills/checkin-assistant/SKILL.md +1 -1
  222. package/bundled/locales/zh-CN/skills/ci-cd-assistant/SKILL.md +50 -0
  223. package/bundled/locales/zh-CN/skills/code-review-assistant/SKILL.md +5 -5
  224. package/bundled/locales/zh-CN/skills/commands/ac-coverage.md +1 -1
  225. package/bundled/locales/zh-CN/skills/commands/atdd.md +3 -3
  226. package/bundled/locales/zh-CN/skills/commands/bdd.md +2 -2
  227. package/bundled/locales/zh-CN/skills/commands/brainstorm.md +26 -17
  228. package/bundled/locales/zh-CN/skills/commands/{review.md → code-review.md} +4 -4
  229. package/bundled/locales/zh-CN/skills/commands/derive-all.md +1 -1
  230. package/bundled/locales/zh-CN/skills/commands/derive-atdd.md +1 -1
  231. package/bundled/locales/zh-CN/skills/commands/derive-bdd.md +2 -3
  232. package/bundled/locales/zh-CN/skills/commands/derive-tdd.md +1 -1
  233. package/bundled/locales/zh-CN/skills/commands/derive.md +1 -1
  234. package/bundled/locales/zh-CN/skills/commands/dev-workflow.md +2 -2
  235. package/bundled/locales/zh-CN/skills/commands/methodology.md +4 -4
  236. package/bundled/locales/zh-CN/skills/commands/pr.md +1 -1
  237. package/bundled/locales/zh-CN/skills/commands/tdd.md +1 -1
  238. package/bundled/locales/zh-CN/skills/commit-standards/SKILL.md +1 -1
  239. package/bundled/locales/zh-CN/skills/contract-test-assistant/SKILL.md +1 -1
  240. package/bundled/locales/zh-CN/skills/dev-methodology/SKILL.md +1 -1
  241. package/bundled/locales/zh-CN/skills/dev-methodology/create-methodology.md +456 -0
  242. package/bundled/locales/zh-CN/skills/dev-methodology/guide.md +6 -6
  243. package/bundled/locales/zh-CN/skills/dev-methodology/runtime.md +296 -0
  244. package/bundled/locales/zh-CN/skills/dev-workflow-guide/SKILL.md +5 -5
  245. package/bundled/locales/zh-CN/skills/docs-generator/SKILL.md +1 -1
  246. package/bundled/locales/zh-CN/skills/e2e-assistant/SKILL.md +1 -1
  247. package/bundled/locales/zh-CN/skills/incident-response-assistant/SKILL.md +2 -2
  248. package/bundled/locales/zh-CN/skills/journey-test-assistant/SKILL.md +1 -1
  249. package/bundled/locales/zh-CN/skills/logging-guide/SKILL.md +146 -142
  250. package/bundled/locales/zh-CN/skills/migration-assistant/SKILL.md +1 -1
  251. package/bundled/locales/zh-CN/skills/observability-assistant/guide.md +1 -1
  252. package/bundled/locales/zh-CN/skills/pr-automation-assistant/SKILL.md +1 -1
  253. package/bundled/locales/zh-CN/skills/project-discovery/guide.md +2 -2
  254. package/bundled/locales/zh-CN/skills/reverse-engineer/SKILL.md +1 -1
  255. package/bundled/locales/zh-CN/skills/runbook-assistant/guide.md +1 -1
  256. package/bundled/locales/zh-CN/skills/security-assistant/SKILL.md +1 -1
  257. package/bundled/locales/zh-CN/skills/skill-builder/SKILL.md +3 -3
  258. package/bundled/locales/zh-CN/skills/slo-assistant/guide.md +1 -1
  259. package/bundled/locales/zh-CN/skills/spec-derivation/SKILL.md +1 -1
  260. package/bundled/locales/zh-CN/skills/spec-derivation/guide.md +8 -9
  261. package/bundled/locales/zh-CN/skills/spec-driven-dev/SKILL.md +2 -2
  262. package/bundled/locales/zh-CN/skills/sweep/SKILL.md +1 -1
  263. package/bundled/locales/zh-CN/skills/tdd-assistant/SKILL.md +1 -1
  264. package/bundled/locales/zh-CN/skills/testing-guide/SKILL.md +2 -2
  265. package/bundled/locales/zh-CN/skills/testing-guide/testing-theory.md +2298 -0
  266. package/bundled/locales/zh-CN/skills/workflows/README.md +451 -0
  267. package/bundled/locales/zh-TW/CHANGELOG.md +71 -6
  268. package/bundled/locales/zh-TW/CLAUDE.md +1 -1
  269. package/bundled/locales/zh-TW/MAINTENANCE.md +25 -2
  270. package/bundled/locales/zh-TW/README.md +22 -9
  271. package/bundled/locales/zh-TW/SECURITY.md +1 -1
  272. package/bundled/locales/zh-TW/adoption/DAILY-WORKFLOW-GUIDE.md +2 -2
  273. package/bundled/locales/zh-TW/ai/standards/versioning.ai.yaml +8 -48
  274. package/bundled/locales/zh-TW/core/acceptance-criteria-traceability.md +4 -6
  275. package/bundled/locales/zh-TW/core/accessibility-standards.md +1 -1
  276. package/bundled/locales/zh-TW/core/adversarial-test.md +226 -0
  277. package/bundled/locales/zh-TW/core/agent-behavior-discipline.md +187 -0
  278. package/bundled/locales/zh-TW/core/ai-response-navigation.md +32 -6
  279. package/bundled/locales/zh-TW/core/anti-sycophancy-prompting.md +1 -1
  280. package/bundled/locales/zh-TW/core/api-design-standards.md +91 -9
  281. package/bundled/locales/zh-TW/core/audit-trail.md +110 -0
  282. package/bundled/locales/zh-TW/core/behavior-snapshot.md +335 -0
  283. package/bundled/locales/zh-TW/core/browser-compatibility-standards.md +1 -0
  284. package/bundled/locales/zh-TW/core/cd-deployment-strategies.md +135 -0
  285. package/bundled/locales/zh-TW/core/chaos-injection-tests.md +130 -0
  286. package/bundled/locales/zh-TW/core/checkin-standards.md +1 -1
  287. package/bundled/locales/zh-TW/core/code-review-checklist.md +1 -1
  288. package/bundled/locales/zh-TW/core/container-image-standards.md +93 -0
  289. package/bundled/locales/zh-TW/core/container-security.md +535 -0
  290. package/bundled/locales/zh-TW/core/cost-budget-test.md +86 -0
  291. package/bundled/locales/zh-TW/core/cross-flow-regression.md +1 -0
  292. package/bundled/locales/zh-TW/core/data-contract.md +101 -0
  293. package/bundled/locales/zh-TW/core/data-migration-testing.md +217 -0
  294. package/bundled/locales/zh-TW/core/data-pipeline.md +105 -0
  295. package/bundled/locales/zh-TW/core/deployment-standards.md +363 -25
  296. package/bundled/locales/zh-TW/core/deprecation-standards.md +17 -4
  297. package/bundled/locales/zh-TW/core/developer-memory.md +2 -2
  298. package/bundled/locales/zh-TW/core/disaster-recovery-drill.md +87 -0
  299. package/bundled/locales/zh-TW/core/documentation-writing-standards.md +1 -1
  300. package/bundled/locales/zh-TW/core/error-code-standards.md +2 -2
  301. package/bundled/locales/zh-TW/core/feature-manifest-standard.md +222 -0
  302. package/bundled/locales/zh-TW/core/flaky-test-management.md +87 -0
  303. package/bundled/locales/zh-TW/core/flow-based-testing.md +284 -0
  304. package/bundled/locales/zh-TW/core/forward-derivation-standards.md +3 -4
  305. package/bundled/locales/zh-TW/core/full-coverage-testing.md +250 -0
  306. package/bundled/locales/zh-TW/core/git-worktree.md +1 -1
  307. package/bundled/locales/zh-TW/core/guides/performance-guide.md +515 -0
  308. package/bundled/locales/zh-TW/core/guides/security-guide.md +494 -0
  309. package/bundled/locales/zh-TW/core/iac-design-principles.md +90 -0
  310. package/bundled/locales/zh-TW/core/incident-response.md +111 -0
  311. package/bundled/locales/zh-TW/core/license-compliance.md +129 -0
  312. package/bundled/locales/zh-TW/core/llm-output-validation.md +192 -0
  313. package/bundled/locales/zh-TW/core/logging-standards.md +208 -4
  314. package/bundled/locales/zh-TW/core/mock-boundary.md +161 -0
  315. package/bundled/locales/zh-TW/core/model-provenance.md +173 -0
  316. package/bundled/locales/zh-TW/core/model-selection.md +28 -5
  317. package/bundled/locales/zh-TW/core/mutation-testing.md +106 -0
  318. package/bundled/locales/zh-TW/core/no-cicd-deployment.md +219 -0
  319. package/bundled/locales/zh-TW/core/packaging-standards.md +76 -5
  320. package/bundled/locales/zh-TW/core/performance-standards.md +84 -5
  321. package/bundled/locales/zh-TW/core/pii-classification.md +102 -0
  322. package/bundled/locales/zh-TW/core/pipeline-security-gates.md +126 -0
  323. package/bundled/locales/zh-TW/core/policy-as-code-testing.md +203 -0
  324. package/bundled/locales/zh-TW/core/prd-standards.md +88 -0
  325. package/bundled/locales/zh-TW/core/privacy-standards.md +1 -1
  326. package/bundled/locales/zh-TW/core/product-metrics-standards.md +96 -0
  327. package/bundled/locales/zh-TW/core/project-context-memory.md +1 -1
  328. package/bundled/locales/zh-TW/core/prompt-regression.md +88 -0
  329. package/bundled/locales/zh-TW/core/property-based-testing.md +87 -0
  330. package/bundled/locales/zh-TW/core/refactoring-standards.md +43 -6
  331. package/bundled/locales/zh-TW/core/release-quality-manifest.md +207 -0
  332. package/bundled/locales/zh-TW/core/replay-test.md +102 -0
  333. package/bundled/locales/zh-TW/core/resource-cost-boundary.md +175 -0
  334. package/bundled/locales/zh-TW/core/reverse-engineering-standards.md +64 -5
  335. package/bundled/locales/zh-TW/core/rollback-standards.md +120 -0
  336. package/bundled/locales/zh-TW/core/runbook.md +110 -0
  337. package/bundled/locales/zh-TW/core/sast-advanced.md +309 -0
  338. package/bundled/locales/zh-TW/core/schema-evolution.md +98 -0
  339. package/bundled/locales/zh-TW/core/secret-management-standards.md +101 -0
  340. package/bundled/locales/zh-TW/core/secure-op.md +328 -0
  341. package/bundled/locales/zh-TW/core/security-testing.md +96 -0
  342. package/bundled/locales/zh-TW/core/self-review-protocol.md +2 -2
  343. package/bundled/locales/zh-TW/core/server-ops-security.md +507 -0
  344. package/bundled/locales/zh-TW/core/slo-sli.md +108 -0
  345. package/bundled/locales/zh-TW/core/smoke-test.md +79 -0
  346. package/bundled/locales/zh-TW/core/spec-driven-development.md +19 -11
  347. package/bundled/locales/zh-TW/core/supply-chain-attestation.md +131 -0
  348. package/bundled/locales/zh-TW/core/user-journey-testing.md +111 -0
  349. package/bundled/locales/zh-TW/core/user-story-mapping.md +94 -0
  350. package/bundled/locales/zh-TW/core/verification-oracle.md +159 -0
  351. package/bundled/locales/zh-TW/core/versioning.md +112 -112
  352. package/bundled/locales/zh-TW/docs/CHEATSHEET.md +31 -6
  353. package/bundled/locales/zh-TW/docs/DEV-WORKFLOW-MAPPING.md +6 -6
  354. package/bundled/locales/zh-TW/docs/FEATURE-REFERENCE.md +61 -34
  355. package/bundled/locales/zh-TW/docs/MIGRATION-v6.md +88 -0
  356. package/bundled/locales/zh-TW/docs/USAGE-MODES-COMPARISON.md +2 -2
  357. package/bundled/locales/zh-TW/docs/USER-MANUAL.md +14 -14
  358. package/bundled/locales/zh-TW/docs/specs/system/memory-adoption-strategy.md +105 -0
  359. package/bundled/locales/zh-TW/docs/user/FAQ.md +132 -0
  360. package/bundled/locales/zh-TW/docs/user/GETTING-STARTED.md +144 -0
  361. package/bundled/locales/zh-TW/docs/user/GLOSSARY.md +178 -0
  362. package/bundled/locales/zh-TW/docs/user/README.md +70 -0
  363. package/bundled/locales/zh-TW/docs/user/TROUBLESHOOTING.md +190 -0
  364. package/bundled/locales/zh-TW/integrations/github-copilot/COPILOT-CHAT-REFERENCE.md +1 -1
  365. package/bundled/locales/zh-TW/integrations/github-copilot/README.md +1 -1
  366. package/bundled/locales/zh-TW/integrations/github-copilot/skills-mapping.md +3 -3
  367. package/bundled/locales/zh-TW/integrations/opencode/skills-mapping.md +3 -3
  368. package/bundled/locales/zh-TW/methodologies/guides/sdd-guide.md +523 -26
  369. package/bundled/locales/zh-TW/options/changelog/auto-generated.md +166 -0
  370. package/bundled/locales/zh-TW/options/changelog/keep-a-changelog.md +140 -0
  371. package/bundled/locales/zh-TW/options/code-review/automated-review.md +214 -0
  372. package/bundled/locales/zh-TW/options/code-review/pair-programming.md +166 -0
  373. package/bundled/locales/zh-TW/options/code-review/pr-review.md +167 -0
  374. package/bundled/locales/zh-TW/options/documentation/api-docs.md +191 -0
  375. package/bundled/locales/zh-TW/options/documentation/markdown-docs.md +150 -0
  376. package/bundled/locales/zh-TW/options/documentation/wiki-style.md +131 -0
  377. package/bundled/locales/zh-TW/options/project-structure/kotlin.md +144 -0
  378. package/bundled/locales/zh-TW/options/project-structure/php.md +168 -0
  379. package/bundled/locales/zh-TW/options/project-structure/ruby.md +156 -0
  380. package/bundled/locales/zh-TW/options/project-structure/rust.md +136 -0
  381. package/bundled/locales/zh-TW/options/project-structure/swift.md +165 -0
  382. package/bundled/locales/zh-TW/options/testing/contract-testing.md +237 -0
  383. package/bundled/locales/zh-TW/options/testing/industry-pyramid.md +200 -0
  384. package/bundled/locales/zh-TW/options/testing/istqb-framework.md +144 -0
  385. package/bundled/locales/zh-TW/options/testing/performance-testing.md +251 -0
  386. package/bundled/locales/zh-TW/options/testing/security-testing.md +192 -0
  387. package/bundled/locales/zh-TW/skills/README.md +91 -128
  388. package/bundled/locales/zh-TW/skills/ac-coverage/SKILL.md +4 -6
  389. package/bundled/locales/zh-TW/skills/adr-assistant/SKILL.md +1 -1
  390. package/bundled/locales/zh-TW/skills/agents/code-architect.md +263 -0
  391. package/bundled/locales/zh-TW/skills/agents/doc-writer.md +410 -0
  392. package/bundled/locales/zh-TW/skills/agents/reviewer.md +357 -0
  393. package/bundled/locales/zh-TW/skills/agents/spec-analyst.md +410 -0
  394. package/bundled/locales/zh-TW/skills/agents/test-specialist.md +368 -0
  395. package/bundled/locales/zh-TW/skills/ai-collaboration-standards/SKILL.md +2 -2
  396. package/bundled/locales/zh-TW/skills/ai-friendly-architecture/SKILL.md +2 -2
  397. package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +1 -1
  398. package/bundled/locales/zh-TW/skills/atdd-assistant/SKILL.md +2 -0
  399. package/bundled/locales/zh-TW/skills/atdd-assistant/acceptance-criteria-guide.md +1 -1
  400. package/bundled/locales/zh-TW/skills/atdd-assistant/atdd-workflow.md +3 -4
  401. package/bundled/locales/zh-TW/skills/audit-assistant/SKILL.md +2 -2
  402. package/bundled/locales/zh-TW/skills/bdd-assistant/SKILL.md +2 -0
  403. package/bundled/locales/zh-TW/skills/bdd-assistant/guide.md +1 -2
  404. package/bundled/locales/zh-TW/skills/brainstorm-assistant/SKILL.md +110 -14
  405. package/bundled/locales/zh-TW/skills/brainstorm-assistant/guide.md +31 -7
  406. package/bundled/locales/zh-TW/skills/checkin-assistant/SKILL.md +3 -1
  407. package/bundled/locales/zh-TW/skills/ci-cd-assistant/SKILL.md +50 -0
  408. package/bundled/locales/zh-TW/skills/code-review-assistant/SKILL.md +7 -5
  409. package/bundled/locales/zh-TW/skills/commands/ac-coverage.md +1 -1
  410. package/bundled/locales/zh-TW/skills/commands/atdd.md +3 -3
  411. package/bundled/locales/zh-TW/skills/commands/bdd.md +2 -2
  412. package/bundled/locales/zh-TW/skills/commands/brainstorm.md +26 -17
  413. package/bundled/locales/zh-TW/skills/commands/{review.md → code-review.md} +5 -5
  414. package/bundled/locales/zh-TW/skills/commands/derive-all.md +1 -1
  415. package/bundled/locales/zh-TW/skills/commands/derive-atdd.md +1 -1
  416. package/bundled/locales/zh-TW/skills/commands/derive-bdd.md +2 -3
  417. package/bundled/locales/zh-TW/skills/commands/derive-tdd.md +1 -1
  418. package/bundled/locales/zh-TW/skills/commands/derive.md +1 -1
  419. package/bundled/locales/zh-TW/skills/commands/dev-workflow.md +2 -2
  420. package/bundled/locales/zh-TW/skills/commands/methodology.md +4 -4
  421. package/bundled/locales/zh-TW/skills/commands/pr.md +1 -1
  422. package/bundled/locales/zh-TW/skills/commands/tdd.md +1 -1
  423. package/bundled/locales/zh-TW/skills/commit-standards/SKILL.md +1 -1
  424. package/bundled/locales/zh-TW/skills/contract-test-assistant/SKILL.md +1 -1
  425. package/bundled/locales/zh-TW/skills/dev-methodology/create-methodology.md +456 -0
  426. package/bundled/locales/zh-TW/skills/dev-methodology/guide.md +5 -5
  427. package/bundled/locales/zh-TW/skills/dev-methodology/runtime.md +296 -0
  428. package/bundled/locales/zh-TW/skills/dev-workflow-guide/SKILL.md +5 -5
  429. package/bundled/locales/zh-TW/skills/docs-generator/SKILL.md +1 -1
  430. package/bundled/locales/zh-TW/skills/e2e-assistant/SKILL.md +1 -1
  431. package/bundled/locales/zh-TW/skills/incident-response-assistant/SKILL.md +2 -2
  432. package/bundled/locales/zh-TW/skills/logging-guide/SKILL.md +29 -27
  433. package/bundled/locales/zh-TW/skills/migration-assistant/SKILL.md +1 -1
  434. package/bundled/locales/zh-TW/skills/pr-automation-assistant/SKILL.md +3 -1
  435. package/bundled/locales/zh-TW/skills/project-discovery/guide.md +2 -2
  436. package/bundled/locales/zh-TW/skills/reverse-engineer/SKILL.md +1 -1
  437. package/bundled/locales/zh-TW/skills/security-assistant/SKILL.md +1 -1
  438. package/bundled/locales/zh-TW/skills/spec-derivation/guide.md +7 -8
  439. package/bundled/locales/zh-TW/skills/spec-driven-dev/SKILL.md +2 -2
  440. package/bundled/locales/zh-TW/skills/sweep/SKILL.md +1 -1
  441. package/bundled/locales/zh-TW/skills/tdd-assistant/SKILL.md +3 -1
  442. package/bundled/locales/zh-TW/skills/testing-guide/SKILL.md +2 -2
  443. package/bundled/locales/zh-TW/skills/testing-guide/testing-theory.md +2298 -0
  444. package/bundled/locales/zh-TW/skills/workflows/README.md +451 -0
  445. package/bundled/skills/README.md +1 -1
  446. package/bundled/skills/ac-coverage/SKILL.md +17 -7
  447. package/bundled/skills/adr-assistant/SKILL.md +1 -1
  448. package/bundled/skills/agents/code-architect.md +1 -1
  449. package/bundled/skills/agents/doc-writer.md +1 -1
  450. package/bundled/skills/agents/reviewer.md +2 -2
  451. package/bundled/skills/agents/spec-analyst.md +1 -1
  452. package/bundled/skills/agents/test-specialist.md +1 -1
  453. package/bundled/skills/ai-collaboration-standards/SKILL.md +2 -2
  454. package/bundled/skills/ai-friendly-architecture/SKILL.md +2 -2
  455. package/bundled/skills/ai-instruction-standards/SKILL.md +1 -1
  456. package/bundled/skills/atdd-assistant/SKILL.md +7 -0
  457. package/bundled/skills/atdd-assistant/acceptance-criteria-guide.md +1 -1
  458. package/bundled/skills/atdd-assistant/atdd-workflow.md +6 -8
  459. package/bundled/skills/audit-assistant/SKILL.md +2 -2
  460. package/bundled/skills/bdd-assistant/SKILL.md +7 -0
  461. package/bundled/skills/bdd-assistant/guide.md +1 -2
  462. package/bundled/skills/brainstorm-assistant/SKILL.md +133 -11
  463. package/bundled/skills/brainstorm-assistant/guide.md +33 -5
  464. package/bundled/skills/checkin-assistant/SKILL.md +8 -1
  465. package/bundled/skills/ci-cd-assistant/SKILL.md +57 -0
  466. package/bundled/skills/code-review-assistant/SKILL.md +15 -8
  467. package/bundled/skills/commands/COMMAND-FAMILY-OVERVIEW.md +2 -2
  468. package/bundled/skills/commands/COMMAND-INDEX.json +3 -3
  469. package/bundled/skills/commands/README.md +2 -2
  470. package/bundled/skills/commands/ac-coverage.md +1 -1
  471. package/bundled/skills/commands/atdd.md +2 -2
  472. package/bundled/skills/commands/bdd.md +2 -2
  473. package/bundled/skills/commands/brainstorm.md +25 -14
  474. package/bundled/skills/commands/{review.md → code-review.md} +6 -6
  475. package/bundled/skills/commands/derive-all.md +1 -1
  476. package/bundled/skills/commands/derive-atdd.md +1 -1
  477. package/bundled/skills/commands/derive-bdd.md +2 -3
  478. package/bundled/skills/commands/derive-tdd.md +1 -1
  479. package/bundled/skills/commands/derive.md +1 -1
  480. package/bundled/skills/commands/dev-workflow.md +1 -1
  481. package/bundled/skills/commands/journey-test.md +45 -0
  482. package/bundled/skills/commands/methodology.md +4 -4
  483. package/bundled/skills/commands/pr.md +1 -1
  484. package/bundled/skills/commands/skill-builder.md +42 -0
  485. package/bundled/skills/commands/tdd.md +1 -1
  486. package/bundled/skills/dev-methodology/create-methodology.md +1 -1
  487. package/bundled/skills/dev-methodology/guide.md +1 -1
  488. package/bundled/skills/dev-methodology/runtime.md +1 -1
  489. package/bundled/skills/dev-workflow-guide/SKILL.md +3 -3
  490. package/bundled/skills/dev-workflow-guide/workflow-phases.md +3 -3
  491. package/bundled/skills/docs-generator/SKILL.md +3 -3
  492. package/bundled/skills/incident-response-assistant/SKILL.md +2 -2
  493. package/bundled/skills/logging-guide/SKILL.md +38 -2
  494. package/bundled/skills/migration-assistant/SKILL.md +226 -0
  495. package/bundled/skills/observability-assistant/SKILL.md +74 -0
  496. package/bundled/skills/pr-automation-assistant/SKILL.md +5 -1
  497. package/bundled/skills/project-discovery/guide.md +2 -2
  498. package/bundled/skills/push/SKILL.md +1 -1
  499. package/bundled/skills/release-standards/SKILL.md +19 -5
  500. package/bundled/skills/security-assistant/SKILL.md +1 -1
  501. package/bundled/skills/skill-builder/SKILL.md +1 -1
  502. package/bundled/skills/spec-derivation/guide.md +3 -4
  503. package/bundled/skills/spec-driven-dev/SKILL.md +2 -2
  504. package/bundled/skills/sweep/SKILL.md +1 -1
  505. package/bundled/skills/tdd-assistant/SKILL.md +8 -1
  506. package/bundled/skills/testing-guide/SKILL.md +1 -1
  507. package/bundled/skills/testing-guide/testing-theory.md +1 -1
  508. package/bundled/skills/workflows/README.md +2 -2
  509. package/package.json +3 -3
  510. package/src/commands/audit.js +30 -9
  511. package/src/commands/config.js +33 -2
  512. package/src/commands/hitl.js +14 -1
  513. package/src/commands/init.js +110 -58
  514. package/src/commands/quickstart.js +1 -2
  515. package/src/commands/release.js +51 -6
  516. package/src/commands/run-intent.js +9 -0
  517. package/src/commands/spec-split.js +27 -2
  518. package/src/commands/update.js +22 -6
  519. package/src/config/ai-agent-paths.js +3 -1
  520. package/src/i18n/messages.js +3 -102
  521. package/src/missions/MissionManager.js +44 -12
  522. package/src/utils/build-manifest.js +35 -3
  523. package/src/utils/friction-detector.js +71 -22
  524. package/src/utils/health-checker.js +29 -2
  525. package/src/utils/transaction.js +111 -0
  526. package/src/utils/version-promote.js +16 -0
  527. package/standards-registry.json +58 -146
  528. package/bundled/ai/standards/agent-communication-protocol.ai.yaml +0 -42
  529. package/bundled/ai/standards/agent-dispatch.ai.yaml +0 -42
  530. package/bundled/ai/standards/branch-completion.ai.yaml +0 -44
  531. package/bundled/ai/standards/change-batching-standards.ai.yaml +0 -44
  532. package/bundled/ai/standards/execution-history.ai.yaml +0 -42
  533. package/bundled/ai/standards/pipeline-integration-standards.ai.yaml +0 -42
  534. package/bundled/ai/standards/workflow-enforcement.ai.yaml +0 -44
  535. package/bundled/ai/standards/workflow-state-protocol.ai.yaml +0 -43
  536. package/src/commands/flow.js +0 -260
  537. package/src/commands/start.js +0 -372
  538. package/src/commands/sweep.js +0 -151
  539. package/src/commands/workflow.js +0 -681
@@ -167,6 +167,203 @@ Before merging any migrated endpoint:
167
167
  - [ ] Contract test fixture 已 commit
168
168
  - [ ] Cross-link 至 contract-test-assistant 做持續消費端驗證
169
169
 
170
+ ## Post-Cutover Data Reconciliation | Cutover 後生產資料對帳
171
+
172
+ > **Implements**: XSPEC-284 R2 (axis ③ persisted-data semantics) / closes UDS issue [#134](https://github.com/AsiaOstrich/universal-dev-standards/issues/134).
173
+
174
+ Contract tests (above) and `behavior-snapshot` catch **interface** divergence but are blind to **persisted-data semantic** divergence. Two blind spots both share:
175
+
176
+ 1. **You can only assert what you thought to enumerate.** The rules that actually ship broken are the *implicit, undocumented* ones — especially the semantics of a persisted field (when is it non-zero? when is it overwritten?). Nobody writes a scenario for a rule they don't know exists.
177
+ 2. **Per-request parity ≠ data-at-rest parity.** A field written by an **asynchronous** process (delivery-receipt sync, settlement job, status reconciler) against a live external provider is not a deterministic request you can replay. Its correctness only emerges in **aggregate over real production volume**, not in a single happy-path snapshot.
178
+
179
+ Contract test 與 `behavior-snapshot`只能捕捉**介面**分歧,對**持久化資料語義**分歧視而不見。兩者共有兩個盲區:(1) 你只能驗證你想得到要列舉的規則——真正出包的永遠是沒人寫下來的隱含規則(某欄位何時非零、何時被覆寫);(2) per-request parity ≠ data-at-rest parity——由**非同步**程序(DR sync、結算批次、狀態對帳器)對 live 外部供應商寫入的欄位,不是可重放的確定性請求,其正確性只在**真實生產量的聚合**中浮現。
180
+
181
+ ### Failure fingerprint | 事故指紋(#134)
182
+
183
+ 某企業 SMS 平台 PHP→.NET 重寫:每筆金額由**非同步** DR sync 覆寫(`record.Cost = gatewayDr.Cost`)。legacy 對 carrier-failure 仍計費,rewrite 寫 gateway 回報的 `0` → cutover 邊界兩側同一失敗狀態的金額分歧。**所有既有 gate 全部漏接**(response shape 相同 → contract test 過;無人 curated「失敗仍計費」場景;欄位由背景作業對 live gateway 寫入 → 不可重放)。最後靠 ops 跑生產 `SUM(cost) GROUP BY status, day` 跨邊界彙總才發現。**單日抽樣甚至誤判「失敗不計費=正常」**——只有跨 cutover 邊界的多週聚合才揭露真相。
184
+
185
+ ### Mandatory rule | 強制規則
186
+
187
+ When a migration loads legacy data into the **same store** as new data, the old/new boundary is a **free differential oracle**. For each business-critical persisted field you **MUST**:
188
+
189
+ - Define **aggregate reconciliation invariants** comparing the distribution of **legacy-origin vs new-origin** rows along key dimensions (e.g. `SUM(money) / COUNT(*) GROUP BY status, period`).
190
+ - Run them **on a schedule against production** and alert when divergence exceeds a declared tolerance.
191
+ - Investigate over a **multi-week window spanning the cutover** — never a single-day sample (a sampled check can confirm a *wrong* conclusion).
192
+
193
+ 當 migration 將 legacy 資料載入與 new 相同的**儲存**,新舊邊界即是**免費差分神諭**。對每個 business-critical 持久化欄位**必須**:定義聚合對帳不變量(比對 legacy-origin vs new-origin 列沿關鍵維度的分佈)、對生產**排程執行**並於分歧超過宣告容差時告警、以跨 cutover 的**多週窗口**調查(切忌單日抽樣,抽樣可能坐實錯誤結論)。
194
+
195
+ ### Cutover-boundary reconciliation SQL template | 對帳 SQL 模板
196
+
197
+ ```sql
198
+ -- Reconcile a money/state field across the migration cutover boundary.
199
+ SELECT status,
200
+ SUM(CASE WHEN created < @cutover THEN 1 ELSE 0 END) AS legacy_rows,
201
+ SUM(CASE WHEN created < @cutover AND money_field > 0 THEN 1 ELSE 0 END) AS legacy_nonzero,
202
+ SUM(CASE WHEN created >= @cutover THEN 1 ELSE 0 END) AS new_rows,
203
+ SUM(CASE WHEN created >= @cutover AND money_field > 0 THEN 1 ELSE 0 END) AS new_nonzero
204
+ FROM records GROUP BY status;
205
+ -- Invariant: nonzero-ratio per status must not differ across the boundary beyond tolerance.
206
+ ```
207
+
208
+ ### Tolerance & alerting guidance | 容差與告警指引
209
+
210
+ | Aspect | Guidance | 指引 |
211
+ |--------|----------|------|
212
+ | **Invariant type** | nonzero-ratio / `SUM` / `COUNT` / `DISTINCT` / checksum per `GROUP BY status, period` | 每維度的非零比率 / 聚合相等 / checksum |
213
+ | **Tolerance** | Declare per field; 0% for hard accounting invariants, a small ε only for known legitimate drift (e.g. rounding) | 逐欄宣告;硬會計不變量 0%,僅已知合法漂移容許小 ε |
214
+ | **Window** | Multi-week, spanning cutover; bucket by `period` to localise the boundary | 多週、橫跨 cutover;以 `period` 分桶定位邊界 |
215
+ | **Schedule** | Standing post-cutover cron (daily) until boundary rows age out of active reporting | post-cutover 排程(每日)直到邊界列退出活躍報表 |
216
+ | **Alert** | Page on divergence > tolerance; route via `observability-assistant` alert rules | 分歧超過容差即告警;經 `observability-assistant` 告警規則路由 |
217
+
218
+ ### Gate 0 — Implicit-rule capture for persisted business fields | 隱含規則擷取
219
+
220
+ Before migrating any feature that writes a persisted business field, **explicitly answer for each such field** three questions, then lock the answer as a snapshot scenario **or** a reconciliation invariant:
221
+
222
+ > 1. **When is this value SET?** 何時設值?
223
+ > 2. **When is it OVERWRITTEN?** 何時被覆寫?(尤其非同步路徑)
224
+ > 3. **When is it ZEROED / nulled?** 何時歸零/清空?
225
+
226
+ **High-risk implicit-rule checklist** — empirically recurring fingerprints | 高風險隱含規則檢查清單(經驗反覆出現的指紋):
227
+
228
+ - [ ] **Billing / charge semantics** — charged on submit vs on delivery; refund-on-failure? | 計費語義(提交時計費 vs 送達時計費;失敗退費?)
229
+ - [ ] **Enum / status-code mapping** — every legacy code mapped; "success set" defined identically | 列舉/狀態碼對映(每個 legacy 碼都對映;「成功集合」定義一致)
230
+ - [ ] **Null / empty handling** — empty string vs null vs absent; default-on-missing | 空值處理(空字串 vs null vs 不存在;缺值預設)
231
+ - [ ] **Field-name casing / serialization** — snake_case vs camelCase binding | 欄位命名大小寫/序列化(snake_case vs camelCase 綁定)
232
+ - [ ] **Timezone** — stored UTC vs local; report boundaries | 時區(存 UTC vs local;報表邊界)
233
+ - [ ] **Rounding / type coercion** — `"2.00"` (text) parsed as int → dropped to 0 | 四捨五入/型別強轉(`"2.00"` 文字被當 int 解析 → 掉成 0)
234
+
235
+ ### 3-gate positioning | 3-gate 定位表
236
+
237
+ Make the boundary between gates explicit so each axis has an owner and nothing falls into the seam:
238
+
239
+ | Gate | Scope | When | 範圍 / 時機 |
240
+ |------|-------|------|------|
241
+ | [`behavior-snapshot`](../../core/behavior-snapshot.md) | per-request, **curated** scenarios | pre-UAT CI | per-request、人工 curated 場景;pre-UAT CI |
242
+ | Contract tests (above / #112) | response **shape** (keys / types / placement) | unit / integration | response shape(keys/型別/層級);單元/整合 |
243
+ | **This section (#134)** | **aggregate, data-at-rest semantics of async-written fields, over real volume** | **post-cutover, scheduled, production** | **非同步寫入欄位的聚合、靜態資料語義,跨真實量;post-cutover 排程生產** |
244
+
245
+ > Cross-ref: [`behavior-snapshot`](../../core/behavior-snapshot.md) (curated golden masters), [`observability-assistant`](../observability-assistant/SKILL.md) (reconciliation schedule + alert templates).
246
+
247
+ ## Background Job / Side-Effect Completeness | 背景作業/副作用完整性
248
+
249
+ > **Implements**: XSPEC-284 R3 (axis ⑤).
250
+
251
+ Migration inventories (`/vo-inventory`, XSPEC-200 `type:background_job`) and Devil's-Advocate grep (XSPEC-201 Step 4) **annotate** cron / queue consumers / scheduled batches / webhooks / mail-send points — but annotation alone proves nothing. A background job can be listed in the manifest, exist in code, and still **never actually run** in the new system.
252
+
253
+ 遷移清單與副作用 grep 只是**標注**背景作業——標注本身不證明任何事。背景作業可能在 manifest 列出、程式碼存在,卻在新系統**從未真正執行**。
254
+
255
+ ### Mandatory rule | 強制規則
256
+
257
+ For every background side-effect carried over from legacy, verify **two** things — annotation is not enough:
258
+
259
+ | Check | Pre-flight | Post-cutover |
260
+ |-------|-----------|--------------|
261
+ | **(a) Exists** — the cron / queue consumer / webhook / mail point is implemented in the new system | source grep + registration check | — |
262
+ | **(b) Executed** — it has actually been **triggered / run at least once**, with observable evidence (log line, heartbeat, queue-depth drain, telemetry counter) | — | observability evidence required |
263
+
264
+ If either check fails, mark the feature `not_implemented` (XSPEC-199) and **block UAT / cutover** — do not treat a silent, never-fired job as "done".
265
+
266
+ 對每條由 legacy 帶過來的背景副作用,須驗證**兩件事**(標注不夠):(a) **存在**——cron/queue consumer/webhook/寄信點在新系統實際實作(source grep + 註冊檢查);(b) **已執行**——post-cutover 已被**觸發/執行至少一次**且有可觀測證據(log、heartbeat、queue depth 排空、telemetry counter)。任一不過即標 `not_implemented`(XSPEC-199)並 **block UAT/cutover**——絕不把沉默、從未觸發的作業當「完成」。
267
+
268
+ > Cross-ref: structured-log mandatory events `heartbeat` / `business_event` (logging-standards) provide the observable execution evidence for check (b).
269
+
270
+ ## State-Machine & Temporal Parity | 狀態機與時序對等
271
+
272
+ > **Implements**: XSPEC-284 R8 (axis ⑧) → split out as **XSPEC-287**.
273
+
274
+ Legacy state-transition rules and temporal preconditions are **implicit**: a single-record snapshot "looks legal", and a violation only surfaces across a **sequence** of operations. So per-request functional parity and behavior-snapshot parity both miss them (same blind-spot class as "per-request ≠ data-at-rest" / "per-request ≠ concurrency"). `feature-manifest` has only a `status` field — it does **not** validate transition legality.
275
+
276
+ legacy 的狀態轉移規則與時序前提多為**隱性**:單筆記錄的快照「看起來合法」,違規只在一連串操作的**轉移序列**中浮現,因此 per-request 功能對等與 behavior-snapshot 對等都抓不到(與「per-request ≠ data-at-rest」「per-request ≠ 並發」同源盲區)。`feature-manifest` 只有 `status` 欄,**不**驗證轉移合法性。
277
+
278
+ ### Step 1 — State-machine list source (derive, R3) | 狀態機清單來源
279
+
280
+ Legacy transitions are scattered across controllers / services / DB triggers. Derive the state enumeration + legal-transition set **mechanically** via three-way cross-reference (do not rely on memory):
281
+
282
+ legacy 狀態轉移散落於 controller/service/DB trigger。以**三方交叉**機械化擷取狀態列舉 + 合法轉移集(不靠人腦回憶):
283
+
284
+ | Source | Yields |
285
+ |--------|--------|
286
+ | **(1) enum definition** — status enum / lookup table | the full set of declared states |
287
+ | **(2) state-update points** — grep every `status = ...` / `UPDATE ... SET status` / trigger | which transitions the code *can* perform |
288
+ | **(3) production actual sequences** — distinct `(from_status → to_status)` pairs observed in prod history/audit | which transitions *actually* occur |
289
+
290
+ > **Authority on conflict**: when the three disagree, treat **production-observed transitions as the legacy ground truth** (echoes #134 "production is the oracle"). A transition the code allows but production never produced is a latent path; a production transition the new enum forbids is a regression.
291
+
292
+ > **權威性**:三者不一致時,以**生產實際出現過的轉移為 legacy 真實行為基準**(呼應 #134「以生產為準」)。程式碼允許但生產從未產生的轉移是潛在路徑;生產出現過但新 enum 禁止的轉移是回歸。
293
+
294
+ ### Step 2 — Legal-transition validation (oracle, R1) | 合法轉移驗證
295
+
296
+ From the derived transition graph, assert the **new system forbids illegal transitions** that legacy forbade. Block when the new system **allows a transition legacy prohibited** (a rewrite routinely loosens implicit guards):
297
+
298
+ 依萃取出的轉移圖,斷言**新系統禁止 legacy 禁止的非法轉移**。當新系統**允許 legacy 禁止的轉移**即 block(重寫常放寬隱性護欄):
299
+
300
+ - `cancelled → pending` (reviving a cancelled order)
301
+ - `refunded → paid` (un-refunding)
302
+ - `shipped → draft` (backward past a point-of-no-return)
303
+
304
+ **Gate timing**: pre-UAT.
305
+
306
+ ### Step 3 — Temporal invariant detection (oracle, R2) | 時序不變量偵測
307
+
308
+ Assert temporal invariants that a single-row snapshot cannot reveal; violation → alert:
309
+
310
+ 斷言單筆快照無法揭露的時序不變量;違反即告警:
311
+
312
+ - `created_at ≤ updated_at` (no record updated before it existed)
313
+ - no **future timestamps** (clock skew / bad default)
314
+ - **monotonic** status-timestamp progression (`paid_at ≤ shipped_at ≤ delivered_at`)
315
+ - event-ordering guarantees preserved (no reordered event log)
316
+
317
+ **Gate timing**: pre-UAT **and** post-cutover (shares the reconciliation schedule of axis ③ Post-Cutover Data Reconciliation above).
318
+
319
+ **Gate 時機**:pre-UAT **與** post-cutover(與上方軸③ Post-Cutover 對帳共用排程)。
320
+
321
+ ### Step 4 — Sequence / ordering parity (R4) | 序列/順序對等
322
+
323
+ Verify the new system preserves **idempotency** (a repeated operation does not produce a duplicate state change) and **critical event ordering**, so the rewrite does not introduce order-sensitive bugs:
324
+
325
+ 驗證新系統保留**冪等性**(重複操作不產生重複狀態變更)與**關鍵事件順序**,避免重寫引入順序敏感 bug:
326
+
327
+ - [ ] Replaying the same event/message twice yields one state change, not two
328
+ - [ ] Out-of-order delivery is rejected or reconciled, not silently applied
329
+ - [ ] Idempotency keys / dedup windows match legacy semantics
330
+
331
+ ### Boundary with XSPEC-286 axis ⑥ | 與 XSPEC-286 軸⑥ 邊界
332
+
333
+ **287 (this section, axis ⑧)** owns **transition legality + temporal correctness** (a domain question). **[XSPEC-286](../../core/performance-standards.md) axis ⑥** owns **concurrency race / isolation** (a performance/contention question). An overlap case — a *concurrent* operation causing an *illegal* transition — has its concurrency aspect in 286 and its transition-legality aspect here; assign the primary owner per the dominant failure mode at landing time.
334
+
335
+ **287(本節,軸⑧)**負責**轉移合法性 + 時序正確性**(領域問題);**[XSPEC-286](../../core/performance-standards.md) 軸⑥**負責**並發競態/隔離**(效能/競爭問題)。重疊案例(並發導致非法轉移)的並發面歸 286、轉移合法性面歸本節;落地時依主導失敗模式指派主責。
336
+
337
+ ## Error-Path Completeness | 錯誤路徑完整性
338
+
339
+ > **Implements**: XSPEC-284 R9 (axis ⑨) → split out as **XSPEC-288**.
340
+
341
+ The most common migration omission is "happy path migrated, error / degradation / fallback branches dropped in bulk". The happy path has an explicit requirement; error branches are scattered (try/catch layers, custom exception hierarchies, specific error codes) and silently lost. This skill owns the **migration derive + degradation parity** (R1/R3); the **systematic missing-branch gap analysis + error-response differential** (R2/R4) lives in [full-coverage-testing](../../core/full-coverage-testing.md) "Migration Error-Path Completeness".
342
+
343
+ 最常見的遷移遺漏是「happy path 移了、錯誤/降級/fallback 分支整批被漏」。happy path 有明確需求,錯誤分支散落(try/catch 階層、自訂例外階層、特定錯誤碼)而被靜默遺失。本 skill 負責**遷移 derive + 降級對等**(R1/R3);**系統性遺漏分支 gap 分析 + 錯誤回應差分**(R2/R4)落在 [full-coverage-testing](../../core/full-coverage-testing.md)「Migration Error-Path Completeness」。
344
+
345
+ ### Step 1 — Mechanized legacy exception / error-code list (derive, R1) | 機械化例外/錯誤碼清單
346
+
347
+ Enumerate the legacy error surface **mechanically** (not from recall): grep `catch`/`except`/`rescue` blocks, the custom exception/error class hierarchy, all error/status codes, and error response shapes (serializers/DTOs). This list is the error-path to-verify checklist handed to the gap analysis in full-coverage-testing.
348
+
349
+ **機械化**列舉 legacy 錯誤面(不靠回憶):grep `catch`/`except`/`rescue` 區塊、自訂例外/錯誤類階層、所有錯誤/狀態碼、錯誤回應形狀(serializer/DTO)。此清單即交給 full-coverage-testing gap 分析的錯誤路徑待驗清單。
350
+
351
+ ### Step 2 — Degradation / fallback parity (R3) | 降級/Fallback 對等
352
+
353
+ legacy degradation modes only run on failure, so they are easy to drop. Verify the new system preserves them — fail closed on parity, not "consistent on happy path, wildly different on failure":
354
+
355
+ legacy 降級模式只在失敗時執行,容易被漏。驗證新系統保留——對等上 fail closed,而非「正常路徑一致、失敗時行為迥異」:
356
+
357
+ - [ ] External-service-failure **fallback** matches legacy | 外部服務失敗 fallback 與 legacy 一致
358
+ - [ ] **Retry** policy (count / backoff / give-up) matches legacy | 重試策略(次數/backoff/放棄)與 legacy 一致
359
+ - [ ] **Partial-result** handling matches legacy | 部分結果處理與 legacy 一致
360
+ - [ ] **Circuit-breaker / timeout** degradation matches legacy | 斷路器/逾時降級與 legacy 一致
361
+
362
+ > **Importance ranking**: rank legacy error branches by **production-actual trigger frequency** (#134 "production is the oracle"). A high-frequency prod error branch with no new-system mapping is a hard block; never-fired latent branches are still listed but lower priority.
363
+ > **重要性分級**:依**生產實際觸發頻率**排序(#134「以生產為準」)。高頻生產錯誤分支無對映即硬 block;從未觸發的潛在分支仍列入但較低優先。
364
+
365
+ > Cross-ref: [full-coverage-testing](../../core/full-coverage-testing.md) Migration Error-Path Completeness (gap report + error-response differential, R2/R4); [behavior-snapshot](../../core/behavior-snapshot.md) (error-response parity).
366
+
170
367
  ## Rollback Strategy | 回滾策略
171
368
 
172
369
  | Approach | When to Use | 使用時機 |
@@ -199,15 +396,44 @@ After `/migrate` completes, the AI assistant should suggest:
199
396
  > - 執行 `/testing` 確保遷移後測試通過 ⭐ **Recommended / 推薦** — Verify post-migration tests
200
397
  > - 執行 `/commit` 提交遷移變更 — Commit migration changes
201
398
 
399
+ ## Appendix — 9-Axis Completeness Matrix | 附錄:9 軸完整性矩陣
400
+
401
+ > **Source**: XSPEC-284 Legacy Refactor Completeness Framework. "Ensuring nothing is missing cannot be proven by enumeration" — you can only verify what you thought to enumerate. Strategy = two legs: **(1) mechanically derive** the to-do list from real legacy artifacts (schema / routes / cron config / prod logs), and **(2) differential oracles** (shadow run / replay / cutover-boundary reconciliation) that make divergence self-report.
402
+ >
403
+ > 「確保沒有遺漏」無法用列舉證明——你只能驗證你想得到要列舉的東西。策略=兩條腿:(1) 從 legacy 真實 artifact **機械化推導**待辦清單;(2) **差分神諭**讓分歧自報。
404
+
405
+ Each migration declares, per axis, three things: **derive** (list source) · **detect** (oracle) · **gate timing**. Axes marked here as covered map to existing UDS standards — do not re-invent.
406
+
407
+ | Axis | Derive (list source) | Detect (oracle) | Gate | Covered by |
408
+ |------|----------------------|-----------------|------|------------|
409
+ | ① Feature | route table / controller / menu / permissions | inventory diff (legacy vs new) | pre-flight | XSPEC-200 feature-manifest + `/vo-inventory`; XSPEC-206 |
410
+ | ② Behavior | curated scenarios + prod-log extraction | behavior-snapshot parity | pre-UAT | XSPEC-201 behavior-snapshot; **contract tests** (this skill) |
411
+ | ③ **Persisted semantics** | DB schema full-column semantic sign-off (Gate 0) | **cutover-boundary aggregate reconciliation** | **post-cutover** | **This skill — Post-Cutover Data Reconciliation (#134)** |
412
+ | ④ Implicit rules | cron / queue / computed-column / middleware source scan | per-field 3 questions + non-HTTP Devil's Advocate | pre-flight | This skill Gate 0 (HTTP layer: XSPEC-201 Step 7); XSPEC-284 R4 (non-HTTP, future) |
413
+ | ⑤ **Background side-effects** | crontab / queue config / webhook registry / mail points | **per-job "exists + has fired"** | pre-flight + **post-cutover** | **This skill — Background Job / Side-Effect Completeness** |
414
+ | ⑥ Non-functional | legacy perf baseline + concurrency list | latency/throughput regression + isolation | pre-UAT | XSPEC-286 (split out) |
415
+ | ⑦ Data integrity | schema type / encoding / timezone list | row count + checksum + encoding bytes + aggregate equality | post-migration + post-cutover | XSPEC-172 data-migration-testing; XSPEC-206; XSPEC-284 R6 (future) |
416
+ | ⑧ **State machine** | legacy transition graph (enum + update-points + prod sequences) | **legal transitions + temporal invariants (`created ≤ updated`)** | pre-UAT + **post-cutover** | **This skill — State-Machine & Temporal Parity** (XSPEC-287) |
417
+ | ⑨ **Error paths** | legacy exception hierarchy / error codes (this skill derive + degradation) | **error-path snapshot + systematic gap analysis + error-response differential** | pre-UAT + cutover before/after | **This skill — Error-Path Completeness** (R1/R3) + **full-coverage-testing** Migration Error-Path Completeness (R2/R4); XSPEC-288 |
418
+ | **Cross-axis** | — | **shadow run** (mirror prod to both) / **replay** (replay legacy requests) | cutover before/after | XSPEC-284 R5 (generalises `/vo-snapshot` parity, future) |
419
+
420
+ 每軸宣告〔清單來源 derive|oracle detect|gate 時機〕;標為已覆蓋者對映既有 UDS 標準,**勿重複造輪子**。未宣告的軸視為**已知遺漏風險**。本框架 P0 落地=軸③④⑤(本 skill);軸⑥已拆 XSPEC-286(落地於 performance-standards)、**軸⑧已落地於本 skill State-Machine & Temporal Parity(XSPEC-287)**、**軸⑨已落地(XSPEC-288)=本 skill Error-Path Completeness(R1/R3 derive + 降級)+ full-coverage-testing(R2/R4 系統性 gap 分析 + 錯誤回應差分)**。
421
+
202
422
  ## Reference | 參考
203
423
 
204
424
  - Core standard: [refactoring-standards.md](../../core/refactoring-standards.md)
205
425
  - Related: [contract-test-assistant](../contract-test-assistant/SKILL.md) — Strategy for ongoing contract verification post-migration
426
+ - Related: [behavior-snapshot](../../core/behavior-snapshot.md) — Curated golden-master parity (3-gate axis ②)
427
+ - Related: [observability-assistant](../observability-assistant/SKILL.md) — Reconciliation schedule + alert rules for post-cutover oracle
428
+ - Framework: XSPEC-284 Legacy Refactor Completeness Framework — 9-axis SSOT
206
429
 
207
430
  ## Version History | 版本歷史
208
431
 
209
432
  | Version | Date | Changes | 變更 |
210
433
  |---------|------|---------|------|
434
+ | 1.4.0 | 2026-06-17 | Added: Error-Path Completeness (axis ⑨, XSPEC-288) — mechanized legacy exception/error-code derive (R1) + degradation/fallback parity checklist (R3) + production-frequency importance ranking; systematic gap analysis + error-response differential (R2/R4) delegated to full-coverage-testing; matrix row ⑨ split between this skill and full-coverage-testing | 新增錯誤路徑完整性(軸⑨,XSPEC-288):機械化例外/錯誤碼 derive(R1)+ 降級對等清單(R3)+ 生產頻率重要性分級;系統性 gap 分析 + 錯誤回應差分(R2/R4)委由 full-coverage-testing |
435
+ | 1.3.0 | 2026-06-17 | Added: State-Machine & Temporal Parity (axis ⑧, XSPEC-287) — three-way transition-graph derive (enum + update-points + prod sequences), legal-transition validation, temporal invariants (`created ≤ updated` / no future / monotonic), sequence/idempotency parity, boundary with XSPEC-286 axis ⑥; matrix row ⑧ now owned by this skill | 新增狀態機與時序對等(軸⑧,XSPEC-287):三方轉移圖萃取、合法轉移驗證、時序不變量、序列/冪等對等、與 XSPEC-286 軸⑥邊界 |
436
+ | 1.2.0 | 2026-06-17 | Added: Post-Cutover Data Reconciliation (cutover-boundary SQL + tolerance/alerting + Gate-0 implicit-rule checklist + 3-gate positioning), Background Job / Side-Effect Completeness (exists + has-fired), 9-axis Completeness Matrix appendix; cross-ref behavior-snapshot/observability-assistant (XSPEC-284 P0 R2/R3 / closes #134) | 新增 Post-Cutover 生產資料對帳、背景作業完整性驗證、9 軸完整性矩陣附錄 |
211
437
  | 1.1.0 | 2026-05-26 | Added: API Migration Contract Tests section — mandatory fixture capture protocol, C#/TS templates, field-by-field audit checklist (XSPEC-233 / closes #112) | 新增 API 遷移合約測試章節 |
212
438
  | 1.0.0 | 2026-03-24 | Initial release | 初始版本 |
213
439
 
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  name: observability
3
3
  scope: universal
4
+ anchor_standard: observability-standards
4
5
  description: |
5
6
  Guide observability setup, metrics design, and alerting configuration.
6
7
  Use when: new service instrumentation, SLO definition, alert design, maturity assessment.
@@ -13,6 +14,12 @@ argument-hint: "[service name or observability topic | 服務名稱或可觀測
13
14
 
14
15
  > **Language**: English | [繁體中文](../../locales/zh-TW/skills/observability-assistant/SKILL.md)
15
16
 
17
+ **Version**: 1.0.0
18
+ **Last Updated**: 2026-06-19
19
+ **Applicability**: Claude Code Skills
20
+
21
+ > **Core Standard**: This skill implements [Observability Standards](../../core/observability-standards.md). For the authoritative methodology (full Metrics/Traces detail, sampling, OTel integration), refer to the core standard.
22
+
16
23
  Guide observability implementation across the three pillars: Logs, Metrics, and Traces.
17
24
 
18
25
  引導三支柱可觀測性實作:Logs、Metrics、Traces。
@@ -37,6 +44,73 @@ Guide observability implementation across the three pillars: Logs, Metrics, and
37
44
  /observability "payment-service" # Guide for specific service
38
45
  ```
39
46
 
47
+ ## Three Pillars Framework | 三支柱框架
48
+
49
+ Each pillar gives a different lens; their power is in correlation.
50
+
51
+ | Pillar | What It Captures | When to Use | Granularity |
52
+ |--------|-----------------|-------------|-------------|
53
+ | **Logs** | Discrete events with context | Debugging, audit trails, error details | High (per-event) |
54
+ | **Metrics** | Numerical measurements over time | Dashboards, alerting, capacity planning | Low (aggregated) |
55
+ | **Traces** | Request flow across services | Latency analysis, dependency mapping | Medium (per-request) |
56
+
57
+ **Correlation fields**: `trace_id` links Logs ↔ Traces ↔ Metrics (via Exemplars);
58
+ `service.name` filters all three pillars. Workflow: metric anomaly → exemplar →
59
+ trace → `trace_id` in logs.
60
+
61
+ ## Golden Signals | 四大黃金信號
62
+
63
+ Based on Google SRE. Every service SHOULD monitor all four before production.
64
+
65
+ | Signal | Measure | Example Metric | Alert (SLO-based) |
66
+ |--------|---------|----------------|-------------------|
67
+ | **Latency** | P50/P95/P99 via Histogram, split success/error | `http.server.request.duration.seconds` | P99 > X ms for 5 min |
68
+ | **Traffic** | Requests/sec, by route/method | `http.server.request.total` (rate) | drop > 50% or spike > 200% |
69
+ | **Errors** | errors / total requests | `...request.total{status=~"5.."}` ÷ total | error rate > X% for 5 min |
70
+ | **Saturation** | CPU/mem/pool/disk utilization | `system.cpu.utilization` (Gauge) | resource > 80% for 10 min |
71
+
72
+ ## Metric Types | Metric 型別
73
+
74
+ | Type | Behavior | Use When |
75
+ |------|----------|----------|
76
+ | **Counter** | Only goes up (resets on restart) | request count, error count, bytes sent |
77
+ | **Gauge** | Point-in-time, up/down | queue depth, active connections, memory |
78
+ | **Histogram** | Distribution across buckets | request duration, response size |
79
+ | **Summary** | Client-computed percentiles | legacy, no server-side aggregation |
80
+
81
+ **Naming**: `<domain>.<entity>.<action>.<unit>` in `snake_case` (e.g.
82
+ `db.client.query.duration.seconds`). **Label cardinality**: keep labels under
83
+ ~1000 unique values — never use `user_id` / `request_id` / raw `url` / `ip` as
84
+ labels; record those in Logs or Traces instead.
85
+
86
+ ## Maturity Model (L0–L4) | 成熟度模型
87
+
88
+ | Level | Name | Characteristics | Upgrade Action |
89
+ |-------|------|-----------------|----------------|
90
+ | **L0** | No Observability | only stdout/stderr; debug via SSH + `tail -f` | structured logging; centralize collection |
91
+ | **L1** | Basic Logging | structured JSON logs, centralized, searchable | add business metrics; first dashboard |
92
+ | **L2** | Metrics-Driven | Logs + Metrics, dashboards, threshold alerts | enable tracing; SLO-based alerting |
93
+ | **L3** | Full Observability | three pillars + correlation + SLO alerts + Golden Signals | anomaly detection; auto-remediation |
94
+ | **L4** | Intelligent | AIOps anomaly detection, predictive alerts, auto-remediation | maintain, optimize, share learnings |
95
+
96
+ **Self-check**: find logs for one request across services (L1+) → dashboards of
97
+ error rate & latency (L2+) → trace request ingress→DB→back (L3+) → auto-detect
98
+ anomalies before users report (L4).
99
+
100
+ ## Instrumentation Checklist | 上線前檢查表
101
+
102
+ Before deploying a service to production:
103
+
104
+ - [ ] **Structured logging** — JSON with `trace_id` correlation
105
+ - [ ] **HTTP/gRPC entry metrics** — request count, duration histogram, error rate per endpoint
106
+ - [ ] **Business operation metrics** — key events tracked (orders, payments)
107
+ - [ ] **Distributed tracing** — span propagation, sampling rate, W3C Trace Context headers
108
+ - [ ] **Health checks** — liveness (running?) and readiness (can serve?) probes
109
+ - [ ] **Golden Signals dashboard** — Latency, Traffic, Errors, Saturation visualized
110
+ - [ ] **Alert rules** — at minimum SLO burn-rate alerts
111
+ - [ ] **Log retention** — policies set per log level
112
+ - [ ] **Sensitive data excluded** — no passwords, tokens, or PII in logs/traces
113
+
40
114
  ## Next Steps Guidance | 下一步引導
41
115
 
42
116
  > **可觀測性引導完成。建議下一步:**
@@ -7,6 +7,7 @@ description: |
7
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
+ status: reference
10
11
  ---
11
12
  <!-- DEPRECATION NOTICE (XSPEC-086 Phase 4, 2026-04-28):
12
13
  PR lifecycle orchestration (5-step: CREATE→REVIEW→APPROVE→MERGE→CLEANUP,
@@ -18,6 +19,9 @@ argument-hint: "[branch name or PR number | 分支名稱或 PR 編號]"
18
19
 
19
20
  # PR Automation Assistant | PR 自動化助手
20
21
 
22
+ > ⚠️ **Status: Reference(參考用,非可執行流程)** — PR 生命週期協調(5 步驟 CREATE→REVIEW→APPROVE→MERGE→CLEANUP、>400 行 size gate、CI gate、squash/merge 策略、gh CLI 整合)已於 2026-04-28 移至 **adoption layer(XSPEC-095)**。此處保留 PR 描述模板、合併策略決策矩陣、auto-review 觸發規則供參考。
23
+ > Lifecycle orchestration has moved to the adoption layer (XSPEC-095); this document is **reference-only**. For enforced execution, use your adoption layer's toolchain.
24
+
21
25
  Streamline the pull request lifecycle from creation to merge.
22
26
 
23
27
  簡化從建立到合併的 Pull Request 生命週期。
@@ -93,7 +97,7 @@ CREATE ──► REVIEW ──► APPROVE ──► MERGE ──► CLEANUP
93
97
  After `/pr` completes, the AI assistant should suggest:
94
98
 
95
99
  > **PR 操作完成。建議下一步 / PR operation complete. Suggested next steps:**
96
- > - 執行 `/review` 進行詳細程式碼審查 ⭐ **Recommended / 推薦** — Run detailed code review
100
+ > - 執行 `/code-review` 進行詳細程式碼審查 ⭐ **Recommended / 推薦** — Run detailed code review
97
101
  > - 執行 `/commit` 修正審查發現的問題 — Fix issues found in review
98
102
  > - 執行 `/changelog` 更新變更日誌 — Update changelog
99
103
  > - 檢查 CI 狀態 → `gh pr checks` — Check CI status
@@ -301,9 +301,9 @@ Use `/sdd` after discovery to:
301
301
  - Write specifications for new features informed by discovery findings
302
302
  - Reference the Discovery Report for risk assessment sections
303
303
 
304
- ### With /review (Code Review)
304
+ ### With /code-review (Code Review)
305
305
 
306
- The Step 0.4 snapshot is a lightweight version of `/review`. Use full `/review` when:
306
+ The Step 0.4 snapshot is a lightweight version of `/code-review`. Use full `/code-review` when:
307
307
  - Discovery finds significant quality concerns
308
308
  - A deeper audit is needed before planning changes
309
309
 
@@ -227,7 +227,7 @@ After `/push` completes, the AI assistant should suggest:
227
227
 
228
228
  ## Related Standards | 相關標準
229
229
 
230
- - [Push Standards](.standards/push-standards.ai.yaml) — Core push safety rules
230
+ - [Push Standards](../../.standards/push-standards.ai.yaml) — Core push safety rules
231
231
  - [Git Workflow](../../.standards/git-workflow.ai.yaml) — Branching strategy
232
232
  - [Commit Message](../../.standards/commit-message.ai.yaml) — Commit conventions
233
233
  - [PR Automation](../pr-automation-assistant/SKILL.md) — Pull Request automation
@@ -49,11 +49,25 @@ Configure via `uds init` or `uds config --type release_mode`:
49
49
  ## Workflow | 工作流程
50
50
 
51
51
  1. **Determine version** - Decide version type based on changes (MAJOR/MINOR/PATCH)
52
- 2. **Update version files** - Update package.json and related version references
53
- 3. **Update CHANGELOG** - Move [Unreleased] entries to new version section
54
- 4. **Run pre-release checks** - Verify tests, lint, and standards compliance
55
- 5. **Create git tag** - Tag with `vX.Y.Z` format
56
- 6. **Commit and push** - Commit version bump and push tags
52
+ 2. **Triage open issues/PRs** - `gh pr list` + `gh issue list`; classify each **bring-in vs defer** (XSPEC-265) / 掃描 issue/PR、每項二分(帶上 vs backlog)
53
+ 3. **Update version files** - Update package.json and related version references
54
+ 4. **Update CHANGELOG** - Move [Unreleased] entries to new version section
55
+ 5. **Run pre-release checks** - Verify tests, lint, standards compliance, **and issue/PR triage gate**
56
+ 6. **Create git tag** - Tag with `vX.Y.Z` format
57
+ 7. **Commit and push** - Commit version bump and push tags
58
+
59
+ ### Pre-release Issue/PR Triage Gate | 發版前 issue/PR triage 閘門 (XSPEC-265)
60
+
61
+ Before bumping, scan open issues/PRs and make a conscious decision per item — do **not** rely on memory:
62
+
63
+ | Class | Action |
64
+ |-------|--------|
65
+ | **Bring-in** | patch dependabot PR / release-blocking bug / fix relevant to this version's theme → merge before bump |
66
+ | **Defer** | major PR, audit/enhancement issue, needs separate evaluation → record in signoff "deferred" + release-notes Known Issues |
67
+
68
+ - Confirm `cross-project/sub-project-triage.md` snapshot is recent (≤7 days); refresh if stale.
69
+ - Record the result in the release sign-off (Tier-1): `Pre-release issue/PR triage | PASS | N PRs / M issues: X merged / Y deferred`.
70
+ - **Do not require emptying the backlog** — only that every item has a conscious decision + a record. 不要求清空 backlog,只要求每項有意識決策 + 留紀錄。
57
71
 
58
72
  ### Version Increment Rules | 版本遞增規則
59
73
 
@@ -79,7 +79,7 @@ After `/security` completes, the AI assistant should suggest:
79
79
 
80
80
  > **安全審查完成。建議下一步 / Security review complete. Suggested next steps:**
81
81
  > - 執行 `/checkin` 確認修復符合提交規範 ⭐ **Recommended / 推薦** — Verify fixes meet check-in standards
82
- > - 執行 `/review` 進行程式碼審查 — Run code review on security fixes
82
+ > - 執行 `/code-review` 進行程式碼審查 — Run code review on security fixes
83
83
  > - 執行 `/commit` 提交安全修復 — Commit security fixes
84
84
  > - 檢查相依套件更新 → `npm audit` 或 `pip audit` — Check dependency updates
85
85
 
@@ -8,7 +8,7 @@ argument-hint: "[process description | 流程描述]"
8
8
 
9
9
  # Process-to-Skill Assistant
10
10
 
11
- > **Language**: English | [繁體中文](../../locales/zh-TW/skills/process-automation/SKILL.md)
11
+ > **Language**: English | [繁體中文](../../locales/zh-TW/skills/skill-builder/SKILL.md) | [简体中文](../../locales/zh-CN/skills/skill-builder/SKILL.md)
12
12
 
13
13
  Guides you from "I keep doing this manually" to a properly built Skill,
14
14
  with the right amount of process along the way.
@@ -9,7 +9,7 @@ description: |
9
9
 
10
10
  # Forward Derivation Guide
11
11
 
12
- > **Language**: English | [繁體中文](../../locales/zh-TW/skills/forward-derivation/SKILL.md)
12
+ > **Language**: English | [繁體中文](../../locales/zh-TW/skills/spec-derivation/SKILL.md)
13
13
 
14
14
  **Version**: 2.0.0
15
15
  **Last Updated**: 2026-01-25
@@ -214,18 +214,17 @@ Scenario: Login shows error for invalid credentials
214
214
  # Generator: /derive-bdd v1.0.0
215
215
  # Generated at: 2026-01-19T10:00:00Z
216
216
 
217
- @SPEC-001
218
217
  Feature: User Authentication
219
218
  [Source] From SPEC-001 Summary
220
219
 
221
- @AC-1 @happy-path
220
+ @SPEC-001 @AC-1 @happy-path
222
221
  Scenario: User login with valid credentials
223
222
  # [Source] From SPEC-001 AC-1
224
223
  Given a registered user with valid credentials
225
224
  When the user submits login form
226
225
  Then the user is redirected to dashboard
227
226
 
228
- @AC-2 @error-handling
227
+ @SPEC-001 @AC-2 @error-handling
229
228
  Scenario: Login fails with invalid credentials
230
229
  # [Source] From SPEC-001 AC-2
231
230
  Given a user with invalid credentials
@@ -194,8 +194,8 @@ is a faithful projection of the AC spine across specs.
194
194
 
195
195
  | Signal | Meaning | Gate |
196
196
  |--------|---------|------|
197
- | **orphan test** | `@AC AC-NNN` references an AC no spec defines / 引用不存在的 AC | 🔴 BLOCKING |
198
- | **uncovered** | an AC has no `@AC` reference / AC 無測試引用 | report only / 僅報告 |
197
+ | **orphan test** | `@SPEC-NNN @AC-N` references an AC no spec defines / 引用不存在的 AC | 🔴 BLOCKING |
198
+ | **uncovered** | an AC has no `@SPEC-NNN @AC-N` reference / AC 無測試引用 | report only / 僅報告 |
199
199
  | **not_implemented** | AC marked so in its `.ac.yaml` / `.ac.yaml` 標記 | 🔴 BLOCKING before UAT |
200
200
  | **cross-spec conflict** | same AC id defined in >1 spec / 同 AC id 跨多 spec | 🔴 BLOCKING |
201
201
  | **orphan .feature** | Gherkin `@AC-N` tag referencing a non-existent AC / @AC-N 引用不存在 | 🔴 BLOCKING |
@@ -119,7 +119,7 @@ sweep:
119
119
  After `/sweep` completes, suggest:
120
120
 
121
121
  > - Run `/checkin` to verify overall code quality before committing
122
- > - Run `/review` to review the cleaned-up changes
122
+ > - Run `/code-review` to review the cleaned-up changes
123
123
  > - Run `/commit` to commit the fixes
124
124
 
125
125
  ---
@@ -4,6 +4,7 @@ scope: partial
4
4
  description: "[UDS] Guide through Test-Driven Development workflow"
5
5
  allowed-tools: Read, Write, Grep, Glob, Bash(npm test:*), Bash(npx vitest:*)
6
6
  argument-hint: "[feature or file | 功能或檔案]"
7
+ status: reference
7
8
  ---
8
9
  <!-- DEPRECATION NOTICE (XSPEC-086 Phase 4, 2026-04-28):
9
10
  TDD flow orchestration (RED→GREEN→REFACTOR cycle, test execution gates) relocated to adoption
@@ -14,6 +15,9 @@ argument-hint: "[feature or file | 功能或檔案]"
14
15
 
15
16
  # TDD Assistant | TDD 助手
16
17
 
18
+ > ⚠️ **Status: Reference(參考用,非可執行流程)** — TDD 流程協調(RED→GREEN→REFACTOR 循環、測試執行 gates)已於 2026-04-28 移至 **adoption layer(XSPEC-095)**。此處保留 TDD 原則、FIRST 規則、AAA 格式、語言範例、流程指南供參考。
19
+ > Lifecycle orchestration has moved to the adoption layer (XSPEC-095); this document is **reference-only**. For enforced execution, use your adoption layer's toolchain.
20
+
17
21
  Guide through the Test-Driven Development workflow: Red-Green-Refactor.
18
22
 
19
23
  引導測試驅動開發(TDD)流程:紅-綠-重構。
@@ -30,6 +34,9 @@ Guide through the Test-Driven Development workflow: Red-Green-Refactor.
30
34
 
31
35
  ## Workflow | 工作流程
32
36
 
37
+ > 📖 以下為流程的**參考結構**,非可執行步驟;自動化/強制執行請用 adoption layer 工具鏈(XSPEC-095)。
38
+ > The steps below are a **reference structure**, not an executable workflow.
39
+
33
40
  ### Phase 1: RED - Write Failing Test | 紅燈 - 撰寫失敗測試
34
41
 
35
42
  - Write a test that describes the desired behavior | 撰寫描述預期行為的測試
@@ -72,7 +79,7 @@ After `/tdd` completes, the AI assistant should suggest:
72
79
  > **TDD 循環完成。建議下一步 / TDD cycle complete. Suggested next steps:**
73
80
  > - 執行 `/checkin` 通過品質關卡 ⭐ **Recommended / 推薦** — Pass quality gates
74
81
  > - 執行 `/coverage` 確認測試覆蓋率 — Check test coverage
75
- > - 執行 `/review` 自我審查程式碼 — Self-review code quality
82
+ > - 執行 `/code-review` 自我審查程式碼 — Self-review code quality
76
83
 
77
84
  ## Reference | 參考
78
85
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: testing-guide
3
- scope: uds-specific
3
+ scope: universal
4
4
  description: |
5
5
  Testing pyramid and test writing standards for UT/IT/ST/E2E.
6
6
  Supports ISTQB and Industry Pyramid frameworks.
@@ -1,6 +1,6 @@
1
1
  # Testing Theory Knowledge Base
2
2
 
3
- > **Language**: English | [繁體中文](../../locales/zh-TW/skills/testing-guide/testing-theory.md)
3
+ > **Language**: English | [繁體中文](../../locales/zh-TW/skills/testing-guide/testing-theory.md) | [简体中文](../../locales/zh-CN/skills/testing-guide/testing-theory.md)
4
4
 
5
5
  **Version**: 1.0.0
6
6
  **Last Updated**: 2026-01-29
@@ -1,6 +1,6 @@
1
1
  # UDS Workflows
2
2
 
3
- > **Language**: English | [繁體中文](../../locales/zh-TW/skills/workflows/README.md)
3
+ > **Language**: English | [繁體中文](../../locales/zh-TW/skills/workflows/README.md) | [简体中文](../../locales/zh-CN/skills/workflows/README.md)
4
4
 
5
5
  **Version**: 1.1.0
6
6
  **Last Updated**: 2026-01-21
@@ -423,7 +423,7 @@ This prevents context pollution and ensures reproducible agent behavior.
423
423
 
424
424
  - [Agents Documentation](../agents/README.md)
425
425
  - [Skills Documentation](../README.md)
426
- - [Methodology System](../methodology-system/SKILL.md)
426
+ - [Methodology System](../dev-methodology/SKILL.md)
427
427
 
428
428
  ---
429
429
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "universal-dev-standards",
3
- "version": "5.17.0",
3
+ "version": "6.0.0",
4
4
  "description": "CLI tool for adopting Universal Development Standards",
5
5
  "keywords": [
6
6
  "documentation",
@@ -61,7 +61,7 @@
61
61
  "dependencies": {
62
62
  "@inquirer/prompts": "^8.4.2",
63
63
  "chalk": "^5.3.0",
64
- "commander": "^14.0.0",
64
+ "commander": "^15.0.0",
65
65
  "js-yaml": "^4.1.0",
66
66
  "ora": "^9.4.0"
67
67
  },
@@ -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.1",
73
+ "eslint": "10.5.0",
74
74
  "glob": "^13.0.1",
75
75
  "globals": "17.6.0",
76
76
  "husky": "^9.1.7",