opencodekit 0.10.0 → 0.11.1

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 (47) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/agent/planner.md +3 -2
  3. package/dist/template/.opencode/command/accessibility-check.md +297 -30
  4. package/dist/template/.opencode/command/analyze-mockup.md +412 -20
  5. package/dist/template/.opencode/command/analyze-project.md +445 -30
  6. package/dist/template/.opencode/command/brainstorm.md +294 -5
  7. package/dist/template/.opencode/command/commit.md +231 -17
  8. package/dist/template/.opencode/command/create.md +415 -77
  9. package/dist/template/.opencode/command/design-audit.md +483 -29
  10. package/dist/template/.opencode/command/design.md +615 -6
  11. package/dist/template/.opencode/command/edit-image.md +223 -20
  12. package/dist/template/.opencode/command/finish.md +163 -71
  13. package/dist/template/.opencode/command/fix-ci.md +297 -24
  14. package/dist/template/.opencode/command/fix-types.md +351 -13
  15. package/dist/template/.opencode/command/fix-ui.md +299 -13
  16. package/dist/template/.opencode/command/fix.md +262 -9
  17. package/dist/template/.opencode/command/generate-diagram.md +327 -26
  18. package/dist/template/.opencode/command/generate-icon.md +266 -22
  19. package/dist/template/.opencode/command/generate-image.md +232 -12
  20. package/dist/template/.opencode/command/generate-pattern.md +234 -20
  21. package/dist/template/.opencode/command/generate-storyboard.md +231 -21
  22. package/dist/template/.opencode/command/handoff.md +208 -31
  23. package/dist/template/.opencode/command/implement.md +163 -50
  24. package/dist/template/.opencode/command/import-plan.md +253 -52
  25. package/dist/template/.opencode/command/init.md +154 -35
  26. package/dist/template/.opencode/command/integration-test.md +410 -24
  27. package/dist/template/.opencode/command/issue.md +177 -21
  28. package/dist/template/.opencode/command/new-feature.md +390 -54
  29. package/dist/template/.opencode/command/plan.md +394 -107
  30. package/dist/template/.opencode/command/pr.md +235 -29
  31. package/dist/template/.opencode/command/quick-build.md +234 -5
  32. package/dist/template/.opencode/command/research-and-implement.md +442 -12
  33. package/dist/template/.opencode/command/research-ui.md +444 -34
  34. package/dist/template/.opencode/command/research.md +179 -45
  35. package/dist/template/.opencode/command/restore-image.md +416 -22
  36. package/dist/template/.opencode/command/resume.md +447 -63
  37. package/dist/template/.opencode/command/revert-feature.md +347 -65
  38. package/dist/template/.opencode/command/review-codebase.md +199 -4
  39. package/dist/template/.opencode/command/skill-create.md +506 -14
  40. package/dist/template/.opencode/command/skill-optimize.md +487 -16
  41. package/dist/template/.opencode/command/status.md +326 -60
  42. package/dist/template/.opencode/command/summarize.md +374 -33
  43. package/dist/template/.opencode/command/triage.md +361 -0
  44. package/dist/template/.opencode/command/ui-review.md +296 -25
  45. package/dist/template/.opencode/skill/beads/SKILL.md +108 -3
  46. package/dist/template/.opencode/skill/playwriter/SKILL.md +148 -0
  47. package/package.json +1 -1
@@ -1,13 +1,302 @@
1
1
  ---
2
- description: Brainstorm and explore ideas with code
3
- argument-hint: "[topic]"
2
+ description: Brainstorm and explore ideas with structured ideation
3
+ argument-hint: "<topic or bead-id> [--quick]"
4
4
  agent: build
5
5
  ---
6
6
 
7
7
  # Brainstorm: $ARGUMENTS
8
8
 
9
- skill({ name: "brainstorming" })
9
+ ## Load Beads Skill
10
10
 
11
- Follow the skill for ideation, then explore the codebase to validate feasibility. Create quick prototypes or code spikes if helpful.
11
+ ```typescript
12
+ skill({ name: "beads" });
13
+ ```
12
14
 
13
- If bead exists, use `.beads/artifacts/<bead-id>/spec.md` as constraints.
15
+ ## Options
16
+
17
+ - `--quick`: 15-minute time box (default: 30 minutes)
18
+
19
+ ## Phase 1: Load Context
20
+
21
+ **Load skill:**
22
+
23
+ ```typescript
24
+ skill({ name: "brainstorming" });
25
+ ```
26
+
27
+ **Check for bead context:**
28
+
29
+ If `$ARGUMENTS` is a bead ID:
30
+
31
+ ```typescript
32
+ bd_show({ id: "$ARGUMENTS" });
33
+ ```
34
+
35
+ Load constraints from `.beads/artifacts/<bead-id>/spec.md` if it exists.
36
+
37
+ **Check for prior thinking:**
38
+
39
+ ```typescript
40
+ memory - search({ query: "[topic keywords]" });
41
+ ```
42
+
43
+ ## Phase 2: Set Boundaries
44
+
45
+ Before brainstorming, establish:
46
+
47
+ ```
48
+ Brainstorm Session: $ARGUMENTS
49
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
50
+
51
+ Topic: [what we're exploring]
52
+ Goal: [what decision/outcome we need]
53
+ Constraints: [hard limits from spec or user]
54
+ Time box: [15/30 minutes]
55
+
56
+ Out of scope:
57
+ - [what we're NOT considering]
58
+ ```
59
+
60
+ ## Phase 3: Diverge (Generate Ideas)
61
+
62
+ **Goal:** Quantity over quality. No evaluation yet.
63
+
64
+ Generate 5-10 ideas rapidly:
65
+
66
+ ```
67
+ Ideas:
68
+ ━━━━━━
69
+
70
+ 1. [Idea name]
71
+ Brief: [1-2 sentences]
72
+
73
+ 2. [Idea name]
74
+ Brief: [1-2 sentences]
75
+
76
+ 3. [Idea name]
77
+ Brief: [1-2 sentences]
78
+
79
+ ... continue to 5-10 ideas
80
+ ```
81
+
82
+ **Techniques:**
83
+
84
+ - **Inversion:** What's the opposite approach?
85
+ - **Analogy:** How do others solve similar problems?
86
+ - **Constraint removal:** What if [constraint] didn't exist?
87
+ - **Combination:** Can we merge two partial solutions?
88
+ - **Extreme:** What's the simplest? Most complex?
89
+
90
+ ## Phase 4: Explore Codebase
91
+
92
+ Validate feasibility against existing code:
93
+
94
+ ```typescript
95
+ // Find related patterns
96
+ grep({ pattern: "[related concept]", include: "*.ts" });
97
+ ast - grep({ pattern: "[code pattern]" });
98
+
99
+ // Understand existing architecture
100
+ lsp_document_symbols({ filePath: "<relevant file>" });
101
+ ```
102
+
103
+ For each promising idea, note:
104
+
105
+ - Existing code that supports it
106
+ - Existing code that conflicts
107
+ - New code required
108
+
109
+ ## Phase 5: Converge (Evaluate Ideas)
110
+
111
+ Rate each idea on 4 dimensions:
112
+
113
+ | Idea | Feasibility | Impact | Effort | Risk | Score |
114
+ | ---- | ----------- | ------ | ------ | ----- | ------ |
115
+ | 1 | H/M/L | H/M/L | S/M/L | H/M/L | [1-10] |
116
+ | 2 | H/M/L | H/M/L | S/M/L | H/M/L | [1-10] |
117
+ | ... | | | | | |
118
+
119
+ **Scoring guide:**
120
+
121
+ - **Feasibility:** Can we actually build this? (H=easy, L=very hard)
122
+ - **Impact:** How much value does this deliver? (H=high value)
123
+ - **Effort:** How much work? (S=small, L=large)
124
+ - **Risk:** What could go wrong? (H=high risk)
125
+
126
+ **Score formula:** (Feasibility × Impact) / (Effort × Risk)
127
+
128
+ ## Phase 6: Deep Dive Top 3
129
+
130
+ For the top 3 scoring ideas:
131
+
132
+ ### Idea [N]: [Name]
133
+
134
+ **Approach:**
135
+ [2-3 sentence description]
136
+
137
+ **How it works:**
138
+
139
+ 1. [Step 1]
140
+ 2. [Step 2]
141
+ 3. [Step 3]
142
+
143
+ **Pros:**
144
+
145
+ - [Advantage 1]
146
+ - [Advantage 2]
147
+
148
+ **Cons:**
149
+
150
+ - [Disadvantage 1]
151
+ - [Disadvantage 2]
152
+
153
+ **Code sketch:**
154
+
155
+ ```typescript
156
+ // Quick pseudocode or structure
157
+ ```
158
+
159
+ **Open questions:**
160
+
161
+ - [Uncertainty 1]
162
+ - [Uncertainty 2]
163
+
164
+ ## Phase 7: Prototype (Optional)
165
+
166
+ For the most promising idea, create a quick spike:
167
+
168
+ ```
169
+ Prototype Goal:
170
+ ━━━━━━━━━━━━━━━
171
+
172
+ Question to answer: [what are we validating?]
173
+ Time limit: 15 minutes
174
+ Success criteria: [how we know it works]
175
+ ```
176
+
177
+ Create throwaway code to validate:
178
+
179
+ ```bash
180
+ # Create spike branch
181
+ git checkout -b spike/brainstorm-$ARGUMENTS
182
+ ```
183
+
184
+ Build minimal proof of concept. Delete or keep based on learnings.
185
+
186
+ ## Phase 8: Capture Decision
187
+
188
+ Save brainstorm results:
189
+
190
+ **If bead exists:**
191
+
192
+ Write to `.beads/artifacts/<bead-id>/brainstorm.md`:
193
+
194
+ ```markdown
195
+ # Brainstorm: [Topic]
196
+
197
+ **Date:** [date]
198
+ **Duration:** [N] minutes
199
+ **Bead:** <bead-id>
200
+
201
+ ## Goal
202
+
203
+ [What we were exploring]
204
+
205
+ ## Ideas Considered
206
+
207
+ | Idea | Feasibility | Impact | Effort | Risk | Score |
208
+ | ---- | ----------- | ------ | ------ | ---- | ----- |
209
+ | [1] | H | H | M | L | 8 |
210
+ | [2] | M | H | S | M | 6 |
211
+ | [3] | L | M | L | H | 2 |
212
+
213
+ ## Recommendation
214
+
215
+ **Chosen approach:** [Idea N]
216
+
217
+ **Rationale:** [Why this approach]
218
+
219
+ ## Next Steps
220
+
221
+ - [ ] [Action 1]
222
+ - [ ] [Action 2]
223
+ ```
224
+
225
+ **Create observation for reusable insights:**
226
+
227
+ ```typescript
228
+ observation({
229
+ type: "discovery",
230
+ title: "Brainstorm: [topic]",
231
+ content: `
232
+ ## Key Insight
233
+ [What we learned]
234
+
235
+ ## Approach Chosen
236
+ [Brief description]
237
+
238
+ ## Why Others Rejected
239
+ [Brief notes on alternatives]
240
+ `,
241
+ concepts: "[topic keywords]",
242
+ bead_id: "<bead-id>",
243
+ });
244
+ ```
245
+
246
+ ## Phase 9: Create Follow-up Beads
247
+
248
+ For promising ideas that need more work:
249
+
250
+ ```typescript
251
+ bd_add({
252
+ title: "[Idea name]",
253
+ type: "task",
254
+ pri: 2,
255
+ desc: "From brainstorm: [topic]. Needs research/prototyping.",
256
+ tags: ["brainstorm"],
257
+ });
258
+ ```
259
+
260
+ ## Output
261
+
262
+ ```
263
+ Brainstorm Complete: $ARGUMENTS
264
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
265
+
266
+ Duration: [N] minutes
267
+ Ideas generated: [N]
268
+ Ideas evaluated: [N]
269
+
270
+ Top 3:
271
+ 1. [Idea 1] - Score: [N]
272
+ 2. [Idea 2] - Score: [N]
273
+ 3. [Idea 3] - Score: [N]
274
+
275
+ Recommendation: [Chosen approach]
276
+ Confidence: [High/Medium/Low]
277
+
278
+ Artifacts:
279
+ - .beads/artifacts/<bead-id>/brainstorm.md (if bead)
280
+ - Observation created ✓
281
+
282
+ Follow-up beads: [N] created
283
+ ```
284
+
285
+ **Next steps:**
286
+
287
+ ```
288
+ If ready to proceed:
289
+ /research <bead-id> # Validate approach
290
+ /plan <bead-id> # Create implementation plan
291
+
292
+ If need more exploration:
293
+ /brainstorm <new-aspect> # Continue ideation
294
+ ```
295
+
296
+ ## Anti-Patterns
297
+
298
+ - ❌ **Evaluating during divergence** - Generate first, judge later
299
+ - ❌ **Falling in love with first idea** - Explore alternatives
300
+ - ❌ **Infinite brainstorming** - Time box and decide
301
+ - ❌ **No decision** - Brainstorming must produce a recommendation
302
+ - ❌ **No capture** - Undocumented ideas are lost ideas
@@ -1,39 +1,253 @@
1
1
  ---
2
2
  description: Commit with verification and optional bead traceability
3
- argument-hint: "[bead-id]"
3
+ argument-hint: "[bead-id] [--amend]"
4
+ agent: build
4
5
  ---
5
6
 
6
7
  # Commit
7
8
 
8
- skill({ name: "verification-before-completion" })
9
+ **Load skills:**
9
10
 
10
- ## Workflow
11
+ ```typescript
12
+ skill({ name: "beads" }); // Session protocol
13
+ skill({ name: "verification-before-completion" });
14
+ ```
15
+
16
+ ## Options
17
+
18
+ - `--amend`: Amend the last commit (only if not pushed and you created it)
19
+
20
+ ## Phase 1: Check Git State
21
+
22
+ ```bash
23
+ git status --porcelain
24
+ git diff --stat
25
+ git diff --cached --stat
26
+ ```
11
27
 
12
- 1. Run all tests/lints
13
- 2. Verify output shows success
14
- 3. Commit with conventional message format
28
+ Report:
15
29
 
16
- ## Bead Integration (Optional)
30
+ ```
31
+ Git State:
32
+ ━━━━━━━━━━
33
+
34
+ Staged:
35
+ - [file1] (modified)
36
+ - [file2] (new)
17
37
 
18
- If a bead ID is provided (`$ARGUMENTS`), include it in the commit message for traceability:
38
+ Unstaged:
39
+ - [file3] (modified)
19
40
 
41
+ Untracked:
42
+ - [file4]
20
43
  ```
21
- <type>(<scope>): <description>
22
44
 
23
- <bead-id>: <what was done for this bead>
45
+ If nothing staged: "No changes staged. Run `git add <files>` first."
46
+
47
+ ## Phase 2: Run Verification Gates
24
48
 
25
- [optional body]
49
+ Detect project type and run gates:
50
+
51
+ ```bash
52
+ ls package.json Cargo.toml pyproject.toml go.mod Makefile 2>/dev/null
26
53
  ```
27
54
 
28
- **Example:**
55
+ | Project | Test Command | Lint Command |
56
+ | ------- | --------------- | ------------------------------------ |
57
+ | Node.js | `npm test` | `npm run lint && npm run type-check` |
58
+ | Rust | `cargo test` | `cargo clippy -- -D warnings` |
59
+ | Python | `pytest` | `ruff check . && mypy .` |
60
+ | Go | `go test ./...` | `golangci-lint run` |
61
+
62
+ ```
63
+ Verification:
64
+ ━━━━━━━━━━━━━
29
65
 
66
+ Tests: [✓/✗/skipped]
67
+ Lint: [✓/✗/skipped]
68
+ Types: [✓/✗/skipped]
30
69
  ```
31
- feat(auth): add OAuth2 login flow
32
70
 
33
- bd-a1b2c3: implement token refresh mechanism
71
+ **If any gate fails:**
34
72
 
35
- - Added refresh token storage
36
- - Integrated with session manager
37
73
  ```
74
+ Cannot commit: [gate] failed.
75
+
76
+ Fix errors or use `git commit --no-verify` (not recommended).
77
+ ```
78
+
79
+ ## Phase 3: Analyze Changes for Message
80
+
81
+ ```bash
82
+ git diff --cached --stat
83
+ git diff --cached
84
+ ```
85
+
86
+ Determine:
87
+
88
+ - **Type**: What kind of change is this?
89
+ - **Scope**: Which module/component changed?
90
+ - **Summary**: What does this change do?
91
+
92
+ ### Commit Type Guide
93
+
94
+ | Type | When to Use | Example |
95
+ | ---------- | --------------------------------------- | ---------------------------------- |
96
+ | `feat` | New feature for user | `feat(auth): add OAuth login` |
97
+ | `fix` | Bug fix | `fix(api): handle null response` |
98
+ | `refactor` | Code change (no new feature or fix) | `refactor(utils): simplify parser` |
99
+ | `docs` | Documentation only | `docs: update API reference` |
100
+ | `test` | Adding or updating tests | `test(auth): add login tests` |
101
+ | `chore` | Maintenance, deps, tooling | `chore: update dependencies` |
102
+ | `style` | Formatting, whitespace (no code change) | `style: fix indentation` |
103
+ | `perf` | Performance improvement | `perf(db): add query caching` |
104
+ | `ci` | CI/CD changes | `ci: add deploy workflow` |
105
+
106
+ ### Scope Detection
107
+
108
+ Auto-detect scope from changed files:
38
109
 
39
- If no bead ID is provided, proceed with standard conventional commit format.
110
+ | Changed Files | Suggested Scope |
111
+ | ----------------------- | --------------- |
112
+ | `src/auth/*` | auth |
113
+ | `src/api/*` | api |
114
+ | `src/components/*` | ui |
115
+ | `tests/*` | test |
116
+ | `docs/*` | docs |
117
+ | Multiple unrelated dirs | (omit scope) |
118
+
119
+ ## Phase 4: Generate Commit Message
120
+
121
+ Propose message based on analysis:
122
+
123
+ ```
124
+ Proposed Commit:
125
+ ━━━━━━━━━━━━━━━━
126
+
127
+ <type>(<scope>): <summary>
128
+
129
+ [body - what and why, not how]
130
+
131
+ [footer - bead reference, breaking changes]
132
+ ```
133
+
134
+ **Example with bead:**
135
+
136
+ ```
137
+ feat(auth): add token refresh mechanism
138
+
139
+ Implement automatic token refresh when access token expires.
140
+ Tokens are stored in secure session storage.
141
+
142
+ bd-a1b2c3: OAuth implementation
143
+ ```
144
+
145
+ **Example with breaking change:**
146
+
147
+ ```
148
+ feat(api)!: change response format
149
+
150
+ BREAKING CHANGE: API responses now use camelCase instead of snake_case.
151
+ Migration guide: https://...
152
+ ```
153
+
154
+ Ask user:
155
+
156
+ ```
157
+ Use this message? (yes/edit/cancel)
158
+ ```
159
+
160
+ ## Phase 5: Execute Commit
161
+
162
+ ```bash
163
+ git commit -m "<message>"
164
+ ```
165
+
166
+ **If pre-commit hook fails:**
167
+
168
+ ```
169
+ Pre-commit hook failed:
170
+ ━━━━━━━━━━━━━━━━━━━━━━━
171
+
172
+ [hook output]
173
+
174
+ Options:
175
+ 1. Fix issues and retry: /commit [bead-id]
176
+ 2. Skip hook (not recommended): git commit --no-verify -m "..."
177
+ ```
178
+
179
+ **Do NOT use --amend** unless:
180
+
181
+ 1. User explicitly requested `--amend`
182
+ 2. You created the HEAD commit in this session
183
+ 3. Commit has NOT been pushed to remote
184
+
185
+ ## Phase 6: Sync (for multi-agent)
186
+
187
+ If bead ID was provided:
188
+
189
+ ```typescript
190
+ bd_sync({ reason: "Committed changes for <bead-id>" });
191
+ ```
192
+
193
+ ## Output
194
+
195
+ ```
196
+ Committed: [short-hash]
197
+ ━━━━━━━━━━━━━━━━━━━━━━━
198
+
199
+ Message: <type>(<scope>): <summary>
200
+ Files: [N] changed
201
+ Bead: <bead-id> (if provided)
202
+
203
+ Verification: All gates passed ✓
204
+ ```
205
+
206
+ **Next steps:**
207
+
208
+ ```
209
+ Continue working:
210
+ [make more changes]
211
+ /commit [bead-id]
212
+
213
+ Ready to finish:
214
+ /finish <bead-id>
215
+
216
+ Create PR:
217
+ /pr <bead-id>
218
+ ```
219
+
220
+ ## Amend Workflow (--amend)
221
+
222
+ **Safety checks before amend:**
223
+
224
+ ```bash
225
+ git log -1 --format='%H %s' # What we're amending
226
+ git status # Check if pushed
227
+ ```
228
+
229
+ ```
230
+ Amend Safety Check:
231
+ ━━━━━━━━━━━━━━━━━━━
232
+
233
+ HEAD commit: [hash] [message]
234
+ Pushed to remote: [yes/no]
235
+ Created by you: [yes/no]
236
+ ```
237
+
238
+ **If pushed or not created by you: STOP.**
239
+
240
+ ```
241
+ Cannot amend: Commit already pushed or not created by you.
242
+
243
+ Use a new commit instead:
244
+ git add <files>
245
+ /commit [bead-id]
246
+ ```
247
+
248
+ **If safe to amend:**
249
+
250
+ ```bash
251
+ git add <files>
252
+ git commit --amend -m "<updated message>"
253
+ ```