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.
- package/dist/index.js +5 -7
- package/dist/template/.opencode/AGENTS.md +85 -23
- 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 +231 -91
- package/dist/template/.opencode/command/design.md +40 -7
- package/dist/template/.opencode/command/handoff.md +22 -0
- package/dist/template/.opencode/command/init.md +49 -78
- package/dist/template/.opencode/command/plan.md +36 -16
- package/dist/template/.opencode/command/pr.md +15 -0
- package/dist/template/.opencode/command/research.md +3 -0
- package/dist/template/.opencode/command/resume.md +8 -18
- package/dist/template/.opencode/command/review-codebase.md +30 -0
- package/dist/template/.opencode/command/ship.md +199 -0
- package/dist/template/.opencode/command/start.md +316 -28
- package/dist/template/.opencode/command/status.md +24 -1
- package/dist/template/.opencode/command/ui-review.md +36 -7
- package/dist/template/.opencode/command/verify.md +307 -0
- package/dist/template/.opencode/memory/_templates/prd.md +29 -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/_templates/tech-stack.md +50 -0
- package/dist/template/.opencode/memory/project/tech-stack.md +53 -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/memory.db +0 -0
- package/dist/template/.opencode/memory.db-shm +0 -0
- package/dist/template/.opencode/memory.db-wal +0 -0
- package/dist/template/.opencode/opencode.json +18 -4
- package/dist/template/.opencode/package.json +1 -0
- package/dist/template/.opencode/plans/1770006237537-mighty-otter.md +418 -0
- package/dist/template/.opencode/plans/1770006913647-glowing-forest.md +170 -0
- package/dist/template/.opencode/plans/1770013678126-witty-planet.md +278 -0
- package/dist/template/.opencode/plugin/lib/memory-db.ts +828 -0
- package/dist/template/.opencode/plugin/memory.ts +38 -1
- package/dist/template/.opencode/skill/index-knowledge/SKILL.md +76 -31
- package/dist/template/.opencode/skill/memory-system/SKILL.md +110 -55
- package/dist/template/.opencode/skill/tool-priority/SKILL.md +2 -2
- package/dist/template/.opencode/tool/memory-get.ts +143 -0
- package/dist/template/.opencode/tool/memory-maintain.ts +167 -0
- package/dist/template/.opencode/tool/memory-migrate.ts +319 -0
- package/dist/template/.opencode/tool/memory-read.ts +17 -46
- package/dist/template/.opencode/tool/memory-search.ts +131 -28
- package/dist/template/.opencode/tool/memory-timeline.ts +105 -0
- package/dist/template/.opencode/tool/memory-update.ts +21 -26
- package/dist/template/.opencode/tool/observation.ts +112 -100
- package/dist/template/.opencode/tsconfig.json +19 -19
- 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/README.md +0 -35
- package/dist/template/.opencode/memory/_templates/observation.md +0 -39
- 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/memory/_templates/prompt-engineering.md +0 -333
- package/dist/template/.opencode/memory/observations/2026-01-22-decision-agents-md-prompt-engineering-improvement.md +0 -29
- package/dist/template/.opencode/memory/observations/2026-01-25-decision-agent-roles-build-orchestrates-general-e.md +0 -14
- package/dist/template/.opencode/memory/observations/2026-01-25-decision-simplified-swarm-helper-tool-to-fix-type.md +0 -20
- package/dist/template/.opencode/memory/observations/2026-01-25-decision-use-beads-as-swarm-board-source-of-truth.md +0 -14
- package/dist/template/.opencode/memory/observations/2026-01-25-learning-user-wants-real-swarm-coordination-guida.md +0 -15
- package/dist/template/.opencode/memory/observations/2026-01-28-decision-created-deep-research-skill-for-thorough.md +0 -29
- package/dist/template/.opencode/memory/observations/2026-01-28-decision-gh-grep-mcp-wrapper-vs-native-grep-searc.md +0 -21
- package/dist/template/.opencode/memory/observations/2026-01-28-decision-oracle-tool-optimal-usage-patterns.md +0 -32
- package/dist/template/.opencode/memory/observations/2026-01-28-learning-ampcode-deep-mode-research-integration-w.md +0 -42
- package/dist/template/.opencode/memory/observations/2026-01-28-pattern-research-delegation-pattern-explore-for-.md +0 -32
- package/dist/template/.opencode/memory/observations/2026-01-29-decision-copilot-auth-plugin-rate-limit-handling.md +0 -27
- package/dist/template/.opencode/memory/observations/2026-01-29-decision-spec-driven-approach-for-opencodekit.md +0 -21
- package/dist/template/.opencode/memory/observations/2026-01-29-learning-karpathy-llm-coding-insights-dec-2025.md +0 -44
- package/dist/template/.opencode/memory/observations/2026-01-30-decision-github-copilot-claude-routing-keep-disab.md +0 -32
- package/dist/template/.opencode/memory/observations/2026-01-30-discovery-context-management-research-critical-gap.md +0 -14
- package/dist/template/.opencode/memory/observations/2026-01-30-discovery-kimi-k2-5-agent-swarm-architecture-patte.md +0 -45
- package/dist/template/.opencode/memory/observations/2026-01-30-pattern-swarm-tools-architecture.md +0 -28
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-copilot-auth-plugin-updated-with-baseurl.md +0 -63
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-created-dedicated-worker-agent-for-swarm.md +0 -20
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-rollback-to-v1-1-47-for-copilot-claude-r.md +0 -21
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-simplified-swarm-to-task-tool-pattern.md +0 -44
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-swarm-architecture-task-tool-over-tmux.md +0 -33
- package/dist/template/.opencode/memory/observations/2026-01-31-decision-worker-skills-defined-for-swarm-delegati.md +0 -30
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-gpt-reasoning-config-for-github-copilot.md +0 -51
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-auth-comparison-finding.md +0 -61
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-copilot-reasoning-architecture-.md +0 -66
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-custom-tools-api.md +0 -48
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-opencode-v1-1-48-skills-as-slash-command.md +0 -21
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-swarm-system-simplified-removed-mailbox-.md +0 -30
- package/dist/template/.opencode/memory/observations/2026-01-31-learning-v1-1-48-native-copilot-reasoning-via-pr-.md +0 -45
- package/dist/template/.opencode/memory/observations/2026-01-31-warning-cannot-add-custom-config-to-opencode-jso.md +0 -18
- package/dist/template/.opencode/memory/observations/2026-01-31-warning-copilot-claude-v1-endpoint-returns-404-c.md +0 -48
- package/dist/template/.opencode/memory/observations/2026-01-31-warning-opencode-v1-1-48-claude-thinking-block-s.md +0 -51
- package/dist/template/.opencode/memory/project/architecture.md +0 -60
- package/dist/template/.opencode/memory/project/commands.md +0 -72
- package/dist/template/.opencode/memory/project/conventions.md +0 -68
- package/dist/template/.opencode/memory/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
- /package/dist/template/.opencode/memory/{user.example.md → _templates/user.md} +0 -0
- /package/dist/template/.opencode/memory/{user.md → project/user.md} +0 -0
|
@@ -1,171 +1,311 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Create a
|
|
3
|
-
argument-hint: "[
|
|
4
|
-
agent:
|
|
2
|
+
description: Create a specification for a bead using templates
|
|
3
|
+
argument-hint: "<bead-id> [--prd] [--proposal]"
|
|
4
|
+
agent: plan
|
|
5
|
+
subtask: true
|
|
5
6
|
---
|
|
6
7
|
|
|
7
8
|
# Create: $ARGUMENTS
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
Create structured artifacts for a bead using templates. This is the first step before planning.
|
|
10
11
|
|
|
11
|
-
##
|
|
12
|
+
## Parse Arguments
|
|
12
13
|
|
|
13
|
-
|
|
14
|
+
| Argument | Default | Description |
|
|
15
|
+
| ------------ | -------- | ------------------------------------ |
|
|
16
|
+
| `<bead-id>` | required | The bead to create artifacts for |
|
|
17
|
+
| `--prd` | false | Use PRD template (combined format) |
|
|
18
|
+
| `--proposal` | false | Create proposal.md first (for epics) |
|
|
14
19
|
|
|
15
|
-
|
|
20
|
+
## Load Skills
|
|
16
21
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
```typescript
|
|
23
|
+
skill({ name: "beads" });
|
|
24
|
+
skill({ name: "brainstorming" });
|
|
25
|
+
skill({ name: "memory-system" });
|
|
26
|
+
```
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
2. Bug, feature, or task?
|
|
23
|
-
3. What's the acceptance criteria?
|
|
24
|
-
4. Any constraints?
|
|
28
|
+
## Check Memory First
|
|
25
29
|
|
|
26
|
-
|
|
30
|
+
Search for similar specs and patterns before creating:
|
|
27
31
|
|
|
28
|
-
|
|
32
|
+
```typescript
|
|
33
|
+
// Find similar past specs
|
|
34
|
+
memory_search({ query: "[bead title/description]", limit: 3 });
|
|
29
35
|
|
|
30
|
-
|
|
31
|
-
|
|
36
|
+
// Find related patterns and conventions
|
|
37
|
+
memory_search({ query: "[domain keywords] spec requirements", limit: 3 });
|
|
38
|
+
```
|
|
32
39
|
|
|
33
|
-
|
|
40
|
+
Review findings for:
|
|
34
41
|
|
|
35
|
-
|
|
42
|
+
- Similar specs that worked well (reuse structure)
|
|
43
|
+
- Patterns and conventions already established
|
|
44
|
+
- Gotchas to avoid in this domain
|
|
36
45
|
|
|
37
|
-
|
|
46
|
+
## Load Bead Context
|
|
38
47
|
|
|
39
48
|
```bash
|
|
40
|
-
bd
|
|
49
|
+
bd show $ARGUMENTS
|
|
41
50
|
```
|
|
42
51
|
|
|
43
|
-
|
|
52
|
+
Check what artifacts already exist:
|
|
44
53
|
|
|
45
54
|
```bash
|
|
46
|
-
|
|
55
|
+
ls .beads/artifacts/$ARGUMENTS/ 2>/dev/null || echo "No artifacts yet"
|
|
47
56
|
```
|
|
48
57
|
|
|
49
|
-
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Phase 1: Setup Artifact Directory
|
|
50
61
|
|
|
51
62
|
```bash
|
|
52
|
-
|
|
63
|
+
BEAD_DIR=".beads/artifacts/$ARGUMENTS"
|
|
64
|
+
mkdir -p "$BEAD_DIR"
|
|
53
65
|
```
|
|
54
66
|
|
|
55
|
-
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Phase 2: Choose Template
|
|
70
|
+
|
|
71
|
+
Based on flags and bead type:
|
|
72
|
+
|
|
73
|
+
| Flag | Template Used | Best For |
|
|
74
|
+
| ------------ | ------------- | ----------------------------- |
|
|
75
|
+
| `--prd` | `prd.md` | Quick features, smaller scope |
|
|
76
|
+
| `--proposal` | `proposal.md` | Epics, major changes |
|
|
77
|
+
| (default) | `spec.md` | Standard task specifications |
|
|
78
|
+
|
|
79
|
+
### Copy Template
|
|
56
80
|
|
|
57
81
|
```bash
|
|
58
|
-
|
|
82
|
+
# Default: Copy spec template
|
|
83
|
+
cp .opencode/memory/_templates/spec.md "$BEAD_DIR/spec.md"
|
|
84
|
+
|
|
85
|
+
# If --prd flag
|
|
86
|
+
cp .opencode/memory/_templates/prd.md "$BEAD_DIR/prd.md"
|
|
87
|
+
|
|
88
|
+
# If --proposal flag (for epics)
|
|
89
|
+
cp .opencode/memory/_templates/proposal.md "$BEAD_DIR/proposal.md"
|
|
90
|
+
cp .opencode/memory/_templates/spec.md "$BEAD_DIR/spec.md"
|
|
59
91
|
```
|
|
60
92
|
|
|
61
|
-
|
|
93
|
+
---
|
|
94
|
+
|
|
95
|
+
## Phase 3: Gather Context for Spec
|
|
96
|
+
|
|
97
|
+
### Ask Clarifying Questions
|
|
98
|
+
|
|
99
|
+
Before writing the spec, understand what needs to be built:
|
|
100
|
+
|
|
101
|
+
```typescript
|
|
102
|
+
question({
|
|
103
|
+
questions: [
|
|
104
|
+
{
|
|
105
|
+
header: "Scope",
|
|
106
|
+
question: "What should this feature do? Describe the core functionality.",
|
|
107
|
+
options: [], // Free text
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
header: "Users",
|
|
111
|
+
question: "Who will use this? (developers, end users, API consumers, etc.)",
|
|
112
|
+
options: [
|
|
113
|
+
{ label: "Developers", description: "Internal tooling or API" },
|
|
114
|
+
{ label: "End users", description: "Customer-facing feature" },
|
|
115
|
+
{ label: "Both", description: "Used by developers and users" },
|
|
116
|
+
],
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
header: "Constraints",
|
|
120
|
+
question: "Any constraints? (performance, compatibility, security)",
|
|
121
|
+
options: [], // Free text
|
|
122
|
+
},
|
|
123
|
+
],
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
### Research Existing Patterns (Optional)
|
|
128
|
+
|
|
129
|
+
If user provides enough context, delegate to explore agent:
|
|
130
|
+
|
|
131
|
+
```typescript
|
|
132
|
+
Task({
|
|
133
|
+
subagent_type: "explore",
|
|
134
|
+
description: "Find similar patterns",
|
|
135
|
+
prompt: `Find patterns in codebase related to: [bead title/description]
|
|
136
|
+
- Similar implementations
|
|
137
|
+
- Existing conventions
|
|
138
|
+
- Test patterns used
|
|
139
|
+
Return: File paths and patterns found`,
|
|
140
|
+
});
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
145
|
+
## Phase 4: Fill In Template
|
|
146
|
+
|
|
147
|
+
### For spec.md (default)
|
|
148
|
+
|
|
149
|
+
Fill in the template with WHEN/THEN scenarios:
|
|
150
|
+
|
|
151
|
+
```markdown
|
|
152
|
+
# Specification
|
|
153
|
+
|
|
154
|
+
**Bead:** $ARGUMENTS
|
|
155
|
+
**Proposal:** N/A
|
|
156
|
+
**Date:** [today]
|
|
157
|
+
|
|
158
|
+
## Requirements
|
|
159
|
+
|
|
160
|
+
### [Requirement from user input]
|
|
161
|
+
|
|
162
|
+
Brief description of what must be true.
|
|
62
163
|
|
|
63
|
-
|
|
164
|
+
#### Scenarios
|
|
64
165
|
|
|
65
|
-
|
|
166
|
+
**WHEN** [user/system does action]
|
|
167
|
+
**THEN** [expected outcome]
|
|
168
|
+
|
|
169
|
+
**WHEN** [edge case condition]
|
|
170
|
+
**THEN** [expected behavior]
|
|
171
|
+
|
|
172
|
+
## Non-Functional Requirements
|
|
173
|
+
|
|
174
|
+
- **Performance:** [from constraints]
|
|
175
|
+
- **Security:** [from constraints]
|
|
176
|
+
- **Compatibility:** [from constraints]
|
|
177
|
+
|
|
178
|
+
## Out of Scope
|
|
179
|
+
|
|
180
|
+
- [Explicitly excluded capability]
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
### For prd.md (--prd flag)
|
|
184
|
+
|
|
185
|
+
Fill in the PRD template with goal, scope, and tasks:
|
|
66
186
|
|
|
67
187
|
```markdown
|
|
68
|
-
#
|
|
188
|
+
# Beads PRD Template
|
|
69
189
|
|
|
70
|
-
**Bead:**
|
|
71
|
-
**Created:** [
|
|
190
|
+
**Bead:** $ARGUMENTS
|
|
191
|
+
**Created:** [today]
|
|
192
|
+
**Status:** Draft
|
|
72
193
|
|
|
73
194
|
## Goal
|
|
74
195
|
|
|
75
|
-
[
|
|
196
|
+
[From user input - what are we building and why]
|
|
76
197
|
|
|
77
|
-
##
|
|
198
|
+
## Scope
|
|
78
199
|
|
|
79
|
-
-
|
|
80
|
-
- Verify: `[command]`
|
|
81
|
-
- [ ] [Criterion 2]
|
|
82
|
-
- Verify: `[command]`
|
|
200
|
+
### In-Scope
|
|
83
201
|
|
|
84
|
-
|
|
202
|
+
- [From user input]
|
|
85
203
|
|
|
86
|
-
|
|
87
|
-
**Never:** [forbidden]
|
|
204
|
+
### Out-of-Scope
|
|
88
205
|
|
|
89
|
-
|
|
206
|
+
- [Explicitly excluded]
|
|
90
207
|
|
|
91
|
-
|
|
208
|
+
## Success Criteria
|
|
92
209
|
|
|
93
|
-
-
|
|
94
|
-
-
|
|
210
|
+
- [ ] [Measurable criterion]
|
|
211
|
+
- Verify: `[command]`
|
|
95
212
|
|
|
96
|
-
##
|
|
213
|
+
## Tasks
|
|
97
214
|
|
|
98
|
-
[
|
|
99
|
-
```
|
|
215
|
+
### [Task Title] [category]
|
|
100
216
|
|
|
101
|
-
|
|
217
|
+
[End state description]
|
|
102
218
|
|
|
103
|
-
|
|
104
|
-
# First task (no blockers)
|
|
105
|
-
bd create "[subtask 1]" -t task -p 2
|
|
219
|
+
**Verification:**
|
|
106
220
|
|
|
107
|
-
|
|
108
|
-
bd create "[subtask 2]" -t task -p 2
|
|
109
|
-
bd dep add bd-[second] bd-[first] --type blocks
|
|
221
|
+
- [Command or check]
|
|
110
222
|
```
|
|
111
223
|
|
|
112
|
-
|
|
224
|
+
---
|
|
113
225
|
|
|
114
|
-
|
|
226
|
+
## Phase 5: Validate Spec
|
|
115
227
|
|
|
116
|
-
|
|
228
|
+
Before saving, validate the spec:
|
|
117
229
|
|
|
118
|
-
|
|
230
|
+
- [ ] All requirements have WHEN/THEN scenarios?
|
|
231
|
+
- [ ] Scenarios are testable (not vague)?
|
|
232
|
+
- [ ] Out of scope is defined?
|
|
233
|
+
- [ ] Non-functional requirements addressed?
|
|
119
234
|
|
|
120
|
-
|
|
121
|
-
- Output: `.beads/artifacts/<bead-id>/prd.md`
|
|
235
|
+
If validation fails, ask user for missing information.
|
|
122
236
|
|
|
123
|
-
|
|
124
|
-
skill({ name: "prd" });
|
|
125
|
-
```
|
|
237
|
+
---
|
|
126
238
|
|
|
127
|
-
|
|
239
|
+
## Phase 6: Save and Report
|
|
128
240
|
|
|
129
|
-
|
|
241
|
+
Save the filled template to the bead artifacts folder.
|
|
130
242
|
|
|
131
|
-
```
|
|
132
|
-
|
|
243
|
+
```bash
|
|
244
|
+
# Verify file was created
|
|
245
|
+
cat "$BEAD_DIR/spec.md"
|
|
133
246
|
```
|
|
134
247
|
|
|
135
|
-
|
|
248
|
+
Update bead with note:
|
|
136
249
|
|
|
137
|
-
|
|
138
|
-
|
|
250
|
+
```bash
|
|
251
|
+
bd note $ARGUMENTS "Created spec.md with [N] requirements"
|
|
252
|
+
```
|
|
139
253
|
|
|
140
|
-
##
|
|
254
|
+
## Record Learning (If Significant)
|
|
141
255
|
|
|
142
|
-
|
|
143
|
-
|
|
256
|
+
If you discovered patterns or made decisions worth remembering:
|
|
257
|
+
|
|
258
|
+
```typescript
|
|
259
|
+
observation({
|
|
260
|
+
type: "pattern", // or "decision"
|
|
261
|
+
title: "[Domain] spec pattern for [type of feature]",
|
|
262
|
+
narrative: "When creating specs for [this type], include...",
|
|
263
|
+
concepts: "[domain keywords]",
|
|
264
|
+
bead_id: "$ARGUMENTS",
|
|
265
|
+
confidence: "medium",
|
|
266
|
+
});
|
|
144
267
|
```
|
|
145
268
|
|
|
269
|
+
---
|
|
270
|
+
|
|
146
271
|
## Output
|
|
147
272
|
|
|
148
273
|
```
|
|
149
|
-
Created:
|
|
274
|
+
Created: $ARGUMENTS
|
|
275
|
+
━━━━━━━━━━━━━━━━━━━
|
|
150
276
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
277
|
+
Artifacts:
|
|
278
|
+
├── .beads/artifacts/$ARGUMENTS/spec.md [NEW]
|
|
279
|
+
└── .beads/artifacts/$ARGUMENTS/proposal.md [if --proposal]
|
|
154
280
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
281
|
+
Requirements: [N] defined
|
|
282
|
+
Scenarios: [N] WHEN/THEN pairs
|
|
283
|
+
|
|
284
|
+
Next: /research $ARGUMENTS (optional)
|
|
285
|
+
/plan $ARGUMENTS
|
|
158
286
|
```
|
|
159
287
|
|
|
160
|
-
|
|
288
|
+
---
|
|
161
289
|
|
|
162
|
-
|
|
163
|
-
|
|
290
|
+
## Examples
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
# Create standard spec
|
|
294
|
+
/create bd-feat-auth
|
|
164
295
|
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
├── bd-[epic].2: [title] ← blocked by .1
|
|
168
|
-
└── bd-[epic].3: [title] ← blocked by .2
|
|
296
|
+
# Create PRD (combined format)
|
|
297
|
+
/create bd-feat-auth --prd
|
|
169
298
|
|
|
170
|
-
|
|
299
|
+
# Create proposal first (for epics)
|
|
300
|
+
/create bd-epic-redesign --proposal
|
|
171
301
|
```
|
|
302
|
+
|
|
303
|
+
---
|
|
304
|
+
|
|
305
|
+
## Related Commands
|
|
306
|
+
|
|
307
|
+
| Need | Command |
|
|
308
|
+
| ------------------ | ---------------------- |
|
|
309
|
+
| Research first | `/research $ARGUMENTS` |
|
|
310
|
+
| Plan after spec | `/plan $ARGUMENTS` |
|
|
311
|
+
| Create bead itself | `bd create "Title"` |
|
|
@@ -11,8 +11,27 @@ subtask: true
|
|
|
11
11
|
|
|
12
12
|
```typescript
|
|
13
13
|
skill({ name: "beads" });
|
|
14
|
+
skill({ name: "memory-system" });
|
|
14
15
|
```
|
|
15
16
|
|
|
17
|
+
## Check Memory First
|
|
18
|
+
|
|
19
|
+
Search for existing design decisions and patterns:
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
// Find similar design work
|
|
23
|
+
memory_search({ query: "[component/page name] design UI", limit: 3 });
|
|
24
|
+
|
|
25
|
+
// Find design system decisions
|
|
26
|
+
memory_search({ query: "design system colors typography", limit: 3 });
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
Review findings for:
|
|
30
|
+
|
|
31
|
+
- Existing aesthetic direction decisions
|
|
32
|
+
- Color and typography choices already made
|
|
33
|
+
- UI patterns that worked well
|
|
34
|
+
|
|
16
35
|
## Phase 1: Context Discovery
|
|
17
36
|
|
|
18
37
|
Parse `$ARGUMENTS` to determine design task:
|
|
@@ -565,6 +584,22 @@ Before finalizing, verify design does NOT have ALL of these together:
|
|
|
565
584
|
**Quick design:** Output inline, no save needed
|
|
566
585
|
**Full design:** Save to `.opencode/memory/design/specs/[YYYY-MM-DD]-[topic].md`
|
|
567
586
|
|
|
587
|
+
### Record Design Decisions
|
|
588
|
+
|
|
589
|
+
For significant design choices, create an observation:
|
|
590
|
+
|
|
591
|
+
```typescript
|
|
592
|
+
observation({
|
|
593
|
+
type: "decision",
|
|
594
|
+
title: "Design direction for [component/page]",
|
|
595
|
+
narrative: "Chose [aesthetic direction] because [rationale]...",
|
|
596
|
+
facts: "[key design tokens, colors, typography choices]",
|
|
597
|
+
concepts: "design, ui, [component type], [aesthetic]",
|
|
598
|
+
bead_id: "$ARGUMENTS", // if applicable
|
|
599
|
+
confidence: "high",
|
|
600
|
+
});
|
|
601
|
+
```
|
|
602
|
+
|
|
568
603
|
### Create Implementation Tasks
|
|
569
604
|
|
|
570
605
|
For component/page designs:
|
|
@@ -602,10 +637,8 @@ If bead exists in `$ARGUMENTS`, design within `.beads/artifacts/<bead-id>/spec.m
|
|
|
602
637
|
|
|
603
638
|
## Related Commands
|
|
604
639
|
|
|
605
|
-
| Need
|
|
606
|
-
|
|
|
607
|
-
|
|
|
608
|
-
|
|
|
609
|
-
|
|
|
610
|
-
| Check accessibility | `/accessibility-check` |
|
|
611
|
-
| Fix UI issues | `/fix-ui` |
|
|
640
|
+
| Need | Command |
|
|
641
|
+
| -------------------- | --------------- |
|
|
642
|
+
| Review existing UI | `/ui-review` |
|
|
643
|
+
| Start implementation | `/start <bead>` |
|
|
644
|
+
| Ship implementation | `/ship <bead>` |
|
|
@@ -8,6 +8,28 @@ agent: build
|
|
|
8
8
|
|
|
9
9
|
You're pausing work on a task. Save state so the next session can pick up cleanly.
|
|
10
10
|
|
|
11
|
+
## Load Skills
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
skill({ name: "beads" });
|
|
15
|
+
skill({ name: "session-management" });
|
|
16
|
+
skill({ name: "memory-system" });
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Check Memory for Context
|
|
20
|
+
|
|
21
|
+
Before creating handoff, search for related work:
|
|
22
|
+
|
|
23
|
+
```typescript
|
|
24
|
+
// Find previous handoffs and sessions for this bead
|
|
25
|
+
memory_search({ query: "$ARGUMENTS handoff progress", limit: 3 });
|
|
26
|
+
|
|
27
|
+
// Find related decisions and learnings
|
|
28
|
+
memory_search({ query: "[bead description keywords]", limit: 3 });
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
Review findings to include relevant context in the handoff.
|
|
32
|
+
|
|
11
33
|
## Why Handoff?
|
|
12
34
|
|
|
13
35
|
- Context window getting full
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
---
|
|
2
2
|
description: Initialize project for AI-assisted development (creates AGENTS.md + memory files)
|
|
3
3
|
argument-hint: "[--deep] [--skip-questions]"
|
|
4
|
-
agent:
|
|
5
|
-
subtask: true
|
|
4
|
+
agent: build
|
|
6
5
|
---
|
|
7
6
|
|
|
8
7
|
# Init: $ARGUMENTS
|
|
9
8
|
|
|
10
9
|
One command to onboard a project. Creates project-root AGENTS.md and populates memory files.
|
|
11
10
|
|
|
11
|
+
## Load Skills
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
skill({ name: "memory-system" });
|
|
15
|
+
skill({ name: "index-knowledge" });
|
|
16
|
+
```
|
|
17
|
+
|
|
12
18
|
## Options
|
|
13
19
|
|
|
14
20
|
- `--deep`: Comprehensive research (~100+ tool calls). Git history, patterns, contributors, subsystem detection.
|
|
@@ -148,86 +154,49 @@ If the repo is large or keeps changing (monorepos especially), generate/refresh
|
|
|
148
154
|
|
|
149
155
|
## Phase 5: Populate Memory Files
|
|
150
156
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
```markdown
|
|
154
|
-
---
|
|
155
|
-
purpose: User identity, preferences, communication style
|
|
156
|
-
updated: [today]
|
|
157
|
-
---
|
|
158
|
-
|
|
159
|
-
# User Profile
|
|
160
|
-
|
|
161
|
-
## Identity
|
|
157
|
+
Read templates, then use `write` tool to create actual markdown files:
|
|
162
158
|
|
|
163
|
-
|
|
164
|
-
|
|
159
|
+
```typescript
|
|
160
|
+
// 1. Read templates to understand structure
|
|
161
|
+
read({ filePath: ".opencode/memory/_templates/user.md" });
|
|
162
|
+
read({ filePath: ".opencode/memory/_templates/tech-stack.md" });
|
|
165
163
|
|
|
166
|
-
|
|
164
|
+
// 2. Use WRITE tool to create/update actual markdown files
|
|
165
|
+
// ⚠️ IMPORTANT: memory-update writes to SQLite, NOT markdown files!
|
|
166
|
+
// Use write() for .md files, memory-update() for SQLite storage
|
|
167
167
|
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
write({
|
|
169
|
+
filePath: ".opencode/memory/project/user.md",
|
|
170
|
+
content: "..." // Populated from Phase 1 answers
|
|
171
|
+
});
|
|
170
172
|
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
173
|
+
write({
|
|
174
|
+
filePath: ".opencode/memory/project/tech-stack.md",
|
|
175
|
+
content: "..." // Populated from Phase 2 detection
|
|
176
|
+
});
|
|
174
177
|
```
|
|
175
178
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
---
|
|
180
|
-
purpose: Build, test, lint, deploy commands
|
|
181
|
-
updated: [today]
|
|
182
|
-
---
|
|
179
|
+
**Critical distinction:**
|
|
180
|
+
- `write()` → Updates **markdown files** on disk
|
|
181
|
+
- `memory-update()` → Writes to **SQLite database** (memory system)
|
|
183
182
|
|
|
184
|
-
|
|
183
|
+
### .opencode/memory/project/user.md
|
|
185
184
|
|
|
186
|
-
|
|
185
|
+
Populate from Phase 1 answers:
|
|
186
|
+
- Identity (name, git contributor)
|
|
187
|
+
- Communication preferences (terse/detailed)
|
|
188
|
+
- Workflow preferences (auto-commit/ask-first)
|
|
189
|
+
- Custom rules
|
|
187
190
|
|
|
188
|
-
|
|
191
|
+
### .opencode/memory/project/tech-stack.md
|
|
189
192
|
|
|
190
|
-
|
|
193
|
+
Populate from Phase 2 detection:
|
|
194
|
+
- Framework & version
|
|
195
|
+
- Language & runtime
|
|
196
|
+
- Key dependencies with versions
|
|
197
|
+
- Key constraints
|
|
191
198
|
|
|
192
|
-
`
|
|
193
|
-
Single test: `[syntax with example]`
|
|
194
|
-
|
|
195
|
-
## Lint
|
|
196
|
-
|
|
197
|
-
`[detected]`
|
|
198
|
-
|
|
199
|
-
## Dev Server
|
|
200
|
-
|
|
201
|
-
`[detected]`
|
|
202
|
-
```
|
|
203
|
-
|
|
204
|
-
### .opencode/memory/project/architecture.md
|
|
205
|
-
|
|
206
|
-
```markdown
|
|
207
|
-
---
|
|
208
|
-
purpose: Key modules, directory structure
|
|
209
|
-
updated: [today]
|
|
210
|
-
---
|
|
211
|
-
|
|
212
|
-
# Architecture
|
|
213
|
-
|
|
214
|
-
## Structure
|
|
215
|
-
|
|
216
|
-
[detected directory layout with purpose annotations]
|
|
217
|
-
|
|
218
|
-
## Key Modules
|
|
219
|
-
|
|
220
|
-
[identified entry points, core modules, their responsibilities]
|
|
221
|
-
|
|
222
|
-
## Data Flow
|
|
223
|
-
|
|
224
|
-
[how data moves through the system - if detectable]
|
|
225
|
-
```
|
|
226
|
-
|
|
227
|
-
### With --deep, also create:
|
|
228
|
-
|
|
229
|
-
- `project/conventions.md` - from git log analysis
|
|
230
|
-
- `project/gotchas.md` - from bug-fix patterns in history
|
|
199
|
+
**Note:** AI discovers commands, architecture, conventions, and gotchas organically and saves via `observation` tool.
|
|
231
200
|
|
|
232
201
|
## Phase 6: Initialize Beads (if requested)
|
|
233
202
|
|
|
@@ -262,13 +231,15 @@ Initialization Complete
|
|
|
262
231
|
Files created:
|
|
263
232
|
- ./AGENTS.md ([N] lines)
|
|
264
233
|
- .opencode/memory/user.md
|
|
265
|
-
- .opencode/memory/project/
|
|
266
|
-
- .opencode/memory/project/architecture.md
|
|
234
|
+
- .opencode/memory/project/tech-stack.md
|
|
267
235
|
[- .beads/ (if initialized)]
|
|
268
236
|
|
|
269
237
|
Tech stack: [detected]
|
|
270
238
|
Commands validated: [yes/no]
|
|
271
239
|
|
|
240
|
+
Note: Commands, architecture, conventions, and gotchas are discovered
|
|
241
|
+
organically and saved via the observation tool as the AI works.
|
|
242
|
+
|
|
272
243
|
Suggested next steps:
|
|
273
244
|
1. Review AGENTS.md and adjust boundaries
|
|
274
245
|
2. Run /review-codebase to check conventions
|
|
@@ -280,11 +251,11 @@ Suggested next steps:
|
|
|
280
251
|
```
|
|
281
252
|
./AGENTS.md # Project-specific rules (created, <60 lines)
|
|
282
253
|
.opencode/AGENTS.md # Global rules (untouched)
|
|
283
|
-
.opencode/memory/user.md
|
|
284
|
-
.opencode/memory/
|
|
285
|
-
.opencode/memory/project/
|
|
286
|
-
.opencode/memory/project/
|
|
287
|
-
.opencode/memory/
|
|
254
|
+
.opencode/memory/_templates/user.md # User template
|
|
255
|
+
.opencode/memory/_templates/tech-stack.md # Tech stack template
|
|
256
|
+
.opencode/memory/project/user.md # User preferences (created from template)
|
|
257
|
+
.opencode/memory/project/tech-stack.md # Tech stack (created from template)
|
|
258
|
+
.opencode/memory/observations/ # Learnings captured organically by AI
|
|
288
259
|
[packages/*/AGENTS.md] # Subsystem rules (--deep, if requested)
|
|
289
260
|
```
|
|
290
261
|
|