@walwal-harness/cli 6.1.6 → 7.1.1

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 (318) hide show
  1. package/HR-Resource/academic-academic-anthropologist/SKILL.md +142 -0
  2. package/HR-Resource/academic-academic-geographer/SKILL.md +144 -0
  3. package/HR-Resource/academic-academic-historian/SKILL.md +140 -0
  4. package/HR-Resource/academic-academic-narratologist/SKILL.md +135 -0
  5. package/HR-Resource/academic-academic-psychologist/SKILL.md +135 -0
  6. package/HR-Resource/brick-office/SKILL.md +20 -0
  7. package/HR-Resource/cdo/SKILL.md +33 -0
  8. package/HR-Resource/ceo/SKILL.md +47 -0
  9. package/HR-Resource/coo/SKILL.md +36 -0
  10. package/HR-Resource/cqo/SKILL.md +33 -0
  11. package/HR-Resource/cto/SKILL.md +36 -0
  12. package/HR-Resource/design-design-brand-guardian/SKILL.md +339 -0
  13. package/HR-Resource/design-design-image-prompt-engineer/SKILL.md +253 -0
  14. package/HR-Resource/design-design-inclusive-visuals-specialist/SKILL.md +88 -0
  15. package/HR-Resource/design-design-ui-designer/SKILL.md +400 -0
  16. package/HR-Resource/design-design-ux-architect/SKILL.md +486 -0
  17. package/HR-Resource/design-design-ux-researcher/SKILL.md +346 -0
  18. package/HR-Resource/design-design-visual-storyteller/SKILL.md +166 -0
  19. package/HR-Resource/design-design-whimsy-injector/SKILL.md +455 -0
  20. package/HR-Resource/engineering-engineering-ai-data-remediation-engineer/SKILL.md +227 -0
  21. package/HR-Resource/engineering-engineering-ai-engineer/SKILL.md +163 -0
  22. package/HR-Resource/engineering-engineering-autonomous-optimization-architect/SKILL.md +124 -0
  23. package/HR-Resource/engineering-engineering-backend-architect/SKILL.md +252 -0
  24. package/HR-Resource/engineering-engineering-cms-developer/SKILL.md +553 -0
  25. package/HR-Resource/engineering-engineering-code-reviewer/SKILL.md +93 -0
  26. package/HR-Resource/engineering-engineering-codebase-onboarding-engineer/SKILL.md +190 -0
  27. package/HR-Resource/engineering-engineering-data-engineer/SKILL.md +323 -0
  28. package/HR-Resource/engineering-engineering-database-optimizer/SKILL.md +193 -0
  29. package/HR-Resource/engineering-engineering-devops-automator/SKILL.md +393 -0
  30. package/HR-Resource/engineering-engineering-email-intelligence-engineer/SKILL.md +370 -0
  31. package/HR-Resource/engineering-engineering-embedded-firmware-engineer/SKILL.md +190 -0
  32. package/HR-Resource/engineering-engineering-feishu-integration-developer/SKILL.md +615 -0
  33. package/HR-Resource/engineering-engineering-filament-optimization-specialist/SKILL.md +300 -0
  34. package/HR-Resource/engineering-engineering-frontend-developer/SKILL.md +242 -0
  35. package/HR-Resource/engineering-engineering-git-workflow-master/SKILL.md +101 -0
  36. package/HR-Resource/engineering-engineering-incident-response-commander/SKILL.md +461 -0
  37. package/HR-Resource/engineering-engineering-minimal-change-engineer/SKILL.md +224 -0
  38. package/HR-Resource/engineering-engineering-mobile-app-builder/SKILL.md +510 -0
  39. package/HR-Resource/engineering-engineering-rapid-prototyper/SKILL.md +479 -0
  40. package/HR-Resource/engineering-engineering-security-engineer/SKILL.md +321 -0
  41. package/HR-Resource/engineering-engineering-senior-developer/SKILL.md +193 -0
  42. package/HR-Resource/engineering-engineering-software-architect/SKILL.md +98 -0
  43. package/HR-Resource/engineering-engineering-solidity-smart-contract-engineer/SKILL.md +539 -0
  44. package/HR-Resource/engineering-engineering-sre/SKILL.md +107 -0
  45. package/HR-Resource/engineering-engineering-technical-writer/SKILL.md +410 -0
  46. package/HR-Resource/engineering-engineering-threat-detection-engineer/SKILL.md +551 -0
  47. package/HR-Resource/engineering-engineering-voice-ai-integration-engineer/SKILL.md +578 -0
  48. package/HR-Resource/engineering-engineering-wechat-mini-program-developer/SKILL.md +367 -0
  49. package/HR-Resource/finance-finance-bookkeeper-controller/SKILL.md +277 -0
  50. package/HR-Resource/finance-finance-financial-analyst/SKILL.md +251 -0
  51. package/HR-Resource/finance-finance-fpa-analyst/SKILL.md +280 -0
  52. package/HR-Resource/finance-finance-investment-researcher/SKILL.md +289 -0
  53. package/HR-Resource/finance-finance-tax-strategist/SKILL.md +256 -0
  54. package/HR-Resource/game-development-blender-blender-addon-engineer/SKILL.md +251 -0
  55. package/HR-Resource/game-development-game-audio-engineer/SKILL.md +281 -0
  56. package/HR-Resource/game-development-game-designer/SKILL.md +184 -0
  57. package/HR-Resource/game-development-godot-godot-gameplay-scripter/SKILL.md +351 -0
  58. package/HR-Resource/game-development-godot-godot-multiplayer-engineer/SKILL.md +314 -0
  59. package/HR-Resource/game-development-godot-godot-shader-developer/SKILL.md +283 -0
  60. package/HR-Resource/game-development-level-designer/SKILL.md +225 -0
  61. package/HR-Resource/game-development-narrative-designer/SKILL.md +260 -0
  62. package/HR-Resource/game-development-roblox-studio-roblox-avatar-creator/SKILL.md +314 -0
  63. package/HR-Resource/game-development-roblox-studio-roblox-experience-designer/SKILL.md +322 -0
  64. package/HR-Resource/game-development-roblox-studio-roblox-systems-scripter/SKILL.md +342 -0
  65. package/HR-Resource/game-development-technical-artist/SKILL.md +246 -0
  66. package/HR-Resource/game-development-unity-unity-architect/SKILL.md +288 -0
  67. package/HR-Resource/game-development-unity-unity-editor-tool-developer/SKILL.md +327 -0
  68. package/HR-Resource/game-development-unity-unity-multiplayer-engineer/SKILL.md +338 -0
  69. package/HR-Resource/game-development-unity-unity-shader-graph-artist/SKILL.md +286 -0
  70. package/HR-Resource/game-development-unreal-engine-unreal-multiplayer-architect/SKILL.md +330 -0
  71. package/HR-Resource/game-development-unreal-engine-unreal-systems-engineer/SKILL.md +327 -0
  72. package/HR-Resource/game-development-unreal-engine-unreal-technical-artist/SKILL.md +273 -0
  73. package/HR-Resource/game-development-unreal-engine-unreal-world-builder/SKILL.md +290 -0
  74. package/HR-Resource/hiring/SKILL.md +28 -0
  75. package/HR-Resource/index.json +747 -0
  76. package/HR-Resource/integrations-mcp-memory-backend-architect-with-memory/SKILL.md +264 -0
  77. package/HR-Resource/marketing-marketing-agentic-search-optimizer/SKILL.md +328 -0
  78. package/HR-Resource/marketing-marketing-ai-citation-strategist/SKILL.md +187 -0
  79. package/HR-Resource/marketing-marketing-app-store-optimizer/SKILL.md +338 -0
  80. package/HR-Resource/marketing-marketing-baidu-seo-specialist/SKILL.md +243 -0
  81. package/HR-Resource/marketing-marketing-bilibili-content-strategist/SKILL.md +216 -0
  82. package/HR-Resource/marketing-marketing-book-co-author/SKILL.md +127 -0
  83. package/HR-Resource/marketing-marketing-carousel-growth-engine/SKILL.md +216 -0
  84. package/HR-Resource/marketing-marketing-china-ecommerce-operator/SKILL.md +300 -0
  85. package/HR-Resource/marketing-marketing-china-market-localization-strategist/SKILL.md +300 -0
  86. package/HR-Resource/marketing-marketing-content-creator/SKILL.md +71 -0
  87. package/HR-Resource/marketing-marketing-cross-border-ecommerce/SKILL.md +276 -0
  88. package/HR-Resource/marketing-marketing-douyin-strategist/SKILL.md +166 -0
  89. package/HR-Resource/marketing-marketing-growth-hacker/SKILL.md +71 -0
  90. package/HR-Resource/marketing-marketing-instagram-curator/SKILL.md +130 -0
  91. package/HR-Resource/marketing-marketing-kuaishou-strategist/SKILL.md +240 -0
  92. package/HR-Resource/marketing-marketing-linkedin-content-creator/SKILL.md +230 -0
  93. package/HR-Resource/marketing-marketing-livestream-commerce-coach/SKILL.md +322 -0
  94. package/HR-Resource/marketing-marketing-podcast-strategist/SKILL.md +294 -0
  95. package/HR-Resource/marketing-marketing-private-domain-operator/SKILL.md +325 -0
  96. package/HR-Resource/marketing-marketing-reddit-community-builder/SKILL.md +140 -0
  97. package/HR-Resource/marketing-marketing-seo-specialist/SKILL.md +338 -0
  98. package/HR-Resource/marketing-marketing-short-video-editing-coach/SKILL.md +429 -0
  99. package/HR-Resource/marketing-marketing-social-media-strategist/SKILL.md +142 -0
  100. package/HR-Resource/marketing-marketing-tiktok-strategist/SKILL.md +142 -0
  101. package/HR-Resource/marketing-marketing-twitter-engager/SKILL.md +143 -0
  102. package/HR-Resource/marketing-marketing-video-optimization-specialist/SKILL.md +136 -0
  103. package/HR-Resource/marketing-marketing-wechat-official-account/SKILL.md +162 -0
  104. package/HR-Resource/marketing-marketing-weibo-strategist/SKILL.md +257 -0
  105. package/HR-Resource/marketing-marketing-xiaohongshu-specialist/SKILL.md +155 -0
  106. package/HR-Resource/marketing-marketing-zhihu-strategist/SKILL.md +179 -0
  107. package/HR-Resource/ops/SKILL.md +46 -0
  108. package/HR-Resource/paid-media-paid-media-auditor/SKILL.md +88 -0
  109. package/HR-Resource/paid-media-paid-media-creative-strategist/SKILL.md +88 -0
  110. package/HR-Resource/paid-media-paid-media-paid-social-strategist/SKILL.md +88 -0
  111. package/HR-Resource/paid-media-paid-media-ppc-strategist/SKILL.md +88 -0
  112. package/HR-Resource/paid-media-paid-media-programmatic-buyer/SKILL.md +88 -0
  113. package/HR-Resource/paid-media-paid-media-search-query-analyst/SKILL.md +88 -0
  114. package/HR-Resource/paid-media-paid-media-tracking-specialist/SKILL.md +88 -0
  115. package/HR-Resource/product-product-behavioral-nudge-engine/SKILL.md +97 -0
  116. package/HR-Resource/product-product-feedback-synthesizer/SKILL.md +136 -0
  117. package/HR-Resource/product-product-manager/SKILL.md +486 -0
  118. package/HR-Resource/product-product-sprint-prioritizer/SKILL.md +171 -0
  119. package/HR-Resource/product-product-trend-researcher/SKILL.md +176 -0
  120. package/HR-Resource/project-management-project-management-experiment-tracker/SKILL.md +215 -0
  121. package/HR-Resource/project-management-project-management-jira-workflow-steward/SKILL.md +247 -0
  122. package/HR-Resource/project-management-project-management-project-shepherd/SKILL.md +211 -0
  123. package/HR-Resource/project-management-project-management-studio-operations/SKILL.md +217 -0
  124. package/HR-Resource/project-management-project-management-studio-producer/SKILL.md +220 -0
  125. package/HR-Resource/project-management-project-manager-senior/SKILL.md +152 -0
  126. package/HR-Resource/resource-manager/SKILL.md +23 -0
  127. package/HR-Resource/sales-sales-account-strategist/SKILL.md +244 -0
  128. package/HR-Resource/sales-sales-coach/SKILL.md +288 -0
  129. package/HR-Resource/sales-sales-deal-strategist/SKILL.md +197 -0
  130. package/HR-Resource/sales-sales-discovery-coach/SKILL.md +242 -0
  131. package/HR-Resource/sales-sales-engineer/SKILL.md +199 -0
  132. package/HR-Resource/sales-sales-outbound-strategist/SKILL.md +218 -0
  133. package/HR-Resource/sales-sales-pipeline-analyst/SKILL.md +284 -0
  134. package/HR-Resource/sales-sales-proposal-strategist/SKILL.md +234 -0
  135. package/HR-Resource/spatial-computing-macos-spatial-metal-engineer/SKILL.md +354 -0
  136. package/HR-Resource/spatial-computing-terminal-integration-specialist/SKILL.md +87 -0
  137. package/HR-Resource/spatial-computing-visionos-spatial-engineer/SKILL.md +71 -0
  138. package/HR-Resource/spatial-computing-xr-cockpit-interaction-specialist/SKILL.md +49 -0
  139. package/HR-Resource/spatial-computing-xr-immersive-developer/SKILL.md +49 -0
  140. package/HR-Resource/spatial-computing-xr-interface-architect/SKILL.md +49 -0
  141. package/HR-Resource/specialized-accounts-payable-agent/SKILL.md +202 -0
  142. package/HR-Resource/specialized-agentic-identity-trust/SKILL.md +404 -0
  143. package/HR-Resource/specialized-agents-orchestrator/SKILL.md +384 -0
  144. package/HR-Resource/specialized-automation-governance-architect/SKILL.md +233 -0
  145. package/HR-Resource/specialized-blockchain-security-auditor/SKILL.md +480 -0
  146. package/HR-Resource/specialized-compliance-auditor/SKILL.md +175 -0
  147. package/HR-Resource/specialized-corporate-training-designer/SKILL.md +209 -0
  148. package/HR-Resource/specialized-customer-service/SKILL.md +415 -0
  149. package/HR-Resource/specialized-data-consolidation-agent/SKILL.md +77 -0
  150. package/HR-Resource/specialized-government-digital-presales-consultant/SKILL.md +380 -0
  151. package/HR-Resource/specialized-healthcare-customer-service/SKILL.md +406 -0
  152. package/HR-Resource/specialized-healthcare-marketing-compliance/SKILL.md +412 -0
  153. package/HR-Resource/specialized-hospitality-guest-services/SKILL.md +620 -0
  154. package/HR-Resource/specialized-hr-onboarding/SKILL.md +468 -0
  155. package/HR-Resource/specialized-identity-graph-operator/SKILL.md +277 -0
  156. package/HR-Resource/specialized-language-translator/SKILL.md +281 -0
  157. package/HR-Resource/specialized-legal-billing-time-tracking/SKILL.md +586 -0
  158. package/HR-Resource/specialized-legal-client-intake/SKILL.md +509 -0
  159. package/HR-Resource/specialized-legal-document-review/SKILL.md +471 -0
  160. package/HR-Resource/specialized-loan-officer-assistant/SKILL.md +572 -0
  161. package/HR-Resource/specialized-lsp-index-engineer/SKILL.md +331 -0
  162. package/HR-Resource/specialized-real-estate-buyer-seller/SKILL.md +613 -0
  163. package/HR-Resource/specialized-recruitment-specialist/SKILL.md +526 -0
  164. package/HR-Resource/specialized-report-distribution-agent/SKILL.md +82 -0
  165. package/HR-Resource/specialized-retail-customer-returns/SKILL.md +583 -0
  166. package/HR-Resource/specialized-sales-data-extraction-agent/SKILL.md +84 -0
  167. package/HR-Resource/specialized-sales-outreach/SKILL.md +442 -0
  168. package/HR-Resource/specialized-specialized-chief-of-staff/SKILL.md +296 -0
  169. package/HR-Resource/specialized-specialized-civil-engineer/SKILL.md +373 -0
  170. package/HR-Resource/specialized-specialized-cultural-intelligence-strategist/SKILL.md +105 -0
  171. package/HR-Resource/specialized-specialized-developer-advocate/SKILL.md +334 -0
  172. package/HR-Resource/specialized-specialized-document-generator/SKILL.md +72 -0
  173. package/HR-Resource/specialized-specialized-french-consulting-market/SKILL.md +209 -0
  174. package/HR-Resource/specialized-specialized-korean-business-navigator/SKILL.md +233 -0
  175. package/HR-Resource/specialized-specialized-mcp-builder/SKILL.md +265 -0
  176. package/HR-Resource/specialized-specialized-model-qa/SKILL.md +505 -0
  177. package/HR-Resource/specialized-specialized-salesforce-architect/SKILL.md +197 -0
  178. package/HR-Resource/specialized-specialized-workflow-architect/SKILL.md +614 -0
  179. package/HR-Resource/specialized-study-abroad-advisor/SKILL.md +299 -0
  180. package/HR-Resource/specialized-supply-chain-strategist/SKILL.md +599 -0
  181. package/HR-Resource/specialized-zk-steward/SKILL.md +228 -0
  182. package/HR-Resource/support-support-analytics-reporter/SKILL.md +382 -0
  183. package/HR-Resource/support-support-executive-summary-generator/SKILL.md +229 -0
  184. package/HR-Resource/support-support-finance-tracker/SKILL.md +459 -0
  185. package/HR-Resource/support-support-infrastructure-maintainer/SKILL.md +635 -0
  186. package/HR-Resource/support-support-legal-compliance-checker/SKILL.md +605 -0
  187. package/HR-Resource/support-support-support-responder/SKILL.md +602 -0
  188. package/HR-Resource/testing-testing-accessibility-auditor/SKILL.md +333 -0
  189. package/HR-Resource/testing-testing-api-tester/SKILL.md +323 -0
  190. package/HR-Resource/testing-testing-evidence-collector/SKILL.md +227 -0
  191. package/HR-Resource/testing-testing-performance-benchmarker/SKILL.md +285 -0
  192. package/HR-Resource/testing-testing-reality-checker/SKILL.md +253 -0
  193. package/HR-Resource/testing-testing-test-results-analyzer/SKILL.md +322 -0
  194. package/HR-Resource/testing-testing-tool-evaluator/SKILL.md +411 -0
  195. package/HR-Resource/testing-testing-workflow-optimizer/SKILL.md +467 -0
  196. package/assets/templates/config.json +36 -2
  197. package/bin/init.js +292 -110
  198. package/commands/goal.md +25 -0
  199. package/commands/hot-fix.md +25 -0
  200. package/commands/play-harness.md +22 -0
  201. package/commands/release-harness.md +22 -0
  202. package/commands/stop-harness.md +21 -0
  203. package/conventions/README.md +14 -88
  204. package/conventions/brick-office.md +5 -0
  205. package/conventions/cdo.md +6 -0
  206. package/conventions/ceo.md +9 -0
  207. package/conventions/coo.md +6 -0
  208. package/conventions/cqo.md +6 -23
  209. package/conventions/cto.md +5 -23
  210. package/conventions/hiring.md +7 -0
  211. package/conventions/ops.md +9 -0
  212. package/conventions/resource-manager.md +6 -0
  213. package/conventions/shared.md +29 -58
  214. package/gotchas/README.md +14 -82
  215. package/gotchas/brick-office.md +9 -0
  216. package/gotchas/cdo.md +9 -0
  217. package/gotchas/ceo.md +9 -0
  218. package/gotchas/coo.md +9 -0
  219. package/gotchas/cqo.md +6 -19
  220. package/gotchas/cto.md +6 -19
  221. package/gotchas/hiring.md +9 -0
  222. package/gotchas/ops.md +17 -0
  223. package/gotchas/resource-manager.md +9 -0
  224. package/gotchas/shared.md +13 -0
  225. package/init.sh +208 -0
  226. package/package.json +12 -17
  227. package/scripts/harness-runtime-stop.sh +58 -0
  228. package/scripts/harness-service-ops-monitor.sh +160 -16
  229. package/scripts/harness-stop.sh +18 -0
  230. package/scripts/harness-worker-evidence-validate.sh +59 -0
  231. package/scripts/import-agency-agents.js +102 -0
  232. package/scripts/play.sh +104 -0
  233. package/scripts/release.sh +89 -0
  234. package/conventions/conductor.md +0 -24
  235. package/conventions/coo-developer.md +0 -24
  236. package/conventions/dispatcher.md +0 -24
  237. package/conventions/documentationer.md +0 -24
  238. package/conventions/evaluator-architecture.md +0 -24
  239. package/conventions/evaluator-code-quality.md +0 -24
  240. package/conventions/evaluator-functional.md +0 -24
  241. package/conventions/evaluator-security.md +0 -24
  242. package/conventions/evaluator-visual.md +0 -24
  243. package/conventions/generator-backend.md +0 -24
  244. package/conventions/generator-designer.md +0 -24
  245. package/conventions/generator-devops.md +0 -24
  246. package/conventions/generator-frontend.md +0 -24
  247. package/conventions/meeting-manager.md +0 -24
  248. package/conventions/planner.md +0 -24
  249. package/conventions/service-ops.md +0 -24
  250. package/gotchas/conductor.md +0 -38
  251. package/gotchas/coo-developer.md +0 -22
  252. package/gotchas/dispatcher.md +0 -38
  253. package/gotchas/documentationer.md +0 -22
  254. package/gotchas/evaluator-architecture.md +0 -22
  255. package/gotchas/evaluator-code-quality.md +0 -22
  256. package/gotchas/evaluator-functional.md +0 -22
  257. package/gotchas/evaluator-security.md +0 -22
  258. package/gotchas/evaluator-visual.md +0 -22
  259. package/gotchas/generator-backend-laravel.md +0 -19
  260. package/gotchas/generator-backend.md +0 -22
  261. package/gotchas/generator-designer.md +0 -22
  262. package/gotchas/generator-devops.md +0 -22
  263. package/gotchas/generator-frontend.md +0 -22
  264. package/gotchas/meeting-manager.md +0 -30
  265. package/gotchas/planner.md +0 -22
  266. package/gotchas/service-ops.md +0 -30
  267. package/skills/_shared/dynamic-registration.md +0 -120
  268. package/skills/brainstorming/SKILL.md +0 -220
  269. package/skills/brainstorming/references/attribution.md +0 -109
  270. package/skills/brainstorming/references/spec-document-reviewer-prompt.md +0 -49
  271. package/skills/brainstorming/references/visual-companion.md +0 -287
  272. package/skills/brainstorming/scripts/frame-template.html +0 -214
  273. package/skills/brainstorming/scripts/helper.js +0 -88
  274. package/skills/brainstorming/scripts/server.cjs +0 -354
  275. package/skills/brainstorming/scripts/start-server.sh +0 -148
  276. package/skills/brainstorming/scripts/stop-server.sh +0 -56
  277. package/skills/conductor/SKILL.md +0 -336
  278. package/skills/coo-developer/SKILL.md +0 -72
  279. package/skills/cqo/SKILL.md +0 -146
  280. package/skills/cto/SKILL.md +0 -141
  281. package/skills/dispatcher/SKILL.md +0 -298
  282. package/skills/dispatcher/persona-ceo.md +0 -169
  283. package/skills/dispatcher/references/convention-flow.md +0 -111
  284. package/skills/dispatcher/references/gotcha-flow.md +0 -79
  285. package/skills/dispatcher/references/initialization.md +0 -53
  286. package/skills/dispatcher/references/pipeline-definitions.md +0 -151
  287. package/skills/documentationer/SKILL.md +0 -92
  288. package/skills/evaluator-architecture/SKILL.md +0 -173
  289. package/skills/evaluator-code-quality/SKILL.md +0 -218
  290. package/skills/evaluator-code-quality/references/scoring-rubric.md +0 -104
  291. package/skills/evaluator-functional/SKILL.md +0 -271
  292. package/skills/evaluator-functional/references/ia-compliance.md +0 -37
  293. package/skills/evaluator-functional/references/playwright-tools.md +0 -43
  294. package/skills/evaluator-functional/references/scoring-rubric.md +0 -52
  295. package/skills/evaluator-security/SKILL.md +0 -172
  296. package/skills/evaluator-visual/SKILL.md +0 -165
  297. package/skills/evaluator-visual/references/responsive-checklist.md +0 -44
  298. package/skills/evaluator-visual/references/scoring-rubric.md +0 -59
  299. package/skills/generator-backend/SKILL.md +0 -153
  300. package/skills/generator-backend/references/nestjs-msa-patterns.md +0 -69
  301. package/skills/generator-backend/references/sprint-contract-be.md +0 -32
  302. package/skills/generator-designer/SKILL.md +0 -219
  303. package/skills/generator-devops/SKILL.md +0 -201
  304. package/skills/generator-frontend/SKILL.md +0 -155
  305. package/skills/generator-frontend/references/_web-react-legacy/ai-forbidden-patterns.md +0 -89
  306. package/skills/generator-frontend/references/_web-react-legacy/component-patterns.md +0 -52
  307. package/skills/generator-frontend/references/_web-react-legacy/design-system-rules.md +0 -139
  308. package/skills/generator-frontend/references/_web-react-legacy/vercel-best-practices.md +0 -54
  309. package/skills/meeting-manager/SKILL.md +0 -419
  310. package/skills/planner/SKILL.md +0 -243
  311. package/skills/planner/hr-onboard.md +0 -134
  312. package/skills/planner/hr-recruit.md +0 -99
  313. package/skills/planner/persona-coo-hr.md +0 -182
  314. package/skills/planner/references/api-contract-schema.md +0 -34
  315. package/skills/planner/references/fe-stack-detection.md +0 -164
  316. package/skills/planner/references/ia-map-guide.md +0 -31
  317. package/skills/planner/references/plan-template.md +0 -51
  318. package/skills/service-ops/SKILL.md +0 -295
@@ -1,88 +0,0 @@
1
- (function() {
2
- const WS_URL = 'ws://' + window.location.host;
3
- let ws = null;
4
- let eventQueue = [];
5
-
6
- function connect() {
7
- ws = new WebSocket(WS_URL);
8
-
9
- ws.onopen = () => {
10
- eventQueue.forEach(e => ws.send(JSON.stringify(e)));
11
- eventQueue = [];
12
- };
13
-
14
- ws.onmessage = (msg) => {
15
- const data = JSON.parse(msg.data);
16
- if (data.type === 'reload') {
17
- window.location.reload();
18
- }
19
- };
20
-
21
- ws.onclose = () => {
22
- setTimeout(connect, 1000);
23
- };
24
- }
25
-
26
- function sendEvent(event) {
27
- event.timestamp = Date.now();
28
- if (ws && ws.readyState === WebSocket.OPEN) {
29
- ws.send(JSON.stringify(event));
30
- } else {
31
- eventQueue.push(event);
32
- }
33
- }
34
-
35
- // Capture clicks on choice elements
36
- document.addEventListener('click', (e) => {
37
- const target = e.target.closest('[data-choice]');
38
- if (!target) return;
39
-
40
- sendEvent({
41
- type: 'click',
42
- text: target.textContent.trim(),
43
- choice: target.dataset.choice,
44
- id: target.id || null
45
- });
46
-
47
- // Update indicator bar (defer so toggleSelect runs first)
48
- setTimeout(() => {
49
- const indicator = document.getElementById('indicator-text');
50
- if (!indicator) return;
51
- const container = target.closest('.options') || target.closest('.cards');
52
- const selected = container ? container.querySelectorAll('.selected') : [];
53
- if (selected.length === 0) {
54
- indicator.textContent = 'Click an option above, then return to the terminal';
55
- } else if (selected.length === 1) {
56
- const label = selected[0].querySelector('h3, .content h3, .card-body h3')?.textContent?.trim() || selected[0].dataset.choice;
57
- indicator.innerHTML = '<span class="selected-text">' + label + ' selected</span> — return to terminal to continue';
58
- } else {
59
- indicator.innerHTML = '<span class="selected-text">' + selected.length + ' selected</span> — return to terminal to continue';
60
- }
61
- }, 0);
62
- });
63
-
64
- // Frame UI: selection tracking
65
- window.selectedChoice = null;
66
-
67
- window.toggleSelect = function(el) {
68
- const container = el.closest('.options') || el.closest('.cards');
69
- const multi = container && container.dataset.multiselect !== undefined;
70
- if (container && !multi) {
71
- container.querySelectorAll('.option, .card').forEach(o => o.classList.remove('selected'));
72
- }
73
- if (multi) {
74
- el.classList.toggle('selected');
75
- } else {
76
- el.classList.add('selected');
77
- }
78
- window.selectedChoice = el.dataset.choice;
79
- };
80
-
81
- // Expose API for explicit use
82
- window.brainstorm = {
83
- send: sendEvent,
84
- choice: (value, metadata = {}) => sendEvent({ type: 'choice', value, ...metadata })
85
- };
86
-
87
- connect();
88
- })();
@@ -1,354 +0,0 @@
1
- const crypto = require('crypto');
2
- const http = require('http');
3
- const fs = require('fs');
4
- const path = require('path');
5
-
6
- // ========== WebSocket Protocol (RFC 6455) ==========
7
-
8
- const OPCODES = { TEXT: 0x01, CLOSE: 0x08, PING: 0x09, PONG: 0x0A };
9
- const WS_MAGIC = '258EAFA5-E914-47DA-95CA-C5AB0DC85B11';
10
-
11
- function computeAcceptKey(clientKey) {
12
- return crypto.createHash('sha1').update(clientKey + WS_MAGIC).digest('base64');
13
- }
14
-
15
- function encodeFrame(opcode, payload) {
16
- const fin = 0x80;
17
- const len = payload.length;
18
- let header;
19
-
20
- if (len < 126) {
21
- header = Buffer.alloc(2);
22
- header[0] = fin | opcode;
23
- header[1] = len;
24
- } else if (len < 65536) {
25
- header = Buffer.alloc(4);
26
- header[0] = fin | opcode;
27
- header[1] = 126;
28
- header.writeUInt16BE(len, 2);
29
- } else {
30
- header = Buffer.alloc(10);
31
- header[0] = fin | opcode;
32
- header[1] = 127;
33
- header.writeBigUInt64BE(BigInt(len), 2);
34
- }
35
-
36
- return Buffer.concat([header, payload]);
37
- }
38
-
39
- function decodeFrame(buffer) {
40
- if (buffer.length < 2) return null;
41
-
42
- const secondByte = buffer[1];
43
- const opcode = buffer[0] & 0x0F;
44
- const masked = (secondByte & 0x80) !== 0;
45
- let payloadLen = secondByte & 0x7F;
46
- let offset = 2;
47
-
48
- if (!masked) throw new Error('Client frames must be masked');
49
-
50
- if (payloadLen === 126) {
51
- if (buffer.length < 4) return null;
52
- payloadLen = buffer.readUInt16BE(2);
53
- offset = 4;
54
- } else if (payloadLen === 127) {
55
- if (buffer.length < 10) return null;
56
- payloadLen = Number(buffer.readBigUInt64BE(2));
57
- offset = 10;
58
- }
59
-
60
- const maskOffset = offset;
61
- const dataOffset = offset + 4;
62
- const totalLen = dataOffset + payloadLen;
63
- if (buffer.length < totalLen) return null;
64
-
65
- const mask = buffer.slice(maskOffset, dataOffset);
66
- const data = Buffer.alloc(payloadLen);
67
- for (let i = 0; i < payloadLen; i++) {
68
- data[i] = buffer[dataOffset + i] ^ mask[i % 4];
69
- }
70
-
71
- return { opcode, payload: data, bytesConsumed: totalLen };
72
- }
73
-
74
- // ========== Configuration ==========
75
-
76
- const PORT = process.env.BRAINSTORM_PORT || (49152 + Math.floor(Math.random() * 16383));
77
- const HOST = process.env.BRAINSTORM_HOST || '127.0.0.1';
78
- const URL_HOST = process.env.BRAINSTORM_URL_HOST || (HOST === '127.0.0.1' ? 'localhost' : HOST);
79
- const SESSION_DIR = process.env.BRAINSTORM_DIR || '/tmp/brainstorm';
80
- const CONTENT_DIR = path.join(SESSION_DIR, 'content');
81
- const STATE_DIR = path.join(SESSION_DIR, 'state');
82
- let ownerPid = process.env.BRAINSTORM_OWNER_PID ? Number(process.env.BRAINSTORM_OWNER_PID) : null;
83
-
84
- const MIME_TYPES = {
85
- '.html': 'text/html', '.css': 'text/css', '.js': 'application/javascript',
86
- '.json': 'application/json', '.png': 'image/png', '.jpg': 'image/jpeg',
87
- '.jpeg': 'image/jpeg', '.gif': 'image/gif', '.svg': 'image/svg+xml'
88
- };
89
-
90
- // ========== Templates and Constants ==========
91
-
92
- const WAITING_PAGE = `<!DOCTYPE html>
93
- <html>
94
- <head><meta charset="utf-8"><title>Brainstorm Companion</title>
95
- <style>body { font-family: system-ui, sans-serif; padding: 2rem; max-width: 800px; margin: 0 auto; }
96
- h1 { color: #333; } p { color: #666; }</style>
97
- </head>
98
- <body><h1>Brainstorm Companion</h1>
99
- <p>Waiting for the agent to push a screen...</p></body></html>`;
100
-
101
- const frameTemplate = fs.readFileSync(path.join(__dirname, 'frame-template.html'), 'utf-8');
102
- const helperScript = fs.readFileSync(path.join(__dirname, 'helper.js'), 'utf-8');
103
- const helperInjection = '<script>\n' + helperScript + '\n</script>';
104
-
105
- // ========== Helper Functions ==========
106
-
107
- function isFullDocument(html) {
108
- const trimmed = html.trimStart().toLowerCase();
109
- return trimmed.startsWith('<!doctype') || trimmed.startsWith('<html');
110
- }
111
-
112
- function wrapInFrame(content) {
113
- return frameTemplate.replace('<!-- CONTENT -->', content);
114
- }
115
-
116
- function getNewestScreen() {
117
- const files = fs.readdirSync(CONTENT_DIR)
118
- .filter(f => f.endsWith('.html'))
119
- .map(f => {
120
- const fp = path.join(CONTENT_DIR, f);
121
- return { path: fp, mtime: fs.statSync(fp).mtime.getTime() };
122
- })
123
- .sort((a, b) => b.mtime - a.mtime);
124
- return files.length > 0 ? files[0].path : null;
125
- }
126
-
127
- // ========== HTTP Request Handler ==========
128
-
129
- function handleRequest(req, res) {
130
- touchActivity();
131
- if (req.method === 'GET' && req.url === '/') {
132
- const screenFile = getNewestScreen();
133
- let html = screenFile
134
- ? (raw => isFullDocument(raw) ? raw : wrapInFrame(raw))(fs.readFileSync(screenFile, 'utf-8'))
135
- : WAITING_PAGE;
136
-
137
- if (html.includes('</body>')) {
138
- html = html.replace('</body>', helperInjection + '\n</body>');
139
- } else {
140
- html += helperInjection;
141
- }
142
-
143
- res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
144
- res.end(html);
145
- } else if (req.method === 'GET' && req.url.startsWith('/files/')) {
146
- const fileName = req.url.slice(7);
147
- const filePath = path.join(CONTENT_DIR, path.basename(fileName));
148
- if (!fs.existsSync(filePath)) {
149
- res.writeHead(404);
150
- res.end('Not found');
151
- return;
152
- }
153
- const ext = path.extname(filePath).toLowerCase();
154
- const contentType = MIME_TYPES[ext] || 'application/octet-stream';
155
- res.writeHead(200, { 'Content-Type': contentType });
156
- res.end(fs.readFileSync(filePath));
157
- } else {
158
- res.writeHead(404);
159
- res.end('Not found');
160
- }
161
- }
162
-
163
- // ========== WebSocket Connection Handling ==========
164
-
165
- const clients = new Set();
166
-
167
- function handleUpgrade(req, socket) {
168
- const key = req.headers['sec-websocket-key'];
169
- if (!key) { socket.destroy(); return; }
170
-
171
- const accept = computeAcceptKey(key);
172
- socket.write(
173
- 'HTTP/1.1 101 Switching Protocols\r\n' +
174
- 'Upgrade: websocket\r\n' +
175
- 'Connection: Upgrade\r\n' +
176
- 'Sec-WebSocket-Accept: ' + accept + '\r\n\r\n'
177
- );
178
-
179
- let buffer = Buffer.alloc(0);
180
- clients.add(socket);
181
-
182
- socket.on('data', (chunk) => {
183
- buffer = Buffer.concat([buffer, chunk]);
184
- while (buffer.length > 0) {
185
- let result;
186
- try {
187
- result = decodeFrame(buffer);
188
- } catch (e) {
189
- socket.end(encodeFrame(OPCODES.CLOSE, Buffer.alloc(0)));
190
- clients.delete(socket);
191
- return;
192
- }
193
- if (!result) break;
194
- buffer = buffer.slice(result.bytesConsumed);
195
-
196
- switch (result.opcode) {
197
- case OPCODES.TEXT:
198
- handleMessage(result.payload.toString());
199
- break;
200
- case OPCODES.CLOSE:
201
- socket.end(encodeFrame(OPCODES.CLOSE, Buffer.alloc(0)));
202
- clients.delete(socket);
203
- return;
204
- case OPCODES.PING:
205
- socket.write(encodeFrame(OPCODES.PONG, result.payload));
206
- break;
207
- case OPCODES.PONG:
208
- break;
209
- default: {
210
- const closeBuf = Buffer.alloc(2);
211
- closeBuf.writeUInt16BE(1003);
212
- socket.end(encodeFrame(OPCODES.CLOSE, closeBuf));
213
- clients.delete(socket);
214
- return;
215
- }
216
- }
217
- }
218
- });
219
-
220
- socket.on('close', () => clients.delete(socket));
221
- socket.on('error', () => clients.delete(socket));
222
- }
223
-
224
- function handleMessage(text) {
225
- let event;
226
- try {
227
- event = JSON.parse(text);
228
- } catch (e) {
229
- console.error('Failed to parse WebSocket message:', e.message);
230
- return;
231
- }
232
- touchActivity();
233
- console.log(JSON.stringify({ source: 'user-event', ...event }));
234
- if (event.choice) {
235
- const eventsFile = path.join(STATE_DIR, 'events');
236
- fs.appendFileSync(eventsFile, JSON.stringify(event) + '\n');
237
- }
238
- }
239
-
240
- function broadcast(msg) {
241
- const frame = encodeFrame(OPCODES.TEXT, Buffer.from(JSON.stringify(msg)));
242
- for (const socket of clients) {
243
- try { socket.write(frame); } catch (e) { clients.delete(socket); }
244
- }
245
- }
246
-
247
- // ========== Activity Tracking ==========
248
-
249
- const IDLE_TIMEOUT_MS = 30 * 60 * 1000; // 30 minutes
250
- let lastActivity = Date.now();
251
-
252
- function touchActivity() {
253
- lastActivity = Date.now();
254
- }
255
-
256
- // ========== File Watching ==========
257
-
258
- const debounceTimers = new Map();
259
-
260
- // ========== Server Startup ==========
261
-
262
- function startServer() {
263
- if (!fs.existsSync(CONTENT_DIR)) fs.mkdirSync(CONTENT_DIR, { recursive: true });
264
- if (!fs.existsSync(STATE_DIR)) fs.mkdirSync(STATE_DIR, { recursive: true });
265
-
266
- // Track known files to distinguish new screens from updates.
267
- // macOS fs.watch reports 'rename' for both new files and overwrites,
268
- // so we can't rely on eventType alone.
269
- const knownFiles = new Set(
270
- fs.readdirSync(CONTENT_DIR).filter(f => f.endsWith('.html'))
271
- );
272
-
273
- const server = http.createServer(handleRequest);
274
- server.on('upgrade', handleUpgrade);
275
-
276
- const watcher = fs.watch(CONTENT_DIR, (eventType, filename) => {
277
- if (!filename || !filename.endsWith('.html')) return;
278
-
279
- if (debounceTimers.has(filename)) clearTimeout(debounceTimers.get(filename));
280
- debounceTimers.set(filename, setTimeout(() => {
281
- debounceTimers.delete(filename);
282
- const filePath = path.join(CONTENT_DIR, filename);
283
-
284
- if (!fs.existsSync(filePath)) return; // file was deleted
285
- touchActivity();
286
-
287
- if (!knownFiles.has(filename)) {
288
- knownFiles.add(filename);
289
- const eventsFile = path.join(STATE_DIR, 'events');
290
- if (fs.existsSync(eventsFile)) fs.unlinkSync(eventsFile);
291
- console.log(JSON.stringify({ type: 'screen-added', file: filePath }));
292
- } else {
293
- console.log(JSON.stringify({ type: 'screen-updated', file: filePath }));
294
- }
295
-
296
- broadcast({ type: 'reload' });
297
- }, 100));
298
- });
299
- watcher.on('error', (err) => console.error('fs.watch error:', err.message));
300
-
301
- function shutdown(reason) {
302
- console.log(JSON.stringify({ type: 'server-stopped', reason }));
303
- const infoFile = path.join(STATE_DIR, 'server-info');
304
- if (fs.existsSync(infoFile)) fs.unlinkSync(infoFile);
305
- fs.writeFileSync(
306
- path.join(STATE_DIR, 'server-stopped'),
307
- JSON.stringify({ reason, timestamp: Date.now() }) + '\n'
308
- );
309
- watcher.close();
310
- clearInterval(lifecycleCheck);
311
- server.close(() => process.exit(0));
312
- }
313
-
314
- function ownerAlive() {
315
- if (!ownerPid) return true;
316
- try { process.kill(ownerPid, 0); return true; } catch (e) { return e.code === 'EPERM'; }
317
- }
318
-
319
- // Check every 60s: exit if owner process died or idle for 30 minutes
320
- const lifecycleCheck = setInterval(() => {
321
- if (!ownerAlive()) shutdown('owner process exited');
322
- else if (Date.now() - lastActivity > IDLE_TIMEOUT_MS) shutdown('idle timeout');
323
- }, 60 * 1000);
324
- lifecycleCheck.unref();
325
-
326
- // Validate owner PID at startup. If it's already dead, the PID resolution
327
- // was wrong (common on WSL, Tailscale SSH, and cross-user scenarios).
328
- // Disable monitoring and rely on the idle timeout instead.
329
- if (ownerPid) {
330
- try { process.kill(ownerPid, 0); }
331
- catch (e) {
332
- if (e.code !== 'EPERM') {
333
- console.log(JSON.stringify({ type: 'owner-pid-invalid', pid: ownerPid, reason: 'dead at startup' }));
334
- ownerPid = null;
335
- }
336
- }
337
- }
338
-
339
- server.listen(PORT, HOST, () => {
340
- const info = JSON.stringify({
341
- type: 'server-started', port: Number(PORT), host: HOST,
342
- url_host: URL_HOST, url: 'http://' + URL_HOST + ':' + PORT,
343
- screen_dir: CONTENT_DIR, state_dir: STATE_DIR
344
- });
345
- console.log(info);
346
- fs.writeFileSync(path.join(STATE_DIR, 'server-info'), info + '\n');
347
- });
348
- }
349
-
350
- if (require.main === module) {
351
- startServer();
352
- }
353
-
354
- module.exports = { computeAcceptKey, encodeFrame, decodeFrame, OPCODES };
@@ -1,148 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Start the brainstorm server and output connection info
3
- # Usage: start-server.sh [--project-dir <path>] [--host <bind-host>] [--url-host <display-host>] [--foreground] [--background]
4
- #
5
- # Starts server on a random high port, outputs JSON with URL.
6
- # Each session gets its own directory to avoid conflicts.
7
- #
8
- # Options:
9
- # --project-dir <path> Store session files under <path>/.superpowers/brainstorm/
10
- # instead of /tmp. Files persist after server stops.
11
- # --host <bind-host> Host/interface to bind (default: 127.0.0.1).
12
- # Use 0.0.0.0 in remote/containerized environments.
13
- # --url-host <host> Hostname shown in returned URL JSON.
14
- # --foreground Run server in the current terminal (no backgrounding).
15
- # --background Force background mode (overrides Codex auto-foreground).
16
-
17
- SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
18
-
19
- # Parse arguments
20
- PROJECT_DIR=""
21
- FOREGROUND="false"
22
- FORCE_BACKGROUND="false"
23
- BIND_HOST="127.0.0.1"
24
- URL_HOST=""
25
- while [[ $# -gt 0 ]]; do
26
- case "$1" in
27
- --project-dir)
28
- PROJECT_DIR="$2"
29
- shift 2
30
- ;;
31
- --host)
32
- BIND_HOST="$2"
33
- shift 2
34
- ;;
35
- --url-host)
36
- URL_HOST="$2"
37
- shift 2
38
- ;;
39
- --foreground|--no-daemon)
40
- FOREGROUND="true"
41
- shift
42
- ;;
43
- --background|--daemon)
44
- FORCE_BACKGROUND="true"
45
- shift
46
- ;;
47
- *)
48
- echo "{\"error\": \"Unknown argument: $1\"}"
49
- exit 1
50
- ;;
51
- esac
52
- done
53
-
54
- if [[ -z "$URL_HOST" ]]; then
55
- if [[ "$BIND_HOST" == "127.0.0.1" || "$BIND_HOST" == "localhost" ]]; then
56
- URL_HOST="localhost"
57
- else
58
- URL_HOST="$BIND_HOST"
59
- fi
60
- fi
61
-
62
- # Some environments reap detached/background processes. Auto-foreground when detected.
63
- if [[ -n "${CODEX_CI:-}" && "$FOREGROUND" != "true" && "$FORCE_BACKGROUND" != "true" ]]; then
64
- FOREGROUND="true"
65
- fi
66
-
67
- # Windows/Git Bash reaps nohup background processes. Auto-foreground when detected.
68
- if [[ "$FOREGROUND" != "true" && "$FORCE_BACKGROUND" != "true" ]]; then
69
- case "${OSTYPE:-}" in
70
- msys*|cygwin*|mingw*) FOREGROUND="true" ;;
71
- esac
72
- if [[ -n "${MSYSTEM:-}" ]]; then
73
- FOREGROUND="true"
74
- fi
75
- fi
76
-
77
- # Generate unique session directory
78
- SESSION_ID="$$-$(date +%s)"
79
-
80
- if [[ -n "$PROJECT_DIR" ]]; then
81
- SESSION_DIR="${PROJECT_DIR}/.superpowers/brainstorm/${SESSION_ID}"
82
- else
83
- SESSION_DIR="/tmp/brainstorm-${SESSION_ID}"
84
- fi
85
-
86
- STATE_DIR="${SESSION_DIR}/state"
87
- PID_FILE="${STATE_DIR}/server.pid"
88
- LOG_FILE="${STATE_DIR}/server.log"
89
-
90
- # Create fresh session directory with content and state peers
91
- mkdir -p "${SESSION_DIR}/content" "$STATE_DIR"
92
-
93
- # Kill any existing server
94
- if [[ -f "$PID_FILE" ]]; then
95
- old_pid=$(cat "$PID_FILE")
96
- kill "$old_pid" 2>/dev/null
97
- rm -f "$PID_FILE"
98
- fi
99
-
100
- cd "$SCRIPT_DIR"
101
-
102
- # Resolve the harness PID (grandparent of this script).
103
- # $PPID is the ephemeral shell the harness spawned to run us — it dies
104
- # when this script exits. The harness itself is $PPID's parent.
105
- OWNER_PID="$(ps -o ppid= -p "$PPID" 2>/dev/null | tr -d ' ')"
106
- if [[ -z "$OWNER_PID" || "$OWNER_PID" == "1" ]]; then
107
- OWNER_PID="$PPID"
108
- fi
109
-
110
- # Foreground mode for environments that reap detached/background processes.
111
- if [[ "$FOREGROUND" == "true" ]]; then
112
- echo "$$" > "$PID_FILE"
113
- env BRAINSTORM_DIR="$SESSION_DIR" BRAINSTORM_HOST="$BIND_HOST" BRAINSTORM_URL_HOST="$URL_HOST" BRAINSTORM_OWNER_PID="$OWNER_PID" node server.cjs
114
- exit $?
115
- fi
116
-
117
- # Start server, capturing output to log file
118
- # Use nohup to survive shell exit; disown to remove from job table
119
- nohup env BRAINSTORM_DIR="$SESSION_DIR" BRAINSTORM_HOST="$BIND_HOST" BRAINSTORM_URL_HOST="$URL_HOST" BRAINSTORM_OWNER_PID="$OWNER_PID" node server.cjs > "$LOG_FILE" 2>&1 &
120
- SERVER_PID=$!
121
- disown "$SERVER_PID" 2>/dev/null
122
- echo "$SERVER_PID" > "$PID_FILE"
123
-
124
- # Wait for server-started message (check log file)
125
- for i in {1..50}; do
126
- if grep -q "server-started" "$LOG_FILE" 2>/dev/null; then
127
- # Verify server is still alive after a short window (catches process reapers)
128
- alive="true"
129
- for _ in {1..20}; do
130
- if ! kill -0 "$SERVER_PID" 2>/dev/null; then
131
- alive="false"
132
- break
133
- fi
134
- sleep 0.1
135
- done
136
- if [[ "$alive" != "true" ]]; then
137
- echo "{\"error\": \"Server started but was killed. Retry in a persistent terminal with: $SCRIPT_DIR/start-server.sh${PROJECT_DIR:+ --project-dir $PROJECT_DIR} --host $BIND_HOST --url-host $URL_HOST --foreground\"}"
138
- exit 1
139
- fi
140
- grep "server-started" "$LOG_FILE" | head -1
141
- exit 0
142
- fi
143
- sleep 0.1
144
- done
145
-
146
- # Timeout - server didn't start
147
- echo '{"error": "Server failed to start within 5 seconds"}'
148
- exit 1
@@ -1,56 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Stop the brainstorm server and clean up
3
- # Usage: stop-server.sh <session_dir>
4
- #
5
- # Kills the server process. Only deletes session directory if it's
6
- # under /tmp (ephemeral). Persistent directories (.superpowers/) are
7
- # kept so mockups can be reviewed later.
8
-
9
- SESSION_DIR="$1"
10
-
11
- if [[ -z "$SESSION_DIR" ]]; then
12
- echo '{"error": "Usage: stop-server.sh <session_dir>"}'
13
- exit 1
14
- fi
15
-
16
- STATE_DIR="${SESSION_DIR}/state"
17
- PID_FILE="${STATE_DIR}/server.pid"
18
-
19
- if [[ -f "$PID_FILE" ]]; then
20
- pid=$(cat "$PID_FILE")
21
-
22
- # Try to stop gracefully, fallback to force if still alive
23
- kill "$pid" 2>/dev/null || true
24
-
25
- # Wait for graceful shutdown (up to ~2s)
26
- for i in {1..20}; do
27
- if ! kill -0 "$pid" 2>/dev/null; then
28
- break
29
- fi
30
- sleep 0.1
31
- done
32
-
33
- # If still running, escalate to SIGKILL
34
- if kill -0 "$pid" 2>/dev/null; then
35
- kill -9 "$pid" 2>/dev/null || true
36
-
37
- # Give SIGKILL a moment to take effect
38
- sleep 0.1
39
- fi
40
-
41
- if kill -0 "$pid" 2>/dev/null; then
42
- echo '{"status": "failed", "error": "process still running"}'
43
- exit 1
44
- fi
45
-
46
- rm -f "$PID_FILE" "${STATE_DIR}/server.log"
47
-
48
- # Only delete ephemeral /tmp directories
49
- if [[ "$SESSION_DIR" == /tmp/* ]]; then
50
- rm -rf "$SESSION_DIR"
51
- fi
52
-
53
- echo '{"status": "stopped"}'
54
- else
55
- echo '{"status": "not_running"}'
56
- fi