ai-developer-skill-os 9.1.1 → 9.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 (63) hide show
  1. package/.agents/AGENTS.md +139 -42
  2. package/.agents/DEV_PROFILE.md +95 -0
  3. package/.agents/registry/capability-graph.yml +171 -334
  4. package/.agents/registry/graph.json +52 -18
  5. package/.agents/registry/index.yaml +66 -12
  6. package/.agents/registry/skills-index.yml +204 -447
  7. package/.agents/rules/coding.md +23 -0
  8. package/.agents/rules/global.md +44 -30
  9. package/.agents/skills/_template/SKILL.md +2 -300
  10. package/.agents/skills/qk-access-policy/SKILL.md +98 -393
  11. package/.agents/skills/qk-agent-observability/SKILL.md +3 -359
  12. package/.agents/skills/qk-ai-builder/SKILL.md +132 -485
  13. package/.agents/skills/qk-api-consumer/SKILL.md +256 -0
  14. package/.agents/skills/qk-api-consumer/capability.yaml +21 -0
  15. package/.agents/skills/qk-api-consumer/evals/scorecard.yaml +29 -0
  16. package/.agents/skills/qk-api-lifecycle/SKILL.md +133 -376
  17. package/.agents/skills/qk-bug-resolution/SKILL.md +128 -481
  18. package/.agents/skills/qk-code-review/SKILL.md +142 -340
  19. package/.agents/skills/qk-context-loader/SKILL.md +99 -391
  20. package/.agents/skills/qk-data-engineer/SKILL.md +253 -0
  21. package/.agents/skills/qk-data-lifecycle/SKILL.md +89 -408
  22. package/.agents/skills/qk-db-optimizer/SKILL.md +102 -408
  23. package/.agents/skills/qk-design-system-engineering/SKILL.md +76 -381
  24. package/.agents/skills/qk-devops-platform/SKILL.md +77 -383
  25. package/.agents/skills/qk-docs/SKILL.md +88 -414
  26. package/.agents/skills/qk-engineering-standard/SKILL.md +4 -508
  27. package/.agents/skills/qk-fe-api-integration/SKILL.md +343 -263
  28. package/.agents/skills/qk-fe-api-integration/evals/scorecard.yaml +29 -29
  29. package/.agents/skills/qk-feature-delivery/SKILL.md +137 -365
  30. package/.agents/skills/qk-feature-delivery/evals/scorecard.yaml +1 -1
  31. package/.agents/skills/qk-frontend-architecture/SKILL.md +5 -399
  32. package/.agents/skills/qk-help/evals/scorecard.yaml +13 -13
  33. package/.agents/skills/qk-orchestrator/SKILL.md +63 -422
  34. package/.agents/skills/qk-orchestrator/references/routing-table.md +10 -14
  35. package/.agents/skills/qk-product-specification/SKILL.md +70 -399
  36. package/.agents/skills/qk-production-release/SKILL.md +80 -457
  37. package/.agents/skills/qk-project-audit/SKILL.md +174 -0
  38. package/.agents/skills/qk-project-bootstrap/SKILL.md +244 -392
  39. package/.agents/skills/qk-project-health/SKILL.md +97 -416
  40. package/.agents/skills/qk-project-memory/SKILL.md +76 -21
  41. package/.agents/skills/qk-refactor/SKILL.md +167 -304
  42. package/.agents/skills/qk-security-audit/SKILL.md +141 -383
  43. package/.agents/skills/qk-security-audit/capability.yaml +1 -2
  44. package/.agents/skills/qk-system-evolution/SKILL.md +343 -263
  45. package/.agents/skills/qk-system-evolution/evals/scorecard.yaml +26 -26
  46. package/.agents/skills/qk-test-engineering/SKILL.md +119 -429
  47. package/.agents/skills/qk-ui-audit/SKILL.md +73 -457
  48. package/.agents/skills/qk-ui-builder/SKILL.md +521 -482
  49. package/.agents/skills/qk-ui-system-builder/SKILL.md +68 -434
  50. package/.agents/skills/qk-upgrade/SKILL.md +301 -0
  51. package/.agents/skills/qk-upgrade/capability.yaml +24 -0
  52. package/.agents/skills/qk-upgrade/evals/scorecard.yaml +26 -0
  53. package/.agents/skills/qk-validation-gate/SKILL.md +4 -523
  54. package/.agents/skills/qk-web-quality-gate/SKILL.md +85 -383
  55. package/.agents/workflows/bug-resolution.yml +6 -6
  56. package/.agents/workflows/context-discovery.yml +94 -0
  57. package/.agents/workflows/feature-delivery.yml +8 -4
  58. package/.agents/workflows/refactor.yml +6 -3
  59. package/.agents/workflows/shared/quality-gate.yml +94 -0
  60. package/.agents/workflows/skin-governance.yml +115 -0
  61. package/README.md +152 -67
  62. package/package.json +2 -2
  63. package/tooling/build-registry.js +30 -8
@@ -1,9 +1,9 @@
1
- ---
1
+ ---
2
2
  # ── Identity ───────────────────────────────────────────────
3
3
  name: qk-orchestrator
4
- version: 9.1.0
4
+ version: 9.2.0
5
5
  status: stable
6
- description: "Điều hướng yêu cầu của người dùng đến đúng skill với kỷ luật thép — kiểm tra preconditions và routing table."
6
+ description: "Điều hướng yêu cầu của người dùng đến đúng skill với kỷ luật thép — phân tích intent, kiểm tra preconditions và routing table. Dùng skill này khi user nhắc đến: help, list skills, có những skill nào, chọn skill nào, dùng skill gì, route task, hỗ trợ điều hướng — kể cả khi yêu cầu mơ hồ không rõ nên làm gì."
7
7
  platforms: [antigravity, claude-code, cursor, windsurf, kilo-code]
8
8
 
9
9
  # ── V9: Classification ─────────────────────────────────────
@@ -22,15 +22,15 @@ complexity:
22
22
  has_external_dependency: false
23
23
  has_breaking_change: false
24
24
 
25
- triggers:
26
- - "which skill"
27
- - "what should i use"
28
- - "route this"
29
- - "help me choose"
30
- - "what skill for"
31
- - "help"
32
- - "list skills"
33
- - "what can you do"
25
+ triggers:
26
+ - "help"
27
+ - "list skills"
28
+ - " những skill nào"
29
+ - "chọn skill nào"
30
+ - "dùng skill "
31
+ - "route task"
32
+ - "hỗ trợ điều hướng"
33
+
34
34
 
35
35
  selection:
36
36
  priority: high
@@ -75,444 +75,85 @@ produces: [plan]
75
75
  consumes: [user-request]
76
76
 
77
77
  token_budget:
78
- max_files_read: 1
79
- max_lines_per_read: 50
78
+ max_files_read: 2
79
+ max_lines_per_read: 100
80
80
  max_shell_commands: 0
81
81
  stop_early: true
82
82
 
83
- exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
83
+ exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
84
84
  ---
85
85
 
86
- # qk-orchestrator — Request Routing
86
+ # qk-orchestrator — Request Routing & Skill Dispatcher
87
87
 
88
88
  > **Language rule:** Code, identifiers, file names → English. Explanations, summaries → Vietnamese.
89
89
 
90
- ## Memory Workflow
91
-
92
- ### 0. Self-Init Protocol (Khởi Tạo Bộ Nhớ Local & Gitignore)
93
- - Trước khi tra cứu hoặc lưu trữ tri thức, BẮT BUỘC kiểm tra sự tồn tại của thư mục `.ai-local/` tại gốc dự án:
94
- - **Tự động tạo mới:** Nếu `.ai-local/` chưa tồn tại, AI phải tự động tạo cấu trúc thư mục `.ai-local/knowledge/` (và file `index.yaml` nếu cần thiết) cùng `.ai-local/candidates/`. Tuyệt đối không ngưng chạy hay hỏi ý kiến người dùng về thao tác khởi tạo tiêu chuẩn này.
95
- - **Bảo mật Gitignore:** BẮT BUỘC kiểm tra file `.gitignore` của dự án, nếu chưa có dòng `.ai-local/` thì phải tự động thêm vào để tuyệt đối bảo mật tri thức cá nhân và tránh lộ lọt lên Git.
96
-
97
- ---
98
-
99
- ### Pre-flight Retrieve (Trước khi thực thi)
100
- - Trước các task có tính lặp lại, debug, refactor, kiến trúc hoặc rủi ro cao:
101
- bắt buộc tra cứu:
102
- - `.ai-local/knowledge/index.yaml` (Private Local Knowledge)
103
-
104
- - Ưu tiên sử dụng các Knowledge đang có trạng thái `Active` thuộc:
105
- - Architecture
106
- - Hard Bug
107
- - Convention
108
- - Pattern
109
- - Tech Debt Pattern
110
- - 👉 *Domain Focus:* Architecture / Convention (vd: bảng điều hướng kỹ năng, ràng buộc ranh giới rõ ràng).
111
-
112
- - Memory chỉ đóng vai trò **Navigator (bản đồ chỉ đường)**.
113
- Không được xem Memory là Source of Truth.
114
- Luôn xác minh lại bằng source code, configuration và trạng thái hiện tại của dự án trước khi áp dụng.
115
-
116
- ---
117
-
118
- ### Learning Flow (AI tự học có kiểm soát)
119
- - Trong quá trình làm việc, AI được phép tự phát hiện và tạo **Candidate Memory** khi nhận thấy:
120
- - Hard Bug có khả năng tái diễn.
121
- - Pattern làm việc lặp lại trong dự án.
122
- - Convention hoặc quy tắc kiến trúc mới.
123
- - Quyết định Architecture quan trọng.
124
- - Tech Debt Pattern hoặc Code Smell có tính hệ thống.
125
- - 👉 *Domain Harvest:* Quy luật phân phối routing hiệu quả mới.
126
-
127
- - Candidate Memory chỉ là bản nháp quan sát, chưa phải tri thức chính thức.
128
- - Candidate Memory có thể lưu tạm tại: `.ai-local/candidates/`
129
- - AI không được tự động Promote Candidate Memory thành Project Knowledge.
130
-
131
- ---
132
-
133
- ### Post-flight Harvest (Đề xuất → Phê duyệt)
134
- Sau khi hoàn thành task:
135
- - AI đánh giá các Candidate Memory đã tạo.
136
- - Nếu phát hiện tri thức có giá trị tái sử dụng:
137
- - Đề xuất người dùng xem xét.
138
- - Gửi yêu cầu phê duyệt thông qua:
139
- - `/learn`
140
- - `qk-project-memory`
141
- - Chỉ sau khi được phê duyệt, Candidate Memory mới được chuyển thành Knowledge chính thức:
142
-
143
- ```
144
- .ai-local/candidates/ ──(Approve)──> .ai-local/knowledge/index.yaml
145
- ```
146
-
147
- - Project Knowledge phải được xem như tài sản kỹ thuật của dự án:
148
- - Có thể review, cập nhật, loại bỏ và có lịch sử thay đổi.
149
-
150
- ---
151
-
152
- ### Ignore (Không đưa vào Memory)
153
- Không lưu:
154
- - Trace log của một session đơn lẻ.
155
- - Temporary debugging data.
156
- - Output của một lần chạy test/scan.
157
- - Report health tạm thời của một đợt kiểm tra.
158
- - Lỗi nhỏ chỉ xảy ra một lần.
159
- - Thông tin không có khả năng tái sử dụng.
160
- - 👉 *Domain Ignore:* Trình tự gọi lệnh tạm thời của một prompt user.
161
-
162
- ---
163
-
164
- ### Golden Rule
165
- > **AI được phép học, nhưng không được tự quyết định tri thức chính thức.**
166
- > **AI quan sát → Đề xuất → Con người phê duyệt → Dự án tiến hóa.**
167
-
168
- ---
169
-
170
-
171
-
172
- ### Pre-flight Retrieve (Trước khi thực thi)
173
- - Trước các task có tính lặp lại, debug, refactor, kiến trúc hoặc rủi ro cao:
174
- bắt buộc tra cứu:
175
- - `.agents/knowledge/index.yaml` (Shared Project Knowledge)
176
- - `.ai-local/knowledge/index.yaml` (Private Local Knowledge)
177
-
178
- - Ưu tiên sử dụng các Knowledge đang có trạng thái `Active` thuộc:
179
- - Architecture
180
- - Hard Bug
181
- - Convention
182
- - Pattern
183
- - Tech Debt Pattern
184
- - 👉 *Domain Focus:* Architecture / Convention (vd: bảng điều hướng kỹ năng, ràng buộc ranh giới rõ ràng).
185
-
186
- - Memory chỉ đóng vai trò **Navigator (bản đồ chỉ đường)**.
187
- Không được xem Memory là Source of Truth.
188
- Luôn xác minh lại bằng source code, configuration và trạng thái hiện tại của dự án trước khi áp dụng.
189
-
190
- ---
191
-
192
- ### Learning Flow (AI tự học có kiểm soát)
193
- - Trong quá trình làm việc, AI được phép tự phát hiện và tạo **Candidate Memory** khi nhận thấy:
194
- - Hard Bug có khả năng tái diễn.
195
- - Pattern làm việc lặp lại trong dự án.
196
- - Convention hoặc quy tắc kiến trúc mới.
197
- - Quyết định Architecture quan trọng.
198
- - Tech Debt Pattern hoặc Code Smell có tính hệ thống.
199
- - 👉 *Domain Harvest:* Quy luật phân phối routing hiệu quả mới.
200
-
201
- - Candidate Memory chỉ là bản nháp quan sát, chưa phải tri thức chính thức.
202
- - Candidate Memory có thể lưu tạm tại: `.ai-local/candidates/`
203
- - AI không được tự động Promote Candidate Memory thành Project Knowledge.
204
-
205
- ---
206
-
207
- ### Post-flight Harvest (Đề xuất → Phê duyệt)
208
- Sau khi hoàn thành task:
209
- - AI đánh giá các Candidate Memory đã tạo.
210
- - Nếu phát hiện tri thức có giá trị tái sử dụng:
211
- - Đề xuất người dùng xem xét.
212
- - Gửi yêu cầu phê duyệt thông qua:
213
- - `/learn`
214
- - `qk-project-memory`
215
- - Chỉ sau khi được phê duyệt, Candidate Memory mới được chuyển thành Knowledge chính thức:
216
-
217
- ```
218
- .ai-local/candidates/ ──(Approve)──> .agents/knowledge/index.yaml
219
- ```
220
-
221
- - Project Knowledge phải được xem như tài sản kỹ thuật của dự án:
222
- - Có thể review, cập nhật, loại bỏ và có lịch sử thay đổi.
223
-
224
- ---
225
-
226
- ### Ignore (Không đưa vào Memory)
227
- Không lưu:
228
- - Trace log của một session đơn lẻ.
229
- - Temporary debugging data.
230
- - Output của một lần chạy test/scan.
231
- - Report health tạm thời của một đợt kiểm tra.
232
- - Lỗi nhỏ chỉ xảy ra một lần.
233
- - Thông tin không có khả năng tái sử dụng.
234
- - 👉 *Domain Ignore:* Trình tự gọi lệnh tạm thời của một prompt user.
235
-
236
- ---
237
-
238
- ### Golden Rule
239
- > **AI được phép học, nhưng không được tự quyết định tri thức chính thức.**
240
- > **AI quan sát → Đề xuất → Con người phê duyệt → Dự án tiến hóa.**
241
-
242
- ---
243
- ---
244
-
245
- ### Learning Flow (AI tự học có kiểm soát)
246
- - Trong quá trình làm việc, AI được phép tự phát hiện và tạo **Candidate Memory** khi nhận thấy:
247
- - Hard Bug có khả năng tái diễn.
248
- - Pattern làm việc lặp lại trong dự án.
249
- - Convention hoặc quy tắc kiến trúc mới.
250
- - Quyết định Architecture quan trọng.
251
- - Tech Debt Pattern hoặc Code Smell có tính hệ thống.
252
- - 👉 *Domain Harvest:* Quy luật phân phối routing hiệu quả mới.
253
-
254
- - Candidate Memory chỉ là bản nháp quan sát, chưa phải tri thức chính thức.
255
- - Candidate Memory có thể lưu tạm tại: `.ai-local/candidates/`
256
- - AI không được tự động Promote Candidate Memory thành Project Knowledge.
257
-
258
- ---
259
-
260
- ### Post-flight Harvest (Đề xuất → Phê duyệt)
261
- Sau khi hoàn thành task:
262
- - AI đánh giá các Candidate Memory đã tạo.
263
- - Nếu phát hiện tri thức có giá trị tái sử dụng:
264
- - Đề xuất người dùng xem xét.
265
- - Gửi yêu cầu phê duyệt thông qua:
266
- - `/learn`
267
- - `qk-project-memory`
268
- - Chỉ sau khi được phê duyệt, Candidate Memory mới được chuyển thành Knowledge chính thức:
269
-
270
- ```
271
- .ai-local/candidates/ ──(Approve)──> .agents/knowledge/index.yaml
272
- ```
273
-
274
- - Project Knowledge phải được xem như tài sản kỹ thuật của dự án:
275
- - Có thể review, cập nhật, loại bỏ và có lịch sử thay đổi.
276
-
277
- ---
278
-
279
- ### Ignore (Không đưa vào Memory)
280
- Không lưu:
281
- - Trace log của một session đơn lẻ.
282
- - Temporary debugging data.
283
- - Output của một lần chạy test/scan.
284
- - Report health tạm thời của một đợt kiểm tra.
285
- - Lỗi nhỏ chỉ xảy ra một lần.
286
- - Thông tin không có khả năng tái sử dụng.
287
- - 👉 *Domain Ignore:* Trình tự gọi lệnh tạm thời của một prompt user.
288
-
289
- ---
290
-
291
- ### Golden Rule
292
- > **AI được phép học, nhưng không được tự quyết định tri thức chính thức.**
293
- > **AI quan sát → Đề xuất → Con người phê duyệt → Dự án tiến hóa.**
294
-
295
- ---
296
- ---
297
-
298
- ### Learning Flow (AI tự học có kiểm soát)
299
- - Trong quá trình làm việc, AI được phép tự phát hiện và tạo **Candidate Memory** khi nhận thấy:
300
- - Hard Bug có khả năng tái diễn.
301
- - Pattern làm việc lặp lại trong dự án.
302
- - Convention hoặc quy tắc kiến trúc mới.
303
- - Quyết định Architecture quan trọng.
304
- - Tech Debt Pattern hoặc Code Smell có tính hệ thống.
305
- - 👉 *Domain Harvest:* Quy luật phân phối routing hiệu quả mới.
306
-
307
- - Candidate Memory chỉ là bản nháp quan sát, chưa phải tri thức chính thức.
308
- - Candidate Memory có thể lưu tạm tại: `.ai-local/candidates/`
309
- - AI không được tự động Promote Candidate Memory thành Project Knowledge.
310
-
311
- ---
312
-
313
- ### Post-flight Harvest (Đề xuất → Phê duyệt)
314
- Sau khi hoàn thành task:
315
- - AI đánh giá các Candidate Memory đã tạo.
316
- - Nếu phát hiện tri thức có giá trị tái sử dụng:
317
- - Đề xuất người dùng xem xét.
318
- - Gửi yêu cầu phê duyệt thông qua:
319
- - `/learn`
320
- - `qk-project-memory`
321
- - Chỉ sau khi được phê duyệt, Candidate Memory mới được chuyển thành Knowledge chính thức:
322
-
323
- ```
324
- .ai-local/candidates/ ──(Approve)──> .agents/knowledge/index.yaml
325
- ```
326
-
327
- - Project Knowledge phải được xem như tài sản kỹ thuật của dự án:
328
- - Có thể review, cập nhật, loại bỏ và có lịch sử thay đổi.
329
-
330
- ---
331
-
332
- ### Ignore (Không đưa vào Memory)
333
- Không lưu:
334
- - Trace log của một session đơn lẻ.
335
- - Temporary debugging data.
336
- - Output của một lần chạy test/scan.
337
- - Report health tạm thời của một đợt kiểm tra.
338
- - Lỗi nhỏ chỉ xảy ra một lần.
339
- - Thông tin không có khả năng tái sử dụng.
340
- - 👉 *Domain Ignore:* Trình tự gọi lệnh tạm thời của một prompt user.
341
-
342
- ---
343
-
344
- ### Golden Rule
345
- > **AI được phép học, nhưng không được tự quyết định tri thức chính thức.**
346
- > **AI quan sát → Đề xuất → Con người phê duyệt → Dự án tiến hóa.**
347
-
348
- ---
349
- ---
350
- ---
351
- ---
352
-
353
- ## Preconditions
354
- - [ ] User request is provided (any language)
355
-
356
- ```
357
- On missing precondition:
358
- EXIT: BLOCKED
359
- Message: "Vui lòng mô tả yêu cầu của bạn."
360
- ```
361
-
362
- ## Scope
363
- - ✅ Analyze user intent and route to the correct skill
364
- - ✅ Verify preconditions of target skill BEFORE delegating
365
- - ✅ Enforce sequential pipeline when skills depend on each other
366
-
367
- ## Non-Goals
368
- - ❌ Write code directly — delegate to specialist skills
369
- - ❌ Hallucinate non-existent skills
370
- - ❌ Allow UI work without `DESIGN.md` verified
371
- - ❌ Allow logic work without context graph from `qk-context-loader`
90
+ Chịu trách nhiệm phân tích ý định (Intent) của người dùng, đối chiếu với bối cảnh dự án (`DEV_PROFILE.md`) và bảng điều hướng trung tâm (`AGENTS.md`) để chọn đúng skill kỹ thuật phù hợp nhất.
372
91
 
373
- ## Priority Order
374
-
375
- | Priority | Check | Skip Threshold |
376
- |----------|-------|----------------|
377
- | P1 | Match intent to routing table | Never |
378
- | P2 | Verify target skill preconditions | Never |
379
- | P3 | Check pipeline dependencies (e.g., context-loader first) | Never for logic tasks |
380
- | P4 | Estimate cost/latency for user info | Budget < 70% |
92
+ ---
381
93
 
382
- ## Workflow
94
+ ## Preconditions
383
95
 
384
- ### Phase 1 Intent Classification
96
+ Trước khi đề xuất hoặc kích hoạt skill, AI BẮT BUỘC kiểm tra:
385
97
 
386
- **Steps:**
387
- 1. Parse user request extract intent keywords
388
- 2. Match against routing table (see `references/routing-table.md`)
389
- 3. Resolve to primary skill + pipeline order
98
+ - [ ] Đọc `.agents/DEV_PROFILE.md` nếu có để xác định vai trò (`role`) và `stack`.
99
+ - [ ] Phân tích từ khóa và hành động mong muốn từ câu lệnh của người dùng.
100
+ - [ ] Kiểm tra xem yêu cầu là đơn nhiệm (Single task) hay đa nhiệm phức tạp (Compound task).
101
+ - [ ] Nếu yêu cầu hoàn toàn mơ hồ, không có manh mối kỹ thuật:
102
+ → **EXIT: PARTIAL**
103
+ → Đặt tối đa 2 câu hỏi trắc nghiệm ngắn để làm rõ mục tiêu.
390
104
 
391
- **Decision:**
392
- ```
393
- IF single clear match found
394
- → Confidence: HIGH → go to Phase 2
105
+ ---
395
106
 
396
- ELSE IF 2–3 possible matches
397
- → Pick highest-priority match
398
- → Confidence: MEDIUM → go to Phase 2, note ambiguity
107
+ ## Scope
399
108
 
400
- ELSE IF no match
401
- EXIT: BLOCKED ask clarifying question
402
- ```
109
+ Skill này làm:
110
+ - Phân loại intent của user vào 1 trong 29 active skills của hệ thống.
111
+ - Cung cấp cú pháp kích hoạt skill chính xác (`./qk-<skill-name>`).
112
+ - Lập lộ trình chuỗi kỹ năng (Skill Pipeline) cho các tác vụ lớn gồm nhiều bước.
113
+ - Trả về danh mục tra cứu nhanh các kỹ năng khả dụng trong hệ thống.
403
114
 
404
- **Exit When:**
405
- - Skill identified go to Phase 2
406
- - No matching skill EXIT: BLOCKED
115
+ Skill này KHÔNG làm:
116
+ - Trực tiếp sửa code, chạy lệnh phá hủy hoặc can thiệp file hệ thống.
117
+ - Thay thế các kỹ năng chuyên biệt khi user đã chỉ định rõ ràng mục tiêu.
407
118
 
408
- ### Phase 2 — Precondition Check
119
+ ---
409
120
 
410
- **Steps:**
411
- 1. Read target skill's `Preconditions` section
412
- 2. Verify each precondition against current context
121
+ ## Execution Steps
413
122
 
414
- **Decision:**
123
+ ### Step 1 — Intent Extraction & Context Alignment
415
124
  ```
416
- IF all preconditions met
417
- → go to Phase 3
418
-
419
- ELSE IF missing precondition is resolvable
420
- Resolve it first (e.g., run qk-context-loader, find DESIGN.md)
421
- → Then go to Phase 3
422
-
423
- ELSE
424
- → EXIT: BLOCKED
125
+ Inputs: Prompt từ user, DEV_PROFILE.md (role, stack)
126
+ Actions:
127
+ - Nhận diện động từ hành động chính (tạo mới, sửa lỗi, tối ưu, đo lường, review, tài liệu).
128
+ - Đối chiếu với Role Behavior Matrix trong AGENTS.md để áp dụng góc nhìn phù hợp.
129
+ Output: Primary Intent & Constraints
425
130
  ```
426
131
 
427
- ### Phase 3Pipeline Enforcement
428
-
429
- **Steps:**
430
- 1. Check if target skill `consumes` output from another skill
431
- 2. If yes → ensure that upstream skill has run first
432
- 3. Delegate to target skill with full context
433
-
434
- **Pipeline Rules:**
132
+ ### Step 2Quick Table Matching & Disambiguation
435
133
  ```
436
- UI tasks:
437
- [DESIGN.md check] → [qk-ui-audit (optional)] → [qk-ui-builder | qk-feature-delivery]
438
-
439
- Logic tasks:
440
- [qk-context-loader] [qk-feature-delivery | qk-bug-resolution | qk-api-lifecycle]
441
-
442
- Data tasks:
443
- [qk-context-loader] → [qk-data-lifecycle | qk-db-optimizer]
444
-
445
- Release tasks:
446
- [qk-validation-gate] → [qk-production-release]
134
+ Inputs: Primary Intent, AGENTS.md Routing Table
135
+ Actions:
136
+ - Tra cứu từ khóa đối khớp trong Quick Table.
137
+ - Xử lý xung đột nếu có 2 skill liên quan (ví dụ: qk-refactor vs qk-feature-delivery; qk-ui-builder vs qk-ui-audit).
138
+ - Chọn skill độ đặc hiệu (specificity) cao nhất.
139
+ Output: Target Skill Recommendation
447
140
  ```
448
141
 
449
- ## Routing Table (Quick Reference)
450
- Single source of truth: `references/routing-table.md` — do not duplicate here. Read that file before routing.
451
-
452
- ## Confidence Model
453
-
454
- | Level | Condition | Action |
455
- |-------|-----------|--------|
456
- | HIGH | Single clear keyword match | Route directly |
457
- | MEDIUM | Multiple possible skills | Route to most likely, note ambiguity |
458
- | LOW | Request is too vague | Ask clarifying question |
459
-
460
- ## Escalation Rules
461
-
462
- ```
463
- BLOCKED: Cannot determine correct skill
464
- Missing:
465
- - More specific description of the task
466
- Questions:
467
- 1. Bạn muốn làm gì? (fix bug / thêm tính năng / tối ưu / deploy)
468
- 2. File hoặc module nào bị ảnh hưởng?
469
- Recommended Assumptions: none — routing requires clear intent
142
+ ### Step 3 Plan & Dispatch
470
143
  ```
471
-
472
- ## Handoff Contract
473
-
474
- ### Consumes
475
- ```json
476
- {
477
- "from": "user",
478
- "required_fields": ["request_text"],
479
- "optional_fields": ["affected_file", "context"]
480
- }
144
+ Inputs: Target Skill Recommendation
145
+ Actions:
146
+ - Nếu là tác vụ đơn: Hướng dẫn người dùng hoặc tự động kích hoạt skill qua cú pháp `./qk-<name>`.
147
+ - Nếu là tác vụ đa bước: Lập danh sách thứ tự thực hiện (Pipeline), ví dụ: qk-context-loader → qk-feature-delivery → qk-test-engineering.
148
+ Exit: SUCCESS
481
149
  ```
482
150
 
483
- ### Produces
484
- ```json
485
- {
486
- "to": "[target-skill]",
487
- "output_fields": ["routed_skill", "pipeline_order", "preconditions_verified", "exit_code"]
488
- }
489
- ```
151
+ ---
490
152
 
491
- ## Output Format
153
+ ## Prompt Template
492
154
 
493
155
  ```
494
- 🧭 Orchestrator Routing
495
- ─────────────────────────────────────────────────
496
- Intent: [Classified intent]
497
- Skill: [qk-skill-name]
498
- Pipeline: [skill-a → skill-b → skill-c]
499
- Confidence: [HIGH | MEDIUM | LOW]
500
-
501
- Preconditions:
502
- ✅ [Condition met]
503
- ✅ [Condition met]
504
-
505
- Exit Code: SUCCESS
506
- ```
507
-
508
- ## Exit Codes
509
-
510
- | Code | Meaning | When |
511
- |------|---------|------|
512
- | SUCCESS | Skill routed, preconditions verified, delegation in progress | Normal flow |
513
- | PARTIAL | Routed with MEDIUM confidence — ambiguity noted | Multi-match situation |
514
- | BLOCKED | Cannot classify intent or precondition missing | Vague request or missing DESIGN.md |
515
- | FAILED | No skill matches and cannot escalate | Unknown domain request |
516
-
517
- ---
518
-
156
+ Yêu cầu: [Mô tả nhu cầu cần làm của bạn — ví dụ: "tôi muốn tối ưu trang danh sách sản phẩm"]
157
+ Bối cảnh: [Đang gặp khó khăn gì / file nào liên quan]
158
+ Mong muốn: [Cần gợi ý skill đơn lẻ hay một quy trình nhiều bước]
159
+ ```
@@ -13,11 +13,10 @@
13
13
  | tính năng, feature, thêm, mới, add, implement, xây dựng | `qk-feature-delivery` | `qk-context-loader` first |
14
14
  | UI, giao diện, design, component, layout, màn hình, hiển thị | `qk-ui-builder` | DESIGN.md check |
15
15
  | slow, chậm, query, index, N+1, performance DB, tối ưu DB | `qk-db-optimizer` | `qk-context-loader` first |
16
- | deploy, release, production, CI/CD, build, xuất bản | `qk-production-release` | `qk-validation-gate` first |
16
+ | deploy, release, production, CI/CD, build, xuất bản | `qk-production-release` | verify step first |
17
17
  | schema, migration, database, table, model, ORM | `qk-data-lifecycle` | `qk-context-loader` first |
18
- | refactor, clean, SOLID, DRY, code quality, tái cấu trúc | `qk-engineering-standard` | direct |
19
- | test, lint, validate, check quality, kiểm tra | `qk-validation-gate` | direct |
20
- | upgrade, update thư viện, migrate library, nâng version | `qk-system-evolution` | direct |
18
+ | refactor, clean code, tách file, reduce complexity, tái cấu trúc | `qk-refactor` | direct |
19
+ | upgrade, update thư viện, migrate library, nâng version | `qk-upgrade` | direct |
21
20
  | docs, documentation, README, comment, tài liệu | `qk-docs` | direct |
22
21
  | API, endpoint, route, contract, swagger | `qk-api-lifecycle` | `qk-context-loader` first |
23
22
  | access, role, permission, RBAC, phân quyền | `qk-access-policy` | direct |
@@ -25,22 +24,19 @@
25
24
  | design system, token, CSS variable, design tokens | `qk-ui-system-builder` | DESIGN.md check |
26
25
  | project audit, health, tech debt, kiểm toán dự án | `qk-project-health` | direct |
27
26
  | new project, bootstrap, init, khởi tạo dự án | `qk-project-bootstrap` | direct |
28
- | consume API, tích hợp API backend, gọi API từ FE | `qk-fe-api-integration` | `qk-context-loader` first |
27
+ | consume API, tích hợp API backend, gọi API từ FE | `qk-api-consumer` | `qk-context-loader` first |
29
28
  | UI audit, kiểm tra giao diện, anti-slop check | `qk-ui-audit` | DESIGN.md check |
30
- | metrics, telemetry, trace, agent observability, mô hình lỗi | `qk-agent-observability` | direct |
31
29
  | review code, kiểm toán, code review, PR | `qk-code-review` | direct |
32
30
  | graph, dependency, context, đọc hiểu architecture | `qk-context-loader` | direct |
33
31
  | design system rules, tokens structure, governance | `qk-design-system-engineering` | direct |
34
32
  | CI/CD, devops, pipeline, infrastructure, deployment strategy | `qk-devops-platform` | direct |
35
- | frontend architecture, file placement, routing strategy | `qk-frontend-architecture` | direct |
36
- | help, list skills, danh sách, trợ giúp | `qk-help` | direct |
33
+ | help, list skills, danh sách, trợ giúp | `qk-orchestrator` | direct |
37
34
  | orchestrate, định tuyến, phân loại yêu cầu | `qk-orchestrator` | direct |
38
35
  | product spec, requirement, tiêu chí chấp nhận | `qk-product-specification` | direct |
39
36
  | security, vulnerability scan, secret, OWASP | `qk-security-audit` | direct |
40
37
  | test strategy, mock, coverage, e2e, unit test | `qk-test-engineering` | direct |
41
38
  | web performance, accessibility, SEO, lighthouse | `qk-web-quality-gate` | direct |
42
39
  | memory, context, recall, lưu ngữ cảnh | `qk-project-memory` | direct |
43
- | security, policy, authorization, bảo mật | `qk-access-policy` | direct |
44
40
 
45
41
  ---
46
42
 
@@ -51,14 +47,14 @@
51
47
  1. Check DESIGN.md exists (qk-project-bootstrap if missing)
52
48
  2. [Optional] qk-ui-audit — audit existing UI
53
49
  3. qk-ui-builder OR qk-feature-delivery (UI part)
54
- 4. qk-validation-gate — lint + type check
50
+ 4. Verification step (quality gate — lint + type check)
55
51
  ```
56
52
 
57
53
  ### Logic/Feature Pipeline
58
54
  ```
59
55
  1. qk-context-loader — build dependency graph
60
56
  2. qk-feature-delivery — implement
61
- 3. qk-validation-gate — test + lint
57
+ 3. Verification step (quality gate — test + lint)
62
58
  4. [Optional] qk-production-release
63
59
  ```
64
60
 
@@ -66,12 +62,12 @@
66
62
  ```
67
63
  1. qk-context-loader — map schema dependencies
68
64
  2. qk-data-lifecycle (schema) OR qk-db-optimizer (performance)
69
- 3. qk-validation-gate — run migration tests
65
+ 3. Verification step (quality gate — run migration tests)
70
66
  ```
71
67
 
72
68
  ### Release Pipeline
73
69
  ```
74
- 1. qk-validation-gate — full test suite
70
+ 1. Verification step (quality gate — full test suite)
75
71
  2. qk-production-release — build + security gate
76
72
  ```
77
73
 
@@ -84,7 +80,7 @@ When 2+ skills match:
84
80
  | Situation | Resolution |
85
81
  |-----------|------------|
86
82
  | "fix" + UI component | `qk-bug-resolution` (fix takes priority over design) |
87
- | "refactor" + API | `qk-engineering-standard` if code quality focus, `qk-api-lifecycle` if contract change |
83
+ | "refactor" + API | `qk-refactor` if code quality focus, `qk-api-lifecycle` if contract change |
88
84
  | "add feature" + DB | Route `qk-feature-delivery` with `qk-data-lifecycle` in pipeline |
89
85
  | "optimize" without context | Ask: "DB performance or code quality?" |
90
86