@heyai-rules/pilo-masterkit 1.2.2

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 (305) hide show
  1. package/.agent/agents/PILO_MASTER.md +77 -0
  2. package/.agent/agents/architect.md +211 -0
  3. package/.agent/agents/backend-specialist.md +263 -0
  4. package/.agent/agents/build-error-resolver.md +114 -0
  5. package/.agent/agents/chief-of-staff.md +151 -0
  6. package/.agent/agents/code-archaeologist.md +106 -0
  7. package/.agent/agents/code-reviewer.md +237 -0
  8. package/.agent/agents/cpp-build-resolver.md +90 -0
  9. package/.agent/agents/cpp-reviewer.md +72 -0
  10. package/.agent/agents/database-architect.md +226 -0
  11. package/.agent/agents/database-reviewer.md +91 -0
  12. package/.agent/agents/debugger.md +225 -0
  13. package/.agent/agents/devops-engineer.md +242 -0
  14. package/.agent/agents/doc-updater.md +107 -0
  15. package/.agent/agents/docs-lookup.md +68 -0
  16. package/.agent/agents/documentation-writer.md +104 -0
  17. package/.agent/agents/e2e-runner.md +107 -0
  18. package/.agent/agents/explorer-agent.md +73 -0
  19. package/.agent/agents/flutter-reviewer.md +243 -0
  20. package/.agent/agents/frontend-specialist.md +593 -0
  21. package/.agent/agents/game-developer.md +162 -0
  22. package/.agent/agents/go-build-resolver.md +94 -0
  23. package/.agent/agents/go-reviewer.md +76 -0
  24. package/.agent/agents/harness-optimizer.md +35 -0
  25. package/.agent/agents/java-build-resolver.md +153 -0
  26. package/.agent/agents/java-reviewer.md +92 -0
  27. package/.agent/agents/kotlin-build-resolver.md +118 -0
  28. package/.agent/agents/kotlin-reviewer.md +159 -0
  29. package/.agent/agents/loop-operator.md +36 -0
  30. package/.agent/agents/mobile-developer.md +377 -0
  31. package/.agent/agents/orchestrator.md +416 -0
  32. package/.agent/agents/penetration-tester.md +188 -0
  33. package/.agent/agents/performance-optimizer.md +187 -0
  34. package/.agent/agents/planner.md +212 -0
  35. package/.agent/agents/product-manager.md +112 -0
  36. package/.agent/agents/product-owner.md +95 -0
  37. package/.agent/agents/project-planner.md +406 -0
  38. package/.agent/agents/python-reviewer.md +98 -0
  39. package/.agent/agents/pytorch-build-resolver.md +120 -0
  40. package/.agent/agents/qa-automation-engineer.md +103 -0
  41. package/.agent/agents/refactor-cleaner.md +85 -0
  42. package/.agent/agents/rust-build-resolver.md +148 -0
  43. package/.agent/agents/rust-reviewer.md +94 -0
  44. package/.agent/agents/security-auditor.md +170 -0
  45. package/.agent/agents/security-reviewer.md +108 -0
  46. package/.agent/agents/seo-specialist.md +111 -0
  47. package/.agent/agents/tdd-guide.md +91 -0
  48. package/.agent/agents/test-engineer.md +158 -0
  49. package/.agent/agents/typescript-reviewer.md +112 -0
  50. package/.agent/rules/ARCHITECTURAL_BLUEPRINTS.md +62 -0
  51. package/.agent/rules/CODE_CRAFTSMANSHIP.md +69 -0
  52. package/.agent/rules/CORE_RULES.md +72 -0
  53. package/.agent/rules/PROJECT_MAP.md +58 -0
  54. package/.agent/rules/QUALITY_ASSURANCE.md +54 -0
  55. package/.agent/rules/SECURITY_ARMOR.md +44 -0
  56. package/.agent/rules/VERSION_ORCHESTRATION.md +64 -0
  57. package/.agent/rules/WORKFLOW_ORCHESTRATION.md +55 -0
  58. package/.agent/scripts/auto_preview.py +148 -0
  59. package/.agent/scripts/checklist.py +217 -0
  60. package/.agent/scripts/session_manager.py +120 -0
  61. package/.agent/scripts/verify_all.py +327 -0
  62. package/.agent/skills/api-patterns/SKILL.md +81 -0
  63. package/.agent/skills/api-patterns/api-style.md +42 -0
  64. package/.agent/skills/api-patterns/auth.md +24 -0
  65. package/.agent/skills/api-patterns/documentation.md +26 -0
  66. package/.agent/skills/api-patterns/graphql.md +41 -0
  67. package/.agent/skills/api-patterns/rate-limiting.md +31 -0
  68. package/.agent/skills/api-patterns/response.md +37 -0
  69. package/.agent/skills/api-patterns/rest.md +40 -0
  70. package/.agent/skills/api-patterns/scripts/api_validator.py +211 -0
  71. package/.agent/skills/api-patterns/security-testing.md +122 -0
  72. package/.agent/skills/api-patterns/trpc.md +41 -0
  73. package/.agent/skills/api-patterns/versioning.md +22 -0
  74. package/.agent/skills/app-builder/SKILL.md +75 -0
  75. package/.agent/skills/app-builder/agent-coordination.md +71 -0
  76. package/.agent/skills/app-builder/feature-building.md +53 -0
  77. package/.agent/skills/app-builder/project-detection.md +34 -0
  78. package/.agent/skills/app-builder/scaffolding.md +118 -0
  79. package/.agent/skills/app-builder/tech-stack.md +41 -0
  80. package/.agent/skills/app-builder/templates/SKILL.md +39 -0
  81. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +76 -0
  82. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +92 -0
  83. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +88 -0
  84. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +88 -0
  85. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +83 -0
  86. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +90 -0
  87. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +90 -0
  88. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +122 -0
  89. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +122 -0
  90. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +169 -0
  91. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +134 -0
  92. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +83 -0
  93. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +119 -0
  94. package/.agent/skills/architecture/SKILL.md +55 -0
  95. package/.agent/skills/architecture/context-discovery.md +43 -0
  96. package/.agent/skills/architecture/examples.md +94 -0
  97. package/.agent/skills/architecture/pattern-selection.md +68 -0
  98. package/.agent/skills/architecture/patterns-reference.md +50 -0
  99. package/.agent/skills/architecture/trade-off-analysis.md +77 -0
  100. package/.agent/skills/bash-linux/SKILL.md +199 -0
  101. package/.agent/skills/behavioral-modes/SKILL.md +242 -0
  102. package/.agent/skills/brainstorming/SKILL.md +163 -0
  103. package/.agent/skills/brainstorming/dynamic-questioning.md +350 -0
  104. package/.agent/skills/clean-code/SKILL.md +201 -0
  105. package/.agent/skills/code-review-checklist/SKILL.md +109 -0
  106. package/.agent/skills/database-design/SKILL.md +52 -0
  107. package/.agent/skills/database-design/database-selection.md +43 -0
  108. package/.agent/skills/database-design/indexing.md +39 -0
  109. package/.agent/skills/database-design/migrations.md +48 -0
  110. package/.agent/skills/database-design/optimization.md +36 -0
  111. package/.agent/skills/database-design/orm-selection.md +30 -0
  112. package/.agent/skills/database-design/schema-design.md +56 -0
  113. package/.agent/skills/database-design/scripts/schema_validator.py +172 -0
  114. package/.agent/skills/deployment-procedures/SKILL.md +241 -0
  115. package/.agent/skills/doc.md +177 -0
  116. package/.agent/skills/documentation-templates/SKILL.md +194 -0
  117. package/.agent/skills/frontend-design/SKILL.md +452 -0
  118. package/.agent/skills/frontend-design/animation-guide.md +331 -0
  119. package/.agent/skills/frontend-design/color-system.md +311 -0
  120. package/.agent/skills/frontend-design/decision-trees.md +418 -0
  121. package/.agent/skills/frontend-design/motion-graphics.md +306 -0
  122. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +183 -0
  123. package/.agent/skills/frontend-design/scripts/ux_audit.py +722 -0
  124. package/.agent/skills/frontend-design/typography-system.md +345 -0
  125. package/.agent/skills/frontend-design/ux-psychology.md +1116 -0
  126. package/.agent/skills/frontend-design/visual-effects.md +383 -0
  127. package/.agent/skills/game-development/2d-games/SKILL.md +119 -0
  128. package/.agent/skills/game-development/3d-games/SKILL.md +135 -0
  129. package/.agent/skills/game-development/SKILL.md +167 -0
  130. package/.agent/skills/game-development/game-art/SKILL.md +185 -0
  131. package/.agent/skills/game-development/game-audio/SKILL.md +190 -0
  132. package/.agent/skills/game-development/game-design/SKILL.md +129 -0
  133. package/.agent/skills/game-development/mobile-games/SKILL.md +108 -0
  134. package/.agent/skills/game-development/multiplayer/SKILL.md +132 -0
  135. package/.agent/skills/game-development/pc-games/SKILL.md +144 -0
  136. package/.agent/skills/game-development/vr-ar/SKILL.md +123 -0
  137. package/.agent/skills/game-development/web-games/SKILL.md +150 -0
  138. package/.agent/skills/geo-fundamentals/SKILL.md +156 -0
  139. package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +289 -0
  140. package/.agent/skills/i18n-localization/SKILL.md +154 -0
  141. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +241 -0
  142. package/.agent/skills/intelligent-routing/SKILL.md +335 -0
  143. package/.agent/skills/lint-and-validate/SKILL.md +45 -0
  144. package/.agent/skills/lint-and-validate/scripts/lint_runner.py +184 -0
  145. package/.agent/skills/lint-and-validate/scripts/type_coverage.py +173 -0
  146. package/.agent/skills/mcp-builder/SKILL.md +176 -0
  147. package/.agent/skills/mobile-design/SKILL.md +394 -0
  148. package/.agent/skills/mobile-design/decision-trees.md +516 -0
  149. package/.agent/skills/mobile-design/mobile-backend.md +491 -0
  150. package/.agent/skills/mobile-design/mobile-color-system.md +420 -0
  151. package/.agent/skills/mobile-design/mobile-debugging.md +122 -0
  152. package/.agent/skills/mobile-design/mobile-design-thinking.md +357 -0
  153. package/.agent/skills/mobile-design/mobile-navigation.md +458 -0
  154. package/.agent/skills/mobile-design/mobile-performance.md +767 -0
  155. package/.agent/skills/mobile-design/mobile-testing.md +356 -0
  156. package/.agent/skills/mobile-design/mobile-typography.md +433 -0
  157. package/.agent/skills/mobile-design/platform-android.md +666 -0
  158. package/.agent/skills/mobile-design/platform-ios.md +561 -0
  159. package/.agent/skills/mobile-design/scripts/mobile_audit.py +670 -0
  160. package/.agent/skills/mobile-design/touch-psychology.md +537 -0
  161. package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +351 -0
  162. package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +240 -0
  163. package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +490 -0
  164. package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +264 -0
  165. package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +581 -0
  166. package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +432 -0
  167. package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +684 -0
  168. package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +150 -0
  169. package/.agent/skills/nextjs-react-expert/9-cache-components.md +103 -0
  170. package/.agent/skills/nextjs-react-expert/SKILL.md +293 -0
  171. package/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +222 -0
  172. package/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +252 -0
  173. package/.agent/skills/nodejs-best-practices/SKILL.md +333 -0
  174. package/.agent/skills/parallel-agents/SKILL.md +175 -0
  175. package/.agent/skills/performance-profiling/SKILL.md +143 -0
  176. package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +76 -0
  177. package/.agent/skills/plan-writing/SKILL.md +152 -0
  178. package/.agent/skills/powershell-windows/SKILL.md +167 -0
  179. package/.agent/skills/python-patterns/SKILL.md +441 -0
  180. package/.agent/skills/red-team-tactics/SKILL.md +199 -0
  181. package/.agent/skills/rust-pro/SKILL.md +176 -0
  182. package/.agent/skills/seo-fundamentals/SKILL.md +129 -0
  183. package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +219 -0
  184. package/.agent/skills/server-management/SKILL.md +161 -0
  185. package/.agent/skills/systematic-debugging/SKILL.md +109 -0
  186. package/.agent/skills/tailwind-patterns/SKILL.md +269 -0
  187. package/.agent/skills/tdd-workflow/SKILL.md +149 -0
  188. package/.agent/skills/testing-patterns/SKILL.md +178 -0
  189. package/.agent/skills/testing-patterns/scripts/test_runner.py +219 -0
  190. package/.agent/skills/ui-ux-pro-max/SKILL.md +292 -0
  191. package/.agent/skills/ui-ux-pro-max/data/charts.csv +26 -0
  192. package/.agent/skills/ui-ux-pro-max/data/colors.csv +97 -0
  193. package/.agent/skills/ui-ux-pro-max/data/icons.csv +101 -0
  194. package/.agent/skills/ui-ux-pro-max/data/landing.csv +31 -0
  195. package/.agent/skills/ui-ux-pro-max/data/products.csv +97 -0
  196. package/.agent/skills/ui-ux-pro-max/data/react-performance.csv +45 -0
  197. package/.agent/skills/ui-ux-pro-max/data/stacks/astro.csv +54 -0
  198. package/.agent/skills/ui-ux-pro-max/data/stacks/flutter.csv +53 -0
  199. package/.agent/skills/ui-ux-pro-max/data/stacks/html-tailwind.csv +56 -0
  200. package/.agent/skills/ui-ux-pro-max/data/stacks/jetpack-compose.csv +53 -0
  201. package/.agent/skills/ui-ux-pro-max/data/stacks/nextjs.csv +53 -0
  202. package/.agent/skills/ui-ux-pro-max/data/stacks/nuxt-ui.csv +51 -0
  203. package/.agent/skills/ui-ux-pro-max/data/stacks/nuxtjs.csv +59 -0
  204. package/.agent/skills/ui-ux-pro-max/data/stacks/react-native.csv +52 -0
  205. package/.agent/skills/ui-ux-pro-max/data/stacks/react.csv +54 -0
  206. package/.agent/skills/ui-ux-pro-max/data/stacks/shadcn.csv +61 -0
  207. package/.agent/skills/ui-ux-pro-max/data/stacks/svelte.csv +54 -0
  208. package/.agent/skills/ui-ux-pro-max/data/stacks/swiftui.csv +51 -0
  209. package/.agent/skills/ui-ux-pro-max/data/stacks/vue.csv +50 -0
  210. package/.agent/skills/ui-ux-pro-max/data/styles.csv +68 -0
  211. package/.agent/skills/ui-ux-pro-max/data/typography.csv +58 -0
  212. package/.agent/skills/ui-ux-pro-max/data/ui-reasoning.csv +101 -0
  213. package/.agent/skills/ui-ux-pro-max/data/ux-guidelines.csv +100 -0
  214. package/.agent/skills/ui-ux-pro-max/data/web-interface.csv +31 -0
  215. package/.agent/skills/ui-ux-pro-max/scripts/__pycache__/core.cpython-314.pyc +0 -0
  216. package/.agent/skills/ui-ux-pro-max/scripts/__pycache__/design_system.cpython-314.pyc +0 -0
  217. package/.agent/skills/ui-ux-pro-max/scripts/__pycache__/search.cpython-314.pyc +0 -0
  218. package/.agent/skills/ui-ux-pro-max/scripts/core.py +253 -0
  219. package/.agent/skills/ui-ux-pro-max/scripts/design_system.py +1067 -0
  220. package/.agent/skills/ui-ux-pro-max/scripts/search.py +114 -0
  221. package/.agent/skills/vulnerability-scanner/SKILL.md +276 -0
  222. package/.agent/skills/vulnerability-scanner/checklists.md +121 -0
  223. package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +458 -0
  224. package/.agent/skills/web-design-guidelines/SKILL.md +57 -0
  225. package/.agent/skills/webapp-testing/SKILL.md +187 -0
  226. package/.agent/skills/webapp-testing/scripts/playwright_runner.py +173 -0
  227. package/.agent/tasks/lessons.md +40 -0
  228. package/.agent/tasks/todo.md +33 -0
  229. package/.agent/workflows/aside.md +164 -0
  230. package/.agent/workflows/brainstorm.md +113 -0
  231. package/.agent/workflows/build-fix.md +62 -0
  232. package/.agent/workflows/checkpoint.md +74 -0
  233. package/.agent/workflows/claw.md +51 -0
  234. package/.agent/workflows/code-review.md +40 -0
  235. package/.agent/workflows/context-budget.md +29 -0
  236. package/.agent/workflows/cpp-build.md +173 -0
  237. package/.agent/workflows/cpp-review.md +132 -0
  238. package/.agent/workflows/cpp-test.md +251 -0
  239. package/.agent/workflows/create.md +59 -0
  240. package/.agent/workflows/debug.md +103 -0
  241. package/.agent/workflows/deploy.md +176 -0
  242. package/.agent/workflows/devfleet.md +92 -0
  243. package/.agent/workflows/docs.md +31 -0
  244. package/.agent/workflows/e2e.md +365 -0
  245. package/.agent/workflows/enhance.md +63 -0
  246. package/.agent/workflows/eval.md +120 -0
  247. package/.agent/workflows/evolve.md +178 -0
  248. package/.agent/workflows/go-build.md +183 -0
  249. package/.agent/workflows/go-review.md +148 -0
  250. package/.agent/workflows/go-test.md +268 -0
  251. package/.agent/workflows/gradle-build.md +70 -0
  252. package/.agent/workflows/harness-audit.md +71 -0
  253. package/.agent/workflows/init-docs.md +46 -0
  254. package/.agent/workflows/instinct-export.md +66 -0
  255. package/.agent/workflows/instinct-import.md +114 -0
  256. package/.agent/workflows/instinct-status.md +59 -0
  257. package/.agent/workflows/kotlin-build.md +174 -0
  258. package/.agent/workflows/kotlin-review.md +140 -0
  259. package/.agent/workflows/kotlin-test.md +312 -0
  260. package/.agent/workflows/learn-eval.md +116 -0
  261. package/.agent/workflows/learn.md +70 -0
  262. package/.agent/workflows/loop-start.md +32 -0
  263. package/.agent/workflows/loop-status.md +24 -0
  264. package/.agent/workflows/model-route.md +26 -0
  265. package/.agent/workflows/multi-backend.md +158 -0
  266. package/.agent/workflows/multi-execute.md +315 -0
  267. package/.agent/workflows/multi-frontend.md +158 -0
  268. package/.agent/workflows/multi-plan.md +268 -0
  269. package/.agent/workflows/multi-workflow.md +191 -0
  270. package/.agent/workflows/orchestrate.md +231 -0
  271. package/.agent/workflows/plan.md +115 -0
  272. package/.agent/workflows/pm2.md +272 -0
  273. package/.agent/workflows/preview.md +81 -0
  274. package/.agent/workflows/projects.md +39 -0
  275. package/.agent/workflows/promote.md +41 -0
  276. package/.agent/workflows/prompt-optimize.md +38 -0
  277. package/.agent/workflows/prune.md +31 -0
  278. package/.agent/workflows/python-review.md +297 -0
  279. package/.agent/workflows/quality-gate.md +29 -0
  280. package/.agent/workflows/refactor-clean.md +80 -0
  281. package/.agent/workflows/resume-session.md +156 -0
  282. package/.agent/workflows/rules-distill.md +11 -0
  283. package/.agent/workflows/rust-build.md +187 -0
  284. package/.agent/workflows/rust-review.md +142 -0
  285. package/.agent/workflows/rust-test.md +308 -0
  286. package/.agent/workflows/save-session.md +275 -0
  287. package/.agent/workflows/sessions.md +333 -0
  288. package/.agent/workflows/setup-pm.md +80 -0
  289. package/.agent/workflows/skill-create.md +174 -0
  290. package/.agent/workflows/skill-health.md +54 -0
  291. package/.agent/workflows/status.md +86 -0
  292. package/.agent/workflows/tdd.md +328 -0
  293. package/.agent/workflows/test-coverage.md +69 -0
  294. package/.agent/workflows/test.md +144 -0
  295. package/.agent/workflows/ui-ux-pro-max.md +296 -0
  296. package/.agent/workflows/update-codemaps.md +72 -0
  297. package/.agent/workflows/update-docs.md +84 -0
  298. package/.agent/workflows/verify.md +59 -0
  299. package/LICENSE +176 -0
  300. package/README.md +136 -0
  301. package/RELEASE.md +36 -0
  302. package/package.json +79 -0
  303. package/scripts/release-check.js +55 -0
  304. package/src/bin/cli.js +78 -0
  305. package/src/lib/installer.js +140 -0
package/LICENSE ADDED
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
package/README.md ADDED
@@ -0,0 +1,136 @@
1
+ <div align="center">
2
+ <img src="docs/assets/banner.png" alt="Pilo Masterkit Banner" width="100%">
3
+
4
+ # 🤖 Pilo Masterkit
5
+
6
+ <p><b>The ultimate AI Coding Assistant standardizer and workspace initializer.</b></p>
7
+
8
+ [![NPM version](https://img.shields.io/npm/v/@heyai-rules/pilo-masterkit.svg?style=for-the-badge&color=blue)](https://www.npmjs.com/package/@heyai-rules/pilo-masterkit)
9
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg?style=for-the-badge)](https://opensource.org/licenses/Apache-2.0)
10
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge)](http://makeapullrequest.com)
11
+
12
+ [**English Version**](#english-version) | [**Phiên bản Tiếng Việt**](#phiên-bản-tiếng-việt)
13
+ </div>
14
+
15
+ ---
16
+
17
+ ## 🌎 English Version
18
+
19
+ ### 🎯 Project Purpose
20
+
21
+ `Pilo Masterkit` is designed to transform an ordinary AI Coding Assistant into a disciplined **AI Task Force**. It acts as a comprehensive "brain" for your project, solving issues like context loss and inconsistent logic. It enforces a professional environment through standardized commands, strict development rules, and high-quality design systems.
22
+
23
+ ### ✨ Key Features
24
+
25
+ - **Clean State Initiation**: Creates a completely empty directory structure (such as `docs/tasks`, `docs/plans`, etc.) ready for the AI to pick up work.
26
+ - **Dynamic Context File**: Generates `GEMINI.md` based on your product's domain, defining the AI's identity, language protocol, and operational scale.
27
+ - **Interactive CLI UI**: Start new projects friction-free via an interactive graphical CLI that prompts you through configuration options.
28
+ - **High-End Specialist Modules**: Ensures the AI adheres to the latest practices covering Architecture, Clean Code, Security, and UI/UX.
29
+
30
+ ### 🏗️ Workflow Architecture
31
+
32
+ ```mermaid
33
+ graph TD
34
+ A[Start: npx @heyai-rules/pilo-masterkit] --> B[Interactive CLI]
35
+ B --> C{Select Parameters}
36
+ C -->|Language| D[Language Identity]
37
+ C -->|Scale| E[Project Structure]
38
+ C -->|AI Name| F[Context Binding]
39
+ D & E & F --> G[Generate Workspace]
40
+ G --> H[AI Task Force Ready]
41
+ ```
42
+
43
+ ### 🚀 Quick Start
44
+
45
+ Run the following command anywhere to initialize your workspace:
46
+
47
+ ```bash
48
+ npx @heyai-rules/pilo-masterkit@latest
49
+ ```
50
+
51
+ ### 🎮 Slash Commands
52
+
53
+ You have access to a rich set of built-in commands for your AI:
54
+
55
+ #### **Core Utilities:**
56
+ - `/plan` - Restate requirements, assess risks, and create step-by-step implementation plan.
57
+ - `/status` - Display agent and project status.
58
+ - `/tdd` - Strict Test-Driven Development protocol.
59
+ - `/debug` - Systematic debugging methodology with root cause analysis.
60
+ - `/e2e` - End-to-end testing with Playwright.
61
+
62
+ #### **Development Capabilities:**
63
+ - `/ui-ux-pro-max` - Plan and implement top-tier UI/UX.
64
+ - `/enhance` - Add or update features in existing applications.
65
+ - `/create` - Create new application functions.
66
+ - `/deploy` - Deployment command for production releases.
67
+
68
+ #### **Code Review & Quality:**
69
+ - `/cpp-review`, `/rust-review`, `/go-review`, `/python-review`, `/kotlin-review` - Deep, language-specific code reviews focusing on idiomatic conventions and safety.
70
+
71
+ <details>
72
+ <summary><b>View ALL Available Commands</b></summary>
73
+
74
+ `/aside`, `/brainstorm`, `/claw`, `/context-budget`, `/cpp-build`, `/cpp-review`, `/cpp-test`, `/create`, `/debug`, `/deploy`, `/devfleet`, `/docs`, `/e2e`, `/enhance`, `/evolve`, `/go-build`, `/go-review`, `/go-test`, `/gradle-build`, `/init-docs`, `/instinct-export`, `/instinct-import`, `/instinct-status`, `/kotlin-build`, `/kotlin-review`, `/kotlin-test`, `/learn-eval`, `/orchestrate`, `/plan`, `/preview`, `/projects`, `/promote`, `/prompt-optimize`, `/prune`, `/python-review`, `/resume-session`, `/rules-distill`, `/rust-build`, `/rust-review`, `/rust-test`, `/save-session`, `/sessions`, `/setup-pm`, `/skill-create`, `/skill-health`, `/status`, `/tdd`, `/test`, `/ui-ux-pro-max`.
75
+ </details>
76
+
77
+ ---
78
+
79
+ ## 🇻🇳 Phiên bản Tiếng Việt
80
+
81
+ ### 🎯 Mục đích dự án
82
+
83
+ `Pilo Masterkit` được thiết kế để biến một AI Coding Assistant thông thường thành một **Đội ngũ Đặc nhiệm AI (AI Task Force)** có kỷ luật. Công cụ này thiết lập "não bộ" tập trung ngay tại môi trường phát triển của bạn. Định hướng AI làm việc chuẩn quy trình và đạt đẳng cấp chất lượng mã nguồn cao.
84
+
85
+ ### ✨ Tính năng chính
86
+
87
+ - **Môi trường Làm việc Sạch**: Tự động dọn dẹp và khởi tạo cấu trúc thư mục sẵn sàng làm việc.
88
+ - **Tệp Cấu hình Động**: Trình cài đặt sinh ra file cấu trúc thông qua CLI theo ngữ cảnh dự án.
89
+ - **Giao diện Cài đặt Tương tác**: Dễ dàng config CLI không cần các dòng lệnh dài dòng.
90
+ - **Tri thức Chuyên gia (Skills)**: Ép buộc AI luôn tuân thủ các chuẩn mực gắt gao về Clean Code, Security và UI/UX Pro.
91
+
92
+ ### 🚀 Hướng dẫn nhanh
93
+
94
+ Để cài đặt bộ khung quy tắc:
95
+
96
+ ```bash
97
+ npx @heyai-rules/pilo-masterkit@latest
98
+ ```
99
+
100
+ ### 🎮 Lệnh Hệ Thống (Slash Commands)
101
+
102
+ Sử dụng sức mạnh tự động hóa qua các lệnh slash cho AI Agent:
103
+
104
+ #### **Quy trình Lõi:**
105
+ - `/plan` - Lập kế hoạch chi tiết, đánh giá rủi ro trước khi thực thi.
106
+ - `/status` - Kiểm tra trạng thái Agent và tiến độ công việc.
107
+ - `/tdd` - Phát triển hướng kiểm thử (Test-Driven Development).
108
+ - `/debug` - Chế độ tìm lỗi có hệ thống với bảng nguyên nhân gốc.
109
+
110
+ #### **Phát triển Tính năng:**
111
+ - `/ui-ux-pro-max` - Triển khai và tái hiện giao diện chuẩn mực.
112
+ - `/enhance` - Nâng cấp tính năng hiện có.
113
+ - `/create` - Khởi tạo luồng ứng dụng mới.
114
+ - `/deploy` - Hỗ trợ chuẩn bị trước quá trình phát hành (release).
115
+
116
+ #### **Review & Tối ưu Mã:**
117
+ - `/cpp-review`, `/rust-review`, `/go-review`, `/python-review`, `/kotlin-review` - Review code sâu theo từng đặc thù ngôn ngữ nhằm đảm bảo an toàn bộ nhớ và hiệu suất.
118
+
119
+ <details>
120
+ <summary><b>Xem TOÀN BỘ lệnh (Available Commands)</b></summary>
121
+
122
+ `/aside`, `/brainstorm`, `/claw`, `/context-budget`, `/cpp-build`, `/cpp-review`, `/cpp-test`, `/create`, `/debug`, `/deploy`, `/devfleet`, `/docs`, `/e2e`, `/enhance`, `/evolve`, `/go-build`, `/go-review`, `/go-test`, `/gradle-build`, `/init-docs`, `/instinct-export`, `/instinct-import`, `/instinct-status`, `/kotlin-build`, `/kotlin-review`, `/kotlin-test`, `/learn-eval`, `/orchestrate`, `/plan`, `/preview`, `/projects`, `/promote`, `/prompt-optimize`, `/prune`, `/python-review`, `/resume-session`, `/rules-distill`, `/rust-build`, `/rust-review`, `/rust-test`, `/save-session`, `/sessions`, `/setup-pm`, `/skill-create`, `/skill-health`, `/status`, `/tdd`, `/test`, `/ui-ux-pro-max`.
123
+ </details>
124
+
125
+ ---
126
+
127
+ ## 🤝 Community & Contributing
128
+
129
+ Dự án này là mã nguồn mở và chúng tôi vinh danh mọi đóng góp để cải thiện hệ sinh thái AI.
130
+ *This project is open-source and we welcome all contributions.*
131
+
132
+ - **[Giấy phép / License](LICENSE)**
133
+
134
+ ---
135
+
136
+ > **"Orchestrating the technology of the future with discipline and soul."**
package/RELEASE.md ADDED
@@ -0,0 +1,36 @@
1
+ # NPM Release Checklist / Danh sách Kiểm tra Phát hành
2
+
3
+ ## 1. Local preflight / Kiểm tra nội bộ
4
+
5
+ ```bash
6
+ npm install
7
+ npm run release:check
8
+ ```
9
+
10
+ ## 2. Version bump / Cập nhật phiên bản
11
+
12
+ ```bash
13
+ npm version patch
14
+ ```
15
+
16
+ ## 3. Push tag / Đẩy tag lên GitHub
17
+
18
+ ```bash
19
+ git push origin main
20
+ git tag vX.Y.Z
21
+ git push origin vX.Y.Z
22
+ ```
23
+
24
+ This triggers GitHub Actions `Publish npm`. (Thao tác này sẽ kích hoạt GitHub Actions `Publish npm`).
25
+
26
+ ---
27
+
28
+ ## 4. Authentication / Xác thực
29
+
30
+ Preferred: npm trusted publishing via GitHub OIDC. (Ưu tiên: npm trusted publishing qua GitHub OIDC).
31
+ - Enable trusted publishing in npm settings for this GitHub repo. (Bật trusted publishing trong cài đặt npm cho repo này).
32
+ - Workflow uses `npm publish --provenance`. (Workflow sử dụng `npm publish --provenance`).
33
+
34
+ ---
35
+
36
+ > **"Release often, release early."**
package/package.json ADDED
@@ -0,0 +1,79 @@
1
+ {
2
+ "name": "@heyai-rules/pilo-masterkit",
3
+ "version": "1.2.2",
4
+ "description": "Scaffold and install PILO ruleset into a project.",
5
+ "keywords": [
6
+ "create",
7
+ "cli",
8
+ "ruleset",
9
+ "agent"
10
+ ],
11
+ "homepage": "https://github.com/Arter2507/pilo-masterkit#readme",
12
+ "bugs": {
13
+ "url": "https://github.com/Arter2507/pilo-masterkit/issues"
14
+ },
15
+ "repository": {
16
+ "type": "git",
17
+ "url": "git+https://github.com/Arter2507/pilo-masterkit.git"
18
+ },
19
+ "license": "Apache-2.0",
20
+ "author": "Arter",
21
+ "type": "commonjs",
22
+ "main": "src/bin/cli.js",
23
+ "bin": {
24
+ "create-pilo-masterkit": "src/bin/cli.js"
25
+ },
26
+ "files": [
27
+ "src",
28
+ ".agent",
29
+ "README.md",
30
+ "RELEASE.md",
31
+ "scripts/release-check.js"
32
+ ],
33
+ "scripts": {
34
+ "check": "node --check src/bin/cli.js",
35
+ "pack:dry": "npm pack --dry-run",
36
+ "release:check": "node scripts/release-check.js"
37
+ },
38
+ "engines": {
39
+ "node": ">=18.0.0"
40
+ },
41
+ "publishConfig": {
42
+ "access": "public"
43
+ },
44
+ "devDependencies": {
45
+ "@semantic-release/changelog": "^6.0.3",
46
+ "@semantic-release/git": "^10.0.1",
47
+ "@semantic-release/github": "^11.0.1",
48
+ "@semantic-release/npm": "^12.0.1",
49
+ "semantic-release": "^24.2.3"
50
+ },
51
+ "release": {
52
+ "branches": [
53
+ "main",
54
+ "next"
55
+ ],
56
+ "plugins": [
57
+ "@semantic-release/commit-analyzer",
58
+ "@semantic-release/release-notes-generator",
59
+ "@semantic-release/changelog",
60
+ "@semantic-release/npm",
61
+ "@semantic-release/github",
62
+ [
63
+ "@semantic-release/git",
64
+ {
65
+ "assets": [
66
+ "package.json",
67
+ "CHANGELOG.md"
68
+ ],
69
+ "message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
70
+ }
71
+ ]
72
+ ]
73
+ },
74
+ "dependencies": {
75
+ "@clack/prompts": "^1.1.0",
76
+ "fs-extra": "^11.3.4",
77
+ "picocolors": "^1.1.1"
78
+ }
79
+ }
@@ -0,0 +1,55 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { spawnSync } = require("node:child_process");
4
+
5
+ function printOutput(result) {
6
+ if (result.stdout) {
7
+ process.stdout.write(result.stdout);
8
+ }
9
+ if (result.stderr) {
10
+ process.stderr.write(result.stderr);
11
+ }
12
+ }
13
+
14
+ function runStep(label, cmd, args) {
15
+ process.stdout.write(`\n[STEP] ${label}\n`);
16
+ const result = spawnSync(cmd, args, { encoding: "utf8" });
17
+ if (result.error) {
18
+ throw new Error(`${label} failed: ${result.error.message}`);
19
+ }
20
+ printOutput(result);
21
+ if (result.status !== 0) {
22
+ throw new Error(`${label} failed with exit code ${result.status}`);
23
+ }
24
+ }
25
+
26
+ function runStepCommandLine(label, commandLine) {
27
+ process.stdout.write(`\n[STEP] ${label}\n`);
28
+ const isWindows = process.platform === "win32";
29
+ const runner = isWindows ? process.env.ComSpec || "cmd.exe" : "/bin/sh";
30
+ const runnerArgs = isWindows
31
+ ? ["/d", "/s", "/c", commandLine]
32
+ : ["-lc", commandLine];
33
+ const result = spawnSync(runner, runnerArgs, { encoding: "utf8" });
34
+ if (result.error) {
35
+ throw new Error(`${label} failed: ${result.error.message}`);
36
+ }
37
+ printOutput(result);
38
+ if (result.status !== 0) {
39
+ throw new Error(`${label} failed with exit code ${result.status}`);
40
+ }
41
+ }
42
+
43
+ function main() {
44
+ runStep("Syntax check", "node", ["--check", "index.js"]);
45
+ runStepCommandLine("Dry pack", "npm pack --dry-run");
46
+ runStepCommandLine("Auth check (npm whoami)", "npm whoami");
47
+ process.stdout.write("\n[OK] Release checks passed. Ready to publish.\n");
48
+ }
49
+
50
+ try {
51
+ main();
52
+ } catch (error) {
53
+ process.stderr.write(`\n[FAIL] ${error.message}\n`);
54
+ process.exitCode = 1;
55
+ }
package/src/bin/cli.js ADDED
@@ -0,0 +1,78 @@
1
+ #!/usr/bin/env node
2
+
3
+ const { intro, outro, select, text, spinner, cancel, isCancel } = require('@clack/prompts');
4
+ const pc = require('picocolors');
5
+ const path = require('node:path');
6
+ const installer = require('../lib/installer');
7
+
8
+ async function main() {
9
+ intro(pc.bgMagenta(pc.white(' 🚀 Pilo Masterkit Installer v2.0 ')));
10
+
11
+ const targetDir = process.argv[2] ? path.resolve(process.cwd(), process.argv[2]) : process.cwd();
12
+
13
+ const language = await select({
14
+ message: 'Chọn ngôn ngữ / Select language:',
15
+ options: [
16
+ { value: 'vi', label: 'Tiếng Việt', hint: 'Khuyên dùng' },
17
+ { value: 'en', label: 'English' },
18
+ ],
19
+ });
20
+ if (isCancel(language)) { cancel('Đã hủy cài đặt.'); return process.exit(0); }
21
+
22
+ const scale = await select({
23
+ message: 'Chọn quy mô dự án:',
24
+ options: [
25
+ { value: 'instant', label: 'Instant', hint: 'MVP nhanh gọn tập trung frontend' },
26
+ { value: 'creative', label: 'Creative', hint: 'Nghiên cứu sandbox full tính năng' },
27
+ { value: 'enterprise', label: 'SME Enterprise', hint: 'Ổn định vận hành clean code' },
28
+ ],
29
+ });
30
+ if (isCancel(scale)) { cancel('Đã hủy cài đặt.'); return process.exit(0); }
31
+
32
+ const productType = await select({
33
+ message: 'Chọn loại sản phẩm / Product type:',
34
+ options: [
35
+ { value: 'app_web', label: 'Ứng dụng người dùng (App, Web, Mobile, Desktop)' },
36
+ { value: 'dev_tool', label: 'Dev Tool (CLI, Library, API)' },
37
+ { value: 'ai_agent', label: 'AI Agent (Chatbot, Automation)' },
38
+ { value: 'digital_asset', label: 'Digital Asset (Game, Template, Media...)' },
39
+ ],
40
+ });
41
+ if (isCancel(productType)) { cancel('Đã hủy cài đặt.'); return process.exit(0); }
42
+
43
+ const agentName = await text({
44
+ message: 'Đặt tên cho Agent (Tùy chọn, mặc định "Pilo"):',
45
+ placeholder: 'Pilo',
46
+ defaultValue: 'Pilo',
47
+ });
48
+ if (isCancel(agentName)) { cancel('Đã hủy cài đặt.'); return process.exit(0); }
49
+
50
+ const s = spinner();
51
+ s.start('Đang chuẩn bị không gian làm việc sạch (Clean State) và cài đặt tài liệu...');
52
+
53
+ try {
54
+ const config = {
55
+ targetDir,
56
+ language,
57
+ scale,
58
+ productType,
59
+ agentName: agentName || 'Pilo',
60
+ };
61
+ await installer.install(config);
62
+
63
+ s.stop(pc.green('Hoàn tất cấu hình Pilo Masterkit!'));
64
+
65
+ outro(pc.cyan(`🎉 Masterkit đã được khởi tạo sạch sẽ tại: ${targetDir}`));
66
+ console.log(pc.white('\n👉 Các bước tiếp theo để bắt đầu:'));
67
+ console.log(`1. Đọc file ${pc.bold(pc.yellow('GEMINI.md'))} đính kèm ở thư mục root.`);
68
+ console.log(`2. Workspace của bạn đã sẵn sàng tại ${pc.bold(pc.green('docs/'))} với 8 thư mục trống sạch sẽ.`);
69
+ console.log(`3. Mọi dữ liệu cũ đã được dẹp bỏ, hãy làm mới trải nghiệm cùng Agent.\n`);
70
+
71
+ } catch (err) {
72
+ s.stop('Quá trình thiết lập bị lỗi.');
73
+ console.error(pc.red('\nLỗi:'), err.message);
74
+ process.exit(1);
75
+ }
76
+ }
77
+
78
+ main().catch(console.error);