@dogfood-lab/study-swarm 1.3.0 → 2.0.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.
@@ -120,14 +120,14 @@ Each choice traces to findings by number. The shape:
120
120
  }
121
121
  ```
122
122
 
123
- - **L1 — One lock per dispatch; the lock IS the dispatch's content-address.** `lock_sha256` binds every per-step record and the verifier block together, so a replay cannot stitch a step from one dispatch onto another. (findings 4, 13, 17, 18)
123
+ - **L1 — One lock per dispatch; the lock IS the dispatch's content-address.** `lock_sha256` binds every per-step record and the verifier block together, so a replay cannot stitch a step from one dispatch onto another — the per-step record carries exactly PROV's minimal lineage quadruple (input hashes, output hashes, actor, rollup link). (findings 4, 13, 17, 18, 25)
124
124
  - **L2 — The harness emits the record; the CLI canonicalizes + hashes + validates it.** This producer/verifier split is universal across the provenance literature, and it is what keeps the CLI zero-dependency, network-free, and deterministic — it never calls a model. (findings 17, 19, 21, 22)
125
125
  - **L3 — Hash the prompt as normalized text, not JCS-restructured JSON.** The prompt is the literal string the model conditioned on, so it is hashed directly rather than canonicalized as JSON (the JWS/DSSE hash-known-bytes rule) — under one necessary text normalization (BOM strip + CRLF→LF + NFC), without which the same prompt hashes differently across platforms. (findings 12, 23; 10, 11)
126
126
  - **L4 — Normalize every text input before hashing (BOM strip + CRLF→LF + NFC), and JCS-canonicalize the structured JSON (tool surface, lock body).** This is the only way the same dispatch hashes identically on Windows, macOS, and Linux — the prompt, the dispatch text, `PROTOCOL.md`, and every JSON string value all pass through it. (findings 9, 10, 11) *(CI caught a real CRLF drift here when an early build hashed raw `PROTOCOL.md` bytes — the fix is exactly this normalization, and a line-ending-invariance test now guards it.)*
127
- - **L5 — Capture the tool surface as the canonicalized array `{name, description, inputSchema, outputSchema}` plus the effective JSON Schema dialect.** Neither MCP nor the provider APIs ship a per-tool version or hash, so the lock's content hash is the missing drift detector, and the dialect is part of the contract. (findings 7, 33, 34, 35, 37)
127
+ - **L5 — Capture the tool surface as the canonicalized array `{name, description, inputSchema, outputSchema}` plus the effective JSON Schema dialect.** Neither MCP nor the provider APIs ship a per-tool version or hash, so the lock's content hash is the missing drift detector, and the dialect is part of the contract; each captured schema is validated well-formed before hashing, so the lock pins a schema the run could actually have used. (findings 7, 33, 34, 35, 36, 37)
128
128
  - **L6 — Pin the RESOLVED model id, never an alias.** A named model can be re-tuned server-side; the concrete platform identity is what makes a step replayable. (findings 19, 29)
129
129
  - **L7 — `output_sha256` records outputs for DRIFT DETECTION, not determinism.** Pinning model + prompt + temperature does not yield bit-identical outputs (batch-invariance, FP non-associativity, MoE routing, provider drift), so the honest claim is **"replayable inputs + drift-detectable outputs,"** never "deterministic replay." (findings 8, 19, 26, 27, 28, 30, 31, 32)
130
- - **L8 — `lock --verify` is fail-closed strict-match.** Re-derive every deterministic hash and assert equality; any mismatch — and any unrecognized field — exits non-zero, never auto-heals. (findings 5, 6, 20, 38)
130
+ - **L8 — `lock --verify` is fail-closed strict-match.** Re-derive every deterministic hash and assert equality; any mismatch — and any unrecognized field — exits non-zero, never auto-heals — the cache-invalidation rule that any change to a folded input re-executes rather than serving a stale hit. (findings 2, 5, 6, 20, 38)
131
131
  - **L9 — Self-describing digests + domain separation in the rollup, hashed as one flat canonical array.** Digests carry their algorithm prefix; the canonical JSON object's distinct keys and the array's explicit length supply domain separation and sidestep the odd-leaf-duplication collision class. (findings 14, 15, 24, 38)
132
132
  - **L10 — Pin the verifier receipt offline-verifiably.** Store `receipt_id` + `receipt_chain_sha256`; `lock --verify` confirms the verification happened without re-contacting the verifier. The Ed25519 receipt is a stable pin; the ephemeral key buys verifiability, not anti-forgery — stated, not oversold. (findings 16, 21, 22)
133
133
  - **L11 — Pin content, not mtimes.** The lock is robust to file-touch noise by construction. (findings 1, 3)
@@ -1,46 +1,46 @@
1
1
  {
2
- "schema": "dispatch.lock/v1",
3
- "study_swarm_version": "1.3.0",
4
- "protocol_sha256": "sha256-seELxwXtj+xVxa3mas2cP0J0iMTTpq4vHqFMiUGqmuU=",
5
- "dispatch_sha256": "sha256-mPdwnlPuRlCtky20zG6l5AFJ8iRAZjHISnoGDUuGSOo=",
2
+ "schema": "dispatch.lock/v2",
3
+ "study_swarm_version": "2.0.0",
4
+ "protocol_sha256": "sha256-9tVI9RrD1qKHB/j/Ec9+//Q6y5coRtOvVcfDyiH46eQ=",
5
+ "dispatch_sha256": "sha256-W4v3ZnQx66bIfL2eCCTdIEgOkcWOw7oMg13rxlbEXuE=",
6
6
  "steps": [
7
7
  {
8
8
  "question_id": "Q1-replay-manifest",
9
9
  "resolved_model": "claude-opus-4-8",
10
- "prompt_sha256": "sha256-hcdcTxvqJNij0z9ItUPIzQhBWbrVZy3VvY4umPHaM5I=",
11
- "tool_schema_sha256": "sha256-kUC7s+wAFV4lzwrFKYp36khxCRQZWlWeFDOwhPIqGCk=",
10
+ "prompt_sha256": "sha256-S/YE49Ry8VUND0oyNE2ls9NQ8prCfASakEn4VPAE/Yc=",
11
+ "tool_schema_sha256": "sha256-x6ygSP9mm+7sp06lFaxpe5W3RsNc0h57hz6aHoXPYXo=",
12
12
  "schema_dialect": "https://json-schema.org/draft/2020-12/schema",
13
13
  "output_sha256": "sha256-k5rkOOyAHGBCVacEk8LPULp+s5YHVzaUyCHJY4tD5jE="
14
14
  },
15
15
  {
16
16
  "question_id": "Q2-canonicalization",
17
17
  "resolved_model": "claude-opus-4-8",
18
- "prompt_sha256": "sha256-Gj+ri3gWVWxP7M9fv50c0xsgiZ2j3T6kn3A3c3EhSos=",
19
- "tool_schema_sha256": "sha256-kUC7s+wAFV4lzwrFKYp36khxCRQZWlWeFDOwhPIqGCk=",
18
+ "prompt_sha256": "sha256-9ZbmzzaBscf6H4AUj/BRIA8UjG65KtFuMHdkqjucjhA=",
19
+ "tool_schema_sha256": "sha256-x6ygSP9mm+7sp06lFaxpe5W3RsNc0h57hz6aHoXPYXo=",
20
20
  "schema_dialect": "https://json-schema.org/draft/2020-12/schema",
21
21
  "output_sha256": "sha256-ymPE5lJqoygN0MpzqftgE1tYlyp7z+poCK2Z1Zj3mi8="
22
22
  },
23
23
  {
24
24
  "question_id": "Q3-provenance-attestation",
25
25
  "resolved_model": "claude-opus-4-8",
26
- "prompt_sha256": "sha256-g5/dW+zJvMObKyqnAdy70pUPtJcGD0DrsjkeEx/AcIY=",
27
- "tool_schema_sha256": "sha256-kUC7s+wAFV4lzwrFKYp36khxCRQZWlWeFDOwhPIqGCk=",
26
+ "prompt_sha256": "sha256-yUGaXe7X4bRhFHSKtDjxHh3xuPtg1+BmLV6jza4C0fo=",
27
+ "tool_schema_sha256": "sha256-x6ygSP9mm+7sp06lFaxpe5W3RsNc0h57hz6aHoXPYXo=",
28
28
  "schema_dialect": "https://json-schema.org/draft/2020-12/schema",
29
29
  "output_sha256": "sha256-OSUAIhytytKihfFM1Y+p1BllUSTC+KEfb/NX86X+Kc0="
30
30
  },
31
31
  {
32
32
  "question_id": "Q4-llm-determinism",
33
33
  "resolved_model": "claude-opus-4-8",
34
- "prompt_sha256": "sha256-OfQ00IyAulvEOnZ/UpiLp+JTwF4jYUzQRaqCp3zgIbE=",
35
- "tool_schema_sha256": "sha256-kUC7s+wAFV4lzwrFKYp36khxCRQZWlWeFDOwhPIqGCk=",
34
+ "prompt_sha256": "sha256-Pq1qlM2d+twv0Bpj9oKai/wqDgprgbgrX82++lwL01A=",
35
+ "tool_schema_sha256": "sha256-x6ygSP9mm+7sp06lFaxpe5W3RsNc0h57hz6aHoXPYXo=",
36
36
  "schema_dialect": "https://json-schema.org/draft/2020-12/schema",
37
37
  "output_sha256": "sha256-aFDm9p4/94p97NJg/vWKbYXchv6N1b0swpIfYoep1iw="
38
38
  },
39
39
  {
40
40
  "question_id": "Q5-tool-schema-drift",
41
41
  "resolved_model": "claude-opus-4-8",
42
- "prompt_sha256": "sha256-qIr9Dl8GmGeikUrgCJ62QQh8FvTNUhvdxL0Ivk/Di3M=",
43
- "tool_schema_sha256": "sha256-kUC7s+wAFV4lzwrFKYp36khxCRQZWlWeFDOwhPIqGCk=",
42
+ "prompt_sha256": "sha256-M/W3TeerL+sC7rgduBkXme0awKZIGWc12h82tMe22UM=",
43
+ "tool_schema_sha256": "sha256-x6ygSP9mm+7sp06lFaxpe5W3RsNc0h57hz6aHoXPYXo=",
44
44
  "schema_dialect": "https://json-schema.org/draft/2020-12/schema",
45
45
  "output_sha256": "sha256-Y1lsUdKoplgdos0r4faN6UgxXX74D/Se0AVHCiUA9dM="
46
46
  }
@@ -58,5 +58,5 @@
58
58
  "receipt_signature": "272c892124e3bc13a76b2674fa361b1d65aee6a588c74604cf4ae4e7c9440a8ba7888175b9ec1286fe87490121f694f64cd30adc3ffc0e1b31cd3365b7b38901",
59
59
  "receipt_chain_sha256": "499b63905064a5e25fd1801c5530504c94742f2183c4d3c8eb545a20cfbb112e"
60
60
  },
61
- "lock_sha256": "sha256-AOzuFtiRt4iXnsVqEvcB5hms1oO1LcjRrin96aQnUHE="
61
+ "lock_sha256": "sha256-oNSayaGGWFonFxzME+D1nwB14GsXitSWL7CLD6R9zwM="
62
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dogfood-lab/study-swarm",
3
- "version": "1.3.0",
3
+ "version": "2.0.0",
4
4
  "description": "Ground design decisions in cited research, then verify every citation with a different model family before it becomes canon — a research-grounded design protocol, with a thin CLI.",
5
5
  "keywords": [
6
6
  "methodology",