opencodekit 0.14.6 → 0.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (95) hide show
  1. package/README.md +2 -2
  2. package/dist/index.js +100 -58
  3. package/dist/template/.opencode/.env.example +1 -0
  4. package/dist/template/.opencode/AGENTS.md +13 -24
  5. package/dist/template/.opencode/README.md +8 -119
  6. package/dist/template/.opencode/agent/explore.md +2 -3
  7. package/dist/template/.opencode/agent/general.md +56 -0
  8. package/dist/template/.opencode/agent/plan.md +54 -0
  9. package/dist/template/.opencode/agent/scout.md +15 -5
  10. package/dist/template/.opencode/command/analyze-project.md +2 -2
  11. package/dist/template/.opencode/command/brainstorm.md +1 -1
  12. package/dist/template/.opencode/command/design-audit.md +4 -5
  13. package/dist/template/.opencode/command/design.md +4 -13
  14. package/dist/template/.opencode/command/generate-pattern.md +2 -9
  15. package/dist/template/.opencode/command/implement.md +4 -4
  16. package/dist/template/.opencode/command/init.md +1 -1
  17. package/dist/template/.opencode/command/new-feature.md +2 -3
  18. package/dist/template/.opencode/command/plan.md +1 -1
  19. package/dist/template/.opencode/command/pr.md +0 -1
  20. package/dist/template/.opencode/command/research.md +20 -6
  21. package/dist/template/.opencode/command/restore-image.md +1 -9
  22. package/dist/template/.opencode/command/revert-feature.md +1 -1
  23. package/dist/template/.opencode/command/review-codebase.md +4 -4
  24. package/dist/template/.opencode/command/status.md +1 -2
  25. package/dist/template/.opencode/command/summarize.md +1 -2
  26. package/dist/template/.opencode/command/triage.md +4 -32
  27. package/dist/template/.opencode/dcp.jsonc +68 -68
  28. package/dist/template/.opencode/memory/_templates/README.md +35 -0
  29. package/dist/template/.opencode/memory/_templates/project/architecture.md +60 -0
  30. package/dist/template/.opencode/memory/_templates/project/commands.md +72 -0
  31. package/dist/template/.opencode/memory/_templates/project/conventions.md +68 -0
  32. package/dist/template/.opencode/memory/_templates/project/gotchas.md +41 -0
  33. package/dist/template/.opencode/memory/beads-workflow.md +30 -29
  34. package/dist/template/.opencode/memory/project/architecture.md +31 -50
  35. package/dist/template/.opencode/memory/project/commands.md +41 -22
  36. package/dist/template/.opencode/memory/project/conventions.md +39 -177
  37. package/dist/template/.opencode/memory/project/gotchas.md +21 -177
  38. package/dist/template/.opencode/memory/user.example.md +5 -0
  39. package/dist/template/.opencode/opencode.json +644 -579
  40. package/dist/template/.opencode/package.json +18 -21
  41. package/dist/template/.opencode/plugin/compaction.ts +79 -85
  42. package/dist/template/.opencode/plugin/env-ctx.ts +19 -19
  43. package/dist/template/.opencode/plugin/lib/notify.ts +41 -45
  44. package/dist/template/.opencode/plugin/lsp.ts +197 -200
  45. package/dist/template/.opencode/plugin/memory.ts +14 -112
  46. package/dist/template/.opencode/plugin/package.json +5 -5
  47. package/dist/template/.opencode/plugin/sessions.ts +1 -1
  48. package/dist/template/.opencode/plugin/skill-mcp.ts +486 -521
  49. package/dist/template/.opencode/plugin/truncator.ts +47 -50
  50. package/dist/template/.opencode/plugin/tsconfig.json +14 -14
  51. package/dist/template/.opencode/skill/chrome-devtools/mcp.json +17 -17
  52. package/dist/template/.opencode/skill/condition-based-waiting/SKILL.md +17 -12
  53. package/dist/template/.opencode/skill/condition-based-waiting/example.ts +63 -69
  54. package/dist/template/.opencode/skill/defense-in-depth/SKILL.md +14 -8
  55. package/dist/template/.opencode/skill/dispatching-parallel-agents/SKILL.md +14 -3
  56. package/dist/template/.opencode/skill/playwright/mcp.json +14 -14
  57. package/dist/template/.opencode/skill/receiving-code-review/SKILL.md +21 -8
  58. package/dist/template/.opencode/skill/requesting-code-review/review.md +14 -0
  59. package/dist/template/.opencode/skill/root-cause-tracing/SKILL.md +18 -4
  60. package/dist/template/.opencode/skill/source-code-research/SKILL.md +9 -7
  61. package/dist/template/.opencode/skill/test-driven-development/SKILL.md +49 -32
  62. package/dist/template/.opencode/skill/testing-anti-patterns/SKILL.md +40 -22
  63. package/dist/template/.opencode/skill/testing-skills-with-subagents/SKILL.md +46 -26
  64. package/dist/template/.opencode/skill/tool-priority/SKILL.md +117 -44
  65. package/dist/template/.opencode/skill/v0/SKILL.md +1 -7
  66. package/dist/template/.opencode/skill/verification-before-completion/SKILL.md +27 -19
  67. package/dist/template/.opencode/skill/writing-skills/anthropic-best-practices.md +171 -148
  68. package/dist/template/.opencode/skill/writing-skills/persuasion-principles.md +39 -6
  69. package/dist/template/.opencode/tool/memory-read.ts +44 -56
  70. package/dist/template/.opencode/tool/memory-search.ts +8 -291
  71. package/dist/template/.opencode/tool/memory-update.ts +47 -51
  72. package/dist/template/.opencode/tool/observation.ts +6 -180
  73. package/dist/template/.opencode/tsconfig.json +19 -19
  74. package/package.json +19 -15
  75. package/dist/template/.opencode/.background-tasks.json +0 -114
  76. package/dist/template/.opencode/.ralph-state.json +0 -12
  77. package/dist/template/.opencode/agent/build.md +0 -327
  78. package/dist/template/.opencode/agent/ninja.md +0 -351
  79. package/dist/template/.opencode/agent/planner.md +0 -281
  80. package/dist/template/.opencode/agent/rush.md +0 -223
  81. package/dist/template/.opencode/memory/handoffs/README.md +0 -83
  82. package/dist/template/.opencode/memory/observations/.gitkeep +0 -0
  83. package/dist/template/.opencode/memory/observations/2026-01-09-pattern-ampcode-mcp-json-includetools-pattern.md +0 -42
  84. package/dist/template/.opencode/memory/vector_db/memories.lance/_transactions/0-0d25ba80-ba3b-4209-9046-b45d6093b4da.txn +0 -0
  85. package/dist/template/.opencode/memory/vector_db/memories.lance/_versions/1.manifest +0 -0
  86. package/dist/template/.opencode/memory/vector_db/memories.lance/data/1111100101010101011010004a9ef34df6b29f36a9a53a2892.lance +0 -0
  87. package/dist/template/.opencode/tool/ast-grep.ts +0 -245
  88. package/dist/template/.opencode/tool/background.ts +0 -509
  89. package/dist/template/.opencode/tool/bd-inbox.ts +0 -110
  90. package/dist/template/.opencode/tool/bd-msg.ts +0 -62
  91. package/dist/template/.opencode/tool/bd-release.ts +0 -71
  92. package/dist/template/.opencode/tool/bd-reserve.ts +0 -121
  93. package/dist/template/.opencode/tool/memory-embed.ts +0 -183
  94. package/dist/template/.opencode/tool/memory-index.ts +0 -769
  95. package/dist/template/.opencode/tool/repo-map.ts +0 -451
@@ -3,11 +3,21 @@ description: External research specialist for library docs, GitHub patterns, and
3
3
  mode: subagent
4
4
  temperature: 0.3
5
5
  maxSteps: 30
6
- tools:
7
- edit: false
8
- write: false
9
- bash: false
10
- question: false
6
+ permission:
7
+ write:
8
+ "*": deny
9
+ ".beads/artifacts/*/*.md": allow
10
+ edit:
11
+ "*": deny
12
+ ".beads/artifacts/*/*.md": allow
13
+ bash:
14
+ "*": allow
15
+ "rm*": deny
16
+ "git push*": deny
17
+ "git commit*": deny
18
+ "git reset*": deny
19
+ "npm publish*": deny
20
+ question: deny
11
21
  ---
12
22
 
13
23
  # Scout Agent
@@ -82,8 +82,8 @@ Task({
82
82
 
83
83
  **Fallback:** If Task tool fails or network is unavailable, use local tools:
84
84
 
85
- - `repo-map` for architecture analysis
86
85
  - `memory-search` for existing project knowledge
86
+ - Use `glob` + `read` to explore structure
87
87
  - Skip external research phases
88
88
 
89
89
  ---
@@ -210,7 +210,7 @@ Integrate findings from Phase 2 subagents into the report:
210
210
  If subagents failed in Phase 2, use fallback data:
211
211
 
212
212
  - Check `memory-read({ file: "project/architecture" })` for cached architecture
213
- - Use `repo-map` output for structure analysis
213
+ - Use `glob` + `read` to explore structure
214
214
  - Skip best practices comparison (mark as "N/A - offline mode")
215
215
 
216
216
  ---
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Brainstorm and explore ideas with structured ideation
3
3
  argument-hint: "<topic or bead-id> [--quick]"
4
- agent: planner
4
+ agent: plan
5
5
  subtask: true
6
6
  ---
7
7
 
@@ -107,11 +107,11 @@ Analyze all images and extract:
107
107
 
108
108
  ### For Codebase
109
109
 
110
- Search for hardcoded values using ast-grep and grep:
110
+ Search for hardcoded values using grep:
111
111
 
112
112
  ```typescript
113
- ast - grep({ pattern: 'color: "#$HEX"' });
114
- ast - grep({ pattern: 'background: "#$HEX"' });
113
+ grep({ pattern: "color:", include: "*.{css,scss,tsx,jsx}" });
114
+ grep({ pattern: "background:", include: "*.{css,scss,tsx,jsx}" });
115
115
  grep({ pattern: "#[0-9a-fA-F]{3,8}", include: "*.{css,scss,tsx,jsx}" });
116
116
  grep({ pattern: "rgb\\(", include: "*.{css,scss,tsx,jsx}" });
117
117
  grep({ pattern: "hsl\\(", include: "*.{css,scss,tsx,jsx}" });
@@ -121,8 +121,7 @@ grep({ pattern: "[0-9]+rem", include: "*.{css,scss,tsx,jsx}" });
121
121
 
122
122
  grep({ pattern: "font-size:", include: "*.css" });
123
123
  grep({ pattern: "fontSize:", include: "*.{tsx,jsx}" });
124
-
125
- ast - grep({ pattern: 'className="$$$"' }); // then analyze for arbitrary values like [16px]
124
+ grep({ pattern: "className=", include: "*.{tsx,jsx}" }); // then analyze for arbitrary values
126
125
  ```
127
126
 
128
127
  ---
@@ -356,12 +356,10 @@ const buttonVariants = cva(
356
356
  variants: {
357
357
  variant: {
358
358
  default: "bg-primary text-primary-foreground hover:bg-primary/90",
359
- secondary:
360
- "bg-secondary text-secondary-foreground hover:bg-secondary/80",
359
+ secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80",
361
360
  outline: "border border-input bg-background hover:bg-accent",
362
361
  ghost: "hover:bg-accent hover:text-accent-foreground",
363
- destructive:
364
- "bg-destructive text-destructive-foreground hover:bg-destructive/90",
362
+ destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
365
363
  },
366
364
  size: {
367
365
  sm: "h-8 px-3 text-sm",
@@ -377,17 +375,10 @@ const buttonVariants = cva(
377
375
  );
378
376
 
379
377
  interface ButtonProps
380
- extends
381
- React.ButtonHTMLAttributes<HTMLButtonElement>,
382
- VariantProps<typeof buttonVariants> {}
378
+ extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {}
383
379
 
384
380
  export function Button({ className, variant, size, ...props }: ButtonProps) {
385
- return (
386
- <button
387
- className={cn(buttonVariants({ variant, size }), className)}
388
- {...props}
389
- />
390
- );
381
+ return <button className={cn(buttonVariants({ variant, size }), className)} {...props} />;
391
382
  }
392
383
  ```
393
384
 
@@ -195,20 +195,13 @@ Use `--colors=<preset>` or specify hex values:
195
195
  /* With overlay for text readability */
196
196
  .pattern-overlay {
197
197
  background:
198
- linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)),
199
- url("pattern-512.png");
198
+ linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), url("pattern-512.png");
200
199
  background-repeat: repeat;
201
200
  }
202
201
 
203
202
  /* CSS-only alternative (if simple enough) */
204
203
  .pattern-css {
205
- background: repeating-linear-gradient(
206
- 45deg,
207
- #f0f0f0,
208
- #f0f0f0 10px,
209
- #ffffff 10px,
210
- #ffffff 20px
211
- );
204
+ background: repeating-linear-gradient(45deg, #f0f0f0, #f0f0f0 10px, #ffffff 10px, #ffffff 20px);
212
205
  }
213
206
  ```
214
207
 
@@ -64,7 +64,7 @@ bd ready --json | grep -q "$ARGUMENTS"
64
64
  // Fire all READY subtasks in parallel using Task tool
65
65
  // Multiple Task calls in one message run simultaneously
66
66
  Task({
67
- subagent_type: "rush",
67
+ subagent_type: "general",
68
68
  description: "Execute subtask 1",
69
69
  prompt: `Execute bd-subtask1: [Subtask description]
70
70
 
@@ -78,7 +78,7 @@ Task({
78
78
  });
79
79
 
80
80
  Task({
81
- subagent_type: "rush",
81
+ subagent_type: "general",
82
82
  description: "Execute subtask 2",
83
83
  prompt: `Execute bd-subtask2: [Subtask description]
84
84
  ...same pattern...`,
@@ -201,7 +201,7 @@ Task({
201
201
  subagent_type: "explore",
202
202
  description: "Find codebase patterns",
203
203
  prompt: `For implementing $ARGUMENTS, find:
204
- 1. Similar patterns in this codebase (grep/ast-grep)
204
+ 1. Similar patterns in this codebase (grep)
205
205
  2. Related test files and testing patterns
206
206
  3. Configuration or setup requirements
207
207
  Return: File paths, code patterns, test approach`,
@@ -232,7 +232,7 @@ Task({
232
232
  | `explore`| Codebase search, patterns | Read, grep, glob | Edit, bd sync |
233
233
  | `scout` | External docs, best practices | Fetch, search | Edit, bd sync |
234
234
  | `review` | Code review, debugging | Read, analyze | Edit, bd sync |
235
- | `planner`| Architecture, decomposition | Read, plan | Edit, bd sync |
235
+ | `plan` | Architecture, decomposition | Read, plan | Edit, bd sync |
236
236
 
237
237
  **You (build agent) are the leader:**
238
238
 
@@ -1,7 +1,7 @@
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: planner
4
+ agent: plan
5
5
  subtask: true
6
6
  ---
7
7
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Create a new feature with discovery, spec, plan, and sub-tasks
3
3
  argument-hint: "<feature-name> [--priority=<0-4>] [--type=<type>] [--worktree] [--quick]"
4
- agent: planner
4
+ agent: plan
5
5
  ---
6
6
 
7
7
  # New Feature: $ARGUMENTS
@@ -153,8 +153,7 @@ question({
153
153
  questions: [
154
154
  {
155
155
  header: "Approve",
156
- question:
157
- "Should I proceed with creating the specification for $ARGUMENTS?",
156
+ question: "Should I proceed with creating the specification for $ARGUMENTS?",
158
157
  options: [
159
158
  {
160
159
  label: "Yes, proceed",
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  description: Create implementation plan for a bead with subtask hierarchy
3
3
  argument-hint: "<bead-id> [--create-beads] [--parallel]"
4
- agent: planner
4
+ agent: plan
5
5
  ---
6
6
 
7
7
  # Plan: $ARGUMENTS
@@ -242,7 +242,6 @@ CI Status:
242
242
  ## Phase 7: Update Bead & Sync
243
243
 
244
244
  ```bash
245
- bd-msg --subj "PR created" --body "PR: <pr-url>\nStatus: [ready/draft]\nCI: [passing/pending]" --to "all" --importance normal
246
245
  bd sync
247
246
  ```
248
247
 
@@ -23,7 +23,21 @@ First, understand the codebase structure:
23
23
 
24
24
  ```typescript
25
25
  // Quick overview of relevant directories
26
- repo-map({ path: "src", format: "compact", maxDepth: 3 });
26
+ lsp_lsp_document_symbols({ filePath: "src/index.ts", line: 1, character: 1 });
27
+
28
+ // Find files by pattern
29
+ glob({ pattern: "src/**/*.ts" });
30
+ ```
31
+
32
+ ### Deep Dive
33
+
34
+ ```typescript
35
+ // Find similar patterns
36
+ grep({ pattern: "<text pattern>", include: "*.ts" });
37
+
38
+ // Understand types
39
+ lsp_lsp_hover({ filePath: "<file>", line: N, character: N });
40
+ lsp_lsp_find_references({ filePath: "<file>", line: N, character: N });
27
41
  ```
28
42
 
29
43
  This helps identify relevant directories and files before diving deeper.
@@ -88,17 +102,17 @@ If memory search fails (Ollama not running), continue to external sources.
88
102
 
89
103
  ### Internal Codebase - Get Quick Overview
90
104
 
91
- First, generate a compact repository map to understand the codebase structure:
105
+ First, understand codebase structure:
92
106
 
93
107
  ```typescript
94
108
  // Quick overview of relevant directories
95
- repo-map({ path: "src", format: "compact", maxDepth: 3 });
109
+ glob({ pattern: "src/**/*.ts" });
96
110
 
97
- // For specific feature area
98
- repo-map({ path: "src/commands", format: "tree", maxDepth: 2 });
111
+ // Check file structure
112
+ lsp_lsp_document_symbols({ filePath: "src/index.ts", line: 1, character: 1 });
99
113
  ```
100
114
 
101
- **Use repo-map when:**
115
+ **Use these tools when:**
102
116
 
103
117
  - Starting research on a new area of the codebase
104
118
  - Need to understand file organization before diving deep
@@ -19,15 +19,7 @@ const parseInput = (input: string) => {
19
19
  const imagePath = parts[0];
20
20
  const mode = parts[1] || "enhance";
21
21
 
22
- const validModes = [
23
- "enhance",
24
- "upscale",
25
- "restore",
26
- "denoise",
27
- "colorize",
28
- "sharpen",
29
- "deblur",
30
- ];
22
+ const validModes = ["enhance", "upscale", "restore", "denoise", "colorize", "sharpen", "deblur"];
31
23
 
32
24
  if (!validModes.includes(mode)) {
33
25
  console.warn(`Unknown mode: ${mode}. Using 'enhance' as default.`);
@@ -325,7 +325,7 @@ git checkout --ours [file] # Use reverted
325
325
  ## Phase 10: Update Bead Status
326
326
 
327
327
  ```bash
328
- bd-msg --subj "Reverted: [bead-id]" --body "Feature reverted at [timestamp]\nReason: [reason]\nBackup: backup/[bead-id]-pre-revert" --to "all" --importance normal
328
+ bd close [bead-id] --reason "Reverted: [brief reason]"
329
329
  ```
330
330
 
331
331
  ---
@@ -39,11 +39,11 @@ lsp_lsp_diagnostics(); // for each changed file
39
39
  !`npm run lint || true`
40
40
 
41
41
  ```typescript
42
- // Anti-pattern detection with ast-grep
43
- ast - grep({ pattern: "console.log($$$)" }); // Debug statements
44
- ast - grep({ pattern: "any" }); // TypeScript any
42
+ // Anti-pattern detection with grep
43
+ grep({ pattern: "console\\.log" }); // Debug statements
44
+ grep({ pattern: "any" }); // TypeScript any
45
45
  grep({ pattern: "TODO|FIXME|HACK|XXX" });
46
- ast - grep({ pattern: 'password = "$$$"' }); // Hardcoded secrets
46
+ grep({ pattern: "password\\s*=" }); // Hardcoded secrets
47
47
  ```
48
48
 
49
49
  !`npm test || pytest || cargo test`
@@ -215,10 +215,9 @@ Recommendation: Prune completed tool outputs before next major task
215
215
 
216
216
 
217
217
  REQUIRED ACTIONS
218
- ━━━━━━━━━━━━━━━━
218
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
219
219
  Priority │ Action │ Command
220
220
  ─────────┼─────────────────────────────────────┼────────────────────
221
- HIGH │ Reply to build-1 question │ bd-msg --to "build-1" --subj "Re:" --body "..."
222
221
  HIGH │ Add plan for bd-ghi56 │ /plan bd-ghi56
223
222
  MEDIUM │ Review 2 stale tasks │ /triage --stale
224
223
  LOW │ Push 2 local commits │ git push
@@ -22,8 +22,7 @@ const parseReference = (ref: string) => {
22
22
 
23
23
  // Relative references
24
24
  if (ref === "last") return { type: "relative", offset: 0 };
25
- if (ref.match(/^\d+ ago$/))
26
- return { type: "relative", offset: parseInt(ref) };
25
+ if (ref.match(/^\d+ ago$/)) return { type: "relative", offset: parseInt(ref) };
27
26
 
28
27
  // Time-based
29
28
  if (ref === "today") return { type: "time", period: "today" };
@@ -147,12 +147,7 @@ const ageHours = (now - created) / (1000 * 60 * 60);
147
147
  const slaByPriority = { 0: 4, 1: 24, 2: 168, 3: 336, 4: Infinity };
148
148
  const slaHours = slaByPriority[task.priority];
149
149
  const slaRemaining = slaHours - ageHours;
150
- const slaStatus =
151
- slaRemaining < 0
152
- ? "BREACHED"
153
- : slaRemaining < slaHours * 0.2
154
- ? "AT_RISK"
155
- : "OK";
150
+ const slaStatus = slaRemaining < 0 ? "BREACHED" : slaRemaining < slaHours * 0.2 ? "AT_RISK" : "OK";
156
151
  ```
157
152
 
158
153
  ## Phase 6: Bottleneck Analysis
@@ -272,9 +267,7 @@ const assignmentRules = {
272
267
 
273
268
  // Load balancing: prefer agent with lowest active count
274
269
  function selectAgent(role: string, agents: Agent[]): Agent {
275
- return agents
276
- .filter((a) => a.role === role)
277
- .sort((a, b) => a.activeCount - b.activeCount)[0];
270
+ return agents.filter((a) => a.role === role).sort((a, b) => a.activeCount - b.activeCount)[0];
278
271
  }
279
272
  ```
280
273
 
@@ -318,9 +311,7 @@ for each breached task:
318
311
 
319
312
  ```typescript
320
313
  // Find tasks with no activity > 14 days
321
- const staleTasks = openTasks.filter(
322
- (t) => daysSince(t.updated_at) > 14 && t.status === "open",
323
- );
314
+ const staleTasks = openTasks.filter((t) => daysSince(t.updated_at) > 14 && t.status === "open");
324
315
 
325
316
  // Prompt for action
326
317
  console.log(`Found ${staleTasks.length} stale tasks. Options:`);
@@ -340,22 +331,7 @@ bd list --status=closed --json | wc -l # Check closed count
340
331
 
341
332
  **Best Practice (from Steve Yegge):** Run `bd cleanup` every few days to prevent database bloat.
342
333
 
343
- ## Phase 10: Check Memory Health
344
-
345
- ```typescript
346
- memory - index({ action: "status" });
347
- ```
348
-
349
- If documents count is low or index is stale:
350
-
351
- ```
352
- ⚠️ Vector store may be stale.
353
- Run: memory-index rebuild
354
- ```
355
-
356
- Optionally trigger background reindex if many observations were created recently.
357
-
358
- ## Phase 11: Sync and Notify
334
+ ## Phase 10: Sync and Notify
359
335
 
360
336
  ```typescript
361
337
 
@@ -363,10 +339,6 @@ Optionally trigger background reindex if many observations were created recently
363
339
 
364
340
  ```typescript
365
341
  bd sync
366
-
367
- # Broadcast triage summary if significant changes
368
- if assignments or priority changes:
369
- bd-msg --subj "Triage Complete" --body "Assigned X tasks, updated Y priorities" --to "all" --importance normal
370
342
  ```
371
343
 
372
344
  ## Alternative: Manual Triage
@@ -1,70 +1,70 @@
1
1
  {
2
- "enabled": true,
3
- "debug": false,
4
- // "minimal" shows prune activity without noise; "off" if you want silence
5
- "pruneNotification": "off",
6
- "turnProtection": {
7
- "enabled": true,
8
- // 3 turns = faster cleanup while still protecting recent context
9
- "turns": 3
10
- },
11
- "tools": {
12
- "settings": {
13
- "nudgeEnabled": true,
14
- // Nudge every 8 tool calls (slightly more aggressive than default 10)
15
- "nudgeFrequency": 8,
16
- // Protect state-modifying and critical workflow tools
17
- // Updated for v1.1.8: Added question tool, removed legacy bd_* (use CLI)
18
- "protectedTools": [
19
- "write",
20
- "edit",
21
- "question",
22
- "memory-read",
23
- "memory-update",
24
- "memory-search",
25
- "observation",
26
- "skill",
27
- "skill_mcp",
28
- "task",
29
- "batch",
30
- "todowrite",
31
- "todoread",
32
- "lsp",
33
- "lsp_lsp_rename",
34
- "lsp_lsp_find_references",
35
- "lsp_lsp_goto_definition",
36
- "lsp_lsp_code_actions",
37
- "lsp_lsp_code_action_apply",
38
- "lsp_lsp_organize_imports",
39
- "bd-reserve",
40
- "bd-release",
41
- "bd-msg",
42
- "bd-inbox"
43
- ]
44
- },
45
- "discard": {
46
- "enabled": true
47
- },
48
- "extract": {
49
- "enabled": true,
50
- "showDistillation": false
51
- }
52
- },
53
- "strategies": {
54
- // Dedup = zero LLM cost, high impact - always enable
55
- "deduplication": {
56
- "enabled": true,
57
- "protectedTools": []
58
- },
59
- // Supersede writes = zero cost, removes redundant write inputs after read
60
- "supersedeWrites": {
61
- "enabled": true
62
- },
63
- // Purge error inputs after 3 turns
64
- "purgeErrors": {
65
- "enabled": true,
66
- "turns": 3,
67
- "protectedTools": []
68
- }
69
- }
2
+ "enabled": true,
3
+ "debug": false,
4
+ // "minimal" shows prune activity without noise; "off" if you want silence
5
+ "pruneNotification": "off",
6
+ "turnProtection": {
7
+ "enabled": true,
8
+ // 3 turns = faster cleanup while still protecting recent context
9
+ "turns": 3,
10
+ },
11
+ "tools": {
12
+ "settings": {
13
+ "nudgeEnabled": true,
14
+ // Nudge every 8 tool calls (slightly more aggressive than default 10)
15
+ "nudgeFrequency": 8,
16
+ // Protect state-modifying and critical workflow tools
17
+ // Updated for v1.1.8: Added question tool, removed legacy bd_* (use CLI)
18
+ "protectedTools": [
19
+ "write",
20
+ "edit",
21
+ "question",
22
+ "memory-read",
23
+ "memory-update",
24
+ "memory-search",
25
+ "observation",
26
+ "skill",
27
+ "skill_mcp",
28
+ "task",
29
+ "batch",
30
+ "todowrite",
31
+ "todoread",
32
+ "lsp",
33
+ "lsp_lsp_rename",
34
+ "lsp_lsp_find_references",
35
+ "lsp_lsp_goto_definition",
36
+ "lsp_lsp_code_actions",
37
+ "lsp_lsp_code_action_apply",
38
+ "lsp_lsp_organize_imports",
39
+ "bd-reserve",
40
+ "bd-release",
41
+ "bd-msg",
42
+ "bd-inbox",
43
+ ],
44
+ },
45
+ "discard": {
46
+ "enabled": true,
47
+ },
48
+ "extract": {
49
+ "enabled": true,
50
+ "showDistillation": false,
51
+ },
52
+ },
53
+ "strategies": {
54
+ // Dedup = zero LLM cost, high impact - always enable
55
+ "deduplication": {
56
+ "enabled": true,
57
+ "protectedTools": [],
58
+ },
59
+ // Supersede writes = zero cost, removes redundant write inputs after read
60
+ "supersedeWrites": {
61
+ "enabled": true,
62
+ },
63
+ // Purge error inputs after 3 turns
64
+ "purgeErrors": {
65
+ "enabled": true,
66
+ "turns": 3,
67
+ "protectedTools": [],
68
+ },
69
+ },
70
70
  }
@@ -0,0 +1,35 @@
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
@@ -0,0 +1,60 @@
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