@sdd-method/sdd-cli 1.41.0 → 1.43.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/README.md +4 -57
- package/dist/author-bin.d.ts +3 -0
- package/dist/author-bin.d.ts.map +1 -0
- package/dist/author-bin.js +8 -0
- package/dist/author-bin.js.map +1 -0
- package/dist/author-program.d.ts +8 -0
- package/dist/author-program.d.ts.map +1 -0
- package/dist/author-program.js +99 -0
- package/dist/author-program.js.map +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-harness.d.ts +11 -8
- package/dist/lib/agent-harness.d.ts.map +1 -1
- package/dist/lib/agent-harness.js +17 -8
- package/dist/lib/agent-harness.js.map +1 -1
- package/dist/lib/api-surface/index.js +2 -2
- package/dist/lib/api-surface/index.js.map +1 -1
- package/dist/lib/briefing/index.d.ts +1 -1
- package/dist/lib/briefing/index.d.ts.map +1 -1
- package/dist/lib/briefing/index.js +1 -1
- package/dist/lib/briefing/index.js.map +1 -1
- package/dist/lib/briefing/render.d.ts +18 -1
- package/dist/lib/briefing/render.d.ts.map +1 -1
- package/dist/lib/briefing/render.js +17 -8
- package/dist/lib/briefing/render.js.map +1 -1
- package/dist/lib/catalogue/aggregation-manifest-loader.js +4 -4
- package/dist/lib/catalogue/aggregation-manifest-loader.js.map +1 -1
- package/dist/lib/catalogue/cli-version.d.ts +1 -1
- package/dist/lib/catalogue/cli-version.d.ts.map +1 -1
- package/dist/lib/catalogue/cli-version.js +3 -3
- package/dist/lib/catalogue/cli-version.js.map +1 -1
- package/dist/lib/catalogue/freshness.d.ts +27 -0
- package/dist/lib/catalogue/freshness.d.ts.map +1 -0
- package/dist/lib/catalogue/freshness.js +70 -0
- package/dist/lib/catalogue/freshness.js.map +1 -0
- package/dist/lib/catalogue/graph-run.js +1 -1
- package/dist/lib/catalogue/graph-run.js.map +1 -1
- package/dist/lib/ci-binding/index.d.ts +63 -0
- package/dist/lib/ci-binding/index.d.ts.map +1 -0
- package/dist/lib/ci-binding/index.js +220 -0
- package/dist/lib/ci-binding/index.js.map +1 -0
- package/dist/lib/ci-binding/module.d.ts +36 -0
- package/dist/lib/ci-binding/module.d.ts.map +1 -0
- package/dist/lib/ci-binding/module.js +204 -0
- package/dist/lib/ci-binding/module.js.map +1 -0
- package/dist/lib/context-pull/index.d.ts +45 -0
- package/dist/lib/context-pull/index.d.ts.map +1 -0
- package/dist/lib/context-pull/index.js +191 -0
- package/dist/lib/context-pull/index.js.map +1 -0
- package/dist/lib/context-pull/resolve.d.ts +46 -0
- package/dist/lib/context-pull/resolve.d.ts.map +1 -0
- package/dist/lib/context-pull/resolve.js +70 -0
- package/dist/lib/context-pull/resolve.js.map +1 -0
- package/dist/lib/context-pull/retired-mcp-setup.d.ts +7 -0
- package/dist/lib/context-pull/retired-mcp-setup.d.ts.map +1 -0
- package/dist/lib/context-pull/retired-mcp-setup.js +7 -0
- package/dist/lib/context-pull/retired-mcp-setup.js.map +1 -0
- package/dist/lib/hooks-seed/entries.d.ts +15 -0
- package/dist/lib/hooks-seed/entries.d.ts.map +1 -1
- package/dist/lib/hooks-seed/entries.js +30 -1
- package/dist/lib/hooks-seed/entries.js.map +1 -1
- package/dist/lib/hooks-seed/index.d.ts +4 -9
- package/dist/lib/hooks-seed/index.d.ts.map +1 -1
- package/dist/lib/hooks-seed/index.js +4 -7
- package/dist/lib/hooks-seed/index.js.map +1 -1
- package/dist/lib/hooks-seed/merge.d.ts +7 -0
- package/dist/lib/hooks-seed/merge.d.ts.map +1 -1
- package/dist/lib/hooks-seed/merge.js +31 -0
- package/dist/lib/hooks-seed/merge.js.map +1 -1
- package/dist/lib/init/app.d.ts +0 -1
- package/dist/lib/init/app.d.ts.map +1 -1
- package/dist/lib/init/app.js +3 -7
- package/dist/lib/init/app.js.map +1 -1
- package/dist/lib/init/ci-workflow.d.ts +6 -8
- package/dist/lib/init/ci-workflow.d.ts.map +1 -1
- package/dist/lib/init/ci-workflow.js +57 -120
- package/dist/lib/init/ci-workflow.js.map +1 -1
- package/dist/lib/init/integration.d.ts +0 -1
- package/dist/lib/init/integration.d.ts.map +1 -1
- package/dist/lib/init/integration.js +3 -7
- package/dist/lib/init/integration.js.map +1 -1
- package/dist/lib/init/platform.d.ts +2 -10
- package/dist/lib/init/platform.d.ts.map +1 -1
- package/dist/lib/init/platform.js +12 -15
- package/dist/lib/init/platform.js.map +1 -1
- package/dist/lib/lock-file.d.ts +20 -0
- package/dist/lib/lock-file.d.ts.map +1 -1
- package/dist/lib/lock-file.js +25 -1
- package/dist/lib/lock-file.js.map +1 -1
- package/dist/lib/mcp/build-info.d.ts.map +1 -1
- package/dist/lib/mcp/build-info.js +3 -3
- package/dist/lib/mcp/build-info.js.map +1 -1
- package/dist/lib/pack/index.js +2 -2
- package/dist/lib/pack/index.js.map +1 -1
- package/dist/lib/pack/validate.js +2 -2
- package/dist/lib/pack/validate.js.map +1 -1
- package/dist/lib/package-version.d.ts +23 -0
- package/dist/lib/package-version.d.ts.map +1 -1
- package/dist/lib/package-version.js +47 -10
- package/dist/lib/package-version.js.map +1 -1
- package/dist/lib/plan/index.d.ts.map +1 -1
- package/dist/lib/plan/index.js +4 -4
- package/dist/lib/plan/index.js.map +1 -1
- package/dist/lib/plan/read-sdd.js +1 -1
- package/dist/lib/plan/render-template.d.ts +8 -0
- package/dist/lib/plan/render-template.d.ts.map +1 -1
- package/dist/lib/plan/render-template.js +27 -3
- package/dist/lib/plan/render-template.js.map +1 -1
- package/dist/lib/sdd-index/repo-config.d.ts +1 -1
- package/dist/lib/sdd-index/repo-config.js +1 -1
- package/dist/lib/sdd-reader.d.ts +35 -0
- package/dist/lib/sdd-reader.d.ts.map +1 -0
- package/dist/lib/sdd-reader.js +91 -0
- package/dist/lib/sdd-reader.js.map +1 -0
- package/dist/lib/sync/briefing-merge.d.ts +1 -1
- package/dist/lib/sync/briefing-merge.d.ts.map +1 -1
- package/dist/lib/sync/briefing-merge.js +50 -34
- package/dist/lib/sync/briefing-merge.js.map +1 -1
- package/dist/lib/sync/diff.js +1 -1
- package/dist/lib/sync/diff.js.map +1 -1
- package/dist/lib/sync/index.d.ts +16 -6
- package/dist/lib/sync/index.d.ts.map +1 -1
- package/dist/lib/sync/index.js +89 -116
- package/dist/lib/sync/index.js.map +1 -1
- package/dist/lib/sync/settings-merge.d.ts +26 -48
- package/dist/lib/sync/settings-merge.d.ts.map +1 -1
- package/dist/lib/sync/settings-merge.js +70 -162
- package/dist/lib/sync/settings-merge.js.map +1 -1
- package/dist/lib/validate/bundle-coherence.js +2 -2
- package/dist/lib/validate/bundle-coherence.js.map +1 -1
- package/dist/lib/validate/plan.d.ts +25 -0
- package/dist/lib/validate/plan.d.ts.map +1 -0
- package/dist/lib/validate/plan.js +54 -0
- package/dist/lib/validate/plan.js.map +1 -0
- package/dist/maintain-bin.d.ts +3 -0
- package/dist/maintain-bin.d.ts.map +1 -0
- package/dist/maintain-bin.js +8 -0
- package/dist/maintain-bin.js.map +1 -0
- package/dist/maintain-program.d.ts +8 -0
- package/dist/maintain-program.d.ts.map +1 -0
- package/dist/maintain-program.js +94 -0
- package/dist/maintain-program.js.map +1 -0
- package/dist/maintain-version.json +4 -0
- package/dist/verbs/catalogue-check.d.ts +10 -0
- package/dist/verbs/catalogue-check.d.ts.map +1 -0
- package/dist/verbs/catalogue-check.js +28 -0
- package/dist/verbs/catalogue-check.js.map +1 -0
- package/dist/verbs/catalogue-maintain.d.ts +6 -0
- package/dist/verbs/catalogue-maintain.d.ts.map +1 -0
- package/dist/verbs/catalogue-maintain.js +110 -0
- package/dist/verbs/catalogue-maintain.js.map +1 -0
- package/dist/verbs/catalogue.d.ts +5 -0
- package/dist/verbs/catalogue.d.ts.map +1 -1
- package/dist/verbs/catalogue.js +16 -80
- package/dist/verbs/catalogue.js.map +1 -1
- package/dist/verbs/context.d.ts +3 -0
- package/dist/verbs/context.d.ts.map +1 -0
- package/dist/verbs/context.js +39 -0
- package/dist/verbs/context.js.map +1 -0
- package/dist/verbs/pack-build.d.ts +3 -0
- package/dist/verbs/pack-build.d.ts.map +1 -0
- package/dist/verbs/pack-build.js +31 -0
- package/dist/verbs/pack-build.js.map +1 -0
- package/dist/verbs/pack.d.ts.map +1 -1
- package/dist/verbs/pack.js +2 -25
- package/dist/verbs/pack.js.map +1 -1
- package/dist/verbs/sync.d.ts.map +1 -1
- package/dist/verbs/sync.js +21 -0
- package/dist/verbs/sync.js.map +1 -1
- package/dist/verbs/validate.d.ts.map +1 -1
- package/dist/verbs/validate.js +26 -0
- package/dist/verbs/validate.js.map +1 -1
- package/dist/verify-program.d.ts +6 -1
- package/dist/verify-program.d.ts.map +1 -1
- package/dist/verify-program.js +12 -5
- package/dist/verify-program.js.map +1 -1
- package/dist/verify-version.json +2 -2
- package/package.json +6 -5
- package/scripts/author-acceptance.mjs +170 -0
- package/scripts/author-version.json +4 -0
- package/scripts/build-persona-package.mjs +309 -0
- package/scripts/copy-yaml-assets.mjs +4 -2
- package/scripts/dagger-parity.sh +74 -0
- package/scripts/maintain-acceptance.mjs +240 -0
- package/scripts/maintain-version.json +4 -0
- package/scripts/release-gate.mjs +9 -0
- package/scripts/verify-version.json +2 -2
- package/scripts/vitest-tmpdir.mjs +26 -0
- package/scripts/build-verify-package.mjs +0 -210
|
@@ -7,6 +7,21 @@
|
|
|
7
7
|
*/
|
|
8
8
|
import type { HookMatcher, HooksBlock } from "./types.js";
|
|
9
9
|
export declare function buildMethodGuardPreToolUse(): HookMatcher;
|
|
10
|
+
/**
|
|
11
|
+
* The session-start check runs the VERIFY persona's CLI (M-ADR 0218, 0220), not sdd-cli, which is
|
|
12
|
+
* the administrator's: validating is routine author work. It runs through npx at the exact
|
|
13
|
+
* verify-cli version this sdd-cli releases with, the version the managed CI workflow installs, so a
|
|
14
|
+
* local pass comes from the same verifier CI uses and nothing needs installing globally.
|
|
15
|
+
*/
|
|
16
|
+
export declare function sessionStartValidateCommand(verifyVersion?: string): string;
|
|
17
|
+
/**
|
|
18
|
+
* Whether a session-start command is one this tool rendered, at any version: the sdd-cli form it
|
|
19
|
+
* wrote until the hook moved to verify-cli, or the npx form at any exact version. Sync replaces its
|
|
20
|
+
* own earlier render without counting it as drift; otherwise every release that moves the pinned
|
|
21
|
+
* version would refuse the settings sync until --allow-overwrite, the flag that also rewrites keys
|
|
22
|
+
* the adopter owns. Anything else under the sentinel (an edited command) is still drift.
|
|
23
|
+
*/
|
|
24
|
+
export declare function isOwnSessionStartRender(command: string): boolean;
|
|
10
25
|
export declare function buildSessionStartValidate(): HookMatcher;
|
|
11
26
|
/**
|
|
12
27
|
* Full method-managed hooks block. When extending, add a new event
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../../src/lib/hooks-seed/entries.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"entries.d.ts","sourceRoot":"","sources":["../../../src/lib/hooks-seed/entries.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,KAAK,EAAiB,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAQzE,wBAAgB,0BAA0B,IAAI,WAAW,CAYxD;AAMD;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,aAAa,GAAE,MAA8B,GAAG,MAAM,CAEjG;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAOhE;AAED,wBAAgB,yBAAyB,IAAI,WAAW,CAUvD;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,UAAU,CAMpD"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* merge path can identify it on refresh. Adopter-added hooks under
|
|
6
6
|
* the same event survive because they lack the sentinel.
|
|
7
7
|
*/
|
|
8
|
+
import { EXACT_VERSION, getVerifyCliVersion } from "../package-version.js";
|
|
8
9
|
import { METHOD_MANAGED_SENTINEL } from "./types.js";
|
|
9
10
|
function withSentinel(command) {
|
|
10
11
|
if (command.includes(METHOD_MANAGED_SENTINEL))
|
|
@@ -22,13 +23,41 @@ export function buildMethodGuardPreToolUse() {
|
|
|
22
23
|
],
|
|
23
24
|
};
|
|
24
25
|
}
|
|
26
|
+
const SESSION_START_VALIDATE_ARGS = ' validate --target-repo "${CLAUDE_PROJECT_DIR:-$(pwd)}" --validator adr-structure 2>&1 | head -20';
|
|
27
|
+
const VERIFY_CLI_NPX = /^npx --yes @sdd-method\/verify-cli@(\S+)$/;
|
|
28
|
+
/**
|
|
29
|
+
* The session-start check runs the VERIFY persona's CLI (M-ADR 0218, 0220), not sdd-cli, which is
|
|
30
|
+
* the administrator's: validating is routine author work. It runs through npx at the exact
|
|
31
|
+
* verify-cli version this sdd-cli releases with, the version the managed CI workflow installs, so a
|
|
32
|
+
* local pass comes from the same verifier CI uses and nothing needs installing globally.
|
|
33
|
+
*/
|
|
34
|
+
export function sessionStartValidateCommand(verifyVersion = getVerifyCliVersion()) {
|
|
35
|
+
return withSentinel(`npx --yes @sdd-method/verify-cli@${verifyVersion}${SESSION_START_VALIDATE_ARGS}`);
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Whether a session-start command is one this tool rendered, at any version: the sdd-cli form it
|
|
39
|
+
* wrote until the hook moved to verify-cli, or the npx form at any exact version. Sync replaces its
|
|
40
|
+
* own earlier render without counting it as drift; otherwise every release that moves the pinned
|
|
41
|
+
* version would refuse the settings sync until --allow-overwrite, the flag that also rewrites keys
|
|
42
|
+
* the adopter owns. Anything else under the sentinel (an edited command) is still drift.
|
|
43
|
+
*/
|
|
44
|
+
export function isOwnSessionStartRender(command) {
|
|
45
|
+
const body = command.replace(METHOD_MANAGED_SENTINEL, "").trimEnd();
|
|
46
|
+
if (!body.endsWith(SESSION_START_VALIDATE_ARGS))
|
|
47
|
+
return false;
|
|
48
|
+
const launcher = body.slice(0, body.length - SESSION_START_VALIDATE_ARGS.length);
|
|
49
|
+
if (launcher === "sdd-cli")
|
|
50
|
+
return true;
|
|
51
|
+
const npx = VERIFY_CLI_NPX.exec(launcher);
|
|
52
|
+
return npx !== null && EXACT_VERSION.test(npx[1]);
|
|
53
|
+
}
|
|
25
54
|
export function buildSessionStartValidate() {
|
|
26
55
|
return {
|
|
27
56
|
matcher: "startup",
|
|
28
57
|
hooks: [
|
|
29
58
|
{
|
|
30
59
|
type: "command",
|
|
31
|
-
command:
|
|
60
|
+
command: sessionStartValidateCommand(),
|
|
32
61
|
},
|
|
33
62
|
],
|
|
34
63
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entries.js","sourceRoot":"","sources":["../../../src/lib/hooks-seed/entries.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;
|
|
1
|
+
{"version":3,"file":"entries.js","sourceRoot":"","sources":["../../../src/lib/hooks-seed/entries.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE3E,OAAO,EAAE,uBAAuB,EAAE,MAAM,YAAY,CAAC;AAErD,SAAS,YAAY,CAAC,OAAe;IACnC,IAAI,OAAO,CAAC,QAAQ,CAAC,uBAAuB,CAAC;QAAE,OAAO,OAAO,CAAC;IAC9D,OAAO,GAAG,OAAO,IAAI,uBAAuB,EAAE,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,0BAA0B;IACxC,OAAO;QACL,OAAO,EAAE,yBAAyB;QAClC,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,YAAY,CACnB,mFAAmF,CACpF;aACF;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,2BAA2B,GAC/B,mGAAmG,CAAC;AACtG,MAAM,cAAc,GAAG,2CAA2C,CAAC;AAEnE;;;;;GAKG;AACH,MAAM,UAAU,2BAA2B,CAAC,gBAAwB,mBAAmB,EAAE;IACvF,OAAO,YAAY,CAAC,oCAAoC,aAAa,GAAG,2BAA2B,EAAE,CAAC,CAAC;AACzG,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAe;IACrD,MAAM,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;IACpE,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,2BAA2B,CAAC;QAAE,OAAO,KAAK,CAAC;IAC9D,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,CAAC,MAAM,GAAG,2BAA2B,CAAC,MAAM,CAAC,CAAC;IACjF,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,IAAI,CAAC;IACxC,MAAM,GAAG,GAAG,cAAc,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAC1C,OAAO,GAAG,KAAK,IAAI,IAAI,aAAa,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAE,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,yBAAyB;IACvC,OAAO;QACL,OAAO,EAAE,SAAS;QAClB,KAAK,EAAE;YACL;gBACE,IAAI,EAAE,SAAS;gBACf,OAAO,EAAE,2BAA2B,EAAE;aACvC;SACF;KACF,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,uBAAuB;IACrC,MAAM,KAAK,GAAkD;QAC3D,UAAU,EAAE,CAAC,0BAA0B,EAAE,CAAC;QAC1C,YAAY,EAAE,CAAC,yBAAyB,EAAE,CAAC;KAC5C,CAAC;IACF,OAAO,KAAK,CAAC;AACf,CAAC"}
|
|
@@ -5,17 +5,12 @@
|
|
|
5
5
|
* `.claude/settings.json`'s `hooks` key. Ownership is identified by
|
|
6
6
|
* the `# sdd-method-managed:true` sentinel in each hook command.
|
|
7
7
|
*
|
|
8
|
-
* Integration: `src/lib/sync/settings-merge.ts`
|
|
9
|
-
*
|
|
10
|
-
* the adopter opted into `--agent-harness claude-code` at init time.
|
|
8
|
+
* Integration: `src/lib/sync/settings-merge.ts` calls `upsertMethodManagedHooks`
|
|
9
|
+
* when the repo runs the claude-code harness (the default).
|
|
11
10
|
*/
|
|
12
11
|
export type { HookCommand, HookEventName, HookMatcher, HooksBlock, SettingsWithHooks, } from "./types.js";
|
|
13
12
|
export { METHOD_MANAGED_SENTINEL, isMethodManagedMatcher } from "./types.js";
|
|
14
|
-
export { buildMethodManagedHooks } from "./entries.js";
|
|
15
|
-
export { detectHooksDrift, upsertMethodManagedHooks, } from "./merge.js";
|
|
13
|
+
export { buildMethodManagedHooks, isOwnSessionStartRender, sessionStartValidateCommand, } from "./entries.js";
|
|
14
|
+
export { detectHooksDrift, normaliseOwnHookRenders, upsertMethodManagedHooks, } from "./merge.js";
|
|
16
15
|
export type { HooksUpsertResult } from "./merge.js";
|
|
17
|
-
export { buildMethodManagedCopilotHooks, copilotHookFilePath, detectCopilotHookDrift, isMethodManagedEvent, upsertCopilotHookFile, } from "./copilot.js";
|
|
18
|
-
export type { CopilotHookCommand, CopilotHookEvent, CopilotHookFile, CopilotHookSurface, CopilotMergeResult, } from "./copilot.js";
|
|
19
|
-
export { nativeEventName, } from "./lifecycle-mapping.js";
|
|
20
|
-
export type { PortableLifecycleEventClass } from "./lifecycle-mapping.js";
|
|
21
16
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/hooks-seed/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/lib/hooks-seed/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,YAAY,EACV,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,iBAAiB,GAClB,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AACpB,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC"}
|
|
@@ -5,13 +5,10 @@
|
|
|
5
5
|
* `.claude/settings.json`'s `hooks` key. Ownership is identified by
|
|
6
6
|
* the `# sdd-method-managed:true` sentinel in each hook command.
|
|
7
7
|
*
|
|
8
|
-
* Integration: `src/lib/sync/settings-merge.ts`
|
|
9
|
-
*
|
|
10
|
-
* the adopter opted into `--agent-harness claude-code` at init time.
|
|
8
|
+
* Integration: `src/lib/sync/settings-merge.ts` calls `upsertMethodManagedHooks`
|
|
9
|
+
* when the repo runs the claude-code harness (the default).
|
|
11
10
|
*/
|
|
12
11
|
export { METHOD_MANAGED_SENTINEL, isMethodManagedMatcher } from "./types.js";
|
|
13
|
-
export { buildMethodManagedHooks } from "./entries.js";
|
|
14
|
-
export { detectHooksDrift, upsertMethodManagedHooks, } from "./merge.js";
|
|
15
|
-
export { buildMethodManagedCopilotHooks, copilotHookFilePath, detectCopilotHookDrift, isMethodManagedEvent, upsertCopilotHookFile, } from "./copilot.js";
|
|
16
|
-
export { nativeEventName, } from "./lifecycle-mapping.js";
|
|
12
|
+
export { buildMethodManagedHooks, isOwnSessionStartRender, sessionStartValidateCommand, } from "./entries.js";
|
|
13
|
+
export { detectHooksDrift, normaliseOwnHookRenders, upsertMethodManagedHooks, } from "./merge.js";
|
|
17
14
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/hooks-seed/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/lib/hooks-seed/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AASH,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EACL,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AACtB,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,YAAY,CAAC"}
|
|
@@ -20,5 +20,12 @@ export declare function upsertMethodManagedHooks(existing: SettingsWithHooks, ow
|
|
|
20
20
|
* from what we would write now. Returns the list of events where drift
|
|
21
21
|
* is present.
|
|
22
22
|
*/
|
|
23
|
+
/**
|
|
24
|
+
* The existing settings with every method-managed session-start command this tool rendered at an
|
|
25
|
+
* earlier version swapped for the current render, for drift detection only. The tool's own older
|
|
26
|
+
* output is regenerable, never drift (the same rule settings-merge applies to an SDD_REPO_PATH it
|
|
27
|
+
* wrote). The raw settings still go to the upsert, which rewrites the older render.
|
|
28
|
+
*/
|
|
29
|
+
export declare function normaliseOwnHookRenders(existing: SettingsWithHooks, owned: HooksBlock): SettingsWithHooks;
|
|
23
30
|
export declare function detectHooksDrift(existing: SettingsWithHooks, owned: HooksBlock): readonly HookEventName[];
|
|
24
31
|
//# sourceMappingURL=merge.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/lib/hooks-seed/merge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAEV,aAAa,EAEb,UAAU,EACV,iBAAiB,EAClB,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"merge.d.ts","sourceRoot":"","sources":["../../../src/lib/hooks-seed/merge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EAEV,aAAa,EAEb,UAAU,EACV,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAyCpB,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IACrC,sEAAsE;IACtE,QAAQ,CAAC,aAAa,EAAE,SAAS,aAAa,EAAE,CAAC;IACjD,4CAA4C;IAC5C,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;CAC3B;AAED,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,UAAU,GAChB,iBAAiB,CAuEnB;AAED;;;;;GAKG;AACH;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,UAAU,GAChB,iBAAiB,CAyBnB;AAED,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,iBAAiB,EAC3B,KAAK,EAAE,UAAU,GAChB,SAAS,aAAa,EAAE,CAkB1B"}
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
* sync untouched.
|
|
7
7
|
*/
|
|
8
8
|
import { METHOD_MANAGED_SENTINEL, isMethodManagedMatcher } from "./types.js";
|
|
9
|
+
import { isOwnSessionStartRender } from "./entries.js";
|
|
9
10
|
/**
|
|
10
11
|
* Strip the method-managed sentinel and trailing whitespace from a hook
|
|
11
12
|
* command so two commands can be compared modulo ownership marker.
|
|
@@ -105,6 +106,36 @@ export function upsertMethodManagedHooks(existing, owned) {
|
|
|
105
106
|
* from what we would write now. Returns the list of events where drift
|
|
106
107
|
* is present.
|
|
107
108
|
*/
|
|
109
|
+
/**
|
|
110
|
+
* The existing settings with every method-managed session-start command this tool rendered at an
|
|
111
|
+
* earlier version swapped for the current render, for drift detection only. The tool's own older
|
|
112
|
+
* output is regenerable, never drift (the same rule settings-merge applies to an SDD_REPO_PATH it
|
|
113
|
+
* wrote). The raw settings still go to the upsert, which rewrites the older render.
|
|
114
|
+
*/
|
|
115
|
+
export function normaliseOwnHookRenders(existing, owned) {
|
|
116
|
+
const current = existing["hooks"];
|
|
117
|
+
const ownedCommand = owned.SessionStart?.[0]?.hooks[0]?.command;
|
|
118
|
+
if (!isHooksObject(current) || ownedCommand === undefined)
|
|
119
|
+
return existing;
|
|
120
|
+
const block = current;
|
|
121
|
+
const sessionStart = block.SessionStart;
|
|
122
|
+
if (!sessionStart)
|
|
123
|
+
return existing;
|
|
124
|
+
return {
|
|
125
|
+
...existing,
|
|
126
|
+
hooks: {
|
|
127
|
+
...block,
|
|
128
|
+
SessionStart: sessionStart.map((m) => isMethodManagedMatcher(m)
|
|
129
|
+
? {
|
|
130
|
+
...m,
|
|
131
|
+
hooks: m.hooks.map((h) => typeof h.command === "string" && isOwnSessionStartRender(h.command)
|
|
132
|
+
? { ...h, command: ownedCommand }
|
|
133
|
+
: h),
|
|
134
|
+
}
|
|
135
|
+
: m),
|
|
136
|
+
},
|
|
137
|
+
};
|
|
138
|
+
}
|
|
108
139
|
export function detectHooksDrift(existing, owned) {
|
|
109
140
|
const current = isHooksObject(existing["hooks"])
|
|
110
141
|
? existing["hooks"]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../src/lib/hooks-seed/merge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"merge.js","sourceRoot":"","sources":["../../../src/lib/hooks-seed/merge.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AASH,OAAO,EAAE,uBAAuB,EAAE,sBAAsB,EAAE,MAAM,YAAY,CAAC;AAC7E,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvD;;;GAGG;AACH,SAAS,gBAAgB,CAAC,OAAe;IACvC,OAAO,OAAO,CAAC,OAAO,CAAC,uBAAuB,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;AAChE,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAS,mCAAmC,CAC1C,CAAc,EACd,CAAc;IAEd,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC,CAAC,OAAO;QAAE,OAAO,KAAK,CAAC;IAC1C,IAAI,C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OAAO,CAAC,CAAC,CAAC,CAAC;AAClE,CAAC"}
|
package/dist/lib/init/app.d.ts
CHANGED
|
@@ -14,7 +14,6 @@ export declare function renderAppServiceArchitecture(input: {
|
|
|
14
14
|
description: string;
|
|
15
15
|
today: string;
|
|
16
16
|
}): string;
|
|
17
|
-
export declare function renderAppClaudeSettings(): string;
|
|
18
17
|
export declare function scaffoldAppProfile(input: AppProfileRenderInput): Promise<{
|
|
19
18
|
filesWritten: string[];
|
|
20
19
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/lib/init/app.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../../src/lib/init/app.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,6BAA6B,CAAC,KAAK,EAAE;IACnD,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,MAAM,CAkBT;AAED,wBAAgB,4BAA4B,CAAC,KAAK,EAAE;IAClD,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;CACf,GAAG,MAAM,CA8ET;AAED,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,qBAAqB,GAC3B,OAAO,CAAC;IAAE,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAgCrC"}
|
package/dist/lib/init/app.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
|
-
import { buildMethodManagedServers, upsertMethodManagedServers, } from "../mcp-seed/index.js";
|
|
4
3
|
import { renderMethodValidationWorkflow, WORKFLOW_REL_PATH } from "./ci-workflow.js";
|
|
4
|
+
import { writeMethodValidationModule } from "../ci-binding/index.js";
|
|
5
5
|
export function renderAppPlatformDependencies(input) {
|
|
6
6
|
return ([
|
|
7
7
|
"# app-platform-dependencies.yaml",
|
|
@@ -96,10 +96,6 @@ export function renderAppServiceArchitecture(input) {
|
|
|
96
96
|
"- `docs/platform/diagrams/container-inventory.md` in the platform repo - canonical container inventory",
|
|
97
97
|
].join("\n") + "\n");
|
|
98
98
|
}
|
|
99
|
-
export function renderAppClaudeSettings() {
|
|
100
|
-
const merged = upsertMethodManagedServers({}, buildMethodManagedServers());
|
|
101
|
-
return JSON.stringify(merged.settings, null, 2) + "\n";
|
|
102
|
-
}
|
|
103
99
|
export async function scaffoldAppProfile(input) {
|
|
104
100
|
const targetSlug = input.targetSlug ?? `local/${input.appId}`;
|
|
105
101
|
const description = input.description ??
|
|
@@ -112,10 +108,10 @@ export async function scaffoldAppProfile(input) {
|
|
|
112
108
|
const mdPath = join(input.targetRepo, "docs/service-architecture.md");
|
|
113
109
|
await writeFileAt(mdPath, renderAppServiceArchitecture({ appId: input.appId, description, today }));
|
|
114
110
|
filesWritten.push("docs/service-architecture.md");
|
|
115
|
-
await writeFileAt(join(input.targetRepo, ".claude/settings.json"), renderAppClaudeSettings());
|
|
116
|
-
filesWritten.push(".claude/settings.json");
|
|
117
111
|
await writeFileAt(join(input.targetRepo, WORKFLOW_REL_PATH), renderMethodValidationWorkflow("application"));
|
|
118
112
|
filesWritten.push(WORKFLOW_REL_PATH);
|
|
113
|
+
// The module the workflow calls (M-ADR 0219).
|
|
114
|
+
filesWritten.push(...(await writeMethodValidationModule(input.targetRepo)));
|
|
119
115
|
return { filesWritten };
|
|
120
116
|
}
|
|
121
117
|
async function writeFileAt(path, content) {
|
package/dist/lib/init/app.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/lib/init/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,
|
|
1
|
+
{"version":3,"file":"app.js","sourceRoot":"","sources":["../../../src/lib/init/app.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,8BAA8B,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAUrE,MAAM,UAAU,6BAA6B,CAAC,KAG7C;IACC,OAAO,CACL;QACE,kCAAkC;QAClC,GAAG;QACH,mFAAmF;QACnF,sDAAsD;QACtD,gEAAgE;QAChE,2EAA2E;QAC3E,EAAE;QACF,YAAY,KAAK,CAAC,KAAK,GAAG;QAC1B,iBAAiB,KAAK,CAAC,UAAU,GAAG;QACpC,EAAE;QACF,wBAAwB;QACxB,qDAAqD;QACrD,MAAM;KACP,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CACpB,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,4BAA4B,CAAC,KAI5C;IACC,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IACzC,OAAO,CACL;QACE,2BAA2B,UAAU,EAAE;QACvC,EAAE;QACF,eAAe,KAAK,CAAC,KAAK,EAAE;QAC5B,gBAAgB;QAChB,qBAAqB,KAAK,CAAC,KAAK,EAAE;QAClC,+FAA+F;QAC/F,EAAE;QACF,KAAK;QACL,EAAE;QACF,gBAAgB;QAChB,EAAE;QACF,KAAK,CAAC,WAAW;QAC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AC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAE,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;SACrD,IAAI,CAAC,GAAG,CAAC,CAAC;AACf,CAAC"}
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Renders .github/workflows/method-validation.yml
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* human-readable `orchestration/templates/ci/method-validation.yml.hbs`
|
|
7
|
-
* in sdd-method; the two must stay in lockstep.
|
|
2
|
+
* Renders .github/workflows/method-validation.yml: the GitHub Actions host wrapper (M-ADR 0219
|
|
3
|
+
* §4.4), which installs the pinned Dagger CLI and calls the Method Validation module. The job
|
|
4
|
+
* itself is defined once, in ../ci-binding/module.ts; the other hosts' wrappers are in
|
|
5
|
+
* ../ci-binding/index.ts.
|
|
8
6
|
*
|
|
9
7
|
* Output wraps a `# method-managed: begin` / `# method-managed: end`
|
|
10
8
|
* block-marker pair so the sync path can preserve adopter-authored
|
|
@@ -18,12 +16,12 @@ export declare const BLOCK_END = "# method-managed: end";
|
|
|
18
16
|
* Full file content (block + adopter-extension footer). Used by
|
|
19
17
|
* `sdd-cli init` to write a fresh workflow.
|
|
20
18
|
*/
|
|
21
|
-
export declare function renderMethodValidationWorkflow(profile: Profile): string;
|
|
19
|
+
export declare function renderMethodValidationWorkflow(profile: Profile, runner?: readonly string[]): string;
|
|
22
20
|
/**
|
|
23
21
|
* Method-managed slice only (begin marker through end marker). Used
|
|
24
22
|
* by `sdd-cli sync` as the `incomingBlock` argument to
|
|
25
23
|
* `writeMarkedBlockFile` so adopter content outside the markers is
|
|
26
24
|
* preserved verbatim.
|
|
27
25
|
*/
|
|
28
|
-
export declare function renderMethodManagedWorkflowBlock(profile: Profile): string;
|
|
26
|
+
export declare function renderMethodManagedWorkflowBlock(profile: Profile, runner?: readonly string[]): string;
|
|
29
27
|
//# sourceMappingURL=ci-workflow.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-workflow.d.ts","sourceRoot":"","sources":["../../../src/lib/init/ci-workflow.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ci-workflow.d.ts","sourceRoot":"","sources":["../../../src/lib/init/ci-workflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAC;AAI/C,eAAO,MAAM,iBAAiB,4CAA4C,CAAC;AAC3E,eAAO,MAAM,WAAW,4BAA4B,CAAC;AACrD,eAAO,MAAM,SAAS,0BAA0B,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAGnG;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAAC,OAAO,EAAE,OAAO,EAAE,MAAM,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAErG"}
|
|
@@ -1,34 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Renders .github/workflows/method-validation.yml
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* human-readable `orchestration/templates/ci/method-validation.yml.hbs`
|
|
7
|
-
* in sdd-method; the two must stay in lockstep.
|
|
2
|
+
* Renders .github/workflows/method-validation.yml: the GitHub Actions host wrapper (M-ADR 0219
|
|
3
|
+
* §4.4), which installs the pinned Dagger CLI and calls the Method Validation module. The job
|
|
4
|
+
* itself is defined once, in ../ci-binding/module.ts; the other hosts' wrappers are in
|
|
5
|
+
* ../ci-binding/index.ts.
|
|
8
6
|
*
|
|
9
7
|
* Output wraps a `# method-managed: begin` / `# method-managed: end`
|
|
10
8
|
* block-marker pair so the sync path can preserve adopter-authored
|
|
11
9
|
* content outside the block.
|
|
12
10
|
*/
|
|
13
|
-
import {
|
|
14
|
-
import { validatorsForProfile } from "../validate/dispatch.js";
|
|
15
|
-
/** Titles kept from the hand-kept list, so the generated workflow's step names stay readable. */
|
|
16
|
-
const JOB_TITLES = {
|
|
17
|
-
"adr-structure": "Validate ADR metadata",
|
|
18
|
-
"spec-lifecycle": "Validate spec lifecycle",
|
|
19
|
-
"no-bare-adr": "Reject bare ADR references",
|
|
20
|
-
traceability: "Validate traceability",
|
|
21
|
-
"runway-classification": "Validate runway classification",
|
|
22
|
-
"corpus-consistency": "Validate corpus consistency",
|
|
23
|
-
config: "Validate configuration",
|
|
24
|
-
"app-docs": "Validate app documentation",
|
|
25
|
-
"integration-docs": "Validate integration documentation",
|
|
26
|
-
"yaml-parse": "Validate that tracked YAML parses",
|
|
27
|
-
"gate-readiness": "Validate gate readiness",
|
|
28
|
-
"bundle-coherence": "Report bundle coherence",
|
|
29
|
-
// CI has no platform checkout, so this step runs the app-only checks; the met gate needs the platform beside it.
|
|
30
|
-
"app-dependencies": "Validate app dependencies (app-only checks; no platform checkout in CI)",
|
|
31
|
-
};
|
|
11
|
+
import { DAGGER_VERSION, MODULE_CALL, MODULE_DIR } from "../ci-binding/module.js";
|
|
32
12
|
export const WORKFLOW_REL_PATH = ".github/workflows/method-validation.yml";
|
|
33
13
|
export const BLOCK_BEGIN = "# method-managed: begin";
|
|
34
14
|
export const BLOCK_END = "# method-managed: end";
|
|
@@ -36,8 +16,8 @@ export const BLOCK_END = "# method-managed: end";
|
|
|
36
16
|
* Full file content (block + adopter-extension footer). Used by
|
|
37
17
|
* `sdd-cli init` to write a fresh workflow.
|
|
38
18
|
*/
|
|
39
|
-
export function renderMethodValidationWorkflow(profile) {
|
|
40
|
-
const methodBlock = buildMethodManagedBlock(profile);
|
|
19
|
+
export function renderMethodValidationWorkflow(profile, runner) {
|
|
20
|
+
const methodBlock = buildMethodManagedBlock(profile, runner);
|
|
41
21
|
return methodBlock + "\n\n# Adopter-specific jobs go in a separate workflow file\n# (e.g. .github/workflows/adopter-validation.yml) — see\n# docs/method/methods/ci-baseline-guide.md.\n";
|
|
42
22
|
}
|
|
43
23
|
/**
|
|
@@ -46,104 +26,61 @@ export function renderMethodValidationWorkflow(profile) {
|
|
|
46
26
|
* `writeMarkedBlockFile` so adopter content outside the markers is
|
|
47
27
|
* preserved verbatim.
|
|
48
28
|
*/
|
|
49
|
-
export function renderMethodManagedWorkflowBlock(profile) {
|
|
50
|
-
return buildMethodManagedBlock(profile);
|
|
51
|
-
}
|
|
52
|
-
function buildMethodManagedBlock(profile) {
|
|
53
|
-
const lines = [];
|
|
54
|
-
lines.push(BLOCK_BEGIN);
|
|
55
|
-
lines.push("# Method-distributed validation workflow per M-ADR 0129.", "# Refreshed by `sdd-cli sync`; content inside the method-managed", "# markers must not be hand-edited (sync refuses without --allow-overwrite).", `# Profile: ${profile}`, "#",
|
|
56
|
-
// The DECISION rationale is emitted because its reader is the ADOPTER, who
|
|
57
|
-
// otherwise sees a bare pin and re-opens the question — measured twice in
|
|
58
|
-
// one week, by two different sessions reading this file. The MOTIVATION and
|
|
59
|
-
// the 3.0.0 near-miss stay as comments above `sddVerifyInstallSteps`:
|
|
60
|
-
// their reader is whoever maintains this generator, and they reach them there.
|
|
61
|
-
"# CI runs `sdd-verify` (@sdd-method/verify-cli), not the full sdd-cli", "# (M-ADR 0212). It ships only the verbs that read: whatever runs this job", "# can judge the repository and cannot change it.", "#", "# It is pinned EXACTLY, deliberately: to the verify-cli released with the", "# sdd-cli that last synced this repository. The version moves only when", "# you sync — your own act, at your own pace — and this file then names the", "# exact tool behind every verdict this job reports. The floor needs no", "# separate pin: sync refuses a bundle whose `minimum_sdd_cli_version` its", "# CLI does not meet, so the pin is always at or above it.", "#", "# Authoring and maintenance (sync, catalogue build, pack build) stay in", "# @sdd-method/sdd-cli; run those locally or in your own workflows.", "", "name: Method Validation", "", "on:", " pull_request:", " push:", " branches: [main, master]", ...pushPathsIgnore(profile), " workflow_dispatch:", "", "jobs:",
|
|
62
|
-
// ONE job, every validator a step. GitHub bills each job rounded UP to a
|
|
63
|
-
// whole minute, so one job per validator billed ~7 minutes for ~3.5 of
|
|
64
|
-
// compute on an application SDD and ~300 minutes per 41-repo sync wave,
|
|
65
|
-
// against a 2000-minute monthly cap an adopter org hit twice (measured by
|
|
66
|
-
// that adopter, 2026-10-12). One job bills ~4. The price is wall clock
|
|
67
|
-
// (~35s parallel becomes a few minutes sequential).
|
|
68
|
-
" method-validation:", " name: Method Validation", " runs-on: ubuntu-latest", " steps:", " - uses: actions/checkout@v4", ...RIPGREP_STEP);
|
|
69
|
-
const steps = [];
|
|
70
|
-
// One step per validator in the profile's default suite (validatorsForProfile, minus optional
|
|
71
|
-
// dispatchers), DERIVED rather than listed. The list here was once a hand-kept copy of that suite
|
|
72
|
-
// and drifted: the gating yaml-parse validator, added to the suite, never reached CI, and neither
|
|
73
|
-
// did gate-readiness (platform) or app-dependencies (application). Found by the conformance-persona
|
|
74
|
-
// pilot (2026-10-01) in the only executing CI in either estate. A validator added to the suite now
|
|
75
|
-
// reaches every adopter's CI at the next sync, with no second list to forget.
|
|
76
|
-
for (const v of validatorsForProfile(profile).filter((x) => x.optional !== true)) {
|
|
77
|
-
steps.push(validatorStep(JOB_TITLES[v.name] ?? `Validate ${v.name}`, `sdd-verify validate --target-repo . --validator ${v.name}`));
|
|
78
|
-
}
|
|
79
|
-
// Script-only checks with no validator entry (platform).
|
|
80
|
-
if (profile === "platform") {
|
|
81
|
-
steps.push(validatorStep("Validate cascade completeness", "bash orchestration/scripts/validate-cascade-completeness.sh all"), validatorStep("Validate architecture alignment", "bash orchestration/scripts/validate-architecture-alignment.sh"));
|
|
82
|
-
}
|
|
83
|
-
lines.push(...sddVerifyInstallSteps());
|
|
84
|
-
for (const s of steps)
|
|
85
|
-
lines.push(...s);
|
|
86
|
-
lines.push(BLOCK_END);
|
|
87
|
-
return lines.join("\n");
|
|
29
|
+
export function renderMethodManagedWorkflowBlock(profile, runner) {
|
|
30
|
+
return buildMethodManagedBlock(profile, runner);
|
|
88
31
|
}
|
|
89
32
|
/**
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
* Nine method-shipped scripts shell out to `rg` (six validate-*.sh, two
|
|
93
|
-
* validate-reverse-*.sh, bootstrap-app-repo.sh) and GitHub's ubuntu
|
|
94
|
-
* runners do not provide it — so those validators PASSED locally (where
|
|
95
|
-
* rg is installed) and exited 127 in CI, silently, since at least
|
|
96
|
-
* 2026-07-10. An adopter cannot fix this: both the workflow and the
|
|
97
|
-
* scripts are method-managed, inside the markers. Installing per-job
|
|
98
|
-
* rather than only in the jobs that currently need it makes the
|
|
99
|
-
* environment contract "method CI jobs provide rg" — so a script
|
|
100
|
-
* gaining the dependency later cannot silently break a job that lacked
|
|
101
|
-
* the step, at the cost of a few apt seconds per job.
|
|
102
|
-
*/
|
|
103
|
-
const RIPGREP_STEP = [
|
|
104
|
-
` - name: Install ripgrep`,
|
|
105
|
-
` run: sudo apt-get update -qq && sudo apt-get install -y -qq ripgrep`,
|
|
106
|
-
];
|
|
107
|
-
/**
|
|
108
|
-
* Node + verify-cli install, once per run (it was once per job).
|
|
109
|
-
*
|
|
110
|
-
* EXACT-PINNED to the verify-cli released with this sdd-cli (M-ADR 0212 §6.1
|
|
111
|
-
* Phase 1, ruled 2026-10-15). Until then the job installed the FULL sdd-cli
|
|
112
|
-
* through a `<2.0.0` ceiling, floating: an authoring tool in CI, and a verdict
|
|
113
|
-
* whose producing version only the run log recorded. A range pin is meaningless
|
|
114
|
-
* on a 0.x package anyway (every minor is breaking), and sync re-renders this
|
|
115
|
-
* block on every wave, so an exact pin costs adopters no extra churn.
|
|
116
|
-
*
|
|
117
|
-
* History worth keeping from the ceiling era: 436 unpinned installs across 112
|
|
118
|
-
* workflow files with zero pinned motivated the first pin, and the 3.0.0 cut
|
|
119
|
-
* nearly shipped a `<1.0.0` ceiling FROM the 1.0.0 CLI — a CI pinned below the
|
|
120
|
-
* tool that wrote it. An exact pin derived from the writing CLI cannot do that.
|
|
33
|
+
* `runs-on`: GitHub's hosted runner unless the SDD chose labels (sync --ci-runner), e.g. a
|
|
34
|
+
* self-hosted runner, where the Dagger engine and its cache persist between runs.
|
|
121
35
|
*/
|
|
122
|
-
function
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
` node-version: "20"`,
|
|
127
|
-
` - name: Install sdd-verify`,
|
|
128
|
-
` id: install`,
|
|
129
|
-
` run: npm install -g "@sdd-method/verify-cli@${getVerifyCliVersion()}"`,
|
|
130
|
-
// The run log stays the confirmation that the pinned version is what ran.
|
|
131
|
-
` - name: Record sdd-verify version`,
|
|
132
|
-
` run: sdd-verify --version`,
|
|
133
|
-
];
|
|
36
|
+
function runsOn(runner) {
|
|
37
|
+
if (runner === undefined || runner.length === 0)
|
|
38
|
+
return "ubuntu-latest";
|
|
39
|
+
return runner.length === 1 ? runner[0] : `[${runner.join(", ")}]`;
|
|
134
40
|
}
|
|
135
|
-
|
|
136
|
-
* A validator step. `!cancelled()` makes every validator run even after an
|
|
137
|
-
* earlier one fails, so one red step does not hide the verdicts after it — what
|
|
138
|
-
* separate jobs gave for free — while the job itself still fails. The install
|
|
139
|
-
* outcome guard stops a failed install from reporting every validator as red.
|
|
140
|
-
*/
|
|
141
|
-
function validatorStep(title, command) {
|
|
41
|
+
function buildMethodManagedBlock(profile, runner) {
|
|
142
42
|
return [
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
`
|
|
146
|
-
|
|
43
|
+
BLOCK_BEGIN,
|
|
44
|
+
"# Method Validation per M-ADR 0129, run by the method's Dagger module (M-ADR 0219).",
|
|
45
|
+
"# Refreshed by `sdd-cli sync`; content inside the method-managed",
|
|
46
|
+
"# markers must not be hand-edited (sync refuses without --allow-overwrite).",
|
|
47
|
+
`# Profile: ${profile}`,
|
|
48
|
+
"#",
|
|
49
|
+
// The DECISION rationale is emitted because its reader is the ADOPTER, who otherwise sees a
|
|
50
|
+
// bare call and re-opens the question.
|
|
51
|
+
`# The job is defined once, in ${MODULE_DIR}/, and this file only calls it:`,
|
|
52
|
+
"# the same module runs on GitHub Actions, GitLab CI, Jenkins and a laptop,",
|
|
53
|
+
"# so CI and a local run cannot disagree. The module reads its steps from",
|
|
54
|
+
"# `sdd-verify validate --list` and runs them on @sdd-method/verify-cli, which",
|
|
55
|
+
"# ships only the verbs that read (M-ADR 0212), pinned EXACTLY to the version",
|
|
56
|
+
"# released with the sdd-cli that last synced this repository. The catalogue",
|
|
57
|
+
"# freshness step (@sdd-method/maintain-cli, pinned the same way) is advisory.",
|
|
58
|
+
"#",
|
|
59
|
+
"# Run it locally (needs a container engine):",
|
|
60
|
+
`# ${MODULE_CALL}`,
|
|
61
|
+
"",
|
|
62
|
+
"name: Method Validation",
|
|
63
|
+
"",
|
|
64
|
+
"on:",
|
|
65
|
+
" pull_request:",
|
|
66
|
+
" push:",
|
|
67
|
+
" branches: [main, master]",
|
|
68
|
+
...pushPathsIgnore(profile),
|
|
69
|
+
" workflow_dispatch:",
|
|
70
|
+
"",
|
|
71
|
+
"jobs:",
|
|
72
|
+
// ONE job: GitHub bills each job rounded UP to a whole minute (adopter measurement, 2026-10-12).
|
|
73
|
+
" method-validation:",
|
|
74
|
+
" name: Method Validation",
|
|
75
|
+
` runs-on: ${runsOn(runner)}`,
|
|
76
|
+
" steps:",
|
|
77
|
+
" - uses: actions/checkout@v4",
|
|
78
|
+
" - name: Install Dagger",
|
|
79
|
+
` run: curl -fsSL https://dl.dagger.io/dagger/install.sh | BIN_DIR="$RUNNER_TEMP/dagger" DAGGER_VERSION=${DAGGER_VERSION} sh && echo "$RUNNER_TEMP/dagger" >> "$GITHUB_PATH"`,
|
|
80
|
+
" - name: Method Validation",
|
|
81
|
+
` run: ${MODULE_CALL}`,
|
|
82
|
+
BLOCK_END,
|
|
83
|
+
].join("\n");
|
|
147
84
|
}
|
|
148
85
|
/**
|
|
149
86
|
* `paths-ignore` for push, APPLICATION profile only: a push touching nothing but
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ci-workflow.js","sourceRoot":"","sources":["../../../src/lib/init/ci-workflow.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"ci-workflow.js","sourceRoot":"","sources":["../../../src/lib/init/ci-workflow.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAGlF,MAAM,CAAC,MAAM,iBAAiB,GAAG,yCAAyC,CAAC;AAC3E,MAAM,CAAC,MAAM,WAAW,GAAG,yBAAyB,CAAC;AACrD,MAAM,CAAC,MAAM,SAAS,GAAG,uBAAuB,CAAC;AAEjD;;;GAGG;AACH,MAAM,UAAU,8BAA8B,CAAC,OAAgB,EAAE,MAA0B;IACzF,MAAM,WAAW,GAAG,uBAAuB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC7D,OAAO,WAAW,GAAG,oKAAoK,CAAC;AAC5L,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,gCAAgC,CAAC,OAAgB,EAAE,MAA0B;IAC3F,OAAO,uBAAuB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;AAClD,CAAC;AAED;;;GAGG;AACH,SAAS,MAAM,CAAC,MAA0B;IACxC,IAAI,MAAM,KAAK,SAAS,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,eAAe,CAAC;IACxE,OAAO,MAAM,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAE,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC;AACrE,CAAC;AAED,SAAS,uBAAuB,CAAC,OAAgB,EAAE,MAA0B;IAC3E,OAAO;QACL,WAAW;QACX,qFAAqF;QACrF,kEAAkE;QAClE,6EAA6E;QAC7E,cAAc,OAAO,EAAE;QACvB,GAAG;QACH,4FAA4F;QAC5F,uCAAuC;QACvC,iCAAiC,UAAU,iCAAiC;QAC5E,4EAA4E;QAC5E,0EAA0E;QAC1E,+EAA+E;QAC/E,8EAA8E;QAC9E,6EAA6E;QAC7E,+EAA+E;QAC/E,GAAG;QACH,8CAA8C;QAC9C,OAAO,WAAW,EAAE;QACpB,EAAE;QACF,yBAAyB;QACzB,EAAE;QACF,KAAK;QACL,iBAAiB;QACjB,SAAS;QACT,8BAA8B;QAC9B,GAAG,eAAe,CAAC,OAAO,CAAC;QAC3B,sBAAsB;QACtB,EAAE;QACF,OAAO;QACP,iGAAiG;QACjG,sBAAsB;QACtB,6BAA6B;QAC7B,gBAAgB,MAAM,CAAC,MAAM,CAAC,EAAE;QAChC,YAAY;QACZ,mCAAmC;QACnC,8BAA8B;QAC9B,iHAAiH,cAAc,qDAAqD;QACpL,iCAAiC;QACjC,gBAAgB,WAAW,EAAE;QAC7B,SAAS;KACV,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,eAAe,CAAC,OAAgB;IACvC,IAAI,OAAO,KAAK,aAAa;QAAE,OAAO,EAAE,CAAC;IACzC,OAAO,CAAC,mBAAmB,EAAE,yBAAyB,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -60,6 +60,5 @@ export declare function renderIntegrationServiceArchitecture(input: {
|
|
|
60
60
|
export declare function scaffoldIntegrationProfile(input: IntegrationProfileRenderInput): Promise<{
|
|
61
61
|
filesWritten: string[];
|
|
62
62
|
}>;
|
|
63
|
-
export declare function renderIntegrationClaudeSettings(): string;
|
|
64
63
|
export declare function isIntegrationProfileType(value: string): value is IntegrationProfileType;
|
|
65
64
|
//# sourceMappingURL=integration.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/lib/init/integration.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/lib/init/integration.ts"],"names":[],"mappings":"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CACf,GAAG,MAAM,CAoHT;AAED,wBAAsB,0BAA0B,CAC9C,KAAK,EAAE,6BAA6B,GACnC,OAAO,CAAC;IAAE,YAAY,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAqErC;AAED,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,sBAAsB,CAEvF"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { mkdir, writeFile } from "node:fs/promises";
|
|
2
2
|
import { dirname, join } from "node:path";
|
|
3
|
-
import { buildMethodManagedServers, upsertMethodManagedServers, } from "../mcp-seed/index.js";
|
|
4
3
|
import { renderMethodValidationWorkflow, WORKFLOW_REL_PATH } from "./ci-workflow.js";
|
|
4
|
+
import { writeMethodValidationModule } from "../ci-binding/index.js";
|
|
5
5
|
export const INTEGRATION_PROFILE_TYPES = [
|
|
6
6
|
"workflow",
|
|
7
7
|
"device-hardware",
|
|
@@ -263,16 +263,12 @@ export async function scaffoldIntegrationProfile(input) {
|
|
|
263
263
|
today,
|
|
264
264
|
}));
|
|
265
265
|
filesWritten.push("docs/service-architecture.md");
|
|
266
|
-
await writeFileAt(join(input.targetRepo, ".claude/settings.json"), renderIntegrationClaudeSettings());
|
|
267
|
-
filesWritten.push(".claude/settings.json");
|
|
268
266
|
await writeFileAt(join(input.targetRepo, WORKFLOW_REL_PATH), renderMethodValidationWorkflow("integration"));
|
|
269
267
|
filesWritten.push(WORKFLOW_REL_PATH);
|
|
268
|
+
// The module the workflow calls (M-ADR 0219).
|
|
269
|
+
filesWritten.push(...(await writeMethodValidationModule(input.targetRepo)));
|
|
270
270
|
return { filesWritten };
|
|
271
271
|
}
|
|
272
|
-
export function renderIntegrationClaudeSettings() {
|
|
273
|
-
const merged = upsertMethodManagedServers({}, buildMethodManagedServers());
|
|
274
|
-
return JSON.stringify(merged.settings, null, 2) + "\n";
|
|
275
|
-
}
|
|
276
272
|
export function isIntegrationProfileType(value) {
|
|
277
273
|
return INTEGRATION_PROFILE_TYPES.includes(value);
|
|
278
274
|
}
|