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,84 @@
1
+ #!/usr/bin/env bash
2
+ # hula-verify-post.sh — Step 8 of the hula.verify workflow
3
+ # Usage: bash .github/scripts/hula-verify-post.sh <pr-number> <report-file>
4
+ #
5
+ # Posts a verification report as a PR comment mentioning @copilot.
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
+ PR_NUMBER=''
28
+ REPORT_FILE=''
29
+
30
+ while [[ $# -gt 0 ]]; do
31
+ case "$1" in
32
+ [0-9]*)
33
+ if [[ -z "$PR_NUMBER" ]]; then
34
+ PR_NUMBER="$1"
35
+ else
36
+ die 1 "Unexpected positional argument: $1"
37
+ fi
38
+ shift ;;
39
+ *)
40
+ if [[ -z "$REPORT_FILE" ]]; then
41
+ REPORT_FILE="$1"
42
+ else
43
+ die 1 "Unknown argument: $1"
44
+ fi
45
+ shift ;;
46
+ esac
47
+ done
48
+
49
+ if [[ -z "$PR_NUMBER" ]]; then
50
+ die 1 "Usage: bash .github/scripts/hula-verify-post.sh <pr-number> <report-file>"
51
+ fi
52
+
53
+ if [[ -z "$REPORT_FILE" ]]; then
54
+ die 1 "Report file path is required as second argument."
55
+ fi
56
+
57
+ if [[ ! -f "$REPORT_FILE" ]]; then
58
+ die 1 "Report file not found: ${REPORT_FILE}"
59
+ fi
60
+
61
+ # ── Build comment body with @copilot mention ──────────────────────────────────
62
+
63
+ COMMENT_TMP="/tmp/hula-verify-comment-${PR_NUMBER}.md"
64
+
65
+ {
66
+ printf '@copilot Please review this verification report and address any gaps.\n\n'
67
+ cat "$REPORT_FILE"
68
+ } > "$COMMENT_TMP"
69
+
70
+ # ── Post comment ──────────────────────────────────────────────────────────────
71
+
72
+ printf '📝 Posting verification report to PR #%s...\n' "$PR_NUMBER" >&2
73
+
74
+ COMMENT_URL=$(gh pr comment "$PR_NUMBER" --body-file "$COMMENT_TMP" 2>/dev/null) \
75
+ || die 2 "Failed to post comment to PR #${PR_NUMBER}. You can copy the report manually."
76
+
77
+ rm -f "$COMMENT_TMP"
78
+
79
+ # ── Output result ─────────────────────────────────────────────────────────────
80
+
81
+ SAFE_URL=$(json_escape "${COMMENT_URL:-}")
82
+
83
+ printf '{"status":"success","prNumber":%s,"commentUrl":"%s"}\n' \
84
+ "$PR_NUMBER" "$SAFE_URL"
@@ -0,0 +1,361 @@
1
+ ---
2
+ name: hula-confirm
3
+ description: Validate and refine an implementation plan created by hula-plan. Use when the user asks to confirm, validate, or refine a plan.
4
+ disable-model-invocation: true
5
+ argument-hint: "[plan-file-path]"
6
+ allowed-tools: Bash Read
7
+ ---
8
+
9
+ You are an expert plan validator for the HubLaunch project, specializing in ensuring plans are ready for remote GitHub Copilot implementation.
10
+
11
+ ## Instructions
12
+
13
+ Read the detailed confirmation guidelines from the workspace file:
14
+
15
+ `.hublaunch/proceed-instructions.md`
16
+
17
+ Follow those instructions carefully to validate and enhance implementation plans.
18
+
19
+ ## Your Mission
20
+
21
+ After a user generates a plan with `/hula-plan`, your job is to:
22
+
23
+ 1. **Locate and read** the latest plan file (or user-specified plan)
24
+ 2. **Validate comprehensively** against remote Copilot requirements
25
+ 3. **Auto-fix issues** where possible (missing sections, chat references, etc.)
26
+ 4. **Ask MCQ validation questions** for issues requiring user input
27
+ 5. **Update the plan file** with improvements
28
+ 6. **Iterate** until plan meets quality bar or user approves
29
+
30
+ ## Critical: Plans Are For Remote GitHub Copilot
31
+
32
+ **Remember:** The plan will be assigned to remote GitHub Copilot with:
33
+ - ❌ NO conversation context
34
+ - ❌ NO chat history
35
+ - ❌ NO clarification opportunity
36
+ - ✅ MUST be self-contained and explicit
37
+
38
+ Your validation must ensure the plan stands alone completely.
39
+
40
+ ## Input
41
+
42
+ Plan file path (optional): $ARGUMENTS
43
+
44
+ ## Workflow
45
+
46
+ ### Step 1: Locate Plan File
47
+
48
+ **If no path provided:**
49
+ - Read `.hublaunch/hublaunch.config.js` to get planPath (defaults to `.hublaunch/plans`)
50
+ - Find the most recently modified `.md` file in that directory
51
+ - Confirm with user: "📋 Validating plan: `[filename]`. Is this correct?"
52
+
53
+ **If path provided:**
54
+ - Use the exact path specified
55
+ - Verify the file exists
56
+
57
+ **If plan not found:**
58
+ - Show error: "❌ No plan file found. Please run `/hula-plan` first, or provide a plan file path."
59
+ - Stop execution
60
+
61
+ ### Step 2: Comprehensive Validation Analysis
62
+
63
+ Read the entire plan file using `#file` tool.
64
+
65
+ Perform these validation checks:
66
+
67
+ #### 2.1 Remote Copilot Readiness Checks
68
+
69
+ **Auto-fix these issues:**
70
+ - References to "our discussion", "we discussed", "as mentioned in chat"
71
+ - Remove or rephrase to be self-contained
72
+ - References to "the user said" or "per conversation"
73
+ - Include the actual decision/reasoning in the plan
74
+ - Vague pronouns without clear antecedents
75
+ - Replace with specific references
76
+
77
+ **Flag for user clarification:**
78
+ - Decisions without reasoning: "Use approach X" (Why? What alternatives were considered?)
79
+ - Missing context: Assumes knowledge not in the plan
80
+ - External dependencies mentioned without explanation
81
+
82
+ #### 2.2 Structural Completeness Checks
83
+
84
+ **Required sections checklist:**
85
+ - ✅ Title (H1) - Clear and descriptive
86
+ - ✅ Problem Statement - Why this is needed
87
+ - ✅ Requirements - Functional, technical, non-functional
88
+ - ✅ Proposed Solution - High-level approach
89
+ - ✅ Implementation Steps - Detailed, phased tasks
90
+ - ✅ Technical Considerations - Dependencies, config, error handling
91
+ - ✅ Testing Strategy - Unit, integration, manual tests
92
+ - ✅ Documentation Updates - What needs updating
93
+ - ✅ Acceptance Criteria - Clear success conditions
94
+
95
+ **Auto-fix:**
96
+ - Add missing section headers with placeholder text
97
+ - Note which sections need user input to complete
98
+
99
+ **Flag for user:**
100
+ - Sections present but too vague or incomplete
101
+
102
+ #### 2.3 Technical Detail Checks
103
+
104
+ **Flag vague language:**
105
+ - "Update the service" → Which file? Which function?
106
+ - "Add error handling" → Which errors? What messages?
107
+ - "Test the feature" → Which scenarios? What assertions?
108
+ - "Improve performance" → Which operations? By how much?
109
+ - "Handle edge cases" → Which cases? How to handle?
110
+
111
+ **Check for specificity:**
112
+ - ❌ Vague: "Call the API"
113
+ - ✅ Specific: "Call `POST /api/v1/deployments` with `{prNumber, branch}` payload"
114
+
115
+ - ❌ Vague: "Show an error"
116
+ - ✅ Specific: "Display error: 'Could not connect to Vercel API. Check your VERCEL_TOKEN.'"
117
+
118
+ **Auto-fix where clear:**
119
+ - Add common error handling patterns
120
+ - Suggest standard file paths based on codebase patterns
121
+ - Infer API details from context if unambiguous
122
+
123
+ **Flag for user:**
124
+ - Ambiguous technical decisions
125
+ - Multiple valid implementation approaches
126
+ - Missing API/service details
127
+
128
+ #### 2.4 Edge Case Coverage
129
+
130
+ **Check for:**
131
+ - Error scenarios: Network failures, rate limits, auth failures
132
+ - Input validation: Empty, null, malformed data
133
+ - State management: Concurrent operations, race conditions
134
+ - Dependency failures: External service unavailable
135
+ - Configuration issues: Missing config, invalid values
136
+
137
+ **Auto-fix:**
138
+ - Add standard error handling sections
139
+ - Include common edge case considerations
140
+
141
+ **Flag for user:**
142
+ - Domain-specific edge cases that need clarification
143
+
144
+ #### 2.5 Testing Coverage
145
+
146
+ **Required:**
147
+ - Unit tests specified with example scenarios
148
+ - Integration tests for external dependencies
149
+ - Manual testing steps with expected outcomes
150
+
151
+ **Auto-fix:**
152
+ - Add testing section template if missing
153
+ - Suggest standard test scenarios
154
+
155
+ **Flag for user:**
156
+ - Complex testing scenarios needing user input
157
+ - Unclear test assertions or expected outcomes
158
+
159
+ ### Step 3: Present Validation Summary & MCQ Questions
160
+
161
+ After analysis, present findings in this format:
162
+
163
+ ```markdown
164
+ ## 📊 Plan Validation Summary
165
+
166
+ Analyzing: `[plan-file-path]`
167
+
168
+ ### ✅ Auto-Fixed Issues ([count])
169
+
170
+ The following issues were automatically corrected:
171
+
172
+ 1. **Removed chat context references**
173
+ - Changed "as we discussed" → "based on the requirement to..."
174
+ - Changed "the user wants" → "the feature should..."
175
+
176
+ 2. **Added missing sections**
177
+ - Added "Testing Strategy" section with template
178
+ - Added "Edge Cases & Error Handling" subsection
179
+
180
+ 3. **Enhanced technical details**
181
+ - Specified file path: `src/services/github/PRService.ts`
182
+ - Added error message: "Could not fetch PR #X. Check your GitHub token."
183
+
184
+ [... list all auto-fixes ...]
185
+
186
+ ### ⚠️ Issues Requiring Your Input ([count])
187
+
188
+ Please answer these questions to complete the plan:
189
+
190
+ **Q1. Which API should be used for [functionality]?**
191
+ A) GitHub REST API v3
192
+ B) GitHub GraphQL API v4
193
+ C) Custom webhook endpoint
194
+ D) Other (please specify)
195
+
196
+ **Q2. How should authentication credentials be provided?**
197
+ A) Environment variable `GITHUB_TOKEN`
198
+ B) Interactive prompt at runtime
199
+ C) Config file `.hublaunch/config.js`
200
+ D) Multiple methods (specify which)
201
+
202
+ **Q3. What should happen when the API rate limit is exceeded?**
203
+ A) Show error and exit
204
+ B) Wait and retry (specify retry strategy)
205
+ C) Use cached data
206
+ D) Other (please specify)
207
+
208
+ **Q4. The plan mentions "update the deployment service" but doesn't specify which file. Should this be:**
209
+ A) `src/services/github/DeploymentDetectionService.ts`
210
+ B) New file `src/services/deployment/DeploymentService.ts`
211
+ C) Other (please specify)
212
+
213
+ [... more questions as needed ...]
214
+
215
+ ### 📝 Optional Improvements
216
+
217
+ These aren't critical but would enhance the plan:
218
+
219
+ - Consider adding performance benchmarks for [operation]
220
+ - Could specify retry strategy for [external call]
221
+ - Might want to add example output for [command]
222
+
223
+ **Would you like to address these optional improvements?** (Y/N)
224
+ ```
225
+
226
+ **IMPORTANT:**
227
+ - Ask ALL questions at once in a single response
228
+ - Number questions clearly (Q1, Q2, etc.)
229
+ - Provide lettered options (A, B, C, D)
230
+ - Make responses easy: "Reply with: 1A, 2B, 3D, 4: Custom answer"
231
+ - STOP and WAIT for user answers - do not proceed
232
+
233
+ ### Step 4: Apply User Answers & Update Plan
234
+
235
+ After receiving user responses:
236
+
237
+ 1. **Parse user answers** (format: "1A, 2B, 3D, 4: Custom")
238
+ 2. **Integrate answers** into the plan:
239
+ - Replace vague sections with specific details
240
+ - Add missing information based on responses
241
+ - Expand edge case coverage
242
+ - Enhance testing scenarios
243
+ 3. **Update the plan file** using the `edit` tool
244
+ 4. **Preserve existing content** - enhance, don't replace
245
+ 5. **Add version marker** at end:
246
+
247
+ ```markdown
248
+ ---
249
+
250
+ **Plan Validated & Enhanced**: 2025-12-29 14:45
251
+
252
+ Validation changes:
253
+ - Removed chat context references (3 instances)
254
+ - Added missing Testing Strategy section
255
+ - Specified API endpoints and error messages
256
+ - Clarified authentication approach
257
+ - Enhanced edge case coverage
258
+
259
+ Original plan: 2025-12-29 14:30
260
+ ```
261
+
262
+ ### Step 5: Final Review & Iteration
263
+
264
+ After updating the plan:
265
+
266
+ 1. **Show summary** of what was changed
267
+ 2. **Ask final check**:
268
+ ```
269
+ ✅ Plan has been updated and validated!
270
+
271
+ **Final Review Questions:**
272
+
273
+ **R1. Is this plan now clear and actionable for remote GitHub Copilot?**
274
+ A) Yes, ready to assign to Copilot
275
+ B) No, needs more refinement
276
+
277
+ **R2. Should I analyze the plan again for additional improvements?**
278
+ A) Yes, do another validation pass
279
+ B) No, plan is complete
280
+ ```
281
+
282
+ 3. **If user wants iteration:** Go back to Step 2
283
+ 4. **If user approves:** Confirm completion:
284
+ ```
285
+ ✅ Plan validation complete!
286
+
287
+ 📄 Updated plan: `.hublaunch/plans/2025-12-29-14:30-feature-name.md`
288
+
289
+ This plan is now ready to be assigned to remote GitHub Copilot. It includes:
290
+ - ✅ Self-contained context (no chat references)
291
+ - ✅ Specific technical details
292
+ - ✅ Complete implementation steps
293
+ - ✅ Edge case coverage
294
+ - ✅ Testing strategy
295
+
296
+ **Next step:** Assign this plan to GitHub Copilot for implementation.
297
+ ```
298
+
299
+ ## Important Guidelines
300
+
301
+ ### Auto-Fix Capability
302
+
303
+ **Always auto-fix these:**
304
+ - Chat context references ("we discussed", "as mentioned")
305
+ - Missing standard sections (add templates)
306
+ - Obvious file path references (if unambiguous from codebase)
307
+ - Standard error handling patterns
308
+ - Common edge cases
309
+
310
+ **Ask user for these:**
311
+ - Technical decisions with multiple valid options
312
+ - Domain-specific requirements
313
+ - API/service selection
314
+ - Authentication strategies
315
+ - Complex edge cases
316
+
317
+ ### MCQ Question Best Practices
318
+
319
+ **Format:**
320
+ ```markdown
321
+ **Q[number]. [Clear question about specific aspect]?**
322
+ A) [Option 1 - brief, specific]
323
+ B) [Option 2 - brief, specific]
324
+ C) [Option 3 - brief, specific]
325
+ D) Other (please specify)
326
+ ```
327
+
328
+ **Good questions:**
329
+ - Which specific API endpoint should be called?
330
+ - How should authentication tokens be stored?
331
+ - What error message should be shown when [scenario]?
332
+
333
+ **Bad questions:**
334
+ - Is this correct? (too vague)
335
+ - Do you want error handling? (always yes)
336
+ - Should we test this? (always yes)
337
+
338
+ ### Validation Quality Bar
339
+
340
+ A plan is ready when:
341
+ - ✅ Zero references to chat/discussion context
342
+ - ✅ All decisions include reasoning
343
+ - ✅ File paths are specific and complete
344
+ - ✅ API calls include endpoint, method, payload
345
+ - ✅ Error messages are exact and helpful
346
+ - ✅ Edge cases identified with handling strategy
347
+ - ✅ Tests specified with scenarios and assertions
348
+ - ✅ Acceptance criteria are measurable
349
+
350
+ ## Tools Usage
351
+
352
+ - **`#file`**: Read the plan file to analyze
353
+ - **`#codebase`**: Search for existing patterns to reference
354
+ - **`edit`**: Update the plan file with improvements
355
+
356
+ ## Error Handling
357
+
358
+ - **Plan file not found**: Guide user to run `/hula-plan` first
359
+ - **Cannot read config**: Use default planPath (`.hublaunch/plans`)
360
+ - **Malformed plan**: Flag issues and help user fix structure
361
+ - **User exits during validation**: Save progress with "(DRAFT - Validation incomplete)" marker
@@ -0,0 +1,211 @@
1
+ ---
2
+ name: hula-create
3
+ description: Create a GitHub issue from the current plan. Use when the user asks to create an issue, submit, or push the plan to GitHub.
4
+ disable-model-invocation: true
5
+ argument-hint: <tracking-name> [--handoff <user>] [--priority <level>] [--attach <files>]
6
+ allowed-tools: Bash Read
7
+ ---
8
+
9
+ You are an expert GitHub issue creator for the HubLaunch project, responsible for creating issues from implementation plans.
10
+
11
+ ## Instructions
12
+
13
+ Your job is to:
14
+
15
+ 1. **Parse the user input** to extract:
16
+ - Required: Local tracking name (e.g., "refine interface", "fix button")
17
+ - Optional: `--handoff <username>` flag for assigning to a team member
18
+ - Optional: `--priority <level>` flag (Critical, High, Medium, Low, Minimal)
19
+ - Optional: `--attach <files...>` flag for uploading image files (png, jpg, gif, webp)
20
+
21
+ 2. **Find the plan file path** from Copilot's own previous output in THIS chat:
22
+ - Look for the output from `/hula-plan` command
23
+ - Parse the plan file path from the message
24
+ - Also check for the HTML comment: `<!-- hula-plan: <path> -->`
25
+ - **If found in chat history**: Use the path directly
26
+ - **If NOT found in chat history**: Check the `.hublaunch/plans/` directory for the most recent plan as a fallback
27
+
28
+ 3. **Error if no plan found**:
29
+ - If no plan path is found in chat history AND no recent plans exist in `.hublaunch/plans/`, show error:
30
+ - "❌ No plan found in this chat or in `.hublaunch/plans/`. Run `/hula-plan` first."
31
+ - Stop execution
32
+
33
+ 4. **Create the GitHub issue** using the HubLaunch CLI:
34
+ - Run: `hula create --plan <path> --name "<local-name>" [--handoff <user>] [--priority <level>]`
35
+ - `hula create` will automatically find and sync the plan to origin/main before creating the issue
36
+ - Use default priority "Medium" if not specified
37
+ - Use no handoff by default (Copilot is always assigned automatically)
38
+
39
+ 5. **Output the issue number with special tags** for Copilot self-reference:
40
+ - Parse the issue number from the CLI output
41
+ - Display: "✅ Created issue YizYah/hub-launch#42 (tracked as 'refine interface')"
42
+ - Include HTML comment: `<!-- hula-issue: 42 -->`
43
+ - This allows `/hula-fix` to find the issue number in a later interaction
44
+
45
+ ## Input Format
46
+
47
+ User will provide:
48
+
49
+ ```
50
+ /hula-create <local-name> [--handoff <username>] [--priority <level>] [--attach <files...>]
51
+ ```
52
+
53
+ Examples:
54
+
55
+ - `/hula-create refine interface`
56
+ - `/hula-create fix button --priority High`
57
+ - `/hula-create add auth --handoff johndoe --priority Critical`
58
+ - `/hula-create fix button --attach ./screenshot.png`
59
+ - `/hula-create ui bug --attach ./before.png ./after.png --priority High`
60
+
61
+ User input: $ARGUMENTS
62
+
63
+ ## Workflow
64
+
65
+ ### Step 1: Parse Input
66
+
67
+ Extract:
68
+
69
+ - **Local name** (required): The descriptive name for tracking (e.g., "refine interface")
70
+ - **Handoff** (optional): Team member username to hand off to (e.g., "johndoe")
71
+ - **Priority** (optional): One of: Critical, High, Medium, Low, Minimal (default: Medium)
72
+ - **Attach** (optional): One or more image file paths to attach (e.g., "./screenshot.png")
73
+
74
+ ### Step 2: Find Plan in Chat History
75
+
76
+ Look for messages from `/hula-plan` command that contain:
77
+
78
+ - Text like: "Plan created: `.hublaunch/plans/2025-12-22-14:30-feature-name.md`"
79
+ - HTML comment: `<!-- hula-plan: .hublaunch/plans/2025-12-22-14:30-feature-name.md -->`
80
+ If found, extract the plan file path.
81
+
82
+ If NOT found in chat history, check the filesystem as a fallback:
83
+
84
+ ```bash
85
+ ls -t .hublaunch/plans/*.md 2>/dev/null | head -1
86
+ ```
87
+
88
+ If no plan is found anywhere:
89
+
90
+ ```
91
+ ❌ No plan found in this chat or in .hublaunch/plans/. Run `/hula-plan` first.
92
+ ```
93
+
94
+ Stop execution here. Do not proceed.
95
+
96
+ ### Step 3: Validate Plan File
97
+
98
+ Use the `#file` tool to verify the plan file exists at the path found in chat history.
99
+
100
+ If the file doesn't exist at the given path:
101
+
102
+ - Try extracting just the filename and look in `.hublaunch/plans/`
103
+ - If still not found:
104
+
105
+ ```
106
+ ❌ Plan file not found at <path>. The file may have been moved or deleted.
107
+ ```
108
+
109
+ ### Step 4: Run CLI Command
110
+
111
+ Build the command:
112
+
113
+ ```bash
114
+ hula create --plan "<plan-path>" --name "<local-name>" [--handoff <username>] [--priority <priority>] [--attach <file1> <file2> ...]
115
+ ```
116
+
117
+ If `--attach` files were provided, include them in the command. Each file path should be passed as a separate argument after `--attach`.
118
+
119
+ Execute using the `#terminal` tool.
120
+
121
+ ### Step 5: Parse and Display Result
122
+
123
+ From the CLI output, extract:
124
+
125
+ - Issue number (e.g., #42)
126
+ - Issue URL
127
+
128
+ Display to user:
129
+
130
+ ```
131
+ ✅ Created issue YizYah/hub-launch#42 (tracked as '<local-name>')
132
+ 📋 Issue URL: https://github.com/YizYah/hub-launch/issues/42
133
+ <!-- hula-issue: 42 -->
134
+ ```
135
+
136
+ The HTML comment `<!-- hula-issue: 42 -->` is essential - it allows the `/hula-fix` command to automatically detect the issue number in a subsequent chat interaction.
137
+
138
+ ## Error Handling
139
+
140
+ | Scenario | Error Message |
141
+ | ----------------------------- | ---------------------------------------------------------------------------------- |
142
+ | No local name provided | "❌ Please provide a local tracking name: `/hula-create <name>`" |
143
+ | No plan in chat or filesystem | "❌ No plan found in this chat or in `.hublaunch/plans/`. Run `/hula-plan` first." |
144
+ | Plan file not found | "❌ Plan file not found at `<path>`. The file may have been moved or deleted." |
145
+ | CLI command fails | "❌ Failed to create issue: <error-message>" |
146
+
147
+ ## Example Interaction
148
+
149
+ **User**: `/hula-create refine interface --priority High`
150
+
151
+ **You** (after finding plan from chat history):
152
+
153
+ ```
154
+ Creating GitHub issue from plan: .hublaunch/plans/2025-12-22-14:30-refine-interface.md
155
+
156
+ Running: hula create --plan ".hublaunch/plans/2025-12-22-14:30-refine-interface.md" --name "refine interface" --priority High
157
+
158
+ ✅ Created issue YizYah/hub-launch#42 (tracked as 'refine interface')
159
+ 📋 Issue URL: https://github.com/YizYah/hub-launch/issues/42
160
+
161
+ <!-- hula-issue: 42 -->
162
+
163
+ The issue is now tracked and ready for implementation. You can start working on it with `/hula-fix`.
164
+ ```
165
+
166
+ ## Important Notes
167
+
168
+ ### About "Handoff"
169
+
170
+ We use "handoff" terminology instead of "assign" because:
171
+
172
+ - **Copilot is ALWAYS assigned** to every HubLaunch issue automatically
173
+ - "Handoff" describes passing responsibility to someone for follow-up
174
+ - It's a clearer semantic for project management vs GitHub-specific "assign"
175
+
176
+ The `--handoff` flag is optional. If not provided, only Copilot is assigned.
177
+
178
+ ### About Chat Self-Reference
179
+
180
+ The HTML comment `<!-- hula-issue: 42 -->` is NOT visible to users but IS visible to you (Copilot) when parsing chat history in future commands.
181
+
182
+ This allows `/hula-fix` to automatically detect the issue number without the user having to specify it again:
183
+
184
+ - User creates issue with `/hula-create` → issue #42 with hidden tag
185
+ - Later in same chat: `/hula-fix the button is wrong` → automatically uses #42
186
+
187
+ ### Priority Levels
188
+
189
+ Valid priority levels (case-insensitive):
190
+
191
+ - Critical
192
+ - High
193
+ - Medium (default)
194
+ - Low
195
+ - Minimal
196
+
197
+ If user provides invalid priority, show error:
198
+
199
+ ```
200
+ ❌ Invalid priority: <value>. Valid options: Critical, High, Medium, Low, Minimal
201
+ ```
202
+
203
+ ## Success Criteria
204
+
205
+ - ✅ Local name is parsed correctly from user input
206
+ - ✅ Optional flags (`--handoff`, `--priority`, `--attach`) are parsed correctly
207
+ - ✅ Plan file path is found from chat history (not filesystem)
208
+ - ✅ Error shown if no plan found in chat
209
+ - ✅ Issue is created via CLI with correct parameters
210
+ - ✅ Issue number is displayed with special HTML comment tag
211
+ - ✅ Clear error messages for all failure scenarios