@agent-ix/quoin 0.20.0 → 0.21.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.
Files changed (61) hide show
  1. package/default-modules.yaml +4 -4
  2. package/dist/advisor/advise.d.ts +54 -11
  3. package/dist/advisor/advise.d.ts.map +1 -1
  4. package/dist/advisor/index.d.ts +1 -1
  5. package/dist/advisor/index.d.ts.map +1 -1
  6. package/dist/{advisor-B7X0YTVo.js → advisor-C4P3aTJT.js} +1 -1
  7. package/dist/auditor/audit.d.ts +23 -0
  8. package/dist/auditor/audit.d.ts.map +1 -1
  9. package/dist/auditor/index.d.ts +1 -1
  10. package/dist/auditor/index.d.ts.map +1 -1
  11. package/dist/auditor-B6Hs00oH.js +269 -0
  12. package/dist/{base-q8brKRlC.js → base-DQg6yfbN.js} +1 -1
  13. package/dist/cli.js +1 -1
  14. package/dist/commands/advise.d.ts.map +1 -1
  15. package/dist/commands/advise.js +82 -36
  16. package/dist/commands/assurance.js +13 -13
  17. package/dist/commands/catalog/list.js +2 -2
  18. package/dist/commands/catalog/methods.js +3 -3
  19. package/dist/commands/catalog/show.js +2 -2
  20. package/dist/commands/catalog/validate.js +2 -2
  21. package/dist/commands/completeness.js +2 -2
  22. package/dist/commands/config/doctor.js +1 -1
  23. package/dist/commands/config/edit.js +1 -1
  24. package/dist/commands/config/get.js +1 -1
  25. package/dist/commands/config/set.js +1 -1
  26. package/dist/commands/evidence/affirm.js +5 -5
  27. package/dist/commands/evidence/audit.d.ts.map +1 -1
  28. package/dist/commands/evidence/audit.js +36 -42
  29. package/dist/commands/evidence/baseline.js +13 -13
  30. package/dist/commands/evidence/gc.js +2 -2
  31. package/dist/commands/evidence/index.js +1 -1
  32. package/dist/commands/evidence/record.js +12 -12
  33. package/dist/commands/matrix.js +1 -1
  34. package/dist/commands/module/ensure-defaults.js +3 -3
  35. package/dist/commands/module/install.js +2 -2
  36. package/dist/commands/module/list.js +2 -2
  37. package/dist/commands/module/remove.js +2 -2
  38. package/dist/commands/review.js +1 -1
  39. package/dist/commands/to-plan.js +1 -1
  40. package/dist/commands/update.js +2 -2
  41. package/dist/commands/write.js +3 -3
  42. package/dist/{completeness-Bic6298v.js → completeness-B1qG_rZo.js} +1 -1
  43. package/dist/evidence/index.d.ts +1 -1
  44. package/dist/evidence/index.d.ts.map +1 -1
  45. package/dist/evidence/store.d.ts +12 -0
  46. package/dist/evidence/store.d.ts.map +1 -1
  47. package/dist/{evidence-OIkRqQrU.js → evidence-DopNnj0E.js} +99 -93
  48. package/dist/{flow-command-k7eYqzBE.js → flow-command-CrMEzCWz.js} +1 -1
  49. package/dist/index.js +6 -6
  50. package/dist/{modules-E0AaYTTp.js → modules-CvBmrY7T.js} +2 -2
  51. package/dist/{plugins-xe5e7dMl.js → plugins-C7jz-Y_w.js} +1 -1
  52. package/dist/quire/contract.d.ts +2 -2
  53. package/dist/{quire-BS-EW-0Y.js → quire-VZjWaHph.js} +2 -2
  54. package/dist/schemas/coverage-v1.schema.json +17 -0
  55. package/dist/{version-0hg-SgVf.js → version-DgWC58-h.js} +1 -1
  56. package/dist/{write-Dig0zXLM.js → write-68NgoaMy.js} +1 -1
  57. package/package.json +1 -1
  58. package/skills/spec-evidence-analysis/SKILL.md +51 -1
  59. package/skills/spec-fuzz/SKILL.md +30 -0
  60. package/dist/auditor-C9dLCmDh.js +0 -188
  61. package/dist/combinatorial-Cq01XfhV.js +0 -80
@@ -66,35 +66,41 @@ function ee(e, t) {
66
66
  schemaVersion: 1
67
67
  }), n;
68
68
  }
69
- function S(e, t) {
69
+ function te(e, t) {
70
70
  let n = m(e, t.suite, t.commit);
71
71
  return v(n, {
72
72
  ...t,
73
73
  schemaVersion: 1
74
74
  }), n;
75
75
  }
76
- function C(t, n) {
76
+ function S(t, n) {
77
77
  let i = s(u(t), l, n);
78
78
  return e(i) ? r(i).filter((e) => e.endsWith(".json")).sort() : [];
79
79
  }
80
- function w(e, t, n = []) {
81
- return C(e, t).map((r) => x(m(e, t, r.replace(/\.json$/, "")), n)).filter((e) => e !== null).sort((e, t) => k(e.timestamp, t.timestamp) || k(e.commit, t.commit));
80
+ function C(e, t, n = []) {
81
+ return S(e, t).map((r) => x(m(e, t, r.replace(/\.json$/, "")), n)).filter((e) => e !== null).sort((e, t) => k(e.timestamp, t.timestamp) || k(e.commit, t.commit));
82
82
  }
83
- function T(e, t, n = []) {
84
- return w(e, t, n).at(-1) ?? null;
83
+ function w(e, t, n = []) {
84
+ return C(e, t, n).at(-1) ?? null;
85
85
  }
86
- function E(e) {
86
+ function ne(e) {
87
87
  return e.rulesEvaluated === void 0 ? null : e.rulesEvaluated === 0;
88
88
  }
89
- function D(t, n) {
89
+ function T(t, n) {
90
90
  let i = s(u(t), c, n);
91
91
  return e(i) ? r(i).filter((e) => e.endsWith(".json")).sort() : [];
92
92
  }
93
- function te(e, t, n = []) {
94
- return D(e, t).map((r) => x(p(e, t, r.replace(/\.json$/, "")), n)).filter((e) => e !== null).sort((e, t) => k(e.timestamp, t.timestamp) || k(e.commit, t.commit));
93
+ function re(e, t, n = []) {
94
+ return T(e, t).map((r) => x(p(e, t, r.replace(/\.json$/, "")), n)).filter((e) => e !== null).sort((e, t) => k(e.timestamp, t.timestamp) || k(e.commit, t.commit));
95
+ }
96
+ function E(e, t, n = []) {
97
+ return re(e, t, n).at(-1) ?? null;
95
98
  }
96
- function O(e, t, n = []) {
97
- return te(e, t, n).at(-1) ?? null;
99
+ function D(e) {
100
+ return A(e).map((t) => E(e, t)).filter((e) => e !== null);
101
+ }
102
+ function O(e) {
103
+ return A(e).map((t) => w(e, t)).filter((e) => e !== null);
98
104
  }
99
105
  function k(e, t) {
100
106
  return e === t ? 0 : e < t ? -1 : 1;
@@ -114,33 +120,33 @@ function j(e) {
114
120
  };
115
121
  }
116
122
  function M(e, t) {
117
- let n = [...t.bindings].sort(N);
123
+ let n = [...t.bindings].sort(P);
118
124
  v(d(e), {
119
125
  schemaVersion: 1,
120
126
  bindings: n
121
127
  });
122
128
  }
123
- function ne(e) {
129
+ function ie(e) {
124
130
  return b(f(e));
125
131
  }
126
- function re(e, t) {
132
+ function ae(e, t) {
127
133
  v(f(e), {
128
134
  schemaVersion: 1,
129
135
  commit: t.commit,
130
136
  accepted: [...t.accepted].sort(k)
131
137
  });
132
138
  }
133
- function ie(e, t = !1) {
139
+ function N(e, t = !1) {
134
140
  let n = new Set(j(e).bindings.map((e) => `${e.suite}/${h(e.commit)}.json`)), r = [];
135
141
  for (let a of A(e)) {
136
- let o = D(e, a), d = /* @__PURE__ */ new Set(), f = O(e, a);
142
+ let o = T(e, a), d = /* @__PURE__ */ new Set(), f = E(e, a);
137
143
  f && d.add(`${h(f.commit)}.json`);
138
144
  for (let l of o) {
139
145
  if (d.has(l) || n.has(`${a}/${l}`)) continue;
140
146
  let o = s(u(e), c, a, l);
141
147
  r.push(o), t || i(o);
142
148
  }
143
- let p = C(e, a), m = /* @__PURE__ */ new Set(), g = T(e, a);
149
+ let p = S(e, a), m = /* @__PURE__ */ new Set(), g = w(e, a);
144
150
  g && m.add(`${h(g.commit)}.json`);
145
151
  for (let o of p) {
146
152
  if (m.has(o) || n.has(`${a}/${o}`)) continue;
@@ -150,10 +156,10 @@ function ie(e, t = !1) {
150
156
  }
151
157
  return r.sort();
152
158
  }
153
- function N(e, t) {
159
+ function P(e, t) {
154
160
  return e.obligation === t.obligation ? e.suite === t.suite ? 0 : e.suite < t.suite ? -1 : 1 : e.obligation < t.obligation ? -1 : 1;
155
161
  }
156
- function P(e, t) {
162
+ function F(e, t) {
157
163
  let n = e.findIndex((e) => e.obligation === t.obligation && e.suite === t.suite);
158
164
  if (n === -1) return {
159
165
  bindings: [...e, { ...t }],
@@ -171,7 +177,7 @@ function P(e, t) {
171
177
  suspect: i
172
178
  };
173
179
  }
174
- function F(e, t, n, r, i, a, o) {
180
+ function I(e, t, n, r, i, a, o) {
175
181
  let s = e.map((e, t) => [e, t]).filter(([e]) => e.obligation === t && (!o || e.suite === o));
176
182
  if (s.length === 0) return {
177
183
  bindings: e,
@@ -194,7 +200,7 @@ function F(e, t, n, r, i, a, o) {
194
200
  }
195
201
  //#endregion
196
202
  //#region src/evidence/record.ts
197
- function I(e) {
203
+ function L(e) {
198
204
  let t = ee(e.repo, {
199
205
  schemaVersion: 1,
200
206
  suite: e.suite,
@@ -221,7 +227,7 @@ function I(e) {
221
227
  for (let [t, r] of [...i].sort(([e], [t]) => e === t ? 0 : e < t ? -1 : 1)) {
222
228
  let i = n.get(t);
223
229
  if (!i) continue;
224
- let a = P(o, {
230
+ let a = F(o, {
225
231
  obligation: t,
226
232
  statementHashAtBinding: i.statement_hash,
227
233
  suite: e.suite,
@@ -240,12 +246,12 @@ function I(e) {
240
246
  unmatched: [...a].sort()
241
247
  };
242
248
  }
243
- function L(e) {
249
+ function R(e) {
244
250
  return e.obligations ?? [];
245
251
  }
246
252
  //#endregion
247
253
  //#region src/evidence/adapters/types.ts
248
- var R = class extends Error {
254
+ var z = class extends Error {
249
255
  adapter;
250
256
  constructor(e, t) {
251
257
  super(`${e}: ${t}`), this.adapter = e, this.name = "AdapterError";
@@ -253,11 +259,11 @@ var R = class extends Error {
253
259
  };
254
260
  //#endregion
255
261
  //#region src/evidence/adapters/cargo-mutants.ts
256
- function z(e) {
262
+ function B(e) {
257
263
  let t = e.file?.trim(), n = e.function?.function_name?.trim();
258
264
  if (t !== void 0 && t !== "" && n !== void 0 && n !== "") return `${t}::${n}`;
259
265
  }
260
- var B = {
266
+ var V = {
261
267
  name: "cargo-mutants",
262
268
  summary: "cargo-mutants outcomes.json — mutation score per mutated function.",
263
269
  tools: ["cargo-mutants", "cargo mutants"],
@@ -266,19 +272,19 @@ var B = {
266
272
  try {
267
273
  t = JSON.parse(e);
268
274
  } catch (e) {
269
- throw new R("cargo-mutants", `input is not JSON: ${e.message}`);
275
+ throw new z("cargo-mutants", `input is not JSON: ${e.message}`);
270
276
  }
271
- if (!Array.isArray(t.outcomes)) throw new R("cargo-mutants", "no `outcomes` array — expected the contents of mutants.out/outcomes.json");
277
+ if (!Array.isArray(t.outcomes)) throw new z("cargo-mutants", "no `outcomes` array — expected the contents of mutants.out/outcomes.json");
272
278
  let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map();
273
279
  for (let e of t.outcomes) {
274
280
  if (e.scenario === "Baseline" || typeof e.scenario != "object") continue;
275
281
  let t = e.scenario.Mutant;
276
282
  if (t === void 0) continue;
277
- let i = z(t);
283
+ let i = B(t);
278
284
  i !== void 0 && (e.summary === "CaughtMutant" ? n.set(i, (n.get(i) ?? 0) + 1) : (e.summary === "MissedMutant" || e.summary === "Timeout") && r.set(i, (r.get(i) ?? 0) + 1));
279
285
  }
280
286
  let i = [.../* @__PURE__ */ new Set([...n.keys(), ...r.keys()])].sort();
281
- if (i.length === 0) throw new R("cargo-mutants", "no viable mutants in the report — nothing was measured");
287
+ if (i.length === 0) throw new z("cargo-mutants", "no viable mutants in the report — nothing was measured");
282
288
  return { entries: i.map((e) => {
283
289
  let t = n.get(e) ?? 0, i = r.get(e) ?? 0, a = t + i;
284
290
  return {
@@ -288,32 +294,32 @@ var B = {
288
294
  };
289
295
  }) };
290
296
  }
291
- }, V = /<testcase\b([^>]*?)(\/>|>([\s\S]*?)<\/testcase\s*>)/g, H = /([\w:.-]+)\s*=\s*"([^"]*)"/g;
292
- function U(e) {
297
+ }, H = /<testcase\b([^>]*?)(\/>|>([\s\S]*?)<\/testcase\s*>)/g, U = /([\w:.-]+)\s*=\s*"([^"]*)"/g;
298
+ function W(e) {
293
299
  let t = /* @__PURE__ */ new Map();
294
- for (let n of e.matchAll(H)) t.set(n[1], W(n[2]));
300
+ for (let n of e.matchAll(U)) t.set(n[1], G(n[2]));
295
301
  return t;
296
302
  }
297
- function W(e) {
303
+ function G(e) {
298
304
  return e.replaceAll("&lt;", "<").replaceAll("&gt;", ">").replaceAll("&quot;", "\"").replaceAll("&apos;", "'").replaceAll("&amp;", "&");
299
305
  }
300
- function G(e, t) {
306
+ function K(e, t) {
301
307
  let n = e.trim(), r = t.trim();
302
308
  return n === "" ? r : r === "" ? n : n === r ? r : n.endsWith(`::${r}`) || n.endsWith(`.${r}`) ? n.replaceAll(".", "::") : `${n.replaceAll(".", "::")}::${r}`;
303
309
  }
304
- var K = /<property\b([^>]*)\/?>/g;
305
- function q(e) {
310
+ var q = /<property\b([^>]*)\/?>/g;
311
+ function J(e) {
306
312
  let t = [];
307
- for (let n of e.matchAll(K)) {
308
- let e = U(n[1]), r = e.get("name"), i = e.get("value");
313
+ for (let n of e.matchAll(q)) {
314
+ let e = W(n[1]), r = e.get("name"), i = e.get("value");
309
315
  if (r !== void 0 && i !== void 0 && (r === "trace" || r === "traceIds" || r === "trace_ids")) for (let e of i.split(/[,\s]+/)) e !== "" && t.push(e);
310
316
  }
311
317
  return t.length > 0 ? t : void 0;
312
318
  }
313
- function J(e) {
319
+ function oe(e) {
314
320
  return /<error\b/.test(e) ? "error" : /<failure\b/.test(e) ? "fail" : /<skipped\b/.test(e) ? "skip" : "pass";
315
321
  }
316
- var ae = {
322
+ var se = {
317
323
  name: "junit",
318
324
  summary: "JUnit XML (<testsuite>/<testcase>), as emitted by most runners.",
319
325
  tools: [
@@ -326,34 +332,34 @@ var ae = {
326
332
  ],
327
333
  parse(e) {
328
334
  let t = [];
329
- for (let n of e.matchAll(V)) {
330
- let e = U(n[1]), r = n[3] ?? "", i = G(e.get("classname") ?? "", e.get("name") ?? "");
335
+ for (let n of e.matchAll(H)) {
336
+ let e = W(n[1]), r = n[3] ?? "", i = K(e.get("classname") ?? "", e.get("name") ?? "");
331
337
  if (i === "") continue;
332
- let a = q(r);
338
+ let a = J(r);
333
339
  t.push({
334
340
  symbol: i,
335
- outcome: J(r),
341
+ outcome: oe(r),
336
342
  ...a === void 0 ? {} : { traceIds: a }
337
343
  });
338
344
  }
339
- if (t.length === 0) throw new R("junit", "no <testcase> elements found — is this JUnit XML?");
345
+ if (t.length === 0) throw new z("junit", "no <testcase> elements found — is this JUnit XML?");
340
346
  return { entries: t };
341
347
  }
342
- }, oe = /^([A-Za-z0-9._-]+):\s*(OK|FAIL)\b\s*(?:[—-]\s*)?(.*)$/, se = /\(([^)]*)\)[.\s]*$/, ce = /\b((?:FR|NFR|StR|US)-\d+-AC-\d+|TC-\d+)\b/g;
343
- function le(e) {
344
- let t = se.exec(e);
348
+ }, ce = /^([A-Za-z0-9._-]+):\s*(OK|FAIL)\b\s*(?:[—-]\s*)?(.*)$/, le = /\(([^)]*)\)[.\s]*$/, ue = /\b((?:FR|NFR|StR|US)-\d+-AC-\d+|TC-\d+)\b/g;
349
+ function de(e) {
350
+ let t = le.exec(e);
345
351
  if (!t) return;
346
- let n = [...t[1].matchAll(ce)].map((e) => e[1]);
352
+ let n = [...t[1].matchAll(ue)].map((e) => e[1]);
347
353
  return n.length > 0 ? n : void 0;
348
354
  }
349
- function ue(e) {
355
+ function fe(e) {
350
356
  let t = [], n = 0;
351
357
  for (let r of e.split("\n")) {
352
- let e = oe.exec(r.trim());
358
+ let e = ce.exec(r.trim());
353
359
  if (!e) continue;
354
360
  let [, i, a, o] = e;
355
361
  if (n += 1, a === "OK") continue;
356
- let s = o.trim(), c = le(s);
362
+ let s = o.trim(), c = de(s);
357
363
  t.push({
358
364
  ruleId: i,
359
365
  severity: "violation",
@@ -361,7 +367,7 @@ function ue(e) {
361
367
  ...c === void 0 ? {} : { traceIds: c }
362
368
  });
363
369
  }
364
- if (n === 0) throw new R("audit-script", "no `<name>: OK` or `<name>: FAIL` line found — is this audit-script output?");
370
+ if (n === 0) throw new z("audit-script", "no `<name>: OK` or `<name>: FAIL` line found — is this audit-script output?");
365
371
  return {
366
372
  findings: t,
367
373
  tool: "audit-script",
@@ -370,15 +376,15 @@ function ue(e) {
370
376
  }
371
377
  //#endregion
372
378
  //#region src/evidence/adapters/agent-eval.ts
373
- function de(e) {
379
+ function pe(e) {
374
380
  let t;
375
381
  try {
376
382
  t = JSON.parse(e);
377
383
  } catch (e) {
378
- throw new R("agent-eval", `not JSON: ${e instanceof Error ? e.message : String(e)}`);
384
+ throw new z("agent-eval", `not JSON: ${e instanceof Error ? e.message : String(e)}`);
379
385
  }
380
386
  let n = t;
381
- if (!n || typeof n != "object" || !Array.isArray(n.results)) throw new R("agent-eval", "expected a cli-agent-evals report with a \"results\" array");
387
+ if (!n || typeof n != "object" || !Array.isArray(n.results)) throw new z("agent-eval", "expected a cli-agent-evals report with a \"results\" array");
382
388
  let r = [];
383
389
  for (let e of n.results) {
384
390
  let t = typeof e.id == "string" ? e.id : null;
@@ -386,19 +392,19 @@ function de(e) {
386
392
  symbol: t,
387
393
  outcome: e.ok === !0 ? "pass" : "fail",
388
394
  traceIds: [t],
389
- ...fe(e)
395
+ ...me(e)
390
396
  });
391
397
  }
392
- if (r.length === 0) throw new R("agent-eval", "no scenario results in the report — did the suite run?");
398
+ if (r.length === 0) throw new z("agent-eval", "no scenario results in the report — did the suite run?");
393
399
  return { entries: r };
394
400
  }
395
- function fe(e) {
401
+ function me(e) {
396
402
  let t = e.passRate;
397
403
  if (typeof t != "string") return {};
398
404
  let [n, r] = t.split("/").map(Number);
399
405
  return !Number.isFinite(n) || !Number.isFinite(r) || r === 0 ? {} : { score: n / r };
400
406
  }
401
- var pe = {
407
+ var he = {
402
408
  name: "agent-eval",
403
409
  summary: "cli-agent-evals report JSON — one entry per scenario, keyed on the scenario id.",
404
410
  tools: [
@@ -406,22 +412,22 @@ var pe = {
406
412
  "agent-evals",
407
413
  "agent-pty"
408
414
  ],
409
- parse: de
415
+ parse: pe
410
416
  };
411
417
  //#endregion
412
418
  //#region src/evidence/adapters/sbom.ts
413
- function me(e) {
419
+ function ge(e) {
414
420
  let t;
415
421
  try {
416
422
  t = JSON.parse(e);
417
423
  } catch (e) {
418
- throw new R("sbom", `not JSON: ${e instanceof Error ? e.message : String(e)}. CycloneDX and SPDX both have JSON serialisations; the tag-value SPDX form is not read here.`);
424
+ throw new z("sbom", `not JSON: ${e instanceof Error ? e.message : String(e)}. CycloneDX and SPDX both have JSON serialisations; the tag-value SPDX form is not read here.`);
419
425
  }
420
- if (!t || typeof t != "object") throw new R("sbom", "expected a JSON object");
426
+ if (!t || typeof t != "object") throw new z("sbom", "expected a JSON object");
421
427
  let n = t;
422
- return { entries: he(n) ?? ge(n) ?? _e(n) };
428
+ return { entries: _e(n) ?? Y(n) ?? ve(n) };
423
429
  }
424
- function he(e) {
430
+ function _e(e) {
425
431
  return String(e.bomFormat ?? "") === "CycloneDX" ? (Array.isArray(e.components) ? e.components : []).map((e) => {
426
432
  let t = e, n = typeof t.purl == "string" ? t.purl : null, r = typeof t.name == "string" ? t.name : null;
427
433
  if (!n && !r) return null;
@@ -432,7 +438,7 @@ function he(e) {
432
438
  };
433
439
  }).filter((e) => e !== null) : null;
434
440
  }
435
- function ge(e) {
441
+ function Y(e) {
436
442
  return typeof e.spdxVersion == "string" ? (Array.isArray(e.packages) ? e.packages : []).map((e) => {
437
443
  let t = e, n = (Array.isArray(t.externalRefs) ? t.externalRefs : []).map((e) => e).find((e) => String(e.referenceType ?? "") === "purl"), r = n && typeof n.referenceLocator == "string" ? n.referenceLocator : null, i = typeof t.name == "string" ? t.name : null;
438
444
  if (!r && !i) return null;
@@ -443,10 +449,10 @@ function ge(e) {
443
449
  };
444
450
  }).filter((e) => e !== null) : null;
445
451
  }
446
- function _e(e) {
447
- throw new R("sbom", `neither a CycloneDX (\`bomFormat\`) nor an SPDX (\`spdxVersion\`) document — top-level keys: ${Object.keys(e).slice(0, 6).join(", ") || "(none)"}`);
452
+ function ve(e) {
453
+ throw new z("sbom", `neither a CycloneDX (\`bomFormat\`) nor an SPDX (\`spdxVersion\`) document — top-level keys: ${Object.keys(e).slice(0, 6).join(", ") || "(none)"}`);
448
454
  }
449
- var Y = {
455
+ var ye = {
450
456
  name: "sbom",
451
457
  summary: "CycloneDX or SPDX JSON — one entry per component, so an empty inventory reads as vacuous.",
452
458
  tools: [
@@ -456,19 +462,19 @@ var Y = {
456
462
  "cdxgen",
457
463
  "cargo-cyclonedx"
458
464
  ],
459
- parse: me
465
+ parse: ge
460
466
  };
461
467
  //#endregion
462
468
  //#region src/evidence/adapters/sarif.ts
463
- function ve(e) {
469
+ function be(e) {
464
470
  let t;
465
471
  try {
466
472
  t = JSON.parse(e);
467
473
  } catch (e) {
468
- throw new R("sarif", `input is not JSON: ${e.message}`);
474
+ throw new z("sarif", `input is not JSON: ${e.message}`);
469
475
  }
470
- if (!Array.isArray(t.runs)) throw new R("sarif", "no `runs` array — expected a SARIF 2.1.0 log");
471
- if (t.runs.length === 0) throw new R("sarif", "`runs` is empty — a log with no run proves no scan executed");
476
+ if (!Array.isArray(t.runs)) throw new z("sarif", "no `runs` array — expected a SARIF 2.1.0 log");
477
+ if (t.runs.length === 0) throw new z("sarif", "`runs` is empty — a log with no run proves no scan executed");
472
478
  let n = [], r = [], i;
473
479
  for (let e of t.runs) {
474
480
  let t = e.tool?.driver;
@@ -492,14 +498,14 @@ function ve(e) {
492
498
  ...i === void 0 ? {} : { rulesEvaluated: i }
493
499
  };
494
500
  }
495
- function ye(e) {
501
+ function xe(e) {
496
502
  let t;
497
503
  try {
498
504
  t = JSON.parse(e);
499
505
  } catch (e) {
500
- throw new R("cargo-audit", `input is not JSON: ${e.message}`);
506
+ throw new z("cargo-audit", `input is not JSON: ${e.message}`);
501
507
  }
502
- if (t.vulnerabilities === void 0) throw new R("cargo-audit", "no `vulnerabilities` object — expected `cargo audit --json` output");
508
+ if (t.vulnerabilities === void 0) throw new z("cargo-audit", "no `vulnerabilities` object — expected `cargo audit --json` output");
503
509
  let n = [], r = (e, t) => {
504
510
  let r = e.advisory?.id;
505
511
  if (r === void 0 || r === "") return;
@@ -531,17 +537,17 @@ var X = {
531
537
  try {
532
538
  t = JSON.parse(e);
533
539
  } catch (e) {
534
- throw new R("entries", `input is not JSON: ${e.message}`);
540
+ throw new z("entries", `input is not JSON: ${e.message}`);
535
541
  }
536
- if (!Array.isArray(t.entries)) throw new R("entries", "expected JSON of the form {\"entries\": [{symbol, outcome, traceIds?}]}");
542
+ if (!Array.isArray(t.entries)) throw new z("entries", "expected JSON of the form {\"entries\": [{symbol, outcome, traceIds?}]}");
537
543
  return { entries: t.entries };
538
544
  }
539
545
  }, Z = [
540
546
  X,
541
- ae,
542
- B,
543
- Y,
544
- pe
547
+ se,
548
+ V,
549
+ ye,
550
+ he
545
551
  ], Q = [
546
552
  {
547
553
  name: "sarif",
@@ -551,7 +557,7 @@ var X = {
551
557
  "semgrep",
552
558
  "codeql"
553
559
  ],
554
- parse: ve
560
+ parse: be
555
561
  },
556
562
  {
557
563
  name: "audit-script",
@@ -563,7 +569,7 @@ var X = {
563
569
  "import-linter",
564
570
  "dependency-cruiser"
565
571
  ],
566
- parse: ue
572
+ parse: fe
567
573
  },
568
574
  {
569
575
  name: "cargo-audit",
@@ -574,18 +580,18 @@ var X = {
574
580
  "cargo-deny",
575
581
  "cargo deny"
576
582
  ],
577
- parse: ye
583
+ parse: xe
578
584
  }
579
585
  ], $ = [...Z.map((e) => e.name), ...Q.map((e) => e.name)];
580
- function be(e) {
586
+ function Se(e) {
581
587
  if (e.adapter !== void 0 && e.adapter !== "") return Q.find((t) => t.name === e.adapter);
582
588
  let t = (e.tool ?? "").toLowerCase();
583
589
  if (t !== "") return Q.find((e) => e.tools.some((e) => t.includes(e)));
584
590
  }
585
- function xe(e) {
591
+ function Ce(e) {
586
592
  if (e.adapter !== void 0 && e.adapter !== "") {
587
593
  let t = Z.find((t) => t.name === e.adapter);
588
- if (t === void 0) throw new R("adapter", `unknown adapter '${e.adapter}'. Available: ${$.join(", ")}`);
594
+ if (t === void 0) throw new z("adapter", `unknown adapter '${e.adapter}'. Available: ${$.join(", ")}`);
589
595
  return t;
590
596
  }
591
597
  let t = (e.tool ?? "").toLowerCase();
@@ -596,4 +602,4 @@ function xe(e) {
596
602
  return X;
597
603
  }
598
604
  //#endregion
599
- export { M as _, I as a, P as c, T as d, A as f, re as g, E as h, L as i, ie as l, j as m, xe as n, F as o, ne as p, be as r, f as s, $ as t, O as u, S as v };
605
+ export { ne as _, L as a, te as b, F as c, D as d, w as f, j as g, ie as h, R as i, N as l, A as m, Ce as n, I as o, O as p, Se as r, f as s, $ as t, E as u, ae as v, M as y };
@@ -1,4 +1,4 @@
1
- import { a as e, t } from "./base-q8brKRlC.js";
1
+ import { a as e, t } from "./base-DQg6yfbN.js";
2
2
  import { existsSync as n } from "node:fs";
3
3
  import { dirname as r, join as i, resolve as a } from "node:path";
4
4
  import { fileURLToPath as o } from "node:url";
package/dist/index.js CHANGED
@@ -1,9 +1,9 @@
1
- import { n as e, t } from "./version-0hg-SgVf.js";
1
+ import { n as e, t } from "./version-DgWC58-h.js";
2
2
  import { isVersionRequest as n, main as r } from "./cli.js";
3
- import { i, n as a, o, r as s, t as c } from "./base-q8brKRlC.js";
4
- import { a as l, i as u, n as d, r as f } from "./plugins-xe5e7dMl.js";
5
- import { n as p, t as m } from "./modules-E0AaYTTp.js";
3
+ import { i, n as a, o, r as s, t as c } from "./base-DQg6yfbN.js";
4
+ import { a as l, i as u, n as d, r as f } from "./plugins-C7jz-Y_w.js";
5
+ import { n as p, t as m } from "./modules-CvBmrY7T.js";
6
6
  import { i as h, n as g, r as _, t as v } from "./config-schema-Dp-vlxuR.js";
7
- import { a as y, i as b, n as x, o as S, r as C, t as w } from "./write-Dig0zXLM.js";
8
- import { t as T } from "./flow-command-k7eYqzBE.js";
7
+ import { a as y, i as b, n as x, o as S, r as C, t as w } from "./write-68NgoaMy.js";
8
+ import { t as T } from "./flow-command-CrMEzCWz.js";
9
9
  export { T as FlowCommand, v as QUOIN_ENV_BINDINGS, g as QUOIN_PLUGIN_ID, c as QuoinCommand, _ as QuoinConfigSchema, b as UNRESOLVED_ORG_MESSAGE, w as createAuthoringPack, a as defaultModuleRoots, m as defaultModulesManifest, p as ensureDefaultModules, s as filamentModulesDir, i as findCatalogEntry, x as formatAuthoringPack, d as installPlugin, n as isVersionRequest, h as ixSchema, f as listPlugins, o as loadCatalog, r as main, y as originOrg, t as packageVersion, u as parseSourceArg, C as parseTypeList, l as removePlugin, S as resolveOrg, e as resolveVersion };
@@ -1,5 +1,5 @@
1
- import { a as e } from "./base-q8brKRlC.js";
2
- import { t } from "./plugins-xe5e7dMl.js";
1
+ import { a as e } from "./base-DQg6yfbN.js";
2
+ import { t } from "./plugins-C7jz-Y_w.js";
3
3
  import { readFileSync as n } from "node:fs";
4
4
  import { dirname as r, join as i } from "node:path";
5
5
  import { fileURLToPath as a } from "node:url";
@@ -1,4 +1,4 @@
1
- import { a as e, r as t } from "./base-q8brKRlC.js";
1
+ import { a as e, r as t } from "./base-DQg6yfbN.js";
2
2
  import { existsSync as n, readFileSync as r, rmSync as i } from "node:fs";
3
3
  import { basename as a, join as o } from "node:path";
4
4
  import { parse as s } from "yaml";
@@ -24,7 +24,7 @@
24
24
  /** Where the vendored schemas came from, and exactly which bytes. */
25
25
  export declare const QUIRE_CONTRACT: {
26
26
  /** The quire-rs release the vendored schemas were copied from. */
27
- readonly sourceTag: "v0.36.0";
27
+ readonly sourceTag: "v0.39.1";
28
28
  /** The contract version, as carried in each schema's `$id` and filename. */
29
29
  readonly contractVersion: "v1";
30
30
  /**
@@ -41,7 +41,7 @@ export declare const QUIRE_CONTRACT: {
41
41
  * without a matching refresh fails loudly.
42
42
  */
43
43
  readonly hashes: {
44
- readonly "coverage-v1.schema.json": "5669991ed60f2dbf3db82f7b43e12893ecc328b63e3c290b84b41d08c92881e6";
44
+ readonly "coverage-v1.schema.json": "20dbff7bca2cdde91d67c1586f5e9932a94e21c625c5a8f3fbbb6e1b06e001fc";
45
45
  readonly "properties-v1.schema.json": "d81f1ec85abdecd1f1664ded15e081f9aecb6c0f054d6b332b71e904cf826292";
46
46
  };
47
47
  };
@@ -25,11 +25,11 @@ var a = Object.defineProperty, o = Object.getOwnPropertyDescriptor, s = Object.g
25
25
  });
26
26
  return e;
27
27
  }, p = (e) => c.call(e, "module.exports") ? e["module.exports"] : f(a({}, "__esModule", { value: !0 }), e), m = {
28
- sourceTag: "v0.36.0",
28
+ sourceTag: "v0.39.1",
29
29
  contractVersion: "v1",
30
30
  minimumCli: "0.21.0",
31
31
  hashes: {
32
- "coverage-v1.schema.json": "5669991ed60f2dbf3db82f7b43e12893ecc328b63e3c290b84b41d08c92881e6",
32
+ "coverage-v1.schema.json": "20dbff7bca2cdde91d67c1586f5e9932a94e21c625c5a8f3fbbb6e1b06e001fc",
33
33
  "properties-v1.schema.json": "d81f1ec85abdecd1f1664ded15e081f9aecb6c0f054d6b332b71e904cf826292"
34
34
  }
35
35
  }, h = t(r(import.meta.url));
@@ -53,6 +53,11 @@
53
53
  "description": "FR-053: derived obligation records, ordered by source then document then row. Absent for a model declaring no `obligations:` sources.",
54
54
  "items": { "$ref": "#/$defs/Obligation" }
55
55
  },
56
+ "implements": {
57
+ "type": "array",
58
+ "description": "FR-062: requirement -> production-code edges. Absent for a module declaring no `implements` marker forms. Carries no weight in `totals` — scope is not evidence.",
59
+ "items": { "$ref": "#/$defs/ImplementsRecord" }
60
+ },
56
61
  "totals": { "$ref": "#/$defs/CoverageTotals" }
57
62
  },
58
63
  "$defs": {
@@ -177,6 +182,18 @@
177
182
  }
178
183
  }
179
184
  },
185
+ "ImplementsRecord": {
186
+ "type": "object",
187
+ "additionalProperties": false,
188
+ "required": ["path", "symbol", "trace_id", "form"],
189
+ "properties": {
190
+ "path": { "type": "string", "minLength": 1 },
191
+ "symbol": { "type": "string", "minLength": 1 },
192
+ "trace_id": { "type": "string", "minLength": 1 },
193
+ "form": { "type": "string", "minLength": 1 }
194
+ },
195
+ "description": "FR-062: one requirement -> production-code edge. SCOPE, not evidence — which requirement a production symbol is about. A consumer must not fold this into a backed set or a coverage total; doing so lets unverified code claim coverage, which is the backdoor CR-061 closed."
196
+ },
180
197
  "CoverageTotals": {
181
198
  "type": "object",
182
199
  "additionalProperties": false,
@@ -11,7 +11,7 @@ function a(e) {
11
11
  return e || i();
12
12
  }
13
13
  function o() {
14
- return a("0.20.0");
14
+ return a("0.21.0");
15
15
  }
16
16
  //#endregion
17
17
  export { a as n, o as t };
@@ -1,4 +1,4 @@
1
- import { i as e } from "./base-q8brKRlC.js";
1
+ import { i as e } from "./base-DQg6yfbN.js";
2
2
  import { n as t, r as n, t as r } from "./config-schema-Dp-vlxuR.js";
3
3
  import { ConfigService as i } from "@agent-ix/ix-cli-core";
4
4
  import { existsSync as a, readFileSync as o, statSync as s } from "node:fs";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agent-ix/quoin",
3
3
  "description": "Spec-driven development for Claude Code — author validated, ISO/IEC/IEEE 29148-aligned specs, then plan and build against them.",
4
- "version": "0.20.0",
4
+ "version": "0.21.0",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "files": [