hub-launch 1.0.3

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 (331) hide show
  1. package/CHANGELOG.md +144 -0
  2. package/README.md +195 -0
  3. package/bin/hublaunch +20 -0
  4. package/dist/commands/checkout.d.ts +7 -0
  5. package/dist/commands/checkout.d.ts.map +1 -0
  6. package/dist/commands/checkout.js +164 -0
  7. package/dist/commands/checkout.js.map +1 -0
  8. package/dist/commands/clean.d.ts +7 -0
  9. package/dist/commands/clean.d.ts.map +1 -0
  10. package/dist/commands/clean.js +206 -0
  11. package/dist/commands/clean.js.map +1 -0
  12. package/dist/commands/close.d.ts +7 -0
  13. package/dist/commands/close.d.ts.map +1 -0
  14. package/dist/commands/close.js +109 -0
  15. package/dist/commands/close.js.map +1 -0
  16. package/dist/commands/create.d.ts +7 -0
  17. package/dist/commands/create.d.ts.map +1 -0
  18. package/dist/commands/create.js +367 -0
  19. package/dist/commands/create.js.map +1 -0
  20. package/dist/commands/diff.d.ts +7 -0
  21. package/dist/commands/diff.d.ts.map +1 -0
  22. package/dist/commands/diff.js +98 -0
  23. package/dist/commands/diff.js.map +1 -0
  24. package/dist/commands/execute.d.ts +7 -0
  25. package/dist/commands/execute.d.ts.map +1 -0
  26. package/dist/commands/execute.js +376 -0
  27. package/dist/commands/execute.js.map +1 -0
  28. package/dist/commands/init.d.ts +8 -0
  29. package/dist/commands/init.d.ts.map +1 -0
  30. package/dist/commands/init.js +1243 -0
  31. package/dist/commands/init.js.map +1 -0
  32. package/dist/commands/interactive.d.ts +12 -0
  33. package/dist/commands/interactive.d.ts.map +1 -0
  34. package/dist/commands/interactive.js +1071 -0
  35. package/dist/commands/interactive.js.map +1 -0
  36. package/dist/commands/launch.d.ts +16 -0
  37. package/dist/commands/launch.d.ts.map +1 -0
  38. package/dist/commands/launch.js +684 -0
  39. package/dist/commands/launch.js.map +1 -0
  40. package/dist/commands/login.d.ts +40 -0
  41. package/dist/commands/login.d.ts.map +1 -0
  42. package/dist/commands/login.js +469 -0
  43. package/dist/commands/login.js.map +1 -0
  44. package/dist/commands/logs.d.ts +22 -0
  45. package/dist/commands/logs.d.ts.map +1 -0
  46. package/dist/commands/logs.js +105 -0
  47. package/dist/commands/logs.js.map +1 -0
  48. package/dist/commands/merge.d.ts +7 -0
  49. package/dist/commands/merge.d.ts.map +1 -0
  50. package/dist/commands/merge.js +240 -0
  51. package/dist/commands/merge.js.map +1 -0
  52. package/dist/commands/preview.d.ts +7 -0
  53. package/dist/commands/preview.d.ts.map +1 -0
  54. package/dist/commands/preview.js +160 -0
  55. package/dist/commands/preview.js.map +1 -0
  56. package/dist/commands/project.d.ts +18 -0
  57. package/dist/commands/project.d.ts.map +1 -0
  58. package/dist/commands/project.js +352 -0
  59. package/dist/commands/project.js.map +1 -0
  60. package/dist/commands/respond.d.ts +7 -0
  61. package/dist/commands/respond.d.ts.map +1 -0
  62. package/dist/commands/respond.js +112 -0
  63. package/dist/commands/respond.js.map +1 -0
  64. package/dist/commands/setPriority.d.ts +7 -0
  65. package/dist/commands/setPriority.d.ts.map +1 -0
  66. package/dist/commands/setPriority.js +112 -0
  67. package/dist/commands/setPriority.js.map +1 -0
  68. package/dist/commands/track.d.ts +7 -0
  69. package/dist/commands/track.d.ts.map +1 -0
  70. package/dist/commands/track.js +140 -0
  71. package/dist/commands/track.js.map +1 -0
  72. package/dist/commands/upload.d.ts +21 -0
  73. package/dist/commands/upload.d.ts.map +1 -0
  74. package/dist/commands/upload.js +145 -0
  75. package/dist/commands/upload.js.map +1 -0
  76. package/dist/commands/view.d.ts +7 -0
  77. package/dist/commands/view.d.ts.map +1 -0
  78. package/dist/commands/view.js +168 -0
  79. package/dist/commands/view.js.map +1 -0
  80. package/dist/commands/watch.d.ts +7 -0
  81. package/dist/commands/watch.d.ts.map +1 -0
  82. package/dist/commands/watch.js +438 -0
  83. package/dist/commands/watch.js.map +1 -0
  84. package/dist/commands/worktree.d.ts +7 -0
  85. package/dist/commands/worktree.d.ts.map +1 -0
  86. package/dist/commands/worktree.js +122 -0
  87. package/dist/commands/worktree.js.map +1 -0
  88. package/dist/config/command-names.d.ts +16 -0
  89. package/dist/config/command-names.d.ts.map +1 -0
  90. package/dist/config/command-names.js +17 -0
  91. package/dist/config/command-names.js.map +1 -0
  92. package/dist/config/constants.d.ts +12 -0
  93. package/dist/config/constants.d.ts.map +1 -0
  94. package/dist/config/constants.js +12 -0
  95. package/dist/config/constants.js.map +1 -0
  96. package/dist/config/index.d.ts +47 -0
  97. package/dist/config/index.d.ts.map +1 -0
  98. package/dist/config/index.js +175 -0
  99. package/dist/config/index.js.map +1 -0
  100. package/dist/index.d.ts +3 -0
  101. package/dist/index.d.ts.map +1 -0
  102. package/dist/index.js +148 -0
  103. package/dist/index.js.map +1 -0
  104. package/dist/services/api/HulaApiClient.d.ts +170 -0
  105. package/dist/services/api/HulaApiClient.d.ts.map +1 -0
  106. package/dist/services/api/HulaApiClient.js +233 -0
  107. package/dist/services/api/HulaApiClient.js.map +1 -0
  108. package/dist/services/diff/DiffService.d.ts +44 -0
  109. package/dist/services/diff/DiffService.d.ts.map +1 -0
  110. package/dist/services/diff/DiffService.js +126 -0
  111. package/dist/services/diff/DiffService.js.map +1 -0
  112. package/dist/services/editor/EditorService.d.ts +53 -0
  113. package/dist/services/editor/EditorService.d.ts.map +1 -0
  114. package/dist/services/editor/EditorService.js +161 -0
  115. package/dist/services/editor/EditorService.js.map +1 -0
  116. package/dist/services/git/GitService.d.ts +124 -0
  117. package/dist/services/git/GitService.d.ts.map +1 -0
  118. package/dist/services/git/GitService.js +423 -0
  119. package/dist/services/git/GitService.js.map +1 -0
  120. package/dist/services/git/WorktreeService.d.ts +144 -0
  121. package/dist/services/git/WorktreeService.d.ts.map +1 -0
  122. package/dist/services/git/WorktreeService.js +505 -0
  123. package/dist/services/git/WorktreeService.js.map +1 -0
  124. package/dist/services/github/ActionsService.d.ts +66 -0
  125. package/dist/services/github/ActionsService.d.ts.map +1 -0
  126. package/dist/services/github/ActionsService.js +114 -0
  127. package/dist/services/github/ActionsService.js.map +1 -0
  128. package/dist/services/github/AssetUploadService.d.ts +103 -0
  129. package/dist/services/github/AssetUploadService.d.ts.map +1 -0
  130. package/dist/services/github/AssetUploadService.js +299 -0
  131. package/dist/services/github/AssetUploadService.js.map +1 -0
  132. package/dist/services/github/BatchCopilotDetectionService.d.ts +58 -0
  133. package/dist/services/github/BatchCopilotDetectionService.d.ts.map +1 -0
  134. package/dist/services/github/BatchCopilotDetectionService.js +321 -0
  135. package/dist/services/github/BatchCopilotDetectionService.js.map +1 -0
  136. package/dist/services/github/CopilotDetectionService.d.ts +40 -0
  137. package/dist/services/github/CopilotDetectionService.d.ts.map +1 -0
  138. package/dist/services/github/CopilotDetectionService.js +280 -0
  139. package/dist/services/github/CopilotDetectionService.js.map +1 -0
  140. package/dist/services/github/CopilotService.d.ts +27 -0
  141. package/dist/services/github/CopilotService.d.ts.map +1 -0
  142. package/dist/services/github/CopilotService.js +249 -0
  143. package/dist/services/github/CopilotService.js.map +1 -0
  144. package/dist/services/github/DeploymentDetectionService.d.ts +38 -0
  145. package/dist/services/github/DeploymentDetectionService.d.ts.map +1 -0
  146. package/dist/services/github/DeploymentDetectionService.js +104 -0
  147. package/dist/services/github/DeploymentDetectionService.js.map +1 -0
  148. package/dist/services/github/GithubAppService.d.ts +40 -0
  149. package/dist/services/github/GithubAppService.d.ts.map +1 -0
  150. package/dist/services/github/GithubAppService.js +187 -0
  151. package/dist/services/github/GithubAppService.js.map +1 -0
  152. package/dist/services/github/IssueService.d.ts +65 -0
  153. package/dist/services/github/IssueService.d.ts.map +1 -0
  154. package/dist/services/github/IssueService.js +231 -0
  155. package/dist/services/github/IssueService.js.map +1 -0
  156. package/dist/services/github/LabelService.d.ts +36 -0
  157. package/dist/services/github/LabelService.d.ts.map +1 -0
  158. package/dist/services/github/LabelService.js +122 -0
  159. package/dist/services/github/LabelService.js.map +1 -0
  160. package/dist/services/github/PRService.d.ts +77 -0
  161. package/dist/services/github/PRService.d.ts.map +1 -0
  162. package/dist/services/github/PRService.js +287 -0
  163. package/dist/services/github/PRService.js.map +1 -0
  164. package/dist/services/github/ProjectService.d.ts +144 -0
  165. package/dist/services/github/ProjectService.d.ts.map +1 -0
  166. package/dist/services/github/ProjectService.js +804 -0
  167. package/dist/services/github/ProjectService.js.map +1 -0
  168. package/dist/services/hooks/HookExecutor.d.ts +66 -0
  169. package/dist/services/hooks/HookExecutor.d.ts.map +1 -0
  170. package/dist/services/hooks/HookExecutor.js +227 -0
  171. package/dist/services/hooks/HookExecutor.js.map +1 -0
  172. package/dist/services/hooks/index.d.ts +2 -0
  173. package/dist/services/hooks/index.d.ts.map +1 -0
  174. package/dist/services/hooks/index.js +2 -0
  175. package/dist/services/hooks/index.js.map +1 -0
  176. package/dist/services/logs/LogFormatterService.d.ts +17 -0
  177. package/dist/services/logs/LogFormatterService.d.ts.map +1 -0
  178. package/dist/services/logs/LogFormatterService.js +35 -0
  179. package/dist/services/logs/LogFormatterService.js.map +1 -0
  180. package/dist/services/logs/TempFileService.d.ts +27 -0
  181. package/dist/services/logs/TempFileService.d.ts.map +1 -0
  182. package/dist/services/logs/TempFileService.js +90 -0
  183. package/dist/services/logs/TempFileService.js.map +1 -0
  184. package/dist/services/logs/index.d.ts +3 -0
  185. package/dist/services/logs/index.d.ts.map +1 -0
  186. package/dist/services/logs/index.js +4 -0
  187. package/dist/services/logs/index.js.map +1 -0
  188. package/dist/services/plan/PlanService.d.ts +70 -0
  189. package/dist/services/plan/PlanService.d.ts.map +1 -0
  190. package/dist/services/plan/PlanService.js +211 -0
  191. package/dist/services/plan/PlanService.js.map +1 -0
  192. package/dist/services/polling/GitHubDirectPollingAdapter.d.ts +16 -0
  193. package/dist/services/polling/GitHubDirectPollingAdapter.d.ts.map +1 -0
  194. package/dist/services/polling/GitHubDirectPollingAdapter.js +87 -0
  195. package/dist/services/polling/GitHubDirectPollingAdapter.js.map +1 -0
  196. package/dist/services/polling/HulaServerPollingAdapter.d.ts +23 -0
  197. package/dist/services/polling/HulaServerPollingAdapter.d.ts.map +1 -0
  198. package/dist/services/polling/HulaServerPollingAdapter.js +78 -0
  199. package/dist/services/polling/HulaServerPollingAdapter.js.map +1 -0
  200. package/dist/services/polling/IStatusPollingAdapter.d.ts +29 -0
  201. package/dist/services/polling/IStatusPollingAdapter.d.ts.map +1 -0
  202. package/dist/services/polling/IStatusPollingAdapter.js +2 -0
  203. package/dist/services/polling/IStatusPollingAdapter.js.map +1 -0
  204. package/dist/services/polling/StatusPollingAdapterFactory.d.ts +14 -0
  205. package/dist/services/polling/StatusPollingAdapterFactory.d.ts.map +1 -0
  206. package/dist/services/polling/StatusPollingAdapterFactory.js +41 -0
  207. package/dist/services/polling/StatusPollingAdapterFactory.js.map +1 -0
  208. package/dist/services/polling/index.d.ts +5 -0
  209. package/dist/services/polling/index.d.ts.map +1 -0
  210. package/dist/services/polling/index.js +5 -0
  211. package/dist/services/polling/index.js.map +1 -0
  212. package/dist/services/preview/PreviewService.d.ts +86 -0
  213. package/dist/services/preview/PreviewService.d.ts.map +1 -0
  214. package/dist/services/preview/PreviewService.js +439 -0
  215. package/dist/services/preview/PreviewService.js.map +1 -0
  216. package/dist/services/tracking/ProjectTrackingAdapter.d.ts +41 -0
  217. package/dist/services/tracking/ProjectTrackingAdapter.d.ts.map +1 -0
  218. package/dist/services/tracking/ProjectTrackingAdapter.js +230 -0
  219. package/dist/services/tracking/ProjectTrackingAdapter.js.map +1 -0
  220. package/dist/services/tracking/RemoteTrackingAdapter.d.ts +62 -0
  221. package/dist/services/tracking/RemoteTrackingAdapter.d.ts.map +1 -0
  222. package/dist/services/tracking/RemoteTrackingAdapter.js +242 -0
  223. package/dist/services/tracking/RemoteTrackingAdapter.js.map +1 -0
  224. package/dist/services/tracking/TrackingAdapterFactory.d.ts +25 -0
  225. package/dist/services/tracking/TrackingAdapterFactory.d.ts.map +1 -0
  226. package/dist/services/tracking/TrackingAdapterFactory.js +55 -0
  227. package/dist/services/tracking/TrackingAdapterFactory.js.map +1 -0
  228. package/dist/services/tracking/TrackingService.d.ts +104 -0
  229. package/dist/services/tracking/TrackingService.d.ts.map +1 -0
  230. package/dist/services/tracking/TrackingService.js +256 -0
  231. package/dist/services/tracking/TrackingService.js.map +1 -0
  232. package/dist/services/tracking/UntrackedIssuesService.d.ts +20 -0
  233. package/dist/services/tracking/UntrackedIssuesService.d.ts.map +1 -0
  234. package/dist/services/tracking/UntrackedIssuesService.js +148 -0
  235. package/dist/services/tracking/UntrackedIssuesService.js.map +1 -0
  236. package/dist/services/tracking/local-file-migration.d.ts +16 -0
  237. package/dist/services/tracking/local-file-migration.d.ts.map +1 -0
  238. package/dist/services/tracking/local-file-migration.js +86 -0
  239. package/dist/services/tracking/local-file-migration.js.map +1 -0
  240. package/dist/templates/planning-instructions.md +752 -0
  241. package/dist/templates/proceed-instructions.md +453 -0
  242. package/dist/templates/scripts/hula-fix-commit.sh +110 -0
  243. package/dist/templates/scripts/hula-fix-setup.sh +145 -0
  244. package/dist/templates/scripts/hula-launch-run.sh +89 -0
  245. package/dist/templates/scripts/hula-merge-local.sh +138 -0
  246. package/dist/templates/scripts/hula-merge-remote.sh +74 -0
  247. package/dist/templates/scripts/hula-read-config.sh +38 -0
  248. package/dist/templates/scripts/hula-verify-gather.sh +135 -0
  249. package/dist/templates/scripts/hula-verify-post.sh +84 -0
  250. package/dist/templates/skills/hula-confirm/SKILL.md +361 -0
  251. package/dist/templates/skills/hula-create/SKILL.md +211 -0
  252. package/dist/templates/skills/hula-fix/SKILL.md +224 -0
  253. package/dist/templates/skills/hula-launch/SKILL.md +159 -0
  254. package/dist/templates/skills/hula-log/SKILL.md +105 -0
  255. package/dist/templates/skills/hula-merge/SKILL.md +387 -0
  256. package/dist/templates/skills/hula-plan/SKILL.md +148 -0
  257. package/dist/templates/skills/hula-upload/SKILL.md +115 -0
  258. package/dist/templates/skills/hula-verify/SKILL.md +754 -0
  259. package/dist/types/common.schema.d.ts +46 -0
  260. package/dist/types/common.schema.d.ts.map +1 -0
  261. package/dist/types/common.schema.js +60 -0
  262. package/dist/types/common.schema.js.map +1 -0
  263. package/dist/types/config.schema.d.ts +443 -0
  264. package/dist/types/config.schema.d.ts.map +1 -0
  265. package/dist/types/config.schema.js +126 -0
  266. package/dist/types/config.schema.js.map +1 -0
  267. package/dist/types/index.d.ts +6 -0
  268. package/dist/types/index.d.ts.map +1 -0
  269. package/dist/types/index.js +7 -0
  270. package/dist/types/index.js.map +1 -0
  271. package/dist/types/issue.schema.d.ts +136 -0
  272. package/dist/types/issue.schema.d.ts.map +1 -0
  273. package/dist/types/issue.schema.js +49 -0
  274. package/dist/types/issue.schema.js.map +1 -0
  275. package/dist/types/pr.schema.d.ts +118 -0
  276. package/dist/types/pr.schema.d.ts.map +1 -0
  277. package/dist/types/pr.schema.js +40 -0
  278. package/dist/types/pr.schema.js.map +1 -0
  279. package/dist/types/tracking.schema.d.ts +340 -0
  280. package/dist/types/tracking.schema.d.ts.map +1 -0
  281. package/dist/types/tracking.schema.js +56 -0
  282. package/dist/types/tracking.schema.js.map +1 -0
  283. package/dist/utils/browser-launcher.d.ts +60 -0
  284. package/dist/utils/browser-launcher.d.ts.map +1 -0
  285. package/dist/utils/browser-launcher.js +263 -0
  286. package/dist/utils/browser-launcher.js.map +1 -0
  287. package/dist/utils/cache.d.ts +44 -0
  288. package/dist/utils/cache.d.ts.map +1 -0
  289. package/dist/utils/cache.js +94 -0
  290. package/dist/utils/cache.js.map +1 -0
  291. package/dist/utils/config-parser.d.ts +16 -0
  292. package/dist/utils/config-parser.d.ts.map +1 -0
  293. package/dist/utils/config-parser.js +210 -0
  294. package/dist/utils/config-parser.js.map +1 -0
  295. package/dist/utils/editor.d.ts +21 -0
  296. package/dist/utils/editor.d.ts.map +1 -0
  297. package/dist/utils/editor.js +213 -0
  298. package/dist/utils/editor.js.map +1 -0
  299. package/dist/utils/git-utils.d.ts +5 -0
  300. package/dist/utils/git-utils.d.ts.map +1 -0
  301. package/dist/utils/git-utils.js +18 -0
  302. package/dist/utils/git-utils.js.map +1 -0
  303. package/dist/utils/github-cli.d.ts +62 -0
  304. package/dist/utils/github-cli.d.ts.map +1 -0
  305. package/dist/utils/github-cli.js +492 -0
  306. package/dist/utils/github-cli.js.map +1 -0
  307. package/dist/utils/logger.d.ts +45 -0
  308. package/dist/utils/logger.d.ts.map +1 -0
  309. package/dist/utils/logger.js +118 -0
  310. package/dist/utils/logger.js.map +1 -0
  311. package/dist/utils/open-url.d.ts +19 -0
  312. package/dist/utils/open-url.d.ts.map +1 -0
  313. package/dist/utils/open-url.js +37 -0
  314. package/dist/utils/open-url.js.map +1 -0
  315. package/dist/utils/project-resolver.d.ts +13 -0
  316. package/dist/utils/project-resolver.d.ts.map +1 -0
  317. package/dist/utils/project-resolver.js +35 -0
  318. package/dist/utils/project-resolver.js.map +1 -0
  319. package/dist/utils/prompts.d.ts +80 -0
  320. package/dist/utils/prompts.d.ts.map +1 -0
  321. package/dist/utils/prompts.js +326 -0
  322. package/dist/utils/prompts.js.map +1 -0
  323. package/dist/utils/shell.d.ts +54 -0
  324. package/dist/utils/shell.d.ts.map +1 -0
  325. package/dist/utils/shell.js +152 -0
  326. package/dist/utils/shell.js.map +1 -0
  327. package/dist/utils/validators.d.ts +32 -0
  328. package/dist/utils/validators.d.ts.map +1 -0
  329. package/dist/utils/validators.js +64 -0
  330. package/dist/utils/validators.js.map +1 -0
  331. package/package.json +73 -0
@@ -0,0 +1,453 @@
1
+ # HubLaunch Plan Confirmation Instructions
2
+
3
+ You are an expert plan validator for the HubLaunch project, ensuring plans created by `/hula-plan` are ready for remote GitHub Copilot implementation.
4
+
5
+ ## Context
6
+
7
+ The `/hula-plan` participant creates comprehensive implementation plans based on user requirements. Your role with `/hula-confirm` is to **validate** these plans are truly self-contained and ready for remote GitHub Copilot.
8
+
9
+ ## Why This Matters
10
+
11
+ Remote GitHub Copilot will:
12
+ - Only see the plan document (no chat history)
13
+ - Cannot ask clarifying questions
14
+ - Must rely entirely on what's written in the plan
15
+
16
+ Any ambiguity or missing context = implementation failure.
17
+
18
+ ## Your Validation Framework
19
+
20
+ ### 1. Remote Copilot Readiness
21
+
22
+ **Critical checks:**
23
+
24
+ ❌ **Prohibited in plans:**
25
+ - "As we discussed..."
26
+ - "Per our conversation..."
27
+ - "The user wants..."
28
+ - "Based on what you said..."
29
+ - Vague pronouns without clear antecedents
30
+
31
+ ✅ **Required in plans:**
32
+ - "The requirement is to..."
33
+ - "This decision was made because..."
34
+ - "The specific behavior should be..."
35
+ - Complete context for all decisions
36
+
37
+ **Auto-fix approach:**
38
+ - Detect chat reference patterns
39
+ - Rewrite to be self-contained
40
+ - Include the actual decision/reasoning inline
41
+
42
+ ### 2. Technical Specificity
43
+
44
+ **Vague (needs fixing):**
45
+ - "Update the service"
46
+ - "Call the API"
47
+ - "Handle errors"
48
+ - "Add tests"
49
+
50
+ **Specific (good):**
51
+ - "Update `src/services/github/PRService.ts`, add method `getDeploymentUrl(prNumber: number)`"
52
+ - "Call `GET https://api.github.com/repos/{owner}/{repo}/pulls/{number}` with auth header `Bearer {token}`"
53
+ - "Catch `AxiosError`, check `error.response.status`: 404 → 'PR not found', 429 → retry after 60s"
54
+ - "Add unit test: `describe('getDeploymentUrl')`, test case: 'returns URL for valid PR', assert URL matches `https://deploy-*-project.vercel.app`"
55
+
56
+ **Validation strategy:**
57
+ - Scan for vague language patterns
58
+ - Flag sections needing more detail
59
+ - Ask MCQ questions to gather specifics
60
+ - Update plan with concrete details
61
+
62
+ ### 3. Completeness Checklist
63
+
64
+ **Required sections:**
65
+
66
+ Every plan must have:
67
+
68
+ 1. **Title** (H1) - Descriptive, suitable for GitHub issue
69
+ 2. **Problem Statement** - Current state vs desired state, why needed
70
+ 3. **Requirements** - Functional, technical, non-functional (all three)
71
+ 4. **Proposed Solution** - High-level approach, key components
72
+ 5. **Implementation Steps** - Phased tasks with specific file paths
73
+ 6. **Technical Considerations** - Dependencies, config changes, security
74
+ 7. **Testing Strategy** - Unit tests, integration tests, manual testing
75
+ 8. **Documentation Updates** - README, relevant docs/ pages, code comments
76
+ 9. **Acceptance Criteria** - Measurable success conditions
77
+
78
+ **Validation approach:**
79
+ - Check all sections present
80
+ - Verify each section has substance (not just headers)
81
+ - Auto-add missing sections with templates
82
+ - Flag incomplete sections for user input
83
+
84
+ ### 4. Edge Case Coverage
85
+
86
+ **Common edge cases to check for:**
87
+
88
+ - **Network failures**: What if API is unreachable?
89
+ - **Rate limiting**: What if quota exceeded?
90
+ - **Authentication failures**: Invalid/expired tokens?
91
+ - **Invalid input**: Empty, null, malformed data?
92
+ - **Missing data**: Required fields not present?
93
+ - **Concurrent operations**: Race conditions, locks?
94
+ - **Configuration errors**: Missing config, invalid values?
95
+
96
+ **Validation approach:**
97
+ - Scan for edge case handling
98
+ - Add standard patterns where missing
99
+ - Ask user about domain-specific edge cases
100
+ - Update plan with handling strategies
101
+
102
+ ### 5. Testing Adequacy
103
+
104
+ **Required testing coverage:**
105
+
106
+ **Unit Tests:**
107
+ - Happy path scenarios
108
+ - Edge cases and error conditions
109
+ - Boundary values
110
+ - Example: "`describe('validateConfig')` → test valid config, test missing fields, test invalid types"
111
+
112
+ **Integration Tests:**
113
+ - External service calls
114
+ - End-to-end workflows
115
+ - Example: "Test GitHub API integration: mock API, verify correct endpoint called, verify response parsed correctly"
116
+
117
+ **Manual Testing:**
118
+ - User-facing commands
119
+ - Step-by-step instructions
120
+ - Expected outputs
121
+ - Example: "Run `hula preview 123`, verify URL printed, verify browser opens"
122
+
123
+ **Validation approach:**
124
+ - Check testing section exists and is detailed
125
+ - Verify test scenarios cover main functionality
126
+ - Ensure edge cases are tested
127
+ - Add test templates if missing
128
+
129
+ ## MCQ Question Guidelines
130
+
131
+ ### When to Ask Questions
132
+
133
+ **Ask for clarification when:**
134
+ - Multiple valid implementation approaches exist
135
+ - Technical details are ambiguous or missing
136
+ - Domain-specific decisions needed
137
+ - Edge case handling not obvious
138
+ - API/service selection unclear
139
+
140
+ **Don't ask when:**
141
+ - Answer is obvious from context
142
+ - Standard pattern exists in codebase
143
+ - Auto-fix is safe and unambiguous
144
+
145
+ ### How to Format Questions
146
+
147
+ **Template:**
148
+ ```markdown
149
+ **Q[number]. [Specific question about concrete aspect]?**
150
+ A) [Option 1 - specific, actionable]
151
+ B) [Option 2 - specific, actionable]
152
+ C) [Option 3 - specific, actionable]
153
+ D) Other (please specify: _____)
154
+
155
+ Context: [Brief explanation of why this matters]
156
+ ```
157
+
158
+ **Example - Good:**
159
+ ```markdown
160
+ **Q1. Which GitHub API should be used to fetch deployment status?**
161
+ A) REST API v3: `GET /repos/{owner}/{repo}/deployments`
162
+ B) GraphQL API v4: `query { repository { deployments } }`
163
+ C) GitHub Deployments API + Vercel API combined
164
+ D) Other (please specify)
165
+
166
+ Context: This affects authentication, rate limits, and data structure.
167
+ ```
168
+
169
+ **Example - Bad:**
170
+ ```markdown
171
+ Q1. Is the GitHub API the right choice?
172
+ A) Yes
173
+ B) No
174
+ ```
175
+
176
+ ### Question Grouping
177
+
178
+ Group related questions by topic:
179
+
180
+ 1. **API & Services** (Q1-Q3)
181
+ 2. **Authentication & Security** (Q4-Q5)
182
+ 3. **Error Handling** (Q6-Q8)
183
+ 4. **Testing** (Q9-Q10)
184
+
185
+ This helps users provide coherent answers.
186
+
187
+ ## Auto-Fix Strategies
188
+
189
+ ### What to Auto-Fix
190
+
191
+ **Safe to fix automatically:**
192
+
193
+ 1. **Chat references** → Rewrite with actual context
194
+ - Before: "As we discussed, use Vercel API"
195
+ - After: "Use Vercel API because it provides real-time deployment status"
196
+
197
+ 2. **Missing sections** → Add templates
198
+ - Add "## Testing Strategy" with unit/integration/manual subsections
199
+ - Add "## Edge Cases" with common patterns
200
+
201
+ 3. **Obvious file paths** → Use codebase search
202
+ - "Update the GitHub service" → `src/services/github/GitHubService.ts`
203
+ - Verify file exists before suggesting
204
+
205
+ 4. **Standard patterns** → Apply known conventions
206
+ - Error handling: Add try-catch template
207
+ - Testing: Add jest test structure
208
+ - Config: Follow existing config patterns
209
+
210
+ 5. **Formatting** → Fix markdown structure
211
+ - Ensure proper heading hierarchy
212
+ - Fix broken lists, code blocks
213
+ - Add missing checkboxes in task lists
214
+
215
+ ### What NOT to Auto-Fix
216
+
217
+ **Require user input:**
218
+
219
+ 1. **Technical decisions** - Which API, library, approach?
220
+ 2. **Business logic** - What should happen when...?
221
+ 3. **Requirements** - Is feature X needed?
222
+ 4. **Scope** - Should this include Y?
223
+ 5. **Priorities** - What's must-have vs nice-to-have?
224
+
225
+ ## Iterative Refinement
226
+
227
+ The validation process may take multiple rounds:
228
+
229
+ ### Round 1: Initial Validation
230
+ - Scan for obvious issues
231
+ - Apply auto-fixes
232
+ - Generate comprehensive question list
233
+ - STOP and wait for answers
234
+
235
+ ### Round 2: Apply Answers
236
+ - Integrate user responses
237
+ - Update plan with specifics
238
+ - Check if new gaps emerged
239
+ - Ask follow-up questions if needed
240
+
241
+ ### Round 3: Final Review
242
+ - Verify all sections complete
243
+ - Check specificity level
244
+ - Confirm remote Copilot readiness
245
+ - Get user approval
246
+
247
+ ### Completion Criteria
248
+
249
+ Plan is ready when:
250
+ - ✅ All required sections present and detailed
251
+ - ✅ No chat context references
252
+ - ✅ All technical details specific (file paths, API endpoints, error messages)
253
+ - ✅ Edge cases identified with handling strategies
254
+ - ✅ Testing strategy comprehensive
255
+ - ✅ User approves final version
256
+
257
+ ## Output Formats
258
+
259
+ ### Validation Summary Format
260
+
261
+ ```markdown
262
+ ## 📊 Plan Validation Summary
263
+
264
+ Analyzing: `[plan-path]`
265
+
266
+ ### ✅ Auto-Fixed Issues ([X])
267
+ [List of automatic improvements made]
268
+
269
+ ### ⚠️ Issues Requiring Your Input ([Y])
270
+ [MCQ questions numbered Q1, Q2, etc.]
271
+
272
+ ### 📝 Optional Improvements ([Z])
273
+ [Nice-to-have enhancements]
274
+
275
+ **Reply with:** 1A, 2B, 3C, etc. (or provide custom answers)
276
+ ```
277
+
278
+ ### Update Confirmation Format
279
+
280
+ ```markdown
281
+ ✅ Plan updated successfully!
282
+
283
+ **Changes made:**
284
+ - [Change 1]
285
+ - [Change 2]
286
+ - [Change 3]
287
+
288
+ **Final check:**
289
+ R1. Ready for remote Copilot? (A: Yes / B: No, refine more)
290
+ R2. Do another validation pass? (A: Yes / B: No, complete)
291
+ ```
292
+
293
+ ### Completion Format
294
+
295
+ ```markdown
296
+ ✅ Plan validation complete!
297
+
298
+ 📄 Final plan: `.hublaunch/plans/[filename]`
299
+
300
+ **Readiness checklist:**
301
+ - ✅ Self-contained (no chat references)
302
+ - ✅ Specific technical details
303
+ - ✅ Complete implementation steps
304
+ - ✅ Edge case coverage
305
+ - ✅ Testing strategy
306
+ - ✅ User approved
307
+
308
+ **Next step:** Assign this plan to GitHub Copilot for implementation.
309
+ ```
310
+
311
+ ## Common Validation Patterns
312
+
313
+ ### Pattern: Missing API Details
314
+
315
+ **Detected:** "Call the GitHub API"
316
+ **Auto-fix:** ❌ (multiple valid endpoints)
317
+ **Question:**
318
+ ```markdown
319
+ **Q1. Which GitHub API endpoint should be called?**
320
+ A) `GET /repos/{owner}/{repo}/issues/{number}`
321
+ B) `GET /repos/{owner}/{repo}/pulls/{number}`
322
+ C) GraphQL: `query { repository { issue(number: X) } }`
323
+ D) Other (specify)
324
+ ```
325
+
326
+ ### Pattern: Vague Error Handling
327
+
328
+ **Detected:** "Add error handling"
329
+ **Auto-fix:** ✅ (add standard template)
330
+ **Enhancement:**
331
+ ```markdown
332
+ ### Error Handling
333
+
334
+ - **Network errors**: Catch and display "Could not connect to [service]. Check your internet connection."
335
+ - **Authentication errors**: Display "Invalid or expired token. Get a new token from [URL]"
336
+ - **Rate limit errors**: Wait 60s and retry (max 3 attempts)
337
+ - **Not found errors**: Display "[Resource] not found. Verify [identifier] and try again."
338
+ ```
339
+
340
+ ### Pattern: Missing File Paths
341
+
342
+ **Detected:** "Update the service"
343
+ **Auto-fix:** ✅ (if unambiguous from codebase)
344
+ **Enhancement:**
345
+ - Search codebase for matching service
346
+ - If one match: Add specific path
347
+ - If multiple matches: Ask user to choose
348
+
349
+ ### Pattern: Incomplete Testing
350
+
351
+ **Detected:** "Add tests"
352
+ **Auto-fix:** ✅ (add template)
353
+ **Enhancement:**
354
+ ```markdown
355
+ ### Testing Strategy
356
+
357
+ #### Unit Tests
358
+ - [ ] Test `functionName()` with valid input
359
+ - Input: [example]
360
+ - Expected: [output]
361
+ - [ ] Test `functionName()` with invalid input
362
+ - Input: [example]
363
+ - Expected: Error "[message]"
364
+
365
+ #### Integration Tests
366
+ - [ ] Test end-to-end workflow
367
+ - Steps: [1, 2, 3]
368
+ - Verify: [outcome]
369
+ ```
370
+
371
+ ## Validation Checklist
372
+
373
+ Use this checklist for every plan validation:
374
+
375
+ ### Pre-Validation
376
+ - [ ] Plan file located and loaded
377
+ - [ ] User confirmed correct plan file
378
+
379
+ ### Validation Analysis
380
+ - [ ] Checked for chat context references
381
+ - [ ] Verified all required sections present
382
+ - [ ] Assessed technical detail specificity
383
+ - [ ] Identified edge cases coverage
384
+ - [ ] Evaluated testing adequacy
385
+
386
+ ### Auto-Fixes Applied
387
+ - [ ] Removed chat references
388
+ - [ ] Added missing sections
389
+ - [ ] Enhanced vague language (where unambiguous)
390
+ - [ ] Fixed formatting issues
391
+
392
+ ### User Questions Prepared
393
+ - [ ] Listed all ambiguous points
394
+ - [ ] Formatted as MCQ questions
395
+ - [ ] Grouped by topic
396
+ - [ ] Made responses easy
397
+
398
+ ### Plan Updates
399
+ - [ ] Integrated user answers
400
+ - [ ] Preserved existing content
401
+ - [ ] Added version marker
402
+ - [ ] Verified all changes
403
+
404
+ ### Final Review
405
+ - [ ] All sections complete and specific
406
+ - [ ] No chat references remain
407
+ - [ ] Technical details are concrete
408
+ - [ ] Edge cases handled
409
+ - [ ] Testing comprehensive
410
+ - [ ] User approved
411
+
412
+ ## Example Validation Session
413
+
414
+ ### Initial State
415
+ Plan says: "Add deployment preview feature using the API we discussed"
416
+
417
+ ### Analysis
418
+ ❌ Chat reference: "we discussed"
419
+ ❌ Vague: "the API"
420
+ ❌ Missing: Which API? How to authenticate?
421
+
422
+ ### Auto-Fix
423
+ - Remove "we discussed"
424
+ - Add: "Add deployment preview feature using an API"
425
+
426
+ ### Question
427
+ **Q1. Which deployment API should be used?**
428
+ A) Vercel API
429
+ B) Netlify API
430
+ C) GitHub Deployments API
431
+ D) Other
432
+
433
+ ### User Answer
434
+ "1A"
435
+
436
+ ### Enhanced Plan
437
+ "Add deployment preview feature using Vercel API (`https://api.vercel.com/v6/deployments`)"
438
+
439
+ ### Result
440
+ ✅ Specific
441
+ ✅ Self-contained
442
+ ✅ Actionable
443
+
444
+ ## Remember
445
+
446
+ - **Validate comprehensively** - check all aspects
447
+ - **Auto-fix when safe** - don't ask obvious questions
448
+ - **Ask MCQ questions** - make it easy for users
449
+ - **Preserve content** - enhance, don't replace
450
+ - **Iterate if needed** - refinement is a process
451
+ - **Ensure readiness** - plan must stand alone for remote Copilot
452
+
453
+ The goal is to ensure every plan can be successfully implemented by remote GitHub Copilot without any clarification questions.
@@ -0,0 +1,110 @@
1
+ #!/usr/bin/env bash
2
+ # hula-fix-commit.sh — Step 9 of the hula.fix workflow
3
+ # Usage: bash .github/scripts/hula-fix-commit.sh <issue-number> <commit-message> [--worktree-path <path>]
4
+ #
5
+ # Performs: git add -A → git commit → git push from within the fix worktree
6
+ # Outputs structured JSON to stdout; all other output goes to stderr
7
+ # Exit codes: 0=success, 1=user error, 2=tool error
8
+
9
+ set -euo pipefail
10
+
11
+ # ── helpers ────────────────────────────────────────────────────────────────────
12
+
13
+ json_escape() {
14
+ printf '%s' "$1" | sed 's/\\/\\\\/g; s/"/\\"/g; s/$/\\n/g' | tr -d '\n' | sed 's/\\n$//'
15
+ }
16
+
17
+ die() {
18
+ local code="$1"; shift
19
+ local safe_msg
20
+ safe_msg=$(json_escape "$*")
21
+ printf '{"status":"error","code":%d,"message":"%s"}\n' "$code" "$safe_msg" >&1
22
+ exit "$code"
23
+ }
24
+
25
+ # ── argument parsing ────────────────────────────────────────────────────────────
26
+
27
+ ISSUE_NUMBER=''
28
+ COMMIT_MSG=''
29
+ WORKTREE_PATH=''
30
+
31
+ while [[ $# -gt 0 ]]; do
32
+ case "$1" in
33
+ --worktree-path)
34
+ WORKTREE_PATH="$2"; shift 2 ;;
35
+ --worktree-path=*)
36
+ WORKTREE_PATH="${1#--worktree-path=}"; shift ;;
37
+ *)
38
+ if [[ -z "$ISSUE_NUMBER" ]]; then
39
+ ISSUE_NUMBER="$1"
40
+ elif [[ -z "$COMMIT_MSG" ]]; then
41
+ COMMIT_MSG="$1"
42
+ else
43
+ die 1 "Unexpected argument: $1"
44
+ fi
45
+ shift ;;
46
+ esac
47
+ done
48
+
49
+ if [[ -z "$ISSUE_NUMBER" ]]; then
50
+ die 1 "Usage: bash .github/scripts/hula-fix-commit.sh <issue-number> <commit-message> [--worktree-path <path>]"
51
+ fi
52
+
53
+ if [[ -z "$COMMIT_MSG" ]]; then
54
+ die 1 "Commit message is required."
55
+ fi
56
+
57
+ # ── Resolve worktree path ─────────────────────────────────────────────────────
58
+
59
+ if [[ -z "$WORKTREE_PATH" ]]; then
60
+ # Try to read from session file (use absolute path so it works from any CWD)
61
+ REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null) || REPO_ROOT="$(pwd)"
62
+ SESSION_FILE="${REPO_ROOT}/.hublaunch/.fix-sessions/issue-${ISSUE_NUMBER}.json"
63
+ if [[ -f "$SESSION_FILE" ]]; then
64
+ WORKTREE_PATH=$(grep '"worktreePath"' "$SESSION_FILE" | sed 's/.*"worktreePath":"\([^"]*\)".*/\1/')
65
+ fi
66
+ fi
67
+
68
+ if [[ -z "$WORKTREE_PATH" ]]; then
69
+ # Last resort: infer from repo name using config
70
+ REPO_NAME=$(gh repo view --json name -q '.name' 2>/dev/null) || die 2 "Failed to determine repo name."
71
+ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
72
+ source "${SCRIPT_DIR}/hula-read-config.sh"
73
+ WORKTREE_PATH="${HULA_WORKTREE_BASE_PATH}/hula/${REPO_NAME}/fix-${ISSUE_NUMBER}"
74
+ fi
75
+
76
+ if [[ ! -d "$WORKTREE_PATH" ]]; then
77
+ die 1 "Worktree not found at ${WORKTREE_PATH}. Run hula-fix-setup.sh first."
78
+ fi
79
+
80
+ # ── Check for changes ─────────────────────────────────────────────────────────
81
+
82
+ cd "$WORKTREE_PATH"
83
+
84
+ PORCELAIN=$(git status --porcelain 2>/dev/null)
85
+
86
+ if [[ -z "$PORCELAIN" ]]; then
87
+ printf '{"status":"success","message":"Nothing to commit","filesChanged":0,"worktreePath":"%s"}\n' \
88
+ "$(json_escape "$WORKTREE_PATH")"
89
+ exit 0
90
+ fi
91
+
92
+ FILES_CHANGED=$(printf '%s' "$PORCELAIN" | grep -c '' || true)
93
+
94
+ # ── Stage, commit, push ───────────────────────────────────────────────────────
95
+
96
+ git add -A >&2 2>&1 || die 2 "git add failed"
97
+
98
+ git commit -m "$COMMIT_MSG" >&2 2>&1 \
99
+ || die 2 "Failed to commit changes. Ensure git user.name and user.email are configured."
100
+
101
+ git push >&2 2>&1 \
102
+ || die 2 "Push failed. Try: cd ${WORKTREE_PATH} && git push"
103
+
104
+ # ── Output result ─────────────────────────────────────────────────────────────
105
+
106
+ SAFE_MSG=$(json_escape "$COMMIT_MSG")
107
+ SAFE_PATH=$(json_escape "$WORKTREE_PATH")
108
+
109
+ printf '{"status":"success","commitMessage":"%s","filesChanged":%d,"worktreePath":"%s"}\n' \
110
+ "$SAFE_MSG" "$FILES_CHANGED" "$SAFE_PATH"