@agent-ix/quoin 0.15.1 → 0.17.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.
- package/.claude-plugin/plugin.json +1 -1
- package/.codex-plugin/plugin.json +1 -1
- package/default-modules.yaml +4 -4
- package/dist/advisor/advise.d.ts.map +1 -1
- package/dist/advisor/methods.d.ts +11 -1
- package/dist/advisor/methods.d.ts.map +1 -1
- package/dist/{advisor-D35K3_iI.js → advisor-Dhy9S7PS.js} +21 -8
- package/dist/audit-CudnEJmh.js +127 -0
- package/dist/auditor/audit.d.ts +15 -4
- package/dist/auditor/audit.d.ts.map +1 -1
- package/dist/auditor/index.d.ts +1 -1
- package/dist/auditor/index.d.ts.map +1 -1
- package/dist/{base-CtpwIg4M.js → base-D_-Jy4cE.js} +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/advise.d.ts +16 -0
- package/dist/commands/advise.d.ts.map +1 -0
- package/dist/commands/advise.js +161 -0
- package/dist/commands/catalog/list.js +2 -2
- package/dist/commands/catalog/methods.js +3 -3
- package/dist/commands/catalog/show.js +2 -2
- package/dist/commands/catalog/validate.js +2 -2
- package/dist/commands/config/doctor.js +1 -1
- package/dist/commands/config/edit.js +1 -1
- package/dist/commands/config/get.js +1 -1
- package/dist/commands/config/set.js +1 -1
- package/dist/commands/evidence/affirm.d.ts.map +1 -1
- package/dist/commands/evidence/affirm.js +36 -50
- package/dist/commands/evidence/audit.d.ts +1 -0
- package/dist/commands/evidence/audit.d.ts.map +1 -1
- package/dist/commands/evidence/audit.js +46 -158
- package/dist/commands/evidence/baseline.d.ts +14 -0
- package/dist/commands/evidence/baseline.d.ts.map +1 -0
- package/dist/commands/evidence/baseline.js +79 -0
- package/dist/commands/evidence/gc.js +2 -2
- package/dist/commands/evidence/index.d.ts.map +1 -1
- package/dist/commands/evidence/index.js +4 -2
- package/dist/commands/evidence/record.d.ts +1 -0
- package/dist/commands/evidence/record.d.ts.map +1 -1
- package/dist/commands/evidence/record.js +34 -47
- package/dist/commands/matrix.js +1 -1
- package/dist/commands/module/ensure-defaults.js +3 -3
- package/dist/commands/module/install.js +2 -2
- package/dist/commands/module/list.js +2 -2
- package/dist/commands/module/remove.js +2 -2
- package/dist/commands/review.js +1 -1
- package/dist/commands/to-plan.js +1 -1
- package/dist/commands/update.js +2 -2
- package/dist/commands/write.js +3 -3
- package/dist/evidence/index.d.ts +1 -1
- package/dist/evidence/index.d.ts.map +1 -1
- package/dist/evidence/record.d.ts +6 -0
- package/dist/evidence/record.d.ts.map +1 -1
- package/dist/evidence/store.d.ts +76 -6
- package/dist/evidence/store.d.ts.map +1 -1
- package/dist/evidence/types.d.ts +26 -5
- package/dist/evidence/types.d.ts.map +1 -1
- package/dist/{evidence-BvUyw-Yv.js → evidence-QUw0KyMH.js} +76 -38
- package/dist/{flow-command-BSMqxass.js → flow-command-B-ZBn9Sd.js} +1 -1
- package/dist/index.js +6 -6
- package/dist/{modules-Ckfaq5p4.js → modules-DSkUXhHn.js} +2 -2
- package/dist/{plugins-CLuXx2Jr.js → plugins-DiS0OXoo.js} +1 -1
- package/dist/quire/exec.d.ts +44 -0
- package/dist/quire/exec.d.ts.map +1 -0
- package/dist/quire/index.d.ts +1 -0
- package/dist/quire/index.d.ts.map +1 -1
- package/dist/{quire-MbMdffPh.js → quire-D7ra5rUF.js} +315 -261
- package/dist/{version-By2YFRZQ.js → version-DmZHxX4n.js} +1 -1
- package/dist/{write-8JJ8Dumo.js → write-CPdSNIkF.js} +1 -1
- package/package.json +1 -1
- package/skills/spec-evidence-analysis/SKILL.md +27 -11
package/default-modules.yaml
CHANGED
|
@@ -10,13 +10,13 @@ schemaVersion: 1
|
|
|
10
10
|
name: quoin-default-modules
|
|
11
11
|
entries:
|
|
12
12
|
- name: spec-artifacts-iso
|
|
13
|
-
version: "0.
|
|
13
|
+
version: "0.12.0"
|
|
14
14
|
defaultEnabled: true
|
|
15
15
|
source:
|
|
16
16
|
type: git-subdir
|
|
17
17
|
url: agent-ix/spec-artifacts-iso
|
|
18
18
|
path: spec_artifacts_iso
|
|
19
|
-
ref: v0.
|
|
19
|
+
ref: v0.12.0
|
|
20
20
|
|
|
21
21
|
- name: spec-artifacts-app
|
|
22
22
|
version: "0.5.0"
|
|
@@ -28,13 +28,13 @@ entries:
|
|
|
28
28
|
ref: v0.5.0
|
|
29
29
|
|
|
30
30
|
- name: spec-artifacts-process
|
|
31
|
-
version: "0.
|
|
31
|
+
version: "0.17.0"
|
|
32
32
|
defaultEnabled: true
|
|
33
33
|
source:
|
|
34
34
|
type: git-subdir
|
|
35
35
|
url: agent-ix/spec-artifacts-process
|
|
36
36
|
path: spec_artifacts_process
|
|
37
|
-
ref: v0.
|
|
37
|
+
ref: v0.17.0
|
|
38
38
|
|
|
39
39
|
- name: spec-objects-business
|
|
40
40
|
version: "0.6.0"
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"advise.d.ts","sourceRoot":"","sources":["../../src/advisor/advise.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAsB,MAAM,cAAc,CAAC;AAEtE,iFAAiF;AACjF,MAAM,WAAW,eAAe;IAC9B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,8DAA8D;IAC9D,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,mEAAmE;IACnE,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,4DAA4D;IAC5D,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,oEAAoE;IACpE,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AAED,0EAA0E;AAC1E,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAED,6CAA6C;AAC7C,MAAM,WAAW,cAAc;IAC7B,MAAM,EAAE,MAAM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AW,cAAc;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,WAAW,EAAE,CAAC;CACxB;AAED,gDAAgD;AAChD,MAAM,WAAW,MAAM;IACrB,UAAU,EAAE,MAAM,CAAC;IACnB,2EAA2E;IAC3E,WAAW,EAAE,cAAc,EAAE,CAAC;IAC9B,uCAAuC;IACvC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,YAAY,EAAE,OAAO,CAAC;CACvB;AA8CD,+DAA+D;AAC/D,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,CAI7D;AAED;;;;;;;GAOG;AACH,wBAAgB,MAAM,CAAC,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,eAAe,GAAG,MAAM,CAmD7E"}
|
|
@@ -28,7 +28,7 @@ export interface VerificationMethod {
|
|
|
28
28
|
/** Module that contributed this entry (first-wins). */
|
|
29
29
|
moduleName: string;
|
|
30
30
|
}
|
|
31
|
-
/** The merged catalog plus
|
|
31
|
+
/** The merged catalog plus what the merge could not use. */
|
|
32
32
|
export interface MethodCatalog {
|
|
33
33
|
methods: VerificationMethod[];
|
|
34
34
|
/** Method ids more than one module declared, in first-wins order. */
|
|
@@ -36,6 +36,16 @@ export interface MethodCatalog {
|
|
|
36
36
|
id: string;
|
|
37
37
|
modules: string[];
|
|
38
38
|
}>;
|
|
39
|
+
/**
|
|
40
|
+
* Module roots whose `manifest.yaml` could not be read or parsed. Reported
|
|
41
|
+
* rather than thrown: a catalog missing one module's entries is still worth
|
|
42
|
+
* having, and the command that would have crashed is the one an operator runs
|
|
43
|
+
* to diagnose the module (agent-ix/quoin#106).
|
|
44
|
+
*/
|
|
45
|
+
unreadable: Array<{
|
|
46
|
+
moduleRoot: string;
|
|
47
|
+
reason: string;
|
|
48
|
+
}>;
|
|
39
49
|
}
|
|
40
50
|
/**
|
|
41
51
|
* Load and merge every module's `verification_catalog`.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"methods.d.ts","sourceRoot":"","sources":["../../src/advisor/methods.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,oDAAoD;AACpD,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACxC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,
|
|
1
|
+
{"version":3,"file":"methods.d.ts","sourceRoot":"","sources":["../../src/advisor/methods.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AASH,oDAAoD;AACpD,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC;IACxC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,uDAAuD;IACvD,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,4DAA4D;AAC5D,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,kBAAkB,EAAE,CAAC;IAC9B,qEAAqE;IACrE,UAAU,EAAE,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC,CAAC;IACrD;;;;;OAKG;IACH,UAAU,EAAE,KAAK,CAAC;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC3D;AAED;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAC/B,WAAW,WAAuB,GACjC,aAAa,CAuEf;AAaD,iFAAiF;AACjF,wBAAgB,aAAa,CAAC,OAAO,EAAE,aAAa,GAAG,MAAM,EAAE,CAE9D"}
|
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
import { n as e, s as t } from "./base-
|
|
1
|
+
import { n as e, s as t } from "./base-D_-Jy4cE.js";
|
|
2
2
|
import { readFileSync as n } from "node:fs";
|
|
3
3
|
import { join as r } from "node:path";
|
|
4
4
|
import { parse as i } from "yaml";
|
|
5
5
|
//#region src/advisor/methods.ts
|
|
6
6
|
function a(a = e()) {
|
|
7
|
-
let s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set();
|
|
7
|
+
let s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Set(), u = [];
|
|
8
8
|
for (let e of a) {
|
|
9
9
|
let a = t(e);
|
|
10
10
|
if (!a || l.has(a)) continue;
|
|
11
11
|
l.add(a);
|
|
12
|
-
let
|
|
13
|
-
|
|
12
|
+
let d;
|
|
13
|
+
try {
|
|
14
|
+
d = i(n(r(a, "manifest.yaml"), "utf8"));
|
|
15
|
+
} catch (e) {
|
|
16
|
+
u.push({
|
|
17
|
+
moduleRoot: a,
|
|
18
|
+
reason: e instanceof Error ? e.message : String(e)
|
|
19
|
+
});
|
|
20
|
+
continue;
|
|
21
|
+
}
|
|
22
|
+
if (!d || typeof d != "object") continue;
|
|
23
|
+
let f = String(d.name ?? a), p = d.verification_catalog;
|
|
24
|
+
if (!(!p || typeof p != "object")) for (let [e, t] of Object.entries(p)) {
|
|
14
25
|
let n = s.get(e);
|
|
15
26
|
if (n) {
|
|
16
27
|
let t = c.get(e) ?? [n.moduleName];
|
|
17
|
-
t.push(
|
|
28
|
+
t.push(f), c.set(e, t);
|
|
18
29
|
continue;
|
|
19
30
|
}
|
|
20
31
|
s.set(e, {
|
|
@@ -25,16 +36,18 @@ function a(a = e()) {
|
|
|
25
36
|
evidenceKind: typeof t.evidence_kind == "string" ? t.evidence_kind : void 0,
|
|
26
37
|
applicability: o(t.applicability),
|
|
27
38
|
tooling: Array.isArray(t.tooling) ? t.tooling.map(String) : [],
|
|
28
|
-
moduleName:
|
|
39
|
+
moduleName: f
|
|
29
40
|
});
|
|
30
41
|
}
|
|
31
42
|
}
|
|
43
|
+
let d = (e, t) => e.id === t.id ? 0 : e.id < t.id ? -1 : 1;
|
|
32
44
|
return {
|
|
33
|
-
methods: [...s.values()].sort(
|
|
45
|
+
methods: [...s.values()].sort(d),
|
|
34
46
|
duplicates: [...c.entries()].map(([e, t]) => ({
|
|
35
47
|
id: e,
|
|
36
48
|
modules: t
|
|
37
|
-
})).sort(
|
|
49
|
+
})).sort(d),
|
|
50
|
+
unreadable: u.sort((e, t) => e.moduleRoot === t.moduleRoot ? 0 : e.moduleRoot < t.moduleRoot ? -1 : 1)
|
|
38
51
|
};
|
|
39
52
|
}
|
|
40
53
|
function o(e) {
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
//#region src/auditor/audit.ts
|
|
2
|
+
function e(e) {
|
|
3
|
+
let a = [], o = [], s = /* @__PURE__ */ new Map();
|
|
4
|
+
for (let t of e.bindings) {
|
|
5
|
+
let e = s.get(t.obligation) ?? [];
|
|
6
|
+
e.push(t), s.set(t.obligation, e);
|
|
7
|
+
}
|
|
8
|
+
let c = new Map(e.runs.map((e) => [e.suite, e]));
|
|
9
|
+
for (let l of [...e.obligations].sort(n)) {
|
|
10
|
+
let n = (s.get(l.id) ?? []).slice().sort((e, n) => t(e.suite, n.suite));
|
|
11
|
+
if (n.length === 0) {
|
|
12
|
+
a.push({
|
|
13
|
+
kind: "undischarged",
|
|
14
|
+
obligation: l.id,
|
|
15
|
+
severity: "medium",
|
|
16
|
+
summary: `no evidence is bound to ${l.id}`
|
|
17
|
+
});
|
|
18
|
+
continue;
|
|
19
|
+
}
|
|
20
|
+
let u = n.filter((e) => e.statementHashAtBinding !== l.statement_hash);
|
|
21
|
+
if (u.length > 0) {
|
|
22
|
+
a.push({
|
|
23
|
+
kind: "suspect-link",
|
|
24
|
+
obligation: l.id,
|
|
25
|
+
severity: "high",
|
|
26
|
+
summary: `${l.id} was reworded after its evidence was bound in ${u.map((e) => e.suite).join(", ")} (bound against ${u[0].statementHashAtBinding.slice(0, 12)}…, now ${l.statement_hash.slice(0, 12)}…). Re-affirm or re-verify.`
|
|
27
|
+
});
|
|
28
|
+
continue;
|
|
29
|
+
}
|
|
30
|
+
let d = n.filter((e) => !c.has(e.suite));
|
|
31
|
+
if (d.length > 0) {
|
|
32
|
+
a.push({
|
|
33
|
+
kind: "stale-evidence",
|
|
34
|
+
obligation: l.id,
|
|
35
|
+
severity: "high",
|
|
36
|
+
summary: `${l.id} is bound to ${d.map((e) => e.suite).join(", ")}, which ${d.length === 1 ? "has" : "have"} no recorded run. The binding claims evidence that is not in the store.`
|
|
37
|
+
});
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
let f = n.map((e) => c.get(e.suite));
|
|
41
|
+
if (e.headCommit) {
|
|
42
|
+
let t = n.filter((t, n) => f[n].commit !== e.headCommit);
|
|
43
|
+
t.length > 0 && a.push({
|
|
44
|
+
kind: "stale-evidence",
|
|
45
|
+
obligation: l.id,
|
|
46
|
+
severity: "medium",
|
|
47
|
+
summary: `${l.id} rests on ` + t.map((e) => `a ${e.suite} run at ${c.get(e.suite).commit.slice(0, 12)}`).join(" and ") + `, not at HEAD (${e.headCommit.slice(0, 12)}).`
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
let p = n.flatMap((e, t) => e.symbols.filter((e) => {
|
|
51
|
+
let n = f[t].entries.find((t) => t.symbol === e);
|
|
52
|
+
return !n || n.outcome === "skip";
|
|
53
|
+
}).map((t) => `${e.suite}:${t}`)), m = n.reduce((e, t) => e + t.symbols.length, 0);
|
|
54
|
+
if (p.length > 0 && p.length === m) {
|
|
55
|
+
a.push({
|
|
56
|
+
kind: "vacuous-evidence",
|
|
57
|
+
obligation: l.id,
|
|
58
|
+
severity: "high",
|
|
59
|
+
summary: `every symbol bound to ${l.id} was skipped or absent from its run: ${p.sort(t).join(", ")}. The row reads as covered and nothing was verified.`
|
|
60
|
+
});
|
|
61
|
+
continue;
|
|
62
|
+
}
|
|
63
|
+
let h = r(l, n, f, e.catalog);
|
|
64
|
+
if (h) {
|
|
65
|
+
a.push(h);
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
let g = i(l, n, e);
|
|
69
|
+
if (g) {
|
|
70
|
+
a.push(g);
|
|
71
|
+
continue;
|
|
72
|
+
}
|
|
73
|
+
o.push(l.id);
|
|
74
|
+
}
|
|
75
|
+
return a.sort((e, n) => t(e.obligation, n.obligation) || t(e.kind, n.kind)), {
|
|
76
|
+
findings: a,
|
|
77
|
+
healthy: o.sort(t)
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
function t(e, t) {
|
|
81
|
+
return e === t ? 0 : e < t ? -1 : 1;
|
|
82
|
+
}
|
|
83
|
+
function n(e, n) {
|
|
84
|
+
return t(e.id, n.id);
|
|
85
|
+
}
|
|
86
|
+
function r(e, n, r, i) {
|
|
87
|
+
if (!i || !e.method) return null;
|
|
88
|
+
let a = e.method.trim().toLowerCase(), o = i.methods.filter((e) => e.id.toLowerCase() === a || e.class.toLowerCase() === a);
|
|
89
|
+
if (o.length === 0) return {
|
|
90
|
+
kind: "unknown-method",
|
|
91
|
+
obligation: e.id,
|
|
92
|
+
severity: "medium",
|
|
93
|
+
summary: `${e.id} declares \`${e.method}\`, which is neither a catalog method id nor a catalog class. Nothing can say what discharging it means, so no conformance check can run against it.`
|
|
94
|
+
};
|
|
95
|
+
let s = new Set(o.map((e) => e.evidenceKind).filter((e) => typeof e == "string" && e.length > 0));
|
|
96
|
+
if (s.size === 0) return null;
|
|
97
|
+
let c = n.filter((e, t) => {
|
|
98
|
+
let n = r[t].evidenceKind;
|
|
99
|
+
return typeof n == "string" && n.length > 0 && !s.has(n);
|
|
100
|
+
});
|
|
101
|
+
return c.length === 0 ? null : {
|
|
102
|
+
kind: "method-conformance",
|
|
103
|
+
obligation: e.id,
|
|
104
|
+
severity: "medium",
|
|
105
|
+
summary: `${e.id} declares \`${e.method}\`, whose evidence kind is ${[...s].sort(t).join("/")}, but is discharged by ` + c.map((e) => `a ${r[n.indexOf(e)].evidenceKind} run in ${e.suite}`).join(" and ") + ". A method is not discharged by evidence of another kind."
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
function i(e, t, n) {
|
|
109
|
+
let r = n.multiplicityRequires ?? [];
|
|
110
|
+
if (r.length === 0 || !e.criticality || !r.includes(e.criticality)) return null;
|
|
111
|
+
let i = new Set(t.map((e) => e.suite));
|
|
112
|
+
return i.size >= 2 ? null : {
|
|
113
|
+
kind: "insufficient-multiplicity",
|
|
114
|
+
obligation: e.id,
|
|
115
|
+
severity: "medium",
|
|
116
|
+
summary: `${e.id} is criticality ${e.criticality}, which requires two independent methods, but all its evidence comes from ${[...i].join(", ")}.`
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
function a(e) {
|
|
120
|
+
return `${e.kind}:${e.obligation}`;
|
|
121
|
+
}
|
|
122
|
+
function o(e, t) {
|
|
123
|
+
let n = new Set(t.accepted);
|
|
124
|
+
return e.findings.filter((e) => !n.has(a(e)));
|
|
125
|
+
}
|
|
126
|
+
//#endregion
|
|
127
|
+
export { a as n, o as r, e as t };
|
package/dist/auditor/audit.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { MethodCatalog } from '../advisor/index.js';
|
|
|
5
5
|
export type Severity = "low" | "medium" | "high";
|
|
6
6
|
/** One thing wrong with the evidence for one obligation. */
|
|
7
7
|
export interface Finding {
|
|
8
|
-
kind: "suspect-link" | "stale-evidence" | "vacuous-evidence" | "undischarged" | "method-conformance" | "insufficient-multiplicity";
|
|
8
|
+
kind: "suspect-link" | "stale-evidence" | "vacuous-evidence" | "undischarged" | "method-conformance" | "unknown-method" | "insufficient-multiplicity";
|
|
9
9
|
obligation: string;
|
|
10
10
|
severity: Severity;
|
|
11
11
|
summary: string;
|
|
@@ -39,10 +39,21 @@ export interface AuditReport {
|
|
|
39
39
|
* the inputs, which is what makes the whole thing testable without a repository.
|
|
40
40
|
*/
|
|
41
41
|
export declare function audit(input: AuditInput): AuditReport;
|
|
42
|
-
/**
|
|
42
|
+
/** The baseline key for one finding. */
|
|
43
|
+
export declare function findingKey(finding: Finding): string;
|
|
44
|
+
/**
|
|
45
|
+
* Findings not present in the baseline — what a ratchet fails on.
|
|
46
|
+
*
|
|
47
|
+
* The baseline is a flat set of `<kind>:<obligation>` keys covering **every**
|
|
48
|
+
* finding kind. It used to be two named buckets, `undischarged` and `suspect`,
|
|
49
|
+
* so `stale-evidence`, `vacuous-evidence`, `method-conformance`,
|
|
50
|
+
* `unknown-method` and `insufficient-multiplicity` could never be baselined and
|
|
51
|
+
* `--ratchet` reported the whole existing backlog for all five — which is the
|
|
52
|
+
* outcome this function's own comment says ratchet mode exists to prevent
|
|
53
|
+
* (agent-ix/quoin#105).
|
|
54
|
+
*/
|
|
43
55
|
export declare function ratchet(report: AuditReport, baseline: {
|
|
44
|
-
|
|
45
|
-
suspect: string[];
|
|
56
|
+
accepted: string[];
|
|
46
57
|
}): Finding[];
|
|
47
58
|
/** What changed between two audits — the per-PR delta. */
|
|
48
59
|
export declare function delta(before: AuditReport, after: AuditReport): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.d.ts","sourceRoot":"","sources":["../../src/auditor/audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAi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EAAE,MAAM,EAAE,CAAA;CAAE,GAC/B,OAAO,EAAE,CAKX;AAED,0DAA0D;AAC1D,wBAAgB,KAAK,CACnB,MAAM,EAAE,WAAW,EACnB,KAAK,EAAE,WAAW,GACjB;IAAE,KAAK,EAAE,OAAO,EAAE,CAAC;IAAC,QAAQ,EAAE,OAAO,EAAE,CAAA;CAAE,CAO3C"}
|
package/dist/auditor/index.d.ts
CHANGED
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
* Reads the store and reports. Runs nothing (ADR-0011 invariant 1): an auditor
|
|
5
5
|
* that could re-run a suite could also make a finding disappear by re-running it.
|
|
6
6
|
*/
|
|
7
|
-
export { audit, delta, ratchet, type AuditInput, type AuditReport, type Finding, type Severity, } from './audit.js';
|
|
7
|
+
export { audit, delta, findingKey, ratchet, type AuditInput, type AuditReport, type Finding, type Severity, } from './audit.js';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auditor/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,EACL,KAAK,EACL,OAAO,EACP,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,QAAQ,GACd,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auditor/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EACL,KAAK,EACL,KAAK,EACL,UAAU,EACV,OAAO,EACP,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,OAAO,EACZ,KAAK,QAAQ,GACd,MAAM,YAAY,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./version-
|
|
1
|
+
import { t as e } from "./version-DmZHxX4n.js";
|
|
2
2
|
import { BaseCommand as t, maybeOfferUpdate as n } from "@agent-ix/ix-cli-core";
|
|
3
3
|
import { existsSync as r, readFileSync as i, readdirSync as a, statSync as o } from "node:fs";
|
|
4
4
|
import { basename as s, join as c, resolve as l } from "node:path";
|
package/dist/cli.js
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { QuoinCommand } from '../base.js';
|
|
2
|
+
export default class Advise 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
|
+
"mismatch-only": import('@oclif/core/interfaces').BooleanFlag<boolean>;
|
|
10
|
+
"inconclusive-only": 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=advise.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"advise.d.ts","sourceRoot":"","sources":["../../src/commands/advise.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAa1C,MAAM,CAAC,OAAO,OAAO,MAAO,SAAQ,YAAY;IAC9C,MAAM,CAAC,OAAO,SAC6D;IAC3E,MAAM,CAAC,WAAW,SAY4D;IAE9E,MAAM,CAAC,QAAQ,WAIb;IAEF,MAAM,CAAC,KAAK;;;;;;MAaV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;IA4D1B,OAAO,CAAC,MAAM;CAqBf"}
|
|
@@ -0,0 +1,161 @@
|
|
|
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";
|
|
5
|
+
//#region src/advisor/advise.ts
|
|
6
|
+
var l = [
|
|
7
|
+
["temporal", /\b(always|never|eventually|while|until|continuously)\b/i],
|
|
8
|
+
["liveness", /\b(eventually|makes progress|terminates)\b/i],
|
|
9
|
+
["invariance", /\b(invariant|holds for every|at all times)\b/i],
|
|
10
|
+
["concurrent", /\b(concurrent|parallel|race|thread|simultaneous)\b/i],
|
|
11
|
+
["reliability", /\b(tolerat|degrad|retry|failover|resilien|recover)/i],
|
|
12
|
+
["latency", /\b(latency|response time|within\s+\d|\d\s*ms\b|p9\d)/i],
|
|
13
|
+
["throughput", /\b(throughput|per second|requests\/s|rps)\b/i],
|
|
14
|
+
["quantified-threshold", /[<>≤≥]\s*\d|\b\d+\s*(ms|s|%|MB|GB)\b/i],
|
|
15
|
+
["security", /\b(authenticat|authoriz|permission|credential|secret|token|attack|exploit)/i],
|
|
16
|
+
["untrusted-input", /\b(untrusted|user-supplied|external input|malformed)\b/i],
|
|
17
|
+
["input-validation", /\b(reject|validate|malformed|invalid input)\b/i],
|
|
18
|
+
["parser", /\b(pars|deserializ|decode|lex)/i],
|
|
19
|
+
["configuration-matrix", /\b(configuration|feature flag|combination of|matrix of)\b/i],
|
|
20
|
+
["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
|
+
["user-visible", /\b(user|operator|the UI|displays|screen)\b/i],
|
|
23
|
+
["stable-output", /\b(byte-identical|identical output|serializ|snapshot)\b/i],
|
|
24
|
+
["agent-behaviour", /\b(agent|transcript|prompt)\b/i],
|
|
25
|
+
["no-executable-oracle", /\b(review|judgement|readable|documented)\b/i]
|
|
26
|
+
];
|
|
27
|
+
function u(e) {
|
|
28
|
+
return l.filter(([, t]) => t.test(e)).map(([e]) => e).sort();
|
|
29
|
+
}
|
|
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 = [];
|
|
32
|
+
for (let t of e.methods) {
|
|
33
|
+
let e = f(t, {
|
|
34
|
+
characteristics: n,
|
|
35
|
+
property_shapes: r,
|
|
36
|
+
object_types: i,
|
|
37
|
+
archetypes: a
|
|
38
|
+
});
|
|
39
|
+
e.length !== 0 && o.push({
|
|
40
|
+
method: t.id,
|
|
41
|
+
class: t.class,
|
|
42
|
+
evidenceKind: t.evidenceKind,
|
|
43
|
+
reasons: e
|
|
44
|
+
});
|
|
45
|
+
}
|
|
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());
|
|
48
|
+
return {
|
|
49
|
+
obligation: t.id,
|
|
50
|
+
recommended: o,
|
|
51
|
+
authored: s,
|
|
52
|
+
mismatch: l,
|
|
53
|
+
inconclusive: c
|
|
54
|
+
};
|
|
55
|
+
}
|
|
56
|
+
function f(e, t) {
|
|
57
|
+
let n = [];
|
|
58
|
+
for (let [r, i] of Object.entries(e.applicability)) {
|
|
59
|
+
let e = t[r];
|
|
60
|
+
if (e) for (let t of i) e.has(t) && n.push({
|
|
61
|
+
rule: r,
|
|
62
|
+
value: t
|
|
63
|
+
});
|
|
64
|
+
}
|
|
65
|
+
return n.sort((e, t) => m(e.rule, t.rule) || m(e.value, t.value));
|
|
66
|
+
}
|
|
67
|
+
function p(e) {
|
|
68
|
+
if (!e) return null;
|
|
69
|
+
let t = (e.includes("(") ? e.slice(0, e.indexOf("(")) : e).trim();
|
|
70
|
+
return t.length > 0 ? t : null;
|
|
71
|
+
}
|
|
72
|
+
function m(e, t) {
|
|
73
|
+
return e === t ? 0 : e < t ? -1 : 1;
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/commands/advise.ts
|
|
77
|
+
var h = class e extends o {
|
|
78
|
+
static summary = "Recommend a verification method for each obligation, from the catalog.";
|
|
79
|
+
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
|
+
static examples = [
|
|
81
|
+
"quoin advise",
|
|
82
|
+
"quoin advise --mismatch-only",
|
|
83
|
+
"quoin advise --json"
|
|
84
|
+
];
|
|
85
|
+
static flags = {
|
|
86
|
+
repo: c.string({
|
|
87
|
+
description: "Repository root.",
|
|
88
|
+
default: "."
|
|
89
|
+
}),
|
|
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." })
|
|
94
|
+
};
|
|
95
|
+
async run() {
|
|
96
|
+
let { flags: i } = await this.parse(e), o = r(a());
|
|
97
|
+
o && this.error(o.message, { exit: 2 });
|
|
98
|
+
let c = t(n(((e) => {
|
|
99
|
+
let t = [
|
|
100
|
+
e,
|
|
101
|
+
"--scope",
|
|
102
|
+
i.repo,
|
|
103
|
+
"--json"
|
|
104
|
+
];
|
|
105
|
+
return i.module && t.push("--module", i.module), t;
|
|
106
|
+
})("coverage")));
|
|
107
|
+
c.ok || this.error(c.error.message, { exit: 2 });
|
|
108
|
+
let l = s(i.module ? [i.module] : void 0);
|
|
109
|
+
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
|
+
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
|
+
if (i["mismatch-only"] && (p = p.filter((e) => e.mismatch)), i["inconclusive-only"] && (p = p.filter((e) => e.inconclusive)), i.json) {
|
|
115
|
+
this.log(JSON.stringify({ advice: p }, null, 2));
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
this.render(p, f.length);
|
|
119
|
+
}
|
|
120
|
+
render(e, t) {
|
|
121
|
+
for (let t of e) {
|
|
122
|
+
let e = t.recommended.slice(0, 3).map((e) => `${e.method} (${e.reasons.map((e) => e.value).join(", ")})`).join("; ");
|
|
123
|
+
this.log(`${t.obligation} authored=${t.authored ?? "—"} ` + (t.inconclusive ? "inconclusive" : `recommend: ${e}`) + (t.mismatch ? " ⚠ mismatch" : ""));
|
|
124
|
+
}
|
|
125
|
+
this.log("");
|
|
126
|
+
let n = e.filter((e) => e.mismatch).length, r = e.filter((e) => e.inconclusive).length;
|
|
127
|
+
this.log(`${e.length} of ${t} obligation(s) shown — ${n} mismatch, ${r} inconclusive. Recommendations, not verdicts: confirm the method in spec review.`);
|
|
128
|
+
}
|
|
129
|
+
};
|
|
130
|
+
function g(t) {
|
|
131
|
+
let n = [
|
|
132
|
+
"properties",
|
|
133
|
+
"spec/**/*.md",
|
|
134
|
+
"--scope",
|
|
135
|
+
t,
|
|
136
|
+
"--json"
|
|
137
|
+
], r = /* @__PURE__ */ new Map(), a = i(n);
|
|
138
|
+
if (!a.stdout.trim()) return r;
|
|
139
|
+
let o = e(a.stdout);
|
|
140
|
+
if (!o.ok) return r;
|
|
141
|
+
for (let e of o.value.documents) for (let t of e.criteria) t.row_id && r.set(t.row_id, {
|
|
142
|
+
property: t.property,
|
|
143
|
+
archetype: e.archetype
|
|
144
|
+
});
|
|
145
|
+
return r;
|
|
146
|
+
}
|
|
147
|
+
function _(e, t) {
|
|
148
|
+
return {
|
|
149
|
+
id: e.id,
|
|
150
|
+
statement: e.statement,
|
|
151
|
+
authoredMethod: e.method ?? null,
|
|
152
|
+
propertyShape: t?.property ?? null,
|
|
153
|
+
archetype: t?.archetype ?? v(e.id)
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
function v(e) {
|
|
157
|
+
let t = e.split("-")[0];
|
|
158
|
+
return t.length > 0 ? t : null;
|
|
159
|
+
}
|
|
160
|
+
//#endregion
|
|
161
|
+
export { h as default };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { o as e, t } from "../../base-
|
|
2
|
-
import { n } from "../../modules-
|
|
1
|
+
import { o as e, t } from "../../base-D_-Jy4cE.js";
|
|
2
|
+
import { n } from "../../modules-DSkUXhHn.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-
|
|
2
|
-
import { n as t } from "../../modules-
|
|
3
|
-
import { n, t as r } from "../../advisor-
|
|
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";
|
|
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-
|
|
2
|
-
import { n as r } from "../../modules-
|
|
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";
|
|
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-
|
|
2
|
-
import { n } from "../../modules-
|
|
1
|
+
import { o as e, t } from "../../base-D_-Jy4cE.js";
|
|
2
|
+
import { n } from "../../modules-DSkUXhHn.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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"affirm.d.ts","sourceRoot":"","sources":["../../../src/commands/evidence/affirm.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"affirm.d.ts","sourceRoot":"","sources":["../../../src/commands/evidence/affirm.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAc7C,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,YAAY;IACtD,MAAM,CAAC,OAAO,SAC2D;IACzE,MAAM,CAAC,WAAW,SAWgD;IAElE,MAAM,CAAC,QAAQ,WAGb;IAEF,MAAM,CAAC,KAAK;;;;;;;;MAkBV;IAEI,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC;CAoE3B"}
|