ai-developer-skill-os 8.2.0 → 8.3.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 (79) 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/graph.json +4 -8
  13. package/.agents/registry/index.yaml +3 -4
  14. package/.agents/registry/skills-index.yml +525 -525
  15. package/.agents/rules/coding.md +10 -0
  16. package/.agents/rules/command-safety.md +37 -14
  17. package/.agents/rules/priorities.yml +13 -2
  18. package/.agents/rules/security.md +47 -7
  19. package/.agents/rules/skill-quality.md +32 -8
  20. package/.agents/skills/_template/SKILL.md +133 -132
  21. package/.agents/skills/_template/capability.yaml +20 -20
  22. package/.agents/skills/_template/evals/scorecard.yaml +19 -19
  23. package/.agents/skills/qk-access-policy/SKILL.md +4 -1
  24. package/.agents/skills/qk-agent-observability/SKILL.md +111 -0
  25. package/.agents/skills/qk-agent-observability/references/scorecard.yaml +80 -0
  26. package/.agents/skills/qk-ai-builder/SKILL.md +74 -5
  27. package/.agents/skills/qk-api-lifecycle/SKILL.md +4 -2
  28. package/.agents/skills/qk-bug-resolution/SKILL.md +3 -21
  29. package/.agents/skills/qk-code-review/SKILL.md +188 -189
  30. package/.agents/skills/qk-context-loader/SKILL.md +3 -47
  31. package/.agents/skills/qk-data-lifecycle/SKILL.md +7 -2
  32. package/.agents/skills/qk-db-optimizer/SKILL.md +3 -2
  33. package/.agents/skills/qk-design-system-engineering/SKILL.md +235 -112
  34. package/.agents/skills/qk-devops-platform/SKILL.md +241 -117
  35. package/.agents/skills/qk-docs/SKILL.md +3 -1
  36. package/.agents/skills/qk-engineering-standard/SKILL.md +4 -75
  37. package/.agents/skills/qk-engineering-standard/references/anti-patterns.md +121 -0
  38. package/.agents/skills/qk-engineering-standard/rules/frontend.md +1 -1
  39. package/.agents/skills/qk-fe-api-integration/SKILL.md +13 -32
  40. package/.agents/skills/qk-feature-delivery/SKILL.md +54 -202
  41. package/.agents/skills/qk-frontend-architecture/SKILL.md +258 -134
  42. package/.agents/skills/qk-help/SKILL.md +21 -159
  43. package/.agents/skills/qk-orchestrator/SKILL.md +2 -78
  44. package/.agents/skills/qk-orchestrator/references/routing-table.md +15 -3
  45. package/.agents/skills/qk-product-specification/SKILL.md +253 -130
  46. package/.agents/skills/qk-production-release/SKILL.md +32 -67
  47. package/.agents/skills/qk-project-bootstrap/SKILL.md +59 -8
  48. package/.agents/skills/qk-project-health/SKILL.md +4 -2
  49. package/.agents/skills/qk-project-memory/SKILL.md +3 -1
  50. package/.agents/skills/qk-security-audit/SKILL.md +259 -135
  51. package/.agents/skills/qk-system-evolution/SKILL.md +18 -68
  52. package/.agents/skills/qk-test-engineering/SKILL.md +262 -139
  53. package/.agents/skills/qk-ui-audit/SKILL.md +16 -89
  54. package/.agents/skills/qk-ui-audit/references/anti-slop-checklist.md +2 -2
  55. package/.agents/skills/qk-ui-builder/SKILL.md +482 -509
  56. package/.agents/skills/qk-ui-builder/references/component-cookbook.md +455 -1191
  57. package/.agents/skills/qk-ui-system-builder/SKILL.md +1 -5
  58. package/.agents/skills/qk-validation-gate/SKILL.md +0 -74
  59. package/.agents/skills/qk-web-quality-gate/SKILL.md +232 -114
  60. package/.agents/workflows/_schema.yml +146 -109
  61. package/.agents/workflows/bug-resolution.yml +121 -101
  62. package/.agents/workflows/code-review.yml +93 -77
  63. package/.agents/workflows/documentation.yml +90 -75
  64. package/.agents/workflows/feature-delivery.yml +120 -103
  65. package/.agents/workflows/refactor.yml +99 -81
  66. package/.agents/workflows/research.yml +75 -60
  67. package/.agents/workflows/security-audit.yml +115 -72
  68. package/.agents/workflows/skill-evolution.yml +97 -65
  69. package/.agents/workflows/spec-driven-development.yml +87 -57
  70. package/CHANGELOG.md +10 -0
  71. package/README.md +90 -90
  72. package/bin/install.js +330 -180
  73. package/package.json +2 -2
  74. package/.agents/CHANGELOG.md +0 -131
  75. package/.agents/learnings/draft/README.md +0 -37
  76. package/.agents/reports/RELEASE-CHECKLIST.md +0 -29
  77. package/.agents/reports/architecture-audit.md +0 -13
  78. package/.agents/reports/graph-health.md +0 -20
  79. package/.agents/reports/skill-audit.md +0 -215
@@ -1,189 +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: false
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
- > **BẮT BUỘC:** Trước khi bắt đầu review, Agent phải sử dụng tool `view_file` để nạp các bí kíp tương ứng từ thư mục `references/` nhằm đảm bảo chất lượng review sâu sát nhất.
112
-
113
- - **Nếu review AI Config (Skin, Rule, Workflow):**
114
- - Mở đọc: `references/ai/v8-schema-validation.md` `references/ai/ai-anti-patterns.md`.
115
- - **Nếu review Code Phần mềm (VD: React, Java, Go, v.v.):**
116
- - Nhận diện ngôn ngữ/framework.
117
- - Mở đọc file tương ứng: `references/languages/[tên-ngôn-ngữ].md` (VD: `react.md`, `java.md`).
118
- - **Nếu review ở mức tổng quát hoặc PR lớn (Cross-cutting):**
119
- - Đọc thêm: `references/cross-cutting/architecture-review-guide.md`, hoặc các file về security/performance nếu phù hợp.
120
-
121
- ---
122
-
123
- ## 4-Phase Review Process
124
-
125
- một AI Architect, quá trình review phải tuân thủ nghiêm ngặt 4 giai đoạn sau:
126
-
127
- ### Phase 1: Context Gathering & Loading (Thu thập & Nạp Ngữ Cảnh)
128
- - Đọc file mô tả (PR, Issue) hoặc yêu cầu của người dùng.
129
- - **Thực thi Dynamic Context Loading** (đọc các file reference cần thiết như đã định nghĩa ở trên).
130
-
131
- ### Phase 2: High-Level Review (Kiến trúc & Chuẩn mực)
132
- - **Đối với AI Config:** Kiểm tra cấu trúc V8 (Identity, Intent, Complexity, Triggers).
133
- - **Đối với Code Phần mềm:** Kiểm tra SOLID, Coupling/Cohesion, Performance, Security (Tham chiếu theo `cross-cutting` guides).
134
-
135
- ### Phase 3: Deep-dive & Logic Review (Phân tích chi tiết)
136
- - **Đối với AI Config:** Kiểm tra rủi ro "ảo giác" (hallucination), token abuse, side-effects, stop_early.
137
- - **Đố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).
138
-
139
- ### Phase 4: Summary & Decision (Tổng hợp & Quyết định)
140
- - Đưa ra báo cáo theo `Output Format`.
141
- - Gắn nhãn `Severity Tags` rõ ràng.
142
-
143
- ---
144
-
145
- ## Feedback Principles (Nguyên tắc Phản hồi)
146
-
147
- - **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?").
148
- - **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:
149
- - 🔴 `[blocking]` - Lỗi nghiêm trọng (VD: Security flaw, thiếu token_budget). Bắt buộc phải sửa.
150
- - 🟡 `[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.
151
- - 🟢 `[nit]` - Cải thiện nhỏ (VD: Lỗi chính tả, format, naming). Không bắt buộc.
152
- - 💡 `[suggestion]` - Cách tiếp cận hoặc thư viện thay thế để tham khảo.
153
- - 📚 `[learning]` - Giải thích nguyên lý (Why) để chia sẻ kiến thức, không yêu cầu hành động.
154
- - 🎉 `[praise]` - Lời khen cho đoạn code / logic thiết kế tốt.
155
-
156
- ---
157
-
158
- ## Output Format
159
-
160
- ```markdown
161
- ## qk-code-review Report
162
- ─────────────────────────────────────────────────
163
- **Target:** [Tên file / Chức năng]
164
- **Status:** SUCCESS | BLOCKED | FAILED | PARTIAL
165
-
166
- ### 📊 Executive Summary
167
- [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."]
168
-
169
- ### 🔍 Findings & Recommendations
170
-
171
- [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ể]
172
-
173
- - 🔴 `[blocking]`: [Vấn đề nghiêm trọng]
174
- - *Location*: `file.ts:L45`
175
- - *Feedback*: [Câu hỏi/Gợi ý sửa chữa]
176
-
177
- - 🟡 `[important]`: [Vấn đề quan trọng]
178
- - 💡 `[suggestion]`: [Gợi ý cải thiện]
179
- - 🟢 `[nit]`: [Góp ý nhỏ]
180
- - 🎉 `[praise]`: [Khen ngợi]
181
-
182
- ### 🛠️ Suggested Fixes (Optional)
183
- [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]
184
-
185
- ### Verdict
186
- - [ ] Approve ( thể merge/deploy ngay)
187
- - [ ] Changes Requested (Cần sửa các mục `[blocking]`)
188
- - [ ] Comment (Chỉ là gợi ý, quyền quyết định ở user)
189
- ```
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
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** gặp vấn đề ngôn ngữ cụ thể → đọc `references/languages/[tên-ngôn-ngữ].md`.
116
+ - **Nếu review cross-cutting** và 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 sẵn, không đọc references.
118
+
119
+ ---
120
+
121
+ ## 4-Phase Review Process
122
+
123
+ 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 mô 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) 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:** 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à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 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?").
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 (Có thể merge/deploy ngay)
185
+ - [ ] Changes Requested (Cần sửa các mục `[blocking]`)
186
+ - [ ] Comment (Chỉ gợi ý, quyền quyết định ở user)
187
+ ```
188
+
@@ -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,11 +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
- skill_version: 7.5.0
100
- runtime_version: 1
101
- schema_version: 2
102
- ---
103
-
104
99
  ## Scope
105
100
  - ✅ Trace imports/exports from entry point
106
101
  - ✅ Build topological dependency graph (max depth 3)
@@ -112,11 +107,6 @@ schema_version: 2
112
107
  - ❌ Guess file names — only follow explicit imports
113
108
  - ❌ Load entire repo (max 5 files)
114
109
 
115
- skill_version: 7.5.0
116
- runtime_version: 1
117
- schema_version: 2
118
- ---
119
-
120
110
  ## Priority Order
121
111
 
122
112
  | Priority | Task | Skip Threshold |
@@ -126,11 +116,6 @@ schema_version: 2
126
116
  | P3 | Identify shared/risky modules | Budget < 60% |
127
117
  | P4 | Annotate with risk levels | Budget < 70% |
128
118
 
129
- skill_version: 7.5.0
130
- runtime_version: 1
131
- schema_version: 2
132
- ---
133
-
134
119
  ## Workflow
135
120
 
136
121
  ### Phase 1 — Entry Point Analysis
@@ -149,11 +134,6 @@ ELSE IF entry file not found
149
134
  → EXIT: BLOCKED — ask for correct path
150
135
  ```
151
136
 
152
- skill_version: 7.5.0
153
- runtime_version: 1
154
- schema_version: 2
155
- ---
156
-
157
137
  ### Phase 2 — Graph Traversal (Max Depth 3)
158
138
 
159
139
  **Steps:**
@@ -171,22 +151,13 @@ IF circular dependency detected
171
151
  → Continue building rest of graph
172
152
  ```
173
153
 
174
- skill_version: 7.5.0
175
- runtime_version: 1
176
- schema_version: 2
177
- ---
178
-
179
154
  ### Phase 3 — Risk Assessment & Output
180
155
 
181
156
  **Steps:**
182
157
  1. Identify: shared modules (imported by 3+ files) = HIGH risk to change
183
158
  2. Identify: entry points with many dependents = CRITICAL to change carefully
184
- 3. Generate graph in standard JSON + Markdown format
185
-
186
- skill_version: 7.5.0
187
- runtime_version: 1
188
- schema_version: 2
189
- ---
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
190
161
 
191
162
  ## Output Format (Mandatory Schema)
192
163
 
@@ -214,11 +185,6 @@ schema_version: 2
214
185
  }
215
186
  ```
216
187
 
217
- skill_version: 7.5.0
218
- runtime_version: 1
219
- schema_version: 2
220
- ---
221
-
222
188
  ## Evidence Format
223
189
 
224
190
  ```
@@ -228,11 +194,6 @@ Imported by: [N files]
228
194
  Exports: [key exports]
229
195
  ```
230
196
 
231
- skill_version: 7.5.0
232
- runtime_version: 1
233
- schema_version: 2
234
- ---
235
-
236
197
  ## Handoff Contract
237
198
 
238
199
  ### Consumes
@@ -252,11 +213,6 @@ schema_version: 2
252
213
  }
253
214
  ```
254
215
 
255
- skill_version: 7.5.0
256
- runtime_version: 1
257
- schema_version: 2
258
- ---
259
-
260
216
  ## Exit Codes
261
217
 
262
218
  | Code | Meaning | When |
@@ -47,6 +47,8 @@ knowledge_scope:
47
47
  - migrations
48
48
  references:
49
49
  - architecture
50
+ - security
51
+ - anti-patterns
50
52
 
51
53
  # ── V8: Verification ───────────────────────────────────────
52
54
  verification:
@@ -73,14 +75,14 @@ token_budget:
73
75
  max_files_read: 4
74
76
  max_lines_per_read: 100
75
77
  max_shell_commands: 1
76
- stop_early: false
78
+ stop_early: true
77
79
 
78
80
  exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
79
81
  ---
80
82
 
81
83
  # qk-data-lifecycle — Database Schema & Repository Manager
82
84
 
83
- > **Language rule:** Code, identifiers, file names ? English. Explanations, summaries ? Vietnamese.
85
+ > **Language rule:** Code, identifiers, file names English. Explanations, summaries Vietnamese.
84
86
 
85
87
  ---
86
88
 
@@ -134,6 +136,9 @@ drop_column:
134
136
 
135
137
  rename_table:
136
138
  strategy: create new table → migrate → drop old (never ALTER TABLE RENAME in prod)
139
+
140
+ pii_data:
141
+ strategy: Khi add column chứa PII (Personal Identifiable Information), BẮT BUỘC áp dụng cơ chế hashing/encryption tương ứng (tuân thủ R-SEC-04).
137
142
  ```
138
143
 
139
144
  ---
@@ -47,6 +47,7 @@ knowledge_scope:
47
47
  - query-optimization
48
48
  references:
49
49
  - architecture
50
+ - anti-patterns
50
51
 
51
52
  # ── V8: Verification ───────────────────────────────────────
52
53
  verification:
@@ -80,7 +81,7 @@ exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
80
81
 
81
82
  # qk-db-optimizer — Database Performance Tuner
82
83
 
83
- > **Language rule:** Code, identifiers, file names ? English. Explanations, summaries ? Vietnamese.
84
+ > **Language rule:** Code, identifiers, file names English. Explanations, summaries Vietnamese.
84
85
 
85
86
  ---
86
87
 
@@ -112,7 +113,7 @@ On missing precondition:
112
113
  | P | Issue Type | Action | Skip Threshold |
113
114
  |---|-----------|--------|----------------|
114
115
  | P1 | Sequential scan on large table (> 10k rows) | Add composite index | Never |
115
- | P2 | N+1 query pattern | Eager load / DataLoader | Budget < 30% |
116
+ | P2 | N+1 query pattern | Eager load / DataLoader (Ưu tiên theo chuẩn dự án, không tự chế query lồng) | Budget < 30% |
116
117
  | P3 | Missing JOIN (multiple queries for related data) | Rewrite with JOIN | Budget < 50% |
117
118
  | P4 | SELECT * (over-fetching) | Select specific columns | Budget < 60% |
118
119