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,398 +0,0 @@
1
- ---
2
- description: AI-powered task triage, prioritization, and workload analysis
3
- argument-hint: "[--quick] [--auto-assign] [--sla] [--bottleneck]"
4
- agent: build
5
- ---
6
-
7
- # Triage
8
-
9
- ## Load Beads Skill
10
-
11
- ```typescript
12
- skill({ name: "beads" });
13
- ```
14
-
15
- Analyze open tasks and optimize prioritization using dependency graph analysis, SLA tracking, and multi-agent coordination.
16
-
17
- ## Quick Mode
18
-
19
- If `--quick` flag is passed, skip deep analysis and provide immediate actionable output:
20
-
21
- ```bash
22
- bd ready --json
23
- bd list --status=in_progress --json
24
- ```
25
-
26
- **Quick Output:**
27
-
28
- ```
29
- Quick Triage
30
- ━━━━━━━━━━━━
31
-
32
- Ready to start:
33
- • bd-abc12: "Task title" (P1)
34
- • bd-def34: "Task title" (P2)
35
-
36
- In progress:
37
- • bd-ghi56: "Task title" - claimed by [agent]
38
-
39
- Next: /start <bead-id>
40
- ```
41
-
42
- Then stop. Don't run full analysis phases.
43
-
44
- ## Full Triage (Default)
45
-
46
- ## Phase 1: Health Check
47
-
48
- Run `bd doctor` to ensure database integrity (recommended weekly):
49
-
50
- ```bash
51
- bd doctor --fix 2>/dev/null || bd doctor
52
- ```
53
-
54
- This detects and auto-fixes:
55
-
56
- - Orphaned issues (work committed but issue not closed)
57
- - Database/JSONL sync issues
58
- - Migration updates
59
-
60
- ## Phase 2: Initialize Beads Connection
61
-
62
- !`bd status`
63
-
64
- ## Phase 3: Gather Workspace State
65
-
66
- Run in parallel:
67
-
68
- !`bd status`
69
- !`bd list --status open --limit 50`
70
-
71
- ```typescript
72
- // Custom tools (not shell commands)
73
- bd - release(); // Lists active locks when called with no args
74
- bd - inbox({ n: 10, unread: true, to: "all" });
75
-
76
- // Search for past discussions on recurring issues
77
- search_session({ query: "blocked OR regression OR urgent", limit: 10 });
78
- ```
79
-
80
- Capture:
81
-
82
- - Total open tasks
83
- - In-progress count
84
- - Active agents
85
- - File locks
86
- - Pending messages
87
- - Past context on recurring issues
88
-
89
- ## Phase 4: Analyze Dependencies
90
-
91
- Use `bd dep tree` to understand blocking relationships:
92
-
93
- !`bd dep tree <task-id>`
94
-
95
- This provides:
96
-
97
- - **Bottlenecks**: Tasks blocking the most downstream work
98
- - **Keystones**: High-impact tasks that unlock multiple paths
99
- - **Cycles**: Circular dependencies (must break)
100
-
101
- ## Phase 5: Priority Classification
102
-
103
- ### Priority Matrix
104
-
105
- ```
106
- ┌─────────────────────────────────────────────────────────────────────────┐
107
- │ URGENCY │
108
- │ High Low │
109
- │ ┌─────────────────────────────┬─────────────────────────────┐ │
110
- │ │ P0 - CRITICAL │ P1 - HIGH │ High │
111
- │ │ • Production down │ • Major feature blocked │ │
112
- │ │ • Security vulnerability │ • Customer escalation │ I │
113
- │ │ • Data loss risk │ • Sprint commitment │ M │
114
- │ │ │ │ P │
115
- │ │ SLA: 4 hours │ SLA: 24 hours │ A │
116
- │ ├─────────────────────────────┼─────────────────────────────┤ C │
117
- │ │ P2 - MEDIUM │ P3 - LOW │ T │
118
- │ │ • Feature enhancement │ • Tech debt │ │
119
- │ │ • Non-blocking bugs │ • Nice-to-have │ Low │
120
- │ │ • Performance improvement │ • Documentation │ │
121
- │ │ │ │ │
122
- │ │ SLA: 1 week │ SLA: 2 weeks │ │
123
- │ └─────────────────────────────┴─────────────────────────────┘ │
124
- │ │
125
- │ P4 - BACKLOG: No SLA, review monthly │
126
- └─────────────────────────────────────────────────────────────────────────┘
127
- ```
128
-
129
- ### Impact Scoring Formula
130
-
131
- ```
132
- Impact Score = (Downstream Count × 2) + (Priority Weight × 3)
133
-
134
- Where Priority Weight:
135
- P0 = 5, P1 = 4, P2 = 3, P3 = 2, P4 = 1
136
- ```
137
-
138
- ### SLA Tracking
139
-
140
- For each open task, calculate:
141
-
142
- ```typescript
143
- const now = new Date();
144
- const created = new Date(task.created_at);
145
- const ageHours = (now - created) / (1000 * 60 * 60);
146
-
147
- const slaByPriority = { 0: 4, 1: 24, 2: 168, 3: 336, 4: Infinity };
148
- const slaHours = slaByPriority[task.priority];
149
- const slaRemaining = slaHours - ageHours;
150
- const slaStatus = slaRemaining < 0 ? "BREACHED" : slaRemaining < slaHours * 0.2 ? "AT_RISK" : "OK";
151
- ```
152
-
153
- ## Phase 6: Bottleneck Analysis
154
-
155
- Identify blocking patterns:
156
-
157
- ### Critical Bottlenecks
158
-
159
- Tasks where:
160
-
161
- - `downstream_count >= 3` (blocks 3+ tasks)
162
- - `priority >= 2` (medium or higher)
163
- - `status = open` (not started)
164
-
165
- ```
166
- BOTTLENECK ALERT
167
- ━━━━━━━━━━━━━━━━
168
-
169
- 🔴 bd-abc12: "Database migration"
170
- Blocks: bd-def34, bd-ghi56, bd-jkl78, bd-mno90
171
- Impact Score: 24
172
- Age: 3 days (SLA: AT_RISK)
173
-
174
- Recommendation: Assign immediately to unblock 4 tasks
175
- ```
176
-
177
- ### Dependency Cycles
178
-
179
- If cycles detected:
180
-
181
- ```
182
- ⚠️ CIRCULAR DEPENDENCY DETECTED
183
- ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
184
-
185
- bd-abc12 → bd-def34 → bd-ghi56 → bd-abc12
186
-
187
- Resolution Options:
188
- 1. Remove weakest dependency (bd-ghi56 → bd-abc12)
189
- 2. Merge tasks into single unit
190
- 3. Split one task to break cycle
191
-
192
- Run: bd update <id> --remove-dep <dep-id>
193
- ```
194
-
195
- ## Phase 7: Generate Triage Report
196
-
197
- ```
198
- ╔══════════════════════════════════════════════════════════════════════════╗
199
- ║ TRIAGE REPORT ║
200
- ║ [timestamp] ║
201
- ╠══════════════════════════════════════════════════════════════════════════╣
202
-
203
- SUMMARY
204
- ━━━━━━━
205
- Open: XX | In Progress: XX | Blocked: XX | Ready: XX
206
-
207
- SLA STATUS
208
- ━━━━━━━━━━
209
- 🔴 BREACHED: X tasks
210
- 🟡 AT RISK: X tasks
211
- 🟢 ON TRACK: X tasks
212
-
213
- BOTTLENECKS (Top 3)
214
- ━━━━━━━━━━━━━━━━━━━
215
- 1. bd-abc12 - "Database migration" - blocks 4 tasks
216
- 2. bd-def34 - "API authentication" - blocks 3 tasks
217
- 3. bd-ghi56 - "Config refactor" - blocks 2 tasks
218
-
219
- PRIORITY ORDER
220
- ━━━━━━━━━━━━━━
221
- Priority │ ID │ Title │ Impact │ SLA
222
- ─────────┼──────────┼──────────────────────────┼────────┼────────
223
- P0 │ bd-abc12 │ Database migration │ 24 │ AT_RISK
224
- P1 │ bd-def34 │ API authentication │ 18 │ OK
225
- P2 │ bd-ghi56 │ Config refactor │ 12 │ OK
226
-
227
- READY TASKS
228
- ━━━━━━━━━━━
229
- bd-xyz11 - "Frontend auth" - can start now
230
- bd-xyz22 - "API endpoints" - can start now
231
- bd-xyz33 - "Config update" - blocked by bd-abc12
232
-
233
- AGENT WORKLOAD
234
- ━━━━━━━━━━━━━━
235
- Agent │ Active │ Completed │ Load
236
- ──────────┼────────┼───────────┼──────
237
- build-1 │ 2 │ 8 │ HIGH
238
- build-2 │ 1 │ 12 │ MEDIUM
239
- review │ 0 │ 5 │ LOW
240
-
241
- RECOMMENDATIONS
242
- ━━━━━━━━━━━━━━━
243
- 1. 🔴 URGENT: bd-abc12 is blocking 4 tasks - assign to build agent
244
- 2. 🟡 REBALANCE: build-1 has high load - redistribute to review agent
245
- 3. 🟢 PARALLEL: Start Track A and B simultaneously
246
- 4. ⚠️ STALE: bd-old99 has no activity for 7 days - review or close
247
-
248
- ╚══════════════════════════════════════════════════════════════════════════╝
249
- ```
250
-
251
- ## Phase 8: Auto-Assignment (Optional)
252
-
253
- If `--auto-assign` flag:
254
-
255
- ### Assignment Rules
256
-
257
- ```typescript
258
- const assignmentRules = {
259
- // All implementation work goes to build agents
260
- "frontend|ui|css|react|vue": "build",
261
- "backend|api|database|server": "build",
262
- "deploy|ci|docker|infra": "build",
263
- "mobile|ios|android|react-native": "build",
264
- // Review/QA work goes to review agent
265
- "test|qa|e2e|integration": "review",
266
- };
267
-
268
- // Load balancing: prefer agent with lowest active count
269
- function selectAgent(role: string, agents: Agent[]): Agent {
270
- return agents.filter((a) => a.role === role).sort((a, b) => a.activeCount - b.activeCount)[0];
271
- }
272
- ```
273
-
274
- ### Execute Assignments
275
-
276
- ```typescript
277
- // For each unassigned high-priority ready task
278
- for (const task of readyTasks.filter((t) => !t.assignee && t.priority <= 2)) {
279
- const role = detectRole(task);
280
- // Use bd CLI to update assignment
281
- // bd update <task.id> --assignee <role>
282
- }
283
- ```
284
-
285
- **Output:**
286
-
287
- ```
288
- AUTO-ASSIGNMENTS
289
- ━━━━━━━━━━━━━━━━
290
-
291
- ✓ bd-abc12 → build (detected: backend, API)
292
- ✓ bd-def34 → build (detected: frontend, React)
293
- ✓ bd-ghi56 → build (detected: infrastructure)
294
-
295
- Skipped:
296
- - bd-xyz99: Already assigned to review agent
297
- - bd-old88: No matching role detected (manual assignment needed)
298
- ```
299
-
300
- ## Phase 9: Batch Operations
301
-
302
- ### Bulk Priority Update
303
-
304
- ```bash
305
- # Escalate all breached SLA tasks
306
- for each breached task:
307
- bd update <task-id> --priority <new-priority>
308
- ```
309
-
310
- ### Stale Task Cleanup
311
-
312
- ```typescript
313
- // Find tasks with no activity > 14 days
314
- const staleTasks = openTasks.filter((t) => daysSince(t.updated_at) > 14 && t.status === "open");
315
-
316
- // Prompt for action
317
- console.log(`Found ${staleTasks.length} stale tasks. Options:`);
318
- console.log("1. Close all as 'wontfix'");
319
- console.log("2. Move to P4 backlog");
320
- console.log("3. Review individually");
321
- ```
322
-
323
- ### Database Cleanup (Weekly Maintenance)
324
-
325
- Keep database small for performance (target: under 200-500 issues):
326
-
327
- ```bash
328
- bd cleanup --days 7 # Remove closed issues older than 7 days
329
- bd list --status=closed --json | wc -l # Check closed count
330
- ```
331
-
332
- **Best Practice (from Steve Yegge):** Run `bd cleanup` every few days to prevent database bloat.
333
-
334
- ## Phase 10: Sync and Notify
335
-
336
- ```typescript
337
-
338
- ```
339
-
340
- ```typescript
341
- bd sync
342
- ```
343
-
344
- ## Alternative: Manual Triage
345
-
346
- If automated tools unavailable:
347
-
348
- ### Step 1: List and Sort
349
-
350
- ```bash
351
- bd list --status=open --sort=priority
352
- ```
353
-
354
- ### Step 2: Identify Dependencies
355
-
356
- ```bash
357
- bd show <id> # Check "Blocks" and "Blocked By" fields
358
- ```
359
-
360
- ### Step 3: Manual Assignment
361
-
362
- ```bash
363
- bd update <id> --assign=@username
364
- bd update <id> --priority=1
365
- ```
366
-
367
- ## Examples
368
-
369
- ```bash
370
- /triage # Full triage report
371
- /triage --auto-assign # Auto-assign ready tasks
372
- /triage --sla # Focus on SLA status
373
- /triage --bottleneck # Focus on blocking tasks
374
- /triage --stale # Review stale tasks
375
- ```
376
-
377
- ## Integration
378
-
379
- After triage:
380
-
381
- ```
382
- Recommended Next Commands:
383
- ━━━━━━━━━━━━━━━━━━━━━━━━━
384
-
385
- /implement bd-abc12 # Start highest priority task
386
- /start bd-def34 # Begin planning next task
387
- /status # Verify changes applied
388
- ```
389
-
390
- ## Metrics to Track
391
-
392
- Over time, monitor:
393
-
394
- - **Throughput**: Tasks completed per week
395
- - **Cycle Time**: Average time from open → closed
396
- - **SLA Compliance**: % of tasks within SLA
397
- - **Bottleneck Frequency**: How often same tasks block
398
- - **Agent Utilization**: Balance across team
@@ -1,35 +0,0 @@
1
- ---
2
- purpose: Index of available memory templates
3
- updated: 2026-01-12
4
- ---
5
-
6
- # Memory Templates
7
-
8
- Copy these templates to `.opencode/memory/project/` when starting a new project.
9
-
10
- ## Available Templates
11
-
12
- | Template | Purpose |
13
- | ----------------- | ---------------------------------------------- |
14
- | `architecture.md` | Document project structure, modules, data flow |
15
- | `conventions.md` | Code style, naming, patterns, commit rules |
16
- | `gotchas.md` | Known issues, edge cases, troubleshooting |
17
- | `commands.md` | Build, test, lint, deploy commands |
18
-
19
- ## Usage
20
-
21
- ```bash
22
- # Copy template (replace DATE)
23
- cp _templates/architecture.md ../project/architecture.md
24
- sed -i '' "s/{{DATE}}/$(date +%Y-%m-%d)/g" ../project/architecture.md
25
-
26
- # Or create your own from scratch
27
- touch ../project/architecture.md
28
- ```
29
-
30
- ## Tips
31
-
32
- - Fill out templates when you first learn about a project
33
- - Update as you discover new patterns or issues
34
- - Use `observation` tool for quick notes during work
35
- - Use `memory-search` to find relevant context later
@@ -1,39 +0,0 @@
1
- # Observation Template
2
-
3
- **Type:** [decision | bugfix | feature | pattern | discovery | learning | warning]
4
- **Created:** [timestamp]
5
- **Bead:** [optional bead-id]
6
- **Concepts:** `tag1`, `tag2`, `tag3`
7
- **Files:** `path/to/file1.ts`, `path/to/file2.ts`
8
-
9
- ---
10
-
11
- ## Context
12
-
13
- [What situation prompted this observation? What were you working on?]
14
-
15
- ## Observation
16
-
17
- [The core insight, decision, or learning. Be specific and actionable.]
18
-
19
- ## Rationale
20
-
21
- [Why is this important? What alternatives were considered?]
22
-
23
- ## Future Reference
24
-
25
- [How should this inform future decisions? Any follow-up actions?]
26
-
27
- ---
28
-
29
- ## Type Definitions
30
-
31
- | Type | Icon | Use For |
32
- | --------- | ---- | ------------------------------------ |
33
- | decision | 🎯 | Architectural or design choices made |
34
- | bugfix | 🐛 | Bug root causes and solutions |
35
- | feature | ✨ | Feature implementation notes |
36
- | pattern | 🔄 | Recurring patterns or conventions |
37
- | discovery | 💡 | Unexpected findings or insights |
38
- | learning | 📚 | Lessons learned from experience |
39
- | warning | ⚠️ | Pitfalls to avoid, gotchas |
@@ -1,60 +0,0 @@
1
- ---
2
- purpose: Key modules, directory structure, architectural decisions
3
- updated: { { DATE } }
4
- ---
5
-
6
- # Project Architecture
7
-
8
- ## Directory Structure
9
-
10
- ```
11
- src/ # Source code
12
- index.ts # Entry point
13
- commands/ # CLI commands
14
- utils/ # Utilities
15
-
16
- dist/ # Built output
17
- .opencode/ # OpenCode configuration
18
- .beads/ # Task tracking
19
- ```
20
-
21
- ## Key Modules
22
-
23
- ### Module Name
24
-
25
- **Purpose**: Brief description
26
-
27
- **Files**:
28
-
29
- - `src/module/file.ts`
30
-
31
- **Dependencies**:
32
-
33
- - External libs
34
- - Internal modules
35
-
36
- ## Data Flow
37
-
38
- ```
39
- User Action
40
- → Module A
41
- → Module B
42
- → External Service
43
- ```
44
-
45
- ## External Dependencies
46
-
47
- - **Library**: Version, purpose
48
- - **Service**: API endpoint, auth method
49
-
50
- ## Architectural Decisions
51
-
52
- | Decision | Rationale | Trade-offs |
53
- | -------- | ------------ | ------------ |
54
- | Choice 1 | Why this way | Limitation 1 |
55
-
56
- ## TODO
57
-
58
- - [ ] Document missing modules
59
- - [ ] Add dependency diagram
60
- - [ ] Map data flow diagrams
@@ -1,72 +0,0 @@
1
- ---
2
- purpose: Build, test, lint, deploy commands discovered for this project
3
- updated: { { DATE } }
4
- ---
5
-
6
- # Project Commands
7
-
8
- ## Development
9
-
10
- ```bash
11
- npm run dev # Start development server
12
- bun run src/index.ts # Run CLI directly
13
- ```
14
-
15
- ## Build
16
-
17
- ```bash
18
- npm run build # Build for production
19
- bun build ... # Additional build options
20
- ```
21
-
22
- ## Test
23
-
24
- ```bash
25
- bun test # Run all tests
26
- bun test --watch # Watch mode
27
- bun test file.ts # Run single file
28
- ```
29
-
30
- ## Lint
31
-
32
- ```bash
33
- npm run lint # Check for issues
34
- npm run lint:fix # Auto-fix issues
35
- ```
36
-
37
- ## Typecheck
38
-
39
- ```bash
40
- npm run typecheck # TypeScript checking only
41
- ```
42
-
43
- ## Database
44
-
45
- ```bash
46
- npm run db:push # Push schema changes
47
- npm run db:studio # Open database UI
48
- ```
49
-
50
- ## Deployment
51
-
52
- ```bash
53
- npm run deploy # Deploy to production
54
- ```
55
-
56
- ## CI/CD
57
-
58
- - **Lint**: Runs on push
59
- - **Test**: Runs on push
60
- - **Deploy**: Triggers on main branch
61
-
62
- ## Beads (Task Tracking)
63
-
64
- ```bash
65
- bd ready # Find unblocked tasks
66
- bd list --status=open # All open issues
67
- bd show <id> # Full details
68
- bd create "Title" -p 2 # Create task
69
- bd update <id> --status in_progress # Claim
70
- bd close <id> --reason "Done" # Complete
71
- bd sync # Push to git
72
- ```
@@ -1,68 +0,0 @@
1
- ---
2
- purpose: Code patterns, commit style, team conventions
3
- updated: { { DATE } }
4
- ---
5
-
6
- # Project Conventions
7
-
8
- ## Code Style
9
-
10
- ### TypeScript
11
-
12
- - **Module**: ESNext, bundler moduleResolution
13
- - **Strict**: Disabled
14
- - **Imports**: Group stdlib, third-party, local
15
-
16
- ### Python
17
-
18
- - **Version**: 3.10+
19
- - **Style**: type hints required, dataclasses for config
20
-
21
- ## Naming Conventions
22
-
23
- | Type | Convention | Example |
24
- | --------- | ---------- | ----------------- |
25
- | Classes | PascalCase | `UserService` |
26
- | Functions | snake_case | `get_user_data()` |
27
- | Variables | snake_case | `user_data` |
28
- | Constants | UPPER_CASE | `MAX_RETRIES` |
29
- | Files | kebab-case | `user-service.ts` |
30
-
31
- ## Import Order
32
-
33
- ```typescript
34
- // 1. Node.js stdlib
35
- import fs from "node:fs/promises";
36
- import path from "node:path";
37
-
38
- // 2. Third-party
39
- import { cli } from "cac";
40
- import { log } from "@clack/prompts";
41
-
42
- // 3. Local
43
- import { initCommand } from "./commands/init.js";
44
- ```
45
-
46
- ## Commit Messages
47
-
48
- ```
49
- type(scope): subject
50
-
51
- body (optional)
52
-
53
- footer (optional)
54
- ```
55
-
56
- **Types**: `feat`, `fix`, `docs`, `style`, `refactor`, `test`, `chore`
57
-
58
- ## Code Review
59
-
60
- - **Self-review**: Run lint/typecheck before PR
61
- - **Test coverage**: Add tests for new features
62
- - **Docs**: Update README for user-facing changes
63
-
64
- ## Patterns to Avoid
65
-
66
- - Premature abstraction
67
- - Circular dependencies
68
- - Magic numbers/strings
@@ -1,41 +0,0 @@
1
- ---
2
- purpose: Footguns, edge cases, and "don't forget this" warnings
3
- updated: { { DATE } }
4
- ---
5
-
6
- # Project Gotchas
7
-
8
- ## Configuration Quirks
9
-
10
- ### Field Name
11
-
12
- **Issue**: What goes wrong
13
- **Fix**: How to handle it
14
-
15
- ## Dependencies
16
-
17
- ### Package Name
18
-
19
- **Version**: x.y.z
20
- **Why Required**: Purpose
21
- **Gotcha**: Edge case or limitation
22
-
23
- ## Time Wasters
24
-
25
- ### Issue Description
26
-
27
- **Symptoms**: What you'll see
28
- **Cause**: Root cause
29
- **Fix**: Solution
30
-
31
- ## Common Errors
32
-
33
- | Error Message | Cause | Fix |
34
- | ------------- | ------ | --------- |
35
- | "Error: ..." | Reason | Fix steps |
36
-
37
- ## TODO
38
-
39
- - [ ] Document more edge cases
40
- - [ ] Add troubleshooting section
41
- - [ ] List known issues