@skillcap/gdh 2.0.0 → 3.0.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/INSTALL-BUNDLE.json +1 -1
- package/RELEASE-SPAN-UPDATE-CONTRACTS.json +110 -0
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts +3 -18
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.js +11 -6
- package/node_modules/@gdh/adapters/dist/authoring-hook-render.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.d.ts +15 -3
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.js +14 -2
- package/node_modules/@gdh/adapters/dist/claude-settings-patch.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.d.ts +18 -9
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.js +18 -9
- package/node_modules/@gdh/adapters/dist/claude-statusline-render.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-hook-render.d.ts +8 -2
- package/node_modules/@gdh/adapters/dist/claude-update-hook-render.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js +8 -2
- package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/claude-update-worker-render.d.ts +2 -2
- package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js +2 -2
- package/node_modules/@gdh/adapters/dist/index.d.ts +2 -5
- package/node_modules/@gdh/adapters/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/index.js +92 -78
- package/node_modules/@gdh/adapters/dist/index.js.map +1 -1
- package/node_modules/@gdh/adapters/dist/templates/authoring-hook.js.tpl +49 -43
- package/node_modules/@gdh/adapters/package.json +8 -8
- package/node_modules/@gdh/authoring/dist/project.d.ts.map +1 -1
- package/node_modules/@gdh/authoring/dist/project.js +39 -12
- package/node_modules/@gdh/authoring/dist/project.js.map +1 -1
- package/node_modules/@gdh/authoring/package.json +2 -2
- package/node_modules/@gdh/cli/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/index.js +121 -80
- package/node_modules/@gdh/cli/dist/index.js.map +1 -1
- package/node_modules/@gdh/cli/dist/self-update.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/self-update.js +62 -1
- package/node_modules/@gdh/cli/dist/self-update.js.map +1 -1
- package/node_modules/@gdh/cli/dist/setup.d.ts +7 -0
- package/node_modules/@gdh/cli/dist/setup.d.ts.map +1 -1
- package/node_modules/@gdh/cli/dist/setup.js +43 -11
- package/node_modules/@gdh/cli/dist/setup.js.map +1 -1
- package/node_modules/@gdh/cli/package.json +10 -10
- package/node_modules/@gdh/core/dist/git-root.d.ts +8 -0
- package/node_modules/@gdh/core/dist/git-root.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/git-root.js +39 -0
- package/node_modules/@gdh/core/dist/git-root.js.map +1 -0
- package/node_modules/@gdh/core/dist/index.d.ts +17 -20
- package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/index.js +15 -4
- package/node_modules/@gdh/core/dist/index.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.d.ts +3 -0
- package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.js +336 -0
- package/node_modules/@gdh/core/dist/migrations/entries/s3c21_to_s3c22_canonical_hook_paths.js.map +1 -0
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts +13 -11
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js +13 -11
- package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/registry.d.ts +1 -1
- package/node_modules/@gdh/core/dist/migrations/registry.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/migrations/registry.js +2 -0
- package/node_modules/@gdh/core/dist/migrations/registry.js.map +1 -1
- package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.d.ts +40 -0
- package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.js +66 -0
- package/node_modules/@gdh/core/dist/state/codex-retrust-reminder.js.map +1 -0
- package/node_modules/@gdh/core/dist/state/migration-trace.d.ts +61 -0
- package/node_modules/@gdh/core/dist/state/migration-trace.d.ts.map +1 -0
- package/node_modules/@gdh/core/dist/state/migration-trace.js +103 -0
- package/node_modules/@gdh/core/dist/state/migration-trace.js.map +1 -0
- package/node_modules/@gdh/core/dist/update-probe.d.ts +1 -2
- package/node_modules/@gdh/core/dist/update-probe.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/update-probe.js +1 -2
- package/node_modules/@gdh/core/dist/update-probe.js.map +1 -1
- package/node_modules/@gdh/core/package.json +1 -1
- package/node_modules/@gdh/docs/dist/rules.js +1 -1
- package/node_modules/@gdh/docs/dist/rules.js.map +1 -1
- package/node_modules/@gdh/docs/dist/templates/guidance/authoring-and-validation.md.tpl +2 -1
- package/node_modules/@gdh/docs/package.json +2 -2
- package/node_modules/@gdh/mcp/package.json +8 -8
- package/node_modules/@gdh/observability/package.json +2 -2
- package/node_modules/@gdh/runtime/package.json +2 -2
- package/node_modules/@gdh/scan/package.json +3 -3
- package/node_modules/@gdh/verify/package.json +7 -7
- package/package.json +11 -11
- package/node_modules/@gdh/adapters/dist/authoring-hook-state-path.d.ts +0 -17
- package/node_modules/@gdh/adapters/dist/authoring-hook-state-path.d.ts.map +0 -1
- package/node_modules/@gdh/adapters/dist/authoring-hook-state-path.js +0 -23
- package/node_modules/@gdh/adapters/dist/authoring-hook-state-path.js.map +0 -1
|
@@ -12,8 +12,7 @@ import { inspectRuntimeBridgeBroker, inspectRuntimeBridgeSurface, inspectRuntime
|
|
|
12
12
|
import { readInventoryCacheOrScan } from "@gdh/scan";
|
|
13
13
|
import { CLAUDE_SETTINGS_RELATIVE_PATH, patchClaudeSettingsForGdhAuthoringHooks, patchClaudeSettingsForGdhSessionStart, patchClaudeSettingsForGdhStatusline, } from "./claude-settings-patch.js";
|
|
14
14
|
import { computeDeferredActionsAdvisory, } from "./deferred-actions-advisory.js";
|
|
15
|
-
import {
|
|
16
|
-
import { computeStateRelativePathFromHook } from "./authoring-hook-state-path.js";
|
|
15
|
+
import { GDH_AUTHORING_HOOK_RELATIVE_PATH, renderGdhAuthoringHook, } from "./authoring-hook-render.js";
|
|
17
16
|
import { removeManagedCodexAuthoringHookBlock, renderManagedCodexAuthoringHookBlock, } from "./codex-authoring-hook-block.js";
|
|
18
17
|
import { CLAUDE_STATUSLINE_RELATIVE_PATH, renderClaudeUpdateStatusline, } from "./claude-statusline-render.js";
|
|
19
18
|
import { CLAUDE_CHECK_UPDATE_HOOK_RELATIVE_PATH, CLAUDE_CHECK_UPDATE_WORKER_RELATIVE_PATH, renderClaudeCheckUpdateHook, } from "./claude-update-hook-render.js";
|
|
@@ -340,42 +339,6 @@ function summarizeRuntimeBridgeBrokerLifecycleForStatus(lifecycle) {
|
|
|
340
339
|
}
|
|
341
340
|
return "Runtime bridge broker state is unavailable; inspect with `gdh bridge session doctor`.";
|
|
342
341
|
}
|
|
343
|
-
export async function createGsdSnapshot(targetPath, options = {}) {
|
|
344
|
-
const context = await buildAuthoringContext(targetPath);
|
|
345
|
-
const effectiveRepoState = deriveRepoState(context);
|
|
346
|
-
const files = normalizeChangedFiles(options.files ?? []);
|
|
347
|
-
const guidance = await getGuidanceStatus(context.targetPath);
|
|
348
|
-
const [audit, guidanceResolve] = await Promise.all([
|
|
349
|
-
inspectGuidanceAudit(context.targetPath),
|
|
350
|
-
resolveGuidanceQuery(context.targetPath, {
|
|
351
|
-
taskTypes: ["authoring"],
|
|
352
|
-
capabilities: context.status.effectiveCapabilities,
|
|
353
|
-
repoState: effectiveRepoState,
|
|
354
|
-
keywords: [],
|
|
355
|
-
}),
|
|
356
|
-
]);
|
|
357
|
-
const guidanceStatus = {
|
|
358
|
-
targetPath: context.targetPath,
|
|
359
|
-
projectConfigPresent: context.projectConfig !== null,
|
|
360
|
-
authoringReadiness: context.status.readiness,
|
|
361
|
-
effectiveRepoState,
|
|
362
|
-
guidance,
|
|
363
|
-
audit,
|
|
364
|
-
};
|
|
365
|
-
return {
|
|
366
|
-
targetPath: context.targetPath,
|
|
367
|
-
adapter: {
|
|
368
|
-
adapter: "gsd",
|
|
369
|
-
enabledByDefault: false,
|
|
370
|
-
state: "disabled_by_default",
|
|
371
|
-
summary: "The GSD bridge is an optional read-mostly adapter over stable GDH outputs and is not required for core GDH behavior.",
|
|
372
|
-
},
|
|
373
|
-
files,
|
|
374
|
-
status: context.status,
|
|
375
|
-
guidanceStatus,
|
|
376
|
-
guidanceResolve,
|
|
377
|
-
};
|
|
378
|
-
}
|
|
379
342
|
function normalizePortableRelativePath(relativePath) {
|
|
380
343
|
const normalized = relativePath.split(path.sep).join("/");
|
|
381
344
|
return normalized === "" ? "." : normalized.replace(/\/+$/, "");
|
|
@@ -643,7 +606,7 @@ function inspectCodexAuthoringHookConfig(targetPath, content, enabled) {
|
|
|
643
606
|
const ready = content !== null &&
|
|
644
607
|
/^\s*codex_hooks\s*=\s*true\s*$/m.test(content) &&
|
|
645
608
|
content.includes("# BEGIN GDH managed authoring hooks") &&
|
|
646
|
-
content.includes(
|
|
609
|
+
content.includes(GDH_AUTHORING_HOOK_RELATIVE_PATH);
|
|
647
610
|
return createSurfaceStatus({
|
|
648
611
|
kind: "hook_config",
|
|
649
612
|
scope: "repo",
|
|
@@ -742,7 +705,7 @@ async function inspectCodexAdapter(targetPath, guidance, projectMcp, pinnedVersi
|
|
|
742
705
|
.readFile(path.resolve(targetPath, CODEX_RUN_GAME_SKILL_RELATIVE_PATH), "utf8")
|
|
743
706
|
.catch(() => null);
|
|
744
707
|
const codexAuthoringHookContent = await fs
|
|
745
|
-
.readFile(path.join(projectMcp.integrationRootPath,
|
|
708
|
+
.readFile(path.join(projectMcp.integrationRootPath, GDH_AUTHORING_HOOK_RELATIVE_PATH), "utf8")
|
|
746
709
|
.catch(() => null);
|
|
747
710
|
const codexProjectConfigContent = await fs
|
|
748
711
|
.readFile(path.join(projectMcp.integrationRootPath, CODEX_PROJECT_CONFIG_RELATIVE_PATH), "utf8")
|
|
@@ -758,8 +721,6 @@ async function inspectCodexAdapter(targetPath, guidance, projectMcp, pinnedVersi
|
|
|
758
721
|
: renderGdhAuthoringHook({
|
|
759
722
|
pinnedVersion,
|
|
760
723
|
targetRelativePath: path.relative(projectMcp.integrationRootPath, targetPath) || ".",
|
|
761
|
-
agent: "codex",
|
|
762
|
-
stateRelativePathFromHook: computeStateRelativePathFromHook(projectMcp.integrationRootPath, CODEX_AUTHORING_HOOK_RELATIVE_PATH, projectMcp.integrationRootPath),
|
|
763
724
|
});
|
|
764
725
|
const surfaces = [
|
|
765
726
|
createSurfaceStatus({
|
|
@@ -807,7 +768,7 @@ async function inspectCodexAdapter(targetPath, guidance, projectMcp, pinnedVersi
|
|
|
807
768
|
...inspectCodexSkillSurface(targetPath, CODEX_UPDATE_SKILL_RELATIVE_PATH, codexUpdateContent, expectedCodexUpdateSkill, "gdh-update"),
|
|
808
769
|
...inspectCodexSkillSurface(targetPath, CODEX_PREPARE_SKILL_RELATIVE_PATH, codexPrepareContent, expectedCodexPrepareSkill, "gdh-prepare"),
|
|
809
770
|
...inspectCodexSkillSurface(targetPath, CODEX_RUN_GAME_SKILL_RELATIVE_PATH, codexRunGameContent, expectedCodexRunGameSkill, "gdh-run-game"),
|
|
810
|
-
inspectManagedHookSurface("codex", projectMcp.integrationRootPath,
|
|
771
|
+
inspectManagedHookSurface("codex", projectMcp.integrationRootPath, GDH_AUTHORING_HOOK_RELATIVE_PATH, codexAuthoringHookContent, expectedCodexAuthoringHook, "authoring guard"),
|
|
811
772
|
inspectCodexAuthoringHookConfig(projectMcp.integrationRootPath, codexProjectConfigContent, projectMcp.enabled),
|
|
812
773
|
];
|
|
813
774
|
if (projectMcp.enabled) {
|
|
@@ -871,7 +832,7 @@ async function inspectClaudeAdapter(targetPath, guidance, projectMcp, pinnedVers
|
|
|
871
832
|
.readFile(path.join(targetPath, CLAUDE_STATUSLINE_RELATIVE_PATH), "utf8")
|
|
872
833
|
.catch(() => null);
|
|
873
834
|
const claudeAuthoringHookContent = await fs
|
|
874
|
-
.readFile(path.join(targetPath,
|
|
835
|
+
.readFile(path.join(targetPath, GDH_AUTHORING_HOOK_RELATIVE_PATH), "utf8")
|
|
875
836
|
.catch(() => null);
|
|
876
837
|
let detectedTarget = null;
|
|
877
838
|
if (lstat?.isSymbolicLink()) {
|
|
@@ -886,11 +847,6 @@ async function inspectClaudeAdapter(targetPath, guidance, projectMcp, pinnedVers
|
|
|
886
847
|
: renderGdhAuthoringHook({
|
|
887
848
|
pinnedVersion,
|
|
888
849
|
targetRelativePath: ".",
|
|
889
|
-
agent: "claude",
|
|
890
|
-
// inspectClaudeAdapter previews the same-repo install: hook lives at
|
|
891
|
-
// `<targetPath>/.claude/hooks/gdh-authoring-guard.js`; state lives at
|
|
892
|
-
// `<targetPath>/.gdh-state/`. Compute the relative from the hook dir.
|
|
893
|
-
stateRelativePathFromHook: computeStateRelativePathFromHook(targetPath, CLAUDE_AUTHORING_HOOK_RELATIVE_PATH, targetPath),
|
|
894
850
|
});
|
|
895
851
|
const expectedClaudeStatusCommand = pinnedVersion === null ? null : renderClaudeStatusCommand(pinnedVersion);
|
|
896
852
|
const expectedClaudeMigrateCommand = pinnedVersion === null ? null : renderClaudeMigrateCommand(pinnedVersion);
|
|
@@ -948,7 +904,7 @@ async function inspectClaudeAdapter(targetPath, guidance, projectMcp, pinnedVers
|
|
|
948
904
|
inspectManagedHookSurface("claude", targetPath, CLAUDE_CHECK_UPDATE_HOOK_RELATIVE_PATH, claudeCheckUpdateHookContent, expectedClaudeCheckUpdateHook, "gdh-check-update-hook"),
|
|
949
905
|
inspectManagedHookSurface("claude", targetPath, CLAUDE_CHECK_UPDATE_WORKER_RELATIVE_PATH, claudeCheckUpdateWorkerContent, expectedClaudeCheckUpdateWorker, "gdh-check-update-worker"),
|
|
950
906
|
inspectManagedHookSurface("claude", targetPath, CLAUDE_STATUSLINE_RELATIVE_PATH, claudeStatuslineContent, expectedClaudeStatusline, "gdh-statusline"),
|
|
951
|
-
inspectManagedHookSurface("claude", targetPath,
|
|
907
|
+
inspectManagedHookSurface("claude", targetPath, GDH_AUTHORING_HOOK_RELATIVE_PATH, claudeAuthoringHookContent, expectedClaudeAuthoringHook, "authoring guard"),
|
|
952
908
|
];
|
|
953
909
|
if (path.resolve(projectMcp.integrationRootPath) !== path.resolve(targetPath)) {
|
|
954
910
|
surfaces.push(...(await inspectRootSymlinkSurfaces({
|
|
@@ -1319,13 +1275,9 @@ function planCodexRepoInstallActions(targetPath, adapter, pinnedVersion, project
|
|
|
1319
1275
|
planSkillInstallAction("codex", targetPath, adapter, CODEX_UPDATE_SKILL_RELATIVE_PATH, renderCodexUpdateSkill, "gdh-update", pinnedVersion),
|
|
1320
1276
|
planSkillInstallAction("codex", targetPath, adapter, CODEX_PREPARE_SKILL_RELATIVE_PATH, renderCodexPrepareSkill, "gdh-prepare", pinnedVersion),
|
|
1321
1277
|
planSkillInstallAction("codex", targetPath, adapter, CODEX_RUN_GAME_SKILL_RELATIVE_PATH, renderCodexRunGameSkill, "gdh-run-game", pinnedVersion),
|
|
1322
|
-
planSkillInstallAction("codex", integrationRootPath, adapter,
|
|
1278
|
+
planSkillInstallAction("codex", integrationRootPath, adapter, GDH_AUTHORING_HOOK_RELATIVE_PATH, (version) => renderGdhAuthoringHook({
|
|
1323
1279
|
pinnedVersion: version,
|
|
1324
1280
|
targetRelativePath: path.relative(integrationRootPath, targetPath) || ".",
|
|
1325
|
-
agent: "codex",
|
|
1326
|
-
// Codex install-action: hook installed at integrationRootPath; state
|
|
1327
|
-
// root lives at integrationRootPath/.gdh-state.
|
|
1328
|
-
stateRelativePathFromHook: computeStateRelativePathFromHook(integrationRootPath, CODEX_AUTHORING_HOOK_RELATIVE_PATH, integrationRootPath),
|
|
1329
1281
|
}), "authoring guard", pinnedVersion),
|
|
1330
1282
|
];
|
|
1331
1283
|
if (projectMcp.enabled && projectMcp.codexProjectFile.state !== "ready") {
|
|
@@ -1663,18 +1615,9 @@ function planClaudeInstallActions(targetPath, adapter, pinnedVersion, integratio
|
|
|
1663
1615
|
// statusLine slot automatically because that would shadow user/global
|
|
1664
1616
|
// statusline content. Users can manually point their config at
|
|
1665
1617
|
// gdh-statusline.js later; the baked file is a no-op until wired.
|
|
1666
|
-
planHookInstallAction("claude", targetPath, adapter, CLAUDE_STATUSLINE_RELATIVE_PATH, renderClaudeUpdateStatusline, "gdh-statusline", pinnedVersion), planHookInstallAction("claude", targetPath, adapter,
|
|
1618
|
+
planHookInstallAction("claude", targetPath, adapter, CLAUDE_STATUSLINE_RELATIVE_PATH, renderClaudeUpdateStatusline, "gdh-statusline", pinnedVersion), planHookInstallAction("claude", targetPath, adapter, GDH_AUTHORING_HOOK_RELATIVE_PATH, (version) => renderGdhAuthoringHook({
|
|
1667
1619
|
pinnedVersion: version,
|
|
1668
1620
|
targetRelativePath: ".",
|
|
1669
|
-
agent: "claude",
|
|
1670
|
-
// Claude install-action target install: hook lives at
|
|
1671
|
-
// `<targetPath>/.claude/hooks/...`; state root lives at
|
|
1672
|
-
// `<integrationRootPath>/.gdh-state/`. In the same-repo case,
|
|
1673
|
-
// integrationRootPath equals targetPath; in the monorepo nested-target
|
|
1674
|
-
// case (where this same hook is also installed at the target alongside
|
|
1675
|
-
// a separate root-launched hook from site #5), the state remains at
|
|
1676
|
-
// integrationRootPath/.gdh-state, so use integrationRootPath here.
|
|
1677
|
-
stateRelativePathFromHook: computeStateRelativePathFromHook(targetPath, CLAUDE_AUTHORING_HOOK_RELATIVE_PATH, integrationRootPath),
|
|
1678
1621
|
}), "authoring guard", pinnedVersion));
|
|
1679
1622
|
if (path.resolve(integrationRootPath) !== path.resolve(targetPath)) {
|
|
1680
1623
|
const rootTargetRelativePath = path.relative(integrationRootPath, targetPath) || ".";
|
|
@@ -1689,15 +1632,10 @@ function planClaudeInstallActions(targetPath, adapter, pinnedVersion, integratio
|
|
|
1689
1632
|
}), planDirectWriteFileAction({
|
|
1690
1633
|
agent: "claude",
|
|
1691
1634
|
targetPath: integrationRootPath,
|
|
1692
|
-
relativePath:
|
|
1635
|
+
relativePath: GDH_AUTHORING_HOOK_RELATIVE_PATH,
|
|
1693
1636
|
content: renderGdhAuthoringHook({
|
|
1694
1637
|
pinnedVersion,
|
|
1695
1638
|
targetRelativePath: rootTargetRelativePath,
|
|
1696
|
-
agent: "claude",
|
|
1697
|
-
// Root-launched Claude install in monorepo nested-target case: hook
|
|
1698
|
-
// lives at `<integrationRootPath>/.claude/hooks/...`; state lives at
|
|
1699
|
-
// `<integrationRootPath>/.gdh-state/`.
|
|
1700
|
-
stateRelativePathFromHook: computeStateRelativePathFromHook(integrationRootPath, CLAUDE_AUTHORING_HOOK_RELATIVE_PATH, integrationRootPath),
|
|
1701
1639
|
}),
|
|
1702
1640
|
readySummary: "Root-launched Claude authoring hook already matches the managed target-scoped hook.",
|
|
1703
1641
|
createSummary: "Create the root-launched Claude authoring hook with target-scoped filtering.",
|
|
@@ -2434,10 +2372,21 @@ async function isDefaultRulesBoilerplate(targetPath, projectConfig) {
|
|
|
2434
2372
|
return actual === expected || isPriorDefaultRulesBoilerplate(actual);
|
|
2435
2373
|
}
|
|
2436
2374
|
function isPriorDefaultRulesBoilerplate(content) {
|
|
2437
|
-
//
|
|
2438
|
-
//
|
|
2439
|
-
//
|
|
2440
|
-
|
|
2375
|
+
// Each entry below is a prior-version GDH-owned default rules body that is
|
|
2376
|
+
// safe to refresh to the current default during `gdh migrate --apply`. The
|
|
2377
|
+
// `version:` line is interpolated to the CURRENT schema version because
|
|
2378
|
+
// `coerceRulesDocument` normalizes the on-disk header before this comparison.
|
|
2379
|
+
// Append a new entry here when the live default body changes; removing an
|
|
2380
|
+
// older entry drops chain support for targets last touched at that wording.
|
|
2381
|
+
//
|
|
2382
|
+
// - v0.18-v0.26.7 wording: "Run `gdh authoring check` after changing Godot
|
|
2383
|
+
// source or project configuration files." Also the locked s2c2→s2c3
|
|
2384
|
+
// transform output, so chain matrix runs from v0.18.0 land here.
|
|
2385
|
+
// - v0.26.8-v2.0.0 wording: "Do not rerun authoring checks during normal
|
|
2386
|
+
// hooked edits..." Stopped telling agents to rerun hook-owned checks but
|
|
2387
|
+
// still positioned `authoring-check` as a CLI-shaped verb.
|
|
2388
|
+
const priorRulesBoilerplateBodies = [
|
|
2389
|
+
`version: ${GDH_RULES_SCHEMA_VERSION}
|
|
2441
2390
|
hard_rules:
|
|
2442
2391
|
- id: "authoring-validation-evidence"
|
|
2443
2392
|
summary: "Use GDH authoring check evidence when judging Godot code validity."
|
|
@@ -2500,8 +2449,73 @@ path_scopes:
|
|
|
2500
2449
|
kind: "editor_validation"
|
|
2501
2450
|
required: true
|
|
2502
2451
|
summary: "Arrange editor-side validation for \`EditorPlugin\` and plugin configuration changes before claiming code validity."
|
|
2503
|
-
|
|
2504
|
-
|
|
2452
|
+
`,
|
|
2453
|
+
`version: ${GDH_RULES_SCHEMA_VERSION}
|
|
2454
|
+
hard_rules:
|
|
2455
|
+
- id: "authoring-validation-evidence"
|
|
2456
|
+
summary: "Use managed authoring validation evidence when judging Godot code validity."
|
|
2457
|
+
rationale: "Authoring validity should come from GDH diagnostics or final validation evidence, not readiness guesses."
|
|
2458
|
+
validation_expectations:
|
|
2459
|
+
[]
|
|
2460
|
+
soft_guidance:
|
|
2461
|
+
- id: "prefer-gdh-surfaces"
|
|
2462
|
+
summary: "Prefer GDH status, target-prepare, authoring, import-refresh, and guidance surfaces over ad hoc Godot-state guesses."
|
|
2463
|
+
rationale: "GDH exists to make Godot authoring and validation constraints inspectable instead of folklore-driven."
|
|
2464
|
+
validation_expectations:
|
|
2465
|
+
[]
|
|
2466
|
+
prohibited_patterns:
|
|
2467
|
+
- id: "generated-godot-state-is-not-truth"
|
|
2468
|
+
summary: "Do not treat \`.godot/\` generated state as durable project truth or hand-edit it unless a project-specific rule says otherwise."
|
|
2469
|
+
rationale: "Generated import/editor state is environment-sensitive and should not become the source of truth for agents."
|
|
2470
|
+
validation_expectations:
|
|
2471
|
+
[]
|
|
2472
|
+
- id: "dont-copy-project-local-env-files-by-default"
|
|
2473
|
+
summary: "Do not copy project-local env files such as \`.env.local\` as part of default GDH target preparation unless project-specific guidance explicitly says to do so."
|
|
2474
|
+
rationale: "Default GDH preparation should stay deterministic and should not silently inherit machine-local env behavior from another checkout."
|
|
2475
|
+
validation_expectations:
|
|
2476
|
+
[]
|
|
2477
|
+
path_scopes:
|
|
2478
|
+
- id: "authoring-files"
|
|
2479
|
+
summary: "Authoring-facing Godot source and project files rely on managed hook feedback during edits and explicit validation evidence at handoff."
|
|
2480
|
+
path_globs:
|
|
2481
|
+
- "**/*.gd"
|
|
2482
|
+
- "**/*.tscn"
|
|
2483
|
+
- "**/*.tres"
|
|
2484
|
+
- "project.godot"
|
|
2485
|
+
hard_rules:
|
|
2486
|
+
[]
|
|
2487
|
+
soft_guidance:
|
|
2488
|
+
[]
|
|
2489
|
+
prohibited_patterns:
|
|
2490
|
+
[]
|
|
2491
|
+
validation_expectations:
|
|
2492
|
+
- id: "authoring-check"
|
|
2493
|
+
kind: "authoring_check"
|
|
2494
|
+
required: true
|
|
2495
|
+
summary: "Do not rerun authoring checks during normal hooked edits; collect explicit authoring-check evidence only for handoff, unsupported file types, missing hooks, or recovery."
|
|
2496
|
+
- id: "editor-plugin-files"
|
|
2497
|
+
summary: "EditorPlugin and plugin configuration work requires editor-side validation, not only runtime confidence."
|
|
2498
|
+
path_globs:
|
|
2499
|
+
- "addons/**/plugin.gd"
|
|
2500
|
+
- "addons/**/plugin.cfg"
|
|
2501
|
+
hard_rules:
|
|
2502
|
+
[]
|
|
2503
|
+
soft_guidance:
|
|
2504
|
+
- id: "surface-editor-validation"
|
|
2505
|
+
summary: "Surface editor-side caveats explicitly when plugin or \`@tool\` work is involved."
|
|
2506
|
+
rationale: "Phase 3 already detects editor-side caveats at the point of use and Phase 4 should preserve that distinction."
|
|
2507
|
+
validation_expectations:
|
|
2508
|
+
[]
|
|
2509
|
+
prohibited_patterns:
|
|
2510
|
+
[]
|
|
2511
|
+
validation_expectations:
|
|
2512
|
+
- id: "editor-validation"
|
|
2513
|
+
kind: "editor_validation"
|
|
2514
|
+
required: true
|
|
2515
|
+
summary: "Arrange editor-side validation for \`EditorPlugin\` and plugin configuration changes before claiming code validity."
|
|
2516
|
+
`,
|
|
2517
|
+
];
|
|
2518
|
+
return priorRulesBoilerplateBodies.includes(content);
|
|
2505
2519
|
}
|
|
2506
2520
|
function inspectAgentContractLifecycleSurface(targetPath, guidanceStatus) {
|
|
2507
2521
|
const status = guidanceStatus.agentContract;
|
|
@@ -3259,7 +3273,7 @@ function normalizeChangedFiles(files) {
|
|
|
3259
3273
|
}
|
|
3260
3274
|
export { CLAUDE_STATUSLINE_RELATIVE_PATH } from "./claude-statusline-render.js";
|
|
3261
3275
|
export { CLAUDE_CHECK_UPDATE_HOOK_RELATIVE_PATH } from "./claude-update-hook-render.js";
|
|
3262
|
-
export { CLAUDE_AUTHORING_HOOK_COMMAND,
|
|
3276
|
+
export { CLAUDE_AUTHORING_HOOK_COMMAND, CODEX_AUTHORING_HOOK_COMMAND, GDH_AUTHORING_HOOK_RELATIVE_PATH, } from "./authoring-hook-render.js";
|
|
3263
3277
|
export { bumpAndRebakePin, } from "./self-update-mechanics.js";
|
|
3264
3278
|
export { deriveExpectedRenderSet, runInventorySweep, } from "./inventory-sweep.js";
|
|
3265
3279
|
export { BACKUP_MANIFEST_RELATIVE_PATH, BACKUP_RELATIVE_PATH, BACKUP_STAGING_RELATIVE_PATH, detectClass1MarkerDrift, driftResultToPreservationNotes, readBackupManifest, restoreFromDurableBackup, writeDurableBackup, } from "./durable-backup.js";
|