@snappedly-tools/shipyard 0.5.0 → 0.6.0

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 (58) hide show
  1. package/README.md +56 -8
  2. package/dist/index.js +27 -9
  3. package/dist/index.js.map +1 -1
  4. package/dist/main.js +51 -15
  5. package/dist/main.js.map +1 -1
  6. package/dist/templates/parallel-planner/block-scope.sh +160 -0
  7. package/dist/templates/parallel-planner/conflict-prompt.md +22 -0
  8. package/dist/templates/parallel-planner/handoff.sh +175 -0
  9. package/dist/templates/parallel-planner/implement-prompt.md +10 -56
  10. package/dist/templates/parallel-planner/main.mts +434 -188
  11. package/dist/templates/parallel-planner/merge-prompt.md +9 -21
  12. package/dist/templates/parallel-planner/plan-prompt.md +5 -31
  13. package/dist/templates/parallel-planner/select-issues.mjs +788 -0
  14. package/dist/templates/parallel-planner/setup.sh +51 -0
  15. package/dist/templates/parallel-planner/spec-wave-prompt.md +16 -0
  16. package/dist/templates/parallel-planner/template.json +1 -1
  17. package/dist/templates/parallel-planner/triage-prompt.md +5 -0
  18. package/dist/templates/parallel-planner/verify-triage.sh +19 -0
  19. package/dist/templates/parallel-planner-with-review/block-scope.sh +160 -0
  20. package/dist/templates/parallel-planner-with-review/conflict-prompt.md +22 -0
  21. package/dist/templates/parallel-planner-with-review/handoff.sh +175 -0
  22. package/dist/templates/parallel-planner-with-review/implement-prompt.md +10 -56
  23. package/dist/templates/parallel-planner-with-review/main.mts +473 -205
  24. package/dist/templates/parallel-planner-with-review/merge-prompt.md +9 -21
  25. package/dist/templates/parallel-planner-with-review/plan-prompt.md +5 -31
  26. package/dist/templates/parallel-planner-with-review/review-prompt.md +11 -49
  27. package/dist/templates/parallel-planner-with-review/select-issues.mjs +788 -0
  28. package/dist/templates/parallel-planner-with-review/setup.sh +51 -0
  29. package/dist/templates/parallel-planner-with-review/spec-wave-prompt.md +16 -0
  30. package/dist/templates/parallel-planner-with-review/template.json +1 -1
  31. package/dist/templates/parallel-planner-with-review/triage-prompt.md +5 -0
  32. package/dist/templates/parallel-planner-with-review/verify-triage.sh +19 -0
  33. package/dist/templates/sequential-reviewer/block-scope.sh +160 -0
  34. package/dist/templates/sequential-reviewer/handoff.sh +175 -0
  35. package/dist/templates/sequential-reviewer/implement-prompt.md +12 -46
  36. package/dist/templates/sequential-reviewer/main.mts +199 -103
  37. package/dist/templates/sequential-reviewer/review-prompt.md +11 -49
  38. package/dist/templates/sequential-reviewer/select-issues.mjs +788 -0
  39. package/dist/templates/sequential-reviewer/setup.sh +51 -0
  40. package/dist/templates/sequential-reviewer/template.json +1 -1
  41. package/dist/templates/sequential-reviewer/triage-prompt.md +5 -0
  42. package/dist/templates/sequential-reviewer/verify-triage.sh +19 -0
  43. package/dist/templates/shared/block-scope.sh +160 -0
  44. package/dist/templates/shared/handoff.sh +175 -0
  45. package/dist/templates/shared/select-issues.mjs +788 -0
  46. package/dist/templates/shared/setup.sh +51 -0
  47. package/dist/templates/shared/triage-prompt.md +5 -0
  48. package/dist/templates/shared/verify-triage.sh +19 -0
  49. package/dist/templates/simple-loop/block-scope.sh +160 -0
  50. package/dist/templates/simple-loop/handoff.sh +175 -0
  51. package/dist/templates/simple-loop/main.mts +190 -45
  52. package/dist/templates/simple-loop/prompt.md +12 -46
  53. package/dist/templates/simple-loop/select-issues.mjs +788 -0
  54. package/dist/templates/simple-loop/setup.sh +51 -0
  55. package/dist/templates/simple-loop/template.json +1 -1
  56. package/dist/templates/simple-loop/triage-prompt.md +5 -0
  57. package/dist/templates/simple-loop/verify-triage.sh +19 -0
  58. package/package.json +1 -1
@@ -1,26 +1,14 @@
1
- # TASK
1
+ # Final integration for scope #{{TASK_ID}}: {{ISSUE_TITLE}}
2
2
 
3
- Merge the following branches into the current branch:
3
+ On branch `{{BRANCH}}`, inspect its complete diff from `{{BASE_BRANCH}}` and the source issue. This is the planner's final integration stage and ends in one PR for this scope. Follow `/code-cleanup` and local `/code-review` appropriate to the issue, using the worker's existing valid check evidence. Run required integrated checks and reinstall candidate dependencies with `bash .shipyard/setup.sh` after manifest changes. Resolve findings, commit corrections and inspect the final branch.
4
4
 
5
- {{BRANCHES}}
5
+ Do not close the issue, merge into the target, or publish the PR. If checks or review remain unresolved, explain why without completion. After a verified final commit, report `Checks: <commands and results>`, `Review: APPROVED`, and limitations:
6
6
 
7
- For each branch:
7
+ <handoff>...</handoff>
8
+ <promise>COMPLETE</promise>
8
9
 
9
- 1. Run `git merge <branch> --no-edit`
10
- 2. If there are merge conflicts, resolve them intelligently by reading both sides and choosing the correct resolution
11
- 3. After resolving conflicts, read the repository's configured feedback-loop contract and run every applicable check for the merged change
12
- 4. If a check fails, fix the issue before proceeding to the next branch
10
+ For a planning spec, follow `/implement-spec` for whole-spec integration, cleanup, and final checks on the one spec branch. Read parent and all scoped child bodies and comments, inspect dependency order and merged commits, and resolve gaps before completion. Run `/code-review` here when this template has no separate reviewer stage. Never merge the target branch or close issues.
13
11
 
14
- After all branches are merged, make a single commit summarizing the merge.
15
-
16
- # CLOSE ISSUES
17
-
18
- For each branch that was merged, close its issue using the following command:
19
-
20
- `{{CLOSE_TASK_COMMAND}}`
21
-
22
- Here are all the issues:
23
-
24
- {{ISSUES}}
25
-
26
- Once you've merged everything you can, output <promise>COMPLETE</promise>.
12
+ ```json
13
+ {{SCOPE}}
14
+ ```
@@ -1,37 +1,11 @@
1
- # ISSUES
2
-
3
- Here are the open issues in the repo:
1
+ # Activated issue scopes
4
2
 
5
3
  <issues-json>
6
-
7
- !`{{LIST_TASKS_COMMAND}}`
8
-
4
+ !`node .shipyard/select-issues.mjs`
9
5
  </issues-json>
10
6
 
11
- The list above has already been filtered to issues ready for work.
12
-
13
- # TASK
14
-
15
- Analyze the open issues and build a dependency graph. For each issue, determine whether it **blocks** or **is blocked by** any other open issue.
16
-
17
- An issue B is **blocked by** issue A if:
18
-
19
- - B requires code or infrastructure that A introduces
20
- - B and A modify overlapping files or modules, making concurrent work likely to produce merge conflicts
21
- - B's requirements depend on a decision or API shape that A will establish
22
-
23
- An issue is **unblocked** if it has zero blocking dependencies on other open issues.
24
-
25
- For each unblocked issue, assign a branch name using the exact format `shipyard/issue-{id}` (no slug or other suffix). This must be deterministic so that re-planning the same issue always produces the same branch name and accumulated progress is preserved.
26
-
27
- # OUTPUT
28
-
29
- Output your plan as a JSON object wrapped in `<plan>` tags:
30
-
31
- <plan>
32
- {"issues": [{"id": "42", "title": "Fix auth bug", "branch": "shipyard/issue-42"}]}
33
- </plan>
7
+ Use exactly these resolved scopes as the ready frontier. `scope.tickets` contains only selected tickets with the `shipyard` label; other linked tickets are context and must not be implemented. For planning specs, follow `/implement-spec` when planning the selected scope, honoring child dependencies and overlapping files. The surrounding template will run ready tickets in parallel with scoped `/implement` workers, integrate each dependency wave into one spec branch, then perform integrated cleanup, review, and one PR handoff. Do not omit selected tickets, invent scope IDs, create PRs, merge to target, or close issues.
34
8
 
35
- Include only unblocked issues. If every issue is blocked, include the single highest-priority candidate (the one with the fewest or weakest dependencies).
9
+ Emit each selected scope once, by its parent or standalone ID. If no scope is ready, emit an empty array:
36
10
 
37
- Always emit the `<plan>` tags, even when there is nothing to do. If there are no issues to work on at all, output `<plan>{"issues": []}</plan>` so the run can exit cleanly.
11
+ <plan>{"issues":[{"id":"42"}]}</plan>