opencodekit 0.15.21 → 0.16.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.
- package/dist/index.js +5 -7
- package/dist/template/.opencode/AGENTS.md +21 -20
- package/dist/template/.opencode/agent/build.md +88 -7
- package/dist/template/.opencode/agent/explore.md +1 -1
- package/dist/template/.opencode/agent/general.md +54 -4
- package/dist/template/.opencode/agent/looker.md +1 -1
- package/dist/template/.opencode/agent/painter.md +1 -1
- package/dist/template/.opencode/agent/plan.md +52 -0
- package/dist/template/.opencode/agent/review.md +1 -1
- package/dist/template/.opencode/agent/scout.md +3 -3
- package/dist/template/.opencode/agent/vision.md +1 -1
- package/dist/template/.opencode/command/create.md +201 -95
- package/dist/template/.opencode/command/design.md +5 -7
- package/dist/template/.opencode/command/handoff.md +7 -0
- package/dist/template/.opencode/command/init.md +25 -47
- package/dist/template/.opencode/command/plan.md +35 -16
- package/dist/template/.opencode/command/resume.md +7 -18
- package/dist/template/.opencode/command/ship.md +156 -0
- package/dist/template/.opencode/command/start.md +315 -28
- package/dist/template/.opencode/command/ui-review.md +5 -7
- package/dist/template/.opencode/command/verify.md +279 -0
- package/dist/template/.opencode/memory/_templates/README.md +57 -19
- package/dist/template/.opencode/memory/_templates/prd.md +29 -0
- package/dist/template/.opencode/memory/_templates/project/tech-stack.md +50 -0
- package/dist/template/.opencode/memory/_templates/proposal.md +38 -0
- package/dist/template/.opencode/memory/_templates/spec.md +66 -0
- package/dist/template/.opencode/memory/_templates/tasks.md +198 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-add-skills-vs-commands-to-global-agents-.md +15 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-build-agent-auto-loads-skills-contextual.md +31 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-fixed-agent-configuration-for-opencodeki.md +25 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-focused-agents-md-upgrade-for-opencode-k.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-implement-tier-1-permission-upgrades.md +15 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-instructions-config-explicit-paths-not-w.md +40 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-merged-context-into-memory-project-singl.md +42 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-oracle-tool-should-use-review-agent-not-.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-agent-auto-loads-skills-contextuall.md +31 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-plan-phased-oracle-command-merge-into-ne.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-prd-workflow-uses-prd-and-prd-task-skill.md +23 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-prefer-review-agent-via-opencode-cli-ove.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-add-ship-command-with.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command-.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-oracle-tool-and-add-ship-command.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-remove-skills-vs-commands-section-from-a.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-tool-with-ship-command-fl.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-oracle-with-ship-command-workflo.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-replace-proxypal-oracle-with-cli-review-.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-dist-template-only-tech-stack.md +50 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-simplified-templates-only-tech-stack-md.md +26 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-subagents-load-minimal-skills-stay-lean.md +29 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-decision-user-approved-permission-upgrades-in-ope.md +15 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-discovery-verify-command-already-implemented.md +28 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-feature-openspec-phase-b-complete-template-upgra.md +43 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-build-agent-should-use-dynamic-lsp-not-f.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-kimi-k2-5-model-requires-temperature-1-0.md +22 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-already-imple.md +27 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-opencode-context-injection-uses-instruct.md +35 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-update-build-agent-prompt-to-use-context.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-using-opencode-expert-.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-g.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-upgrade-agents-md-with-opencode-expert-r.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-prefers-copilot-gpt-5-2-codex-mediu.md +14 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-contextu.md +15 -0
- package/dist/template/.opencode/memory/observations/2026-02-01-learning-user-wants-general-agent-prompt-reviewed.md +15 -0
- package/dist/template/.opencode/memory/project/command-rules.md +122 -0
- package/dist/template/.opencode/memory/project/tech-stack.md +50 -0
- package/dist/template/.opencode/memory/research/ccpm-analysis.md +334 -0
- package/dist/template/.opencode/memory/research/openspec-analysis.md +226 -0
- package/dist/template/.opencode/opencode.json +916 -803
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +2 -2
- package/package.json +1 -1
- package/dist/template/.opencode/command/accessibility-check.md +0 -331
- package/dist/template/.opencode/command/agent-browser.md +0 -21
- package/dist/template/.opencode/command/analyze-mockup.md +0 -423
- package/dist/template/.opencode/command/analyze-project.md +0 -295
- package/dist/template/.opencode/command/brainstorm.md +0 -373
- package/dist/template/.opencode/command/cloudflare.md +0 -70
- package/dist/template/.opencode/command/commit.md +0 -245
- package/dist/template/.opencode/command/complete-next-task.md +0 -77
- package/dist/template/.opencode/command/design-audit.md +0 -480
- package/dist/template/.opencode/command/edit-image.md +0 -242
- package/dist/template/.opencode/command/finish.md +0 -255
- package/dist/template/.opencode/command/fix-ci.md +0 -109
- package/dist/template/.opencode/command/fix-types.md +0 -104
- package/dist/template/.opencode/command/fix-ui.md +0 -117
- package/dist/template/.opencode/command/fix.md +0 -168
- package/dist/template/.opencode/command/frontend-design.md +0 -21
- package/dist/template/.opencode/command/generate-diagram.md +0 -349
- package/dist/template/.opencode/command/generate-icon.md +0 -283
- package/dist/template/.opencode/command/generate-image.md +0 -246
- package/dist/template/.opencode/command/generate-pattern.md +0 -247
- package/dist/template/.opencode/command/generate-storyboard.md +0 -250
- package/dist/template/.opencode/command/implement.md +0 -609
- package/dist/template/.opencode/command/import-plan.md +0 -406
- package/dist/template/.opencode/command/index-knowledge.md +0 -25
- package/dist/template/.opencode/command/integration-test.md +0 -424
- package/dist/template/.opencode/command/issue.md +0 -102
- package/dist/template/.opencode/command/new-feature.md +0 -651
- package/dist/template/.opencode/command/opensrc.md +0 -58
- package/dist/template/.opencode/command/quick-build.md +0 -238
- package/dist/template/.opencode/command/ralph.md +0 -41
- package/dist/template/.opencode/command/research-and-implement.md +0 -148
- package/dist/template/.opencode/command/research-ui.md +0 -466
- package/dist/template/.opencode/command/restore-image.md +0 -424
- package/dist/template/.opencode/command/revert-feature.md +0 -386
- package/dist/template/.opencode/command/skill-create.md +0 -517
- package/dist/template/.opencode/command/skill-optimize.md +0 -556
- package/dist/template/.opencode/command/summarize.md +0 -412
- package/dist/template/.opencode/command/triage.md +0 -398
- package/dist/template/.opencode/memory/_templates/project/architecture.md +0 -60
- package/dist/template/.opencode/memory/_templates/project/commands.md +0 -72
- package/dist/template/.opencode/memory/_templates/project/conventions.md +0 -68
- package/dist/template/.opencode/memory/_templates/project/gotchas.md +0 -41
- package/dist/template/.opencode/skill/notebooklm/SKILL.md +0 -272
- package/dist/template/.opencode/skill/notebooklm/references/setup.md +0 -353
- package/dist/template/.opencode/tool/notebooklm.ts +0 -488
- package/dist/template/.opencode/tool/oracle.ts +0 -240
|
@@ -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>
|