opencode-swarm-plugin 0.12.27 → 0.12.28
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.
- package/README.md +7 -14
- package/bin/swarm.ts +100 -50
- package/package.json +1 -1
- package/global-skills/agent-patterns/SKILL.md +0 -682
- package/global-skills/code-review/SKILL.md +0 -166
- package/global-skills/debugging/SKILL.md +0 -150
- package/global-skills/resilience-patterns/SKILL.md +0 -648
- package/global-skills/tacit-knowledge-extraction/SKILL.md +0 -387
- package/global-skills/testing-strategies/SKILL.md +0 -558
- package/global-skills/zod-validation/SKILL.md +0 -763
package/README.md
CHANGED
|
@@ -197,20 +197,13 @@ skills_use(name="swarm-coordination") # Load swarm workflow
|
|
|
197
197
|
|
|
198
198
|
### Bundled Skills
|
|
199
199
|
|
|
200
|
-
| Skill
|
|
201
|
-
|
|
|
202
|
-
| `
|
|
203
|
-
| `
|
|
204
|
-
| `
|
|
205
|
-
| `
|
|
206
|
-
| `
|
|
207
|
-
| `mcp-tool-authoring` | mcp, tools | Building MCP tools - schema definition, context passing, error handling |
|
|
208
|
-
| `resilience-patterns` | errors, recovery | Error recovery, retry strategies, graceful degradation |
|
|
209
|
-
| `skill-creator` | meta, skills | Guide for creating effective skills |
|
|
210
|
-
| `swarm-coordination` | swarm, multi-agent | Multi-agent coordination patterns for swarm workflows |
|
|
211
|
-
| `tacit-knowledge-extraction` | knowledge, patterns | Extracting tacit knowledge into pattern languages |
|
|
212
|
-
| `testing-strategies` | testing, vitest | Testing async/swarm operations, mocking patterns |
|
|
213
|
-
| `zod-validation` | zod, typescript | Schema validation patterns with Zod |
|
|
200
|
+
| Skill | Tags | Description |
|
|
201
|
+
| -------------------- | -------------------- | ------------------------------------------------------------------------------------ |
|
|
202
|
+
| `cli-builder` | cli, typescript, bun | Building TypeScript CLIs with Bun - argument parsing, subcommands, output formatting |
|
|
203
|
+
| `learning-systems` | learning, feedback | Implicit feedback scoring, confidence decay, anti-pattern detection |
|
|
204
|
+
| `mcp-tool-authoring` | mcp, tools | Building MCP tools - schema definition, context passing, error handling |
|
|
205
|
+
| `skill-creator` | meta, skills | Guide for creating effective skills |
|
|
206
|
+
| `swarm-coordination` | swarm, multi-agent | Multi-agent coordination patterns for swarm workflows |
|
|
214
207
|
|
|
215
208
|
### Skill Locations
|
|
216
209
|
|
package/bin/swarm.ts
CHANGED
|
@@ -1084,17 +1084,17 @@ async function setup() {
|
|
|
1084
1084
|
const s = p.spinner();
|
|
1085
1085
|
s.start("Updating AGENTS.md...");
|
|
1086
1086
|
|
|
1087
|
-
const agentsPrompt = `You are updating the user's AGENTS.md file to add
|
|
1087
|
+
const agentsPrompt = `You are updating the user's AGENTS.md file to add swarm plugin awareness.
|
|
1088
1088
|
|
|
1089
1089
|
## Task
|
|
1090
|
-
Read ${agentsPath} and add
|
|
1090
|
+
Read ${agentsPath} and add sections for Skills, CASS, and Semantic Memory if they don't exist. Update existing sections if present.
|
|
1091
1091
|
|
|
1092
1092
|
## What to Add
|
|
1093
1093
|
|
|
1094
|
-
1. **Tool Preferences** - If there's a tool_preferences
|
|
1095
|
-
- skills_list -
|
|
1096
|
-
-
|
|
1097
|
-
-
|
|
1094
|
+
1. **Tool Preferences** - If there's a tool_preferences section, add these tools:
|
|
1095
|
+
- skills_list, skills_use, skills_read - knowledge injection
|
|
1096
|
+
- cass_search, cass_view, cass_expand - search past agent sessions
|
|
1097
|
+
- semantic-memory_find, semantic-memory_store - persistent learning
|
|
1098
1098
|
|
|
1099
1099
|
2. **Skills Section** - Add this (adapt style to match the file):
|
|
1100
1100
|
|
|
@@ -1110,17 +1110,65 @@ Skills are reusable knowledge packages. Load them on-demand for specialized task
|
|
|
1110
1110
|
**Usage:**
|
|
1111
1111
|
\`\`\`
|
|
1112
1112
|
skills_list() # See available skills
|
|
1113
|
-
skills_use(name="
|
|
1114
|
-
skills_use(name="
|
|
1113
|
+
skills_use(name="swarm-coordination") # Load a skill
|
|
1114
|
+
skills_use(name="cli-builder", context="building a new CLI") # With context
|
|
1115
1115
|
\`\`\`
|
|
1116
1116
|
|
|
1117
|
-
**Bundled Skills:**
|
|
1117
|
+
**Bundled Skills:** cli-builder, learning-systems, mcp-tool-authoring, skill-creator, swarm-coordination
|
|
1118
|
+
|
|
1119
|
+
3. **CASS Section** - Add this:
|
|
1120
|
+
|
|
1121
|
+
### CASS (Cross-Agent Session Search)
|
|
1122
|
+
|
|
1123
|
+
Search across ALL your AI coding agent histories before solving problems from scratch.
|
|
1124
|
+
|
|
1125
|
+
**When to Use:**
|
|
1126
|
+
- BEFORE implementing anything - check if any agent solved it before
|
|
1127
|
+
- When debugging - "what did I try last time this error happened?"
|
|
1128
|
+
- When learning patterns - "how did Cursor handle this API?"
|
|
1129
|
+
|
|
1130
|
+
**Usage:**
|
|
1131
|
+
\`\`\`
|
|
1132
|
+
cass_search(query="authentication token refresh", limit=5) # Search all agents
|
|
1133
|
+
cass_search(query="useEffect cleanup", agent="claude", days=7) # Filter by agent/time
|
|
1134
|
+
cass_view(path="/path/from/search", line=42) # View specific result
|
|
1135
|
+
cass_expand(path="/path", line=42, context=10) # Expand context around match
|
|
1136
|
+
\`\`\`
|
|
1137
|
+
|
|
1138
|
+
**Pro tip:** Query CASS at the START of complex tasks. Past solutions save time.
|
|
1139
|
+
|
|
1140
|
+
4. **Semantic Memory Section** - Add this:
|
|
1141
|
+
|
|
1142
|
+
### Semantic Memory (Persistent Learning)
|
|
1143
|
+
|
|
1144
|
+
Store and retrieve learnings across sessions. Memories persist and are searchable.
|
|
1145
|
+
|
|
1146
|
+
**When to Use:**
|
|
1147
|
+
- After solving a tricky problem - store the solution
|
|
1148
|
+
- After making architectural decisions - store the reasoning
|
|
1149
|
+
- Before starting work - search for relevant past learnings
|
|
1150
|
+
- When you discover project-specific patterns
|
|
1151
|
+
|
|
1152
|
+
**Usage:**
|
|
1153
|
+
\`\`\`
|
|
1154
|
+
# Store a learning
|
|
1155
|
+
semantic-memory_store(information="OAuth refresh tokens need 5min buffer before expiry", metadata="auth, tokens")
|
|
1156
|
+
|
|
1157
|
+
# Search for relevant memories
|
|
1158
|
+
semantic-memory_find(query="token refresh", limit=5)
|
|
1159
|
+
|
|
1160
|
+
# Validate a memory is still accurate (resets decay timer)
|
|
1161
|
+
semantic-memory_validate(id="mem_123")
|
|
1162
|
+
\`\`\`
|
|
1163
|
+
|
|
1164
|
+
**Pro tip:** Store the WHY, not just the WHAT. Future you needs context.
|
|
1118
1165
|
|
|
1119
1166
|
## Rules
|
|
1120
1167
|
- Preserve existing content and style
|
|
1121
|
-
- Don't duplicate - update
|
|
1122
|
-
- Keep tone consistent
|
|
1123
|
-
- Place
|
|
1168
|
+
- Don't duplicate - update existing sections if present
|
|
1169
|
+
- Keep tone consistent with the rest of the file
|
|
1170
|
+
- Place sections in logical order (Skills, CASS, Semantic Memory)
|
|
1171
|
+
- If there's a tool_preferences section, add the tools there too
|
|
1124
1172
|
|
|
1125
1173
|
Edit the file now.`;
|
|
1126
1174
|
|
|
@@ -1641,61 +1689,63 @@ async function agents() {
|
|
|
1641
1689
|
const s = p.spinner();
|
|
1642
1690
|
s.start("Updating AGENTS.md with skill awareness...");
|
|
1643
1691
|
|
|
1644
|
-
const prompt = `You are updating the user's AGENTS.md file to add
|
|
1692
|
+
const prompt = `You are updating the user's AGENTS.md file to add swarm plugin awareness.
|
|
1645
1693
|
|
|
1646
1694
|
## Task
|
|
1647
|
-
Read ~/.config/opencode/AGENTS.md and add
|
|
1695
|
+
Read ~/.config/opencode/AGENTS.md and add sections for Skills, CASS, and Semantic Memory if they don't exist.
|
|
1648
1696
|
|
|
1649
1697
|
## What to Add
|
|
1650
|
-
Add a section about using skills. Include:
|
|
1651
1698
|
|
|
1652
|
-
1. **Tool Preferences
|
|
1653
|
-
- skills_list -
|
|
1654
|
-
-
|
|
1655
|
-
-
|
|
1699
|
+
1. **Tool Preferences** - Add these tools to any tool_preferences section:
|
|
1700
|
+
- skills_list, skills_use, skills_read - knowledge injection
|
|
1701
|
+
- cass_search, cass_view, cass_expand - search past agent sessions
|
|
1702
|
+
- semantic-memory_find, semantic-memory_store - persistent learning
|
|
1656
1703
|
|
|
1657
|
-
2. **Skills Section
|
|
1704
|
+
2. **Skills Section**:
|
|
1658
1705
|
|
|
1659
1706
|
### Skills (Knowledge Injection)
|
|
1660
1707
|
|
|
1661
|
-
Skills are reusable knowledge packages. Load
|
|
1708
|
+
Skills are reusable knowledge packages. Load on-demand for specialized tasks.
|
|
1662
1709
|
|
|
1663
|
-
**When to Use
|
|
1664
|
-
- Before starting unfamiliar work - check if a skill exists
|
|
1665
|
-
- When you need domain-specific patterns
|
|
1666
|
-
- For complex workflows that benefit from guidance
|
|
1710
|
+
**When to Use:** Before unfamiliar work, when you need domain patterns, for complex workflows.
|
|
1667
1711
|
|
|
1668
|
-
**Available Skills** (run \`skills_list()\` to see current list):
|
|
1669
|
-
- agent-patterns: AI agent design patterns
|
|
1670
|
-
- cli-builder: TypeScript CLI patterns
|
|
1671
|
-
- code-review: Review checklists
|
|
1672
|
-
- debugging: Root cause analysis
|
|
1673
|
-
- learning-systems: Feedback scoring, pattern maturity
|
|
1674
|
-
- mcp-tool-authoring: Building MCP tools
|
|
1675
|
-
- resilience-patterns: Error recovery, retries
|
|
1676
|
-
- skill-creator: Creating new skills
|
|
1677
|
-
- swarm-coordination: Multi-agent workflows
|
|
1678
|
-
- tacit-knowledge-extraction: Pattern mining
|
|
1679
|
-
- testing-strategies: Vitest patterns
|
|
1680
|
-
- zod-validation: Schema validation
|
|
1681
|
-
|
|
1682
|
-
**Usage Pattern:**
|
|
1683
1712
|
\`\`\`
|
|
1684
|
-
#
|
|
1685
|
-
|
|
1713
|
+
skills_list() # See available skills
|
|
1714
|
+
skills_use(name="swarm-coordination") # Load a skill
|
|
1715
|
+
\`\`\`
|
|
1716
|
+
|
|
1717
|
+
**Bundled:** cli-builder, learning-systems, mcp-tool-authoring, skill-creator, swarm-coordination
|
|
1718
|
+
|
|
1719
|
+
3. **CASS Section**:
|
|
1720
|
+
|
|
1721
|
+
### CASS (Cross-Agent Session Search)
|
|
1722
|
+
|
|
1723
|
+
Search ALL your AI coding agent histories before solving from scratch.
|
|
1686
1724
|
|
|
1687
|
-
|
|
1688
|
-
skills_use(name="debugging")
|
|
1725
|
+
**When to Use:** BEFORE implementing - check if solved before. When debugging - what worked last time?
|
|
1689
1726
|
|
|
1690
|
-
|
|
1691
|
-
|
|
1727
|
+
\`\`\`
|
|
1728
|
+
cass_search(query="auth token refresh", limit=5) # Search all agents
|
|
1729
|
+
cass_view(path="/path/from/search", line=42) # View result
|
|
1730
|
+
\`\`\`
|
|
1731
|
+
|
|
1732
|
+
4. **Semantic Memory Section**:
|
|
1733
|
+
|
|
1734
|
+
### Semantic Memory (Persistent Learning)
|
|
1735
|
+
|
|
1736
|
+
Store and retrieve learnings across sessions.
|
|
1737
|
+
|
|
1738
|
+
**When to Use:** After solving tricky problems, after architectural decisions, before starting work.
|
|
1739
|
+
|
|
1740
|
+
\`\`\`
|
|
1741
|
+
semantic-memory_store(information="OAuth needs 5min buffer", metadata="auth")
|
|
1742
|
+
semantic-memory_find(query="token refresh", limit=5)
|
|
1692
1743
|
\`\`\`
|
|
1693
1744
|
|
|
1694
1745
|
## Rules
|
|
1695
|
-
- Preserve
|
|
1696
|
-
-
|
|
1697
|
-
-
|
|
1698
|
-
- Keep the tone consistent with the rest of the file
|
|
1746
|
+
- Preserve existing content and style
|
|
1747
|
+
- Don't duplicate - update if sections exist
|
|
1748
|
+
- Keep tone consistent
|
|
1699
1749
|
|
|
1700
1750
|
Edit the file now.`;
|
|
1701
1751
|
|
package/package.json
CHANGED