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.
- package/CHANGELOG.md +144 -0
- package/README.md +195 -0
- package/bin/hublaunch +20 -0
- package/dist/commands/checkout.d.ts +7 -0
- package/dist/commands/checkout.d.ts.map +1 -0
- package/dist/commands/checkout.js +164 -0
- package/dist/commands/checkout.js.map +1 -0
- package/dist/commands/clean.d.ts +7 -0
- package/dist/commands/clean.d.ts.map +1 -0
- package/dist/commands/clean.js +206 -0
- package/dist/commands/clean.js.map +1 -0
- package/dist/commands/close.d.ts +7 -0
- package/dist/commands/close.d.ts.map +1 -0
- package/dist/commands/close.js +109 -0
- package/dist/commands/close.js.map +1 -0
- package/dist/commands/create.d.ts +7 -0
- package/dist/commands/create.d.ts.map +1 -0
- package/dist/commands/create.js +367 -0
- package/dist/commands/create.js.map +1 -0
- package/dist/commands/diff.d.ts +7 -0
- package/dist/commands/diff.d.ts.map +1 -0
- package/dist/commands/diff.js +98 -0
- package/dist/commands/diff.js.map +1 -0
- package/dist/commands/execute.d.ts +7 -0
- package/dist/commands/execute.d.ts.map +1 -0
- package/dist/commands/execute.js +376 -0
- package/dist/commands/execute.js.map +1 -0
- package/dist/commands/init.d.ts +8 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +1243 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/interactive.d.ts +12 -0
- package/dist/commands/interactive.d.ts.map +1 -0
- package/dist/commands/interactive.js +1071 -0
- package/dist/commands/interactive.js.map +1 -0
- package/dist/commands/launch.d.ts +16 -0
- package/dist/commands/launch.d.ts.map +1 -0
- package/dist/commands/launch.js +684 -0
- package/dist/commands/launch.js.map +1 -0
- package/dist/commands/login.d.ts +40 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +469 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/logs.d.ts +22 -0
- package/dist/commands/logs.d.ts.map +1 -0
- package/dist/commands/logs.js +105 -0
- package/dist/commands/logs.js.map +1 -0
- package/dist/commands/merge.d.ts +7 -0
- package/dist/commands/merge.d.ts.map +1 -0
- package/dist/commands/merge.js +240 -0
- package/dist/commands/merge.js.map +1 -0
- package/dist/commands/preview.d.ts +7 -0
- package/dist/commands/preview.d.ts.map +1 -0
- package/dist/commands/preview.js +160 -0
- package/dist/commands/preview.js.map +1 -0
- package/dist/commands/project.d.ts +18 -0
- package/dist/commands/project.d.ts.map +1 -0
- package/dist/commands/project.js +352 -0
- package/dist/commands/project.js.map +1 -0
- package/dist/commands/respond.d.ts +7 -0
- package/dist/commands/respond.d.ts.map +1 -0
- package/dist/commands/respond.js +112 -0
- package/dist/commands/respond.js.map +1 -0
- package/dist/commands/setPriority.d.ts +7 -0
- package/dist/commands/setPriority.d.ts.map +1 -0
- package/dist/commands/setPriority.js +112 -0
- package/dist/commands/setPriority.js.map +1 -0
- package/dist/commands/track.d.ts +7 -0
- package/dist/commands/track.d.ts.map +1 -0
- package/dist/commands/track.js +140 -0
- package/dist/commands/track.js.map +1 -0
- package/dist/commands/upload.d.ts +21 -0
- package/dist/commands/upload.d.ts.map +1 -0
- package/dist/commands/upload.js +145 -0
- package/dist/commands/upload.js.map +1 -0
- package/dist/commands/view.d.ts +7 -0
- package/dist/commands/view.d.ts.map +1 -0
- package/dist/commands/view.js +168 -0
- package/dist/commands/view.js.map +1 -0
- package/dist/commands/watch.d.ts +7 -0
- package/dist/commands/watch.d.ts.map +1 -0
- package/dist/commands/watch.js +438 -0
- package/dist/commands/watch.js.map +1 -0
- package/dist/commands/worktree.d.ts +7 -0
- package/dist/commands/worktree.d.ts.map +1 -0
- package/dist/commands/worktree.js +122 -0
- package/dist/commands/worktree.js.map +1 -0
- package/dist/config/command-names.d.ts +16 -0
- package/dist/config/command-names.d.ts.map +1 -0
- package/dist/config/command-names.js +17 -0
- package/dist/config/command-names.js.map +1 -0
- package/dist/config/constants.d.ts +12 -0
- package/dist/config/constants.d.ts.map +1 -0
- package/dist/config/constants.js +12 -0
- package/dist/config/constants.js.map +1 -0
- package/dist/config/index.d.ts +47 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +175 -0
- package/dist/config/index.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +148 -0
- package/dist/index.js.map +1 -0
- package/dist/services/api/HulaApiClient.d.ts +170 -0
- package/dist/services/api/HulaApiClient.d.ts.map +1 -0
- package/dist/services/api/HulaApiClient.js +233 -0
- package/dist/services/api/HulaApiClient.js.map +1 -0
- package/dist/services/diff/DiffService.d.ts +44 -0
- package/dist/services/diff/DiffService.d.ts.map +1 -0
- package/dist/services/diff/DiffService.js +126 -0
- package/dist/services/diff/DiffService.js.map +1 -0
- package/dist/services/editor/EditorService.d.ts +53 -0
- package/dist/services/editor/EditorService.d.ts.map +1 -0
- package/dist/services/editor/EditorService.js +161 -0
- package/dist/services/editor/EditorService.js.map +1 -0
- package/dist/services/git/GitService.d.ts +124 -0
- package/dist/services/git/GitService.d.ts.map +1 -0
- package/dist/services/git/GitService.js +423 -0
- package/dist/services/git/GitService.js.map +1 -0
- package/dist/services/git/WorktreeService.d.ts +144 -0
- package/dist/services/git/WorktreeService.d.ts.map +1 -0
- package/dist/services/git/WorktreeService.js +505 -0
- package/dist/services/git/WorktreeService.js.map +1 -0
- package/dist/services/github/ActionsService.d.ts +66 -0
- package/dist/services/github/ActionsService.d.ts.map +1 -0
- package/dist/services/github/ActionsService.js +114 -0
- package/dist/services/github/ActionsService.js.map +1 -0
- package/dist/services/github/AssetUploadService.d.ts +103 -0
- package/dist/services/github/AssetUploadService.d.ts.map +1 -0
- package/dist/services/github/AssetUploadService.js +299 -0
- package/dist/services/github/AssetUploadService.js.map +1 -0
- package/dist/services/github/BatchCopilotDetectionService.d.ts +58 -0
- package/dist/services/github/BatchCopilotDetectionService.d.ts.map +1 -0
- package/dist/services/github/BatchCopilotDetectionService.js +321 -0
- package/dist/services/github/BatchCopilotDetectionService.js.map +1 -0
- package/dist/services/github/CopilotDetectionService.d.ts +40 -0
- package/dist/services/github/CopilotDetectionService.d.ts.map +1 -0
- package/dist/services/github/CopilotDetectionService.js +280 -0
- package/dist/services/github/CopilotDetectionService.js.map +1 -0
- package/dist/services/github/CopilotService.d.ts +27 -0
- package/dist/services/github/CopilotService.d.ts.map +1 -0
- package/dist/services/github/CopilotService.js +249 -0
- package/dist/services/github/CopilotService.js.map +1 -0
- package/dist/services/github/DeploymentDetectionService.d.ts +38 -0
- package/dist/services/github/DeploymentDetectionService.d.ts.map +1 -0
- package/dist/services/github/DeploymentDetectionService.js +104 -0
- package/dist/services/github/DeploymentDetectionService.js.map +1 -0
- package/dist/services/github/GithubAppService.d.ts +40 -0
- package/dist/services/github/GithubAppService.d.ts.map +1 -0
- package/dist/services/github/GithubAppService.js +187 -0
- package/dist/services/github/GithubAppService.js.map +1 -0
- package/dist/services/github/IssueService.d.ts +65 -0
- package/dist/services/github/IssueService.d.ts.map +1 -0
- package/dist/services/github/IssueService.js +231 -0
- package/dist/services/github/IssueService.js.map +1 -0
- package/dist/services/github/LabelService.d.ts +36 -0
- package/dist/services/github/LabelService.d.ts.map +1 -0
- package/dist/services/github/LabelService.js +122 -0
- package/dist/services/github/LabelService.js.map +1 -0
- package/dist/services/github/PRService.d.ts +77 -0
- package/dist/services/github/PRService.d.ts.map +1 -0
- package/dist/services/github/PRService.js +287 -0
- package/dist/services/github/PRService.js.map +1 -0
- package/dist/services/github/ProjectService.d.ts +144 -0
- package/dist/services/github/ProjectService.d.ts.map +1 -0
- package/dist/services/github/ProjectService.js +804 -0
- package/dist/services/github/ProjectService.js.map +1 -0
- package/dist/services/hooks/HookExecutor.d.ts +66 -0
- package/dist/services/hooks/HookExecutor.d.ts.map +1 -0
- package/dist/services/hooks/HookExecutor.js +227 -0
- package/dist/services/hooks/HookExecutor.js.map +1 -0
- package/dist/services/hooks/index.d.ts +2 -0
- package/dist/services/hooks/index.d.ts.map +1 -0
- package/dist/services/hooks/index.js +2 -0
- package/dist/services/hooks/index.js.map +1 -0
- package/dist/services/logs/LogFormatterService.d.ts +17 -0
- package/dist/services/logs/LogFormatterService.d.ts.map +1 -0
- package/dist/services/logs/LogFormatterService.js +35 -0
- package/dist/services/logs/LogFormatterService.js.map +1 -0
- package/dist/services/logs/TempFileService.d.ts +27 -0
- package/dist/services/logs/TempFileService.d.ts.map +1 -0
- package/dist/services/logs/TempFileService.js +90 -0
- package/dist/services/logs/TempFileService.js.map +1 -0
- package/dist/services/logs/index.d.ts +3 -0
- package/dist/services/logs/index.d.ts.map +1 -0
- package/dist/services/logs/index.js +4 -0
- package/dist/services/logs/index.js.map +1 -0
- package/dist/services/plan/PlanService.d.ts +70 -0
- package/dist/services/plan/PlanService.d.ts.map +1 -0
- package/dist/services/plan/PlanService.js +211 -0
- package/dist/services/plan/PlanService.js.map +1 -0
- package/dist/services/polling/GitHubDirectPollingAdapter.d.ts +16 -0
- package/dist/services/polling/GitHubDirectPollingAdapter.d.ts.map +1 -0
- package/dist/services/polling/GitHubDirectPollingAdapter.js +87 -0
- package/dist/services/polling/GitHubDirectPollingAdapter.js.map +1 -0
- package/dist/services/polling/HulaServerPollingAdapter.d.ts +23 -0
- package/dist/services/polling/HulaServerPollingAdapter.d.ts.map +1 -0
- package/dist/services/polling/HulaServerPollingAdapter.js +78 -0
- package/dist/services/polling/HulaServerPollingAdapter.js.map +1 -0
- package/dist/services/polling/IStatusPollingAdapter.d.ts +29 -0
- package/dist/services/polling/IStatusPollingAdapter.d.ts.map +1 -0
- package/dist/services/polling/IStatusPollingAdapter.js +2 -0
- package/dist/services/polling/IStatusPollingAdapter.js.map +1 -0
- package/dist/services/polling/StatusPollingAdapterFactory.d.ts +14 -0
- package/dist/services/polling/StatusPollingAdapterFactory.d.ts.map +1 -0
- package/dist/services/polling/StatusPollingAdapterFactory.js +41 -0
- package/dist/services/polling/StatusPollingAdapterFactory.js.map +1 -0
- package/dist/services/polling/index.d.ts +5 -0
- package/dist/services/polling/index.d.ts.map +1 -0
- package/dist/services/polling/index.js +5 -0
- package/dist/services/polling/index.js.map +1 -0
- package/dist/services/preview/PreviewService.d.ts +86 -0
- package/dist/services/preview/PreviewService.d.ts.map +1 -0
- package/dist/services/preview/PreviewService.js +439 -0
- package/dist/services/preview/PreviewService.js.map +1 -0
- package/dist/services/tracking/ProjectTrackingAdapter.d.ts +41 -0
- package/dist/services/tracking/ProjectTrackingAdapter.d.ts.map +1 -0
- package/dist/services/tracking/ProjectTrackingAdapter.js +230 -0
- package/dist/services/tracking/ProjectTrackingAdapter.js.map +1 -0
- package/dist/services/tracking/RemoteTrackingAdapter.d.ts +62 -0
- package/dist/services/tracking/RemoteTrackingAdapter.d.ts.map +1 -0
- package/dist/services/tracking/RemoteTrackingAdapter.js +242 -0
- package/dist/services/tracking/RemoteTrackingAdapter.js.map +1 -0
- package/dist/services/tracking/TrackingAdapterFactory.d.ts +25 -0
- package/dist/services/tracking/TrackingAdapterFactory.d.ts.map +1 -0
- package/dist/services/tracking/TrackingAdapterFactory.js +55 -0
- package/dist/services/tracking/TrackingAdapterFactory.js.map +1 -0
- package/dist/services/tracking/TrackingService.d.ts +104 -0
- package/dist/services/tracking/TrackingService.d.ts.map +1 -0
- package/dist/services/tracking/TrackingService.js +256 -0
- package/dist/services/tracking/TrackingService.js.map +1 -0
- package/dist/services/tracking/UntrackedIssuesService.d.ts +20 -0
- package/dist/services/tracking/UntrackedIssuesService.d.ts.map +1 -0
- package/dist/services/tracking/UntrackedIssuesService.js +148 -0
- package/dist/services/tracking/UntrackedIssuesService.js.map +1 -0
- package/dist/services/tracking/local-file-migration.d.ts +16 -0
- package/dist/services/tracking/local-file-migration.d.ts.map +1 -0
- package/dist/services/tracking/local-file-migration.js +86 -0
- package/dist/services/tracking/local-file-migration.js.map +1 -0
- package/dist/templates/planning-instructions.md +752 -0
- package/dist/templates/proceed-instructions.md +453 -0
- package/dist/templates/scripts/hula-fix-commit.sh +110 -0
- package/dist/templates/scripts/hula-fix-setup.sh +145 -0
- package/dist/templates/scripts/hula-launch-run.sh +89 -0
- package/dist/templates/scripts/hula-merge-local.sh +138 -0
- package/dist/templates/scripts/hula-merge-remote.sh +74 -0
- package/dist/templates/scripts/hula-read-config.sh +38 -0
- package/dist/templates/scripts/hula-verify-gather.sh +135 -0
- package/dist/templates/scripts/hula-verify-post.sh +84 -0
- package/dist/templates/skills/hula-confirm/SKILL.md +361 -0
- package/dist/templates/skills/hula-create/SKILL.md +211 -0
- package/dist/templates/skills/hula-fix/SKILL.md +224 -0
- package/dist/templates/skills/hula-launch/SKILL.md +159 -0
- package/dist/templates/skills/hula-log/SKILL.md +105 -0
- package/dist/templates/skills/hula-merge/SKILL.md +387 -0
- package/dist/templates/skills/hula-plan/SKILL.md +148 -0
- package/dist/templates/skills/hula-upload/SKILL.md +115 -0
- package/dist/templates/skills/hula-verify/SKILL.md +754 -0
- package/dist/types/common.schema.d.ts +46 -0
- package/dist/types/common.schema.d.ts.map +1 -0
- package/dist/types/common.schema.js +60 -0
- package/dist/types/common.schema.js.map +1 -0
- package/dist/types/config.schema.d.ts +443 -0
- package/dist/types/config.schema.d.ts.map +1 -0
- package/dist/types/config.schema.js +126 -0
- package/dist/types/config.schema.js.map +1 -0
- package/dist/types/index.d.ts +6 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +7 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/issue.schema.d.ts +136 -0
- package/dist/types/issue.schema.d.ts.map +1 -0
- package/dist/types/issue.schema.js +49 -0
- package/dist/types/issue.schema.js.map +1 -0
- package/dist/types/pr.schema.d.ts +118 -0
- package/dist/types/pr.schema.d.ts.map +1 -0
- package/dist/types/pr.schema.js +40 -0
- package/dist/types/pr.schema.js.map +1 -0
- package/dist/types/tracking.schema.d.ts +340 -0
- package/dist/types/tracking.schema.d.ts.map +1 -0
- package/dist/types/tracking.schema.js +56 -0
- package/dist/types/tracking.schema.js.map +1 -0
- package/dist/utils/browser-launcher.d.ts +60 -0
- package/dist/utils/browser-launcher.d.ts.map +1 -0
- package/dist/utils/browser-launcher.js +263 -0
- package/dist/utils/browser-launcher.js.map +1 -0
- package/dist/utils/cache.d.ts +44 -0
- package/dist/utils/cache.d.ts.map +1 -0
- package/dist/utils/cache.js +94 -0
- package/dist/utils/cache.js.map +1 -0
- package/dist/utils/config-parser.d.ts +16 -0
- package/dist/utils/config-parser.d.ts.map +1 -0
- package/dist/utils/config-parser.js +210 -0
- package/dist/utils/config-parser.js.map +1 -0
- package/dist/utils/editor.d.ts +21 -0
- package/dist/utils/editor.d.ts.map +1 -0
- package/dist/utils/editor.js +213 -0
- package/dist/utils/editor.js.map +1 -0
- package/dist/utils/git-utils.d.ts +5 -0
- package/dist/utils/git-utils.d.ts.map +1 -0
- package/dist/utils/git-utils.js +18 -0
- package/dist/utils/git-utils.js.map +1 -0
- package/dist/utils/github-cli.d.ts +62 -0
- package/dist/utils/github-cli.d.ts.map +1 -0
- package/dist/utils/github-cli.js +492 -0
- package/dist/utils/github-cli.js.map +1 -0
- package/dist/utils/logger.d.ts +45 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +118 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/open-url.d.ts +19 -0
- package/dist/utils/open-url.d.ts.map +1 -0
- package/dist/utils/open-url.js +37 -0
- package/dist/utils/open-url.js.map +1 -0
- package/dist/utils/project-resolver.d.ts +13 -0
- package/dist/utils/project-resolver.d.ts.map +1 -0
- package/dist/utils/project-resolver.js +35 -0
- package/dist/utils/project-resolver.js.map +1 -0
- package/dist/utils/prompts.d.ts +80 -0
- package/dist/utils/prompts.d.ts.map +1 -0
- package/dist/utils/prompts.js +326 -0
- package/dist/utils/prompts.js.map +1 -0
- package/dist/utils/shell.d.ts +54 -0
- package/dist/utils/shell.d.ts.map +1 -0
- package/dist/utils/shell.js +152 -0
- package/dist/utils/shell.js.map +1 -0
- package/dist/utils/validators.d.ts +32 -0
- package/dist/utils/validators.d.ts.map +1 -0
- package/dist/utils/validators.js +64 -0
- package/dist/utils/validators.js.map +1 -0
- package/package.json +73 -0
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hula-fix
|
|
3
|
+
description: Fix issues on a PR branch in an isolated worktree. Use when the user describes a bug or problem to fix on a PR.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
argument-hint: <problem description> or <owner/repo#N> <problem description>
|
|
6
|
+
allowed-tools: Bash Read
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are an expert code fixer for the HubLaunch project, responsible for applying fixes to issues in isolated Git worktrees while the main working tree remains untouched.
|
|
10
|
+
|
|
11
|
+
## Instructions
|
|
12
|
+
|
|
13
|
+
Your job is to:
|
|
14
|
+
|
|
15
|
+
1. **Auto-detect issue number** from chat history (or accept explicit issue #)
|
|
16
|
+
2. **Fetch issue details** if this is a fresh chat
|
|
17
|
+
3. **Validate** the issue is tracked and has a PR
|
|
18
|
+
4. **Create or reuse an isolated worktree** (path determined by config, output by setup script)
|
|
19
|
+
5. **Store session info** in `.hublaunch/.fix-sessions/issue-<N>.json`
|
|
20
|
+
6. **Apply fixes** inside the worktree using full chat context
|
|
21
|
+
7. **Auto-commit and push** from within the worktree
|
|
22
|
+
|
|
23
|
+
The main working tree is **never modified** — all file edits happen inside the worktree.
|
|
24
|
+
|
|
25
|
+
## Input Format
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
/hula-fix <problem-description>
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Or with explicit issue number (for fresh chat/new machine):
|
|
32
|
+
```
|
|
33
|
+
/hula-fix YizYah/hub-launch#42 <problem-description>
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Examples:
|
|
37
|
+
- `/hula-fix the button color is wrong` (uses issue from chat history)
|
|
38
|
+
- `/hula-fix YizYah/hub-launch#42 the validation is broken` (explicit issue #)
|
|
39
|
+
|
|
40
|
+
User input: $ARGUMENTS
|
|
41
|
+
|
|
42
|
+
## Workflow
|
|
43
|
+
|
|
44
|
+
### Step 1: Detect Issue Number
|
|
45
|
+
|
|
46
|
+
**Priority 1: Check user input for explicit issue number**
|
|
47
|
+
- Look for pattern: `YizYah/hub-launch#\d+` or `#\d+` in user input
|
|
48
|
+
- If found, extract and use this issue number
|
|
49
|
+
|
|
50
|
+
**Priority 2: Check chat history for automatic detection**
|
|
51
|
+
- Look for previous `/hula-create` output in THIS chat
|
|
52
|
+
- Parse text like: "Created issue YizYah/hub-launch#42"
|
|
53
|
+
- Also check HTML comment: `<!-- hula-issue: 42 -->`
|
|
54
|
+
|
|
55
|
+
**If no issue found**:
|
|
56
|
+
```
|
|
57
|
+
❌ No issue number found. Please provide one:
|
|
58
|
+
|
|
59
|
+
Usage: /hula-fix YizYah/hub-launch#42 <problem-description>
|
|
60
|
+
|
|
61
|
+
Example: /hula-fix YizYah/hub-launch#42 the button validation is broken
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Stop execution here. Do not proceed.
|
|
65
|
+
|
|
66
|
+
### Step 2: Setup Worktree and Session (Script)
|
|
67
|
+
|
|
68
|
+
Run the setup script — it handles issue lookup, validation, worktree creation, and session file writing in one terminal approval:
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
bash .github/scripts/hula-fix-setup.sh <issue-number>
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
The script outputs JSON with `status`, `issueTitle`, `prBranch`, `worktreePath`, and `sessionFile`.
|
|
75
|
+
|
|
76
|
+
Parse the JSON output:
|
|
77
|
+
- If `status` is `"error"`, display the `message` and stop.
|
|
78
|
+
- If `status` is `"success"`, extract `worktreePath` and `prBranch` for later steps.
|
|
79
|
+
|
|
80
|
+
Display based on output:
|
|
81
|
+
```
|
|
82
|
+
📋 Issue #42: <issueTitle>
|
|
83
|
+
🌳 Fix worktree ready at: <worktreePath>
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Also emit in chat output:
|
|
87
|
+
```
|
|
88
|
+
<!-- hula-fix-session: {"issueNumber": 42, "worktreePath": "<worktreePath>", "prBranch": "<prBranch>"} -->
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Step 7: Clarify Problem if Needed
|
|
92
|
+
|
|
93
|
+
If the problem description is vague or unclear, ask:
|
|
94
|
+
```
|
|
95
|
+
I need more details about what to fix:
|
|
96
|
+
|
|
97
|
+
1. What specific behavior is wrong?
|
|
98
|
+
2. What should the correct behavior be?
|
|
99
|
+
3. Are there any error messages?
|
|
100
|
+
4. Which file or component is affected?
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
Wait for user response before proceeding.
|
|
104
|
+
|
|
105
|
+
### Step 8: Apply Fixes
|
|
106
|
+
|
|
107
|
+
**IMPORTANT**: All edits must target files inside the worktree path.
|
|
108
|
+
|
|
109
|
+
Switch your working context:
|
|
110
|
+
```bash
|
|
111
|
+
cd <worktreePath>
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
Where `<worktreePath>` is the path returned by `hula-fix-setup.sh` in Step 2.
|
|
115
|
+
|
|
116
|
+
Apply fixes using the edit tool, making sure file paths are relative to (or inside) the worktree directory.
|
|
117
|
+
|
|
118
|
+
**Best Practices**:
|
|
119
|
+
- Make minimal, surgical changes
|
|
120
|
+
- Follow existing code patterns
|
|
121
|
+
- Consider edge cases
|
|
122
|
+
|
|
123
|
+
Progress display:
|
|
124
|
+
```
|
|
125
|
+
🔧 Analyzing codebase for <problem>...
|
|
126
|
+
📝 Found issue in: src/path/to/file.ts
|
|
127
|
+
✏️ Applying fix...
|
|
128
|
+
✅ Fix applied successfully
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
### Step 9: Auto-Commit and Push (Script)
|
|
132
|
+
|
|
133
|
+
Generate a commit message based on the issue number, files changed, and nature of changes, then run the commit script (one terminal approval):
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
bash .github/scripts/hula-fix-commit.sh <issue-number> "fix(#42): <generated-message>"
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
The script outputs JSON with `status`, `commitMessage`, and `filesChanged`.
|
|
140
|
+
|
|
141
|
+
Parse the JSON output:
|
|
142
|
+
- If `status` is `"error"`, display the `message` and stop.
|
|
143
|
+
- If `message` is `"Nothing to commit"`, display:
|
|
144
|
+
```
|
|
145
|
+
ℹ️ Nothing to commit.
|
|
146
|
+
```
|
|
147
|
+
- If `status` is `"success"` and changes were committed, display:
|
|
148
|
+
```
|
|
149
|
+
✅ Changes committed: "<commitMessage>"
|
|
150
|
+
🚀 Pushed to remote
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
### Step 10: Next Steps
|
|
154
|
+
|
|
155
|
+
```
|
|
156
|
+
✅ Fixes applied and pushed successfully!
|
|
157
|
+
|
|
158
|
+
Worktree: <worktreePath>
|
|
159
|
+
Branch: <pr-branch>
|
|
160
|
+
|
|
161
|
+
Next steps:
|
|
162
|
+
- Review the changes in the PR
|
|
163
|
+
- Run tests if needed
|
|
164
|
+
- When ready to merge: /hula-merge
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Error Handling
|
|
168
|
+
|
|
169
|
+
| Scenario | Error Message |
|
|
170
|
+
|----------|---------------|
|
|
171
|
+
| No issue in chat/input | "No issue number found. Please provide one: `/hula-fix YizYah/hub-launch#42 <problem>`" |
|
|
172
|
+
| Issue not tracked | "Issue #X is not tracked. Run: hula track <issue-number>" |
|
|
173
|
+
| No PR for issue | "No PR found for issue #X. Run: hula checkout <issue-number>" |
|
|
174
|
+
| Worktree creation fails | "Failed to create worktree: <error>. Check that the PR branch exists." |
|
|
175
|
+
| Commit fails | "Failed to commit changes: <error>" |
|
|
176
|
+
| Push fails | "Failed to push changes: <error>. Retry with: git push (inside worktree)" |
|
|
177
|
+
|
|
178
|
+
## Session File Format
|
|
179
|
+
|
|
180
|
+
`.hublaunch/.fix-sessions/issue-42.json`:
|
|
181
|
+
```json
|
|
182
|
+
{
|
|
183
|
+
"issueNumber": 42,
|
|
184
|
+
"worktreePath": "<worktreePath>",
|
|
185
|
+
"prBranch": "fix/issue-42-button-color",
|
|
186
|
+
"localName": "fix button color",
|
|
187
|
+
"startedAt": "2025-12-22T14:30:00.000Z"
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Important Notes
|
|
192
|
+
|
|
193
|
+
### Worktree Isolation
|
|
194
|
+
|
|
195
|
+
- The main working tree is **never modified** by `/hula-fix`
|
|
196
|
+
- The user can continue `/hula-plan` on `main` while a fix session is active
|
|
197
|
+
- Multiple fix sessions can coexist (each has its own worktree directory)
|
|
198
|
+
- If the worktree already exists for an issue, it is **reused** (supports resume)
|
|
199
|
+
|
|
200
|
+
### Worktree Naming
|
|
201
|
+
|
|
202
|
+
Format: `<worktreeBasePath>/hula/<repo-name>/fix-<issue-number>`
|
|
203
|
+
|
|
204
|
+
The `worktreeBasePath` is read from `hublaunch.config.js` (default: `.hula-worktrees`, resolved relative to repo root). This ensures:
|
|
205
|
+
- Cross-repo isolation (different repos won't collide)
|
|
206
|
+
- Per-issue isolation (multiple issues can be fixed in parallel)
|
|
207
|
+
|
|
208
|
+
### Terminal Commands
|
|
209
|
+
|
|
210
|
+
All terminal commands after worktree creation should be run inside the worktree:
|
|
211
|
+
```bash
|
|
212
|
+
cd <worktreePath>
|
|
213
|
+
# then run git commands, tests, etc.
|
|
214
|
+
```
|
|
215
|
+
|
|
216
|
+
## Success Criteria
|
|
217
|
+
|
|
218
|
+
- ✅ Issue number auto-detected from chat or explicit input
|
|
219
|
+
- ✅ Worktree created at `<worktreePath>` (path from setup script output)
|
|
220
|
+
- ✅ Session stored in `.hublaunch/.fix-sessions/issue-<N>.json`
|
|
221
|
+
- ✅ All edits applied inside the worktree
|
|
222
|
+
- ✅ Main working tree untouched
|
|
223
|
+
- ✅ Changes committed and pushed from worktree
|
|
224
|
+
- ✅ Clear next steps provided
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hula-launch
|
|
3
|
+
description: Launch a GitHub issue from the current plan. Use when the user asks to launch or assign the plan to a remote agent.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
argument-hint: <branch-name>
|
|
6
|
+
allowed-tools: Bash Read
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are an expert HubLaunch workflow assistant, responsible for launching GitHub issues from implementation plans.
|
|
10
|
+
|
|
11
|
+
## Instructions
|
|
12
|
+
|
|
13
|
+
Your job is to:
|
|
14
|
+
|
|
15
|
+
1. **Parse the user input** to extract:
|
|
16
|
+
- Required: Branch name (e.g., "feature-auth", "fix-button-style")
|
|
17
|
+
|
|
18
|
+
2. **Find the plan file path** from Copilot's own previous output in THIS chat:
|
|
19
|
+
- Look for the output from `/hula-plan` command
|
|
20
|
+
- Parse the plan file path from the message
|
|
21
|
+
- Also check for the HTML comment: `<!-- hula-plan: <path> -->`
|
|
22
|
+
- **CRITICAL**: Do NOT search the filesystem for plans - ONLY use the path from chat history
|
|
23
|
+
|
|
24
|
+
3. **Error if no plan found**:
|
|
25
|
+
- If no plan path is found in the current chat history, show error:
|
|
26
|
+
- "❌ No plan found in this chat. Run `/hula-plan` first."
|
|
27
|
+
- Stop execution
|
|
28
|
+
|
|
29
|
+
4. **Check plan sync status**:
|
|
30
|
+
- The plan needs to be on `origin/main` for the launch to work properly
|
|
31
|
+
- If not synced, prompt to run `/hula-upload` first
|
|
32
|
+
|
|
33
|
+
5. **Launch the issue** using the HubLaunch CLI:
|
|
34
|
+
- Run: `hula launch <branch-name> <plan-path>`
|
|
35
|
+
- This creates a GitHub issue from the plan and assigns Copilot
|
|
36
|
+
|
|
37
|
+
6. **Output the issue number with special tags** for Copilot self-reference:
|
|
38
|
+
- Parse the issue number from the CLI output
|
|
39
|
+
- Display: "✅ Launched issue #42 on branch `<branch-name>`"
|
|
40
|
+
- Include HTML comment: `<!-- hula-issue: 42 -->`
|
|
41
|
+
- This allows `/hula-fix` and other commands to find the issue number later
|
|
42
|
+
|
|
43
|
+
## Input Format
|
|
44
|
+
|
|
45
|
+
User will provide:
|
|
46
|
+
```
|
|
47
|
+
/hula-launch <branch-name> [--handoff <username>]
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Examples:
|
|
51
|
+
- `/hula-launch feature-auth`
|
|
52
|
+
- `/hula-launch fix-button-style`
|
|
53
|
+
- `/hula-launch add-oauth-support`
|
|
54
|
+
- `/hula-launch feature-auth --handoff octocat`
|
|
55
|
+
|
|
56
|
+
User input: $ARGUMENTS
|
|
57
|
+
|
|
58
|
+
## Workflow
|
|
59
|
+
|
|
60
|
+
### Step 1: Parse Input
|
|
61
|
+
|
|
62
|
+
Extract:
|
|
63
|
+
- **Branch name** (required): The name for the feature branch (e.g., "feature-auth")
|
|
64
|
+
- **--handoff** (optional): GitHub username to assign the created issue to
|
|
65
|
+
|
|
66
|
+
If no branch name provided:
|
|
67
|
+
```
|
|
68
|
+
❌ Branch name required. Usage: /hula-launch <branch-name> [--handoff <username>]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Step 2: Find Plan in Chat History
|
|
72
|
+
|
|
73
|
+
**CRITICAL**: Do NOT search the filesystem. ONLY look in the current chat history.
|
|
74
|
+
|
|
75
|
+
Look for messages from `/hula-plan` command that contain:
|
|
76
|
+
- Text like: "Plan created: `.hublaunch/plans/2025-12-22-14:30-feature-name.md`"
|
|
77
|
+
- HTML comment: `<!-- hula-plan: .hublaunch/plans/2025-12-22-14:30-feature-name.md -->`
|
|
78
|
+
|
|
79
|
+
If found, extract the plan file path.
|
|
80
|
+
|
|
81
|
+
If NOT found in chat history:
|
|
82
|
+
```
|
|
83
|
+
❌ No plan found in this chat. Run `/hula-plan` first.
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Stop execution here. Do not proceed.
|
|
87
|
+
|
|
88
|
+
### Step 3: Validate Plan File
|
|
89
|
+
|
|
90
|
+
Use the `#file` tool to verify the plan file exists at the path found in chat history.
|
|
91
|
+
|
|
92
|
+
If file doesn't exist:
|
|
93
|
+
```
|
|
94
|
+
❌ Plan file not found at <path>. The file may have been moved or deleted.
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
### Step 4: Sync, Upload, and Launch (Script)
|
|
98
|
+
|
|
99
|
+
Run the launch script — it checks plan sync status, auto-uploads if needed, and runs `hula launch` in one terminal approval:
|
|
100
|
+
|
|
101
|
+
```bash
|
|
102
|
+
bash .github/scripts/hula-launch-run.sh <plan-path> <branch-name>
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
If the user provided `--handoff <username>`, append it:
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
bash .github/scripts/hula-launch-run.sh <plan-path> <branch-name> --handoff <username>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
The script outputs JSON with `status`, `issueNumber`, `branchName`, `planPath`, `handoff`, `uploaded`, and `cliOutput`.
|
|
112
|
+
|
|
113
|
+
Parse the JSON output:
|
|
114
|
+
- If `status` is `"error"`, display the `message` and stop.
|
|
115
|
+
- If `uploaded` is `true`, emit the HTML comment tag:
|
|
116
|
+
```
|
|
117
|
+
<!-- hula-uploaded: <plan-path> -->
|
|
118
|
+
```
|
|
119
|
+
- If `status` is `"success"`, proceed to Step 5.
|
|
120
|
+
|
|
121
|
+
### Step 5: Parse and Display Result
|
|
122
|
+
|
|
123
|
+
From the JSON `issueNumber` and `cliOutput` fields, extract and display:
|
|
124
|
+
|
|
125
|
+
**Success Output Format:**
|
|
126
|
+
```
|
|
127
|
+
✅ Launched issue #42 on branch `<branch-name>`
|
|
128
|
+
|
|
129
|
+
📋 **Issue**: <repo>#42
|
|
130
|
+
🌿 **Branch**: `<branch-name>`
|
|
131
|
+
📄 **Plan**: `<plan-path>`
|
|
132
|
+
|
|
133
|
+
<!-- hula-issue: 42 -->
|
|
134
|
+
|
|
135
|
+
**Next Steps:**
|
|
136
|
+
- Copilot will start working on the implementation
|
|
137
|
+
- Use `/hula-fix <problem>` if you need to make corrections
|
|
138
|
+
- Use `/hula-verify` to check implementation against the plan
|
|
139
|
+
- Use `/hula-merge` when ready to merge
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Error Handling:**
|
|
143
|
+
|
|
144
|
+
If the script exits with an error:
|
|
145
|
+
```
|
|
146
|
+
❌ Launch failed: <message from JSON output>
|
|
147
|
+
|
|
148
|
+
Common issues:
|
|
149
|
+
- Plan upload failed during auto-upload (run `/hula-upload` manually to diagnose)
|
|
150
|
+
- Issue already exists for this plan
|
|
151
|
+
- Network/authentication issues with GitHub
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## Important Notes
|
|
155
|
+
|
|
156
|
+
- This command is typically run after `/hula-plan` and `/hula-confirm`
|
|
157
|
+
- If the plan is not yet on `origin/main`, it will be auto-uploaded during launch
|
|
158
|
+
- You can still run `/hula-upload` manually at any time if preferred
|
|
159
|
+
- The issue number output is used by subsequent commands like `/hula-fix`
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: hula-log
|
|
3
|
+
description: View job logs for a tracked issue in an editor tab. Use when the user asks to see logs, check status, or view output.
|
|
4
|
+
disable-model-invocation: true
|
|
5
|
+
argument-hint: "[issue-name]"
|
|
6
|
+
allowed-tools: Bash Read
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
You are an expert HubLaunch workflow assistant responsible for fetching and displaying job logs for tracked plans.
|
|
10
|
+
|
|
11
|
+
## Instructions
|
|
12
|
+
|
|
13
|
+
Your job is to:
|
|
14
|
+
|
|
15
|
+
1. **Determine the tracking name** from either:
|
|
16
|
+
- The user's explicit input (e.g., `/hula-log fix-button`)
|
|
17
|
+
- Auto-detection from the current Git branch using `git rev-parse --abbrev-ref HEAD`
|
|
18
|
+
|
|
19
|
+
2. **Run the CLI command** to fetch logs and open them in an editor tab
|
|
20
|
+
|
|
21
|
+
3. **Display the result** to the user
|
|
22
|
+
|
|
23
|
+
## Input Format
|
|
24
|
+
|
|
25
|
+
User will provide:
|
|
26
|
+
|
|
27
|
+
```
|
|
28
|
+
/hula-log [trackingName] [--lines N]
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Examples:
|
|
32
|
+
|
|
33
|
+
- `/hula-log` — auto-detect tracking name from current branch
|
|
34
|
+
- `/hula-log fix-button` — explicit tracking name
|
|
35
|
+
- `/hula-log fix-button --lines 200` — show last 200 lines
|
|
36
|
+
|
|
37
|
+
User input: $ARGUMENTS
|
|
38
|
+
|
|
39
|
+
## Workflow
|
|
40
|
+
|
|
41
|
+
### Step 1: Determine Tracking Name
|
|
42
|
+
|
|
43
|
+
**If the user provided a tracking name** (e.g., `/hula-log fix-button`): use it directly.
|
|
44
|
+
|
|
45
|
+
**If no tracking name was provided**: auto-detect from the current Git branch by running in the terminal:
|
|
46
|
+
|
|
47
|
+
```bash
|
|
48
|
+
git rev-parse --abbrev-ref HEAD
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Use the branch name as the tracking name. If the command fails or returns `HEAD` (detached), show an error:
|
|
52
|
+
|
|
53
|
+
```
|
|
54
|
+
❌ Could not detect current branch. Please provide the tracking name explicitly:
|
|
55
|
+
/hula-log <trackingName>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Step 2: Build CLI Command
|
|
59
|
+
|
|
60
|
+
Build the command:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
hula logs <trackingName>
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
If the user provided `--lines <N>`, append it:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
hula logs <trackingName> --lines <N>
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Step 3: Run CLI Command
|
|
73
|
+
|
|
74
|
+
Execute using the `#terminal` tool.
|
|
75
|
+
|
|
76
|
+
### Step 4: Display Result
|
|
77
|
+
|
|
78
|
+
**Success output format:**
|
|
79
|
+
|
|
80
|
+
```
|
|
81
|
+
✅ Log file opened for tracking name `<trackingName>`
|
|
82
|
+
|
|
83
|
+
📋 **Tracking Name**: `<trackingName>`
|
|
84
|
+
📏 **Lines**: last <N> lines (default: 100)
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
**Error handling:**
|
|
88
|
+
|
|
89
|
+
If the CLI command fails:
|
|
90
|
+
|
|
91
|
+
```
|
|
92
|
+
❌ Failed to fetch logs: <error message>
|
|
93
|
+
|
|
94
|
+
Common issues:
|
|
95
|
+
- Tracking name not found on the server (check with `hula launch --show <trackingName>`)
|
|
96
|
+
- Authentication error (run `hula login` to re-authenticate)
|
|
97
|
+
- Server unreachable (check your network and server URL)
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Important Notes
|
|
101
|
+
|
|
102
|
+
- The tracking name is the plan's tracking name (same as the Git branch name)
|
|
103
|
+
- Logs are written to a temp file in the system's temp directory under `hublaunch-logs/<trackingName>.log` and opened in your configured editor
|
|
104
|
+
- For running tasks, logs reflect the last heartbeat update (approximately every 60 seconds)
|
|
105
|
+
- For completed/failed/cancelled tasks, logs are captured at completion time
|