opencodekit 0.16.15 → 0.16.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 (69) hide show
  1. package/dist/index.js +1 -1
  2. package/dist/template/.opencode/AGENTS.md +1 -1
  3. package/dist/template/.opencode/agent/plan.md +77 -161
  4. package/dist/template/.opencode/command/create.md +75 -307
  5. package/dist/template/.opencode/command/design.md +53 -589
  6. package/dist/template/.opencode/command/handoff.md +76 -180
  7. package/dist/template/.opencode/command/init.md +45 -211
  8. package/dist/template/.opencode/command/plan.md +62 -514
  9. package/dist/template/.opencode/command/pr.md +56 -226
  10. package/dist/template/.opencode/command/research.md +55 -266
  11. package/dist/template/.opencode/command/resume.md +33 -138
  12. package/dist/template/.opencode/command/review-codebase.md +54 -202
  13. package/dist/template/.opencode/command/ship.md +78 -127
  14. package/dist/template/.opencode/command/start.md +47 -577
  15. package/dist/template/.opencode/command/status.md +55 -354
  16. package/dist/template/.opencode/command/ui-review.md +52 -298
  17. package/dist/template/.opencode/command/verify.md +36 -250
  18. package/dist/template/.opencode/memory.db-shm +0 -0
  19. package/dist/template/.opencode/memory.db-wal +0 -0
  20. package/dist/template/.opencode/plugin/README.md +8 -4
  21. package/dist/template/.opencode/plugin/swarm-enforcer.ts +182 -27
  22. package/dist/template/.opencode/skill/augment-context-engine/SKILL.md +112 -0
  23. package/dist/template/.opencode/skill/augment-context-engine/mcp.json +6 -0
  24. package/dist/template/.opencode/skill/core-data-expert/SKILL.md +82 -0
  25. package/dist/template/.opencode/skill/core-data-expert/references/batch-operations.md +543 -0
  26. package/dist/template/.opencode/skill/core-data-expert/references/cloudkit-integration.md +259 -0
  27. package/dist/template/.opencode/skill/core-data-expert/references/concurrency.md +522 -0
  28. package/dist/template/.opencode/skill/core-data-expert/references/fetch-requests.md +643 -0
  29. package/dist/template/.opencode/skill/core-data-expert/references/glossary.md +233 -0
  30. package/dist/template/.opencode/skill/core-data-expert/references/migration.md +393 -0
  31. package/dist/template/.opencode/skill/core-data-expert/references/model-configuration.md +597 -0
  32. package/dist/template/.opencode/skill/core-data-expert/references/performance.md +300 -0
  33. package/dist/template/.opencode/skill/core-data-expert/references/persistent-history.md +553 -0
  34. package/dist/template/.opencode/skill/core-data-expert/references/project-audit.md +60 -0
  35. package/dist/template/.opencode/skill/core-data-expert/references/saving.md +574 -0
  36. package/dist/template/.opencode/skill/core-data-expert/references/stack-setup.md +625 -0
  37. package/dist/template/.opencode/skill/core-data-expert/references/testing.md +300 -0
  38. package/dist/template/.opencode/skill/core-data-expert/references/threading.md +589 -0
  39. package/dist/template/.opencode/skill/swift-concurrency/SKILL.md +246 -0
  40. package/dist/template/.opencode/skill/swift-concurrency/references/actors.md +640 -0
  41. package/dist/template/.opencode/skill/swift-concurrency/references/async-algorithms.md +822 -0
  42. package/dist/template/.opencode/skill/swift-concurrency/references/async-await-basics.md +249 -0
  43. package/dist/template/.opencode/skill/swift-concurrency/references/async-sequences.md +670 -0
  44. package/dist/template/.opencode/skill/swift-concurrency/references/core-data.md +533 -0
  45. package/dist/template/.opencode/skill/swift-concurrency/references/glossary.md +128 -0
  46. package/dist/template/.opencode/skill/swift-concurrency/references/linting.md +142 -0
  47. package/dist/template/.opencode/skill/swift-concurrency/references/memory-management.md +542 -0
  48. package/dist/template/.opencode/skill/swift-concurrency/references/migration.md +1076 -0
  49. package/dist/template/.opencode/skill/swift-concurrency/references/performance.md +574 -0
  50. package/dist/template/.opencode/skill/swift-concurrency/references/sendable.md +578 -0
  51. package/dist/template/.opencode/skill/swift-concurrency/references/tasks.md +604 -0
  52. package/dist/template/.opencode/skill/swift-concurrency/references/testing.md +565 -0
  53. package/dist/template/.opencode/skill/swift-concurrency/references/threading.md +452 -0
  54. package/dist/template/.opencode/skill/swiftui-expert-skill/SKILL.md +290 -0
  55. package/dist/template/.opencode/skill/swiftui-expert-skill/references/animation-advanced.md +351 -0
  56. package/dist/template/.opencode/skill/swiftui-expert-skill/references/animation-basics.md +284 -0
  57. package/dist/template/.opencode/skill/swiftui-expert-skill/references/animation-transitions.md +326 -0
  58. package/dist/template/.opencode/skill/swiftui-expert-skill/references/image-optimization.md +286 -0
  59. package/dist/template/.opencode/skill/swiftui-expert-skill/references/layout-best-practices.md +312 -0
  60. package/dist/template/.opencode/skill/swiftui-expert-skill/references/liquid-glass.md +377 -0
  61. package/dist/template/.opencode/skill/swiftui-expert-skill/references/list-patterns.md +153 -0
  62. package/dist/template/.opencode/skill/swiftui-expert-skill/references/modern-apis.md +400 -0
  63. package/dist/template/.opencode/skill/swiftui-expert-skill/references/performance-patterns.md +377 -0
  64. package/dist/template/.opencode/skill/swiftui-expert-skill/references/scroll-patterns.md +305 -0
  65. package/dist/template/.opencode/skill/swiftui-expert-skill/references/sheet-navigation-patterns.md +292 -0
  66. package/dist/template/.opencode/skill/swiftui-expert-skill/references/state-management.md +447 -0
  67. package/dist/template/.opencode/skill/swiftui-expert-skill/references/text-formatting.md +285 -0
  68. package/dist/template/.opencode/skill/swiftui-expert-skill/references/view-structure.md +276 -0
  69. package/package.json +1 -1
@@ -6,364 +6,132 @@ agent: build
6
6
 
7
7
  # Create: $ARGUMENTS
8
8
 
9
- Create a bead and its artifacts from a description. Auto-classifies bead type based on keywords.
9
+ Create a bead and its specification (PRD) from a description.
10
10
 
11
- > **Lifecycle context:** IdeationDesign **Specification** Task Conversion → Planning → Implementation → Verification
11
+ > **Workflow:** **`/create`**`/start <id>``/ship <id>`
12
12
  >
13
- > **Workflow:** `/create` `/start <id>` `/ship <id>` `/verify <id>`
14
-
15
- ## Parse Arguments
16
-
17
- | Argument | Default | Description |
18
- | --------------- | ------------- | ------------------------------------------ |
19
- | `<description>` | required | What you want to build/fix (quoted string) |
20
- | `--type` | auto-detected | Override type: epic, feature, task, bug |
13
+ > This command creates the specification ONLY. Do NOT write any implementation code.
21
14
 
22
15
  ## Load Skills
23
16
 
24
17
  ```typescript
25
- skill({ name: "development-lifecycle" }); // Phase guidance
26
18
  skill({ name: "beads" });
27
19
  skill({ name: "prd" }); // PRD template guidance
28
- skill({ name: "memory-system" });
29
- ```
30
-
31
- ## Check Memory First
32
-
33
- Search for similar specs and patterns before creating:
34
-
35
- ```typescript
36
- // Find similar past specs
37
- memory_search({ query: "[description keywords]", limit: 3 });
38
-
39
- // Find related patterns and conventions
40
- memory_search({ query: "[domain keywords] spec requirements", limit: 3 });
41
- ```
42
-
43
- Review findings for:
44
-
45
- - Similar specs that worked well (reuse structure)
46
- - Patterns and conventions already established
47
- - Gotchas to avoid in this domain
48
-
49
- ---
50
-
51
- ## Phase 1: Classify Bead Type
52
-
53
- **Auto-classification based on description keywords:**
54
-
55
- | Keywords in Description | Classified As |
56
- | --------------------------------------------------------------- | ------------- |
57
- | "redesign", "overhaul", "migrate", "new system", "platform" | `epic` |
58
- | "add", "implement", "create", "build", "new feature", "support" | `feature` |
59
- | "fix", "bug", "broken", "error", "crash", "issue", "failing" | `bug` |
60
- | Default (none of above) | `task` |
61
-
62
- ```typescript
63
- function classifyBeadType(description: string): "epic" | "feature" | "task" | "bug" {
64
- const desc = description.toLowerCase();
65
-
66
- // Epic indicators (large scope)
67
- if (/redesign|overhaul|migrate|new system|platform|architecture/.test(desc)) {
68
- return "epic";
69
- }
70
-
71
- // Bug indicators
72
- if (/fix|bug|broken|error|crash|issue|failing|doesn't work|not working/.test(desc)) {
73
- return "bug";
74
- }
75
-
76
- // Feature indicators
77
- if (/add|implement|create|build|new feature|support|enable|integrate/.test(desc)) {
78
- return "feature";
79
- }
80
-
81
- // Default to task
82
- return "task";
83
- }
84
- ```
85
-
86
- **User can override with `--type` flag.**
87
-
88
- ---
89
-
90
- ## Phase 2: Create Bead
91
-
92
- ```bash
93
- # Create the bead with classified type
94
- BEAD_ID=$(br create "$DESCRIPTION" --type $BEAD_TYPE --json | jq -r '.id')
95
- echo "Created bead: $BEAD_ID"
96
20
  ```
97
21
 
98
- ---
99
-
100
- ## Phase 3: Setup Artifact Directory
22
+ ## Parse Arguments
101
23
 
102
- ```bash
103
- BEAD_DIR=".beads/artifacts/$BEAD_ID"
104
- mkdir -p "$BEAD_DIR"
105
- ```
24
+ | Argument | Default | Description |
25
+ | --------------- | ------------- | ---------------------------------- |
26
+ | `<description>` | required | What to build/fix (quoted string) |
27
+ | `--type` | auto-detected | Override: epic, feature, task, bug |
106
28
 
107
29
  ---
108
30
 
109
- ## Phase 4: Choose Artifacts (Auto-Detection)
110
-
111
- **Artifact selection based on bead type:**
112
-
113
- | Bead Type | Auto-Created | Rationale |
114
- | --------- | ------------------------ | ------------------------------------ |
115
- | `epic` | `proposal.md` + `prd.md` | Major work needs high-level proposal |
116
- | `feature` | `proposal.md` + `prd.md` | Scoped work benefits from proposal |
117
- | `task` | `prd.md` | Tactical work, skip proposal |
118
- | `bug` | `prd.md` | Clear problem, skip proposal |
31
+ ## Phase 1: Duplicate Check
119
32
 
120
33
  ```bash
121
- # Determine if proposal is needed
122
- NEEDS_PROPOSAL=false
123
- if [ "$BEAD_TYPE" = "epic" ] || [ "$BEAD_TYPE" = "feature" ]; then
124
- NEEDS_PROPOSAL=true
125
- fi
126
-
127
- # Always create PRD
128
- cp .opencode/memory/_templates/prd.md "$BEAD_DIR/prd.md"
129
-
130
- # Create proposal if needed (epic/feature)
131
- if [ "$NEEDS_PROPOSAL" = "true" ]; then
132
- cp .opencode/memory/_templates/proposal.md "$BEAD_DIR/proposal.md"
133
- fi
34
+ br list --status=open --status=in_progress
134
35
  ```
135
36
 
136
- ---
137
-
138
- ## Phase 5: Gather Context for Spec
139
-
140
- ### Ask Clarifying Questions (if needed)
141
-
142
- If description is vague, ask for more details:
143
-
144
- ```typescript
145
- question({
146
- questions: [
147
- {
148
- header: "Scope",
149
- question: "What should this feature do? Describe the core functionality.",
150
- options: [], // Free text
151
- },
152
- {
153
- header: "Users",
154
- question: "Who will use this? (developers, end users, API consumers, etc.)",
155
- options: [
156
- { label: "Developers", description: "Internal tooling or API" },
157
- { label: "End users", description: "Customer-facing feature" },
158
- { label: "Both", description: "Used by developers and users" },
159
- ],
160
- },
161
- {
162
- header: "Constraints",
163
- question: "Any constraints? (performance, compatibility, security)",
164
- options: [], // Free text
165
- },
166
- ],
167
- });
168
- ```
169
-
170
- ### Research Existing Patterns (Optional)
171
-
172
- If user provides enough context, delegate to explore agent:
173
-
174
- ```typescript
175
- Task({
176
- subagent_type: "explore",
177
- description: "Find similar patterns",
178
- prompt: `Find patterns in codebase related to: [description]
179
- - Similar implementations
180
- - Existing conventions
181
- - Test patterns used
182
- Return: File paths and patterns found`,
183
- });
184
- ```
185
-
186
- ---
187
-
188
- ## Phase 6: Fill In Template
189
-
190
- ### For prd.md
37
+ If a matching bead exists, stop and tell the user to use `/start <id>` instead.
191
38
 
192
- Fill in the PRD template with goal, scope, and tasks:
39
+ ## Phase 2: Classify Type
193
40
 
194
- ```markdown
195
- # Beads PRD Template
41
+ If `--type` was provided, use it directly. Otherwise, suggest a type based on the description and ask the user to confirm:
196
42
 
197
- **Bead:** $BEAD_ID
198
- **Created:** [today]
199
- **Status:** Draft
43
+ - **epic**: Multi-session, cross-domain (redesign, migrate, overhaul)
44
+ - **feature**: New capability, scoped (add, implement, build, integrate)
45
+ - **bug**: Something broken (fix, error, crash, not working)
46
+ - **task**: Tactical change, clear scope (everything else)
200
47
 
201
- ## Goal
48
+ ## Phase 3: Gather Context
202
49
 
203
- [From description and clarifying questions]
50
+ Spawn parallel subagents to understand the codebase before writing any spec:
204
51
 
205
- ## Scope
52
+ | Agent | Purpose | Returns |
53
+ | --------------------------- | ----------------------------------- | ------------------------------------- |
54
+ | `explore` | Affected files and patterns | File paths, conventions, architecture |
55
+ | `explore` | Test patterns and coverage gaps | Test files, patterns, gaps |
56
+ | `explore` | Dependencies and integration points | Dependency graph, risk areas |
57
+ | `scout` (feature/epic only) | Best practices and approaches | Recommendations, warnings |
58
+ | `review` (epic only) | Architecture impact | Breaking changes, decomposition |
206
59
 
207
- ### In-Scope
60
+ All agents launch in ONE message — they run concurrently.
208
61
 
209
- - [From user input]
62
+ **While agents run**, ask clarifying questions if the description lacks scope or expected outcome. For bugs, also ask for reproduction steps and expected vs actual behavior. Skip questions if the description is already specific.
210
63
 
211
- ### Out-of-Scope
212
-
213
- - [Explicitly excluded]
214
-
215
- ## Success Criteria
216
-
217
- - [ ] [Measurable criterion]
218
- - Verify: `[command]`
219
-
220
- ## Tasks
221
-
222
- ### [Task Title] [category]
223
-
224
- [End state description]
225
-
226
- **Verification:**
227
-
228
- - [Command or check]
229
- ```
230
-
231
- ### For proposal.md (epic/feature)
232
-
233
- Fill in high-level proposal first:
234
-
235
- ```markdown
236
- # Proposal: [Title]
237
-
238
- **Bead:** $BEAD_ID
239
- **Date:** [today]
240
-
241
- ## Problem Statement
242
-
243
- [What problem are we solving?]
244
-
245
- ## Proposed Solution
246
-
247
- [High-level approach]
248
-
249
- ## Scope
250
-
251
- ### In-Scope
252
-
253
- - [Major deliverable]
254
-
255
- ### Out-of-Scope
256
-
257
- - [Explicitly excluded]
258
-
259
- ## Timeline
260
-
261
- | Phase | Duration | Deliverables |
262
- | ------- | -------- | ------------ |
263
- | Phase 1 | X weeks | ... |
264
-
265
- ## Risks
266
-
267
- | Risk | Likelihood | Impact | Mitigation |
268
- | ---- | ---------- | ------ | ---------- |
269
- | ... | ... | ... | ... |
270
- ```
271
-
272
- ---
273
-
274
- ## Phase 7: Validate PRD
275
-
276
- Before saving, validate the PRD:
277
-
278
- - [ ] Goal is clear and measurable?
279
- - [ ] Success criteria have verification commands?
280
- - [ ] Tasks have end state descriptions (not steps)?
281
- - [ ] Out of scope is defined?
282
- - [ ] Dependencies identified (if any)?
283
-
284
- If validation fails, ask user for missing information.
285
-
286
- ---
287
-
288
- ## Phase 8: Save and Report
289
-
290
- Save the filled template to the bead artifacts folder.
64
+ ## Phase 4: Create Bead
291
65
 
292
66
  ```bash
293
- # Verify files were created
294
- ls -la "$BEAD_DIR/"
67
+ BEAD_ID=$(br create "$DESCRIPTION" --type $BEAD_TYPE --json | jq -r '.id')
68
+ mkdir -p ".beads/artifacts/$BEAD_ID"
295
69
  ```
296
70
 
297
- Update bead with note:
71
+ ## Phase 5: Write PRD
72
+
73
+ Copy and fill the PRD template using context from Phase 3:
298
74
 
299
75
  ```bash
300
- br comments add $BEAD_ID "Created prd.md with [N] tasks defined"
76
+ cp .opencode/memory/_templates/prd.md ".beads/artifacts/$BEAD_ID/prd.md"
301
77
  ```
302
78
 
303
- ## Record Learning (If Significant)
79
+ ### Required Sections
304
80
 
305
- If you discovered patterns or made decisions worth remembering:
81
+ | Section | Source | Required |
82
+ | ----------------- | ---------------------------------------------------------- | ----------------- |
83
+ | Problem Statement | User description + clarifying questions | Always |
84
+ | Scope (In/Out) | User input + codebase exploration | Always |
85
+ | Proposed Solution | Codebase patterns + user intent | Always |
86
+ | Success Criteria | User verification + test commands (must include `Verify:`) | Always |
87
+ | Technical Context | Explore agent findings | Always |
88
+ | Affected Files | Explore agent findings (real paths from Phase 3) | Always |
89
+ | Tasks | Derived from scope + solution | Always |
90
+ | Risks | Codebase exploration | Feature/epic only |
91
+ | Open Questions | Unresolved items from Phase 3 | If any exist |
306
92
 
307
- ```typescript
308
- observation({
309
- type: "pattern", // or "decision"
310
- title: "[Domain] spec pattern for [type of feature]",
311
- narrative: "When creating specs for [this type], include...",
312
- concepts: "[domain keywords]",
313
- bead_id: "$BEAD_ID",
314
- confidence: "medium",
315
- });
316
- ```
93
+ ### Task Format
317
94
 
318
- ---
95
+ Tasks must follow the `prd-task` skill format:
319
96
 
320
- ## Output
97
+ - Title with `[category]` tag
98
+ - One-sentence **end state** description (not step-by-step)
99
+ - Metadata block: `depends_on`, `parallel`, `conflicts_with`, `files`
100
+ - At least one verification command per task
321
101
 
322
- ```
323
- Created: $BEAD_ID
324
- ━━━━━━━━━━━━━━━━━━━
102
+ ## Phase 6: Validate PRD
325
103
 
326
- Description: [original description]
327
- Type: [classified type] (auto-detected | --type override)
104
+ Before saving, verify:
328
105
 
329
- Artifacts:
330
- ├── .beads/artifacts/$BEAD_ID/prd.md [NEW]
331
- └── .beads/artifacts/$BEAD_ID/proposal.md [if epic/feature]
106
+ - [ ] No placeholder text remains (e.g., "[Clear description", "[List what's allowed]")
107
+ - [ ] Success criteria include `Verify:` commands
108
+ - [ ] Technical context references actual `src/` paths from exploration
109
+ - [ ] Affected files list real paths
110
+ - [ ] Tasks have `[category]` headings
111
+ - [ ] Each task has verification
112
+ - [ ] No implementation code in the PRD
332
113
 
333
- Tasks: [N] defined
334
- Success Criteria: [N] with verification
114
+ If any check fails, fix it — don't ask the user.
335
115
 
336
- Next: /plan $BEAD_ID (convert PRD to implementation plan)
337
- /start $BEAD_ID (if simple, skip planning)
338
- ```
116
+ ## Phase 7: Report
339
117
 
340
- ---
118
+ Output:
341
119
 
342
- ## Examples
120
+ 1. Bead ID and type
121
+ 2. PRD location (`.beads/artifacts/$BEAD_ID/prd.md`)
122
+ 3. Summary: task count, success criteria count, affected files count
123
+ 4. Next steps: `/start $BEAD_ID` or `/plan $BEAD_ID`
343
124
 
344
125
  ```bash
345
- # Auto-classified as 'feature' (creates proposal + prd)
346
- /create "Add user authentication with OAuth"
347
-
348
- # Auto-classified as 'bug' (creates prd only)
349
- /create "Fix login page not loading on mobile"
350
-
351
- # Auto-classified as 'epic' (creates proposal + prd)
352
- /create "Redesign the entire dashboard UI"
353
-
354
- # Auto-classified as 'task' (creates prd only)
355
- /create "Update dependencies to latest versions"
356
-
357
- # Override type explicitly
358
- /create "Refactor auth module" --type feature
126
+ br comments add $BEAD_ID "Created prd.md with [N] tasks, [M] success criteria"
359
127
  ```
360
128
 
361
129
  ---
362
130
 
363
131
  ## Related Commands
364
132
 
365
- | Need | Command |
366
- | --------------- | -------------------- |
367
- | Research first | `/research $BEAD_ID` |
368
- | Plan after spec | `/plan $BEAD_ID` |
369
- | Start working | `/start $BEAD_ID` |
133
+ | Need | Command |
134
+ | --------------- | ------------- |
135
+ | Research first | `/research` |
136
+ | Plan after spec | `/plan <id>` |
137
+ | Start working | `/start <id>` |