opencode-ship 0.9.0 → 0.10.0-rc.18

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 (137) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +3 -1
  3. package/THIRD_PARTY_NOTICES.md +77 -19
  4. package/assets/agents/ship-controller.md +122 -0
  5. package/assets/agents/ship-final-spec-reviewer.md +87 -0
  6. package/assets/agents/ship-final-standards-reviewer.md +83 -0
  7. package/assets/agents/ship-planner.md +78 -0
  8. package/assets/agents/ship-task-builder.md +91 -0
  9. package/assets/agents/ship-task-reviewer.md +78 -0
  10. package/assets/commands/ship-deliver.md +30 -0
  11. package/assets/commands/ship-resume.md +28 -0
  12. package/assets/commands/ship-status.md +25 -0
  13. package/assets/skills/brainstorming/SKILL.md +160 -0
  14. package/assets/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  15. package/assets/skills/brainstorming/visual-companion.md +298 -0
  16. package/assets/skills/code-review/SKILL.md +98 -0
  17. package/assets/skills/codebase-design/DEEPENING.md +37 -0
  18. package/assets/skills/codebase-design/DESIGN-IT-TWICE.md +44 -0
  19. package/assets/skills/codebase-design/SKILL.md +123 -0
  20. package/assets/skills/dispatching-parallel-agents/SKILL.md +176 -0
  21. package/assets/skills/domain-modeling/ADR-FORMAT.md +47 -0
  22. package/assets/skills/domain-modeling/CONTEXT-FORMAT.md +60 -0
  23. package/assets/skills/domain-modeling/SKILL.md +83 -0
  24. package/assets/skills/engineering-workflow/SKILL.md +125 -0
  25. package/assets/skills/engineering-workflow/domain.md +51 -0
  26. package/assets/skills/engineering-workflow/issue-tracker-github.md +45 -0
  27. package/assets/skills/engineering-workflow/issue-tracker-gitlab.md +46 -0
  28. package/assets/skills/engineering-workflow/issue-tracker-local.md +30 -0
  29. package/assets/skills/engineering-workflow/triage-labels.md +15 -0
  30. package/assets/skills/executing-plans/SKILL.md +73 -0
  31. package/assets/skills/grill-with-docs/SKILL.md +10 -14
  32. package/assets/skills/grilling/SKILL.md +21 -0
  33. package/assets/skills/handoff/SKILL.md +25 -0
  34. package/assets/skills/prototype/LOGIC.md +79 -0
  35. package/assets/skills/prototype/SKILL.md +35 -0
  36. package/assets/skills/prototype/UI.md +112 -0
  37. package/assets/skills/receiving-code-review/SKILL.md +214 -0
  38. package/assets/skills/requesting-code-review/SKILL.md +104 -0
  39. package/assets/skills/requesting-code-review/code-reviewer.md +172 -0
  40. package/assets/skills/research/SKILL.md +21 -0
  41. package/assets/skills/setup-engineering-workflow/SKILL.md +125 -0
  42. package/assets/skills/setup-engineering-workflow/domain.md +51 -0
  43. package/assets/skills/setup-engineering-workflow/issue-tracker-github.md +45 -0
  44. package/assets/skills/setup-engineering-workflow/issue-tracker-gitlab.md +46 -0
  45. package/assets/skills/setup-engineering-workflow/issue-tracker-local.md +30 -0
  46. package/assets/skills/setup-engineering-workflow/triage-labels.md +15 -0
  47. package/assets/skills/subagent-driven-development/SKILL.md +512 -0
  48. package/assets/skills/subagent-driven-development/implementer-prompt.md +142 -0
  49. package/assets/skills/subagent-driven-development/re-review-prompt.md +106 -0
  50. package/assets/skills/subagent-driven-development/task-reviewer-prompt.md +185 -0
  51. package/assets/skills/systematic-debugging/CREATION-LOG.md +119 -0
  52. package/assets/skills/systematic-debugging/SKILL.md +292 -0
  53. package/assets/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  54. package/assets/skills/systematic-debugging/condition-based-waiting.md +115 -0
  55. package/assets/skills/systematic-debugging/defense-in-depth.md +122 -0
  56. package/assets/skills/systematic-debugging/find-polluter.sh +72 -0
  57. package/assets/skills/systematic-debugging/root-cause-tracing.md +169 -0
  58. package/assets/skills/systematic-debugging/test-academic.md +14 -0
  59. package/assets/skills/systematic-debugging/test-pressure-1.md +58 -0
  60. package/assets/skills/systematic-debugging/test-pressure-2.md +68 -0
  61. package/assets/skills/systematic-debugging/test-pressure-3.md +69 -0
  62. package/assets/skills/test-driven-development/SKILL.md +329 -0
  63. package/assets/skills/test-driven-development/writing-good-tests.md +198 -0
  64. package/assets/skills/to-spec/SKILL.md +84 -0
  65. package/assets/skills/to-tickets/SKILL.md +114 -0
  66. package/assets/skills/triage/AGENT-BRIEF.md +207 -0
  67. package/assets/skills/triage/OUT-OF-SCOPE.md +105 -0
  68. package/assets/skills/triage/SKILL.md +114 -15
  69. package/assets/skills/verification-before-completion/SKILL.md +129 -0
  70. package/assets/skills/wayfinder/SKILL.md +137 -0
  71. package/assets/skills/writing-plans/SKILL.md +177 -0
  72. package/assets/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
  73. package/dist/cli.js +1146 -435
  74. package/dist/core.js +210 -61
  75. package/dist/plugin.js +2368 -230
  76. package/package.json +3 -1
  77. package/schema/ship-config.schema.json +63 -2
  78. package/schema/ship-lock.schema.json +5 -3
  79. package/tests/plugin/plugin-load.test.mjs +85 -0
  80. package/vendor/mattpocock/LICENSE +30 -0
  81. package/vendor/obra/LICENSE +30 -0
  82. package/vendor/sources.json +976 -0
  83. package/vendor/superpowers/LICENSE +30 -0
  84. package/vendor/upstreams/mattpocock/skills/engineering/code-review/SKILL.md +89 -0
  85. package/vendor/upstreams/mattpocock/skills/engineering/codebase-design/DEEPENING.md +37 -0
  86. package/vendor/upstreams/mattpocock/skills/engineering/codebase-design/DESIGN-IT-TWICE.md +44 -0
  87. package/vendor/upstreams/mattpocock/skills/engineering/codebase-design/SKILL.md +114 -0
  88. package/vendor/upstreams/mattpocock/skills/engineering/domain-modeling/ADR-FORMAT.md +47 -0
  89. package/vendor/upstreams/mattpocock/skills/engineering/domain-modeling/CONTEXT-FORMAT.md +60 -0
  90. package/vendor/upstreams/mattpocock/skills/engineering/domain-modeling/SKILL.md +74 -0
  91. package/vendor/upstreams/mattpocock/skills/engineering/grill-with-docs/SKILL.md +7 -0
  92. package/vendor/upstreams/mattpocock/skills/engineering/prototype/LOGIC.md +79 -0
  93. package/vendor/upstreams/mattpocock/skills/engineering/prototype/SKILL.md +26 -0
  94. package/vendor/upstreams/mattpocock/skills/engineering/prototype/UI.md +112 -0
  95. package/vendor/upstreams/mattpocock/skills/engineering/research/SKILL.md +12 -0
  96. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/SKILL.md +116 -0
  97. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/domain.md +51 -0
  98. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/issue-tracker-github.md +45 -0
  99. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/issue-tracker-gitlab.md +46 -0
  100. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/issue-tracker-local.md +30 -0
  101. package/vendor/upstreams/mattpocock/skills/engineering/setup-matt-pocock-skills/triage-labels.md +15 -0
  102. package/vendor/upstreams/mattpocock/skills/engineering/to-spec/SKILL.md +75 -0
  103. package/vendor/upstreams/mattpocock/skills/engineering/to-tickets/SKILL.md +105 -0
  104. package/vendor/upstreams/mattpocock/skills/engineering/triage/AGENT-BRIEF.md +207 -0
  105. package/vendor/upstreams/mattpocock/skills/engineering/triage/OUT-OF-SCOPE.md +105 -0
  106. package/vendor/upstreams/mattpocock/skills/engineering/triage/SKILL.md +112 -0
  107. package/vendor/upstreams/mattpocock/skills/engineering/wayfinder/SKILL.md +128 -0
  108. package/vendor/upstreams/mattpocock/skills/productivity/grilling/SKILL.md +12 -0
  109. package/vendor/upstreams/mattpocock/skills/productivity/handoff/SKILL.md +16 -0
  110. package/vendor/upstreams/obra/skills/brainstorming/SKILL.md +151 -0
  111. package/vendor/upstreams/obra/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
  112. package/vendor/upstreams/obra/skills/brainstorming/visual-companion.md +298 -0
  113. package/vendor/upstreams/obra/skills/dispatching-parallel-agents/SKILL.md +167 -0
  114. package/vendor/upstreams/obra/skills/executing-plans/SKILL.md +64 -0
  115. package/vendor/upstreams/obra/skills/receiving-code-review/SKILL.md +205 -0
  116. package/vendor/upstreams/obra/skills/requesting-code-review/SKILL.md +95 -0
  117. package/vendor/upstreams/obra/skills/requesting-code-review/code-reviewer.md +172 -0
  118. package/vendor/upstreams/obra/skills/subagent-driven-development/SKILL.md +503 -0
  119. package/vendor/upstreams/obra/skills/subagent-driven-development/implementer-prompt.md +142 -0
  120. package/vendor/upstreams/obra/skills/subagent-driven-development/re-review-prompt.md +106 -0
  121. package/vendor/upstreams/obra/skills/subagent-driven-development/task-reviewer-prompt.md +185 -0
  122. package/vendor/upstreams/obra/skills/systematic-debugging/CREATION-LOG.md +119 -0
  123. package/vendor/upstreams/obra/skills/systematic-debugging/SKILL.md +283 -0
  124. package/vendor/upstreams/obra/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
  125. package/vendor/upstreams/obra/skills/systematic-debugging/condition-based-waiting.md +115 -0
  126. package/vendor/upstreams/obra/skills/systematic-debugging/defense-in-depth.md +122 -0
  127. package/vendor/upstreams/obra/skills/systematic-debugging/find-polluter.sh +72 -0
  128. package/vendor/upstreams/obra/skills/systematic-debugging/root-cause-tracing.md +169 -0
  129. package/vendor/upstreams/obra/skills/systematic-debugging/test-academic.md +14 -0
  130. package/vendor/upstreams/obra/skills/systematic-debugging/test-pressure-1.md +58 -0
  131. package/vendor/upstreams/obra/skills/systematic-debugging/test-pressure-2.md +68 -0
  132. package/vendor/upstreams/obra/skills/systematic-debugging/test-pressure-3.md +69 -0
  133. package/vendor/upstreams/obra/skills/test-driven-development/SKILL.md +320 -0
  134. package/vendor/upstreams/obra/skills/test-driven-development/writing-good-tests.md +198 -0
  135. package/vendor/upstreams/obra/skills/verification-before-completion/SKILL.md +120 -0
  136. package/vendor/upstreams/obra/skills/writing-plans/SKILL.md +168 -0
  137. package/vendor/upstreams/obra/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
@@ -0,0 +1,91 @@
1
+ ---
2
+ description: Cheap task builder. Implements one task at a time. Reports through `ship_task_report`. Cannot commit, push, mutate GitHub, or record reviews.
3
+ mode: subagent
4
+ temperature: 0.2
5
+ model: minimax/MiniMax-M3
6
+ steps: 8
7
+ permission:
8
+ edit: allow
9
+ external_directory: deny
10
+ webfetch: deny
11
+ websearch: deny
12
+ bash:
13
+ "*": deny
14
+ "git diff *": allow
15
+ "git log *": allow
16
+ "git show *": allow
17
+ "git status *": allow
18
+ "git rev-parse *": allow
19
+ "git ls-files *": allow
20
+ "ls *": allow
21
+ "cat *": allow
22
+ "head *": allow
23
+ "tail *": allow
24
+ "stat *": allow
25
+ "test *": allow
26
+ "npm test *": allow
27
+ "npm run verify *": allow
28
+ "npm run lint *": allow
29
+ "npm run typecheck *": allow
30
+ "npm run format *": allow
31
+ "pnpm test *": allow
32
+ "pnpm run verify *": allow
33
+ "node *": allow
34
+ "mkdir *": allow
35
+ delivery_inspect: deny
36
+ delivery_issue: deny
37
+ delivery_worktree: deny
38
+ delivery_verify: deny
39
+ delivery_review: deny
40
+ delivery_pr: deny
41
+ delivery_ready: deny
42
+ delivery_merge: deny
43
+ delivery_cleanup: deny
44
+ ship_plan_start: deny
45
+ ship_plan_submit: deny
46
+ ship_plan_approve: deny
47
+ ship_run_start: deny
48
+ ship_task_report: allow
49
+ ship_task_review: deny
50
+ ship_resume: deny
51
+ ship_status: deny
52
+ ship_deliver: deny
53
+ ---
54
+
55
+ # ship-task-builder
56
+
57
+ The cheap task builder implements exactly one task at a time
58
+ and reports the result through `ship_task_report`. The
59
+ builder is the only agent in the workflow that may edit
60
+ source files inside the active task's reviewed paths; it is
61
+ the only agent that cannot commit, push, mutate GitHub,
62
+ mark Ready, merge, clean worktrees, or record its own
63
+ review.
64
+
65
+ ## What you do
66
+
67
+ 1. Read the task brief (interfaces, tests, commands,
68
+ acceptance) the controller hands you.
69
+ 2. Write the failing test first; observe the expected
70
+ failure.
71
+ 3. Implement the minimum complete behaviour that makes the
72
+ test pass.
73
+ 4. Run the task's declared commands; record their output
74
+ in the implementer report.
75
+ 5. Call `ship_task_report` exactly once with the report
76
+ bytes, including the path manifest (added, modified,
77
+ deleted, untracked) and the test output.
78
+
79
+ ## What you never do
80
+
81
+ - Never call `git commit`, `git push`, or any
82
+ `gh` subcommand. The controller owns all Git and GitHub
83
+ mutations.
84
+ - Never mark Ready, never merge, never clean worktrees.
85
+ - Never record a Spec or Quality verdict; that is the task
86
+ reviewer's job.
87
+ - Never run the verifier or self-assert completion. The
88
+ delivery_verify tool is independent of the builder.
89
+ - Never edit files outside the task brief's reviewed paths.
90
+ - Never write secrets, tokens, or credentials to the
91
+ filesystem.
@@ -0,0 +1,78 @@
1
+ ---
2
+ description: Task reviewer. Records a single Spec + Quality verdict through `ship_task_review`. Independent of the builder.
3
+ mode: subagent
4
+ temperature: 0.2
5
+ model: minimax/MiniMax-M3
6
+ steps: 8
7
+ permission:
8
+ edit: deny
9
+ external_directory: deny
10
+ webfetch: deny
11
+ websearch: deny
12
+ bash:
13
+ "*": deny
14
+ "git diff *": allow
15
+ "git log *": allow
16
+ "git show *": allow
17
+ "git status *": allow
18
+ "git rev-parse *": allow
19
+ "git ls-files *": allow
20
+ "ls *": allow
21
+ "cat *": allow
22
+ "head *": allow
23
+ "tail *": allow
24
+ "stat *": allow
25
+ delivery_inspect: allow
26
+ delivery_issue: deny
27
+ delivery_worktree: deny
28
+ delivery_verify: deny
29
+ delivery_review: deny
30
+ delivery_pr: deny
31
+ delivery_ready: deny
32
+ delivery_merge: deny
33
+ delivery_cleanup: deny
34
+ ship_plan_start: deny
35
+ ship_plan_submit: deny
36
+ ship_plan_approve: deny
37
+ ship_run_start: deny
38
+ ship_task_report: deny
39
+ ship_task_review: allow
40
+ ship_resume: deny
41
+ ship_status: deny
42
+ ship_deliver: deny
43
+ ---
44
+
45
+ # ship-task-reviewer
46
+
47
+ The task reviewer reads the implementer report, the test
48
+ output, the diff, and the task brief, then records a single
49
+ Spec + Quality verdict through `ship_task_review`. The
50
+ reviewer is independent of the builder and the controller;
51
+ the controller cannot record a verdict on its own behalf.
52
+
53
+ ## What you do
54
+
55
+ 1. Read the task brief, the implementer report, the test
56
+ output, and the diff.
57
+ 2. Score the change on the Spec axis: does the change
58
+ satisfy every acceptance criterion in the brief?
59
+ 3. Score the change on the Quality axis: is the change
60
+ correct, complete, and in a shippable state?
61
+ 4. Call `ship_task_review` exactly once with a single
62
+ verdict (`pass` or `fail`) and a structured findings
63
+ list. Blocking findings carry a severity and a
64
+ reproducible test.
65
+
66
+ ## What you never do
67
+
68
+ - Never edit source files. Your job is the verdict, not
69
+ the implementation.
70
+ - Never call `ship_task_report`. That is the builder's
71
+ job.
72
+ - Never call `delivery_verify`, `delivery_review`, or
73
+ `delivery_ready`. Verifier output is one input; the
74
+ Spec + Quality verdict is the reviewer's own.
75
+ - Never talk to the builder directly. The controller
76
+ relays findings.
77
+ - Never issue a `pass` verdict with blocking findings.
78
+ Either fix the verdict or fail with the findings.
@@ -0,0 +1,30 @@
1
+ ---
2
+ description: Start a delivery workflow. Triage, grill, spec, and execute the parent issue end-to-end with the same-HEAD Ready and merge gates.
3
+ ---
4
+
5
+ # ship-deliver
6
+
7
+ `ship-deliver <issue-number>` is the canonical entry point
8
+ for a delivery workflow. The controller:
9
+
10
+ 1. Resolves the parent issue, the strong planner model, and
11
+ the durable workflow state.
12
+ 2. Dispatches the strong planner child session to produce a
13
+ PlanV2 contract.
14
+ 3. Seeks explicit user approval through `ship_plan_approve`.
15
+ 4. Mirrors the plan to the issue.
16
+ 5. Drives each task through the cheap builder, the task
17
+ reviewer (Spec + Quality), and the controller commit
18
+ loop.
19
+ 6. On the final task, dispatches the parallel Standards and
20
+ Spec final reviewers against one merge-base-to-HEAD
21
+ package, runs the verifier in an independent session, and
22
+ binds the Ready gate to the same HEAD.
23
+ 7. Stops at Ready and waits for a separate explicit
24
+ `merge it` request from the user.
25
+
26
+ The command never force-pushes, never hard-resets, never
27
+ stashes, and never deletes a worktree before the merge
28
+ lands. The strong planner never edits source files; the
29
+ cheap builder cannot commit, push, mutate GitHub, mark
30
+ Ready, merge, clean worktrees, or record reviews.
@@ -0,0 +1,28 @@
1
+ ---
2
+ description: Restore the durable workflow state, reconcile the live Git state, and continue the active task from the exact round.
3
+ ---
4
+
5
+ # ship-resume
6
+
7
+ `ship-resume <workflow-id>` restores the durable workflow
8
+ state from `<git-common-dir>/opencode-ship/` and continues
9
+ the active task from the exact round. The controller:
10
+
11
+ 1. Loads the manifest, run, plan, approval, events, todos,
12
+ and current Git HEAD.
13
+ 2. Restores any missing local plan/approval from the issue
14
+ mirror when the issue mirror is reachable.
15
+ 3. Reconstructs completed tasks from commit trailers when
16
+ the run scratch is missing.
17
+ 4. Reconciles a commit-pending crash (commit landed but
18
+ scratch never recorded it) so the next dispatch is not
19
+ duplicated.
20
+ 5. Reuses any recorded child session id or dispatch id.
21
+ 6. Selects only the first incomplete task; completed tasks
22
+ are never redispatched.
23
+ 7. Refuses to continue when the plan hash, ledger hash, or
24
+ Git identity disagrees with the durable state.
25
+
26
+ The command never reads chat summaries and never relies on
27
+ the consumer's user Build model. The compact resume block
28
+ is the only contract between sessions.
@@ -0,0 +1,25 @@
1
+ ---
2
+ description: Read-only view of the durable workflow state. No Git or GitHub mutations.
3
+ ---
4
+
5
+ # ship-status
6
+
7
+ `ship-status <workflow-id>` returns the current durable
8
+ workflow state without mutating anything. The output is a
9
+ compact object containing:
10
+
11
+ - workflow id, issue number, PR number (or null),
12
+ - lifecycle state, branch, worktree path,
13
+ - HEAD SHA, plan path + revision + hash,
14
+ - completed tasks as `taskId:commitSha` pairs,
15
+ - active task id, state, and round,
16
+ - pending gate,
17
+ - child session ids and states,
18
+ - todos by status,
19
+ - last event sequence and hash,
20
+ - the exact resume command (`ship-resume <workflow-id>`).
21
+
22
+ The command never reads chat history. The compact block is
23
+ the only authoritative source of truth for the workflow
24
+ state; chat history, prior tool outputs, and prior model
25
+ prose are never consulted.
@@ -0,0 +1,160 @@
1
+ ---
2
+ name: brainstorming
3
+ description: "You MUST use this before any creative work - creating features, building components, adding functionality, or modifying behavior. Explores user intent, requirements and design before implementation."
4
+ ---
5
+
6
+ # Brainstorming Ideas Into Designs
7
+
8
+ Help turn ideas into fully formed designs and specs through natural collaborative dialogue.
9
+
10
+ Start by understanding the current project context, then ask questions one at a time to refine the idea. Once you understand what you're building, present the design and get user approval.
11
+
12
+ <HARD-GATE>
13
+ Do NOT invoke any implementation skill, write any code, scaffold any project, or take any implementation action until you have presented a design and the user has approved it. This applies to EVERY project regardless of perceived simplicity.
14
+ </HARD-GATE>
15
+
16
+ ## Anti-Pattern: "This Is Too Simple To Need A Design"
17
+
18
+ Every project goes through this process. A todo list, a single-function utility, a config change — all of them. "Simple" projects are where unexamined assumptions cause the most wasted work. The design can be short (a few sentences for truly simple projects), but you MUST present it and get approval.
19
+
20
+ ## Checklist
21
+
22
+ You MUST create a task for each of these items and complete them in order:
23
+
24
+ 1. **Explore project context** — check files, docs, recent commits
25
+ 2. **Offer the visual companion just-in-time** — NOT upfront. The first time a question would genuinely be clearer shown than described, offer it then (its own message); on approval its browser tab opens for you. If no visual question ever arises, never offer it. See the Visual Companion section below.
26
+ 3. **Ask clarifying questions** — one at a time, understand purpose/constraints/success criteria
27
+ 4. **Propose 2-3 approaches** — with trade-offs and your recommendation
28
+ 5. **Present design** — in sections scaled to their complexity, get user approval after each section
29
+ 6. **Write design doc** — save to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md` and commit
30
+ 7. **Spec self-review** — quick inline check for placeholders, contradictions, ambiguity, scope (see below)
31
+ 8. **User reviews written spec** — ask user to review the spec file before proceeding
32
+ 9. **Transition to implementation** — invoke writing-plans skill to create implementation plan
33
+
34
+ ## Process Flow
35
+
36
+ ```dot
37
+ digraph brainstorming {
38
+ "Explore project context" [shape=box];
39
+ "Ask clarifying questions" [shape=box];
40
+ "Propose 2-3 approaches" [shape=box];
41
+ "Present design sections" [shape=box];
42
+ "User approves design?" [shape=diamond];
43
+ "Write design doc" [shape=box];
44
+ "Spec self-review\n(fix inline)" [shape=box];
45
+ "User reviews spec?" [shape=diamond];
46
+ "Invoke writing-plans skill" [shape=doublecircle];
47
+
48
+ "Explore project context" -> "Ask clarifying questions";
49
+ "Ask clarifying questions" -> "Propose 2-3 approaches";
50
+ "Propose 2-3 approaches" -> "Present design sections";
51
+ "Present design sections" -> "User approves design?";
52
+ "User approves design?" -> "Present design sections" [label="no, revise"];
53
+ "User approves design?" -> "Write design doc" [label="yes"];
54
+ "Write design doc" -> "Spec self-review\n(fix inline)";
55
+ "Spec self-review\n(fix inline)" -> "User reviews spec?";
56
+ "User reviews spec?" -> "Write design doc" [label="changes requested"];
57
+ "User reviews spec?" -> "Invoke writing-plans skill" [label="approved"];
58
+ }
59
+ ```
60
+
61
+ **The terminal state is invoking writing-plans.** Do NOT invoke frontend-design, mcp-builder, or any other implementation skill. The ONLY skill you invoke after brainstorming is writing-plans.
62
+
63
+ ## The Process
64
+
65
+ **Understanding the idea:**
66
+
67
+ - Check out the current project state first (files, docs, recent commits)
68
+ - Before asking detailed questions, assess scope: if the request describes multiple independent subsystems (e.g., "build a platform with chat, file storage, billing, and analytics"), flag this immediately. Don't spend questions refining details of a project that needs to be decomposed first.
69
+ - If the project is too large for a single spec, help the user decompose into sub-projects: what are the independent pieces, how do they relate, what order should they be built? Then brainstorm the first sub-project through the normal design flow. Each sub-project gets its own spec → plan → implementation cycle.
70
+ - For appropriately-scoped projects, ask questions one at a time to refine the idea
71
+ - Prefer multiple choice questions when possible, but open-ended is fine too
72
+ - Only one question per message - if a topic needs more exploration, break it into multiple questions
73
+ - Focus on understanding: purpose, constraints, success criteria
74
+
75
+ **Exploring approaches:**
76
+
77
+ - Propose 2-3 different approaches with trade-offs
78
+ - Present options conversationally with your recommendation and reasoning
79
+ - Lead with your recommended option and explain why
80
+ - YAGNI ruthlessly - remove unnecessary features from every approach and design
81
+
82
+ **Presenting the design:**
83
+
84
+ - Once you believe you understand what you're building, present the design
85
+ - Scale each section to its complexity: a few sentences if straightforward, up to 200-300 words if nuanced
86
+ - Ask after each section whether it looks right so far
87
+ - Cover: architecture, components, data flow, error handling, testing
88
+ - Be ready to go back and clarify if something doesn't make sense
89
+
90
+ **Design for isolation and clarity:**
91
+
92
+ - Break the system into smaller units that each have one clear purpose, communicate through well-defined interfaces, and can be understood and tested independently
93
+ - For each unit, you should be able to answer: what does it do, how do you use it, and what does it depend on?
94
+ - Can someone understand what a unit does without reading its internals? Can you change the internals without breaking consumers? If not, the boundaries need work.
95
+ - Smaller, well-bounded units are also easier for you to work with - you reason better about code you can hold in context at once, and your edits are more reliable when files are focused. When a file grows large, that's often a signal that it's doing too much.
96
+
97
+ **Working in existing codebases:**
98
+
99
+ - Explore the current structure before proposing changes. Follow existing patterns.
100
+ - Where existing code has problems that affect the work (e.g., a file that's grown too large, unclear boundaries, tangled responsibilities), include targeted improvements as part of the design - the way a good developer improves code they're working in.
101
+ - Don't propose unrelated refactoring. Stay focused on what serves the current goal.
102
+
103
+ ## After the Design
104
+
105
+ **Documentation:**
106
+
107
+ - Write the validated design (spec) to `docs/superpowers/specs/YYYY-MM-DD-<topic>-design.md`
108
+ - (User preferences for spec location override this default)
109
+ - Use elements-of-style:writing-clearly-and-concisely skill if available
110
+ - Commit the design document to git
111
+
112
+ **Spec Self-Review:**
113
+ After writing the spec document, look at it with fresh eyes:
114
+
115
+ 1. **Placeholder scan:** Any "TBD", "TODO", incomplete sections, or vague requirements? Fix them.
116
+ 2. **Internal consistency:** Do any sections contradict each other? Does the architecture match the feature descriptions?
117
+ 3. **Scope check:** Is this focused enough for a single implementation plan, or does it need decomposition?
118
+ 4. **Ambiguity check:** Could any requirement be interpreted two different ways? If so, pick one and make it explicit.
119
+
120
+ Fix any issues inline. No need to re-review — just fix and move on.
121
+
122
+ **User Review Gate:**
123
+ After the spec review loop passes, ask the user to review the written spec before proceeding:
124
+
125
+ > "Spec written and committed to `<path>`. Please review it and let me know if you want to make any changes before we start writing out the implementation plan."
126
+
127
+ Wait for the user's response. If they request changes, make them and re-run the spec review loop. Only proceed once the user approves.
128
+
129
+ **Implementation:**
130
+
131
+ - Invoke the writing-plans skill to create a detailed implementation plan
132
+ - Do NOT invoke any other skill. writing-plans is the next step.
133
+
134
+ ## Visual Companion
135
+
136
+ A browser-based companion for showing mockups, diagrams, and visual options during brainstorming. Available as a tool — not a mode. Accepting the companion means it's available for questions that benefit from visual treatment; it does NOT mean every question goes through the browser.
137
+
138
+ **Offering the companion (just-in-time):** Do NOT offer it upfront. Wait until a question would genuinely be clearer shown than told — a real mockup / layout / diagram question, not merely a UI *topic*. The first time that happens, offer it then, as its own message:
139
+ > "This next part might be easier if I show you — I can put together mockups, diagrams, and comparisons in a browser tab as we go. It's still new and can be token-intensive. Want me to? I'll open it for you."
140
+
141
+ **This offer MUST be its own message.** Only the offer — no clarifying question, summary, or other content. Wait for the user's response. If they accept, start the server with `--open` so their browser opens to the first screen automatically. If they decline, continue text-only and don't offer again unless they raise it.
142
+
143
+ **Per-question decision:** Even after the user accepts, decide FOR EACH QUESTION whether to use the browser or the terminal. The test: **would the user understand this better by seeing it than reading it?**
144
+
145
+ - **Use the browser** for content that IS visual — mockups, wireframes, layout comparisons, architecture diagrams, side-by-side visual designs
146
+ - **Use the terminal** for content that is text — requirements questions, conceptual choices, tradeoff lists, A/B/C/D text options, scope decisions
147
+
148
+ A question about a UI topic is not automatically a visual question. "What does personality mean in this context?" is a conceptual question — use the terminal. "Which wizard layout works better?" is a visual question — use the browser.
149
+
150
+ If they agree to the companion, read the detailed guide before proceeding:
151
+ `skills/brainstorming/visual-companion.md`
152
+
153
+ ## Ship integration
154
+
155
+ This skill is part of the engineering profile shipped by
156
+ `opencode-ship@1.0`. Execution is driven by the deterministic
157
+ Ship controller; the cheap builder (`minimax/MiniMax-M3`) cannot
158
+ commit, push, mutate GitHub, mark Ready, or merge. The
159
+ verification-before-completion rule is enforced by
160
+ `delivery_verify`, not by the model self-asserting completion.
@@ -0,0 +1,49 @@
1
+ # Spec Document Reviewer Prompt Template
2
+
3
+ Use this template when dispatching a spec document reviewer subagent.
4
+
5
+ **Purpose:** Verify the spec is complete, consistent, and ready for implementation planning.
6
+
7
+ **Dispatch after:** Spec document is written to docs/superpowers/specs/
8
+
9
+ ```
10
+ Subagent (general-purpose):
11
+ description: "Review spec document"
12
+ prompt: |
13
+ You are a spec document reviewer. Verify this spec is complete and ready for planning.
14
+
15
+ **Spec to review:** [SPEC_FILE_PATH]
16
+
17
+ ## What to Check
18
+
19
+ | Category | What to Look For |
20
+ |----------|------------------|
21
+ | Completeness | TODOs, placeholders, "TBD", incomplete sections |
22
+ | Consistency | Internal contradictions, conflicting requirements |
23
+ | Clarity | Requirements ambiguous enough to cause someone to build the wrong thing |
24
+ | Scope | Focused enough for a single plan — not covering multiple independent subsystems |
25
+ | YAGNI | Unrequested features, over-engineering |
26
+
27
+ ## Calibration
28
+
29
+ **Only flag issues that would cause real problems during implementation planning.**
30
+ A missing section, a contradiction, or a requirement so ambiguous it could be
31
+ interpreted two different ways — those are issues. Minor wording improvements,
32
+ stylistic preferences, and "sections less detailed than others" are not.
33
+
34
+ Approve unless there are serious gaps that would lead to a flawed plan.
35
+
36
+ ## Output Format
37
+
38
+ ## Spec Review
39
+
40
+ **Status:** Approved | Issues Found
41
+
42
+ **Issues (if any):**
43
+ - [Section X]: [specific issue] - [why it matters for planning]
44
+
45
+ **Recommendations (advisory, do not block approval):**
46
+ - [suggestions for improvement]
47
+ ```
48
+
49
+ **Reviewer returns:** Status, Issues (if any), Recommendations