@ship-cli/core 0.1.7 → 0.1.8
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/dist/bin.js +126 -213
- package/package.json +1 -1
package/dist/bin.js
CHANGED
|
@@ -191232,7 +191232,7 @@ var command = ship.pipe(
|
|
|
191232
191232
|
prCommand
|
|
191233
191233
|
])
|
|
191234
191234
|
);
|
|
191235
|
-
var version = "0.1.
|
|
191235
|
+
var version = "0.1.8" ;
|
|
191236
191236
|
var run9 = run8(command, {
|
|
191237
191237
|
name: "ship",
|
|
191238
191238
|
version
|
|
@@ -192796,268 +192796,181 @@ name: ship-cli
|
|
|
192796
192796
|
description: Work management system replacing built-in todos with tracked tasks and stacked changes
|
|
192797
192797
|
---
|
|
192798
192798
|
|
|
192799
|
-
##
|
|
192799
|
+
## Rules
|
|
192800
192800
|
|
|
192801
|
-
**
|
|
192802
|
-
|
|
192803
|
-
|
|
192804
|
-
|
|
192805
|
-
---
|
|
192806
|
-
|
|
192807
|
-
## Ship Tool Guidance
|
|
192808
|
-
|
|
192809
|
-
**IMPORTANT: Always use the \`ship\` tool, NEVER run \`ship\` or \`pnpm ship\` via bash/terminal.**
|
|
192810
|
-
|
|
192811
|
-
The \`ship\` tool replaces built-in todo management. Use it for all task tracking.
|
|
192812
|
-
|
|
192813
|
-
---
|
|
192814
|
-
|
|
192815
|
-
## Available Actions
|
|
192816
|
-
|
|
192817
|
-
### Task Management
|
|
192818
|
-
|
|
192819
|
-
| Action | Description | Required params |
|
|
192820
|
-
|--------|-------------|-----------------|
|
|
192821
|
-
| \`ready\` | Tasks you can work on (no blockers) | - |
|
|
192822
|
-
| \`blocked\` | Tasks waiting on dependencies | - |
|
|
192823
|
-
| \`list\` | All tasks (with optional filters) | - |
|
|
192824
|
-
| \`show\` | Task details | taskId |
|
|
192825
|
-
| \`start\` | Begin working on task | taskId |
|
|
192826
|
-
| \`done\` | Mark task complete | taskId |
|
|
192827
|
-
| \`create\` | Create new task | title |
|
|
192828
|
-
| \`update\` | Update task | taskId + fields |
|
|
192829
|
-
| \`block\` | Add blocking relationship | blocker, blocked |
|
|
192830
|
-
| \`unblock\` | Remove blocking relationship | blocker, blocked |
|
|
192831
|
-
| \`relate\` | Link tasks as related | taskId, relatedTaskId |
|
|
192832
|
-
| \`status\` | Check configuration | - |
|
|
192833
|
-
|
|
192834
|
-
### Stack Operations (VCS)
|
|
192835
|
-
|
|
192836
|
-
| Action | Description | Required params |
|
|
192837
|
-
|--------|-------------|-----------------|
|
|
192838
|
-
| \`stack-log\` | View stack of changes from trunk to current | - |
|
|
192839
|
-
| \`stack-status\` | Show current change status | - |
|
|
192840
|
-
| \`stack-create\` | Create a new change | message (optional), bookmark (optional), taskId (optional) |
|
|
192841
|
-
| \`stack-describe\` | Update change description | message |
|
|
192842
|
-
| \`stack-sync\` | Fetch, rebase, auto-abandon merged changes | - |
|
|
192843
|
-
|
|
192844
|
-
### Milestone Actions
|
|
192845
|
-
|
|
192846
|
-
| Action | Description | Required params |
|
|
192847
|
-
|--------|-------------|-----------------|
|
|
192848
|
-
| \`milestone-list\` | List project milestones | - |
|
|
192849
|
-
| \`milestone-show\` | Get milestone details | milestoneId |
|
|
192850
|
-
| \`milestone-create\` | Create new milestone | milestoneName |
|
|
192851
|
-
| \`milestone-update\` | Update milestone | milestoneId |
|
|
192852
|
-
| \`milestone-delete\` | Delete milestone | milestoneId |
|
|
192853
|
-
| \`task-set-milestone\` | Assign task to milestone | taskId, milestoneId |
|
|
192854
|
-
| \`task-unset-milestone\` | Remove task from milestone | taskId |
|
|
192801
|
+
1. **NEVER run via bash:** \`jj\`, \`gh pr\`, \`git\`, \`ship\`, \`pnpm ship\` - use the \`ship\` tool instead
|
|
192802
|
+
2. **ALWAYS use \`workdir\` parameter** for all commands when in a workspace
|
|
192803
|
+
3. **NEVER ask user to \`cd\`** - use \`workdir\` instead
|
|
192804
|
+
4. **On webhook events:** Notify user and ask confirmation BEFORE acting
|
|
192855
192805
|
|
|
192856
192806
|
---
|
|
192857
192807
|
|
|
192858
192808
|
## Workflow
|
|
192859
192809
|
|
|
192860
|
-
|
|
192861
|
-
2. Start a task: \`ship\` tool with action \`start\` and taskId
|
|
192862
|
-
3. Do the work
|
|
192863
|
-
4. Mark complete: \`ship\` tool with action \`done\` and taskId
|
|
192864
|
-
|
|
192865
|
-
---
|
|
192866
|
-
|
|
192867
|
-
## Task Identifiers
|
|
192868
|
-
|
|
192869
|
-
Task IDs use the format \`PREFIX-NUMBER\` where PREFIX is the Linear team key (e.g., \`ENG-123\`, \`PROD-456\`).
|
|
192870
|
-
|
|
192871
|
-
To find the correct prefix for your project, use ship tool with action=\`status\`. The team key shown is your task prefix.
|
|
192872
|
-
|
|
192873
|
-
**Never hardcode or guess prefixes like \`BRI-\`.** Always get the actual task IDs from \`ready\`, \`list\`, or \`show\` actions.
|
|
192874
|
-
|
|
192875
|
-
---
|
|
192810
|
+
### Start Task
|
|
192876
192811
|
|
|
192877
|
-
|
|
192878
|
-
|
|
192879
|
-
|
|
192880
|
-
|
|
192881
|
-
|
|
192882
|
-
|
|
192883
|
-
|
|
192884
|
-
|
|
192885
|
-
Example: If ENG-100 blocks ENG-101, then ENG-100 must be completed before ENG-101 can start.
|
|
192812
|
+
\`\`\`
|
|
192813
|
+
ship: action=stack-sync # Get latest trunk
|
|
192814
|
+
ship: action=ready # Find work
|
|
192815
|
+
ship: action=start, taskId=<id> # Mark In Progress (Linear only)
|
|
192816
|
+
ship: action=stack-create, message="<type>: <short description>", bookmark="user/<id>-slug"
|
|
192817
|
+
# Store workspace path from output, use for all subsequent workdir params
|
|
192818
|
+
bash: command="pnpm install", workdir=<workspace-path>
|
|
192819
|
+
\`\`\`
|
|
192886
192820
|
|
|
192887
|
-
###
|
|
192821
|
+
### Do Work
|
|
192888
192822
|
|
|
192889
|
-
Use
|
|
192823
|
+
- Use \`workdir=<workspace-path>\` for ALL bash and ship commands
|
|
192824
|
+
- Make changes, run quality checks (lint, format, typecheck)
|
|
192890
192825
|
|
|
192891
|
-
###
|
|
192826
|
+
### Update Commit Message (for multi-line)
|
|
192892
192827
|
|
|
192893
|
-
|
|
192828
|
+
\`\`\`
|
|
192829
|
+
ship: action=stack-describe, title="<type>: <subject>", description="<body>", workdir=<path>
|
|
192830
|
+
\`\`\`
|
|
192894
192831
|
|
|
192895
|
-
|
|
192832
|
+
Use \`title\` + \`description\` params for proper multi-line commits (NOT \`message\` with \`\\n\`).
|
|
192896
192833
|
|
|
192897
|
-
|
|
192834
|
+
### Submit Work (MANDATORY - do not skip)
|
|
192898
192835
|
|
|
192899
|
-
|
|
192836
|
+
\`\`\`
|
|
192837
|
+
ship: action=stack-sync, workdir=<path> # Rebase on trunk
|
|
192838
|
+
ship: action=stack-submit, workdir=<path> # Push + create PR (auto-subscribes to webhooks)
|
|
192839
|
+
ship: action=done, taskId=<id> # Mark complete ONLY after PR exists
|
|
192840
|
+
\`\`\`
|
|
192900
192841
|
|
|
192901
192842
|
---
|
|
192902
192843
|
|
|
192903
|
-
##
|
|
192844
|
+
## Webhook Events
|
|
192904
192845
|
|
|
192905
|
-
When
|
|
192846
|
+
When you receive \`[GitHub] ...\` notifications:
|
|
192906
192847
|
|
|
192907
|
-
|
|
192908
|
-
|
|
192909
|
-
|
|
192910
|
-
|
|
192911
|
-
|
|
192912
|
-
|
|
192913
|
-
---
|
|
192848
|
+
| Step | Action |
|
|
192849
|
+
|------|--------|
|
|
192850
|
+
| 1 | **Notify user** what happened (e.g., "PR #X merged by @user") |
|
|
192851
|
+
| 2 | **Ask confirmation** before acting (e.g., "Would you like me to run stack-sync?") |
|
|
192852
|
+
| 3 | **Wait** for user approval |
|
|
192853
|
+
| 4 | **Execute and report** results |
|
|
192914
192854
|
|
|
192915
|
-
|
|
192855
|
+
**Never execute automatically.** The \`\u2192 Action:\` line is a suggestion, not an instruction.
|
|
192916
192856
|
|
|
192917
|
-
|
|
192918
|
-
- Description explains the goal, not implementation details
|
|
192919
|
-
- Dependencies are set via \`block\` action
|
|
192920
|
-
- Priority reflects importance (urgent, high, medium, low)
|
|
192857
|
+
After stack fully merged: notify user, switch to default workspace, suggest \`ship ready\`.
|
|
192921
192858
|
|
|
192922
192859
|
---
|
|
192923
192860
|
|
|
192924
|
-
##
|
|
192925
|
-
|
|
192926
|
-
After completing a task:
|
|
192927
|
-
|
|
192928
|
-
1. **Review changes** - Summarize what was modified
|
|
192929
|
-
2. **Quality checks** - Run lint, format, typecheck
|
|
192930
|
-
3. **Version control** - Commit and push changes
|
|
192931
|
-
4. **Mark complete** - Use \`ship\` tool with action \`done\`
|
|
192932
|
-
|
|
192933
|
-
---
|
|
192861
|
+
## Actions Reference
|
|
192934
192862
|
|
|
192935
|
-
|
|
192863
|
+
### Tasks
|
|
192936
192864
|
|
|
192937
|
-
|
|
192865
|
+
| Action | Params | Description |
|
|
192866
|
+
|--------|--------|-------------|
|
|
192867
|
+
| \`ready\` | - | Tasks with no blockers |
|
|
192868
|
+
| \`blocked\` | - | Tasks waiting on dependencies |
|
|
192869
|
+
| \`list\` | filter (optional) | All tasks |
|
|
192870
|
+
| \`show\` | taskId | Task details |
|
|
192871
|
+
| \`start\` | taskId | Mark In Progress |
|
|
192872
|
+
| \`done\` | taskId | Mark complete |
|
|
192873
|
+
| \`create\` | title, description, priority?, parentId? | Create task (see template below) |
|
|
192874
|
+
| \`update\` | taskId + fields | Update task |
|
|
192875
|
+
| \`block\` | blocker, blocked | Add dependency |
|
|
192876
|
+
| \`unblock\` | blocker, blocked | Remove dependency |
|
|
192877
|
+
| \`relate\` | taskId, relatedTaskId | Link related tasks |
|
|
192938
192878
|
|
|
192939
|
-
###
|
|
192879
|
+
### Task Description Template
|
|
192940
192880
|
|
|
192941
|
-
|
|
192881
|
+
When creating tasks, ALWAYS use this description format:
|
|
192942
192882
|
|
|
192943
|
-
|
|
192944
|
-
|
|
192945
|
-
|
|
192946
|
-
|
|
192947
|
-
**To create a stacked change:**
|
|
192948
|
-
1. Complete work on current change
|
|
192949
|
-
2. Use \`ship\` tool with action \`stack-create\`, message="Description", bookmark="branch-name", taskId="BRI-123"
|
|
192950
|
-
- Pass the taskId from the current task to associate the workspace with it
|
|
192951
|
-
3. Push and create PR
|
|
192952
|
-
|
|
192953
|
-
### After a PR is Merged
|
|
192954
|
-
|
|
192955
|
-
**CRITICAL: Immediately sync the remaining stack after any PR merges.**
|
|
192956
|
-
|
|
192957
|
-
Use \`ship\` tool with action \`stack-sync\`
|
|
192958
|
-
|
|
192959
|
-
This will:
|
|
192960
|
-
1. Fetch latest from remote
|
|
192961
|
-
2. Rebase remaining stack onto updated trunk
|
|
192962
|
-
3. **Auto-abandon merged changes** - Changes that become empty after rebase (their content is now in trunk) are automatically abandoned
|
|
192963
|
-
4. **Auto-cleanup workspace** - If ALL changes in the stack were merged, the workspace is automatically cleaned up
|
|
192964
|
-
5. Report any conflicts that need resolution
|
|
192965
|
-
|
|
192966
|
-
The output will show:
|
|
192967
|
-
- Which changes were auto-abandoned (with their bookmarks)
|
|
192968
|
-
- Whether the stack was fully merged
|
|
192969
|
-
- If a workspace was cleaned up
|
|
192970
|
-
|
|
192971
|
-
Do NOT wait for conflict reports. Proactively sync after each merge.
|
|
192972
|
-
|
|
192973
|
-
### Viewing the Stack
|
|
192974
|
-
|
|
192975
|
-
Use \`ship\` tool with action \`stack-log\` to see all changes from trunk to current.
|
|
192976
|
-
|
|
192977
|
-
### Updating Change Description
|
|
192978
|
-
|
|
192979
|
-
Use \`ship\` tool with action \`stack-describe\`, message="New description"
|
|
192980
|
-
|
|
192981
|
-
---
|
|
192982
|
-
|
|
192983
|
-
## VCS Best Practices
|
|
192984
|
-
|
|
192985
|
-
1. **One logical change per commit** - Keep changes focused and reviewable
|
|
192986
|
-
2. **Descriptive messages** - Use format: \`TASK-ID: Brief description\`
|
|
192987
|
-
3. **Sync frequently** - After any PR merges, run \`stack-sync\`
|
|
192988
|
-
4. **Do not create orphan changes** - Always build on the stack or on main
|
|
192989
|
-
|
|
192990
|
-
---
|
|
192883
|
+
\`\`\`
|
|
192884
|
+
## Summary
|
|
192885
|
+
[1-2 sentences: What needs to be done and why]
|
|
192991
192886
|
|
|
192992
|
-
##
|
|
192887
|
+
## Acceptance Criteria
|
|
192888
|
+
- [ ] Specific, verifiable outcome 1
|
|
192889
|
+
- [ ] Specific, verifiable outcome 2
|
|
192890
|
+
- [ ] Tests pass, linting passes
|
|
192993
192891
|
|
|
192994
|
-
|
|
192892
|
+
## Notes
|
|
192893
|
+
[Optional: Implementation hints, files to modify, constraints]
|
|
192894
|
+
\`\`\`
|
|
192995
192895
|
|
|
192996
|
-
|
|
192997
|
-
|
|
192998
|
-
|
|
192999
|
-
|
|
192896
|
+
**Rules:**
|
|
192897
|
+
- Summary is REQUIRED - explains the task clearly
|
|
192898
|
+
- Acceptance criteria are REQUIRED - must be verifiable/testable
|
|
192899
|
+
- Notes are optional - include when helpful for implementation
|
|
192900
|
+
- Keep it concise but complete
|
|
193000
192901
|
|
|
193001
192902
|
**Example:**
|
|
192903
|
+
\`\`\`
|
|
192904
|
+
## Summary
|
|
192905
|
+
Add rate limiting middleware to prevent API abuse on public endpoints.
|
|
193002
192906
|
|
|
193003
|
-
|
|
193004
|
-
|
|
193005
|
-
|
|
193006
|
-
|
|
193007
|
-
|
|
193008
|
-
WRONG - Immediately running stack-sync without telling user
|
|
193009
|
-
|
|
193010
|
-
RIGHT - Notify first, then ask:
|
|
193011
|
-
|
|
193012
|
-
**PR #80 merged** by @user
|
|
193013
|
-
|
|
193014
|
-
Would you like me to run \`stack-sync\` to update your local stack?
|
|
192907
|
+
## Acceptance Criteria
|
|
192908
|
+
- [ ] Rate limit: 100 req/min authenticated, 20 req/min anonymous
|
|
192909
|
+
- [ ] Returns 429 with Retry-After header when exceeded
|
|
192910
|
+
- [ ] Unit tests cover rate limit scenarios
|
|
192911
|
+
- [ ] \`pnpm test\` and \`pnpm check\` pass
|
|
193015
192912
|
|
|
193016
|
-
|
|
192913
|
+
## Notes
|
|
192914
|
+
See middleware/auth.ts for similar patterns. Use Redis for state.
|
|
192915
|
+
\`\`\`
|
|
193017
192916
|
|
|
193018
|
-
|
|
192917
|
+
### Stack (VCS)
|
|
193019
192918
|
|
|
193020
|
-
|
|
192919
|
+
All support optional \`workdir\` param.
|
|
193021
192920
|
|
|
193022
|
-
|
|
192921
|
+
| Action | Params | Description |
|
|
192922
|
+
|--------|--------|-------------|
|
|
192923
|
+
| \`stack-sync\` | - | Fetch + rebase onto trunk |
|
|
192924
|
+
| \`stack-restack\` | - | Rebase onto trunk (no fetch) |
|
|
192925
|
+
| \`stack-create\` | message?, bookmark?, noWorkspace? | New change (creates workspace by default) |
|
|
192926
|
+
| \`stack-describe\` | title, description? OR message | Update description (use title+description for proper multi-line commits) |
|
|
192927
|
+
| \`stack-submit\` | draft? | Push + create/update PR |
|
|
192928
|
+
| \`stack-status\` | - | Current change info |
|
|
192929
|
+
| \`stack-log\` | - | View stack |
|
|
192930
|
+
| \`stack-squash\` | message | Squash into parent |
|
|
192931
|
+
| \`stack-abandon\` | changeId? | Abandon change |
|
|
192932
|
+
| \`stack-up\` / \`stack-down\` | - | Navigate stack |
|
|
192933
|
+
| \`stack-undo\` | - | Undo last operation |
|
|
192934
|
+
| \`stack-bookmark\` | name, move? | Create/move bookmark |
|
|
192935
|
+
| \`stack-workspaces\` | - | List workspaces |
|
|
192936
|
+
| \`stack-remove-workspace\` | name, deleteFiles? | Remove workspace |
|
|
192937
|
+
| \`stack-update-stale\` | - | Fix stale working copy |
|
|
193023
192938
|
|
|
193024
|
-
|
|
193025
|
-
2. **Workdir** - Explicit working directory path when it has changed (critical for workspace operations)
|
|
193026
|
-
3. **Skill reminder** - Prompt to read this skill when encountering complex situations
|
|
192939
|
+
### Pull Requests
|
|
193027
192940
|
|
|
193028
|
-
|
|
192941
|
+
Use these for advanced PR workflows. Note: \`stack-submit\` handles basic PR creation automatically.
|
|
193029
192942
|
|
|
193030
|
-
|
|
193031
|
-
|
|
192943
|
+
| Action | Params | Description |
|
|
192944
|
+
|--------|--------|-------------|
|
|
192945
|
+
| \`pr-create\` | draft?, open? | Create PR with Linear task context |
|
|
192946
|
+
| \`pr-stack\` | dryRun? | Create stacked PRs for entire stack |
|
|
192947
|
+
| \`pr-review\` | prNumber? (optional), unresolved?, json? | Fetch PR reviews and comments |
|
|
193032
192948
|
|
|
193033
|
-
|
|
193034
|
-
Next: <suggested actions>
|
|
193035
|
-
Workdir: <path> # Only shown when working directory changed
|
|
193036
|
-
IMPORTANT: Load skill first \u2192 skill(name="ship-cli") # Only on entry points or complex situations
|
|
193037
|
-
Note: <contextual message>
|
|
193038
|
-
\`\`\`
|
|
192949
|
+
**\`pr-create\`**: Creates a PR for current bookmark, auto-populating title and body from Linear task. Use when you need rich task context in PR description.
|
|
193039
192950
|
|
|
193040
|
-
|
|
192951
|
+
**\`pr-stack\`**: Creates PRs for all changes in your stack with proper base targeting. First PR targets main, subsequent PRs target previous bookmark.
|
|
193041
192952
|
|
|
193042
|
-
|
|
193043
|
-
1. Cleans up the workspace (deletes directory)
|
|
193044
|
-
2. Provides the **main repo path** in the \`Workdir:\` line
|
|
192953
|
+
**\`pr-review\`**: Fetches reviews and comments in AI-friendly format. Shows verdicts (APPROVED, CHANGES_REQUESTED), inline code comments with file:line, and conversation threads. Use \`--unresolved\` to filter to actionable items only.
|
|
193045
192954
|
|
|
193046
|
-
|
|
192955
|
+
### Milestones
|
|
193047
192956
|
|
|
193048
|
-
|
|
193049
|
-
|
|
193050
|
-
|
|
193051
|
-
|
|
192957
|
+
| Action | Params | Description |
|
|
192958
|
+
|--------|--------|-------------|
|
|
192959
|
+
| \`milestone-list\` | - | List milestones |
|
|
192960
|
+
| \`milestone-show\` | milestoneId | Milestone details |
|
|
192961
|
+
| \`milestone-create\` | milestoneName, milestoneDescription?, milestoneTargetDate? | Create milestone |
|
|
192962
|
+
| \`task-set-milestone\` | taskId, milestoneId | Assign task |
|
|
192963
|
+
| \`task-unset-milestone\` | taskId | Remove from milestone |
|
|
193052
192964
|
|
|
193053
192965
|
---
|
|
193054
|
-
Next: action=done (mark task complete) | action=ready (find next task)
|
|
193055
|
-
Workdir: /Users/dev/project
|
|
193056
|
-
IMPORTANT: Load skill first \u2192 skill(name="ship-cli")
|
|
193057
|
-
Note: Workspace 'bri-123-feature' was deleted. Use the workdir above for subsequent commands.
|
|
193058
|
-
\`\`\`
|
|
193059
192966
|
|
|
193060
|
-
|
|
192967
|
+
## Troubleshooting
|
|
192968
|
+
|
|
192969
|
+
| Problem | Solution |
|
|
192970
|
+
|---------|----------|
|
|
192971
|
+
| "Working copy is stale" | \`stack-update-stale\` |
|
|
192972
|
+
| Bookmark lost after squash/rebase | \`stack-bookmark\` with \`move=true\` |
|
|
192973
|
+
| Accidentally used jj/gh directly | \`stack-status\` to check, \`stack-undo\` if needed |
|
|
193061
192974
|
`;
|
|
193062
192975
|
|
|
193063
192976
|
// src/adapters/driven/config/ConfigRepositoryLive.ts
|