opencodekit 0.10.0 → 0.11.0

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