ai-developer-skill-os 9.1.2 → 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 +37 -19
  5. package/.agents/registry/index.yaml +59 -13
  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 -377
  10. package/.agents/skills/qk-access-policy/SKILL.md +98 -473
  11. package/.agents/skills/qk-agent-observability/SKILL.md +3 -439
  12. package/.agents/skills/qk-ai-builder/SKILL.md +132 -565
  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 -456
  17. package/.agents/skills/qk-bug-resolution/SKILL.md +128 -561
  18. package/.agents/skills/qk-code-review/SKILL.md +142 -420
  19. package/.agents/skills/qk-context-loader/SKILL.md +99 -471
  20. package/.agents/skills/qk-data-engineer/SKILL.md +119 -340
  21. package/.agents/skills/qk-data-lifecycle/SKILL.md +89 -488
  22. package/.agents/skills/qk-db-optimizer/SKILL.md +102 -488
  23. package/.agents/skills/qk-design-system-engineering/SKILL.md +76 -461
  24. package/.agents/skills/qk-devops-platform/SKILL.md +77 -463
  25. package/.agents/skills/qk-docs/SKILL.md +88 -494
  26. package/.agents/skills/qk-engineering-standard/SKILL.md +4 -588
  27. package/.agents/skills/qk-fe-api-integration/SKILL.md +343 -343
  28. package/.agents/skills/qk-fe-api-integration/evals/scorecard.yaml +29 -29
  29. package/.agents/skills/qk-feature-delivery/SKILL.md +137 -445
  30. package/.agents/skills/qk-feature-delivery/evals/scorecard.yaml +1 -1
  31. package/.agents/skills/qk-frontend-architecture/SKILL.md +5 -479
  32. package/.agents/skills/qk-help/evals/scorecard.yaml +13 -13
  33. package/.agents/skills/qk-orchestrator/SKILL.md +63 -502
  34. package/.agents/skills/qk-orchestrator/references/routing-table.md +10 -14
  35. package/.agents/skills/qk-product-specification/SKILL.md +70 -479
  36. package/.agents/skills/qk-production-release/SKILL.md +80 -537
  37. package/.agents/skills/qk-project-audit/SKILL.md +174 -0
  38. package/.agents/skills/qk-project-bootstrap/SKILL.md +243 -471
  39. package/.agents/skills/qk-project-health/SKILL.md +97 -496
  40. package/.agents/skills/qk-project-memory/SKILL.md +76 -21
  41. package/.agents/skills/qk-refactor/SKILL.md +167 -384
  42. package/.agents/skills/qk-security-audit/SKILL.md +141 -463
  43. package/.agents/skills/qk-security-audit/capability.yaml +1 -2
  44. package/.agents/skills/qk-system-evolution/SKILL.md +343 -343
  45. package/.agents/skills/qk-system-evolution/evals/scorecard.yaml +26 -26
  46. package/.agents/skills/qk-test-engineering/SKILL.md +119 -509
  47. package/.agents/skills/qk-ui-audit/SKILL.md +73 -537
  48. package/.agents/skills/qk-ui-builder/SKILL.md +521 -482
  49. package/.agents/skills/qk-ui-system-builder/SKILL.md +68 -514
  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 -603
  54. package/.agents/skills/qk-web-quality-gate/SKILL.md +85 -463
  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
@@ -110,3 +110,26 @@ Ngoài R-C-01 đến R-C-08 ở trên, Agent **MUST** tuân thủ đầy đủ d
110
110
  - `references/anti-patterns.md` là phần **mở rộng chi tiết** của rule này, không thay thế các rule R-C-01–08.
111
111
  - Khi viết component UI, đối chiếu thêm với `references/component-cookbook.md` để đảm bảo đúng cấu trúc giải phẫu (Types → Hook → JSX).
112
112
  - Nếu 2 nguồn mâu thuẫn nhau, `coding.md` (rule cấp cao) được ưu tiên; báo cáo mâu thuẫn để cập nhật `anti-patterns.md`.
113
+
114
+ ---
115
+
116
+ ## R-C-10: Engineering Standards Checklist (Absorbed from qk-engineering-standard)
117
+
118
+ > Áp dụng cho mọi skill có `side_effects: edit_files`. Đây là checklist tự động — không cần gọi skill riêng.
119
+
120
+ Trước khi báo cáo task hoàn thành, **MUST** verify từng điểm:
121
+
122
+ | # | Tiêu chí | Threshold |
123
+ |---|---|---|
124
+ | 1 | Function length | ≤ 40 lines |
125
+ | 2 | File length | ≤ 300 lines |
126
+ | 3 | Function params | ≤ 4 |
127
+ | 4 | Nesting depth | ≤ 3 levels |
128
+ | 5 | Cyclomatic complexity | ≤ 10 |
129
+ | 6 | No magic numbers | Dùng named constants |
130
+ | 7 | No silent errors | Không empty catch, không `!`, không `any` |
131
+ | 8 | DRY | Extract khi logic lặp ≥ 2 lần |
132
+ | 9 | Naming conventions | camelCase fn, PascalCase class, UPPER_SNAKE constant |
133
+ | 10 | No `console.log` in production code | Dùng logger hoặc xóa trước commit |
134
+
135
+ **Violation:** Nếu bất kỳ điểm nào không đạt → sửa trước khi report SUCCESS. Không report PARTIAL chỉ vì threshold bị vi phạm.
@@ -1,5 +1,5 @@
1
1
  ---
2
- version: 8.0.0
2
+ version: 9.2.0
3
3
  description: "Agent behavior policies applied globally across all capabilities."
4
4
  domain: rules
5
5
  applies_to: all
@@ -49,7 +49,7 @@ Verify each step before next
49
49
 
50
50
  - Do NOT refactor code outside the task scope.
51
51
  - Do NOT "improve" unrelated files while working.
52
- - Do NOT run commands with broad side effects (e.g., `rm -rf`, `git reset --hard`) without explicit user confirmation.
52
+ - Do NOT run commands with broad side effects (`rm -rf`, `git reset --hard`) without explicit user confirmation.
53
53
 
54
54
  ---
55
55
 
@@ -57,26 +57,31 @@ Verify each step before next
57
57
 
58
58
  **MUST** respect the `token_budget` defined in each skill's frontmatter.
59
59
 
60
- - Read files in targeted chunks (`view_file[start:end]`), never entire large files.
60
+ - Read files in targeted chunks, never entire large files.
61
61
  - Use `grep_search` for pattern discovery, not full-file reads.
62
62
  - Stop reading when sufficient evidence is found (`stop_early: true`).
63
63
  - Never read: `node_modules/`, `dist/`, `.git/`, binary files.
64
64
 
65
65
  ---
66
66
 
67
- ## R-G-05: Retrieval Path (AI-Native)
67
+ ## R-G-05: Retrieval Path (Compact — v9.2)
68
68
 
69
- When starting a task, the agent MUST follow this retrieval sequence:
69
+ When starting a task, follow this sequence:
70
70
 
71
71
  ```
72
- 1. Read registry/skills-index.yml identify candidate skills
73
- 2. Read candidate SKILL.md(s) confirm intent + preconditions
74
- 3. Load referenced workflowunderstand execution steps
75
- 4. Load referenced rules (this file + coding.md if needed)
76
- 5. Execute
72
+ 1. Read .agents/DEV_PROFILE.md get role + stack
73
+ 2. Match intent against routing table in .agents/AGENTS.md
74
+ 3. Read the matching SKILL.md confirm intent + preconditions
75
+ 4. Load referenced workflow YAML → understand execution steps
76
+ 5. Load rules/global.md + coding.md (if edit_files task)
77
+ 6. Execute step by step
78
+ 7. Exit with: SUCCESS | BLOCKED | FAILED | PARTIAL
77
79
  ```
78
80
 
79
- Do NOT load all skills. Do NOT scan the entire repository.
81
+ **Do NOT:**
82
+ - Read `registry/skills-index.yml` to route — use the inline routing table in `.agents/AGENTS.md`
83
+ - Load all skills at once
84
+ - Scan entire repository before starting
80
85
 
81
86
  ---
82
87
 
@@ -100,6 +105,7 @@ Never silently terminate. Always report exit code and reason.
100
105
  - **Code, identifiers, filenames, YAML keys:** English only.
101
106
  - **Explanations, summaries, reports to user:** Vietnamese (match user's language).
102
107
  - **SKILL.md body headings:** English.
108
+ - **Commit messages:** English (Conventional Commits format).
103
109
 
104
110
  ---
105
111
 
@@ -107,42 +113,50 @@ Never silently terminate. Always report exit code and reason.
107
113
 
108
114
  **NEVER** use `?.`, `!`, `try/catch {}` (empty catch), or type casting to suppress errors.
109
115
 
110
- Fix root cause. If root cause is unclear → report as BLOCKED with evidence.
116
+ Fix root cause. If root cause is unclear → report as `BLOCKED` with evidence.
111
117
 
112
118
  ---
113
119
 
114
120
  ## R-G-09: Legacy Skill Handling
115
121
 
116
- Agent **MUST** prefer stable skills.
122
+ Agent **MUST** prefer stable skills over experimental or deprecated ones.
117
123
 
118
- Legacy skills **MAY** be selected only when:
119
- 1. No stable candidate exists
120
- 2. User explicitly requests legacy behavior
121
- 3. Migration incomplete
122
-
123
- Legacy skills **MUST NOT** outrank stable skills.
124
+ Deprecated skills **MUST NOT** be selected. If a user asks for a deprecated skill, explain the replacement.
124
125
 
125
126
  ---
126
127
 
127
128
  ## R-G-10: Ambiguity Resolution
128
129
 
129
- Agent **MUST NOT** execute when:
130
- `selection confidence < threshold`
130
+ Agent **MUST NOT** execute when selection confidence < threshold.
131
131
 
132
132
  Agent **SHOULD**:
133
133
  1. Ask clarification
134
- 2. Present top candidates
135
- 3. Explain missing information
134
+ 2. Present top 2-3 candidate skills with brief descriptions
135
+ 3. Explain what information is missing
136
136
 
137
137
  ---
138
138
 
139
- ## R-G-11: Knowledge & Memory Discipline (V1 / AI Skin V9)
139
+ ## R-G-11: SKILL.md Description Standard (Anthropic-aligned)
140
+
141
+ Every SKILL.md `description` field **MUST** satisfy both:
142
+
143
+ **(a) What it does** — concrete action the skill performs
144
+ **(b) When to use** — trigger context, keywords, situations
145
+
146
+ **Bad:** `"Xử lý dữ liệu."`
147
+ **Good:** `"Thiết kế và implement API endpoint mới (REST/GraphQL/tRPC). Dùng skill này khi user nhắc đến: viết api, tạo endpoint, thiết kế api, build api, route handler, controller — kể cả khi chỉ hỏi về request/response schema."`
148
+
149
+ Description phải đủ mạnh để AI **không under-trigger** (bỏ qua skill khi lẽ ra nên dùng).
150
+
151
+ ---
140
152
 
141
- **MUST** govern project memory like source code: simple, reviewable, updatable, and always human-approved.
153
+ ## R-G-12: Progressive Disclosure SKILL.md Size Limit
142
154
 
143
- - **Self-Init & Local Private Mode:** Always use `.ai-local/` (Private Mode, gitignored) as the sole storage for learned knowledge and memory. If `.ai-local/` does not exist in the project root, the agent **MUST** automatically create the folder structure (`.ai-local/knowledge/`, `.ai-local/candidates/`) and add `.ai-local/` to the project's `.gitignore` file immediately before proceeding. Shared Mode (`.agents/knowledge/index.yaml`) is explicitly disabled and prohibited for dynamic project memory.
144
- - **Navigator ONLY:** Memory reduces discovery time; it is NOT a replacement for checking live source code.
145
- - **Strict Content Bounds:** Only store 4 categories in `knowledge/index.yaml`: `Architecture`, `Convention`, `Pattern`, and `Hard Bug`. Discard routine typos, trivial CSS, and standard CRUD.
146
- - **Zero-Overwrite & Portable:** Mark outdated facts as `status: Archived` (never overwrite history). Always use workspace-relative paths (`src/...`) and AST symbol names instead of hardcoded disk paths or rigid line numbers.
147
- - **No Silent Mutate:** Never edit memory files automatically without proposing to the developer and receiving affirmative confirmation via `/learn` or explicit instructions.
155
+ SKILL.md body (không tính frontmatter) **MUST** be < 500 lines.
148
156
 
157
+ Nếu gần chạm 500 dòng:
158
+ - Tách phần chi tiết ra `references/*.md`
159
+ - Ghi rõ trong SKILL.md: *"Khi cần X → đọc `references/X.md`"*
160
+ - Layer 1 (frontmatter) luôn trong context
161
+ - Layer 2 (SKILL.md body) nạp khi skill active
162
+ - Layer 3 (references/, scripts/, assets/) nạp on-demand
@@ -1,7 +1,7 @@
1
- ---
1
+ ---
2
2
  # ── Identity ───────────────────────────────────────────────
3
3
  name: qk-[skill-name]
4
- version: 9.1.0
4
+ version: 9.2.0
5
5
  status: stable
6
6
  description: "[Một câu — skill này làm gì và dành cho ai]"
7
7
  platforms: [antigravity, claude-code, cursor, windsurf, kilo-code]
@@ -86,378 +86,3 @@ exit_codes: [SUCCESS, BLOCKED, FAILED, PARTIAL]
86
86
  # qk-[skill-name] — [Short Title]
87
87
 
88
88
  > **Language rule:** Code, identifiers, file names → English. Explanations, summaries → Vietnamese.
89
-
90
- ---
91
-
92
- ## Memory Workflow
93
-
94
- ### 0. Self-Init Protocol (Khởi Tạo Bộ Nhớ Local & Gitignore)
95
- - 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:
96
- - **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.
97
- - **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.
98
-
99
- ---
100
-
101
- ### Pre-flight Retrieve (Trước khi thực thi)
102
- - Trước các task có tính lặp lại, debug, refactor, kiến trúc hoặc rủi ro cao:
103
- bắt buộc tra cứu:
104
- - `.ai-local/knowledge/index.yaml` (Private Local Knowledge)
105
-
106
- - Ưu tiên sử dụng các Knowledge đang có trạng thái `Active` thuộc:
107
- - Architecture
108
- - Hard Bug
109
- - Convention
110
- - Pattern
111
- - Tech Debt Pattern
112
-
113
- - Memory chỉ đóng vai trò **Navigator (bản đồ chỉ đường)**.
114
- Không được xem Memory là Source of Truth.
115
- 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.
116
-
117
- ---
118
-
119
- ### Learning Flow (AI tự học có kiểm soát)
120
- - 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:
121
- - Hard Bug có khả năng tái diễn.
122
- - Pattern làm việc lặp lại trong dự án.
123
- - Convention hoặc quy tắc kiến trúc mới.
124
- - Quyết định Architecture quan trọng.
125
- - Tech Debt Pattern hoặc Code Smell có tính hệ thống.
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
-
161
- ---
162
-
163
- ### Golden Rule
164
- > **AI được phép học, nhưng không được tự quyết định tri thức chính thức.**
165
- > **AI quan sát → Đề xuất → Con người phê duyệt → Dự án tiến hóa.**
166
-
167
- ---
168
-
169
-
170
-
171
- ### 0. Self-Init Protocol (Khởi Tạo Bộ Nhớ Local & Gitignore)
172
- - 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:
173
- - **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.
174
- - **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.
175
-
176
- ---
177
-
178
- ### Pre-flight Retrieve (Trước khi thực thi)
179
- - Trước các task có tính lặp lại, debug, refactor, kiến trúc hoặc rủi ro cao:
180
- bắt buộc tra cứu:
181
- - `.ai-local/knowledge/index.yaml` (Private Local Knowledge)
182
-
183
- - Ưu tiên sử dụng các Knowledge đang có trạng thái `Active` thuộc:
184
- - Architecture
185
- - Hard Bug
186
- - Convention
187
- - Pattern
188
- - Tech Debt Pattern
189
-
190
- - Memory chỉ đóng vai trò **Navigator (bản đồ chỉ đường)**.
191
- Không được xem Memory là Source of Truth.
192
- 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.
193
-
194
- ---
195
-
196
- ### Learning Flow (AI tự học có kiểm soát)
197
- - 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:
198
- - Hard Bug có khả năng tái diễn.
199
- - Pattern làm việc lặp lại trong dự án.
200
- - Convention hoặc quy tắc kiến trúc mới.
201
- - Quyết định Architecture quan trọng.
202
- - Tech Debt Pattern hoặc Code Smell có tính hệ thống.
203
-
204
- - Candidate Memory chỉ là bản nháp quan sát, chưa phải tri thức chính thức.
205
- - Candidate Memory có thể lưu tạm tại: `.ai-local/candidates/`
206
- - AI không được tự động Promote Candidate Memory thành Project Knowledge.
207
-
208
- ---
209
-
210
- ### Post-flight Harvest (Đề xuất → Phê duyệt)
211
- Sau khi hoàn thành task:
212
- - AI đánh giá các Candidate Memory đã tạo.
213
- - Nếu phát hiện tri thức có giá trị tái sử dụng:
214
- - Đề xuất người dùng xem xét.
215
- - Gửi yêu cầu phê duyệt thông qua:
216
- - `/learn`
217
- - `qk-project-memory`
218
- - Chỉ sau khi được phê duyệt, Candidate Memory mới được chuyển thành Knowledge chính thức:
219
-
220
- ```
221
- .ai-local/candidates/ ──(Approve)──> .ai-local/knowledge/index.yaml
222
- ```
223
-
224
- - Project Knowledge phải được xem như tài sản kỹ thuật của dự án:
225
- - Có thể review, cập nhật, loại bỏ và có lịch sử thay đổi.
226
-
227
- ---
228
-
229
- ### Ignore (Không đưa vào Memory)
230
- Không lưu:
231
- - Trace log của một session đơn lẻ.
232
- - Temporary debugging data.
233
- - Output của một lần chạy test/scan.
234
- - Report health tạm thời của một đợt kiểm tra.
235
- - Lỗi nhỏ chỉ xảy ra một lần.
236
- - Thông tin không có khả năng tái sử dụng.
237
-
238
- ---
239
-
240
- ### Golden Rule
241
- > **AI được phép học, nhưng không được tự quyết định tri thức chính thức.**
242
- > **AI quan sát → Đề xuất → Con người phê duyệt → Dự án tiến hóa.**
243
-
244
- ---
245
-
246
-
247
-
248
- ### Pre-flight Retrieve (Trước khi thực thi)
249
- - Trước các task có tính lặp lại, debug, refactor, kiến trúc hoặc rủi ro cao:
250
- bắt buộc tra cứu:
251
- - `.agents/knowledge/index.yaml` (Shared Project Knowledge)
252
- - `.ai-local/knowledge/index.yaml` (Private Local Knowledge)
253
-
254
- - Ưu tiên sử dụng các Knowledge đang có trạng thái `Active` thuộc:
255
- - Architecture
256
- - Hard Bug
257
- - Convention
258
- - Pattern
259
- - Tech Debt Pattern
260
-
261
- - Memory chỉ đóng vai trò **Navigator (bản đồ chỉ đường)**.
262
- Không được xem Memory là Source of Truth.
263
- 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.
264
-
265
- ---
266
-
267
- ### Learning Flow (AI tự học có kiểm soát)
268
- - 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:
269
- - Hard Bug có khả năng tái diễn.
270
- - Pattern làm việc lặp lại trong dự án.
271
- - Convention hoặc quy tắc kiến trúc mới.
272
- - Quyết định Architecture quan trọng.
273
- - Tech Debt Pattern hoặc Code Smell có tính hệ thống.
274
-
275
- - Candidate Memory chỉ là bản nháp quan sát, chưa phải tri thức chính thức.
276
- - Candidate Memory có thể lưu tạm tại: `.ai-local/candidates/`
277
- - AI không được tự động Promote Candidate Memory thành Project Knowledge.
278
-
279
- ---
280
-
281
- ### Post-flight Harvest (Đề xuất → Phê duyệt)
282
- Sau khi hoàn thành task:
283
- - AI đánh giá các Candidate Memory đã tạo.
284
- - Nếu phát hiện tri thức có giá trị tái sử dụng:
285
- - Đề xuất người dùng xem xét.
286
- - Gửi yêu cầu phê duyệt thông qua:
287
- - `/learn`
288
- - `qk-project-memory`
289
- - Chỉ sau khi được phê duyệt, Candidate Memory mới được chuyển thành Knowledge chính thức:
290
-
291
- ```
292
- .ai-local/candidates/ ──(Approve)──> .agents/knowledge/index.yaml
293
- ```
294
-
295
- - Project Knowledge phải được xem như tài sản kỹ thuật của dự án:
296
- - Có thể review, cập nhật, loại bỏ và có lịch sử thay đổi.
297
-
298
- ---
299
-
300
- ### Ignore (Không đưa vào Memory)
301
- Không lưu:
302
- - Trace log của một session đơn lẻ.
303
- - Temporary debugging data.
304
- - Output của một lần chạy test/scan.
305
- - Report health tạm thời của một đợt kiểm tra.
306
- - Lỗi nhỏ chỉ xảy ra một lần.
307
- - Thông tin không có khả năng tái sử dụng.
308
-
309
- ---
310
-
311
- ### Golden Rule
312
- > **AI được phép học, nhưng không được tự quyết định tri thức chính thức.**
313
- > **AI quan sát → Đề xuất → Con người phê duyệt → Dự án tiến hóa.**
314
-
315
- ---
316
- ---
317
-
318
- ### Learning Flow (AI tự học có kiểm soát)
319
- - 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:
320
- - Hard Bug có khả năng tái diễn.
321
- - Pattern làm việc lặp lại trong dự án.
322
- - Convention hoặc quy tắc kiến trúc mới.
323
- - Quyết định Architecture quan trọng.
324
- - Tech Debt Pattern hoặc Code Smell có tính hệ thống.
325
-
326
- - Candidate Memory chỉ là bản nháp quan sát, chưa phải tri thức chính thức.
327
- - Candidate Memory có thể lưu tạm tại: `.ai-local/candidates/`
328
- - AI không được tự động Promote Candidate Memory thành Project Knowledge.
329
-
330
- ---
331
-
332
- ### Post-flight Harvest (Đề xuất → Phê duyệt)
333
- Sau khi hoàn thành task:
334
- - AI đánh giá các Candidate Memory đã tạo.
335
- - Nếu phát hiện tri thức có giá trị tái sử dụng:
336
- - Đề xuất người dùng xem xét.
337
- - Gửi yêu cầu phê duyệt thông qua:
338
- - `/learn`
339
- - `qk-project-memory`
340
- - Chỉ sau khi được phê duyệt, Candidate Memory mới được chuyển thành Knowledge chính thức:
341
-
342
- ```
343
- .ai-local/candidates/ ──(Approve)──> .agents/knowledge/index.yaml
344
- ```
345
-
346
- - Project Knowledge phải được xem như tài sản kỹ thuật của dự án:
347
- - Có thể review, cập nhật, loại bỏ và có lịch sử thay đổi.
348
-
349
- ---
350
-
351
- ### Ignore (Không đưa vào Memory)
352
- Không lưu:
353
- - Trace log của một session đơn lẻ.
354
- - Temporary debugging data.
355
- - Output của một lần chạy test/scan.
356
- - Report health tạm thời của một đợt kiểm tra.
357
- - Lỗi nhỏ chỉ xảy ra một lần.
358
- - Thông tin không có khả năng tái sử dụng.
359
-
360
- ---
361
-
362
- ### Golden Rule
363
- > **AI được phép học, nhưng không được tự quyết định tri thức chính thức.**
364
- > **AI quan sát → Đề xuất → Con người phê duyệt → Dự án tiến hóa.**
365
-
366
- ---
367
- ---
368
-
369
- ### Learning Flow (AI tự học có kiểm soát)
370
- - 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:
371
- - Hard Bug có khả năng tái diễn.
372
- - Pattern làm việc lặp lại trong dự án.
373
- - Convention hoặc quy tắc kiến trúc mới.
374
- - Quyết định Architecture quan trọng.
375
- - Tech Debt Pattern hoặc Code Smell có tính hệ thống.
376
-
377
- - Candidate Memory chỉ là bản nháp quan sát, chưa phải tri thức chính thức.
378
- - Candidate Memory có thể lưu tạm tại: `.ai-local/candidates/`
379
- - AI không được tự động Promote Candidate Memory thành Project Knowledge.
380
-
381
- ---
382
-
383
- ### Post-flight Harvest (Đề xuất → Phê duyệt)
384
- Sau khi hoàn thành task:
385
- - AI đánh giá các Candidate Memory đã tạo.
386
- - Nếu phát hiện tri thức có giá trị tái sử dụng:
387
- - Đề xuất người dùng xem xét.
388
- - Gửi yêu cầu phê duyệt thông qua:
389
- - `/learn`
390
- - `qk-project-memory`
391
- - Chỉ sau khi được phê duyệt, Candidate Memory mới được chuyển thành Knowledge chính thức:
392
-
393
- ```
394
- .ai-local/candidates/ ──(Approve)──> .agents/knowledge/index.yaml
395
- ```
396
-
397
- - Project Knowledge phải được xem như tài sản kỹ thuật của dự án:
398
- - Có thể review, cập nhật, loại bỏ và có lịch sử thay đổi.
399
-
400
- ---
401
-
402
- ### Ignore (Không đưa vào Memory)
403
- Không lưu:
404
- - Trace log của một session đơn lẻ.
405
- - Temporary debugging data.
406
- - Output của một lần chạy test/scan.
407
- - Report health tạm thời của một đợt kiểm tra.
408
- - Lỗi nhỏ chỉ xảy ra một lần.
409
- - Thông tin không có khả năng tái sử dụng.
410
-
411
- ---
412
-
413
- ### Golden Rule
414
- > **AI được phép học, nhưng không được tự quyết định tri thức chính thức.**
415
- > **AI quan sát → Đề xuất → Con người phê duyệt → Dự án tiến hóa.**
416
-
417
- ---
418
- ---
419
- ---
420
- ---
421
-
422
- ## Preconditions
423
-
424
- - [ ] [Required condition 1]
425
- - [ ] [Required condition 2]
426
-
427
- ```
428
- On missing precondition → EXIT: BLOCKED
429
- Report: "Missing: [what is needed]"
430
- ```
431
-
432
- ---
433
-
434
- ## Scope
435
-
436
- **This skill does:**
437
- - ✅ [What it does — be specific]
438
- - ✅ [Another thing it does]
439
-
440
- **This skill does NOT:**
441
- - ❌ [Explicit exclusion 1]
442
- - ❌ [Explicit exclusion 2 — avoid scope creep]
443
-
444
- ---
445
-
446
- ## Output Format
447
-
448
- ```markdown
449
- ## [Skill Name] Result
450
-
451
- **Status:** SUCCESS | BLOCKED | FAILED | PARTIAL
452
- **Exit:** [exit_code]
453
-
454
- ### Summary
455
- [1-2 sentences]
456
-
457
- ### Details
458
- [Main output content]
459
-
460
- ### Verification
461
- [What was verified and how]
462
- ```
463
-