@sashabogi/foundation 0.1.9 → 0.1.11

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.
@@ -0,0 +1,266 @@
1
+ # Testing Foundation with Native Swarm (claudesp)
2
+
3
+ ## Overview
4
+
5
+ This guide explains how to test Foundation's multi-provider routing alongside Claude Code's native swarm features.
6
+
7
+ ---
8
+
9
+ ## Prerequisites
10
+
11
+ ### 1. claudesp (Native Swarm Enabled)
12
+
13
+ ```bash
14
+ # Already installed at:
15
+ /Users/sashabogojevic/.local/bin/claudesp
16
+
17
+ # Verify
18
+ claudesp --version
19
+ # Expected: 2.1.22 (Claude Code)
20
+ ```
21
+
22
+ ### 2. Foundation MCP Server
23
+
24
+ ```bash
25
+ cd /Users/sashabogojevic/development/foundation/foundation
26
+ npm install
27
+ npm run build
28
+ ```
29
+
30
+ ### 3. Provider API Keys
31
+
32
+ Ensure these are set in `~/.foundation/config.yaml` or environment:
33
+ - `ANTHROPIC_API_KEY`
34
+ - `OPENAI_API_KEY` (optional)
35
+ - `DEEPSEEK_API_KEY` (optional)
36
+ - `KIMI_API_KEY` (optional)
37
+ - `ZAI_API_KEY` (optional)
38
+
39
+ ---
40
+
41
+ ## Setup: Connect Foundation to claudesp
42
+
43
+ ### Option A: MCP Config File
44
+
45
+ Create/edit `~/.claude-sneakpeek/claudesp/config/settings.json`:
46
+
47
+ ```json
48
+ {
49
+ "mcpServers": {
50
+ "foundation": {
51
+ "command": "node",
52
+ "args": ["/Users/sashabogojevic/development/foundation/foundation/dist/index.js"],
53
+ "env": {
54
+ "ANTHROPIC_API_KEY": "${ANTHROPIC_API_KEY}"
55
+ }
56
+ }
57
+ }
58
+ }
59
+ ```
60
+
61
+ ### Option B: CLI Flag
62
+
63
+ ```bash
64
+ claudesp --dangerously-skip-permissions --mcp-config /path/to/mcp-config.json
65
+ ```
66
+
67
+ Where `mcp-config.json`:
68
+ ```json
69
+ {
70
+ "mcpServers": {
71
+ "foundation": {
72
+ "command": "node",
73
+ "args": ["/Users/sashabogojevic/development/foundation/foundation/dist/index.js"]
74
+ }
75
+ }
76
+ }
77
+ ```
78
+
79
+ ---
80
+
81
+ ## Test Scenarios
82
+
83
+ ### Test 1: Verify Foundation Tools Available
84
+
85
+ ```
86
+ List all MCP tools available. Show any that start with "demerzel", "seldon", or "gaia".
87
+ ```
88
+
89
+ **Expected:** 41 tools listed (before refactoring) or 23 tools (after)
90
+
91
+ ---
92
+
93
+ ### Test 2: Multi-Provider Routing (Foundation Core Value)
94
+
95
+ ```
96
+ Use seldon_invoke with role "coder" and prompt "Write a Python function to calculate fibonacci numbers"
97
+ ```
98
+
99
+ **Expected:**
100
+ - Routes to configured coder provider (Kimi, DeepSeek, etc.)
101
+ - Returns generated code
102
+ - NOT using Claude (uses external provider)
103
+
104
+ ---
105
+
106
+ ### Test 3: Provider Comparison
107
+
108
+ ```
109
+ Use seldon_compare to run "Write a hello world in Rust" through both the "coder" and "reviewer" roles
110
+ ```
111
+
112
+ **Expected:**
113
+ - Two different responses
114
+ - Different providers used for each role
115
+
116
+ ---
117
+
118
+ ### Test 4: Native Swarm Team Creation
119
+
120
+ ```
121
+ Use the Teammate tool to create a team called "foundation-test"
122
+ ```
123
+
124
+ **Expected:**
125
+ - Team created
126
+ - You become team leader
127
+
128
+ ---
129
+
130
+ ### Test 5: Hybrid Workflow (Native + Foundation)
131
+
132
+ This is the key test for the integrated architecture:
133
+
134
+ ```
135
+ 1. Create a team called "hybrid-test" using Teammate tool
136
+ 2. Use seldon_invoke with role "coder" to generate a Python script
137
+ 3. Use native SendMessage to broadcast the result to the team
138
+ 4. Create a task using TaskCreate for review
139
+ ```
140
+
141
+ **Expected:**
142
+ - Native swarm handles team/messaging
143
+ - Foundation handles multi-provider routing
144
+ - Both work together seamlessly
145
+
146
+ ---
147
+
148
+ ### Test 6: Verification Loop (Foundation Unique)
149
+
150
+ ```
151
+ 1. Use seldon_invoke role "coder" to write a function with this spec:
152
+ "Function that validates email addresses using regex"
153
+
154
+ 2. Use seldon_verify to check if it handles:
155
+ - Empty strings
156
+ - Missing @ symbol
157
+ - Invalid TLD
158
+
159
+ 3. Use seldon_fix if any issues found
160
+ ```
161
+
162
+ **Expected:**
163
+ - Code generated via external provider
164
+ - Verification identifies gaps
165
+ - Fix generates improvements
166
+
167
+ ---
168
+
169
+ ### Test 7: Demerzel Codebase Intelligence
170
+
171
+ ```
172
+ 1. Use demerzel_snapshot to create a snapshot of /Users/sashabogojevic/development/foundation/foundation
173
+ 2. Use demerzel_search to find "ProviderManager"
174
+ 3. Use demerzel_find_importers to see what uses ProviderManager
175
+ ```
176
+
177
+ **Expected:**
178
+ - Snapshot created
179
+ - Search finds provider manager
180
+ - Import graph shows dependencies
181
+
182
+ ---
183
+
184
+ ### Test 8: Gaia Learning (Post-Refactor)
185
+
186
+ ```
187
+ 1. Use gaia_learn to record: "Always use TypeScript strict mode"
188
+ 2. Use gaia_review to see accumulated learnings
189
+ 3. Use gaia_apply to write to CLAUDE.md
190
+ ```
191
+
192
+ **Expected:**
193
+ - Learning recorded
194
+ - Can review learnings
195
+ - Applied to CLAUDE.md
196
+
197
+ ---
198
+
199
+ ## Debugging
200
+
201
+ ### Check MCP Connection
202
+
203
+ ```bash
204
+ # In claudesp, run:
205
+ /mcp
206
+ ```
207
+
208
+ Should show Foundation server connected.
209
+
210
+ ### Check Foundation Logs
211
+
212
+ ```bash
213
+ # Run Foundation with debug logging:
214
+ DEBUG=foundation:* node /Users/sashabogojevic/development/foundation/foundation/dist/index.js
215
+ ```
216
+
217
+ ### Check Provider Health
218
+
219
+ ```
220
+ Use seldon_providers_list to see all providers and their health status
221
+ ```
222
+
223
+ ---
224
+
225
+ ## Common Issues
226
+
227
+ ### "Tool not found: seldon_invoke"
228
+
229
+ Foundation MCP server not connected. Check:
230
+ 1. MCP config path is correct
231
+ 2. Foundation is built (`npm run build`)
232
+ 3. Node can execute the dist/index.js
233
+
234
+ ### "Provider error: 401"
235
+
236
+ API key not set. Check:
237
+ 1. Environment variables
238
+ 2. `~/.foundation/config.yaml`
239
+
240
+ ### "Native swarm tools not available"
241
+
242
+ Using regular `claude` instead of `claudesp`. The native swarm tools (Teammate, SendMessage) only appear in the patched version.
243
+
244
+ ---
245
+
246
+ ## Next Steps After Testing
247
+
248
+ 1. If all tests pass → Proceed with refactoring
249
+ 2. If Foundation tests fail → Debug MCP connection
250
+ 3. If hybrid tests fail → Check tool naming conflicts
251
+ 4. Document any issues in GitHub
252
+
253
+ ---
254
+
255
+ ## Test Results Log
256
+
257
+ | Test | Date | Result | Notes |
258
+ |------|------|--------|-------|
259
+ | 1. Foundation tools | | | |
260
+ | 2. Multi-provider | | | |
261
+ | 3. Provider compare | | | |
262
+ | 4. Native team | | | |
263
+ | 5. Hybrid workflow | | | |
264
+ | 6. Verification loop | | | |
265
+ | 7. Demerzel | | | |
266
+ | 8. Gaia learning | | | |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sashabogi/foundation",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "Unified MCP server for AI-assisted development: codebase intelligence, multi-agent orchestration, and workflow patterns",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",