ai-developer-skill-os 9.3.1 → 10.2.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 (258) hide show
  1. package/.agents/AGENTS.md +73 -40
  2. package/.agents/DEV_PROFILE.md +36 -2
  3. package/.agents/LICENSE +21 -21
  4. package/.agents/docs/ARCHITECTURE.md +56 -120
  5. package/.agents/docs/GOVERNANCE.md +3 -3
  6. package/.agents/docs/SPEC.md +137 -60
  7. package/.agents/docs/VERSIONING.md +25 -57
  8. package/.agents/docs/adr/0005-v10-platform-consolidation.md +50 -0
  9. package/.agents/docs/schemas/learning.schema.yml +22 -57
  10. package/.agents/docs/schemas/skill.schema.yml +116 -161
  11. package/.agents/docs/schemas/workflow.schema.yml +51 -26
  12. package/.agents/docs/skill-classification.md +1 -1
  13. package/.agents/registry/graph.json +193 -346
  14. package/.agents/registry/index.yaml +90 -233
  15. package/.agents/rules/coding.md +30 -12
  16. package/.agents/rules/command-safety.md +20 -9
  17. package/.agents/rules/global.md +234 -28
  18. package/.agents/rules/prompt-compiler.md +170 -0
  19. package/.agents/rules/safety.md +1 -1
  20. package/.agents/rules/security.md +1 -1
  21. package/.agents/rules/skill-quality.md +18 -3
  22. package/.agents/skills/_template/SKILL.md +238 -88
  23. package/.agents/skills/qk-api-data-discovery/SKILL.md +456 -0
  24. package/.agents/skills/qk-api-data-discovery/references/bronze-record-format.md +47 -0
  25. package/.agents/skills/qk-api-data-discovery/references/data-contract-yaml.md +72 -0
  26. package/.agents/skills/qk-api-data-discovery/references/discovery-report-template.md +110 -0
  27. package/.agents/skills/qk-backend-data/SKILL.md +339 -0
  28. package/.agents/skills/qk-bug-resolution/SKILL.md +328 -248
  29. package/.agents/skills/qk-bug-resolution/evals/scorecard.yaml +1 -1
  30. package/.agents/skills/qk-code-cleaner/SKILL.md +399 -0
  31. package/.agents/skills/qk-code-review/SKILL.md +320 -247
  32. package/.agents/skills/qk-code-review/evals/scorecard.yaml +1 -1
  33. package/.agents/skills/qk-code-review/references/ai/{v8-schema-validation.md → schema-validation.md} +2 -2
  34. package/.agents/skills/qk-code-review/references/cross-cutting/async-concurrency-patterns.md +515 -515
  35. package/.agents/skills/qk-code-review/references/cross-cutting/error-handling-principles.md +492 -492
  36. package/.agents/skills/qk-code-review/references/cross-cutting/n-plus-one-queries.md +309 -309
  37. package/.agents/skills/qk-code-review/references/cross-cutting/sql-injection-prevention.md +307 -307
  38. package/.agents/skills/qk-code-review/references/cross-cutting/xss-prevention.md +263 -263
  39. package/.agents/skills/qk-code-review/references/languages/angular.md +768 -768
  40. package/.agents/skills/qk-code-review/references/languages/c.md +890 -890
  41. package/.agents/skills/qk-code-review/references/languages/cpp.md +893 -893
  42. package/.agents/skills/qk-code-review/references/languages/css-less-sass.md +661 -661
  43. package/.agents/skills/qk-code-review/references/languages/django.md +985 -985
  44. package/.agents/skills/qk-code-review/references/languages/fastapi.md +580 -580
  45. package/.agents/skills/qk-code-review/references/languages/go.md +993 -993
  46. package/.agents/skills/qk-code-review/references/languages/java.md +409 -409
  47. package/.agents/skills/qk-code-review/references/languages/java8.md +586 -586
  48. package/.agents/skills/qk-code-review/references/languages/kotlin.md +1018 -1018
  49. package/.agents/skills/qk-code-review/references/languages/nestjs.md +593 -593
  50. package/.agents/skills/qk-code-review/references/languages/php.md +684 -684
  51. package/.agents/skills/qk-code-review/references/languages/python.md +1073 -1073
  52. package/.agents/skills/qk-code-review/references/languages/qt.md +757 -757
  53. package/.agents/skills/qk-code-review/references/languages/react.md +871 -871
  54. package/.agents/skills/qk-code-review/references/languages/ruby.md +964 -964
  55. package/.agents/skills/qk-code-review/references/languages/rust.md +846 -846
  56. package/.agents/skills/qk-code-review/references/languages/svelte.md +1064 -1064
  57. package/.agents/skills/qk-code-review/references/languages/swift.md +936 -936
  58. package/.agents/skills/qk-code-review/references/languages/typescript.md +1016 -1016
  59. package/.agents/skills/qk-code-review/references/languages/vue.md +924 -924
  60. package/.agents/skills/qk-code-review/references/languages/zig.md +440 -440
  61. package/.agents/skills/qk-devops-release/SKILL.md +294 -0
  62. package/.agents/skills/qk-feature-delivery/SKILL.md +331 -247
  63. package/.agents/skills/qk-feature-delivery/evals/scorecard.yaml +1 -1
  64. package/.agents/skills/qk-orchestrator/SKILL.md +286 -152
  65. package/.agents/skills/qk-orchestrator/evals/scorecard.yaml +1 -1
  66. package/.agents/skills/qk-orchestrator/references/routing-table.md +1 -1
  67. package/.agents/skills/qk-product-spec/SKILL.md +262 -0
  68. package/.agents/skills/qk-prompt-compiler/SKILL.md +444 -0
  69. package/.agents/skills/qk-ui-engineer/SKILL.md +286 -0
  70. package/.agents/workflows/_schema.yml +146 -146
  71. package/.agents/workflows/bug-resolution.yml +155 -121
  72. package/.agents/workflows/code-review.yml +127 -93
  73. package/.agents/workflows/context-discovery.yml +128 -94
  74. package/.agents/workflows/documentation.yml +124 -90
  75. package/.agents/workflows/feature-delivery.yml +158 -124
  76. package/.agents/workflows/production-release.yml +207 -173
  77. package/.agents/workflows/prompt-compilation.yml +126 -0
  78. package/.agents/workflows/refactor.yml +136 -102
  79. package/.agents/workflows/security-audit.yml +149 -115
  80. package/.agents/workflows/shared/quality-gate.yml +3 -1
  81. package/.agents/workflows/skin-governance.yml +149 -115
  82. package/.agents/workflows/spec-driven-development.yml +116 -87
  83. package/CHANGELOG.md +77 -0
  84. package/README.md +125 -205
  85. package/bin/install.js +324 -329
  86. package/package.json +68 -74
  87. package/tooling/build-registry.js +226 -208
  88. package/tooling/run-aar.js +55 -126
  89. package/tooling/sync-versions.js +2 -2
  90. package/tooling/validate-graph.js +100 -87
  91. package/tooling/validate-skills.js +32 -14
  92. package/.agents/README.md +0 -90
  93. package/.agents/docs/CHI_TIET_SKILLS.md +0 -126
  94. package/.agents/docs/HUONG_DAN_SU_DUNG.md +0 -120
  95. package/.agents/docs/MIGRATION-CLEANUP-V8.1.3.md +0 -36
  96. package/.agents/docs/MIGRATION-STATUS.md +0 -35
  97. package/.agents/docs/MIGRATION-V8.md +0 -10
  98. package/.agents/docs/ROADMAP-V8.2.md +0 -78
  99. package/.agents/docs/V8-CERTIFICATION.md +0 -27
  100. package/.agents/docs/decisions/ADR-001-v8-migration.md +0 -58
  101. package/.agents/docs/decisions/ADR-002-workflow-separation.md +0 -50
  102. package/.agents/docs/decisions/ADR-003-registry-generated.md +0 -54
  103. package/.agents/docs/decisions/ADR-008-skill-boundary-review.md +0 -27
  104. package/.agents/registry/capability-graph.yml +0 -390
  105. package/.agents/registry/skills-index.yml +0 -305
  106. package/.agents/skills/_template/capability.yaml +0 -34
  107. package/.agents/skills/_template/evals/scorecard.yaml +0 -19
  108. package/.agents/skills/qk-access-policy/SKILL.md +0 -206
  109. package/.agents/skills/qk-access-policy/capability.yaml +0 -23
  110. package/.agents/skills/qk-access-policy/evals/scorecard.yaml +0 -36
  111. package/.agents/skills/qk-agent-observability/SKILL.md +0 -108
  112. package/.agents/skills/qk-agent-observability/capability.yaml +0 -29
  113. package/.agents/skills/qk-agent-observability/evals/scorecard.yaml +0 -29
  114. package/.agents/skills/qk-agent-observability/references/scorecard.yaml +0 -80
  115. package/.agents/skills/qk-ai-builder/SKILL.md +0 -254
  116. package/.agents/skills/qk-ai-builder/capability.yaml +0 -23
  117. package/.agents/skills/qk-ai-builder/evals/scorecard.yaml +0 -30
  118. package/.agents/skills/qk-api-consumer/SKILL.md +0 -256
  119. package/.agents/skills/qk-api-consumer/capability.yaml +0 -21
  120. package/.agents/skills/qk-api-consumer/evals/scorecard.yaml +0 -29
  121. package/.agents/skills/qk-api-lifecycle/SKILL.md +0 -251
  122. package/.agents/skills/qk-api-lifecycle/capability.yaml +0 -23
  123. package/.agents/skills/qk-api-lifecycle/evals/scorecard.yaml +0 -29
  124. package/.agents/skills/qk-bug-resolution/capability.yaml +0 -25
  125. package/.agents/skills/qk-code-review/capability.yaml +0 -23
  126. package/.agents/skills/qk-context-loader/SKILL.md +0 -198
  127. package/.agents/skills/qk-context-loader/capability.yaml +0 -23
  128. package/.agents/skills/qk-context-loader/evals/scorecard.yaml +0 -28
  129. package/.agents/skills/qk-data-engineer/SKILL.md +0 -253
  130. package/.agents/skills/qk-data-lifecycle/SKILL.md +0 -197
  131. package/.agents/skills/qk-data-lifecycle/capability.yaml +0 -23
  132. package/.agents/skills/qk-data-lifecycle/evals/scorecard.yaml +0 -29
  133. package/.agents/skills/qk-db-optimizer/SKILL.md +0 -210
  134. package/.agents/skills/qk-db-optimizer/capability.yaml +0 -22
  135. package/.agents/skills/qk-db-optimizer/evals/scorecard.yaml +0 -28
  136. package/.agents/skills/qk-design-system-engineering/SKILL.md +0 -193
  137. package/.agents/skills/qk-design-system-engineering/capability.yaml +0 -25
  138. package/.agents/skills/qk-design-system-engineering/evals/scorecard.yaml +0 -27
  139. package/.agents/skills/qk-devops-platform/SKILL.md +0 -198
  140. package/.agents/skills/qk-devops-platform/capability.yaml +0 -29
  141. package/.agents/skills/qk-devops-platform/evals/scorecard.yaml +0 -28
  142. package/.agents/skills/qk-docs/SKILL.md +0 -193
  143. package/.agents/skills/qk-docs/capability.yaml +0 -23
  144. package/.agents/skills/qk-docs/evals/scorecard.yaml +0 -27
  145. package/.agents/skills/qk-engineering-standard/SKILL.md +0 -89
  146. package/.agents/skills/qk-engineering-standard/capability.yaml +0 -23
  147. package/.agents/skills/qk-engineering-standard/evals/scorecard.yaml +0 -28
  148. package/.agents/skills/qk-engineering-standard/references/anti-patterns.md +0 -121
  149. package/.agents/skills/qk-engineering-standard/rules/backend.md +0 -122
  150. package/.agents/skills/qk-engineering-standard/rules/database.md +0 -3
  151. package/.agents/skills/qk-engineering-standard/rules/frontend.md +0 -152
  152. package/.agents/skills/qk-engineering-standard/rules/security.md +0 -3
  153. package/.agents/skills/qk-engineering-standard/rules/testing.md +0 -3
  154. package/.agents/skills/qk-fe-api-integration/SKILL.md +0 -704
  155. package/.agents/skills/qk-fe-api-integration/capability.yaml +0 -21
  156. package/.agents/skills/qk-fe-api-integration/evals/scorecard.yaml +0 -29
  157. package/.agents/skills/qk-feature-delivery/capability.yaml +0 -24
  158. package/.agents/skills/qk-frontend-architecture/SKILL.md +0 -127
  159. package/.agents/skills/qk-frontend-architecture/capability.yaml +0 -28
  160. package/.agents/skills/qk-frontend-architecture/evals/scorecard.yaml +0 -28
  161. package/.agents/skills/qk-help/SKILL.md +0 -107
  162. package/.agents/skills/qk-help/capability.yaml +0 -20
  163. package/.agents/skills/qk-help/evals/scorecard.yaml +0 -13
  164. package/.agents/skills/qk-orchestrator/capability.yaml +0 -22
  165. package/.agents/skills/qk-product-specification/SKILL.md +0 -187
  166. package/.agents/skills/qk-product-specification/capability.yaml +0 -27
  167. package/.agents/skills/qk-product-specification/evals/scorecard.yaml +0 -27
  168. package/.agents/skills/qk-production-release/SKILL.md +0 -188
  169. package/.agents/skills/qk-production-release/capability.yaml +0 -27
  170. package/.agents/skills/qk-production-release/evals/scorecard.yaml +0 -28
  171. package/.agents/skills/qk-project-audit/SKILL.md +0 -174
  172. package/.agents/skills/qk-project-bootstrap/SKILL.md +0 -372
  173. package/.agents/skills/qk-project-bootstrap/capability.yaml +0 -23
  174. package/.agents/skills/qk-project-bootstrap/evals/scorecard.yaml +0 -28
  175. package/.agents/skills/qk-project-health/SKILL.md +0 -202
  176. package/.agents/skills/qk-project-health/capability.yaml +0 -23
  177. package/.agents/skills/qk-project-health/evals/scorecard.yaml +0 -27
  178. package/.agents/skills/qk-project-memory/SKILL.md +0 -303
  179. package/.agents/skills/qk-project-memory/capability.yaml +0 -23
  180. package/.agents/skills/qk-project-memory/evals/scorecard.yaml +0 -27
  181. package/.agents/skills/qk-refactor/SKILL.md +0 -243
  182. package/.agents/skills/qk-refactor/capability.yaml +0 -26
  183. package/.agents/skills/qk-refactor/evals/scorecard.yaml +0 -27
  184. package/.agents/skills/qk-security-audit/SKILL.md +0 -280
  185. package/.agents/skills/qk-security-audit/capability.yaml +0 -29
  186. package/.agents/skills/qk-security-audit/evals/scorecard.yaml +0 -27
  187. package/.agents/skills/qk-system-evolution/SKILL.md +0 -625
  188. package/.agents/skills/qk-system-evolution/capability.yaml +0 -24
  189. package/.agents/skills/qk-system-evolution/evals/scorecard.yaml +0 -26
  190. package/.agents/skills/qk-test-engineering/SKILL.md +0 -215
  191. package/.agents/skills/qk-test-engineering/capability.yaml +0 -28
  192. package/.agents/skills/qk-test-engineering/evals/scorecard.yaml +0 -26
  193. package/.agents/skills/qk-ui-audit/SKILL.md +0 -175
  194. package/.agents/skills/qk-ui-audit/capability.yaml +0 -23
  195. package/.agents/skills/qk-ui-audit/evals/scorecard.yaml +0 -26
  196. package/.agents/skills/qk-ui-audit/references/anti-slop-checklist.md +0 -136
  197. package/.agents/skills/qk-ui-builder/SKILL.md +0 -521
  198. package/.agents/skills/qk-ui-builder/capability.yaml +0 -29
  199. package/.agents/skills/qk-ui-builder/evals/scorecard.yaml +0 -26
  200. package/.agents/skills/qk-ui-builder/references/anti-patterns.md +0 -295
  201. package/.agents/skills/qk-ui-builder/references/color.md +0 -115
  202. package/.agents/skills/qk-ui-builder/references/component-cookbook.md +0 -458
  203. package/.agents/skills/qk-ui-builder/references/copy.md +0 -250
  204. package/.agents/skills/qk-ui-builder/references/interaction-and-states.md +0 -115
  205. package/.agents/skills/qk-ui-builder/references/layout-and-space.md +0 -111
  206. package/.agents/skills/qk-ui-builder/references/macrostructures/01-bento-grid.md +0 -48
  207. package/.agents/skills/qk-ui-builder/references/macrostructures/02-long-document.md +0 -50
  208. package/.agents/skills/qk-ui-builder/references/macrostructures/03-marquee-hero.md +0 -51
  209. package/.agents/skills/qk-ui-builder/references/macrostructures/04-stat-led.md +0 -49
  210. package/.agents/skills/qk-ui-builder/references/macrostructures/05-workbench.md +0 -44
  211. package/.agents/skills/qk-ui-builder/references/macrostructures/06-conversational-faq.md +0 -50
  212. package/.agents/skills/qk-ui-builder/references/macrostructures/07-manifesto.md +0 -51
  213. package/.agents/skills/qk-ui-builder/references/macrostructures/08-photographic.md +0 -50
  214. package/.agents/skills/qk-ui-builder/references/macrostructures/09-quote-led.md +0 -50
  215. package/.agents/skills/qk-ui-builder/references/macrostructures/11-catalogue.md +0 -49
  216. package/.agents/skills/qk-ui-builder/references/macrostructures/12-letter.md +0 -49
  217. package/.agents/skills/qk-ui-builder/references/macrostructures/13-index-first.md +0 -49
  218. package/.agents/skills/qk-ui-builder/references/macrostructures/14-narrative-workflow.md +0 -48
  219. package/.agents/skills/qk-ui-builder/references/macrostructures/15-split-studio.md +0 -48
  220. package/.agents/skills/qk-ui-builder/references/macrostructures/16-feature-stack.md +0 -51
  221. package/.agents/skills/qk-ui-builder/references/macrostructures/17-type-specimen.md +0 -48
  222. package/.agents/skills/qk-ui-builder/references/macrostructures/18-portfolio-grid.md +0 -48
  223. package/.agents/skills/qk-ui-builder/references/macrostructures/19-map-diagram.md +0 -50
  224. package/.agents/skills/qk-ui-builder/references/macrostructures/20-ecosystem-index.md +0 -48
  225. package/.agents/skills/qk-ui-builder/references/macrostructures/21-component-playground.md +0 -45
  226. package/.agents/skills/qk-ui-builder/references/macrostructures.md +0 -38
  227. package/.agents/skills/qk-ui-builder/references/motion.md +0 -95
  228. package/.agents/skills/qk-ui-builder/references/responsive.md +0 -115
  229. package/.agents/skills/qk-ui-builder/references/slop-test.md +0 -135
  230. package/.agents/skills/qk-ui-builder/references/structure.md +0 -280
  231. package/.agents/skills/qk-ui-builder/references/themes/atmospheric.md +0 -53
  232. package/.agents/skills/qk-ui-builder/references/themes/carnival.md +0 -52
  233. package/.agents/skills/qk-ui-builder/references/themes/cobalt.md +0 -52
  234. package/.agents/skills/qk-ui-builder/references/themes/editorial.md +0 -52
  235. package/.agents/skills/qk-ui-builder/references/themes/garden.md +0 -52
  236. package/.agents/skills/qk-ui-builder/references/themes/hum.md +0 -52
  237. package/.agents/skills/qk-ui-builder/references/themes/lumen.md +0 -52
  238. package/.agents/skills/qk-ui-builder/references/themes/midnight.md +0 -52
  239. package/.agents/skills/qk-ui-builder/references/themes/modern-minimal.md +0 -52
  240. package/.agents/skills/qk-ui-builder/references/themes/playful.md +0 -52
  241. package/.agents/skills/qk-ui-builder/references/themes/specimen.md +0 -52
  242. package/.agents/skills/qk-ui-builder/references/themes/terminal.md +0 -52
  243. package/.agents/skills/qk-ui-builder/references/typography.md +0 -129
  244. package/.agents/skills/qk-ui-system-builder/SKILL.md +0 -183
  245. package/.agents/skills/qk-ui-system-builder/capability.yaml +0 -25
  246. package/.agents/skills/qk-ui-system-builder/evals/scorecard.yaml +0 -26
  247. package/.agents/skills/qk-upgrade/SKILL.md +0 -301
  248. package/.agents/skills/qk-upgrade/capability.yaml +0 -24
  249. package/.agents/skills/qk-upgrade/evals/scorecard.yaml +0 -26
  250. package/.agents/skills/qk-validation-gate/SKILL.md +0 -88
  251. package/.agents/skills/qk-validation-gate/capability.yaml +0 -23
  252. package/.agents/skills/qk-validation-gate/evals/scorecard.yaml +0 -26
  253. package/.agents/skills/qk-web-quality-gate/SKILL.md +0 -197
  254. package/.agents/skills/qk-web-quality-gate/capability.yaml +0 -24
  255. package/.agents/skills/qk-web-quality-gate/evals/scorecard.yaml +0 -26
  256. package/.agents/workflows/research.yml +0 -75
  257. package/.agents/workflows/skill-evolution.yml +0 -97
  258. package/tooling/fix-refactor.js +0 -8
@@ -1,121 +1,155 @@
1
- name: bug-resolution
2
- version: 8.0.0
3
- description: "Pipeline chuẩn để diagnose và fix bugs theo chu trình: Observe → Hypothesize → Evidence → Patch → Verify."
4
-
5
- owner:
6
- type: engineering
7
- maintained_by: qk-team
8
-
9
- verification_profile: bug-fix
10
-
11
- triggers:
12
- - "fix bug"
13
- - "sửa lỗi"
14
- - "error"
15
- - "exception"
16
- - "crash"
17
- - "stack trace"
18
- - "not working"
19
- - "bị lỗi"
20
-
21
- ide_binding:
22
- slash_command: "/fix-bug"
23
- aliases: ["/bug", "/debug"]
24
-
25
- steps:
26
- - id: observe
27
- name: "Thu thập triệu chứng"
28
- purpose: "Xác định chính xác bug xảy ra ở đâu và biểu hiện thế nào"
29
- required: true
30
- skip_if: "Stack trace + affected file đã được cung cấp đầy đủ"
31
- inputs:
32
- - error_message
33
- - stack_trace
34
- - user_description
35
- outputs:
36
- - affected_file
37
- - affected_line_range
38
- - error_signature
39
- actions:
40
- - "Đọc error message và stack trace"
41
- - "Xác định file và line range bị ảnh hưởng"
42
- - "Mô tả triệu chứng bằng ngôn ngữ kỹ thuật"
43
- exit_on_fail: BLOCKED
44
-
45
- - id: hypothesize
46
- name: "Đặt giả thuyết nguyên nhân"
47
- purpose: "Xác định top 3 nguyên nhân có thể, xếp theo xác suất"
48
- required: true
49
- skip_if: null
50
- inputs:
51
- - error_signature
52
- - affected_file
53
- outputs:
54
- - hypothesis_list # Ordered list: [H1 (most likely), H2, H3]
55
- - selected_hypothesis # H1 unless evidence suggests otherwise
56
- min_confidence: HIGH
57
- actions:
58
- - "List 3 nguyên nhân có thể gây ra triệu chứng này"
59
- - "Xếp hạng theo xác suất dựa trên stack trace"
60
- - "Chọn H1 để kiểm chứng trước"
61
-
62
- - id: evidence
63
- name: "Tìm bằng chứng xác nhận"
64
- purpose: "Xác nhận hoặc loại bỏ hypothesis bằng code thực tế"
65
- required: true
66
- skip_if: null
67
- inputs:
68
- - selected_hypothesis
69
- - affected_file
70
- outputs:
71
- - confirmed_root_cause # File + line + quoted code
72
- - evidence_quote # Exact code causing the bug
73
- min_confidence: HIGH
74
- context_budget: 150
75
- actions:
76
- - "Dùng grep_search để tìm pattern liên quan"
77
- - "Dùng view_file[StartLine:EndLine] để đọc section cụ thể"
78
- - "Quote chính xác đoạn code gây bug"
79
- exit_on_fail: PARTIAL
80
-
81
- - id: patch
82
- name: "Áp dụng fix"
83
- purpose: "Sửa root cause, không chỉ patch triệu chứng"
84
- required: true
85
- skip_if: null
86
- inputs:
87
- - confirmed_root_cause
88
- - evidence_quote
89
- outputs:
90
- - patched_files # List of files modified
91
- - diff_summary # What changed and why
92
- actions:
93
- - "Edit source file trực tiếp với replace_file_content hoặc multi_replace_file_content"
94
- - "Không tạo wrapper script"
95
- - "Không dùng ?. hoặc ! để silence lỗi"
96
- - "Fix root cause, không patch bề mặt"
97
- human_checkpoint:
98
- condition: "file thuộc vùng auth/payment/permission/migration"
99
- message: "Patch này chạm vào code nhạy cảm. Xác nhận an toàn trước khi thay đổi."
100
- - id: verify
101
- name: "Xác minh fix + quality gate"
102
- purpose: "Xác nhận bug đã được fix, không có regression, code đạt quality threshold"
103
- required: true
104
- skip_if: null
105
- inputs:
106
- - patched_files
107
- outputs:
108
- - verification_result # PASS | FAIL | PARTIAL
109
- - evidence_of_fix
110
- - quality_gate_result # PASS | FAIL
111
- actions:
112
- - "Re-read patched code section"
113
- - "Chạy test liên quan nếu có"
114
- - "Áp dụng shared quality gate → xem: .agents/workflows/shared/quality-gate.yml"
115
- - " Checklist: universal_checks + bug-resolution specific checks"
116
- - "Ghi log execution trace vào evals/traces/"
117
- exit_on_fail: FAILED
118
-
119
- escalation:
120
- max_retries: 2
121
- on_failure: "Report với full evidence chain (observe→hypothesis→evidence), escalate to human với gợi ý bước tiếp theo"
1
+ name: bug-resolution
2
+ version: 10.2.0
3
+ platforms: [antigravity, claude, opencode]
4
+ runtime_version: 1
5
+ description: "Pipeline chuẩn để diagnose và fix bugs theo chu trình: Observe → Hypothesize → Evidence → Patch → Verify."
6
+
7
+ owner:
8
+ type: engineering
9
+ maintained_by: qk-team
10
+
11
+ verification_profile: bug-fix
12
+
13
+ triggers:
14
+ - "fix bug"
15
+ - "sửa lỗi"
16
+ - "error"
17
+ - "exception"
18
+ - "crash"
19
+ - "stack trace"
20
+ - "not working"
21
+ - "bị lỗi"
22
+
23
+ ide_binding:
24
+ slash_command: "/fix-bug"
25
+ aliases: ["/bug", "/debug"]
26
+
27
+ steps:
28
+ - id: observe
29
+ name: "Thu thập triệu chứng"
30
+ purpose: "Xác định chính xác bug xảy ra ở đâu và biểu hiện thế nào"
31
+ required: true
32
+ skip_if: "Stack trace + affected file đã được cung cấp đầy đủ"
33
+ inputs:
34
+ - error_message
35
+ - stack_trace
36
+ - user_description
37
+ outputs:
38
+ - affected_file
39
+ - affected_line_range
40
+ - error_signature
41
+ actions:
42
+ - "Đọc error message và stack trace"
43
+ - "Xác định file và line range bị ảnh hưởng"
44
+ - "Mô tả triệu chứng bằng ngôn ngữ kỹ thuật"
45
+ exit_on_fail: BLOCKED
46
+
47
+ - id: hypothesize
48
+ name: "Đặt giả thuyết nguyên nhân"
49
+ purpose: "Xác định top 3 nguyên nhân có thể, xếp theo xác suất"
50
+ required: true
51
+ skip_if: null
52
+ inputs:
53
+ - error_signature
54
+ - affected_file
55
+ outputs:
56
+ - hypothesis_list # Ordered list: [H1 (most likely), H2, H3]
57
+ - selected_hypothesis # H1 unless evidence suggests otherwise
58
+ min_confidence: HIGH
59
+ actions:
60
+ - "List 3 nguyên nhân có thể gây ra triệu chứng này"
61
+ - "Xếp hạng theo xác suất dựa trên stack trace"
62
+ - "Chọn H1 để kiểm chứng trước"
63
+
64
+ - id: evidence
65
+ name: "Tìm bằng chứng xác nhận"
66
+ purpose: "Xác nhận hoặc loại bỏ hypothesis bằng code thực tế"
67
+ required: true
68
+ skip_if: null
69
+ inputs:
70
+ - selected_hypothesis
71
+ - affected_file
72
+ outputs:
73
+ - confirmed_root_cause # File + line + quoted code
74
+ - evidence_quote # Exact code causing the bug
75
+ min_confidence: HIGH
76
+ context_budget: 150
77
+ actions:
78
+ - "Dùng grep_search để tìm pattern liên quan"
79
+ - "Dùng view_file[StartLine:EndLine] để đọc section cụ thể"
80
+ - "Quote chính xác đoạn code gây bug"
81
+ exit_on_fail: PARTIAL
82
+
83
+ - id: patch
84
+ name: "Áp dụng fix"
85
+ purpose: "Sửa root cause, không chỉ patch triệu chứng"
86
+ required: true
87
+ skip_if: null
88
+ inputs:
89
+ - confirmed_root_cause
90
+ - evidence_quote
91
+ outputs:
92
+ - patched_files # List of files modified
93
+ - diff_summary # What changed and why
94
+ actions:
95
+ - "Edit source file trực tiếp với replace_file_content hoặc multi_replace_file_content"
96
+ - "Không tạo wrapper script"
97
+ - "Không dùng ?. hoặc ! để silence lỗi"
98
+ - "Fix root cause, không patch bề mặt"
99
+ human_checkpoint:
100
+ condition: "file thuộc vùng auth/payment/permission/migration"
101
+ message: "Patch này chạm vào code nhạy cảm. Xác nhận an toàn trước khi thay đổi."
102
+ - id: verify
103
+ name: "Xác minh fix + quality gate"
104
+ purpose: "Xác nhận bug đã được fix, không có regression, code đạt quality threshold"
105
+ required: true
106
+ skip_if: null
107
+ inputs:
108
+ - patched_files
109
+ outputs:
110
+ - verification_result # PASS | FAIL | PARTIAL
111
+ - evidence_of_fix
112
+ - quality_gate_result # PASS | FAIL
113
+ actions:
114
+ - "Re-read patched code section"
115
+ - "Chạy test liên quan nếu có"
116
+ - "Áp dụng shared quality gate → xem: .agents/workflows/shared/quality-gate.yml"
117
+ - " Checklist: universal_checks + bug-resolution specific checks"
118
+ - "Ghi log execution trace vào evals/traces/"
119
+ exit_on_fail: FAILED
120
+
121
+ escalation:
122
+ max_retries: 2
123
+ on_failure: "Report với full evidence chain (observe→hypothesis→evidence), escalate to human với gợi ý bước tiếp theo"
124
+
125
+ # ── V10.2 Additions ──────────────────────────────
126
+ # Confidence Model
127
+ # | Level | Condition | Action |
128
+ # |--------|------------------------|--------------|
129
+ # | HIGH | Step inputs provided | Proceed |
130
+ # | MEDIUM | Some assumptions needed | Note assumptions |
131
+ # | LOW | Insufficient evidence | EXIT: BLOCKED|
132
+ #
133
+ # Exit Codes
134
+ # | Code | Meaning | When |
135
+ # |---------|-------------------------------|-------------------------|
136
+ # | SUCCESS | Step completed and verified | All criteria met |
137
+ # | PARTIAL | Step done with minor gaps | Some checks skipped |
138
+ # | BLOCKED | Missing precondition | Ask user |
139
+ # | FAILED | Step failed after max retries | Report error |
140
+ #
141
+ # Evidence Format:
142
+ # [SEVERITY] step_id: [step-name]
143
+ # Reason: [why this matters]
144
+ # Confidence: [HIGH|MEDIUM|LOW]
145
+ # Fix: [suggestion]
146
+ #
147
+ # Compliance:
148
+ # Runtime Standard: 11/11
149
+ # Frontmatter Complete: yes
150
+ # References Valid: yes
151
+ # Decision Trees: PASS
152
+ # Thresholds Defined: PASS
153
+ # schema_version: 10.2.0
154
+ # runtime_version: 1
155
+ # platforms: [antigravity, claude, opencode]
@@ -1,93 +1,127 @@
1
- name: code-review
2
- version: 8.0.0
3
- description: "Pipeline kiểm tra chất lượng code theo SOLID, DRY, Clean Code và ngưỡng số liệu cụ thể."
4
-
5
- owner:
6
- type: engineering
7
- maintained_by: qk-team
8
-
9
- verification_profile: review
10
-
11
- triggers:
12
- - "review code"
13
- - "review this"
14
- - "đánh giá code"
15
- - "kiểm tra chất lượng code"
16
- - "check this PR"
17
- - "pull request review"
18
-
19
- ide_binding:
20
- slash_command: "/review"
21
- aliases: ["/code-review", "/pr-review"]
22
-
23
- steps:
24
- - id: scope
25
- name: "Xác định phạm vi review"
26
- purpose: "Biết chính xác files/modules cần review"
27
- required: true
28
- skip_if: "Files đã được chỉ định rõ ràng"
29
- inputs:
30
- - target_files_or_module
31
- outputs:
32
- - file_list
33
- - review_focus # bug, quality, security, performance, all
34
- exit_on_fail: BLOCKED
35
-
36
- - id: static_analysis
37
- name: "Phân tích tĩnh"
38
- purpose: "Thu thập findings có bằng chứng rõ ràng"
39
- required: true
40
- skip_if: null
41
- inputs:
42
- - file_list
43
- - review_focus
44
- outputs:
45
- - findings # Each: severity + file + line + quote + reason + suggestion
46
- min_confidence: HIGH
47
- context_budget: 150
48
- actions:
49
- - "Đọc từng file theo budget (max 150 lines per read)"
50
- - "Flag SOLID violations với ngưỡng cụ thể"
51
- - "Flag DRY violations (≥ 2 duplications)"
52
- - "Flag naming violations"
53
- - "Flag error handling issues"
54
-
55
- - id: severity_triage
56
- name: "Phân loại mức độ"
57
- purpose: "Xếp findings theo priority để human biết fix gì trước"
58
- required: true
59
- skip_if: null
60
- inputs:
61
- - findings
62
- outputs:
63
- - critical_findings # Must fix: security, data loss risk
64
- - high_findings # Should fix: logic bugs, architecture violations
65
- - medium_findings # Consider: quality improvements
66
- - low_findings # Optional: style, minor naming
67
- actions:
68
- - "Áp dụng severity matrix: CRITICAL > HIGH > MEDIUM > LOW"
69
- - "Không inflate severity để look impressive"
70
-
71
- - id: report
72
- name: "Tổng hợp báo cáo"
73
- purpose: "Cung cấp báo cáo actionable cho developer"
74
- required: true
75
- skip_if: null
76
- inputs:
77
- - critical_findings
78
- - high_findings
79
- - medium_findings
80
- outputs:
81
- - review_report # Structured markdown report
82
- - health_score # 0-100
83
- actions:
84
- - "Group findings theo file"
85
- - "Mỗi finding: file:line + code quote + explanation + suggestion"
86
- - "Đánh giá mức độ tuân thủ R-C-09 (Zero-Slop)"
87
- - "Đánh giá rủi ro R-SEC-04"
88
- - "Ghi log execution trace vào evals/traces/"
89
- - "Tính health score: 100 - (critical×20 + high×10 + medium×3 + low×1)"
90
-
91
- escalation:
92
- max_retries: 1
93
- on_failure: "Report partial findings với số files đã review / tổng"
1
+ name: code-review
2
+ version: 10.2.0
3
+ platforms: [antigravity, claude, opencode]
4
+ runtime_version: 1
5
+ description: "Pipeline kiểm tra chất lượng code theo SOLID, DRY, Clean Code và ngưỡng số liệu cụ thể."
6
+
7
+ owner:
8
+ type: engineering
9
+ maintained_by: qk-team
10
+
11
+ verification_profile: review
12
+
13
+ triggers:
14
+ - "review code"
15
+ - "review this"
16
+ - "đánh giá code"
17
+ - "kiểm tra chất lượng code"
18
+ - "check this PR"
19
+ - "pull request review"
20
+
21
+ ide_binding:
22
+ slash_command: "/review"
23
+ aliases: ["/code-review", "/pr-review"]
24
+
25
+ steps:
26
+ - id: scope
27
+ name: "Xác định phạm vi review"
28
+ purpose: "Biết chính xác files/modules cần review"
29
+ required: true
30
+ skip_if: "Files đã được chỉ định rõ ràng"
31
+ inputs:
32
+ - target_files_or_module
33
+ outputs:
34
+ - file_list
35
+ - review_focus # bug, quality, security, performance, all
36
+ exit_on_fail: BLOCKED
37
+
38
+ - id: static_analysis
39
+ name: "Phân tích tĩnh"
40
+ purpose: "Thu thập findings có bằng chứng rõ ràng"
41
+ required: true
42
+ skip_if: null
43
+ inputs:
44
+ - file_list
45
+ - review_focus
46
+ outputs:
47
+ - findings # Each: severity + file + line + quote + reason + suggestion
48
+ min_confidence: HIGH
49
+ context_budget: 150
50
+ actions:
51
+ - "Đọc từng file theo budget (max 150 lines per read)"
52
+ - "Flag SOLID violations với ngưỡng cụ thể"
53
+ - "Flag DRY violations (≥ 2 duplications)"
54
+ - "Flag naming violations"
55
+ - "Flag error handling issues"
56
+
57
+ - id: severity_triage
58
+ name: "Phân loại mức độ"
59
+ purpose: "Xếp findings theo priority để human biết fix gì trước"
60
+ required: true
61
+ skip_if: null
62
+ inputs:
63
+ - findings
64
+ outputs:
65
+ - critical_findings # Must fix: security, data loss risk
66
+ - high_findings # Should fix: logic bugs, architecture violations
67
+ - medium_findings # Consider: quality improvements
68
+ - low_findings # Optional: style, minor naming
69
+ actions:
70
+ - "Áp dụng severity matrix: CRITICAL > HIGH > MEDIUM > LOW"
71
+ - "Không inflate severity để look impressive"
72
+
73
+ - id: report
74
+ name: "Tổng hợp báo cáo"
75
+ purpose: "Cung cấp báo cáo actionable cho developer"
76
+ required: true
77
+ skip_if: null
78
+ inputs:
79
+ - critical_findings
80
+ - high_findings
81
+ - medium_findings
82
+ outputs:
83
+ - review_report # Structured markdown report
84
+ - health_score # 0-100
85
+ actions:
86
+ - "Group findings theo file"
87
+ - "Mỗi finding: file:line + code quote + explanation + suggestion"
88
+ - "Đánh giá mức độ tuân thủ R-C-09 (Zero-Slop)"
89
+ - "Đánh giá rủi ro R-SEC-04"
90
+ - "Ghi log execution trace vào evals/traces/"
91
+ - "Tính health score: 100 - (critical×20 + high×10 + medium×3 + low×1)"
92
+
93
+ escalation:
94
+ max_retries: 1
95
+ on_failure: "Report partial findings với số files đã review / tổng"
96
+
97
+ # ── V10.2 Additions ──────────────────────────────
98
+ # Confidence Model
99
+ # | Level | Condition | Action |
100
+ # |--------|------------------------|--------------|
101
+ # | HIGH | Step inputs provided | Proceed |
102
+ # | MEDIUM | Some assumptions needed | Note assumptions |
103
+ # | LOW | Insufficient evidence | EXIT: BLOCKED|
104
+ #
105
+ # Exit Codes
106
+ # | Code | Meaning | When |
107
+ # |---------|-------------------------------|-------------------------|
108
+ # | SUCCESS | Step completed and verified | All criteria met |
109
+ # | PARTIAL | Step done with minor gaps | Some checks skipped |
110
+ # | BLOCKED | Missing precondition | Ask user |
111
+ # | FAILED | Step failed after max retries | Report error |
112
+ #
113
+ # Evidence Format:
114
+ # [SEVERITY] step_id: [step-name]
115
+ # Reason: [why this matters]
116
+ # Confidence: [HIGH|MEDIUM|LOW]
117
+ # Fix: [suggestion]
118
+ #
119
+ # Compliance:
120
+ # Runtime Standard: 11/11
121
+ # Frontmatter Complete: yes
122
+ # References Valid: yes
123
+ # Decision Trees: PASS
124
+ # Thresholds Defined: PASS
125
+ # schema_version: 10.2.0
126
+ # runtime_version: 1
127
+ # platforms: [antigravity, claude, opencode]