@agent-ix/quoin 0.21.9 → 0.22.5

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 (116) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/default-modules.yaml +18 -2
  4. package/dist/{advisor-BiKhR9Yp.js → advisor-BkgwDKvQ.js} +1 -1
  5. package/dist/auditor/audit.d.ts +23 -18
  6. package/dist/auditor/audit.d.ts.map +1 -1
  7. package/dist/auditor/index.d.ts +2 -1
  8. package/dist/auditor/index.d.ts.map +1 -1
  9. package/dist/{auditor-ww0MC62a.js → auditor-C3bSmPD_.js} +82 -65
  10. package/dist/{base-W7vrLi5E.js → base-CqKNs2Kd.js} +1 -1
  11. package/dist/cli.js +1 -1
  12. package/dist/commands/advise.js +16 -15
  13. package/dist/commands/assurance.d.ts.map +1 -1
  14. package/dist/commands/assurance.js +84 -61
  15. package/dist/commands/catalog/list.js +2 -2
  16. package/dist/commands/catalog/methods.js +3 -3
  17. package/dist/commands/catalog/show.js +2 -2
  18. package/dist/commands/catalog/validate.js +2 -2
  19. package/dist/commands/completeness.js +2 -2
  20. package/dist/commands/config/doctor.d.ts.map +1 -1
  21. package/dist/commands/config/doctor.js +3 -3
  22. package/dist/commands/config/edit.d.ts.map +1 -1
  23. package/dist/commands/config/edit.js +3 -3
  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 +6 -5
  27. package/dist/commands/evidence/audit.d.ts.map +1 -1
  28. package/dist/commands/evidence/audit.js +57 -45
  29. package/dist/commands/evidence/baseline.d.ts.map +1 -1
  30. package/dist/commands/evidence/baseline.js +52 -42
  31. package/dist/commands/evidence/gc.js +3 -2
  32. package/dist/commands/evidence/index.js +1 -1
  33. package/dist/commands/evidence/inspect-mocks.d.ts +16 -0
  34. package/dist/commands/evidence/inspect-mocks.d.ts.map +1 -0
  35. package/dist/commands/evidence/inspect-mocks.js +49 -0
  36. package/dist/commands/evidence/record.d.ts +1 -0
  37. package/dist/commands/evidence/record.d.ts.map +1 -1
  38. package/dist/commands/evidence/record.js +42 -31
  39. package/dist/commands/matrix.js +1 -1
  40. package/dist/commands/measurement/index.d.ts +7 -0
  41. package/dist/commands/measurement/index.d.ts.map +1 -0
  42. package/dist/commands/measurement/index.js +11 -0
  43. package/dist/commands/measurement/record.d.ts +10 -0
  44. package/dist/commands/measurement/record.d.ts.map +1 -0
  45. package/dist/commands/measurement/record.js +35 -0
  46. package/dist/commands/module/ensure-defaults.js +3 -3
  47. package/dist/commands/module/install.js +2 -2
  48. package/dist/commands/module/list.js +2 -2
  49. package/dist/commands/module/remove.js +2 -2
  50. package/dist/commands/report.d.ts +15 -0
  51. package/dist/commands/report.d.ts.map +1 -0
  52. package/dist/commands/report.js +70 -0
  53. package/dist/commands/review.js +1 -1
  54. package/dist/commands/to-plan.js +1 -1
  55. package/dist/commands/update.js +2 -2
  56. package/dist/commands/validate.d.ts +13 -0
  57. package/dist/commands/validate.d.ts.map +1 -0
  58. package/dist/commands/validate.js +123 -0
  59. package/dist/commands/write.js +3 -3
  60. package/dist/{completeness-BQDxME0a.js → completeness-DamWradt.js} +1 -1
  61. package/dist/evidence/index.d.ts +3 -2
  62. package/dist/evidence/index.d.ts.map +1 -1
  63. package/dist/evidence/mock-inspection.d.ts +16 -0
  64. package/dist/evidence/mock-inspection.d.ts.map +1 -0
  65. package/dist/evidence/store.d.ts +11 -1
  66. package/dist/evidence/store.d.ts.map +1 -1
  67. package/dist/evidence/types.d.ts +31 -0
  68. package/dist/evidence/types.d.ts.map +1 -1
  69. package/dist/{evidence-BA5vyZJk.js → evidence-DD0CHzJ0.js} +246 -316
  70. package/dist/{flow-command-C_dUJNm-.js → flow-command-BfFNY0Rv.js} +1 -1
  71. package/dist/index.d.ts +1 -0
  72. package/dist/index.d.ts.map +1 -1
  73. package/dist/index.js +9 -8
  74. package/dist/measurement/compare.d.ts +4 -0
  75. package/dist/measurement/compare.d.ts.map +1 -0
  76. package/dist/measurement/index.d.ts +9 -0
  77. package/dist/measurement/index.d.ts.map +1 -0
  78. package/dist/measurement/plans.d.ts +4 -0
  79. package/dist/measurement/plans.d.ts.map +1 -0
  80. package/dist/measurement/portfolio.d.ts +48 -0
  81. package/dist/measurement/portfolio.d.ts.map +1 -0
  82. package/dist/measurement/profiles.d.ts +9 -0
  83. package/dist/measurement/profiles.d.ts.map +1 -0
  84. package/dist/measurement/report.d.ts +44 -0
  85. package/dist/measurement/report.d.ts.map +1 -0
  86. package/dist/measurement/store.d.ts +7 -0
  87. package/dist/measurement/store.d.ts.map +1 -0
  88. package/dist/measurement/types.d.ts +83 -0
  89. package/dist/measurement/types.d.ts.map +1 -0
  90. package/dist/measurement/validate.d.ts +9 -0
  91. package/dist/measurement/validate.d.ts.map +1 -0
  92. package/dist/measurement-CzB74Q07.js +595 -0
  93. package/dist/{modules-Cn9Htfp0.js → modules-ez9httBA.js} +2 -2
  94. package/dist/{plugins-Byi1bWLD.js → plugins-C-ta0llj.js} +1 -1
  95. package/dist/quire/contract.d.ts +11 -12
  96. package/dist/quire/contract.d.ts.map +1 -1
  97. package/dist/quire/exec.d.ts +10 -0
  98. package/dist/quire/exec.d.ts.map +1 -1
  99. package/dist/quire/index.d.ts +2 -2
  100. package/dist/quire/index.d.ts.map +1 -1
  101. package/dist/quire/types.d.ts +119 -1
  102. package/dist/quire/types.d.ts.map +1 -1
  103. package/dist/{quire-UzoK3Azf.js → quire-D8tCpgyA.js} +526 -499
  104. package/dist/schemas/coverage-v1.schema.json +919 -105
  105. package/dist/schemas/properties-v1.schema.json +25 -0
  106. package/dist/store--2sAv12X.js +219 -0
  107. package/dist/validators/gates.d.ts +18 -0
  108. package/dist/validators/gates.d.ts.map +1 -0
  109. package/dist/validators/index.d.ts +2 -0
  110. package/dist/validators/index.d.ts.map +1 -0
  111. package/dist/{version-BMXhyIie.js → version-Dg0e6CZU.js} +1 -1
  112. package/dist/{write-BDxILTLC.js → write-DElwS9xc.js} +1 -1
  113. package/package.json +22 -16
  114. package/skills/assurance-status-report/SKILL.md +135 -0
  115. package/skills/assurance-status-report/references/report-contract.md +110 -0
  116. package/skills/spec-architecture-evaluation/SKILL.md +30 -0
@@ -1,12 +1,14 @@
1
- import { i as e, n as t, o as n, t as r } from "../quire-UzoK3Azf.js";
2
- import { t as i } from "../base-W7vrLi5E.js";
3
- import { t as a } from "../advisor-BiKhR9Yp.js";
4
- import { t as o } from "../auditor-ww0MC62a.js";
5
- import { f as s, g as c, m as l, u } from "../evidence-BA5vyZJk.js";
6
- import { n as d } from "../completeness-BQDxME0a.js";
7
- import { Flags as f } from "@oclif/core";
1
+ import { i as e, n as t, o as n, t as r } from "../quire-D8tCpgyA.js";
2
+ import { t as i } from "../base-CqKNs2Kd.js";
3
+ import { c as a, f as o, o as s, u as c } from "../store--2sAv12X.js";
4
+ import { t as l } from "../advisor-BkgwDKvQ.js";
5
+ import { t as u } from "../auditor-C3bSmPD_.js";
6
+ import { n as d } from "../evidence-DD0CHzJ0.js";
7
+ import { n as f } from "../completeness-DamWradt.js";
8
+ import { Flags as p } from "@oclif/core";
9
+ import { execFileSync as m } from "node:child_process";
8
10
  //#region src/assurance/graph.ts
9
- var p = /* @__PURE__ */ new Set([
11
+ var h = /* @__PURE__ */ new Set([
10
12
  "traces_to",
11
13
  "refines",
12
14
  "implements",
@@ -14,26 +16,26 @@ var p = /* @__PURE__ */ new Set([
14
16
  "mitigates",
15
17
  "satisfies"
16
18
  ]);
17
- function m(e) {
19
+ function g(e) {
18
20
  let t = e.claimTypes ?? ["StR"], n = new Set(t.map((e) => e.toLowerCase())), r = /* @__PURE__ */ new Map();
19
21
  for (let t of e.documents) {
20
- let e = _(t);
22
+ let e = y(t);
21
23
  e && r.set(e, t);
22
24
  }
23
25
  let i = /* @__PURE__ */ new Map();
24
26
  for (let t of e.documents) {
25
- let e = _(t);
26
- if (e) for (let n of v(t)) r.has(n) && i.set(n, [...i.get(n) ?? [], e]);
27
+ let e = y(t);
28
+ if (e) for (let n of b(t)) r.has(n) && i.set(n, [...i.get(n) ?? [], e]);
27
29
  }
28
30
  let a = /* @__PURE__ */ new Map();
29
31
  for (let t of e.findings) a.has(t.obligation) || a.set(t.obligation, t);
30
32
  let o = /* @__PURE__ */ new Map();
31
33
  for (let t of e.obligations) {
32
- let e = y(t.id);
34
+ let e = x(t.id);
33
35
  o.set(e, [...o.get(e) ?? [], t]);
34
36
  }
35
37
  let s = [], c = /* @__PURE__ */ new Set();
36
- for (let [e, t] of r) n.has(String(t.frontmatter.type ?? "").toLowerCase()) && s.push(h(e, r, i, o, a, c, /* @__PURE__ */ new Set()));
38
+ for (let [e, t] of r) n.has(String(t.frontmatter.type ?? "").toLowerCase()) && s.push(_(e, r, i, o, a, c, /* @__PURE__ */ new Set()));
37
39
  s.sort((e, t) => e.id.localeCompare(t.id));
38
40
  let l = {
39
41
  claims: s,
@@ -42,9 +44,9 @@ function m(e) {
42
44
  };
43
45
  return s.length === 0 && (l.reason = `no document declares itself a top-level claim (searched claim types: ${t.join(", ")}); declare one or pass --claim-type`), l;
44
46
  }
45
- function h(e, t, n, r, i, a, o) {
47
+ function _(e, t, n, r, i, a, o) {
46
48
  a.add(e), o.add(e);
47
- let s = t.get(e), c = String(s?.frontmatter.title ?? e), l = (n.get(e) ?? []).filter((e) => !o.has(e)).sort().map((e) => h(e, t, n, r, i, a, new Set(o))), u = (r.get(e) ?? []).slice().sort((e, t) => e.id.localeCompare(t.id)).map((e) => g(e, i)), d = [...l, ...u], f = {
49
+ let s = t.get(e), c = String(s?.frontmatter.title ?? e), l = (n.get(e) ?? []).filter((e) => !o.has(e)).sort().map((e) => _(e, t, n, r, i, a, new Set(o))), u = (r.get(e) ?? []).slice().sort((e, t) => e.id.localeCompare(t.id)).map((e) => v(e, i)), d = [...l, ...u], f = {
48
50
  id: e,
49
51
  kind: "goal",
50
52
  statement: c,
@@ -53,7 +55,7 @@ function h(e, t, n, r, i, a, o) {
53
55
  };
54
56
  return d.length === 0 && (f.because = "no sub-claim and no obligation traces to this claim"), f;
55
57
  }
56
- function g(e, t) {
58
+ function v(e, t) {
57
59
  let n = t.get(e.id);
58
60
  return {
59
61
  id: e.id,
@@ -64,66 +66,66 @@ function g(e, t) {
64
66
  children: []
65
67
  };
66
68
  }
67
- function _(e) {
69
+ function y(e) {
68
70
  let t = e.frontmatter.id;
69
71
  return typeof t == "string" && t.length > 0 ? t : null;
70
72
  }
71
- function v(e) {
73
+ function b(e) {
72
74
  let t = e.frontmatter.relationships;
73
75
  if (!Array.isArray(t)) return [];
74
76
  let n = [];
75
77
  for (let e of t) {
76
- if (!e || typeof e != "object" || !p.has(String(e.type ?? ""))) continue;
78
+ if (!e || typeof e != "object" || !h.has(String(e.type ?? ""))) continue;
77
79
  let t = String(e.target ?? "").split("/").pop();
78
80
  t && n.push(t);
79
81
  }
80
82
  return n;
81
83
  }
82
- function y(e) {
84
+ function x(e) {
83
85
  let t = /^([A-Za-z]+-\d+)/.exec(e);
84
86
  return t ? t[1] : e;
85
87
  }
86
88
  //#endregion
87
89
  //#region src/assurance/render.ts
88
- var b = {
90
+ var S = {
89
91
  supported: "✅",
90
92
  open: "◇"
91
93
  };
92
- function x(e) {
94
+ function C(e) {
93
95
  let t = ["# Assurance case", ""];
94
96
  e.claims.length === 0 && t.push("No document declares itself a top-level claim, so there is no case to", "argue. Declare an `StR` (or pass `--claim-type`) and re-run.", "");
95
97
  let n = e.claims.filter((e) => e.status === "open").length;
96
98
  e.claims.length > 0 && t.push(`${e.claims.length} claim(s), ${n} with an open branch.`, "");
97
- for (let n of e.claims) t.push(`## ${b[n.status]} ${n.id} — ${n.statement}`, ""), t.push(...S(n, 0)), t.push(""), t.push("```mermaid", ...C(n), "```", "");
99
+ for (let n of e.claims) t.push(`## ${S[n.status]} ${n.id} — ${n.statement}`, ""), t.push(...w(n, 0)), t.push(""), t.push("```mermaid", ...T(n), "```", "");
98
100
  return e.unreachable.length > 0 && t.push("## Reachable from no claim", "", "These carry obligations and no claim argues over them. A case rendered", "only over the reachable half would read as complete.", "", ...e.unreachable.map((e) => `- ${e}`), ""), e.unreadable.length > 0 && t.push("## Unreadable", "", ...e.unreadable.map((e) => `- ${e.path}: ${e.reason}`), ""), t.join("\n");
99
101
  }
100
- function S(e, t) {
101
- let n = " ".repeat(t), r = e.kind === "solution" ? `${n}- ${b[e.status]} **${e.id}** — ${e.statement}` : `${n}- ${b[e.status]} ${e.id} — ${e.statement}`, i = t === 0 ? [] : [r];
102
+ function w(e, t) {
103
+ let n = " ".repeat(t), r = e.kind === "solution" ? `${n}- ${S[e.status]} **${e.id}** — ${e.statement}` : `${n}- ${S[e.status]} ${e.id} — ${e.statement}`, i = t === 0 ? [] : [r];
102
104
  e.because && i.push(`${n} - ↳ ${e.because}`);
103
- for (let n of e.children) i.push(...S(n, t + 1));
105
+ for (let n of e.children) i.push(...w(n, t + 1));
104
106
  return i;
105
107
  }
106
- function C(e) {
108
+ function T(e) {
107
109
  let t = ["flowchart TD"], n = /* @__PURE__ */ new Set(), r = (e) => {
108
- let i = w(e.id);
110
+ let i = E(e.id);
109
111
  if (!n.has(i)) {
110
112
  n.add(i);
111
113
  let r = e.kind === "solution" ? ["([", "])"] : ["[", "]"];
112
- t.push(` ${i}${r[0]}"${T(e)}"${r[1]}`);
114
+ t.push(` ${i}${r[0]}"${D(e)}"${r[1]}`);
113
115
  }
114
- for (let n of e.children) r(n), t.push(` ${i} --> ${w(n.id)}`);
116
+ for (let n of e.children) r(n), t.push(` ${i} --> ${E(n.id)}`);
115
117
  };
116
118
  return r(e), t;
117
119
  }
118
- function w(e) {
120
+ function E(e) {
119
121
  return e.replace(/[^A-Za-z0-9]/g, "_");
120
122
  }
121
- function T(e) {
123
+ function D(e) {
122
124
  return `${e.id}: ${e.statement}`.replace(/["`]/g, "'").replace(/;/g, ",").slice(0, 80).concat(e.status === "open" ? " ◇" : "");
123
125
  }
124
126
  //#endregion
125
127
  //#region src/commands/assurance.ts
126
- var E = class s extends i {
128
+ var O = class a extends i {
127
129
  static summary = "Render the assurance case: claim → argument → evidence, from the store.";
128
130
  static description = "A pile of green evidence is not an argument (FR-040). ISO 15026-2 / GSN turns\nthe trace graph into something reviewable: this claim holds BECAUSE these\nsub-claims hold, EACH verified by a stated method, WITH evidence that is fresh.\n\nStrictly a view. It runs nothing, collects nothing and writes nothing to the\nstore — where the case cannot be built, the missing data is a finding against\nthe spec, not something this fabricates.\n\nGaps render as OPEN nodes (◇), not as omissions. An undischarged obligation, a\nsuspect binding or a claim nothing traces to stays in the tree, because a case\nthat quietly narrows to what it can prove reads exactly like a complete one.";
129
131
  static examples = [
@@ -132,50 +134,71 @@ var E = class s extends i {
132
134
  "quoin assurance > docs/assurance.md"
133
135
  ];
134
136
  static flags = {
135
- repo: f.string({
137
+ repo: p.string({
136
138
  description: "Repository root.",
137
139
  default: "."
138
140
  }),
139
- module: f.string({ description: "Module directory supplying the traceability model." }),
140
- "claim-type": f.string({
141
+ module: p.string({ description: "Module directory supplying the traceability model." }),
142
+ "claim-type": p.string({
141
143
  description: "Artifact type that is a top-level claim. Repeatable; matched case-insensitively. REPLACES the StR default rather than adding to it — pass --claim-type StR as well if StRs should stay claims. A safety or security bundle argues from a declared hazard or threat.",
142
144
  multiple: !0
143
145
  }),
144
- json: f.boolean({ description: "Emit the case as JSON." })
146
+ json: p.boolean({ description: "Emit the case as JSON." })
145
147
  };
146
148
  async run() {
147
- let { flags: i } = await this.parse(s), l = n(r());
148
- l && this.error(l.message, { exit: 2 });
149
- let u = [
149
+ let { flags: i } = await this.parse(a), s = n(r());
150
+ s && this.error(s.message, { exit: 2 });
151
+ let c = [
150
152
  "coverage",
151
153
  "--scope",
152
154
  i.repo,
153
155
  "--json"
154
156
  ];
155
- i.module && u.push("--module", i.module);
156
- let f = e(t(u));
157
- f.ok || this.error(f.error.message, { exit: 2 });
158
- let p = f.value.obligations ?? [], h = o({
159
- obligations: p,
160
- bindings: c(i.repo).bindings,
161
- runs: O(i.repo),
162
- scans: D(i.repo),
163
- catalog: a(i.module ? [i.module] : void 0)
164
- }), g = d(`${i.repo}/spec`), _ = m({
165
- documents: g.documents,
166
- obligations: p,
167
- findings: h.findings,
157
+ i.module && c.push("--module", i.module);
158
+ let p = e(t(c));
159
+ p.ok || this.error(p.error.message, { exit: 2 });
160
+ let m = p.value.obligations ?? [], h = k(i.repo), _ = d(i.repo, h), v = u({
161
+ obligations: m,
162
+ bindings: o(i.repo).bindings,
163
+ runs: j(i.repo),
164
+ scans: A(i.repo),
165
+ injections: _.injections,
166
+ mockInspectionSuites: _.suites,
167
+ catalog: l(i.module ? [i.module] : void 0)
168
+ }), y = f(`${i.repo}/spec`), b = g({
169
+ documents: y.documents,
170
+ obligations: m,
171
+ findings: v.findings,
168
172
  claimTypes: i["claim-type"],
169
- unreadable: g.unreadable
173
+ unreadable: y.unreadable
170
174
  });
171
- this.log(i.json ? JSON.stringify(_, null, 2) : x(_));
175
+ this.log(i.json ? JSON.stringify(b, null, 2) : C(b));
172
176
  }
173
177
  };
174
- function D(e) {
175
- return l(e).map((t) => s(e, t)).filter((e) => e !== null);
178
+ function k(e) {
179
+ try {
180
+ return m("git", [
181
+ "-C",
182
+ e,
183
+ "rev-parse",
184
+ "HEAD"
185
+ ], {
186
+ encoding: "utf8",
187
+ stdio: [
188
+ "ignore",
189
+ "pipe",
190
+ "ignore"
191
+ ]
192
+ }).trim();
193
+ } catch {
194
+ return;
195
+ }
196
+ }
197
+ function A(e) {
198
+ return c(e).map((t) => a(e, t)).filter((e) => e !== null);
176
199
  }
177
- function O(e) {
178
- return l(e).map((t) => u(e, t)).filter((e) => e !== null);
200
+ function j(e) {
201
+ return c(e).map((t) => s(e, t)).filter((e) => e !== null);
179
202
  }
180
203
  //#endregion
181
- export { E as default };
204
+ export { O as default };
@@ -1,5 +1,5 @@
1
- import { o as e, t } from "../../base-W7vrLi5E.js";
2
- import { n } from "../../modules-Cn9Htfp0.js";
1
+ import { o as e, t } from "../../base-CqKNs2Kd.js";
2
+ import { n } from "../../modules-ez9httBA.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-W7vrLi5E.js";
2
- import { n as t } from "../../modules-Cn9Htfp0.js";
3
- import { n, t as r } from "../../advisor-BiKhR9Yp.js";
1
+ import { t as e } from "../../base-CqKNs2Kd.js";
2
+ import { n as t } from "../../modules-ez9httBA.js";
3
+ import { n, t as r } from "../../advisor-BkgwDKvQ.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-W7vrLi5E.js";
2
- import { n as r } from "../../modules-Cn9Htfp0.js";
1
+ import { i as e, o as t, t as n } from "../../base-CqKNs2Kd.js";
2
+ import { n as r } from "../../modules-ez9httBA.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-W7vrLi5E.js";
2
- import { n } from "../../modules-Cn9Htfp0.js";
1
+ import { o as e, t } from "../../base-CqKNs2Kd.js";
2
+ import { n } from "../../modules-ez9httBA.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-W7vrLi5E.js";
2
- import { t } from "../completeness-BQDxME0a.js";
1
+ import { t as e } from "../base-CqKNs2Kd.js";
2
+ import { t } from "../completeness-DamWradt.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 +1 @@
1
- {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/commands/config/doctor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,YAAY;IACpD,MAAM,CAAC,OAAO,SAA2D;IACzE,MAAM,CAAC,WAAW,SAC+C;IAE3D,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAS3B"}
1
+ {"version":3,"file":"doctor.d.ts","sourceRoot":"","sources":["../../../src/commands/config/doctor.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,YAAY;IACpD,MAAM,CAAC,OAAO,SAA2D;IACzE,MAAM,CAAC,WAAW,SAC+C;IAE3D,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAU3B"}
@@ -1,12 +1,12 @@
1
- import { t as e } from "../../base-W7vrLi5E.js";
1
+ import { t as e } from "../../base-CqKNs2Kd.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
5
- var r = class extends e {
5
+ var r = class r extends e {
6
6
  static summary = "Report config files that failed to parse or validate.";
7
7
  static description = "A malformed config never blocks a command -- schema defaults are used and the\nproblem is recorded instead. This is where those records surface.";
8
8
  async run() {
9
- t();
9
+ await this.parse(r), t();
10
10
  let { exitCode: e } = await n();
11
11
  process.exitCode = e;
12
12
  }
@@ -1 +1 @@
1
- {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../src/commands/config/edit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,YAAY;IAClD,MAAM,CAAC,OAAO,SAA0C;IAExD,MAAM,CAAC,QAAQ,WAAyB;IAElC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAI3B"}
1
+ {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../src/commands/config/edit.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,MAAM,CAAC,OAAO,OAAO,UAAW,SAAQ,YAAY;IAClD,MAAM,CAAC,OAAO,SAA0C;IAExD,MAAM,CAAC,QAAQ,WAAyB;IAElC,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAK3B"}
@@ -1,12 +1,12 @@
1
- import { t as e } from "../../base-W7vrLi5E.js";
1
+ import { t as e } from "../../base-CqKNs2Kd.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
5
- var i = class extends e {
5
+ var i = class i extends e {
6
6
  static summary = "Open quoin's config file in $EDITOR.";
7
7
  static examples = ["quoin config edit"];
8
8
  async run() {
9
- t(), await r(n);
9
+ await this.parse(i), t(), await r(n);
10
10
  }
11
11
  };
12
12
  //#endregion
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../base-W7vrLi5E.js";
1
+ import { t as e } from "../../base-CqKNs2Kd.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-W7vrLi5E.js";
1
+ import { t as e } from "../../base-CqKNs2Kd.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,7 @@
1
- import { i as e, n as t, o as n, t as r } from "../../quire-UzoK3Azf.js";
2
- import { t as i } from "../../base-W7vrLi5E.js";
3
- import { g as a, o, y as s } from "../../evidence-BA5vyZJk.js";
1
+ import { i as e, n as t, o as n, t as r } from "../../quire-D8tCpgyA.js";
2
+ import { t as i } from "../../base-CqKNs2Kd.js";
3
+ import { _ as a, f as o, t as s } from "../../store--2sAv12X.js";
4
+ import "../../evidence-DD0CHzJ0.js";
4
5
  import { Flags as c } from "@oclif/core";
5
6
  import { execFileSync as l } from "node:child_process";
6
7
  //#region src/commands/evidence/affirm.ts
@@ -45,8 +46,8 @@ var u = class u extends i {
45
46
  i.repo,
46
47
  "rev-parse",
47
48
  "HEAD"
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, { bindings: g });
49
+ ], { encoding: "utf8" }).trim(), h = o(i.repo).bindings, { bindings: g, found: _ } = s(h, i.obligation, p.statement_hash, i.who, m, i.note);
50
+ _ || 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, { bindings: g });
50
51
  let v = {
51
52
  obligation: i.obligation,
52
53
  who: i.who,
@@ -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;AAiB7C,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;CA6E3B;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM1D;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
+ {"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;CA2F3B;AAED;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM1D;AAuBD;;;;;;;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,13 @@
1
- import { i as e, n as t, o as n, t as r } from "../../quire-UzoK3Azf.js";
2
- import { t as i } from "../../base-W7vrLi5E.js";
3
- import { t as a } from "../../advisor-BiKhR9Yp.js";
4
- import { r as o, t as s } from "../../auditor-ww0MC62a.js";
5
- import { d as c, g as l, h as u, p as d, s as f } from "../../evidence-BA5vyZJk.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-D8tCpgyA.js";
2
+ import { t as i } from "../../base-CqKNs2Kd.js";
3
+ import { d as a, f as o, l as s, n as c, s as l } from "../../store--2sAv12X.js";
4
+ import { t as u } from "../../advisor-BkgwDKvQ.js";
5
+ import { r as d, t as f } from "../../auditor-C3bSmPD_.js";
6
+ import { n as p } from "../../evidence-DD0CHzJ0.js";
7
+ import { Flags as m } from "@oclif/core";
8
+ import { execFileSync as h } from "node:child_process";
8
9
  //#region src/commands/evidence/audit.ts
9
- var h = class f extends i {
10
+ var g = class c extends i {
10
11
  static summary = "Audit the evidence store: suspect links, staleness, vacuity.";
11
12
  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
13
  static examples = [
@@ -15,74 +16,85 @@ var h = class f extends i {
15
16
  "quoin evidence audit --json"
16
17
  ];
17
18
  static flags = {
18
- repo: p.string({
19
+ repo: m.string({
19
20
  description: "Repository root.",
20
21
  default: "."
21
22
  }),
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({
23
+ module: m.string({ description: "Module directory supplying the traceability model." }),
24
+ ratchet: m.boolean({ description: "Report only violations absent from the baseline." }),
25
+ strict: m.boolean({ description: "Exit 1 when any reported finding remains." }),
26
+ json: m.boolean({ description: "Emit the report as JSON." }),
27
+ "multiplicity-requires": m.string({
27
28
  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
29
  multiple: !0
29
30
  }),
30
- "mutation-floor": p.string({
31
+ "mutation-floor": m.string({
31
32
  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
33
  multiple: !0
33
34
  })
34
35
  };
35
36
  async run() {
36
- let { flags: i } = await this.parse(f), p = n(r());
37
- p && this.error(p.message, { exit: 2 });
38
- let m = [
37
+ let { flags: i } = await this.parse(c), m = n(r());
38
+ m && this.error(m.message, { exit: 2 });
39
+ let h = [
39
40
  "coverage",
40
41
  "--scope",
41
42
  i.repo,
42
43
  "--json"
43
44
  ];
44
- i.module && m.push("--module", i.module);
45
- let h = e(t(m));
46
- h.ok || this.error(h.error.message, { exit: 2 });
47
- let y = s({
48
- obligations: h.value.obligations ?? [],
49
- bindings: l(i.repo).bindings,
50
- runs: c(i.repo),
51
- scans: d(i.repo),
52
- catalog: a(i.module ? [i.module] : void 0),
53
- headCommit: _(i.repo),
45
+ i.module && h.push("--module", i.module);
46
+ let g = e(t(h));
47
+ g.ok || this.error(g.error.message, { exit: 2 });
48
+ let b = v(i.repo), x = p(i.repo, b), S = f({
49
+ obligations: g.value.obligations ?? [],
50
+ bindings: o(i.repo).bindings,
51
+ runs: l(i.repo),
52
+ scans: s(i.repo),
53
+ injections: x.injections,
54
+ mockInspectionSuites: x.suites,
55
+ catalog: u(i.module ? [i.module] : void 0),
56
+ headCommit: b,
54
57
  multiplicityRequires: i["multiplicity-requires"],
55
- mutationFloor: v(i["mutation-floor"], (e) => this.error(e, { exit: 2 }))
56
- }), b = i.ratchet ? u(i.repo) : null, x = b !== null, S = b ? o(y, b) : y.findings;
57
- if (i.ratchet && !x && !i.json && this.log(g(i.repo)), i.json) this.log(JSON.stringify({
58
- findings: S,
59
- healthy: y.healthy,
60
- ratchet: x
58
+ mutationFloor: y(i["mutation-floor"], (e) => this.error(e, { exit: 2 }))
59
+ }), C = i.ratchet ? a(i.repo) : null, w = C !== null, T = C ? d(S, C) : S.findings;
60
+ if (i.ratchet && !w && !i.json && this.log(_(i.repo)), i.json) this.log(JSON.stringify({
61
+ findings: T,
62
+ healthy: S.healthy,
63
+ unevaluated: S.unevaluated,
64
+ ratchet: w
61
65
  }, null, 2));
62
- else if (S.length === 0) this.log(`${y.healthy.length} obligation(s) with healthy evidence; nothing to report`);
66
+ else if (T.length === 0 && S.unevaluated.length === 0) this.log(`${S.healthy.length} obligation(s) with healthy evidence; nothing to report`);
63
67
  else {
64
- for (let e of S) this.log(`[${e.severity}] ${e.kind}: ${e.summary}`);
65
- this.log(""), this.log(`${S.length} finding(s), ${y.healthy.length} healthy` + (x ? " (new violations only)" : ""));
68
+ for (let e of T) this.log(`[${e.severity}] ${e.kind}: ${e.summary}`);
69
+ for (let e of S.unevaluated) this.log(`[not-evaluated] ${e.check}: ${e.obligation}: ${e.reason}`);
70
+ this.log(""), this.log(`${T.length} finding(s), ${S.unevaluated.length} check(s) not evaluated, ${S.healthy.length} healthy` + (w ? " (new violations only)" : ""));
66
71
  }
67
- i.strict && S.length > 0 && this.exit(1);
72
+ i.strict && (T.length > 0 || S.unevaluated.length > 0) && this.exit(1);
68
73
  }
69
74
  };
70
- function g(e) {
71
- return `--ratchet requested but ${f(e)} does not exist; reporting the full backlog, not new violations. Write the baseline with: quoin evidence baseline`;
72
- }
73
75
  function _(e) {
76
+ return `--ratchet requested but ${c(e)} does not exist; reporting the full backlog, not new violations. Write the baseline with: quoin evidence baseline`;
77
+ }
78
+ function v(e) {
74
79
  try {
75
- return m("git", [
80
+ return h("git", [
76
81
  "-C",
77
82
  e,
78
83
  "rev-parse",
79
84
  "HEAD"
80
- ], { encoding: "utf8" }).trim();
85
+ ], {
86
+ encoding: "utf8",
87
+ stdio: [
88
+ "ignore",
89
+ "pipe",
90
+ "ignore"
91
+ ]
92
+ }).trim();
81
93
  } catch {
82
94
  return;
83
95
  }
84
96
  }
85
- function v(e, t) {
97
+ function y(e, t) {
86
98
  if (!e || e.length === 0) return;
87
99
  let n = {};
88
100
  for (let r of e) {
@@ -92,4 +104,4 @@ function v(e, t) {
92
104
  return n;
93
105
  }
94
106
  //#endregion
95
- export { h as default, g as missingBaselineNotice, v as parseMutationFloor };
107
+ export { g as default, _ as missingBaselineNotice, y as parseMutationFloor };
@@ -1 +1 @@
1
- {"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../../src/commands/evidence/baseline.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAkB7C,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,YAAY;IACxD,MAAM,CAAC,OAAO,SAA0D;IACxE,MAAM,CAAC,WAAW,SAU8C;IAEhE,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;MASV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAiD3B"}
1
+ {"version":3,"file":"baseline.d.ts","sourceRoot":"","sources":["../../../src/commands/evidence/baseline.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAmB7C,MAAM,CAAC,OAAO,OAAO,gBAAiB,SAAQ,YAAY;IACxD,MAAM,CAAC,OAAO,SAA0D;IACxE,MAAM,CAAC,WAAW,SAU8C;IAEhE,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;MASV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAqD3B"}