opencodekit 0.15.21 → 0.16.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 (144) hide show
  1. package/dist/index.js +5 -7
  2. package/dist/template/.opencode/AGENTS.md +85 -23
  3. package/dist/template/.opencode/agent/build.md +88 -7
  4. package/dist/template/.opencode/agent/explore.md +1 -1
  5. package/dist/template/.opencode/agent/general.md +54 -4
  6. package/dist/template/.opencode/agent/looker.md +1 -1
  7. package/dist/template/.opencode/agent/painter.md +1 -1
  8. package/dist/template/.opencode/agent/plan.md +52 -0
  9. package/dist/template/.opencode/agent/review.md +1 -1
  10. package/dist/template/.opencode/agent/scout.md +3 -3
  11. package/dist/template/.opencode/agent/vision.md +1 -1
  12. package/dist/template/.opencode/command/create.md +231 -91
  13. package/dist/template/.opencode/command/design.md +40 -7
  14. package/dist/template/.opencode/command/handoff.md +22 -0
  15. package/dist/template/.opencode/command/init.md +49 -78
  16. package/dist/template/.opencode/command/plan.md +36 -16
  17. package/dist/template/.opencode/command/pr.md +15 -0
  18. package/dist/template/.opencode/command/research.md +3 -0
  19. package/dist/template/.opencode/command/resume.md +8 -18
  20. package/dist/template/.opencode/command/review-codebase.md +30 -0
  21. package/dist/template/.opencode/command/ship.md +199 -0
  22. package/dist/template/.opencode/command/start.md +316 -28
  23. package/dist/template/.opencode/command/status.md +24 -1
  24. package/dist/template/.opencode/command/ui-review.md +36 -7
  25. package/dist/template/.opencode/command/verify.md +307 -0
  26. package/dist/template/.opencode/memory/_templates/prd.md +29 -0
  27. package/dist/template/.opencode/memory/_templates/proposal.md +38 -0
  28. package/dist/template/.opencode/memory/_templates/spec.md +66 -0
  29. package/dist/template/.opencode/memory/_templates/tasks.md +198 -0
  30. package/dist/template/.opencode/memory/_templates/tech-stack.md +50 -0
  31. package/dist/template/.opencode/memory/project/tech-stack.md +53 -0
  32. package/dist/template/.opencode/memory/research/ccpm-analysis.md +334 -0
  33. package/dist/template/.opencode/memory/research/openspec-analysis.md +226 -0
  34. package/dist/template/.opencode/memory.db +0 -0
  35. package/dist/template/.opencode/memory.db-shm +0 -0
  36. package/dist/template/.opencode/memory.db-wal +0 -0
  37. package/dist/template/.opencode/opencode.json +18 -4
  38. package/dist/template/.opencode/package.json +1 -0
  39. package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +418 -0
  40. package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +170 -0
  41. package/dist/template/.opencode/plans/1770013678126-witty-planet.md +278 -0
  42. package/dist/template/.opencode/plugin/lib/memory-db.ts +828 -0
  43. package/dist/template/.opencode/plugin/memory.ts +38 -1
  44. package/dist/template/.opencode/skill/index-knowledge/SKILL.md +76 -31
  45. package/dist/template/.opencode/skill/memory-system/SKILL.md +110 -55
  46. package/dist/template/.opencode/skill/tool-priority/SKILL.md +2 -2
  47. package/dist/template/.opencode/tool/memory-get.ts +143 -0
  48. package/dist/template/.opencode/tool/memory-maintain.ts +167 -0
  49. package/dist/template/.opencode/tool/memory-migrate.ts +319 -0
  50. package/dist/template/.opencode/tool/memory-read.ts +17 -46
  51. package/dist/template/.opencode/tool/memory-search.ts +131 -28
  52. package/dist/template/.opencode/tool/memory-timeline.ts +105 -0
  53. package/dist/template/.opencode/tool/memory-update.ts +21 -26
  54. package/dist/template/.opencode/tool/observation.ts +112 -100
  55. package/dist/template/.opencode/tsconfig.json +19 -19
  56. package/package.json +1 -1
  57. package/dist/template/.opencode/command/accessibility-check.md +0 -331
  58. package/dist/template/.opencode/command/agent-browser.md +0 -21
  59. package/dist/template/.opencode/command/analyze-mockup.md +0 -423
  60. package/dist/template/.opencode/command/analyze-project.md +0 -295
  61. package/dist/template/.opencode/command/brainstorm.md +0 -373
  62. package/dist/template/.opencode/command/cloudflare.md +0 -70
  63. package/dist/template/.opencode/command/commit.md +0 -245
  64. package/dist/template/.opencode/command/complete-next-task.md +0 -77
  65. package/dist/template/.opencode/command/design-audit.md +0 -480
  66. package/dist/template/.opencode/command/edit-image.md +0 -242
  67. package/dist/template/.opencode/command/finish.md +0 -255
  68. package/dist/template/.opencode/command/fix-ci.md +0 -109
  69. package/dist/template/.opencode/command/fix-types.md +0 -104
  70. package/dist/template/.opencode/command/fix-ui.md +0 -117
  71. package/dist/template/.opencode/command/fix.md +0 -168
  72. package/dist/template/.opencode/command/frontend-design.md +0 -21
  73. package/dist/template/.opencode/command/generate-diagram.md +0 -349
  74. package/dist/template/.opencode/command/generate-icon.md +0 -283
  75. package/dist/template/.opencode/command/generate-image.md +0 -246
  76. package/dist/template/.opencode/command/generate-pattern.md +0 -247
  77. package/dist/template/.opencode/command/generate-storyboard.md +0 -250
  78. package/dist/template/.opencode/command/implement.md +0 -609
  79. package/dist/template/.opencode/command/import-plan.md +0 -406
  80. package/dist/template/.opencode/command/index-knowledge.md +0 -25
  81. package/dist/template/.opencode/command/integration-test.md +0 -424
  82. package/dist/template/.opencode/command/issue.md +0 -102
  83. package/dist/template/.opencode/command/new-feature.md +0 -651
  84. package/dist/template/.opencode/command/opensrc.md +0 -58
  85. package/dist/template/.opencode/command/quick-build.md +0 -238
  86. package/dist/template/.opencode/command/ralph.md +0 -41
  87. package/dist/template/.opencode/command/research-and-implement.md +0 -148
  88. package/dist/template/.opencode/command/research-ui.md +0 -466
  89. package/dist/template/.opencode/command/restore-image.md +0 -424
  90. package/dist/template/.opencode/command/revert-feature.md +0 -386
  91. package/dist/template/.opencode/command/skill-create.md +0 -517
  92. package/dist/template/.opencode/command/skill-optimize.md +0 -556
  93. package/dist/template/.opencode/command/summarize.md +0 -412
  94. package/dist/template/.opencode/command/triage.md +0 -398
  95. package/dist/template/.opencode/memory/_templates/README.md +0 -35
  96. package/dist/template/.opencode/memory/_templates/observation.md +0 -39
  97. package/dist/template/.opencode/memory/_templates/project/architecture.md +0 -60
  98. package/dist/template/.opencode/memory/_templates/project/commands.md +0 -72
  99. package/dist/template/.opencode/memory/_templates/project/conventions.md +0 -68
  100. package/dist/template/.opencode/memory/_templates/project/gotchas.md +0 -41
  101. package/dist/template/.opencode/memory/_templates/prompt-engineering.md +0 -333
  102. package/dist/template/.opencode/memory/observations/2026-01-22-decision-agents-md-prompt-engineering-improvement.md +0 -29
  103. package/dist/template/.opencode/memory/observations/2026-01-25-decision-agent-roles-build-orchestrates-general-e.md +0 -14
  104. package/dist/template/.opencode/memory/observations/2026-01-25-decision-simplified-swarm-helper-tool-to-fix-type.md +0 -20
  105. package/dist/template/.opencode/memory/observations/2026-01-25-decision-use-beads-as-swarm-board-source-of-truth.md +0 -14
  106. package/dist/template/.opencode/memory/observations/2026-01-25-learning-user-wants-real-swarm-coordination-guida.md +0 -15
  107. package/dist/template/.opencode/memory/observations/2026-01-28-decision-created-deep-research-skill-for-thorough.md +0 -29
  108. package/dist/template/.opencode/memory/observations/2026-01-28-decision-gh-grep-mcp-wrapper-vs-native-grep-searc.md +0 -21
  109. package/dist/template/.opencode/memory/observations/2026-01-28-decision-oracle-tool-optimal-usage-patterns.md +0 -32
  110. package/dist/template/.opencode/memory/observations/2026-01-28-learning-ampcode-deep-mode-research-integration-w.md +0 -42
  111. package/dist/template/.opencode/memory/observations/2026-01-28-pattern-research-delegation-pattern-explore-for-.md +0 -32
  112. package/dist/template/.opencode/memory/observations/2026-01-29-decision-copilot-auth-plugin-rate-limit-handling.md +0 -27
  113. package/dist/template/.opencode/memory/observations/2026-01-29-decision-spec-driven-approach-for-opencodekit.md +0 -21
  114. package/dist/template/.opencode/memory/observations/2026-01-29-learning-karpathy-llm-coding-insights-dec-2025.md +0 -44
  115. package/dist/template/.opencode/memory/observations/2026-01-30-decision-github-copilot-claude-routing-keep-disab.md +0 -32
  116. package/dist/template/.opencode/memory/observations/2026-01-30-discovery-context-management-research-critical-gap.md +0 -14
  117. package/dist/template/.opencode/memory/observations/2026-01-30-discovery-kimi-k2-5-agent-swarm-architecture-patte.md +0 -45
  118. package/dist/template/.opencode/memory/observations/2026-01-30-pattern-swarm-tools-architecture.md +0 -28
  119. package/dist/template/.opencode/memory/observations/2026-01-31-decision-copilot-auth-plugin-updated-with-baseurl.md +0 -63
  120. package/dist/template/.opencode/memory/observations/2026-01-31-decision-created-dedicated-worker-agent-for-swarm.md +0 -20
  121. package/dist/template/.opencode/memory/observations/2026-01-31-decision-rollback-to-v1-1-47-for-copilot-claude-r.md +0 -21
  122. package/dist/template/.opencode/memory/observations/2026-01-31-decision-simplified-swarm-to-task-tool-pattern.md +0 -44
  123. package/dist/template/.opencode/memory/observations/2026-01-31-decision-swarm-architecture-task-tool-over-tmux.md +0 -33
  124. package/dist/template/.opencode/memory/observations/2026-01-31-decision-worker-skills-defined-for-swarm-delegati.md +0 -30
  125. package/dist/template/.opencode/memory/observations/2026-01-31-learning-gpt-reasoning-config-for-github-copilot.md +0 -51
  126. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-auth-comparison-finding.md +0 -61
  127. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-reasoning-architecture-.md +0 -66
  128. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-custom-tools-api.md +0 -48
  129. package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-v1-1-48-skills-as-slash-command.md +0 -21
  130. package/dist/template/.opencode/memory/observations/2026-01-31-learning-swarm-system-simplified-removed-mailbox-.md +0 -30
  131. package/dist/template/.opencode/memory/observations/2026-01-31-learning-v1-1-48-native-copilot-reasoning-via-pr-.md +0 -45
  132. package/dist/template/.opencode/memory/observations/2026-01-31-warning-cannot-add-custom-config-to-opencode-jso.md +0 -18
  133. package/dist/template/.opencode/memory/observations/2026-01-31-warning-copilot-claude-v1-endpoint-returns-404-c.md +0 -48
  134. package/dist/template/.opencode/memory/observations/2026-01-31-warning-opencode-v1-1-48-claude-thinking-block-s.md +0 -51
  135. package/dist/template/.opencode/memory/project/architecture.md +0 -60
  136. package/dist/template/.opencode/memory/project/commands.md +0 -72
  137. package/dist/template/.opencode/memory/project/conventions.md +0 -68
  138. package/dist/template/.opencode/memory/project/gotchas.md +0 -41
  139. package/dist/template/.opencode/skill/notebooklm/SKILL.md +0 -272
  140. package/dist/template/.opencode/skill/notebooklm/references/setup.md +0 -353
  141. package/dist/template/.opencode/tool/notebooklm.ts +0 -488
  142. package/dist/template/.opencode/tool/oracle.ts +0 -240
  143. /package/dist/template/.opencode/memory/{user.example.md → _templates/user.md} +0 -0
  144. /package/dist/template/.opencode/memory/{user.md → project/user.md} +0 -0
@@ -1,651 +0,0 @@
1
- ---
2
- description: Create a new feature with discovery, spec, plan, and sub-tasks
3
- argument-hint: "<feature-name> [--priority=<0-4>] [--type=<type>] [--worktree] [--quick]"
4
- agent: plan
5
- ---
6
-
7
- # New Feature: $ARGUMENTS
8
-
9
- Create a complete feature track with Epic → Task → Subtask hierarchy, proper worktree isolation, and subagent delegation.
10
-
11
- ## Load Skills
12
-
13
- ```typescript
14
- skill({ name: "beads" });
15
- skill({ name: "brainstorming" });
16
- skill({ name: "swarm-coordination" }); // For parallel task execution with Kimi K2.5 PARL
17
- ```
18
-
19
- ## Parse Arguments
20
-
21
- | Argument | Default | Options |
22
- | ------------ | -------- | ------------------------------------ |
23
- | Feature name | required | Descriptive name |
24
- | `--priority` | 2 | 0 (critical) to 4 (backlog) |
25
- | `--type` | feature | feature, bug, refactor, chore |
26
- | `--worktree` | false | Create git worktree for isolation |
27
- | `--quick` | false | Skip brainstorming, use minimal spec |
28
-
29
- ---
30
-
31
- ## Hierarchy Model
32
-
33
- ```
34
- Epic (feature-level)
35
- ├── Task 1 (domain or phase)
36
- │ ├── Subtask 1.1 (atomic work unit)
37
- │ └── Subtask 1.2
38
- ├── Task 2 (blocked by Task 1)
39
- │ └── Subtask 2.1
40
- └── Task 3 (blocked by Task 2)
41
- ```
42
-
43
- | Level | Scope | Typical Duration | Agent Work |
44
- | ------- | ------------ | ---------------- | ------------------------- |
45
- | Epic | Full feature | Days-weeks | Coordinate, not implement |
46
- | Task | Domain/phase | Hours-day | May implement or delegate |
47
- | Subtask | Atomic unit | 30min-2hrs | Implement directly |
48
-
49
- ---
50
-
51
- ## Phase 1: Context Gathering
52
-
53
- Before creating anything, understand the landscape.
54
-
55
- ### Parallel Subagent Research
56
-
57
- ```typescript
58
- // Run both in parallel - multiple Task calls in one message
59
- Task({
60
- subagent_type: "explore",
61
- description: "Explore codebase for feature",
62
- prompt: `Research codebase for "${$ARGUMENTS}":
63
- 1. Find similar implementations or patterns
64
- 2. Identify likely affected directories
65
- 3. Find existing tests in related areas
66
- 4. Check for related beads (open or closed)
67
- Return: File paths, patterns, test locations, related beads`,
68
- });
69
-
70
- Task({
71
- subagent_type: "scout",
72
- description: "Research best practices",
73
- prompt: `Research best practices for "${$ARGUMENTS}":
74
- 1. Industry patterns for this type of feature
75
- 2. Library/framework recommendations
76
- 3. Common pitfalls to avoid
77
- Return: Recommendations, code examples, warnings`,
78
- });
79
-
80
- // Both run in parallel, results available immediately
81
- ```
82
-
83
- ### Check Existing Work
84
-
85
- ```bash
86
- bd list --status all --limit 20 | grep -i "[relevant-terms]"
87
- git log --oneline -10 -- src/[relevant-path]/
88
- ```
89
-
90
- **Report:**
91
-
92
- ```
93
- Context Analysis
94
- ━━━━━━━━━━━━━━━━
95
-
96
- Related beads:
97
- - bd-abc123: "User auth system" (closed)
98
- - bd-def456: "Session management" (in_progress)
99
-
100
- Codebase signals:
101
- - Similar patterns in: src/auth/, src/api/
102
- - Test patterns: src/__tests__/*.test.ts
103
- - Recent activity: 3 commits this week
104
-
105
- External research:
106
- - [Key findings from scout]
107
- ```
108
-
109
- ---
110
-
111
- ## Phase 2: Brainstorming (unless --quick)
112
-
113
- Before filling templates, explore the problem space.
114
-
115
- ### Discovery Questions
116
-
117
- Ask the user (or infer from context):
118
-
119
- 1. **Problem**: What specific problem are we solving?
120
- 2. **Users**: Who benefits from this feature?
121
- 3. **Success**: How will we know it's working?
122
- 4. **Alternatives**: What other approaches exist?
123
- 5. **Risks**: What could go wrong?
124
- 6. **Dependencies**: What does this need to work?
125
- 7. **Scope**: What's explicitly NOT included?
126
-
127
- ### Present Options
128
-
129
- ```
130
- Brainstorming: [Feature Name]
131
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━
132
-
133
- Problem understood:
134
- [Summarize the core problem]
135
-
136
- Considered approaches:
137
- 1. [Approach A] - Pros: [...] Cons: [...]
138
- 2. [Approach B] - Pros: [...] Cons: [...]
139
- 3. [Approach C] - Pros: [...] Cons: [...]
140
-
141
- Recommended approach: [X]
142
- Rationale: [Why this approach]
143
-
144
- Key risks identified:
145
- - [Risk 1]: Mitigation: [...]
146
- - [Risk 2]: Mitigation: [...]
147
-
148
- ```
149
-
150
- **STOP. Use question tool to get user approval:**
151
-
152
- ```typescript
153
- question({
154
- questions: [
155
- {
156
- header: "Approve",
157
- question: "Should I proceed with creating the specification for $ARGUMENTS?",
158
- options: [
159
- {
160
- label: "Yes, proceed",
161
- description: "Approach looks good, create spec",
162
- },
163
- {
164
- label: "Modify approach",
165
- description: "Need changes to brainstorming",
166
- },
167
- { label: "Explore more", description: "Need more research first" },
168
- ],
169
- },
170
- ],
171
- });
172
- ```
173
-
174
- **Wait for user's answer before proceeding to spec creation.**
175
-
176
- ---
177
-
178
- ## Phase 3: Create Epic Bead
179
-
180
- ```bash
181
- bd create "[Feature Name]" -t epic -p [priority]
182
- ```
183
-
184
- Capture the bead ID (e.g., `bd-a1b2c3`) for artifact creation.
185
-
186
- ```bash
187
- mkdir -p .beads/artifacts/[bead-id]
188
- ```
189
-
190
- ---
191
-
192
- ## Phase 4: Create Specification
193
-
194
- Write `.beads/artifacts/[bead-id]/spec.md`:
195
-
196
- ```markdown
197
- # [Feature Name] Specification
198
-
199
- ## Overview
200
-
201
- [1-2 paragraph summary of the feature]
202
-
203
- ## Problem Statement
204
-
205
- **Current state:** [What exists now / what's broken]
206
- **Desired state:** [What we want to achieve]
207
- **Gap:** [The specific problem to solve]
208
-
209
- ## User Stories
210
-
211
- - As a [user type], I want [goal], so that [benefit]
212
- - As a [user type], I want [goal], so that [benefit]
213
-
214
- ## Acceptance Criteria
215
-
216
- Must-have (P0):
217
-
218
- - [ ] [Criterion 1]
219
- - [ ] [Criterion 2]
220
-
221
- Should-have (P1):
222
-
223
- - [ ] [Criterion 3]
224
-
225
- Nice-to-have (P2):
226
-
227
- - [ ] [Criterion 4]
228
-
229
- ## Technical Design
230
-
231
- ### Approach
232
-
233
- [Chosen approach from brainstorming]
234
-
235
- ### Architecture Changes
236
-
237
- - [Component 1]: [Change description]
238
- - [Component 2]: [Change description]
239
-
240
- ### Files Affected
241
-
242
- | File | Change |
243
- | --------- | -------------- |
244
- | `src/...` | [What changes] |
245
-
246
- ### Dependencies
247
-
248
- - External: [APIs, services, libraries]
249
- - Internal: [Other features, beads]
250
-
251
- ## Estimation
252
-
253
- | Size | Effort | Confidence |
254
- | ---------- | ----------- | ----------------- |
255
- | [S/M/L/XL] | [X-Y hours] | [High/Medium/Low] |
256
-
257
- ## Risks
258
-
259
- | Risk | Likelihood | Impact | Mitigation |
260
- | -------- | ---------- | ------ | --------------- |
261
- | [Risk 1] | Medium | High | [How to handle] |
262
-
263
- ## Out of Scope
264
-
265
- - [Thing 1]
266
- - [Thing 2]
267
-
268
- ## Success Metrics
269
-
270
- - [ ] [Metric 1]: [Target]
271
- - [ ] [Metric 2]: [Target]
272
- ```
273
-
274
- ---
275
-
276
- ## Phase 5: Create Task Breakdown
277
-
278
- Decompose epic into tasks, tasks into subtasks.
279
-
280
- ### Decomposition Rules
281
-
282
- | Signal | Create Separate Task |
283
- | --------------------------------------------- | -------------------- |
284
- | Different domain (frontend vs backend) | Yes |
285
- | Natural phase boundary | Yes |
286
- | Could be done in parallel by different agents | Yes |
287
- | Strong dependency chain | Yes, with blockers |
288
- | Same file, same concern | No - keep together |
289
-
290
- ### Task Creation with Dependencies
291
-
292
- ```bash
293
- # Phase 1: Foundation (no blockers - starts immediately)
294
- bd create "Setup database schema" -t task -p 2
295
- # Returns: bd-xxx1
296
-
297
- # Phase 2: Core (blocked by Phase 1)
298
- bd create "Implement core API endpoints" -t task -p 2
299
- bd dep add bd-xxx2 bd-xxx1 --type blocks
300
- # Returns: bd-xxx2
301
-
302
- # Phase 3: Frontend (blocked by Phase 2)
303
- bd create "Build UI components" -t task -p 2
304
- bd dep add bd-xxx3 bd-xxx2 --type blocks
305
- # Returns: bd-xxx3
306
-
307
- # Phase 4: Integration (blocked by Phase 3)
308
- bd create "Integration and E2E tests" -t task -p 2
309
- bd dep add bd-xxx4 bd-xxx3 --type blocks
310
- # Returns: bd-xxx4
311
-
312
- # Link all tasks to epic
313
- bd dep add bd-xxx1 [epic-id]
314
- bd dep add bd-xxx2 [epic-id]
315
- bd dep add bd-xxx3 [epic-id]
316
- bd dep add bd-xxx4 [epic-id]
317
- ```
318
-
319
- ### Subtask Creation (for complex tasks)
320
-
321
- ```bash
322
- # For Task 2 (API endpoints), create subtasks:
323
- bd create "POST /api/users endpoint" -t subtask -p 2
324
- bd dep add bd-xxx2.1 bd-xxx2
325
-
326
- bd create "GET /api/users/:id endpoint" -t subtask -p 2
327
- bd dep add bd-xxx2.2 bd-xxx2
328
- bd dep add bd-xxx2.2 bd-xxx2.1 --type blocks # Sequential if needed
329
- ```
330
-
331
- ### Verify Hierarchy
332
-
333
- ```bash
334
- bd dep tree [epic-id]
335
- ```
336
-
337
- Expected output:
338
-
339
- ```
340
- bd-epic: [Feature Name]
341
- ├── bd-xxx1: Setup database schema ← READY
342
- ├── bd-xxx2: Implement core API (blocked by bd-xxx1)
343
- │ ├── bd-xxx2.1: POST /api/users
344
- │ └── bd-xxx2.2: GET /api/users/:id (blocked by bd-xxx2.1)
345
- ├── bd-xxx3: Build UI components (blocked by bd-xxx2)
346
- └── bd-xxx4: Integration tests (blocked by bd-xxx3)
347
- ```
348
-
349
- ---
350
-
351
- ## Phase 6: Create Implementation Plan
352
-
353
- Write `.beads/artifacts/[bead-id]/plan.md`:
354
-
355
- ```markdown
356
- # [Feature Name] Implementation Plan
357
-
358
- **Epic:** [bead-id]
359
- **Estimated effort:** [X-Y hours total]
360
- **Approach:** [Selected from brainstorming]
361
-
362
- ## Task 1: [Title] [S/M]
363
-
364
- **Bead:** bd-xxx1
365
- **Estimate:** 2-4 hours
366
- **Blocked by:** None (start immediately)
367
-
368
- Work:
369
-
370
- - [ ] [Specific task]
371
- - [ ] [Specific task]
372
-
373
- Verify: `[command to verify]`
374
-
375
- ---
376
-
377
- ## Task 2: [Title] [M]
378
-
379
- **Bead:** bd-xxx2
380
- **Estimate:** 4-6 hours
381
- **Blocked by:** Task 1
382
-
383
- Subtasks:
384
-
385
- - bd-xxx2.1: [Subtask title]
386
- - bd-xxx2.2: [Subtask title]
387
-
388
- Work:
389
-
390
- - [ ] [Specific task]
391
-
392
- Verify: `[command to verify]`
393
-
394
- ---
395
-
396
- [Continue for all tasks...]
397
-
398
- ## Verification Checklist
399
-
400
- - [ ] All acceptance criteria met
401
- - [ ] Tests pass: `npm test`
402
- - [ ] Types check: `npm run typecheck`
403
- - [ ] Lint clean: `npm run lint`
404
-
405
- ## Rollback Plan
406
-
407
- If issues detected:
408
-
409
- 1. [Step 1]
410
- 2. [Step 2]
411
- ```
412
-
413
- ---
414
-
415
- ## Phase 7: Worktree Setup (if --worktree)
416
-
417
- For epic-level work, create an isolated workspace:
418
-
419
- ```typescript
420
- skill({ name: "using-git-worktrees" });
421
- ```
422
-
423
- ```bash
424
- # Ensure .gitignore has worktree directory
425
- grep -q "^\.worktrees/$" .gitignore || echo ".worktrees/" >> .gitignore
426
-
427
- # Get current branch (parent branch)
428
- PARENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
429
-
430
- # Create readable branch name from feature name
431
- FEATURE_SLUG=$(echo "[feature-name]" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | cut -c1-40)
432
-
433
- # Create branch: <parent>/feat/<epic-id>-<description>
434
- BRANCH_NAME="${PARENT_BRANCH}/feat/[epic-id]-${FEATURE_SLUG}"
435
-
436
- # Create worktree for the epic with readable branch
437
- git worktree add ".worktrees/[epic-id]" -b "$BRANCH_NAME"
438
-
439
- # Setup in worktree
440
- cd .worktrees/[epic-id]
441
- npm install # or appropriate setup
442
-
443
- # Verify clean baseline
444
- npm test
445
- ```
446
-
447
- **Worktree + Beads Integration:**
448
-
449
- - `.beads/` database is shared (main repo)
450
- - All `bd` commands work normally
451
- - Commits go to the feature branch
452
- - Merge back to main when epic complete
453
-
454
- ---
455
-
456
- ## Phase 8: Parallel Task Execution with Swarm (Kimi K2.5 PARL)
457
-
458
- If multiple tasks are READY (no blockers), execute them in parallel using swarm coordination:
459
-
460
- ### Step 1: Analyze Tasks for Parallelization
461
-
462
- ```bash
463
- # Check what's ready
464
- bd ready --json
465
- ```
466
-
467
- ```typescript
468
- // Get all READY tasks
469
- const readyTasks = await getReadyTasks($ARGUMENTS);
470
-
471
- // Analyze if swarm mode is beneficial
472
- const analysis = await swarm_plan({
473
- operation: "analyze",
474
- task: `Implement ${$ARGUMENTS} with ${readyTasks.length} parallel tasks`,
475
- files: readyTasks.map((t) => t.files).join(","),
476
- });
477
-
478
- console.log(`Classification: ${analysis.classification.type}`);
479
- console.log(`Recommended agents: ${analysis.classification.recommended_agents}`);
480
- ```
481
-
482
- ### Step 2: Setup Swarm Coordination
483
-
484
- ```typescript
485
- const teamName = `${$ARGUMENTS}-swarm-${Date.now()}`;
486
-
487
- // Create delegation packets for each READY task
488
- for (const task of readyTasks) {
489
- swarm_delegate({
490
- bead_id: task.id,
491
- title: `Execute ${task.id}: ${task.title}`,
492
- expected_outcome: "Task completed with verification passing",
493
- required_tools: "read, grep, lsp, edit, bash",
494
- must_do: "LSP before edits, run verification, report progress via swarm-monitor",
495
- must_not_do: "No new deps, don't edit files outside task scope",
496
- acceptance_checks: "typecheck: npm run typecheck, lint: npm run lint, test: npm test",
497
- context: `Part of epic ${$ARGUMENTS}. Team: ${teamName}`,
498
- write: true,
499
- });
500
- }
501
- ```
502
-
503
- ### Step 3: Spawn Worker Swarm
504
-
505
- ```typescript
506
- // Launch all workers in parallel
507
- for (const task of readyTasks) {
508
- Task({
509
- subagent_type: "build",
510
- description: `Execute ${task.id}`,
511
- prompt: `Execute bead ${task.id}: ${task.title}
512
-
513
- ## Delegation
514
- Read: .beads/artifacts/${task.id}/delegation.md
515
-
516
- ## Coordination
517
- Team: ${teamName}
518
- Worker: worker-${task.id}
519
-
520
- ## Protocol
521
- 1. Read delegation packet
522
- 2. Report START: swarm-monitor({ operation: "progress_update", team_name: "${teamName}", worker_id: "worker-${task.id}", phase: "implement", progress: 0, status: "working" })
523
- 3. Execute task
524
- 4. Report PROGRESS (every 25%): swarm-monitor({ operation: "progress_update", ...progress: 25/50/75, file: "current-file.ts" })
525
- 5. Run acceptance checks
526
- 6. Report DONE: swarm-monitor({ operation: "progress_update", ...progress: 100, status: "completed" })
527
- 7. Close bead: bd close ${task.id} --reason "Completed via swarm"
528
-
529
- Return: DONE: <summary> or ERROR: <issue>`,
530
- });
531
- }
532
- ```
533
-
534
- ### Step 4: Monitor with TUI
535
-
536
- ```typescript
537
- // Monitor loop with beautiful UI
538
- let allComplete = false;
539
- while (!allComplete) {
540
- // Render TUI block
541
- const ui = await swarm_monitor({
542
- operation: "render_block",
543
- team_name: teamName
544
- });
545
- console.log(ui);
546
-
547
- // Check status
548
- const status = await swarm_monitor({
549
- operation: "status",
550
- team_name: teamName
551
- });
552
- const stats = JSON.parse(status).summary;
553
-
554
- allComplete = stats.completed === stats.total_workers;
555
-
556
- if (!allComplete) {
557
- await new Promise(r => setTimeout(r, 3000));
558
- }
559
- }
560
-
561
- // Cleanup
562
- await swarm_monitor({ operation: "clear", team_name: teamName });
563
-
564
- // Check newly unblocked tasks
565
- bd ready // → Tasks that were blocked now READY
566
- ```
567
-
568
- **Swarm Execution Rules:**
569
-
570
- - Only fire tasks that are READY (no unresolved blockers)
571
- - Use `swarm-plan analyze` to determine optimal agent count
572
- - Workers report progress via `swarm-monitor progress_update`
573
- - Monitor with `swarm-monitor render_block` for TUI
574
- - Cleanup with `swarm-monitor clear` when done
575
-
576
- ---
577
-
578
- ## Phase 9: Sync and Report
579
-
580
- ```bash
581
- bd sync
582
- ```
583
-
584
- **Output:**
585
-
586
- ```
587
- Feature Created: [Feature Name]
588
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
589
-
590
- Epic: [bead-id]
591
- Priority: P[X]
592
- Estimated effort: [X-Y hours]
593
-
594
- Artifacts:
595
- ├── .beads/artifacts/[bead-id]/spec.md
596
- └── .beads/artifacts/[bead-id]/plan.md
597
-
598
- Hierarchy:
599
- ├── [task-id-1]: [Title] [S] ← READY
600
- ├── [task-id-2]: [Title] [M] → blocked by task-1
601
- │ ├── [subtask-2.1]: [Title]
602
- │ └── [subtask-2.2]: [Title]
603
- ├── [task-id-3]: [Title] [M] → blocked by task-2
604
- └── [task-id-4]: [Title] [S] → blocked by task-3
605
-
606
- Workspace: [main | worktree: .worktrees/[epic-id]]
607
-
608
- Next Steps:
609
- ├── Start first task: /start [task-id-1]
610
- ├── View ready work: bd ready
611
- └── View full tree: bd dep tree [epic-id]
612
- ```
613
-
614
- ---
615
-
616
- ## Quick Mode (--quick)
617
-
618
- Skip brainstorming, minimal spec:
619
-
620
- - No discovery questions
621
- - Single-paragraph spec
622
- - Flat task list (no subtasks)
623
- - No worktree
624
-
625
- Use for: Small features, bug fixes, well-understood work.
626
-
627
- ---
628
-
629
- ## Subagent Delegation Summary
630
-
631
- | Phase | Subagent | Purpose |
632
- | ------------------ | ---------- | -------------------------- |
633
- | Context gathering | `@explore` | Find codebase patterns |
634
- | Context gathering | `@scout` | Research best practices |
635
- | Brainstorming | None | Interactive with user |
636
- | Spec/Plan creation | None | Planner writes artifacts |
637
- | Implementation | `@build` | `/start` then `/implement` |
638
-
639
- **Key Rule:** Planner creates structure, Build executes work. Subagents research, leaders act.
640
-
641
- ---
642
-
643
- ## Related Commands
644
-
645
- | Need | Command |
646
- | -------------------- | --------------------------- |
647
- | Start first task | `/start <task-id>` |
648
- | View feature status | `bd dep tree <epic-id>` |
649
- | Import external plan | `/import-plan` |
650
- | Complete feature | `/finish <epic-id>` |
651
- | Abandon feature | `/revert-feature <epic-id>` |
@@ -1,58 +0,0 @@
1
- ---
2
- description: Clone a repo and enhance with AGENTS.md knowledge base
3
- ---
4
-
5
- Clone a repository using opensrc and generate hierarchical AGENTS.md documentation.
6
-
7
- ## Workflow
8
-
9
- ### Step 1: Load opensrc skill
10
-
11
- ```
12
- skill({ name: 'opensrc' })
13
- ```
14
-
15
- ### Step 2: Clone the repository
16
-
17
- ```bash
18
- npx opensrc <repo>
19
- ```
20
-
21
- Where `<repo>` is extracted from the user request (supports `owner/repo`, `github:owner/repo`, full URL, etc.)
22
-
23
- ### Step 3: Navigate to cloned repo
24
-
25
- After clone completes, cd into the repo:
26
-
27
- ```bash
28
- cd opensrc/repos/github.com/<owner>/<repo>/
29
- ```
30
-
31
- Parse owner/repo from the input or from `opensrc/sources.json` after clone.
32
-
33
- ### Step 4: Load index-knowledge skill
34
-
35
- ```
36
- skill({ name: 'index-knowledge' })
37
- ```
38
-
39
- Execute in **update mode** (default) - modify existing AGENTS.md + create new where warranted.
40
-
41
- ### Step 5: Report completion
42
-
43
- ```
44
- === opensrc Complete ===
45
-
46
- Repository: <owner>/<repo>
47
- Location: opensrc/repos/github.com/<owner>/<repo>/
48
-
49
- AGENTS.md files generated:
50
- ✓ ./AGENTS.md (root)
51
- ✓ ./src/... (if applicable)
52
-
53
- The repository is now enhanced with agent context.
54
- ```
55
-
56
- <user-request>
57
- $ARGUMENTS
58
- </user-request>