opencode-swarm-plugin 0.30.6 → 0.30.7

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.
@@ -406,21 +406,44 @@ swarm_checkpoint(
406
406
 
407
407
  **Checkpoints preserve context so you can recover if things go wrong.**
408
408
 
409
- ### Step 8: Store Learnings (if you discovered something)
409
+ ### Step 8: 💾 STORE YOUR LEARNINGS (if you discovered something)
410
+
411
+ **If you learned it the hard way, STORE IT so the next agent doesn't have to.**
412
+
410
413
  \`\`\`
411
414
  semantic-memory_store(
412
415
  information="<what you learned, WHY it matters, how to apply it>",
413
- metadata="<tags: domain, tech-stack, pattern-type>"
416
+ tags="<domain, tech-stack, pattern-type>"
414
417
  )
415
418
  \`\`\`
416
419
 
417
- **Store:**
418
- - Tricky bugs you solved (root cause + solution)
419
- - Project-specific patterns or domain rules
420
- - Tool/library gotchas and workarounds
421
- - Failed approaches (anti-patterns to avoid)
420
+ **MANDATORY Storage Triggers - Store when you:**
421
+ - 🐛 **Solved a tricky bug** (>15min debugging) - include root cause + solution
422
+ - 💡 **Discovered a project-specific pattern** - domain rules, business logic quirks
423
+ - ⚠️ **Found a tool/library gotcha** - API quirks, version-specific bugs, workarounds
424
+ - 🚫 **Tried an approach that failed** - anti-patterns to avoid, why it didn't work
425
+ - 🏗️ **Made an architectural decision** - reasoning, alternatives considered, tradeoffs
426
+
427
+ **What Makes a GOOD Memory:**
422
428
 
423
- **Don't store generic knowledge.** Store the WHY, not just the WHAT.
429
+ **GOOD** (actionable, explains WHY):
430
+ \`\`\`
431
+ "OAuth refresh tokens need 5min buffer before expiry to avoid race conditions.
432
+ Without buffer, token refresh can fail mid-request if expiry happens between
433
+ check and use. Implemented with: if (expiresAt - Date.now() < 300000) refresh()"
434
+ \`\`\`
435
+
436
+ ❌ **BAD** (generic, no context):
437
+ \`\`\`
438
+ "Fixed the auth bug by adding a null check"
439
+ \`\`\`
440
+
441
+ **What NOT to Store:**
442
+ - Generic knowledge that's in official documentation
443
+ - Implementation details that change frequently
444
+ - Vague descriptions without context ("fixed the thing")
445
+
446
+ **The WHY matters more than the WHAT.** Future agents need context to apply your learning.
424
447
 
425
448
  ### Step 9: Complete (REQUIRED - releases reservations)
426
449
  \`\`\`
@@ -511,17 +534,20 @@ Other cell operations:
511
534
 
512
535
  **NON-NEGOTIABLE:**
513
536
  1. Step 1 (swarmmail_init) MUST be first - do it before anything else
514
- 2. Step 2 (semantic-memory_find) MUST happen before starting work
537
+ 2. 🧠 Step 2 (semantic-memory_find) MUST happen BEFORE starting work - query first, code second
515
538
  3. Step 4 (swarmmail_reserve) - YOU reserve files, not coordinator
516
539
  4. Step 6 (swarm_progress) - Report at milestones, don't work silently
517
- 5. Step 9 (swarm_complete) - Use this to close, NOT hive_close
540
+ 5. 💾 Step 8 (semantic-memory_store) - If you learned something hard, STORE IT
541
+ 6. Step 9 (swarm_complete) - Use this to close, NOT hive_close
518
542
 
519
543
  **If you skip these steps:**
520
544
  - Your work won't be tracked (swarm_complete will fail)
521
- - You'll waste time repeating solved problems (no semantic memory query)
545
+ - 🔄 You'll waste time repeating already-solved problems (no semantic memory query)
522
546
  - Edit conflicts with other agents (no file reservation)
523
547
  - Lost work if you crash (no checkpoints)
524
- - Future agents repeat your mistakes (no learnings stored)
548
+ - 🔄 Future agents repeat YOUR mistakes (no learnings stored)
549
+
550
+ **Memory is the swarm's collective intelligence. Query it. Feed it.**
525
551
 
526
552
  Begin now.`;
527
553
 
@@ -1426,7 +1426,7 @@ describe("Swarm Prompt V2 (with Swarm Mail/Beads)", () => {
1426
1426
  expect(SUBTASK_PROMPT_V2).toContain("semantic-memory_find");
1427
1427
  expect(SUBTASK_PROMPT_V2).toContain("Query Past Learnings");
1428
1428
  expect(SUBTASK_PROMPT_V2).toContain("BEFORE starting work");
1429
- expect(SUBTASK_PROMPT_V2).toContain("Past learnings save time");
1429
+ expect(SUBTASK_PROMPT_V2).toContain("If you skip this step, you WILL waste time solving already-solved problems");
1430
1430
  });
1431
1431
 
1432
1432
  it("contains survival checklist: skills discovery and loading", () => {
@@ -1465,9 +1465,9 @@ describe("Swarm Prompt V2 (with Swarm Mail/Beads)", () => {
1465
1465
  it("contains survival checklist: semantic-memory_store for learnings", () => {
1466
1466
  // Step 8: Store discoveries and learnings
1467
1467
  expect(SUBTASK_PROMPT_V2).toContain("semantic-memory_store");
1468
- expect(SUBTASK_PROMPT_V2).toContain("Store Learnings");
1469
- expect(SUBTASK_PROMPT_V2).toContain("Tricky bugs you solved");
1470
- expect(SUBTASK_PROMPT_V2).toContain("Store the WHY, not just the WHAT");
1468
+ expect(SUBTASK_PROMPT_V2).toContain("STORE YOUR LEARNINGS");
1469
+ expect(SUBTASK_PROMPT_V2).toContain("Solved a tricky bug");
1470
+ expect(SUBTASK_PROMPT_V2).toContain("The WHY matters more than the WHAT");
1471
1471
  });
1472
1472
 
1473
1473
  it("does NOT mention coordinator reserving files", () => {