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
package/dist/index.js CHANGED
@@ -750,7 +750,7 @@ var cac = (name = "") => new CAC(name);
750
750
  // package.json
751
751
  var package_default = {
752
752
  name: "opencodekit",
753
- version: "0.15.21",
753
+ version: "0.16.1",
754
754
  description: "CLI tool for bootstrapping and managing OpenCodeKit projects",
755
755
  keywords: ["agents", "cli", "mcp", "opencode", "opencodekit", "template"],
756
756
  license: "MIT",
@@ -3869,23 +3869,21 @@ var MODEL_PRESETS = {
3869
3869
  looker: "opencode/kimi-k2.5-free",
3870
3870
  vision: "opencode/kimi-k2.5-free",
3871
3871
  scout: "opencode/minimax-m2.1-free",
3872
- painter: "opencode/kimi-k2.5-free",
3873
- compaction: "opencode/kimi-k2.5-free"
3872
+ painter: "opencode/kimi-k2.5-free"
3874
3873
  }
3875
3874
  },
3876
3875
  recommend: {
3877
3876
  model: "github-copilot/claude-opus-4.5",
3878
3877
  agents: {
3879
3878
  build: "github-copilot/claude-opus-4.5",
3880
- plan: "openai/gpt-5.2",
3881
- review: "openai/gpt-5.2-codex",
3879
+ plan: "github-copilot/gpt-5.2-codex",
3880
+ review: "github-copilot/gpt-5.2-codex",
3882
3881
  explore: "proxypal/gemini-3-flash-preview",
3883
3882
  general: "opencode/kimi-k2.5-free",
3884
3883
  looker: "proxypal/gemini-3-flash-preview",
3885
3884
  vision: "proxypal/gemini-3-pro-preview",
3886
3885
  scout: "opencode/kimi-k2.5-free",
3887
- painter: "proxypal/gemini-3-pro-image-preview",
3888
- compaction: "opencode/kimi-k2.5-free"
3886
+ painter: "proxypal/gemini-3-pro-image-preview"
3889
3887
  }
3890
3888
  }
3891
3889
  };
@@ -16,6 +16,12 @@ Everything else is guidelines, not laws.
16
16
 
17
17
  ---
18
18
 
19
+ ## Skills vs Commands
20
+
21
+ - Use **commands** for user-facing entrypoints (workflows and intent).
22
+ - Use **skills** for reusable procedures and checklists.
23
+ - If a command mostly repeats steps used elsewhere, move those steps into a skill.
24
+
19
25
  ## Core Constraints
20
26
 
21
27
  These are hard limits that must never be violated:
@@ -213,17 +219,51 @@ Chain: grep → read → LSP(9) → memory → understand → edit
213
219
 
214
220
  **DO NOT proceed without checking memory proactively.** Memory is your external brain. Use it before you start work, not just when someone asks you to.
215
221
 
222
+ ### Memory Architecture
223
+
224
+ The memory system uses **SQLite + FTS5** as the single source of truth:
225
+
226
+ ```
227
+ Write: observation() → SQLite only
228
+ memory-update() → SQLite only
229
+
230
+ Read: memory-search() → FTS5 full-text search (BM25 ranking)
231
+ memory-get() → Full observation details by ID
232
+ memory-read() → SQLite only
233
+ memory-timeline() → Chronological context around anchor
234
+ ```
235
+
216
236
  ### The Three Actions
217
237
 
218
- First, DO NOT start any significant work without checking memory. Run `memory-search` to find relevant context about the project, the user's preferences, and past decisions. Run `memory-read` for active files that contain information you need to remember. Checking memory before starting prevents you from forgetting important context that affects your work.
238
+ First, DO NOT start any significant work without checking memory. Run `memory-search` to find relevant context using FTS5 full-text search. The search returns a **compact index** (50-100 tokens per result) for progressive disclosure. If you need full details, use `memory-get` with the observation ID.
219
239
 
220
- Second, DO NOT skip saving your own learnings. When you make decisions, discover patterns, or encounter gotchas, use the `observation` tool to save them immediately. Capture the insight before you forget it. What you don't write down, you will lose.
240
+ Second, DO NOT skip saving your own learnings. When you make decisions, discover patterns, or encounter gotchas, use the `observation` tool to save them immediately. Use the enhanced schema:
241
+
242
+ ```typescript
243
+ observation({
244
+ type: "decision", // decision, bugfix, feature, pattern, discovery, learning, warning
245
+ title: "Use JWT for auth",
246
+ narrative: "Why this decision was made...",
247
+ facts: "stateless, scalable", // Key facts (comma-separated)
248
+ concepts: "auth, jwt, security", // Keywords for search
249
+ confidence: "high", // high, medium, low
250
+ });
251
+ ```
221
252
 
222
253
  Third, DO NOT ignore LSP nudges. If the system suggests running an LSP operation and you see that nudge, execute it immediately. Don't defer it and don't skip it. Nudges exist because something needs attention.
223
254
 
224
255
  ### Memory-start protocol
225
256
 
226
- At the start of any significant task, complete these three steps in order. First, run `memory-search` with relevant keywords to find context. Second, run `memory-read` on project files that might be relevant. Third, run `memory-read` on user preference files to remember what the user wants. Only after completing these steps should you proceed with the actual work.
257
+ At the start of any significant task, complete these three steps in order. First, run `memory-search` with relevant keywords to find context (returns compact index). Second, run `memory-get` for any observations you need full details on. Third, run `memory-read` for handoffs, research, or template files. Only after completing these steps should you proceed with the actual work.
258
+
259
+ ### Progressive Disclosure Pattern
260
+
261
+ Memory search intentionally returns **compact results** (50-100 tokens each) to avoid context bloat. Follow this pattern:
262
+
263
+ 1. `memory-search({ query: "auth" })` → Get compact index
264
+ 2. Identify relevant observation IDs from index
265
+ 3. `memory-get({ ids: "42,45" })` → Fetch full details only for what you need
266
+ 4. `memory-timeline({ anchor_id: 42 })` → See chronological context if needed
227
267
 
228
268
  ### Atomic Version
229
269
 
@@ -231,8 +271,35 @@ At the start of any significant task, complete these three steps in order. First
231
271
  DO NOT start without memory-search.
232
272
  DO NOT skip observation on decisions.
233
273
  DO NOT ignore LSP Nudges.
274
+
275
+ Pattern: search → identify IDs → get details → proceed
276
+ ```
277
+
278
+ ### Memory Maintenance
279
+
280
+ For long-term storage health, use `memory-maintain` periodically:
281
+
282
+ ```bash
283
+ # Check current status
284
+ memory-maintain({ operation: "status" })
285
+
286
+ # Full maintenance (archive >90 days, checkpoint WAL, vacuum)
287
+ memory-maintain({ operation: "full" })
288
+
289
+ # Preview what would be archived
290
+ memory-maintain({ operation: "archive", older_than_days: 60, dry_run: true })
234
291
  ```
235
292
 
293
+ **Automatic maintenance** runs at session end:
294
+
295
+ - FTS5 index optimization
296
+ - WAL checkpoint (if WAL > 1MB)
297
+
298
+ **Manual maintenance** (run monthly or when storage grows):
299
+
300
+ - `archive`: Move old observations to archive table
301
+ - `vacuum`: Defragment and reclaim space
302
+
236
303
  ---
237
304
 
238
305
  ## Beads (Task Tracking)
@@ -303,7 +370,7 @@ When tools fail or return unexpected results:
303
370
 
304
371
  1. **DO NOT** retry the same call more than twice
305
372
  2. Check fallback chains in agent documentation
306
- 3. **Use Oracle for second opinion** on complex debugging
373
+ 3. **Use review agent for second opinion** on complex debugging
307
374
  4. If still stuck, ask user for guidance
308
375
  5. Log failures using `observation` tool for future reference
309
376
 
@@ -311,13 +378,13 @@ When tools fail or return unexpected results:
311
378
 
312
379
  ```
313
380
  Primary tool fails → Try alternative tool
314
- Alternative fails → Oracle for second opinion
381
+ Alternative fails → Spawn review agent for second opinion
315
382
  Still stuck → Ask user
316
383
  ```
317
384
 
318
- ### Oracle Tool
385
+ ### Review Agent (Second Opinion)
319
386
 
320
- Use `oracle` to get a second opinion from a different AI model (gpt-5.2-codex by default) for complex reasoning tasks.
387
+ Use `review` (via Task) to get a second opinion on complex reasoning tasks.
321
388
 
322
389
  **When to use:**
323
390
 
@@ -326,17 +393,12 @@ Use `oracle` to get a second opinion from a different AI model (gpt-5.2-codex by
326
393
  - Getting alternative perspectives on tricky problems
327
394
  - Breaking out of reasoning ruts or confirmation bias
328
395
 
329
- **Modes:**
330
-
331
- - `validate`: Check if reasoning is sound (default)
332
- - `alternative`: Get completely different approaches
333
- - `critique`: Stress-test ideas for weaknesses
334
- - `brainstorm`: Expand and generate new possibilities
335
-
336
396
  ```typescript
337
- oracle({ question: "Is this the right approach?", context: "..." });
338
- oracle({ question: "Why is this failing?", mode: "critique" });
339
- oracle({ question: "What alternatives exist?", mode: "alternative" });
397
+ Task({
398
+ subagent_type: "review",
399
+ description: "Second opinion",
400
+ prompt: "Review the approach and identify risks or alternatives.",
401
+ });
340
402
  ```
341
403
 
342
404
  ---
@@ -361,17 +423,17 @@ Before you start implementing, verify the requirements are clear. If interpretat
361
423
 
362
424
  Before you claim completion, verify these things:
363
425
 
364
- 1. **Run Oracle critique** on any significant code changes:
426
+ 1. **Run review agent** on any significant code changes:
365
427
 
366
428
  ```typescript
367
- oracle({
368
- question: "Is this solution overcomplicated? Could it be 10x simpler?",
369
- mode: "critique",
370
- context: "<summary of changes>",
429
+ Task({
430
+ subagent_type: "review",
431
+ description: "Critical review",
432
+ prompt: "Is this solution overcomplicated? Could it be 10x simpler?",
371
433
  });
372
434
  ```
373
435
 
374
- If Oracle suggests simplification, implement it before proceeding.
436
+ If review suggests simplification, implement it before proceeding.
375
437
 
376
438
  2. You ran `bd close <id>` with a meaningful reason
377
439
  3. You ran `bd sync` to push changes
@@ -2,12 +2,13 @@
2
2
  description: Leader agent for plan execution and parallel task coordination via Task tool.
3
3
  mode: primary
4
4
  temperature: 0.2
5
+ steps: 50
5
6
  permission:
6
7
  bash:
7
8
  "*": allow
8
9
  "git push*": ask
9
- "rm -rf*": deny
10
- "sudo*": deny
10
+ "rm -rf*": ask
11
+ "sudo*": ask
11
12
  write:
12
13
  "*": allow
13
14
  edit:
@@ -22,13 +23,93 @@ permission:
22
23
 
23
24
  You are the primary build agent for plan execution and task coordination.
24
25
 
26
+ ## Auto-Load Skills (Contextual)
27
+
28
+ Load skills based on task context. DO NOT load all skills - only what's needed.
29
+
30
+ ### Always Load (Core)
31
+
32
+ ```typescript
33
+ skill({ name: "beads" }); // Task tracking (always)
34
+ skill({ name: "verification-before-completion" }); // Never skip verification
35
+ ```
36
+
37
+ ### Load Based on Artifacts
38
+
39
+ ```typescript
40
+ // Check what exists in .beads/artifacts/<bead-id>/
41
+ const artifacts = ls(".beads/artifacts/<bead-id>/");
42
+
43
+ if (artifacts.includes("prd.md")) {
44
+ skill({ name: "prd-task" }); // PRD execution
45
+ }
46
+
47
+ if (!artifacts.includes("prd.md") && taskType === "feature") {
48
+ skill({ name: "prd" }); // PRD creation for features
49
+ }
50
+
51
+ if (artifacts.includes("plan.md")) {
52
+ skill({ name: "executing-plans" }); // Plan execution
53
+ }
54
+ ```
55
+
56
+ ### Load Based on Task Type
57
+
58
+ ```typescript
59
+ // Parallel work (3+ independent tasks)
60
+ if (recommendedAgents > 1) {
61
+ skill({ name: "swarm-coordination" }); // Full swarm workflow
62
+ skill({ name: "beads-bridge" }); // Cross-session todos
63
+ }
64
+
65
+ // Debugging/bug fixes
66
+ if (taskType === "bug") {
67
+ skill({ name: "systematic-debugging" }); // Debug workflow
68
+ skill({ name: "root-cause-tracing" }); // Trace to source
69
+ }
70
+
71
+ // Testing work
72
+ if (taskTitle.includes("test") || taskType === "test") {
73
+ skill({ name: "test-driven-development" }); // TDD workflow
74
+ skill({ name: "testing-anti-patterns" }); // Avoid bad tests
75
+ }
76
+
77
+ // Frontend/UI work
78
+ if (files.some((f) => f.includes("component") || f.endsWith(".tsx"))) {
79
+ skill({ name: "frontend-design" }); // UI patterns
80
+ skill({ name: "react-best-practices" }); // React optimization
81
+ }
82
+
83
+ // Git worktree needed
84
+ if (flags.includes("--worktree") || taskType === "epic") {
85
+ skill({ name: "using-git-worktrees" }); // Isolated workspaces
86
+ }
87
+ ```
88
+
89
+ ### Skill Loading Decision Table
90
+
91
+ | Context | Skills to Load |
92
+ | ------------------------ | -------------------------------------------------- |
93
+ | **Always** | `beads`, `verification-before-completion` |
94
+ | **Has prd.md** | `prd-task` |
95
+ | **Feature without PRD** | `prd` |
96
+ | **Has plan.md** | `executing-plans` |
97
+ | **3+ parallel tasks** | `swarm-coordination`, `beads-bridge` |
98
+ | **Bug fix** | `systematic-debugging`, `root-cause-tracing` |
99
+ | **Test work** | `test-driven-development`, `testing-anti-patterns` |
100
+ | **Frontend/UI** | `frontend-design`, `react-best-practices` |
101
+ | **Epic or --worktree** | `using-git-worktrees` |
102
+ | **Before claiming done** | `requesting-code-review` |
103
+ | **Finishing branch** | `finishing-a-development-branch` |
104
+
25
105
  ## Critical Constraints
26
106
 
27
107
  1. Read before edit; never edit unseen code.
28
- 2. Two-strike rule: after 2 failed attempts, stop and escalate.
29
- 3. Run verification after each change (lint, typecheck, test).
30
- 4. No hallucinated URLs; only use provided or verified links.
31
- 5. Ask before commits/pushes.
108
+ 2. Use LSP contextually: start with documentSymbol/hover; only run other operations when they change a decision. Never run all 9 by default.
109
+ 3. Two-strike rule: after 2 failed attempts, stop and escalate.
110
+ 4. Run verification after each change (lint, typecheck, test).
111
+ 5. No hallucinated URLs; only use provided or verified links.
112
+ 6. Ask before commits/pushes.
32
113
 
33
114
  ## Swarm Decision: Task Tool vs Single Agent
34
115
 
@@ -98,7 +179,7 @@ swarm_delegate({
98
179
  title: "<task-title>",
99
180
  expected_outcome: "<measurable end state>",
100
181
  required_tools: "read, grep, lsp, edit, bash",
101
- must_do: "LSP before edits, run tests",
182
+ must_do: "Contextual LSP before edits (only required ops), run tests",
102
183
  must_not_do: "No new deps, don't edit shared files",
103
184
  acceptance_checks: "typecheck: npm run typecheck, lint: npm run lint",
104
185
  context: "Files: <file-list>",
@@ -2,7 +2,7 @@
2
2
  description: Fast codebase search specialist. Use this agent to find files by patterns, search code for keywords, or understand how the codebase works. Specify thoroughness level - "quick" for simple lookups, "medium" for moderate exploration, "very thorough" for comprehensive analysis.
3
3
  mode: subagent
4
4
  temperature: 0.1
5
- maxSteps: 25
5
+ steps: 25
6
6
  tools:
7
7
  edit: false
8
8
  write: false
@@ -17,13 +17,63 @@ permission:
17
17
 
18
18
  You are the general subagent for fast, well-defined tasks on 1-3 files.
19
19
 
20
+ ## Minimal Skill Loading (Subagent Philosophy)
21
+
22
+ **Subagents stay lean.** Unlike the build leader, you don't load full workflows.
23
+ Only load skills that directly help execution:
24
+
25
+ ```typescript
26
+ // ALWAYS: Verification is non-negotiable
27
+ skill({ name: "verification-before-completion" });
28
+
29
+ // CONDITIONAL: Only if delegation packet exists
30
+ if (read(".beads/artifacts/<task-id>/delegation.md")) {
31
+ // Delegation packet has all context - follow it strictly
32
+ // No additional skills needed
33
+ }
34
+
35
+ // CONDITIONAL: Only if bug fix task
36
+ if (taskType === "bug" || description.includes("fix")) {
37
+ skill({ name: "systematic-debugging" });
38
+ }
39
+
40
+ // CONDITIONAL: Only if test task
41
+ if (taskType === "test" || description.includes("test")) {
42
+ skill({ name: "test-driven-development" });
43
+ }
44
+ ```
45
+
46
+ ### Subagent Skill Rules
47
+
48
+ | Rule | Why |
49
+ | --------------------------------- | ---------------------------------------- |
50
+ | **NO** `beads` skill | Subagents don't modify beads - read-only |
51
+ | **NO** `swarm-coordination` | Leader handles swarm, not workers |
52
+ | **NO** `prd` or `prd-task` | PRD workflow is leader responsibility |
53
+ | **NO** `brainstorming` | Subagents execute, don't design |
54
+ | **YES** `verification-*` | Always verify before reporting done |
55
+ | **YES** `systematic-debugging` | Only for bug fix tasks |
56
+ | **YES** `test-driven-development` | Only for test tasks |
57
+
58
+ ### Trust the Delegation Packet
59
+
60
+ If you received a delegation packet, it contains:
61
+
62
+ - Expected outcome
63
+ - Required tools
64
+ - MUST DO / MUST NOT DO rules
65
+ - Acceptance checks
66
+
67
+ **Follow the packet strictly.** Don't load extra skills that override packet instructions.
68
+
20
69
  ## Critical Constraints
21
70
 
22
71
  1. Read before edit; never edit unseen code.
23
- 2. Two-strike rule: after 2 failed attempts, stop and escalate.
24
- 3. Bail on complexity: 4+ files, architecture decisions, unclear specs → delegate.
25
- 4. No hallucinated URLs; only use provided or verified links.
26
- 5. Ask before commits/pushes.
72
+ 2. Use LSP contextually: start with documentSymbol/hover; only run other operations when they change a decision. Never run all 9 by default.
73
+ 3. Two-strike rule: after 2 failed attempts, stop and escalate.
74
+ 4. Bail on complexity: 4+ files, architecture decisions, unclear specs → delegate.
75
+ 5. No hallucinated URLs; only use provided or verified links.
76
+ 6. Ask before commits/pushes.
27
77
 
28
78
  ## Intent Gate
29
79
 
@@ -2,7 +2,7 @@
2
2
  description: Media extraction specialist for images, PDFs, diagrams, and documents. Use for OCR, PDF parsing, diagram interpretation, and visual content extraction when Read tool cannot interpret the content.
3
3
  mode: subagent
4
4
  temperature: 0.1
5
- maxSteps: 15
5
+ steps: 15
6
6
  tools:
7
7
  edit: false
8
8
  write: false
@@ -3,7 +3,7 @@ description: Image generation and editing specialist using Gemini 3 Pro Image. U
3
3
  mode: subagent
4
4
  model: proxypal/gemini-3-pro-image-preview
5
5
  temperature: 0.7
6
- maxSteps: 20
6
+ steps: 20
7
7
  tools:
8
8
  edit: false
9
9
  bash: false
@@ -2,6 +2,7 @@
2
2
  description: Primary planning agent for architecture and multi-phase execution; produces actionable plans with gated steps.
3
3
  mode: primary
4
4
  temperature: 0.2
5
+ steps: 50
5
6
  permission:
6
7
  write:
7
8
  "*": ask
@@ -32,6 +33,57 @@ permission:
32
33
 
33
34
  You are the primary planning agent for architecture and multi-phase execution.
34
35
 
36
+ ## Auto-Load Skills (Contextual)
37
+
38
+ Load skills based on task context. DO NOT load all skills - only what's needed.
39
+
40
+ ### Always Load (Core)
41
+
42
+ ```typescript
43
+ skill({ name: "beads" }); // Task tracking (always)
44
+ skill({ name: "brainstorming" }); // Refine ideas before implementation
45
+ ```
46
+
47
+ ### Load Based on Task Type
48
+
49
+ ```typescript
50
+ // Check task context
51
+ const bead = bd_show("<bead-id>");
52
+
53
+ // PRD-driven development
54
+ if (taskType === "feature" || taskType === "epic") {
55
+ skill({ name: "prd" }); // PRD creation workflow
56
+ skill({ name: "writing-plans" }); // Detailed implementation plans
57
+ }
58
+
59
+ // Large multi-phase work
60
+ if (estimatedPhases > 2 || recommendedAgents > 1) {
61
+ skill({ name: "swarm-coordination" }); // Parallel agent orchestration
62
+ }
63
+
64
+ // Research-heavy tasks
65
+ if (flags.includes("--research") || taskType === "research") {
66
+ skill({ name: "deep-research" }); // LSP + memory-first protocol
67
+ }
68
+
69
+ // Architecture decisions
70
+ if (taskTitle.includes("refactor") || taskTitle.includes("migrate")) {
71
+ skill({ name: "writing-plans" }); // Comprehensive implementation plans
72
+ }
73
+ ```
74
+
75
+ ### Skill Loading Decision Table
76
+
77
+ | Context | Skills to Load |
78
+ | ---------------------------- | ----------------------------------- |
79
+ | **Always** | `beads`, `brainstorming` |
80
+ | **Feature/Epic** | `prd`, `writing-plans` |
81
+ | **Multi-phase (3+)** | `swarm-coordination` |
82
+ | **Research task** | `deep-research` |
83
+ | **Refactor/Migration** | `writing-plans` |
84
+ | **UI/UX planning** | `frontend-design` (for guidelines) |
85
+ | **Before handoff to @build** | `writing-plans` (if plan.md needed) |
86
+
35
87
  ## Critical Constraints
36
88
 
37
89
  1. No code edits outside planning docs. Read-first, no destructive commands.
@@ -2,7 +2,7 @@
2
2
  description: Code review, debugging, and security audit specialist. Use this agent for critical analysis, complex debugging, architecture decisions, or when you need evidence-based recommendations.
3
3
  mode: subagent
4
4
  temperature: 0.1
5
- maxSteps: 50
5
+ steps: 50
6
6
  tools:
7
7
  edit: false
8
8
  write: false
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  description: External research specialist for library docs, GitHub patterns, and framework analysis. Use this agent when you need API references, real-world code examples, or best practices from external sources.
3
3
  mode: subagent
4
- temperature: 0.3
5
- maxSteps: 30
4
+ temperature: 1.0
5
+ steps: 30
6
6
  permission:
7
7
  write:
8
8
  "*": deny
@@ -132,7 +132,7 @@ To construct a permalink: use `grepsearch` to find code, then build the URL from
132
132
  | 1 | memory-search | Past research findings | Instant |
133
133
  | 2 | context7 | Official library docs | Fast |
134
134
  | 3 | codesearch | Exa Code API for SDK/library patterns | Fast |
135
- | 4 | grepsearch | Cross-repo GitHub code search (1M+ repos) | Medium |
135
+ | 4 | grepsearch | Cross-repo GitHub code search (1M+ repos) | Medium |
136
136
  | 5 | webfetch | Specific doc URLs, READMEs, changelogs | Medium |
137
137
  | 6 | opensrc + LSP | Clone & analyze source code | Slow |
138
138
  | 7 | websearch | Tutorials, blog posts, recent news | Slow |
@@ -2,7 +2,7 @@
2
2
  description: Visual content specialist for multimodal analysis, mockups, PDFs, diagrams, and UI/UX guidance. Use this agent for image analysis, accessibility audits, and anti-AI-slop design recommendations.
3
3
  mode: subagent
4
4
  temperature: 0.3
5
- maxSteps: 40
5
+ steps: 40
6
6
  tools:
7
7
  edit: false
8
8
  write: false