@agent-ix/quoin 0.17.0 → 0.19.2

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 (109) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.codex-plugin/plugin.json +1 -1
  3. package/default-modules.yaml +15 -6
  4. package/dist/advisor/advise.d.ts +14 -1
  5. package/dist/advisor/advise.d.ts.map +1 -1
  6. package/dist/{advisor-Dhy9S7PS.js → advisor-a9axb4Jl.js} +1 -1
  7. package/dist/assurance/graph.d.ts +79 -0
  8. package/dist/assurance/graph.d.ts.map +1 -0
  9. package/dist/assurance/index.d.ts +9 -0
  10. package/dist/assurance/index.d.ts.map +1 -0
  11. package/dist/assurance/render.d.ts +3 -0
  12. package/dist/assurance/render.d.ts.map +1 -0
  13. package/dist/auditor/audit.d.ts +23 -2
  14. package/dist/auditor/audit.d.ts.map +1 -1
  15. package/dist/auditor/combinatorial.d.ts +53 -0
  16. package/dist/auditor/combinatorial.d.ts.map +1 -0
  17. package/dist/auditor-W2jFinr6.js +188 -0
  18. package/dist/{base-D_-Jy4cE.js → base-BE20w0jY.js} +1 -1
  19. package/dist/cli.js +1 -1
  20. package/dist/combinatorial-Cq01XfhV.js +80 -0
  21. package/dist/commands/advise.js +35 -32
  22. package/dist/commands/assurance.d.ts +14 -0
  23. package/dist/commands/assurance.d.ts.map +1 -0
  24. package/dist/commands/assurance.js +179 -0
  25. package/dist/commands/catalog/list.js +2 -2
  26. package/dist/commands/catalog/methods.js +3 -3
  27. package/dist/commands/catalog/show.js +2 -2
  28. package/dist/commands/catalog/validate.js +2 -2
  29. package/dist/commands/completeness.d.ts +16 -0
  30. package/dist/commands/completeness.d.ts.map +1 -0
  31. package/dist/commands/completeness.js +49 -0
  32. package/dist/commands/config/doctor.js +1 -1
  33. package/dist/commands/config/edit.js +1 -1
  34. package/dist/commands/config/get.js +1 -1
  35. package/dist/commands/config/set.js +1 -1
  36. package/dist/commands/evidence/affirm.js +3 -3
  37. package/dist/commands/evidence/audit.d.ts +10 -0
  38. package/dist/commands/evidence/audit.d.ts.map +1 -1
  39. package/dist/commands/evidence/audit.js +54 -36
  40. package/dist/commands/evidence/baseline.js +12 -12
  41. package/dist/commands/evidence/gc.js +2 -2
  42. package/dist/commands/evidence/index.js +1 -1
  43. package/dist/commands/evidence/record.d.ts +2 -0
  44. package/dist/commands/evidence/record.d.ts.map +1 -1
  45. package/dist/commands/evidence/record.js +89 -32
  46. package/dist/commands/matrix.js +1 -1
  47. package/dist/commands/module/ensure-defaults.js +3 -3
  48. package/dist/commands/module/install.js +2 -2
  49. package/dist/commands/module/list.js +2 -2
  50. package/dist/commands/module/remove.js +2 -2
  51. package/dist/commands/review.js +1 -1
  52. package/dist/commands/to-plan.js +1 -1
  53. package/dist/commands/update.js +2 -2
  54. package/dist/commands/write.js +3 -3
  55. package/dist/completeness/assess.d.ts +82 -0
  56. package/dist/completeness/assess.d.ts.map +1 -0
  57. package/dist/completeness/bundle.d.ts +52 -0
  58. package/dist/completeness/bundle.d.ts.map +1 -0
  59. package/dist/completeness/declarations.d.ts +46 -0
  60. package/dist/completeness/declarations.d.ts.map +1 -0
  61. package/dist/completeness/index.d.ts +11 -0
  62. package/dist/completeness/index.d.ts.map +1 -0
  63. package/dist/completeness/run.d.ts +35 -0
  64. package/dist/completeness/run.d.ts.map +1 -0
  65. package/dist/completeness-BeqcskAI.js +228 -0
  66. package/dist/evidence/adapters/agent-eval.d.ts +26 -0
  67. package/dist/evidence/adapters/agent-eval.d.ts.map +1 -0
  68. package/dist/evidence/adapters/audit-script.d.ts +25 -0
  69. package/dist/evidence/adapters/audit-script.d.ts.map +1 -0
  70. package/dist/evidence/adapters/cargo-mutants.d.ts +3 -0
  71. package/dist/evidence/adapters/cargo-mutants.d.ts.map +1 -0
  72. package/dist/evidence/adapters/junit.d.ts +17 -0
  73. package/dist/evidence/adapters/junit.d.ts.map +1 -0
  74. package/dist/evidence/adapters/registry.d.ts +63 -0
  75. package/dist/evidence/adapters/registry.d.ts.map +1 -0
  76. package/dist/evidence/adapters/sarif.d.ts +35 -0
  77. package/dist/evidence/adapters/sarif.d.ts.map +1 -0
  78. package/dist/evidence/adapters/sbom.d.ts +35 -0
  79. package/dist/evidence/adapters/sbom.d.ts.map +1 -0
  80. package/dist/evidence/adapters/types.d.ts +55 -0
  81. package/dist/evidence/adapters/types.d.ts.map +1 -0
  82. package/dist/evidence/index.d.ts +10 -0
  83. package/dist/evidence/index.d.ts.map +1 -1
  84. package/dist/evidence/store.d.ts +48 -2
  85. package/dist/evidence/store.d.ts.map +1 -1
  86. package/dist/evidence/types.d.ts +84 -0
  87. package/dist/evidence/types.d.ts.map +1 -1
  88. package/dist/evidence-FRF9RN77.js +595 -0
  89. package/dist/{flow-command-B-ZBn9Sd.js → flow-command-BrzzKBo9.js} +1 -1
  90. package/dist/index.js +6 -6
  91. package/dist/{modules-DSkUXhHn.js → modules-_FQTZ3gx.js} +2 -2
  92. package/dist/{plugins-DiS0OXoo.js → plugins-Q1MtCIE5.js} +1 -1
  93. package/dist/quire/contract.d.ts +1 -1
  94. package/dist/quire/contract.d.ts.map +1 -1
  95. package/dist/{quire-D7ra5rUF.js → quire-Dis3ky5t.js} +1 -1
  96. package/dist/{version-DmZHxX4n.js → version-D0l3nDPZ.js} +1 -1
  97. package/dist/{write-CPdSNIkF.js → write-CMA6BDUq.js} +1 -1
  98. package/package.json +2 -1
  99. package/skills/spec-fuzz/SKILL.md +94 -0
  100. package/skills/spec-fuzz/assets/templates/atheris.py.md +74 -0
  101. package/skills/spec-fuzz/assets/templates/cargo-fuzz.rs.md +83 -0
  102. package/skills/spec-fuzz/assets/templates/fast-check.ts.md +76 -0
  103. package/skills/spec-fuzz/references/step-0-scope-and-harness.md +51 -0
  104. package/skills/spec-fuzz/references/step-1-select-obligations.md +47 -0
  105. package/skills/spec-fuzz/references/step-2-ground-entry-point.md +55 -0
  106. package/skills/spec-fuzz/references/step-3-emit-targets.md +65 -0
  107. package/skills/spec-fuzz/references/step-4-report.md +56 -0
  108. package/dist/audit-CudnEJmh.js +0 -127
  109. package/dist/evidence-QUw0KyMH.js +0 -209
@@ -1,9 +1,10 @@
1
- import { a as e, i as t, n, o as r, r as i, t as a } from "../quire-D7ra5rUF.js";
2
- import { t as o } from "../base-D_-Jy4cE.js";
3
- import { t as s } from "../advisor-Dhy9S7PS.js";
4
- import { Flags as c } from "@oclif/core";
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";
5
6
  //#region src/advisor/advise.ts
6
- var l = [
7
+ var u = [
7
8
  ["temporal", /\b(always|never|eventually|while|until|continuously)\b/i],
8
9
  ["liveness", /\b(eventually|makes progress|terminates)\b/i],
9
10
  ["invariance", /\b(invariant|holds for every|at all times)\b/i],
@@ -18,19 +19,21 @@ var l = [
18
19
  ["parser", /\b(pars|deserializ|decode|lex)/i],
19
20
  ["configuration-matrix", /\b(configuration|feature flag|combination of|matrix of)\b/i],
20
21
  ["third-party-dependency", /\b(dependenc|third-party|vendored|licence|license)\b/i],
21
- ["layering", /\b(depend on|layering|module boundary|must not import)\b/i],
22
+ ["layering", /\b(depend on|layering|must not import)\b/i],
23
+ ["module-boundary", /\b(module boundary|public (api|interface|surface)|encapsulat|internal(s)? (of|to)|exported? (from|by))\b/i],
22
24
  ["user-visible", /\b(user|operator|the UI|displays|screen)\b/i],
23
25
  ["stable-output", /\b(byte-identical|identical output|serializ|snapshot)\b/i],
24
26
  ["agent-behaviour", /\b(agent|transcript|prompt)\b/i],
25
27
  ["no-executable-oracle", /\b(review|judgement|readable|documented)\b/i]
26
28
  ];
27
- function u(e) {
28
- return l.filter(([, t]) => t.test(e)).map(([e]) => e).sort();
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();
29
32
  }
30
- function d(e, t) {
31
- let n = new Set(u(t.statement)), r = new Set(t.propertyShape ? [t.propertyShape] : []), i = new Set(t.objectTypes ?? []), a = new Set(t.archetype ? [t.archetype] : []), o = [];
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 = [];
32
35
  for (let t of e.methods) {
33
- let e = f(t, {
36
+ let e = p(t, {
34
37
  characteristics: n,
35
38
  property_shapes: r,
36
39
  object_types: i,
@@ -43,8 +46,8 @@ function d(e, t) {
43
46
  reasons: e
44
47
  });
45
48
  }
46
- o.sort((e, t) => t.reasons.length - e.reasons.length || m(e.method, t.method));
47
- let s = p(t.authoredMethod), c = o.length === 0, l = !c && s != null && !o.some((e) => e.method.toLowerCase() === s.toLowerCase() || e.class.toLowerCase() === s.toLowerCase());
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());
48
51
  return {
49
52
  obligation: t.id,
50
53
  recommended: o,
@@ -53,7 +56,7 @@ function d(e, t) {
53
56
  inconclusive: c
54
57
  };
55
58
  }
56
- function f(e, t) {
59
+ function p(e, t) {
57
60
  let n = [];
58
61
  for (let [r, i] of Object.entries(e.applicability)) {
59
62
  let e = t[r];
@@ -62,19 +65,19 @@ function f(e, t) {
62
65
  value: t
63
66
  });
64
67
  }
65
- return n.sort((e, t) => m(e.rule, t.rule) || m(e.value, t.value));
68
+ return n.sort((e, t) => h(e.rule, t.rule) || h(e.value, t.value));
66
69
  }
67
- function p(e) {
70
+ function m(e) {
68
71
  if (!e) return null;
69
72
  let t = (e.includes("(") ? e.slice(0, e.indexOf("(")) : e).trim();
70
73
  return t.length > 0 ? t : null;
71
74
  }
72
- function m(e, t) {
75
+ function h(e, t) {
73
76
  return e === t ? 0 : e < t ? -1 : 1;
74
77
  }
75
78
  //#endregion
76
79
  //#region src/commands/advise.ts
77
- var h = class e extends o {
80
+ var g = class e extends o {
78
81
  static summary = "Recommend a verification method for each obligation, from the catalog.";
79
82
  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).";
80
83
  static examples = [
@@ -83,14 +86,14 @@ var h = class e extends o {
83
86
  "quoin advise --json"
84
87
  ];
85
88
  static flags = {
86
- repo: c.string({
89
+ repo: l.string({
87
90
  description: "Repository root.",
88
91
  default: "."
89
92
  }),
90
- module: c.string({ description: "Module directory supplying the traceability model." }),
91
- "mismatch-only": c.boolean({ description: "Only obligations whose authored method is not among the recommendations." }),
92
- "inconclusive-only": c.boolean({ description: "Only obligations no rule matched." }),
93
- json: c.boolean({ description: "Emit the advice as JSON." })
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." })
94
97
  };
95
98
  async run() {
96
99
  let { flags: i } = await this.parse(e), o = r(a());
@@ -108,14 +111,14 @@ var h = class e extends o {
108
111
  let l = s(i.module ? [i.module] : void 0);
109
112
  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 });
110
113
  for (let e of l.unreadable) this.warn(`skipped ${e.moduleRoot}: ${e.reason}`);
111
- let u = g(i.repo), f = c.value.obligations ?? [];
112
- f.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).");
113
- let p = f.map((e) => d(l, _(e, u.get(e.id))));
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))));
114
117
  if (i["mismatch-only"] && (p = p.filter((e) => e.mismatch)), i["inconclusive-only"] && (p = p.filter((e) => e.inconclusive)), i.json) {
115
118
  this.log(JSON.stringify({ advice: p }, null, 2));
116
119
  return;
117
120
  }
118
- this.render(p, f.length);
121
+ this.render(p, d.length);
119
122
  }
120
123
  render(e, t) {
121
124
  for (let t of e) {
@@ -127,7 +130,7 @@ var h = class e extends o {
127
130
  this.log(`${e.length} of ${t} obligation(s) shown — ${n} mismatch, ${r} inconclusive. Recommendations, not verdicts: confirm the method in spec review.`);
128
131
  }
129
132
  };
130
- function g(t) {
133
+ function _(t) {
131
134
  let n = [
132
135
  "properties",
133
136
  "spec/**/*.md",
@@ -144,18 +147,18 @@ function g(t) {
144
147
  });
145
148
  return r;
146
149
  }
147
- function _(e, t) {
150
+ function v(e, t) {
148
151
  return {
149
152
  id: e.id,
150
153
  statement: e.statement,
151
154
  authoredMethod: e.method ?? null,
152
155
  propertyShape: t?.property ?? null,
153
- archetype: t?.archetype ?? v(e.id)
156
+ archetype: t?.archetype ?? y(e.id)
154
157
  };
155
158
  }
156
- function v(e) {
159
+ function y(e) {
157
160
  let t = e.split("-")[0];
158
161
  return t.length > 0 ? t : null;
159
162
  }
160
163
  //#endregion
161
- export { h as default };
164
+ export { g as default };
@@ -0,0 +1,14 @@
1
+ import { QuoinCommand } from '../base.js';
2
+ export default class Assurance extends QuoinCommand {
3
+ static summary: string;
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ repo: import('@oclif/core/interfaces').OptionFlag<string, import('@oclif/core/interfaces').CustomOptions>;
8
+ module: import('@oclif/core/interfaces').OptionFlag<string | undefined, import('@oclif/core/interfaces').CustomOptions>;
9
+ "claim-type": import('@oclif/core/interfaces').OptionFlag<string[] | undefined, import('@oclif/core/interfaces').CustomOptions>;
10
+ json: import('@oclif/core/interfaces').BooleanFlag<boolean>;
11
+ };
12
+ run(): Promise<void>;
13
+ }
14
+ //# sourceMappingURL=assurance.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assurance.d.ts","sourceRoot":"","sources":["../../src/commands/assurance.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAmB1C,MAAM,CAAC,OAAO,OAAO,SAAU,SAAQ,YAAY;IACjD,MAAM,CAAC,OAAO,SAC8D;IAC5E,MAAM,CAAC,WAAW,SAU0D;IAE5E,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;MAYV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAqC3B"}
@@ -0,0 +1,179 @@
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";
7
+ import { Flags as f } from "@oclif/core";
8
+ //#region src/assurance/graph.ts
9
+ var p = /* @__PURE__ */ new Set([
10
+ "traces_to",
11
+ "refines",
12
+ "implements",
13
+ "derives_from",
14
+ "mitigates",
15
+ "satisfies"
16
+ ]);
17
+ function m(e) {
18
+ let t = new Set(e.claimTypes ?? ["StR"]), n = /* @__PURE__ */ new Map();
19
+ for (let t of e.documents) {
20
+ let e = _(t);
21
+ e && n.set(e, t);
22
+ }
23
+ let r = /* @__PURE__ */ new Map();
24
+ for (let t of e.documents) {
25
+ let e = _(t);
26
+ if (e) for (let i of v(t)) n.has(i) && r.set(i, [...r.get(i) ?? [], e]);
27
+ }
28
+ let i = /* @__PURE__ */ new Map();
29
+ for (let t of e.findings) i.has(t.obligation) || i.set(t.obligation, t);
30
+ let a = /* @__PURE__ */ new Map();
31
+ for (let t of e.obligations) {
32
+ let e = y(t.id);
33
+ a.set(e, [...a.get(e) ?? [], t]);
34
+ }
35
+ let o = [], s = /* @__PURE__ */ new Set();
36
+ for (let [e, c] of n) t.has(String(c.frontmatter.type ?? "")) && o.push(h(e, n, r, a, i, s, /* @__PURE__ */ new Set()));
37
+ return o.sort((e, t) => e.id.localeCompare(t.id)), {
38
+ claims: o,
39
+ unreachable: [...n.keys()].filter((e) => !s.has(e) && a.has(e)).sort(),
40
+ unreadable: e.unreadable ?? []
41
+ };
42
+ }
43
+ function h(e, t, n, r, i, a, o) {
44
+ a.add(e), o.add(e);
45
+ 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 = {
46
+ id: e,
47
+ kind: "goal",
48
+ statement: c,
49
+ status: d.length === 0 || d.some((e) => e.status === "open") ? "open" : "supported",
50
+ children: d
51
+ };
52
+ return d.length === 0 && (f.because = "no sub-claim and no obligation traces to this claim"), f;
53
+ }
54
+ function g(e, t) {
55
+ let n = t.get(e.id);
56
+ return {
57
+ id: e.id,
58
+ kind: "solution",
59
+ statement: e.statement,
60
+ status: n ? "open" : "supported",
61
+ ...n ? { because: `${n.kind}: ${n.summary}` } : {},
62
+ children: []
63
+ };
64
+ }
65
+ function _(e) {
66
+ let t = e.frontmatter.id;
67
+ return typeof t == "string" && t.length > 0 ? t : null;
68
+ }
69
+ function v(e) {
70
+ let t = e.frontmatter.relationships;
71
+ if (!Array.isArray(t)) return [];
72
+ let n = [];
73
+ for (let e of t) {
74
+ if (!e || typeof e != "object" || !p.has(String(e.type ?? ""))) continue;
75
+ let t = String(e.target ?? "").split("/").pop();
76
+ t && n.push(t);
77
+ }
78
+ return n;
79
+ }
80
+ function y(e) {
81
+ let t = /^([A-Za-z]+-\d+)/.exec(e);
82
+ return t ? t[1] : e;
83
+ }
84
+ //#endregion
85
+ //#region src/assurance/render.ts
86
+ var b = {
87
+ supported: "✅",
88
+ open: "◇"
89
+ };
90
+ function x(e) {
91
+ let t = ["# Assurance case", ""];
92
+ 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.", "");
93
+ let n = e.claims.filter((e) => e.status === "open").length;
94
+ e.claims.length > 0 && t.push(`${e.claims.length} claim(s), ${n} with an open branch.`, "");
95
+ 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), "```", "");
96
+ 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");
97
+ }
98
+ function S(e, t) {
99
+ 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];
100
+ e.because && i.push(`${n} - ↳ ${e.because}`);
101
+ for (let n of e.children) i.push(...S(n, t + 1));
102
+ return i;
103
+ }
104
+ function C(e) {
105
+ let t = ["flowchart TD"], n = /* @__PURE__ */ new Set(), r = (e) => {
106
+ let i = w(e.id);
107
+ if (!n.has(i)) {
108
+ n.add(i);
109
+ let r = e.kind === "solution" ? ["([", "])"] : ["[", "]"];
110
+ t.push(` ${i}${r[0]}"${T(e)}"${r[1]}`);
111
+ }
112
+ for (let n of e.children) r(n), t.push(` ${i} --> ${w(n.id)}`);
113
+ };
114
+ return r(e), t;
115
+ }
116
+ function w(e) {
117
+ return e.replace(/[^A-Za-z0-9]/g, "_");
118
+ }
119
+ function T(e) {
120
+ return `${e.id}: ${e.statement}`.replace(/["`]/g, "'").replace(/;/g, ",").slice(0, 80).concat(e.status === "open" ? " ◇" : "");
121
+ }
122
+ //#endregion
123
+ //#region src/commands/assurance.ts
124
+ var E = class s extends i {
125
+ static summary = "Render the assurance case: claim → argument → evidence, from the store.";
126
+ 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.";
127
+ static examples = [
128
+ "quoin assurance",
129
+ "quoin assurance --claim-type StR --claim-type hazard",
130
+ "quoin assurance > docs/assurance.md"
131
+ ];
132
+ static flags = {
133
+ repo: f.string({
134
+ description: "Repository root.",
135
+ default: "."
136
+ }),
137
+ module: f.string({ description: "Module directory supplying the traceability model." }),
138
+ "claim-type": f.string({
139
+ description: "Artifact type that is a top-level claim. Repeatable. Defaults to StR; a safety or security bundle argues from a declared hazard or threat.",
140
+ multiple: !0
141
+ }),
142
+ json: f.boolean({ description: "Emit the case as JSON." })
143
+ };
144
+ async run() {
145
+ let { flags: i } = await this.parse(s), c = n(r());
146
+ c && this.error(c.message, { exit: 2 });
147
+ let u = [
148
+ "coverage",
149
+ "--scope",
150
+ i.repo,
151
+ "--json"
152
+ ];
153
+ i.module && u.push("--module", i.module);
154
+ let f = e(t(u));
155
+ f.ok || this.error(f.error.message, { exit: 2 });
156
+ let p = f.value.obligations ?? [], h = d({
157
+ obligations: p,
158
+ bindings: l(i.repo).bindings,
159
+ runs: O(i.repo),
160
+ scans: D(i.repo),
161
+ catalog: a(i.module ? [i.module] : void 0)
162
+ }), g = o(`${i.repo}/spec`), _ = m({
163
+ documents: g.documents,
164
+ obligations: p,
165
+ findings: h.findings,
166
+ claimTypes: i["claim-type"],
167
+ unreadable: g.unreadable
168
+ });
169
+ this.log(i.json ? JSON.stringify(_, null, 2) : x(_));
170
+ }
171
+ };
172
+ function D(e) {
173
+ return c(e).map((t) => s(e, t)).filter((e) => e !== null);
174
+ }
175
+ function O(e) {
176
+ return c(e).map((t) => u(e, t)).filter((e) => e !== null);
177
+ }
178
+ //#endregion
179
+ export { E as default };
@@ -1,5 +1,5 @@
1
- import { o as e, t } from "../../base-D_-Jy4cE.js";
2
- import { n } from "../../modules-DSkUXhHn.js";
1
+ import { o as e, t } from "../../base-BE20w0jY.js";
2
+ import { n } from "../../modules-_FQTZ3gx.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-D_-Jy4cE.js";
2
- import { n as t } from "../../modules-DSkUXhHn.js";
3
- import { n, t as r } from "../../advisor-Dhy9S7PS.js";
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";
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-D_-Jy4cE.js";
2
- import { n as r } from "../../modules-DSkUXhHn.js";
1
+ import { i as e, o as t, t as n } from "../../base-BE20w0jY.js";
2
+ import { n as r } from "../../modules-_FQTZ3gx.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-D_-Jy4cE.js";
2
- import { n } from "../../modules-DSkUXhHn.js";
1
+ import { o as e, t } from "../../base-BE20w0jY.js";
2
+ import { n } from "../../modules-_FQTZ3gx.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 {
@@ -0,0 +1,16 @@
1
+ import { QuoinCommand } from '../base.js';
2
+ export default class Completeness extends QuoinCommand {
3
+ static summary: string;
4
+ static description: string;
5
+ static examples: string[];
6
+ static flags: {
7
+ repo: import('@oclif/core/interfaces').OptionFlag<string, import('@oclif/core/interfaces').CustomOptions>;
8
+ bundle: import('@oclif/core/interfaces').OptionFlag<string | undefined, import('@oclif/core/interfaces').CustomOptions>;
9
+ module: import('@oclif/core/interfaces').OptionFlag<string | undefined, import('@oclif/core/interfaces').CustomOptions>;
10
+ strict: import('@oclif/core/interfaces').BooleanFlag<boolean>;
11
+ json: import('@oclif/core/interfaces').BooleanFlag<boolean>;
12
+ };
13
+ run(): Promise<void>;
14
+ private render;
15
+ }
16
+ //# sourceMappingURL=completeness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"completeness.d.ts","sourceRoot":"","sources":["../../src/commands/completeness.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAO1C,MAAM,CAAC,OAAO,OAAO,YAAa,SAAQ,YAAY;IACpD,MAAM,CAAC,OAAO,SAC0E;IACxF,MAAM,CAAC,WAAW,SAwBd;IAEJ,MAAM,CAAC,QAAQ,WAKb;IAEF,MAAM,CAAC,KAAK;;;;;;MAcV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA4B1B,OAAO,CAAC,MAAM;CAmCf"}
@@ -0,0 +1,49 @@
1
+ import { t as e } from "../base-BE20w0jY.js";
2
+ import { t } from "../completeness-BeqcskAI.js";
3
+ import { Flags as n } from "@oclif/core";
4
+ //#region src/commands/completeness.ts
5
+ var r = class r extends e {
6
+ static summary = "Report which declared vocabulary values no requirement owns, and judge the excuses.";
7
+ static description = "The verdict half of declared-vocabulary coverage (FR-037). quire-rs FR-059\ncomputes which declared values no document claims — a deterministic fact about\nthe spec. This decides what a gap is worth, and whether an exclusion was earned.\n\nThe first vocabulary is ISO 25010: a bundle can be 100% AC-covered and still\nhave no requirement anywhere for reliability, security or maintainability. The\ncharacteristic list is module data (12 values, not the 9 the ticket assumed), so\nnothing here is hardcoded — it is read from the same declaration the engine\nreads.\n\nA value may be excused. \"This is a CLI that controls no physical process, so it\nhas no safety characteristic\" is an answer, and a check that cannot accept one\nforces either a permanent false finding or a requirement fabricated to silence\nit. But the engine accepts a bare list: adding one frontmatter line took this\nrepository from 7 findings to 5 with no reason written anywhere. So an exclusion\nmust carry a written reason, in the same document, in a table row naming the\nvalue.\n\nSeverities are deliberately asymmetric. An unowned characteristic is medium —\nan admitted gap a reader can see. An unjustified exclusion is high: an assertion\nof completeness with nothing behind it, which also removes the finding that\nwould have prompted the work.\n\nAdvisory by default. --strict makes an admitted gap fail too; it does not invent\none.";
8
+ static examples = [
9
+ "quoin completeness",
10
+ "quoin completeness --strict",
11
+ "quoin completeness --json",
12
+ "quoin completeness --repo ../other-repo"
13
+ ];
14
+ static flags = {
15
+ repo: n.string({
16
+ description: "Repository root.",
17
+ default: "."
18
+ }),
19
+ bundle: n.string({ description: "Bundle root to read. Defaults to <repo>/spec, the directory quire treats as the bundle." }),
20
+ module: n.string({ description: "Module directory supplying the vocabulary declarations." }),
21
+ strict: n.boolean({ description: "Exit non-zero when any value is unowned, not only on a high finding." }),
22
+ json: n.boolean({ description: "Emit the report as JSON." })
23
+ };
24
+ async run() {
25
+ let { flags: e } = await this.parse(r), n = t({
26
+ bundleRoot: e.bundle ?? `${e.repo}/spec`,
27
+ strict: e.strict,
28
+ moduleRoots: e.module ? [e.module] : void 0
29
+ });
30
+ e.json ? this.log(JSON.stringify(n, null, 2)) : this.render(n), n.verdict === "FAIL" && this.exit(1), n.verdict === "UNCHECKED" && e.strict && this.exit(1);
31
+ }
32
+ render(e) {
33
+ e.vocabularies.length === 0 && this.warn("no active module declares `traceability.vocabulary_coverage`, so nothing was checked. Install one (e.g. spec-artifacts-iso) or pass --module.");
34
+ for (let t of e.unresolved) this.warn(`vocabulary '${t.name}' not resolved: ${t.reason}`);
35
+ for (let t of e.unreadable) this.warn(`frontmatter unreadable in ${t.path}: ${t.reason}`);
36
+ for (let t of e.rollups) this.log(`${t.vocabulary}: ${t.owned}/${t.declared} owned, ${t.excused} excused, ${t.unowned} unowned`);
37
+ for (let t of e.findings) this.log(` ${i(t)} ${t.message}`);
38
+ this.log(`\n${e.verdict} — ${a(e.findings, "high")} high, ${a(e.findings, "medium")} medium (bundle ${e.bundleRoot})`);
39
+ }
40
+ };
41
+ function i(e) {
42
+ let t = e.document ? ` ${e.document}:` : "";
43
+ return `[${e.severity}]${t}`;
44
+ }
45
+ function a(e, t) {
46
+ return e.filter((e) => e.severity === t).length;
47
+ }
48
+ //#endregion
49
+ export { r as default };
@@ -1,4 +1,4 @@
1
- import { t as e } from "../../base-D_-Jy4cE.js";
1
+ import { t as e } from "../../base-BE20w0jY.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-D_-Jy4cE.js";
1
+ import { t as e } from "../../base-BE20w0jY.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-D_-Jy4cE.js";
1
+ import { t as e } from "../../base-BE20w0jY.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-D_-Jy4cE.js";
1
+ import { t as e } from "../../base-BE20w0jY.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-D7ra5rUF.js";
2
- import { t as i } from "../../base-D_-Jy4cE.js";
3
- import { d as a, l as o, r as s } from "../../evidence-QUw0KyMH.js";
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";
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
@@ -10,7 +10,17 @@ export default class EvidenceAudit extends QuoinCommand {
10
10
  strict: import('@oclif/core/interfaces').BooleanFlag<boolean>;
11
11
  json: import('@oclif/core/interfaces').BooleanFlag<boolean>;
12
12
  "multiplicity-requires": import('@oclif/core/interfaces').OptionFlag<string[] | undefined, import('@oclif/core/interfaces').CustomOptions>;
13
+ "mutation-floor": import('@oclif/core/interfaces').OptionFlag<string[] | undefined, import('@oclif/core/interfaces').CustomOptions>;
13
14
  };
14
15
  run(): Promise<void>;
15
16
  }
17
+ /**
18
+ * `--mutation-floor P0=0.8` → `{ P0: 0.8 }`.
19
+ *
20
+ * Rejected rather than ignored: a malformed entry means the operator asked for
21
+ * a threshold and would otherwise get a clean report saying nothing was below
22
+ * it. A floor that silently does not apply is worse than no floor, because it
23
+ * reads as a passing gate.
24
+ */
25
+ export declare function parseMutationFloor(entries: string[] | undefined, fail: (message: string) => never): Record<string, number> | undefined;
16
26
  //# sourceMappingURL=audit.d.ts.map
@@ -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,SAeuC;IAEzD,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;;MAmBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAgE3B"}
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"}