thachvd-kit 1.0.29 → 1.0.31

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 (408) hide show
  1. package/README.md +53 -148
  2. package/bin/cli.js +407 -310
  3. package/package.json +1 -10
  4. package/.agent/agents/backend-specialist.md +0 -263
  5. package/.agent/agents/code-archaeologist.md +0 -106
  6. package/.agent/agents/database-architect.md +0 -226
  7. package/.agent/agents/debugger.md +0 -225
  8. package/.agent/agents/devops-engineer.md +0 -242
  9. package/.agent/agents/documentation-writer.md +0 -104
  10. package/.agent/agents/explorer-agent.md +0 -73
  11. package/.agent/agents/frontend-specialist.md +0 -593
  12. package/.agent/agents/game-developer.md +0 -162
  13. package/.agent/agents/mobile-developer.md +0 -377
  14. package/.agent/agents/orchestrator.md +0 -416
  15. package/.agent/agents/penetration-tester.md +0 -188
  16. package/.agent/agents/performance-optimizer.md +0 -187
  17. package/.agent/agents/product-manager.md +0 -112
  18. package/.agent/agents/product-owner.md +0 -95
  19. package/.agent/agents/project-planner.md +0 -406
  20. package/.agent/agents/qa-automation-engineer.md +0 -103
  21. package/.agent/agents/security-auditor.md +0 -170
  22. package/.agent/agents/seo-specialist.md +0 -111
  23. package/.agent/agents/test-engineer.md +0 -158
  24. package/.agent/docs/architecture.md +0 -15
  25. package/.agent/docs/conventions.md +0 -16
  26. package/.agent/docs/getting-started.md +0 -95
  27. package/.agent/docs/project.md +0 -59
  28. package/.agent/docs/tooling.md +0 -136
  29. package/.agent/docs/workflow.md +0 -79
  30. package/.agent/rules/GEMINI.md +0 -62
  31. package/.agent/skills/api-design/SKILL.md +0 -156
  32. package/.agent/skills/api-patterns/SKILL.md +0 -81
  33. package/.agent/skills/api-patterns/api-style.md +0 -42
  34. package/.agent/skills/api-patterns/auth.md +0 -24
  35. package/.agent/skills/api-patterns/documentation.md +0 -26
  36. package/.agent/skills/api-patterns/graphql.md +0 -41
  37. package/.agent/skills/api-patterns/rate-limiting.md +0 -31
  38. package/.agent/skills/api-patterns/response.md +0 -37
  39. package/.agent/skills/api-patterns/rest.md +0 -40
  40. package/.agent/skills/api-patterns/scripts/api_validator.py +0 -211
  41. package/.agent/skills/api-patterns/security-testing.md +0 -122
  42. package/.agent/skills/api-patterns/trpc.md +0 -41
  43. package/.agent/skills/api-patterns/versioning.md +0 -22
  44. package/.agent/skills/app-builder/SKILL.md +0 -75
  45. package/.agent/skills/app-builder/agent-coordination.md +0 -71
  46. package/.agent/skills/app-builder/feature-building.md +0 -53
  47. package/.agent/skills/app-builder/project-detection.md +0 -34
  48. package/.agent/skills/app-builder/scaffolding.md +0 -118
  49. package/.agent/skills/app-builder/tech-stack.md +0 -40
  50. package/.agent/skills/app-builder/templates/SKILL.md +0 -39
  51. package/.agent/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  52. package/.agent/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  53. package/.agent/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  54. package/.agent/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  55. package/.agent/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  56. package/.agent/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  57. package/.agent/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  58. package/.agent/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
  59. package/.agent/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
  60. package/.agent/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
  61. package/.agent/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
  62. package/.agent/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  63. package/.agent/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
  64. package/.agent/skills/architecture/SKILL.md +0 -55
  65. package/.agent/skills/architecture/context-discovery.md +0 -43
  66. package/.agent/skills/architecture/examples.md +0 -94
  67. package/.agent/skills/architecture/pattern-selection.md +0 -68
  68. package/.agent/skills/architecture/patterns-reference.md +0 -50
  69. package/.agent/skills/architecture/trade-off-analysis.md +0 -77
  70. package/.agent/skills/bash-linux/SKILL.md +0 -199
  71. package/.agent/skills/behavioral-modes/SKILL.md +0 -242
  72. package/.agent/skills/brainstorming/SKILL.md +0 -163
  73. package/.agent/skills/brainstorming/dynamic-questioning.md +0 -350
  74. package/.agent/skills/clean-code/SKILL.md +0 -201
  75. package/.agent/skills/code-review-checklist/SKILL.md +0 -109
  76. package/.agent/skills/database-design/SKILL.md +0 -52
  77. package/.agent/skills/database-design/database-selection.md +0 -43
  78. package/.agent/skills/database-design/indexing.md +0 -39
  79. package/.agent/skills/database-design/migrations.md +0 -48
  80. package/.agent/skills/database-design/optimization.md +0 -36
  81. package/.agent/skills/database-design/orm-selection.md +0 -30
  82. package/.agent/skills/database-design/schema-design.md +0 -56
  83. package/.agent/skills/database-design/scripts/schema_validator.py +0 -172
  84. package/.agent/skills/deployment-procedures/SKILL.md +0 -241
  85. package/.agent/skills/desktop-design/SKILL.md +0 -25
  86. package/.agent/skills/dispatching-parallel-agents/SKILL.md +0 -112
  87. package/.agent/skills/doc.md +0 -177
  88. package/.agent/skills/docker-patterns/SKILL.md +0 -232
  89. package/.agent/skills/documentation-templates/SKILL.md +0 -194
  90. package/.agent/skills/executing-plans/SKILL.md +0 -61
  91. package/.agent/skills/finishing-a-development-branch/SKILL.md +0 -135
  92. package/.agent/skills/frontend-design/SKILL.md +0 -418
  93. package/.agent/skills/frontend-design/animation-guide.md +0 -331
  94. package/.agent/skills/frontend-design/color-system.md +0 -311
  95. package/.agent/skills/frontend-design/decision-trees.md +0 -418
  96. package/.agent/skills/frontend-design/motion-graphics.md +0 -306
  97. package/.agent/skills/frontend-design/scripts/accessibility_checker.py +0 -183
  98. package/.agent/skills/frontend-design/scripts/ux_audit.py +0 -722
  99. package/.agent/skills/frontend-design/typography-system.md +0 -345
  100. package/.agent/skills/frontend-design/ux-psychology.md +0 -1116
  101. package/.agent/skills/frontend-design/visual-effects.md +0 -383
  102. package/.agent/skills/game-development/2d-games/SKILL.md +0 -119
  103. package/.agent/skills/game-development/3d-games/SKILL.md +0 -135
  104. package/.agent/skills/game-development/SKILL.md +0 -167
  105. package/.agent/skills/game-development/game-art/SKILL.md +0 -185
  106. package/.agent/skills/game-development/game-audio/SKILL.md +0 -190
  107. package/.agent/skills/game-development/game-design/SKILL.md +0 -129
  108. package/.agent/skills/game-development/mobile-games/SKILL.md +0 -108
  109. package/.agent/skills/game-development/multiplayer/SKILL.md +0 -132
  110. package/.agent/skills/game-development/pc-games/SKILL.md +0 -144
  111. package/.agent/skills/game-development/vr-ar/SKILL.md +0 -123
  112. package/.agent/skills/game-development/web-games/SKILL.md +0 -150
  113. package/.agent/skills/geo-fundamentals/SKILL.md +0 -156
  114. package/.agent/skills/geo-fundamentals/scripts/geo_checker.py +0 -289
  115. package/.agent/skills/golang-patterns/SKILL.md +0 -226
  116. package/.agent/skills/golang-testing/SKILL.md +0 -182
  117. package/.agent/skills/i18n-localization/SKILL.md +0 -154
  118. package/.agent/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  119. package/.agent/skills/intelligent-routing/SKILL.md +0 -335
  120. package/.agent/skills/laravel-patterns/SKILL.md +0 -224
  121. package/.agent/skills/laravel-security/SKILL.md +0 -171
  122. package/.agent/skills/laravel-tdd/SKILL.md +0 -149
  123. package/.agent/skills/lint-and-validate/SKILL.md +0 -45
  124. package/.agent/skills/lint-and-validate/scripts/lint_runner.py +0 -184
  125. package/.agent/skills/lint-and-validate/scripts/type_coverage.py +0 -173
  126. package/.agent/skills/mcp-builder/SKILL.md +0 -176
  127. package/.agent/skills/mobile-design/SKILL.md +0 -394
  128. package/.agent/skills/mobile-design/decision-trees.md +0 -516
  129. package/.agent/skills/mobile-design/mobile-backend.md +0 -491
  130. package/.agent/skills/mobile-design/mobile-color-system.md +0 -420
  131. package/.agent/skills/mobile-design/mobile-debugging.md +0 -122
  132. package/.agent/skills/mobile-design/mobile-design-thinking.md +0 -357
  133. package/.agent/skills/mobile-design/mobile-navigation.md +0 -458
  134. package/.agent/skills/mobile-design/mobile-performance.md +0 -767
  135. package/.agent/skills/mobile-design/mobile-testing.md +0 -356
  136. package/.agent/skills/mobile-design/mobile-typography.md +0 -433
  137. package/.agent/skills/mobile-design/platform-android.md +0 -666
  138. package/.agent/skills/mobile-design/platform-ios.md +0 -561
  139. package/.agent/skills/mobile-design/scripts/mobile_audit.py +0 -670
  140. package/.agent/skills/mobile-design/touch-psychology.md +0 -537
  141. package/.agent/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  142. package/.agent/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  143. package/.agent/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  144. package/.agent/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  145. package/.agent/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  146. package/.agent/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  147. package/.agent/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  148. package/.agent/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  149. package/.agent/skills/nextjs-react-expert/SKILL.md +0 -286
  150. package/.agent/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
  151. package/.agent/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
  152. package/.agent/skills/nodejs-best-practices/SKILL.md +0 -333
  153. package/.agent/skills/parallel-agents/SKILL.md +0 -175
  154. package/.agent/skills/performance-profiling/SKILL.md +0 -143
  155. package/.agent/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
  156. package/.agent/skills/plan-writing/SKILL.md +0 -152
  157. package/.agent/skills/powershell-windows/SKILL.md +0 -167
  158. package/.agent/skills/project-onboarding/SKILL.md +0 -42
  159. package/.agent/skills/python-patterns/SKILL.md +0 -441
  160. package/.agent/skills/react-frontend/SKILL.md +0 -25
  161. package/.agent/skills/receiving-code-review/SKILL.md +0 -120
  162. package/.agent/skills/red-team-tactics/SKILL.md +0 -199
  163. package/.agent/skills/requesting-code-review/SKILL.md +0 -67
  164. package/.agent/skills/rust-pro/SKILL.md +0 -176
  165. package/.agent/skills/seo-fundamentals/SKILL.md +0 -129
  166. package/.agent/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
  167. package/.agent/skills/server-management/SKILL.md +0 -161
  168. package/.agent/skills/subagent-driven-development/SKILL.md +0 -76
  169. package/.agent/skills/systematic-debugging/SKILL.md +0 -109
  170. package/.agent/skills/tailwind-patterns/SKILL.md +0 -269
  171. package/.agent/skills/tdd-workflow/SKILL.md +0 -149
  172. package/.agent/skills/testing-patterns/SKILL.md +0 -178
  173. package/.agent/skills/testing-patterns/scripts/test_runner.py +0 -219
  174. package/.agent/skills/using-git-worktrees/SKILL.md +0 -121
  175. package/.agent/skills/verification-before-completion/SKILL.md +0 -99
  176. package/.agent/skills/vulnerability-scanner/SKILL.md +0 -276
  177. package/.agent/skills/vulnerability-scanner/checklists.md +0 -121
  178. package/.agent/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  179. package/.agent/skills/web-design-guidelines/SKILL.md +0 -57
  180. package/.agent/skills/webapp-testing/SKILL.md +0 -187
  181. package/.agent/skills/webapp-testing/scripts/playwright_runner.py +0 -173
  182. package/.agent/skills/writing-skills/SKILL.md +0 -170
  183. package/.agent/workflows/brainstorm.md +0 -113
  184. package/.agent/workflows/create.md +0 -59
  185. package/.agent/workflows/debug.md +0 -103
  186. package/.agent/workflows/deploy.md +0 -176
  187. package/.agent/workflows/enhance.md +0 -63
  188. package/.agent/workflows/forge-debug.md +0 -12
  189. package/.agent/workflows/forge-fast.md +0 -22
  190. package/.agent/workflows/forge-release.md +0 -12
  191. package/.agent/workflows/forge-research.md +0 -24
  192. package/.agent/workflows/forge-review.md +0 -12
  193. package/.agent/workflows/forge-task.md +0 -37
  194. package/.agent/workflows/orchestrate.md +0 -237
  195. package/.agent/workflows/plan.md +0 -89
  196. package/.agent/workflows/preview.md +0 -81
  197. package/.agent/workflows/release.md +0 -42
  198. package/.agent/workflows/review.md +0 -125
  199. package/.agent/workflows/simple.md +0 -42
  200. package/.agent/workflows/spec.md +0 -140
  201. package/.agent/workflows/status.md +0 -86
  202. package/.agent/workflows/task.md +0 -59
  203. package/.agent/workflows/test.md +0 -144
  204. package/.agent/workflows/ui-ux-pro-max.md +0 -296
  205. package/agents/backend-specialist.md +0 -263
  206. package/agents/code-archaeologist.md +0 -106
  207. package/agents/database-architect.md +0 -226
  208. package/agents/debugger.md +0 -225
  209. package/agents/devops-engineer.md +0 -242
  210. package/agents/documentation-writer.md +0 -104
  211. package/agents/explorer-agent.md +0 -73
  212. package/agents/frontend-specialist.md +0 -593
  213. package/agents/game-developer.md +0 -162
  214. package/agents/mobile-developer.md +0 -377
  215. package/agents/orchestrator.md +0 -416
  216. package/agents/penetration-tester.md +0 -188
  217. package/agents/performance-optimizer.md +0 -187
  218. package/agents/product-manager.md +0 -112
  219. package/agents/product-owner.md +0 -95
  220. package/agents/project-planner.md +0 -406
  221. package/agents/qa-automation-engineer.md +0 -103
  222. package/agents/security-auditor.md +0 -170
  223. package/agents/seo-specialist.md +0 -111
  224. package/agents/test-engineer.md +0 -158
  225. package/commands/forge-debug.md +0 -12
  226. package/commands/forge-fast.md +0 -22
  227. package/commands/forge-release.md +0 -12
  228. package/commands/forge-research.md +0 -24
  229. package/commands/forge-review.md +0 -12
  230. package/commands/forge-task.md +0 -37
  231. package/kit/PROMPT_RECIPE.md +0 -30
  232. package/kit/README.md +0 -30
  233. package/prompts/debug.md +0 -11
  234. package/prompts/release.md +0 -11
  235. package/prompts/simple.md +0 -11
  236. package/prompts/spec.md +0 -11
  237. package/prompts/task.md +0 -12
  238. package/rules/GEMINI.md +0 -45
  239. package/scripts/auto_preview.py +0 -148
  240. package/scripts/checklist.py +0 -217
  241. package/scripts/session_manager.py +0 -120
  242. package/scripts/verify_all.py +0 -327
  243. package/skills/api-design/SKILL.md +0 -156
  244. package/skills/api-patterns/SKILL.md +0 -81
  245. package/skills/api-patterns/api-style.md +0 -42
  246. package/skills/api-patterns/auth.md +0 -24
  247. package/skills/api-patterns/documentation.md +0 -26
  248. package/skills/api-patterns/graphql.md +0 -41
  249. package/skills/api-patterns/rate-limiting.md +0 -31
  250. package/skills/api-patterns/response.md +0 -37
  251. package/skills/api-patterns/rest.md +0 -40
  252. package/skills/api-patterns/scripts/api_validator.py +0 -211
  253. package/skills/api-patterns/security-testing.md +0 -122
  254. package/skills/api-patterns/trpc.md +0 -41
  255. package/skills/api-patterns/versioning.md +0 -22
  256. package/skills/app-builder/SKILL.md +0 -75
  257. package/skills/app-builder/agent-coordination.md +0 -71
  258. package/skills/app-builder/feature-building.md +0 -53
  259. package/skills/app-builder/project-detection.md +0 -34
  260. package/skills/app-builder/scaffolding.md +0 -118
  261. package/skills/app-builder/tech-stack.md +0 -40
  262. package/skills/app-builder/templates/SKILL.md +0 -39
  263. package/skills/app-builder/templates/astro-static/TEMPLATE.md +0 -76
  264. package/skills/app-builder/templates/chrome-extension/TEMPLATE.md +0 -92
  265. package/skills/app-builder/templates/cli-tool/TEMPLATE.md +0 -88
  266. package/skills/app-builder/templates/electron-desktop/TEMPLATE.md +0 -88
  267. package/skills/app-builder/templates/express-api/TEMPLATE.md +0 -83
  268. package/skills/app-builder/templates/flutter-app/TEMPLATE.md +0 -90
  269. package/skills/app-builder/templates/monorepo-turborepo/TEMPLATE.md +0 -90
  270. package/skills/app-builder/templates/nextjs-fullstack/TEMPLATE.md +0 -122
  271. package/skills/app-builder/templates/nextjs-saas/TEMPLATE.md +0 -122
  272. package/skills/app-builder/templates/nextjs-static/TEMPLATE.md +0 -169
  273. package/skills/app-builder/templates/nuxt-app/TEMPLATE.md +0 -134
  274. package/skills/app-builder/templates/python-fastapi/TEMPLATE.md +0 -83
  275. package/skills/app-builder/templates/react-native-app/TEMPLATE.md +0 -119
  276. package/skills/architecture/SKILL.md +0 -55
  277. package/skills/architecture/context-discovery.md +0 -43
  278. package/skills/architecture/examples.md +0 -94
  279. package/skills/architecture/pattern-selection.md +0 -68
  280. package/skills/architecture/patterns-reference.md +0 -50
  281. package/skills/architecture/trade-off-analysis.md +0 -77
  282. package/skills/bash-linux/SKILL.md +0 -199
  283. package/skills/behavioral-modes/SKILL.md +0 -242
  284. package/skills/brainstorming/SKILL.md +0 -163
  285. package/skills/brainstorming/dynamic-questioning.md +0 -350
  286. package/skills/clean-code/SKILL.md +0 -201
  287. package/skills/code-review-checklist/SKILL.md +0 -142
  288. package/skills/database-design/SKILL.md +0 -52
  289. package/skills/database-design/database-selection.md +0 -43
  290. package/skills/database-design/indexing.md +0 -39
  291. package/skills/database-design/migrations.md +0 -48
  292. package/skills/database-design/optimization.md +0 -36
  293. package/skills/database-design/orm-selection.md +0 -30
  294. package/skills/database-design/schema-design.md +0 -56
  295. package/skills/database-design/scripts/schema_validator.py +0 -172
  296. package/skills/deployment-procedures/SKILL.md +0 -241
  297. package/skills/desktop-design/SKILL.md +0 -25
  298. package/skills/dispatching-parallel-agents/SKILL.md +0 -112
  299. package/skills/doc.md +0 -177
  300. package/skills/docker-patterns/SKILL.md +0 -232
  301. package/skills/documentation-templates/SKILL.md +0 -194
  302. package/skills/executing-plans/SKILL.md +0 -61
  303. package/skills/finishing-a-development-branch/SKILL.md +0 -135
  304. package/skills/frontend-design/SKILL.md +0 -418
  305. package/skills/frontend-design/animation-guide.md +0 -331
  306. package/skills/frontend-design/color-system.md +0 -311
  307. package/skills/frontend-design/decision-trees.md +0 -418
  308. package/skills/frontend-design/motion-graphics.md +0 -306
  309. package/skills/frontend-design/scripts/accessibility_checker.py +0 -183
  310. package/skills/frontend-design/scripts/ux_audit.py +0 -722
  311. package/skills/frontend-design/typography-system.md +0 -345
  312. package/skills/frontend-design/ux-psychology.md +0 -1116
  313. package/skills/frontend-design/visual-effects.md +0 -383
  314. package/skills/game-development/2d-games/SKILL.md +0 -119
  315. package/skills/game-development/3d-games/SKILL.md +0 -135
  316. package/skills/game-development/SKILL.md +0 -167
  317. package/skills/game-development/game-art/SKILL.md +0 -185
  318. package/skills/game-development/game-audio/SKILL.md +0 -190
  319. package/skills/game-development/game-design/SKILL.md +0 -129
  320. package/skills/game-development/mobile-games/SKILL.md +0 -108
  321. package/skills/game-development/multiplayer/SKILL.md +0 -132
  322. package/skills/game-development/pc-games/SKILL.md +0 -144
  323. package/skills/game-development/vr-ar/SKILL.md +0 -123
  324. package/skills/game-development/web-games/SKILL.md +0 -150
  325. package/skills/geo-fundamentals/SKILL.md +0 -156
  326. package/skills/geo-fundamentals/scripts/geo_checker.py +0 -289
  327. package/skills/golang-patterns/SKILL.md +0 -226
  328. package/skills/golang-testing/SKILL.md +0 -182
  329. package/skills/i18n-localization/SKILL.md +0 -154
  330. package/skills/i18n-localization/scripts/i18n_checker.py +0 -241
  331. package/skills/intelligent-routing/SKILL.md +0 -335
  332. package/skills/laravel-patterns/SKILL.md +0 -224
  333. package/skills/laravel-security/SKILL.md +0 -171
  334. package/skills/laravel-tdd/SKILL.md +0 -149
  335. package/skills/lint-and-validate/SKILL.md +0 -45
  336. package/skills/lint-and-validate/scripts/lint_runner.py +0 -184
  337. package/skills/lint-and-validate/scripts/type_coverage.py +0 -173
  338. package/skills/mcp-builder/SKILL.md +0 -176
  339. package/skills/mobile-design/SKILL.md +0 -394
  340. package/skills/mobile-design/decision-trees.md +0 -516
  341. package/skills/mobile-design/mobile-backend.md +0 -491
  342. package/skills/mobile-design/mobile-color-system.md +0 -420
  343. package/skills/mobile-design/mobile-debugging.md +0 -122
  344. package/skills/mobile-design/mobile-design-thinking.md +0 -357
  345. package/skills/mobile-design/mobile-navigation.md +0 -458
  346. package/skills/mobile-design/mobile-performance.md +0 -767
  347. package/skills/mobile-design/mobile-testing.md +0 -356
  348. package/skills/mobile-design/mobile-typography.md +0 -433
  349. package/skills/mobile-design/platform-android.md +0 -666
  350. package/skills/mobile-design/platform-ios.md +0 -561
  351. package/skills/mobile-design/scripts/mobile_audit.py +0 -670
  352. package/skills/mobile-design/touch-psychology.md +0 -537
  353. package/skills/nextjs-react-expert/1-async-eliminating-waterfalls.md +0 -312
  354. package/skills/nextjs-react-expert/2-bundle-bundle-size-optimization.md +0 -240
  355. package/skills/nextjs-react-expert/3-server-server-side-performance.md +0 -490
  356. package/skills/nextjs-react-expert/4-client-client-side-data-fetching.md +0 -264
  357. package/skills/nextjs-react-expert/5-rerender-re-render-optimization.md +0 -581
  358. package/skills/nextjs-react-expert/6-rendering-rendering-performance.md +0 -432
  359. package/skills/nextjs-react-expert/7-js-javascript-performance.md +0 -684
  360. package/skills/nextjs-react-expert/8-advanced-advanced-patterns.md +0 -150
  361. package/skills/nextjs-react-expert/SKILL.md +0 -286
  362. package/skills/nextjs-react-expert/scripts/convert_rules.py +0 -222
  363. package/skills/nextjs-react-expert/scripts/react_performance_checker.py +0 -252
  364. package/skills/nodejs-best-practices/SKILL.md +0 -333
  365. package/skills/parallel-agents/SKILL.md +0 -175
  366. package/skills/performance-profiling/SKILL.md +0 -143
  367. package/skills/performance-profiling/scripts/lighthouse_audit.py +0 -76
  368. package/skills/plan-writing/SKILL.md +0 -152
  369. package/skills/powershell-windows/SKILL.md +0 -167
  370. package/skills/project-onboarding/SKILL.md +0 -42
  371. package/skills/python-patterns/SKILL.md +0 -441
  372. package/skills/react-frontend/SKILL.md +0 -25
  373. package/skills/receiving-code-review/SKILL.md +0 -120
  374. package/skills/red-team-tactics/SKILL.md +0 -199
  375. package/skills/requesting-code-review/SKILL.md +0 -67
  376. package/skills/rust-pro/SKILL.md +0 -176
  377. package/skills/seo-fundamentals/SKILL.md +0 -129
  378. package/skills/seo-fundamentals/scripts/seo_checker.py +0 -219
  379. package/skills/server-management/SKILL.md +0 -161
  380. package/skills/subagent-driven-development/SKILL.md +0 -76
  381. package/skills/systematic-debugging/SKILL.md +0 -109
  382. package/skills/tailwind-patterns/SKILL.md +0 -269
  383. package/skills/tdd-workflow/SKILL.md +0 -173
  384. package/skills/testing-patterns/SKILL.md +0 -178
  385. package/skills/testing-patterns/scripts/test_runner.py +0 -219
  386. package/skills/using-git-worktrees/SKILL.md +0 -121
  387. package/skills/verification-before-completion/SKILL.md +0 -113
  388. package/skills/vulnerability-scanner/SKILL.md +0 -276
  389. package/skills/vulnerability-scanner/checklists.md +0 -121
  390. package/skills/vulnerability-scanner/scripts/security_scan.py +0 -458
  391. package/skills/web-design-guidelines/SKILL.md +0 -57
  392. package/skills/webapp-testing/SKILL.md +0 -187
  393. package/skills/webapp-testing/scripts/playwright_runner.py +0 -173
  394. package/skills/writing-skills/SKILL.md +0 -170
  395. package/workflows/brainstorm.md +0 -113
  396. package/workflows/create.md +0 -59
  397. package/workflows/debug.md +0 -103
  398. package/workflows/deploy.md +0 -176
  399. package/workflows/enhance.md +0 -63
  400. package/workflows/orchestrate.md +0 -237
  401. package/workflows/plan.md +0 -89
  402. package/workflows/preview.md +0 -81
  403. package/workflows/release.md +0 -42
  404. package/workflows/simple.md +0 -42
  405. package/workflows/status.md +0 -86
  406. package/workflows/task.md +0 -59
  407. package/workflows/test.md +0 -144
  408. package/workflows/ui-ux-pro-max.md +0 -296
package/bin/cli.js CHANGED
@@ -9,7 +9,9 @@ const packageJson = require('../package.json');
9
9
 
10
10
  const sourceDir = path.resolve(__dirname, '..');
11
11
  const targetDir = process.cwd();
12
- const FORGE_COMMANDS = ['forge-task', 'forge-fast', 'forge-debug', 'forge-research', 'forge-review', 'forge-release'];
12
+ const CODEBASE_MEMORY_PACKAGE = 'codebase-memory-mcp';
13
+ const CODEBASE_MEMORY_BINARY = 'codebase-memory-mcp';
14
+ const RTK_INSTALL_COMMAND = 'cargo install --git https://github.com/rtk-ai/rtk --branch master rtk';
13
15
 
14
16
  // --- Skill Resolver ---
15
17
 
@@ -119,75 +121,52 @@ const BACKEND_FRAMEWORKS = ['laravel', 'cakephp', 'symfony', 'codeigniter', 'exp
119
121
  const MOBILE_DESKTOP_FRAMEWORKS = ['tauri', 'flutter', 'react-native'];
120
122
  const IGNORED_SCAN_DIRS = new Set(['.git', 'node_modules', 'vendor', 'dist', 'build', 'coverage', '.next', '.nuxt', '.turbo', '.cache', 'storage', 'tmp']);
121
123
 
122
- function printHelp() {
123
- console.log(`
124
- ${pc.bold('Usage:')}
125
- thachvd-kit [--yes]
126
- thachvd-kit init [--yes]
127
- thachvd-kit --version
128
- thachvd-kit --help
129
-
130
- ${pc.bold('Commands:')}
131
- init Bootstrap shared AI-agent rules and tooling
132
-
133
- ${pc.bold('Options:')}
134
- --yes Overwrite generated files when they already exist
135
- --no-setup-mcp Skip local Codegraph and Playwright MCP setup
136
- --version Show the installed CLI version
137
- --help Show this help message
138
-
139
- ${pc.bold('What gets generated:')}
140
- AGENTS.md Shared instructions for Codex, Antigravity, Claude Code, and Cursor
141
- CLAUDE.md Claude Code entry file that imports AGENTS.md
142
- GEMINI.md Antigravity entry file that points to AGENTS.md
143
- .cursorrules Cursor entry file that points to AGENTS.md
144
- .agent/ Shared docs, skills, workflows, agents, and rules
145
- ~/.codex/skills/ Selected Codex skills copied to global user dir (shows in $ menu)
146
- .claude/skills/ Selected Claude Code project skills copied from .agent/skills
147
-
124
+ function printHelp() {
125
+ console.log(`
126
+ ${pc.bold('Usage:')}
127
+ thachvd-kit init [--yes]
128
+ thachvd-kit setup [--yes]
129
+ thachvd-kit doctor
130
+ thachvd-kit prompt
131
+ thachvd-kit --version
132
+ thachvd-kit --help
133
+
134
+ ${pc.bold('Commands:')}
135
+ init Generate project context files and documentation
136
+ setup Install/configure MCP and recommended local tooling
137
+ doctor Check project context and local integrations
138
+ prompt Print the saved project-indexing prompt again
139
+
140
+ ${pc.bold('Options:')}
141
+ --yes Overwrite generated files or accept setup defaults
142
+ --no-setup-mcp Skip MCP setup (legacy init compatibility)
143
+ --version Show the installed CLI version
144
+ --help Show this help message
145
+
146
+ ${pc.bold('What gets generated:')}
147
+ AGENTS.md Shared instructions for Codex, Antigravity, Claude Code, and Cursor
148
+ CLAUDE.md Claude Code entry file that imports AGENTS.md
149
+ GEMINI.md Antigravity entry file that points to AGENTS.md
150
+ .cursorrules Cursor entry file that points to AGENTS.md
151
+ .agent/docs/ Project context, architecture, workflow, tooling, and durable onboarding prompt
152
+
148
153
  ${pc.bold('Workflow guide:')}
149
- Every task /forge-task Route and continue the selected workflow in this turn
150
- Small obvious fix /forge-fast Fast path; skips spec/plan/review but still verifies
151
- Idea is fuzzy /brainstorm Explore options, tradeoffs, and recommended direction
152
- Research first /forge-research Evidence-based research; no product-code edits
153
- Scope needs a contract /forge-task Handles research, spec, plan approval, implementation, and review
154
- New app from scratch /create Turn an app idea into plan + implementation flow
155
- Feature is clear /plan Create docs/PLAN-*.md first, no code yet
156
- Existing app update /enhance Add or change a feature in an existing codebase
157
- Bug or failing behavior /forge-debug Investigate symptoms, root cause, fix
158
- UI / UX work ui-ux-pro-max, frontend-specialist, $frontend-design, $webapp-testing
159
- Run or add tests /test Generate tests, run tests, check coverage
160
- Preview locally /preview Start, stop, restart, or health-check dev server
161
- Deploy / infra /deploy Release, hosting, Docker, cloud, environment setup
162
- Pre-merge review /forge-review Run the five-axis review before calling work complete
163
- Npm package release /forge-release Verify, version, tag, publish, and verify the package
164
- Project state /status Summarize stack, progress, preview, pending work
165
- Multi-domain work /orchestrate Coordinate frontend, backend, data, security, QA
166
-
167
- ${pc.bold('Common explicit skill prompts:')}
168
- Use /forge-task to route and continue a request in one turn.
169
- Use /forge-fast for a one-file fix with no behavior or contract change.
170
- Use /brainstorm for this feature idea before planning.
171
- Use /forge-task when requirements or scope need an explicit contract.
172
- Use /plan for this feature; do not write code yet.
173
- Use /enhance to implement this planned feature.
174
- Use /forge-debug for this failing behavior and find the root cause before editing.
175
- Use /review before claiming this feature/refactor complete.
176
- Use /forge-release for npm versioning and publishing.
177
- Use $clean-code before editing this module.
178
- Use $systematic-debugging to investigate this bug.
179
- Use $webapp-testing to verify the UI with Playwright.
180
- Use $verification-before-completion before claiming done.
181
- Use $writing-skills to improve a SKILL.md description.
182
-
183
- ${pc.bold('Tip:')}
184
- Skills are copied for Codex/Claude, but you can call them explicitly with $skill-name
185
- when implicit matching does not fire.
186
- `);
187
-
188
- }
154
+ Every task Superpowers Use the matching native Superpowers skill
155
+ Idea is fuzzy brainstorming Clarify intent and tradeoffs before coding
156
+ Scope needs a contract writing-plans Create a detailed plan before implementation
157
+ Execute an approved plan executing-plans Follow the approved plan with verification
158
+ Bug or failing behavior systematic-debugging Find the root cause before editing
159
+ Pre-merge review requesting-code-review Review before completion or merge
160
+ UI / UX work $frontend-design, $webapp-testing
161
+ Project state thachvd-kit doctor
162
+
163
+ ${pc.bold('Tip:')}
164
+ Install Superpowers separately for each AI client from its official plugin surface.
165
+ Run thachvd-kit setup for the integration checklist and doctor to verify it.
166
+ `);
167
+ }
189
168
 
190
- function formatScanPreviewLines(scanned) {
169
+ function formatScanPreviewLines(scanned) {
191
170
  return [
192
171
  ['App root', scanned.app_root || '.'],
193
172
  ['Project type', scanned.project_type || 'unknown'],
@@ -903,10 +882,10 @@ function resolveAgentTable(data) {
903
882
  }
904
883
  // --- File Generators ---
905
884
 
906
- function generateSharedAgentsMd(data) {
907
- return `# AGENTS.md
908
-
909
- Shared operating instructions for Codex, Antigravity, Claude Code, and Cursor.
885
+ function generateSharedAgentsMd(data) {
886
+ return `# AGENTS.md
887
+
888
+ Shared operating instructions for Codex, Antigravity, Claude Code, and Cursor.
910
889
 
911
890
  ## Startup
912
891
 
@@ -914,57 +893,24 @@ Shared operating instructions for Codex, Antigravity, Claude Code, and Cursor.
914
893
  2. Read \`.agent/docs/project.md\` for detected stack, commands, and routing.
915
894
  3. Read \`.agent/docs/workflow.md\` for the task flow before editing.
916
895
  4. Read \`.agent/docs/architecture.md\` and \`.agent/docs/conventions.md\` before planning code changes.
917
- 5. Read \`.agent/docs/tooling.md\` when the task needs Playwright, codegraph, MCP, or native Codex/Claude skill setup.
918
- 6. Select and load only the agent, skill, or workflow files that match the current task.
919
-
920
- If any \`.agent/docs/*.md\` file still contains \`TODO: refine\`, update the docs by scanning the project before making product code changes.
921
-
922
- ## Task Flow
923
-
924
- Forge is the member-facing command suite. Use \`/forge-task <request>\` in Antigravity, Claude Code, or Cursor, and \`$forge-task <request>\` in Codex. The command classifies the request and continues the selected workflow in the same turn; it must not stop at a member-facing \`NEXT\` command.
925
-
926
- - Questions and analysis without a command: answer directly and do not edit code.
927
- - Edit requests without a command: route internally as \`forge-task\` before editing.
928
- - Simple fix: use \`/forge-fast <request>\` only for one-file, unambiguous changes with no behavior or contract change.
929
- - Bug or failing behavior: use \`/forge-debug <symptom>\` and follow the evidence-first root-cause flow.
930
- - Research: use \`/forge-research <question>\`; research does not edit product code.
931
- - Feature or refactor: \`forge-task\` handles research/brainstorm, spec, plan approval, implementation, test, and review in sequence.
932
- - Pre-merge review: use \`/forge-review\` even when implementation was done by another client or member.
933
- - Release or npm publish: use \`/forge-release\`; release work never uses the fast path.
934
- - Multi-domain work: use \`.agent/workflows/orchestrate.md\` and route to the relevant specialist docs.
935
- - UI work: read \`.agent/agents/frontend-specialist.md\` and applicable design skills before editing.
896
+ 5. Read \`.agent/docs/tooling.md\` when the task needs MCP, RTK, or browser verification.
936
897
 
937
- ### Fast Path (Forge \`forge-fast\`)
898
+ If any \`.agent/docs/*.md\` file still contains \`TODO: refine\`, update the docs by scanning the project before making product code changes.
938
899
 
939
- The fast path intentionally bypasses only Spec, Plan, and the feature/refactor Review gate for a trivial change. It never bypasses inspection, focused verification, or reporting evidence. The agent must state this protocol before editing:
900
+ ## Workflow
940
901
 
941
- \`\`\`text
942
- FAST_PATH: simple-fix
943
- REASON: [why the change is one-file and unambiguous]
944
- SCOPE: [file or narrow area]
945
- \`\`\`
946
-
947
- If the scope expands, stop and internally re-route through \`forge-task\`. Do not silently skip gates for work that changes behavior, APIs, schemas, security, CI, dependencies, workflows, or release state.
948
-
949
- ### Gated Flow (feature or refactor)
902
+ Superpowers is the primary workflow backend. Use its native skills when available:
950
903
 
951
- 1. **Spec** — run \`.agent/workflows/spec.md\` when scope is ambiguous, touches multiple files, or would take more than ~30 minutes. Skip only for single-line/self-contained fixes. Stop at its exit criteria and wait for human confirmation before moving on.
952
- 2. **Plan** — run \`.agent/workflows/plan.md\` (project-planner agent, no code writing). Wait for explicit user approval of the plan file before implementing.
953
- 3. **Implement** — smallest coherent change per the approved plan, with focused tests for changed behavior.
954
- 4. **Review** — run \`.agent/workflows/review.md\` (five-axis review) before the change is considered done. All 🔴 BLOCKING items must be resolved or explicitly accepted with rationale.
904
+ - New idea or unclear requirement: \`brainstorming\`.
905
+ - Feature/refactor: \`using-git-worktrees\` -> \`writing-plans\` -> explicit approval -> \`executing-plans\` or \`subagent-driven-development\`.
906
+ - Implementation: \`test-driven-development\` and focused verification.
907
+ - Bug or failing behavior: \`systematic-debugging\` followed by a regression test.
908
+ - Before completion: \`requesting-code-review\` and \`verification-before-completion\`.
909
+ - Branch completion: \`finishing-a-development-branch\`.
955
910
 
956
- A feature/refactor task is not "done" until step 4's exit criteria are met — passing tests alone does not satisfy the gate. Simple fixes use the explicit \`forge-fast\` path above. See \`.agent/docs/getting-started.md\` for the complete route guide.
911
+ Questions and research do not edit product code. A simple fix may use a fast path only when it is one-file, unambiguous, and changes no behavior or contract. State the scope and verification before editing. If the scope grows, switch to the full Superpowers flow.
957
912
 
958
- ## Skill Loading
959
-
960
- - Treat \`.agent/skills/\` as the shared source of truth for all kit skills.
961
- - Codex exposes skills from \`~/.codex/skills/\` in the \`$\` menu; \`thachvd-kit\` copies selected skills there on init.
962
- - Claude Code project skills live in \`.claude/skills/\`.
963
- - If a skill is missing from the global dir, fall back to the matching \`.agent/skills/<skill>/SKILL.md\` file.
964
- - Do not load skill bodies by default; load a skill only when the user mentions it, the task clearly matches its description, or \`.agent/docs/project.md\` routes the task to it.
965
- - Prefer explicit skill mentions for predictable behavior: \`$clean-code\`, \`$systematic-debugging\`, \`$webapp-testing\`, or any skill listed in \`.agent/docs/project.md\`.
966
- - Run \`thachvd-kit --help\` to see common workflow and skill recommendations.
967
- - When creating or improving skills, use \`writing-skills\` first and make the \`description\` field specific enough for implicit invocation.
913
+ If Superpowers is unavailable, follow the plain-language flow in \`.agent/docs/workflow.md\`; do not expect this kit to provide a second copy of the workflow engine.
968
914
 
969
915
  ## Rules
970
916
 
@@ -972,23 +918,41 @@ A feature/refactor task is not "done" until step 4's exit criteria are met — p
972
918
  - State assumptions when the request is ambiguous.
973
919
  - Prefer the existing project style over new abstractions.
974
920
  - Keep changes surgical and remove only dead code introduced by your change.
975
- - **MCP First**: Prioritize using MCP server tools (e.g., \`codegraph\` for codebase search/symbol tracking, \`context7\` for API/docs queries, and \`playwright\` for browser/UI testing and verification) to explore, search, and verify rather than recursively listing directories, running expensive shell commands/grep, or reading large files. This minimizes token usage and maintains a cleaner context.
921
+ - **MCP First**: Prioritize \`codebase-memory-mcp\` for symbols, call paths, architecture, and impact; use \`context7\` for API/docs queries and \`playwright\` for browser/UI verification. Fall back to normal file search when an integration is unavailable.
922
+ - Prefer \`rtk\` by default for verbose shell commands such as \`rtk git status\`, \`rtk npm test\`, and \`rtk git log\`. Run the underlying command directly only when RTK is unavailable or incompatible.
976
923
  - Tests or equivalent verification are mandatory before claiming done.
977
924
  - Keep files under ${data.max_file_lines || '300'} lines unless the project already has a different standard in \`.agent/docs/conventions.md\`.
978
925
 
979
- ## Shared Knowledge
980
-
981
- - Project docs: \`.agent/docs/\`
982
- - Specialist agents: \`.agent/agents/\`
983
- - Skills: \`.agent/skills/\`
984
- - Codex global skills: \`~/.codex/skills/\` (installed by thachvd-kit init)
985
- - Claude Code project skills: \`.claude/skills/\`
986
- - Workflows: \`.agent/workflows/\`
987
- - Tooling setup: \`.agent/docs/tooling.md\`
988
- - Antigravity mirror rules: \`.agent/rules/GEMINI.md\`
989
- - Cursor entry rules: \`.cursorrules\`
990
- `;
991
- }
926
+ ## Shared Knowledge
927
+
928
+ - Project context: \`.agent/docs/\`
929
+ - Tooling setup: \`.agent/docs/tooling.md\`
930
+ - Superpowers: installed through the AI client's official plugin surface
931
+ - RTK: recommended local CLI for compact command output
932
+ - Antigravity and Cursor entry rules: \`GEMINI.md\` and \`.cursorrules\`
933
+ `;
934
+ }
935
+
936
+ function generateIndexProjectPrompt() {
937
+ return `# Project Indexing Prompt
938
+
939
+ Read CLAUDE.md (if using Claude Code), AGENTS.md, and all files under .agent/docs/.
940
+ Use Superpowers for the workflow and use codebase-memory MCP for structural code discovery when available.
941
+ Ask me what this project does and any important conventions I want preserved.
942
+ Then scan this repository and refine the generated context docs with factual rules.
943
+ Do not implement product code during onboarding.
944
+ `;
945
+ }
946
+
947
+ function printProjectPrompt() {
948
+ const promptPath = path.join(targetDir, '.agent', 'docs', 'index-project-prompt.md');
949
+ if (!fs.existsSync(promptPath)) {
950
+ console.error(pc.yellow('No saved project prompt found. Run thachvd-kit init first.'));
951
+ process.exitCode = 1;
952
+ return;
953
+ }
954
+ console.log(fs.readFileSync(promptPath, 'utf8'));
955
+ }
992
956
 
993
957
  function generateSharedClaudeMd() {
994
958
  return `@AGENTS.md
@@ -1074,8 +1038,6 @@ function resolveCommands(data) {
1074
1038
 
1075
1039
  function generateProjectDoc(data) {
1076
1040
  const commands = resolveCommands(data);
1077
- const agentRows = resolveAgentTable(data).map(([task, agent, skills]) => `| ${task} | \`${agent}\` | ${skills} |`).join('\n');
1078
- const skillsList = resolveSkills(data).map(s => `- ${s}`).join('\n');
1079
1041
  const evidence = (data.scan_evidence || []).length > 0
1080
1042
  ? (data.scan_evidence || []).map(line => `- ${line}`).join('\n')
1081
1043
  : '- TODO: refine scan evidence by inspecting the project.';
@@ -1108,29 +1070,20 @@ Generated by thachvd-kit on ${new Date().toISOString().split('T')[0]}.
1108
1070
  - Test: \`${commands.test}\`
1109
1071
  - Lint: \`${commands.lint}\`
1110
1072
 
1111
- ## Available MCP Tools
1073
+ ## Available Integrations
1112
1074
 
1113
- Use these tools as first-class search and verification methods — prefer them over shell commands or file reads.
1075
+ Use these integrations when available. Run thachvd-kit doctor to check the current machine.
1114
1076
 
1115
1077
  | MCP | When to Use |
1116
1078
  |-----|-------------|
1117
- | \`codegraph\` | Explore symbols, trace call chains, find usages — use BEFORE reading files |
1079
+ | \`codebase-memory-mcp\` | Explore symbols, trace call chains, architecture, and impact |
1118
1080
  | \`context7\` | Look up library/framework docs, API signatures, migration guides |
1119
- | \`playwright\` | Verify UI behavior, take screenshots, test forms and navigation |
1081
+ | \`playwright\` | Verify UI behavior, take screenshots, test forms and navigation |
1082
+ | \`rtk\` | Recommended proxy for noisy git, tests, builds, and package commands |
1120
1083
 
1121
1084
  > Check \`.agent/docs/tooling.md\` for setup details and additional MCP servers.
1122
1085
 
1123
- ## Agent Routing
1124
-
1125
- | Task Type | Agent | Primary Skills |
1126
- |-----------|-------|----------------|
1127
- ${agentRows}
1128
-
1129
- ## Auto-Resolved Skills
1130
-
1131
- ${skillsList}
1132
-
1133
- ## Scan Evidence
1086
+ ## Scan Evidence
1134
1087
 
1135
1088
  ${evidence}
1136
1089
  `;
@@ -1182,38 +1135,77 @@ function generateConventionsDoc(data) {
1182
1135
  `;
1183
1136
  }
1184
1137
 
1185
- function generateWorkflowDoc() {
1186
- return `# Agent Workflow
1138
+ function generateWorkflowDoc() {
1139
+ return `# Agent Workflow
1140
+
1141
+ This project uses Superpowers as the workflow backend. thachvd-kit only provides project context and integration setup.
1142
+
1143
+ ## Before Every Task
1144
+
1145
+ 1. Read AGENTS.md and the relevant files under .agent/docs/.
1146
+ 2. Use the native Superpowers skill that matches the request.
1147
+ 3. Use codebase-memory MCP for structural discovery when available.
1148
+ 4. Make changes only after the required planning gate.
1149
+ 5. Verify the change and request review before completion.
1150
+
1151
+ ## Route Matrix
1152
+
1153
+ | Situation | Superpowers path | Gate |
1154
+ |---|---|---|
1155
+ | Question or research only | direct answer or research | no product-code edits |
1156
+ | One obvious local fix | fast path | inspect -> edit -> focused verify |
1157
+ | Bug or failing behavior | systematic-debugging | reproduce -> root cause -> regression test -> fix -> verify |
1158
+ | New behavior or refactor | brainstorming -> writing-plans -> executing-plans | explicit plan approval before implementation |
1159
+ | Multi-part implementation | subagent-driven-development | task review and final review |
1160
+ | Pre-merge | requesting-code-review | blocking findings resolved |
1161
+
1162
+ ## Standard Feature Flow
1163
+
1164
+ brainstorming -> using-git-worktrees -> writing-plans -> user approval -> test-driven-development -> executing-plans or subagent-driven-development -> requesting-code-review -> verification-before-completion -> finishing-a-development-branch.
1165
+
1166
+ ## Fast Path
1167
+
1168
+ Use it only for one-file, unambiguous changes with no behavior, API, schema, security, dependency, CI, workflow, or release contract change. State the narrow scope and verification before editing. If the scope grows, switch to brainstorming and writing-plans.
1169
+
1170
+ ## Documentation Maintenance
1171
+
1172
+ - Update architecture.md when structure or boundaries change.
1173
+ - Update conventions.md when repeated project patterns become clear.
1174
+ - Update project.md when stack, scripts, or test tooling changes.
1175
+ - Keep AGENTS.md concise and put project-specific detail under .agent/docs/.
1176
+ `;
1177
+ /* Legacy workflow text below remains unreachable for source compatibility. */
1178
+ return `# Agent Workflow
1187
1179
 
1188
1180
  ## Before Every Task
1189
1181
 
1190
1182
  1. Read AGENTS.md.
1191
1183
  2. Read .agent/docs/project.md.
1192
- 3. Use \`/forge-task <request>\` (or \`$forge-task <request>\` in Codex) when the request changes code and the path is not obvious.
1184
+ 3. Use the matching native Superpowers skill for the task.
1193
1185
  4. Read only the relevant docs under .agent/agents, .agent/skills, .claude/skills, and .agent/workflows.
1194
- 5. Check if MCP servers (like \`codegraph\`) are active/available and prioritize using them as the primary entry point to search and locate files, symbols, and code blocks.
1186
+ 5. Use codebase-memory MCP for structural discovery when available, then verify the actual files before editing.
1195
1187
 
1196
1188
  ## Route Matrix
1197
1189
 
1198
1190
  | Situation | Command | Workflow / gate |
1199
1191
  |---|---|---|
1200
1192
  | Question or analysis only | direct answer | no edits |
1201
- | One obvious local fix | \`/forge-fast\` | \`.agent/workflows/simple.md\`, fast-path |
1202
- | Bug, regression, failing test, or unknown error | \`/forge-debug\` | \`.agent/workflows/debug.md\`, evidence-first |
1203
- | Research request | \`/forge-research\` | evidence report, no edits |
1204
- | New behavior, multi-file change, or unclear scope | \`/forge-task\` | research/spec/plan approval -> implement -> review |
1205
- | Pre-merge review | \`/forge-review\` | \`.agent/workflows/review.md\`, five-axis |
1206
- | npm version, tag, publish, or deployment | \`/forge-release\` | \`.agent/workflows/release.md\`, release gate |
1207
- | Several specialist domains | \`/orchestrate\` | plan -> approval -> parallel work -> integration verify |
1193
+ | One obvious local fix | fast path | inspect -> edit -> focused verify |
1194
+ | Bug, regression, failing test, or unknown error | systematic-debugging | reproduce -> root cause -> regression test -> fix -> verify |
1195
+ | Research request | direct research | evidence report, no edits |
1196
+ | New behavior, multi-file change, or unclear scope | brainstorming -> writing-plans -> executing-plans | explicit approval before implementation |
1197
+ | Pre-merge review | requesting-code-review | blocking findings resolved |
1198
+ | Several specialist domains | subagent-driven-development | task review and final review |
1208
1199
 
1209
1200
  If a task is not clearly simple, use the standard flow. Never use the fast path for behavior, API, schema, security, CI, dependency, workflow, or release changes.
1210
1201
 
1211
- ## Skill Selection
1202
+ ## Superpowers Skills
1212
1203
 
1213
- - Prefer native skill discovery when the client exposes it.
1214
- - Codex global skills live in ~/.codex/skills/ and are visible via the $ menu; thachvd-kit copies selected skills there on init.
1215
- - Claude Code project skills live in .claude/skills.
1216
- - Shared fallback skills live in .agent/skills.
1204
+ - Use brainstorming for unclear requirements.
1205
+ - Use using-git-worktrees and writing-plans before non-trivial implementation.
1206
+ - Use test-driven-development, executing-plans or subagent-driven-development during implementation.
1207
+ - Use systematic-debugging for bugs and requesting-code-review before completion.
1208
+ - thachvd-kit does not copy or replace Superpowers skills.
1217
1209
  - Do not load skill bodies by default.
1218
1210
  - Load a skill when the user mentions it, the task clearly matches its SKILL.md description, or .agent/docs/project.md routes the task to it.
1219
1211
  - Use explicit skill names in prompts for predictable behavior, for example $webapp-testing or $clean-code.
@@ -1238,9 +1230,9 @@ Then:
1238
1230
  5. Run verification (prioritize using Playwright MCP for web/UI changes to automate verification and capture screenshots).
1239
1231
  6. Summarize changed files and verification evidence.
1240
1232
 
1241
- For bugs, use \`/forge-debug\` with \`$systematic-debugging\`, the \`debugger\` agent, and \`testing-patterns\`: reproduce, isolate the root cause, add regression protection, make the smallest fix, and verify.
1233
+ For bugs, use \`/forge-debug\` with Superpowers' \`systematic-debugging\` when available, otherwise the matching local skill, plus the \`debugger\` agent and \`testing-patterns\`: reproduce, isolate the root cause, add regression protection, make the smallest fix, and verify.
1242
1234
 
1243
- For features or refactors, this flow runs *inside* the gated flow defined in AGENTS.md (spec -> plan -> implement -> review) — steps 3-5 above are the "Implement" phase, and step 6 is not a substitute for the mandatory \`.agent/workflows/review.md\` gate.
1235
+ For features or refactors, prefer the Superpowers chain when available: brainstorm/spec -> worktree -> detailed plan -> approval -> TDD/task execution -> per-task review -> final review -> finish branch. Otherwise use the local gated flow defined in AGENTS.md (spec -> plan -> implement -> review). Steps 3-5 above are the "Implement" phase, and step 6 is not a substitute for the mandatory review gate.
1244
1236
 
1245
1237
  ## Definition of Done (feature or refactor)
1246
1238
 
@@ -1266,21 +1258,54 @@ Do not report a feature/refactor task as done if any box above is unchecked —
1266
1258
  }
1267
1259
 
1268
1260
  function generateGettingStartedDoc() {
1261
+ return `# Getting Started
1262
+
1263
+ thachvd-kit creates project context. Superpowers owns the development workflow.
1264
+
1265
+ ## Setup
1266
+
1267
+ 1. Run \`thachvd-kit init\` in the repository.
1268
+ 2. Open or print \`.agent/docs/index-project-prompt.md\` with \`thachvd-kit prompt\`.
1269
+ 3. Install Superpowers and RTK, then run \`thachvd-kit setup\`.
1270
+ 4. Run \`thachvd-kit doctor\` and restart the AI client.
1271
+
1272
+ ## Standard Flow
1273
+
1274
+ Use Superpowers native skills:
1275
+
1276
+ 1. \`brainstorming\` for unclear requirements.
1277
+ 2. \`using-git-worktrees\` for isolated work.
1278
+ 3. \`writing-plans\`, then wait for explicit approval.
1279
+ 4. \`test-driven-development\` and \`executing-plans\` or \`subagent-driven-development\`.
1280
+ 5. \`requesting-code-review\` and \`verification-before-completion\`.
1281
+ 6. \`finishing-a-development-branch\`.
1282
+
1283
+ ## Bug Flow
1284
+
1285
+ Use \`systematic-debugging\`: reproduce the symptom, inspect the path with codebase-memory MCP, test hypotheses, add regression protection, fix the root cause, and verify.
1286
+
1287
+ ## Fast Path
1288
+
1289
+ Use a fast path only for one-file, unambiguous changes with no behavior or contract change. State the scope and verification before editing. If the scope expands, return to brainstorming and writing-plans.
1290
+ `;
1291
+ /* Legacy text below remains unreachable for source compatibility and is removed in a later major cleanup. */
1269
1292
  return `# Getting Started With This Kit
1270
1293
 
1271
1294
  Read this after \`thachvd-kit init\`. The kit gives every member one entry point, then selects only the process and expertise the task needs.
1272
1295
 
1273
1296
  ## Forge Command Map
1274
1297
 
1275
- | Client | Task | Fast | Debug | Research | Review | Release |
1276
- |---|---|---|---|---|---|---|
1277
- | Codex | \`$forge-task\` | \`$forge-fast\` | \`$forge-debug\` | \`$forge-research\` | \`$forge-review\` | \`$forge-release\` |
1278
- | Antigravity | \`/forge-task\` | \`/forge-fast\` | \`/forge-debug\` | \`/forge-research\` | \`/forge-review\` | \`/forge-release\` |
1279
- | Claude Code | \`/forge-task\` | \`/forge-fast\` | \`/forge-debug\` | \`/forge-research\` | \`/forge-review\` | \`/forge-release\` |
1280
- | Cursor | \`/forge-task\` | \`/forge-fast\` | \`/forge-debug\` | \`/forge-research\` | \`/forge-review\` | \`/forge-release\` |
1298
+ | Client | Task | Fast | Debug | Research | Review |
1299
+ |---|---|---|---|---|---|
1300
+ | Codex | \`$forge-task\` | \`$forge-fast\` | \`$forge-debug\` | \`$forge-research\` | \`$forge-review\` |
1301
+ | Antigravity | \`/forge-task\` | \`/forge-fast\` | \`/forge-debug\` | \`/forge-research\` | \`/forge-review\` |
1302
+ | Claude Code | \`/forge-task\` | \`/forge-fast\` | \`/forge-debug\` | \`/forge-research\` | \`/forge-review\` |
1303
+ | Cursor | \`/forge-task\` | \`/forge-fast\` | \`/forge-debug\` | \`/forge-research\` | \`/forge-review\` |
1281
1304
 
1282
1305
  Forge commands accept free-form text after the command and continue the selected workflow in the same turn. Plain questions remain normal chat; edit requests without a command are implicitly routed as \`forge-task\`.
1283
1306
 
1307
+ Forge is a routing layer. For feature/refactor work, prefer native Superpowers skills when available: brainstorming, using-git-worktrees, writing-plans, subagent-driven-development or executing-plans, test-driven-development, requesting-code-review, and finishing-a-development-branch. If Superpowers is not installed, use the matching \`.agent/skills/\` and \`.agent/workflows/\` fallback; do not maintain a competing duplicate methodology. Install the full execution backend from https://github.com/obra/superpowers#quickstart.
1308
+
1284
1309
  Codex Forge skills live in \`~/.codex/skills/forge-*/SKILL.md\`. Antigravity Forge workflows live in \`.agent/workflows/forge-*.md\`. Claude Code Forge commands live in \`.claude/commands/forge-*.md\`. Cursor Forge commands live in \`.cursor/commands/forge-*.md\`.
1285
1310
 
1286
1311
  ## Start Every Task With Forge
@@ -1288,11 +1313,12 @@ Codex Forge skills live in \`~/.codex/skills/forge-*/SKILL.md\`. Antigravity For
1288
1313
  Use the matching Forge command before editing whenever the request is not a simple question. \`forge-task\` must route internally and continue; it must not stop by asking the member to type a second command.
1289
1314
 
1290
1315
  \`\`\`text
1291
- ROUTE: question | fast | feature | bug | research | review | release | multi-domain
1316
+ ROUTE: question | fast | feature | bug | research | review | multi-domain
1292
1317
  WORKFLOW: [exact .agent/workflows/<name>.md file]
1293
1318
  SKILLS: [matching skills, or none]
1294
1319
  AGENTS: [matching specialist agents, or none]
1295
1320
  GATE: fast-path | standard | human-approval
1321
+ BACKEND: superpowers-native | forge-fallback
1296
1322
  ACTION: [what the agent is doing next in this turn]
1297
1323
  \`\`\`
1298
1324
 
@@ -1308,7 +1334,6 @@ A workflow is the process and its gates. A skill is the method or checklist. An
1308
1334
  | Bug, regression, failing test, or unknown error | \`/forge-debug <symptom>\` | bug | reproduce -> isolate -> regression test -> fix -> verify |
1309
1335
  | Research request | \`/forge-research <question>\` | research | evidence report, no edits |
1310
1336
  | Pre-merge or independent review | \`/forge-review\` | review | five-axis review; resolve blocking findings |
1311
- | Version, tag, npm publish, or deployment | \`/forge-release\` | release | release checklist; never fast-path |
1312
1337
  | Frontend + backend + data/security together | \`/orchestrate\` | standard | plan -> approval -> specialist work -> integration verify |
1313
1338
 
1314
1339
  ## Standard Feature Flow
@@ -1322,14 +1347,14 @@ The plan is a gate, not a suggestion. Do not start product-code implementation b
1322
1347
  Use \`/forge-debug <symptom>\`, not the feature flow, when something is failing or the root cause is unknown:
1323
1348
 
1324
1349
  1. Capture the exact symptom, environment, reproduction, and expected result.
1325
- 2. Inspect the relevant code path with MCP/codegraph when available.
1350
+ 2. Inspect the relevant code path with codebase-memory MCP when available.
1326
1351
  3. Form and test a small number of hypotheses; do not patch by guesswork.
1327
1352
  4. Add or update a regression test that fails before the fix when practical.
1328
1353
  5. Make the smallest root-cause fix.
1329
1354
  6. Run focused tests, then broader verification when the blast radius is shared.
1330
1355
  7. Use \`/review\` when the fix touches multiple files, contracts, security, or release behavior.
1331
1356
 
1332
- Load \`$systematic-debugging\`, the \`debugger\` agent, and \`testing-patterns\` for this route.
1357
+ Load Superpowers' \`systematic-debugging\` when available, otherwise the matching local skill, plus the \`debugger\` agent and \`testing-patterns\` for this route.
1333
1358
 
1334
1359
  ## Simple Fast Path
1335
1360
 
@@ -1352,7 +1377,6 @@ This bypasses only Spec, Plan, and the feature/refactor Review gate. It never by
1352
1377
  - \`forge-debug\`: systematic root-cause investigation and regression protection.
1353
1378
  - \`/test\`: add or run tests and assess coverage.
1354
1379
  - \`/review\`: five-axis review before completion or merge.
1355
- - \`forge-release\`: verify, version, tag, publish, and verify npm output.
1356
1380
  - \`$clean-code\` and \`$verification-before-completion\`: default implementation hygiene.
1357
1381
  - \`$webapp-testing\`: browser/UI verification; use Playwright when available.
1358
1382
 
@@ -1382,10 +1406,50 @@ function resolveToolingSetup(data) {
1382
1406
  return { runner, playwrightCommand };
1383
1407
  }
1384
1408
 
1385
- function generateToolingDoc(data) {
1386
- const { runner, playwrightCommand } = resolveToolingSetup(data);
1387
-
1388
- return `# Optional Tooling
1409
+ function generateToolingDoc(data) {
1410
+ const { runner, playwrightCommand } = resolveToolingSetup(data);
1411
+
1412
+ return `# Optional Tooling
1413
+
1414
+ Run \`thachvd-kit doctor\` to check the current machine. thachvd-kit does not install workflow skills or copy agent folders.
1415
+
1416
+ ## Superpowers
1417
+
1418
+ Install Superpowers separately for each AI client from its official plugin surface:
1419
+
1420
+ - Claude Code: \`/plugin install superpowers@claude-plugins-official\`
1421
+ - Antigravity: \`agy plugin install https://github.com/obra/superpowers\`
1422
+ - Codex App: install it from the Plugins sidebar.
1423
+ - Codex CLI: open \`/plugins\` and install Superpowers.
1424
+ - Cursor: \`/add-plugin superpowers\`
1425
+
1426
+ Guide: https://github.com/obra/superpowers#installation
1427
+
1428
+ ## Codebase Memory MCP
1429
+
1430
+ Use \`codebase-memory-mcp\` for symbol search, call paths, architecture, and impact analysis.
1431
+
1432
+ - Install: \`npm install -g codebase-memory-mcp\`
1433
+ - Index a repository: \`codebase-memory-mcp cli index_repository --repo-path .\`
1434
+ - Keep local index state out of git unless the team explicitly chooses a shared snapshot.
1435
+
1436
+ ## RTK
1437
+
1438
+ RTK is the recommended command-output layer, not a workflow engine. Prefer it by default for verbose shell commands.
1439
+
1440
+ - Install: \`cargo install --git https://github.com/rtk-ai/rtk --branch master rtk\`
1441
+ - Examples: \`rtk git status\`, \`rtk npm test\`, \`rtk git log\`.
1442
+ - If it is unavailable, run the underlying command directly.
1443
+
1444
+ ## Playwright
1445
+
1446
+ - Check: \`${runner} playwright --version\`
1447
+ - Browser install: \`${playwrightCommand}\`
1448
+ - Use the project's existing Playwright scripts when available.
1449
+ `;
1450
+ /* Legacy tooling text below remains unreachable for source compatibility. */
1451
+
1452
+ return `# Optional Tooling
1389
1453
 
1390
1454
  This kit keeps tool setup explicit. Do not assume these tools are available until you verify them in the current environment.
1391
1455
 
@@ -1421,24 +1485,23 @@ startup_timeout_sec = 20
1421
1485
  tool_timeout_sec = 120
1422
1486
  \`\`\`
1423
1487
 
1424
- ## Codegraph
1488
+ ## Codebase Memory MCP
1425
1489
 
1426
- Use codegraph for codebase exploration when the environment exposes it. The index is local state and should not be committed.
1490
+ Use codebase-memory-mcp for codebase exploration. The index is local state and should not be committed unless the team explicitly chooses a shared snapshot.
1427
1491
 
1428
- - Check for an index: look for \`.codegraph/\`
1429
- - Check CLI availability: \`codegraph --help\`
1430
- - Install CLI if needed: \`npm install -g @colbymchenry/codegraph\`
1431
- - Codex MCP CLI setup: \`codex mcp add codegraph -- codegraph serve --mcp\`
1492
+ - Check for an index: use the codebase-memory CLI status/index commands.
1493
+ - Check CLI availability: \`codebase-memory-mcp --help\`
1494
+ - Install CLI if needed: \`npm install -g codebase-memory-mcp\`
1495
+ - Index the repository: \`codebase-memory-mcp cli index_repository --repo-path .\`
1432
1496
  - Auto setup: \`thachvd-kit\`
1433
- - If your Codex environment provides the codegraph CLI, run its project indexing step from the repository root.
1434
- - Keep \`.codegraph/\` ignored in git.
1497
+ - If your Codex environment provides the codebase-memory CLI, run its indexing step from the repository root.
1498
+ - Keep local codebase-memory state ignored in git.
1435
1499
 
1436
1500
  Codex \`config.toml\` example:
1437
1501
 
1438
1502
  \`\`\`toml
1439
- [mcp_servers.codegraph]
1440
- command = "codegraph"
1441
- args = ["serve", "--mcp"]
1503
+ [mcp_servers.codebase-memory-mcp]
1504
+ command = "codebase-memory-mcp"
1442
1505
  startup_timeout_sec = 20
1443
1506
  tool_timeout_sec = 120
1444
1507
  \`\`\`
@@ -1450,9 +1513,8 @@ Gemini CLI / Antigravity \`mcp_config.json\` example:
1450
1513
  \`\`\`json
1451
1514
  {
1452
1515
  "mcpServers": {
1453
- "codegraph": {
1454
- "command": "codegraph",
1455
- "args": ["serve", "--mcp"]
1516
+ "codebase-memory-mcp": {
1517
+ "command": "codebase-memory-mcp"
1456
1518
  },
1457
1519
  "context7": {
1458
1520
  "command": "context7-mcp"
@@ -1479,10 +1541,9 @@ Claude Code user config example:
1479
1541
  \`\`\`json
1480
1542
  {
1481
1543
  "mcpServers": {
1482
- "codegraph": {
1483
- "type": "stdio",
1484
- "command": "codegraph",
1485
- "args": ["serve", "--mcp"]
1544
+ "codebase-memory-mcp": {
1545
+ "type": "stdio",
1546
+ "command": "codebase-memory-mcp"
1486
1547
  },
1487
1548
  "context7": {
1488
1549
  "type": "stdio",
@@ -1664,6 +1725,19 @@ function copyForgeCommands() {
1664
1725
  claude: path.join(targetDir, '.claude', 'commands'),
1665
1726
  cursor: path.join(targetDir, '.cursor', 'commands')
1666
1727
  };
1728
+
1729
+ for (const commandName of REMOVED_FORGE_COMMANDS) {
1730
+ const filename = `${commandName}.md`;
1731
+ for (const destination of Object.values(destinations)) {
1732
+ const commandPath = path.join(destination, filename);
1733
+ if (fs.existsSync(commandPath)) fs.rmSync(commandPath, { force: true });
1734
+ }
1735
+ if (codexSkillsDir) {
1736
+ const codexSkillPath = path.join(codexSkillsDir, commandName);
1737
+ if (fs.existsSync(codexSkillPath)) fs.rmSync(codexSkillPath, { recursive: true, force: true });
1738
+ }
1739
+ }
1740
+
1667
1741
  let antigravity = 0;
1668
1742
  let claude = 0;
1669
1743
  let cursor = 0;
@@ -1729,23 +1803,86 @@ async function writeGeneratedFile(relativePath, content, assumeYes) {
1729
1803
  return true;
1730
1804
  }
1731
1805
 
1732
- function homePath(...parts) {
1806
+ function homePath(...parts) {
1733
1807
  const home = process.env.USERPROFILE || process.env.HOME;
1734
1808
  return home ? path.join(home, ...parts) : null;
1735
- }
1736
-
1737
- function commandExists(command) {
1809
+ }
1810
+
1811
+ function printSuperpowersInstallGuide() {
1812
+ console.log(`
1813
+ ${pc.bold('Superpowers setup')} (official client integrations)
1814
+ Claude Code: /plugin install superpowers@claude-plugins-official
1815
+ Antigravity: agy plugin install https://github.com/obra/superpowers
1816
+ Codex App: install Superpowers from the Plugins sidebar
1817
+ Codex CLI: open /plugins, search Superpowers, then Install Plugin
1818
+ Cursor: /add-plugin superpowers
1819
+
1820
+ Full guide: https://github.com/obra/superpowers#installation
1821
+ `);
1822
+ }
1823
+
1824
+ function runDoctor() {
1825
+ console.log(pc.bold(pc.cyan('thachvd-kit doctor')));
1826
+ const requiredFiles = ['AGENTS.md', 'CLAUDE.md', 'GEMINI.md', '.cursorrules',
1827
+ path.join('.agent', 'docs', 'project.md'), path.join('.agent', 'docs', 'workflow.md')];
1828
+ for (const relativePath of requiredFiles) {
1829
+ const ok = fs.existsSync(path.join(targetDir, relativePath));
1830
+ console.log(` ${ok ? pc.green('OK') : pc.yellow('WARN')} ${relativePath}`);
1831
+ }
1832
+
1833
+ const tools = [
1834
+ [CODEBASE_MEMORY_BINARY, `npm install -g ${CODEBASE_MEMORY_PACKAGE}`],
1835
+ ['rtk', `recommended: ${RTK_INSTALL_COMMAND}`],
1836
+ ['agy', 'install Antigravity before running its Superpowers plugin command'],
1837
+ ['claude', 'install Claude Code before installing its Superpowers plugin'],
1838
+ ['codex', 'install Codex before using its Superpowers plugin']
1839
+ ];
1840
+ console.log(`\n${pc.bold('Local integrations (RTK recommended)')}`);
1841
+ for (const [binary, hint] of tools) {
1842
+ const ok = commandExists(binary);
1843
+ console.log(` ${ok ? pc.green('OK') : pc.yellow('WARN')} ${binary}${ok ? '' : ` - ${hint}`}`);
1844
+ }
1845
+
1846
+ console.log(`\n${pc.bold('Next step')}`);
1847
+ console.log(' Run thachvd-kit prompt to print the saved project-indexing prompt.');
1848
+ }
1849
+
1850
+ async function runSetup(args) {
1851
+ const skipMcpSetup = args.includes('--no-setup-mcp');
1852
+ console.log(pc.bold(pc.cyan('thachvd-kit setup')));
1853
+ printSuperpowersInstallGuide();
1854
+ if (!skipMcpSetup) {
1855
+ console.log(pc.bold('MCP setup'));
1856
+ for (const result of setupMcpServers({ install: true })) {
1857
+ const marker = result.ok ? pc.green('OK') : pc.yellow('WARN');
1858
+ console.log(` ${marker} ${result.message}`);
1859
+ }
1860
+ }
1861
+ console.log(`\n${pc.bold('RTK (recommended)')}`);
1862
+ if (commandExists('rtk')) {
1863
+ console.log(` ${pc.green('OK')} rtk already installed`);
1864
+ } else {
1865
+ console.log(` ${pc.yellow('WARN')} recommended: rtk is not installed; run: ${RTK_INSTALL_COMMAND}`);
1866
+ }
1867
+ console.log('\nRestart your AI client after installing plugins or changing MCP configuration.');
1868
+ console.log('Your onboarding prompt is saved at .agent/docs/index-project-prompt.md. Run thachvd-kit prompt to print it again.');
1869
+ }
1870
+
1871
+ function commandExists(command) {
1738
1872
  const checker = process.platform === 'win32' ? 'where' : 'command';
1739
1873
  const args = process.platform === 'win32' ? [command] : ['-v', command];
1740
1874
  const result = spawnSync(checker, args, { encoding: 'utf8', shell: process.platform !== 'win32' });
1741
1875
  return result.status === 0;
1742
1876
  }
1743
1877
 
1744
- function ensureGlobalNpmPackage(binaryName, packageName) {
1745
- if (commandExists(binaryName)) {
1746
- return { ok: true, message: `${binaryName} already installed` };
1747
- }
1748
- if (!commandExists('npm')) {
1878
+ function ensureGlobalNpmPackage(binaryName, packageName, install = false) {
1879
+ if (commandExists(binaryName)) {
1880
+ return { ok: true, message: `${binaryName} already installed` };
1881
+ }
1882
+ if (!install) {
1883
+ return { ok: false, message: `${binaryName} is missing; run: npm install -g ${packageName}` };
1884
+ }
1885
+ if (!commandExists('npm')) {
1749
1886
  return { ok: false, message: `npm not found; run: npm install -g ${packageName}` };
1750
1887
  }
1751
1888
  const result = spawnSync('npm', ['install', '-g', packageName], {
@@ -1758,17 +1895,9 @@ function ensureGlobalNpmPackage(binaryName, packageName) {
1758
1895
  return { ok: true, message: `installed ${binaryName}` };
1759
1896
  }
1760
1897
 
1761
- function ensureCodegraphCli() {
1762
- return ensureGlobalNpmPackage('codegraph', '@colbymchenry/codegraph');
1763
- }
1764
-
1765
- function ensureContext7Cli() {
1766
- return ensureGlobalNpmPackage('context7-mcp', '@upstash/context7-mcp');
1767
- }
1768
-
1769
- function ensurePlaywrightMcpCli() {
1770
- return ensureGlobalNpmPackage('playwright-mcp', '@playwright/mcp');
1771
- }
1898
+ function ensureCodebaseMemoryCli(install = false) {
1899
+ return ensureGlobalNpmPackage(CODEBASE_MEMORY_BINARY, CODEBASE_MEMORY_PACKAGE, install);
1900
+ }
1772
1901
 
1773
1902
  function readJsonFile(filePath) {
1774
1903
  if (!fs.existsSync(filePath)) return {};
@@ -1790,10 +1919,10 @@ function mergeMcpJson(filePath, withType = false) {
1790
1919
  return { ok: false, message: `${filePath} is not valid JSON; skipped` };
1791
1920
  }
1792
1921
  data.mcpServers = data.mcpServers || {};
1793
- const baseServers = {
1794
- codegraph: { command: 'codegraph', args: ['serve', '--mcp'] },
1795
- playwright: { command: 'playwright-mcp' },
1796
- context7: { command: 'context7-mcp' }
1922
+ const baseServers = {
1923
+ 'codebase-memory-mcp': { command: CODEBASE_MEMORY_BINARY, args: [] },
1924
+ playwright: { command: 'playwright-mcp' },
1925
+ context7: { command: 'context7-mcp' }
1797
1926
  };
1798
1927
  if (data.permissions && Array.isArray(data.permissions.allow)) {
1799
1928
  const requiredPermissions = [
@@ -1827,13 +1956,12 @@ startup_timeout_sec = 20
1827
1956
  tool_timeout_sec = 120
1828
1957
  `);
1829
1958
  }
1830
- if (!/\[mcp_servers\.codegraph\]/.test(existing)) {
1831
- blocks.push(`[mcp_servers.codegraph]
1832
- command = "codegraph"
1833
- args = ["serve", "--mcp"]
1834
- startup_timeout_sec = 20
1835
- tool_timeout_sec = 120
1836
- `);
1959
+ if (!/\[mcp_servers\.codebase-memory-mcp\]/.test(existing)) {
1960
+ blocks.push(`[mcp_servers.codebase-memory-mcp]
1961
+ command = "${CODEBASE_MEMORY_BINARY}"
1962
+ startup_timeout_sec = 20
1963
+ tool_timeout_sec = 120
1964
+ `);
1837
1965
  }
1838
1966
  if (!/\[mcp_servers\.playwright\]/.test(existing)) {
1839
1967
  blocks.push(`[mcp_servers.playwright]
@@ -1846,7 +1974,7 @@ tool_timeout_sec = 120
1846
1974
  }
1847
1975
  const separator = existing && !existing.endsWith('\n') ? '\n\n' : existing ? '\n' : '';
1848
1976
  fs.writeFileSync(filePath, existing + separator + blocks.join('\n'), 'utf8');
1849
- return { ok: true, message: `configured context7, codegraph, playwright MCP in ${filePath}` };
1977
+ return { ok: true, message: `configured codebase-memory-mcp, context7, playwright MCP in ${filePath}` };
1850
1978
  }
1851
1979
 
1852
1980
  const DOD_HOOK_MARKER = 'feature/refactor Definition-of-Done gate';
@@ -1921,11 +2049,12 @@ function mergeClaudeProjectHooks(filePath) {
1921
2049
  return { ok: true, message: `configured Definition-of-Done Stop hook in ${filePath}` };
1922
2050
  }
1923
2051
 
1924
- function setupMcpServers() {
1925
- const results = [];
1926
- results.push(ensureCodegraphCli());
1927
- results.push(ensureContext7Cli());
1928
- results.push(ensurePlaywrightMcpCli());
2052
+ function setupMcpServers(options = {}) {
2053
+ const install = options.install === true;
2054
+ const results = [];
2055
+ results.push(ensureCodebaseMemoryCli(install));
2056
+ results.push(ensureGlobalNpmPackage('context7-mcp', '@upstash/context7-mcp', install));
2057
+ results.push(ensureGlobalNpmPackage('playwright-mcp', '@playwright/mcp', install));
1929
2058
 
1930
2059
  const codexConfig = homePath('.codex', 'config.toml');
1931
2060
  if (codexConfig) results.push(appendMcpTomlIfMissing(codexConfig));
@@ -1962,12 +2091,27 @@ async function main() {
1962
2091
  return;
1963
2092
  }
1964
2093
 
1965
- if (rawArgs.includes('--help') || rawArgs.includes('-h')) {
1966
- printHelp();
1967
- return;
1968
- }
1969
-
1970
- if (command !== 'init') {
2094
+ if (rawArgs.includes('--help') || rawArgs.includes('-h')) {
2095
+ printHelp();
2096
+ return;
2097
+ }
2098
+
2099
+ if (command === 'doctor') {
2100
+ runDoctor();
2101
+ return;
2102
+ }
2103
+
2104
+ if (command === 'prompt') {
2105
+ printProjectPrompt();
2106
+ return;
2107
+ }
2108
+
2109
+ if (command === 'setup') {
2110
+ await runSetup(rawArgs.slice(1));
2111
+ return;
2112
+ }
2113
+
2114
+ if (command !== 'init') {
1971
2115
  console.error(pc.red(`Unknown command: ${command}`));
1972
2116
  printHelp();
1973
2117
  process.exit(1);
@@ -2024,41 +2168,13 @@ async function main() {
2024
2168
  if (data.uses_docker) data.infrastructure.push('docker');
2025
2169
  if (data.cloud !== 'none') data.infrastructure.push(data.cloud);
2026
2170
 
2027
- const shouldSetupMcp = !skipMcpSetup;
2171
+ const shouldSetupMcp = args.includes('--setup-mcp') && !skipMcpSetup;
2028
2172
 
2029
2173
  console.log(`\n${pc.bold(pc.cyan('Generating Files'))}`);
2030
2174
 
2031
2175
  // Shared entry files are written after the .agent folder is available.
2032
2176
 
2033
- // Copy .agent folder
2034
- const { copied, skipped } = copyAgentFolder();
2035
- if (copied > 0) {
2036
- console.log(` ${pc.green('OK')} Copied ${pc.bold('.agent/')} (${copied} file${copied !== 1 ? 's' : ''} added${skipped > 0 ? `, ${skipped} skipped` : ''})`);
2037
- } else if (skipped > 0) {
2038
- console.log(` ${pc.yellow('~')} ${pc.bold('.agent/')} already exists - ${skipped} file${skipped !== 1 ? 's' : ''} skipped (no overwrite)`);
2039
- }
2040
-
2041
- const nativeSkills = copySelectedSkillFolders(data, assumeYes);
2042
- if (nativeSkills.copied > 0) {
2043
- console.log(` ${pc.green('OK')} Copied native skills to ${pc.bold('~/.codex/skills/')} and ${pc.bold('.claude/skills/')} (${nativeSkills.skills.join(', ')})`);
2044
- } else if (nativeSkills.skipped > 0) {
2045
- console.log(` ${pc.yellow('~')} Native skills already exist - ${nativeSkills.skipped} file${nativeSkills.skipped !== 1 ? 's' : ''} skipped`);
2046
- }
2047
-
2048
- const codexPrompts = copyCodexPrompts();
2049
- if (codexPrompts.copied > 0) {
2050
- console.log(` ${pc.green('OK')} Installed Codex custom prompts in ${pc.bold('~/.codex/prompts/')} (${codexPrompts.prompts.map(name => `/prompts:${name}`).join(', ')})`);
2051
- }
2052
-
2053
- const legacyClientCommands = copyClientWorkflowCommands();
2054
- if (legacyClientCommands.claude > 0 || legacyClientCommands.cursor > 0) {
2055
- console.log(` ${pc.dim('~')} Preserved legacy workflow aliases for Claude Code and Cursor (${legacyClientCommands.claude}/${legacyClientCommands.cursor})`);
2056
- }
2057
-
2058
- const forgeCommands = copyForgeCommands();
2059
- if (forgeCommands.commands.length > 0) {
2060
- console.log(` ${pc.green('OK')} Installed Forge commands (${forgeCommands.commands.join(', ')}) for Antigravity (${forgeCommands.antigravity}), Claude Code (${forgeCommands.claude}), Cursor (${forgeCommands.cursor}), and Codex skills (${forgeCommands.codex})`);
2061
- }
2177
+ console.log(` ${pc.green('OK')} Project context generation enabled; workflow skills remain client-managed by Superpowers`);
2062
2178
 
2063
2179
 
2064
2180
  const generatedFiles = [
@@ -2069,9 +2185,10 @@ async function main() {
2069
2185
  [path.join('.agent', 'docs', 'project.md'), generateProjectDoc(data)],
2070
2186
  [path.join('.agent', 'docs', 'architecture.md'), generateArchitectureDoc(data)],
2071
2187
  [path.join('.agent', 'docs', 'conventions.md'), generateConventionsDoc(data)],
2072
- [path.join('.agent', 'docs', 'workflow.md'), generateWorkflowDoc()],
2188
+ [path.join('.agent', 'docs', 'workflow.md'), generateWorkflowDoc()],
2073
2189
  [path.join('.agent', 'docs', 'tooling.md'), generateToolingDoc(data)],
2074
- [path.join('.agent', 'docs', 'getting-started.md'), generateGettingStartedDoc()]
2190
+ [path.join('.agent', 'docs', 'getting-started.md'), generateGettingStartedDoc()],
2191
+ [path.join('.agent', 'docs', 'index-project-prompt.md'), generateIndexProjectPrompt()]
2075
2192
  ];
2076
2193
 
2077
2194
  for (const [relativePath, content] of generatedFiles) {
@@ -2080,11 +2197,7 @@ async function main() {
2080
2197
  else console.log(` ${pc.yellow('~')} Skipped ${pc.bold(relativePath)}`);
2081
2198
  }
2082
2199
 
2083
- console.log(`\n${pc.bold(pc.cyan('Configuring Claude Code hooks'))}`);
2084
- const hookResult = mergeClaudeProjectHooks(path.join(targetDir, '.claude', 'settings.json'));
2085
- console.log(` ${hookResult.ok ? pc.green('OK') : pc.yellow('~')} ${hookResult.message}`);
2086
-
2087
- if (shouldSetupMcp) {
2200
+ if (shouldSetupMcp) {
2088
2201
  console.log(`\n${pc.bold(pc.cyan('Configuring MCP'))}`);
2089
2202
  for (const result of setupMcpServers()) {
2090
2203
  const marker = result.ok ? pc.green('OK') : pc.yellow('~');
@@ -2102,41 +2215,25 @@ async function main() {
2102
2215
  - ${pc.bold('CLAUDE.md')} Claude Code entry that imports AGENTS.md
2103
2216
  - ${pc.bold('GEMINI.md')} Antigravity entry
2104
2217
  - ${pc.bold('.cursorrules')} Cursor entry
2105
- - ${pc.bold('.agent/docs/')} scan-based project rules, including ${pc.bold('getting-started.md')} (standard flow vs fast path)
2106
- - ${pc.bold('.agent/')} skills, workflows, agents, and rules
2107
- - ${pc.bold('~/.codex/skills/')} selected Codex skills installed globally (visible in $ menu)
2108
- - ${pc.bold('~/.codex/skills/forge-*/')} Forge Codex skills (visible as $forge-task, $forge-fast, and related skills)
2109
- - ${pc.bold('~/.codex/prompts/')} legacy Codex prompts retained for compatibility
2110
- - ${pc.bold('.claude/skills/')} selected Claude Code native skills
2111
- - ${pc.bold('.claude/commands/forge-*.md')} Forge Claude Code commands (visible as /forge-task and related commands)
2112
- - ${pc.bold('.cursor/commands/forge-*.md')} Forge Cursor commands (visible as /forge-task and related commands)
2113
- - ${pc.bold('.agent/workflows/forge-*.md')} Forge Antigravity workflows (visible as /forge-task and related commands)
2114
- - ${pc.bold('.claude/settings.json')} Definition-of-Done Stop hook (Claude Code only — blocks reporting a feature/refactor "done" without a plan + review pass)
2218
+ - ${pc.bold('.agent/docs/')} scan-based project rules and local operating notes
2219
+ - ${pc.bold('.agent/docs/index-project-prompt.md')} durable onboarding prompt
2115
2220
 
2116
2221
  ${pc.bold('MCP/tooling setup:')}
2117
- - Codegraph CLI checked or installed; MCP configured for Codex, Gemini/Antigravity, and Claude Code
2118
- - Context7 MCP configured for Codex and Gemini/Antigravity
2119
- - Playwright MCP configured for Codex, Gemini/Antigravity, and Claude Code
2120
- - Browser install hint: ${pc.bold(resolveToolingSetup(data).playwrightCommand)}
2121
- - Codegraph index hint: run ${pc.bold('codegraph init -i')} when a project index is missing, then keep ${pc.bold('.codegraph/')} uncommitted
2222
+ - Superpowers is the workflow backend; install it from the official client/plugin surface
2223
+ - Run ${pc.bold('thachvd-kit setup')} to configure codebase-memory MCP and recommended RTK
2122
2224
 
2123
2225
  ${pc.bold('Next steps:')}
2124
- 1. Read ${pc.bold('.agent/docs/getting-started.md')} for the standard flow vs fast path
2125
- 2. Copy the prompt below into your AI editor and describe what the project does
2126
- 3. Commit ${pc.bold('AGENTS.md')}, ${pc.bold('CLAUDE.md')}, ${pc.bold('GEMINI.md')}, ${pc.bold('.cursorrules')}, ${pc.bold('.agent/')}, and ${pc.bold('.claude/settings.json')}
2127
- 4. Open the project in Codex, Antigravity, Claude Code, or Cursor
2128
-
2129
- ${pc.bold('Copy this prompt into your AI editor:')}
2130
- ${pc.dim('---')}
2131
- Read CLAUDE.md (if using Claude Code), AGENTS.md, and all files under .agent/docs/.
2132
- Ask me what this project does and any important conventions I want preserved.
2133
- Then scan this repository.
2134
- Update CLAUDE.md, AGENTS.md, .cursorrules and .agent/docs/project.md, .agent/docs/architecture.md, .agent/docs/conventions.md, .agent/docs/workflow.md, and .agent/docs/tooling.md with factual project-specific rules.
2135
- Do not implement product code.
2136
- Remove TODO: refine only when backed by evidence from the codebase.
2137
- ${pc.dim('---')}
2138
- `);
2139
- }
2226
+ 1. Run ${pc.bold('thachvd-kit prompt')} and paste the saved prompt into your AI editor
2227
+ 2. Install Superpowers and RTK, then run ${pc.bold('thachvd-kit setup')}
2228
+ 3. Run ${pc.bold('thachvd-kit doctor')} to verify the machine
2229
+ 4. Re-run ${pc.bold('thachvd-kit prompt')} whenever you need the onboarding prompt again
2230
+
2231
+ ${pc.bold('Onboarding prompt saved to .agent/docs/index-project-prompt.md:')}
2232
+ ${pc.dim('---')}
2233
+ ${generateIndexProjectPrompt().trim()}
2234
+ ${pc.dim('---')}
2235
+ `);
2236
+ }
2140
2237
 
2141
2238
  main().catch(err => {
2142
2239
  console.error(pc.red('\nError during init:'), err);