opencode-ship 0.9.0 → 0.10.0-rc.17

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,30 @@
1
+ # Issue tracker: Local Markdown
2
+
3
+ Issues and specs (you may know a spec as a PRD) for this repo live as markdown files in `.scratch/`.
4
+
5
+ ## Conventions
6
+
7
+ - One feature per directory: `.scratch/<feature-slug>/`
8
+ - The spec is `.scratch/<feature-slug>/spec.md`
9
+ - Implementation issues are one file per ticket at `.scratch/<feature-slug>/issues/<NN>-<slug>.md`, numbered from `01` — never a single combined tickets file
10
+ - Triage state is recorded as a `Status:` line near the top of each issue file (see `triage-labels.md` for the role strings)
11
+ - Comments and conversation history append to the bottom of the file under a `## Comments` heading
12
+
13
+ ## When a skill says "publish to the issue tracker"
14
+
15
+ Create a new file under `.scratch/<feature-slug>/` (creating the directory if needed).
16
+
17
+ ## When a skill says "fetch the relevant ticket"
18
+
19
+ Read the file at the referenced path. The user will normally pass the path or the issue number directly.
20
+
21
+ ## Wayfinding operations
22
+
23
+ Used by `/wayfinder`. The **map** is a file with one **child** file per ticket.
24
+
25
+ - **Map**: `.scratch/<effort>/map.md` — the Notes / Decisions-so-far / Fog body.
26
+ - **Child ticket**: `.scratch/<effort>/issues/NN-<slug>.md`, numbered from `01`, with the question in the body. A `Type:` line records the ticket type (`research`/`prototype`/`grilling`/`task`); a `Status:` line records `claimed`/`resolved`.
27
+ - **Blocking**: a `Blocked by: NN, NN` line near the top. A ticket is unblocked when every file it lists is `resolved`.
28
+ - **Frontier**: scan `.scratch/<effort>/issues/` for files that are open, unblocked, and unclaimed; first by number wins.
29
+ - **Claim**: set `Status: claimed` and save before any work.
30
+ - **Resolve**: append the answer under an `## Answer` heading, set `Status: resolved`, then append a context pointer (gist + link) to the map's Decisions-so-far in `map.md`.
@@ -0,0 +1,15 @@
1
+ # Triage Labels
2
+
3
+ The skills speak in terms of five canonical triage roles. This file maps those roles to the actual label strings used in this repo's issue tracker.
4
+
5
+ | Label in mattpocock/skills | Label in our tracker | Meaning |
6
+ | -------------------------- | -------------------- | ---------------------------------------- |
7
+ | `needs-triage` | `needs-triage` | Maintainer needs to evaluate this issue |
8
+ | `needs-info` | `needs-info` | Waiting on reporter for more information |
9
+ | `ready-for-agent` | `ready-for-agent` | Fully specified, ready for an AFK agent |
10
+ | `ready-for-human` | `ready-for-human` | Requires human implementation |
11
+ | `wontfix` | `wontfix` | Will not be actioned |
12
+
13
+ When a skill mentions a role (e.g. "apply the AFK-ready triage label"), use the corresponding label string from this table.
14
+
15
+ Edit the right-hand column to match whatever vocabulary you actually use.
@@ -0,0 +1,73 @@
1
+ ---
2
+ name: executing-plans
3
+ description: Use when you have a written implementation plan to execute in a separate session with review checkpoints
4
+ ---
5
+
6
+ # Executing Plans
7
+
8
+ ## Overview
9
+
10
+ Load plan, review critically, execute all tasks, report when complete.
11
+
12
+ **Announce at start:** "I'm using the executing-plans skill to implement this plan."
13
+
14
+ **Note:** Tell your human partner that Superpowers works much better with access to subagents (Claude Code, Codex CLI, Codex App, Copilot CLI, and Gemini CLI all qualify; see the per-platform tool refs in `../using-superpowers/references/`). If subagents are available, use superpowers:subagent-driven-development instead of this skill.
15
+
16
+ ## The Process
17
+
18
+ ### Step 1: Load and Review Plan
19
+ 1. Ensure an isolated workspace: use superpowers:using-git-worktrees to create one or verify the existing one
20
+ 2. Read plan file
21
+ 3. Review critically - identify any questions or concerns about the plan
22
+ 4. If concerns: Raise them with your human partner before starting
23
+ 5. If no concerns: Create todos for the plan items and proceed
24
+
25
+ ### Step 2: Execute Tasks
26
+
27
+ For each task:
28
+ 1. Mark as in_progress
29
+ 2. Follow each step exactly (plan has bite-sized steps)
30
+ 3. Run verifications as specified
31
+ 4. Mark as completed
32
+
33
+ ### Step 3: Complete Development
34
+
35
+ After all tasks complete and verified:
36
+ - Announce: "I'm using the finishing-a-development-branch skill to complete this work."
37
+ - **REQUIRED SUB-SKILL:** Use superpowers:finishing-a-development-branch
38
+ - Follow that skill to verify tests, present options, execute choice
39
+
40
+ ## When to Stop and Ask for Help
41
+
42
+ **STOP executing immediately when:**
43
+ - Hit a blocker (missing dependency, test fails, instruction unclear)
44
+ - Plan has critical gaps preventing starting
45
+ - You don't understand an instruction
46
+ - Verification fails repeatedly
47
+
48
+ **Ask for clarification rather than guessing.**
49
+
50
+ ## When to Revisit Earlier Steps
51
+
52
+ **Return to Review (Step 1) when:**
53
+ - Partner updates the plan based on your feedback
54
+ - Fundamental approach needs rethinking
55
+
56
+ **Don't force through blockers** - stop and ask.
57
+
58
+ ## Remember
59
+ - Review plan critically first
60
+ - Follow plan steps exactly
61
+ - Don't skip verifications
62
+ - Reference skills when plan says to
63
+ - Stop when blocked, don't guess
64
+ - Never start implementation on main/master branch without explicit user consent
65
+
66
+ ## Ship integration
67
+
68
+ This skill is part of the engineering profile shipped by
69
+ `opencode-ship@1.0`. Execution is driven by the deterministic
70
+ Ship controller; the cheap builder (`minimax/MiniMax-M3`) cannot
71
+ commit, push, mutate GitHub, mark Ready, or merge. The
72
+ verification-before-completion rule is enforced by
73
+ `delivery_verify`, not by the model self-asserting completion.
@@ -1,20 +1,16 @@
1
1
  ---
2
2
  name: grill-with-docs
3
- description: Combine upstream grilling and domain-modeling to produce a durable paper trail before writing a spec.
4
- when_to_use: |
5
- Use after triage and before `to-spec`. Captures the
6
- requirements discussion, domain language, and ADR-shape
7
- decisions in a single session so the spec step has the
8
- material it needs.
3
+ description: A relentless interview to sharpen a plan or design, which also creates docs (ADR's and glossary) as we go.
4
+ disable-model-invocation: true
9
5
  ---
10
6
 
11
- # Grill with docs
7
+ Run a `/grilling` session, using the `/domain-modeling` skill.
12
8
 
13
- Thin wrapper that combines `grilling` and `domain-modeling` from
14
- the upstream Matt Pocock skills, with the consumer's domain
15
- and ADR paths configured by `setup-engineering-workflow`.
9
+ ## Ship integration
16
10
 
17
- This is a stub of the upstream
18
- `mattpocock/skills:grill-with-docs` behavior. Once vendored from
19
- `mattpocock/skills@<pinned-sha>`, the full SKILL.md replaces
20
- this file.
11
+ This skill is part of the engineering profile shipped by
12
+ `opencode-ship@1.0`. The strong planner child session is
13
+ configured with `openai/gpt-5.6-sol` and the durable workflow
14
+ state lives under `<git-common-dir>/opencode-ship/`. All
15
+ GitHub mutations go through Ship's typed tools; never use
16
+ `gh api` or raw shell.
@@ -0,0 +1,21 @@
1
+ ---
2
+ name: grilling
3
+ description: Grill the user relentlessly about a plan, decision, or idea. Use when the user wants to stress-test their thinking, or uses any 'grill' trigger phrases.
4
+ ---
5
+
6
+ Interview me relentlessly about every aspect of this until we reach a shared understanding. Walk down each branch of the decision tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
7
+
8
+ Ask the questions one at a time, waiting for feedback on each question before continuing. Asking multiple questions at once is bewildering.
9
+
10
+ If a *fact* can be found by exploring the environment (filesystem, tools, etc.), look it up rather than asking me. The *decisions*, though, are mine — put each one to me and wait for my answer.
11
+
12
+ Do not act on it until I confirm we have reached a shared understanding.
13
+
14
+ ## Ship integration
15
+
16
+ This skill is part of the engineering profile shipped by
17
+ `opencode-ship@1.0`. The strong planner child session is
18
+ configured with `openai/gpt-5.6-sol` and the durable workflow
19
+ state lives under `<git-common-dir>/opencode-ship/`. All
20
+ GitHub mutations go through Ship's typed tools; never use
21
+ `gh api` or raw shell.
@@ -0,0 +1,25 @@
1
+ ---
2
+ name: handoff
3
+ description: Compact the current conversation into a handoff document for another agent to pick up.
4
+ argument-hint: "What will the next session be used for?"
5
+ disable-model-invocation: true
6
+ ---
7
+
8
+ Write a handoff document summarising the current conversation so a fresh agent can continue the work. Save to the temporary directory of the user's OS - not the current workspace.
9
+
10
+ Include a "suggested skills" section in the document, which suggests skills that the agent should invoke.
11
+
12
+ Do not duplicate content already captured in other artifacts (specs, plans, ADRs, issues, commits, diffs). Reference them by path or URL instead.
13
+
14
+ Redact any sensitive information, such as API keys, passwords, or personally identifiable information.
15
+
16
+ If the user passed arguments, treat them as a description of what the next session will focus on and tailor the doc accordingly.
17
+
18
+ ## Ship integration
19
+
20
+ This skill is part of the engineering profile shipped by
21
+ `opencode-ship@1.0`. The strong planner child session is
22
+ configured with `openai/gpt-5.6-sol` and the durable workflow
23
+ state lives under `<git-common-dir>/opencode-ship/`. All
24
+ GitHub mutations go through Ship's typed tools; never use
25
+ `gh api` or raw shell.
@@ -0,0 +1,79 @@
1
+ # Logic Prototype
2
+
3
+ A tiny interactive terminal app that lets the user drive a state model by hand. Use this when the question is about **business logic, state transitions, or data shape** — the kind of thing that looks reasonable on paper but only feels wrong once you push it through real cases.
4
+
5
+ ## When this is the right shape
6
+
7
+ - "I'm not sure if this state machine handles the edge case where X then Y."
8
+ - "Does this data model actually let me represent the case where..."
9
+ - "I want to feel out what the API should look like before writing it."
10
+ - Anything where the user wants to **press buttons and watch state change**.
11
+
12
+ If the question is "what should this look like" — wrong branch. Use [UI.md](UI.md).
13
+
14
+ ## Process
15
+
16
+ ### 1. State the question
17
+
18
+ Before writing code, write down what state model and what question you're prototyping. One paragraph, in the prototype's README or a comment at the top of the file. A logic prototype that answers the wrong question is pure waste — make the question explicit so it can be checked later, whether the user is watching now or returning to it AFK.
19
+
20
+ ### 2. Pick the language
21
+
22
+ Use whatever the host project uses. If the project has no obvious runtime (e.g. a docs repo), ask.
23
+
24
+ Match the project's existing conventions for tooling — don't add a new package manager or runtime just for the prototype.
25
+
26
+ ### 3. Isolate the logic in a portable module
27
+
28
+ Put the actual logic — the bit that's answering the question — behind a small, pure interface that could be lifted out and dropped into the real codebase later. The TUI around it is throwaway; the logic module shouldn't be.
29
+
30
+ The right shape depends on the question:
31
+
32
+ - **A pure reducer** — `(state, action) => state`. Good when actions are discrete events and state is a single value.
33
+ - **A state machine** — explicit states and transitions. Good when "which actions are even legal right now" is part of the question.
34
+ - **A small set of pure functions** over a plain data type. Good when there's no implicit current state — just transformations.
35
+ - **A class or module with a clear method surface** when the logic genuinely owns ongoing internal state.
36
+
37
+ Pick whichever shape best fits the question being asked, *not* whichever is easiest to wire to a TUI. Keep it pure: no I/O, no terminal code, no `console.log` for control flow. The TUI imports it and calls into it; nothing flows the other direction.
38
+
39
+ This is what makes the prototype useful past its own lifetime: when the question's been answered, the validated reducer / machine / function set can be lifted into the real module on its own.
40
+
41
+ ### 4. Build the smallest TUI that exposes the state
42
+
43
+ Build it as a **lightweight TUI** — on every tick, clear the screen (`console.clear()` / `print("\033[2J\033[H")` / equivalent) and re-render the whole frame. The user should always see one stable view, not an ever-growing scrollback.
44
+
45
+ Each frame has two parts, in this order:
46
+
47
+ 1. **Current state**, pretty-printed and diff-friendly (one field per line, or formatted JSON). Use **bold** for field names or section headers and **dim** for less important context (timestamps, IDs, derived values). Native ANSI escape codes are fine — `\x1b[1m` bold, `\x1b[2m` dim, `\x1b[0m` reset. No need to pull in a styling library unless one is already in the project.
48
+ 2. **Keyboard shortcuts**, listed at the bottom: `[a] add user [d] delete user [t] tick clock [q] quit`. Bold the key, dim the description, or vice-versa — whatever reads cleanly.
49
+
50
+ Behaviour:
51
+
52
+ 1. **Initialise state** — a single in-memory object/struct. Render the first frame on start.
53
+ 2. **Read one keystroke (or one line)** at a time, dispatch to a handler that mutates state.
54
+ 3. **Re-render** the full frame after every action — don't append, replace.
55
+ 4. **Loop until quit.**
56
+
57
+ The whole frame should fit on one screen.
58
+
59
+ ### 5. Make it runnable in one command
60
+
61
+ Add a script to the project's existing task runner (`package.json` scripts, `Makefile`, `justfile`, `pyproject.toml`). The user should run `pnpm run <prototype-name>` or equivalent — never need to remember a path.
62
+
63
+ If the host project has no task runner, just put the command at the top of the prototype's README.
64
+
65
+ ### 6. Hand it over
66
+
67
+ Give the user the run command. They'll drive it themselves; the interesting moments are when they say "wait, that shouldn't be possible" or "huh, I assumed X would be different" — those are the bugs in the _idea_, which is the whole point. If they want new actions added, add them. Prototypes evolve.
68
+
69
+ ### 7. Capture the answer and the prototype
70
+
71
+ Once the prototype has answered its question, capture the answer, then capture the prototype the way the [SKILL](SKILL.md) describes. The logic-specific mapping: the validated reducer / machine / function set lifts into the real module (the decision, absorbed); the TUI shell rides along to the throwaway branch that keeps the prototype as a primary source.
72
+
73
+ ## Anti-patterns
74
+
75
+ - **Don't add tests.** A prototype that needs tests is no longer a prototype.
76
+ - **Don't wire it to the real database.** Use an in-memory store unless the question is specifically about persistence.
77
+ - **Don't generalise.** No "what if we wanted to support X later." The prototype answers one question.
78
+ - **Don't blur the logic and the TUI together.** If the reducer / state machine references `console.log`, prompts, or terminal escape codes, it's no longer portable. Keep the TUI as a thin shell over a pure module.
79
+ - **Don't ship the TUI shell into production.** The shell is optimised for being driven by hand from a terminal. The logic module behind it is the bit worth keeping.
@@ -0,0 +1,35 @@
1
+ ---
2
+ name: prototype
3
+ description: Build a throwaway prototype to answer a design question. Use when the user wants to sanity-check whether a state model or logic feels right, or explore what a UI should look like.
4
+ ---
5
+
6
+ # Prototype
7
+
8
+ A prototype is **throwaway code that answers a question**. The question decides the shape.
9
+
10
+ ## Pick a branch
11
+
12
+ Identify which question is being answered — from the user's prompt, the surrounding code, or by asking if the user is around:
13
+
14
+ - **"Does this logic / state model feel right?"** → [LOGIC.md](LOGIC.md). Build a tiny interactive terminal app that pushes the state machine through cases that are hard to reason about on paper.
15
+ - **"What should this look like?"** → [UI.md](UI.md). Generate several radically different UI variations on a single route, switchable via a URL search param and a floating bottom bar.
16
+
17
+ The two branches produce very different artifacts — getting this wrong wastes the whole prototype. If the question is genuinely ambiguous and the user isn't reachable, default to whichever branch better matches the surrounding code (a backend module → logic; a page or component → UI) and state the assumption at the top of the prototype.
18
+
19
+ ## Rules that apply to both
20
+
21
+ 1. **Throwaway from day one, and clearly marked as such.** Locate the prototype code close to where it will actually be used (next to the module or page it's prototyping for) so context is obvious — but name it so a casual reader can see it's a prototype, not production. For throwaway UI routes, obey whatever routing convention the project already uses; don't invent a new top-level structure.
22
+ 2. **One command to run.** Whatever the project's existing task runner supports — `pnpm <name>`, `python <path>`, `bun <path>`, etc. The user must be able to start it without thinking.
23
+ 3. **No persistence by default.** State lives in memory. Persistence is the thing the prototype is _checking_, not something it should depend on. If the question explicitly involves a database, hit a scratch DB or a local file with a clear "PROTOTYPE — wipe me" name.
24
+ 4. **Skip the polish.** No tests, no error handling beyond what makes the prototype _runnable_, no abstractions. The point is to learn something fast.
25
+ 5. **Surface the state.** After every action (logic) or on every variant switch (UI), print or render the full relevant state so the user can see what changed.
26
+ 6. **Capture it when done.** Fold any validated decision into the real code, then capture the prototype itself as a **primary source**: commit it to a throwaway branch, out of main, and leave a context pointer to that branch on the implementation issue. Capture the answer too — the verdict and the question it settled — in the issue or a commit. The main branch keeps only the validated decision.
27
+
28
+ ## Ship integration
29
+
30
+ This skill is part of the engineering profile shipped by
31
+ `opencode-ship@1.0`. The strong planner child session is
32
+ configured with `openai/gpt-5.6-sol` and the durable workflow
33
+ state lives under `<git-common-dir>/opencode-ship/`. All
34
+ GitHub mutations go through Ship's typed tools; never use
35
+ `gh api` or raw shell.
@@ -0,0 +1,112 @@
1
+ # UI Prototype
2
+
3
+ Generate **several radically different UI variations** on a single route, switchable from a floating bottom bar. The user flips between variants in the browser, picks one (or steals bits from each), then throws the rest away.
4
+
5
+ If the question is about logic/state rather than what something looks like — wrong branch. Use [LOGIC.md](LOGIC.md).
6
+
7
+ ## When this is the right shape
8
+
9
+ - "What should this page look like?"
10
+ - "I want to see a few options for this dashboard before committing."
11
+ - "Try a different layout for the settings screen."
12
+ - Any time the user would otherwise spend a day picking between three vague mockups in their head.
13
+
14
+ ## Two sub-shapes — strongly prefer sub-shape A
15
+
16
+ A UI prototype is much easier to judge when it's **butting up against the rest of the app** — real header, real sidebar, real data, real density. A throwaway route on its own is a vacuum: every variant looks fine in isolation. Default to sub-shape A whenever there's a plausible existing page to host the variants. Only reach for sub-shape B if the prototype genuinely has no nearby home.
17
+
18
+ ### Sub-shape A — adjustment to an existing page (preferred)
19
+
20
+ The route already exists. Variants are rendered **on the same route**, gated by a `?variant=` URL search param. The existing data fetching, params, and auth all stay — only the rendering swaps. This is the default; pick it unless there's a specific reason not to.
21
+
22
+ If the prototype is for something that doesn't yet have a page but *would naturally live inside one* (a new section of the dashboard, a new card on the settings screen, a new step in an existing flow) — that's still sub-shape A. Mount the variants inside the host page.
23
+
24
+ ### Sub-shape B — a new page (last resort)
25
+
26
+ Only use this when the thing being prototyped genuinely has no existing page to live inside — e.g. an entirely new top-level surface, or a flow that can't be embedded anywhere sensible.
27
+
28
+ Create a **throwaway route** following whatever routing convention the project already uses — don't invent a new top-level structure. Name it so it's obviously a prototype (e.g. include the word `prototype` in the path or filename). Same `?variant=` pattern.
29
+
30
+ Before committing to sub-shape B, sanity-check: is there really no existing page this could be embedded in? An empty route hides design problems that a populated one would expose.
31
+
32
+ In both sub-shapes the floating bottom bar is identical.
33
+
34
+ ## Process
35
+
36
+ ### 1. State the question and pick N
37
+
38
+ Default to **3 variants**. More than 5 stops being radically different and starts being noise — cap there.
39
+
40
+ Write down the plan in one line, in the prototype's location or a top-of-file comment:
41
+
42
+ > "Three variants of the settings page, switchable via `?variant=`, on the existing `/settings` route."
43
+
44
+ This works whether the user is here to push back or not.
45
+
46
+ ### 2. Generate radically different variants
47
+
48
+ Draft each variant. Hold each one to:
49
+
50
+ - The page's purpose and the data it has access to.
51
+ - The project's component library / styling system (TailwindCSS, shadcn, MUI, plain CSS, whatever).
52
+ - A clear exported component name, e.g. `VariantA`, `VariantB`, `VariantC`.
53
+
54
+ Variants must be **structurally different** — different layout, different information hierarchy, different primary affordance, not just different colours. Three slightly-tweaked card grids isn't a UI prototype, it's wallpaper. If two drafts come out too similar, redo one with explicit "do not use a card grid" guidance.
55
+
56
+ ### 3. Wire them together
57
+
58
+ Create a single switcher component on the route:
59
+
60
+ ```tsx
61
+ // pseudo-code — adapt to the project's framework
62
+ const variant = searchParams.get('variant') ?? 'A';
63
+ return (
64
+ <>
65
+ {variant === 'A' && <VariantA {...data} />}
66
+ {variant === 'B' && <VariantB {...data} />}
67
+ {variant === 'C' && <VariantC {...data} />}
68
+ <PrototypeSwitcher variants={['A','B','C']} current={variant} />
69
+ </>
70
+ );
71
+ ```
72
+
73
+ For sub-shape A (existing page): keep all the existing data fetching above the switcher; only the rendered subtree changes per variant.
74
+
75
+ For sub-shape B (new page): the throwaway route under `/prototype/<name>` mounts the same switcher.
76
+
77
+ ### 4. Build the floating switcher
78
+
79
+ A small fixed-position bar at the bottom-centre of the screen with three pieces:
80
+
81
+ - **Left arrow** — cycles to the previous variant (wraps around).
82
+ - **Variant label** — shows the current variant key and, if the variant exports a name, that name too. e.g. `B — Sidebar layout`.
83
+ - **Right arrow** — cycles forward (wraps around).
84
+
85
+ Behaviour:
86
+
87
+ - Clicking an arrow updates the URL search param (use the framework's router — `router.replace` on Next, `navigate` on React Router, etc) so the variant is shareable and reload-stable.
88
+ - Keyboard: `←` and `→` arrow keys also cycle. Don't intercept arrow keys when an `<input>`, `<textarea>`, or `[contenteditable]` is focused.
89
+ - Visually distinct from the page (e.g. high-contrast pill, subtle shadow) so it's obviously not part of the design being evaluated.
90
+ - Hidden in production builds — gate on `process.env.NODE_ENV !== 'production'` or an equivalent check, so a stray prototype merge can't ship the bar to users.
91
+
92
+ Put the switcher in a single shared component so both sub-shapes can reuse it. Locate it wherever shared UI lives in the project.
93
+
94
+ ### 5. Hand it over
95
+
96
+ Surface the URL (and the `?variant=` keys). The user will flip through whenever they get to it. The interesting feedback is usually **"I want the header from B with the sidebar from C"** — that's the actual design they want.
97
+
98
+ ### 6. Capture the answer and clean up
99
+
100
+ Once a variant has won, capture the answer — which variant and why — then capture the prototype the way the [SKILL](SKILL.md) describes. Fold the winner into the real code and move the rest onto the throwaway branch, not into main:
101
+
102
+ - **Sub-shape A** — fold the winner into the existing page; drop the losing variants and the switcher from main.
103
+ - **Sub-shape B** — promote the winning variant to a real route; drop the throwaway route and the switcher from main.
104
+
105
+ The full set of variants is the primary source, so it lands on the throwaway branch, not the bin — variant components and the switcher left in the main branch rot fast and confuse the next reader.
106
+
107
+ ## Anti-patterns
108
+
109
+ - **Variants that differ only in colour or copy.** That's a tweak, not a prototype. Real variants disagree about structure.
110
+ - **Sharing too much code between variants.** A shared `<Header>` is fine; a shared `<Layout>` defeats the point. Each variant should be free to throw out the layout.
111
+ - **Wiring variants to real mutations.** Read-only prototypes are fine. If a variant needs to mutate, point it at a stub — the question is "what should this look like", not "does the backend work".
112
+ - **Promoting the prototype directly to production.** The variant code was written under prototype constraints (no tests, minimal error handling). Rewrite it properly when you fold it in.
@@ -0,0 +1,214 @@
1
+ ---
2
+ name: receiving-code-review
3
+ description: Use when receiving code review feedback, before implementing suggestions, especially if feedback seems unclear or technically questionable - requires technical rigor and verification, not performative agreement or blind implementation
4
+ ---
5
+
6
+ # Code Review Reception
7
+
8
+ ## Overview
9
+
10
+ Code review requires technical evaluation, not emotional performance.
11
+
12
+ **Core principle:** Verify before implementing. Ask before assuming. Technical correctness over social comfort.
13
+
14
+ ## The Response Pattern
15
+
16
+ ```
17
+ WHEN receiving code review feedback:
18
+
19
+ 1. READ: Complete feedback without reacting
20
+ 2. UNDERSTAND: Restate requirement in own words (or ask)
21
+ 3. VERIFY: Check against codebase reality
22
+ 4. EVALUATE: Technically sound for THIS codebase?
23
+ 5. RESPOND: Technical acknowledgment or reasoned pushback
24
+ 6. IMPLEMENT: One item at a time, test each
25
+ ```
26
+
27
+ ## Forbidden Responses
28
+
29
+ **NEVER:**
30
+ - "You're absolutely right!" (explicit instruction-file violation)
31
+ - "Great point!" / "Excellent feedback!" (performative)
32
+ - "Let me implement that now" (before verification)
33
+
34
+ **INSTEAD:**
35
+ - Restate the technical requirement
36
+ - Ask clarifying questions
37
+ - Push back with technical reasoning if wrong
38
+ - Just start working (actions > words)
39
+
40
+ ## Handling Unclear Feedback
41
+
42
+ ```
43
+ IF any item is unclear:
44
+ STOP - do not implement anything yet
45
+ ASK for clarification on unclear items
46
+
47
+ WHY: Items may be related. Partial understanding = wrong implementation.
48
+ ```
49
+
50
+ **Example:**
51
+ ```
52
+ your human partner: "Fix 1-6"
53
+ You understand 1,2,3,6. Unclear on 4,5.
54
+
55
+ ❌ WRONG: Implement 1,2,3,6 now, ask about 4,5 later
56
+ ✅ RIGHT: "I understand items 1,2,3,6. Need clarification on 4 and 5 before proceeding."
57
+ ```
58
+
59
+ ## Source-Specific Handling
60
+
61
+ ### From your human partner
62
+ - **Trusted** - implement after understanding
63
+ - **Still ask** if scope unclear
64
+ - **No performative agreement**
65
+ - **Skip to action** or technical acknowledgment
66
+
67
+ ### From External Reviewers
68
+ ```
69
+ BEFORE implementing:
70
+ 1. Check: Technically correct for THIS codebase?
71
+ 2. Check: Breaks existing functionality?
72
+ 3. Check: Reason for current implementation?
73
+ 4. Check: Works on all platforms/versions?
74
+ 5. Check: Does reviewer understand full context?
75
+
76
+ IF suggestion seems wrong:
77
+ Push back with technical reasoning
78
+
79
+ IF can't easily verify:
80
+ Say so: "I can't verify this without [X]. Should I [investigate/ask/proceed]?"
81
+
82
+ IF conflicts with your human partner's prior decisions:
83
+ Stop and discuss with your human partner first
84
+ ```
85
+
86
+ **your human partner's rule:** "External feedback - be skeptical, but check carefully"
87
+
88
+ ## YAGNI Check for "Professional" Features
89
+
90
+ ```
91
+ IF reviewer suggests "implementing properly":
92
+ grep codebase for actual usage
93
+
94
+ IF unused: "This endpoint isn't called. Remove it (YAGNI)?"
95
+ IF used: Then implement properly
96
+ ```
97
+
98
+ **your human partner's rule:** "You and reviewer both report to me. If we don't need this feature, don't add it."
99
+
100
+ ## Implementation Order
101
+
102
+ ```
103
+ FOR multi-item feedback:
104
+ 1. Clarify anything unclear FIRST
105
+ 2. Then implement in this order:
106
+ - Blocking issues (breaks, security)
107
+ - Simple fixes (typos, imports)
108
+ - Complex fixes (refactoring, logic)
109
+ 3. Test each fix individually
110
+ 4. Verify no regressions
111
+ ```
112
+
113
+ ## When To Push Back
114
+
115
+ Push back when:
116
+ - Suggestion breaks existing functionality
117
+ - Reviewer lacks full context
118
+ - Violates YAGNI (unused feature)
119
+ - Technically incorrect for this stack
120
+ - Legacy/compatibility reasons exist
121
+ - Conflicts with your human partner's architectural decisions
122
+
123
+ **How to push back:**
124
+ - Use technical reasoning, not defensiveness
125
+ - Ask specific questions
126
+ - Reference working tests/code
127
+ - Involve your human partner if architectural
128
+
129
+ **If you're uncomfortable pushing back out loud:** Name that tension, then tell your partner about the issue you've seen. They'll appreciate your honesty.
130
+
131
+ ## Acknowledging Correct Feedback
132
+
133
+ When feedback IS correct:
134
+ ```
135
+ ✅ "Fixed. [Brief description of what changed]"
136
+ ✅ "Good catch - [specific issue]. Fixed in [location]."
137
+ ✅ [Just fix it and show in the code]
138
+
139
+ ❌ "You're absolutely right!"
140
+ ❌ "Great point!"
141
+ ❌ "Thanks for catching that!"
142
+ ❌ "Thanks for [anything]"
143
+ ❌ ANY gratitude expression
144
+ ```
145
+
146
+ **Why no thanks:** Actions speak. Just fix it. The code itself shows you heard the feedback.
147
+
148
+ **If you catch yourself about to write "Thanks":** DELETE IT. State the fix instead.
149
+
150
+ ## Gracefully Correcting Your Pushback
151
+
152
+ If you pushed back and were wrong:
153
+ ```
154
+ ✅ "You were right - I checked [X] and it does [Y]. Implementing now."
155
+ ✅ "Verified this and you're correct. My initial understanding was wrong because [reason]. Fixing."
156
+
157
+ ❌ Long apology
158
+ ❌ Defending why you pushed back
159
+ ❌ Over-explaining
160
+ ```
161
+
162
+ State the correction factually and move on.
163
+
164
+ ## Common Mistakes
165
+
166
+ | Mistake | Fix |
167
+ |---------|-----|
168
+ | Performative agreement | State requirement or just act |
169
+ | Blind implementation | Verify against codebase first |
170
+ | Batch without testing | One at a time, test each |
171
+ | Assuming reviewer is right | Check if breaks things |
172
+ | Avoiding pushback | Technical correctness > comfort |
173
+ | Partial implementation | Clarify all items first |
174
+ | Can't verify, proceed anyway | State limitation, ask for direction |
175
+
176
+ ## Real Examples
177
+
178
+ **Performative Agreement (Bad):**
179
+ ```
180
+ Reviewer: "Remove legacy code"
181
+ ❌ "You're absolutely right! Let me remove that..."
182
+ ```
183
+
184
+ **Technical Verification (Good):**
185
+ ```
186
+ Reviewer: "Remove legacy code"
187
+ ✅ "Checking... build target is 10.15+, this API needs 13+. Need legacy for backward compat. Current impl has wrong bundle ID - fix it or drop pre-13 support?"
188
+ ```
189
+
190
+ **YAGNI (Good):**
191
+ ```
192
+ Reviewer: "Implement proper metrics tracking with database, date filters, CSV export"
193
+ ✅ "Grepped codebase - nothing calls this endpoint. Remove it (YAGNI)? Or is there usage I'm missing?"
194
+ ```
195
+
196
+ **Unclear Item (Good):**
197
+ ```
198
+ your human partner: "Fix items 1-6"
199
+ You understand 1,2,3,6. Unclear on 4,5.
200
+ ✅ "Understand 1,2,3,6. Need clarification on 4 and 5 before implementing."
201
+ ```
202
+
203
+ ## GitHub Thread Replies
204
+
205
+ When replying to inline review comments on GitHub, reply in the comment thread (`gh api repos/{owner}/{repo}/pulls/{pr}/comments/{id}/replies`), not as a top-level PR comment.
206
+
207
+ ## Ship integration
208
+
209
+ This skill is part of the engineering profile shipped by
210
+ `opencode-ship@1.0`. Execution is driven by the deterministic
211
+ Ship controller; the cheap builder (`minimax/MiniMax-M3`) cannot
212
+ commit, push, mutate GitHub, mark Ready, or merge. The
213
+ verification-before-completion rule is enforced by
214
+ `delivery_verify`, not by the model self-asserting completion.