ai-developer-skill-os 7.0.2 → 7.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/.agents/AGENTS.md +44 -88
  2. package/.agents/CHANGELOG.md +70 -0
  3. package/.agents/LICENSE +21 -0
  4. package/.agents/README.md +100 -0
  5. package/.agents/docs/CHI_TIET_SKILLS.md +126 -0
  6. package/.agents/docs/GOVERNANCE.md +40 -0
  7. package/.agents/docs/HUONG_DAN_SU_DUNG.md +120 -0
  8. package/.agents/docs/SPEC.md +87 -0
  9. package/.agents/docs/adr/0001-intent-based-architecture.md +19 -0
  10. package/.agents/docs/adr/0002-kernel-freeze.md +21 -0
  11. package/.agents/docs/adr/0003-risk-based-verification.md +20 -0
  12. package/.agents/docs/adr/0004-progressive-evidence.md +19 -0
  13. package/.agents/docs/skill-classification.md +25 -0
  14. package/.agents/skills/qk-access-policy/SKILL.md +179 -0
  15. package/.agents/skills/qk-ai-builder/SKILL.md +215 -0
  16. package/.agents/skills/qk-api-lifecycle/SKILL.md +176 -0
  17. package/.agents/skills/qk-bug-resolution/SKILL.md +307 -0
  18. package/.agents/skills/qk-context-loader/SKILL.md +218 -0
  19. package/.agents/skills/qk-data-lifecycle/SKILL.md +192 -0
  20. package/.agents/skills/qk-db-optimizer/SKILL.md +196 -0
  21. package/.agents/skills/qk-docs/SKILL.md +198 -0
  22. package/.agents/skills/qk-engineering-standard/SKILL.md +351 -0
  23. package/.agents/skills/qk-engineering-standard/rules/backend.md +122 -0
  24. package/.agents/skills/qk-engineering-standard/rules/database.md +3 -0
  25. package/.agents/skills/qk-engineering-standard/rules/frontend.md +152 -0
  26. package/.agents/skills/qk-engineering-standard/rules/security.md +3 -0
  27. package/.agents/skills/qk-engineering-standard/rules/testing.md +3 -0
  28. package/.agents/skills/qk-fe-api-integration/SKILL.md +326 -0
  29. package/.agents/skills/qk-feature-delivery/SKILL.md +305 -0
  30. package/.agents/skills/qk-help/SKILL.md +193 -0
  31. package/.agents/skills/qk-orchestrator/SKILL.md +278 -0
  32. package/.agents/skills/qk-orchestrator/references/routing-table.md +78 -0
  33. package/.agents/skills/qk-production-release/SKILL.md +284 -0
  34. package/.agents/skills/qk-project-bootstrap/SKILL.md +235 -0
  35. package/.agents/skills/qk-project-health/SKILL.md +199 -0
  36. package/.agents/skills/qk-project-memory/SKILL.md +218 -0
  37. package/.agents/skills/qk-system-evolution/SKILL.md +281 -0
  38. package/.agents/skills/qk-ui-audit/SKILL.md +315 -0
  39. package/.agents/skills/qk-ui-audit/references/anti-slop-checklist.md +136 -0
  40. package/.agents/skills/qk-ui-builder/SKILL.md +446 -0
  41. package/.agents/skills/qk-ui-builder/references/anti-patterns.md +295 -0
  42. package/.agents/skills/qk-ui-builder/references/color.md +115 -0
  43. package/.agents/skills/qk-ui-builder/references/component-cookbook.md +1194 -0
  44. package/.agents/skills/qk-ui-builder/references/copy.md +250 -0
  45. package/.agents/skills/qk-ui-builder/references/interaction-and-states.md +115 -0
  46. package/.agents/skills/qk-ui-builder/references/layout-and-space.md +111 -0
  47. package/.agents/skills/qk-ui-builder/references/macrostructures/01-bento-grid.md +48 -0
  48. package/.agents/skills/qk-ui-builder/references/macrostructures/02-long-document.md +50 -0
  49. package/.agents/skills/qk-ui-builder/references/macrostructures/03-marquee-hero.md +51 -0
  50. package/.agents/skills/qk-ui-builder/references/macrostructures/04-stat-led.md +49 -0
  51. package/.agents/skills/qk-ui-builder/references/macrostructures/05-workbench.md +44 -0
  52. package/.agents/skills/qk-ui-builder/references/macrostructures/06-conversational-faq.md +50 -0
  53. package/.agents/skills/qk-ui-builder/references/macrostructures/07-manifesto.md +51 -0
  54. package/.agents/skills/qk-ui-builder/references/macrostructures/08-photographic.md +50 -0
  55. package/.agents/skills/qk-ui-builder/references/macrostructures/09-quote-led.md +50 -0
  56. package/.agents/skills/qk-ui-builder/references/macrostructures/11-catalogue.md +49 -0
  57. package/.agents/skills/qk-ui-builder/references/macrostructures/12-letter.md +49 -0
  58. package/.agents/skills/qk-ui-builder/references/macrostructures/13-index-first.md +49 -0
  59. package/.agents/skills/qk-ui-builder/references/macrostructures/14-narrative-workflow.md +48 -0
  60. package/.agents/skills/qk-ui-builder/references/macrostructures/15-split-studio.md +48 -0
  61. package/.agents/skills/qk-ui-builder/references/macrostructures/16-feature-stack.md +51 -0
  62. package/.agents/skills/qk-ui-builder/references/macrostructures/17-type-specimen.md +48 -0
  63. package/.agents/skills/qk-ui-builder/references/macrostructures/18-portfolio-grid.md +48 -0
  64. package/.agents/skills/qk-ui-builder/references/macrostructures/19-map-diagram.md +50 -0
  65. package/.agents/skills/qk-ui-builder/references/macrostructures/20-ecosystem-index.md +48 -0
  66. package/.agents/skills/qk-ui-builder/references/macrostructures/21-component-playground.md +45 -0
  67. package/.agents/skills/qk-ui-builder/references/macrostructures.md +38 -0
  68. package/.agents/skills/qk-ui-builder/references/motion.md +95 -0
  69. package/.agents/skills/qk-ui-builder/references/responsive.md +115 -0
  70. package/.agents/skills/qk-ui-builder/references/slop-test.md +135 -0
  71. package/.agents/skills/qk-ui-builder/references/structure.md +280 -0
  72. package/.agents/skills/qk-ui-builder/references/themes/atmospheric.md +53 -0
  73. package/.agents/skills/qk-ui-builder/references/themes/carnival.md +52 -0
  74. package/.agents/skills/qk-ui-builder/references/themes/cobalt.md +52 -0
  75. package/.agents/skills/qk-ui-builder/references/themes/editorial.md +52 -0
  76. package/.agents/skills/qk-ui-builder/references/themes/garden.md +52 -0
  77. package/.agents/skills/qk-ui-builder/references/themes/hum.md +52 -0
  78. package/.agents/skills/qk-ui-builder/references/themes/lumen.md +52 -0
  79. package/.agents/skills/qk-ui-builder/references/themes/midnight.md +52 -0
  80. package/.agents/skills/qk-ui-builder/references/themes/modern-minimal.md +52 -0
  81. package/.agents/skills/qk-ui-builder/references/themes/playful.md +52 -0
  82. package/.agents/skills/qk-ui-builder/references/themes/specimen.md +52 -0
  83. package/.agents/skills/qk-ui-builder/references/themes/terminal.md +52 -0
  84. package/.agents/skills/qk-ui-builder/references/typography.md +129 -0
  85. package/.agents/skills/qk-ui-system-builder/SKILL.md +221 -0
  86. package/.agents/skills/qk-validation-gate/SKILL.md +359 -0
  87. package/.agents/skills.json +819 -0
  88. package/.github/workflows/ci.yml +1 -1
  89. package/CHANGELOG.md +2 -1
  90. package/CLAUDE.md +110 -0
  91. package/README.md +52 -10
  92. package/add_lang.js +21 -0
  93. package/add_lang.py +25 -0
  94. package/add_sections.py +53 -0
  95. package/bin/install.js +225 -170
  96. package/bin/lint.js +123 -0
  97. package/docs/CHI_TIET_SKILLS.md +27 -26
  98. package/docs/HUONG_DAN_SU_DUNG.md +3 -3
  99. package/docs/SPEC.md +70 -20
  100. package/framework/decision-primitives.md +2 -1
  101. package/framework/skill-schema.md +310 -0
  102. package/package.json +16 -5
  103. package/patch.js +15 -0
  104. package/patch.py +89 -0
  105. package/patch2.py +83 -0
  106. package/skills/_archive_old_skills/qk-accessibility-audit/SKILL.md +1 -0
  107. package/skills/_archive_old_skills/qk-agent-orchestrator/SKILL.md +1 -0
  108. package/skills/_archive_old_skills/qk-api-integration/SKILL.md +1 -0
  109. package/skills/_archive_old_skills/qk-auth-security/SKILL.md +1 -0
  110. package/skills/_archive_old_skills/qk-backend-architecture/SKILL.md +1 -0
  111. package/skills/_archive_old_skills/qk-bug-fix/SKILL.md +1 -0
  112. package/skills/_archive_old_skills/qk-component-generator/SKILL.md +1 -0
  113. package/skills/_archive_old_skills/qk-context-manager/SKILL.md +1 -0
  114. package/skills/_archive_old_skills/qk-database-engineer/SKILL.md +1 -0
  115. package/skills/_archive_old_skills/qk-deployment/SKILL.md +1 -0
  116. package/skills/_archive_old_skills/qk-design-system/SKILL.md +1 -0
  117. package/skills/_archive_old_skills/qk-form-builder/SKILL.md +1 -0
  118. package/skills/_archive_old_skills/qk-frontend-architecture/SKILL.md +1 -0
  119. package/skills/_archive_old_skills/qk-frontend-debug/SKILL.md +1 -0
  120. package/skills/_archive_old_skills/qk-frontend-performance/SKILL.md +1 -0
  121. package/skills/_archive_old_skills/qk-frontend-testing/SKILL.md +1 -0
  122. package/skills/_archive_old_skills/qk-git-engineer/SKILL.md +1 -0
  123. package/skills/_archive_old_skills/qk-help/SKILL.md +1 -0
  124. package/skills/_archive_old_skills/qk-migration/SKILL.md +1 -0
  125. package/skills/_archive_old_skills/qk-project-audit/SKILL.md +1 -0
  126. package/skills/_archive_old_skills/qk-refactor/SKILL.md +1 -0
  127. package/skills/_archive_old_skills/qk-state-management/SKILL.md +1 -0
  128. package/skills/_archive_old_skills/qk-table-crud-generator/SKILL.md +1 -0
  129. package/skills/_archive_old_skills/qk-ui-builder/SKILL.md +1 -0
  130. package/skills/_template/SKILL.md +239 -0
  131. package/skills/qk-access-policy/SKILL.md +180 -39
  132. package/skills/qk-ai-builder/SKILL.md +216 -40
  133. package/skills/qk-api-lifecycle/SKILL.md +177 -46
  134. package/skills/qk-bug-resolution/SKILL.md +308 -46
  135. package/skills/qk-context-loader/SKILL.md +219 -43
  136. package/skills/qk-data-lifecycle/SKILL.md +193 -44
  137. package/skills/qk-db-optimizer/SKILL.md +197 -41
  138. package/skills/qk-docs/SKILL.md +199 -40
  139. package/skills/qk-engineering-standard/SKILL.md +352 -42
  140. package/skills/qk-fe-api-integration/SKILL.md +327 -55
  141. package/skills/qk-feature-delivery/SKILL.md +306 -48
  142. package/skills/qk-help/SKILL.md +179 -23
  143. package/skills/qk-orchestrator/SKILL.md +279 -42
  144. package/skills/qk-orchestrator/references/routing-table.md +78 -0
  145. package/skills/qk-production-release/SKILL.md +285 -41
  146. package/skills/qk-project-bootstrap/SKILL.md +236 -38
  147. package/skills/qk-project-health/SKILL.md +200 -40
  148. package/skills/qk-project-memory/SKILL.md +219 -40
  149. package/skills/qk-system-evolution/SKILL.md +282 -40
  150. package/skills/qk-ui-audit/SKILL.md +316 -42
  151. package/skills/qk-ui-audit/references/anti-slop-checklist.md +136 -0
  152. package/skills/qk-ui-builder/SKILL.md +447 -0
  153. package/skills/qk-ui-builder/references/anti-patterns.md +295 -0
  154. package/skills/qk-ui-builder/references/color.md +115 -0
  155. package/skills/qk-ui-builder/references/component-cookbook.md +1194 -0
  156. package/skills/qk-ui-builder/references/copy.md +250 -0
  157. package/skills/qk-ui-builder/references/interaction-and-states.md +115 -0
  158. package/skills/qk-ui-builder/references/layout-and-space.md +111 -0
  159. package/skills/qk-ui-builder/references/macrostructures/01-bento-grid.md +48 -0
  160. package/skills/qk-ui-builder/references/macrostructures/02-long-document.md +50 -0
  161. package/skills/qk-ui-builder/references/macrostructures/03-marquee-hero.md +51 -0
  162. package/skills/qk-ui-builder/references/macrostructures/04-stat-led.md +49 -0
  163. package/skills/qk-ui-builder/references/macrostructures/05-workbench.md +44 -0
  164. package/skills/qk-ui-builder/references/macrostructures/06-conversational-faq.md +50 -0
  165. package/skills/qk-ui-builder/references/macrostructures/07-manifesto.md +51 -0
  166. package/skills/qk-ui-builder/references/macrostructures/08-photographic.md +50 -0
  167. package/skills/qk-ui-builder/references/macrostructures/09-quote-led.md +50 -0
  168. package/skills/qk-ui-builder/references/macrostructures/11-catalogue.md +49 -0
  169. package/skills/qk-ui-builder/references/macrostructures/12-letter.md +49 -0
  170. package/skills/qk-ui-builder/references/macrostructures/13-index-first.md +49 -0
  171. package/skills/qk-ui-builder/references/macrostructures/14-narrative-workflow.md +48 -0
  172. package/skills/qk-ui-builder/references/macrostructures/15-split-studio.md +48 -0
  173. package/skills/qk-ui-builder/references/macrostructures/16-feature-stack.md +51 -0
  174. package/skills/qk-ui-builder/references/macrostructures/17-type-specimen.md +48 -0
  175. package/skills/qk-ui-builder/references/macrostructures/18-portfolio-grid.md +48 -0
  176. package/skills/qk-ui-builder/references/macrostructures/19-map-diagram.md +50 -0
  177. package/skills/qk-ui-builder/references/macrostructures/20-ecosystem-index.md +48 -0
  178. package/skills/qk-ui-builder/references/macrostructures/21-component-playground.md +45 -0
  179. package/skills/qk-ui-builder/references/macrostructures.md +38 -0
  180. package/skills/qk-ui-builder/references/motion.md +95 -0
  181. package/skills/qk-ui-builder/references/responsive.md +115 -0
  182. package/skills/qk-ui-builder/references/slop-test.md +135 -0
  183. package/skills/qk-ui-builder/references/structure.md +280 -0
  184. package/skills/qk-ui-builder/references/themes/atmospheric.md +53 -0
  185. package/skills/qk-ui-builder/references/themes/carnival.md +52 -0
  186. package/skills/qk-ui-builder/references/themes/cobalt.md +52 -0
  187. package/skills/qk-ui-builder/references/themes/editorial.md +52 -0
  188. package/skills/qk-ui-builder/references/themes/garden.md +52 -0
  189. package/skills/qk-ui-builder/references/themes/hum.md +52 -0
  190. package/skills/qk-ui-builder/references/themes/lumen.md +52 -0
  191. package/skills/qk-ui-builder/references/themes/midnight.md +52 -0
  192. package/skills/qk-ui-builder/references/themes/modern-minimal.md +52 -0
  193. package/skills/qk-ui-builder/references/themes/playful.md +52 -0
  194. package/skills/qk-ui-builder/references/themes/specimen.md +52 -0
  195. package/skills/qk-ui-builder/references/themes/terminal.md +52 -0
  196. package/skills/qk-ui-builder/references/typography.md +129 -0
  197. package/skills/qk-ui-system-builder/SKILL.md +222 -43
  198. package/skills/qk-validation-gate/SKILL.md +360 -40
  199. package/skills.json +815 -825
  200. package/specs/fixtures/user-payload.json +12 -0
  201. package/specs/regressions/api-integration-null-fields.yaml +19 -0
  202. package/temp_fix.js +61 -0
  203. package/tests/registry.test.js +1 -1
  204. package/update_template.js +28 -0
  205. package/skills/qk-design-to-code/SKILL.md +0 -46
  206. package/skills/qk-policy-engine/SKILL.md +0 -39
package/.agents/AGENTS.md CHANGED
@@ -1,89 +1,45 @@
1
- # Global Agent Policies
2
1
 
3
- These policies act as the OS Kernel for all AI agents.
4
- They establish the baseline behavior, engineering standards, and execution lifecycle.
5
- Skills follow the standard classifications defined in `docs/skill-classification.md`.
6
-
7
- ## 1. Core Principles
8
- **Rules:**
9
- - **MUST** fix the root cause, not the symptom.
10
- - **MUST NOT** fabricate facts, APIs, packages, or code that doesn't exist.
11
- - **MUST NOT** guess the shape of APIs or data. Use evidence.
12
- - **MUST NOT** redesign the system or overengineer unless explicitly requested.
13
- - **MUST** preserve backward compatibility unless instructed otherwise.
14
-
15
- **Guidelines:**
16
- - **Prefer** solving today's problem over speculative future-proofing.
17
- - **Prefer** keeping changes minimal and isolated.
18
-
19
- ## 2. Priority Resolution
20
- If multiple objectives or skills overlap, resolve them in this order:
21
- 1. Safety
22
- 2. Correctness
23
- 3. User Request
24
- 4. Performance
25
- 5. Style
26
-
27
- ## 3. Planning & Context
28
- **Rules:**
29
- - **MUST** read before write. Always understand context before modifying code.
30
- - **MUST NOT** read the whole project unless explicitly required.
31
- - **ZERO-TRUST CONTEXT:** MUST NOT write business logic until a Dependency Graph or structural map is established (Do not guess the architecture).
32
-
33
- **Guidelines:**
34
- - **Context Budget:** Prefer reading `1 file` → `3 files` → `directory` → `project`.
35
- - **Evidence Priority:** User input → Existing context → Source code → Types → Logs → Runtime → External knowledge.
36
-
37
- ## 4. Evidence Collection & Confidence
38
- **Rules:**
39
- - **MUST NOT** execute speculative actions.
40
- - **Decision Confidence:** Proceed only when the next action is supported by sufficient evidence. Avoid speculative execution.
41
-
42
- **Guidelines:**
43
- - **Progressive Collection:** Collect incrementally. Do not gather all possible information upfront.
44
- - **Stop early:** Stop collecting evidence as soon as there is sufficient confidence to proceed. If confidence is low, collect exactly *one* additional piece of evidence and repeat.
45
-
46
- ## 5. Tool Usage
47
- **Rules:**
48
- - **MUST** determine if the answer can be derived from the current context before calling any tool.
49
- - **MUST NOT** use shell commands merely to explore the project (e.g., `pwd`, `ls`, `tree`, `find`) when structure is known.
50
-
51
- **Guidelines:**
52
- - **Order of Preference:** Current context → `read_file` → `grep_search` → `search_code` → `run_command`.
53
- - **Batch Commands:** Batch related operations (e.g., `git status && git diff`).
54
- - **Command Budget:** Maximum 3 shell commands before producing an initial diagnosis.
55
-
56
- ## 6. Execution & Repair Loop
57
- **Rules:**
58
- - **Repair Loop:** MUST follow: `Observe` → `Hypothesis` → `Evidence` → `Fix` → `Verify` → `Done`. Do NOT jump directly from Observe to Fix.
59
- - **Self-Correction (Anti-Slop):** MUST proactively self-audit code (especially UI) against design constraints before emitting. Reject any generic, lazy, or "slop" solutions.
60
- - **Escalation Policy:** If 2 consecutive attempts fail (e.g., build fail, permission denied): Stop. Explain the blocker. Request user confirmation before continuing.
61
- - **Stopping Criteria:** Stop immediately when: Root cause identified, task completed, required evidence collected, or sufficient confidence reached.
62
-
63
- **Guidelines:**
64
- - **Cost Policy:** Optimize for: Correctness > Minimal Changes > Minimal Context > Minimal Tool Usage > Minimal Runtime.
65
-
66
- ## 7. Verification
67
- **Rules:**
68
- - **MUST** use the lowest verification level sufficient for the task.
69
- - **MUST NOT** run build/test unless required by the task or needed for verification.
70
-
71
- **Guidelines:**
72
- - **Risk-based Verification:**
73
- - **Level 0 (Low Risk):** Comment, typo, string changes. Static analysis only.
74
- - **Level 1:** Read source code.
75
- - **Level 2 (Medium Risk):** Logic changes. Run targeted test.
76
- - **Level 3 (High Risk):** Auth, payment, database. Run full validation.
77
-
78
- ## 8. Output Policy
79
- **Rules:**
80
- - **MUST** use English for: Code, reasoning, architecture terms, file names, variables, technical decisions, Git commit messages, logs, and prompt logic (Workflow, Checklist).
81
- - **MUST** use Vietnamese for: User-facing explanations, questions, summaries, progress updates, and the final report.
82
- - **MUST NOT** translate: Code snippets, stack traces, file paths, shell commands, config keys, environment variables.
83
- - **MUST** follow the required reporting structure (Summary, Changes, Reason, Verification, Risks, Next Action).
84
-
85
- ## 9. Design Contract (Open Design)
86
- **Rules:**
87
- - **MUST** locate and read `DESIGN.md` in the project root before performing any UI or frontend tasks.
88
- - **MUST NOT** invent design tokens, colors, or typography that contradict `DESIGN.md`.
89
- - **ENFORCEMENT:** If `DESIGN.md` is missing, the agent MUST request the user to create one (or use bootstrap skill) before continuing UI work.
2
+ <RULE[ai_skill_os]>
3
+ ---
4
+ trigger: always_on
5
+ ---
6
+ [Role]
7
+ You are an elite AI Software Engineer. You must strictly follow the rules in this project.
8
+ Vui lòng tìm đọc danh sách kỹ năng tại file `.agents/skills/skills.json`.
9
+
10
+ [Trigger Mechanism]
11
+ Bất cứ khi nào người dùng gõ lệnh bắt đầu bằng `./qk-[tên-skill]`, bạn BẮT BUỘC phải đọc file `SKILL.md` tương ứng trong thư mục `.agents/skills/...` (hoặc dùng tool view_file để đọc file đó) trước khi làm bất cứ việc gì. Đừng bao giờ đoán mò.
12
+
13
+ [Autonomous Execution & Transparency]
14
+ Khi nhận được lệnh kỹ năng, bạn BẮT BUỘC phải:
15
+ 1. Thông báo ràng: "[🚀 AI Developer Skin: Đã kích hoạt kỹ năng <tên-skill>]" ngay dòng đầu tiên.
16
+ 2. TỰ ĐỘNG THỰC THI (End-to-End): Dùng các tools của bạn (đọc file, sửa code, chạy lệnh) để tự động hoàn thành 100% mục tiêu được giao. KHÔNG ĐƯỢC dừng lại để hỏi ý kiến trừ khi gặp lỗi chí mạng hoặc requirement quá mập mờ.
17
+ 3. BÁO CÁO KẾT QUẢ: Sau khi hoàn tất sửa code, LUÔN trả về báo cáo theo đúng format markdown dưới đây:
18
+
19
+ ```markdown
20
+ 🔧 <Tên Kỹ Năng> Summary
21
+ ─────────────────────────────────────────────────
22
+ Scope: [Tóm tắt ngắn gọn phạm vi công việc]
23
+ Changes: [N file modified, N extracted, N removed]
24
+
25
+ Changes applied:
26
+ [Loại hành động 1]: [Chi tiết những gì đã làm, ví dụ: Ngăn chặn lỗi lặp vô hạn...]
27
+ ✅ [Loại hành động 2]: [Chi tiết những gì đã làm]
28
+
29
+ 📊 Quality improvement:
30
+ Before: [Mô tả ngắn tình trạng trước khi sửa/làm]
31
+ After: [Mô tả sự cải thiện đạt được]
32
+
33
+ Verification:
34
+ Tests: [Trạng thái test (vd: N/A, Pass)]
35
+ Lint/Types:[Trạng thái kiểm tra lỗi (vd: Clean)]
36
+ Behavior: [Kết quả hoạt động (vd: Unchanged, Improved)]
37
+
38
+ ⚠️ Notes:
39
+ [Các lưu ý đặc biệt, rủi ro tiềm ẩn hoặc cách người dùng thể test lại tính năng này]
40
+ ```
41
+
42
+ [Command Arguments]
43
+ Người dùng thể truyền thêm tham số vào lệnh (ví dụ: `./qk-ui-builder --fw=react --css=tailwind`).
44
+ Nếu người dùng sử dụng tham số (argument), bạn BẮT BUỘC phải tuân thủ tuyệt đối các công nghệ/yêu cầu được chỉ định trong tham số đó thay vì dùng mặc định.
45
+ </RULE[ai_skill_os]>
@@ -0,0 +1,70 @@
1
+ # Changelog
2
+
3
+ All notable changes to the **AI Developer Skill OS** project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [7.0.2] - 2026-07-15
9
+
10
+ ### Added
11
+ - **Frontend Integration**: Added `qk-fe-api-integration` skill to strictly enforce zero-overhead base API consumption, DTO mapping, and resilient UI states.
12
+
13
+ ## [7.0.0] - 2026-07-15
14
+
15
+ ### Changed (The "Anti-Slop & Zero-Trust" Architecture Upgrade)
16
+ - **Zero-Trust Logic**: Core logic skills (`qk-context-loader`, `qk-orchestrator`, `qk-feature-delivery`) now mandate a Topological Context Graph prior to any code generation.
17
+ - **Strict Design Contract**: Frontend skills (`qk-ui-system-builder`, `qk-ui-builder`, `qk-ui-audit`) now explicitly reject generic styling (slop) and enforce strict token matching against a mandated `DESIGN.md`.
18
+ - **Repair Loop Enforcement**: `qk-bug-resolution` updated to strictly prohibit jumping to fixes without explicitly establishing an `Observe -> Hypothesis -> Evidence` chain.
19
+ - **Contract-First APIs**: `qk-api-lifecycle` now requires explicit OpenAPI/Swagger definitions prior to endpoint implementation.
20
+ - **Upgraded Testing Framework**: Fixed regex and validation logic in `behavior-conformance.test.js` to rigorously support YAML array strings and precise V7 markdown constraints. All 22 skills bumped to `v7.0.0`.
21
+ - **Project Bootstrapping**: `qk-project-bootstrap` now scaffolds `DESIGN.md` explicitly upon initialization.
22
+
23
+
24
+ ## [4.0.0] - 2026-07-02
25
+
26
+ ### Changed (Major Architecture Upgrade)
27
+ - **Intent-Based Agent Architecture:** Replaced rule-based individual skill exceptions with global behavioral group classifications (Static Analysis, Development, Validation, Maintenance).
28
+ - **OS Kernel Refactor:** Completely rewrote `AGENTS.md` (the "OS Kernel") into a strictly organized, lightweight structure under 100 lines.
29
+ - **Progressive Evidence Collection:** Agents now enforce an 80% Confidence Threshold and incremental Context Budget (`1 file` → `3 files`) to prevent over-fetching and hallucination loops.
30
+ - **Cost & Escalation Policies:** Introduced strict cost-optimization logic, Stopping Criteria, and Escalation protocols to prevent infinite `run_command` retries.
31
+ - **Risk-based Verification:** Dynamic test execution based on the risk level of changes (Levels 0-3).
32
+
33
+ ### Added
34
+ - **Registry Validation Suite:** Full Vitest test suite enforcing SKILL.md frontmatter compliance against `docs/SPEC.md`.
35
+ - **GitHub Actions CI:** Automated validation on every PR and push to main.
36
+ - **Idempotent Installer:** `bin/install.js` now detects and updates existing rule blocks instead of duplicating them.
37
+ - **Kilo Code Native Support:** First-class support for `CLAUDE.md` + `kilo.json` config generation.
38
+ - **Governance Docs:** `docs/GOVERNANCE.md`, ADRs, and skill classification policy for enterprise maintainability.
39
+ - **Engineering Standards:** `qk-engineering-standard` and `qk-validation-gate` skills enforce SOLID, DRY, Clean Code, and mandatory quality gates.
40
+
41
+ ## [1.0.1] - 2026-07-01
42
+ ### Fixed
43
+ - Standardized Language rule across all 23 SKILL.md files for consistency.
44
+ - Updated registry version to match package.json.
45
+
46
+ ## [1.0.0] - 2026-07-01
47
+
48
+ ### Added
49
+ - Released the complete AI Developer Skill OS with 23 targeted skills for coding agents.
50
+ - **Engineering Core (8 skills):**
51
+ - `agent-orchestrator` for planning and delegating tasks.
52
+ - `context-manager` for project context and file selection.
53
+ - `project-audit` for 3-mode health checks.
54
+ - `bug-fix` with root cause analysis.
55
+ - `refactor` for safe, behavior-preserving code restructuring.
56
+ - `migration` for dependency updates and library swapping.
57
+ - `api-integration` for robust API connections.
58
+ - `git-engineer` for commit messages and PR documentation.
59
+ - **Frontend Core (11 skills):**
60
+ - `frontend-architecture`, `design-system`, `ui-builder`, `component-generator`.
61
+ - `state-management`, `form-builder`, `table-crud-generator`.
62
+ - `frontend-debug`, `frontend-testing`, `accessibility-audit`, `frontend-performance`.
63
+ - **Backend Core (4 skills):**
64
+ - `backend-architecture`, `database-engineer`, `auth-security`, `deployment`.
65
+ - Added comprehensive `skills.json` registry with dependencies and trigger keywords.
66
+ - Added bilingual `README.md` (English/Vietnamese).
67
+ - Added detailed user documentation in `docs/HUONG_DAN_SU_DUNG.md` and `docs/CHI_TIET_SKILLS.md`.
68
+ - Translated all skill frontmatter descriptions to Vietnamese for better UX in agent terminals.
69
+ - Included generic English and Vietnamese usage examples in `_template/examples/`.
70
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Quang Khánh
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,100 @@
1
+ # 🚀 AI Developer Skill OS (ai-developer-skill-os) v7.5.0
2
+
3
+ > **V7.5.0 "Anti-Slop & Zero-Trust Architecture"**
4
+
5
+ Hệ sinh thái AI Developer Skill OS đã được tái cấu trúc hoàn toàn. Thay vì cung cấp các "công cụ rời rạc" (Toolbox), phiên bản V7 được thiết kế như một **Hệ điều hành khép kín, hoạt động theo kỷ luật của một Kiến trúc sư Hệ thống (50 năm kinh nghiệm)**.
6
+
7
+ ---
8
+
9
+ ## 🏗️ Triết Lý Hoạt Động Cốt Lõi (V7 Kernel)
10
+
11
+ ### 1. Zero-Trust Context (Không bao giờ đoán mò)
12
+ Mọi kỹ năng phân tích logic và backend (như `qk-feature-delivery`, `qk-orchestrator`) đều bị khoá chặt, không được phép hoạt động nếu chưa có **Dependency Graph** (Bản đồ cấu trúc) từ `qk-context-loader`. AI không được phép thay đổi code dựa trên trí tưởng tượng.
13
+
14
+ ### 2. Contract-First (Khế ước đi đầu)
15
+ - **Frontend / UI**: Mọi sửa đổi giao diện đều phải dựa trên `DESIGN.md`. Nếu vi phạm (tạo ra giao diện lười biếng "slop", dùng màu mặc định sai lệch), AI sẽ tự động bị đánh trượt bài kiểm toán.
16
+ - **Backend / API**: Mọi API phải được viết `OpenAPI/Swagger` schema trước khi viết logic thực tế (`qk-api-lifecycle`).
17
+ - **Database**: Cấm truy vấn mù. Bắt buộc phải có Schema định nghĩa rõ ràng trước (`qk-data-lifecycle`).
18
+
19
+ ### 3. Repair Loop (Chu trình Sửa Lỗi Khép Kín)
20
+ Bảo vệ mã nguồn khỏi thói quen "sửa vội" của AI. Lỗi bắt buộc phải qua chu trình điều tra nghiêm ngặt: `Observe -> Hypothesis -> Evidence -> Fix -> Verify` (`qk-bug-resolution`).
21
+
22
+ ---
23
+
24
+ ## 🧩 Danh sách 22 Master Skills
25
+
26
+ Các kỹ năng được quản lý cực kỳ chặt chẽ với bài kiểm tra tự động (Vitest) để đảm bảo tính nhất quán của luật lệ:
27
+ - **Orchestration:** `qk-orchestrator`, `qk-context-loader`, `qk-access-policy`
28
+ - **Engineering / Dev:** `qk-feature-delivery`, `qk-api-lifecycle`, `qk-fe-api-integration`, `qk-data-lifecycle`, `qk-ui-builder`, `qk-ui-system-builder`
29
+ - **Validation & Standards:** `qk-validation-gate`, `qk-engineering-standard`, `qk-ui-audit`, `qk-project-health`, `qk-bug-resolution`
30
+ - **Ops & AI:** `qk-system-evolution`, `qk-production-release`, `qk-ai-builder`, `qk-project-bootstrap`
31
+ - **Docs & Utils:** `qk-docs`, `qk-project-memory`, `qk-help`, `qk-db-optimizer`
32
+
33
+ ---
34
+
35
+ ## 💻 Cách Cài Đặt (Installation)
36
+
37
+ ### Cách 1: NPM Global (Khuyên dùng cho nhiều máy)
38
+ ```bash
39
+ npm i -g ai-developer-skill-os
40
+ ```
41
+
42
+ ### Cách 2: NXP (Không cần cài global)
43
+ ```bash
44
+ npx ai-developer-skill-os init --ide=antigravity --scope=2
45
+ ```
46
+
47
+ ### Cách 3: NPM Scripts (Trong dự án)
48
+ ```bash
49
+ # Antigravity Global — 1 lần cài, mọi dự án dùng chung
50
+ npm run install:antigravity
51
+
52
+ # Antigravity Local — cài riêng cho dự án này
53
+ npm run install:antigravity:local
54
+
55
+ # Các IDE khác
56
+ npm run install:cursor # Global Cursor
57
+ npm run install:windsurf # Global Windsurf
58
+ npm run install:claude # Global Claude Code
59
+ npm run install:kilo # Global Kilo Code
60
+ npm run install:multi # Multi-IDE
61
+ ```
62
+
63
+ ## 📦 Tham số cho `init`
64
+
65
+ | Tham số | Giá trị | Mô tả |
66
+ |---------|---------|-------|
67
+ | `--ide` | `antigravity`, `cursor`, `windsurf`, `claude`, `kilo`, `multi-ide` | IDE/AI Assistant |
68
+ | `--scope` | `1` = Local, `2` = Global | Phạm vi cài đặt |
69
+
70
+ ### Ví dụ thực tế
71
+
72
+ ```bash
73
+ # Cài Antigravity Global (toàn máy)
74
+ npx ai-developer-skill-os init --ide=antigravity --scope=2
75
+
76
+ # Cài Antigravity Local (chỉ dự án này)
77
+ npx ai-developer-skill-os init --ide=antigravity --scope=1
78
+
79
+ # Cài Cursor Local
80
+ npx ai-developer-skill-os init --ide=cursor --scope=1
81
+
82
+ # Cài Multi-IDE (tạo CLAUDE.md + .qk-ai-skill-os)
83
+ npx ai-developer-skill-os init --ide=multi-ide --scope=2
84
+ ```
85
+
86
+ ## 🧪 Testing
87
+
88
+ Hệ thống được bảo vệ bằng bộ Test Suite (Vitest) để tự động kiểm toán tính hợp lệ của toàn bộ 22 file Kỹ năng trước khi xuất bản:
89
+
90
+ ```bash
91
+ npm test
92
+ ```
93
+
94
+ ## 🚀 Tra Cứu (Help)
95
+
96
+ Để tra cứu danh sách các Kỹ năng và luật lệ khắt khe của hệ thống V7, hãy gọi:
97
+ ```bash
98
+ ./qk-help
99
+ ```
100
+
@@ -0,0 +1,126 @@
1
+ # Từ Điển Chi Tiết 22 Siêu Kỹ Năng (Master Skills)
2
+
3
+ Dưới đây là danh sách chi tiết và giải thích cụ thể cho toàn bộ 22 Kỹ năng thuộc Kiến trúc AI Developer Skill OS. Các kỹ năng được phân chia khép kín theo 7 lớp kiến trúc tiêu chuẩn cấp doanh nghiệp (Enterprise Architecture).
4
+
5
+ ---
6
+
7
+ ## 🏗️ Lớp 0: Foundation Layer (Nền Tảng Cốt Lõi)
8
+ *Lớp này đóng vai trò như "Não bộ trung tâm", chuyên nhận lệnh, cấp quyền, cung cấp luật lệ và chuẩn bị môi trường trước khi bất kỳ dòng code nào được viết ra.*
9
+
10
+ ### 1. `qk-orchestrator` (Trợ Lý Điều Phối)
11
+ - **Mô tả:** Nhận lệnh chung chung từ người dùng, tự động phân tích ý đồ và định hướng luồng công việc (chọn gọi các kỹ năng nào tiếp theo).
12
+ - **Khi nào dùng:** Khi bạn có một yêu cầu lớn và không biết bắt đầu từ đâu.
13
+
14
+ ### 2. `qk-context-loader` (Nạp Ngữ Cảnh)
15
+ - **Mô tả:** Có khả năng đọc lướt dự án để gom chính xác các file liên quan đến task hiện tại (chống tràn bộ nhớ token của AI).
16
+ - **Khi nào dùng:** Khi code dự án quá lớn, cần khoanh vùng các file cần sửa.
17
+
18
+ ### 3. `qk-access-policy` (Kiểm Soát Phân Quyền)
19
+ - **Mô tả:** Xử lý và cung cấp các quy tắc về bảo mật (Security), phân quyền (RBAC), Authentication (JWT/OAuth).
20
+ - **Khi nào dùng:** Khi tính năng liên quan đến việc bảo mật, ai được quyền truy cập vào đâu.
21
+
22
+ ### 4. `qk-project-memory` (Trí Nhớ Dự Án)
23
+ - **Mô tả:** Lưu trữ DNA của dự án, các quyết định kiến trúc, UI pattern và các convention đã được thống nhất từ trước.
24
+ - **Khi nào dùng:** Khi muốn AI làm theo đúng style đã có sẵn trong dự án.
25
+
26
+ ### 5. `qk-engineering-standard` (Bộ Luật Thiết Kế)
27
+ - **Mô tả:** Bơm các "luật thép" (về Frontend, Backend, Database) vào ngữ cảnh để bắt AI tuân thủ cấu trúc thư mục và naming.
28
+ - **Khi nào dùng:** Tự động gọi để ép AI viết code không bị rác.
29
+
30
+ ### 6. `qk-project-bootstrap` (Khởi Tạo Dự Án)
31
+ - **Mô tả:** Setup toàn bộ khung sườn của một dự án mới tinh từ con số 0 (Cấu hình lint, format, folder structure).
32
+ - **Khi nào dùng:** Lúc bắt đầu dự án mới.
33
+
34
+ ---
35
+
36
+ ## 🎨 Lớp 1: UI System Layer (Hệ Thống Giao Diện)
37
+ *Nhóm chuyên biệt về vẽ giao diện và quản lý hệ thống thành phần (Components).*
38
+
39
+ ### 7. `qk-ui-system-builder` (Kỹ Sư Hệ Thống UI)
40
+ - **Mô tả:** Quản lý Design Token, tạo ra các Component có thể tái sử dụng (Button, Table, Form) đảm bảo tính nhất quán toàn dự án.
41
+ - **Khi nào dùng:** Xây dựng thư viện giao diện, tránh viết CSS lộn xộn.
42
+
43
+ ### 8. `qk-ui-builder` (Chuyển Đổi Thiết Kế)
44
+ - **Mô tả:** Đọc hiểu hình ảnh/Figma để tự động chuyển thành mã nguồn giao diện (React, Tailwind, v.v.).
45
+ - **Khi nào dùng:** Bóc tách UI từ bản thiết kế.
46
+
47
+ ### 9. `qk-ui-audit` (Kiểm Toán Giao Diện)
48
+ - **Mô tả:** Kiểm tra độ nhất quán UI/UX, hỗ trợ Responsive trên điện thoại và tối ưu khả năng tiếp cận (Accessibility - a11y).
49
+ - **Khi nào dùng:** Kiểm tra lỗi UI sau khi hoàn thiện giao diện.
50
+
51
+ ---
52
+
53
+ ## 💻 Lớp 2: Development Layer (Phát Triển E2E)
54
+ *Khối thực thi mạnh mẽ nhất, đi từ A-Z một tính năng cụ thể.*
55
+
56
+ ### 10. `qk-feature-delivery` (Chuyển Giao Tính Năng)
57
+ - **Mô tả:** Kỹ năng toàn năng, tự động phân tích thiết kế Database -> Viết API -> Xây UI -> Viết Unit Test cho một tính năng trọn vẹn.
58
+ - **Khi nào dùng:** Xây dựng tính năng hoàn chỉnh (Ví dụ: Chức năng Thanh Toán).
59
+
60
+ ### 11. `qk-api-lifecycle` (Vòng Đời API)
61
+ - **Mô tả:** Chuyên biệt cho Backend: Viết spec, tạo Service, định nghĩa Type, viết Test và sinh tài liệu cho API.
62
+ - **Khi nào dùng:** Xây dựng các Endpoint API.
63
+
64
+ ### 12. `qk-data-lifecycle` (Vòng Đời Dữ Liệu)
65
+ - **Mô tả:** Quản lý Schema, tạo file Migration, tối ưu câu lệnh truy vấn (SQL, Prisma, v.v.).
66
+ - **Khi nào dùng:** Thay đổi cấu trúc cơ sở dữ liệu.
67
+
68
+ ### 13. `qk-db-optimizer` (Tối Ưu Database)
69
+ - **Mô tả:** Phân tích EXPLAIN plan, tìm N+1 queries, đề xuất index và tối ưu query performance.
70
+ - **Khi nào dùng:** Truy vấn chậm, performance DB issue.
71
+
72
+ ### 14. `qk-fe-api-integration` (Tích Hợp API Frontend)
73
+ - **Mô tả:** Consume API Backend, quản lý State, bind vào UI — tuân thủ kiến trúc Base dự án.
74
+ - **Khi nào dùng:** Khi cần gọi API từ frontend, map DTO, xử lý Loading/Error states.
75
+
76
+ ---
77
+
78
+ ## 🛡️ Lớp 3: Quality Assurance Layer (Đảm Bảo Chất Lượng)
79
+ *Kiểm tra độ sạch của code và diệt bug.*
80
+
81
+ ### 15. `qk-project-health` (Kiểm Toán Dự Án)
82
+ - **Mô tả:** Quét toàn bộ dự án để tìm Code Smell, Nợ kỹ thuật (Tech Debt), và các vi phạm kiến trúc.
83
+ - **Khi nào dùng:** Định kỳ kiểm tra chất lượng mã nguồn hoặc tối ưu hiệu năng.
84
+
85
+ ### 16. `qk-bug-resolution` (Giải Quyết Bug Triệt Để)
86
+ - **Mô tả:** Tái hiện lỗi, đào sâu tìm Root Cause, cung cấp giải pháp an toàn và viết Regression Test để chống lỗi lặp lại.
87
+ - **Khi nào dùng:** Sửa các lỗi đứt gãy hoặc logic nghiêm trọng.
88
+
89
+ ### 17. `qk-validation-gate` (Cổng Kiểm Định)
90
+ - **Mô tả:** Kỹ năng chặn cửa. Bắt buộc chạy Test, Linting và Scan Security. Chỉ khi "PASS" mới cho phép kết thúc task.
91
+ - **Khi nào dùng:** Nằm cuối quy trình code của bất kỳ tính năng nào.
92
+
93
+ ---
94
+
95
+ ## 🚀 Lớp 4 & 5: Evolution & Operation (Vận Hành & Tiến Hóa)
96
+ *Triển khai dự án lên Production và nâng cấp phiên bản lớn.*
97
+
98
+ ### 18. `qk-system-evolution` (Tiến Hóa Hệ Thống)
99
+ - **Mô tả:** Nâng cấp dependency (VD: Next 14 lên 15), phân tích rủi ro ảnh hưởng và thực thi nâng cấp an toàn không downtime.
100
+ - **Khi nào dùng:** Update version framework/thư viện.
101
+
102
+ ### 19. `qk-production-release` (Triển Khai Môi Trường)
103
+ - **Mô tả:** Viết Dockerfile, cấu hình CI/CD Pipelines (Github Actions), Deploy lên Cloud (AWS, Vercel).
104
+ - **Khi nào dùng:** Release sản phẩm cho người dùng cuối.
105
+
106
+ ---
107
+
108
+ ## 🤖 Lớp 6: AI Builder Layer (Tích hợp AI)
109
+
110
+ ### 20. `qk-ai-builder` (Xây Dựng AI App)
111
+ - **Mô tả:** Chuyên thiết kế và code các ứng dụng AI như RAG (Retrieval-Augmented Generation), Agent logic và Prompt Engineering.
112
+ - **Khi nào dùng:** Tích hợp LLM vào trong phần mềm của bạn.
113
+
114
+ ---
115
+
116
+ ## 📚 Lớp 7: Knowledge Layer (Tri Thức & Tài Liệu)
117
+ *Hệ thống tự học và viết tài liệu vĩ đại của OS.*
118
+
119
+ ### 21. `qk-docs` (Kỹ Sư Tài Liệu)
120
+ - **Mô tả:** Tự động sinh hoặc cập nhật tài liệu cho con người đọc: `README.md`, `CHANGELOG.md`, `API Docs`.
121
+ - **Khi nào dùng:** Nằm ở cuối quy trình sau khi hoàn thành tính năng.
122
+
123
+ ### 22. `qk-help` (Tra Cứu Nhanh)
124
+ - **Mô tả:** Cuốn từ điển sống. Cung cấp thông tin và hướng dẫn chi tiết (Pro-tips) về cách sử dụng toàn bộ hệ thống.
125
+ - **Khi nào dùng:** Bất kỳ khi nào người dùng cần hỗ trợ sử dụng hệ điều hành.
126
+
@@ -0,0 +1,40 @@
1
+ # Project Governance
2
+
3
+ This document serves as the "Constitution" for the AI Developer Skill OS. It dictates how the project evolves, when core files can be modified, and how versions are incremented.
4
+
5
+ ## 1. Core Philosophy
6
+ **Architecture-first, features-second.**
7
+ Before submitting any Pull Request, ask yourself:
8
+ 1. *Does this change require modifying the OS Kernel (`AGENTS.md`)?*
9
+ 2. *If not, can this be solved at the Skill, Knowledge, or Template layer?*
10
+
11
+ If the problem can be solved in a Skill, Knowledge document, or Template, **do not touch the Kernel**.
12
+
13
+ ## 2. When to modify `AGENTS.md` (The Kernel)
14
+ The Kernel is **frozen**. Modifications to `AGENTS.md` are strictly prohibited unless:
15
+ - The change introduces a fundamentally new paradigm for ALL agents (e.g., a completely new approach to token management).
16
+ - A critical, framework-breaking hallucination loop is discovered that cannot be solved via Skill guidelines.
17
+ - **Requirement:** Any modification to `AGENTS.md` MUST be accompanied by a new Architecture Decision Record (ADR).
18
+
19
+ ## 3. When to create an ADR (Architecture Decision Record)
20
+ ADRs (located in `docs/adr/`) must be created when:
21
+ - Modifying `AGENTS.md` or `SPEC.md`.
22
+ - Introducing a new lifecycle phase to the pipeline.
23
+ - Deprecating an existing core feature or standard tool.
24
+
25
+ ## 4. Definition of a "Breaking Change"
26
+ A change is considered **Breaking** if it:
27
+ - Alters the required YAML frontmatter contract in `SPEC.md`.
28
+ - Changes the fundamental routing logic or expected `behavior` / `intent` mappings.
29
+ - Removes an existing global policy that downstream agents rely on.
30
+
31
+ ## 5. Versioning Strategy (Semantic Versioning)
32
+ We strictly adhere to SemVer based on the framework's architecture, not just content.
33
+ - **MAJOR (e.g., v4.0.0 to v6.0.0):** Breaking changes to the Kernel (`AGENTS.md`), Metadata Contract (`SPEC.md`), or fundamental routing.
34
+ - **MINOR (e.g., v4.0.0 to v4.1.0):** Adding new Capabilities, new default Skills, new Knowledge docs, or new Templates.
35
+ - **PATCH (e.g., v4.0.0 to v4.0.1):** Fixing typos in docs, updating README, or minor bug fixes within an individual skill's SOP.
36
+
37
+ ## 6. PR Review Process
38
+ 1. **Architecture Compliance:** Does the PR violate the Kernel Freeze? Are all skills compliant with `SPEC.md`?
39
+ 2. **Documentation Consistency:** Are the changes reflected in `CHANGELOG.md`?
40
+ 3. **No Redundancy:** Ensure the PR does not re-introduce tool usage rules or verification overrides into individual skills.
@@ -0,0 +1,120 @@
1
+ # Hướng Dẫn Sử Dụng — AI Developer Skill OS
2
+
3
+ **Tác giả:** Quang Khánh
4
+ **Phiên bản:** v7.5.0 (Anti-Slop & Zero-Trust Architecture)
5
+
6
+ Chào mừng bạn đến với **AI Developer Skill OS**, hệ điều hành kỹ năng (Skill Framework) biến các trợ lý AI (Gemini, Antigravity, Claude Code, Cursor, Windsurf) từ một "cỗ máy sinh code" thành một **Senior Software Engineer / Chief Architect** thực thụ với khả năng tự học, tự kiểm toán và tự viết tài liệu.
7
+
8
+ ---
9
+
10
+ ## 1. Cơ chế hoạt động (Tại sao lại cần Skin/Skill này?)
11
+
12
+ Thông thường, khi bạn yêu cầu AI "Làm cho tôi tính năng X", AI sẽ nhảy ngay vào viết code. Điều này ở các dự án lớn thường dẫn đến: phá vỡ kiến trúc, tạo ra code rác, và không tuân thủ các component dùng chung.
13
+
14
+ Với hệ điều hành 22 Master Skills này:
15
+ 1. Bạn đưa ra yêu cầu thông qua **`qk-orchestrator`**.
16
+ 2. Hệ thống sẽ tự động gọi **`qk-context-loader`** để gom đúng file (tránh tràn ngữ cảnh).
17
+ 3. Kế tiếp, **`qk-engineering-standard`** sẽ gắn các "luật thép" (rules) của dự án vào ngữ cảnh.
18
+ 4. AI kích hoạt kỹ năng thực thi E2E như **`qk-feature-delivery`** để code và test trọn vẹn.
19
+ 5. Cuối cùng, **`qk-validation-gate`** chặn lại kiểm tra lỗi, trước khi giao cho **`qk-docs`** tự động cập nhật tài liệu.
20
+
21
+ ---
22
+
23
+ ## 2. Hướng dẫn cài đặt qua NPM (Khuyên dùng)
24
+
25
+ Bộ Skin này rất linh hoạt và được phân phối qua NPM để bạn có thể cài vào bất kỳ dự án nào cực kỳ nhanh chóng.
26
+
27
+ Mở terminal tại gốc dự án của bạn và chạy lệnh cài đặt tương ứng với công cụ AI bạn đang dùng:
28
+
29
+ ```bash
30
+ npx ai-developer-skill-os init
31
+ ```
32
+
33
+ Quá trình cài đặt sẽ hỏi bạn 2 câu quan trọng:
34
+
35
+ **Câu 1: Bạn đang dùng IDE nào?**
36
+ Hệ thống sẽ tự động tạo file cấu hình tương ứng (ví dụ `.cursorrules`, `.windsurfrules`, `.clinerules`) và bơm sẵn System Prompt vào để AI tự nhận diện các skill.
37
+
38
+ **Câu 2: Phạm vi cài đặt?**
39
+ - **(1) Local:** Cài vào thư mục `skills/` (hoặc `.agents/` cho Gemini) ngay trong dự án. Thích hợp cho làm việc nhóm.
40
+ - **(2) Global:** Cài thẳng vào ổ đĩa máy tính (Home Directory). Chỉ cài 1 lần, áp dụng cho mọi dự án.
41
+
42
+ > 💡 **Tính năng Tự động Dọn dẹp (Auto-Cleanup):** Mỗi khi cài đặt lại, hệ thống sẽ tự động quét và xóa sạch các kỹ năng phiên bản cũ để tối ưu dung lượng và tránh xung đột cho máy tính của bạn. Mọi thứ hoàn toàn tự động!
43
+
44
+ ### Cấu hình thủ công (Dành cho IDE / CLI cụ thể)
45
+
46
+ #### Cho Gemini IDE / Antigravity
47
+ **Không cần cấu hình gì thêm!** Hệ thống tự nhận diện các file trong `.agents/` hoặc thư mục cấu hình toàn cục.
48
+
49
+ #### Cho Cursor / Windsurf (AI Code Editors)
50
+ Tạo file `.cursorrules` hoặc `.windsurfrules` ở gốc dự án:
51
+ ```md
52
+ # AI Developer Skill OS by Quang Khánh
53
+
54
+ When answering or generating code, you MUST act as an expert engineer using the skills defined in `./skills.json`.
55
+ Bất cứ khi nào người dùng gõ lệnh `./qk-[tên-skill]`, bạn BẮT BUỘC phải đọc file `SKILL.md` tương ứng trong thư mục `./skills/` trước khi thực hiện.
56
+ Speak to me in Vietnamese, but write all code in English.
57
+ ```
58
+
59
+ #### Cho Claude Code / Kilo Code (CLI Agents)
60
+ Tạo file `CLAUDE.md` (hoặc `KILO.md`) ở gốc dự án và dán đoạn sau vào:
61
+ ```md
62
+ # System Instructions
63
+ Bạn đang chạy bằng **AI Developer Skill OS** (Tác giả: Quang Khánh).
64
+
65
+ Vui lòng tìm đọc danh sách kỹ năng tại file `./skills.json`.
66
+ ĐẶC BIỆT LƯU Ý: Bất cứ khi nào người dùng gõ lệnh bắt đầu bằng `./qk-[tên-skill]`, bạn BẮT BUỘC phải gọi và đọc nội dung file `SKILL.md` tương ứng trong thư mục `./skills/` trước khi phân tích hoặc viết code.
67
+ ```
68
+
69
+ ---
70
+
71
+ ## 3. Cách kiểm tra cài đặt thành công
72
+
73
+ Để biết AI của bạn đã thực sự "nhập môn" bộ AI-OS này chưa, hãy mở khung chat AI trong dự án và gõ cú pháp lệnh:
74
+ > **`./qk-help`** Hãy liệt kê cho tôi các khối kỹ năng của hệ thống.
75
+
76
+ ✅ **Thành công:** Nếu AI trả lời bằng tiếng Việt, liệt kê đúng mô hình 7 Lớp (Foundation, UI, Development, Quality, Evolution, Operation, AI, Knowledge).
77
+ ❌ **Thất bại:** Nếu AI trả lời chung chung, bạn cần kiểm tra lại đường dẫn file cấu hình ở bước trên.
78
+
79
+ ---
80
+
81
+ ## 4. Cách gọi lệnh Skill chuyên nghiệp (Usage)
82
+
83
+ AI sẽ tự động nhận diện skill qua ngữ cảnh, nhưng cách chuyên nghiệp và tiết kiệm thời gian nhất là bạn sử dụng cú pháp: **`./qk-[tên-skill]`**
84
+
85
+ Dưới đây là các câu lệnh (prompt) mẫu cực kỳ hiệu quả mà bạn nên dùng:
86
+
87
+ ### 🎯 Ví dụ 1: Giao phó tổng thể (Orchestrator)
88
+ > **`./qk-orchestrator`** Tôi muốn thêm tính năng Đăng nhập bằng Google. Hãy lên kế hoạch và gọi các skill cần thiết để thực hiện từ A-Z.
89
+
90
+ ### 🎯 Ví dụ 2: Phát triển Tính năng E2E (Feature Delivery)
91
+ > **`./qk-feature-delivery`** Hãy tạo màn hình Dashboard thống kê doanh thu. Lưu ý cập nhật Database, tạo API và dùng UI Component có sẵn.
92
+
93
+ ### 🎯 Ví dụ 3: Fix lỗi cứng đầu (Bug Resolution)
94
+ > **`./qk-bug-resolution`** Code đang bị crash với lỗi `Hydration error`. Hãy tìm Root Cause, sửa an toàn và đảm bảo viết Regression Test để chống hồi quy.
95
+
96
+ ### 🎯 Ví dụ 4: Xây dựng Giao diện (UI System Builder)
97
+ > **`./qk-ui-system-builder`** Hãy tạo cho tôi một Data Table Component có hỗ trợ phân trang và filter, sử dụng Design Token của dự án. Không viết inline CSS rác.
98
+
99
+ ### 🎯 Ví dụ 5: Audit & Tối ưu (Project Health)
100
+ > **`./qk-project-health`** Hãy kiểm tra nhanh cho tôi thư mục `src/components/` xem có bị Code Smell hoặc vi phạm Architecture không.
101
+
102
+ ---
103
+
104
+ ## 💡 5. Mẹo & Workflow Thực Chiến (Best Practices)
105
+
106
+ Để khai thác tối đa sức mạnh của 22 kỹ năng, bí quyết là **tin tưởng vào chuỗi Handoff tự động** của hệ thống thay vì phải gọi từng lệnh nhỏ lẻ.
107
+
108
+ ### 🌟 Bắt đầu một tính năng hoàn toàn mới
109
+ Thay vì bảo AI tạo từng file, hãy yêu cầu một lần:
110
+ * `> Hãy dùng ./qk-feature-delivery để tạo chức năng Giỏ hàng (Cart).`
111
+ Hệ thống sẽ tự động đi từ DB -> API -> UI và đẩy sang `qk-validation-gate` để kiểm tra lỗi.
112
+
113
+ ### 🌟 Khi dự án bắt đầu lộn xộn
114
+ * `> Hãy chạy ./qk-project-health để kiểm tra toàn bộ nợ kỹ thuật (Tech Debt). Sau đó hãy dùng ./qk-docs để cập nhật lại cấu trúc thư mục mới nhất vào README.`
115
+
116
+ ### 🌟 Chống "Phá Code" (Safe Refactor)
117
+ Trước khi đổi một cấu trúc lớn, hãy bắt AI dò mìn:
118
+ * `> Hãy dùng ./qk-system-evolution để phân tích tầm ảnh hưởng (Impact Analysis) nếu tôi cập nhật Next.js lên phiên bản 15.`
119
+
120
+ 👉 Chúc bạn tận hưởng cảm giác code như một Chief Architect thực thụ!