@veedubin/boomerang-v3 0.1.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.
- package/.github/workflows/npm-publish.yml +58 -0
- package/.opencode/skills/boomerang-agent-builder/SKILL.md +226 -0
- package/.opencode/skills/boomerang-architect/SKILL.md +252 -0
- package/.opencode/skills/boomerang-coder/SKILL.md +283 -0
- package/.opencode/skills/boomerang-explorer/SKILL.md +58 -0
- package/.opencode/skills/boomerang-git/SKILL.md +115 -0
- package/.opencode/skills/boomerang-handoff/SKILL.md +209 -0
- package/.opencode/skills/boomerang-init/SKILL.md +117 -0
- package/.opencode/skills/boomerang-linter/SKILL.md +92 -0
- package/.opencode/skills/boomerang-orchestrator/SKILL.md +401 -0
- package/.opencode/skills/boomerang-release/SKILL.md +116 -0
- package/.opencode/skills/boomerang-scraper/SKILL.md +105 -0
- package/.opencode/skills/boomerang-tester/SKILL.md +107 -0
- package/.opencode/skills/boomerang-writer/SKILL.md +93 -0
- package/.opencode/skills/mcp-specialist/SKILL.md +130 -0
- package/.opencode/skills/researcher/SKILL.md +118 -0
- package/AGENTS.md +333 -0
- package/README.md +305 -0
- package/dist/index.js +13 -0
- package/dist/memini-client/index.js +560 -0
- package/dist/memini-client/schema.js +13 -0
- package/dist/memory/contradictions.js +119 -0
- package/dist/memory/graph.js +86 -0
- package/dist/memory/index.js +314 -0
- package/dist/memory/kg.js +111 -0
- package/dist/memory/schema.js +10 -0
- package/dist/memory/tiered.js +104 -0
- package/dist/memory/trust.js +148 -0
- package/dist/protocol/types.js +6 -0
- package/package.json +41 -0
- package/packages/opencode-plugin/src/asset-loader.ts +201 -0
- package/packages/opencode-plugin/src/git.ts +77 -0
- package/packages/opencode-plugin/src/index.ts +346 -0
- package/packages/opencode-plugin/src/memory.ts +109 -0
- package/packages/opencode-plugin/src/orchestrator.ts +263 -0
- package/packages/opencode-plugin/src/quality-gates.ts +75 -0
- package/packages/opencode-plugin/src/types.ts +141 -0
- package/src/index.ts +16 -0
- package/src/memini-client/index.ts +762 -0
- package/src/memini-client/schema.ts +60 -0
- package/src/memory/contradictions.ts +164 -0
- package/src/memory/graph.ts +116 -0
- package/src/memory/index.ts +422 -0
- package/src/memory/kg.ts +166 -0
- package/src/memory/schema.ts +274 -0
- package/src/memory/tiered.ts +133 -0
- package/src/memory/trust.ts +218 -0
- package/src/protocol/types.ts +79 -0
- package/tests/index.test.ts +58 -0
- package/tests/memini-client.test.ts +321 -0
- package/tests/memory/index.test.ts +214 -0
- package/tsconfig.json +17 -0
- package/vitest.config.ts +19 -0
package/AGENTS.md
ADDED
|
@@ -0,0 +1,333 @@
|
|
|
1
|
+
# Boomerang Agent Roster
|
|
2
|
+
|
|
3
|
+
## Core Agents
|
|
4
|
+
|
|
5
|
+
> **Note**: Models are configurable. Use `install-agents.js --primary=<model> --secondary=<model>` to customize.
|
|
6
|
+
|
|
7
|
+
| Agent | Skill | Default Model | Role |
|
|
8
|
+
|-------|-------|-------|-------|
|
|
9
|
+
| **boomerang** | boomerang-orchestrator | Gemini | ๐ฏ **Orchestrator** โ Plans, coordinates, provides intelligent routing |
|
|
10
|
+
| **boomerang-coder** | boomerang-coder | MiniMax M2.7 | ๐ป **Fast code generation** โ Write and modify code efficiently |
|
|
11
|
+
| **boomerang-architect** | boomerang-architect | Gemini | ๐๏ธ **Design decisions** โ Trade-off analysis and architecture |
|
|
12
|
+
| **boomerang-explorer** | boomerang-explorer | MiniMax M2.7 | ๐ **Codebase exploration** โ Find files by name/glob |
|
|
13
|
+
| **boomerang-tester** | boomerang-tester | MiniMax M2.7 | ๐งช **Testing specialist** โ Unit/integration tests, verification |
|
|
14
|
+
| **boomerang-linter** | boomerang-linter | MiniMax M2.7 | โ
**Quality enforcement** โ Lint, format, style consistency |
|
|
15
|
+
| **boomerang-git** | boomerang-git | MiniMax M2.7 | ๐ฆ **Version control** โ Commits, branches, history discipline |
|
|
16
|
+
| **boomerang-writer** | boomerang-writer | Gemini | ๐ **Documentation** โ Markdown writing and documentation |
|
|
17
|
+
| **boomerang-scraper** | boomerang-scraper | MiniMax M2.7 | ๐ **Web scraping** โ Research and information gathering |
|
|
18
|
+
| **boomerang-release** | boomerang-release | MiniMax M2.7 | ๐ **Release automation** โ Version bump, changelog, publish |
|
|
19
|
+
| **boomerang-agent-builder** | boomerang-agent-builder | MiniMax M2.7 | ๐๏ธ **Agent Builder** โ Builds new skills and sub-agents from detected patterns |
|
|
20
|
+
| **researcher** | researcher | MiniMax M2.7 | ๐ **Web research** โ Search, fetch, and synthesize online information |
|
|
21
|
+
| **mcp-specialist** | mcp-specialist | MiniMax M2.7 | ๐ **MCP Protocol** โ Tool design, server debug |
|
|
22
|
+
|
|
23
|
+
| Skill | Purpose | Model |
|
|
24
|
+
|-------|---------|-------|
|
|
25
|
+
| **boomerang-init** | Initialize and personalize agents for a project | Gemini |
|
|
26
|
+
| **boomerang-handoff** | Wrap-up session. Updates docs, saves context | Gemini |
|
|
27
|
+
| **boomerang-agent-builder** | Build new skills and sub-agents from patterns | MiniMax M2.7 |
|
|
28
|
+
|
|
29
|
+
## Agent Selection Guide
|
|
30
|
+
|
|
31
|
+
| Task Type | โ Primary Agent | Model |
|
|
32
|
+
|-----------|------------------|-------|
|
|
33
|
+
| Complex planning / orchestration | `boomerang` | Gemini |
|
|
34
|
+
| Architecture / design decisions | `boomerang-architect` | Gemini |
|
|
35
|
+
| Documentation writing | `boomerang-writer` | Gemini |
|
|
36
|
+
| Session initialization | `boomerang-init` | Gemini |
|
|
37
|
+
| Session wrap-up / handoff | `boomerang-handoff` | Gemini |
|
|
38
|
+
| Skill/agent creation | `boomerang-agent-builder` | MiniMax M2.7 |
|
|
39
|
+
| Fast code generation / bug fixes | `boomerang-coder` | MiniMax M2.7 |
|
|
40
|
+
| Code exploration / finding files | `boomerang-explorer` | MiniMax M2.7 |
|
|
41
|
+
| Writing / running tests | `boomerang-tester` | MiniMax M2.7 |
|
|
42
|
+
| Linting / formatting | `boomerang-linter` | MiniMax M2.7 |
|
|
43
|
+
| Git operations | `boomerang-git` | MiniMax M2.7 |
|
|
44
|
+
| Web research / scraping | `boomerang-scraper` | MiniMax M2.7 |
|
|
45
|
+
| MCP tool design / server debug | `mcp-specialist` | MiniMax M2.7 |
|
|
46
|
+
| Release automation | `boomerang-release` | MiniMax M2.7 |
|
|
47
|
+
|
|
48
|
+
### Orchestrator Permissions (v3.0.0)
|
|
49
|
+
|
|
50
|
+
The orchestrator provides **intelligent routing and context building** โ it does not execute agents directly.
|
|
51
|
+
|
|
52
|
+
**Orchestrator Does:**
|
|
53
|
+
- Analyze request and detect task type
|
|
54
|
+
- Query memini-ai for relevant context
|
|
55
|
+
- Select appropriate agent based on task
|
|
56
|
+
- Build rich Context Package with all necessary information
|
|
57
|
+
- Return `{agent, systemPrompt, contextPackage, suggestions}` to OpenCode
|
|
58
|
+
|
|
59
|
+
**Orchestrator Delegates:**
|
|
60
|
+
- Agent execution โ OpenCode (native)
|
|
61
|
+
- Multi-file changes โ sub-agents
|
|
62
|
+
- Complex implementation โ boomerang-coder
|
|
63
|
+
- Architecture decisions โ boomerang-architect
|
|
64
|
+
|
|
65
|
+
**Decision Threshold:**
|
|
66
|
+
```
|
|
67
|
+
Task Size โค 1 file AND โค 20 lines AND deterministic
|
|
68
|
+
โ Orchestrator handles directly
|
|
69
|
+
|
|
70
|
+
Task Size > 1 file OR > 20 lines OR needs analysis
|
|
71
|
+
โ Delegate to appropriate sub-agent
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### Architect Reasoning Level
|
|
75
|
+
|
|
76
|
+
The `boomerang-architect` agent uses **highest reasoning level** for Kimi K2.6 when creating implementation plans. The plan is handed back to the orchestrator as a "ready-to-run game plan" for dispatching coders, testers, etc.
|
|
77
|
+
|
|
78
|
+
## Protocol (MANDATORY)
|
|
79
|
+
|
|
80
|
+
All agents **MUST** follow the **8-Step Boomerang Protocol** โ enforcement is **MANDATORY**.
|
|
81
|
+
|
|
82
|
+
### 8-Step Protocol (MANDATORY)
|
|
83
|
+
|
|
84
|
+
1. **Query Memory** โ `memini-ai-dev_query_memories` FIRST
|
|
85
|
+
2. **Think** โ `sequential-thinking_sequentialthinking` for complex tasks
|
|
86
|
+
3. **Plan** โ Create/refine implementation plan (MANDATORY unless user explicitly waives)
|
|
87
|
+
4. **Delegate** โ OpenCode executes selected agent with Context Package
|
|
88
|
+
5. **Git Check** โ Verify working tree state before code changes
|
|
89
|
+
6. **Quality Gates** โ Lint โ Typecheck โ Test
|
|
90
|
+
7. **Update Docs & Todos** โ Update TASKS.md, todo list, AGENTS.md as needed
|
|
91
|
+
8. **Save Memory** โ `memini-ai-dev_add_memory` with project tag
|
|
92
|
+
|
|
93
|
+
### Planning Enforcement
|
|
94
|
+
|
|
95
|
+
Planning is MANDATORY unless user explicitly waives with phrases like:
|
|
96
|
+
- "skip planning"
|
|
97
|
+
- "just do it"
|
|
98
|
+
- "/boomerang-handoff"
|
|
99
|
+
- "do a handoff"
|
|
100
|
+
- "no plan needed"
|
|
101
|
+
|
|
102
|
+
Simple tasks (handoff, status checks, single-file docs) may skip planning.
|
|
103
|
+
Build/create/implement tasks ALWAYS require planning.
|
|
104
|
+
|
|
105
|
+
### Context Passing
|
|
106
|
+
|
|
107
|
+
The orchestrator builds a complete Context Package with:
|
|
108
|
+
1. Original User Request (verbatim)
|
|
109
|
+
2. Task Background
|
|
110
|
+
3. Relevant Files
|
|
111
|
+
4. Code Snippets
|
|
112
|
+
5. Previous Decisions & Constraints
|
|
113
|
+
6. Expected Output Format
|
|
114
|
+
7. Scope Boundaries (IN vs OUT of scope)
|
|
115
|
+
8. Error Handling
|
|
116
|
+
|
|
117
|
+
### memini-ai Hub
|
|
118
|
+
- Query memini-ai BEFORE answering user
|
|
119
|
+
- Save to memini-ai AFTER answering user
|
|
120
|
+
- Pass context DIRECTLY to sub-agents (don't tell them to query memory)
|
|
121
|
+
- Sub-agents save detailed work to memory, return thin summaries
|
|
122
|
+
|
|
123
|
+
## Documentation Maintenance (Encouraged)
|
|
124
|
+
|
|
125
|
+
After EVERY session interaction, consider updating:
|
|
126
|
+
|
|
127
|
+
1. **TASKS.md** โ Mark done, add new, remove outdated
|
|
128
|
+
2. **Todo List** โ Mark completed, remove old, add new
|
|
129
|
+
3. **AGENTS.md** โ Update if agent changes made
|
|
130
|
+
4. **README.md** โ Update if user-facing changes
|
|
131
|
+
5. **HANDOFF.md** โ Update at session end
|
|
132
|
+
|
|
133
|
+
> **Note**: Unlike previous versions, documentation updates are **MANDATORY** at handoff.
|
|
134
|
+
|
|
135
|
+
### memini-ai Integration Architecture (v3.0.0)
|
|
136
|
+
|
|
137
|
+
Boomerang v3 uses **memini-ai** for memory โ a Python-based semantic memory server with trust scoring, knowledge graph, and tiered loading.
|
|
138
|
+
|
|
139
|
+
| Integration | Description |
|
|
140
|
+
|-------------|-------------|
|
|
141
|
+
| **Built-in** | Direct memini-ai integration via Python subprocess |
|
|
142
|
+
| **MCP (External)** | Standalone MCP server for non-boomerang users |
|
|
143
|
+
|
|
144
|
+
#### How memini-ai Memory Works
|
|
145
|
+
|
|
146
|
+
- memini-ai is a Python FastMCP server with PostgreSQL/pgvector backend
|
|
147
|
+
- Boomerang communicates via MCP protocol to memini-ai-dev tools
|
|
148
|
+
- All memory operations are async via MCP tool calls
|
|
149
|
+
- Trust scoring, knowledge graph, and tiered loading are built-in features
|
|
150
|
+
|
|
151
|
+
### Memory Operations (via MCP)
|
|
152
|
+
|
|
153
|
+
All agents SHOULD:
|
|
154
|
+
1. **Query memory FIRST** โ `memini-ai-dev_query_memories` before work
|
|
155
|
+
2. **Use sequential-thinking** โ For complex tasks
|
|
156
|
+
3. **Save results** โ `memini-ai-dev_add_memory` when complete
|
|
157
|
+
|
|
158
|
+
### Trust-Weighted Memory
|
|
159
|
+
|
|
160
|
+
memini-ai uses a trust engine where every memory starts at trust=0.5 and is adjusted based on agent feedback:
|
|
161
|
+
|
|
162
|
+
| Signal | Trust Adjustment |
|
|
163
|
+
|--------|------------------|
|
|
164
|
+
| `agent_used` | +0.05 |
|
|
165
|
+
| `user_confirmed` | +0.10 |
|
|
166
|
+
| `agent_ignored` | -0.05 |
|
|
167
|
+
| `user_corrected` | -0.10 |
|
|
168
|
+
|
|
169
|
+
### Memory Graph
|
|
170
|
+
|
|
171
|
+
memini-ai tracks relationships between memories:
|
|
172
|
+
|
|
173
|
+
| Relationship | Description |
|
|
174
|
+
|-------------|-------------|
|
|
175
|
+
| `SUPERSEDES` | New memory replaces old one |
|
|
176
|
+
| `RELATED_TO` | Memories are semantically related |
|
|
177
|
+
| `CONTRADICTS` | Memories conflict |
|
|
178
|
+
| `DERIVED_FROM` | Memory was derived from another |
|
|
179
|
+
|
|
180
|
+
### Tiered Memory Architecture
|
|
181
|
+
|
|
182
|
+
memini-ai supports tiered memory loading for efficient context use:
|
|
183
|
+
|
|
184
|
+
| Tier | Description | Use Case |
|
|
185
|
+
|------|-------------|----------|
|
|
186
|
+
| **L0 Summary** | ~100 tokens, high-trust memories only | Session start |
|
|
187
|
+
| **L1 Key Decisions** | ~2K tokens, trust โฅ 0.8 | Planning |
|
|
188
|
+
| **L2 Full Context** | All memories | Deep research |
|
|
189
|
+
|
|
190
|
+
#### When Saving:
|
|
191
|
+
- **Routine work** (logs, quick fixes, explorations): Use standard `memini-ai-dev_add_memory`
|
|
192
|
+
- **High-value work** (architectural decisions, session summaries, verified successes): Use `memini-ai-dev_add_memory` with a descriptive `project` tag in metadata
|
|
193
|
+
|
|
194
|
+
#### When Searching:
|
|
195
|
+
- Default searches use the configured strategy automatically
|
|
196
|
+
- For explicit control: `memini-ai-dev_query_memories` with `strategy` parameter (`tiered`, `vector_only`, or `text_only`)
|
|
197
|
+
|
|
198
|
+
### Knowledge Graph Integration
|
|
199
|
+
|
|
200
|
+
memini-ai includes a knowledge graph for tracking entities and relationships:
|
|
201
|
+
|
|
202
|
+
| Tool | Purpose |
|
|
203
|
+
|------|---------|
|
|
204
|
+
| `memini-ai-dev_query_kg` | Execute formal KG queries |
|
|
205
|
+
| `memini-ai-dev_extract_entities` | Extract entities from a memory |
|
|
206
|
+
| `memini-ai-dev_get_entity_graph` | Get all connections for an entity |
|
|
207
|
+
| `memini-ai-dev_get_inference_chain` | Find inference paths between entities |
|
|
208
|
+
| `memini-ai-dev_search_entities` | Search for entities by name |
|
|
209
|
+
|
|
210
|
+
## Project-Specific Context
|
|
211
|
+
|
|
212
|
+
This is Boomerang v3.0.0 โ an orchestration plugin for OpenCode that provides intelligent routing and context, using memini-ai for memory with trust scoring, knowledge graph, and tiered loading.
|
|
213
|
+
|
|
214
|
+
## Agent Governance Rules (v3.0.0)
|
|
215
|
+
|
|
216
|
+
> **โ ๏ธ CODE-LEVEL ENFORCED** โ These rules are not optional guidelines.
|
|
217
|
+
|
|
218
|
+
### Research Ownership
|
|
219
|
+
- **boomerang-architect** owns ALL research tasks (web searches, code analysis, documentation review)
|
|
220
|
+
- boomerang-explorer is **file-finding only** - no pattern analysis or code research
|
|
221
|
+
- **memini-ai-dev_search_project** is the primary research tool for codebase investigation
|
|
222
|
+
|
|
223
|
+
### Orchestrator Delegation Rules
|
|
224
|
+
1. Research tasks โ `boomerang-architect` (NOT explorer)
|
|
225
|
+
2. File finding โ `boomerang-explorer` (only for glob/find operations)
|
|
226
|
+
3. Code implementation โ `boomerang-coder`
|
|
227
|
+
4. Never delegate research to explorer - architect handles it
|
|
228
|
+
|
|
229
|
+
### Agent Scope Boundaries
|
|
230
|
+
|
|
231
|
+
| Agent | Scope |
|
|
232
|
+
|-------|-------|
|
|
233
|
+
| boomerang-explorer | Find files by name/glob ONLY |
|
|
234
|
+
| boomerang-architect | Design + Research + Code analysis |
|
|
235
|
+
| boomerang-coder | Code implementation |
|
|
236
|
+
| boomerang-tester | Test writing |
|
|
237
|
+
| boomerang-linter | Quality enforcement |
|
|
238
|
+
|
|
239
|
+
### Why This Matters
|
|
240
|
+
- Prevents duplicate work (explorer finds file, architect analyzes)
|
|
241
|
+
- Ensures proper context for design decisions
|
|
242
|
+
- Uses memini-ai search for efficient research
|
|
243
|
+
|
|
244
|
+
## Protocol Advisor v3.0.0
|
|
245
|
+
|
|
246
|
+
> **BREAKING CHANGE**: The Boomerang Protocol is now **MANDATORY** โ it enforces all 8 steps and blocks execution if required steps are missing.
|
|
247
|
+
|
|
248
|
+
### Architecture: Mandatory State Machine
|
|
249
|
+
|
|
250
|
+
The protocol is implemented as a **mandatory state machine with enforcement at each step**:
|
|
251
|
+
|
|
252
|
+
```
|
|
253
|
+
IDLE โ MEMORY_QUERY โ SEQUENTIAL_THINK โ PLAN โ DELEGATE โ GIT_CHECK โ QUALITY_GATES โ DOC_UPDATE โ MEMORY_SAVE โ COMPLETE
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
| Component | Purpose |
|
|
257
|
+
|-----------|---------|
|
|
258
|
+
| **ProtocolStateMachine** | Tracks state transitions for logging |
|
|
259
|
+
| **ProtocolAdvisor** | Enforces steps and blocks execution if required steps are missing |
|
|
260
|
+
| **TaskRunner** | Prompt builder only (no subprocess execution) |
|
|
261
|
+
| **DocTracker** | Tracks documentation changes via SHA-256 hash comparison |
|
|
262
|
+
|
|
263
|
+
### Strictness Levels (Enforced)
|
|
264
|
+
|
|
265
|
+
| Level | Behavior |
|
|
266
|
+
|-------|----------|
|
|
267
|
+
| **lenient** | Log suggestions, auto-fix logged |
|
|
268
|
+
| **standard** | Log warnings and suggestions (default) |
|
|
269
|
+
| **strict** | BLOCK execution if required steps are missing |
|
|
270
|
+
|
|
271
|
+
**Important**: v3.0.0 **blocks execution** if mandatory steps are missing in strict mode.
|
|
272
|
+
|
|
273
|
+
### 8-Step Mandatory Protocol
|
|
274
|
+
|
|
275
|
+
1. **MEMORY_QUERY** โ MUST call `memini-ai-dev_query_memories` first
|
|
276
|
+
2. **SEQUENTIAL_THINK** โ MUST call `sequential-thinking_sequentialthinking` for complex tasks
|
|
277
|
+
3. **PLAN** โ MUST create plan or delegate to architect for build tasks
|
|
278
|
+
4. **DELEGATE** โ OpenCode handles agent execution
|
|
279
|
+
5. **GIT_CHECK** โ MUST verify working tree state before code changes
|
|
280
|
+
6. **QUALITY_GATES** โ MUST run lint/typecheck/test before completion
|
|
281
|
+
7. **DOC_UPDATE** โ Track via DocTracker, update at handoff
|
|
282
|
+
8. **MEMORY_SAVE** โ MUST save to memory when complete
|
|
283
|
+
|
|
284
|
+
### Enforcement Matrix
|
|
285
|
+
|
|
286
|
+
| Step | Requirement | Waiver Phrase |
|
|
287
|
+
|------|-------------|---------------|
|
|
288
|
+
| 1. Memory Query | MUST query memory first | None (always required) |
|
|
289
|
+
| 2. Sequential Thinking | MUST think for complex tasks | None (always required for complex) |
|
|
290
|
+
| 3. Planning | MUST plan or delegate to architect | "skip planning", "just do it", "no plan needed" |
|
|
291
|
+
| 4. Delegate | OpenCode executes | None |
|
|
292
|
+
| 5. Git Check | MUST verify working tree | "git is fine" |
|
|
293
|
+
| 6. Quality Gates | MUST run lint/typecheck/test | "skip tests", "skip gates" |
|
|
294
|
+
| 7. Doc Update | MUST update documentation | "no docs needed" |
|
|
295
|
+
| 8. Memory Save | MUST save to memory | None (always required) |
|
|
296
|
+
|
|
297
|
+
### Waiver Phrases (Escape Hatches)
|
|
298
|
+
|
|
299
|
+
| Phrase | Effect |
|
|
300
|
+
|--------|--------|
|
|
301
|
+
| `skip planning` | Skip planning for this turn |
|
|
302
|
+
| `just do it` | Skip planning and execute immediately |
|
|
303
|
+
| `no plan needed` | Skip planning for simple tasks |
|
|
304
|
+
| `skip tests` | Skip running tests |
|
|
305
|
+
| `skip gates` | Skip quality gates |
|
|
306
|
+
| `git is fine` | Skip git check |
|
|
307
|
+
| `--force` | Skip all checks (emergency) |
|
|
308
|
+
| `no docs needed` | Skip documentation update |
|
|
309
|
+
|
|
310
|
+
### memini-ai MCP Tools Available
|
|
311
|
+
|
|
312
|
+
| Tool | Purpose |
|
|
313
|
+
|------|---------|
|
|
314
|
+
| `memini-ai-dev_query_memories` | Semantic search over memories |
|
|
315
|
+
| `memini-ai-dev_add_memory` | Store a new memory entry |
|
|
316
|
+
| `memini-ai-dev_search_project` | Search indexed project files |
|
|
317
|
+
| `memini-ai-dev_index_project` | Trigger project indexing |
|
|
318
|
+
| `memini-ai-dev_get_file_contents` | Reconstruct file from indexed chunks |
|
|
319
|
+
| `memini-ai-dev_get_status` | Check memini-ai server status |
|
|
320
|
+
| `memini-ai-dev_query_kg` | Query knowledge graph |
|
|
321
|
+
| `memini-ai-dev_extract_entities` | Extract entities from memory |
|
|
322
|
+
| `memini-ai-dev_get_entity_graph` | Get entity connections |
|
|
323
|
+
| `memini-ai-dev_get_trust_score` | Get memory trust score |
|
|
324
|
+
| `memini-ai-dev_adjust_trust` | Adjust memory trust |
|
|
325
|
+
| `memini-ai-dev_find_contradictions` | Find contradictory memories |
|
|
326
|
+
|
|
327
|
+
---
|
|
328
|
+
|
|
329
|
+
## Review Notes
|
|
330
|
+
|
|
331
|
+
- **2026-05-18**: v3.0.0 RELEASED โ memini-ai integration: Trust engine, knowledge graph, tiered loading. PostgreSQL with pgvector backend. 645 tests passing in memini-ai.
|
|
332
|
+
- **2026-05-06**: v4.1.0 (boomerang-v2) โ Protocol enforcement: MANDATORY. Parallel agent launching.
|
|
333
|
+
- **2026-05-03**: v4.0.0 (boomerang-v2) โ Orchestrator as pure decision layer, OpenCode handles execution.
|
package/README.md
ADDED
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
# Boomerang v3.0.0
|
|
2
|
+
|
|
3
|
+
[](LICENSE)
|
|
4
|
+
[](https://opencode.ai)
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
[](https://github.com/Veedubin/opencode-boomerang/releases/tag/plugin-v3.0.0)
|
|
7
|
+
|
|
8
|
+
*Intelligent multi-agent coordination for OpenCode with memini-ai memory.*
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## v3.0.0 Highlights
|
|
13
|
+
|
|
14
|
+
> **NEW: memini-ai Integration** โ Boomerang v3 uses memini-ai for memory, replacing Super-Memory-TS. memini-ai is a Python-based semantic memory server with PostgreSQL/pgvector backend.
|
|
15
|
+
|
|
16
|
+
| Feature | Description |
|
|
17
|
+
|---------|-------------|
|
|
18
|
+
| **Trust-Weighted Memory** | Every memory has a trust score (0.0-1.0), adjusted by agent feedback |
|
|
19
|
+
| **Memory Graph** | Track relationships (SUPERSEDES, RELATED_TO, CONTRADICTS, DERIVED_FROM) |
|
|
20
|
+
| **Knowledge Graph** | Entity extraction, inference chains, semantic relationships |
|
|
21
|
+
| **Tiered Loading** | L0/L1/L2 summaries for efficient context loading |
|
|
22
|
+
| **Contradiction Detection** | Find and resolve conflicting memories |
|
|
23
|
+
| **PostgreSQL + pgvector** | Production-grade vector storage with streaming diskANN |
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
- **Trust-weighted memory context** โ Memories have trust scores adjusted by usage
|
|
30
|
+
- **Memory graph for decision tracking** โ Track relationships between memories
|
|
31
|
+
- **Tiered loading (L0/L1/L2)** โ Efficient context abstraction
|
|
32
|
+
- **Contradiction detection** โ Find and resolve conflicting memories
|
|
33
|
+
- **Knowledge graph integration** โ Entity extraction and inference
|
|
34
|
+
- **Python-based memini-ai** โ Modern memory server with FastMCP
|
|
35
|
+
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
## Requirements
|
|
39
|
+
|
|
40
|
+
- **Node.js** 18+
|
|
41
|
+
- **Python** 3.11+ (for memini-ai)
|
|
42
|
+
- **PostgreSQL** with pgvector (or Qdrant as fallback)
|
|
43
|
+
|
|
44
|
+
### Optional: Live Visualization
|
|
45
|
+
|
|
46
|
+
memini-ai includes a live D3.js visualization for the knowledge graph:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
cd memini-ai-dev
|
|
50
|
+
export MEMINI_DB_URL="postgresql://postgres:password@localhost:5432/postgres"
|
|
51
|
+
python -m uvicorn memini_ai.api.visualization:create_app --factory True --host 0.0.0.0 --port 8000
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Then open `http://localhost:8000` for the interactive graph visualization.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Installation
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
npm install @veedubin/boomerang-v3
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### Configuration
|
|
65
|
+
|
|
66
|
+
Add to your `.opencode/opencode.json`:
|
|
67
|
+
|
|
68
|
+
```json
|
|
69
|
+
{
|
|
70
|
+
"plugin": ["@veedubin/boomerang-v3"],
|
|
71
|
+
"mcp": {
|
|
72
|
+
"sequential-thinking": {
|
|
73
|
+
"type": "local",
|
|
74
|
+
"command": ["npx", "-y", "@modelcontextprotocol/server-sequential-thinking"],
|
|
75
|
+
"enabled": true
|
|
76
|
+
},
|
|
77
|
+
"memini-ai": {
|
|
78
|
+
"type": "stdio",
|
|
79
|
+
"command": ["python", "-m", "memini_ai.server"],
|
|
80
|
+
"env": {
|
|
81
|
+
"MEMINI_DB_URL": "postgresql://postgres:password@localhost:5432/postgres",
|
|
82
|
+
"MEMINI_PROJECT_ID": "my-project"
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Environment Variables
|
|
90
|
+
|
|
91
|
+
| Variable | Description | Default |
|
|
92
|
+
|----------|-------------|---------|
|
|
93
|
+
| `MEMINI_DB_URL` | PostgreSQL connection URL | `postgresql://postgres:password@localhost:5432/postgres` |
|
|
94
|
+
| `MEMINI_PROJECT_ID` | Project namespace | auto-generated |
|
|
95
|
+
| `MEMINI_EMBEDDING_DIM` | 1024 or 384 | 1024 |
|
|
96
|
+
| `MEMINI_DEVICE` | auto, gpu, cpu | auto |
|
|
97
|
+
| `MEMINI_TRUST_ENGINE` | Enable trust scoring | false |
|
|
98
|
+
| `MEMINI_MEMORY_GRAPH` | Enable memory graph | false |
|
|
99
|
+
| `MEMINI_KG_ENABLED` | Enable knowledge graph | false |
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
|
|
103
|
+
## Quick Start with Docker Compose
|
|
104
|
+
|
|
105
|
+
### Start PostgreSQL with pgvector
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
docker run -d --name postgres-test \
|
|
109
|
+
-e POSTGRES_PASSWORD=password \
|
|
110
|
+
-p 5432:5432 \
|
|
111
|
+
timescale/timescaledb:latest-pg15
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Start memini-ai
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
cd memini-ai-dev
|
|
118
|
+
export MEMINI_DB_URL="postgresql://postgres:password@localhost:5432/postgres"
|
|
119
|
+
python -m memini_ai.server
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Run Boomerang
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
npm run build
|
|
126
|
+
npm run typecheck
|
|
127
|
+
npm run lint
|
|
128
|
+
npx vitest run
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Architecture
|
|
134
|
+
|
|
135
|
+
### What Boomerang Is
|
|
136
|
+
|
|
137
|
+
**Boomerang is an orchestration plugin for OpenCode, not a standalone agent execution system.**
|
|
138
|
+
|
|
139
|
+
- **Boomerang's role**: Analyze requests, query memory, select appropriate agent, build rich Context Package
|
|
140
|
+
- **OpenCode's role**: Handle agent execution natively using its own agent spawning mechanism
|
|
141
|
+
- **memini-ai's role**: Persistent memory with trust scoring, knowledge graph, and tiered loading
|
|
142
|
+
|
|
143
|
+
### How It Works
|
|
144
|
+
|
|
145
|
+
```
|
|
146
|
+
User Request
|
|
147
|
+
โ
|
|
148
|
+
โผ
|
|
149
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
150
|
+
โ Boomerang โ โ Pure decision layer
|
|
151
|
+
โ Orchestrator โ - Analyzes request
|
|
152
|
+
โ โ - Queries memini-ai
|
|
153
|
+
โ โ - Selects agent
|
|
154
|
+
โ โ - Builds Context Package
|
|
155
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
156
|
+
โ
|
|
157
|
+
โผ (Context Package returned to OpenCode)
|
|
158
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
159
|
+
โ OpenCode โ โ Native agent execution
|
|
160
|
+
โ Agent Runner โ - Executes selected agent
|
|
161
|
+
โ โ - Handles lifecycle
|
|
162
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
163
|
+
โ
|
|
164
|
+
โผ (Memory operations via MCP)
|
|
165
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
166
|
+
โ memini-ai โ โ Memory server
|
|
167
|
+
โ (Python) โ - Trust scoring
|
|
168
|
+
โ โ - Knowledge graph
|
|
169
|
+
โ โ - Tiered loading
|
|
170
|
+
โโโโโโโโโโโโโโโโโโโ
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
### Orchestrator (Pure Decision Layer)
|
|
174
|
+
|
|
175
|
+
The `BoomerangOrchestrator` class provides:
|
|
176
|
+
|
|
177
|
+
| Method | Description |
|
|
178
|
+
|--------|-------------|
|
|
179
|
+
| `analyzeTask()` | Detect task type from request keywords |
|
|
180
|
+
| `selectAgent()` | Choose appropriate agent based on task type |
|
|
181
|
+
| `queryMemory()` | Search memini-ai for relevant context |
|
|
182
|
+
| `buildContextPackage()` | Create rich context for sub-agent |
|
|
183
|
+
| `orchestrate()` | Main entry โ returns `{agent, systemPrompt, contextPackage, suggestions}` |
|
|
184
|
+
|
|
185
|
+
### Context Package System
|
|
186
|
+
|
|
187
|
+
Boomerang passes comprehensive context to sub-agents:
|
|
188
|
+
- Original user request (verbatim)
|
|
189
|
+
- Task background and constraints
|
|
190
|
+
- Relevant files and code snippets
|
|
191
|
+
- Expected output format
|
|
192
|
+
- Scope boundaries and escalation targets
|
|
193
|
+
|
|
194
|
+
This ensures sub-agents have everything they need to work effectively.
|
|
195
|
+
|
|
196
|
+
### memini-ai Hub
|
|
197
|
+
|
|
198
|
+
memini-ai is the central knowledge base:
|
|
199
|
+
- **Query before responding** โ Orchestrator checks memory for relevant context
|
|
200
|
+
- **Save after completing** โ Agents save detailed work to memory
|
|
201
|
+
- **Thin responses** โ Sub-agents return concise summaries + memory references
|
|
202
|
+
- **Thick memory** โ Full details stored for future retrieval with trust scoring
|
|
203
|
+
|
|
204
|
+
---
|
|
205
|
+
|
|
206
|
+
## Memory System
|
|
207
|
+
|
|
208
|
+
### Trust Engine
|
|
209
|
+
|
|
210
|
+
Every memory starts at trust=0.5 and is adjusted based on feedback:
|
|
211
|
+
|
|
212
|
+
| Signal | Trust Adjustment |
|
|
213
|
+
|--------|------------------|
|
|
214
|
+
| `agent_used` | +0.05 |
|
|
215
|
+
| `user_confirmed` | +0.10 |
|
|
216
|
+
| `agent_ignored` | -0.05 |
|
|
217
|
+
| `user_corrected` | -0.10 |
|
|
218
|
+
|
|
219
|
+
### Memory Graph
|
|
220
|
+
|
|
221
|
+
Track relationships between memories:
|
|
222
|
+
|
|
223
|
+
| Relationship | Description |
|
|
224
|
+
|-------------|-------------|
|
|
225
|
+
| `SUPERSEDES` | New memory replaces old one |
|
|
226
|
+
| `RELATED_TO` | Memories are semantically related |
|
|
227
|
+
| `CONTRADICTS` | Memories conflict |
|
|
228
|
+
| `DERIVED_FROM` | Memory was derived from another |
|
|
229
|
+
|
|
230
|
+
### Tiered Loading
|
|
231
|
+
|
|
232
|
+
| Tier | Description | Use Case |
|
|
233
|
+
|------|-------------|----------|
|
|
234
|
+
| **L0 Summary** | ~100 tokens, high-trust memories only | Session start |
|
|
235
|
+
| **L1 Key Decisions** | ~2K tokens, trust โฅ 0.8 | Planning |
|
|
236
|
+
| **L2 Full Context** | All memories | Deep research |
|
|
237
|
+
|
|
238
|
+
### Knowledge Graph
|
|
239
|
+
|
|
240
|
+
memini-ai tracks entities and relationships:
|
|
241
|
+
|
|
242
|
+
| Tool | Purpose |
|
|
243
|
+
|------|---------|
|
|
244
|
+
| `query_kg` | Execute formal KG queries |
|
|
245
|
+
| `extract_entities` | Extract entities from a memory |
|
|
246
|
+
| `get_entity_graph` | Get all connections for an entity |
|
|
247
|
+
| `get_inference_chain` | Find inference paths between entities |
|
|
248
|
+
|
|
249
|
+
---
|
|
250
|
+
|
|
251
|
+
## Commands
|
|
252
|
+
|
|
253
|
+
| Command | Description |
|
|
254
|
+
|---------|-------------|
|
|
255
|
+
| `npm run build` | Build TypeScript to `dist/` |
|
|
256
|
+
| `npm run typecheck` | Run TypeScript type checking |
|
|
257
|
+
| `npm run lint` | Run ESLint |
|
|
258
|
+
| `npx vitest run` | Run test suite |
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
## Project Structure
|
|
263
|
+
|
|
264
|
+
```
|
|
265
|
+
boomerang-v3/
|
|
266
|
+
โโโ src/
|
|
267
|
+
โ โโโ index.ts # Plugin interface
|
|
268
|
+
โ โโโ orchestrator.ts # Pure decision layer
|
|
269
|
+
โ โโโ protocol/ # ProtocolAdvisor (mandatory enforcement)
|
|
270
|
+
โ โโโ execution/ # TaskRunner (prompt builder only)
|
|
271
|
+
โ โโโ agents/ # Agent definitions
|
|
272
|
+
โโโ .opencode/
|
|
273
|
+
โ โโโ skills/ # Skill definitions
|
|
274
|
+
โโโ packages/
|
|
275
|
+
โ โโโ opencode-plugin/ # OpenCode plugin package
|
|
276
|
+
โโโ tests/ # Test suite
|
|
277
|
+
โโโ AGENTS.md # Agent roster
|
|
278
|
+
โโโ README.md # This file
|
|
279
|
+
โโโ package.json # @veedubin/boomerang-v3
|
|
280
|
+
```
|
|
281
|
+
|
|
282
|
+
---
|
|
283
|
+
|
|
284
|
+
## Release History
|
|
285
|
+
|
|
286
|
+
- **v3.0.0** โ memini-ai integration: Trust engine, knowledge graph, tiered loading, PostgreSQL/pgvector
|
|
287
|
+
- **v4.0.0** (boomerang-v2) โ Orchestrator as pure decision layer, OpenCode handles execution
|
|
288
|
+
- **v3.0.0** (boomerang-v2) โ LanceDB โ Qdrant migration
|
|
289
|
+
- **v2.0.0** (boomerang-v2) โ First stable with built-in memory
|
|
290
|
+
|
|
291
|
+
---
|
|
292
|
+
|
|
293
|
+
## License
|
|
294
|
+
|
|
295
|
+
MIT License โ see [LICENSE](LICENSE) for details.
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
<div align="center">
|
|
300
|
+
|
|
301
|
+
**Built with ๐ by [Veedubin](https://github.com/Veedubin)**
|
|
302
|
+
|
|
303
|
+
*Your AI development team, on demand.*
|
|
304
|
+
|
|
305
|
+
</div>
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Boomerang v3 - Multi-agent orchestration plugin for OpenCode
|
|
3
|
+
*/
|
|
4
|
+
// Placeholder entry point - implement orchestrator and plugin export
|
|
5
|
+
export const orchestrator = {
|
|
6
|
+
name: 'boomerang-v3',
|
|
7
|
+
version: '3.0.0',
|
|
8
|
+
};
|
|
9
|
+
export const plugin = {
|
|
10
|
+
name: 'boomerang-v3-plugin',
|
|
11
|
+
version: '3.0.0',
|
|
12
|
+
};
|
|
13
|
+
export default { orchestrator, plugin };
|