@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 the issue and final diff from `{{BASE_BRANCH}}`. Follow `/code-cleanup` on the complete integrated change, including a planning spec and all scoped tickets. The selected template has already run an independent `/code-review`; perform final integration checks and preserve its result when content is unchanged. Reinstall candidate dependencies with `bash .shipyard/setup.sh` after manifest changes. Commit any authorized correction and report its affected checks. The surrounding workflow repeats `/code-review` when this stage makes commits.
4
4
 
5
- {{BRANCHES}}
5
+ Do not close the issue, merge into the target, publish the PR, or start another review chain. If checks remain unresolved, explain why without completion. After verified final content, report `Checks: <commands and results>`, the prior `Review: APPROVED` result, 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. 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>
@@ -1,55 +1,17 @@
1
- # TASK
1
+ # Independent review of issue #{{TASK_ID}}
2
2
 
3
- Review the code changes on branch `{{BRANCH}}` and improve code clarity, consistency, and maintainability while preserving exact functionality.
3
+ Review the complete scope on branch `{{BRANCH}}` against `{{BASE_BRANCH}}`, the issue requirements, `AGENTS.md`, `docs/agents/workflow.md`, and `.shipyard/CODING_STANDARDS.md`. Follow `/code-review`. Inspect the exact diff, behavior tests, correctness and security; reuse valid worker checks. This explicit review stage must complete before the final integration stage.
4
4
 
5
- # CONTEXT
5
+ Resolve authorized findings on this branch, run affected checks, and commit fixes. Do not close the issue, create a PR, merge to target, or start another orchestration chain. If required findings remain open or checks are missing, report them and omit approval.
6
6
 
7
- ## Branch diff
7
+ Only when review permits handoff, report `Review: APPROVED`, its findings, dispositions, `Checks: <commands and results>` for changed checks, and limitations:
8
8
 
9
- !`git diff {{TARGET_BRANCH}}...{{BRANCH}}`
9
+ <handoff>...</handoff>
10
+ <review>APPROVED</review>
11
+ <promise>COMPLETE</promise>
10
12
 
11
- ## Commits on this branch
13
+ For a planning spec, review the integrated parent and all scoped children together. Read all issue bodies and comments. Resolved scope:
12
14
 
13
- !`git log {{TARGET_BRANCH}}..{{BRANCH}} --oneline`
14
-
15
- # REVIEW PROCESS
16
-
17
- 1. **Understand the change**: Read the diff and commits above to understand the intent.
18
-
19
- 2. **Analyze for improvements**: Look for opportunities to:
20
- - Reduce unnecessary complexity and nesting
21
- - Eliminate redundant code and abstractions
22
- - Improve readability through clear variable and function names
23
- - Consolidate related logic
24
- - Remove unnecessary comments that describe obvious code
25
- - Avoid nested ternary operators - prefer switch statements or if/else chains
26
- - Choose clarity over brevity - explicit code is often better than overly compact code
27
-
28
- 3. **Check correctness**:
29
- - Does the implementation match the intent? Are edge cases handled?
30
- - Are new/changed behaviours covered by tests?
31
- - Are there unsafe casts, `any` types, or unchecked assumptions?
32
- - Does the change introduce injection vulnerabilities, credential leaks, or other security issues?
33
-
34
- 4. **Maintain balance**: Avoid over-simplification that could:
35
- - Reduce code clarity or maintainability
36
- - Create overly clever solutions that are hard to understand
37
- - Combine too many concerns into single functions or components
38
- - Remove helpful abstractions that improve code organization
39
- - Make the code harder to debug or extend
40
-
41
- 5. **Apply project standards**: Follow the coding standards defined in @.shipyard/CODING_STANDARDS.md
42
-
43
- 6. **Preserve functionality**: Never change what the code does - only how it does it. All original features, outputs, and behaviors must remain intact.
44
-
45
- # EXECUTION
46
-
47
- If you find improvements to make:
48
-
49
- 1. Make the changes directly on this branch
50
- 2. Run tests and type checking to ensure nothing is broken
51
- 3. Commit describing the refinements
52
-
53
- If the code is already clean and well-structured, do nothing.
54
-
55
- Once complete, output <promise>COMPLETE</promise>.
15
+ ```json
16
+ {{SCOPE}}
17
+ ```