@agent-ix/quoin 0.1.3
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/.agents/plugins/marketplace.json +14 -0
- package/.claude-plugin/marketplace.json +16 -0
- package/.claude-plugin/plugin.json +8 -0
- package/.codex-plugin/plugin.json +27 -0
- package/.github/plugin/marketplace.json +16 -0
- package/LICENSE +21 -0
- package/README.md +266 -0
- package/bin/quoin.js +14 -0
- package/default-modules.yaml +82 -0
- package/dist/base-DrUMkAh1.js +137 -0
- package/dist/base.d.ts +23 -0
- package/dist/base.d.ts.map +1 -0
- package/dist/catalog.d.ts +32 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/cli.d.ts +18 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +20 -0
- package/dist/commands/catalog/index.d.ts +2 -0
- package/dist/commands/catalog/index.d.ts.map +1 -0
- package/dist/commands/catalog/index.js +2 -0
- package/dist/commands/catalog/list.d.ts +11 -0
- package/dist/commands/catalog/list.d.ts.map +1 -0
- package/dist/commands/catalog/list.js +22 -0
- package/dist/commands/catalog/show.d.ts +13 -0
- package/dist/commands/catalog/show.d.ts.map +1 -0
- package/dist/commands/catalog/show.js +25 -0
- package/dist/commands/catalog/validate.d.ts +10 -0
- package/dist/commands/catalog/validate.d.ts.map +1 -0
- package/dist/commands/catalog/validate.js +27 -0
- package/dist/commands/config/doctor.d.ts +7 -0
- package/dist/commands/config/doctor.d.ts.map +1 -0
- package/dist/commands/config/doctor.js +15 -0
- package/dist/commands/config/edit.d.ts +7 -0
- package/dist/commands/config/edit.d.ts.map +1 -0
- package/dist/commands/config/edit.js +13 -0
- package/dist/commands/config/get.d.ts +11 -0
- package/dist/commands/config/get.d.ts.map +1 -0
- package/dist/commands/config/get.js +20 -0
- package/dist/commands/config/index.d.ts +2 -0
- package/dist/commands/config/index.d.ts.map +1 -0
- package/dist/commands/config/index.js +2 -0
- package/dist/commands/config/set.d.ts +12 -0
- package/dist/commands/config/set.d.ts.map +1 -0
- package/dist/commands/config/set.js +26 -0
- package/dist/commands/matrix.d.ts +14 -0
- package/dist/commands/matrix.d.ts.map +1 -0
- package/dist/commands/matrix.js +15 -0
- package/dist/commands/module/ensure-defaults.d.ts +8 -0
- package/dist/commands/module/ensure-defaults.d.ts.map +1 -0
- package/dist/commands/module/ensure-defaults.js +17 -0
- package/dist/commands/module/index.d.ts +2 -0
- package/dist/commands/module/index.d.ts.map +1 -0
- package/dist/commands/module/index.js +2 -0
- package/dist/commands/module/install.d.ts +11 -0
- package/dist/commands/module/install.d.ts.map +1 -0
- package/dist/commands/module/install.js +22 -0
- package/dist/commands/module/list.d.ts +8 -0
- package/dist/commands/module/list.d.ts.map +1 -0
- package/dist/commands/module/list.js +13 -0
- package/dist/commands/module/remove.d.ts +10 -0
- package/dist/commands/module/remove.d.ts.map +1 -0
- package/dist/commands/module/remove.js +16 -0
- package/dist/commands/plugin/deprecation.d.ts +10 -0
- package/dist/commands/plugin/deprecation.d.ts.map +1 -0
- package/dist/commands/plugin/ensure-defaults.d.ts +8 -0
- package/dist/commands/plugin/ensure-defaults.d.ts.map +1 -0
- package/dist/commands/plugin/ensure-defaults.js +12 -0
- package/dist/commands/plugin/index.d.ts +2 -0
- package/dist/commands/plugin/index.d.ts.map +1 -0
- package/dist/commands/plugin/index.js +2 -0
- package/dist/commands/plugin/install.d.ts +8 -0
- package/dist/commands/plugin/install.d.ts.map +1 -0
- package/dist/commands/plugin/install.js +12 -0
- package/dist/commands/plugin/list.d.ts +8 -0
- package/dist/commands/plugin/list.d.ts.map +1 -0
- package/dist/commands/plugin/list.js +12 -0
- package/dist/commands/plugin/remove.d.ts +8 -0
- package/dist/commands/plugin/remove.d.ts.map +1 -0
- package/dist/commands/plugin/remove.js +12 -0
- package/dist/commands/review.d.ts +14 -0
- package/dist/commands/review.d.ts.map +1 -0
- package/dist/commands/review.js +15 -0
- package/dist/commands/to-plan.d.ts +14 -0
- package/dist/commands/to-plan.d.ts.map +1 -0
- package/dist/commands/to-plan.js +15 -0
- package/dist/commands/update.d.ts +13 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +34 -0
- package/dist/commands/write.d.ts +16 -0
- package/dist/commands/write.d.ts.map +1 -0
- package/dist/commands/write.js +33 -0
- package/dist/config-schema-Dp-vlxuR.js +13 -0
- package/dist/config-schema.d.ts +52 -0
- package/dist/config-schema.d.ts.map +1 -0
- package/dist/deprecation-fRxUHoxv.js +4 -0
- package/dist/flow-command-SMjCSOFg.js +88 -0
- package/dist/flow-command.d.ts +25 -0
- package/dist/flow-command.d.ts.map +1 -0
- package/dist/flows.d.ts +7 -0
- package/dist/flows.d.ts.map +1 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +9 -0
- package/dist/modules-CW8pBK41.js +22 -0
- package/dist/modules.d.ts +10 -0
- package/dist/modules.d.ts.map +1 -0
- package/dist/org.d.ts +61 -0
- package/dist/org.d.ts.map +1 -0
- package/dist/plugins-GSxafyD3.js +77 -0
- package/dist/plugins.d.ts +13 -0
- package/dist/plugins.d.ts.map +1 -0
- package/dist/version-_1nY4KyJ.js +17 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/write-CQAitcI5.js +156 -0
- package/dist/write.d.ts +28 -0
- package/dist/write.d.ts.map +1 -0
- package/package.json +119 -0
- package/skills/gap-analysis/SKILL.md +97 -0
- package/skills/gap-analysis/references/step-1-target-selection.md +53 -0
- package/skills/gap-analysis/references/step-2-plan-completion.md +49 -0
- package/skills/gap-analysis/references/step-3-matrix-verification.md +54 -0
- package/skills/gap-analysis/references/step-4-underspecified-code.md +63 -0
- package/skills/gap-analysis/references/step-5-semantic-review.md +51 -0
- package/skills/gap-analysis/references/step-6-specreview-artifact.md +95 -0
- package/skills/spec-app-review/SKILL.md +51 -0
- package/skills/spec-app-review/references/checklist.md +197 -0
- package/skills/spec-dependency-analysis/SKILL.md +75 -0
- package/skills/spec-ears-analysis/SKILL.md +89 -0
- package/skills/spec-evidence-analysis/SKILL.md +78 -0
- package/skills/spec-failure-domain-analysis/SKILL.md +44 -0
- package/skills/spec-ideation/SKILL.md +46 -0
- package/skills/spec-integrity-analysis/SKILL.md +47 -0
- package/skills/spec-matrix/SKILL.md +168 -0
- package/skills/spec-matrix/assets/test-cases/TC-001.md +35 -0
- package/skills/spec-matrix/assets/test-cases/TC-002.md +37 -0
- package/skills/spec-matrix/assets/test-cases/TC-006.md +50 -0
- package/skills/spec-matrix/assets/test-matrix-example.md +104 -0
- package/skills/spec-matrix/assets/test-matrix-template.md +123 -0
- package/skills/spec-matrix/workflow-assets/skills/matrix/SKILL.md +35 -0
- package/skills/spec-matrix/workflow-assets/skills/matrix/scripts/invariants.js +1 -0
- package/skills/spec-matrix/workflow-assets/skills/matrix/templates/report/default.md +30 -0
- package/skills/spec-matrix/workflow-assets/skills/matrix/workflows/matrix/def.yaml +82 -0
- package/skills/spec-object-review/SKILL.md +125 -0
- package/skills/spec-object-review/references/object-type-guide.md +118 -0
- package/skills/spec-review/SKILL.md +71 -0
- package/skills/spec-review/references/checklist.md +50 -0
- package/skills/spec-review/workflow-assets/skills/review/SKILL.md +96 -0
- package/skills/spec-review/workflow-assets/skills/review/scripts/invariants.js +60 -0
- package/skills/spec-review/workflow-assets/skills/review/workflows/review/def.yaml +68 -0
- package/skills/spec-risk-complexity-analysis/SKILL.md +77 -0
- package/skills/spec-scope-boundary-analysis/SKILL.md +86 -0
- package/skills/spec-security-analysis/SKILL.md +84 -0
- package/skills/spec-security-analysis/assets/security-analysis-example.md +89 -0
- package/skills/spec-security-analysis/assets/security-analysis-template.md +73 -0
- package/skills/spec-security-analysis/references/component-type-mapping.md +161 -0
- package/skills/spec-security-analysis/references/gdpr/ChII-Principles.md +58 -0
- package/skills/spec-security-analysis/references/gdpr/ChIII-DataSubjectRights.md +84 -0
- package/skills/spec-security-analysis/references/gdpr/ChIV-ControllerProcessor.md +83 -0
- package/skills/spec-security-analysis/references/gdpr/ChV-DataTransfers.md +62 -0
- package/skills/spec-security-analysis/references/gdpr/index.md +54 -0
- package/skills/spec-security-analysis/references/iso27001/A5-OrganizationalControls.md +64 -0
- package/skills/spec-security-analysis/references/iso27001/A6-PeopleControls.md +30 -0
- package/skills/spec-security-analysis/references/iso27001/A7-PhysicalControls.md +35 -0
- package/skills/spec-security-analysis/references/iso27001/A8-TechnologicalControls.md +66 -0
- package/skills/spec-security-analysis/references/iso27001/index.md +43 -0
- package/skills/spec-security-analysis/references/nist-800-53/AC-AccessControl.md +57 -0
- package/skills/spec-security-analysis/references/nist-800-53/AU-AuditAccountability.md +49 -0
- package/skills/spec-security-analysis/references/nist-800-53/CM-ConfigurationManagement.md +36 -0
- package/skills/spec-security-analysis/references/nist-800-53/IA-IdentificationAuthentication.md +44 -0
- package/skills/spec-security-analysis/references/nist-800-53/SA-SystemServicesAcquisition.md +50 -0
- package/skills/spec-security-analysis/references/nist-800-53/SC-SystemCommunications.md +53 -0
- package/skills/spec-security-analysis/references/nist-800-53/SI-SystemInformationIntegrity.md +52 -0
- package/skills/spec-security-analysis/references/nist-800-53/index.md +58 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V1-Architecture.md +33 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V10-MaliciousCode.md +33 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V11-BusinessLogic.md +32 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V12-Files.md +34 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V13-API.md +34 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V14-Configuration.md +35 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V2-Authentication.md +36 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V3-SessionManagement.md +35 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V4-AccessControl.md +39 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V5-Validation.md +37 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V6-Cryptography.md +34 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V7-ErrorLogging.md +37 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V8-DataProtection.md +34 -0
- package/skills/spec-security-analysis/references/owasp-asvs/V9-Communication.md +32 -0
- package/skills/spec-security-analysis/references/owasp-asvs/index.md +59 -0
- package/skills/spec-security-analysis/references/soc2/CC1-ControlEnvironment.md +31 -0
- package/skills/spec-security-analysis/references/soc2/CC2-CommunicationInformation.md +27 -0
- package/skills/spec-security-analysis/references/soc2/CC3-RiskAssessment.md +29 -0
- package/skills/spec-security-analysis/references/soc2/CC4-MonitoringActivities.md +27 -0
- package/skills/spec-security-analysis/references/soc2/CC5-ControlActivities.md +28 -0
- package/skills/spec-security-analysis/references/soc2/CC6-LogicalPhysicalAccess.md +45 -0
- package/skills/spec-security-analysis/references/soc2/CC7-SystemOperations.md +42 -0
- package/skills/spec-security-analysis/references/soc2/CC8-ChangeManagement.md +32 -0
- package/skills/spec-security-analysis/references/soc2/CC9-RiskMitigation.md +34 -0
- package/skills/spec-security-analysis/references/soc2/index.md +46 -0
- package/skills/spec-security-analysis/references/standards-index.md +46 -0
- package/skills/spec-to-plan/SKILL.md +75 -0
- package/skills/spec-to-plan/references/step-0-plan-selection.md +121 -0
- package/skills/spec-to-plan/references/step-1-analysis.md +88 -0
- package/skills/spec-to-plan/references/step-2-test-plan.md +43 -0
- package/skills/spec-to-plan/references/step-3-execution-plan.md +218 -0
- package/skills/spec-to-plan/workflow-assets/skills/to-plan/SKILL.md +35 -0
- package/skills/spec-to-plan/workflow-assets/skills/to-plan/scripts/invariants.js +1 -0
- package/skills/spec-to-plan/workflow-assets/skills/to-plan/templates/implementation-plan/default.md +44 -0
- package/skills/spec-to-plan/workflow-assets/skills/to-plan/workflows/to-plan/def.yaml +85 -0
- package/skills/specify/SKILL.md +154 -0
- package/skills/specify/assets/app-spec-template.md +143 -0
- package/skills/specify/assets/spec-template.md +299 -0
- package/skills/specify/references/integration-tests.md +72 -0
- package/skills/specify/references/us-to-fr.md +40 -0
- package/skills/specify/references/writing-good-requirements.md +61 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { InstallOptions, InstalledPlugin, Source } from '@agent-ix/ts-plugin-kit';
|
|
2
|
+
export type { InstalledPlugin } from '@agent-ix/ts-plugin-kit';
|
|
3
|
+
export declare function registryPath(home?: string): string;
|
|
4
|
+
/** Shared ts-plugin-kit install options for this home (default-set reconcile + ad-hoc install). */
|
|
5
|
+
export declare function installOptions(home: string): InstallOptions;
|
|
6
|
+
/** Map a quoin CLI source argument to a typed ts-plugin-kit {@link Source}. */
|
|
7
|
+
export declare function parseSourceArg(arg: string): Source;
|
|
8
|
+
export declare function installPlugin(source: string, home?: string): InstalledPlugin;
|
|
9
|
+
export declare function listPlugins(home?: string): InstalledPlugin[];
|
|
10
|
+
export declare function removePlugin(name: string, home?: string): void;
|
|
11
|
+
/** Read a module's declared name from its `manifest.yaml`. Used as the `readName` hook. */
|
|
12
|
+
export declare function readModuleName(moduleRoot: string): string;
|
|
13
|
+
//# sourceMappingURL=plugins.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plugins.d.ts","sourceRoot":"","sources":["../src/plugins.ts"],"names":[],"mappings":"AAIA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,KAAK,MAAM,EACZ,MAAM,yBAAyB,CAAC;AAIjC,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE/D,wBAAgB,YAAY,CAAC,IAAI,SAAW,GAAG,MAAM,CAEpD;AAED,mGAAmG;AACnG,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAQ3D;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CA6BlD;AAED,wBAAgB,aAAa,CAC3B,MAAM,EAAE,MAAM,EACd,IAAI,SAAW,GACd,eAAe,CAEjB;AAED,wBAAgB,WAAW,CAAC,IAAI,SAAW,GAAG,eAAe,EAAE,CAE9D;AAED,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,SAAW,GAAG,IAAI,CAUhE;AAED,2FAA2F;AAC3F,wBAAgB,cAAc,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAazD"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { readFileSync as e } from "node:fs";
|
|
2
|
+
import { dirname as t, join as n } from "node:path";
|
|
3
|
+
import { fileURLToPath as r } from "node:url";
|
|
4
|
+
//#region src/version.ts
|
|
5
|
+
function i() {
|
|
6
|
+
let i = t(t(r(import.meta.url))), a = JSON.parse(e(n(i, "package.json"), "utf8"));
|
|
7
|
+
if (typeof a.version != "string") throw Error("package.json version is missing");
|
|
8
|
+
return a.version;
|
|
9
|
+
}
|
|
10
|
+
function a(e) {
|
|
11
|
+
return e || i();
|
|
12
|
+
}
|
|
13
|
+
function o() {
|
|
14
|
+
return a("0.6.0-4-g1fef9d1");
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { a as n, o as t };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAsBA,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAGpD;AAED,wBAAgB,cAAc,IAAI,MAAM,CAMvC"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { i as e } from "./base-DrUMkAh1.js";
|
|
2
|
+
import { n as t, r as n, t as r } from "./config-schema-Dp-vlxuR.js";
|
|
3
|
+
import { ConfigService as i } from "@agent-ix/ix-cli-core";
|
|
4
|
+
import { existsSync as a, readFileSync as o, statSync as s } from "node:fs";
|
|
5
|
+
import { join as c, resolve as l } from "node:path";
|
|
6
|
+
//#region src/org.ts
|
|
7
|
+
var u = "could not determine the authoring organization: no --org flag, no QUOIN_ORG, no stored config, and no [remote \"origin\"] in .git/config. Pass --org <name>, or store one with `quoin config set org <name>`.";
|
|
8
|
+
function d(e, t = {}) {
|
|
9
|
+
let n = t.flag?.trim();
|
|
10
|
+
if (n) return {
|
|
11
|
+
org: n,
|
|
12
|
+
source: "flag"
|
|
13
|
+
};
|
|
14
|
+
if (t.env) {
|
|
15
|
+
let e = t.env.QUOIN_ORG?.trim();
|
|
16
|
+
if (e) return {
|
|
17
|
+
org: e,
|
|
18
|
+
source: "env"
|
|
19
|
+
};
|
|
20
|
+
} else {
|
|
21
|
+
let e = f(t);
|
|
22
|
+
if (e) return {
|
|
23
|
+
org: e,
|
|
24
|
+
source: process.env.QUOIN_ORG?.trim() === e ? "env" : "config"
|
|
25
|
+
};
|
|
26
|
+
}
|
|
27
|
+
let r = p(e);
|
|
28
|
+
return r ? {
|
|
29
|
+
org: r,
|
|
30
|
+
source: "git"
|
|
31
|
+
} : { source: "none" };
|
|
32
|
+
}
|
|
33
|
+
function f(e) {
|
|
34
|
+
return i.forPlugin(t, n, {
|
|
35
|
+
envBindings: r,
|
|
36
|
+
...e.projectConfigRoot ? { projectConfigRoot: e.projectConfigRoot } : {},
|
|
37
|
+
...e.projectConfigEnabled === void 0 ? {} : { projectConfigEnabled: e.projectConfigEnabled }
|
|
38
|
+
}).get().org?.trim();
|
|
39
|
+
}
|
|
40
|
+
function p(e) {
|
|
41
|
+
let t = m(e);
|
|
42
|
+
if (t) try {
|
|
43
|
+
return h(o(c(t, "config"), "utf8"));
|
|
44
|
+
} catch {
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
function m(e) {
|
|
49
|
+
let t = c(e, ".git"), n;
|
|
50
|
+
try {
|
|
51
|
+
n = s(t);
|
|
52
|
+
} catch {
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (n.isDirectory()) return t;
|
|
56
|
+
try {
|
|
57
|
+
let n = o(t, "utf8").match(/^gitdir:\s*(.+)$/m)?.[1];
|
|
58
|
+
if (!n) return;
|
|
59
|
+
let r = l(e, n.trim());
|
|
60
|
+
try {
|
|
61
|
+
return l(r, o(c(r, "commondir"), "utf8").trim());
|
|
62
|
+
} catch {
|
|
63
|
+
return r;
|
|
64
|
+
}
|
|
65
|
+
} catch {
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
function h(e) {
|
|
70
|
+
let t = !1;
|
|
71
|
+
for (let n of e.split("\n")) {
|
|
72
|
+
let e = n.trim();
|
|
73
|
+
if (e.startsWith("[")) {
|
|
74
|
+
t = e.replaceAll(/\s/g, "").toLowerCase().startsWith("[remote") && e.replaceAll(/\s/g, "").slice(7) === "\"origin\"]";
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
if (!t || !e.startsWith("url")) continue;
|
|
78
|
+
let r = e.slice(3).trimStart();
|
|
79
|
+
if (r.startsWith("=")) return g(r.slice(1).trim());
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function g(e) {
|
|
83
|
+
let t, n = /^[A-Za-z][A-Za-z0-9+.-]*:\/\//.exec(e);
|
|
84
|
+
if (n) {
|
|
85
|
+
if (e.slice(0, n[0].length - 3).toLowerCase() === "file") return;
|
|
86
|
+
let r = e.slice(n[0].length).indexOf("/");
|
|
87
|
+
if (r === -1) return;
|
|
88
|
+
t = e.slice(n[0].length + r + 1);
|
|
89
|
+
} else if (!e.startsWith("/") && !e.startsWith(".") && !e.startsWith("~")) {
|
|
90
|
+
let n = e.indexOf(":");
|
|
91
|
+
if (n === -1) return;
|
|
92
|
+
t = e.slice(n + 1);
|
|
93
|
+
} else return;
|
|
94
|
+
let r = t.replace(/\/+$/, "").split("/").filter(Boolean);
|
|
95
|
+
if (!(r.length < 2)) return r[r.length - 2];
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
//#region src/write.ts
|
|
99
|
+
var _ = {
|
|
100
|
+
flag: "--org",
|
|
101
|
+
env: "QUOIN_ORG",
|
|
102
|
+
config: "stored config",
|
|
103
|
+
git: "git remote",
|
|
104
|
+
none: "nothing"
|
|
105
|
+
};
|
|
106
|
+
function v(e) {
|
|
107
|
+
return (Array.isArray(e) ? e : e ? [e] : []).flatMap((e) => e.split(",")).map((e) => e.trim()).filter(Boolean);
|
|
108
|
+
}
|
|
109
|
+
function y(t, n, r, i = {}) {
|
|
110
|
+
if (r.length === 0) throw Error("write requires --types <type[,type...]>");
|
|
111
|
+
let o = l(n);
|
|
112
|
+
if (!a(o) || !s(o).isDirectory()) throw Error(`write repo_dir is not a directory: ${n}`);
|
|
113
|
+
let c = r.map((n) => {
|
|
114
|
+
let r = e(t, n);
|
|
115
|
+
if (!r) throw Error(`catalog type not found: ${n}\nAvailable types: ${t.entries.map((e) => e.name).sort((e, t) => e.localeCompare(t)).join(", ")}`);
|
|
116
|
+
return x(r);
|
|
117
|
+
}), { org: u, source: f } = d(o, { flag: i.org });
|
|
118
|
+
return {
|
|
119
|
+
repoRoot: o,
|
|
120
|
+
...u ? { org: u } : {},
|
|
121
|
+
orgSource: f,
|
|
122
|
+
types: c,
|
|
123
|
+
validation: {
|
|
124
|
+
command: `quire validate --scope ${S(o)} "spec/**/*.md"`,
|
|
125
|
+
scope: o,
|
|
126
|
+
globs: ["spec/**/*.md"]
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
function b(e) {
|
|
131
|
+
let t = [
|
|
132
|
+
"quoin write",
|
|
133
|
+
"",
|
|
134
|
+
`Repo: ${e.repoRoot}`,
|
|
135
|
+
e.org ? `Org: ${e.org} (from ${_[e.orgSource]})` : `Org: unresolved — ${u}`,
|
|
136
|
+
"",
|
|
137
|
+
"Authoring contracts:"
|
|
138
|
+
];
|
|
139
|
+
for (let n of e.types) t.push(`- ${n.name} (${n.kind})`), t.push(` module: ${n.moduleName}`), t.push(` module_root: ${n.moduleRoot}`), n.skeletonPath && t.push(` skeleton: ${n.skeletonPath}`), n.schemaPath && t.push(` schema: ${n.schemaPath}`), !n.skeletonPath && !n.schemaPath && t.push(" contract: manifest only");
|
|
140
|
+
return t.push(""), t.push("Author files directly in the repo, then validate changed spec files."), t.push(`Validate scope: ${e.validation.scope}`), t.push(`Validate command: ${e.validation.command}`), t.join("\n");
|
|
141
|
+
}
|
|
142
|
+
function x(e) {
|
|
143
|
+
return {
|
|
144
|
+
name: e.name,
|
|
145
|
+
kind: e.kind,
|
|
146
|
+
moduleName: e.moduleName,
|
|
147
|
+
moduleRoot: e.moduleRoot,
|
|
148
|
+
...e.schemaPath ? { schemaPath: e.schemaPath } : {},
|
|
149
|
+
...e.skeletonPath ? { skeletonPath: e.skeletonPath } : {}
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
function S(e) {
|
|
153
|
+
return /^[A-Za-z0-9_./:-]+$/.test(e) ? e : `'${e.replaceAll("'", "'\\''")}'`;
|
|
154
|
+
}
|
|
155
|
+
//#endregion
|
|
156
|
+
export { h as a, u as i, b as n, d as o, v as r, y as t };
|
package/dist/write.d.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SpecCatalog } from './catalog.js';
|
|
2
|
+
import { OrgSource } from './org.js';
|
|
3
|
+
export interface AuthoringContract {
|
|
4
|
+
name: string;
|
|
5
|
+
kind: "artifact" | "object";
|
|
6
|
+
moduleName: string;
|
|
7
|
+
moduleRoot: string;
|
|
8
|
+
schemaPath?: string;
|
|
9
|
+
skeletonPath?: string;
|
|
10
|
+
}
|
|
11
|
+
export interface AuthoringPack {
|
|
12
|
+
repoRoot: string;
|
|
13
|
+
/** Authoring organization, absent when no source yielded one (FR-025). */
|
|
14
|
+
org?: string;
|
|
15
|
+
orgSource: OrgSource;
|
|
16
|
+
types: AuthoringContract[];
|
|
17
|
+
validation: {
|
|
18
|
+
command: string;
|
|
19
|
+
scope: string;
|
|
20
|
+
globs: string[];
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export declare function parseTypeList(value: string | string[] | undefined): string[];
|
|
24
|
+
export declare function createAuthoringPack(catalog: SpecCatalog, repoDir: string, typeNames: string[], options?: {
|
|
25
|
+
org?: string;
|
|
26
|
+
}): AuthoringPack;
|
|
27
|
+
export declare function formatAuthoringPack(pack: AuthoringPack): string;
|
|
28
|
+
//# sourceMappingURL=write.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../src/write.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,WAAW,EAGjB,MAAM,cAAc,CAAC;AACtB,OAAO,EAA0B,KAAK,SAAS,EAAc,MAAM,UAAU,CAAC;AAW9E,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC5B,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED,MAAM,WAAW,aAAa;IAC5B,QAAQ,EAAE,MAAM,CAAC;IACjB,0EAA0E;IAC1E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,KAAK,EAAE,iBAAiB,EAAE,CAAC;IAC3B,UAAU,EAAE;QACV,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,KAAK,EAAE,MAAM,EAAE,CAAC;KACjB,CAAC;CACH;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,GAAG,MAAM,EAAE,CAM5E;AAED,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,WAAW,EACpB,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EAAE,EACnB,OAAO,GAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAO,GAC7B,aAAa,CAmCf;AAED,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,aAAa,GAAG,MAAM,CA4B/D"}
|
package/package.json
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@agent-ix/quoin",
|
|
3
|
+
"description": "Spec-driven development for Claude Code — author validated, ISO/IEC/IEEE 29148-aligned specs, then plan and build against them.",
|
|
4
|
+
"version": "0.1.3",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/",
|
|
9
|
+
"default-modules.yaml",
|
|
10
|
+
"skills/",
|
|
11
|
+
"bin/",
|
|
12
|
+
".claude-plugin/",
|
|
13
|
+
".codex-plugin/",
|
|
14
|
+
".agents/",
|
|
15
|
+
".github/plugin/",
|
|
16
|
+
"LICENSE",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"main": "dist/index.js",
|
|
20
|
+
"types": "dist/index.d.ts",
|
|
21
|
+
"bin": {
|
|
22
|
+
"quoin": "bin/quoin.js"
|
|
23
|
+
},
|
|
24
|
+
"oclif": {
|
|
25
|
+
"bin": "quoin",
|
|
26
|
+
"dirname": "quoin",
|
|
27
|
+
"commands": "./dist/commands",
|
|
28
|
+
"topicSeparator": " ",
|
|
29
|
+
"topics": {
|
|
30
|
+
"catalog": {
|
|
31
|
+
"description": "Inspect the active artifact/object catalog (list, show, validate)."
|
|
32
|
+
},
|
|
33
|
+
"config": {
|
|
34
|
+
"description": "Read and store quoin configuration (get, set, edit, doctor)."
|
|
35
|
+
},
|
|
36
|
+
"module": {
|
|
37
|
+
"description": "Install and manage user/community spec modules (list, install, remove, ensure-defaults)."
|
|
38
|
+
},
|
|
39
|
+
"plugin": {
|
|
40
|
+
"description": "[DEPRECATED] Renamed to `module`; retained as a forwarding alias."
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"plugins": [
|
|
44
|
+
"@agent-ix/filament-plan-sync"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
"packageManager": "pnpm@10.33.4",
|
|
48
|
+
"scripts": {
|
|
49
|
+
"help": "node scripts/help.js",
|
|
50
|
+
"test": "vitest run",
|
|
51
|
+
"test:coverage": "vitest run --coverage",
|
|
52
|
+
"test:json": "vitest run --reporter=json --outputFile=report.json || true",
|
|
53
|
+
"test:evals": "node evals/run.mjs",
|
|
54
|
+
"lint": "eslint \"src/**/*.{ts,tsx,js,jsx}\" \"tests/**/*.{ts,tsx,js,jsx}\" && pnpm run format:check",
|
|
55
|
+
"format": "prettier --write .",
|
|
56
|
+
"format:check": "prettier --check .",
|
|
57
|
+
"build": "vite build",
|
|
58
|
+
"clean": "rm -rf node_modules dist coverage .pnpm-store",
|
|
59
|
+
"install:frozen": "pnpm install --frozen-lockfile",
|
|
60
|
+
"update-lock": "pnpm install --lockfile-only",
|
|
61
|
+
"version": "node scripts/build-tools.js version",
|
|
62
|
+
"info": "node scripts/build-tools.js info",
|
|
63
|
+
"docker:build": "docker build -t ghcr.io/agent-ix/quoin .",
|
|
64
|
+
"publish:dry-run": "pnpm publish --dry-run",
|
|
65
|
+
"prepublishOnly": "pnpm run build",
|
|
66
|
+
"tags": "npm dist-tag ls @agent-ix/quoin --registry https://npm.pkg.github.com || echo '(package not found or registry unavailable)'",
|
|
67
|
+
"pkg:add": "pnpm add",
|
|
68
|
+
"pkg:add-dev": "pnpm add -D",
|
|
69
|
+
"pkg:update": "pnpm update",
|
|
70
|
+
"pkg:update-latest": "pnpm update --latest",
|
|
71
|
+
"pkg:use-local": "pnpm dlx @agent-ix/js-deps use-local",
|
|
72
|
+
"pkg:use-upstream": "pnpm dlx @agent-ix/js-deps use-upstream",
|
|
73
|
+
"pkg:refresh-local": "pnpm dlx @agent-ix/js-deps refresh-local",
|
|
74
|
+
"test-results:summary": "./node_modules/.bin/jest-results summary",
|
|
75
|
+
"test-results:groups": "./node_modules/.bin/jest-results groups",
|
|
76
|
+
"test-results:detail": "./node_modules/.bin/jest-results detail",
|
|
77
|
+
"test-results:find": "./node_modules/.bin/jest-results find",
|
|
78
|
+
"test-results:failed": "./node_modules/.bin/jest-results failed",
|
|
79
|
+
"test-results:errors": "./node_modules/.bin/jest-results errors",
|
|
80
|
+
"test-results:warnings": "./node_modules/.bin/jest-results warnings"
|
|
81
|
+
},
|
|
82
|
+
"dependencies": {
|
|
83
|
+
"@agent-ix/filament-plan-sync": ">=0.1.0",
|
|
84
|
+
"@agent-ix/ix-cli-core": ">=0.12.0",
|
|
85
|
+
"@agent-ix/ts-plugin-kit": ">=0.1.3",
|
|
86
|
+
"@oclif/core": ">=4.11.14",
|
|
87
|
+
"yaml": "^2.9.0",
|
|
88
|
+
"zod": ">=4.4.3"
|
|
89
|
+
},
|
|
90
|
+
"devDependencies": {
|
|
91
|
+
"@types/node": "25.9.2",
|
|
92
|
+
"@typescript-eslint/eslint-plugin": "8.60.1",
|
|
93
|
+
"@typescript-eslint/parser": "8.60.1",
|
|
94
|
+
"@vitest/coverage-v8": "4.1.8",
|
|
95
|
+
"add": "^2.0.6",
|
|
96
|
+
"eslint": "10.4.1",
|
|
97
|
+
"eslint-plugin-prettier": "5.5.6",
|
|
98
|
+
"pnpm": "11.5.2",
|
|
99
|
+
"prettier": "3.8.3",
|
|
100
|
+
"ts-node": "^10.9.2",
|
|
101
|
+
"typescript": "6.0.3",
|
|
102
|
+
"vite": "8.0.16",
|
|
103
|
+
"vite-plugin-dts": "5.0.2",
|
|
104
|
+
"vitest": "4.1.8"
|
|
105
|
+
},
|
|
106
|
+
"publishConfig": {
|
|
107
|
+
"registry": "https://registry.npmjs.org/",
|
|
108
|
+
"access": "public"
|
|
109
|
+
},
|
|
110
|
+
"repository": {
|
|
111
|
+
"type": "git",
|
|
112
|
+
"url": "git+https://github.com/agent-ix/quoin.git"
|
|
113
|
+
},
|
|
114
|
+
"pnpm": {
|
|
115
|
+
"overrides": {
|
|
116
|
+
"brace-expansion": ">=5.0.8"
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: gap-analysis
|
|
3
|
+
description: Verify a targeted plan is complete and validated — every task done, the Test
|
|
4
|
+
Matrix backed by real tracking tags in tests, and code fully traced to spec (flagging
|
|
5
|
+
underspecified code with no owning requirement). Optional semantic review checks that
|
|
6
|
+
intent↔test↔code actually agree. Emits a quire-validated SpecReview artifact to
|
|
7
|
+
reviews/YY-MM-DD-<slug>.md.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Gap Analysis
|
|
11
|
+
|
|
12
|
+
Use this skill as a **post-implementation verification gate** for one targeted plan.
|
|
13
|
+
It answers three questions and, on request, a fourth:
|
|
14
|
+
|
|
15
|
+
1. **Is the plan done?** Every `Task` in the targeted plan bundle is `status: done`.
|
|
16
|
+
2. **Is the Test Matrix real?** Every Test Case in the matrix is backed by an actual test
|
|
17
|
+
carrying a matching **tracking tag** (`TC-xxx`, `FR-xxx-AC-x`) in the test code.
|
|
18
|
+
3. **Is anything unspecified?** Code/behavior exists with **no owning** StR/US/FR/NFR
|
|
19
|
+
(the reverse, code→spec gap).
|
|
20
|
+
4. **(optional) Does intent match reality?** For each requirement↔test↔code triple — does
|
|
21
|
+
the test validate the requirement's *intent*, does the test actually exercise the code,
|
|
22
|
+
and does the code match the requirement's intent.
|
|
23
|
+
|
|
24
|
+
The result is a single **quire-validated `SpecReview`** document (`analysis: gap-analysis`)
|
|
25
|
+
written to `reviews/YY-MM-DD-<slug>.md`, with a **Verdict** (PASS / CONDITIONAL / FAIL)
|
|
26
|
+
and a validated **Findings** table.
|
|
27
|
+
|
|
28
|
+
## When to use
|
|
29
|
+
|
|
30
|
+
- After `implement-plan` (or any implementation effort) to confirm a plan is genuinely
|
|
31
|
+
complete and verified before closing it.
|
|
32
|
+
- To audit drift between spec, tests, and code for an existing component.
|
|
33
|
+
- As a release/merge gate that produces a durable, traceable review artifact.
|
|
34
|
+
|
|
35
|
+
This skill is **read-only over the codebase** — it inspects and reports; it does not fix
|
|
36
|
+
code, edit the plan, or change the matrix. Its only write is the SpecReview artifact.
|
|
37
|
+
|
|
38
|
+
## Inputs
|
|
39
|
+
|
|
40
|
+
- A target **plan bundle** `plan/<Plan-id>-<slug>/` (the user may name it; otherwise pick).
|
|
41
|
+
- The component **spec** (`spec/spec.md` for `org`/`name`) and **Test Matrix**
|
|
42
|
+
(`spec/matrix.md` or `spec/tests.md`).
|
|
43
|
+
- The **source** and **test** trees of the component.
|
|
44
|
+
|
|
45
|
+
## Steps
|
|
46
|
+
|
|
47
|
+
0. **[Target selection](references/step-1-target-selection.md)**: Resolve the plan bundle,
|
|
48
|
+
spec root, Test Matrix, and `org`/`component` for `ix://` URIs.
|
|
49
|
+
1. **[Plan completion](references/step-2-plan-completion.md)**: Assert every `Task` is
|
|
50
|
+
`done`; report incomplete/blocked tasks and stale `plan.md` checkboxes.
|
|
51
|
+
2. **[Matrix verification](references/step-3-matrix-verification.md)**: For every matrix
|
|
52
|
+
Test Case, confirm a backing test with a matching tracking tag exists; flag unbacked
|
|
53
|
+
rows, untracked tests, and inconsistent status markers.
|
|
54
|
+
3. **[Underspecified code](references/step-4-underspecified-code.md)**: Find code/behavior
|
|
55
|
+
with no owning requirement (reverse gap), plus stubs masquerading as complete.
|
|
56
|
+
4. **[Semantic review](references/step-5-semantic-review.md)** *(OPTIONAL — ask first)*:
|
|
57
|
+
Judge intent↔test↔code agreement per requirement. Skip unless the user opts in.
|
|
58
|
+
5. **[SpecReview artifact](references/step-6-specreview-artifact.md)**: Write and validate
|
|
59
|
+
the `SpecReview` to `reviews/YY-MM-DD-<slug>.md`.
|
|
60
|
+
|
|
61
|
+
All steps required except Step 4, which is gated on user choice.
|
|
62
|
+
|
|
63
|
+
## The optional semantic review
|
|
64
|
+
|
|
65
|
+
Steps 1–3 are mechanical and cheap. Step 4 is an expensive, judgment-heavy LLM pass.
|
|
66
|
+
**Before running it**, ask the user explicitly (e.g. with a yes/no choice):
|
|
67
|
+
|
|
68
|
+
> Run the optional semantic review (intent↔test↔code)? It's slower but verifies that tests
|
|
69
|
+
> actually validate requirement intent and exercise real code.
|
|
70
|
+
|
|
71
|
+
If yes, fan the work out (one subagent per FR or per area) for thoroughness. If no, note in
|
|
72
|
+
the SpecReview's Coverage section that semantic review was skipped.
|
|
73
|
+
|
|
74
|
+
## Output
|
|
75
|
+
|
|
76
|
+
A `SpecReview` (`spec-artifacts-process` archetype) at `<project_root>/reviews/YY-MM-DD-<slug>.md`:
|
|
77
|
+
|
|
78
|
+
- Frontmatter `type: SpecReview`, `analysis: gap-analysis`, `id: SR-NNN`, `scope`,
|
|
79
|
+
`review_set: subset`, and `relationships:` (`reviews` → the plan, `references` → the matrix).
|
|
80
|
+
- Body: `## Summary`, `## Verdict` (PASS/CONDITIONAL/FAIL), `## Findings`
|
|
81
|
+
(validated table `ID | Severity | Summary | Refs`), `## Coverage` (rollup).
|
|
82
|
+
|
|
83
|
+
> **Note:** `reviews/` is at the **repo root** by deliberate choice for this skill, not
|
|
84
|
+
> `spec/reviews/`. quire validation is path-agnostic, so this is fine.
|
|
85
|
+
|
|
86
|
+
Validate before finishing:
|
|
87
|
+
|
|
88
|
+
```
|
|
89
|
+
quire validate --scope <project_root> "reviews/**/*.md"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
## Verdict rule
|
|
93
|
+
|
|
94
|
+
- **FAIL** — any incomplete/blocked task, any matrix Test Case with no backing tagged test,
|
|
95
|
+
or any `high`-severity finding.
|
|
96
|
+
- **CONDITIONAL** — only `medium`/`low` findings (e.g. untracked tests, minor drift).
|
|
97
|
+
- **PASS** — no gaps; record the single `FND-001 | low | No gaps found | -` row.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Step 1: Target Selection
|
|
2
|
+
|
|
3
|
+
**Goal**: Resolve exactly what this run audits — one plan bundle, its spec, its Test
|
|
4
|
+
Matrix — and the `ix://` identity used in the output artifact.
|
|
5
|
+
|
|
6
|
+
## Process
|
|
7
|
+
|
|
8
|
+
### 1. Resolve the target plan
|
|
9
|
+
|
|
10
|
+
Mirror `spec-to-plan/references/step-0-plan-selection.md`:
|
|
11
|
+
|
|
12
|
+
1. **Named in context?** If the user passed a plan id (`Plan-002`) or one was established
|
|
13
|
+
earlier this session, use it.
|
|
14
|
+
2. **Otherwise discover.** Glob `plan/*/plan.md`, read each frontmatter `id`/`title`/`status`,
|
|
15
|
+
and present the list:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
Plans available to gap-analyze:
|
|
19
|
+
- Plan-001 electron-hello core app (active)
|
|
20
|
+
- Plan-002 packaging & distribution (active)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Ask which one. One run targets **one** bundle.
|
|
24
|
+
|
|
25
|
+
### 2. Locate the spec and Test Matrix
|
|
26
|
+
|
|
27
|
+
- **Spec root.** Single-repo: `spec/`. Multi-repo: `specs/<category>/<component>/spec/`.
|
|
28
|
+
- **`org` / `component`.** Read from `spec/spec.md` frontmatter (`org`, `name`). These build
|
|
29
|
+
the `ix://<org>/<component>/<id>` URIs used in the SpecReview `relationships:`.
|
|
30
|
+
- **Test Matrix.** Look for `spec/matrix.md` first, then `spec/tests.md` (both names are in
|
|
31
|
+
use across the ecosystem). Note its frontmatter `id` (e.g. `TestMatrix-001` / `TM-001`)
|
|
32
|
+
for the `references` edge.
|
|
33
|
+
- **Requirements.** Note the requirement files under `spec/functional/`,
|
|
34
|
+
`spec/non-functional/`, `spec/usecase/`, `spec/stakeholder/` — Steps 3 and 4 trace against
|
|
35
|
+
these ids.
|
|
36
|
+
- **Source / test trees.** Identify where implementation and tests live (e.g. `src/` +
|
|
37
|
+
`tests/`, or language-specific layout). Used in Steps 2–4.
|
|
38
|
+
|
|
39
|
+
### 3. Hand off
|
|
40
|
+
|
|
41
|
+
State explicitly, so later steps and the artifact agree:
|
|
42
|
+
|
|
43
|
+
- target bundle path (e.g. `plan/Plan-002-packaging-distribution/`)
|
|
44
|
+
- spec root, matrix path + id
|
|
45
|
+
- `ix://<org>/<component>` prefix
|
|
46
|
+
- where source and tests live
|
|
47
|
+
|
|
48
|
+
## Notes
|
|
49
|
+
|
|
50
|
+
- If there is **no** plan bundle, stop and tell the user — gap-analysis audits a plan; it
|
|
51
|
+
does not invent one (use `spec-to-plan` first).
|
|
52
|
+
- If there is **no** Test Matrix, Step 2 a/Plan checks still run, but record a `high`
|
|
53
|
+
finding that the matrix is missing and Step 3 cannot verify coverage.
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Step 2: Plan Completion
|
|
2
|
+
|
|
3
|
+
**Goal**: Confirm every unit of work in the targeted plan is actually finished.
|
|
4
|
+
|
|
5
|
+
## The Task contract
|
|
6
|
+
|
|
7
|
+
Tasks in the bundle are frontmatter-typed (`type: Task`). The machine contract
|
|
8
|
+
(see `quoin/skills/spec-to-plan/SKILL.md`):
|
|
9
|
+
|
|
10
|
+
```yaml
|
|
11
|
+
---
|
|
12
|
+
id: Task-001
|
|
13
|
+
type: Task
|
|
14
|
+
status: not_started | in_progress | blocked | done
|
|
15
|
+
track: A | B | C | S | J | <gate-name>
|
|
16
|
+
priority: P0 | P1 | P2 | P3
|
|
17
|
+
relationships:
|
|
18
|
+
- { target: "ix://org/component/Task-000", type: depends_on }
|
|
19
|
+
- { target: "ix://org/component/FR-002", type: references } # requirement ownership
|
|
20
|
+
- { target: "ix://org/component/TC-004", type: verifies } # test-case trace
|
|
21
|
+
---
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
## Process
|
|
25
|
+
|
|
26
|
+
1. **Enumerate tasks.** Read every `plan/<Plan-id>-<slug>/tasks/Task-*.md`.
|
|
27
|
+
2. **Assert completion.** For each task, check `status`:
|
|
28
|
+
- `done` → OK.
|
|
29
|
+
- `not_started` / `in_progress` / `blocked` → **finding**. Severity:
|
|
30
|
+
- `high` if `priority: P0`/`P1` or it is on the critical path (`track: A`/`S`).
|
|
31
|
+
- `medium` otherwise. `blocked` → note the blocker (its unmet `depends_on`).
|
|
32
|
+
3. **Check dependency sanity.** Flag a `done` task whose `depends_on` target is **not**
|
|
33
|
+
`done` (out-of-order completion) as a `medium` finding.
|
|
34
|
+
4. **Cross-check `plan.md` checkboxes.** `plan.md` mirrors requirements/tests as
|
|
35
|
+
`- [ ]` / `- [x]`. Flag (`low`) any checkbox state that contradicts task status
|
|
36
|
+
(e.g. an unchecked requirement whose owning task is `done`, or vice-versa) — the plan
|
|
37
|
+
doc is drifting from its tasks.
|
|
38
|
+
5. **Record the rollup.** Count tasks `done` / total — feeds the SpecReview `## Coverage`.
|
|
39
|
+
|
|
40
|
+
## Output of this step
|
|
41
|
+
|
|
42
|
+
A list of findings (incomplete tasks, out-of-order completion, checkbox drift) with their
|
|
43
|
+
`Refs` (the Task id, and the requirement/TC it owns) for the SpecReview Findings table, plus
|
|
44
|
+
the tasks-done/total count.
|
|
45
|
+
|
|
46
|
+
## Notes
|
|
47
|
+
|
|
48
|
+
- Do not edit task files or `plan.md` — gap-analysis only reports. If the user wants the
|
|
49
|
+
plan reconciled, that's `spec-to-plan` (update flow) or `implement-plan`.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# Step 3: Test-Matrix Verification
|
|
2
|
+
|
|
3
|
+
**Goal**: Prove the Test Matrix is *real* — every Test Case it claims is backed by an actual
|
|
4
|
+
test in the suite, identified by a matching **tracking tag** in the test code. This is the
|
|
5
|
+
heart of gap-analysis: a matrix row marked ✅ means nothing unless a tagged test exists.
|
|
6
|
+
|
|
7
|
+
## The matrix shape
|
|
8
|
+
|
|
9
|
+
Built by `spec-matrix` (`quoin/skills/spec-matrix/SKILL.md`). Key tables:
|
|
10
|
+
|
|
11
|
+
- **Test Case Summary** — `Test ID | Title | Type | Priority | Traces To | Status`, where
|
|
12
|
+
`Test ID` = `TC-xxx`, `Traces To` = `FR-XXX-AC-X` etc., `Status` ∈ `✅ ⚠️ ❌ 🚧 ⛔`.
|
|
13
|
+
- **Per-requirement coverage** — StR/US/FR/NFR → AC → TC → Status tables.
|
|
14
|
+
|
|
15
|
+
## Tracking-tag patterns in test code
|
|
16
|
+
|
|
17
|
+
Tests declare which requirement/test-case they cover via tags in the code. The ecosystem
|
|
18
|
+
uses these forms (grep for all of them, across `.py`/`.ts`/`.rs`):
|
|
19
|
+
|
|
20
|
+
| Form | Example |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| Docstring AC trace | `FR-007-AC-01` inside a test docstring `Description:` block |
|
|
23
|
+
| Docstring `Trace:` | `Trace: FR-001` |
|
|
24
|
+
| Module docstring | `"""Tests for FR-017: Context Management."""` |
|
|
25
|
+
| Test-case id comment / name | `# TC-041`, or a test whose name maps to `TC-041` |
|
|
26
|
+
|
|
27
|
+
## Process
|
|
28
|
+
|
|
29
|
+
1. **Parse the matrix.** Extract the set of declared Test Cases `{TC-xxx → (Traces To, Status)}`.
|
|
30
|
+
2. **Index the suite.** Grep the test tree for every tracking tag form above; build
|
|
31
|
+
`{tag → [test file :: test name]}` for `TC-xxx`, `FR-xxx`, `FR-xxx-AC-x`.
|
|
32
|
+
3. **Reconcile, producing findings:**
|
|
33
|
+
- **Unbacked matrix row** — a `TC-xxx` (or its `Traces To` requirement) with **no**
|
|
34
|
+
matching tag in any test → `high` finding (the matrix overclaims coverage).
|
|
35
|
+
- **Status lie** — a row marked `✅ Complete` but its test is missing, skipped
|
|
36
|
+
(`pytest.skip`), or its requirement has no tagged test → `high`.
|
|
37
|
+
- **Untracked test** — a real test that exercises behavior but carries **no** tracking
|
|
38
|
+
tag and is **absent** from the matrix → `medium` (coverage exists but isn't traced).
|
|
39
|
+
- **Marker drift** — matrix `Status` inconsistent with reality (e.g. `🚧` for a passing
|
|
40
|
+
tagged test, or `✅` for a `⚠️`-quality test) → `low`.
|
|
41
|
+
4. **Optionally run the suite.** If the user wants execution evidence (not just static
|
|
42
|
+
tag-matching), run `make test` and note failures/skips against matrix rows. Don't block
|
|
43
|
+
on this if the environment can't run tests; say so.
|
|
44
|
+
5. **Rollup.** Count matrix Test Cases backed-by-tagged-test / total — feeds `## Coverage`.
|
|
45
|
+
|
|
46
|
+
## Output of this step
|
|
47
|
+
|
|
48
|
+
Findings (unbacked rows, status lies, untracked tests, marker drift) with `Refs` =
|
|
49
|
+
`TC-xxx` / `FR-xxx` / test path, plus the backed/total count.
|
|
50
|
+
|
|
51
|
+
## Notes
|
|
52
|
+
|
|
53
|
+
- A tag match proves *traceability*, not *correctness* — whether the test is a good test is
|
|
54
|
+
Step 4 (underspecified/stub) and Step 5 (semantic). Keep this step about presence + trace.
|