@squadrules/mcp 5.9.8 → 5.10.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.
- package/dist/.tsbuildinfo +1 -1
- package/dist/embed-docs/mem/adapter-migration.md +1 -1
- package/dist/embed-docs/mem/author-adapter.md +21 -1
- package/dist/embed-docs/mem/bulk-insert-adapters-via-cli.md +1 -1
- package/dist/embed-docs/mem/challenge-type-guide.md +106 -8
- package/dist/embed-docs/mem/create-new-protocol.md +1 -1
- package/dist/embed-docs/mem/critic-loop-guide.md +1 -1
- package/dist/embed-docs/mem/critic-loop.md +1 -1
- package/dist/embed-docs/mem/phase-critic-guide.md +1 -1
- package/dist/embed-docs/mem/phase-critic.md +1 -1
- package/dist/embed-docs/mem/protocol-linking-guide.md +18 -1
- package/dist/embed-docs/mem/refine-search.md +1 -1
- package/dist/embed-docs/mem/skill-format-guide.md +1 -1
- package/dist/resources/embedded-mcp-resources.js +12 -12
- package/dist/resources/embedded-mcp-resources.js.map +1 -1
- package/dist/services/proof-of-work-store.d.ts +1 -1
- package/dist/services/proof-of-work-store.d.ts.map +1 -1
- package/dist/tools/activate.d.ts.map +1 -1
- package/dist/tools/activate.js +16 -4
- package/dist/tools/activate.js.map +1 -1
- package/dist/tools/activate_schema.d.ts +4 -0
- package/dist/tools/activate_schema.d.ts.map +1 -1
- package/dist/tools/activate_schema.js +2 -1
- package/dist/tools/activate_schema.js.map +1 -1
- package/dist/tools/forward-helpers.d.ts.map +1 -1
- package/dist/tools/forward-helpers.js +2 -0
- package/dist/tools/forward-helpers.js.map +1 -1
- package/dist/tools/forward-view.d.ts +2 -0
- package/dist/tools/forward-view.d.ts.map +1 -1
- package/dist/tools/forward-view.js +21 -16
- package/dist/tools/forward-view.js.map +1 -1
- package/dist/tools/forward_schema.d.ts +12 -0
- package/dist/tools/forward_schema.d.ts.map +1 -1
- package/dist/tools/forward_schema.js +28 -30
- package/dist/tools/forward_schema.js.map +1 -1
- package/dist/tools/next-pow-challenge-shape.d.ts.map +1 -1
- package/dist/tools/next-pow-challenge-shape.js +5 -0
- package/dist/tools/next-pow-challenge-shape.js.map +1 -1
- package/dist/tools/next-pow-helpers.d.ts.map +1 -1
- package/dist/tools/next-pow-helpers.js +18 -4
- package/dist/tools/next-pow-helpers.js.map +1 -1
- package/dist/tools/next-proof-types.d.ts +3 -0
- package/dist/tools/next-proof-types.d.ts.map +1 -1
- package/dist/tools/next_schema.d.ts +31 -2
- package/dist/tools/next_schema.d.ts.map +1 -1
- package/dist/tools/next_schema.js +13 -5
- package/dist/tools/next_schema.js.map +1 -1
- package/dist/tools/shell-challenge-invocation.d.ts +4 -1
- package/dist/tools/shell-challenge-invocation.d.ts.map +1 -1
- package/dist/tools/shell-challenge-invocation.js +3 -22
- package/dist/tools/shell-challenge-invocation.js.map +1 -1
- package/dist/tools/squadrules-challenge-display.js +1 -1
- package/dist/tools/squadrules-challenge-display.js.map +1 -1
- package/dist/tools/tool-registry.d.ts +10 -0
- package/dist/tools/tool-registry.d.ts.map +1 -1
- package/dist/types/memory.d.ts +6 -2
- package/dist/types/memory.d.ts.map +1 -1
- package/dist/ui/assets/{AccountPage-CtTi7T4Q.js → AccountPage-BpPby8tL.js} +1 -1
- package/dist/ui/assets/{index-BmD_PCNm.js → index-DLLKkKKa.js} +2 -2
- package/dist/ui/index.html +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
slug: author-adapter
|
|
3
|
-
version: "5.
|
|
3
|
+
version: "5.10.1"
|
|
4
4
|
title: Author Adapter (Create / Review / Refactor)
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -188,6 +188,26 @@ Summarise gathered requirements or findings.
|
|
|
188
188
|
|
|
189
189
|
## Draft Markdown
|
|
190
190
|
|
|
191
|
+
### MCP / Local-Filesystem Boundary
|
|
192
|
+
|
|
193
|
+
The MCP database and the local repo/filesystem are **independent environments**.
|
|
194
|
+
|
|
195
|
+
- A personal adapter stored in MCP **cannot** reference local files
|
|
196
|
+
(`.qoder/rules/`, `src/`, etc.) — those files do not exist inside the MCP
|
|
197
|
+
execution context.
|
|
198
|
+
- A personal adapter **cannot** use `mcp forward` contracts with
|
|
199
|
+
`squadrules://adapter/` URIs pointing to other personal adapters — the target
|
|
200
|
+
may not exist in every user's space.
|
|
201
|
+
- Only **system adapters** (bundled in the server) can chain to other system
|
|
202
|
+
adapters via `forward`.
|
|
203
|
+
- Personal adapters must be **self-contained**. If guidance text references a
|
|
204
|
+
local constraint file, it is prose-only context for the drafting agent, not a
|
|
205
|
+
runtime dependency.
|
|
206
|
+
- When a shell contract needs a reusable script, attach it as an **artifact**
|
|
207
|
+
via `train` (with `mime`, `artifact_name`, `adapter_uri`) rather than
|
|
208
|
+
inlining it in the contract JSON. At execution time, reference it via
|
|
209
|
+
`export` with `squadrules://artifact/{uuid}`.
|
|
210
|
+
|
|
191
211
|
### For `create` — draft new adapter markdown
|
|
192
212
|
|
|
193
213
|
Draft the full markdown for `train`.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
version: "5.
|
|
2
|
+
version: "5.10.1"
|
|
3
3
|
slug: challenge-type-guide
|
|
4
4
|
title: Challenge Type Selection Guide
|
|
5
5
|
---
|
|
@@ -51,6 +51,7 @@ code — use `shell` or `mcp` instead.
|
|
|
51
51
|
- **clarify / approve** → `user_input`
|
|
52
52
|
- **call a SQUADRULES / MCP tool** → `mcp`
|
|
53
53
|
- **execute or verify local state** → `shell`
|
|
54
|
+
- **delegate to another agent** → `subagent`
|
|
54
55
|
- **pure reasoning with no observable artifact** → `comment`
|
|
55
56
|
|
|
56
57
|
### Decision Tree
|
|
@@ -64,7 +65,9 @@ Does the step call an MCP tool?
|
|
|
64
65
|
├─ YES → "shell"
|
|
65
66
|
└─ NO → Does the step require human approval or choice?
|
|
66
67
|
├─ YES → "user_input"
|
|
67
|
-
└─ NO →
|
|
68
|
+
└─ NO → Does the step delegate work to another agent?
|
|
69
|
+
├─ YES → "subagent" with optional context
|
|
70
|
+
└─ NO → "comment" only if there is no stronger observable contract
|
|
68
71
|
```
|
|
69
72
|
|
|
70
73
|
### Challenge JSON Formats
|
|
@@ -99,6 +102,15 @@ proving the agent called the correct target — not just any `forward` call.
|
|
|
99
102
|
{"contract":{"type":"comment","comment":{"min_length":50},"required":true}}
|
|
100
103
|
```
|
|
101
104
|
|
|
105
|
+
**subagent**
|
|
106
|
+
```json
|
|
107
|
+
{"contract":{"type":"subagent","subagent":{"context":"<task description>"},"required":true}}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Use `subagent` when a step delegates work to another agent (human or AI) rather
|
|
111
|
+
than executing it directly. The optional `context` field provides task-specific
|
|
112
|
+
guidance. Evidence of completion is collected via the anti-cheat evidence gate.
|
|
113
|
+
|
|
102
114
|
### Solution JSON Formats
|
|
103
115
|
|
|
104
116
|
Every solution, regardless of type, follows the same envelope:
|
|
@@ -163,12 +175,18 @@ Every solution, regardless of type, follows the same envelope:
|
|
|
163
175
|
}
|
|
164
176
|
```
|
|
165
177
|
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
178
|
+
**subagent solution**
|
|
179
|
+
```json
|
|
180
|
+
{
|
|
181
|
+
"type": "subagent",
|
|
182
|
+
"outcome": "success",
|
|
183
|
+
"evidence": {
|
|
184
|
+
"agent_id": "agent-uuid-or-name",
|
|
185
|
+
"artifacts": ["path/to/output"],
|
|
186
|
+
"summary": "Task completed successfully"
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
```
|
|
172
190
|
|
|
173
191
|
## Interpreter Selection
|
|
174
192
|
|
|
@@ -206,6 +224,61 @@ to avoid collisions between parallel sessions.
|
|
|
206
224
|
- Reward Signal cleans it up
|
|
207
225
|
- never write credentials or secrets to files
|
|
208
226
|
|
|
227
|
+
### Resolving `project://` and `user://` URI hints
|
|
228
|
+
|
|
229
|
+
The server returns relative URI hints — it never names an absolute path on its
|
|
230
|
+
own filesystem. Resolve on your machine:
|
|
231
|
+
|
|
232
|
+
| Scheme | Resolution | Example |
|
|
233
|
+
|--------|-----------|--------|
|
|
234
|
+
| `project://<rel>` | `<IDE project root>/<rel>` | `project://.local/squadrules/work` → `/home/user/repos/my-project/.local/squadrules/work` |
|
|
235
|
+
| `user://<rel>` | `<$XDG_CONFIG_HOME or $HOME>/<rel>` | `user://.config/squadrules/work` → `/home/user/.config/squadrules/work` |
|
|
236
|
+
|
|
237
|
+
When your session spans multiple projects, prefer `user://` to avoid ambiguity
|
|
238
|
+
about which project root applies. When you have exactly one project context,
|
|
239
|
+
`project://` is fine.
|
|
240
|
+
|
|
241
|
+
### Worktree placement (for task-isolation adapters)
|
|
242
|
+
|
|
243
|
+
When an adapter requires a git worktree for isolation, the worktree path MUST
|
|
244
|
+
be **outside** every existing checkout. A common mistake is placing the worktree
|
|
245
|
+
inside `$REPO_ROOT` (e.g. `$REPO_ROOT/.mcp.worktrees/...`), which the setup
|
|
246
|
+
script correctly rejects.
|
|
247
|
+
|
|
248
|
+
**Correct placement — absolute path examples:**
|
|
249
|
+
|
|
250
|
+
```
|
|
251
|
+
REPO_ROOT=/home/user/repos/my-project
|
|
252
|
+
# RIGHT: sibling of the repo, not inside it
|
|
253
|
+
WT=/home/user/repos/mcp.worktrees/<task-id>
|
|
254
|
+
|
|
255
|
+
# WRONG: inside the checkout (rejected by setup script)
|
|
256
|
+
# WT=/home/user/repos/my-project/.mcp.worktrees/<task-id>
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Common mistakes:**
|
|
260
|
+
- `$REPO_ROOT/.mcp.worktrees/...` — inside checkout, rejected
|
|
261
|
+
- `./mcp.worktrees/...` — relative path resolves inside checkout
|
|
262
|
+
- `$REPO_ROOT/../mcp.worktrees/...` — correct only if `..` actually exits the repo
|
|
263
|
+
|
|
264
|
+
**Rule of thumb:** `$(dirname "$REPO_ROOT")/mcp.worktrees/<task-id>`
|
|
265
|
+
|
|
266
|
+
### IDE worktree access limitations
|
|
267
|
+
|
|
268
|
+
Most IDE file tools (Write, Read, Edit) scope operations to the open project
|
|
269
|
+
root. They **cannot** reach worktrees placed outside `$REPO_ROOT`. When working
|
|
270
|
+
in an IDE:
|
|
271
|
+
|
|
272
|
+
1. Use the **terminal/shell tool** (not IDE file tools) to read/write files in
|
|
273
|
+
external worktrees.
|
|
274
|
+
2. Shell commands: `cat`, `tee`, `cp`, or your editor's CLI mode work on any
|
|
275
|
+
absolute path.
|
|
276
|
+
3. If you need to edit a worktree file with IDE assistance, open the worktree
|
|
277
|
+
as a separate project window or use `code <worktree-path>` to add it to the
|
|
278
|
+
workspace.
|
|
279
|
+
4. The `squadrules export` MCP tool can retrieve adapter content without
|
|
280
|
+
filesystem access to the worktree.
|
|
281
|
+
|
|
209
282
|
```json
|
|
210
283
|
{"contract":{"type":"comment","comment":{"min_length":30},"required":true}}
|
|
211
284
|
```
|
|
@@ -265,6 +338,31 @@ to avoid collisions between parallel sessions.
|
|
|
265
338
|
{"contract":{"type":"comment","comment":{"min_length":30},"required":true}}
|
|
266
339
|
```
|
|
267
340
|
|
|
341
|
+
## Artifacts for Shell Contracts
|
|
342
|
+
|
|
343
|
+
When a shell contract needs a reusable script (Python guard, validation logic,
|
|
344
|
+
setup helper), **attach it as an artifact** rather than inlining it in the
|
|
345
|
+
contract JSON:
|
|
346
|
+
|
|
347
|
+
1. Write the script file.
|
|
348
|
+
2. `train` with `mime: "text/x-python"`, `artifact_name: "isolation-guard.py"`,
|
|
349
|
+
`adapter_uri: "squadrules://adapter/my-adapter"`, and the script content in
|
|
350
|
+
`content`.
|
|
351
|
+
3. In the shell contract, reference it via `export` with
|
|
352
|
+
`squadrules://artifact/{uuid}` at execution time.
|
|
353
|
+
|
|
354
|
+
This keeps adapter markdown clean, makes scripts independently versionable,
|
|
355
|
+
and avoids bloating contract JSON with large inline scripts.
|
|
356
|
+
|
|
357
|
+
**Interpreter restriction:** The `interpreter` field in shell contracts accepts
|
|
358
|
+
only: `bash`, `sh`, `python3`, `python`, `node`. Build tools (`terraform`,
|
|
359
|
+
`docker`, `npm`, etc.) are **not** interpreters — wrap them in a `bash -c`
|
|
360
|
+
command instead.
|
|
361
|
+
|
|
362
|
+
```json
|
|
363
|
+
{"contract":{"type":"comment","comment":{"min_length":30},"required":true}}
|
|
364
|
+
```
|
|
365
|
+
|
|
268
366
|
## Reward Signal
|
|
269
367
|
|
|
270
368
|
Only reachable after all prior steps are solved.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
version: "5.
|
|
2
|
+
version: "5.10.1"
|
|
3
3
|
slug: protocol-linking-guide
|
|
4
4
|
title: Protocol Linking Guide
|
|
5
5
|
---
|
|
@@ -217,6 +217,23 @@ calls that bypass `activate`.
|
|
|
217
217
|
{"contract":{"type":"comment","comment":{"min_length":30},"required":true}}
|
|
218
218
|
```
|
|
219
219
|
|
|
220
|
+
## Personal vs System Adapter Linking
|
|
221
|
+
|
|
222
|
+
| Adapter type | Can `forward` to | Can be `forward`'d from |
|
|
223
|
+
|---|---|---|
|
|
224
|
+
| System adapter (bundled) | Other system adapters (slug guaranteed to exist) | System or personal adapters |
|
|
225
|
+
| Personal adapter (MCP database) | **Nothing** — must be self-contained | Only via `activate` (runtime discovery) |
|
|
226
|
+
|
|
227
|
+
Personal adapters use `comment` contracts to describe what the agent should do
|
|
228
|
+
next (e.g. "activate a TDD execution adapter"), not `mcp forward` contracts to
|
|
229
|
+
other personal adapters. A personal adapter that chains to
|
|
230
|
+
`squadrules://adapter/some-personal-slug` will fail at runtime when that slug
|
|
231
|
+
does not exist in the caller's MCP database.
|
|
232
|
+
|
|
233
|
+
```json
|
|
234
|
+
{"contract":{"type":"comment","comment":{"min_length":30},"required":true}}
|
|
235
|
+
```
|
|
236
|
+
|
|
220
237
|
## Reward Signal
|
|
221
238
|
|
|
222
239
|
Only reachable after all prior steps are solved.
|