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,171 +1,311 @@
1
1
  ---
2
- description: Create a tracked task with spec
3
- argument-hint: "[title or description]"
4
- agent: build
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
- You're creating a new tracked task. Keep it simple unless complexity demands otherwise.
10
+ Create structured artifacts for a bead using templates. This is the first step before planning.
10
11
 
11
- ## Check For Duplicates First
12
+ ## Parse Arguments
12
13
 
13
- !`bd list --status=all | grep -i "[keywords]"`
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
- If similar work exists, link to it or extend it instead of creating duplicate.
20
+ ## Load Skills
16
21
 
17
- ## Gather Requirements
18
-
19
- If `$ARGUMENTS` is clear, use it directly. If vague, ask:
22
+ ```typescript
23
+ skill({ name: "beads" });
24
+ skill({ name: "brainstorming" });
25
+ skill({ name: "memory-system" });
26
+ ```
20
27
 
21
- 1. What problem are we solving?
22
- 2. Bug, feature, or task?
23
- 3. What's the acceptance criteria?
24
- 4. Any constraints?
28
+ ## Check Memory First
25
29
 
26
- Keep it brief. Don't over-engineer the interview.
30
+ Search for similar specs and patterns before creating:
27
31
 
28
- ## Assess Complexity
32
+ ```typescript
33
+ // Find similar past specs
34
+ memory_search({ query: "[bead title/description]", limit: 3 });
29
35
 
30
- **Simple** (single bead): One file, one clear action, ~30 min or less
31
- **Complex** (needs decomposition): Multiple domains, natural phases, hours of work
36
+ // Find related patterns and conventions
37
+ memory_search({ query: "[domain keywords] spec requirements", limit: 3 });
38
+ ```
32
39
 
33
- If complex, ask: "This looks like it needs decomposition. Create an epic with subtasks?"
40
+ Review findings for:
34
41
 
35
- ## Create The Bead
42
+ - Similar specs that worked well (reuse structure)
43
+ - Patterns and conventions already established
44
+ - Gotchas to avoid in this domain
36
45
 
37
- Simple task:
46
+ ## Load Bead Context
38
47
 
39
48
  ```bash
40
- bd create "[title]" -t task -p 2
49
+ bd show $ARGUMENTS
41
50
  ```
42
51
 
43
- Bug:
52
+ Check what artifacts already exist:
44
53
 
45
54
  ```bash
46
- bd create "[title]" -t bug -p 1
55
+ ls .beads/artifacts/$ARGUMENTS/ 2>/dev/null || echo "No artifacts yet"
47
56
  ```
48
57
 
49
- Feature:
58
+ ---
59
+
60
+ ## Phase 1: Setup Artifact Directory
50
61
 
51
62
  ```bash
52
- bd create "[title]" -t feature -p 2
63
+ BEAD_DIR=".beads/artifacts/$ARGUMENTS"
64
+ mkdir -p "$BEAD_DIR"
53
65
  ```
54
66
 
55
- Epic (if decomposing):
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
- bd create "[title]" -t epic -p 1
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
- ## Create Spec
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
- Write `.beads/artifacts/<bead-id>/spec.md`.
164
+ #### Scenarios
64
165
 
65
- Treat `spec.md` as a **short task card** (one screen): goal + success criteria + constraints. Put the detailed plan and task breakdown in `prd.md`.
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
- # [Title]
188
+ # Beads PRD Template
69
189
 
70
- **Bead:** <bead-id>
71
- **Created:** [date]
190
+ **Bead:** $ARGUMENTS
191
+ **Created:** [today]
192
+ **Status:** Draft
72
193
 
73
194
  ## Goal
74
195
 
75
- [1-2 sentences: What and why]
196
+ [From user input - what are we building and why]
76
197
 
77
- ## Success Criteria
198
+ ## Scope
78
199
 
79
- - [ ] [Criterion 1]
80
- - Verify: `[command]`
81
- - [ ] [Criterion 2]
82
- - Verify: `[command]`
200
+ ### In-Scope
83
201
 
84
- ## Constraints
202
+ - [From user input]
85
203
 
86
- **Must:** [required]
87
- **Never:** [forbidden]
204
+ ### Out-of-Scope
88
205
 
89
- ## PRD (Optional)
206
+ - [Explicitly excluded]
90
207
 
91
- If this task has a PRD, keep details there:
208
+ ## Success Criteria
92
209
 
93
- - `.beads/artifacts/<bead-id>/prd.md`
94
- - `.beads/artifacts/<bead-id>/prd.json` (generated)
210
+ - [ ] [Measurable criterion]
211
+ - Verify: `[command]`
95
212
 
96
- ## Notes
213
+ ## Tasks
97
214
 
98
- [only brief context here; details belong in prd.md]
99
- ```
215
+ ### [Task Title] [category]
100
216
 
101
- ## If Epic: Create Subtasks
217
+ [End state description]
102
218
 
103
- ```bash
104
- # First task (no blockers)
105
- bd create "[subtask 1]" -t task -p 2
219
+ **Verification:**
106
220
 
107
- # Second task (blocked by first)
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
- Visualize:
224
+ ---
113
225
 
114
- !`bd dep tree bd-[epic]`
226
+ ## Phase 5: Validate Spec
115
227
 
116
- ## Optional: Create a PRD (Recommended for features)
228
+ Before saving, validate the spec:
117
229
 
118
- If the work is more than a small one-off change, create a PRD alongside the spec.
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
- - Template: `.opencode/memory/_templates/prd.md`
121
- - Output: `.beads/artifacts/<bead-id>/prd.md`
235
+ If validation fails, ask user for missing information.
122
236
 
123
- ```typescript
124
- skill({ name: "prd" });
125
- ```
237
+ ---
126
238
 
127
- Write the PRD so it includes a `## Tasks` section (each `### ... [category]` with `**Verification:**` bullets).
239
+ ## Phase 6: Save and Report
128
240
 
129
- After PRD is written, convert it to executable tasks:
241
+ Save the filled template to the bead artifacts folder.
130
242
 
131
- ```typescript
132
- skill({ name: "prd-task" });
243
+ ```bash
244
+ # Verify file was created
245
+ cat "$BEAD_DIR/spec.md"
133
246
  ```
134
247
 
135
- This generates:
248
+ Update bead with note:
136
249
 
137
- - `.beads/artifacts/<bead-id>/prd.json`
138
- - `.beads/artifacts/<bead-id>/progress.txt`
250
+ ```bash
251
+ bd note $ARGUMENTS "Created spec.md with [N] requirements"
252
+ ```
139
253
 
140
- ## Sync
254
+ ## Record Learning (If Significant)
141
255
 
142
- ```bash
143
- bd sync
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: bd-[id]
274
+ Created: $ARGUMENTS
275
+ ━━━━━━━━━━━━━━━━━━━
150
276
 
151
- Type: [task/bug/feature/epic]
152
- Priority: [0-4]
153
- Spec: .beads/artifacts/bd-[id]/spec.md
277
+ Artifacts:
278
+ ├── .beads/artifacts/$ARGUMENTS/spec.md [NEW]
279
+ └── .beads/artifacts/$ARGUMENTS/proposal.md [if --proposal]
154
280
 
155
- Next:
156
- - `/start bd-[id]` (recommended)
157
- - or `/implement bd-[id]` (direct implementation)
281
+ Requirements: [N] defined
282
+ Scenarios: [N] WHEN/THEN pairs
283
+
284
+ Next: /research $ARGUMENTS (optional)
285
+ /plan $ARGUMENTS
158
286
  ```
159
287
 
160
- If epic with subtasks:
288
+ ---
161
289
 
162
- ```
163
- Created: bd-[epic] (Epic)
290
+ ## Examples
291
+
292
+ ```bash
293
+ # Create standard spec
294
+ /create bd-feat-auth
164
295
 
165
- Subtasks:
166
- ├── bd-[epic].1: [title] ← READY
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
- Next: /implement bd-[epic].1
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 | Command |
606
- | --------------------- | ---------------------- |
607
- | Audit existing system | `/design-audit` |
608
- | Analyze mockup | `/analyze-mockup` |
609
- | Implement design | `/implement` |
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: plan
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
- ### .opencode/memory/user.md
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
- - Name: [from git/questions]
164
- - Git contributor: [email/username]
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
- ## Preferences
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
- - Communication: [terse/detailed]
169
- - Workflow: [auto-commit/ask-first]
168
+ write({
169
+ filePath: ".opencode/memory/project/user.md",
170
+ content: "..." // Populated from Phase 1 answers
171
+ });
170
172
 
171
- ## Rules
172
-
173
- [from Phase 1]
173
+ write({
174
+ filePath: ".opencode/memory/project/tech-stack.md",
175
+ content: "..." // Populated from Phase 2 detection
176
+ });
174
177
  ```
175
178
 
176
- ### .opencode/memory/project/commands.md
177
-
178
- ```markdown
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
- # Commands
183
+ ### .opencode/memory/project/user.md
185
184
 
186
- ## Build
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
- `[detected and validated]`
191
+ ### .opencode/memory/project/tech-stack.md
189
192
 
190
- ## Test
193
+ Populate from Phase 2 detection:
194
+ - Framework & version
195
+ - Language & runtime
196
+ - Key dependencies with versions
197
+ - Key constraints
191
198
 
192
- `[detected]`
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/commands.md
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 # User preferences (created)
284
- .opencode/memory/project/commands.md # Build commands (created)
285
- .opencode/memory/project/architecture.md # Structure (created)
286
- .opencode/memory/project/conventions.md # Patterns (--deep only)
287
- .opencode/memory/project/gotchas.md # Warnings (--deep only)
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