gsd-trae 1.0.0 → 1.0.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 (763) hide show
  1. package/CHANGELOG.md +40 -0
  2. package/README.md +7 -76
  3. package/assets/screenshot.png +0 -0
  4. package/package.json +12 -3
  5. package/.claude/settings.local.json +0 -8
  6. package/.gitmodules +0 -6
  7. package/.trae/project_rules.md +0 -56
  8. package/.trae/rules/project_rules.md +0 -56
  9. package/.vscode/code-counter/code-counter.db +0 -0
  10. package/.vscode/settings.json +0 -5
  11. package/refs/gsd/.github/CODEOWNERS +0 -2
  12. package/refs/gsd/.github/FUNDING.yml +0 -1
  13. package/refs/gsd/.github/ISSUE_TEMPLATE/bug_report.yml +0 -59
  14. package/refs/gsd/.github/ISSUE_TEMPLATE/feature_request.yml +0 -37
  15. package/refs/gsd/.github/pull_request_template.md +0 -24
  16. package/refs/gsd/.github/workflows/auto-label-issues.yml +0 -21
  17. package/refs/gsd/CHANGELOG.md +0 -1520
  18. package/refs/gsd/LICENSE +0 -21
  19. package/refs/gsd/README.md +0 -704
  20. package/refs/gsd/SECURITY.md +0 -33
  21. package/refs/gsd/agents/gsd-codebase-mapper.md +0 -764
  22. package/refs/gsd/agents/gsd-debugger.md +0 -1246
  23. package/refs/gsd/agents/gsd-executor.md +0 -469
  24. package/refs/gsd/agents/gsd-integration-checker.md +0 -443
  25. package/refs/gsd/agents/gsd-phase-researcher.md +0 -546
  26. package/refs/gsd/agents/gsd-plan-checker.md +0 -690
  27. package/refs/gsd/agents/gsd-planner.md +0 -1275
  28. package/refs/gsd/agents/gsd-project-researcher.md +0 -621
  29. package/refs/gsd/agents/gsd-research-synthesizer.md +0 -239
  30. package/refs/gsd/agents/gsd-roadmapper.md +0 -642
  31. package/refs/gsd/agents/gsd-verifier.md +0 -573
  32. package/refs/gsd/assets/gsd-logo-2000-transparent.png +0 -0
  33. package/refs/gsd/assets/gsd-logo-2000-transparent.svg +0 -17
  34. package/refs/gsd/assets/gsd-logo-2000.png +0 -0
  35. package/refs/gsd/assets/gsd-logo-2000.svg +0 -21
  36. package/refs/gsd/assets/terminal.svg +0 -68
  37. package/refs/gsd/bin/install.js +0 -2090
  38. package/refs/gsd/commands/gsd/add-phase.md +0 -43
  39. package/refs/gsd/commands/gsd/add-tests.md +0 -41
  40. package/refs/gsd/commands/gsd/add-todo.md +0 -47
  41. package/refs/gsd/commands/gsd/audit-milestone.md +0 -36
  42. package/refs/gsd/commands/gsd/check-todos.md +0 -45
  43. package/refs/gsd/commands/gsd/cleanup.md +0 -18
  44. package/refs/gsd/commands/gsd/complete-milestone.md +0 -136
  45. package/refs/gsd/commands/gsd/debug.md +0 -167
  46. package/refs/gsd/commands/gsd/discuss-phase.md +0 -83
  47. package/refs/gsd/commands/gsd/execute-phase.md +0 -41
  48. package/refs/gsd/commands/gsd/health.md +0 -22
  49. package/refs/gsd/commands/gsd/help.md +0 -22
  50. package/refs/gsd/commands/gsd/insert-phase.md +0 -32
  51. package/refs/gsd/commands/gsd/join-discord.md +0 -18
  52. package/refs/gsd/commands/gsd/list-phase-assumptions.md +0 -46
  53. package/refs/gsd/commands/gsd/map-codebase.md +0 -71
  54. package/refs/gsd/commands/gsd/new-milestone.md +0 -44
  55. package/refs/gsd/commands/gsd/new-project.md +0 -42
  56. package/refs/gsd/commands/gsd/new-project.md.bak +0 -1041
  57. package/refs/gsd/commands/gsd/pause-work.md +0 -38
  58. package/refs/gsd/commands/gsd/plan-milestone-gaps.md +0 -34
  59. package/refs/gsd/commands/gsd/plan-phase.md +0 -45
  60. package/refs/gsd/commands/gsd/progress.md +0 -24
  61. package/refs/gsd/commands/gsd/quick.md +0 -41
  62. package/refs/gsd/commands/gsd/reapply-patches.md +0 -110
  63. package/refs/gsd/commands/gsd/remove-phase.md +0 -31
  64. package/refs/gsd/commands/gsd/research-phase.md +0 -189
  65. package/refs/gsd/commands/gsd/resume-work.md +0 -40
  66. package/refs/gsd/commands/gsd/set-profile.md +0 -34
  67. package/refs/gsd/commands/gsd/settings.md +0 -36
  68. package/refs/gsd/commands/gsd/update.md +0 -37
  69. package/refs/gsd/commands/gsd/verify-work.md +0 -38
  70. package/refs/gsd/docs/USER-GUIDE.md +0 -471
  71. package/refs/gsd/docs/context-monitor.md +0 -96
  72. package/refs/gsd/get-shit-done/bin/gsd-tools.cjs +0 -585
  73. package/refs/gsd/get-shit-done/bin/lib/commands.cjs +0 -553
  74. package/refs/gsd/get-shit-done/bin/lib/config.cjs +0 -162
  75. package/refs/gsd/get-shit-done/bin/lib/core.cjs +0 -411
  76. package/refs/gsd/get-shit-done/bin/lib/frontmatter.cjs +0 -299
  77. package/refs/gsd/get-shit-done/bin/lib/init.cjs +0 -710
  78. package/refs/gsd/get-shit-done/bin/lib/milestone.cjs +0 -215
  79. package/refs/gsd/get-shit-done/bin/lib/phase.cjs +0 -870
  80. package/refs/gsd/get-shit-done/bin/lib/roadmap.cjs +0 -298
  81. package/refs/gsd/get-shit-done/bin/lib/state.cjs +0 -521
  82. package/refs/gsd/get-shit-done/bin/lib/template.cjs +0 -222
  83. package/refs/gsd/get-shit-done/bin/lib/verify.cjs +0 -772
  84. package/refs/gsd/get-shit-done/references/checkpoints.md +0 -776
  85. package/refs/gsd/get-shit-done/references/continuation-format.md +0 -249
  86. package/refs/gsd/get-shit-done/references/decimal-phase-calculation.md +0 -65
  87. package/refs/gsd/get-shit-done/references/git-integration.md +0 -248
  88. package/refs/gsd/get-shit-done/references/git-planning-commit.md +0 -38
  89. package/refs/gsd/get-shit-done/references/model-profile-resolution.md +0 -34
  90. package/refs/gsd/get-shit-done/references/model-profiles.md +0 -92
  91. package/refs/gsd/get-shit-done/references/phase-argument-parsing.md +0 -61
  92. package/refs/gsd/get-shit-done/references/planning-config.md +0 -196
  93. package/refs/gsd/get-shit-done/references/questioning.md +0 -145
  94. package/refs/gsd/get-shit-done/references/tdd.md +0 -263
  95. package/refs/gsd/get-shit-done/references/ui-brand.md +0 -160
  96. package/refs/gsd/get-shit-done/references/verification-patterns.md +0 -612
  97. package/refs/gsd/get-shit-done/templates/DEBUG.md +0 -164
  98. package/refs/gsd/get-shit-done/templates/UAT.md +0 -247
  99. package/refs/gsd/get-shit-done/templates/VALIDATION.md +0 -76
  100. package/refs/gsd/get-shit-done/templates/codebase/architecture.md +0 -255
  101. package/refs/gsd/get-shit-done/templates/codebase/concerns.md +0 -310
  102. package/refs/gsd/get-shit-done/templates/codebase/conventions.md +0 -307
  103. package/refs/gsd/get-shit-done/templates/codebase/integrations.md +0 -280
  104. package/refs/gsd/get-shit-done/templates/codebase/stack.md +0 -186
  105. package/refs/gsd/get-shit-done/templates/codebase/structure.md +0 -285
  106. package/refs/gsd/get-shit-done/templates/codebase/testing.md +0 -480
  107. package/refs/gsd/get-shit-done/templates/config.json +0 -37
  108. package/refs/gsd/get-shit-done/templates/context.md +0 -283
  109. package/refs/gsd/get-shit-done/templates/continue-here.md +0 -78
  110. package/refs/gsd/get-shit-done/templates/debug-subagent-prompt.md +0 -91
  111. package/refs/gsd/get-shit-done/templates/discovery.md +0 -146
  112. package/refs/gsd/get-shit-done/templates/milestone-archive.md +0 -123
  113. package/refs/gsd/get-shit-done/templates/milestone.md +0 -115
  114. package/refs/gsd/get-shit-done/templates/phase-prompt.md +0 -569
  115. package/refs/gsd/get-shit-done/templates/planner-subagent-prompt.md +0 -117
  116. package/refs/gsd/get-shit-done/templates/project.md +0 -184
  117. package/refs/gsd/get-shit-done/templates/requirements.md +0 -231
  118. package/refs/gsd/get-shit-done/templates/research-project/ARCHITECTURE.md +0 -204
  119. package/refs/gsd/get-shit-done/templates/research-project/FEATURES.md +0 -147
  120. package/refs/gsd/get-shit-done/templates/research-project/PITFALLS.md +0 -200
  121. package/refs/gsd/get-shit-done/templates/research-project/STACK.md +0 -120
  122. package/refs/gsd/get-shit-done/templates/research-project/SUMMARY.md +0 -170
  123. package/refs/gsd/get-shit-done/templates/research.md +0 -552
  124. package/refs/gsd/get-shit-done/templates/retrospective.md +0 -54
  125. package/refs/gsd/get-shit-done/templates/roadmap.md +0 -202
  126. package/refs/gsd/get-shit-done/templates/state.md +0 -176
  127. package/refs/gsd/get-shit-done/templates/summary-complex.md +0 -59
  128. package/refs/gsd/get-shit-done/templates/summary-minimal.md +0 -41
  129. package/refs/gsd/get-shit-done/templates/summary-standard.md +0 -48
  130. package/refs/gsd/get-shit-done/templates/summary.md +0 -248
  131. package/refs/gsd/get-shit-done/templates/user-setup.md +0 -311
  132. package/refs/gsd/get-shit-done/templates/verification-report.md +0 -322
  133. package/refs/gsd/get-shit-done/workflows/add-phase.md +0 -111
  134. package/refs/gsd/get-shit-done/workflows/add-tests.md +0 -350
  135. package/refs/gsd/get-shit-done/workflows/add-todo.md +0 -157
  136. package/refs/gsd/get-shit-done/workflows/audit-milestone.md +0 -297
  137. package/refs/gsd/get-shit-done/workflows/check-todos.md +0 -176
  138. package/refs/gsd/get-shit-done/workflows/cleanup.md +0 -152
  139. package/refs/gsd/get-shit-done/workflows/complete-milestone.md +0 -763
  140. package/refs/gsd/get-shit-done/workflows/diagnose-issues.md +0 -219
  141. package/refs/gsd/get-shit-done/workflows/discovery-phase.md +0 -289
  142. package/refs/gsd/get-shit-done/workflows/discuss-phase.md +0 -542
  143. package/refs/gsd/get-shit-done/workflows/execute-phase.md +0 -449
  144. package/refs/gsd/get-shit-done/workflows/execute-plan.md +0 -448
  145. package/refs/gsd/get-shit-done/workflows/health.md +0 -156
  146. package/refs/gsd/get-shit-done/workflows/help.md +0 -489
  147. package/refs/gsd/get-shit-done/workflows/insert-phase.md +0 -129
  148. package/refs/gsd/get-shit-done/workflows/list-phase-assumptions.md +0 -178
  149. package/refs/gsd/get-shit-done/workflows/map-codebase.md +0 -315
  150. package/refs/gsd/get-shit-done/workflows/new-milestone.md +0 -382
  151. package/refs/gsd/get-shit-done/workflows/new-project.md +0 -1116
  152. package/refs/gsd/get-shit-done/workflows/pause-work.md +0 -122
  153. package/refs/gsd/get-shit-done/workflows/plan-milestone-gaps.md +0 -274
  154. package/refs/gsd/get-shit-done/workflows/plan-phase.md +0 -569
  155. package/refs/gsd/get-shit-done/workflows/progress.md +0 -381
  156. package/refs/gsd/get-shit-done/workflows/quick.md +0 -453
  157. package/refs/gsd/get-shit-done/workflows/remove-phase.md +0 -154
  158. package/refs/gsd/get-shit-done/workflows/research-phase.md +0 -73
  159. package/refs/gsd/get-shit-done/workflows/resume-project.md +0 -306
  160. package/refs/gsd/get-shit-done/workflows/set-profile.md +0 -80
  161. package/refs/gsd/get-shit-done/workflows/settings.md +0 -213
  162. package/refs/gsd/get-shit-done/workflows/transition.md +0 -544
  163. package/refs/gsd/get-shit-done/workflows/update.md +0 -219
  164. package/refs/gsd/get-shit-done/workflows/verify-phase.md +0 -242
  165. package/refs/gsd/get-shit-done/workflows/verify-work.md +0 -569
  166. package/refs/gsd/hooks/gsd-check-update.js +0 -62
  167. package/refs/gsd/hooks/gsd-context-monitor.js +0 -122
  168. package/refs/gsd/hooks/gsd-statusline.js +0 -108
  169. package/refs/gsd/package.json +0 -50
  170. package/refs/gsd/scripts/build-hooks.js +0 -43
  171. package/refs/gsd/tests/commands.test.cjs +0 -661
  172. package/refs/gsd/tests/helpers.cjs +0 -40
  173. package/refs/gsd/tests/init.test.cjs +0 -205
  174. package/refs/gsd/tests/milestone.test.cjs +0 -98
  175. package/refs/gsd/tests/phase.test.cjs +0 -1241
  176. package/refs/gsd/tests/roadmap.test.cjs +0 -265
  177. package/refs/gsd/tests/state.test.cjs +0 -302
  178. package/refs/gsd/tests/verify.test.cjs +0 -80
  179. package/refs/vbenchmark/.agent/agents/codebase-explorer.md +0 -224
  180. package/refs/vbenchmark/.agent/agents/debugger.md +0 -180
  181. package/refs/vbenchmark/.agent/agents/documenter.md +0 -166
  182. package/refs/vbenchmark/.agent/agents/implementer.md +0 -70
  183. package/refs/vbenchmark/.agent/agents/orchestrator.md +0 -212
  184. package/refs/vbenchmark/.agent/agents/researcher.md +0 -80
  185. package/refs/vbenchmark/.agent/agents/reviewer.md +0 -184
  186. package/refs/vbenchmark/.agent/agents/tester.md +0 -170
  187. package/refs/vbenchmark/.agent/commands/commit.md +0 -29
  188. package/refs/vbenchmark/.agent/commands/debug.md +0 -59
  189. package/refs/vbenchmark/.agent/commands/document.md +0 -52
  190. package/refs/vbenchmark/.agent/commands/gather-context.md +0 -58
  191. package/refs/vbenchmark/.agent/commands/init.md +0 -56
  192. package/refs/vbenchmark/.agent/commands/preset-help.md +0 -50
  193. package/refs/vbenchmark/.agent/commands/refactor.md +0 -71
  194. package/refs/vbenchmark/.agent/commands/research.md +0 -37
  195. package/refs/vbenchmark/.agent/commands/review.md +0 -38
  196. package/refs/vbenchmark/.agent/commands/test.md +0 -61
  197. package/refs/vbenchmark/.agent/rules/01-code-quality.md +0 -33
  198. package/refs/vbenchmark/.agent/rules/02-typescript-go.md +0 -46
  199. package/refs/vbenchmark/.agent/rules/03-security-git.md +0 -34
  200. package/refs/vbenchmark/.agent/rules/04-architecture.md +0 -40
  201. package/refs/vbenchmark/.agent/sync.js +0 -536
  202. package/refs/vbenchmark/.agent/workflows/commit.md +0 -29
  203. package/refs/vbenchmark/.agent/workflows/debug.md +0 -59
  204. package/refs/vbenchmark/.agent/workflows/document.md +0 -52
  205. package/refs/vbenchmark/.agent/workflows/gather-context.md +0 -58
  206. package/refs/vbenchmark/.agent/workflows/init.md +0 -56
  207. package/refs/vbenchmark/.agent/workflows/preset-help.md +0 -50
  208. package/refs/vbenchmark/.agent/workflows/refactor.md +0 -71
  209. package/refs/vbenchmark/.agent/workflows/research.md +0 -37
  210. package/refs/vbenchmark/.agent/workflows/review.md +0 -38
  211. package/refs/vbenchmark/.agent/workflows/test.md +0 -61
  212. package/refs/vbenchmark/.claude/commands/agentic-dev/apply.md +0 -222
  213. package/refs/vbenchmark/.claude/commands/agentic-dev/done.md +0 -166
  214. package/refs/vbenchmark/.claude/commands/agentic-dev/proposal.md +0 -220
  215. package/refs/vbenchmark/.claude/commands/openspec/apply.md +0 -23
  216. package/refs/vbenchmark/.claude/commands/openspec/archive.md +0 -27
  217. package/refs/vbenchmark/.claude/commands/openspec/proposal.md +0 -28
  218. package/refs/vbenchmark/.clinerules/01-rules.md +0 -73
  219. package/refs/vbenchmark/.clinerules/02-agents.md +0 -34
  220. package/refs/vbenchmark/.cursor/commands/commit.md +0 -29
  221. package/refs/vbenchmark/.cursor/commands/debug.md +0 -59
  222. package/refs/vbenchmark/.cursor/commands/document.md +0 -52
  223. package/refs/vbenchmark/.cursor/commands/gather-context.md +0 -58
  224. package/refs/vbenchmark/.cursor/commands/init.md +0 -56
  225. package/refs/vbenchmark/.cursor/commands/preset-help.md +0 -50
  226. package/refs/vbenchmark/.cursor/commands/refactor.md +0 -71
  227. package/refs/vbenchmark/.cursor/commands/research.md +0 -37
  228. package/refs/vbenchmark/.cursor/commands/review.md +0 -38
  229. package/refs/vbenchmark/.cursor/commands/test.md +0 -61
  230. package/refs/vbenchmark/.cursor/rules/agents.mdc +0 -1357
  231. package/refs/vbenchmark/.factory/droids/codebase-explorer.md +0 -224
  232. package/refs/vbenchmark/.factory/droids/debugger.md +0 -180
  233. package/refs/vbenchmark/.factory/droids/documenter.md +0 -166
  234. package/refs/vbenchmark/.factory/droids/implementer.md +0 -70
  235. package/refs/vbenchmark/.factory/droids/orchestrator.md +0 -212
  236. package/refs/vbenchmark/.factory/droids/researcher.md +0 -80
  237. package/refs/vbenchmark/.factory/droids/reviewer.md +0 -184
  238. package/refs/vbenchmark/.factory/droids/tester.md +0 -170
  239. package/refs/vbenchmark/.gemini/workflows/commit.md +0 -29
  240. package/refs/vbenchmark/.gemini/workflows/debug.md +0 -59
  241. package/refs/vbenchmark/.gemini/workflows/document.md +0 -52
  242. package/refs/vbenchmark/.gemini/workflows/gather-context.md +0 -58
  243. package/refs/vbenchmark/.gemini/workflows/init.md +0 -56
  244. package/refs/vbenchmark/.gemini/workflows/preset-help.md +0 -50
  245. package/refs/vbenchmark/.gemini/workflows/refactor.md +0 -71
  246. package/refs/vbenchmark/.gemini/workflows/research.md +0 -37
  247. package/refs/vbenchmark/.gemini/workflows/review.md +0 -38
  248. package/refs/vbenchmark/.gemini/workflows/test.md +0 -61
  249. package/refs/vbenchmark/.github/CODEOWNERS +0 -20
  250. package/refs/vbenchmark/.github/FUNDING.yml +0 -4
  251. package/refs/vbenchmark/.github/ISSUE_TEMPLATE/bug-report.yml +0 -76
  252. package/refs/vbenchmark/.github/ISSUE_TEMPLATE/new-task.yml +0 -106
  253. package/refs/vbenchmark/.github/PULL_REQUEST_TEMPLATE.md +0 -38
  254. package/refs/vbenchmark/.github/copilot-instructions.md +0 -73
  255. package/refs/vbenchmark/.github/workflows/ci.yaml +0 -33
  256. package/refs/vbenchmark/.github/workflows/vercel-auto-pr.yml +0 -478
  257. package/refs/vbenchmark/.github/workflows/vercel-deploy.yaml +0 -487
  258. package/refs/vbenchmark/.github/workflows/vercel-pr-command.yaml +0 -337
  259. package/refs/vbenchmark/.github/workflows/vercel-project-init.yaml +0 -208
  260. package/refs/vbenchmark/.opencode/agent/codebase-explorer.md +0 -224
  261. package/refs/vbenchmark/.opencode/agent/debugger.md +0 -180
  262. package/refs/vbenchmark/.opencode/agent/documenter.md +0 -166
  263. package/refs/vbenchmark/.opencode/agent/implementer.md +0 -70
  264. package/refs/vbenchmark/.opencode/agent/orchestrator.md +0 -212
  265. package/refs/vbenchmark/.opencode/agent/researcher.md +0 -80
  266. package/refs/vbenchmark/.opencode/agent/reviewer.md +0 -184
  267. package/refs/vbenchmark/.opencode/agent/tester.md +0 -170
  268. package/refs/vbenchmark/.opencode/command/commit.md +0 -29
  269. package/refs/vbenchmark/.opencode/command/debug.md +0 -59
  270. package/refs/vbenchmark/.opencode/command/document.md +0 -52
  271. package/refs/vbenchmark/.opencode/command/gather-context.md +0 -58
  272. package/refs/vbenchmark/.opencode/command/init.md +0 -56
  273. package/refs/vbenchmark/.opencode/command/preset-help.md +0 -50
  274. package/refs/vbenchmark/.opencode/command/refactor.md +0 -71
  275. package/refs/vbenchmark/.opencode/command/research.md +0 -37
  276. package/refs/vbenchmark/.opencode/command/review.md +0 -38
  277. package/refs/vbenchmark/.opencode/command/test.md +0 -61
  278. package/refs/vbenchmark/.trae/project_rules.md +0 -73
  279. package/refs/vbenchmark/.windsurf/rules/rules.md +0 -85
  280. package/refs/vbenchmark/AGENTS.md +0 -73
  281. package/refs/vbenchmark/CONTRIBUTING.md +0 -332
  282. package/refs/vbenchmark/Caddyfile +0 -3
  283. package/refs/vbenchmark/LICENSE +0 -47
  284. package/refs/vbenchmark/README.md +0 -354
  285. package/refs/vbenchmark/docker-compose.prod.yaml +0 -35
  286. package/refs/vbenchmark/docker-compose.yaml +0 -53
  287. package/refs/vbenchmark/docs/TASK_EXPANSION_PLAN.md +0 -211
  288. package/refs/vbenchmark/docs/THESIS.md +0 -441
  289. package/refs/vbenchmark/docs/categories/code-evolution.md +0 -138
  290. package/refs/vbenchmark/openspec/changes/init-vibecodingbench/design.md +0 -111
  291. package/refs/vbenchmark/openspec/changes/init-vibecodingbench/proposal.md +0 -15
  292. package/refs/vbenchmark/openspec/changes/init-vibecodingbench/specs/evaluation/spec.md +0 -105
  293. package/refs/vbenchmark/openspec/changes/init-vibecodingbench/specs/leaderboard/spec.md +0 -68
  294. package/refs/vbenchmark/openspec/changes/init-vibecodingbench/specs/task-definition/spec.md +0 -45
  295. package/refs/vbenchmark/openspec/changes/init-vibecodingbench/specs/task-runner/spec.md +0 -49
  296. package/refs/vbenchmark/openspec/changes/init-vibecodingbench/tasks.md +0 -413
  297. package/refs/vbenchmark/package.json +0 -51
  298. package/refs/vbenchmark/packages/cli/eslint.config.js +0 -16
  299. package/refs/vbenchmark/packages/cli/package.json +0 -35
  300. package/refs/vbenchmark/packages/cli/src/agents/index.ts +0 -655
  301. package/refs/vbenchmark/packages/cli/src/commands/eval.ts +0 -197
  302. package/refs/vbenchmark/packages/cli/src/commands/list.ts +0 -63
  303. package/refs/vbenchmark/packages/cli/src/commands/run.ts +0 -147
  304. package/refs/vbenchmark/packages/cli/src/evaluator.ts +0 -125
  305. package/refs/vbenchmark/packages/cli/src/index.ts +0 -21
  306. package/refs/vbenchmark/packages/cli/src/lib/task-variation.ts +0 -153
  307. package/refs/vbenchmark/packages/cli/src/loader.ts +0 -258
  308. package/refs/vbenchmark/packages/cli/src/reporter.ts +0 -222
  309. package/refs/vbenchmark/packages/cli/src/runtime/docker.ts +0 -385
  310. package/refs/vbenchmark/packages/cli/tsconfig.json +0 -8
  311. package/refs/vbenchmark/packages/dashboard/Dockerfile +0 -42
  312. package/refs/vbenchmark/packages/dashboard/index.html +0 -21
  313. package/refs/vbenchmark/packages/dashboard/package.json +0 -29
  314. package/refs/vbenchmark/packages/dashboard/postcss.config.js +0 -6
  315. package/refs/vbenchmark/packages/dashboard/public/favicon.svg +0 -24
  316. package/refs/vbenchmark/packages/dashboard/public/logo.png +0 -0
  317. package/refs/vbenchmark/packages/dashboard/public/logo.svg +0 -39
  318. package/refs/vbenchmark/packages/dashboard/src/App.tsx +0 -1468
  319. package/refs/vbenchmark/packages/dashboard/src/data/category-performance.json +0 -1
  320. package/refs/vbenchmark/packages/dashboard/src/data/leaderboard.json +0 -1
  321. package/refs/vbenchmark/packages/dashboard/src/data/task-results.json +0 -1
  322. package/refs/vbenchmark/packages/dashboard/src/data/tasks.json +0 -1
  323. package/refs/vbenchmark/packages/dashboard/src/index.css +0 -3
  324. package/refs/vbenchmark/packages/dashboard/src/main.tsx +0 -13
  325. package/refs/vbenchmark/packages/dashboard/src/vite-env.d.ts +0 -9
  326. package/refs/vbenchmark/packages/dashboard/tailwind.config.js +0 -11
  327. package/refs/vbenchmark/packages/dashboard/tsconfig.json +0 -21
  328. package/refs/vbenchmark/packages/dashboard/tsconfig.node.json +0 -11
  329. package/refs/vbenchmark/packages/dashboard/vercel.json +0 -6
  330. package/refs/vbenchmark/packages/dashboard/vite.config.ts +0 -28
  331. package/refs/vbenchmark/packages/evaluator/eslint.config.js +0 -16
  332. package/refs/vbenchmark/packages/evaluator/package.json +0 -24
  333. package/refs/vbenchmark/packages/evaluator/src/index.ts +0 -15
  334. package/refs/vbenchmark/packages/evaluator/src/runners/functional.ts +0 -88
  335. package/refs/vbenchmark/packages/evaluator/src/runners/quality.ts +0 -140
  336. package/refs/vbenchmark/packages/evaluator/src/runners/security.ts +0 -94
  337. package/refs/vbenchmark/packages/evaluator/src/runners/visual.ts +0 -108
  338. package/refs/vbenchmark/packages/evaluator/src/types.d.ts +0 -19
  339. package/refs/vbenchmark/packages/evaluator/tsconfig.json +0 -8
  340. package/refs/vbenchmark/packages/leaderboard/Dockerfile +0 -38
  341. package/refs/vbenchmark/packages/leaderboard/drizzle.config.ts +0 -10
  342. package/refs/vbenchmark/packages/leaderboard/eslint.config.js +0 -16
  343. package/refs/vbenchmark/packages/leaderboard/fly.toml +0 -29
  344. package/refs/vbenchmark/packages/leaderboard/package.json +0 -36
  345. package/refs/vbenchmark/packages/leaderboard/src/app.ts +0 -29
  346. package/refs/vbenchmark/packages/leaderboard/src/components/BrowserPreview.tsx +0 -190
  347. package/refs/vbenchmark/packages/leaderboard/src/components/ComparisonView.tsx +0 -205
  348. package/refs/vbenchmark/packages/leaderboard/src/components/LeaderboardTable.tsx +0 -150
  349. package/refs/vbenchmark/packages/leaderboard/src/components/LiveRunCard.tsx +0 -133
  350. package/refs/vbenchmark/packages/leaderboard/src/components/SubmissionForm.tsx +0 -406
  351. package/refs/vbenchmark/packages/leaderboard/src/components/SubmitForm.tsx +0 -293
  352. package/refs/vbenchmark/packages/leaderboard/src/components/TerminalStream.tsx +0 -111
  353. package/refs/vbenchmark/packages/leaderboard/src/config/pricing.ts +0 -206
  354. package/refs/vbenchmark/packages/leaderboard/src/db/index.ts +0 -31
  355. package/refs/vbenchmark/packages/leaderboard/src/db/schema.ts +0 -125
  356. package/refs/vbenchmark/packages/leaderboard/src/index.ts +0 -13
  357. package/refs/vbenchmark/packages/leaderboard/src/lib/websocket.ts +0 -124
  358. package/refs/vbenchmark/packages/leaderboard/src/routes/leaderboard.ts +0 -698
  359. package/refs/vbenchmark/packages/leaderboard/src/routes/live.ts +0 -175
  360. package/refs/vbenchmark/packages/leaderboard/src/routes/submissions.ts +0 -183
  361. package/refs/vbenchmark/packages/leaderboard/src/routes/tasks.ts +0 -215
  362. package/refs/vbenchmark/packages/leaderboard/tests/api.test.ts +0 -228
  363. package/refs/vbenchmark/packages/leaderboard/tsconfig.json +0 -9
  364. package/refs/vbenchmark/scripts/deploy.sh +0 -70
  365. package/refs/vbenchmark/tasks/ai-integration/advanced/context-management/PROMPT.md +0 -15
  366. package/refs/vbenchmark/tasks/ai-integration/advanced/context-management/task.yaml +0 -16
  367. package/refs/vbenchmark/tasks/ai-integration/advanced/evaluation-framework/PROMPT.md +0 -15
  368. package/refs/vbenchmark/tasks/ai-integration/advanced/evaluation-framework/task.yaml +0 -16
  369. package/refs/vbenchmark/tasks/ai-integration/advanced/guardrails-safety/PROMPT.md +0 -15
  370. package/refs/vbenchmark/tasks/ai-integration/advanced/guardrails-safety/task.yaml +0 -16
  371. package/refs/vbenchmark/tasks/ai-integration/advanced/memory-system/PROMPT.md +0 -15
  372. package/refs/vbenchmark/tasks/ai-integration/advanced/memory-system/task.yaml +0 -16
  373. package/refs/vbenchmark/tasks/ai-integration/advanced/model-routing/PROMPT.md +0 -15
  374. package/refs/vbenchmark/tasks/ai-integration/advanced/model-routing/task.yaml +0 -16
  375. package/refs/vbenchmark/tasks/ai-integration/advanced/multi-agent-system/PROMPT.md +0 -15
  376. package/refs/vbenchmark/tasks/ai-integration/advanced/multi-agent-system/task.yaml +0 -16
  377. package/refs/vbenchmark/tasks/ai-integration/advanced/prompt-optimization/PROMPT.md +0 -15
  378. package/refs/vbenchmark/tasks/ai-integration/advanced/prompt-optimization/task.yaml +0 -16
  379. package/refs/vbenchmark/tasks/ai-integration/advanced/reasoning-chain/PROMPT.md +0 -15
  380. package/refs/vbenchmark/tasks/ai-integration/advanced/reasoning-chain/task.yaml +0 -16
  381. package/refs/vbenchmark/tasks/ai-integration/advanced/streaming-pipeline/PROMPT.md +0 -15
  382. package/refs/vbenchmark/tasks/ai-integration/advanced/streaming-pipeline/task.yaml +0 -16
  383. package/refs/vbenchmark/tasks/ai-integration/advanced/tool-use-orchestration/PROMPT.md +0 -15
  384. package/refs/vbenchmark/tasks/ai-integration/advanced/tool-use-orchestration/task.yaml +0 -16
  385. package/refs/vbenchmark/tasks/ai-integration/agents/code-review-agent/PROMPT.md +0 -64
  386. package/refs/vbenchmark/tasks/ai-integration/agents/code-review-agent/task.yaml +0 -24
  387. package/refs/vbenchmark/tasks/ai-integration/agents/research-agent/PROMPT.md +0 -61
  388. package/refs/vbenchmark/tasks/ai-integration/agents/research-agent/task.yaml +0 -24
  389. package/refs/vbenchmark/tasks/ai-integration/agents/web-scraper-agent/PROMPT.md +0 -57
  390. package/refs/vbenchmark/tasks/ai-integration/agents/web-scraper-agent/task.yaml +0 -24
  391. package/refs/vbenchmark/tasks/ai-integration/embeddings/duplicate-detection/PROMPT.md +0 -50
  392. package/refs/vbenchmark/tasks/ai-integration/embeddings/duplicate-detection/task.yaml +0 -24
  393. package/refs/vbenchmark/tasks/ai-integration/embeddings/recommendation-engine/PROMPT.md +0 -51
  394. package/refs/vbenchmark/tasks/ai-integration/embeddings/recommendation-engine/task.yaml +0 -24
  395. package/refs/vbenchmark/tasks/ai-integration/embeddings/semantic-search/PROMPT.md +0 -50
  396. package/refs/vbenchmark/tasks/ai-integration/embeddings/semantic-search/task.yaml +0 -24
  397. package/refs/vbenchmark/tasks/ai-integration/fine-tuning/classification-model/PROMPT.md +0 -50
  398. package/refs/vbenchmark/tasks/ai-integration/fine-tuning/classification-model/task.yaml +0 -24
  399. package/refs/vbenchmark/tasks/ai-integration/function-calling/api-orchestrator/PROMPT.md +0 -60
  400. package/refs/vbenchmark/tasks/ai-integration/function-calling/api-orchestrator/task.yaml +0 -24
  401. package/refs/vbenchmark/tasks/ai-integration/function-calling/calendar-assistant/PROMPT.md +0 -50
  402. package/refs/vbenchmark/tasks/ai-integration/function-calling/calendar-assistant/task.yaml +0 -24
  403. package/refs/vbenchmark/tasks/ai-integration/function-calling/database-query/PROMPT.md +0 -62
  404. package/refs/vbenchmark/tasks/ai-integration/function-calling/database-query/task.yaml +0 -24
  405. package/refs/vbenchmark/tasks/ai-integration/multimodal/chart-interpreter/PROMPT.md +0 -60
  406. package/refs/vbenchmark/tasks/ai-integration/multimodal/chart-interpreter/task.yaml +0 -24
  407. package/refs/vbenchmark/tasks/ai-integration/multimodal/image-captioning/PROMPT.md +0 -49
  408. package/refs/vbenchmark/tasks/ai-integration/multimodal/image-captioning/task.yaml +0 -24
  409. package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/code-assistant/PROMPT.md +0 -51
  410. package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/code-assistant/task.yaml +0 -24
  411. package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/doc-search/PROMPT.md +0 -51
  412. package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/doc-search/task.yaml +0 -24
  413. package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/pdf-qa/PROMPT.md +0 -76
  414. package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/pdf-qa/docker-compose.yaml +0 -30
  415. package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/pdf-qa/task.yaml +0 -30
  416. package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/pdf-qa/tests/functional/qa.test.py +0 -146
  417. package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/support-bot/PROMPT.md +0 -51
  418. package/refs/vbenchmark/tasks/ai-integration/rag-chatbot/support-bot/task.yaml +0 -24
  419. package/refs/vbenchmark/tasks/ai-integration/structured-output/contract-analyzer/PROMPT.md +0 -67
  420. package/refs/vbenchmark/tasks/ai-integration/structured-output/contract-analyzer/task.yaml +0 -24
  421. package/refs/vbenchmark/tasks/ai-integration/structured-output/invoice-parser/PROMPT.md +0 -61
  422. package/refs/vbenchmark/tasks/ai-integration/structured-output/invoice-parser/task.yaml +0 -27
  423. package/refs/vbenchmark/tasks/ai-integration/structured-output/receipt-scanner/PROMPT.md +0 -65
  424. package/refs/vbenchmark/tasks/ai-integration/structured-output/receipt-scanner/task.yaml +0 -24
  425. package/refs/vbenchmark/tasks/ai-integration/structured-output/resume-parser/PROMPT.md +0 -70
  426. package/refs/vbenchmark/tasks/ai-integration/structured-output/resume-parser/task.yaml +0 -24
  427. package/refs/vbenchmark/tasks/api-integrations/advanced/api-analytics/PROMPT.md +0 -15
  428. package/refs/vbenchmark/tasks/api-integrations/advanced/api-analytics/task.yaml +0 -16
  429. package/refs/vbenchmark/tasks/api-integrations/advanced/api-gateway/PROMPT.md +0 -15
  430. package/refs/vbenchmark/tasks/api-integrations/advanced/api-gateway/task.yaml +0 -16
  431. package/refs/vbenchmark/tasks/api-integrations/advanced/api-mocking/PROMPT.md +0 -15
  432. package/refs/vbenchmark/tasks/api-integrations/advanced/api-mocking/task.yaml +0 -16
  433. package/refs/vbenchmark/tasks/api-integrations/advanced/contract-testing/PROMPT.md +0 -15
  434. package/refs/vbenchmark/tasks/api-integrations/advanced/contract-testing/task.yaml +0 -16
  435. package/refs/vbenchmark/tasks/api-integrations/advanced/graphql-federation/PROMPT.md +0 -15
  436. package/refs/vbenchmark/tasks/api-integrations/advanced/graphql-federation/task.yaml +0 -16
  437. package/refs/vbenchmark/tasks/api-integrations/advanced/grpc-gateway/PROMPT.md +0 -15
  438. package/refs/vbenchmark/tasks/api-integrations/advanced/grpc-gateway/task.yaml +0 -16
  439. package/refs/vbenchmark/tasks/api-integrations/advanced/rate-limiter/PROMPT.md +0 -15
  440. package/refs/vbenchmark/tasks/api-integrations/advanced/rate-limiter/task.yaml +0 -16
  441. package/refs/vbenchmark/tasks/api-integrations/advanced/request-validator/PROMPT.md +0 -15
  442. package/refs/vbenchmark/tasks/api-integrations/advanced/request-validator/task.yaml +0 -16
  443. package/refs/vbenchmark/tasks/api-integrations/advanced/sdk-generator/PROMPT.md +0 -15
  444. package/refs/vbenchmark/tasks/api-integrations/advanced/sdk-generator/task.yaml +0 -16
  445. package/refs/vbenchmark/tasks/api-integrations/advanced/webhook-processor/PROMPT.md +0 -15
  446. package/refs/vbenchmark/tasks/api-integrations/advanced/webhook-processor/task.yaml +0 -16
  447. package/refs/vbenchmark/tasks/api-integrations/analytics/mixpanel-events/PROMPT.md +0 -42
  448. package/refs/vbenchmark/tasks/api-integrations/analytics/mixpanel-events/task.yaml +0 -24
  449. package/refs/vbenchmark/tasks/api-integrations/analytics/segment-tracking/PROMPT.md +0 -42
  450. package/refs/vbenchmark/tasks/api-integrations/analytics/segment-tracking/task.yaml +0 -24
  451. package/refs/vbenchmark/tasks/api-integrations/auth-provider/oauth2-github/PROMPT.md +0 -42
  452. package/refs/vbenchmark/tasks/api-integrations/auth-provider/oauth2-github/task.yaml +0 -24
  453. package/refs/vbenchmark/tasks/api-integrations/auth-provider/okta-integration/PROMPT.md +0 -44
  454. package/refs/vbenchmark/tasks/api-integrations/auth-provider/okta-integration/task.yaml +0 -24
  455. package/refs/vbenchmark/tasks/api-integrations/auth-provider/saml-sso/PROMPT.md +0 -42
  456. package/refs/vbenchmark/tasks/api-integrations/auth-provider/saml-sso/task.yaml +0 -24
  457. package/refs/vbenchmark/tasks/api-integrations/communication/discord-webhook/PROMPT.md +0 -44
  458. package/refs/vbenchmark/tasks/api-integrations/communication/discord-webhook/task.yaml +0 -24
  459. package/refs/vbenchmark/tasks/api-integrations/communication/slack-bot/PROMPT.md +0 -42
  460. package/refs/vbenchmark/tasks/api-integrations/communication/slack-bot/task.yaml +0 -24
  461. package/refs/vbenchmark/tasks/api-integrations/communication/twilio-sms/PROMPT.md +0 -42
  462. package/refs/vbenchmark/tasks/api-integrations/communication/twilio-sms/task.yaml +0 -24
  463. package/refs/vbenchmark/tasks/api-integrations/email/transactional/PROMPT.md +0 -82
  464. package/refs/vbenchmark/tasks/api-integrations/email/transactional/task.yaml +0 -27
  465. package/refs/vbenchmark/tasks/api-integrations/maps/google-maps-geocoding/PROMPT.md +0 -41
  466. package/refs/vbenchmark/tasks/api-integrations/maps/google-maps-geocoding/task.yaml +0 -24
  467. package/refs/vbenchmark/tasks/api-integrations/maps/mapbox-directions/PROMPT.md +0 -41
  468. package/refs/vbenchmark/tasks/api-integrations/maps/mapbox-directions/task.yaml +0 -24
  469. package/refs/vbenchmark/tasks/api-integrations/payment/crypto-payments/PROMPT.md +0 -43
  470. package/refs/vbenchmark/tasks/api-integrations/payment/crypto-payments/task.yaml +0 -24
  471. package/refs/vbenchmark/tasks/api-integrations/payment/paypal-integration/PROMPT.md +0 -41
  472. package/refs/vbenchmark/tasks/api-integrations/payment/paypal-integration/task.yaml +0 -24
  473. package/refs/vbenchmark/tasks/api-integrations/social/twitter-api/PROMPT.md +0 -41
  474. package/refs/vbenchmark/tasks/api-integrations/social/twitter-api/task.yaml +0 -24
  475. package/refs/vbenchmark/tasks/api-integrations/storage/cloudinary-upload/PROMPT.md +0 -43
  476. package/refs/vbenchmark/tasks/api-integrations/storage/cloudinary-upload/task.yaml +0 -24
  477. package/refs/vbenchmark/tasks/api-integrations/storage/gcs-streaming/PROMPT.md +0 -43
  478. package/refs/vbenchmark/tasks/api-integrations/storage/gcs-streaming/task.yaml +0 -24
  479. package/refs/vbenchmark/tasks/api-integrations/storage/s3-presigned-urls/PROMPT.md +0 -41
  480. package/refs/vbenchmark/tasks/api-integrations/storage/s3-presigned-urls/task.yaml +0 -24
  481. package/refs/vbenchmark/tasks/api-integrations/stripe/checkout-session/PROMPT.md +0 -41
  482. package/refs/vbenchmark/tasks/api-integrations/stripe/checkout-session/task.yaml +0 -24
  483. package/refs/vbenchmark/tasks/api-integrations/stripe/payment-webhook/PROMPT.md +0 -60
  484. package/refs/vbenchmark/tasks/api-integrations/stripe/payment-webhook/docker-compose.yaml +0 -38
  485. package/refs/vbenchmark/tasks/api-integrations/stripe/payment-webhook/task.yaml +0 -31
  486. package/refs/vbenchmark/tasks/api-integrations/stripe/payment-webhook/tests/webhook.test.ts +0 -193
  487. package/refs/vbenchmark/tasks/api-integrations/stripe/subscription-portal/PROMPT.md +0 -41
  488. package/refs/vbenchmark/tasks/api-integrations/stripe/subscription-portal/task.yaml +0 -24
  489. package/refs/vbenchmark/tasks/code-evolution/advanced/api-deprecation/PROMPT.md +0 -15
  490. package/refs/vbenchmark/tasks/code-evolution/advanced/api-deprecation/task.yaml +0 -16
  491. package/refs/vbenchmark/tasks/code-evolution/advanced/ast-refactoring/PROMPT.md +0 -15
  492. package/refs/vbenchmark/tasks/code-evolution/advanced/ast-refactoring/task.yaml +0 -16
  493. package/refs/vbenchmark/tasks/code-evolution/advanced/concurrency-fix/PROMPT.md +0 -15
  494. package/refs/vbenchmark/tasks/code-evolution/advanced/concurrency-fix/task.yaml +0 -16
  495. package/refs/vbenchmark/tasks/code-evolution/advanced/database-schema-migration/PROMPT.md +0 -15
  496. package/refs/vbenchmark/tasks/code-evolution/advanced/database-schema-migration/task.yaml +0 -16
  497. package/refs/vbenchmark/tasks/code-evolution/advanced/dead-code-elimination/PROMPT.md +0 -15
  498. package/refs/vbenchmark/tasks/code-evolution/advanced/dead-code-elimination/task.yaml +0 -16
  499. package/refs/vbenchmark/tasks/code-evolution/advanced/dependency-upgrade/PROMPT.md +0 -15
  500. package/refs/vbenchmark/tasks/code-evolution/advanced/dependency-upgrade/task.yaml +0 -16
  501. package/refs/vbenchmark/tasks/code-evolution/advanced/memory-optimization/PROMPT.md +0 -15
  502. package/refs/vbenchmark/tasks/code-evolution/advanced/memory-optimization/task.yaml +0 -16
  503. package/refs/vbenchmark/tasks/code-evolution/advanced/monorepo-extraction/PROMPT.md +0 -15
  504. package/refs/vbenchmark/tasks/code-evolution/advanced/monorepo-extraction/task.yaml +0 -16
  505. package/refs/vbenchmark/tasks/code-evolution/advanced/performance-profiling/PROMPT.md +0 -15
  506. package/refs/vbenchmark/tasks/code-evolution/advanced/performance-profiling/task.yaml +0 -16
  507. package/refs/vbenchmark/tasks/code-evolution/advanced/type-migration/PROMPT.md +0 -15
  508. package/refs/vbenchmark/tasks/code-evolution/advanced/type-migration/task.yaml +0 -16
  509. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/callback-to-async/PROMPT.md +0 -47
  510. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/callback-to-async/task.yaml +0 -24
  511. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/express-to-fastify/PROMPT.md +0 -49
  512. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/express-to-fastify/base-code/src/app.ts +0 -22
  513. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/express-to-fastify/task.yaml +0 -37
  514. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/express-to-fastify/tests/api.test.ts +0 -70
  515. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/flask-to-fastapi/PROMPT.md +0 -46
  516. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/flask-to-fastapi/task.yaml +0 -24
  517. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/java-to-kotlin/PROMPT.md +0 -45
  518. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/java-to-kotlin/task.yaml +0 -24
  519. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/jquery-to-react/PROMPT.md +0 -47
  520. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/jquery-to-react/task.yaml +0 -24
  521. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/rest-to-grpc/PROMPT.md +0 -47
  522. package/refs/vbenchmark/tasks/code-evolution/legacy-migration/rest-to-grpc/task.yaml +0 -24
  523. package/refs/vbenchmark/tasks/code-evolution/performance/async-refactor/PROMPT.md +0 -47
  524. package/refs/vbenchmark/tasks/code-evolution/performance/async-refactor/task.yaml +0 -24
  525. package/refs/vbenchmark/tasks/code-evolution/performance/memory-leak-fix/PROMPT.md +0 -47
  526. package/refs/vbenchmark/tasks/code-evolution/performance/memory-leak-fix/task.yaml +0 -24
  527. package/refs/vbenchmark/tasks/code-evolution/performance/query-optimization/PROMPT.md +0 -49
  528. package/refs/vbenchmark/tasks/code-evolution/performance/query-optimization/task.yaml +0 -24
  529. package/refs/vbenchmark/tasks/code-evolution/refactoring/class-to-hooks/PROMPT.md +0 -96
  530. package/refs/vbenchmark/tasks/code-evolution/refactoring/class-to-hooks/task.yaml +0 -27
  531. package/refs/vbenchmark/tasks/code-evolution/refactoring/dependency-injection/PROMPT.md +0 -47
  532. package/refs/vbenchmark/tasks/code-evolution/refactoring/dependency-injection/task.yaml +0 -24
  533. package/refs/vbenchmark/tasks/code-evolution/refactoring/error-handling/PROMPT.md +0 -48
  534. package/refs/vbenchmark/tasks/code-evolution/refactoring/error-handling/task.yaml +0 -24
  535. package/refs/vbenchmark/tasks/code-evolution/refactoring/monolith-to-modules/PROMPT.md +0 -50
  536. package/refs/vbenchmark/tasks/code-evolution/refactoring/monolith-to-modules/task.yaml +0 -24
  537. package/refs/vbenchmark/tasks/code-evolution/refactoring/orm-migration/PROMPT.md +0 -47
  538. package/refs/vbenchmark/tasks/code-evolution/refactoring/orm-migration/task.yaml +0 -24
  539. package/refs/vbenchmark/tasks/code-evolution/security/secrets-rotation/PROMPT.md +0 -49
  540. package/refs/vbenchmark/tasks/code-evolution/security/secrets-rotation/task.yaml +0 -24
  541. package/refs/vbenchmark/tasks/code-evolution/security/sql-injection-fix/PROMPT.md +0 -50
  542. package/refs/vbenchmark/tasks/code-evolution/security/sql-injection-fix/task.yaml +0 -24
  543. package/refs/vbenchmark/tasks/code-evolution/security/xss-prevention/PROMPT.md +0 -47
  544. package/refs/vbenchmark/tasks/code-evolution/security/xss-prevention/task.yaml +0 -24
  545. package/refs/vbenchmark/tasks/code-evolution/testing/add-unit-tests/PROMPT.md +0 -48
  546. package/refs/vbenchmark/tasks/code-evolution/testing/add-unit-tests/task.yaml +0 -24
  547. package/refs/vbenchmark/tasks/code-evolution/testing/e2e-playwright/PROMPT.md +0 -50
  548. package/refs/vbenchmark/tasks/code-evolution/testing/e2e-playwright/task.yaml +0 -24
  549. package/refs/vbenchmark/tasks/code-evolution/testing/pytest-fixtures/PROMPT.md +0 -47
  550. package/refs/vbenchmark/tasks/code-evolution/testing/pytest-fixtures/task.yaml +0 -24
  551. package/refs/vbenchmark/tasks/frontend/accessibility/keyboard-shortcuts/PROMPT.md +0 -44
  552. package/refs/vbenchmark/tasks/frontend/accessibility/keyboard-shortcuts/task.yaml +0 -24
  553. package/refs/vbenchmark/tasks/frontend/accessibility/screen-reader-nav/PROMPT.md +0 -44
  554. package/refs/vbenchmark/tasks/frontend/accessibility/screen-reader-nav/task.yaml +0 -24
  555. package/refs/vbenchmark/tasks/frontend/advanced/canvas-editor/PROMPT.md +0 -15
  556. package/refs/vbenchmark/tasks/frontend/advanced/canvas-editor/task.yaml +0 -16
  557. package/refs/vbenchmark/tasks/frontend/advanced/micro-frontend/PROMPT.md +0 -15
  558. package/refs/vbenchmark/tasks/frontend/advanced/micro-frontend/task.yaml +0 -16
  559. package/refs/vbenchmark/tasks/frontend/advanced/offline-first/PROMPT.md +0 -15
  560. package/refs/vbenchmark/tasks/frontend/advanced/offline-first/task.yaml +0 -16
  561. package/refs/vbenchmark/tasks/frontend/advanced/realtime-collab/PROMPT.md +0 -15
  562. package/refs/vbenchmark/tasks/frontend/advanced/realtime-collab/task.yaml +0 -16
  563. package/refs/vbenchmark/tasks/frontend/advanced/service-worker/PROMPT.md +0 -15
  564. package/refs/vbenchmark/tasks/frontend/advanced/service-worker/task.yaml +0 -16
  565. package/refs/vbenchmark/tasks/frontend/advanced/state-machine/PROMPT.md +0 -15
  566. package/refs/vbenchmark/tasks/frontend/advanced/state-machine/task.yaml +0 -16
  567. package/refs/vbenchmark/tasks/frontend/advanced/virtual-list/PROMPT.md +0 -15
  568. package/refs/vbenchmark/tasks/frontend/advanced/virtual-list/task.yaml +0 -16
  569. package/refs/vbenchmark/tasks/frontend/advanced/wasm-integration/PROMPT.md +0 -15
  570. package/refs/vbenchmark/tasks/frontend/advanced/wasm-integration/task.yaml +0 -16
  571. package/refs/vbenchmark/tasks/frontend/advanced/web-worker/PROMPT.md +0 -15
  572. package/refs/vbenchmark/tasks/frontend/advanced/web-worker/task.yaml +0 -16
  573. package/refs/vbenchmark/tasks/frontend/advanced/webgl-visualization/PROMPT.md +0 -15
  574. package/refs/vbenchmark/tasks/frontend/advanced/webgl-visualization/task.yaml +0 -16
  575. package/refs/vbenchmark/tasks/frontend/animation/page-transitions/PROMPT.md +0 -44
  576. package/refs/vbenchmark/tasks/frontend/animation/page-transitions/task.yaml +0 -24
  577. package/refs/vbenchmark/tasks/frontend/components/data-grid/PROMPT.md +0 -59
  578. package/refs/vbenchmark/tasks/frontend/components/data-grid/task.yaml +0 -24
  579. package/refs/vbenchmark/tasks/frontend/components/date-range-picker/PROMPT.md +0 -57
  580. package/refs/vbenchmark/tasks/frontend/components/date-range-picker/task.yaml +0 -24
  581. package/refs/vbenchmark/tasks/frontend/components/file-uploader/PROMPT.md +0 -55
  582. package/refs/vbenchmark/tasks/frontend/components/file-uploader/task.yaml +0 -24
  583. package/refs/vbenchmark/tasks/frontend/components/form-builder/PROMPT.md +0 -96
  584. package/refs/vbenchmark/tasks/frontend/components/form-builder/task.yaml +0 -28
  585. package/refs/vbenchmark/tasks/frontend/components/rich-text-editor/PROMPT.md +0 -45
  586. package/refs/vbenchmark/tasks/frontend/components/rich-text-editor/task.yaml +0 -24
  587. package/refs/vbenchmark/tasks/frontend/figma-to-code/dashboard-layout/PROMPT.md +0 -50
  588. package/refs/vbenchmark/tasks/frontend/figma-to-code/dashboard-layout/task.yaml +0 -25
  589. package/refs/vbenchmark/tasks/frontend/figma-to-code/landing-page/PROMPT.md +0 -49
  590. package/refs/vbenchmark/tasks/frontend/figma-to-code/landing-page/task.yaml +0 -25
  591. package/refs/vbenchmark/tasks/frontend/figma-to-code/mobile-app-screen/PROMPT.md +0 -51
  592. package/refs/vbenchmark/tasks/frontend/figma-to-code/mobile-app-screen/task.yaml +0 -24
  593. package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/PROMPT.md +0 -93
  594. package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/docker-compose.yaml +0 -23
  595. package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/task.yaml +0 -30
  596. package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/tests/visual/diff.test.ts +0 -107
  597. package/refs/vbenchmark/tasks/frontend/figma-to-code/pricing-card/tests/visual/interaction.test.ts +0 -88
  598. package/refs/vbenchmark/tasks/frontend/performance/image-lazy-load/PROMPT.md +0 -43
  599. package/refs/vbenchmark/tasks/frontend/performance/image-lazy-load/task.yaml +0 -24
  600. package/refs/vbenchmark/tasks/frontend/performance/infinite-scroll/PROMPT.md +0 -44
  601. package/refs/vbenchmark/tasks/frontend/performance/infinite-scroll/task.yaml +0 -24
  602. package/refs/vbenchmark/tasks/frontend/state-management/collaborative-editor/PROMPT.md +0 -44
  603. package/refs/vbenchmark/tasks/frontend/state-management/collaborative-editor/task.yaml +0 -24
  604. package/refs/vbenchmark/tasks/frontend/state-management/shopping-cart/PROMPT.md +0 -53
  605. package/refs/vbenchmark/tasks/frontend/state-management/shopping-cart/task.yaml +0 -24
  606. package/refs/vbenchmark/tasks/frontend/visualization/chart-dashboard/PROMPT.md +0 -83
  607. package/refs/vbenchmark/tasks/frontend/visualization/chart-dashboard/task.yaml +0 -28
  608. package/refs/vbenchmark/tasks/frontend/visualization/gantt-chart/PROMPT.md +0 -57
  609. package/refs/vbenchmark/tasks/frontend/visualization/gantt-chart/task.yaml +0 -24
  610. package/refs/vbenchmark/tasks/frontend/visualization/map-dashboard/PROMPT.md +0 -44
  611. package/refs/vbenchmark/tasks/frontend/visualization/map-dashboard/task.yaml +0 -24
  612. package/refs/vbenchmark/tasks/frontend/visualization/realtime-charts/PROMPT.md +0 -43
  613. package/refs/vbenchmark/tasks/frontend/visualization/realtime-charts/task.yaml +0 -24
  614. package/refs/vbenchmark/tasks/glue-code/advanced/blue-green-deploy/PROMPT.md +0 -15
  615. package/refs/vbenchmark/tasks/glue-code/advanced/blue-green-deploy/task.yaml +0 -16
  616. package/refs/vbenchmark/tasks/glue-code/advanced/canary-release/PROMPT.md +0 -15
  617. package/refs/vbenchmark/tasks/glue-code/advanced/canary-release/task.yaml +0 -16
  618. package/refs/vbenchmark/tasks/glue-code/advanced/change-data-capture/PROMPT.md +0 -15
  619. package/refs/vbenchmark/tasks/glue-code/advanced/change-data-capture/task.yaml +0 -16
  620. package/refs/vbenchmark/tasks/glue-code/advanced/config-management/PROMPT.md +0 -15
  621. package/refs/vbenchmark/tasks/glue-code/advanced/config-management/task.yaml +0 -16
  622. package/refs/vbenchmark/tasks/glue-code/advanced/data-pipeline/PROMPT.md +0 -15
  623. package/refs/vbenchmark/tasks/glue-code/advanced/data-pipeline/task.yaml +0 -16
  624. package/refs/vbenchmark/tasks/glue-code/advanced/distributed-tracing/PROMPT.md +0 -15
  625. package/refs/vbenchmark/tasks/glue-code/advanced/distributed-tracing/task.yaml +0 -16
  626. package/refs/vbenchmark/tasks/glue-code/advanced/log-aggregation/PROMPT.md +0 -15
  627. package/refs/vbenchmark/tasks/glue-code/advanced/log-aggregation/task.yaml +0 -16
  628. package/refs/vbenchmark/tasks/glue-code/advanced/schema-registry/PROMPT.md +0 -15
  629. package/refs/vbenchmark/tasks/glue-code/advanced/schema-registry/task.yaml +0 -16
  630. package/refs/vbenchmark/tasks/glue-code/advanced/secret-rotation/PROMPT.md +0 -15
  631. package/refs/vbenchmark/tasks/glue-code/advanced/secret-rotation/task.yaml +0 -16
  632. package/refs/vbenchmark/tasks/glue-code/advanced/stream-processing/PROMPT.md +0 -15
  633. package/refs/vbenchmark/tasks/glue-code/advanced/stream-processing/task.yaml +0 -16
  634. package/refs/vbenchmark/tasks/glue-code/api-sync/rest-to-graphql/PROMPT.md +0 -66
  635. package/refs/vbenchmark/tasks/glue-code/api-sync/rest-to-graphql/task.yaml +0 -27
  636. package/refs/vbenchmark/tasks/glue-code/caching/redis-cache/PROMPT.md +0 -82
  637. package/refs/vbenchmark/tasks/glue-code/caching/redis-cache/task.yaml +0 -27
  638. package/refs/vbenchmark/tasks/glue-code/data-transform/avro-schema-evolution/PROMPT.md +0 -51
  639. package/refs/vbenchmark/tasks/glue-code/data-transform/avro-schema-evolution/task.yaml +0 -24
  640. package/refs/vbenchmark/tasks/glue-code/data-transform/csv-normalizer/PROMPT.md +0 -49
  641. package/refs/vbenchmark/tasks/glue-code/data-transform/csv-normalizer/task.yaml +0 -24
  642. package/refs/vbenchmark/tasks/glue-code/data-transform/excel-to-json/PROMPT.md +0 -67
  643. package/refs/vbenchmark/tasks/glue-code/data-transform/excel-to-json/task.yaml +0 -28
  644. package/refs/vbenchmark/tasks/glue-code/data-transform/excel-to-json/tests/transform.test.py +0 -137
  645. package/refs/vbenchmark/tasks/glue-code/data-transform/json-to-xml/PROMPT.md +0 -45
  646. package/refs/vbenchmark/tasks/glue-code/data-transform/json-to-xml/task.yaml +0 -24
  647. package/refs/vbenchmark/tasks/glue-code/data-transform/protobuf-converter/PROMPT.md +0 -44
  648. package/refs/vbenchmark/tasks/glue-code/data-transform/protobuf-converter/task.yaml +0 -24
  649. package/refs/vbenchmark/tasks/glue-code/etl/cdc-pipeline/PROMPT.md +0 -52
  650. package/refs/vbenchmark/tasks/glue-code/etl/cdc-pipeline/task.yaml +0 -27
  651. package/refs/vbenchmark/tasks/glue-code/etl/database-sync/PROMPT.md +0 -51
  652. package/refs/vbenchmark/tasks/glue-code/etl/database-sync/task.yaml +0 -24
  653. package/refs/vbenchmark/tasks/glue-code/etl/s3-to-warehouse/PROMPT.md +0 -50
  654. package/refs/vbenchmark/tasks/glue-code/etl/s3-to-warehouse/task.yaml +0 -24
  655. package/refs/vbenchmark/tasks/glue-code/file-processing/image-resizer/PROMPT.md +0 -52
  656. package/refs/vbenchmark/tasks/glue-code/file-processing/image-resizer/task.yaml +0 -24
  657. package/refs/vbenchmark/tasks/glue-code/file-processing/pdf-merger/PROMPT.md +0 -50
  658. package/refs/vbenchmark/tasks/glue-code/file-processing/pdf-merger/task.yaml +0 -24
  659. package/refs/vbenchmark/tasks/glue-code/file-processing/video-transcoder/PROMPT.md +0 -50
  660. package/refs/vbenchmark/tasks/glue-code/file-processing/video-transcoder/task.yaml +0 -27
  661. package/refs/vbenchmark/tasks/glue-code/migration/data-backfill/PROMPT.md +0 -50
  662. package/refs/vbenchmark/tasks/glue-code/migration/data-backfill/task.yaml +0 -24
  663. package/refs/vbenchmark/tasks/glue-code/migration/database-versioning/PROMPT.md +0 -50
  664. package/refs/vbenchmark/tasks/glue-code/migration/database-versioning/task.yaml +0 -24
  665. package/refs/vbenchmark/tasks/glue-code/queue/kafka-producer/PROMPT.md +0 -49
  666. package/refs/vbenchmark/tasks/glue-code/queue/kafka-producer/task.yaml +0 -27
  667. package/refs/vbenchmark/tasks/glue-code/queue/rabbitmq-consumer/PROMPT.md +0 -50
  668. package/refs/vbenchmark/tasks/glue-code/queue/rabbitmq-consumer/task.yaml +0 -27
  669. package/refs/vbenchmark/tasks/glue-code/queue/sqs-batch-processor/PROMPT.md +0 -47
  670. package/refs/vbenchmark/tasks/glue-code/queue/sqs-batch-processor/task.yaml +0 -24
  671. package/refs/vbenchmark/tasks/glue-code/scheduler/cron-job-manager/PROMPT.md +0 -52
  672. package/refs/vbenchmark/tasks/glue-code/scheduler/cron-job-manager/task.yaml +0 -27
  673. package/refs/vbenchmark/tasks/glue-code/scheduler/delayed-tasks/PROMPT.md +0 -51
  674. package/refs/vbenchmark/tasks/glue-code/scheduler/delayed-tasks/task.yaml +0 -27
  675. package/refs/vbenchmark/tasks/saas-core/advanced/api-versioning/PROMPT.md +0 -15
  676. package/refs/vbenchmark/tasks/saas-core/advanced/api-versioning/task.yaml +0 -16
  677. package/refs/vbenchmark/tasks/saas-core/advanced/circuit-breaker/PROMPT.md +0 -13
  678. package/refs/vbenchmark/tasks/saas-core/advanced/circuit-breaker/task.yaml +0 -16
  679. package/refs/vbenchmark/tasks/saas-core/advanced/compliance-gdpr/PROMPT.md +0 -15
  680. package/refs/vbenchmark/tasks/saas-core/advanced/compliance-gdpr/task.yaml +0 -16
  681. package/refs/vbenchmark/tasks/saas-core/advanced/cqrs-pattern/PROMPT.md +0 -13
  682. package/refs/vbenchmark/tasks/saas-core/advanced/cqrs-pattern/task.yaml +0 -16
  683. package/refs/vbenchmark/tasks/saas-core/advanced/data-encryption/PROMPT.md +0 -15
  684. package/refs/vbenchmark/tasks/saas-core/advanced/data-encryption/task.yaml +0 -16
  685. package/refs/vbenchmark/tasks/saas-core/advanced/distributed-locking/PROMPT.md +0 -46
  686. package/refs/vbenchmark/tasks/saas-core/advanced/distributed-locking/task.yaml +0 -24
  687. package/refs/vbenchmark/tasks/saas-core/advanced/event-sourcing/PROMPT.md +0 -23
  688. package/refs/vbenchmark/tasks/saas-core/advanced/event-sourcing/task.yaml +0 -16
  689. package/refs/vbenchmark/tasks/saas-core/advanced/feature-flags-ab/PROMPT.md +0 -15
  690. package/refs/vbenchmark/tasks/saas-core/advanced/feature-flags-ab/task.yaml +0 -16
  691. package/refs/vbenchmark/tasks/saas-core/advanced/saga-orchestration/PROMPT.md +0 -13
  692. package/refs/vbenchmark/tasks/saas-core/advanced/saga-orchestration/task.yaml +0 -16
  693. package/refs/vbenchmark/tasks/saas-core/advanced/webhook-delivery/PROMPT.md +0 -15
  694. package/refs/vbenchmark/tasks/saas-core/advanced/webhook-delivery/task.yaml +0 -16
  695. package/refs/vbenchmark/tasks/saas-core/audit/activity-logging/PROMPT.md +0 -50
  696. package/refs/vbenchmark/tasks/saas-core/audit/activity-logging/task.yaml +0 -27
  697. package/refs/vbenchmark/tasks/saas-core/auth/jwt-refresh-tokens/PROMPT.md +0 -50
  698. package/refs/vbenchmark/tasks/saas-core/auth/jwt-refresh-tokens/task.yaml +0 -27
  699. package/refs/vbenchmark/tasks/saas-core/auth/magic-link-email/PROMPT.md +0 -53
  700. package/refs/vbenchmark/tasks/saas-core/auth/magic-link-email/task.yaml +0 -27
  701. package/refs/vbenchmark/tasks/saas-core/auth/mfa-totp/PROMPT.md +0 -79
  702. package/refs/vbenchmark/tasks/saas-core/auth/mfa-totp/task.yaml +0 -27
  703. package/refs/vbenchmark/tasks/saas-core/auth/rbac-permissions/PROMPT.md +0 -51
  704. package/refs/vbenchmark/tasks/saas-core/auth/rbac-permissions/task.yaml +0 -27
  705. package/refs/vbenchmark/tasks/saas-core/auth/session-management/PROMPT.md +0 -52
  706. package/refs/vbenchmark/tasks/saas-core/auth/session-management/task.yaml +0 -27
  707. package/refs/vbenchmark/tasks/saas-core/auth/supabase-oauth/PROMPT.md +0 -45
  708. package/refs/vbenchmark/tasks/saas-core/auth/supabase-oauth/docker-compose.yaml +0 -47
  709. package/refs/vbenchmark/tasks/saas-core/auth/supabase-oauth/task.yaml +0 -32
  710. package/refs/vbenchmark/tasks/saas-core/auth/supabase-oauth/tests/auth.test.ts +0 -59
  711. package/refs/vbenchmark/tasks/saas-core/billing/invoice-generation/PROMPT.md +0 -53
  712. package/refs/vbenchmark/tasks/saas-core/billing/invoice-generation/task.yaml +0 -27
  713. package/refs/vbenchmark/tasks/saas-core/billing/stripe-subscriptions/PROMPT.md +0 -51
  714. package/refs/vbenchmark/tasks/saas-core/billing/stripe-subscriptions/task.yaml +0 -27
  715. package/refs/vbenchmark/tasks/saas-core/billing/usage-metering/PROMPT.md +0 -52
  716. package/refs/vbenchmark/tasks/saas-core/billing/usage-metering/task.yaml +0 -27
  717. package/refs/vbenchmark/tasks/saas-core/crud/dashboard-table/PROMPT.md +0 -48
  718. package/refs/vbenchmark/tasks/saas-core/crud/dashboard-table/task.yaml +0 -28
  719. package/refs/vbenchmark/tasks/saas-core/multi-tenant/org-isolation/PROMPT.md +0 -50
  720. package/refs/vbenchmark/tasks/saas-core/multi-tenant/org-isolation/task.yaml +0 -27
  721. package/refs/vbenchmark/tasks/saas-core/multi-tenant/subdomain-routing/PROMPT.md +0 -50
  722. package/refs/vbenchmark/tasks/saas-core/multi-tenant/subdomain-routing/task.yaml +0 -27
  723. package/refs/vbenchmark/tasks/saas-core/notifications/email-queue/PROMPT.md +0 -53
  724. package/refs/vbenchmark/tasks/saas-core/notifications/email-queue/task.yaml +0 -27
  725. package/refs/vbenchmark/tasks/saas-core/notifications/in-app-alerts/PROMPT.md +0 -51
  726. package/refs/vbenchmark/tasks/saas-core/notifications/in-app-alerts/task.yaml +0 -27
  727. package/refs/vbenchmark/tasks/saas-core/notifications/push-notifications/PROMPT.md +0 -51
  728. package/refs/vbenchmark/tasks/saas-core/notifications/push-notifications/task.yaml +0 -27
  729. package/refs/vbenchmark/tasks/saas-core/realtime/websocket-chat/PROMPT.md +0 -80
  730. package/refs/vbenchmark/tasks/saas-core/realtime/websocket-chat/task.yaml +0 -27
  731. package/refs/vbenchmark/tasks/saas-core/search/full-text-search/PROMPT.md +0 -51
  732. package/refs/vbenchmark/tasks/saas-core/search/full-text-search/task.yaml +0 -27
  733. package/refs/vbenchmark/tasks/saas-core/security/rate-limiter/PROMPT.md +0 -99
  734. package/refs/vbenchmark/tasks/saas-core/security/rate-limiter/task.yaml +0 -27
  735. package/refs/vbenchmark/tasks/saas-core/settings/user-preferences/PROMPT.md +0 -78
  736. package/refs/vbenchmark/tasks/saas-core/settings/user-preferences/task.yaml +0 -27
  737. package/refs/vbenchmark/templates/fastapi-postgres/docker-compose.yaml +0 -36
  738. package/refs/vbenchmark/templates/fastapi-postgres/pyproject.toml +0 -34
  739. package/refs/vbenchmark/templates/fastapi-postgres/src/__init__.py +0 -0
  740. package/refs/vbenchmark/templates/fastapi-postgres/src/config.py +0 -12
  741. package/refs/vbenchmark/templates/fastapi-postgres/src/database.py +0 -15
  742. package/refs/vbenchmark/templates/fastapi-postgres/src/main.py +0 -51
  743. package/refs/vbenchmark/templates/fastapi-postgres/src/models.py +0 -12
  744. package/refs/vbenchmark/templates/fastapi-postgres/src/schemas.py +0 -20
  745. package/refs/vbenchmark/templates/go-fiber/docker-compose.yaml +0 -34
  746. package/refs/vbenchmark/templates/go-fiber/go.mod +0 -33
  747. package/refs/vbenchmark/templates/go-fiber/go.sum +0 -68
  748. package/refs/vbenchmark/templates/go-fiber/main.go +0 -98
  749. package/refs/vbenchmark/templates/nextjs-supabase/.env.example +0 -3
  750. package/refs/vbenchmark/templates/nextjs-supabase/docker-compose.yaml +0 -68
  751. package/refs/vbenchmark/templates/nextjs-supabase/src/app/globals.css +0 -13
  752. package/refs/vbenchmark/templates/nextjs-supabase/src/app/layout.tsx +0 -19
  753. package/refs/vbenchmark/templates/nextjs-supabase/src/app/page.tsx +0 -38
  754. package/refs/vbenchmark/templates/nextjs-supabase/src/lib/supabase/client.ts +0 -8
  755. package/refs/vbenchmark/templates/nextjs-supabase/src/lib/supabase/server.ts +0 -32
  756. package/refs/vbenchmark/templates/rust-axum/Cargo.lock +0 -2371
  757. package/refs/vbenchmark/templates/rust-axum/Cargo.toml +0 -16
  758. package/refs/vbenchmark/templates/rust-axum/docker-compose.yaml +0 -34
  759. package/refs/vbenchmark/templates/rust-axum/migrations/20240101000000_init.sql +0 -20
  760. package/refs/vbenchmark/templates/rust-axum/src/main.rs +0 -121
  761. package/refs/vbenchmark/tsconfig.base.json +0 -18
  762. package/refs/vbenchmark/turbo.json +0 -23
  763. package/refs/vbenchmark/vercel.json +0 -10
@@ -1,2090 +0,0 @@
1
- #!/usr/bin/env node
2
-
3
- const fs = require('fs');
4
- const path = require('path');
5
- const os = require('os');
6
- const readline = require('readline');
7
- const crypto = require('crypto');
8
-
9
- // Colors
10
- const cyan = '\x1b[36m';
11
- const green = '\x1b[32m';
12
- const yellow = '\x1b[33m';
13
- const dim = '\x1b[2m';
14
- const reset = '\x1b[0m';
15
-
16
- // Get version from package.json
17
- const pkg = require('../package.json');
18
-
19
- // Parse args
20
- const args = process.argv.slice(2);
21
- const hasGlobal = args.includes('--global') || args.includes('-g');
22
- const hasLocal = args.includes('--local') || args.includes('-l');
23
- const hasOpencode = args.includes('--opencode');
24
- const hasClaude = args.includes('--claude');
25
- const hasGemini = args.includes('--gemini');
26
- const hasCodex = args.includes('--codex');
27
- const hasBoth = args.includes('--both'); // Legacy flag, keeps working
28
- const hasAll = args.includes('--all');
29
- const hasUninstall = args.includes('--uninstall') || args.includes('-u');
30
-
31
- // Runtime selection - can be set by flags or interactive prompt
32
- let selectedRuntimes = [];
33
- if (hasAll) {
34
- selectedRuntimes = ['claude', 'opencode', 'gemini', 'codex'];
35
- } else if (hasBoth) {
36
- selectedRuntimes = ['claude', 'opencode'];
37
- } else {
38
- if (hasOpencode) selectedRuntimes.push('opencode');
39
- if (hasClaude) selectedRuntimes.push('claude');
40
- if (hasGemini) selectedRuntimes.push('gemini');
41
- if (hasCodex) selectedRuntimes.push('codex');
42
- }
43
-
44
- // Helper to get directory name for a runtime (used for local/project installs)
45
- function getDirName(runtime) {
46
- if (runtime === 'opencode') return '.opencode';
47
- if (runtime === 'gemini') return '.gemini';
48
- if (runtime === 'codex') return '.codex';
49
- return '.claude';
50
- }
51
-
52
- /**
53
- * Get the config directory path relative to home directory for a runtime
54
- * Used for templating hooks that use path.join(homeDir, '<configDir>', ...)
55
- * @param {string} runtime - 'claude', 'opencode', 'gemini', or 'codex'
56
- * @param {boolean} isGlobal - Whether this is a global install
57
- */
58
- function getConfigDirFromHome(runtime, isGlobal) {
59
- if (!isGlobal) {
60
- // Local installs use the same dir name pattern
61
- return `'${getDirName(runtime)}'`;
62
- }
63
- // Global installs - OpenCode uses XDG path structure
64
- if (runtime === 'opencode') {
65
- // OpenCode: ~/.config/opencode -> '.config', 'opencode'
66
- // Return as comma-separated for path.join() replacement
67
- return "'.config', 'opencode'";
68
- }
69
- if (runtime === 'gemini') return "'.gemini'";
70
- if (runtime === 'codex') return "'.codex'";
71
- return "'.claude'";
72
- }
73
-
74
- /**
75
- * Get the global config directory for OpenCode
76
- * OpenCode follows XDG Base Directory spec and uses ~/.config/opencode/
77
- * Priority: OPENCODE_CONFIG_DIR > dirname(OPENCODE_CONFIG) > XDG_CONFIG_HOME/opencode > ~/.config/opencode
78
- */
79
- function getOpencodeGlobalDir() {
80
- // 1. Explicit OPENCODE_CONFIG_DIR env var
81
- if (process.env.OPENCODE_CONFIG_DIR) {
82
- return expandTilde(process.env.OPENCODE_CONFIG_DIR);
83
- }
84
-
85
- // 2. OPENCODE_CONFIG env var (use its directory)
86
- if (process.env.OPENCODE_CONFIG) {
87
- return path.dirname(expandTilde(process.env.OPENCODE_CONFIG));
88
- }
89
-
90
- // 3. XDG_CONFIG_HOME/opencode
91
- if (process.env.XDG_CONFIG_HOME) {
92
- return path.join(expandTilde(process.env.XDG_CONFIG_HOME), 'opencode');
93
- }
94
-
95
- // 4. Default: ~/.config/opencode (XDG default)
96
- return path.join(os.homedir(), '.config', 'opencode');
97
- }
98
-
99
- /**
100
- * Get the global config directory for a runtime
101
- * @param {string} runtime - 'claude', 'opencode', 'gemini', or 'codex'
102
- * @param {string|null} explicitDir - Explicit directory from --config-dir flag
103
- */
104
- function getGlobalDir(runtime, explicitDir = null) {
105
- if (runtime === 'opencode') {
106
- // For OpenCode, --config-dir overrides env vars
107
- if (explicitDir) {
108
- return expandTilde(explicitDir);
109
- }
110
- return getOpencodeGlobalDir();
111
- }
112
-
113
- if (runtime === 'gemini') {
114
- // Gemini: --config-dir > GEMINI_CONFIG_DIR > ~/.gemini
115
- if (explicitDir) {
116
- return expandTilde(explicitDir);
117
- }
118
- if (process.env.GEMINI_CONFIG_DIR) {
119
- return expandTilde(process.env.GEMINI_CONFIG_DIR);
120
- }
121
- return path.join(os.homedir(), '.gemini');
122
- }
123
-
124
- if (runtime === 'codex') {
125
- // Codex: --config-dir > CODEX_HOME > ~/.codex
126
- if (explicitDir) {
127
- return expandTilde(explicitDir);
128
- }
129
- if (process.env.CODEX_HOME) {
130
- return expandTilde(process.env.CODEX_HOME);
131
- }
132
- return path.join(os.homedir(), '.codex');
133
- }
134
-
135
- // Claude Code: --config-dir > CLAUDE_CONFIG_DIR > ~/.claude
136
- if (explicitDir) {
137
- return expandTilde(explicitDir);
138
- }
139
- if (process.env.CLAUDE_CONFIG_DIR) {
140
- return expandTilde(process.env.CLAUDE_CONFIG_DIR);
141
- }
142
- return path.join(os.homedir(), '.claude');
143
- }
144
-
145
- const banner = '\n' +
146
- cyan + ' ██████╗ ███████╗██████╗\n' +
147
- ' ██╔════╝ ██╔════╝██╔══██╗\n' +
148
- ' ██║ ███╗███████╗██║ ██║\n' +
149
- ' ██║ ██║╚════██║██║ ██║\n' +
150
- ' ╚██████╔╝███████║██████╔╝\n' +
151
- ' ╚═════╝ ╚══════╝╚═════╝' + reset + '\n' +
152
- '\n' +
153
- ' Get Shit Done ' + dim + 'v' + pkg.version + reset + '\n' +
154
- ' A meta-prompting, context engineering and spec-driven\n' +
155
- ' development system for Claude Code, OpenCode, Gemini, and Codex by TÂCHES.\n';
156
-
157
- // Parse --config-dir argument
158
- function parseConfigDirArg() {
159
- const configDirIndex = args.findIndex(arg => arg === '--config-dir' || arg === '-c');
160
- if (configDirIndex !== -1) {
161
- const nextArg = args[configDirIndex + 1];
162
- // Error if --config-dir is provided without a value or next arg is another flag
163
- if (!nextArg || nextArg.startsWith('-')) {
164
- console.error(` ${yellow}--config-dir requires a path argument${reset}`);
165
- process.exit(1);
166
- }
167
- return nextArg;
168
- }
169
- // Also handle --config-dir=value format
170
- const configDirArg = args.find(arg => arg.startsWith('--config-dir=') || arg.startsWith('-c='));
171
- if (configDirArg) {
172
- const value = configDirArg.split('=')[1];
173
- if (!value) {
174
- console.error(` ${yellow}--config-dir requires a non-empty path${reset}`);
175
- process.exit(1);
176
- }
177
- return value;
178
- }
179
- return null;
180
- }
181
- const explicitConfigDir = parseConfigDirArg();
182
- const hasHelp = args.includes('--help') || args.includes('-h');
183
- const forceStatusline = args.includes('--force-statusline');
184
-
185
- console.log(banner);
186
-
187
- // Show help if requested
188
- if (hasHelp) {
189
- console.log(` ${yellow}Usage:${reset} npx get-shit-done-cc [options]\n\n ${yellow}Options:${reset}\n ${cyan}-g, --global${reset} Install globally (to config directory)\n ${cyan}-l, --local${reset} Install locally (to current directory)\n ${cyan}--claude${reset} Install for Claude Code only\n ${cyan}--opencode${reset} Install for OpenCode only\n ${cyan}--gemini${reset} Install for Gemini only\n ${cyan}--codex${reset} Install for Codex only\n ${cyan}--all${reset} Install for all runtimes\n ${cyan}-u, --uninstall${reset} Uninstall GSD (remove all GSD files)\n ${cyan}-c, --config-dir <path>${reset} Specify custom config directory\n ${cyan}-h, --help${reset} Show this help message\n ${cyan}--force-statusline${reset} Replace existing statusline config\n\n ${yellow}Examples:${reset}\n ${dim}# Interactive install (prompts for runtime and location)${reset}\n npx get-shit-done-cc\n\n ${dim}# Install for Claude Code globally${reset}\n npx get-shit-done-cc --claude --global\n\n ${dim}# Install for Gemini globally${reset}\n npx get-shit-done-cc --gemini --global\n\n ${dim}# Install for Codex globally${reset}\n npx get-shit-done-cc --codex --global\n\n ${dim}# Install for all runtimes globally${reset}\n npx get-shit-done-cc --all --global\n\n ${dim}# Install to custom config directory${reset}\n npx get-shit-done-cc --codex --global --config-dir ~/.codex-work\n\n ${dim}# Install to current project only${reset}\n npx get-shit-done-cc --claude --local\n\n ${dim}# Uninstall GSD from Codex globally${reset}\n npx get-shit-done-cc --codex --global --uninstall\n\n ${yellow}Notes:${reset}\n The --config-dir option is useful when you have multiple configurations.\n It takes priority over CLAUDE_CONFIG_DIR / GEMINI_CONFIG_DIR / CODEX_HOME environment variables.\n`);
190
- process.exit(0);
191
- }
192
-
193
- /**
194
- * Expand ~ to home directory (shell doesn't expand in env vars passed to node)
195
- */
196
- function expandTilde(filePath) {
197
- if (filePath && filePath.startsWith('~/')) {
198
- return path.join(os.homedir(), filePath.slice(2));
199
- }
200
- return filePath;
201
- }
202
-
203
- /**
204
- * Build a hook command path using forward slashes for cross-platform compatibility.
205
- * On Windows, $HOME is not expanded by cmd.exe/PowerShell, so we use the actual path.
206
- */
207
- function buildHookCommand(configDir, hookName) {
208
- // Use forward slashes for Node.js compatibility on all platforms
209
- const hooksPath = configDir.replace(/\\/g, '/') + '/hooks/' + hookName;
210
- return `node "${hooksPath}"`;
211
- }
212
-
213
- /**
214
- * Read and parse settings.json, returning empty object if it doesn't exist
215
- */
216
- function readSettings(settingsPath) {
217
- if (fs.existsSync(settingsPath)) {
218
- try {
219
- return JSON.parse(fs.readFileSync(settingsPath, 'utf8'));
220
- } catch (e) {
221
- return {};
222
- }
223
- }
224
- return {};
225
- }
226
-
227
- /**
228
- * Write settings.json with proper formatting
229
- */
230
- function writeSettings(settingsPath, settings) {
231
- fs.writeFileSync(settingsPath, JSON.stringify(settings, null, 2) + '\n');
232
- }
233
-
234
- // Cache for attribution settings (populated once per runtime during install)
235
- const attributionCache = new Map();
236
-
237
- /**
238
- * Get commit attribution setting for a runtime
239
- * @param {string} runtime - 'claude', 'opencode', 'gemini', or 'codex'
240
- * @returns {null|undefined|string} null = remove, undefined = keep default, string = custom
241
- */
242
- function getCommitAttribution(runtime) {
243
- // Return cached value if available
244
- if (attributionCache.has(runtime)) {
245
- return attributionCache.get(runtime);
246
- }
247
-
248
- let result;
249
-
250
- if (runtime === 'opencode') {
251
- const config = readSettings(path.join(getGlobalDir('opencode', null), 'opencode.json'));
252
- result = config.disable_ai_attribution === true ? null : undefined;
253
- } else if (runtime === 'gemini') {
254
- // Gemini: check gemini settings.json for attribution config
255
- const settings = readSettings(path.join(getGlobalDir('gemini', explicitConfigDir), 'settings.json'));
256
- if (!settings.attribution || settings.attribution.commit === undefined) {
257
- result = undefined;
258
- } else if (settings.attribution.commit === '') {
259
- result = null;
260
- } else {
261
- result = settings.attribution.commit;
262
- }
263
- } else if (runtime === 'claude') {
264
- // Claude Code
265
- const settings = readSettings(path.join(getGlobalDir('claude', explicitConfigDir), 'settings.json'));
266
- if (!settings.attribution || settings.attribution.commit === undefined) {
267
- result = undefined;
268
- } else if (settings.attribution.commit === '') {
269
- result = null;
270
- } else {
271
- result = settings.attribution.commit;
272
- }
273
- } else {
274
- // Codex currently has no attribution setting equivalent
275
- result = undefined;
276
- }
277
-
278
- // Cache and return
279
- attributionCache.set(runtime, result);
280
- return result;
281
- }
282
-
283
- /**
284
- * Process Co-Authored-By lines based on attribution setting
285
- * @param {string} content - File content to process
286
- * @param {null|undefined|string} attribution - null=remove, undefined=keep, string=replace
287
- * @returns {string} Processed content
288
- */
289
- function processAttribution(content, attribution) {
290
- if (attribution === null) {
291
- // Remove Co-Authored-By lines and the preceding blank line
292
- return content.replace(/(\r?\n){2}Co-Authored-By:.*$/gim, '');
293
- }
294
- if (attribution === undefined) {
295
- return content;
296
- }
297
- // Replace with custom attribution (escape $ to prevent backreference injection)
298
- const safeAttribution = attribution.replace(/\$/g, '$$$$');
299
- return content.replace(/Co-Authored-By:.*$/gim, `Co-Authored-By: ${safeAttribution}`);
300
- }
301
-
302
- /**
303
- * Convert Claude Code frontmatter to opencode format
304
- * - Converts 'allowed-tools:' array to 'permission:' object
305
- * @param {string} content - Markdown file content with YAML frontmatter
306
- * @returns {string} - Content with converted frontmatter
307
- */
308
- // Color name to hex mapping for opencode compatibility
309
- const colorNameToHex = {
310
- cyan: '#00FFFF',
311
- red: '#FF0000',
312
- green: '#00FF00',
313
- blue: '#0000FF',
314
- yellow: '#FFFF00',
315
- magenta: '#FF00FF',
316
- orange: '#FFA500',
317
- purple: '#800080',
318
- pink: '#FFC0CB',
319
- white: '#FFFFFF',
320
- black: '#000000',
321
- gray: '#808080',
322
- grey: '#808080',
323
- };
324
-
325
- // Tool name mapping from Claude Code to OpenCode
326
- // OpenCode uses lowercase tool names; special mappings for renamed tools
327
- const claudeToOpencodeTools = {
328
- AskUserQuestion: 'question',
329
- SlashCommand: 'skill',
330
- TodoWrite: 'todowrite',
331
- WebFetch: 'webfetch',
332
- WebSearch: 'websearch', // Plugin/MCP - keep for compatibility
333
- };
334
-
335
- // Tool name mapping from Claude Code to Gemini CLI
336
- // Gemini CLI uses snake_case built-in tool names
337
- const claudeToGeminiTools = {
338
- Read: 'read_file',
339
- Write: 'write_file',
340
- Edit: 'replace',
341
- Bash: 'run_shell_command',
342
- Glob: 'glob',
343
- Grep: 'search_file_content',
344
- WebSearch: 'google_web_search',
345
- WebFetch: 'web_fetch',
346
- TodoWrite: 'write_todos',
347
- AskUserQuestion: 'ask_user',
348
- };
349
-
350
- /**
351
- * Convert a Claude Code tool name to OpenCode format
352
- * - Applies special mappings (AskUserQuestion -> question, etc.)
353
- * - Converts to lowercase (except MCP tools which keep their format)
354
- */
355
- function convertToolName(claudeTool) {
356
- // Check for special mapping first
357
- if (claudeToOpencodeTools[claudeTool]) {
358
- return claudeToOpencodeTools[claudeTool];
359
- }
360
- // MCP tools (mcp__*) keep their format
361
- if (claudeTool.startsWith('mcp__')) {
362
- return claudeTool;
363
- }
364
- // Default: convert to lowercase
365
- return claudeTool.toLowerCase();
366
- }
367
-
368
- /**
369
- * Convert a Claude Code tool name to Gemini CLI format
370
- * - Applies Claude→Gemini mapping (Read→read_file, Bash→run_shell_command, etc.)
371
- * - Filters out MCP tools (mcp__*) — they are auto-discovered at runtime in Gemini
372
- * - Filters out Task — agents are auto-registered as tools in Gemini
373
- * @returns {string|null} Gemini tool name, or null if tool should be excluded
374
- */
375
- function convertGeminiToolName(claudeTool) {
376
- // MCP tools: exclude — auto-discovered from mcpServers config at runtime
377
- if (claudeTool.startsWith('mcp__')) {
378
- return null;
379
- }
380
- // Task: exclude — agents are auto-registered as callable tools
381
- if (claudeTool === 'Task') {
382
- return null;
383
- }
384
- // Check for explicit mapping
385
- if (claudeToGeminiTools[claudeTool]) {
386
- return claudeToGeminiTools[claudeTool];
387
- }
388
- // Default: lowercase
389
- return claudeTool.toLowerCase();
390
- }
391
-
392
- function toSingleLine(value) {
393
- return value.replace(/\s+/g, ' ').trim();
394
- }
395
-
396
- function yamlQuote(value) {
397
- return JSON.stringify(value);
398
- }
399
-
400
- function extractFrontmatterAndBody(content) {
401
- if (!content.startsWith('---')) {
402
- return { frontmatter: null, body: content };
403
- }
404
-
405
- const endIndex = content.indexOf('---', 3);
406
- if (endIndex === -1) {
407
- return { frontmatter: null, body: content };
408
- }
409
-
410
- return {
411
- frontmatter: content.substring(3, endIndex).trim(),
412
- body: content.substring(endIndex + 3),
413
- };
414
- }
415
-
416
- function extractFrontmatterField(frontmatter, fieldName) {
417
- const regex = new RegExp(`^${fieldName}:\\s*(.+)$`, 'm');
418
- const match = frontmatter.match(regex);
419
- if (!match) return null;
420
- return match[1].trim().replace(/^['"]|['"]$/g, '');
421
- }
422
-
423
- function convertSlashCommandsToCodexSkillMentions(content) {
424
- let converted = content.replace(/\/gsd:([a-z0-9-]+)/gi, (_, commandName) => {
425
- return `$gsd-${String(commandName).toLowerCase()}`;
426
- });
427
- converted = converted.replace(/\/gsd-help\b/g, '$gsd-help');
428
- return converted;
429
- }
430
-
431
- function convertClaudeToCodexMarkdown(content) {
432
- let converted = convertSlashCommandsToCodexSkillMentions(content);
433
- converted = converted.replace(/\$ARGUMENTS\b/g, '{{GSD_ARGS}}');
434
- return converted;
435
- }
436
-
437
- function getCodexSkillAdapterHeader(skillName) {
438
- const invocation = `$${skillName}`;
439
- return `<codex_skill_adapter>
440
- Codex skills-first mode:
441
- - This skill is invoked by mentioning \`${invocation}\`.
442
- - Treat all user text after \`${invocation}\` as \`{{GSD_ARGS}}\`.
443
- - If no arguments are present, treat \`{{GSD_ARGS}}\` as empty.
444
-
445
- Legacy orchestration compatibility:
446
- - Any \`Task(...)\` pattern in referenced workflow docs is legacy syntax.
447
- - Implement equivalent behavior with Codex collaboration tools: \`spawn_agent\`, \`wait\`, \`send_input\`, and \`close_agent\`.
448
- - Treat legacy \`subagent_type\` names as role hints in the spawned message.
449
- </codex_skill_adapter>`;
450
- }
451
-
452
- function convertClaudeCommandToCodexSkill(content, skillName) {
453
- const converted = convertClaudeToCodexMarkdown(content);
454
- const { frontmatter, body } = extractFrontmatterAndBody(converted);
455
- let description = `Run GSD workflow ${skillName}.`;
456
- if (frontmatter) {
457
- const maybeDescription = extractFrontmatterField(frontmatter, 'description');
458
- if (maybeDescription) {
459
- description = maybeDescription;
460
- }
461
- }
462
- description = toSingleLine(description);
463
- const shortDescription = description.length > 180 ? `${description.slice(0, 177)}...` : description;
464
- const adapter = getCodexSkillAdapterHeader(skillName);
465
-
466
- return `---\nname: ${yamlQuote(skillName)}\ndescription: ${yamlQuote(description)}\nmetadata:\n short-description: ${yamlQuote(shortDescription)}\n---\n\n${adapter}\n\n${body.trimStart()}`;
467
- }
468
-
469
- /**
470
- * Strip HTML <sub> tags for Gemini CLI output
471
- * Terminals don't support subscript — Gemini renders these as raw HTML.
472
- * Converts <sub>text</sub> to italic *(text)* for readable terminal output.
473
- */
474
- function stripSubTags(content) {
475
- return content.replace(/<sub>(.*?)<\/sub>/g, '*($1)*');
476
- }
477
-
478
- /**
479
- * Convert Claude Code agent frontmatter to Gemini CLI format
480
- * Gemini agents use .md files with YAML frontmatter, same as Claude,
481
- * but with different field names and formats:
482
- * - tools: must be a YAML array (not comma-separated string)
483
- * - tool names: must use Gemini built-in names (read_file, not Read)
484
- * - color: must be removed (causes validation error)
485
- * - mcp__* tools: must be excluded (auto-discovered at runtime)
486
- */
487
- function convertClaudeToGeminiAgent(content) {
488
- if (!content.startsWith('---')) return content;
489
-
490
- const endIndex = content.indexOf('---', 3);
491
- if (endIndex === -1) return content;
492
-
493
- const frontmatter = content.substring(3, endIndex).trim();
494
- const body = content.substring(endIndex + 3);
495
-
496
- const lines = frontmatter.split('\n');
497
- const newLines = [];
498
- let inAllowedTools = false;
499
- const tools = [];
500
-
501
- for (const line of lines) {
502
- const trimmed = line.trim();
503
-
504
- // Convert allowed-tools YAML array to tools list
505
- if (trimmed.startsWith('allowed-tools:')) {
506
- inAllowedTools = true;
507
- continue;
508
- }
509
-
510
- // Handle inline tools: field (comma-separated string)
511
- if (trimmed.startsWith('tools:')) {
512
- const toolsValue = trimmed.substring(6).trim();
513
- if (toolsValue) {
514
- const parsed = toolsValue.split(',').map(t => t.trim()).filter(t => t);
515
- for (const t of parsed) {
516
- const mapped = convertGeminiToolName(t);
517
- if (mapped) tools.push(mapped);
518
- }
519
- } else {
520
- // tools: with no value means YAML array follows
521
- inAllowedTools = true;
522
- }
523
- continue;
524
- }
525
-
526
- // Strip color field (not supported by Gemini CLI, causes validation error)
527
- if (trimmed.startsWith('color:')) continue;
528
-
529
- // Collect allowed-tools/tools array items
530
- if (inAllowedTools) {
531
- if (trimmed.startsWith('- ')) {
532
- const mapped = convertGeminiToolName(trimmed.substring(2).trim());
533
- if (mapped) tools.push(mapped);
534
- continue;
535
- } else if (trimmed && !trimmed.startsWith('-')) {
536
- inAllowedTools = false;
537
- }
538
- }
539
-
540
- if (!inAllowedTools) {
541
- newLines.push(line);
542
- }
543
- }
544
-
545
- // Add tools as YAML array (Gemini requires array format)
546
- if (tools.length > 0) {
547
- newLines.push('tools:');
548
- for (const tool of tools) {
549
- newLines.push(` - ${tool}`);
550
- }
551
- }
552
-
553
- const newFrontmatter = newLines.join('\n').trim();
554
-
555
- // Escape ${VAR} patterns in agent body for Gemini CLI compatibility.
556
- // Gemini's templateString() treats all ${word} patterns as template variables
557
- // and throws "Template validation failed: Missing required input parameters"
558
- // when they can't be resolved. GSD agents use ${PHASE}, ${PLAN}, etc. as
559
- // shell variables in bash code blocks — convert to $VAR (no braces) which
560
- // is equivalent bash and invisible to Gemini's /\$\{(\w+)\}/g regex.
561
- const escapedBody = body.replace(/\$\{(\w+)\}/g, '$$$1');
562
-
563
- return `---\n${newFrontmatter}\n---${stripSubTags(escapedBody)}`;
564
- }
565
-
566
- function convertClaudeToOpencodeFrontmatter(content) {
567
- // Replace tool name references in content (applies to all files)
568
- let convertedContent = content;
569
- convertedContent = convertedContent.replace(/\bAskUserQuestion\b/g, 'question');
570
- convertedContent = convertedContent.replace(/\bSlashCommand\b/g, 'skill');
571
- convertedContent = convertedContent.replace(/\bTodoWrite\b/g, 'todowrite');
572
- // Replace /gsd:command with /gsd-command for opencode (flat command structure)
573
- convertedContent = convertedContent.replace(/\/gsd:/g, '/gsd-');
574
- // Replace ~/.claude with ~/.config/opencode (OpenCode's correct config location)
575
- convertedContent = convertedContent.replace(/~\/\.claude\b/g, '~/.config/opencode');
576
- // Replace general-purpose subagent type with OpenCode's equivalent "general"
577
- convertedContent = convertedContent.replace(/subagent_type="general-purpose"/g, 'subagent_type="general"');
578
-
579
- // Check if content has frontmatter
580
- if (!convertedContent.startsWith('---')) {
581
- return convertedContent;
582
- }
583
-
584
- // Find the end of frontmatter
585
- const endIndex = convertedContent.indexOf('---', 3);
586
- if (endIndex === -1) {
587
- return convertedContent;
588
- }
589
-
590
- const frontmatter = convertedContent.substring(3, endIndex).trim();
591
- const body = convertedContent.substring(endIndex + 3);
592
-
593
- // Parse frontmatter line by line (simple YAML parsing)
594
- const lines = frontmatter.split('\n');
595
- const newLines = [];
596
- let inAllowedTools = false;
597
- const allowedTools = [];
598
-
599
- for (const line of lines) {
600
- const trimmed = line.trim();
601
-
602
- // Detect start of allowed-tools array
603
- if (trimmed.startsWith('allowed-tools:')) {
604
- inAllowedTools = true;
605
- continue;
606
- }
607
-
608
- // Detect inline tools: field (comma-separated string)
609
- if (trimmed.startsWith('tools:')) {
610
- const toolsValue = trimmed.substring(6).trim();
611
- if (toolsValue) {
612
- // Parse comma-separated tools
613
- const tools = toolsValue.split(',').map(t => t.trim()).filter(t => t);
614
- allowedTools.push(...tools);
615
- }
616
- continue;
617
- }
618
-
619
- // Remove name: field - opencode uses filename for command name
620
- if (trimmed.startsWith('name:')) {
621
- continue;
622
- }
623
-
624
- // Convert color names to hex for opencode
625
- if (trimmed.startsWith('color:')) {
626
- const colorValue = trimmed.substring(6).trim().toLowerCase();
627
- const hexColor = colorNameToHex[colorValue];
628
- if (hexColor) {
629
- newLines.push(`color: "${hexColor}"`);
630
- } else if (colorValue.startsWith('#')) {
631
- // Validate hex color format (#RGB or #RRGGBB)
632
- if (/^#[0-9a-f]{3}$|^#[0-9a-f]{6}$/i.test(colorValue)) {
633
- // Already hex and valid, keep as is
634
- newLines.push(line);
635
- }
636
- // Skip invalid hex colors
637
- }
638
- // Skip unknown color names
639
- continue;
640
- }
641
-
642
- // Collect allowed-tools items
643
- if (inAllowedTools) {
644
- if (trimmed.startsWith('- ')) {
645
- allowedTools.push(trimmed.substring(2).trim());
646
- continue;
647
- } else if (trimmed && !trimmed.startsWith('-')) {
648
- // End of array, new field started
649
- inAllowedTools = false;
650
- }
651
- }
652
-
653
- // Keep other fields (including name: which opencode ignores)
654
- if (!inAllowedTools) {
655
- newLines.push(line);
656
- }
657
- }
658
-
659
- // Add tools object if we had allowed-tools or tools
660
- if (allowedTools.length > 0) {
661
- newLines.push('tools:');
662
- for (const tool of allowedTools) {
663
- newLines.push(` ${convertToolName(tool)}: true`);
664
- }
665
- }
666
-
667
- // Rebuild frontmatter (body already has tool names converted)
668
- const newFrontmatter = newLines.join('\n').trim();
669
- return `---\n${newFrontmatter}\n---${body}`;
670
- }
671
-
672
- /**
673
- * Convert Claude Code markdown command to Gemini TOML format
674
- * @param {string} content - Markdown file content with YAML frontmatter
675
- * @returns {string} - TOML content
676
- */
677
- function convertClaudeToGeminiToml(content) {
678
- // Check if content has frontmatter
679
- if (!content.startsWith('---')) {
680
- return `prompt = ${JSON.stringify(content)}\n`;
681
- }
682
-
683
- const endIndex = content.indexOf('---', 3);
684
- if (endIndex === -1) {
685
- return `prompt = ${JSON.stringify(content)}\n`;
686
- }
687
-
688
- const frontmatter = content.substring(3, endIndex).trim();
689
- const body = content.substring(endIndex + 3).trim();
690
-
691
- // Extract description from frontmatter
692
- let description = '';
693
- const lines = frontmatter.split('\n');
694
- for (const line of lines) {
695
- const trimmed = line.trim();
696
- if (trimmed.startsWith('description:')) {
697
- description = trimmed.substring(12).trim();
698
- break;
699
- }
700
- }
701
-
702
- // Construct TOML
703
- let toml = '';
704
- if (description) {
705
- toml += `description = ${JSON.stringify(description)}\n`;
706
- }
707
-
708
- toml += `prompt = ${JSON.stringify(body)}\n`;
709
-
710
- return toml;
711
- }
712
-
713
- /**
714
- * Copy commands to a flat structure for OpenCode
715
- * OpenCode expects: command/gsd-help.md (invoked as /gsd-help)
716
- * Source structure: commands/gsd/help.md
717
- *
718
- * @param {string} srcDir - Source directory (e.g., commands/gsd/)
719
- * @param {string} destDir - Destination directory (e.g., command/)
720
- * @param {string} prefix - Prefix for filenames (e.g., 'gsd')
721
- * @param {string} pathPrefix - Path prefix for file references
722
- * @param {string} runtime - Target runtime ('claude' or 'opencode')
723
- */
724
- function copyFlattenedCommands(srcDir, destDir, prefix, pathPrefix, runtime) {
725
- if (!fs.existsSync(srcDir)) {
726
- return;
727
- }
728
-
729
- // Remove old gsd-*.md files before copying new ones
730
- if (fs.existsSync(destDir)) {
731
- for (const file of fs.readdirSync(destDir)) {
732
- if (file.startsWith(`${prefix}-`) && file.endsWith('.md')) {
733
- fs.unlinkSync(path.join(destDir, file));
734
- }
735
- }
736
- } else {
737
- fs.mkdirSync(destDir, { recursive: true });
738
- }
739
-
740
- const entries = fs.readdirSync(srcDir, { withFileTypes: true });
741
-
742
- for (const entry of entries) {
743
- const srcPath = path.join(srcDir, entry.name);
744
-
745
- if (entry.isDirectory()) {
746
- // Recurse into subdirectories, adding to prefix
747
- // e.g., commands/gsd/debug/start.md -> command/gsd-debug-start.md
748
- copyFlattenedCommands(srcPath, destDir, `${prefix}-${entry.name}`, pathPrefix, runtime);
749
- } else if (entry.name.endsWith('.md')) {
750
- // Flatten: help.md -> gsd-help.md
751
- const baseName = entry.name.replace('.md', '');
752
- const destName = `${prefix}-${baseName}.md`;
753
- const destPath = path.join(destDir, destName);
754
-
755
- let content = fs.readFileSync(srcPath, 'utf8');
756
- const globalClaudeRegex = /~\/\.claude\//g;
757
- const localClaudeRegex = /\.\/\.claude\//g;
758
- const opencodeDirRegex = /~\/\.opencode\//g;
759
- content = content.replace(globalClaudeRegex, pathPrefix);
760
- content = content.replace(localClaudeRegex, `./${getDirName(runtime)}/`);
761
- content = content.replace(opencodeDirRegex, pathPrefix);
762
- content = processAttribution(content, getCommitAttribution(runtime));
763
- content = convertClaudeToOpencodeFrontmatter(content);
764
-
765
- fs.writeFileSync(destPath, content);
766
- }
767
- }
768
- }
769
-
770
- function listCodexSkillNames(skillsDir, prefix = 'gsd-') {
771
- if (!fs.existsSync(skillsDir)) return [];
772
- const entries = fs.readdirSync(skillsDir, { withFileTypes: true });
773
- return entries
774
- .filter(entry => entry.isDirectory() && entry.name.startsWith(prefix))
775
- .filter(entry => fs.existsSync(path.join(skillsDir, entry.name, 'SKILL.md')))
776
- .map(entry => entry.name)
777
- .sort();
778
- }
779
-
780
- function copyCommandsAsCodexSkills(srcDir, skillsDir, prefix, pathPrefix, runtime) {
781
- if (!fs.existsSync(srcDir)) {
782
- return;
783
- }
784
-
785
- fs.mkdirSync(skillsDir, { recursive: true });
786
-
787
- // Remove previous GSD Codex skills to avoid stale command skills.
788
- const existing = fs.readdirSync(skillsDir, { withFileTypes: true });
789
- for (const entry of existing) {
790
- if (entry.isDirectory() && entry.name.startsWith(`${prefix}-`)) {
791
- fs.rmSync(path.join(skillsDir, entry.name), { recursive: true });
792
- }
793
- }
794
-
795
- function recurse(currentSrcDir, currentPrefix) {
796
- const entries = fs.readdirSync(currentSrcDir, { withFileTypes: true });
797
-
798
- for (const entry of entries) {
799
- const srcPath = path.join(currentSrcDir, entry.name);
800
- if (entry.isDirectory()) {
801
- recurse(srcPath, `${currentPrefix}-${entry.name}`);
802
- continue;
803
- }
804
-
805
- if (!entry.name.endsWith('.md')) {
806
- continue;
807
- }
808
-
809
- const baseName = entry.name.replace('.md', '');
810
- const skillName = `${currentPrefix}-${baseName}`;
811
- const skillDir = path.join(skillsDir, skillName);
812
- fs.mkdirSync(skillDir, { recursive: true });
813
-
814
- let content = fs.readFileSync(srcPath, 'utf8');
815
- const globalClaudeRegex = /~\/\.claude\//g;
816
- const localClaudeRegex = /\.\/\.claude\//g;
817
- const codexDirRegex = /~\/\.codex\//g;
818
- content = content.replace(globalClaudeRegex, pathPrefix);
819
- content = content.replace(localClaudeRegex, `./${getDirName(runtime)}/`);
820
- content = content.replace(codexDirRegex, pathPrefix);
821
- content = processAttribution(content, getCommitAttribution(runtime));
822
- content = convertClaudeCommandToCodexSkill(content, skillName);
823
-
824
- fs.writeFileSync(path.join(skillDir, 'SKILL.md'), content);
825
- }
826
- }
827
-
828
- recurse(srcDir, prefix);
829
- }
830
-
831
- /**
832
- * Recursively copy directory, replacing paths in .md files
833
- * Deletes existing destDir first to remove orphaned files from previous versions
834
- * @param {string} srcDir - Source directory
835
- * @param {string} destDir - Destination directory
836
- * @param {string} pathPrefix - Path prefix for file references
837
- * @param {string} runtime - Target runtime ('claude', 'opencode', 'gemini', 'codex')
838
- */
839
- function copyWithPathReplacement(srcDir, destDir, pathPrefix, runtime, isCommand = false) {
840
- const isOpencode = runtime === 'opencode';
841
- const isCodex = runtime === 'codex';
842
- const dirName = getDirName(runtime);
843
-
844
- // Clean install: remove existing destination to prevent orphaned files
845
- if (fs.existsSync(destDir)) {
846
- fs.rmSync(destDir, { recursive: true });
847
- }
848
- fs.mkdirSync(destDir, { recursive: true });
849
-
850
- const entries = fs.readdirSync(srcDir, { withFileTypes: true });
851
-
852
- for (const entry of entries) {
853
- const srcPath = path.join(srcDir, entry.name);
854
- const destPath = path.join(destDir, entry.name);
855
-
856
- if (entry.isDirectory()) {
857
- copyWithPathReplacement(srcPath, destPath, pathPrefix, runtime, isCommand);
858
- } else if (entry.name.endsWith('.md')) {
859
- // Replace ~/.claude/ and ./.claude/ with runtime-appropriate paths
860
- let content = fs.readFileSync(srcPath, 'utf8');
861
- const globalClaudeRegex = /~\/\.claude\//g;
862
- const localClaudeRegex = /\.\/\.claude\//g;
863
- content = content.replace(globalClaudeRegex, pathPrefix);
864
- content = content.replace(localClaudeRegex, `./${dirName}/`);
865
- content = processAttribution(content, getCommitAttribution(runtime));
866
-
867
- // Convert frontmatter for opencode compatibility
868
- if (isOpencode) {
869
- content = convertClaudeToOpencodeFrontmatter(content);
870
- fs.writeFileSync(destPath, content);
871
- } else if (runtime === 'gemini') {
872
- if (isCommand) {
873
- // Convert to TOML for Gemini (strip <sub> tags — terminals can't render subscript)
874
- content = stripSubTags(content);
875
- const tomlContent = convertClaudeToGeminiToml(content);
876
- // Replace extension with .toml
877
- const tomlPath = destPath.replace(/\.md$/, '.toml');
878
- fs.writeFileSync(tomlPath, tomlContent);
879
- } else {
880
- fs.writeFileSync(destPath, content);
881
- }
882
- } else if (isCodex) {
883
- content = convertClaudeToCodexMarkdown(content);
884
- fs.writeFileSync(destPath, content);
885
- } else {
886
- fs.writeFileSync(destPath, content);
887
- }
888
- } else {
889
- fs.copyFileSync(srcPath, destPath);
890
- }
891
- }
892
- }
893
-
894
- /**
895
- * Clean up orphaned files from previous GSD versions
896
- */
897
- function cleanupOrphanedFiles(configDir) {
898
- const orphanedFiles = [
899
- 'hooks/gsd-notify.sh', // Removed in v1.6.x
900
- 'hooks/statusline.js', // Renamed to gsd-statusline.js in v1.9.0
901
- ];
902
-
903
- for (const relPath of orphanedFiles) {
904
- const fullPath = path.join(configDir, relPath);
905
- if (fs.existsSync(fullPath)) {
906
- fs.unlinkSync(fullPath);
907
- console.log(` ${green}✓${reset} Removed orphaned ${relPath}`);
908
- }
909
- }
910
- }
911
-
912
- /**
913
- * Clean up orphaned hook registrations from settings.json
914
- */
915
- function cleanupOrphanedHooks(settings) {
916
- const orphanedHookPatterns = [
917
- 'gsd-notify.sh', // Removed in v1.6.x
918
- 'hooks/statusline.js', // Renamed to gsd-statusline.js in v1.9.0
919
- 'gsd-intel-index.js', // Removed in v1.9.2
920
- 'gsd-intel-session.js', // Removed in v1.9.2
921
- 'gsd-intel-prune.js', // Removed in v1.9.2
922
- ];
923
-
924
- let cleanedHooks = false;
925
-
926
- // Check all hook event types (Stop, SessionStart, etc.)
927
- if (settings.hooks) {
928
- for (const eventType of Object.keys(settings.hooks)) {
929
- const hookEntries = settings.hooks[eventType];
930
- if (Array.isArray(hookEntries)) {
931
- // Filter out entries that contain orphaned hooks
932
- const filtered = hookEntries.filter(entry => {
933
- if (entry.hooks && Array.isArray(entry.hooks)) {
934
- // Check if any hook in this entry matches orphaned patterns
935
- const hasOrphaned = entry.hooks.some(h =>
936
- h.command && orphanedHookPatterns.some(pattern => h.command.includes(pattern))
937
- );
938
- if (hasOrphaned) {
939
- cleanedHooks = true;
940
- return false; // Remove this entry
941
- }
942
- }
943
- return true; // Keep this entry
944
- });
945
- settings.hooks[eventType] = filtered;
946
- }
947
- }
948
- }
949
-
950
- if (cleanedHooks) {
951
- console.log(` ${green}✓${reset} Removed orphaned hook registrations`);
952
- }
953
-
954
- // Fix #330: Update statusLine if it points to old statusline.js path
955
- if (settings.statusLine && settings.statusLine.command &&
956
- settings.statusLine.command.includes('statusline.js') &&
957
- !settings.statusLine.command.includes('gsd-statusline.js')) {
958
- // Replace old path with new path
959
- settings.statusLine.command = settings.statusLine.command.replace(
960
- /statusline\.js/,
961
- 'gsd-statusline.js'
962
- );
963
- console.log(` ${green}✓${reset} Updated statusline path (statusline.js → gsd-statusline.js)`);
964
- }
965
-
966
- return settings;
967
- }
968
-
969
- /**
970
- * Uninstall GSD from the specified directory for a specific runtime
971
- * Removes only GSD-specific files/directories, preserves user content
972
- * @param {boolean} isGlobal - Whether to uninstall from global or local
973
- * @param {string} runtime - Target runtime ('claude', 'opencode', 'gemini', 'codex')
974
- */
975
- function uninstall(isGlobal, runtime = 'claude') {
976
- const isOpencode = runtime === 'opencode';
977
- const isCodex = runtime === 'codex';
978
- const dirName = getDirName(runtime);
979
-
980
- // Get the target directory based on runtime and install type
981
- const targetDir = isGlobal
982
- ? getGlobalDir(runtime, explicitConfigDir)
983
- : path.join(process.cwd(), dirName);
984
-
985
- const locationLabel = isGlobal
986
- ? targetDir.replace(os.homedir(), '~')
987
- : targetDir.replace(process.cwd(), '.');
988
-
989
- let runtimeLabel = 'Claude Code';
990
- if (runtime === 'opencode') runtimeLabel = 'OpenCode';
991
- if (runtime === 'gemini') runtimeLabel = 'Gemini';
992
- if (runtime === 'codex') runtimeLabel = 'Codex';
993
-
994
- console.log(` Uninstalling GSD from ${cyan}${runtimeLabel}${reset} at ${cyan}${locationLabel}${reset}\n`);
995
-
996
- // Check if target directory exists
997
- if (!fs.existsSync(targetDir)) {
998
- console.log(` ${yellow}⚠${reset} Directory does not exist: ${locationLabel}`);
999
- console.log(` Nothing to uninstall.\n`);
1000
- return;
1001
- }
1002
-
1003
- let removedCount = 0;
1004
-
1005
- // 1. Remove GSD commands/skills
1006
- if (isOpencode) {
1007
- // OpenCode: remove command/gsd-*.md files
1008
- const commandDir = path.join(targetDir, 'command');
1009
- if (fs.existsSync(commandDir)) {
1010
- const files = fs.readdirSync(commandDir);
1011
- for (const file of files) {
1012
- if (file.startsWith('gsd-') && file.endsWith('.md')) {
1013
- fs.unlinkSync(path.join(commandDir, file));
1014
- removedCount++;
1015
- }
1016
- }
1017
- console.log(` ${green}✓${reset} Removed GSD commands from command/`);
1018
- }
1019
- } else if (isCodex) {
1020
- // Codex: remove skills/gsd-*/SKILL.md skill directories
1021
- const skillsDir = path.join(targetDir, 'skills');
1022
- if (fs.existsSync(skillsDir)) {
1023
- let skillCount = 0;
1024
- const entries = fs.readdirSync(skillsDir, { withFileTypes: true });
1025
- for (const entry of entries) {
1026
- if (entry.isDirectory() && entry.name.startsWith('gsd-')) {
1027
- fs.rmSync(path.join(skillsDir, entry.name), { recursive: true });
1028
- skillCount++;
1029
- }
1030
- }
1031
- if (skillCount > 0) {
1032
- removedCount++;
1033
- console.log(` ${green}✓${reset} Removed ${skillCount} Codex skills`);
1034
- }
1035
- }
1036
- } else {
1037
- // Claude Code & Gemini: remove commands/gsd/ directory
1038
- const gsdCommandsDir = path.join(targetDir, 'commands', 'gsd');
1039
- if (fs.existsSync(gsdCommandsDir)) {
1040
- fs.rmSync(gsdCommandsDir, { recursive: true });
1041
- removedCount++;
1042
- console.log(` ${green}✓${reset} Removed commands/gsd/`);
1043
- }
1044
- }
1045
-
1046
- // 2. Remove get-shit-done directory
1047
- const gsdDir = path.join(targetDir, 'get-shit-done');
1048
- if (fs.existsSync(gsdDir)) {
1049
- fs.rmSync(gsdDir, { recursive: true });
1050
- removedCount++;
1051
- console.log(` ${green}✓${reset} Removed get-shit-done/`);
1052
- }
1053
-
1054
- // 3. Remove GSD agents (gsd-*.md files only)
1055
- const agentsDir = path.join(targetDir, 'agents');
1056
- if (fs.existsSync(agentsDir)) {
1057
- const files = fs.readdirSync(agentsDir);
1058
- let agentCount = 0;
1059
- for (const file of files) {
1060
- if (file.startsWith('gsd-') && file.endsWith('.md')) {
1061
- fs.unlinkSync(path.join(agentsDir, file));
1062
- agentCount++;
1063
- }
1064
- }
1065
- if (agentCount > 0) {
1066
- removedCount++;
1067
- console.log(` ${green}✓${reset} Removed ${agentCount} GSD agents`);
1068
- }
1069
- }
1070
-
1071
- // 4. Remove GSD hooks
1072
- const hooksDir = path.join(targetDir, 'hooks');
1073
- if (fs.existsSync(hooksDir)) {
1074
- const gsdHooks = ['gsd-statusline.js', 'gsd-check-update.js', 'gsd-check-update.sh', 'gsd-context-monitor.js'];
1075
- let hookCount = 0;
1076
- for (const hook of gsdHooks) {
1077
- const hookPath = path.join(hooksDir, hook);
1078
- if (fs.existsSync(hookPath)) {
1079
- fs.unlinkSync(hookPath);
1080
- hookCount++;
1081
- }
1082
- }
1083
- if (hookCount > 0) {
1084
- removedCount++;
1085
- console.log(` ${green}✓${reset} Removed ${hookCount} GSD hooks`);
1086
- }
1087
- }
1088
-
1089
- // 5. Remove GSD package.json (CommonJS mode marker)
1090
- const pkgJsonPath = path.join(targetDir, 'package.json');
1091
- if (fs.existsSync(pkgJsonPath)) {
1092
- try {
1093
- const content = fs.readFileSync(pkgJsonPath, 'utf8').trim();
1094
- // Only remove if it's our minimal CommonJS marker
1095
- if (content === '{"type":"commonjs"}') {
1096
- fs.unlinkSync(pkgJsonPath);
1097
- removedCount++;
1098
- console.log(` ${green}✓${reset} Removed GSD package.json`);
1099
- }
1100
- } catch (e) {
1101
- // Ignore read errors
1102
- }
1103
- }
1104
-
1105
- // 6. Clean up settings.json (remove GSD hooks and statusline)
1106
- const settingsPath = path.join(targetDir, 'settings.json');
1107
- if (fs.existsSync(settingsPath)) {
1108
- let settings = readSettings(settingsPath);
1109
- let settingsModified = false;
1110
-
1111
- // Remove GSD statusline if it references our hook
1112
- if (settings.statusLine && settings.statusLine.command &&
1113
- settings.statusLine.command.includes('gsd-statusline')) {
1114
- delete settings.statusLine;
1115
- settingsModified = true;
1116
- console.log(` ${green}✓${reset} Removed GSD statusline from settings`);
1117
- }
1118
-
1119
- // Remove GSD hooks from SessionStart
1120
- if (settings.hooks && settings.hooks.SessionStart) {
1121
- const before = settings.hooks.SessionStart.length;
1122
- settings.hooks.SessionStart = settings.hooks.SessionStart.filter(entry => {
1123
- if (entry.hooks && Array.isArray(entry.hooks)) {
1124
- // Filter out GSD hooks
1125
- const hasGsdHook = entry.hooks.some(h =>
1126
- h.command && (h.command.includes('gsd-check-update') || h.command.includes('gsd-statusline'))
1127
- );
1128
- return !hasGsdHook;
1129
- }
1130
- return true;
1131
- });
1132
- if (settings.hooks.SessionStart.length < before) {
1133
- settingsModified = true;
1134
- console.log(` ${green}✓${reset} Removed GSD hooks from settings`);
1135
- }
1136
- // Clean up empty array
1137
- if (settings.hooks.SessionStart.length === 0) {
1138
- delete settings.hooks.SessionStart;
1139
- }
1140
- }
1141
-
1142
- // Remove GSD hooks from PostToolUse
1143
- if (settings.hooks && settings.hooks.PostToolUse) {
1144
- const before = settings.hooks.PostToolUse.length;
1145
- settings.hooks.PostToolUse = settings.hooks.PostToolUse.filter(entry => {
1146
- if (entry.hooks && Array.isArray(entry.hooks)) {
1147
- const hasGsdHook = entry.hooks.some(h =>
1148
- h.command && h.command.includes('gsd-context-monitor')
1149
- );
1150
- return !hasGsdHook;
1151
- }
1152
- return true;
1153
- });
1154
- if (settings.hooks.PostToolUse.length < before) {
1155
- settingsModified = true;
1156
- console.log(` ${green}✓${reset} Removed context monitor hook from settings`);
1157
- }
1158
- if (settings.hooks.PostToolUse.length === 0) {
1159
- delete settings.hooks.PostToolUse;
1160
- }
1161
- }
1162
-
1163
- // Clean up empty hooks object
1164
- if (settings.hooks && Object.keys(settings.hooks).length === 0) {
1165
- delete settings.hooks;
1166
- }
1167
-
1168
- if (settingsModified) {
1169
- writeSettings(settingsPath, settings);
1170
- removedCount++;
1171
- }
1172
- }
1173
-
1174
- // 6. For OpenCode, clean up permissions from opencode.json
1175
- if (isOpencode) {
1176
- // For local uninstalls, clean up ./.opencode/opencode.json
1177
- // For global uninstalls, clean up ~/.config/opencode/opencode.json
1178
- const opencodeConfigDir = isGlobal
1179
- ? getOpencodeGlobalDir()
1180
- : path.join(process.cwd(), '.opencode');
1181
- const configPath = path.join(opencodeConfigDir, 'opencode.json');
1182
- if (fs.existsSync(configPath)) {
1183
- try {
1184
- const config = JSON.parse(fs.readFileSync(configPath, 'utf8'));
1185
- let modified = false;
1186
-
1187
- // Remove GSD permission entries
1188
- if (config.permission) {
1189
- for (const permType of ['read', 'external_directory']) {
1190
- if (config.permission[permType]) {
1191
- const keys = Object.keys(config.permission[permType]);
1192
- for (const key of keys) {
1193
- if (key.includes('get-shit-done')) {
1194
- delete config.permission[permType][key];
1195
- modified = true;
1196
- }
1197
- }
1198
- // Clean up empty objects
1199
- if (Object.keys(config.permission[permType]).length === 0) {
1200
- delete config.permission[permType];
1201
- }
1202
- }
1203
- }
1204
- if (Object.keys(config.permission).length === 0) {
1205
- delete config.permission;
1206
- }
1207
- }
1208
-
1209
- if (modified) {
1210
- fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n');
1211
- removedCount++;
1212
- console.log(` ${green}✓${reset} Removed GSD permissions from opencode.json`);
1213
- }
1214
- } catch (e) {
1215
- // Ignore JSON parse errors
1216
- }
1217
- }
1218
- }
1219
-
1220
- if (removedCount === 0) {
1221
- console.log(` ${yellow}⚠${reset} No GSD files found to remove.`);
1222
- }
1223
-
1224
- console.log(`
1225
- ${green}Done!${reset} GSD has been uninstalled from ${runtimeLabel}.
1226
- Your other files and settings have been preserved.
1227
- `);
1228
- }
1229
-
1230
- /**
1231
- * Parse JSONC (JSON with Comments) by stripping comments and trailing commas.
1232
- * OpenCode supports JSONC format via jsonc-parser, so users may have comments.
1233
- * This is a lightweight inline parser to avoid adding dependencies.
1234
- */
1235
- function parseJsonc(content) {
1236
- // Strip BOM if present
1237
- if (content.charCodeAt(0) === 0xFEFF) {
1238
- content = content.slice(1);
1239
- }
1240
-
1241
- // Remove single-line and block comments while preserving strings
1242
- let result = '';
1243
- let inString = false;
1244
- let i = 0;
1245
- while (i < content.length) {
1246
- const char = content[i];
1247
- const next = content[i + 1];
1248
-
1249
- if (inString) {
1250
- result += char;
1251
- // Handle escape sequences
1252
- if (char === '\\' && i + 1 < content.length) {
1253
- result += next;
1254
- i += 2;
1255
- continue;
1256
- }
1257
- if (char === '"') {
1258
- inString = false;
1259
- }
1260
- i++;
1261
- } else {
1262
- if (char === '"') {
1263
- inString = true;
1264
- result += char;
1265
- i++;
1266
- } else if (char === '/' && next === '/') {
1267
- // Skip single-line comment until end of line
1268
- while (i < content.length && content[i] !== '\n') {
1269
- i++;
1270
- }
1271
- } else if (char === '/' && next === '*') {
1272
- // Skip block comment
1273
- i += 2;
1274
- while (i < content.length - 1 && !(content[i] === '*' && content[i + 1] === '/')) {
1275
- i++;
1276
- }
1277
- i += 2; // Skip closing */
1278
- } else {
1279
- result += char;
1280
- i++;
1281
- }
1282
- }
1283
- }
1284
-
1285
- // Remove trailing commas before } or ]
1286
- result = result.replace(/,(\s*[}\]])/g, '$1');
1287
-
1288
- return JSON.parse(result);
1289
- }
1290
-
1291
- /**
1292
- * Configure OpenCode permissions to allow reading GSD reference docs
1293
- * This prevents permission prompts when GSD accesses the get-shit-done directory
1294
- * @param {boolean} isGlobal - Whether this is a global or local install
1295
- */
1296
- function configureOpencodePermissions(isGlobal = true) {
1297
- // For local installs, use ./.opencode/opencode.json
1298
- // For global installs, use ~/.config/opencode/opencode.json
1299
- const opencodeConfigDir = isGlobal
1300
- ? getOpencodeGlobalDir()
1301
- : path.join(process.cwd(), '.opencode');
1302
- const configPath = path.join(opencodeConfigDir, 'opencode.json');
1303
-
1304
- // Ensure config directory exists
1305
- fs.mkdirSync(opencodeConfigDir, { recursive: true });
1306
-
1307
- // Read existing config or create empty object
1308
- let config = {};
1309
- if (fs.existsSync(configPath)) {
1310
- try {
1311
- const content = fs.readFileSync(configPath, 'utf8');
1312
- config = parseJsonc(content);
1313
- } catch (e) {
1314
- // Cannot parse - DO NOT overwrite user's config
1315
- console.log(` ${yellow}⚠${reset} Could not parse opencode.json - skipping permission config`);
1316
- console.log(` ${dim}Reason: ${e.message}${reset}`);
1317
- console.log(` ${dim}Your config was NOT modified. Fix the syntax manually if needed.${reset}`);
1318
- return;
1319
- }
1320
- }
1321
-
1322
- // Ensure permission structure exists
1323
- if (!config.permission) {
1324
- config.permission = {};
1325
- }
1326
-
1327
- // Build the GSD path using the actual config directory
1328
- // Use ~ shorthand if it's in the default location, otherwise use full path
1329
- const defaultConfigDir = path.join(os.homedir(), '.config', 'opencode');
1330
- const gsdPath = opencodeConfigDir === defaultConfigDir
1331
- ? '~/.config/opencode/get-shit-done/*'
1332
- : `${opencodeConfigDir.replace(/\\/g, '/')}/get-shit-done/*`;
1333
-
1334
- let modified = false;
1335
-
1336
- // Configure read permission
1337
- if (!config.permission.read || typeof config.permission.read !== 'object') {
1338
- config.permission.read = {};
1339
- }
1340
- if (config.permission.read[gsdPath] !== 'allow') {
1341
- config.permission.read[gsdPath] = 'allow';
1342
- modified = true;
1343
- }
1344
-
1345
- // Configure external_directory permission (the safety guard for paths outside project)
1346
- if (!config.permission.external_directory || typeof config.permission.external_directory !== 'object') {
1347
- config.permission.external_directory = {};
1348
- }
1349
- if (config.permission.external_directory[gsdPath] !== 'allow') {
1350
- config.permission.external_directory[gsdPath] = 'allow';
1351
- modified = true;
1352
- }
1353
-
1354
- if (!modified) {
1355
- return; // Already configured
1356
- }
1357
-
1358
- // Write config back
1359
- fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n');
1360
- console.log(` ${green}✓${reset} Configured read permission for GSD docs`);
1361
- }
1362
-
1363
- /**
1364
- * Verify a directory exists and contains files
1365
- */
1366
- function verifyInstalled(dirPath, description) {
1367
- if (!fs.existsSync(dirPath)) {
1368
- console.error(` ${yellow}✗${reset} Failed to install ${description}: directory not created`);
1369
- return false;
1370
- }
1371
- try {
1372
- const entries = fs.readdirSync(dirPath);
1373
- if (entries.length === 0) {
1374
- console.error(` ${yellow}✗${reset} Failed to install ${description}: directory is empty`);
1375
- return false;
1376
- }
1377
- } catch (e) {
1378
- console.error(` ${yellow}✗${reset} Failed to install ${description}: ${e.message}`);
1379
- return false;
1380
- }
1381
- return true;
1382
- }
1383
-
1384
- /**
1385
- * Verify a file exists
1386
- */
1387
- function verifyFileInstalled(filePath, description) {
1388
- if (!fs.existsSync(filePath)) {
1389
- console.error(` ${yellow}✗${reset} Failed to install ${description}: file not created`);
1390
- return false;
1391
- }
1392
- return true;
1393
- }
1394
-
1395
- /**
1396
- * Install to the specified directory for a specific runtime
1397
- * @param {boolean} isGlobal - Whether to install globally or locally
1398
- * @param {string} runtime - Target runtime ('claude', 'opencode', 'gemini', 'codex')
1399
- */
1400
-
1401
- // ──────────────────────────────────────────────────────
1402
- // Local Patch Persistence
1403
- // ──────────────────────────────────────────────────────
1404
-
1405
- const PATCHES_DIR_NAME = 'gsd-local-patches';
1406
- const MANIFEST_NAME = 'gsd-file-manifest.json';
1407
-
1408
- /**
1409
- * Compute SHA256 hash of file contents
1410
- */
1411
- function fileHash(filePath) {
1412
- const content = fs.readFileSync(filePath);
1413
- return crypto.createHash('sha256').update(content).digest('hex');
1414
- }
1415
-
1416
- /**
1417
- * Recursively collect all files in dir with their hashes
1418
- */
1419
- function generateManifest(dir, baseDir) {
1420
- if (!baseDir) baseDir = dir;
1421
- const manifest = {};
1422
- if (!fs.existsSync(dir)) return manifest;
1423
- const entries = fs.readdirSync(dir, { withFileTypes: true });
1424
- for (const entry of entries) {
1425
- const fullPath = path.join(dir, entry.name);
1426
- const relPath = path.relative(baseDir, fullPath).replace(/\\/g, '/');
1427
- if (entry.isDirectory()) {
1428
- Object.assign(manifest, generateManifest(fullPath, baseDir));
1429
- } else {
1430
- manifest[relPath] = fileHash(fullPath);
1431
- }
1432
- }
1433
- return manifest;
1434
- }
1435
-
1436
- /**
1437
- * Write file manifest after installation for future modification detection
1438
- */
1439
- function writeManifest(configDir, runtime = 'claude') {
1440
- const isOpencode = runtime === 'opencode';
1441
- const isCodex = runtime === 'codex';
1442
- const gsdDir = path.join(configDir, 'get-shit-done');
1443
- const commandsDir = path.join(configDir, 'commands', 'gsd');
1444
- const opencodeCommandDir = path.join(configDir, 'command');
1445
- const codexSkillsDir = path.join(configDir, 'skills');
1446
- const agentsDir = path.join(configDir, 'agents');
1447
- const manifest = { version: pkg.version, timestamp: new Date().toISOString(), files: {} };
1448
-
1449
- const gsdHashes = generateManifest(gsdDir);
1450
- for (const [rel, hash] of Object.entries(gsdHashes)) {
1451
- manifest.files['get-shit-done/' + rel] = hash;
1452
- }
1453
- if (!isOpencode && !isCodex && fs.existsSync(commandsDir)) {
1454
- const cmdHashes = generateManifest(commandsDir);
1455
- for (const [rel, hash] of Object.entries(cmdHashes)) {
1456
- manifest.files['commands/gsd/' + rel] = hash;
1457
- }
1458
- }
1459
- if (isOpencode && fs.existsSync(opencodeCommandDir)) {
1460
- for (const file of fs.readdirSync(opencodeCommandDir)) {
1461
- if (file.startsWith('gsd-') && file.endsWith('.md')) {
1462
- manifest.files['command/' + file] = fileHash(path.join(opencodeCommandDir, file));
1463
- }
1464
- }
1465
- }
1466
- if (isCodex && fs.existsSync(codexSkillsDir)) {
1467
- for (const skillName of listCodexSkillNames(codexSkillsDir)) {
1468
- const skillRoot = path.join(codexSkillsDir, skillName);
1469
- const skillHashes = generateManifest(skillRoot);
1470
- for (const [rel, hash] of Object.entries(skillHashes)) {
1471
- manifest.files[`skills/${skillName}/${rel}`] = hash;
1472
- }
1473
- }
1474
- }
1475
- if (fs.existsSync(agentsDir)) {
1476
- for (const file of fs.readdirSync(agentsDir)) {
1477
- if (file.startsWith('gsd-') && file.endsWith('.md')) {
1478
- manifest.files['agents/' + file] = fileHash(path.join(agentsDir, file));
1479
- }
1480
- }
1481
- }
1482
-
1483
- fs.writeFileSync(path.join(configDir, MANIFEST_NAME), JSON.stringify(manifest, null, 2));
1484
- return manifest;
1485
- }
1486
-
1487
- /**
1488
- * Detect user-modified GSD files by comparing against install manifest.
1489
- * Backs up modified files to gsd-local-patches/ for reapply after update.
1490
- */
1491
- function saveLocalPatches(configDir) {
1492
- const manifestPath = path.join(configDir, MANIFEST_NAME);
1493
- if (!fs.existsSync(manifestPath)) return [];
1494
-
1495
- let manifest;
1496
- try { manifest = JSON.parse(fs.readFileSync(manifestPath, 'utf8')); } catch { return []; }
1497
-
1498
- const patchesDir = path.join(configDir, PATCHES_DIR_NAME);
1499
- const modified = [];
1500
-
1501
- for (const [relPath, originalHash] of Object.entries(manifest.files || {})) {
1502
- const fullPath = path.join(configDir, relPath);
1503
- if (!fs.existsSync(fullPath)) continue;
1504
- const currentHash = fileHash(fullPath);
1505
- if (currentHash !== originalHash) {
1506
- const backupPath = path.join(patchesDir, relPath);
1507
- fs.mkdirSync(path.dirname(backupPath), { recursive: true });
1508
- fs.copyFileSync(fullPath, backupPath);
1509
- modified.push(relPath);
1510
- }
1511
- }
1512
-
1513
- if (modified.length > 0) {
1514
- const meta = {
1515
- backed_up_at: new Date().toISOString(),
1516
- from_version: manifest.version,
1517
- files: modified
1518
- };
1519
- fs.writeFileSync(path.join(patchesDir, 'backup-meta.json'), JSON.stringify(meta, null, 2));
1520
- console.log(' ' + yellow + 'i' + reset + ' Found ' + modified.length + ' locally modified GSD file(s) — backed up to ' + PATCHES_DIR_NAME + '/');
1521
- for (const f of modified) {
1522
- console.log(' ' + dim + f + reset);
1523
- }
1524
- }
1525
- return modified;
1526
- }
1527
-
1528
- /**
1529
- * After install, report backed-up patches for user to reapply.
1530
- */
1531
- function reportLocalPatches(configDir, runtime = 'claude') {
1532
- const patchesDir = path.join(configDir, PATCHES_DIR_NAME);
1533
- const metaPath = path.join(patchesDir, 'backup-meta.json');
1534
- if (!fs.existsSync(metaPath)) return [];
1535
-
1536
- let meta;
1537
- try { meta = JSON.parse(fs.readFileSync(metaPath, 'utf8')); } catch { return []; }
1538
-
1539
- if (meta.files && meta.files.length > 0) {
1540
- const reapplyCommand = runtime === 'opencode'
1541
- ? '/gsd-reapply-patches'
1542
- : runtime === 'codex'
1543
- ? '$gsd-reapply-patches'
1544
- : '/gsd:reapply-patches';
1545
- console.log('');
1546
- console.log(' ' + yellow + 'Local patches detected' + reset + ' (from v' + meta.from_version + '):');
1547
- for (const f of meta.files) {
1548
- console.log(' ' + cyan + f + reset);
1549
- }
1550
- console.log('');
1551
- console.log(' Your modifications are saved in ' + cyan + PATCHES_DIR_NAME + '/' + reset);
1552
- console.log(' Run ' + cyan + reapplyCommand + reset + ' to merge them into the new version.');
1553
- console.log(' Or manually compare and merge the files.');
1554
- console.log('');
1555
- }
1556
- return meta.files || [];
1557
- }
1558
-
1559
- function install(isGlobal, runtime = 'claude') {
1560
- const isOpencode = runtime === 'opencode';
1561
- const isGemini = runtime === 'gemini';
1562
- const isCodex = runtime === 'codex';
1563
- const dirName = getDirName(runtime);
1564
- const src = path.join(__dirname, '..');
1565
-
1566
- // Get the target directory based on runtime and install type
1567
- const targetDir = isGlobal
1568
- ? getGlobalDir(runtime, explicitConfigDir)
1569
- : path.join(process.cwd(), dirName);
1570
-
1571
- const locationLabel = isGlobal
1572
- ? targetDir.replace(os.homedir(), '~')
1573
- : targetDir.replace(process.cwd(), '.');
1574
-
1575
- // Path prefix for file references in markdown content
1576
- // For global installs: use full path
1577
- // For local installs: use relative
1578
- const pathPrefix = isGlobal
1579
- ? `${targetDir.replace(/\\/g, '/')}/`
1580
- : `./${dirName}/`;
1581
-
1582
- let runtimeLabel = 'Claude Code';
1583
- if (isOpencode) runtimeLabel = 'OpenCode';
1584
- if (isGemini) runtimeLabel = 'Gemini';
1585
- if (isCodex) runtimeLabel = 'Codex';
1586
-
1587
- console.log(` Installing for ${cyan}${runtimeLabel}${reset} to ${cyan}${locationLabel}${reset}\n`);
1588
-
1589
- // Track installation failures
1590
- const failures = [];
1591
-
1592
- // Save any locally modified GSD files before they get wiped
1593
- saveLocalPatches(targetDir);
1594
-
1595
- // Clean up orphaned files from previous versions
1596
- cleanupOrphanedFiles(targetDir);
1597
-
1598
- // OpenCode uses command/ (flat), Codex uses skills/, Claude/Gemini use commands/gsd/
1599
- if (isOpencode) {
1600
- // OpenCode: flat structure in command/ directory
1601
- const commandDir = path.join(targetDir, 'command');
1602
- fs.mkdirSync(commandDir, { recursive: true });
1603
-
1604
- // Copy commands/gsd/*.md as command/gsd-*.md (flatten structure)
1605
- const gsdSrc = path.join(src, 'commands', 'gsd');
1606
- copyFlattenedCommands(gsdSrc, commandDir, 'gsd', pathPrefix, runtime);
1607
- if (verifyInstalled(commandDir, 'command/gsd-*')) {
1608
- const count = fs.readdirSync(commandDir).filter(f => f.startsWith('gsd-')).length;
1609
- console.log(` ${green}✓${reset} Installed ${count} commands to command/`);
1610
- } else {
1611
- failures.push('command/gsd-*');
1612
- }
1613
- } else if (isCodex) {
1614
- const skillsDir = path.join(targetDir, 'skills');
1615
- const gsdSrc = path.join(src, 'commands', 'gsd');
1616
- copyCommandsAsCodexSkills(gsdSrc, skillsDir, 'gsd', pathPrefix, runtime);
1617
- const installedSkillNames = listCodexSkillNames(skillsDir);
1618
- if (installedSkillNames.length > 0) {
1619
- console.log(` ${green}✓${reset} Installed ${installedSkillNames.length} skills to skills/`);
1620
- } else {
1621
- failures.push('skills/gsd-*');
1622
- }
1623
- } else {
1624
- // Claude Code & Gemini: nested structure in commands/ directory
1625
- const commandsDir = path.join(targetDir, 'commands');
1626
- fs.mkdirSync(commandsDir, { recursive: true });
1627
-
1628
- const gsdSrc = path.join(src, 'commands', 'gsd');
1629
- const gsdDest = path.join(commandsDir, 'gsd');
1630
- copyWithPathReplacement(gsdSrc, gsdDest, pathPrefix, runtime, true);
1631
- if (verifyInstalled(gsdDest, 'commands/gsd')) {
1632
- console.log(` ${green}✓${reset} Installed commands/gsd`);
1633
- } else {
1634
- failures.push('commands/gsd');
1635
- }
1636
- }
1637
-
1638
- // Copy get-shit-done skill with path replacement
1639
- const skillSrc = path.join(src, 'get-shit-done');
1640
- const skillDest = path.join(targetDir, 'get-shit-done');
1641
- copyWithPathReplacement(skillSrc, skillDest, pathPrefix, runtime);
1642
- if (verifyInstalled(skillDest, 'get-shit-done')) {
1643
- console.log(` ${green}✓${reset} Installed get-shit-done`);
1644
- } else {
1645
- failures.push('get-shit-done');
1646
- }
1647
-
1648
- // Copy agents to agents directory
1649
- const agentsSrc = path.join(src, 'agents');
1650
- if (fs.existsSync(agentsSrc)) {
1651
- const agentsDest = path.join(targetDir, 'agents');
1652
- fs.mkdirSync(agentsDest, { recursive: true });
1653
-
1654
- // Remove old GSD agents (gsd-*.md) before copying new ones
1655
- if (fs.existsSync(agentsDest)) {
1656
- for (const file of fs.readdirSync(agentsDest)) {
1657
- if (file.startsWith('gsd-') && file.endsWith('.md')) {
1658
- fs.unlinkSync(path.join(agentsDest, file));
1659
- }
1660
- }
1661
- }
1662
-
1663
- // Copy new agents
1664
- const agentEntries = fs.readdirSync(agentsSrc, { withFileTypes: true });
1665
- for (const entry of agentEntries) {
1666
- if (entry.isFile() && entry.name.endsWith('.md')) {
1667
- let content = fs.readFileSync(path.join(agentsSrc, entry.name), 'utf8');
1668
- // Always replace ~/.claude/ as it is the source of truth in the repo
1669
- const dirRegex = /~\/\.claude\//g;
1670
- content = content.replace(dirRegex, pathPrefix);
1671
- content = processAttribution(content, getCommitAttribution(runtime));
1672
- // Convert frontmatter for runtime compatibility
1673
- if (isOpencode) {
1674
- content = convertClaudeToOpencodeFrontmatter(content);
1675
- } else if (isGemini) {
1676
- content = convertClaudeToGeminiAgent(content);
1677
- } else if (isCodex) {
1678
- content = convertClaudeToCodexMarkdown(content);
1679
- }
1680
- fs.writeFileSync(path.join(agentsDest, entry.name), content);
1681
- }
1682
- }
1683
- if (verifyInstalled(agentsDest, 'agents')) {
1684
- console.log(` ${green}✓${reset} Installed agents`);
1685
- } else {
1686
- failures.push('agents');
1687
- }
1688
- }
1689
-
1690
- // Copy CHANGELOG.md
1691
- const changelogSrc = path.join(src, 'CHANGELOG.md');
1692
- const changelogDest = path.join(targetDir, 'get-shit-done', 'CHANGELOG.md');
1693
- if (fs.existsSync(changelogSrc)) {
1694
- fs.copyFileSync(changelogSrc, changelogDest);
1695
- if (verifyFileInstalled(changelogDest, 'CHANGELOG.md')) {
1696
- console.log(` ${green}✓${reset} Installed CHANGELOG.md`);
1697
- } else {
1698
- failures.push('CHANGELOG.md');
1699
- }
1700
- }
1701
-
1702
- // Write VERSION file
1703
- const versionDest = path.join(targetDir, 'get-shit-done', 'VERSION');
1704
- fs.writeFileSync(versionDest, pkg.version);
1705
- if (verifyFileInstalled(versionDest, 'VERSION')) {
1706
- console.log(` ${green}✓${reset} Wrote VERSION (${pkg.version})`);
1707
- } else {
1708
- failures.push('VERSION');
1709
- }
1710
-
1711
- if (!isCodex) {
1712
- // Write package.json to force CommonJS mode for GSD scripts
1713
- // Prevents "require is not defined" errors when project has "type": "module"
1714
- // Node.js walks up looking for package.json - this stops inheritance from project
1715
- const pkgJsonDest = path.join(targetDir, 'package.json');
1716
- fs.writeFileSync(pkgJsonDest, '{"type":"commonjs"}\n');
1717
- console.log(` ${green}✓${reset} Wrote package.json (CommonJS mode)`);
1718
-
1719
- // Copy hooks from dist/ (bundled with dependencies)
1720
- // Template paths for the target runtime (replaces '.claude' with correct config dir)
1721
- const hooksSrc = path.join(src, 'hooks', 'dist');
1722
- if (fs.existsSync(hooksSrc)) {
1723
- const hooksDest = path.join(targetDir, 'hooks');
1724
- fs.mkdirSync(hooksDest, { recursive: true });
1725
- const hookEntries = fs.readdirSync(hooksSrc);
1726
- const configDirReplacement = getConfigDirFromHome(runtime, isGlobal);
1727
- for (const entry of hookEntries) {
1728
- const srcFile = path.join(hooksSrc, entry);
1729
- if (fs.statSync(srcFile).isFile()) {
1730
- const destFile = path.join(hooksDest, entry);
1731
- // Template .js files to replace '.claude' with runtime-specific config dir
1732
- if (entry.endsWith('.js')) {
1733
- let content = fs.readFileSync(srcFile, 'utf8');
1734
- content = content.replace(/'\.claude'/g, configDirReplacement);
1735
- fs.writeFileSync(destFile, content);
1736
- } else {
1737
- fs.copyFileSync(srcFile, destFile);
1738
- }
1739
- }
1740
- }
1741
- if (verifyInstalled(hooksDest, 'hooks')) {
1742
- console.log(` ${green}✓${reset} Installed hooks (bundled)`);
1743
- } else {
1744
- failures.push('hooks');
1745
- }
1746
- }
1747
- }
1748
-
1749
- if (failures.length > 0) {
1750
- console.error(`\n ${yellow}Installation incomplete!${reset} Failed: ${failures.join(', ')}`);
1751
- process.exit(1);
1752
- }
1753
-
1754
- // Write file manifest for future modification detection
1755
- writeManifest(targetDir, runtime);
1756
- console.log(` ${green}✓${reset} Wrote file manifest (${MANIFEST_NAME})`);
1757
-
1758
- // Report any backed-up local patches
1759
- reportLocalPatches(targetDir, runtime);
1760
-
1761
- if (isCodex) {
1762
- return { settingsPath: null, settings: null, statuslineCommand: null, runtime };
1763
- }
1764
-
1765
- // Configure statusline and hooks in settings.json
1766
- // Gemini shares same hook system as Claude Code for now
1767
- const settingsPath = path.join(targetDir, 'settings.json');
1768
- const settings = cleanupOrphanedHooks(readSettings(settingsPath));
1769
- const statuslineCommand = isGlobal
1770
- ? buildHookCommand(targetDir, 'gsd-statusline.js')
1771
- : 'node ' + dirName + '/hooks/gsd-statusline.js';
1772
- const updateCheckCommand = isGlobal
1773
- ? buildHookCommand(targetDir, 'gsd-check-update.js')
1774
- : 'node ' + dirName + '/hooks/gsd-check-update.js';
1775
- const contextMonitorCommand = isGlobal
1776
- ? buildHookCommand(targetDir, 'gsd-context-monitor.js')
1777
- : 'node ' + dirName + '/hooks/gsd-context-monitor.js';
1778
-
1779
- // Enable experimental agents for Gemini CLI (required for custom sub-agents)
1780
- if (isGemini) {
1781
- if (!settings.experimental) {
1782
- settings.experimental = {};
1783
- }
1784
- if (!settings.experimental.enableAgents) {
1785
- settings.experimental.enableAgents = true;
1786
- console.log(` ${green}✓${reset} Enabled experimental agents`);
1787
- }
1788
- }
1789
-
1790
- // Configure SessionStart hook for update checking (skip for opencode)
1791
- if (!isOpencode) {
1792
- if (!settings.hooks) {
1793
- settings.hooks = {};
1794
- }
1795
- if (!settings.hooks.SessionStart) {
1796
- settings.hooks.SessionStart = [];
1797
- }
1798
-
1799
- const hasGsdUpdateHook = settings.hooks.SessionStart.some(entry =>
1800
- entry.hooks && entry.hooks.some(h => h.command && h.command.includes('gsd-check-update'))
1801
- );
1802
-
1803
- if (!hasGsdUpdateHook) {
1804
- settings.hooks.SessionStart.push({
1805
- hooks: [
1806
- {
1807
- type: 'command',
1808
- command: updateCheckCommand
1809
- }
1810
- ]
1811
- });
1812
- console.log(` ${green}✓${reset} Configured update check hook`);
1813
- }
1814
-
1815
- // Configure PostToolUse hook for context window monitoring
1816
- if (!settings.hooks.PostToolUse) {
1817
- settings.hooks.PostToolUse = [];
1818
- }
1819
-
1820
- const hasContextMonitorHook = settings.hooks.PostToolUse.some(entry =>
1821
- entry.hooks && entry.hooks.some(h => h.command && h.command.includes('gsd-context-monitor'))
1822
- );
1823
-
1824
- if (!hasContextMonitorHook) {
1825
- settings.hooks.PostToolUse.push({
1826
- hooks: [
1827
- {
1828
- type: 'command',
1829
- command: contextMonitorCommand
1830
- }
1831
- ]
1832
- });
1833
- console.log(` ${green}✓${reset} Configured context window monitor hook`);
1834
- }
1835
- }
1836
-
1837
- return { settingsPath, settings, statuslineCommand, runtime };
1838
- }
1839
-
1840
- /**
1841
- * Apply statusline config, then print completion message
1842
- */
1843
- function finishInstall(settingsPath, settings, statuslineCommand, shouldInstallStatusline, runtime = 'claude', isGlobal = true) {
1844
- const isOpencode = runtime === 'opencode';
1845
- const isCodex = runtime === 'codex';
1846
-
1847
- if (shouldInstallStatusline && !isOpencode && !isCodex) {
1848
- settings.statusLine = {
1849
- type: 'command',
1850
- command: statuslineCommand
1851
- };
1852
- console.log(` ${green}✓${reset} Configured statusline`);
1853
- }
1854
-
1855
- // Write settings when runtime supports settings.json
1856
- if (!isCodex) {
1857
- writeSettings(settingsPath, settings);
1858
- }
1859
-
1860
- // Configure OpenCode permissions
1861
- if (isOpencode) {
1862
- configureOpencodePermissions(isGlobal);
1863
- }
1864
-
1865
- let program = 'Claude Code';
1866
- if (runtime === 'opencode') program = 'OpenCode';
1867
- if (runtime === 'gemini') program = 'Gemini';
1868
- if (runtime === 'codex') program = 'Codex';
1869
-
1870
- let command = '/gsd:help';
1871
- if (runtime === 'opencode') command = '/gsd-help';
1872
- if (runtime === 'codex') command = '$gsd-help';
1873
- console.log(`
1874
- ${green}Done!${reset} Launch ${program} and run ${cyan}${command}${reset}.
1875
-
1876
- ${cyan}Join the community:${reset} https://discord.gg/5JJgD5svVS
1877
- `);
1878
- }
1879
-
1880
- /**
1881
- * Handle statusline configuration with optional prompt
1882
- */
1883
- function handleStatusline(settings, isInteractive, callback) {
1884
- const hasExisting = settings.statusLine != null;
1885
-
1886
- if (!hasExisting) {
1887
- callback(true);
1888
- return;
1889
- }
1890
-
1891
- if (forceStatusline) {
1892
- callback(true);
1893
- return;
1894
- }
1895
-
1896
- if (!isInteractive) {
1897
- console.log(` ${yellow}⚠${reset} Skipping statusline (already configured)`);
1898
- console.log(` Use ${cyan}--force-statusline${reset} to replace\n`);
1899
- callback(false);
1900
- return;
1901
- }
1902
-
1903
- const existingCmd = settings.statusLine.command || settings.statusLine.url || '(custom)';
1904
-
1905
- const rl = readline.createInterface({
1906
- input: process.stdin,
1907
- output: process.stdout
1908
- });
1909
-
1910
- console.log(`
1911
- ${yellow}⚠${reset} Existing statusline detected\n
1912
- Your current statusline:
1913
- ${dim}command: ${existingCmd}${reset}
1914
-
1915
- GSD includes a statusline showing:
1916
- • Model name
1917
- • Current task (from todo list)
1918
- • Context window usage (color-coded)
1919
-
1920
- ${cyan}1${reset}) Keep existing
1921
- ${cyan}2${reset}) Replace with GSD statusline
1922
- `);
1923
-
1924
- rl.question(` Choice ${dim}[1]${reset}: `, (answer) => {
1925
- rl.close();
1926
- const choice = answer.trim() || '1';
1927
- callback(choice === '2');
1928
- });
1929
- }
1930
-
1931
- /**
1932
- * Prompt for runtime selection
1933
- */
1934
- function promptRuntime(callback) {
1935
- const rl = readline.createInterface({
1936
- input: process.stdin,
1937
- output: process.stdout
1938
- });
1939
-
1940
- let answered = false;
1941
-
1942
- rl.on('close', () => {
1943
- if (!answered) {
1944
- answered = true;
1945
- console.log(`\n ${yellow}Installation cancelled${reset}\n`);
1946
- process.exit(0);
1947
- }
1948
- });
1949
-
1950
- console.log(` ${yellow}Which runtime(s) would you like to install for?${reset}\n\n ${cyan}1${reset}) Claude Code ${dim}(~/.claude)${reset}
1951
- ${cyan}2${reset}) OpenCode ${dim}(~/.config/opencode)${reset} - open source, free models
1952
- ${cyan}3${reset}) Gemini ${dim}(~/.gemini)${reset}
1953
- ${cyan}4${reset}) Codex ${dim}(~/.codex)${reset}
1954
- ${cyan}5${reset}) All
1955
- `);
1956
-
1957
- rl.question(` Choice ${dim}[1]${reset}: `, (answer) => {
1958
- answered = true;
1959
- rl.close();
1960
- const choice = answer.trim() || '1';
1961
- if (choice === '5') {
1962
- callback(['claude', 'opencode', 'gemini', 'codex']);
1963
- } else if (choice === '4') {
1964
- callback(['codex']);
1965
- } else if (choice === '3') {
1966
- callback(['gemini']);
1967
- } else if (choice === '2') {
1968
- callback(['opencode']);
1969
- } else {
1970
- callback(['claude']);
1971
- }
1972
- });
1973
- }
1974
-
1975
- /**
1976
- * Prompt for install location
1977
- */
1978
- function promptLocation(runtimes) {
1979
- if (!process.stdin.isTTY) {
1980
- console.log(` ${yellow}Non-interactive terminal detected, defaulting to global install${reset}\n`);
1981
- installAllRuntimes(runtimes, true, false);
1982
- return;
1983
- }
1984
-
1985
- const rl = readline.createInterface({
1986
- input: process.stdin,
1987
- output: process.stdout
1988
- });
1989
-
1990
- let answered = false;
1991
-
1992
- rl.on('close', () => {
1993
- if (!answered) {
1994
- answered = true;
1995
- console.log(`\n ${yellow}Installation cancelled${reset}\n`);
1996
- process.exit(0);
1997
- }
1998
- });
1999
-
2000
- const pathExamples = runtimes.map(r => {
2001
- const globalPath = getGlobalDir(r, explicitConfigDir);
2002
- return globalPath.replace(os.homedir(), '~');
2003
- }).join(', ');
2004
-
2005
- const localExamples = runtimes.map(r => `./${getDirName(r)}`).join(', ');
2006
-
2007
- console.log(` ${yellow}Where would you like to install?${reset}\n\n ${cyan}1${reset}) Global ${dim}(${pathExamples})${reset} - available in all projects
2008
- ${cyan}2${reset}) Local ${dim}(${localExamples})${reset} - this project only
2009
- `);
2010
-
2011
- rl.question(` Choice ${dim}[1]${reset}: `, (answer) => {
2012
- answered = true;
2013
- rl.close();
2014
- const choice = answer.trim() || '1';
2015
- const isGlobal = choice !== '2';
2016
- installAllRuntimes(runtimes, isGlobal, true);
2017
- });
2018
- }
2019
-
2020
- /**
2021
- * Install GSD for all selected runtimes
2022
- */
2023
- function installAllRuntimes(runtimes, isGlobal, isInteractive) {
2024
- const results = [];
2025
-
2026
- for (const runtime of runtimes) {
2027
- const result = install(isGlobal, runtime);
2028
- results.push(result);
2029
- }
2030
-
2031
- const statuslineRuntimes = ['claude', 'gemini'];
2032
- const primaryStatuslineResult = results.find(r => statuslineRuntimes.includes(r.runtime));
2033
-
2034
- const finalize = (shouldInstallStatusline) => {
2035
- for (const result of results) {
2036
- const useStatusline = statuslineRuntimes.includes(result.runtime) && shouldInstallStatusline;
2037
- finishInstall(
2038
- result.settingsPath,
2039
- result.settings,
2040
- result.statuslineCommand,
2041
- useStatusline,
2042
- result.runtime,
2043
- isGlobal
2044
- );
2045
- }
2046
- };
2047
-
2048
- if (primaryStatuslineResult) {
2049
- handleStatusline(primaryStatuslineResult.settings, isInteractive, finalize);
2050
- } else {
2051
- finalize(false);
2052
- }
2053
- }
2054
-
2055
- // Main logic
2056
- if (hasGlobal && hasLocal) {
2057
- console.error(` ${yellow}Cannot specify both --global and --local${reset}`);
2058
- process.exit(1);
2059
- } else if (explicitConfigDir && hasLocal) {
2060
- console.error(` ${yellow}Cannot use --config-dir with --local${reset}`);
2061
- process.exit(1);
2062
- } else if (hasUninstall) {
2063
- if (!hasGlobal && !hasLocal) {
2064
- console.error(` ${yellow}--uninstall requires --global or --local${reset}`);
2065
- process.exit(1);
2066
- }
2067
- const runtimes = selectedRuntimes.length > 0 ? selectedRuntimes : ['claude'];
2068
- for (const runtime of runtimes) {
2069
- uninstall(hasGlobal, runtime);
2070
- }
2071
- } else if (selectedRuntimes.length > 0) {
2072
- if (!hasGlobal && !hasLocal) {
2073
- promptLocation(selectedRuntimes);
2074
- } else {
2075
- installAllRuntimes(selectedRuntimes, hasGlobal, false);
2076
- }
2077
- } else if (hasGlobal || hasLocal) {
2078
- // Default to Claude if no runtime specified but location is
2079
- installAllRuntimes(['claude'], hasGlobal, false);
2080
- } else {
2081
- // Interactive
2082
- if (!process.stdin.isTTY) {
2083
- console.log(` ${yellow}Non-interactive terminal detected, defaulting to Claude Code global install${reset}\n`);
2084
- installAllRuntimes(['claude'], true, false);
2085
- } else {
2086
- promptRuntime((runtimes) => {
2087
- promptLocation(runtimes);
2088
- });
2089
- }
2090
- }