@agent-ix/quoin 0.19.2 → 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 (66) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/default-modules.yaml +4 -4
  4. package/dist/advisor/advise.d.ts +54 -11
  5. package/dist/advisor/advise.d.ts.map +1 -1
  6. package/dist/advisor/index.d.ts +1 -1
  7. package/dist/advisor/index.d.ts.map +1 -1
  8. package/dist/{advisor-a9axb4Jl.js → advisor-C4P3aTJT.js} +1 -1
  9. package/dist/auditor/audit.d.ts +23 -0
  10. package/dist/auditor/audit.d.ts.map +1 -1
  11. package/dist/auditor/index.d.ts +1 -1
  12. package/dist/auditor/index.d.ts.map +1 -1
  13. package/dist/auditor-B6Hs00oH.js +269 -0
  14. package/dist/{base-BE20w0jY.js → base-DQg6yfbN.js} +1 -1
  15. package/dist/cli.js +1 -1
  16. package/dist/commands/advise.d.ts.map +1 -1
  17. package/dist/commands/advise.js +82 -36
  18. package/dist/commands/assurance.js +13 -13
  19. package/dist/commands/catalog/list.js +2 -2
  20. package/dist/commands/catalog/methods.js +3 -3
  21. package/dist/commands/catalog/show.js +2 -2
  22. package/dist/commands/catalog/validate.js +2 -2
  23. package/dist/commands/completeness.js +2 -2
  24. package/dist/commands/config/doctor.js +1 -1
  25. package/dist/commands/config/edit.js +1 -1
  26. package/dist/commands/config/get.js +1 -1
  27. package/dist/commands/config/set.js +1 -1
  28. package/dist/commands/evidence/affirm.js +5 -5
  29. package/dist/commands/evidence/audit.d.ts.map +1 -1
  30. package/dist/commands/evidence/audit.js +36 -42
  31. package/dist/commands/evidence/baseline.js +13 -13
  32. package/dist/commands/evidence/gc.js +2 -2
  33. package/dist/commands/evidence/index.js +1 -1
  34. package/dist/commands/evidence/record.js +12 -12
  35. package/dist/commands/matrix.js +1 -1
  36. package/dist/commands/module/ensure-defaults.js +3 -3
  37. package/dist/commands/module/install.js +2 -2
  38. package/dist/commands/module/list.js +2 -2
  39. package/dist/commands/module/remove.js +2 -2
  40. package/dist/commands/review.js +1 -1
  41. package/dist/commands/to-plan.js +1 -1
  42. package/dist/commands/update.js +2 -2
  43. package/dist/commands/write.js +3 -3
  44. package/dist/{completeness-BeqcskAI.js → completeness-B1qG_rZo.js} +1 -1
  45. package/dist/evidence/index.d.ts +1 -1
  46. package/dist/evidence/index.d.ts.map +1 -1
  47. package/dist/evidence/record.d.ts.map +1 -1
  48. package/dist/evidence/store.d.ts +12 -0
  49. package/dist/evidence/store.d.ts.map +1 -1
  50. package/dist/{evidence-FRF9RN77.js → evidence-DopNnj0E.js} +120 -110
  51. package/dist/{flow-command-BrzzKBo9.js → flow-command-CrMEzCWz.js} +1 -1
  52. package/dist/index.js +6 -6
  53. package/dist/{modules-_FQTZ3gx.js → modules-CvBmrY7T.js} +2 -2
  54. package/dist/{plugins-Q1MtCIE5.js → plugins-C7jz-Y_w.js} +1 -1
  55. package/dist/quire/contract.d.ts +2 -2
  56. package/dist/quire/types.d.ts +11 -0
  57. package/dist/quire/types.d.ts.map +1 -1
  58. package/dist/{quire-Dis3ky5t.js → quire-VZjWaHph.js} +2 -2
  59. package/dist/schemas/coverage-v1.schema.json +23 -1
  60. package/dist/{version-D0l3nDPZ.js → version-DgWC58-h.js} +1 -1
  61. package/dist/{write-CMA6BDUq.js → write-68NgoaMy.js} +1 -1
  62. package/package.json +2 -2
  63. package/skills/spec-evidence-analysis/SKILL.md +51 -1
  64. package/skills/spec-fuzz/SKILL.md +30 -0
  65. package/dist/auditor-W2jFinr6.js +0 -188
  66. package/dist/combinatorial-Cq01XfhV.js +0 -80
@@ -1,10 +1,11 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "../quire-Dis3ky5t.js";
2
- import { t as o } from "../base-BE20w0jY.js";
3
- import { t as s } from "../advisor-a9axb4Jl.js";
4
- import { t as c } from "../combinatorial-Cq01XfhV.js";
5
- import { Flags as l } from "@oclif/core";
1
+ import { a as e, i as t, n, o as r, r as i, t as a } from "../quire-VZjWaHph.js";
2
+ import { t as o } from "../base-DQg6yfbN.js";
3
+ import { t as s } from "../advisor-C4P3aTJT.js";
4
+ import { a as c, i as l } from "../auditor-B6Hs00oH.js";
5
+ import { d as u, g as d } from "../evidence-DopNnj0E.js";
6
+ import { Flags as f } from "@oclif/core";
6
7
  //#region src/advisor/advise.ts
7
- var u = [
8
+ var p = [
8
9
  ["temporal", /\b(always|never|eventually|while|until|continuously)\b/i],
9
10
  ["liveness", /\b(eventually|makes progress|terminates)\b/i],
10
11
  ["invariance", /\b(invariant|holds for every|at all times)\b/i],
@@ -24,16 +25,52 @@ var u = [
24
25
  ["user-visible", /\b(user|operator|the UI|displays|screen)\b/i],
25
26
  ["stable-output", /\b(byte-identical|identical output|serializ|snapshot)\b/i],
26
27
  ["agent-behaviour", /\b(agent|transcript|prompt)\b/i],
27
- ["no-executable-oracle", /\b(review|judgement|readable|documented)\b/i]
28
+ ["no-executable-oracle", /\b(review|judgement|readable|documented)\b/i],
29
+ ["complexity", /\b(complexity|cyclomatic|nesting depth|deeply nested)\b/i],
30
+ ["consistency", /\b(consistent|consistency|contradict|mutually exclusive)/i],
31
+ ["cross-component", /\b(cross-component|between (two |the )?(components|services|processes)|across (the|a|its) [a-z-]* ?boundary|two or more components|end-to-end)\b/i],
32
+ ["degradation", /\b(degrad|graceful(ly)?\s+(fail|fall)|fall back)/i],
33
+ ["deserializer", /\b(deserializ|unmarshal|decoder|from_json|from_yaml)/i],
34
+ ["distributed", /\b(distributed|cluster|replica|consensus|quorum|multi-node|across nodes)\b/i],
35
+ ["fault-tolerance", /\b(fault[- ]toleran|tolerates? (a |an )?fail|survives? [a-z ]*fail|crash recovery)/i],
36
+ ["feature-flags", /\b(feature flag|feature toggle|cargo feature|--features?\b|opt-in flag)\b/i],
37
+ ["injection-risk", /\b(injection|\bXSS\b|\bSQL\b|shell escape|escap(e|ing) [a-z]* ?input)\b/i],
38
+ ["io-boundary", /\b(filesystem|file system|socket|database|to disk|from disk|over the network|subprocess|stdin|stdout)\b/i],
39
+ ["licence", /\b(licence|license|SPDX|copyleft|allow-?list of licen)/i],
40
+ ["maintainability", /\b(maintainab|technical debt|code smell|dead code|duplicat(e|ion) of)/i],
41
+ ["memory-safety", /\b(memory safety|use[- ]after[- ]free|buffer overflow|double free|dangling pointer|\bunsafe\b)/i],
42
+ ["network-exposed", /\b(endpoint|publicly (reachable|exposed|accessible)|listens? on|inbound request|remote client|HTTP request)\b/i],
43
+ ["non-deterministic-subject", /\b(non-?deterministic|stochastic|temperature|sampled output|model output|\bLLM\b)\b/i],
44
+ ["precondition-bearing", /\b(precondition|postcondition|requires that|provided that|assumes that|only when)\b/i],
45
+ ["protocol", /\b(protocol|handshake|wire format|message (format|sequence|order))\b/i],
46
+ ["published-interface", /\b(published interface|public (api|surface)|exported (api|surface)|semver|breaking change|backward[- ]compatib)/i],
47
+ ["requirement-set", /\b(set of requirements|across (all )?requirements|no two requirements|every requirement)\b/i],
48
+ ["safety", /\b(hazard|harm to|injur|fail-safe|mitigat(e|ion) of risk)/i],
49
+ ["serialization", /\b(serializ|round-?trip|encode[sd]? (to|as)|to_json)/i],
50
+ ["single-component", /\b(single (function|component|module|unit)|in isolation|pure function)\b/i],
51
+ ["stakeholder-acceptance", /\b(sign-?off|accepted by|acceptance by|demonstrat(e|ed|ion) to)\b/i],
52
+ ["stakeholder-facing", /\b(stakeholder|end user|customer|operator-facing)\b/i],
53
+ ["state-machine", /\b(state machine|state transition|transitions? (from|to|into)|finite state)\b/i],
54
+ ["structured-input", /\b(grammar|structured input|well-formed|schema-valid|malformed (document|input|payload))\b/i],
55
+ ["supply-chain", /\b(supply chain|\bSBOM\b|vendored|transitive dependenc|provenance)\b/i],
56
+ ["undefined-behaviour", /\b(undefined behaviou?r|\bUB\b|data race|uninitializ|out[- ]of[- ]bounds)/i],
57
+ ["universally-quantified", /\b(for (every|all) [a-z]|every input|any input|universally|holds for)\b/i],
58
+ ["workflow", /\b(workflow|user journey|step \d|then the (user|operator))\b/i],
59
+ ["magic-value-comparison", /\b(checksum|CRC(-?\d+)?|magic (number|byte|value)|HMAC|digest match|version header|(digital |cryptographic )signature)\b/i],
60
+ ["secret-dependent-branch", /\b(constant[- ]time|secret[- ]dependent|timing (side[- ]channel|attack)|branch on (a )?secret)\b/i],
61
+ ["reference-equivalence", /\b(reference implementation|previous implementation|behaviou?rally identical|semantically equivalent|equivalent to the (old|existing|legacy))\b/i]
28
62
  ];
29
- function d(e) {
30
- let t = u.filter(([, t]) => t.test(e)).map(([e]) => e);
31
- return c(e) !== null && t.push("configuration-matrix"), [...new Set(t)].sort();
63
+ function m(e) {
64
+ return e.replace(/\]\([^)]*\)/g, "]");
65
+ }
66
+ function h(e, t, n) {
67
+ let r = m(e), i = p.filter(([, e]) => e.test(r)).map(([e]) => e);
68
+ return c(e) !== null && i.push("configuration-matrix"), t && /^(p0|high|critical)$/i.test(t.trim()) && i.push("high-criticality"), n?.bound && (n.faultDetectionScores.length === 0 ? i.push("fault-detection-unmeasured") : Math.min(...n.faultDetectionScores) < 1 && i.push("fault-detection-failed")), [...new Set(i)].sort();
32
69
  }
33
- function f(e, t) {
34
- let n = new Set(d(t.statement)), r = new Set(t.propertyShape ? [t.propertyShape] : []), i = new Set(t.objectTypes ?? []), a = new Set(t.archetype ? [t.archetype] : []), o = [];
70
+ function g(e, t) {
71
+ let n = new Set(h(t.statement, t.criticality, t.evidence)), r = new Set(t.propertyShape ? [t.propertyShape] : []), i = new Set(t.objectTypes ?? []), a = new Set(t.archetype ? [t.archetype] : []), o = [];
35
72
  for (let t of e.methods) {
36
- let e = p(t, {
73
+ let e = _(t, {
37
74
  characteristics: n,
38
75
  property_shapes: r,
39
76
  object_types: i,
@@ -46,8 +83,8 @@ function f(e, t) {
46
83
  reasons: e
47
84
  });
48
85
  }
49
- o.sort((e, t) => t.reasons.length - e.reasons.length || h(e.method, t.method));
50
- let s = m(t.authoredMethod), c = o.length === 0, l = !c && s != null && !o.some((e) => e.method.toLowerCase() === s.toLowerCase() || e.class.toLowerCase() === s.toLowerCase());
86
+ o.sort((e, t) => t.reasons.length - e.reasons.length || y(e.method, t.method));
87
+ let s = v(t.authoredMethod), c = o.length === 0, l = !c && s != null && !o.some((e) => e.method.toLowerCase() === s.toLowerCase() || e.class.toLowerCase() === s.toLowerCase());
51
88
  return {
52
89
  obligation: t.id,
53
90
  recommended: o,
@@ -56,7 +93,7 @@ function f(e, t) {
56
93
  inconclusive: c
57
94
  };
58
95
  }
59
- function p(e, t) {
96
+ function _(e, t) {
60
97
  let n = [];
61
98
  for (let [r, i] of Object.entries(e.applicability)) {
62
99
  let e = t[r];
@@ -65,19 +102,19 @@ function p(e, t) {
65
102
  value: t
66
103
  });
67
104
  }
68
- return n.sort((e, t) => h(e.rule, t.rule) || h(e.value, t.value));
105
+ return n.sort((e, t) => y(e.rule, t.rule) || y(e.value, t.value));
69
106
  }
70
- function m(e) {
107
+ function v(e) {
71
108
  if (!e) return null;
72
109
  let t = (e.includes("(") ? e.slice(0, e.indexOf("(")) : e).trim();
73
110
  return t.length > 0 ? t : null;
74
111
  }
75
- function h(e, t) {
112
+ function y(e, t) {
76
113
  return e === t ? 0 : e < t ? -1 : 1;
77
114
  }
78
115
  //#endregion
79
116
  //#region src/commands/advise.ts
80
- var g = class e extends o {
117
+ var b = class e extends o {
81
118
  static summary = "Recommend a verification method for each obligation, from the catalog.";
82
119
  static description = "The deterministic half of the test-plan advisor (FR-031). Rules match or they do\nnot; where they are inconclusive it says so and stops, rather than guessing.\n\nBefore this, the method table was skill-local prose and `Verification` columns\ndefaulted to Test by habit — nothing ever advised DAST for an attack surface,\nmonitors for a temporal property, or fault injection for a reliability NFR.\n\nObligations come from quire (coverage --json), and each criterion's FR-052\nproperty shape from quire (properties --json), so the advice is over what the\nspec actually states rather than over a document somebody pasted in.\n\nRead the output as a recommendation, never a verdict. An LLM may judge the\nresidue afterwards — labelled as judgement (the FR-042 / ADR-0010 discipline).";
83
120
  static examples = [
@@ -86,14 +123,14 @@ var g = class e extends o {
86
123
  "quoin advise --json"
87
124
  ];
88
125
  static flags = {
89
- repo: l.string({
126
+ repo: f.string({
90
127
  description: "Repository root.",
91
128
  default: "."
92
129
  }),
93
- module: l.string({ description: "Module directory supplying the traceability model." }),
94
- "mismatch-only": l.boolean({ description: "Only obligations whose authored method is not among the recommendations." }),
95
- "inconclusive-only": l.boolean({ description: "Only obligations no rule matched." }),
96
- json: l.boolean({ description: "Emit the advice as JSON." })
130
+ module: f.string({ description: "Module directory supplying the traceability model." }),
131
+ "mismatch-only": f.boolean({ description: "Only obligations whose authored method is not among the recommendations." }),
132
+ "inconclusive-only": f.boolean({ description: "Only obligations no rule matched." }),
133
+ json: f.boolean({ description: "Emit the advice as JSON." })
97
134
  };
98
135
  async run() {
99
136
  let { flags: i } = await this.parse(e), o = r(a());
@@ -111,14 +148,14 @@ var g = class e extends o {
111
148
  let l = s(i.module ? [i.module] : void 0);
112
149
  l.methods.length === 0 && this.error("no active module declares a `verification_catalog`, so there is nothing to advise from. Install one (e.g. spec-artifacts-process) or pass --module.", { exit: 2 });
113
150
  for (let e of l.unreadable) this.warn(`skipped ${e.moduleRoot}: ${e.reason}`);
114
- let u = _(i.repo), d = c.value.obligations ?? [];
115
- d.length > 0 && u.size === 0 && this.warn("no property shapes were read, so recommendations rest on statement text alone. `quire properties` resolves archetypes from the whole installed module set; check that the modules declaring FR/NFR/StR are installed (quoin module list).");
116
- let p = d.map((e) => f(l, v(e, u.get(e.id))));
117
- if (i["mismatch-only"] && (p = p.filter((e) => e.mismatch)), i["inconclusive-only"] && (p = p.filter((e) => e.inconclusive)), i.json) {
118
- this.log(JSON.stringify({ advice: p }, null, 2));
151
+ let f = x(i.repo), p = c.value.obligations ?? [];
152
+ p.length > 0 && f.size === 0 && this.warn("no property shapes were read, so recommendations rest on statement text alone. `quire properties` resolves archetypes from the whole installed module set; check that the modules declaring FR/NFR/StR are installed (quoin module list).");
153
+ let m = d(i.repo).bindings, h = u(i.repo), _ = p.map((e) => g(l, C(e, f.get(e.id), S(e.id, m, h, l))));
154
+ if (i["mismatch-only"] && (_ = _.filter((e) => e.mismatch)), i["inconclusive-only"] && (_ = _.filter((e) => e.inconclusive)), i.json) {
155
+ this.log(JSON.stringify({ advice: _ }, null, 2));
119
156
  return;
120
157
  }
121
- this.render(p, d.length);
158
+ this.render(_, p.length);
122
159
  }
123
160
  render(e, t) {
124
161
  for (let t of e) {
@@ -130,7 +167,7 @@ var g = class e extends o {
130
167
  this.log(`${e.length} of ${t} obligation(s) shown — ${n} mismatch, ${r} inconclusive. Recommendations, not verdicts: confirm the method in spec review.`);
131
168
  }
132
169
  };
133
- function _(t) {
170
+ function x(t) {
134
171
  let n = [
135
172
  "properties",
136
173
  "spec/**/*.md",
@@ -147,18 +184,27 @@ function _(t) {
147
184
  });
148
185
  return r;
149
186
  }
150
- function v(e, t) {
187
+ function S(e, t, n, r) {
188
+ let i = t.filter((t) => t.obligation === e);
189
+ return {
190
+ bound: i.length > 0,
191
+ faultDetectionScores: l(i, n, r)
192
+ };
193
+ }
194
+ function C(e, t, n) {
151
195
  return {
152
196
  id: e.id,
153
197
  statement: e.statement,
154
198
  authoredMethod: e.method ?? null,
155
199
  propertyShape: t?.property ?? null,
156
- archetype: t?.archetype ?? y(e.id)
200
+ archetype: t?.archetype ?? w(e.id),
201
+ criticality: e.criticality ?? null,
202
+ evidence: n
157
203
  };
158
204
  }
159
- function y(e) {
205
+ function w(e) {
160
206
  let t = e.split("-")[0];
161
207
  return t.length > 0 ? t : null;
162
208
  }
163
209
  //#endregion
164
- export { g as default };
210
+ export { b as default };
@@ -1,9 +1,9 @@
1
- import { i as e, n as t, o as n, t as r } from "../quire-Dis3ky5t.js";
2
- import { t as i } from "../base-BE20w0jY.js";
3
- import { t as a } from "../advisor-a9axb4Jl.js";
4
- import { n as o } from "../completeness-BeqcskAI.js";
5
- import { d as s, f as c, m as l, u } from "../evidence-FRF9RN77.js";
6
- import { t as d } from "../auditor-W2jFinr6.js";
1
+ import { i as e, n as t, o as n, t as r } from "../quire-VZjWaHph.js";
2
+ import { t as i } from "../base-DQg6yfbN.js";
3
+ import { t as a } from "../advisor-C4P3aTJT.js";
4
+ import { t as o } from "../auditor-B6Hs00oH.js";
5
+ import { f as s, g as c, m as l, u } from "../evidence-DopNnj0E.js";
6
+ import { n as d } from "../completeness-B1qG_rZo.js";
7
7
  import { Flags as f } from "@oclif/core";
8
8
  //#region src/assurance/graph.ts
9
9
  var p = /* @__PURE__ */ new Set([
@@ -142,8 +142,8 @@ var E = class s extends i {
142
142
  json: f.boolean({ description: "Emit the case as JSON." })
143
143
  };
144
144
  async run() {
145
- let { flags: i } = await this.parse(s), c = n(r());
146
- c && this.error(c.message, { exit: 2 });
145
+ let { flags: i } = await this.parse(s), l = n(r());
146
+ l && this.error(l.message, { exit: 2 });
147
147
  let u = [
148
148
  "coverage",
149
149
  "--scope",
@@ -153,13 +153,13 @@ var E = class s extends i {
153
153
  i.module && u.push("--module", i.module);
154
154
  let f = e(t(u));
155
155
  f.ok || this.error(f.error.message, { exit: 2 });
156
- let p = f.value.obligations ?? [], h = d({
156
+ let p = f.value.obligations ?? [], h = o({
157
157
  obligations: p,
158
- bindings: l(i.repo).bindings,
158
+ bindings: c(i.repo).bindings,
159
159
  runs: O(i.repo),
160
160
  scans: D(i.repo),
161
161
  catalog: a(i.module ? [i.module] : void 0)
162
- }), g = o(`${i.repo}/spec`), _ = m({
162
+ }), g = d(`${i.repo}/spec`), _ = m({
163
163
  documents: g.documents,
164
164
  obligations: p,
165
165
  findings: h.findings,
@@ -170,10 +170,10 @@ var E = class s extends i {
170
170
  }
171
171
  };
172
172
  function D(e) {
173
- return c(e).map((t) => s(e, t)).filter((e) => e !== null);
173
+ return l(e).map((t) => s(e, t)).filter((e) => e !== null);
174
174
  }
175
175
  function O(e) {
176
- return c(e).map((t) => u(e, t)).filter((e) => e !== null);
176
+ return l(e).map((t) => u(e, t)).filter((e) => e !== null);
177
177
  }
178
178
  //#endregion
179
179
  export { E as default };
@@ -1,5 +1,5 @@
1
- import { o as e, t } from "../../base-BE20w0jY.js";
2
- import { n } from "../../modules-_FQTZ3gx.js";
1
+ import { o as e, t } from "../../base-DQg6yfbN.js";
2
+ import { n } from "../../modules-CvBmrY7T.js";
3
3
  import { Flags as r } from "@oclif/core";
4
4
  //#region src/commands/catalog/list.ts
5
5
  var i = class i extends t {
@@ -1,6 +1,6 @@
1
- import { t as e } from "../../base-BE20w0jY.js";
2
- import { n as t } from "../../modules-_FQTZ3gx.js";
3
- import { n, t as r } from "../../advisor-a9axb4Jl.js";
1
+ import { t as e } from "../../base-DQg6yfbN.js";
2
+ import { n as t } from "../../modules-CvBmrY7T.js";
3
+ import { n, t as r } from "../../advisor-C4P3aTJT.js";
4
4
  import { Flags as i } from "@oclif/core";
5
5
  //#region src/commands/catalog/methods.ts
6
6
  var a = class a extends e {
@@ -1,5 +1,5 @@
1
- import { i as e, o as t, t as n } from "../../base-BE20w0jY.js";
2
- import { n as r } from "../../modules-_FQTZ3gx.js";
1
+ import { i as e, o as t, t as n } from "../../base-DQg6yfbN.js";
2
+ import { n as r } from "../../modules-CvBmrY7T.js";
3
3
  import { Args as i, Flags as a } from "@oclif/core";
4
4
  //#region src/commands/catalog/show.ts
5
5
  var o = class o extends n {
@@ -1,5 +1,5 @@
1
- import { o as e, t } from "../../base-BE20w0jY.js";
2
- import { n } from "../../modules-_FQTZ3gx.js";
1
+ import { o as e, t } from "../../base-DQg6yfbN.js";
2
+ import { n } from "../../modules-CvBmrY7T.js";
3
3
  import { Flags as r } from "@oclif/core";
4
4
  //#region src/commands/catalog/validate.ts
5
5
  var i = class i extends t {
@@ -1,5 +1,5 @@
1
- import { t as e } from "../base-BE20w0jY.js";
2
- import { t } from "../completeness-BeqcskAI.js";
1
+ import { t as e } from "../base-DQg6yfbN.js";
2
+ import { t } from "../completeness-B1qG_rZo.js";
3
3
  import { Flags as n } from "@oclif/core";
4
4
  //#region src/commands/completeness.ts
5
5
  var r = class r extends e {
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../base-BE20w0jY.js";
1
+ import { t as e } from "../../base-DQg6yfbN.js";
2
2
  import { a as t } from "../../config-schema-Dp-vlxuR.js";
3
3
  import { runConfigDoctor as n } from "@agent-ix/ix-cli-core";
4
4
  //#region src/commands/config/doctor.ts
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../base-BE20w0jY.js";
1
+ import { t as e } from "../../base-DQg6yfbN.js";
2
2
  import { a as t, n } from "../../config-schema-Dp-vlxuR.js";
3
3
  import { runConfigEdit as r } from "@agent-ix/ix-cli-core";
4
4
  //#region src/commands/config/edit.ts
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../base-BE20w0jY.js";
1
+ import { t as e } from "../../base-DQg6yfbN.js";
2
2
  import { a as t, n } from "../../config-schema-Dp-vlxuR.js";
3
3
  import { runConfigGet as r } from "@agent-ix/ix-cli-core";
4
4
  import { Args as i } from "@oclif/core";
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../base-BE20w0jY.js";
1
+ import { t as e } from "../../base-DQg6yfbN.js";
2
2
  import { a as t, n } from "../../config-schema-Dp-vlxuR.js";
3
3
  import { runConfigSet as r } from "@agent-ix/ix-cli-core";
4
4
  import { Args as i } from "@oclif/core";
@@ -1,6 +1,6 @@
1
- import { i as e, n as t, o as n, t as r } from "../../quire-Dis3ky5t.js";
2
- import { t as i } from "../../base-BE20w0jY.js";
3
- import { _ as a, m as o, o as s } from "../../evidence-FRF9RN77.js";
1
+ import { i as e, n as t, o as n, t as r } from "../../quire-VZjWaHph.js";
2
+ import { t as i } from "../../base-DQg6yfbN.js";
3
+ import { g as a, o, y as s } from "../../evidence-DopNnj0E.js";
4
4
  import { Flags as c } from "@oclif/core";
5
5
  import { execFileSync as l } from "node:child_process";
6
6
  //#region src/commands/evidence/affirm.ts
@@ -45,8 +45,8 @@ var u = class u extends i {
45
45
  i.repo,
46
46
  "rev-parse",
47
47
  "HEAD"
48
- ], { encoding: "utf8" }).trim(), h = o(i.repo).bindings, { bindings: g, found: _ } = s(h, i.obligation, p.statement_hash, i.who, m, i.note);
49
- _ || this.error(`no binding exists for \`${i.obligation}\`, so there is nothing to affirm. A binding is created when a suite first discharges the obligation (\`quoin evidence record\`).`, { exit: 2 }), a(i.repo, {
48
+ ], { encoding: "utf8" }).trim(), h = a(i.repo).bindings, { bindings: g, found: _ } = o(h, i.obligation, p.statement_hash, i.who, m, i.note);
49
+ _ || this.error(`no binding exists for \`${i.obligation}\`, so there is nothing to affirm. A binding is created when a suite first discharges the obligation (\`quoin evidence record\`).`, { exit: 2 }), s(i.repo, {
50
50
  schemaVersion: 1,
51
51
  bindings: g
52
52
  });
@@ -1 +1 @@
1
- {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/commands/evidence/audit.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAkB7C,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,YAAY;IACrD,MAAM,CAAC,OAAO,SACmD;IACjE,MAAM,CAAC,WAAW,SAiBuC;IAEzD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MA0BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoE3B;AAyCD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,EAC7B,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,KAAK,GAC/B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAuBpC"}
1
+ {"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../../src/commands/evidence/audit.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAgB7C,MAAM,CAAC,OAAO,OAAO,aAAc,SAAQ,YAAY;IACrD,MAAM,CAAC,OAAO,SACmD;IACjE,MAAM,CAAC,WAAW,SAiBuC;IAEzD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MA0BV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoE3B;AAsBD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAChC,OAAO,EAAE,MAAM,EAAE,GAAG,SAAS,EAC7B,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,KAAK,GAC/B,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,SAAS,CAuBpC"}
@@ -1,12 +1,12 @@
1
- import { i as e, n as t, o as n, t as r } from "../../quire-Dis3ky5t.js";
2
- import { t as i } from "../../base-BE20w0jY.js";
3
- import { t as a } from "../../advisor-a9axb4Jl.js";
4
- import { d as o, f as s, m as c, p as l, u } from "../../evidence-FRF9RN77.js";
5
- import { r as d, t as f } from "../../auditor-W2jFinr6.js";
6
- import { Flags as p } from "@oclif/core";
7
- import { execFileSync as m } from "node:child_process";
1
+ import { i as e, n as t, o as n, t as r } from "../../quire-VZjWaHph.js";
2
+ import { t as i } from "../../base-DQg6yfbN.js";
3
+ import { t as a } from "../../advisor-C4P3aTJT.js";
4
+ import { r as o, t as s } from "../../auditor-B6Hs00oH.js";
5
+ import { d as c, g as l, h as u, p as d } from "../../evidence-DopNnj0E.js";
6
+ import { Flags as f } from "@oclif/core";
7
+ import { execFileSync as p } from "node:child_process";
8
8
  //#region src/commands/evidence/audit.ts
9
- var h = class o extends i {
9
+ var m = class p extends i {
10
10
  static summary = "Audit the evidence store: suspect links, staleness, vacuity.";
11
11
  static description = "Reads the store and reports. RUNS NOTHING (ADR-0011 invariant 1) — the\nconsumer's CI refreshes evidence, and an auditor that could re-run a suite could\nalso make a finding disappear by re-running it.\n\nChecks:\n suspect-link the statement changed after the evidence was bound\n stale-evidence bound to a missing run, or to a run behind HEAD\n vacuous-evidence every bound symbol was skipped or absent from the run\n undischarged no evidence is bound at all\n method-conformance evidence of a kind the declared method does not produce\n unknown-method the declared method is in no catalog\n insufficient-multiplicity criticality demands two independent suites\n insufficient-mutation-score criticality demands a mutation score it misses\n unmeasured-mutation-score a demanded mutation score, with none recorded\n\n--ratchet compares against spec/evidence/baseline.json and fails only on NEW\nviolations. A gate that fails on the whole existing backlog gets disabled within\na week. Write that baseline with: quoin evidence baseline";
12
12
  static examples = [
@@ -15,67 +15,61 @@ var h = class o extends i {
15
15
  "quoin evidence audit --json"
16
16
  ];
17
17
  static flags = {
18
- repo: p.string({
18
+ repo: f.string({
19
19
  description: "Repository root.",
20
20
  default: "."
21
21
  }),
22
- module: p.string({ description: "Module directory supplying the traceability model." }),
23
- ratchet: p.boolean({ description: "Report only violations absent from the baseline." }),
24
- strict: p.boolean({ description: "Exit 1 when any reported finding remains." }),
25
- json: p.boolean({ description: "Emit the report as JSON." }),
26
- "multiplicity-requires": p.string({
22
+ module: f.string({ description: "Module directory supplying the traceability model." }),
23
+ ratchet: f.boolean({ description: "Report only violations absent from the baseline." }),
24
+ strict: f.boolean({ description: "Exit 1 when any reported finding remains." }),
25
+ json: f.boolean({ description: "Emit the report as JSON." }),
26
+ "multiplicity-requires": f.string({
27
27
  description: "Criticality values demanding two independent suites. Repeatable. Unset by default: no obligation source in the ecosystem declares a criticality column, so a built-in default could never fire.",
28
28
  multiple: !0
29
29
  }),
30
- "mutation-floor": p.string({
30
+ "mutation-floor": f.string({
31
31
  description: "Minimum mutation score per criticality, as <criticality>=<0..1>. Repeatable. Unset by default, for the same reason as --multiplicity-requires: a built-in floor is a rule nobody chose.",
32
32
  multiple: !0
33
33
  })
34
34
  };
35
35
  async run() {
36
- let { flags: i } = await this.parse(o), s = n(r());
37
- s && this.error(s.message, { exit: 2 });
38
- let u = [
36
+ let { flags: i } = await this.parse(p), f = n(r());
37
+ f && this.error(f.message, { exit: 2 });
38
+ let m = [
39
39
  "coverage",
40
40
  "--scope",
41
41
  i.repo,
42
42
  "--json"
43
43
  ];
44
- i.module && u.push("--module", i.module);
45
- let p = e(t(u));
46
- p.ok || this.error(p.error.message, { exit: 2 });
47
- let m = f({
48
- obligations: p.value.obligations ?? [],
49
- bindings: c(i.repo).bindings,
50
- runs: _(i.repo),
51
- scans: g(i.repo),
44
+ i.module && m.push("--module", i.module);
45
+ let _ = e(t(m));
46
+ _.ok || this.error(_.error.message, { exit: 2 });
47
+ let v = s({
48
+ obligations: _.value.obligations ?? [],
49
+ bindings: l(i.repo).bindings,
50
+ runs: c(i.repo),
51
+ scans: d(i.repo),
52
52
  catalog: a(i.module ? [i.module] : void 0),
53
- headCommit: v(i.repo),
53
+ headCommit: h(i.repo),
54
54
  multiplicityRequires: i["multiplicity-requires"],
55
- mutationFloor: y(i["mutation-floor"], (e) => this.error(e, { exit: 2 }))
56
- }), h = i.ratchet ? l(i.repo) : null, b = h ? d(m, h) : m.findings;
55
+ mutationFloor: g(i["mutation-floor"], (e) => this.error(e, { exit: 2 }))
56
+ }), y = i.ratchet ? u(i.repo) : null, b = y ? o(v, y) : v.findings;
57
57
  if (i.json) this.log(JSON.stringify({
58
58
  findings: b,
59
- healthy: m.healthy,
59
+ healthy: v.healthy,
60
60
  ratchet: i.ratchet
61
61
  }, null, 2));
62
- else if (b.length === 0) this.log(`${m.healthy.length} obligation(s) with healthy evidence; nothing to report`);
62
+ else if (b.length === 0) this.log(`${v.healthy.length} obligation(s) with healthy evidence; nothing to report`);
63
63
  else {
64
64
  for (let e of b) this.log(`[${e.severity}] ${e.kind}: ${e.summary}`);
65
- this.log(""), this.log(`${b.length} finding(s), ${m.healthy.length} healthy` + (i.ratchet ? " (new violations only)" : ""));
65
+ this.log(""), this.log(`${b.length} finding(s), ${v.healthy.length} healthy` + (i.ratchet ? " (new violations only)" : ""));
66
66
  }
67
67
  i.strict && b.length > 0 && this.exit(1);
68
68
  }
69
69
  };
70
- function g(e) {
71
- return s(e).map((t) => o(e, t)).filter((e) => e !== null);
72
- }
73
- function _(e) {
74
- return s(e).map((t) => u(e, t)).filter((e) => e !== null);
75
- }
76
- function v(e) {
70
+ function h(e) {
77
71
  try {
78
- return m("git", [
72
+ return p("git", [
79
73
  "-C",
80
74
  e,
81
75
  "rev-parse",
@@ -85,7 +79,7 @@ function v(e) {
85
79
  return;
86
80
  }
87
81
  }
88
- function y(e, t) {
82
+ function g(e, t) {
89
83
  if (!e || e.length === 0) return;
90
84
  let n = {};
91
85
  for (let r of e) {
@@ -95,4 +89,4 @@ function y(e, t) {
95
89
  return n;
96
90
  }
97
91
  //#endregion
98
- export { h as default, y as parseMutationFloor };
92
+ export { m as default, g as parseMutationFloor };
@@ -1,12 +1,12 @@
1
- import { i as e, n as t, o as n, t as r } from "../../quire-Dis3ky5t.js";
2
- import { t as i } from "../../base-BE20w0jY.js";
3
- import { t as a } from "../../advisor-a9axb4Jl.js";
4
- import { f as o, g as s, m as c, s as l, u } from "../../evidence-FRF9RN77.js";
5
- import { n as d, t as f } from "../../auditor-W2jFinr6.js";
1
+ import { i as e, n as t, o as n, t as r } from "../../quire-VZjWaHph.js";
2
+ import { t as i } from "../../base-DQg6yfbN.js";
3
+ import { t as a } from "../../advisor-C4P3aTJT.js";
4
+ import { n as o, t as s } from "../../auditor-B6Hs00oH.js";
5
+ import { g as c, m as l, s as u, u as d, v as f } from "../../evidence-DopNnj0E.js";
6
6
  import { Flags as p } from "@oclif/core";
7
7
  import { execFileSync as m } from "node:child_process";
8
8
  //#region src/commands/evidence/baseline.ts
9
- var h = class o extends i {
9
+ var h = class l extends i {
10
10
  static summary = "Accept the current findings as the ratchet baseline.";
11
11
  static description = "Writes spec/evidence/baseline.json: every finding the audit reports right now,\nas <kind>:<obligation>, plus the commit it was accepted at.\n\n`--ratchet` reads this file and fails only on findings NOT in it. Without it,\na first run of the gate reports the entire existing backlog and gets switched\noff within a week — so accepting a baseline is the deliberate act that makes\nthe ratchet usable, and its diff is the record of what was accepted and by whom.\n\nRe-run this at a release to move the ratchet forward. Never run it to make a\nnew failure go away: the diff is reviewed, and a baseline that grows between\nreleases is the gate quietly being disabled one entry at a time.";
12
12
  static examples = ["quoin evidence baseline", "quoin evidence baseline --dry-run"];
@@ -20,8 +20,8 @@ var h = class o extends i {
20
20
  json: p.boolean({ description: "Emit the outcome as JSON." })
21
21
  };
22
22
  async run() {
23
- let { flags: i } = await this.parse(o), u = n(r());
24
- u && this.error(u.message, { exit: 2 });
23
+ let { flags: i } = await this.parse(l), d = n(r());
24
+ d && this.error(d.message, { exit: 2 });
25
25
  let p = [
26
26
  "coverage",
27
27
  "--scope",
@@ -31,14 +31,14 @@ var h = class o extends i {
31
31
  i.module && p.push("--module", i.module);
32
32
  let m = e(t(p));
33
33
  m.ok || this.error(m.error.message, { exit: 2 });
34
- let h = f({
34
+ let h = s({
35
35
  obligations: m.value.obligations ?? [],
36
36
  bindings: c(i.repo).bindings,
37
37
  runs: g(i.repo),
38
38
  catalog: a(i.module ? [i.module] : void 0),
39
39
  headCommit: _(i.repo)
40
- }).findings.map(d).sort(), v = _(i.repo) ?? "";
41
- if (i["dry-run"] || s(i.repo, {
40
+ }).findings.map(o).sort(), v = _(i.repo) ?? "";
41
+ if (i["dry-run"] || f(i.repo, {
42
42
  schemaVersion: 1,
43
43
  commit: v,
44
44
  accepted: h
@@ -57,11 +57,11 @@ var h = class o extends i {
57
57
  }
58
58
  this.log(`${i["dry-run"] ? "would accept" : "accepted"} ${h.length} finding(s) at ${v.slice(0, 12) || "an unknown commit"}`);
59
59
  for (let [e, t] of [...y].sort()) this.log(` ${e}: ${t}`);
60
- i["dry-run"] || this.log(l(i.repo));
60
+ i["dry-run"] || this.log(u(i.repo));
61
61
  }
62
62
  };
63
63
  function g(e) {
64
- return o(e).map((t) => u(e, t)).filter((e) => e !== null);
64
+ return l(e).map((t) => d(e, t)).filter((e) => e !== null);
65
65
  }
66
66
  function _(e) {
67
67
  try {
@@ -1,5 +1,5 @@
1
- import { t as e } from "../../base-BE20w0jY.js";
2
- import { l as t } from "../../evidence-FRF9RN77.js";
1
+ import { t as e } from "../../base-DQg6yfbN.js";
2
+ import { l as t } from "../../evidence-DopNnj0E.js";
3
3
  import { Flags as n } from "@oclif/core";
4
4
  //#region src/commands/evidence/gc.ts
5
5
  var r = class r extends e {
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../base-BE20w0jY.js";
1
+ import { t as e } from "../../base-DQg6yfbN.js";
2
2
  //#region src/commands/evidence/index.ts
3
3
  var t = class t extends e {
4
4
  static summary = "The evidence store — what actually ran, and against which statement.";