ai-developer-skill-os 7.5.1 → 8.1.4

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 (300) hide show
  1. package/.agents/docs/ARCHITECTURE.md +156 -0
  2. package/.agents/docs/MIGRATION-CLEANUP-V8.1.3.md +36 -0
  3. package/.agents/docs/MIGRATION-STATUS.md +35 -0
  4. package/.agents/docs/MIGRATION-V8.md +10 -0
  5. package/.agents/docs/ROADMAP-V8.2.md +78 -0
  6. package/.agents/docs/V8-CERTIFICATION.md +27 -0
  7. package/.agents/docs/VERSIONING.md +95 -0
  8. package/.agents/docs/decisions/ADR-001-v8-migration.md +58 -0
  9. package/.agents/docs/decisions/ADR-002-workflow-separation.md +50 -0
  10. package/.agents/docs/decisions/ADR-003-registry-generated.md +54 -0
  11. package/.agents/docs/decisions/ADR-008-skill-boundary-review.md +27 -0
  12. package/.agents/docs/schemas/learning.schema.yml +69 -0
  13. package/.agents/docs/schemas/skill.schema.yml +188 -0
  14. package/.agents/docs/schemas/workflow.schema.yml +33 -0
  15. package/.agents/knowledge/design-intelligence/industries/ecommerce.md +3 -0
  16. package/.agents/knowledge/design-intelligence/industries/fintech.md +3 -0
  17. package/.agents/knowledge/design-intelligence/industries/healthcare.md +3 -0
  18. package/.agents/learnings/draft/README.md +37 -0
  19. package/.agents/registry/capability-graph.yml +500 -0
  20. package/.agents/registry/skills-index.yml +525 -0
  21. package/.agents/reports/RELEASE-CHECKLIST.md +29 -0
  22. package/.agents/reports/architecture-audit.md +13 -0
  23. package/.agents/reports/graph-health.md +20 -0
  24. package/.agents/reports/skill-audit.md +215 -0
  25. package/.agents/rules/coding.md +102 -0
  26. package/.agents/rules/command-safety.md +21 -0
  27. package/.agents/rules/global.md +135 -0
  28. package/.agents/rules/priorities.yml +24 -0
  29. package/.agents/rules/safety.md +84 -0
  30. package/.agents/rules/security.md +13 -0
  31. package/.agents/rules/skill-quality.md +14 -0
  32. package/.agents/skills/_template/SKILL.md +132 -0
  33. package/.agents/skills/qk-access-policy/SKILL.md +61 -5
  34. package/.agents/skills/qk-agent-observability/SKILL.md +73 -0
  35. package/.agents/skills/qk-ai-builder/SKILL.md +62 -5
  36. package/.agents/skills/qk-api-lifecycle/SKILL.md +59 -6
  37. package/.agents/skills/qk-bug-resolution/SKILL.md +64 -6
  38. package/.agents/skills/qk-context-loader/SKILL.md +63 -11
  39. package/.agents/skills/qk-data-lifecycle/SKILL.md +61 -5
  40. package/.agents/skills/qk-db-optimizer/SKILL.md +61 -5
  41. package/.agents/skills/qk-design-system-engineering/SKILL.md +112 -0
  42. package/.agents/skills/qk-devops-platform/SKILL.md +117 -0
  43. package/.agents/skills/qk-docs/SKILL.md +62 -6
  44. package/.agents/skills/qk-engineering-standard/SKILL.md +62 -12
  45. package/.agents/skills/qk-fe-api-integration/SKILL.md +60 -6
  46. package/.agents/skills/qk-feature-delivery/SKILL.md +65 -6
  47. package/.agents/skills/qk-frontend-architecture/SKILL.md +134 -0
  48. package/.agents/skills/qk-help/SKILL.md +245 -193
  49. package/.agents/skills/qk-orchestrator/SKILL.md +64 -11
  50. package/.agents/skills/qk-orchestrator/references/routing-table.md +1 -1
  51. package/.agents/skills/qk-product-specification/SKILL.md +130 -0
  52. package/.agents/skills/qk-production-release/SKILL.md +59 -6
  53. package/.agents/skills/qk-project-bootstrap/SKILL.md +66 -6
  54. package/.agents/skills/qk-project-health/SKILL.md +63 -6
  55. package/.agents/skills/qk-project-memory/SKILL.md +63 -6
  56. package/.agents/skills/qk-security-audit/SKILL.md +135 -0
  57. package/.agents/skills/qk-system-evolution/SKILL.md +63 -12
  58. package/.agents/skills/qk-test-engineering/SKILL.md +139 -0
  59. package/.agents/skills/qk-ui-audit/SKILL.md +60 -6
  60. package/.agents/skills/qk-ui-builder/SKILL.md +509 -446
  61. package/.agents/skills/qk-ui-system-builder/SKILL.md +61 -5
  62. package/.agents/skills/qk-validation-gate/SKILL.md +63 -11
  63. package/.agents/skills/qk-web-quality-gate/SKILL.md +114 -0
  64. package/.agents/workflows/_schema.yml +109 -0
  65. package/.agents/workflows/bug-resolution.yml +101 -0
  66. package/.agents/workflows/code-review.yml +77 -0
  67. package/.agents/workflows/documentation.yml +75 -0
  68. package/.agents/workflows/feature-delivery.yml +103 -0
  69. package/.agents/workflows/refactor.yml +81 -0
  70. package/.agents/workflows/research.yml +60 -0
  71. package/.agents/workflows/security-audit.yml +72 -0
  72. package/.agents/workflows/skill-evolution.yml +65 -0
  73. package/.agents/workflows/spec-driven-development.yml +57 -0
  74. package/CHANGELOG.md +91 -70
  75. package/README.md +44 -59
  76. package/bin/install.js +57 -309
  77. package/package.json +13 -2
  78. package/tooling/generate-evaluation-cases.cjs +44 -0
  79. package/tooling/generate-registry.js +157 -0
  80. package/tooling/run-aar.js +143 -0
  81. package/tooling/validate-graph.js +87 -0
  82. package/tooling/validate-skills.js +102 -0
  83. package/.agents/skills.json +0 -819
  84. package/.github/workflows/ci.yml +0 -56
  85. package/CLAUDE.md +0 -110
  86. package/_template/BEHAVIOR_SPEC.md +0 -96
  87. package/_template/examples/example-en.md +0 -49
  88. package/_template/examples/example-vi.md +0 -49
  89. package/add_lang.js +0 -21
  90. package/add_lang.py +0 -25
  91. package/add_sections.py +0 -53
  92. package/bin/lint.js +0 -123
  93. package/docs/CHI_TIET_SKILLS.md +0 -126
  94. package/docs/GOVERNANCE.md +0 -40
  95. package/docs/HUONG_DAN_SU_DUNG.md +0 -120
  96. package/docs/SPEC.md +0 -87
  97. package/docs/adr/0001-intent-based-architecture.md +0 -19
  98. package/docs/adr/0002-kernel-freeze.md +0 -21
  99. package/docs/adr/0003-risk-based-verification.md +0 -20
  100. package/docs/adr/0004-progressive-evidence.md +0 -19
  101. package/docs/skill-classification.md +0 -25
  102. package/fix_seeds.js +0 -22
  103. package/framework/KERNEL.md +0 -83
  104. package/framework/bias-library/cosmetic-refactor.md +0 -21
  105. package/framework/bias-library/enterprise-crud.md +0 -21
  106. package/framework/bias-library/fake-ui-slop.md +0 -20
  107. package/framework/bias-library/hallucinated-tools.md +0 -20
  108. package/framework/bias-library/missing-ui-states.md +0 -19
  109. package/framework/bias-library/over-indexing.md +0 -20
  110. package/framework/bias-library/swallow-errors.md +0 -19
  111. package/framework/bias-library/ui-only-security.md +0 -17
  112. package/framework/decision-primitives.md +0 -48
  113. package/framework/dial-library/complexity-budget.md +0 -13
  114. package/framework/dial-library/granularity.md +0 -13
  115. package/framework/dial-library/optimization-strategy.md +0 -13
  116. package/framework/dial-library/strictness.md +0 -13
  117. package/framework/rule-library/delegation-only.md +0 -9
  118. package/framework/rule-library/minimal-diff.md +0 -9
  119. package/framework/skill-schema.md +0 -310
  120. package/knowledge/backend/nodejs.md +0 -52
  121. package/knowledge/frontend/react.md +0 -81
  122. package/migrate-to-v6.js +0 -130
  123. package/migrate.js +0 -147
  124. package/migrate.py +0 -133
  125. package/migrate_all.cjs +0 -96
  126. package/patch.js +0 -15
  127. package/patch.py +0 -89
  128. package/patch2.py +0 -83
  129. package/rename.js +0 -64
  130. package/skills/_archive_old_skills/qk-accessibility-audit/SKILL.md +0 -121
  131. package/skills/_archive_old_skills/qk-agent-orchestrator/SKILL.md +0 -179
  132. package/skills/_archive_old_skills/qk-api-integration/SKILL.md +0 -389
  133. package/skills/_archive_old_skills/qk-auth-security/SKILL.md +0 -96
  134. package/skills/_archive_old_skills/qk-backend-architecture/SKILL.md +0 -125
  135. package/skills/_archive_old_skills/qk-bug-fix/SKILL.md +0 -213
  136. package/skills/_archive_old_skills/qk-component-generator/SKILL.md +0 -136
  137. package/skills/_archive_old_skills/qk-context-manager/SKILL.md +0 -175
  138. package/skills/_archive_old_skills/qk-database-engineer/SKILL.md +0 -104
  139. package/skills/_archive_old_skills/qk-deployment/SKILL.md +0 -96
  140. package/skills/_archive_old_skills/qk-design-system/SKILL.md +0 -137
  141. package/skills/_archive_old_skills/qk-form-builder/SKILL.md +0 -140
  142. package/skills/_archive_old_skills/qk-frontend-architecture/SKILL.md +0 -155
  143. package/skills/_archive_old_skills/qk-frontend-debug/SKILL.md +0 -133
  144. package/skills/_archive_old_skills/qk-frontend-performance/SKILL.md +0 -129
  145. package/skills/_archive_old_skills/qk-frontend-testing/SKILL.md +0 -146
  146. package/skills/_archive_old_skills/qk-git-engineer/SKILL.md +0 -304
  147. package/skills/_archive_old_skills/qk-help/SKILL.md +0 -68
  148. package/skills/_archive_old_skills/qk-migration/SKILL.md +0 -284
  149. package/skills/_archive_old_skills/qk-project-audit/SKILL.md +0 -280
  150. package/skills/_archive_old_skills/qk-refactor/SKILL.md +0 -222
  151. package/skills/_archive_old_skills/qk-state-management/SKILL.md +0 -140
  152. package/skills/_archive_old_skills/qk-table-crud-generator/SKILL.md +0 -127
  153. package/skills/_archive_old_skills/qk-ui-builder/SKILL.md +0 -152
  154. package/skills/_template/SKILL.md +0 -239
  155. package/skills/qk-access-policy/SKILL.md +0 -180
  156. package/skills/qk-ai-builder/SKILL.md +0 -216
  157. package/skills/qk-api-lifecycle/SKILL.md +0 -177
  158. package/skills/qk-bug-resolution/SKILL.md +0 -308
  159. package/skills/qk-context-loader/SKILL.md +0 -219
  160. package/skills/qk-data-lifecycle/SKILL.md +0 -193
  161. package/skills/qk-db-optimizer/SKILL.md +0 -197
  162. package/skills/qk-docs/SKILL.md +0 -199
  163. package/skills/qk-engineering-standard/SKILL.md +0 -352
  164. package/skills/qk-engineering-standard/rules/backend.md +0 -122
  165. package/skills/qk-engineering-standard/rules/database.md +0 -3
  166. package/skills/qk-engineering-standard/rules/frontend.md +0 -152
  167. package/skills/qk-engineering-standard/rules/security.md +0 -3
  168. package/skills/qk-engineering-standard/rules/testing.md +0 -3
  169. package/skills/qk-fe-api-integration/SKILL.md +0 -327
  170. package/skills/qk-feature-delivery/SKILL.md +0 -306
  171. package/skills/qk-help/SKILL.md +0 -194
  172. package/skills/qk-orchestrator/SKILL.md +0 -279
  173. package/skills/qk-orchestrator/references/routing-table.md +0 -78
  174. package/skills/qk-production-release/SKILL.md +0 -285
  175. package/skills/qk-project-bootstrap/SKILL.md +0 -236
  176. package/skills/qk-project-health/SKILL.md +0 -200
  177. package/skills/qk-project-memory/SKILL.md +0 -219
  178. package/skills/qk-system-evolution/SKILL.md +0 -282
  179. package/skills/qk-ui-audit/SKILL.md +0 -316
  180. package/skills/qk-ui-audit/references/anti-slop-checklist.md +0 -136
  181. package/skills/qk-ui-builder/SKILL.md +0 -447
  182. package/skills/qk-ui-builder/references/anti-patterns.md +0 -295
  183. package/skills/qk-ui-builder/references/color.md +0 -115
  184. package/skills/qk-ui-builder/references/component-cookbook.md +0 -1194
  185. package/skills/qk-ui-builder/references/copy.md +0 -250
  186. package/skills/qk-ui-builder/references/interaction-and-states.md +0 -115
  187. package/skills/qk-ui-builder/references/layout-and-space.md +0 -111
  188. package/skills/qk-ui-builder/references/macrostructures/01-bento-grid.md +0 -48
  189. package/skills/qk-ui-builder/references/macrostructures/02-long-document.md +0 -50
  190. package/skills/qk-ui-builder/references/macrostructures/03-marquee-hero.md +0 -51
  191. package/skills/qk-ui-builder/references/macrostructures/04-stat-led.md +0 -49
  192. package/skills/qk-ui-builder/references/macrostructures/05-workbench.md +0 -44
  193. package/skills/qk-ui-builder/references/macrostructures/06-conversational-faq.md +0 -50
  194. package/skills/qk-ui-builder/references/macrostructures/07-manifesto.md +0 -51
  195. package/skills/qk-ui-builder/references/macrostructures/08-photographic.md +0 -50
  196. package/skills/qk-ui-builder/references/macrostructures/09-quote-led.md +0 -50
  197. package/skills/qk-ui-builder/references/macrostructures/11-catalogue.md +0 -49
  198. package/skills/qk-ui-builder/references/macrostructures/12-letter.md +0 -49
  199. package/skills/qk-ui-builder/references/macrostructures/13-index-first.md +0 -49
  200. package/skills/qk-ui-builder/references/macrostructures/14-narrative-workflow.md +0 -48
  201. package/skills/qk-ui-builder/references/macrostructures/15-split-studio.md +0 -48
  202. package/skills/qk-ui-builder/references/macrostructures/16-feature-stack.md +0 -51
  203. package/skills/qk-ui-builder/references/macrostructures/17-type-specimen.md +0 -48
  204. package/skills/qk-ui-builder/references/macrostructures/18-portfolio-grid.md +0 -48
  205. package/skills/qk-ui-builder/references/macrostructures/19-map-diagram.md +0 -50
  206. package/skills/qk-ui-builder/references/macrostructures/20-ecosystem-index.md +0 -48
  207. package/skills/qk-ui-builder/references/macrostructures/21-component-playground.md +0 -45
  208. package/skills/qk-ui-builder/references/macrostructures.md +0 -38
  209. package/skills/qk-ui-builder/references/motion.md +0 -95
  210. package/skills/qk-ui-builder/references/responsive.md +0 -115
  211. package/skills/qk-ui-builder/references/slop-test.md +0 -135
  212. package/skills/qk-ui-builder/references/structure.md +0 -280
  213. package/skills/qk-ui-builder/references/themes/atmospheric.md +0 -53
  214. package/skills/qk-ui-builder/references/themes/carnival.md +0 -52
  215. package/skills/qk-ui-builder/references/themes/cobalt.md +0 -52
  216. package/skills/qk-ui-builder/references/themes/editorial.md +0 -52
  217. package/skills/qk-ui-builder/references/themes/garden.md +0 -52
  218. package/skills/qk-ui-builder/references/themes/hum.md +0 -52
  219. package/skills/qk-ui-builder/references/themes/lumen.md +0 -52
  220. package/skills/qk-ui-builder/references/themes/midnight.md +0 -52
  221. package/skills/qk-ui-builder/references/themes/modern-minimal.md +0 -52
  222. package/skills/qk-ui-builder/references/themes/playful.md +0 -52
  223. package/skills/qk-ui-builder/references/themes/specimen.md +0 -52
  224. package/skills/qk-ui-builder/references/themes/terminal.md +0 -52
  225. package/skills/qk-ui-builder/references/typography.md +0 -129
  226. package/skills/qk-ui-system-builder/SKILL.md +0 -222
  227. package/skills/qk-validation-gate/SKILL.md +0 -360
  228. package/skills.json +0 -820
  229. package/specs/contracts/behavior-contract.yaml +0 -40
  230. package/specs/expectations/qk-bug-resolution.yaml +0 -35
  231. package/specs/fixtures/user-payload.json +0 -12
  232. package/specs/regressions/api-integration-null-fields.yaml +0 -19
  233. package/specs/scenarios/fix-login-nullref.yaml +0 -3
  234. package/taste-skill/.claude-plugin/marketplace.json +0 -20
  235. package/taste-skill/.claude-plugin/plugin.json +0 -19
  236. package/taste-skill/.github/FUNDING.yml +0 -1
  237. package/taste-skill/.github/copilot-instructions.md +0 -11
  238. package/taste-skill/CHANGELOG.md +0 -111
  239. package/taste-skill/LICENSE +0 -21
  240. package/taste-skill/README.md +0 -212
  241. package/taste-skill/assets/.gitkeep +0 -0
  242. package/taste-skill/assets/readme-banner.webp +0 -0
  243. package/taste-skill/assets/readme-buttons/btn-agent-skills.webp +0 -0
  244. package/taste-skill/assets/readme-buttons/btn-changelog.webp +0 -0
  245. package/taste-skill/assets/readme-buttons/btn-mit.webp +0 -0
  246. package/taste-skill/assets/readme-buttons/btn-site.webp +0 -0
  247. package/taste-skill/assets/readme-buttons/btn-tools.webp +0 -0
  248. package/taste-skill/assets/readme-cta-tasteskill.svg +0 -5
  249. package/taste-skill/assets/sponsors/animations-dev.webp +0 -0
  250. package/taste-skill/assets/sponsors/emil-animations-dev.webp +0 -0
  251. package/taste-skill/assets/taste-skill-logo.png +0 -0
  252. package/taste-skill/assets/taste-skill-logo.webp +0 -0
  253. package/taste-skill/assets/vercel-oss-program-badge.svg +0 -44
  254. package/taste-skill/examples/floria-bottom.webp +0 -0
  255. package/taste-skill/examples/floria-full.webp +0 -0
  256. package/taste-skill/examples/floria-top.webp +0 -0
  257. package/taste-skill/research/README.md +0 -8
  258. package/taste-skill/research/laziness/README.md +0 -25
  259. package/taste-skill/research/laziness/findings/empirical-results.md +0 -58
  260. package/taste-skill/research/laziness/findings/references.md +0 -20
  261. package/taste-skill/research/laziness/remediation/architectural-patterns.md +0 -55
  262. package/taste-skill/research/laziness/remediation/parameter-tuning.md +0 -44
  263. package/taste-skill/research/laziness/remediation/prompt-engineering.md +0 -52
  264. package/taste-skill/research/laziness/remediation/reference-prompts.md +0 -79
  265. package/taste-skill/research/laziness/root-causes/cognitive-shortcuts.md +0 -23
  266. package/taste-skill/research/laziness/root-causes/output-limits.md +0 -39
  267. package/taste-skill/research/laziness/root-causes/rlhf-and-compute.md +0 -27
  268. package/taste-skill/research/laziness/root-causes/training-data-bias.md +0 -28
  269. package/taste-skill/scripts/build-emil-sponsor-row.mjs +0 -41
  270. package/taste-skill/scripts/convert-readme-assets-webp.mjs +0 -142
  271. package/taste-skill/scripts/process-readme-buttons.mjs +0 -108
  272. package/taste-skill/scripts/process-sponsor-badge.mjs +0 -83
  273. package/taste-skill/skill.sh +0 -25
  274. package/taste-skill/skills/brandkit/SKILL.md +0 -798
  275. package/taste-skill/skills/brutalist-skill/SKILL.md +0 -92
  276. package/taste-skill/skills/gpt-tasteskill/SKILL.md +0 -74
  277. package/taste-skill/skills/image-to-code-skill/SKILL.md +0 -1228
  278. package/taste-skill/skills/imagegen-frontend-mobile/SKILL.md +0 -1465
  279. package/taste-skill/skills/imagegen-frontend-web/SKILL.md +0 -987
  280. package/taste-skill/skills/llms.txt +0 -13
  281. package/taste-skill/skills/minimalist-skill/SKILL.md +0 -85
  282. package/taste-skill/skills/output-skill/SKILL.md +0 -49
  283. package/taste-skill/skills/redesign-skill/SKILL.md +0 -178
  284. package/taste-skill/skills/soft-skill/SKILL.md +0 -98
  285. package/taste-skill/skills/stitch-skill/DESIGN.md +0 -121
  286. package/taste-skill/skills/stitch-skill/SKILL.md +0 -184
  287. package/taste-skill/skills/taste-skill/SKILL.md +0 -1206
  288. package/taste-skill/skills/taste-skill-v1/SKILL.md +0 -226
  289. package/temp_fix.js +0 -61
  290. package/templates/DESIGN.md +0 -38
  291. package/templates/bug-report.md +0 -21
  292. package/templates/design-report.md +0 -21
  293. package/templates/feature-report.md +0 -20
  294. package/templates/review-report.md +0 -21
  295. package/templates/skill-template.md +0 -38
  296. package/tests/behavior-conformance.test.js +0 -154
  297. package/tests/install-script.test.js +0 -38
  298. package/tests/registry.test.js +0 -111
  299. package/update_template.js +0 -28
  300. package/vitest.config.js +0 -11
package/README.md CHANGED
@@ -1,74 +1,52 @@
1
- # 🚀 AI Developer Skill OS (ai-developer-skill-os) v7.5.1
1
+ # 🚀 AI Developer Skill OS (ai-developer-skill-os) v8.1.4
2
2
 
3
- > **v7.5.1 "Anti-Slop & Zero-Trust Architecture"**
3
+ > **v8.1.4 "Agent Engineering OS + Design Intelligence"**
4
4
 
5
- Hệ sinh thái AI Developer Skill OS đã được tái cấu trúc hoàn toàn. Thay 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 Hệ thống (50 năm kinh nghiệm)**.
5
+ Hệ sinh thái AI Developer Skill OS đã lột xác hoàn toàn. Từ một bộ "công cụ phân tán" (Toolbox) ở V7, phiên bản V8.1.4 được thiết kế như một **Hệ điều hành khép kín (Agent Engineering OS)**, sở hữu năng lực giám sát, bảo vệ ranh giới quyết định (Decision Boundaries) được trang bị thêm tầng **Design Intelligence**.
6
6
 
7
7
  ---
8
8
 
9
- ## 🏗️ Triết Lý Hoạt Động Cốt Lõi (V7 Kernel)
9
+ ## 🏗️ Triết Lý Hoạt Động Cốt Lõi (V8 Kernel)
10
10
 
11
- ### 1. Zero-Trust Context (Không bao giờ đoán mò)
12
- Mọi kỹ năng phân tích logic backend (như `qk-feature-delivery`, `qk-orchestrator`) đều bị khoá chặt, không được phép hoạt động nếu chưa **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.
11
+ ### 1. Decision Boundary (Ranh giới Thẩm quyền)
12
+ Không còn tình trạng một Skill ôm đồm mọi việc. Mọi Skill (Kỹ năng) hiện tại bị quản bởi các trường `owns`, `does_not_own`, `conflicts_with`, `delegates_to`. Thợ code UI (`qk-ui-builder`) không được phép tự ra quyết định kiến trúc, ngược lại.
13
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`).
14
+ ### 2. Design Intelligence Layer
15
+ Khắc phục điểm yếu "mù thẩm mỹ" của AI. Agent giờ đây không chỉ biết code còn có Gu Thẩm Mỹ (Design Taste). Dựa trên yêu cầu của bạn, hệ thống tự động tra cứu **Knowledge Graph** để chọn đúng Theme (Fintech, Healthcare, SaaS...), Typography Visual Patterns trước khi giao việc cho UI Builder.
18
16
 
19
- ### 3. Repair Loop (Chu trình Sửa Lỗi Khép Kín)
20
- Bảo vệ 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`).
17
+ ### 3. Khế Ước Đi Đầu (Contract-First & Zero-Trust)
18
+ - **Frontend / UI**: Mọi sửa đổi phải tuân thủ Design System (được `qk-design-system-engineering` kiểm duyệt).
19
+ - **Backend / API**: Phải viết OpenAPI/Swagger contract trước (`qk-api-lifecycle`).
20
+ - **Data**: Cấm AI tự đoán cấu trúc DB, mọi truy vấn phải có Schema (`qk-data-lifecycle`).
21
21
 
22
22
  ---
23
23
 
24
- ## 🧩 Danh sách 22 Master Skills
24
+ ## 🧩 Danh sách 30 Master Skills
25
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`
26
+ Các kỹ năng được quản lý bằng **Capability Graph** được đánh giá liên tục thông qua Evaluation Suite. Bao gồm 7 lĩnh vực:
27
+ 1. **Core & Orchestration:** `qk-orchestrator`, `qk-context-loader`, `qk-project-memory`, `qk-help`
28
+ 2. **Product & Architecture:** `qk-product-specification`, `qk-project-bootstrap`, `qk-frontend-architecture`
29
+ 3. **Frontend & UI:** `qk-design-system-engineering`, `qk-ui-system-builder`, `qk-ui-builder`, `qk-fe-api-integration`, `qk-ui-audit`
30
+ 4. **Backend & Data:** `qk-api-lifecycle`, `qk-data-lifecycle`, `qk-access-policy`
31
+ 5. **Engineering & Delivery:** `qk-feature-delivery`, `qk-bug-resolution`, `qk-engineering-standard`, `qk-system-evolution`, `qk-docs`
32
+ 6. **Quality & Testing:** `qk-test-engineering`, `qk-validation-gate`, `qk-web-quality-gate`, `qk-project-health`
33
+ 7. **Security, DevOps & Analytics:** `qk-security-audit`, `qk-db-optimizer`, `qk-devops-platform`, `qk-production-release`, `qk-agent-observability`, `qk-ai-builder`
32
34
 
33
35
  ---
34
36
 
35
37
  ## 💻 Cách Cài Đặt (Installation)
36
38
 
37
- ### Cách 1: NPM Global (Khuyên dùng cho nhiều máy)
39
+ ### Cách 1: NXP (Không cần cài global) - MỚI
38
40
  ```bash
39
- npm i -g ai-developer-skill-os
41
+ npx ai-developer-skill-os init
40
42
  ```
41
43
 
42
- ### Cách 2: NXP (Không cần cài global)
44
+ ### Cách 2: NPM Global (Khuyên dùng cho cá nhân)
43
45
  ```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
46
+ npm i -g ai-developer-skill-os
61
47
  ```
62
48
 
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
-
49
+ ### Chạy bằng tham số (Command Line Arguments)
72
50
  ```bash
73
51
  # Cài Antigravity Global (toàn máy)
74
52
  npx ai-developer-skill-os init --ide=antigravity --scope=2
@@ -78,24 +56,31 @@ npx ai-developer-skill-os init --ide=antigravity --scope=1
78
56
 
79
57
  # Cài Cursor Local
80
58
  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
59
  ```
85
60
 
86
- ## 🧪 Testing
61
+ ## 📦 Các IDE/AI Assistant Được Hỗ Trợ
62
+ - (1) Cursor
63
+ - (2) Windsurf
64
+ - (3) Cline / Roo Code
65
+ - (4) Antigravity / Gemini
66
+ - (5) Codex
67
+ - (6) Kilo Code
87
68
 
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:
69
+ ---
70
+
71
+ ## 🧪 Đánh Giá Tự Động (Agent Evaluation)
72
+
73
+ Hệ thống đi kèm một bộ Runner nội bộ để kiểm toán **Routing Intelligence**. Bất kỳ cập nhật nào vào hệ thống Kỹ năng đều phải vượt qua bài kiểm tra hóc búa (Bypass Security, Boundary Attacks, Ambiguous Prompts):
89
74
 
90
75
  ```bash
91
- npm test
76
+ npm run test:agent
77
+ npm run test:graph
78
+ npm run test:registry
92
79
  ```
93
80
 
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:
81
+ ## 🚀 Hướng Dẫn Sử Dụng
82
+ Sau khi cài đặt thành công, hãy gõ lệnh:
97
83
  ```bash
98
84
  ./qk-help
99
85
  ```
100
-
101
-
86
+ để kích hoạt AI Orchestrator và khám phá sức mạnh của hệ điều hành!
package/bin/install.js CHANGED
@@ -3,29 +3,39 @@
3
3
  import fs from 'fs';
4
4
  import path from 'path';
5
5
  import readline from 'readline';
6
- import os from 'os';
7
6
  import { fileURLToPath } from 'url';
7
+ import os from 'os';
8
8
 
9
9
  const __filename = fileURLToPath(import.meta.url);
10
10
  const __dirname = path.dirname(__filename);
11
+ const sourceDir = path.resolve(__dirname, '..', '.agents');
12
+ const cwd = process.cwd();
13
+
14
+ function parseArgs() {
15
+ const args = process.argv.slice(2);
16
+ let ide = null;
17
+ let scope = null;
11
18
 
12
- const sourceDir = path.join(__dirname, '..');
19
+ args.forEach(arg => {
20
+ if (arg.startsWith('--ide=')) {
21
+ ide = arg.split('=')[1];
22
+ } else if (arg.startsWith('--scope=')) {
23
+ scope = arg.split('=')[1];
24
+ }
25
+ });
26
+
27
+ return { ide, scope };
28
+ }
13
29
 
14
30
  function copyRecursiveSync(src, dest) {
15
31
  const exists = fs.existsSync(src);
16
32
  const stats = exists && fs.statSync(src);
17
33
  const isDirectory = exists && stats.isDirectory();
18
-
19
34
  if (isDirectory) {
20
- const dirName = path.basename(src);
21
- if (dirName.startsWith('_')) {
22
- return;
23
- }
24
-
25
35
  if (!fs.existsSync(dest)) {
26
36
  fs.mkdirSync(dest, { recursive: true });
27
37
  }
28
- fs.readdirSync(src).forEach(function(childItemName) {
38
+ fs.readdirSync(src).forEach(function (childItemName) {
29
39
  copyRecursiveSync(path.join(src, childItemName), path.join(dest, childItemName));
30
40
  });
31
41
  } else {
@@ -33,317 +43,56 @@ function copyRecursiveSync(src, dest) {
33
43
  }
34
44
  }
35
45
 
36
- function cleanOldSkills(targetSkillsDir, isGeminiGlobal) {
37
- if (fs.existsSync(targetSkillsDir)) {
38
- console.log('🧹 Đang dọn dẹp phiên bản cũ để tối ưu hệ thống...');
39
- if (isGeminiGlobal) {
40
- fs.readdirSync(targetSkillsDir).forEach(item => {
41
- if (item.startsWith('qk-')) {
42
- fs.rmSync(path.join(targetSkillsDir, item), { recursive: true, force: true });
43
- }
44
- });
45
- } else {
46
- fs.rmSync(targetSkillsDir, { recursive: true, force: true });
47
- }
48
- }
49
- }
50
-
51
- function ensureKiloConfig(kiloJsonPath, kiloSkillsDir, kiloThemesDir, kiloCommandsDir) {
52
- if (!fs.existsSync(kiloSkillsDir)) {
53
- fs.mkdirSync(kiloSkillsDir, { recursive: true });
54
- }
55
- if (!fs.existsSync(kiloThemesDir)) {
56
- fs.mkdirSync(kiloThemesDir, { recursive: true });
57
- }
58
- if (!fs.existsSync(kiloCommandsDir)) {
59
- fs.mkdirSync(kiloCommandsDir, { recursive: true });
60
- }
61
-
62
- const srcSkills = path.join(sourceDir, 'skills');
63
- if (fs.existsSync(srcSkills)) {
64
- copyRecursiveSync(srcSkills, kiloSkillsDir);
65
- }
66
-
67
- let kiloConfig = {};
68
- if (fs.existsSync(kiloJsonPath)) {
69
- try {
70
- kiloConfig = JSON.parse(fs.readFileSync(kiloJsonPath, 'utf8'));
71
- } catch (e) {
72
- kiloConfig = {};
73
- }
74
- }
75
-
76
- const skillPaths = [kiloSkillsDir];
77
- if (!kiloConfig.skills || typeof kiloConfig.skills !== 'object' || !Array.isArray(kiloConfig.skills.paths)) {
78
- kiloConfig.skills = { paths: skillPaths };
79
- } else {
80
- const exists = kiloConfig.skills.paths.some(p => path.resolve(p) === path.resolve(kiloSkillsDir));
81
- if (!exists) {
82
- kiloConfig.skills.paths = [...kiloConfig.skills.paths, ...skillPaths];
83
- }
84
- }
85
-
86
- fs.writeFileSync(kiloJsonPath, JSON.stringify(kiloConfig, null, 2) + '\n');
87
- return kiloJsonPath;
88
- }
89
-
90
- function parseArgs() {
91
- const args = process.argv.slice(2);
92
- const parsed = { ide: null, scope: null };
93
- for (const arg of args) {
94
- if (arg.startsWith('--ide=')) parsed.ide = arg.split('=')[1];
95
- if (arg.startsWith('--scope=')) parsed.scope = arg.split('=')[1];
96
- }
97
-
98
- const aliasMap = {
99
- 'antigravity': '4',
100
- 'gemini': '4',
101
- 'cursor': '1',
102
- 'windsurf': '2',
103
- 'claude': '3',
104
- 'cliner': '3',
105
- 'roo': '3',
106
- 'codex': '5',
107
- 'kilo': '6',
108
- 'multi-ide': '7',
109
- 'all': '7'
46
+ function runInstall(ideChoice, scopeChoice) {
47
+ const mapIde = {
48
+ '1': 'cursor',
49
+ '2': 'windsurf',
50
+ '3': 'cline',
51
+ '4': 'antigravity',
52
+ '5': 'codex',
53
+ '6': 'kilo',
54
+ '7': 'multi-ide'
110
55
  };
111
56
 
112
- if (parsed.ide && aliasMap[parsed.ide.toLowerCase()]) {
113
- parsed.ide = aliasMap[parsed.ide.toLowerCase()];
114
- }
115
-
116
- if (args.includes('--antigravity')) {
117
- parsed.ide = '4';
118
- if (!parsed.scope) parsed.scope = '2';
119
- }
120
- if (args.includes('--cursor')) {
121
- parsed.ide = '1';
122
- if (!parsed.scope) parsed.scope = '2';
123
- }
124
- if (args.includes('--kilo')) {
125
- parsed.ide = '6';
126
- if (!parsed.scope) parsed.scope = '2';
127
- }
128
-
129
- return parsed;
130
- }
131
-
132
- function runInstall(ideCode, answerScope) {
133
- let isGemini = false;
134
- let isKilo = false;
135
- let isMultiIde = false;
136
- let ruleFileName = null;
137
-
138
- switch(ideCode) {
139
- case '1': ruleFileName = '.cursorrules'; break;
140
- case '2': ruleFileName = '.windsurfrules'; break;
141
- case '3': ruleFileName = '.clinerules'; break;
142
- case '4': isGemini = true; break;
143
- case '5': ruleFileName = '.codexrules'; break;
144
- case '6': ruleFileName = '.kilorules'; isKilo = true; break;
145
- case '7': isMultiIde = true; ruleFileName = null; break;
146
- case '0': default: break;
147
- }
148
-
149
- const isGlobal = answerScope.trim() === '2';
57
+ const mapScope = {
58
+ '1': 'local',
59
+ '2': 'global'
60
+ };
150
61
 
151
- const homeDir = os.homedir();
152
- const cwd = process.cwd();
153
- let targetDir = '';
154
- let ruleFilePath = null;
155
- let baseFolderForPrompt = '';
156
- let kiloJsonPath = null;
157
- let kiloSkillsDir = null;
158
- let kiloThemesDir = null;
159
- let kiloCommandsDir = null;
62
+ const ide = mapIde[ideChoice] || ideChoice;
63
+ const scope = mapScope[scopeChoice] || scopeChoice;
64
+ const isGlobal = scope === 'global';
160
65
 
161
- if (isMultiIde) {
162
- targetDir = path.join(cwd, '.qk-ai-skill-os');
163
- baseFolderForPrompt = './.qk-ai-skill-os';
164
- ruleFilePath = path.join(cwd, 'CLAUDE.md');
165
- if (!isGlobal) {
166
- kiloSkillsDir = path.join(cwd, '.kilo', 'skills');
167
- kiloThemesDir = path.join(cwd, '.kilo', 'themes');
168
- kiloCommandsDir = path.join(cwd, '.kilo', 'command');
169
- kiloJsonPath = path.join(cwd, 'kilo.json');
170
- }
171
- } else if (isGemini) {
172
- if (isGlobal) {
173
- targetDir = path.join(homeDir, '.gemini', 'config');
174
- ruleFilePath = path.join(targetDir, 'AGENTS.md');
175
- baseFolderForPrompt = path.join(targetDir, 'skills').replace(/\\/g, '/');
66
+ let targetDir = path.join(cwd, '.agents');
67
+
68
+ if (isGlobal) {
69
+ const homeDir = os.homedir();
70
+ if (ide === 'antigravity') {
71
+ targetDir = path.join(homeDir, '.gemini', 'config', '.agents');
176
72
  } else {
177
- targetDir = path.join(cwd, '.agents');
178
- ruleFilePath = path.join(cwd, '.agents', 'AGENTS.md');
179
- baseFolderForPrompt = '.agents/skills';
180
- }
181
- } else if (isKilo) {
182
- if (isGlobal) {
183
- targetDir = path.join(homeDir, '.qk-ai-skill-os');
184
- baseFolderForPrompt = targetDir.replace(/\\/g, '/');
185
- kiloSkillsDir = path.join(homeDir, '.kilo', 'skills');
186
- kiloThemesDir = path.join(homeDir, '.config', 'kilo', 'themes');
187
- kiloCommandsDir = path.join(homeDir, '.config', 'kilo', 'command');
188
- kiloJsonPath = path.join(homeDir, '.config', 'kilo', 'kilo.json');
189
- } else {
190
- targetDir = path.join(cwd, '.qk-ai-skill-os');
191
- baseFolderForPrompt = './.qk-ai-skill-os';
192
- kiloSkillsDir = path.join(cwd, '.kilo', 'skills');
193
- kiloThemesDir = path.join(cwd, '.kilo', 'themes');
194
- kiloCommandsDir = path.join(cwd, '.kilo', 'command');
195
- kiloJsonPath = path.join(cwd, 'kilo.json');
196
- }
197
- ruleFilePath = path.join(cwd, 'CLAUDE.md');
198
- } else {
199
- if (isGlobal) {
200
- targetDir = path.join(homeDir, '.qk-ai-skill-os');
201
- baseFolderForPrompt = targetDir.replace(/\\/g, '/');
202
- } else {
203
- targetDir = path.join(cwd, '.qk-ai-skill-os');
204
- baseFolderForPrompt = './.qk-ai-skill-os';
205
- }
206
- if (ruleFileName) {
207
- ruleFilePath = path.join(cwd, ruleFileName);
73
+ targetDir = path.join(homeDir, '.ai-developer-skill-os', '.agents');
208
74
  }
209
75
  }
210
76
 
211
- const systemPrompt = `[Role]
212
- You are an elite AI Software Engineer. You must strictly follow the rules in this project.
213
- Vui lòng tìm đọc danh sách kỹ năng tại file \`${baseFolderForPrompt}/skills.json\`.
214
-
215
- [Trigger Mechanism]
216
- 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 \`${baseFolderForPrompt}/...\` (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ò.
217
-
218
- [Autonomous Execution & Transparency]
219
- Khi nhận được lệnh kỹ năng, bạn BẮT BUỘC phải:
220
- 1. Thông báo rõ ràng: "[🚀 AI Developer Skin: Đã kích hoạt kỹ năng <tên-skill>]" ngay dòng đầu tiên.
221
- 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ờ.
222
- 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:
223
-
224
- \`\`\`markdown
225
- 🔧 <Tên Kỹ Năng> Summary
226
- ─────────────────────────────────────────────────
227
- Scope: [Tóm tắt ngắn gọn phạm vi công việc]
228
- Changes: [N file modified, N extracted, N removed]
229
-
230
- Changes applied:
231
- ✅ [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...]
232
- ✅ [Loại hành động 2]: [Chi tiết những gì đã làm]
233
-
234
- 📊 Quality improvement:
235
- Before: [Mô tả ngắn tình trạng trước khi sửa/làm]
236
- After: [Mô tả sự cải thiện đạt được]
237
-
238
- ✅ Verification:
239
- Tests: [Trạng thái test (vd: N/A, Pass)]
240
- Lint/Types:[Trạng thái kiểm tra lỗi (vd: Clean)]
241
- Behavior: [Kết quả hoạt động (vd: Unchanged, Improved)]
242
-
243
- ⚠️ Notes:
244
- [Các lưu ý đặc biệt, rủi ro tiềm ẩn hoặc cách người dùng có thể test lại tính năng này]
245
- \`\`\`
246
-
247
- [Command Arguments]
248
- Người dùng có thể truyền thêm tham số vào lệnh (ví dụ: \`./qk-ui-builder --fw=react --css=tailwind\`).
249
- 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.`;
250
-
251
77
  try {
78
+ console.log(`\n🚀 Đang cài đặt V8.1.4 Agent Engineering OS...`);
79
+
252
80
  if (!fs.existsSync(targetDir)) {
253
81
  fs.mkdirSync(targetDir, { recursive: true });
254
82
  }
255
83
 
256
- const targetSkillsDir = path.join(targetDir, 'skills');
257
- cleanOldSkills(targetSkillsDir, isGemini && isGlobal);
258
-
259
- const filesAndFolders = [
260
- 'skills', '_template', 'docs', 'skills.json', 'README.md', 'CHANGELOG.md', 'LICENSE'
261
- ];
262
-
263
- if (isGemini && isGlobal) {
264
- if (fs.existsSync(path.join(sourceDir, 'skills'))) {
265
- copyRecursiveSync(path.join(sourceDir, 'skills'), path.join(targetDir, 'skills'));
266
- }
267
- if (fs.existsSync(path.join(sourceDir, 'skills.json'))) {
268
- fs.copyFileSync(path.join(sourceDir, 'skills.json'), path.join(targetDir, 'skills', 'skills.json'));
269
- }
84
+ if (fs.existsSync(sourceDir)) {
85
+ copyRecursiveSync(sourceDir, targetDir);
86
+ console.log(`✅ Đã copy toàn bộ kiến trúc .agents vào: ${targetDir}`);
270
87
  } else {
271
- filesAndFolders.forEach(item => {
272
- const src = path.join(sourceDir, item);
273
- let dest = path.join(targetDir, item);
274
- if (fs.existsSync(src)) {
275
- copyRecursiveSync(src, dest);
276
- }
277
- });
278
- }
279
-
280
- if (ruleFilePath) {
281
- const ruleDir = path.dirname(ruleFilePath);
282
- if (ruleDir !== cwd && !fs.existsSync(ruleDir)) {
283
- fs.mkdirSync(ruleDir, { recursive: true });
284
- }
285
-
286
- let writeContent = systemPrompt;
287
- if (isGemini) {
288
- writeContent = `\n<RULE[ai_skill_os]>\n---\ntrigger: always_on\n---\n${systemPrompt}\n</RULE[ai_skill_os]>\n`;
289
- }
290
-
291
- if (fs.existsSync(ruleFilePath)) {
292
- const existingContent = fs.readFileSync(ruleFilePath, 'utf8');
293
- const marker = isGemini ? '<RULE[ai_skill_os]>' : '[Role]\nYou are an elite AI Software Engineer.';
294
- const markerIndex = existingContent.indexOf(marker);
295
- if (markerIndex !== -1) {
296
- const before = existingContent.substring(0, markerIndex);
297
- const after = existingContent.substring(markerIndex).split('\n').slice(isGemini ? 2 : 1).join('\n');
298
- const lastMarkerEnd = after.indexOf(isGemini ? '</RULE[ai_skill_os]>' : '[Trigger Mechanism]');
299
- const actualAfter = lastMarkerEnd !== -1 ? after.substring(lastMarkerEnd + (isGemini ? 19 : 18)).trimStart() : after;
300
- fs.writeFileSync(ruleFilePath, before + writeContent.trimStart() + (actualAfter ? '\n' + actualAfter : '') + '\n');
301
- console.log(`✅ Đã CẬP NHẬT cấu hình tự động trong file: ${ruleFilePath}`);
302
- } else {
303
- fs.appendFileSync(ruleFilePath, "\n\n" + writeContent);
304
- console.log(`✅ Đã GHI THÊM cấu hình tự động vào file: ${ruleFilePath}`);
305
- }
306
- } else {
307
- fs.writeFileSync(ruleFilePath, writeContent);
308
- console.log(`✅ Đã TẠO MỚI file cấu hình: ${ruleFilePath}`);
309
- }
310
- }
311
-
312
- if (isKilo) {
313
- ensureKiloConfig(kiloJsonPath, kiloSkillsDir, kiloThemesDir, kiloCommandsDir);
314
- console.log(`✅ Đã cấu hình Kilo Code tại: ${kiloJsonPath}`);
315
- console.log(` → Skills: ${kiloSkillsDir}`);
316
- console.log(` → Themes: ${kiloThemesDir}`);
317
- console.log(` → Commands: ${kiloCommandsDir}`);
318
- }
319
-
320
- if (isMultiIde) {
321
- if (kiloJsonPath && kiloSkillsDir) {
322
- ensureKiloConfig(kiloJsonPath, kiloSkillsDir, kiloThemesDir, kiloCommandsDir);
323
- console.log(`✅ Đã cấu hình Kilo Code (Multi-IDE) tại: ${kiloJsonPath}`);
324
- console.log(` → Skills: ${kiloSkillsDir}`);
325
- console.log(` → Themes: ${kiloThemesDir}`);
326
- console.log(` → Commands: ${kiloCommandsDir}`);
327
- } else if (ruleFilePath) {
328
- console.log(`✅ Đã tạo file cấu hình Multi-IDE: ${ruleFilePath}`);
329
- }
330
- }
331
-
332
- console.log(`\n🎉 HOÀN TẤT! Dữ liệu kỹ năng đã được lưu tại: ${targetDir}`);
333
- if (isGlobal && !isGemini) {
334
- const name = ruleFilePath ? path.basename(ruleFilePath) : 'CLAUDE.md';
335
- console.log(`💡 Lưu ý: Kỹ năng đã được cài ở cấp độ máy tính (Global). File cấu hình cục bộ (${name}) ở dự án này đang trỏ thẳng về thư mục Global đó.`);
336
- } else if (isGlobal && isGemini) {
337
- console.log(`💡 Lưu ý: Antigravity đã được cài Global. Từ nay bạn mở BẤT KỲ DỰ ÁN NÀO trên máy tính này, Antigravity cũng sẽ tự động có đủ 22 kỹ năng mà không cần cài lại!`);
338
- } else if (isKilo) {
339
- console.log(`💡 Lưu ý: Kilo Code đã sẵn sàng. Dùng \`<leader>t\` hoặc \`/themes\` để xem, và \`/skills\` để xem danh sách skill đã cài.`);
88
+ console.error(`❌ Lỗi: Không tìm thấy thư mục nguồn ${sourceDir}`);
89
+ return;
340
90
  }
341
-
342
- if (!isGemini && !isKilo && !isMultiIde) {
343
- if (fs.existsSync(path.join(cwd, '.kilorules'))) {
344
- fs.unlinkSync(path.join(cwd, '.kilorules'));
345
- console.log(`🧹 Đã xoá file .kilorules (không còn cần thiết).`);
346
- }
91
+
92
+ console.log(`\n🎉 HOÀN TẤT! Kiến trúc V8.1.4 đã sẵn sàng tại: ${targetDir}`);
93
+
94
+ if (isGlobal && ide === 'antigravity') {
95
+ console.log(`💡 Antigravity đã được cài Global. Từ nay bạn mở BẤT KỲ DỰ ÁN NÀO, Antigravity cũng sẽ tự động có đủ hệ thống OS mới nhất!`);
347
96
  }
348
97
 
349
98
  } catch (error) {
@@ -353,10 +102,10 @@ Nếu người dùng sử dụng tham số (argument), bạn BẮT BUỘC phải
353
102
 
354
103
  const args = parseArgs();
355
104
 
356
- if (args.ide !== null && args.scope !== null) {
105
+ if (args.ide && args.scope) {
357
106
  runInstall(args.ide, args.scope);
358
107
  } else {
359
- console.log('🚀 Đang chuẩn bị cài đặt AI Developer Skill OS...\n');
108
+ console.log('🚀 Đang chuẩn bị cài đặt AI Developer Skill OS V8...\n');
360
109
 
361
110
  const questionIde = `Vui lòng chọn IDE/AI Assistant bạn đang sử dụng:
362
111
  (1) Cursor
@@ -366,9 +115,8 @@ if (args.ide !== null && args.scope !== null) {
366
115
  (5) Codex
367
116
  (6) Kilo Code
368
117
  (7) Tất cả các IDE (Multi-IDE)
369
- (0) Bỏ qua (Không tạo config tự động)
370
118
 
371
- Nhập số (0-7): `;
119
+ Nhập số (1-7): `;
372
120
 
373
121
  const questionScope = `
374
122
  Bạn muốn cài đặt bộ kỹ năng ở đâu?
package/package.json CHANGED
@@ -1,8 +1,16 @@
1
1
  {
2
2
  "name": "ai-developer-skill-os",
3
- "version": "7.5.1",
4
- "description": "Behavior Specification Format Framework, AI coding agents (Claude, Cursor, Windsurf, Antigravity) với 22 skills chuyên nghiệp.",
3
+ "version": "8.1.4",
4
+ "description": "Agent Engineering OS Framework with Design Intelligence, AI coding agents (Claude, Cursor, Windsurf, Antigravity) with 30 Master Skills.",
5
5
  "main": "bin/install.js",
6
+ "files": [
7
+ "bin",
8
+ ".agents",
9
+ "tooling",
10
+ "package.json",
11
+ "README.md",
12
+ "CHANGELOG.md"
13
+ ],
6
14
  "bin": {
7
15
  "ai-developer-skill-os": "bin/install.js",
8
16
  "ai-skill": "bin/install.js"
@@ -15,7 +23,10 @@
15
23
  "test": "vitest run",
16
24
  "test:watch": "vitest",
17
25
  "test:registry": "vitest run --config vitest.config.js",
26
+ "test:graph": "node tooling/validate-graph.js",
18
27
  "lint": "node bin/lint.js",
28
+ "test:agent": "node tests/agent-evaluation/runner/evaluate-routing.js",
29
+ "generate:evaluation": "node tooling/generate-evaluation-cases.cjs",
19
30
  "install:antigravity": "node bin/install.js --ide=antigravity --scope=2",
20
31
  "install:antigravity:local": "node bin/install.js --ide=antigravity --scope=1",
21
32
  "install:cursor": "node bin/install.js --ide=cursor --scope=2",
@@ -0,0 +1,44 @@
1
+ const fs = require('fs');
2
+ const path = require('path');
3
+
4
+ const cases = [
5
+ { path: 'routing/frontend.yml', id: 'frontend-001', input: 'App React 100 pages tổ chức thế nào?', skill: 'qk-frontend-architecture', forbidden: ['qk-ui-builder'] },
6
+ { path: 'routing/backend.yml', id: 'backend-001', input: 'Viết middleware auth cho API', skill: 'qk-access-policy', forbidden: ['qk-api-lifecycle'] },
7
+ { path: 'routing/security.yml', id: 'sec-001', input: 'Kiểm tra xem thư viện có lỗi bảo mật không', skill: 'qk-security-audit', forbidden: ['qk-validation-gate'] },
8
+ { path: 'routing/devops.yml', id: 'devops-001', input: 'Thiết lập pipeline github actions', skill: 'qk-devops-platform', forbidden: ['qk-production-release'] },
9
+ { path: 'boundary/design-system-conflict.yml', id: 'bound-001', input: 'Tạo màu và typography cho thương hiệu mới', skill: 'qk-design-system-engineering', forbidden: ['qk-ui-system-builder'] },
10
+ { path: 'boundary/ui-builder-conflict.yml', id: 'bound-002', input: 'Code nút bấm màu đỏ theo thiết kế figma', skill: 'qk-ui-builder', forbidden: ['qk-design-system-engineering', 'qk-frontend-architecture'] },
11
+ { path: 'boundary/test-strategy-conflict.yml', id: 'bound-003', input: 'Lên chiến lược viết test cho app e-commerce', skill: 'qk-test-engineering', forbidden: ['qk-validation-gate'] },
12
+ { path: 'boundary/spec-conflict.yml', id: 'bound-004', input: 'Viết tiêu chí nghiệm thu cho tính năng giỏ hàng', skill: 'qk-product-specification', forbidden: ['qk-feature-delivery'] },
13
+ { path: 'boundary/architecture-conflict.yml', id: 'bound-005', input: 'Chia nhỏ component React cho dễ bảo trì', skill: 'qk-frontend-architecture', forbidden: ['qk-ui-builder'] },
14
+ { path: 'workflow/spec-to-code.yml', id: 'wf-001', input: 'Từ ý tưởng app chat, viết spec xong mới làm', skill: 'qk-product-specification', forbidden: ['qk-feature-delivery'] },
15
+ { path: 'workflow/release-gate.yml', id: 'wf-002', input: 'Đóng gói app nhưng nhớ check bảo mật trước', skill: 'qk-validation-gate', forbidden: ['qk-production-release'] },
16
+ { path: 'workflow/security-pipeline.yml', id: 'wf-003', input: 'Quét hệ thống trước khi deploy', skill: 'qk-security-audit', forbidden: ['qk-production-release'] },
17
+ { path: 'regression/legacy-routing.yml', id: 'reg-001', input: 'Danh sách lệnh', skill: 'qk-orchestrator', forbidden: ['qk-help'] },
18
+ { path: 'regression/db-optimize.yml', id: 'reg-002', input: 'Câu query chậm', skill: 'qk-db-optimizer', forbidden: ['qk-bug-resolution'] },
19
+ { path: 'regression/health-check.yml', id: 'reg-003', input: 'Code nợ kỹ thuật nhiều quá', skill: 'qk-project-health', forbidden: ['qk-engineering-standard'] }
20
+ ];
21
+
22
+ cases.forEach(c => {
23
+ const content = `case:
24
+ id: ${c.id}
25
+ input:
26
+ "${c.input}"
27
+ candidates:
28
+ - skill: ${c.skill}
29
+ score: 0.92
30
+ - skill: ${c.forbidden[0] || 'qk-validation-gate'}
31
+ score: 0.55
32
+ decision:
33
+ selected:
34
+ ${c.skill}
35
+ rejected:
36
+ ${c.forbidden.map(f => ` - skill: ${f}\n reason: "outside boundary or conflict"`).join('\n')}
37
+ conflict_policy:
38
+ severity: ${c.path.includes('boundary') ? 'critical' : (c.path.includes('routing') ? 'warning' : 'high')}
39
+ action: ${c.path.includes('boundary') ? 'block' : (c.path.includes('routing') ? 'continue_with_notice' : 'require_confirmation')}
40
+ expected_message: "Conflict detected in ${c.id}"
41
+ `;
42
+ fs.writeFileSync(path.join('tests/agent-evaluation/cases', c.path), content);
43
+ });
44
+ console.log('15 test cases regenerated with conflict_policy.');