@squadrules/mcp 5.6.1 → 5.7.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.
@@ -1,5 +1,5 @@
1
1
  ---
2
- version: "5.6.1"
2
+ version: "5.7.0"
3
3
  slug: adapter-migration
4
4
  title: Adapter Migration Protocol
5
5
  ---
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  slug: author-adapter
3
- version: "5.6.1"
3
+ version: "5.7.0"
4
4
  title: Author Adapter (Create / Review / Refactor)
5
5
  ---
6
6
 
@@ -274,9 +274,11 @@ autonomous quality loop — the agent owns content, the critic owns quality, and
274
274
  human approval is requested at any point.
275
275
 
276
276
  1. Invoke critic-loop via `forward` with `squadrules://adapter/critic-loop`.
277
- Provide the drafted markdown as `input_file`, the slug as
278
- `calling_protocol_slug`, and "structural compliance and agent behaviour"
279
- as `verification_target`.
277
+ Submit the drafted markdown as a `file_set` work submission — write
278
+ `kind: file_set`, `root: <directory of the draft>`, then the drafted file
279
+ under `items:` into the handoff pointed to by `$WORK_MANIFEST` — with the
280
+ slug as `calling_protocol_slug` and "structural compliance and agent
281
+ behaviour" as `verification_target`.
280
282
  2. Run the FAIL gate shell contract on the verdict file:
281
283
 
282
284
  ```json
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  slug: bulk-insert-adapters-via-cli
3
- version: "5.6.1"
3
+ version: "5.7.0"
4
4
  title: Bulk Insert Adapters via SQUADRULES CLI
5
5
  ---
6
6
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- version: "5.6.1"
2
+ version: "5.7.0"
3
3
  slug: challenge-type-guide
4
4
  title: Challenge Type Selection Guide
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- version: "5.6.1"
2
+ version: "5.7.0"
3
3
  slug: create-new-protocol
4
4
  title: Create New Protocol (Redirect to Author Adapter)
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- version: "5.6.1"
2
+ version: "5.7.0"
3
3
  slug: critic-loop-guide
4
4
  title: Critic Loop Integration and Mutation Gate Guide
5
5
  ---
@@ -54,7 +54,8 @@ any adapter that includes review or validation phases.
54
54
  returns PASS** — not a one-shot step. It verifies claims, gathers evidence,
55
55
  searches for contradictions, and checks the work against the original requirement
56
56
  list. Use it for quality and truthfulness review, and whenever a step is
57
- non-deterministic or has no objective proof.
57
+ non-deterministic or has no objective proof. Run it **before** the work is handed
58
+ to the next step, and before it is presented to the human.
58
59
 
59
60
  **Solution checks** are per-layer contract verification mechanisms (shell
60
61
  commands, MCP tool calls). Use them ONLY where getting it wrong is expensive or
@@ -134,6 +135,34 @@ pattern is a `mcp` contract that requires calling `forward` with the
134
135
  Use the same contract. The critic-loop adapter receives the calling protocol's
135
136
  context and independently verifies the work.
136
137
 
138
+ ### What to submit for review
139
+
140
+ The submission is the **work itself**, not a summary of it. Pass `work` with a
141
+ `kind`, an `items` list, and the absolute `root` the items resolve against:
142
+
143
+ | `kind` | `items` contain | Resolved by | Typical work |
144
+ |---|---|---|---|
145
+ | `file_set` | paths (absolute, or relative to `root`) | read each file | docs, generated code, configs |
146
+ | `links` | URLs, `squadrules://` resource URIs | fetch each one | published pages, external references |
147
+ | `git_diff` | `base..head` refs, or empty for the working tree | `git diff` | an unpushed implementation |
148
+ | `pr` | PR numbers or URLs | `gh pr view` + `gh pr diff` | a reviewable pull request |
149
+ | `command_output` | commands to run from `root` | run and capture | migrations, builds, data pulls |
150
+ | `inline` | the text itself | read the manifest | a plan, a decision, a message draft |
151
+
152
+ Record `work` in the handoff file pointed to by `$WORK_MANIFEST`, as flat keys —
153
+ `kind:`, `root:`, then `items:` with one item per line — so the precondition
154
+ stays a machine-checkable file test instead of prose:
155
+
156
+ ```json
157
+ {"contract":{"type":"shell","shell":{"cmd":"test -f \"${WORK_MANIFEST:-}\" || test -f \"${INPUT_FILE:-}\"","timeout_seconds":3},"required":true}}
158
+ ```
159
+
160
+ Anything that cannot be resolved is `verification_blocked` — an item the critic
161
+ could not read is never treated as an item that passed. `input_file` still works
162
+ and means a one-item `file_set`; prefer `work_manifest` for anything that is not
163
+ a single document. A `pr` or `git_diff` submission is judged on the diff and the
164
+ tests it touches, not on the description written next to it.
165
+
137
166
  ### Feed it the requirements, then loop with a ceiling
138
167
 
139
168
  Pass the original requirement list in the forward context. A critic that sees only
@@ -1,5 +1,5 @@
1
1
  ---
2
- version: "5.6.1"
2
+ version: "5.7.0"
3
3
  slug: critic-loop
4
4
  title: Critic Loop
5
5
  ---
@@ -9,12 +9,13 @@ title: Critic Loop
9
9
  # Critic Loop
10
10
 
11
11
  Bounded adversarial investigator that the calling protocol **loops until it
12
- returns PASS** — not a one-shot review. Receives a reference document, the
12
+ returns PASS** — not a one-shot review. Receives a work submission (files,
13
+ links, a git diff, a pull request, command output, or inline text), the
13
14
  original requirement list, and the calling protocol's invariants, then
14
- independently verifies the target by extracting claims, gathering evidence,
15
- searching for contradictions, and checking requirement-by-requirement coverage.
16
- A FAIL sends the caller back to fix and re-invoke; the loop is bounded by an
17
- explicit iteration ceiling (see Verdict).
15
+ independently verifies the submitted work by extracting claims, gathering
16
+ evidence, searching for contradictions, and checking requirement-by-requirement
17
+ coverage. A FAIL sends the caller back to fix and re-invoke; the loop is bounded
18
+ by an explicit iteration ceiling (see Verdict).
18
19
 
19
20
  ## Activation Patterns
20
21
 
@@ -30,7 +31,7 @@ validation, or review phase via `forward` with the stored adapter URI
30
31
  (phase / plan / implementation / output).
31
32
 
32
33
  **Must Never:**
33
- - Modify any file outside the provided input and output paths.
34
+ - Modify any submitted item or any file other than the verdict path.
34
35
  - Trust the executor's assertions without independent evidence.
35
36
  - Classify a claim as `verified` based only on absence of contradiction.
36
37
  - Keep investigating after a precondition failure that blocks verification.
@@ -58,10 +59,16 @@ This protocol receives:
58
59
 
59
60
  ```text
60
61
  {
61
- input_file: string, // absolute path to the document under review
62
+ work: {
63
+ kind: 'file_set' | 'links' | 'git_diff' | 'pr' | 'command_output' | 'inline',
64
+ items: string[], // paths | URLs | 'base..head' refs | PR URL/number | commands | text
65
+ root: string // absolute cwd used to resolve relative paths, refs and commands
66
+ },
67
+ work_manifest: string, // absolute path to the handoff file recording `work`
68
+ input_file: string, // accepted alias: a one-item work.kind='file_set'
62
69
  calling_protocol_slug: string,
63
70
  verification_target: string,
64
- requirements: string[], // original intent / requirement list to check coverage against
71
+ requirements: string[], // original intent / requirement list to check coverage against
65
72
  context: {
66
73
  operation: string,
67
74
  verdict_file: string, // absolute path where the verdict will be written
@@ -71,6 +78,12 @@ This protocol receives:
71
78
  }
72
79
  ```
73
80
 
81
+ The submission is the **work itself**, not an essay about it. Write `work` to
82
+ `$WORK_MANIFEST` as flat keys so the handoff stays machine-checkable:
83
+ `kind:`, `root:`, then `items:` with one item per line. Callers that still pass
84
+ only `input_file` are handled as `kind: file_set` with that single path; the
85
+ review rules do not change, only the scope of what is submitted.
86
+
74
87
  This protocol produces:
75
88
 
76
89
  ```text
@@ -88,14 +101,16 @@ This protocol produces:
88
101
  Verify foundational preconditions before deep investigation. Early-abort if any
89
102
  are broken.
90
103
 
91
- **Input:** `$INPUT_FILE` (absolute path), calling protocol slug, context
104
+ **Input:** `$WORK_MANIFEST` (or the older-spelling `$INPUT_FILE`), calling protocol slug, context
92
105
 
93
106
  **Actions:**
94
- 1. Verify the input file exists: `test -f "$INPUT_FILE"`.
107
+ 1. Verify a submission handoff is present: `$WORK_MANIFEST`, or `$INPUT_FILE`
108
+ when the caller passed no manifest.
95
109
  2. Verify the verdict output path is writable (parent directory exists).
96
110
  3. Load the calling protocol's Must Never / Must Always sections if possible.
97
111
  4. Verify the target state is available for review.
98
- 5. Verify required tools are available.
112
+ 5. Verify required tools are available for the submission's `kind` (a `pr`
113
+ submission with no `gh` on the host is `verification_blocked`, not skipped).
99
114
 
100
115
  **On early-abort:**
101
116
  - verdict = `FAIL`
@@ -107,15 +122,52 @@ are broken.
107
122
  **Output:** verified preconditions or early-abort diagnostics
108
123
 
109
124
  ```json
110
- {"contract":{"type":"shell","shell":{"cmd":"test -f \"$INPUT_FILE\"","timeout_seconds":3},"required":true}}
125
+ {"contract":{"type":"shell","shell":{"cmd":"test -f \"${WORK_MANIFEST:-}\" || test -f \"${INPUT_FILE:-}\"","timeout_seconds":3},"required":true}}
126
+ ```
127
+
128
+ ## Resolve Submission [SUBAGENT]
129
+
130
+ Turn the submission into the material under review. What cannot be resolved is
131
+ never guessed at.
132
+
133
+ **Input:** `work` recorded in `$WORK_MANIFEST` (or the older-spelling `$INPUT_FILE`),
134
+ `work.root`
135
+
136
+ **Actions:**
137
+ 1. Read `kind`, `root`, `items`. An unknown `kind`, an empty `items` list, or a
138
+ malformed manifest is `verification_blocked`.
139
+ 2. Resolve every item by kind, always from `work.root`:
140
+ - `file_set` — read each path; relative paths resolve against `root`, and a
141
+ missing path is `verification_blocked`.
142
+ - `links` — fetch each URL; a URL that cannot be fetched is
143
+ `verification_blocked`, not an `unverifiable` claim.
144
+ - `git_diff` — `git -C "$root" diff <base>..<head>`, or the working tree when
145
+ no range is given; no `git`, no repository, or a bad ref is
146
+ `verification_blocked`.
147
+ - `pr` — `gh pr view` plus `gh pr diff` for the number or URL; a missing
148
+ `gh`, an expired login, or an unreachable host is `verification_blocked`.
149
+ - `command_output` — run each command from `root` and capture stdout and
150
+ stderr as the material.
151
+ - `inline` — the text recorded in the manifest is the material.
152
+ 3. Record the resolved inventory before auditing: `kind`, item count, per-item
153
+ status (`resolved` or `blocked`), and where each item's evidence lives. The
154
+ audit investigates this inventory and nothing else.
155
+ 4. A `pr` or `git_diff` submission is reviewed as a diff: claims are checked
156
+ against the changed lines and the tests they touch, never against the
157
+ description written alongside them.
158
+
159
+ **Output:** resolved work inventory for the audit
160
+
161
+ ```json
162
+ {"contract":{"type":"comment","comment":{"min_length":80},"required":true}}
111
163
  ```
112
164
 
113
165
  ## Audit [SUBAGENT]
114
166
 
115
- Perform bounded adversarial review of the target against the reference document
116
- and invariants.
167
+ Perform bounded adversarial review of the target against the resolved work
168
+ submission and invariants.
117
169
 
118
- **Input:** reference document, invariants, verification target, requirement list, context
170
+ **Input:** resolved work inventory, invariants, verification target, requirement list, context
119
171
 
120
172
  **Actions:**
121
173
 
@@ -158,6 +210,8 @@ Extract every verifiable claim that matters operationally:
158
210
  **Rules:**
159
211
  - higher-priority evidence overrides lower-priority evidence
160
212
  - priority 5–6 alone is not enough for `verified`
213
+ - a submitted link or PR description is priority 5 evidence: verify the claim
214
+ against the fetched content or the actual diff, never against the summary
161
215
 
162
216
  **Step 4 — Produce claim verdicts**
163
217
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- version: "5.6.1"
2
+ version: "5.7.0"
3
3
  slug: phase-critic-guide
4
4
  title: Phase Critic Guide (Redirect to Critic Loop Guide)
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- version: "5.6.1"
2
+ version: "5.7.0"
3
3
  slug: phase-critic
4
4
  title: Phase Critic (Redirect to Critic Loop)
5
5
  ---
@@ -26,7 +26,8 @@ against this slug — use `squadrules://adapter/critic-loop`.
26
26
 
27
27
  **Must Always:**
28
28
  - Send the caller to `squadrules://adapter/critic-loop`, forwarding the same
29
- `input_file`, `requirements`, and `context` it received.
29
+ `work` submission (or the older-spelling `input_file`), `requirements`, and
30
+ `context` it received.
30
31
 
31
32
  ## Redirect
32
33
 
@@ -1,5 +1,5 @@
1
1
  ---
2
- version: "5.6.1"
2
+ version: "5.7.0"
3
3
  slug: protocol-linking-guide
4
4
  title: Protocol Linking Guide
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- version: "5.6.1"
2
+ version: "5.7.0"
3
3
  slug: refine-search
4
4
  title: Get help refining your search
5
5
  ---
@@ -1,5 +1,5 @@
1
1
  ---
2
- version: "5.6.1"
2
+ version: "5.7.0"
3
3
  slug: skill-format-guide
4
4
  title: Skill Format and Local Authoring Guide
5
5
  ---