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.
- package/.agents/LICENSE +21 -21
- package/.agents/README.md +90 -90
- package/.agents/docs/CHI_TIET_SKILLS.md +125 -125
- package/.agents/docs/MIGRATION-CLEANUP-V8.1.3.md +36 -36
- package/.agents/docs/MIGRATION-STATUS.md +35 -35
- package/.agents/docs/MIGRATION-V8.md +10 -10
- package/.agents/docs/V8-CERTIFICATION.md +27 -27
- package/.agents/docs/decisions/ADR-001-v8-migration.md +58 -58
- package/.agents/docs/decisions/ADR-002-workflow-separation.md +50 -50
- package/.agents/docs/decisions/ADR-003-registry-generated.md +54 -54
- package/.agents/docs/decisions/ADR-008-skill-boundary-review.md +27 -27
- package/.agents/registry/graph.json +4 -8
- package/.agents/registry/index.yaml +3 -4
- package/.agents/registry/skills-index.yml +525 -525
- package/.agents/rules/coding.md +10 -0
- package/.agents/rules/command-safety.md +37 -14
- package/.agents/rules/priorities.yml +13 -2
- package/.agents/rules/security.md +47 -7
- package/.agents/rules/skill-quality.md +32 -8
- package/.agents/skills/_template/SKILL.md +133 -132
- package/.agents/skills/_template/capability.yaml +20 -20
- package/.agents/skills/_template/evals/scorecard.yaml +19 -19
- package/.agents/skills/qk-access-policy/SKILL.md +4 -1
- package/.agents/skills/qk-agent-observability/SKILL.md +111 -0
- package/.agents/skills/qk-agent-observability/references/scorecard.yaml +80 -0
- package/.agents/skills/qk-ai-builder/SKILL.md +74 -5
- package/.agents/skills/qk-api-lifecycle/SKILL.md +4 -2
- package/.agents/skills/qk-bug-resolution/SKILL.md +3 -21
- package/.agents/skills/qk-code-review/SKILL.md +188 -189
- package/.agents/skills/qk-context-loader/SKILL.md +3 -47
- package/.agents/skills/qk-data-lifecycle/SKILL.md +7 -2
- package/.agents/skills/qk-db-optimizer/SKILL.md +3 -2
- package/.agents/skills/qk-design-system-engineering/SKILL.md +235 -112
- package/.agents/skills/qk-devops-platform/SKILL.md +241 -117
- package/.agents/skills/qk-docs/SKILL.md +3 -1
- package/.agents/skills/qk-engineering-standard/SKILL.md +4 -75
- package/.agents/skills/qk-engineering-standard/references/anti-patterns.md +121 -0
- package/.agents/skills/qk-engineering-standard/rules/frontend.md +1 -1
- package/.agents/skills/qk-fe-api-integration/SKILL.md +13 -32
- package/.agents/skills/qk-feature-delivery/SKILL.md +54 -202
- package/.agents/skills/qk-frontend-architecture/SKILL.md +258 -134
- package/.agents/skills/qk-help/SKILL.md +21 -159
- package/.agents/skills/qk-orchestrator/SKILL.md +2 -78
- package/.agents/skills/qk-orchestrator/references/routing-table.md +15 -3
- package/.agents/skills/qk-product-specification/SKILL.md +253 -130
- package/.agents/skills/qk-production-release/SKILL.md +32 -67
- package/.agents/skills/qk-project-bootstrap/SKILL.md +59 -8
- package/.agents/skills/qk-project-health/SKILL.md +4 -2
- package/.agents/skills/qk-project-memory/SKILL.md +3 -1
- package/.agents/skills/qk-security-audit/SKILL.md +259 -135
- package/.agents/skills/qk-system-evolution/SKILL.md +18 -68
- package/.agents/skills/qk-test-engineering/SKILL.md +262 -139
- package/.agents/skills/qk-ui-audit/SKILL.md +16 -89
- package/.agents/skills/qk-ui-audit/references/anti-slop-checklist.md +2 -2
- package/.agents/skills/qk-ui-builder/SKILL.md +482 -509
- package/.agents/skills/qk-ui-builder/references/component-cookbook.md +455 -1191
- package/.agents/skills/qk-ui-system-builder/SKILL.md +1 -5
- package/.agents/skills/qk-validation-gate/SKILL.md +0 -74
- package/.agents/skills/qk-web-quality-gate/SKILL.md +232 -114
- package/.agents/workflows/_schema.yml +146 -109
- package/.agents/workflows/bug-resolution.yml +121 -101
- package/.agents/workflows/code-review.yml +93 -77
- package/.agents/workflows/documentation.yml +90 -75
- package/.agents/workflows/feature-delivery.yml +120 -103
- package/.agents/workflows/refactor.yml +99 -81
- package/.agents/workflows/research.yml +75 -60
- package/.agents/workflows/security-audit.yml +115 -72
- package/.agents/workflows/skill-evolution.yml +97 -65
- package/.agents/workflows/spec-driven-development.yml +87 -57
- package/CHANGELOG.md +10 -0
- package/README.md +90 -90
- package/bin/install.js +330 -180
- package/package.json +2 -2
- package/.agents/CHANGELOG.md +0 -131
- package/.agents/learnings/draft/README.md +0 -37
- package/.agents/reports/RELEASE-CHECKLIST.md +0 -29
- package/.agents/reports/architecture-audit.md +0 -13
- package/.agents/reports/graph-health.md +0 -20
- 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
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
- [ ]
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
- **Nếu review Code
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
-
|
|
148
|
-
-
|
|
149
|
-
-
|
|
150
|
-
-
|
|
151
|
-
-
|
|
152
|
-
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
-
|
|
178
|
-
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
- [ ]
|
|
187
|
-
|
|
188
|
-
|
|
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 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).
|
|
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** 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 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 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) 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 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 lý (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ỉ là 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.
|
|
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 và 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:
|
|
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
|
|
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
|
|
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
|
|