ai-developer-skill-os 7.5.0 → 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 (377) hide show
  1. package/.agents/CHANGELOG.md +2 -1
  2. package/.agents/README.md +51 -10
  3. package/.agents/docs/ARCHITECTURE.md +156 -0
  4. package/.agents/docs/CHI_TIET_SKILLS.md +2 -1
  5. package/.agents/docs/MIGRATION-CLEANUP-V8.1.3.md +36 -0
  6. package/.agents/docs/MIGRATION-STATUS.md +35 -0
  7. package/.agents/docs/MIGRATION-V8.md +10 -0
  8. package/.agents/docs/ROADMAP-V8.2.md +78 -0
  9. package/.agents/docs/V8-CERTIFICATION.md +27 -0
  10. package/.agents/docs/VERSIONING.md +95 -0
  11. package/.agents/docs/decisions/ADR-001-v8-migration.md +58 -0
  12. package/.agents/docs/decisions/ADR-002-workflow-separation.md +50 -0
  13. package/.agents/docs/decisions/ADR-003-registry-generated.md +54 -0
  14. package/.agents/docs/decisions/ADR-008-skill-boundary-review.md +27 -0
  15. package/.agents/docs/schemas/learning.schema.yml +69 -0
  16. package/.agents/docs/schemas/skill.schema.yml +188 -0
  17. package/.agents/docs/schemas/workflow.schema.yml +33 -0
  18. package/.agents/knowledge/design-intelligence/industries/ecommerce.md +3 -0
  19. package/.agents/knowledge/design-intelligence/industries/fintech.md +3 -0
  20. package/.agents/knowledge/design-intelligence/industries/healthcare.md +3 -0
  21. package/.agents/learnings/draft/README.md +37 -0
  22. package/.agents/registry/capability-graph.yml +500 -0
  23. package/.agents/registry/skills-index.yml +525 -0
  24. package/.agents/reports/RELEASE-CHECKLIST.md +29 -0
  25. package/.agents/reports/architecture-audit.md +13 -0
  26. package/.agents/reports/graph-health.md +20 -0
  27. package/.agents/reports/skill-audit.md +215 -0
  28. package/.agents/rules/coding.md +102 -0
  29. package/.agents/rules/command-safety.md +21 -0
  30. package/.agents/rules/global.md +135 -0
  31. package/.agents/rules/priorities.yml +24 -0
  32. package/.agents/rules/safety.md +84 -0
  33. package/.agents/rules/security.md +13 -0
  34. package/.agents/rules/skill-quality.md +14 -0
  35. package/.agents/skills/_template/SKILL.md +132 -0
  36. package/.agents/skills/qk-access-policy/SKILL.md +61 -5
  37. package/.agents/skills/qk-agent-observability/SKILL.md +73 -0
  38. package/.agents/skills/qk-ai-builder/SKILL.md +62 -5
  39. package/.agents/skills/qk-api-lifecycle/SKILL.md +59 -6
  40. package/.agents/skills/qk-bug-resolution/SKILL.md +64 -6
  41. package/.agents/skills/qk-context-loader/SKILL.md +63 -11
  42. package/.agents/skills/qk-data-lifecycle/SKILL.md +61 -5
  43. package/.agents/skills/qk-db-optimizer/SKILL.md +61 -5
  44. package/.agents/skills/qk-design-system-engineering/SKILL.md +112 -0
  45. package/.agents/skills/qk-devops-platform/SKILL.md +117 -0
  46. package/.agents/skills/qk-docs/SKILL.md +62 -6
  47. package/.agents/skills/qk-engineering-standard/SKILL.md +62 -12
  48. package/.agents/skills/qk-fe-api-integration/SKILL.md +60 -6
  49. package/.agents/skills/qk-feature-delivery/SKILL.md +65 -6
  50. package/.agents/skills/qk-frontend-architecture/SKILL.md +134 -0
  51. package/.agents/skills/qk-help/SKILL.md +245 -193
  52. package/.agents/skills/qk-orchestrator/SKILL.md +67 -13
  53. package/.agents/skills/qk-orchestrator/references/routing-table.md +4 -3
  54. package/.agents/skills/qk-product-specification/SKILL.md +130 -0
  55. package/.agents/skills/qk-production-release/SKILL.md +59 -6
  56. package/.agents/skills/qk-project-bootstrap/SKILL.md +68 -7
  57. package/.agents/skills/qk-project-health/SKILL.md +63 -6
  58. package/.agents/skills/qk-project-memory/SKILL.md +109 -6
  59. package/.agents/skills/qk-security-audit/SKILL.md +135 -0
  60. package/.agents/skills/qk-system-evolution/SKILL.md +63 -12
  61. package/.agents/skills/qk-test-engineering/SKILL.md +139 -0
  62. package/.agents/skills/qk-ui-audit/SKILL.md +63 -8
  63. package/.agents/skills/qk-ui-builder/SKILL.md +509 -0
  64. package/.agents/skills/qk-ui-builder/references/anti-patterns.md +295 -0
  65. package/.agents/skills/qk-ui-builder/references/color.md +115 -0
  66. package/.agents/skills/qk-ui-builder/references/component-cookbook.md +1194 -0
  67. package/.agents/skills/qk-ui-builder/references/copy.md +250 -0
  68. package/.agents/skills/qk-ui-builder/references/interaction-and-states.md +115 -0
  69. package/.agents/skills/qk-ui-builder/references/layout-and-space.md +111 -0
  70. package/.agents/skills/qk-ui-builder/references/macrostructures/01-bento-grid.md +48 -0
  71. package/.agents/skills/qk-ui-builder/references/macrostructures/02-long-document.md +50 -0
  72. package/.agents/skills/qk-ui-builder/references/macrostructures/03-marquee-hero.md +51 -0
  73. package/.agents/skills/qk-ui-builder/references/macrostructures/04-stat-led.md +49 -0
  74. package/.agents/skills/qk-ui-builder/references/macrostructures/05-workbench.md +44 -0
  75. package/.agents/skills/qk-ui-builder/references/macrostructures/06-conversational-faq.md +50 -0
  76. package/.agents/skills/qk-ui-builder/references/macrostructures/07-manifesto.md +51 -0
  77. package/.agents/skills/qk-ui-builder/references/macrostructures/08-photographic.md +50 -0
  78. package/.agents/skills/qk-ui-builder/references/macrostructures/09-quote-led.md +50 -0
  79. package/.agents/skills/qk-ui-builder/references/macrostructures/11-catalogue.md +49 -0
  80. package/.agents/skills/qk-ui-builder/references/macrostructures/12-letter.md +49 -0
  81. package/.agents/skills/qk-ui-builder/references/macrostructures/13-index-first.md +49 -0
  82. package/.agents/skills/qk-ui-builder/references/macrostructures/14-narrative-workflow.md +48 -0
  83. package/.agents/skills/qk-ui-builder/references/macrostructures/15-split-studio.md +48 -0
  84. package/.agents/skills/qk-ui-builder/references/macrostructures/16-feature-stack.md +51 -0
  85. package/.agents/skills/qk-ui-builder/references/macrostructures/17-type-specimen.md +48 -0
  86. package/.agents/skills/qk-ui-builder/references/macrostructures/18-portfolio-grid.md +48 -0
  87. package/.agents/skills/qk-ui-builder/references/macrostructures/19-map-diagram.md +50 -0
  88. package/.agents/skills/qk-ui-builder/references/macrostructures/20-ecosystem-index.md +48 -0
  89. package/.agents/skills/qk-ui-builder/references/macrostructures/21-component-playground.md +45 -0
  90. package/.agents/skills/qk-ui-builder/references/macrostructures.md +38 -0
  91. package/.agents/skills/qk-ui-builder/references/motion.md +95 -0
  92. package/.agents/skills/qk-ui-builder/references/responsive.md +115 -0
  93. package/.agents/skills/qk-ui-builder/references/slop-test.md +135 -0
  94. package/.agents/skills/qk-ui-builder/references/structure.md +280 -0
  95. package/.agents/skills/qk-ui-builder/references/themes/atmospheric.md +53 -0
  96. package/.agents/skills/qk-ui-builder/references/themes/carnival.md +52 -0
  97. package/.agents/skills/qk-ui-builder/references/themes/cobalt.md +52 -0
  98. package/.agents/skills/qk-ui-builder/references/themes/editorial.md +52 -0
  99. package/.agents/skills/qk-ui-builder/references/themes/garden.md +52 -0
  100. package/.agents/skills/qk-ui-builder/references/themes/hum.md +52 -0
  101. package/.agents/skills/qk-ui-builder/references/themes/lumen.md +52 -0
  102. package/.agents/skills/qk-ui-builder/references/themes/midnight.md +52 -0
  103. package/.agents/skills/qk-ui-builder/references/themes/modern-minimal.md +52 -0
  104. package/.agents/skills/qk-ui-builder/references/themes/playful.md +52 -0
  105. package/.agents/skills/qk-ui-builder/references/themes/specimen.md +52 -0
  106. package/.agents/skills/qk-ui-builder/references/themes/terminal.md +52 -0
  107. package/.agents/skills/qk-ui-builder/references/typography.md +129 -0
  108. package/.agents/skills/qk-ui-system-builder/SKILL.md +61 -5
  109. package/.agents/skills/qk-validation-gate/SKILL.md +63 -11
  110. package/.agents/skills/qk-web-quality-gate/SKILL.md +114 -0
  111. package/.agents/workflows/_schema.yml +109 -0
  112. package/.agents/workflows/bug-resolution.yml +101 -0
  113. package/.agents/workflows/code-review.yml +77 -0
  114. package/.agents/workflows/documentation.yml +75 -0
  115. package/.agents/workflows/feature-delivery.yml +103 -0
  116. package/.agents/workflows/refactor.yml +81 -0
  117. package/.agents/workflows/research.yml +60 -0
  118. package/.agents/workflows/security-audit.yml +72 -0
  119. package/.agents/workflows/skill-evolution.yml +65 -0
  120. package/.agents/workflows/spec-driven-development.yml +57 -0
  121. package/CHANGELOG.md +91 -69
  122. package/README.md +50 -45
  123. package/bin/install.js +57 -309
  124. package/package.json +14 -3
  125. package/tooling/generate-evaluation-cases.cjs +44 -0
  126. package/tooling/generate-registry.js +157 -0
  127. package/tooling/run-aar.js +143 -0
  128. package/tooling/validate-graph.js +87 -0
  129. package/tooling/validate-skills.js +102 -0
  130. package/.agents/_template/BEHAVIOR_SPEC.md +0 -96
  131. package/.agents/_template/examples/example-en.md +0 -49
  132. package/.agents/_template/examples/example-vi.md +0 -49
  133. package/.agents/skills/qk-design-to-code/SKILL.md +0 -285
  134. package/.agents/skills.json +0 -819
  135. package/.github/workflows/ci.yml +0 -56
  136. package/.qk-ai-skill-os/CHANGELOG.md +0 -69
  137. package/.qk-ai-skill-os/LICENSE +0 -21
  138. package/.qk-ai-skill-os/README.md +0 -59
  139. package/.qk-ai-skill-os/_template/BEHAVIOR_SPEC.md +0 -96
  140. package/.qk-ai-skill-os/_template/examples/example-en.md +0 -49
  141. package/.qk-ai-skill-os/_template/examples/example-vi.md +0 -49
  142. package/.qk-ai-skill-os/docs/CHI_TIET_SKILLS.md +0 -125
  143. package/.qk-ai-skill-os/docs/GOVERNANCE.md +0 -40
  144. package/.qk-ai-skill-os/docs/HUONG_DAN_SU_DUNG.md +0 -120
  145. package/.qk-ai-skill-os/docs/SPEC.md +0 -87
  146. package/.qk-ai-skill-os/docs/adr/0001-intent-based-architecture.md +0 -19
  147. package/.qk-ai-skill-os/docs/adr/0002-kernel-freeze.md +0 -21
  148. package/.qk-ai-skill-os/docs/adr/0003-risk-based-verification.md +0 -20
  149. package/.qk-ai-skill-os/docs/adr/0004-progressive-evidence.md +0 -19
  150. package/.qk-ai-skill-os/docs/skill-classification.md +0 -25
  151. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-accessibility-audit/SKILL.md +0 -121
  152. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-agent-orchestrator/SKILL.md +0 -179
  153. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-api-integration/SKILL.md +0 -389
  154. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-auth-security/SKILL.md +0 -96
  155. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-backend-architecture/SKILL.md +0 -125
  156. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-bug-fix/SKILL.md +0 -213
  157. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-component-generator/SKILL.md +0 -136
  158. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-context-manager/SKILL.md +0 -175
  159. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-database-engineer/SKILL.md +0 -104
  160. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-deployment/SKILL.md +0 -96
  161. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-design-system/SKILL.md +0 -137
  162. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-form-builder/SKILL.md +0 -140
  163. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-frontend-architecture/SKILL.md +0 -155
  164. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-frontend-debug/SKILL.md +0 -133
  165. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-frontend-performance/SKILL.md +0 -129
  166. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-frontend-testing/SKILL.md +0 -146
  167. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-git-engineer/SKILL.md +0 -304
  168. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-help/SKILL.md +0 -68
  169. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-migration/SKILL.md +0 -284
  170. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-project-audit/SKILL.md +0 -280
  171. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-refactor/SKILL.md +0 -222
  172. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-state-management/SKILL.md +0 -140
  173. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-table-crud-generator/SKILL.md +0 -127
  174. package/.qk-ai-skill-os/skills/_archive_old_skills/qk-ui-builder/SKILL.md +0 -152
  175. package/.qk-ai-skill-os/skills/_template/SKILL.md +0 -238
  176. package/.qk-ai-skill-os/skills/qk-access-policy/SKILL.md +0 -179
  177. package/.qk-ai-skill-os/skills/qk-ai-builder/SKILL.md +0 -221
  178. package/.qk-ai-skill-os/skills/qk-api-lifecycle/SKILL.md +0 -176
  179. package/.qk-ai-skill-os/skills/qk-bug-resolution/SKILL.md +0 -307
  180. package/.qk-ai-skill-os/skills/qk-context-loader/SKILL.md +0 -218
  181. package/.qk-ai-skill-os/skills/qk-data-lifecycle/SKILL.md +0 -192
  182. package/.qk-ai-skill-os/skills/qk-db-optimizer/SKILL.md +0 -196
  183. package/.qk-ai-skill-os/skills/qk-design-to-code/SKILL.md +0 -291
  184. package/.qk-ai-skill-os/skills/qk-docs/SKILL.md +0 -198
  185. package/.qk-ai-skill-os/skills/qk-engineering-standard/SKILL.md +0 -351
  186. package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/backend.md +0 -122
  187. package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/database.md +0 -3
  188. package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/frontend.md +0 -152
  189. package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/security.md +0 -3
  190. package/.qk-ai-skill-os/skills/qk-engineering-standard/rules/testing.md +0 -3
  191. package/.qk-ai-skill-os/skills/qk-fe-api-integration/SKILL.md +0 -326
  192. package/.qk-ai-skill-os/skills/qk-feature-delivery/SKILL.md +0 -305
  193. package/.qk-ai-skill-os/skills/qk-help/SKILL.md +0 -193
  194. package/.qk-ai-skill-os/skills/qk-orchestrator/SKILL.md +0 -277
  195. package/.qk-ai-skill-os/skills/qk-orchestrator/references/routing-table.md +0 -77
  196. package/.qk-ai-skill-os/skills/qk-production-release/SKILL.md +0 -290
  197. package/.qk-ai-skill-os/skills/qk-project-bootstrap/SKILL.md +0 -240
  198. package/.qk-ai-skill-os/skills/qk-project-health/SKILL.md +0 -199
  199. package/.qk-ai-skill-os/skills/qk-project-memory/SKILL.md +0 -172
  200. package/.qk-ai-skill-os/skills/qk-system-evolution/SKILL.md +0 -285
  201. package/.qk-ai-skill-os/skills/qk-ui-audit/SKILL.md +0 -314
  202. package/.qk-ai-skill-os/skills/qk-ui-audit/references/anti-slop-checklist.md +0 -136
  203. package/.qk-ai-skill-os/skills/qk-ui-system-builder/SKILL.md +0 -225
  204. package/.qk-ai-skill-os/skills/qk-validation-gate/SKILL.md +0 -361
  205. package/.qk-ai-skill-os/skills.json +0 -819
  206. package/CLAUDE.md +0 -110
  207. package/_template/BEHAVIOR_SPEC.md +0 -96
  208. package/_template/examples/example-en.md +0 -49
  209. package/_template/examples/example-vi.md +0 -49
  210. package/add_lang.js +0 -21
  211. package/add_lang.py +0 -25
  212. package/add_sections.py +0 -53
  213. package/bin/lint.js +0 -122
  214. package/docs/CHI_TIET_SKILLS.md +0 -125
  215. package/docs/GOVERNANCE.md +0 -40
  216. package/docs/HUONG_DAN_SU_DUNG.md +0 -120
  217. package/docs/SPEC.md +0 -87
  218. package/docs/adr/0001-intent-based-architecture.md +0 -19
  219. package/docs/adr/0002-kernel-freeze.md +0 -21
  220. package/docs/adr/0003-risk-based-verification.md +0 -20
  221. package/docs/adr/0004-progressive-evidence.md +0 -19
  222. package/docs/skill-classification.md +0 -25
  223. package/fix_seeds.js +0 -22
  224. package/framework/KERNEL.md +0 -83
  225. package/framework/bias-library/cosmetic-refactor.md +0 -21
  226. package/framework/bias-library/enterprise-crud.md +0 -21
  227. package/framework/bias-library/fake-ui-slop.md +0 -20
  228. package/framework/bias-library/hallucinated-tools.md +0 -20
  229. package/framework/bias-library/missing-ui-states.md +0 -19
  230. package/framework/bias-library/over-indexing.md +0 -20
  231. package/framework/bias-library/swallow-errors.md +0 -19
  232. package/framework/bias-library/ui-only-security.md +0 -17
  233. package/framework/decision-primitives.md +0 -47
  234. package/framework/dial-library/complexity-budget.md +0 -13
  235. package/framework/dial-library/granularity.md +0 -13
  236. package/framework/dial-library/optimization-strategy.md +0 -13
  237. package/framework/dial-library/strictness.md +0 -13
  238. package/framework/rule-library/delegation-only.md +0 -9
  239. package/framework/rule-library/minimal-diff.md +0 -9
  240. package/framework/skill-schema.md +0 -310
  241. package/knowledge/backend/nodejs.md +0 -52
  242. package/knowledge/frontend/react.md +0 -81
  243. package/migrate-to-v6.js +0 -130
  244. package/migrate.js +0 -147
  245. package/migrate.py +0 -133
  246. package/migrate_all.cjs +0 -96
  247. package/patch.js +0 -15
  248. package/patch.py +0 -89
  249. package/patch2.py +0 -83
  250. package/rename.js +0 -64
  251. package/skills/_archive_old_skills/qk-accessibility-audit/SKILL.md +0 -121
  252. package/skills/_archive_old_skills/qk-agent-orchestrator/SKILL.md +0 -179
  253. package/skills/_archive_old_skills/qk-api-integration/SKILL.md +0 -389
  254. package/skills/_archive_old_skills/qk-auth-security/SKILL.md +0 -96
  255. package/skills/_archive_old_skills/qk-backend-architecture/SKILL.md +0 -125
  256. package/skills/_archive_old_skills/qk-bug-fix/SKILL.md +0 -213
  257. package/skills/_archive_old_skills/qk-component-generator/SKILL.md +0 -136
  258. package/skills/_archive_old_skills/qk-context-manager/SKILL.md +0 -175
  259. package/skills/_archive_old_skills/qk-database-engineer/SKILL.md +0 -104
  260. package/skills/_archive_old_skills/qk-deployment/SKILL.md +0 -96
  261. package/skills/_archive_old_skills/qk-design-system/SKILL.md +0 -137
  262. package/skills/_archive_old_skills/qk-form-builder/SKILL.md +0 -140
  263. package/skills/_archive_old_skills/qk-frontend-architecture/SKILL.md +0 -155
  264. package/skills/_archive_old_skills/qk-frontend-debug/SKILL.md +0 -133
  265. package/skills/_archive_old_skills/qk-frontend-performance/SKILL.md +0 -129
  266. package/skills/_archive_old_skills/qk-frontend-testing/SKILL.md +0 -146
  267. package/skills/_archive_old_skills/qk-git-engineer/SKILL.md +0 -304
  268. package/skills/_archive_old_skills/qk-help/SKILL.md +0 -68
  269. package/skills/_archive_old_skills/qk-migration/SKILL.md +0 -284
  270. package/skills/_archive_old_skills/qk-project-audit/SKILL.md +0 -280
  271. package/skills/_archive_old_skills/qk-refactor/SKILL.md +0 -222
  272. package/skills/_archive_old_skills/qk-state-management/SKILL.md +0 -140
  273. package/skills/_archive_old_skills/qk-table-crud-generator/SKILL.md +0 -127
  274. package/skills/_archive_old_skills/qk-ui-builder/SKILL.md +0 -152
  275. package/skills/_template/SKILL.md +0 -238
  276. package/skills/qk-access-policy/SKILL.md +0 -179
  277. package/skills/qk-ai-builder/SKILL.md +0 -215
  278. package/skills/qk-api-lifecycle/SKILL.md +0 -176
  279. package/skills/qk-bug-resolution/SKILL.md +0 -307
  280. package/skills/qk-context-loader/SKILL.md +0 -218
  281. package/skills/qk-data-lifecycle/SKILL.md +0 -192
  282. package/skills/qk-db-optimizer/SKILL.md +0 -196
  283. package/skills/qk-design-to-code/SKILL.md +0 -285
  284. package/skills/qk-docs/SKILL.md +0 -198
  285. package/skills/qk-engineering-standard/SKILL.md +0 -351
  286. package/skills/qk-engineering-standard/rules/backend.md +0 -122
  287. package/skills/qk-engineering-standard/rules/database.md +0 -3
  288. package/skills/qk-engineering-standard/rules/frontend.md +0 -152
  289. package/skills/qk-engineering-standard/rules/security.md +0 -3
  290. package/skills/qk-engineering-standard/rules/testing.md +0 -3
  291. package/skills/qk-fe-api-integration/SKILL.md +0 -326
  292. package/skills/qk-feature-delivery/SKILL.md +0 -305
  293. package/skills/qk-help/SKILL.md +0 -193
  294. package/skills/qk-orchestrator/SKILL.md +0 -277
  295. package/skills/qk-orchestrator/references/routing-table.md +0 -77
  296. package/skills/qk-production-release/SKILL.md +0 -284
  297. package/skills/qk-project-bootstrap/SKILL.md +0 -234
  298. package/skills/qk-project-health/SKILL.md +0 -199
  299. package/skills/qk-project-memory/SKILL.md +0 -172
  300. package/skills/qk-system-evolution/SKILL.md +0 -281
  301. package/skills/qk-ui-audit/SKILL.md +0 -314
  302. package/skills/qk-ui-audit/references/anti-slop-checklist.md +0 -136
  303. package/skills/qk-ui-system-builder/SKILL.md +0 -221
  304. package/skills/qk-validation-gate/SKILL.md +0 -359
  305. package/skills.json +0 -819
  306. package/specs/contracts/behavior-contract.yaml +0 -40
  307. package/specs/expectations/qk-bug-resolution.yaml +0 -35
  308. package/specs/fixtures/user-payload.json +0 -12
  309. package/specs/regressions/api-integration-null-fields.yaml +0 -19
  310. package/specs/scenarios/fix-login-nullref.yaml +0 -3
  311. package/taste-skill/.claude-plugin/marketplace.json +0 -20
  312. package/taste-skill/.claude-plugin/plugin.json +0 -19
  313. package/taste-skill/.github/FUNDING.yml +0 -1
  314. package/taste-skill/.github/copilot-instructions.md +0 -11
  315. package/taste-skill/CHANGELOG.md +0 -111
  316. package/taste-skill/LICENSE +0 -21
  317. package/taste-skill/README.md +0 -212
  318. package/taste-skill/assets/.gitkeep +0 -0
  319. package/taste-skill/assets/readme-banner.webp +0 -0
  320. package/taste-skill/assets/readme-buttons/btn-agent-skills.webp +0 -0
  321. package/taste-skill/assets/readme-buttons/btn-changelog.webp +0 -0
  322. package/taste-skill/assets/readme-buttons/btn-mit.webp +0 -0
  323. package/taste-skill/assets/readme-buttons/btn-site.webp +0 -0
  324. package/taste-skill/assets/readme-buttons/btn-tools.webp +0 -0
  325. package/taste-skill/assets/readme-cta-tasteskill.svg +0 -5
  326. package/taste-skill/assets/sponsors/animations-dev.webp +0 -0
  327. package/taste-skill/assets/sponsors/emil-animations-dev.webp +0 -0
  328. package/taste-skill/assets/taste-skill-logo.png +0 -0
  329. package/taste-skill/assets/taste-skill-logo.webp +0 -0
  330. package/taste-skill/assets/vercel-oss-program-badge.svg +0 -44
  331. package/taste-skill/examples/floria-bottom.webp +0 -0
  332. package/taste-skill/examples/floria-full.webp +0 -0
  333. package/taste-skill/examples/floria-top.webp +0 -0
  334. package/taste-skill/research/README.md +0 -8
  335. package/taste-skill/research/laziness/README.md +0 -25
  336. package/taste-skill/research/laziness/findings/empirical-results.md +0 -58
  337. package/taste-skill/research/laziness/findings/references.md +0 -20
  338. package/taste-skill/research/laziness/remediation/architectural-patterns.md +0 -55
  339. package/taste-skill/research/laziness/remediation/parameter-tuning.md +0 -44
  340. package/taste-skill/research/laziness/remediation/prompt-engineering.md +0 -52
  341. package/taste-skill/research/laziness/remediation/reference-prompts.md +0 -79
  342. package/taste-skill/research/laziness/root-causes/cognitive-shortcuts.md +0 -23
  343. package/taste-skill/research/laziness/root-causes/output-limits.md +0 -39
  344. package/taste-skill/research/laziness/root-causes/rlhf-and-compute.md +0 -27
  345. package/taste-skill/research/laziness/root-causes/training-data-bias.md +0 -28
  346. package/taste-skill/scripts/build-emil-sponsor-row.mjs +0 -41
  347. package/taste-skill/scripts/convert-readme-assets-webp.mjs +0 -142
  348. package/taste-skill/scripts/process-readme-buttons.mjs +0 -108
  349. package/taste-skill/scripts/process-sponsor-badge.mjs +0 -83
  350. package/taste-skill/skill.sh +0 -25
  351. package/taste-skill/skills/brandkit/SKILL.md +0 -798
  352. package/taste-skill/skills/brutalist-skill/SKILL.md +0 -92
  353. package/taste-skill/skills/gpt-tasteskill/SKILL.md +0 -74
  354. package/taste-skill/skills/image-to-code-skill/SKILL.md +0 -1228
  355. package/taste-skill/skills/imagegen-frontend-mobile/SKILL.md +0 -1465
  356. package/taste-skill/skills/imagegen-frontend-web/SKILL.md +0 -987
  357. package/taste-skill/skills/llms.txt +0 -13
  358. package/taste-skill/skills/minimalist-skill/SKILL.md +0 -85
  359. package/taste-skill/skills/output-skill/SKILL.md +0 -49
  360. package/taste-skill/skills/redesign-skill/SKILL.md +0 -178
  361. package/taste-skill/skills/soft-skill/SKILL.md +0 -98
  362. package/taste-skill/skills/stitch-skill/DESIGN.md +0 -121
  363. package/taste-skill/skills/stitch-skill/SKILL.md +0 -184
  364. package/taste-skill/skills/taste-skill/SKILL.md +0 -1206
  365. package/taste-skill/skills/taste-skill-v1/SKILL.md +0 -226
  366. package/temp_fix.js +0 -61
  367. package/templates/DESIGN.md +0 -38
  368. package/templates/bug-report.md +0 -21
  369. package/templates/design-report.md +0 -21
  370. package/templates/feature-report.md +0 -20
  371. package/templates/review-report.md +0 -21
  372. package/templates/skill-template.md +0 -38
  373. package/tests/behavior-conformance.test.js +0 -154
  374. package/tests/install-script.test.js +0 -38
  375. package/tests/registry.test.js +0 -111
  376. package/update_template.js +0 -28
  377. package/vitest.config.js +0 -11
@@ -1,47 +0,0 @@
1
- # 🧩 Bảng Tuần Hoàn: Decision Primitives (v6.0)
2
-
3
- Rule-Skins v6 không coi các Agent là những "con người ảo" (Personas), mà coi chúng là những **Cỗ máy Ra Quyết định (Decision Engines)**.
4
- Mọi hành vi phức tạp của bất kỳ Agent nào trong hệ thống đều được cấu thành từ sự lắp ghép của **6 Decision Primitives** cốt lõi dưới đây.
5
-
6
- ---
7
-
8
- ## 1. 🧲 Collect (Thu thập)
9
- - **Bản chất:** Đi tìm kiếm thông tin, tải bối cảnh từ bên ngoài vào bộ nhớ.
10
- - **Trigger:** Thiếu context hoặc nhận một task yêu cầu đọc dữ liệu.
11
- - **Evidence Required:** Quyền truy cập repository, cấu trúc file, URL.
12
- - **Ví dụ Skills:** `qk-context-loader`, bước đầu của `qk-bug-resolution`.
13
-
14
- ## 2. 🩺 Diagnose (Chẩn đoán)
15
- - **Bản chất:** Phân tích một triệu chứng (symptom) dựa trên bằng chứng để tìm ra nguyên nhân gốc rễ (root cause).
16
- - **Trigger:** Có lỗi (Bug report, error log, test failure).
17
- - **Evidence Required:** Stack trace, logs, test output.
18
- - **Ví dụ Skills:** `qk-bug-resolution`, `qk-project-health`.
19
-
20
- ## 3. 🗺️ Plan (Lập Kế hoạch)
21
- - **Bản chất:** Vạch ra một lộ trình các bước cần làm trước khi trực tiếp nhúng tay vào việc.
22
- - **Trigger:** Yêu cầu một tính năng mới hoặc một nhiệm vụ quá phức tạp để làm một bước.
23
- - **Evidence Required:** Yêu cầu (Requirements), Specs, Architecture.
24
- - **Ví dụ Skills:** `qk-feature-delivery`, `qk-api-lifecycle`.
25
-
26
- ## 4. ⚖️ Evaluate (Đánh giá)
27
- - **Bản chất:** Đối chiếu một sản phẩm (artifact) có sẵn với một tiêu chuẩn (standard/policy) để đưa ra phán quyết (Pass/Fail) hoặc gợi ý sửa đổi.
28
- - **Trigger:** Một đoạn code mới, một bản thiết kế, một PR.
29
- - **Evidence Required:** Artifact cần review, Guidelines, Linter rules.
30
- - **Ví dụ Skills:** `qk-engineering-standard`, `qk-validation-gate`, `qk-ui-audit`.
31
-
32
- ## 5. 🛠️ Execute (Thực thi)
33
- - **Bản chất:** Trực tiếp sửa đổi trạng thái hệ thống (viết code, xóa file, sửa file).
34
- - **Trigger:** Đã có kế hoạch rõ ràng hoặc đã xác định xong lỗi.
35
- - **Evidence Required:** Codebase hiện tại, Kế hoạch.
36
- - **Ví dụ Skills:** `qk-feature-delivery` (bước sau), `qk-design-to-code`.
37
-
38
- ## 6. 🚦 Delegate / Govern (Điều phối / Quản trị)
39
- - **Bản chất:** Không trực tiếp làm việc, mà làm nhiệm vụ định tuyến (routing) công việc cho Agent khác hoặc kiểm soát quyền (deny/allow) dựa trên luật lệ.
40
- - **Trigger:** Nhận task không thuộc chuyên môn, hoặc nhận yêu cầu xác thực quyền hạn.
41
- - **Evidence Required:** Danh sách các Skills khác, Policies (RBAC/ABAC).
42
- - **Ví dụ Skills:** `qk-orchestrator`, `qk-access-policy`.
43
-
44
- ---
45
-
46
- > **Nguyên tắc Thiết kế Hệ thống:**
47
- > Khi tạo một Skill mới, đừng cố gắng mô tả "tính cách" của nó. Hãy tự hỏi: *Nó cần dùng những Primitives nào để hoàn thành nhiệm vụ?*
@@ -1,13 +0,0 @@
1
- ---
2
- id: complexity-budget
3
- type: dial
4
- description: Defines the ceiling for architectural and code complexity.
5
- ---
6
-
7
- Levels:
8
- - **Level 1 (Prototype):** Hardcode data, skip tests, minimal validation. Goal is highest speed.
9
- - **Level 5 (Standard):** Monolith, basic SQL/ORM, Zod validation, essential error states.
10
- - **Level 10 (Enterprise):** Event-driven architecture, CQRS, strict rate limiting, 100% test coverage.
11
-
12
- Usage:
13
- - The AI must infer the current budget based on the Project Scale (MVP vs Enterprise) and stick to it. Never exceed the budget.
@@ -1,13 +0,0 @@
1
- ---
2
- id: granularity
3
- type: dial
4
- description: Defines the level of detail for access control policies.
5
- ---
6
-
7
- Levels:
8
- - **Level 1 (Coarse):** Role-based (Admin vs User).
9
- - **Level 5 (Fine-grained):** Attribute-based (Owner of the resource).
10
- - **Level 10 (Micro):** Field-level permissions (Can edit Title but not Price).
11
-
12
- Usage:
13
- - Adjust based on the project scale. For MVP, stick to Level 1.
@@ -1,13 +0,0 @@
1
- ---
2
- id: optimization-strategy
3
- type: dial
4
- description: Defines the approach to database and performance optimization.
5
- ---
6
-
7
- Levels:
8
- - **Level 1 (Query Fixes):** Resolve N+1 issues and add basic indexes.
9
- - **Level 5 (Caching):** Introduce Redis or Memcached for heavy read paths.
10
- - **Level 10 (Architecture):** CQRS, Read Replicas, Sharding.
11
-
12
- Usage:
13
- - Start at Level 1. Never jump to Level 5 or 10 without explicit bottleneck evidence.
@@ -1,13 +0,0 @@
1
- ---
2
- id: strictness
3
- type: dial
4
- description: Defines how rigidly the AI enforces patterns and rules.
5
- ---
6
-
7
- Levels:
8
- - **Level 1 (Lenient):** Fix only syntax errors and fatal bugs. Ignore bad architecture.
9
- - **Level 5 (Balanced):** Suggest improvements but don't rewrite entire files.
10
- - **Level 10 (Draconian):** Fail immediately on any Linter warning. Enforce strict SOLID principles.
11
-
12
- Usage:
13
- - Adjust based on the user's intent. If they just want a quick fix, lower the strictness. If they ask for an audit, raise it.
@@ -1,9 +0,0 @@
1
- ---
2
- id: delegation-only
3
- type: rule
4
- description: Restricts the skill from making direct system modifications.
5
- ---
6
-
7
- Condition:
8
- - The skill must ONLY plan, analyze, and dispatch instructions to sub-skills.
9
- - It must NEVER write code, execute CLI commands, or modify files directly.
@@ -1,9 +0,0 @@
1
- ---
2
- id: minimal-diff
3
- type: rule
4
- description: Ensure the smallest possible change footprint.
5
- ---
6
-
7
- Condition:
8
- - Must only modify lines directly related to the task.
9
- - Reformatting, restructuring, or touching unrelated files is strictly forbidden.
@@ -1,310 +0,0 @@
1
- # Skill Schema V7.5 — Runtime Standard Specification
2
-
3
- > **Mục đích:** Đây là "lint rules" chính thức cho mọi skill trong bộ V7.5.
4
- > Bất kỳ skill nào không pass spec này đều **phải được fix trước khi publish**.
5
-
6
- ---
7
-
8
- ## Frontmatter Required Fields
9
-
10
- ```yaml
11
- # REQUIRED — tất cả fields sau đây bắt buộc phải có
12
- name: string # qk-[skill-name]
13
- category: enum # core|frontend|backend|fullstack|security|qa|maintenance|devops|utilities
14
- version: semver # 7.5.x
15
- description: string # one sentence, ends without period
16
- platforms: array # [antigravity, claude-code, cursor, windsurf, kilo-code]
17
- execution_mode: string # deterministic | exploratory
18
- skill_version: semver # same as version
19
- runtime_version: integer # 1 (current runtime contract version)
20
- schema_version: integer # 2 (current schema version)
21
- cost: enum # low | medium | high
22
- latency: enum # fast | medium | slow
23
- risk: enum # low | medium | high
24
- side_effects: enum # edit_files | run_commands | read_only | none
25
- produces: array # [code, report, schema, plan, tokens]
26
- consumes: array # [context-graph, design-md, stack-trace, json-payload, none]
27
- token_budget:
28
- max_files_read: integer # 1–10
29
- max_lines_per_read: integer # 50–200
30
- max_shell_commands: integer # 0–5
31
- stop_early: boolean
32
- exit_codes: array # must include: [SUCCESS, BLOCKED, FAILED, PARTIAL]
33
- ```
34
-
35
- **Lint Rule:** Bất kỳ field nào thiếu → FAIL frontmatter check.
36
-
37
- ---
38
-
39
- ## 11 Required Body Sections
40
-
41
- Dưới đây là 11 sections bắt buộc trong body mỗi SKILL.md, theo thứ tự.
42
- **Special skills** (redirect, help) được miễn một số section — xem `special_skill_exemptions` cuối file.
43
-
44
- ### Section 1: Language Rule Header
45
- ```
46
- > **Language rule:** Code, identifiers, file names → English. Explanations, summaries → Vietnamese (match user language).
47
- ```
48
- **Lint Rule:** Phải có ngay sau heading `# qk-[name]`.
49
-
50
- ---
51
-
52
- ### Section 2: Preconditions
53
- ```markdown
54
- ## Preconditions
55
- - [ ] [Condition 1]
56
- - [ ] [Condition N]
57
-
58
- \`\`\`
59
- On missing precondition:
60
- EXIT: BLOCKED
61
- Message: "[specific message]"
62
- \`\`\`
63
- ```
64
- **Lint Rules:**
65
- - Phải có ít nhất 1 precondition
66
- - Phải có code block với `EXIT: BLOCKED` và `Message:`
67
- - Không được chỉ có "Repository accessible" — phải specific
68
-
69
- ---
70
-
71
- ### Section 3: Scope + Non-Goals
72
- ```markdown
73
- ## Scope
74
- - ✅ [What it DOES]
75
-
76
- ## Non-Goals
77
- - ❌ [Anti-pattern — with reason]
78
- ```
79
- **Lint Rules:**
80
- - Scope: ≥ 2 items
81
- - Non-Goals: ≥ 3 items
82
- - At least one Non-Goal must be about tool usage (never create scripts / never read entire files)
83
-
84
- ---
85
-
86
- ### Section 4: Priority Order
87
- ```markdown
88
- ## Priority Order
89
- | Priority | Task | Skip Threshold |
90
- |----------|------|----------------|
91
- | P1 | ... | Never |
92
- ```
93
- **Lint Rules:**
94
- - Minimum 3 priorities
95
- - P1 must have "Never" skip threshold
96
- - At least one Px must have a percentage threshold (e.g., "Budget < 50%")
97
-
98
- ---
99
-
100
- ### Section 5: Workflow with Decision Trees
101
- ```markdown
102
- ## Workflow
103
-
104
- ### Phase N — [Name]
105
- **Steps:**
106
- 1. [step]
107
-
108
- **Decision:**
109
- \`\`\`
110
- IF [condition] → [action]
111
- ELSE → [action]
112
- \`\`\`
113
-
114
- **Exit When:**
115
- - [condition] → go to Phase N+1 | EXIT: [code]
116
- ```
117
- **Lint Rules:**
118
- - Minimum 2 phases
119
- - Each phase MUST have at least one `Decision:` block
120
- - Each phase MUST have `Exit When:` conditions
121
- - No phase can have only "steps" without decisions
122
-
123
- ---
124
-
125
- ### Section 6: Confidence Model
126
- ```markdown
127
- ## Confidence Model
128
- | Level | Condition | Action |
129
- |--------|-----------|--------|
130
- | HIGH | ... | ... |
131
- | MEDIUM | ... | ... |
132
- | LOW | ... | EXIT: BLOCKED |
133
- ```
134
- **Lint Rules:**
135
- - Must have all 3 levels: HIGH, MEDIUM, LOW
136
- - LOW must always lead to either BLOCKED or user confirmation
137
-
138
- ---
139
-
140
- ### Section 7: Severity
141
- ```markdown
142
- ## Severity
143
- | Level | Definition | Example |
144
- |----------|-----------|---------|
145
- | CRITICAL | ... | ... |
146
- | HIGH | ... | ... |
147
- | MEDIUM | ... | ... |
148
- | LOW | ... | ... |
149
- ```
150
- **Lint Rules:**
151
- - Must have all 4 levels: CRITICAL, HIGH, MEDIUM, LOW
152
- - Each level must have a concrete Example column
153
-
154
- ---
155
-
156
- ### Section 8: Evidence Format
157
- ```markdown
158
- ## Evidence Format
159
- \`\`\`
160
- [SEVERITY] path/to/file.ts:LINE
161
- [Field]: [value]
162
- Confidence: [HIGH|MEDIUM|LOW]
163
- Fix: [suggestion]
164
- \`\`\`
165
- ```
166
- **Lint Rules:**
167
- - Must include `[SEVERITY]` tag with file:LINE format
168
- - Must include `Confidence:` field
169
- - Must include `Fix:` field
170
- - Must include a filled example below the template
171
-
172
- ---
173
-
174
- ### Section 9: Retry Policy
175
- ```markdown
176
- ## Retry Policy
177
- \`\`\`
178
- [trigger]
179
- └─ [action]
180
- ├─ [outcome A]
181
- └─ [outcome B] → [escalation]
182
- └─ Do NOT retry more than N times
183
- \`\`\`
184
- ```
185
- **Lint Rules:**
186
- - Must have explicit max retry count (≤ 3)
187
- - Must specify what happens after max retries (ESCALATE or FAILED)
188
- - Read-only skills may have simplified retry: "Audit is read-only — no retry needed."
189
-
190
- ---
191
-
192
- ### Section 10: Escalation Rules
193
- ```markdown
194
- ## Escalation Rules
195
- \`\`\`
196
- BLOCKED: [specific reason]
197
- Missing:
198
- - [artifact or info needed]
199
- Questions:
200
- 1. [specific question]
201
- Recommended Assumptions (if proceeding):
202
- - [assumption]
203
- \`\`\`
204
- ```
205
- **Lint Rules:**
206
- - Must have structured format: BLOCKED, Missing, Questions, Recommended Assumptions
207
- - Cannot be just "ask user" or "STOP"
208
- - Must have at least 1 specific question
209
-
210
- ---
211
-
212
- ### Section 11: Handoff Contract
213
- ```markdown
214
- ## Handoff Contract
215
- ### Consumes
216
- \`\`\`json
217
- { "from": "...", "required_fields": [...], "optional_fields": [...] }
218
- \`\`\`
219
- ### Produces
220
- \`\`\`json
221
- { "to": "...", "output_fields": [...] }
222
- \`\`\`
223
- ```
224
- **Lint Rules:**
225
- - Both Consumes and Produces must be present
226
- - `required_fields` must be a non-empty array
227
- - `to` in Produces must reference a real skill name or "user"
228
-
229
- ---
230
-
231
- ### Section 12: Exit Codes Table
232
- ```markdown
233
- ## Exit Codes
234
- | Code | Meaning | When |
235
- |---------|---------|------|
236
- | SUCCESS | ... | ... |
237
- | PARTIAL | ... | ... |
238
- | BLOCKED | ... | ... |
239
- | FAILED | ... | ... |
240
- ```
241
- **Lint Rules:**
242
- - Must have all 4 codes: SUCCESS, PARTIAL, BLOCKED, FAILED
243
- - Each must have "When" column with specific trigger condition
244
-
245
- ---
246
-
247
- ### Section 13: Compliance Block (NEW — End of File)
248
- ```markdown
249
- ## Compliance
250
- | Check | Status |
251
- |----------------------|--------|
252
- | Runtime Standard | 11/11 |
253
- | Frontmatter Complete | ✅ |
254
- | References Valid | ✅ |
255
- | Decision Trees | PASS |
256
- | Thresholds Defined | PASS |
257
- | schema_version | 2 |
258
- | runtime_version | 1 |
259
- ```
260
- **Lint Rules:**
261
- - Must be the LAST section in every skill
262
- - Must be auto-generated or manually updated on each change
263
- - "References Valid" = all `references/*.md` files actually exist
264
-
265
- ---
266
-
267
- ## Reference Files Rule
268
-
269
- If a SKILL.md mentions `references/[file].md`, that file MUST exist.
270
-
271
- ```
272
- LINT ERROR: qk-ui-audit references "references/anti-slop-checklist.md" — FILE NOT FOUND
273
- ```
274
-
275
- ---
276
-
277
- ## Special Skill Exemptions
278
-
279
- Some skills have reduced requirements:
280
-
281
- | Skill Type | Exempted Sections |
282
- |-----------|-------------------|
283
- | Redirect skill (`qk-policy-engine`) | Sections 2-12 optional — must have redirect target |
284
- | Help/Discovery skill (`qk-help`) | Sections 5-11 optional — must have skill list |
285
-
286
- ---
287
-
288
- ## Lint Scoring
289
-
290
- ```
291
- Total sections: 13 (including Compliance block)
292
- Frontmatter: Pass/Fail (binary)
293
-
294
- Score = (sections_present / 13) × 100
295
-
296
- Grade:
297
- 100% → COMPLIANT ✅
298
- 90%+ → MINOR ISSUES ⚠️
299
- 70%+ → NEEDS WORK ❌
300
- <70% → NON-COMPLIANT 🔴
301
- ```
302
-
303
- ---
304
-
305
- ## Version History
306
-
307
- | schema_version | runtime_version | Changes |
308
- |---------------|-----------------|---------|
309
- | 1 | 1 | Initial V7.0 (YAML constraints only) |
310
- | 2 | 1 | V7.5 Runtime Standard (11 sections + metadata) |
@@ -1,52 +0,0 @@
1
- ---
2
- id: nodejs-knowledge-base
3
- domain: backend
4
- tags: [nodejs, express, api, middleware]
5
- priority: high
6
- ---
7
-
8
- # Node.js Backend Knowledge Base
9
-
10
- ## Architecture Patterns
11
- - **Controller Layer:** Handle HTTP requests/responses, input validation, delegate to Service
12
- - **Service Layer:** Business logic, data transformation, transaction management
13
- - **Repository Layer:** Direct database queries, ORM interactions
14
- - **Middleware:** Auth guards, logging, rate limiting, error handling
15
-
16
- ## Express Best Practices
17
- ```ts
18
- // Controller pattern - thin, delegates to service
19
- export async function createUser(req: Request, res: Response) {
20
- const result = await userService.create(req.body);
21
- res.status(201).json(result);
22
- }
23
-
24
- // Service pattern - business logic
25
- export async function create(userData: UserDto) {
26
- // Validation
27
- const validated = userSchema.parse(userData);
28
- // Transaction
29
- return db.user.create({ data: validated });
30
- }
31
-
32
- // Middleware pattern - reusable
33
- export const requireAuth = (req: Request, res: Response, next: NextFunction) => {
34
- const user = verifyToken(req.headers.authorization);
35
- if (!user) return res.status(401).json({ error: 'Unauthorized' });
36
- req.user = user;
37
- next();
38
- };
39
- ```
40
-
41
- ## Error Handling
42
- - Never throw raw Errors. Use custom error classes.
43
- - Always catch async errors in middleware.
44
- - Return consistent error format: `{ error: string, code?: string }`
45
-
46
- ## Security Checklist
47
- - Use helmet middleware for security headers
48
- - Validate all inputs with Zod/Joi
49
- - Never commit .env files
50
- - Use parameterized queries to prevent SQL injection
51
- - Rate limit public endpoints
52
- - Log security events (failed logins, permission denied)
@@ -1,81 +0,0 @@
1
- ---
2
- id: react-knowledge-base
3
- domain: frontend
4
- tags: [react, hooks, components, state]
5
- priority: high
6
- ---
7
-
8
- # React Knowledge Base
9
-
10
- ## State Management Rules
11
- - Use `useState` for strictly local UI state (e.g., dropdown toggle).
12
- - Use `useContext` or global stores (Zustand/Redux) when prop drilling exceeds 3 levels.
13
- - Never store derived data in state. Compute it on the fly during render.
14
- - Never store API responses in Redux if a Server State tool (React Query/SWR) is available.
15
- - For forms: Use React Hook Form + Zod for validation, NOT useState for each field.
16
-
17
- ## Hooks Best Practices
18
- - **useEffect:** Avoid using `useEffect` for data transformation or syncing state. Only use it for actual side effects (subscriptions, API calls, manual DOM mutations).
19
- - **useMemo / useCallback:** Only use when passing props to heavily memoized child components or when the computation is extremely expensive. Do not use them blindly.
20
- - **Custom Hooks:** Extract complex logic out of UI components into custom hooks. Prefix them with `use` (e.g., `useUserAuth`).
21
- - **Custom Hook Pattern:**
22
- ```ts
23
- // useApi.ts - Generic API hook
24
- export function useApi<T>(url: string) {
25
- const [data, setData] = useState<T | null>(null);
26
- const [loading, setLoading] = useState(false);
27
- const [error, setError] = useState<string | null>(null);
28
-
29
- useEffect(() => {
30
- fetchData();
31
- }, [url]);
32
- }
33
- ```
34
-
35
- ## Component Boundaries
36
- - Follow Single Responsibility Principle. A component should either handle logic (Container) or handle rendering UI (Presentational), ideally not both if it's complex.
37
- - Keep files under 300 lines. If a file is larger, break it down.
38
- - **Component Hierarchy:**
39
- - `components/shared/` - Reusable, no business logic
40
- - `features/<domain>/components/` - Feature-specific components
41
- - `layouts/` - Page layouts and wrappers
42
-
43
- ## Performance Gotchas
44
- - Stale Closures: Always include all reactive variables in the dependency array of `useEffect` or `useCallback`.
45
- - Keys in Lists: Always use unique IDs for `key` props. Never use array indices unless the list is completely static.
46
- - **Re-render Detection:**
47
- ```ts
48
- // Use console.log inside component to detect renders
49
- // Wrap child in React.memo if unnecessary re-renders occur
50
- export const MemoizedChild = React.memo(ChildComponent);
51
- ```
52
-
53
- ## Error Handling Patterns
54
- ```ts
55
- // API Error Boundary
56
- class ErrorBoundary extends React.Component {
57
- state = { hasError: false };
58
- static getDerivedStateFromError() {
59
- return { hasError: true };
60
- }
61
- }
62
-
63
- // Hook error handling
64
- const { data, error, isLoading } = useQuery(['key'], fetchFn);
65
- if (error) return <ErrorMessage error={error} />;
66
- if (isLoading) return <LoadingSpinner />;
67
- ```
68
-
69
- ## Testing Patterns
70
- ```tsx
71
- // Component test with React Testing Library
72
- import { render, screen, waitFor } from '@testing-library/react';
73
- import userEvent from '@testing-library/user-event';
74
-
75
- test('handles user interaction', async () => {
76
- render(<LoginForm />);
77
- const button = screen.getByRole('button', { name: /login/i });
78
- await userEvent.click(button);
79
- await waitFor(() => expect(mockSubmit).toHaveBeenCalled());
80
- });
81
- ```
package/migrate-to-v6.js DELETED
@@ -1,130 +0,0 @@
1
- const fs = require('fs');
2
- const path = require('path');
3
- const skillsDir = path.join(__dirname, 'skills');
4
-
5
- function convertToBSF(content, name) {
6
- // Extract Frontmatter
7
- const fmMatch = content.match(/^---\n([\s\S]*?)\n---/);
8
- const fm = fmMatch ? fmMatch[1] : '';
9
-
10
- // Create v6 Frontmatter
11
- let newFm = '---\n';
12
- newFm += fm.split('\n').filter(line => {
13
- return !line.startsWith('behavior:') &&
14
- !line.startsWith('intent:') &&
15
- !line.startsWith('priority:') &&
16
- !line.startsWith('trigger:') &&
17
- !line.startsWith('inputs:') &&
18
- !line.startsWith('outputs:') &&
19
- !line.startsWith('allowed_tools:') &&
20
- !line.startsWith('pipeline:');
21
- }).join('\n');
22
- newFm += '\n---';
23
-
24
- const missionMatch = content.match(/## ?? Mission \(Scope\)\n([\s\S]*?)(?=\n## |\n---|$)/);
25
- const missionText = missionMatch ? missionMatch[1].trim() : 'Define mission here';
26
-
27
- const bsf = \\
28
-
29
- # ?? Behavior Specification: \
30
-
31
- ## 1. Behavior (�?nh danh H�nh vi)
32
- \\\yaml
33
- Mission: "Th?c thi nhi?m v? c?t l�i theo chu?n v6."
34
- Authority: "�u?c quy?n y�u c?u th�m th�ng tin n?u thi?u."
35
- Responsibility: "B?o d?m ch?t lu?ng d?u ra."
36
- Limitation: "Kh�ng vi ph?m Invariants c?a h? th?ng."
37
- \\\
38
-
39
- ## 2. Contracts (H?p d?ng)
40
-
41
- ### 2.1. Capability Contract
42
- \\\yaml
43
- Can:
44
- - read_code
45
- - execute_tests
46
- Must:
47
- - verify_assumptions_before_coding
48
- Cannot:
49
- - execute_destructive_commands
50
- \\\
51
-
52
- ### 2.2. Output Contract
53
- \\\yaml
54
- Artifacts:
55
- - summary_report
56
- Completion: "Artifacts generated & Quality Gates passed."
57
- \\\
58
-
59
- ## 3. Policies (Ch�nh s�ch)
60
-
61
- ### 3.1. Context Policy
62
- \\\yaml
63
- Scope: current_repo
64
- Priority:
65
- 1: Project Docs
66
- 2: Current Conversation
67
- Trust: "official docs > code > assumptions"
68
- Fallback: ask_user
69
- \\\
70
-
71
- ### 3.2. Reasoning Boundary
72
- \\\yaml
73
- May infer: "Bi?n s? c?c b?"
74
- Must verify: "Logic nghi?p v?"
75
- Must ask: "Y�u c?u m?p m?"
76
- Must refuse: "R?i ro b?o m?t"
77
- \\\
78
-
79
- ### 3.3. Decision Policy
80
- \\\yaml
81
- Priority:
82
- 1: correctness
83
- 2: safety
84
- 3: maintainability
85
- \\\
86
-
87
- ### 3.4. Evidence Policy
88
- \\\yaml
89
- Accept: [logs, unit tests]
90
- Prefer: [official vendor docs]
91
- Reject: [guesswork]
92
- \\\
93
-
94
- ### 3.5. Escalation Policy
95
- \\\yaml
96
- Warning: "Thay d?i c?u tr�c"
97
- Confirmation: "X�a file"
98
- Stop: "L?i Permission"
99
- \\\
100
-
101
- ## 4. Protocol (T�y ch?n)
102
-
103
- \\\yaml
104
- States:
105
- - collect_context
106
- - execute
107
-
108
- Transitions:
109
- collect_context:
110
- if context_missing: -> Stop
111
- else: -> execute
112
- execute: -> Done
113
- \\\
114
- \;
115
- return bsf.replace(/\n\n\n/g, '\n\n');
116
- }
117
-
118
- fs.readdirSync(skillsDir).forEach(dir => {
119
- const fullPath = path.join(skillsDir, dir);
120
- if (fs.statSync(fullPath).isDirectory() && !dir.startsWith('_archive')) {
121
- const skillPath = path.join(fullPath, 'SKILL.md');
122
- if (fs.existsSync(skillPath)) {
123
- if (dir === 'qk-bug-resolution') return; // already done
124
- const content = fs.readFileSync(skillPath, 'utf8');
125
- const newContent = convertToBSF(content, dir);
126
- fs.writeFileSync(skillPath, newContent);
127
- console.log('Converted ' + dir);
128
- }
129
- }
130
- });