ai-developer-skill-os 8.2.1 → 8.3.1

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 (151) hide show
  1. package/.agents/LICENSE +21 -21
  2. package/.agents/README.md +90 -90
  3. package/.agents/docs/CHI_TIET_SKILLS.md +125 -125
  4. package/.agents/docs/MIGRATION-CLEANUP-V8.1.3.md +36 -36
  5. package/.agents/docs/MIGRATION-STATUS.md +35 -35
  6. package/.agents/docs/MIGRATION-V8.md +10 -10
  7. package/.agents/docs/V8-CERTIFICATION.md +27 -27
  8. package/.agents/docs/decisions/ADR-001-v8-migration.md +58 -58
  9. package/.agents/docs/decisions/ADR-002-workflow-separation.md +50 -50
  10. package/.agents/docs/decisions/ADR-003-registry-generated.md +54 -54
  11. package/.agents/docs/decisions/ADR-008-skill-boundary-review.md +27 -27
  12. package/.agents/registry/capability-graph.yml +67 -25
  13. package/.agents/registry/graph.json +135 -256
  14. package/.agents/registry/index.yaml +68 -95
  15. package/.agents/registry/skills-index.yml +548 -525
  16. package/.agents/rules/anti-patterns.md +45 -0
  17. package/.agents/rules/coding.md +10 -0
  18. package/.agents/rules/command-safety.md +37 -14
  19. package/.agents/rules/priorities.yml +13 -2
  20. package/.agents/rules/security.md +47 -7
  21. package/.agents/rules/skill-quality.md +32 -8
  22. package/.agents/skills/_template/SKILL.md +133 -132
  23. package/.agents/skills/_template/capability.yaml +22 -8
  24. package/.agents/skills/_template/evals/scorecard.yaml +19 -19
  25. package/.agents/skills/qk-access-policy/SKILL.md +5 -2
  26. package/.agents/skills/qk-access-policy/capability.yaml +23 -0
  27. package/.agents/skills/qk-access-policy/evals/scorecard.yaml +36 -0
  28. package/.agents/skills/qk-agent-observability/SKILL.md +112 -1
  29. package/.agents/skills/qk-agent-observability/capability.yaml +29 -0
  30. package/.agents/skills/qk-agent-observability/evals/scorecard.yaml +29 -0
  31. package/.agents/skills/qk-agent-observability/references/scorecard.yaml +80 -0
  32. package/.agents/skills/qk-ai-builder/SKILL.md +75 -6
  33. package/.agents/skills/qk-ai-builder/capability.yaml +23 -0
  34. package/.agents/skills/qk-ai-builder/evals/scorecard.yaml +30 -0
  35. package/.agents/skills/qk-api-lifecycle/SKILL.md +5 -3
  36. package/.agents/skills/qk-api-lifecycle/capability.yaml +23 -0
  37. package/.agents/skills/qk-api-lifecycle/evals/scorecard.yaml +29 -0
  38. package/.agents/skills/qk-bug-resolution/SKILL.md +4 -22
  39. package/.agents/skills/qk-bug-resolution/capability.yaml +25 -0
  40. package/.agents/skills/qk-bug-resolution/evals/scorecard.yaml +30 -0
  41. package/.agents/skills/qk-code-review/SKILL.md +188 -186
  42. package/.agents/skills/qk-code-review/capability.yaml +23 -0
  43. package/.agents/skills/qk-code-review/evals/scorecard.yaml +29 -0
  44. package/.agents/skills/qk-context-loader/SKILL.md +4 -12
  45. package/.agents/skills/qk-context-loader/capability.yaml +23 -0
  46. package/.agents/skills/qk-context-loader/evals/scorecard.yaml +28 -0
  47. package/.agents/skills/qk-data-lifecycle/SKILL.md +7 -2
  48. package/.agents/skills/qk-data-lifecycle/capability.yaml +23 -0
  49. package/.agents/skills/qk-data-lifecycle/evals/scorecard.yaml +29 -0
  50. package/.agents/skills/qk-db-optimizer/SKILL.md +4 -3
  51. package/.agents/skills/qk-db-optimizer/capability.yaml +22 -0
  52. package/.agents/skills/qk-db-optimizer/evals/scorecard.yaml +28 -0
  53. package/.agents/skills/qk-design-system-engineering/SKILL.md +235 -112
  54. package/.agents/skills/qk-design-system-engineering/capability.yaml +25 -0
  55. package/.agents/skills/qk-design-system-engineering/evals/scorecard.yaml +27 -0
  56. package/.agents/skills/qk-devops-platform/SKILL.md +241 -117
  57. package/.agents/skills/qk-devops-platform/capability.yaml +29 -0
  58. package/.agents/skills/qk-devops-platform/evals/scorecard.yaml +28 -0
  59. package/.agents/skills/qk-docs/SKILL.md +4 -2
  60. package/.agents/skills/qk-docs/capability.yaml +23 -0
  61. package/.agents/skills/qk-docs/evals/scorecard.yaml +27 -0
  62. package/.agents/skills/qk-engineering-standard/SKILL.md +5 -76
  63. package/.agents/skills/qk-engineering-standard/capability.yaml +23 -0
  64. package/.agents/skills/qk-engineering-standard/evals/scorecard.yaml +28 -0
  65. package/.agents/skills/qk-engineering-standard/references/anti-patterns.md +121 -0
  66. package/.agents/skills/qk-engineering-standard/rules/frontend.md +1 -1
  67. package/.agents/skills/qk-fe-api-integration/SKILL.md +14 -33
  68. package/.agents/skills/qk-fe-api-integration/capability.yaml +21 -0
  69. package/.agents/skills/qk-fe-api-integration/evals/scorecard.yaml +29 -0
  70. package/.agents/skills/qk-feature-delivery/SKILL.md +54 -222
  71. package/.agents/skills/qk-feature-delivery/capability.yaml +24 -0
  72. package/.agents/skills/qk-feature-delivery/evals/scorecard.yaml +28 -0
  73. package/.agents/skills/qk-frontend-architecture/SKILL.md +258 -134
  74. package/.agents/skills/qk-frontend-architecture/capability.yaml +28 -0
  75. package/.agents/skills/qk-frontend-architecture/evals/scorecard.yaml +28 -0
  76. package/.agents/skills/qk-help/SKILL.md +23 -161
  77. package/.agents/skills/qk-help/capability.yaml +20 -0
  78. package/.agents/skills/qk-help/evals/scorecard.yaml +13 -0
  79. package/.agents/skills/qk-orchestrator/SKILL.md +3 -35
  80. package/.agents/skills/qk-orchestrator/capability.yaml +22 -0
  81. package/.agents/skills/qk-orchestrator/evals/scorecard.yaml +27 -0
  82. package/.agents/skills/qk-orchestrator/references/routing-table.md +15 -3
  83. package/.agents/skills/qk-product-specification/SKILL.md +253 -130
  84. package/.agents/skills/qk-product-specification/capability.yaml +27 -0
  85. package/.agents/skills/qk-product-specification/evals/scorecard.yaml +27 -0
  86. package/.agents/skills/qk-production-release/SKILL.md +33 -68
  87. package/.agents/skills/qk-production-release/capability.yaml +27 -0
  88. package/.agents/skills/qk-production-release/evals/scorecard.yaml +28 -0
  89. package/.agents/skills/qk-project-bootstrap/SKILL.md +59 -8
  90. package/.agents/skills/qk-project-bootstrap/capability.yaml +23 -0
  91. package/.agents/skills/qk-project-bootstrap/evals/scorecard.yaml +28 -0
  92. package/.agents/skills/qk-project-health/SKILL.md +5 -3
  93. package/.agents/skills/qk-project-health/capability.yaml +23 -0
  94. package/.agents/skills/qk-project-health/evals/scorecard.yaml +27 -0
  95. package/.agents/skills/qk-project-memory/SKILL.md +4 -2
  96. package/.agents/skills/qk-project-memory/capability.yaml +23 -0
  97. package/.agents/skills/qk-project-memory/evals/scorecard.yaml +27 -0
  98. package/.agents/skills/qk-refactor/SKILL.md +117 -0
  99. package/.agents/skills/qk-refactor/capability.yaml +26 -0
  100. package/.agents/skills/qk-refactor/evals/scorecard.yaml +27 -0
  101. package/.agents/skills/qk-security-audit/SKILL.md +259 -135
  102. package/.agents/skills/qk-security-audit/capability.yaml +30 -0
  103. package/.agents/skills/qk-security-audit/evals/scorecard.yaml +27 -0
  104. package/.agents/skills/qk-system-evolution/SKILL.md +18 -68
  105. package/.agents/skills/qk-system-evolution/capability.yaml +24 -0
  106. package/.agents/skills/qk-system-evolution/evals/scorecard.yaml +26 -0
  107. package/.agents/skills/qk-test-engineering/SKILL.md +262 -139
  108. package/.agents/skills/qk-test-engineering/capability.yaml +28 -0
  109. package/.agents/skills/qk-test-engineering/evals/scorecard.yaml +26 -0
  110. package/.agents/skills/qk-ui-audit/SKILL.md +17 -90
  111. package/.agents/skills/qk-ui-audit/capability.yaml +23 -0
  112. package/.agents/skills/qk-ui-audit/evals/scorecard.yaml +26 -0
  113. package/.agents/skills/qk-ui-audit/references/anti-slop-checklist.md +2 -2
  114. package/.agents/skills/qk-ui-builder/SKILL.md +482 -509
  115. package/.agents/skills/qk-ui-builder/capability.yaml +29 -0
  116. package/.agents/skills/qk-ui-builder/references/component-cookbook.md +455 -1191
  117. package/.agents/skills/qk-ui-system-builder/SKILL.md +2 -6
  118. package/.agents/skills/qk-ui-system-builder/capability.yaml +25 -0
  119. package/.agents/skills/qk-ui-system-builder/evals/scorecard.yaml +26 -0
  120. package/.agents/skills/qk-validation-gate/SKILL.md +1 -75
  121. package/.agents/skills/qk-validation-gate/capability.yaml +23 -0
  122. package/.agents/skills/qk-validation-gate/evals/scorecard.yaml +26 -0
  123. package/.agents/skills/qk-web-quality-gate/SKILL.md +232 -114
  124. package/.agents/skills/qk-web-quality-gate/capability.yaml +24 -0
  125. package/.agents/skills/qk-web-quality-gate/evals/scorecard.yaml +26 -0
  126. package/.agents/workflows/_schema.yml +146 -109
  127. package/.agents/workflows/bug-resolution.yml +121 -101
  128. package/.agents/workflows/code-review.yml +93 -77
  129. package/.agents/workflows/documentation.yml +90 -75
  130. package/.agents/workflows/feature-delivery.yml +120 -103
  131. package/.agents/workflows/production-release.yml +173 -0
  132. package/.agents/workflows/refactor.yml +99 -81
  133. package/.agents/workflows/research.yml +75 -60
  134. package/.agents/workflows/security-audit.yml +115 -72
  135. package/.agents/workflows/skill-evolution.yml +97 -65
  136. package/.agents/workflows/spec-driven-development.yml +87 -57
  137. package/CHANGELOG.md +27 -0
  138. package/README.md +90 -90
  139. package/bin/install.js +329 -179
  140. package/package.json +4 -2
  141. package/tooling/build-registry.js +186 -186
  142. package/tooling/fix-refactor.js +8 -0
  143. package/tooling/sync-versions.js +49 -0
  144. package/tooling/validate-graph.js +87 -87
  145. package/.agents/CHANGELOG.md +0 -131
  146. package/.agents/learnings/draft/README.md +0 -37
  147. package/.agents/reports/RELEASE-CHECKLIST.md +0 -29
  148. package/.agents/reports/architecture-audit.md +0 -13
  149. package/.agents/reports/graph-health.md +0 -20
  150. package/.agents/reports/skill-audit.md +0 -215
  151. package/tooling/generate-registry.js +0 -157
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  # ── Identity ───────────────────────────────────────────────
3
3
  name: qk-bug-resolution
4
- version: 8.0.0
4
+ version: 8.3.1
5
5
  status: stable
6
6
  description: "Sửa lỗi (bugs) bằng chu trình khép kín: Quan sát → Giả thuyết → Bằng chứng → Sửa."
7
7
  platforms: [antigravity, claude-code, cursor, windsurf, kilo-code]
@@ -56,6 +56,8 @@ knowledge_scope:
56
56
  references:
57
57
  - testing
58
58
  - language-specific-features
59
+ - security
60
+ - anti-patterns
59
61
 
60
62
  # ── V8: Verification ───────────────────────────────────────
61
63
  verification:
@@ -109,6 +111,7 @@ On missing precondition:
109
111
 
110
112
  ## Non-Goals
111
113
  - ❌ Refactor code outside the buggy area
114
+ - ❌ Bypass ranh giới bảo mật Zero-Trust (R-SEC-04) chỉ để "làm cho chạy được".
112
115
  - ❌ Create Node.js/Python/shell scripts to apply patches — edit source files directly
113
116
  - ❌ Read entire files > 150 lines — use `grep_search` or targeted `view_file[StartLine:EndLine]`
114
117
  - ❌ Run shell commands > 2 times per cycle
@@ -342,24 +345,3 @@ Exit Code: [SUCCESS | PARTIAL | BLOCKED | FAILED]
342
345
 
343
346
  ---
344
347
 
345
- Diagnose and fix a specific bug with minimal, targeted changes while preserving all existing behavior.
346
- This skill is triggered when a user reports a specific defect with a stack trace, error message, or reproduction steps. It requires concrete evidence before any code modification.
347
- - Symptom description (error message, wrong behavior, crash)
348
- - Stack trace or reproduction steps
349
- - Affected file or feature area (if known)
350
- - Context graph (for blast radius assessment)
351
- 1. **Observe:** Read error output, stack trace, and affected code section
352
- 2. **Hypothesize:** Identify potential root causes based on evidence
353
- 3. **Verify:** Confirm root cause with direct file:line evidence
354
- 4. **Fix:** Apply minimal patch using direct edit only
355
- 5. **Verify:** Re-read fixed code and confirm correctness
356
- - MUST have exact file:line before proceeding to fix
357
- - MUST NOT guess root cause without direct evidence
358
- - MUST keep changes minimal — smallest diff that resolves the issue
359
- - MUST NOT exceed token_budget (max 3 files, 150 lines each, 2 shell commands)
360
- - MUST verify fix before marking done
361
- - Zero-Trust: No fix without HIGH confidence (direct evidence)
362
- - Minimal Change: Fix only the bug, no refactoring
363
- - Backward Compat: Preserve all existing public API behavior
364
- - Evidence First: Every finding must use Evidence Format with file:line
365
- ---
@@ -0,0 +1,25 @@
1
+ # Auto-generated from SKILL.md frontmatter
2
+ schema_version: 1
3
+ id: "qk-bug-resolution"
4
+ version: "8.3.1"
5
+ description: "Sửa lỗi (bugs) bằng chu trình khép kín: Quan sát → Giả thuyết → Bằng chứng → Sửa."
6
+ tools:
7
+ - "filesystem"
8
+ - "terminal"
9
+ knowledge:
10
+ owns:
11
+ - "bug-diagnosis"
12
+ - "fix-strategies"
13
+ - "root-cause-analysis"
14
+ references:
15
+ - "testing"
16
+ - "language-specific-features"
17
+ - "security"
18
+ - "anti-patterns"
19
+ eval:
20
+ scorecard: "evals/scorecard.yaml"
21
+ decision_boundary:
22
+ owns:
23
+ - "qk-bug-resolution"
24
+ does_not_own: []
25
+ conflicts_with: []
@@ -0,0 +1,30 @@
1
+ name: qk-bug-resolution-eval
2
+ description: Đánh giá chất lượng quy trình sửa lỗi (Bug Resolution)
3
+ version: 8.3.1
4
+ threshold: 85 # Quy trình sửa lỗi cần bằng chứng rõ ràng và sửa đúng trọng tâm
5
+
6
+ metrics:
7
+ - id: evidence_based_diagnosis
8
+ name: Chẩn đoán dựa trên bằng chứng
9
+ description: Agent có tìm ra chính xác dòng code gây lỗi trước khi sửa không?
10
+ weight: 40
11
+ criteria:
12
+ - Xác định được chính xác file và dòng gây lỗi (file:line) dựa vào stack trace/log thay vì đoán mò (20đ)
13
+ - Phân tích đúng Root Cause (nguyên nhân gốc rễ) trước khi đưa ra giải pháp (20đ)
14
+
15
+ - id: minimal_targeted_patch
16
+ name: Sửa lỗi tối giản và đúng trọng tâm
17
+ description: Bản vá lỗi có gọn gàng và không ảnh hưởng đến logic khác không?
18
+ weight: 35
19
+ criteria:
20
+ - Sửa trực tiếp vào source code, thay đổi mã nguồn ít nhất có thể (minimal diff) (15đ)
21
+ - Không refactor lan man ra ngoài phạm vi gây lỗi (10đ)
22
+ - Giải quyết triệt để nguyên nhân, không dùng mẹo che giấu lỗi (vd: không lạm dụng `?` hoặc `!` chỉ để ép kiểu) (10đ)
23
+
24
+ - id: verification_and_safety
25
+ name: Kiểm chứng và an toàn
26
+ description: Agent có kiểm tra lại sau khi sửa và tuân thủ ranh giới không?
27
+ weight: 25
28
+ criteria:
29
+ - Re-read (đọc lại) code sau khi sửa để xác nhận logic đã chuẩn xác (Static Verification) (15đ)
30
+ - Không phá vỡ ranh giới bảo mật (Zero-Trust) chỉ để code chạy được (10đ)
@@ -1,186 +1,188 @@
1
- ---
2
- # ── Identity ───────────────────────────────────────────────
3
- name: qk-code-review
4
- version: 8.0.0
5
- status: stable
6
- description: "Elite AI/Code Review System: Kiểm toán, Review code và cấu hình AI với tư duy Architect, áp dụng 4-Phase Review."
7
- platforms: [antigravity, claude-code, cursor, windsurf, kilo-code]
8
-
9
- # ── V8: Classification ─────────────────────────────────────
10
- type: utility
11
-
12
- intent:
13
- - code-review
14
- - quality-assurance
15
- - architecture-review
16
- - ai-config-audit
17
-
18
- complexity:
19
- level: high
20
- criteria:
21
- files_affected: "1-15"
22
- has_behavior_change: false
23
- has_external_dependency: false
24
- has_breaking_change: false
25
-
26
- triggers:
27
- - "review code"
28
- - "code review"
29
- - "kiểm tra code"
30
- - "đánh giá code"
31
- - "review skin"
32
- - "review rule"
33
- - "review ai"
34
-
35
- selection:
36
- priority: high
37
- confidence_threshold: 0.85
38
-
39
- # ── V8: References ─────────────────────────────────────────
40
- workflow: code-review
41
-
42
- rules:
43
- - global
44
-
45
- tools:
46
- - filesystem
47
-
48
- related_skills:
49
- - qk-validation-gate
50
- - qk-engineering-standard
51
- - qk-project-health
52
-
53
- knowledge_scope:
54
- owns:
55
- - code-review-standards
56
- - ai-configuration-review
57
- - feedback-delivery
58
- references:
59
- - architecture
60
- - security-best-practices
61
-
62
- # ── V8: Verification ───────────────────────────────────────
63
- verification:
64
- required: true
65
- strategy: review
66
-
67
- # ── V8: Knowledge links ────────────────────────────────────
68
- examples: []
69
- learnings: []
70
-
71
- # ── V7 Runtime ─────────────────────────────────────────────
72
- execution_mode: deterministic
73
- cost: high
74
- latency: medium
75
- risk: low
76
- side_effects: read_only
77
- produces: [report]
78
- consumes: [source-code, rules, workflows]
79
-
80
- token_budget:
81
- max_files_read: 10
82
- max_lines_per_read: 300
83
- max_shell_commands: 2
84
- stop_early: true
85
-
86
- exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
87
- ---
88
-
89
- # qk-code-review — Elite Review System
90
-
91
- > **Language rule:** Code, identifiers, file names → English. Explanations, summaries → Vietnamese.
92
-
93
- Biến quá trình Code Review từ "bắt bẻ" (gatekeeping) thành "chia sẻ tri thức" (knowledge sharing) thông qua phản hồi mang tính xây dựng, phân tích có hệ thống và hợp tác cải tiến.
94
-
95
- ---
96
-
97
- ## Preconditions
98
-
99
- - [ ] Xác định rõ đối tượng cần review: Mã nguồn phần mềm (React, Java, etc.) hay Cấu hình AI (Skin, Rules, Workflows).
100
- - [ ] Cung cấp ngữ cảnh hoặc mục tiêu của đoạn code/cấu hình cần review.
101
-
102
- ```
103
- On missing precondition → EXIT: BLOCKED
104
- Report: "Missing: Vui lòng cung cấp ngữ cảnh hoặc chỉ định rõ file cần review."
105
- ```
106
-
107
- ---
108
-
109
- ## Dynamic Context Loading (Tải Ngữ Cảnh Động)
110
-
111
- > **CHỈ ĐỌC KHI CẦN (on-demand):** Chỉ mở file references/ nếu có vấn đề cụ thể cần xác minh. Đừng đọc trước khi chưa thấy vấn đề.
112
-
113
- - **Nếu review AI Config** và phát hiện vấn đề schema/anti-pattern → đọc `references/ai/v8-schema-validation.md` HOẶC `references/ai/ai-anti-patterns.md` (không cần đọc cả 2 nếu không liên quan).
114
- - **Nếu review Code** và gặp vấn đề ngôn ngữ cụ thể → đọc `references/languages/[tên-ngôn-ngữ].md`.
115
- - **Nếu review cross-cutting** và cần xác minh architecture → đọc `references/cross-cutting/architecture-review-guide.md`.
116
- - **Default (80% trường hợp):** Dùng kiến thức sẵn, không đọc references.
117
-
118
- ---
119
-
120
- ## 4-Phase Review Process
121
-
122
- Là một AI Architect, quá trình review phải tuân thủ nghiêm ngặt 4 giai đoạn sau:
123
-
124
- ### Phase 1: Context Gathering & Loading (Thu thập & Nạp Ngữ Cảnh)
125
- - Đọc file tả (PR, Issue) hoặc yêu cầu của người dùng.
126
- - **Thực thi Dynamic Context Loading** (đọc các file reference cần thiết như đã định nghĩa ở trên).
127
-
128
- ### Phase 2: High-Level Review (Kiến trúc & Chuẩn mực)
129
- - **Đối với AI Config:** Kiểm tra cấu trúc V8 (Identity, Intent, Complexity, Triggers).
130
- - **Đối với Code Phần mềm:** Kiểm tra SOLID, Coupling/Cohesion, Performance, Security (Tham chiếu theo `cross-cutting` guides).
131
-
132
- ### Phase 3: Deep-dive & Logic Review (Phân tích chi tiết)
133
- - **Đối với AI Config:** Kiểm tra rủi ro "ảo giác" (hallucination), token abuse, side-effects, stop_early.
134
- - **Đối với Code Phần mềm:** soát edge cases, lỗi logic chuyên sâu theo từng ngôn ngữ (Tham chiếu theo `languages` guides).
135
-
136
- ### Phase 4: Summary & Decision (Tổng hợp & Quyết định)
137
- - Đưa ra báo cáo theo `Output Format`.
138
- - Gắn nhãn `Severity Tags` rõ ràng.
139
-
140
- ---
141
-
142
- ## Feedback Principles (Nguyên tắc Phản hồi)
143
-
144
- - **Collaborative Language (Ngôn từ hợp tác)**: Thay vì ra lệnh ("Sửa cái này thành X", "Bỏ dòng này đi"), hãy dùng câu hỏi gợi mở ("Nếu chúng ta dùng X ở đây thì có tối ưu hiệu năng hơn không?", "Có vẻ logic này bị lặp, chúng ta extract nó ra hàm riêng được không?").
145
- - **Differentiate Severity (Phân biệt mức độ)**: Bắt buộc sử dụng các nhãn sau để phân loại mức độ phản hồi:
146
- - 🔴 `[blocking]` - Lỗi nghiêm trọng (VD: Security flaw, thiếu token_budget). Bắt buộc phải sửa.
147
- - 🟡 `[important]` - Lỗi quan trọng (VD: Performance leak, trigger quá rộng). Nên sửa hoặc cần thảo luận.
148
- - 🟢 `[nit]` - Cải thiện nhỏ (VD: Lỗi chính tả, format, naming). Không bắt buộc.
149
- - 💡 `[suggestion]` - Cách tiếp cận hoặc thư viện thay thế để tham khảo.
150
- - 📚 `[learning]` - Giải thích nguyên (Why) để chia sẻ kiến thức, không yêu cầu hành động.
151
- - 🎉 `[praise]` - Lời khen cho đoạn code / logic thiết kế tốt.
152
-
153
- ---
154
-
155
- ## Output Format
156
-
157
- ```markdown
158
- ## qk-code-review Report
159
- ─────────────────────────────────────────────────
160
- **Target:** [Tên file / Chức năng]
161
- **Status:** SUCCESS | BLOCKED | FAILED | PARTIAL
162
-
163
- ### 📊 Executive Summary
164
- [1-2 câu tóm tắt chất lượng tổng thể của mã nguồn/cấu hình. VD: "Kiến trúc rõ ràng, nhưng tiềm ẩn rủi ro lặp vô hạn ở dòng 45."]
165
-
166
- ### 🔍 Findings & Recommendations
167
-
168
- [Nhóm các findings theo mức độ nghiêm trọng giảm dần. LUÔN đính kèm snippet / file line nếu có thể]
169
-
170
- - 🔴 `[blocking]`: [Vấn đề nghiêm trọng]
171
- - *Location*: `file.ts:L45`
172
- - *Feedback*: [Câu hỏi/Gợi ý sửa chữa]
173
-
174
- - 🟡 `[important]`: [Vấn đề quan trọng]
175
- - 💡 `[suggestion]`: [Gợi ý cải thiện]
176
- - 🟢 `[nit]`: [Góp ý nhỏ]
177
- - 🎉 `[praise]`: [Khen ngợi]
178
-
179
- ### 🛠️ Suggested Fixes (Optional)
180
- [Cung cấp Code diff hoặc YAML chuẩn xác để user dễ dàng copy & paste. TUYỆT ĐỐI KHÔNG tự sửa file nếu user chưa yêu cầu]
181
-
182
- ### ✅ Verdict
183
- - [ ] Approve (Có thể merge/deploy ngay)
184
- - [ ] Changes Requested (Cần sửa các mục `[blocking]`)
185
- - [ ] Comment (Chỉ gợi ý, quyền quyết định ở user)
186
- ```
1
+ ---
2
+ # ── Identity ───────────────────────────────────────────────
3
+ name: qk-code-review
4
+ version: 8.3.1
5
+ status: stable
6
+ description: "Elite AI/Code Review System: Kiểm toán, Review code và cấu hình AI với tư duy Architect, áp dụng 4-Phase Review."
7
+ platforms: [antigravity, claude-code, cursor, windsurf, kilo-code]
8
+
9
+ # ── V8: Classification ─────────────────────────────────────
10
+ type: utility
11
+
12
+ intent:
13
+ - code-review
14
+ - quality-assurance
15
+ - architecture-review
16
+ - ai-config-audit
17
+
18
+ complexity:
19
+ level: high
20
+ criteria:
21
+ files_affected: "1-15"
22
+ has_behavior_change: false
23
+ has_external_dependency: false
24
+ has_breaking_change: false
25
+
26
+ triggers:
27
+ - "review code"
28
+ - "code review"
29
+ - "kiểm tra code"
30
+ - "đánh giá code"
31
+ - "review skin"
32
+ - "review rule"
33
+ - "review ai"
34
+
35
+ selection:
36
+ priority: high
37
+ confidence_threshold: 0.85
38
+
39
+ # ── V8: References ─────────────────────────────────────────
40
+ workflow: code-review
41
+
42
+ rules:
43
+ - global
44
+
45
+ tools:
46
+ - filesystem
47
+
48
+ related_skills:
49
+ - qk-validation-gate
50
+ - qk-engineering-standard
51
+ - qk-project-health
52
+
53
+ knowledge_scope:
54
+ owns:
55
+ - code-review-standards
56
+ - ai-configuration-review
57
+ - feedback-delivery
58
+ references:
59
+ - architecture
60
+ - security
61
+ - anti-patterns
62
+
63
+ # ── V8: Verification ───────────────────────────────────────
64
+ verification:
65
+ required: true
66
+ strategy: review
67
+
68
+ # ── V8: Knowledge links ────────────────────────────────────
69
+ examples: []
70
+ learnings: []
71
+
72
+ # ── V7 Runtime ─────────────────────────────────────────────
73
+ execution_mode: deterministic
74
+ cost: high
75
+ latency: medium
76
+ risk: low
77
+ side_effects: read_only
78
+ produces: [report]
79
+ consumes: [source-code, rules, workflows]
80
+
81
+ token_budget:
82
+ max_files_read: 10
83
+ max_lines_per_read: 300
84
+ max_shell_commands: 2
85
+ stop_early: true
86
+
87
+ exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
88
+ ---
89
+
90
+ # qk-code-review — Elite Review System
91
+
92
+ > **Language rule:** Code, identifiers, file names → English. Explanations, summaries → Vietnamese.
93
+
94
+ Biến quá trình Code Review từ "bắt bẻ" (gatekeeping) thành "chia sẻ tri thức" (knowledge sharing) thông qua phản hồi mang tính xây dựng, phân tích có hệ thống và hợp tác cải tiến.
95
+
96
+ ---
97
+
98
+ ## Preconditions
99
+
100
+ - [ ] Xác định đối tượng cần review: nguồn phần mềm (React, Java, etc.) hay Cấu hình AI (Skin, Rules, Workflows).
101
+ - [ ] Cung cấp ngữ cảnh hoặc mục tiêu của đoạn code/cấu hình cần review.
102
+
103
+ ```
104
+ On missing precondition EXIT: BLOCKED
105
+ Report: "Missing: Vui lòng cung cấp ngữ cảnh hoặc chỉ định rõ file cần review."
106
+ ```
107
+
108
+ ---
109
+
110
+ ## Dynamic Context Loading (Tải Ngữ Cảnh Động)
111
+
112
+ > **CHỈ ĐỌC KHI CẦN (on-demand):** Chỉ mở file references/ nếu có vấn đề cụ thể cần xác minh. Đừng đọc trước khi chưa thấy vấn đề.
113
+
114
+ - **Nếu review AI Config** và phát hiện vấn đề schema/anti-pattern → đọc `references/ai/v8-schema-validation.md` HOẶC `references/ai/ai-anti-patterns.md` (không cần đọc cả 2 nếu không liên quan).
115
+ - **Nếu review Code** và gặp vấn đề ngôn ngữ cụ thể → đọc `references/languages/[tên-ngôn-ngữ].md`.
116
+ - **Nếu review cross-cutting** cần xác minh architecture đọc `references/cross-cutting/architecture-review-guide.md`.
117
+ - **Default (80% trường hợp):** Dùng kiến thức có sẵn, không đọc references.
118
+
119
+ ---
120
+
121
+ ## 4-Phase Review Process
122
+
123
+ Là một AI Architect, quá trình review phải tuân thủ nghiêm ngặt 4 giai đoạn sau:
124
+
125
+ ### Phase 1: Context Gathering & Loading (Thu thập & Nạp Ngữ Cảnh)
126
+ - Đọc file tả (PR, Issue) hoặc yêu cầu của người dùng.
127
+ - **Thực thi Dynamic Context Loading** (đọc các file reference cần thiết như đã định nghĩa ở trên).
128
+
129
+ ### Phase 2: High-Level Review (Kiến trúc & Chuẩn mực)
130
+ - **Đối với AI Config:** Kiểm tra cấu trúc V8 (Identity, Intent, Complexity, Triggers).
131
+ - **Đối với Code Phần mềm:** Kiểm tra SOLID, Coupling/Cohesion, Performance, Security. **BẮT BUỘC đối chiếu với luật chống rác mã (R-C-09) và ranh giới Zero-Trust (R-SEC-04). Vi phạm sẽ bị đánh tag `[blocking]`.**
132
+
133
+ ### Phase 3: Deep-dive & Logic Review (Phân tích chi tiết)
134
+ - **Đối với AI Config:** Kiểm tra rủi ro "ảo giác" (hallucination), token abuse, side-effects, stop_early.
135
+ - **Đối với Code Phần mềm:** Rà soát edge cases, lỗi logic chuyên sâu theo từng ngôn ngữ (Tham chiếu theo `languages` guides).
136
+
137
+ ### Phase 4: Summary & Decision (Tổng hợp & Quyết định)
138
+ - Đưa ra báo cáo theo `Output Format`.
139
+ - Gắn nhãn `Severity Tags` rõ ràng.
140
+
141
+ ---
142
+
143
+ ## Feedback Principles (Nguyên tắc Phản hồi)
144
+
145
+ - **Collaborative Language (Ngôn từ hợp tác)**: Thay ra lệnh ("Sửa cái này thành X", "Bỏ dòng này đi"), hãy dùng câu hỏi gợi mở ("Nếu chúng ta dùng X ở đây thì có tối ưu hiệu năng hơn không?", "Có vẻ logic này bị lặp, chúng ta extract nó ra hàm riêng được không?").
146
+ - **Differentiate Severity (Phân biệt mức độ)**: Bắt buộc sử dụng các nhãn sau để phân loại mức độ phản hồi:
147
+ - 🔴 `[blocking]` - Lỗi nghiêm trọng (VD: Security flaw, thiếu token_budget). Bắt buộc phải sửa.
148
+ - 🟡 `[important]` - Lỗi quan trọng (VD: Performance leak, trigger quá rộng). Nên sửa hoặc cần thảo luận.
149
+ - 🟢 `[nit]` - Cải thiện nhỏ (VD: Lỗi chính tả, format, naming). Không bắt buộc.
150
+ - 💡 `[suggestion]` - Cách tiếp cận hoặc thư viện thay thế để tham khảo.
151
+ - 📚 `[learning]` - Giải thích nguyên (Why) để chia sẻ kiến thức, không yêu cầu hành động.
152
+ - 🎉 `[praise]` - Lời khen cho đoạn code / logic thiết kế tốt.
153
+
154
+ ---
155
+
156
+ ## Output Format
157
+
158
+ ```markdown
159
+ ## qk-code-review Report
160
+ ─────────────────────────────────────────────────
161
+ **Target:** [Tên file / Chức năng]
162
+ **Status:** SUCCESS | BLOCKED | FAILED | PARTIAL
163
+
164
+ ### 📊 Executive Summary
165
+ [1-2 câu tóm tắt chất lượng tổng thể của mã nguồn/cấu hình. VD: "Kiến trúc rõ ràng, nhưng tiềm ẩn rủi ro lặp vô hạn ở dòng 45."]
166
+
167
+ ### 🔍 Findings & Recommendations
168
+
169
+ [Nhóm các findings theo mức độ nghiêm trọng giảm dần. LUÔN đính kèm snippet / file line nếu có thể]
170
+
171
+ - 🔴 `[blocking]`: [Vấn đề nghiêm trọng]
172
+ - *Location*: `file.ts:L45`
173
+ - *Feedback*: [Câu hỏi/Gợi ý sửa chữa]
174
+
175
+ - 🟡 `[important]`: [Vấn đề quan trọng]
176
+ - 💡 `[suggestion]`: [Gợi ý cải thiện]
177
+ - 🟢 `[nit]`: [Góp ý nhỏ]
178
+ - 🎉 `[praise]`: [Khen ngợi]
179
+
180
+ ### 🛠️ Suggested Fixes (Optional)
181
+ [Cung cấp Code diff hoặc YAML chuẩn xác để user dễ dàng copy & paste. TUYỆT ĐỐI KHÔNG tự sửa file nếu user chưa yêu cầu]
182
+
183
+ ### Verdict
184
+ - [ ] Approve ( thể merge/deploy ngay)
185
+ - [ ] Changes Requested (Cần sửa các mục `[blocking]`)
186
+ - [ ] Comment (Chỉ là gợi ý, quyền quyết định ở user)
187
+ ```
188
+
@@ -0,0 +1,23 @@
1
+ # Auto-generated from SKILL.md frontmatter
2
+ schema_version: 1
3
+ id: "qk-code-review"
4
+ version: "8.3.1"
5
+ description: "Elite AI/Code Review System: Kiểm toán, Review code và cấu hình AI với tư duy Architect, áp dụng 4-Phase Review."
6
+ tools:
7
+ - "filesystem"
8
+ knowledge:
9
+ owns:
10
+ - "code-review-standards"
11
+ - "ai-configuration-review"
12
+ - "feedback-delivery"
13
+ references:
14
+ - "architecture"
15
+ - "security"
16
+ - "anti-patterns"
17
+ eval:
18
+ scorecard: "evals/scorecard.yaml"
19
+ decision_boundary:
20
+ owns:
21
+ - "qk-code-review"
22
+ does_not_own: []
23
+ conflicts_with: []
@@ -0,0 +1,29 @@
1
+ name: qk-code-review-eval
2
+ description: Đánh giá chất lượng thực thi quy trình Code/AI Review
3
+ version: 8.3.1
4
+ threshold: 85 # Đánh giá tư duy Architect và ngôn ngữ phản hồi
5
+
6
+ metrics:
7
+ - id: structured_review_process
8
+ name: Tuân thủ 4-Phase Review Process
9
+ description: Agent có thực hiện tuần tự và đầy đủ 4 giai đoạn phân tích không?
10
+ weight: 35
11
+ criteria:
12
+ - Tải ngữ cảnh động (Dynamic Context Loading) hợp lý, không tải dư thừa (15đ)
13
+ - Có Review High-level (Kiến trúc, SOLID, R-SEC-04) và Deep-dive (Logic chuyên sâu, Hallucination) (20đ)
14
+
15
+ - id: collaborative_and_tagged_feedback
16
+ name: Ngôn ngữ Hợp tác & Đánh nhãn Severity
17
+ description: Feedback có tính xây dựng và được phân loại đúng mức độ không?
18
+ weight: 40
19
+ criteria:
20
+ - Sử dụng câu hỏi gợi mở, ngôn từ hợp tác thay vì ra lệnh (15đ)
21
+ - Phân loại rõ ràng bằng nhãn `[blocking]`, `[important]`, `[nit]`, `[suggestion]`, `[praise]` (25đ)
22
+
23
+ - id: safe_execution
24
+ name: Không tự ý sửa mã
25
+ description: Agent chỉ review và đưa ra suggestion chứ không tự động thay đổi code?
26
+ weight: 25
27
+ criteria:
28
+ - Đưa ra code diff (Suggested Fixes) để user tham khảo (15đ)
29
+ - Tuyệt đối không tự sửa file (sử dụng replace_file_content) nếu user không yêu cầu (10đ)
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  # ── Identity ───────────────────────────────────────────────
3
3
  name: qk-context-loader
4
- version: 8.0.0
4
+ version: 8.3.1
5
5
  status: stable
6
6
  description: "Tải context và vẽ dependency graph chính xác trước khi code — ngăn hallucination kiến trúc."
7
7
  platforms: [antigravity, claude-code, cursor, windsurf, kilo-code]
@@ -54,6 +54,7 @@ knowledge_scope:
54
54
  references:
55
55
  - coding
56
56
  - repository-structure
57
+ - anti-patterns
57
58
 
58
59
  # ── V8: Verification ───────────────────────────────────────
59
60
  verification:
@@ -85,7 +86,6 @@ exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
85
86
 
86
87
  > **Language rule:** Code, identifiers, file names → English. Explanations, summaries → Vietnamese.
87
88
 
88
-
89
89
  ## Preconditions
90
90
  - [ ] Entry point file or module name is specified
91
91
  - [ ] Repository is accessible
@@ -96,7 +96,6 @@ On missing precondition:
96
96
  Message: "Vui lòng chỉ định entry point (file hoặc module cần map)."
97
97
  ```
98
98
 
99
-
100
99
  ## Scope
101
100
  - ✅ Trace imports/exports from entry point
102
101
  - ✅ Build topological dependency graph (max depth 3)
@@ -108,7 +107,6 @@ On missing precondition:
108
107
  - ❌ Guess file names — only follow explicit imports
109
108
  - ❌ Load entire repo (max 5 files)
110
109
 
111
-
112
110
  ## Priority Order
113
111
 
114
112
  | Priority | Task | Skip Threshold |
@@ -118,7 +116,6 @@ On missing precondition:
118
116
  | P3 | Identify shared/risky modules | Budget < 60% |
119
117
  | P4 | Annotate with risk levels | Budget < 70% |
120
118
 
121
-
122
119
  ## Workflow
123
120
 
124
121
  ### Phase 1 — Entry Point Analysis
@@ -137,7 +134,6 @@ ELSE IF entry file not found
137
134
  → EXIT: BLOCKED — ask for correct path
138
135
  ```
139
136
 
140
-
141
137
  ### Phase 2 — Graph Traversal (Max Depth 3)
142
138
 
143
139
  **Steps:**
@@ -155,14 +151,13 @@ IF circular dependency detected
155
151
  → Continue building rest of graph
156
152
  ```
157
153
 
158
-
159
154
  ### Phase 3 — Risk Assessment & Output
160
155
 
161
156
  **Steps:**
162
157
  1. Identify: shared modules (imported by 3+ files) = HIGH risk to change
163
158
  2. Identify: entry points with many dependents = CRITICAL to change carefully
164
- 3. Generate graph in standard JSON + Markdown format
165
-
159
+ 3. **Identify: file trộn lẫn Server Logic Client UI, hoặc vi phạm ranh giới bảo mật R-SEC-04 = Bắt buộc flag [HIGH RISK].**
160
+ 4. Generate graph in standard JSON + Markdown format
166
161
 
167
162
  ## Output Format (Mandatory Schema)
168
163
 
@@ -190,7 +185,6 @@ IF circular dependency detected
190
185
  }
191
186
  ```
192
187
 
193
-
194
188
  ## Evidence Format
195
189
 
196
190
  ```
@@ -200,7 +194,6 @@ Imported by: [N files]
200
194
  Exports: [key exports]
201
195
  ```
202
196
 
203
-
204
197
  ## Handoff Contract
205
198
 
206
199
  ### Consumes
@@ -220,7 +213,6 @@ Exports: [key exports]
220
213
  }
221
214
  ```
222
215
 
223
-
224
216
  ## Exit Codes
225
217
 
226
218
  | Code | Meaning | When |