@skillcap/gdh 0.26.10 → 1.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.
Files changed (55) hide show
  1. package/INSTALL-BUNDLE.json +1 -1
  2. package/README.md +1 -1
  3. package/RELEASE-SPAN-UPDATE-CONTRACTS.json +70 -0
  4. package/node_modules/@gdh/adapters/dist/codex-authoring-hook-block.d.ts +16 -0
  5. package/node_modules/@gdh/adapters/dist/codex-authoring-hook-block.d.ts.map +1 -0
  6. package/node_modules/@gdh/adapters/dist/codex-authoring-hook-block.js +40 -0
  7. package/node_modules/@gdh/adapters/dist/codex-authoring-hook-block.js.map +1 -0
  8. package/node_modules/@gdh/adapters/dist/index.d.ts +2 -26
  9. package/node_modules/@gdh/adapters/dist/index.d.ts.map +1 -1
  10. package/node_modules/@gdh/adapters/dist/index.js +70 -435
  11. package/node_modules/@gdh/adapters/dist/index.js.map +1 -1
  12. package/node_modules/@gdh/adapters/dist/self-update-mechanics.js +1 -1
  13. package/node_modules/@gdh/adapters/dist/self-update-mechanics.js.map +1 -1
  14. package/node_modules/@gdh/adapters/dist/skill-rendering.d.ts +2 -9
  15. package/node_modules/@gdh/adapters/dist/skill-rendering.d.ts.map +1 -1
  16. package/node_modules/@gdh/adapters/dist/skill-rendering.js +20 -49
  17. package/node_modules/@gdh/adapters/dist/skill-rendering.js.map +1 -1
  18. package/node_modules/@gdh/adapters/package.json +8 -8
  19. package/node_modules/@gdh/authoring/package.json +2 -2
  20. package/node_modules/@gdh/cli/dist/index.d.ts.map +1 -1
  21. package/node_modules/@gdh/cli/dist/index.js +10 -18
  22. package/node_modules/@gdh/cli/dist/index.js.map +1 -1
  23. package/node_modules/@gdh/cli/dist/migrate.d.ts.map +1 -1
  24. package/node_modules/@gdh/cli/dist/migrate.js +1 -4
  25. package/node_modules/@gdh/cli/dist/migrate.js.map +1 -1
  26. package/node_modules/@gdh/cli/dist/setup.d.ts.map +1 -1
  27. package/node_modules/@gdh/cli/dist/setup.js +6 -12
  28. package/node_modules/@gdh/cli/dist/setup.js.map +1 -1
  29. package/node_modules/@gdh/cli/package.json +10 -10
  30. package/node_modules/@gdh/core/dist/index.d.ts +8 -5
  31. package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
  32. package/node_modules/@gdh/core/dist/index.js +5 -6
  33. package/node_modules/@gdh/core/dist/index.js.map +1 -1
  34. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts +15 -51
  35. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts.map +1 -1
  36. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js +9 -64
  37. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js.map +1 -1
  38. package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.d.ts +6 -17
  39. package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.d.ts.map +1 -1
  40. package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.js +6 -22
  41. package/node_modules/@gdh/core/dist/migrations/managed-target-surface-inventory.js.map +1 -1
  42. package/node_modules/@gdh/core/package.json +1 -1
  43. package/node_modules/@gdh/docs/dist/recovery-hints.d.ts +18 -4
  44. package/node_modules/@gdh/docs/dist/recovery-hints.d.ts.map +1 -1
  45. package/node_modules/@gdh/docs/dist/recovery-hints.js +32 -34
  46. package/node_modules/@gdh/docs/dist/recovery-hints.js.map +1 -1
  47. package/node_modules/@gdh/docs/package.json +2 -2
  48. package/node_modules/@gdh/mcp/package.json +8 -8
  49. package/node_modules/@gdh/observability/package.json +2 -2
  50. package/node_modules/@gdh/runtime/package.json +2 -2
  51. package/node_modules/@gdh/scan/dist/onboard.js +2 -2
  52. package/node_modules/@gdh/scan/dist/onboard.js.map +1 -1
  53. package/node_modules/@gdh/scan/package.json +3 -3
  54. package/node_modules/@gdh/verify/package.json +7 -7
  55. package/package.json +11 -11
@@ -5,22 +5,22 @@ import os from "node:os";
5
5
  import path from "node:path";
6
6
  import { promisify } from "node:util";
7
7
  import { readProjectConfig, readWorktreeState, resolveAuthoringStatus, resolveEffectiveTargetPath, resolvePinnedVersion, resolvePinnedVersionOrNull, resolveProjectRoot, } from "@gdh/authoring";
8
- import { assertClassRegistered, assertProjectLifecycleCompatibilityInvariant, definePackageBoundary, GDH_AGENT_CONTRACT_VERSION, GDH_CURSOR_RULE_VERSION, GDH_GUIDANCE_INDEX_VERSION, GDH_GUIDANCE_UNIT_VERSION, GDH_PROJECT_CONFIG_VERSION, GDH_RECIPE_SCHEMA_VERSION, GDH_RULES_SCHEMA_VERSION, GDH_SCENARIO_SCHEMA_VERSION, resolveConfiguredGodotEditorBin, resolveCurrentGdhInstall, resolveGdhProductMetadata, } from "@gdh/core";
8
+ import { assertClassRegistered, assertProjectLifecycleCompatibilityInvariant, definePackageBoundary, GDH_AGENT_CONTRACT_VERSION, GDH_GUIDANCE_INDEX_VERSION, GDH_GUIDANCE_UNIT_VERSION, GDH_PROJECT_CONFIG_VERSION, GDH_RECIPE_SCHEMA_VERSION, GDH_RULES_SCHEMA_VERSION, GDH_SCENARIO_SCHEMA_VERSION, resolveConfiguredGodotEditorBin, resolveCurrentGdhInstall, resolveGdhProductMetadata, } from "@gdh/core";
9
9
  import { GDH_GUIDANCE_DIRECTORY_RELATIVE_PATH, GUIDANCE_INDEX_RELATIVE_PATH, createDefaultGuidanceUnits, createDefaultRulesDocument, getGuidanceStatus, readRulesDocument, renderRulesYaml, resolveGuidanceQuery, resolveRecoveryHints, } from "@gdh/docs";
10
10
  import { inspectGuidanceAudit } from "@gdh/observability";
11
11
  import { inspectRuntimeBridgeBroker, inspectRuntimeBridgeSurface, inspectRuntimeKnowledgeSurface, } from "@gdh/runtime";
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 { CLAUDE_AUTHORING_HOOK_RELATIVE_PATH, CODEX_AUTHORING_HOOK_COMMAND, CODEX_AUTHORING_HOOK_RELATIVE_PATH, renderGdhAuthoringHook, } from "./authoring-hook-render.js";
15
+ import { CLAUDE_AUTHORING_HOOK_RELATIVE_PATH, CODEX_AUTHORING_HOOK_RELATIVE_PATH, renderGdhAuthoringHook, } from "./authoring-hook-render.js";
16
16
  import { computeStateRelativePathFromHook } from "./authoring-hook-state-path.js";
17
+ import { removeManagedCodexAuthoringHookBlock, renderManagedCodexAuthoringHookBlock, } from "./codex-authoring-hook-block.js";
17
18
  import { CLAUDE_STATUSLINE_RELATIVE_PATH, renderClaudeUpdateStatusline, } from "./claude-statusline-render.js";
18
19
  import { CLAUDE_CHECK_UPDATE_HOOK_RELATIVE_PATH, CLAUDE_CHECK_UPDATE_WORKER_RELATIVE_PATH, renderClaudeCheckUpdateHook, } from "./claude-update-hook-render.js";
19
20
  import { renderClaudeCheckUpdateWorker } from "./claude-update-worker-render.js";
20
- import { GDH_MANAGED_AGENT_SKILL_MARKER, renderClaudeMigrateSkill, renderClaudeOnboardSkill, renderClaudePrepareSkill, renderClaudeRunGameSkill, renderClaudeScanSkill, renderClaudeStatusSkill, renderClaudeUpdateSkill, renderCodexMigrateSkill, renderCodexOnboardSkill, renderCodexPrepareSkill, renderCodexRunGameSkill, renderCodexScanSkill, renderCodexStatusSkill, renderCodexUpdateSkill, renderCursorMigrateSkill, renderCursorOnboardSkill, renderCursorPrepareSkill, renderCursorRunGameSkill, renderCursorScanSkill, renderCursorStatusSkill, renderCursorUpdateSkill, } from "./skill-rendering.js";
21
- export { GDH_MANAGED_AGENT_SKILL_MARKER, GDH_SKILL_DEFINITIONS, GDH_SKILL_IDS, renderGdhSkill, renderManagedSkillMarker, renderClaudeMigrateSkill, renderClaudeOnboardSkill, renderClaudePrepareSkill, renderClaudeRunGameSkill, renderClaudeScanSkill, renderClaudeStatusSkill, renderClaudeUpdateSkill, renderCodexMigrateSkill, renderCodexOnboardSkill, renderCodexPrepareSkill, renderCodexRunGameSkill, renderCodexScanSkill, renderCodexStatusSkill, renderCodexUpdateSkill, renderCursorMigrateSkill, renderCursorOnboardSkill, renderCursorPrepareSkill, renderCursorRunGameSkill, renderCursorScanSkill, renderCursorStatusSkill, renderCursorUpdateSkill, } from "./skill-rendering.js";
21
+ import { GDH_MANAGED_AGENT_SKILL_MARKER, renderClaudeMigrateSkill, renderClaudeOnboardSkill, renderClaudePrepareSkill, renderClaudeRunGameSkill, renderClaudeScanSkill, renderClaudeStatusSkill, renderClaudeUpdateSkill, renderCodexMigrateSkill, renderCodexOnboardSkill, renderCodexPrepareSkill, renderCodexRunGameSkill, renderCodexScanSkill, renderCodexStatusSkill, renderCodexUpdateSkill, } from "./skill-rendering.js";
22
+ export { GDH_MANAGED_AGENT_SKILL_MARKER, GDH_SKILL_DEFINITIONS, GDH_SKILL_IDS, renderGdhSkill, renderManagedSkillMarker, renderClaudeMigrateSkill, renderClaudeOnboardSkill, renderClaudePrepareSkill, renderClaudeRunGameSkill, renderClaudeScanSkill, renderClaudeStatusSkill, renderClaudeUpdateSkill, renderCodexMigrateSkill, renderCodexOnboardSkill, renderCodexPrepareSkill, renderCodexRunGameSkill, renderCodexScanSkill, renderCodexStatusSkill, renderCodexUpdateSkill, } from "./skill-rendering.js";
22
23
  // Module-load drift guard. See packages/core/src/migrations/managed-surface-classes.ts.
23
- assertClassRegistered("cursor_rule", "deterministic");
24
24
  assertClassRegistered("claude_onboard_command", "deterministic");
25
25
  assertClassRegistered("claude_status_command", "deterministic");
26
26
  assertClassRegistered("claude_scan_command", "deterministic");
@@ -48,14 +48,10 @@ export const adaptersPackage = definePackageBoundary({
48
48
  export const SUPPORTED_AGENTS = [
49
49
  "codex",
50
50
  "claude",
51
- "cursor",
52
51
  ];
53
52
  export const CLAUDE_SHIM_RELATIVE_PATH = "CLAUDE.md";
54
53
  export const CLAUDE_ONBOARD_SKILL_RELATIVE_PATH = ".claude/skills/gdh-onboard/SKILL.md";
55
54
  export const PROJECT_MCP_RELATIVE_PATH = ".mcp.json";
56
- export const CURSOR_MCP_RELATIVE_PATH = ".cursor/mcp.json";
57
- export const CURSOR_RULE_RELATIVE_PATH = ".cursor/rules/gdh-agent.mdc";
58
- export const CURSOR_ONBOARD_COMMAND_RELATIVE_PATH = ".cursor/commands/gdh-onboard.md";
59
55
  export const CODEX_ONBOARD_SKILL_RELATIVE_PATH = ".agents/skills/gdh-onboard/SKILL.md";
60
56
  export const CLAUDE_STATUS_SKILL_RELATIVE_PATH = ".claude/skills/gdh-status/SKILL.md";
61
57
  export const CLAUDE_MIGRATE_SKILL_RELATIVE_PATH = ".claude/skills/gdh-migrate/SKILL.md";
@@ -67,10 +63,6 @@ export const CODEX_MIGRATE_SKILL_RELATIVE_PATH = ".agents/skills/gdh-migrate/SKI
67
63
  export const CODEX_CHECK_SKILL_RELATIVE_PATH = ".agents/skills/gdh-check/SKILL.md";
68
64
  export const CODEX_PREPARE_SKILL_RELATIVE_PATH = ".agents/skills/gdh-prepare/SKILL.md";
69
65
  export const CODEX_RUN_GAME_SKILL_RELATIVE_PATH = ".agents/skills/gdh-run-game/SKILL.md";
70
- export const CURSOR_STATUS_COMMAND_RELATIVE_PATH = ".cursor/commands/gdh-status.md";
71
- export const CURSOR_MIGRATE_COMMAND_RELATIVE_PATH = ".cursor/commands/gdh-migrate.md";
72
- export const CURSOR_PREPARE_COMMAND_RELATIVE_PATH = ".cursor/commands/gdh-prepare.md";
73
- export const CURSOR_RUN_GAME_COMMAND_RELATIVE_PATH = ".cursor/commands/gdh-run-game.md";
74
66
  // Phase 13 SELF-01: /gdh-update skill surface path constants. The rendered
75
67
  // bodies shell out to `npx -y @skillcap/gdh@latest self-update` (LITERAL
76
68
  // @latest, not the pinned version — D-10) so the NEW CLI performs the update,
@@ -79,7 +71,6 @@ export const CURSOR_RUN_GAME_COMMAND_RELATIVE_PATH = ".cursor/commands/gdh-run-g
79
71
  // rendered bodies are version-agnostic by design.
80
72
  export const CLAUDE_UPDATE_SKILL_RELATIVE_PATH = ".claude/skills/gdh-update/SKILL.md";
81
73
  export const CODEX_UPDATE_SKILL_RELATIVE_PATH = ".agents/skills/gdh-update/SKILL.md";
82
- export const CURSOR_UPDATE_COMMAND_RELATIVE_PATH = ".cursor/commands/gdh-update.md";
83
74
  export const CLAUDE_SCAN_SKILL_RELATIVE_PATH = ".claude/skills/gdh-scan/SKILL.md";
84
75
  export const CODEX_SCAN_SKILL_RELATIVE_PATH = ".agents/skills/gdh-scan/SKILL.md";
85
76
  export const CLAUDE_ONBOARD_COMMAND_RELATIVE_PATH = CLAUDE_ONBOARD_SKILL_RELATIVE_PATH;
@@ -111,18 +102,6 @@ const LEGACY_CODEX_SKILL_RELATIVE_PATHS = [
111
102
  [".codex/skills/gdh-verify/SKILL.md", "gdh-verify"],
112
103
  [".codex/skills/gdh-scan/SKILL.md", "gdh-scan"],
113
104
  ];
114
- const LEGACY_CURSOR_SKILL_RELATIVE_PATHS = [
115
- [".cursor/skills/gdh-onboard/SKILL.md", "gdh-onboard"],
116
- [".cursor/skills/gdh-status/SKILL.md", "gdh-status"],
117
- [".cursor/skills/gdh-migrate/SKILL.md", "gdh-migrate"],
118
- [".cursor/skills/gdh-update/SKILL.md", "gdh-update"],
119
- [".cursor/skills/gdh-check/SKILL.md", "gdh-check"],
120
- [".cursor/skills/gdh-prepare/SKILL.md", "gdh-prepare"],
121
- [".cursor/skills/gdh-run-game/SKILL.md", "gdh-run-game"],
122
- [".cursor/skills/gdh-verify/SKILL.md", "gdh-verify"],
123
- [".cursor/skills/gdh-scan/SKILL.md", "gdh-scan"],
124
- ];
125
- export const CURSOR_SCAN_COMMAND_RELATIVE_PATH = ".cursor/commands/gdh-scan.md";
126
105
  const CODEX_SKILL_RELATIVE_PATHS = [
127
106
  path.dirname(CODEX_ONBOARD_SKILL_RELATIVE_PATH),
128
107
  path.dirname(CODEX_STATUS_SKILL_RELATIVE_PATH),
@@ -141,15 +120,6 @@ const CLAUDE_SKILL_RELATIVE_PATHS = [
141
120
  path.dirname(CLAUDE_RUN_GAME_SKILL_RELATIVE_PATH),
142
121
  path.dirname(CLAUDE_SCAN_SKILL_RELATIVE_PATH),
143
122
  ];
144
- const CURSOR_COMMAND_RELATIVE_PATHS = [
145
- CURSOR_ONBOARD_COMMAND_RELATIVE_PATH,
146
- CURSOR_STATUS_COMMAND_RELATIVE_PATH,
147
- CURSOR_MIGRATE_COMMAND_RELATIVE_PATH,
148
- CURSOR_UPDATE_COMMAND_RELATIVE_PATH,
149
- CURSOR_PREPARE_COMMAND_RELATIVE_PATH,
150
- CURSOR_RUN_GAME_COMMAND_RELATIVE_PATH,
151
- CURSOR_SCAN_COMMAND_RELATIVE_PATH,
152
- ];
153
123
  export const LOCAL_PATH_HINTS_RELATIVE_PATH = ".gdh-state/local-paths.json";
154
124
  export const CODEX_PROJECT_CONFIG_RELATIVE_PATH = ".codex/config.toml";
155
125
  export const GDH_MCP_SERVER_NAME = "gdh";
@@ -168,17 +138,16 @@ export async function getSupportedAgentAdaptersStatus(targetPath, options = {})
168
138
  integrationRootPath: context.integrationRootPath,
169
139
  pinnedVersion,
170
140
  });
171
- const [codex, claude, cursor] = await Promise.all([
141
+ const [codex, claude] = await Promise.all([
172
142
  inspectCodexAdapter(context.targetPath, guidance, projectMcp, pinnedVersion, {
173
143
  includeUserLocal,
174
144
  }),
175
145
  inspectClaudeAdapter(context.targetPath, guidance, projectMcp, pinnedVersion),
176
- inspectCursorAdapter(context.targetPath, guidance, projectMcp, pinnedVersion),
177
146
  ]);
178
147
  return {
179
148
  targetPath: context.targetPath,
180
149
  guidance,
181
- adapters: [codex, claude, cursor],
150
+ adapters: [codex, claude],
182
151
  };
183
152
  }
184
153
  export async function installSupportedAgentAdapters(targetPath, options = {}) {
@@ -306,7 +275,6 @@ export async function inspectProjectLifecycleCompatibility(targetPath) {
306
275
  await inspectGuidanceIndexLifecycleSurface(guidanceStatus.guidanceRootPath, resolvedTargetPath),
307
276
  await inspectGuidanceUnitLifecycleSurface(guidanceStatus.guidanceRootPath, projectConfig, resolvedTargetPath),
308
277
  inspectMcpManifestLifecycleSurface(resolvedTargetPath, projectConfig.mcp.enabled, adapterStatus),
309
- inspectCursorRuleLifecycleSurface(resolvedTargetPath, adapterStatus),
310
278
  inspectRuntimeBridgeLifecycleSurface(resolvedTargetPath, bridgeStatus),
311
279
  ]);
312
280
  }
@@ -417,26 +385,6 @@ function normalizePortableRelativePath(relativePath) {
417
385
  const normalized = relativePath.split(path.sep).join("/");
418
386
  return normalized === "" ? "." : normalized.replace(/\/+$/, "");
419
387
  }
420
- export function renderCursorRule(input) {
421
- const targetPrefix = input?.targetRelativePath
422
- ? normalizePortableRelativePath(input.targetRelativePath)
423
- : ".";
424
- const prefixed = (relativePath) => targetPrefix === "." ? relativePath : `${targetPrefix}/${relativePath}`;
425
- return [
426
- "---",
427
- "description: GDH visibility reinforcement",
428
- "alwaysApply: true",
429
- "---",
430
- `<!-- GDH CURSOR RULE VERSION: ${GDH_CURSOR_RULE_VERSION} -->`,
431
- "# GDH Cursor Rule",
432
- "",
433
- "This GDH-managed Godot target uses GDH.",
434
- "Apply this rule only for files inside this Godot target or when the user explicitly asks for GDH work on this target.",
435
- `Follow the canonical target-local entrypoint in [AGENTS.md](../../${prefixed("AGENTS.md")}), then load the canonical guidance index at [.gdh/guidance/README.md](../../${prefixed(".gdh/guidance/README.md")}) before substantive Godot work.`,
436
- "Do not duplicate or override the canonical GDH guidance chain here.",
437
- "",
438
- ].join("\n");
439
- }
440
388
  export function renderClaudeOnboardCommand(pinnedVersion) {
441
389
  return renderClaudeOnboardSkill(pinnedVersion);
442
390
  }
@@ -465,15 +413,11 @@ async function inspectProjectMcpSupport(targetPath, options) {
465
413
  pinnedVersion: options.pinnedVersion ?? "latest",
466
414
  });
467
415
  const nestedTarget = path.resolve(targetPath) !== path.resolve(options.integrationRootPath);
468
- const [projectFile, cursorFile, targetProjectFile, targetCursorFile, codexProjectContent, localPathHints,] = await Promise.all([
416
+ const [projectFile, targetProjectFile, codexProjectContent, localPathHints,] = await Promise.all([
469
417
  inspectJsonFile(path.join(options.integrationRootPath, PROJECT_MCP_RELATIVE_PATH)),
470
- inspectJsonFile(path.join(options.integrationRootPath, CURSOR_MCP_RELATIVE_PATH)),
471
418
  nestedTarget
472
419
  ? inspectJsonFile(path.join(targetPath, PROJECT_MCP_RELATIVE_PATH))
473
420
  : inspectJsonFile(path.join(options.integrationRootPath, PROJECT_MCP_RELATIVE_PATH)),
474
- nestedTarget
475
- ? inspectJsonFile(path.join(targetPath, CURSOR_MCP_RELATIVE_PATH))
476
- : inspectJsonFile(path.join(options.integrationRootPath, CURSOR_MCP_RELATIVE_PATH)),
477
421
  fs
478
422
  .readFile(path.join(options.integrationRootPath, CODEX_PROJECT_CONFIG_RELATIVE_PATH), "utf8")
479
423
  .catch(() => null),
@@ -486,9 +430,7 @@ async function inspectProjectMcpSupport(targetPath, options) {
486
430
  integrationRootPath: options.integrationRootPath,
487
431
  localPathHints,
488
432
  projectFile: inspectManagedMcpFile(projectFile, enabled, PROJECT_MCP_RELATIVE_PATH, "Claude project MCP config", managedMcpEntry),
489
- cursorFile: inspectManagedMcpFile(cursorFile, enabled, CURSOR_MCP_RELATIVE_PATH, "Cursor project MCP config", managedMcpEntry),
490
433
  targetProjectFile: inspectManagedMcpFile(targetProjectFile, enabled, PROJECT_MCP_RELATIVE_PATH, "target-local Claude project MCP config", managedMcpEntry),
491
- targetCursorFile: inspectManagedMcpFile(targetCursorFile, enabled, CURSOR_MCP_RELATIVE_PATH, "target-local Cursor project MCP config", managedMcpEntry),
492
434
  codexProjectFile: inspectManagedCodexProjectFile(codexProjectContent, enabled, options.pinnedVersion),
493
435
  codexRegistration: options.includeUserLocal
494
436
  ? await inspectCodexRegistration(targetPath, enabled, codexServerName, codexConfigPath, options.integrationRootPath, options.pinnedVersion)
@@ -785,38 +727,6 @@ function inspectClaudeSkillSurface(targetPath, relativePath, content, expectedCo
785
727
  }),
786
728
  ];
787
729
  }
788
- function inspectCursorCommandSurface(targetPath, relativePath, content, expectedContent, commandName) {
789
- if (expectedContent === null) {
790
- return [
791
- createSurfaceStatus({
792
- kind: "command_file",
793
- scope: "repo",
794
- targetPath,
795
- relativePath,
796
- present: content !== null,
797
- state: "missing",
798
- summary: `Cursor ${commandName} command cannot be validated yet: no \`gdh_version\` is pinned (run \`gdh setup\` or \`gdh migrate --apply\`).`,
799
- version: null,
800
- }),
801
- ];
802
- }
803
- return [
804
- createSurfaceStatus({
805
- kind: "command_file",
806
- scope: "repo",
807
- targetPath,
808
- relativePath,
809
- present: content !== null,
810
- state: content === null ? "missing" : content === expectedContent ? "ready" : "misconfigured",
811
- summary: content === null
812
- ? `Cursor \`/${commandName}\` command is missing and should install under .cursor/commands/.`
813
- : content === expectedContent
814
- ? `Cursor can discover the managed \`/${commandName}\` command.`
815
- : `Cursor \`/${commandName}\` command exists but no longer matches the expected managed GDH command.`,
816
- version: null,
817
- }),
818
- ];
819
- }
820
730
  async function inspectCodexAdapter(targetPath, guidance, projectMcp, pinnedVersion, options) {
821
731
  const codexSkillPath = path.join(targetPath, CODEX_ONBOARD_SKILL_RELATIVE_PATH);
822
732
  const codexSkillContent = await fs.readFile(codexSkillPath, "utf8").catch(() => null);
@@ -1124,112 +1034,6 @@ async function inspectRootSymlinkSurfaces(input) {
1124
1034
  });
1125
1035
  }));
1126
1036
  }
1127
- async function inspectCursorAdapter(targetPath, guidance, projectMcp, pinnedVersion) {
1128
- const absolutePath = path.join(targetPath, CURSOR_RULE_RELATIVE_PATH);
1129
- const onboardCommandPath = path.join(targetPath, CURSOR_ONBOARD_COMMAND_RELATIVE_PATH);
1130
- const content = await fs.readFile(absolutePath, "utf8").catch(() => null);
1131
- const onboardCommandContent = await fs.readFile(onboardCommandPath, "utf8").catch(() => null);
1132
- const cursorStatusContent = await fs
1133
- .readFile(path.join(targetPath, CURSOR_STATUS_COMMAND_RELATIVE_PATH), "utf8")
1134
- .catch(() => null);
1135
- const cursorMigrateContent = await fs
1136
- .readFile(path.join(targetPath, CURSOR_MIGRATE_COMMAND_RELATIVE_PATH), "utf8")
1137
- .catch(() => null);
1138
- // Phase 13 Plan 13-03 deliverable — /gdh-update skill for Cursor. Inspection
1139
- // wiring required so planSkillInstallAction sees the surface state; otherwise
1140
- // the planner returns `unchanged` for a missing file and install becomes a
1141
- // no-op (Plan 13-05 integration-test Rule 2 fix).
1142
- const cursorUpdateContent = await fs
1143
- .readFile(path.join(targetPath, CURSOR_UPDATE_COMMAND_RELATIVE_PATH), "utf8")
1144
- .catch(() => null);
1145
- const cursorPrepareContent = await fs
1146
- .readFile(path.join(targetPath, CURSOR_PREPARE_COMMAND_RELATIVE_PATH), "utf8")
1147
- .catch(() => null);
1148
- const cursorRunGameContent = await fs
1149
- .readFile(path.resolve(targetPath, CURSOR_RUN_GAME_COMMAND_RELATIVE_PATH), "utf8")
1150
- .catch(() => null);
1151
- const cursorScanContent = await fs
1152
- .readFile(path.join(targetPath, CURSOR_SCAN_COMMAND_RELATIVE_PATH), "utf8")
1153
- .catch(() => null);
1154
- const expectedContent = renderCursorRule();
1155
- const version = readCursorRuleVersion(content);
1156
- const expectedCursorOnboardSkill = pinnedVersion === null ? null : renderCursorOnboardSkill(pinnedVersion);
1157
- const expectedCursorStatusSkill = pinnedVersion === null ? null : renderCursorStatusSkill(pinnedVersion);
1158
- const expectedCursorMigrateSkill = pinnedVersion === null ? null : renderCursorMigrateSkill(pinnedVersion);
1159
- const expectedCursorUpdateSkill = pinnedVersion === null ? null : renderCursorUpdateSkill(pinnedVersion);
1160
- const expectedCursorPrepareSkill = pinnedVersion === null ? null : renderCursorPrepareSkill(pinnedVersion);
1161
- const expectedCursorRunGameSkill = pinnedVersion === null ? null : renderCursorRunGameSkill(pinnedVersion);
1162
- const expectedCursorScanSkill = pinnedVersion === null ? null : renderCursorScanSkill(pinnedVersion);
1163
- const surfaces = [
1164
- createSurfaceStatus({
1165
- kind: "rule_file",
1166
- scope: "repo",
1167
- targetPath,
1168
- relativePath: CURSOR_RULE_RELATIVE_PATH,
1169
- present: content !== null,
1170
- state: content === null ? "missing" : content === expectedContent ? "ready" : "misconfigured",
1171
- summary: content === null
1172
- ? "Cursor reinforcement is missing and should point back to AGENTS.md."
1173
- : content === expectedContent
1174
- ? "Cursor has a thin always-on rule that points back to the canonical GDH guidance chain."
1175
- : "Cursor reinforcement exists but no longer matches the expected managed GDH rule.",
1176
- version,
1177
- }),
1178
- createSurfaceStatus({
1179
- kind: "command_file",
1180
- scope: "repo",
1181
- targetPath,
1182
- relativePath: CURSOR_ONBOARD_COMMAND_RELATIVE_PATH,
1183
- present: onboardCommandContent !== null,
1184
- state: onboardCommandContent === null
1185
- ? "missing"
1186
- : expectedCursorOnboardSkill === null
1187
- ? "missing"
1188
- : onboardCommandContent === expectedCursorOnboardSkill
1189
- ? "ready"
1190
- : "misconfigured",
1191
- summary: onboardCommandContent === null
1192
- ? "Cursor onboarding handoff is missing and should install `/gdh-onboard` under .cursor/commands/."
1193
- : expectedCursorOnboardSkill === null
1194
- ? "Cursor onboarding handoff cannot be validated yet: no `gdh_version` is pinned (run `gdh setup` or `gdh migrate --apply`)."
1195
- : onboardCommandContent === expectedCursorOnboardSkill
1196
- ? "Cursor can discover the managed `/gdh-onboard` handoff command."
1197
- : "Cursor onboarding handoff exists but no longer matches the expected managed GDH command.",
1198
- version: null,
1199
- }),
1200
- ...inspectCursorCommandSurface(targetPath, CURSOR_STATUS_COMMAND_RELATIVE_PATH, cursorStatusContent, expectedCursorStatusSkill, "gdh-status"),
1201
- ...inspectCursorCommandSurface(targetPath, CURSOR_MIGRATE_COMMAND_RELATIVE_PATH, cursorMigrateContent, expectedCursorMigrateSkill, "gdh-migrate"),
1202
- ...inspectCursorCommandSurface(targetPath, CURSOR_UPDATE_COMMAND_RELATIVE_PATH, cursorUpdateContent, expectedCursorUpdateSkill, "gdh-update"),
1203
- ...inspectCursorCommandSurface(targetPath, CURSOR_PREPARE_COMMAND_RELATIVE_PATH, cursorPrepareContent, expectedCursorPrepareSkill, "gdh-prepare"),
1204
- ...inspectCursorCommandSurface(targetPath, CURSOR_RUN_GAME_COMMAND_RELATIVE_PATH, cursorRunGameContent, expectedCursorRunGameSkill, "gdh-run-game"),
1205
- ...inspectCursorCommandSurface(targetPath, CURSOR_SCAN_COMMAND_RELATIVE_PATH, cursorScanContent, expectedCursorScanSkill, "gdh-scan"),
1206
- ];
1207
- if (projectMcp.enabled) {
1208
- surfaces.push(createSurfaceStatus({
1209
- kind: "mcp_file",
1210
- scope: "repo",
1211
- targetPath: projectMcp.integrationRootPath,
1212
- relativePath: CURSOR_MCP_RELATIVE_PATH,
1213
- present: projectMcp.cursorFile.present,
1214
- state: projectMcp.cursorFile.state,
1215
- summary: projectMcp.cursorFile.summary,
1216
- version: null,
1217
- }));
1218
- if (path.resolve(projectMcp.integrationRootPath) !== path.resolve(targetPath)) {
1219
- surfaces.push(createSurfaceStatus({
1220
- kind: "mcp_file",
1221
- scope: "repo",
1222
- targetPath,
1223
- relativePath: CURSOR_MCP_RELATIVE_PATH,
1224
- present: projectMcp.targetCursorFile.present,
1225
- state: projectMcp.targetCursorFile.state,
1226
- summary: projectMcp.targetCursorFile.summary,
1227
- version: null,
1228
- }));
1229
- }
1230
- }
1231
- return createAgentStatus("cursor", guidance, surfaces);
1232
- }
1233
1037
  function createAgentStatus(agent, guidance, surfaces) {
1234
1038
  const state = !hasReadyVisibilityChain(guidance)
1235
1039
  ? "visibility_broken"
@@ -1341,17 +1145,12 @@ async function planInstallActions(targetPath, adapters, requestedAgents, options
1341
1145
  }
1342
1146
  if (adapter.agent === "claude") {
1343
1147
  actions.push(...planClaudeInstallActions(targetPath, adapter, options.pinnedVersion, options.integrationRootPath));
1344
- continue;
1345
- }
1346
- if (adapter.agent === "cursor") {
1347
- actions.push(...planCursorInstallActions(targetPath, adapter, options.pinnedVersion, options.integrationRootPath));
1348
1148
  }
1349
1149
  }
1350
1150
  actions.push(...planRetiredManagedSurfaceCleanupActions(targetPath));
1351
1151
  if (path.resolve(options.integrationRootPath) !== path.resolve(targetPath)) {
1352
1152
  actions.push(...planRetiredManagedSurfaceCleanupActions(options.integrationRootPath));
1353
1153
  actions.push(...planLegacyCodexSkillCleanupActions(options.integrationRootPath, options.pinnedVersion));
1354
- actions.push(...planLegacyCursorSkillCleanupActions(options.integrationRootPath));
1355
1154
  }
1356
1155
  return dedupeInstallActions(actions);
1357
1156
  }
@@ -1377,21 +1176,6 @@ function planSharedRepoInstallActions(targetPath, projectMcp, agent, effectiveDe
1377
1176
  content: renderManagedMcpConfig(path.join(integrationRootPath, PROJECT_MCP_RELATIVE_PATH), managedMcpEntry),
1378
1177
  }));
1379
1178
  }
1380
- if (projectMcp.cursorFile.state !== "ready") {
1381
- actions.push(createInstallAction({
1382
- agent,
1383
- kind: "write_file",
1384
- scope: "repo",
1385
- targetPath: integrationRootPath,
1386
- relativePath: CURSOR_MCP_RELATIVE_PATH,
1387
- state: "planned",
1388
- mode: projectMcp.cursorFile.present ? "replace" : "create",
1389
- summary: projectMcp.cursorFile.present
1390
- ? "Replace the managed `gdh` MCP entry in .cursor/mcp.json while preserving any non-GDH servers."
1391
- : "Create .cursor/mcp.json with the managed `gdh` MCP entry.",
1392
- content: renderManagedMcpConfig(path.join(integrationRootPath, CURSOR_MCP_RELATIVE_PATH), managedMcpEntry),
1393
- }));
1394
- }
1395
1179
  if (nestedTarget && projectMcp.targetProjectFile.state !== "ready") {
1396
1180
  actions.push(createInstallAction({
1397
1181
  agent,
@@ -1407,21 +1191,6 @@ function planSharedRepoInstallActions(targetPath, projectMcp, agent, effectiveDe
1407
1191
  content: renderManagedMcpConfig(path.join(targetPath, PROJECT_MCP_RELATIVE_PATH), managedMcpEntry),
1408
1192
  }));
1409
1193
  }
1410
- if (nestedTarget && projectMcp.targetCursorFile.state !== "ready") {
1411
- actions.push(createInstallAction({
1412
- agent,
1413
- kind: "write_file",
1414
- scope: "repo",
1415
- targetPath,
1416
- relativePath: CURSOR_MCP_RELATIVE_PATH,
1417
- state: "planned",
1418
- mode: projectMcp.targetCursorFile.present ? "replace" : "create",
1419
- summary: projectMcp.targetCursorFile.present
1420
- ? "Replace the managed `gdh` MCP entry in target-local .cursor/mcp.json while preserving any non-GDH servers."
1421
- : "Create target-local .cursor/mcp.json so Cursor can discover GDH when opened at the Godot target.",
1422
- content: renderManagedMcpConfig(path.join(targetPath, CURSOR_MCP_RELATIVE_PATH), managedMcpEntry),
1423
- }));
1424
- }
1425
1194
  if (projectMcp.localPathHints.gdhDevRepoPath !== effectiveDevRepoPath) {
1426
1195
  actions.push(createInstallAction({
1427
1196
  agent,
@@ -1558,8 +1327,6 @@ function agentLabel(agent) {
1558
1327
  return "Claude";
1559
1328
  case "codex":
1560
1329
  return "Codex";
1561
- case "cursor":
1562
- return "Cursor";
1563
1330
  }
1564
1331
  }
1565
1332
  function planCodexRepoInstallActions(targetPath, adapter, pinnedVersion, projectMcp, integrationRootPath) {
@@ -1616,20 +1383,14 @@ function planCodexRepoInstallActions(targetPath, adapter, pinnedVersion, project
1616
1383
  // accepts both so old managed files can migrate without deleting user-authored
1617
1384
  // files based only on path.
1618
1385
  const LEGACY_CODEX_MANAGED_SKILL_MARKER = "<codex_skill_adapter>";
1619
- const LEGACY_CURSOR_MANAGED_SKILL_MARKER = "<cursor_skill_adapter>";
1620
1386
  function isManagedAgentSkillContent(content) {
1621
1387
  return (content.includes(GDH_MANAGED_AGENT_SKILL_MARKER) ||
1622
- content.includes(LEGACY_CODEX_MANAGED_SKILL_MARKER) ||
1623
- content.includes(LEGACY_CURSOR_MANAGED_SKILL_MARKER));
1388
+ content.includes(LEGACY_CODEX_MANAGED_SKILL_MARKER));
1624
1389
  }
1625
1390
  function isManagedLegacyCodexSkillContent(content) {
1626
1391
  return (content.includes(GDH_MANAGED_AGENT_SKILL_MARKER) ||
1627
1392
  content.includes(LEGACY_CODEX_MANAGED_SKILL_MARKER));
1628
1393
  }
1629
- function isManagedLegacyCursorSkillContent(content) {
1630
- return (content.includes(GDH_MANAGED_AGENT_SKILL_MARKER) ||
1631
- content.includes(LEGACY_CURSOR_MANAGED_SKILL_MARKER));
1632
- }
1633
1394
  function isManagedLegacyClaudeCommandContent(content, skillName) {
1634
1395
  const slashName = skillName.replace("gdh-", "gdh:");
1635
1396
  return (content.includes(`name: ${slashName}`) &&
@@ -1656,13 +1417,6 @@ const RETIRED_MANAGED_SURFACE_RELATIVE_PATHS = [
1656
1417
  isManaged: isManagedAgentSkillContent,
1657
1418
  replacementSummary: "Agents should rely on GDH post-edit hooks, MCP/CLI status, and explicit `gdh authoring check --mode final` evidence instead.",
1658
1419
  },
1659
- {
1660
- agent: "cursor",
1661
- relativePath: ".cursor/skills/gdh-check/SKILL.md",
1662
- skillName: "gdh-check",
1663
- isManaged: isManagedAgentSkillContent,
1664
- replacementSummary: "Agents should rely on MCP/CLI status and explicit `gdh authoring check --mode final` evidence instead.",
1665
- },
1666
1420
  {
1667
1421
  agent: "claude",
1668
1422
  relativePath: ".claude/skills/gdh-check/SKILL.md",
@@ -1677,13 +1431,6 @@ const RETIRED_MANAGED_SURFACE_RELATIVE_PATHS = [
1677
1431
  isManaged: isManagedAgentSkillContent,
1678
1432
  replacementSummary: "Agents should use `gdh authoring check --mode final` for code-validity evidence.",
1679
1433
  },
1680
- {
1681
- agent: "cursor",
1682
- relativePath: ".cursor/skills/gdh-verify/SKILL.md",
1683
- skillName: "gdh-verify",
1684
- isManaged: isManagedAgentSkillContent,
1685
- replacementSummary: "Agents should use `gdh authoring check --mode final` for code-validity evidence.",
1686
- },
1687
1434
  {
1688
1435
  agent: "claude",
1689
1436
  relativePath: ".claude/commands/gdh/verify.md",
@@ -1692,6 +1439,59 @@ const RETIRED_MANAGED_SURFACE_RELATIVE_PATHS = [
1692
1439
  (content.includes("@skillcap/gdh@") || content.includes("gdh verify recommend")),
1693
1440
  replacementSummary: "Agents should use `gdh authoring check --mode final` for code-validity evidence.",
1694
1441
  },
1442
+ // Retired cursor agent (commit 7f65b098, "feat(adapters)!: drop cursor
1443
+ // agent from source"). Cursor was a hard delete — no deprecation shim — so
1444
+ // legacy targets that ran a pre-removal GDH still carry GDH-rendered files
1445
+ // under .cursor/. The inventory sweep handles targets with a prior
1446
+ // render-inventory.json; these entries cover the legacy-target case where
1447
+ // no inventory exists yet (pre-Phase 70 onboarding). Content-checked so
1448
+ // user-authored .cursor/ files are never touched. The `agent` field is
1449
+ // attribution-only — cursor is no longer in GdhSupportedAgent — and is set
1450
+ // to "claude" because cursor commands/skills were Claude-style markdown
1451
+ // surfaces. .cursor/mcp.json is intentionally NOT enumerated here: it is a
1452
+ // JSON file that may carry non-GDH MCP servers; deleting it whole would
1453
+ // nuke user content. (The stale `gdh` entry inside it is harmless — the
1454
+ // command it points at is dead — and a JSON-aware partial delete is a
1455
+ // separate concern.)
1456
+ ...([
1457
+ "gdh-onboard",
1458
+ "gdh-status",
1459
+ "gdh-migrate",
1460
+ "gdh-update",
1461
+ "gdh-prepare",
1462
+ "gdh-run-game",
1463
+ "gdh-scan",
1464
+ ].map((skillName) => ({
1465
+ agent: "claude",
1466
+ relativePath: `.cursor/commands/${skillName}.md`,
1467
+ skillName,
1468
+ isManaged: isManagedAgentSkillContent,
1469
+ replacementSummary: "Cursor is no longer a supported GDH adapter target; this file was rendered by a pre-removal GDH version.",
1470
+ }))),
1471
+ ...([
1472
+ "gdh-onboard",
1473
+ "gdh-status",
1474
+ "gdh-migrate",
1475
+ "gdh-update",
1476
+ "gdh-check",
1477
+ "gdh-prepare",
1478
+ "gdh-run-game",
1479
+ "gdh-verify",
1480
+ "gdh-scan",
1481
+ ].map((skillName) => ({
1482
+ agent: "claude",
1483
+ relativePath: `.cursor/skills/${skillName}/SKILL.md`,
1484
+ skillName,
1485
+ isManaged: isManagedAgentSkillContent,
1486
+ replacementSummary: "Cursor is no longer a supported GDH adapter target; this file was rendered by a pre-removal GDH version.",
1487
+ }))),
1488
+ {
1489
+ agent: "claude",
1490
+ relativePath: ".cursor/rules/gdh-agent.mdc",
1491
+ skillName: "gdh-agent-rule",
1492
+ isManaged: (content) => content.includes("GDH CURSOR RULE VERSION:"),
1493
+ replacementSummary: "Cursor is no longer a supported GDH adapter target; this rule file was rendered by a pre-removal GDH version.",
1494
+ },
1695
1495
  ];
1696
1496
  function planRetiredManagedSurfaceCleanupActions(targetPath) {
1697
1497
  const actions = [];
@@ -1714,7 +1514,6 @@ function planRetiredManagedSurfaceCleanupActions(targetPath) {
1714
1514
  summary: `Remove retired managed \`${entry.skillName}\` surface. ${entry.replacementSummary}`,
1715
1515
  }));
1716
1516
  }
1717
- actions.push(...planLegacyCursorSkillCleanupActions(targetPath));
1718
1517
  return actions;
1719
1518
  }
1720
1519
  function planLegacyCodexSkillCleanupActions(targetPath, _pinnedVersion) {
@@ -1746,29 +1545,6 @@ function planLegacyCodexSkillCleanupActions(targetPath, _pinnedVersion) {
1746
1545
  }
1747
1546
  return actions;
1748
1547
  }
1749
- function planLegacyCursorSkillCleanupActions(targetPath) {
1750
- const actions = [];
1751
- for (const [relativePath, skillName] of LEGACY_CURSOR_SKILL_RELATIVE_PATHS) {
1752
- const absolutePath = path.join(targetPath, relativePath);
1753
- const content = fsSync.existsSync(absolutePath)
1754
- ? fsSync.readFileSync(absolutePath, "utf8")
1755
- : null;
1756
- if (content === null || !isManagedLegacyCursorSkillContent(content)) {
1757
- continue;
1758
- }
1759
- actions.push(createInstallAction({
1760
- agent: "cursor",
1761
- kind: "remove_file",
1762
- scope: "repo",
1763
- targetPath,
1764
- relativePath,
1765
- state: "planned",
1766
- mode: "delete",
1767
- summary: `Remove legacy managed Cursor \`/${skillName}\` skill from .cursor/skills after installing the documented .cursor/commands location.`,
1768
- }));
1769
- }
1770
- return actions;
1771
- }
1772
1548
  function planLegacyClaudeCommandCleanupActions(targetPath) {
1773
1549
  const actions = [];
1774
1550
  for (const [relativePath, skillName] of LEGACY_CLAUDE_SKILL_COMMAND_RELATIVE_PATHS) {
@@ -1936,7 +1712,7 @@ function planClaudeInstallActions(targetPath, adapter, pinnedVersion, integratio
1936
1712
  //
1937
1713
  // Synchronous read via fsSync is intentional: planClaudeInstallActions is
1938
1714
  // called without `await`, and making it async would ripple to every sibling
1939
- // planner (Codex, Cursor). The composed patches are idempotent and
1715
+ // planner (Codex). The composed patches are idempotent and
1940
1716
  // commutative (proven in Task 1 Test J) so application order is irrelevant.
1941
1717
  let existingSettingsContent = "";
1942
1718
  try {
@@ -2059,60 +1835,6 @@ function planRootClaudeAuthoringSettingsAction(integrationRootPath) {
2059
1835
  content: patchedSettings,
2060
1836
  });
2061
1837
  }
2062
- function planCursorInstallActions(targetPath, adapter, pinnedVersion, integrationRootPath) {
2063
- const actions = [];
2064
- const cursorRuleSurface = adapter.surfaces.find((surface) => surface.relativePath === CURSOR_RULE_RELATIVE_PATH);
2065
- const targetRelativePath = path.relative(integrationRootPath, targetPath) || ".";
2066
- if (!cursorRuleSurface || cursorRuleSurface.state === "ready") {
2067
- actions.push(createInstallAction({
2068
- agent: "cursor",
2069
- kind: "write_file",
2070
- scope: "repo",
2071
- targetPath,
2072
- relativePath: CURSOR_RULE_RELATIVE_PATH,
2073
- state: "unchanged",
2074
- mode: "unchanged",
2075
- summary: "The managed Cursor reinforcement rule already matches the expected GDH content.",
2076
- version: GDH_CURSOR_RULE_VERSION,
2077
- content: renderCursorRule(),
2078
- }));
2079
- }
2080
- else {
2081
- actions.push(createInstallAction({
2082
- agent: "cursor",
2083
- kind: "write_file",
2084
- scope: "repo",
2085
- targetPath,
2086
- relativePath: CURSOR_RULE_RELATIVE_PATH,
2087
- state: "planned",
2088
- mode: cursorRuleSurface.present ? "replace" : "create",
2089
- summary: cursorRuleSurface.present
2090
- ? "Replace the existing Cursor reinforcement rule with the managed GDH rule."
2091
- : "Create the managed Cursor reinforcement rule that points back to AGENTS.md.",
2092
- version: GDH_CURSOR_RULE_VERSION,
2093
- content: renderCursorRule(),
2094
- }));
2095
- }
2096
- actions.push(planCommandInstallAction("cursor", targetPath, adapter, CURSOR_ONBOARD_COMMAND_RELATIVE_PATH, renderCursorOnboardSkill, "gdh-onboard", pinnedVersion), planCommandInstallAction("cursor", targetPath, adapter, CURSOR_STATUS_COMMAND_RELATIVE_PATH, renderCursorStatusSkill, "gdh-status", pinnedVersion), planCommandInstallAction("cursor", targetPath, adapter, CURSOR_MIGRATE_COMMAND_RELATIVE_PATH, renderCursorMigrateSkill, "gdh-migrate", pinnedVersion), planCommandInstallAction("cursor", targetPath, adapter, CURSOR_UPDATE_COMMAND_RELATIVE_PATH, renderCursorUpdateSkill, "gdh-update", pinnedVersion), planCommandInstallAction("cursor", targetPath, adapter, CURSOR_PREPARE_COMMAND_RELATIVE_PATH, renderCursorPrepareSkill, "gdh-prepare", pinnedVersion), planCommandInstallAction("cursor", targetPath, adapter, CURSOR_RUN_GAME_COMMAND_RELATIVE_PATH, renderCursorRunGameSkill, "gdh-run-game", pinnedVersion), planCommandInstallAction("cursor", targetPath, adapter, CURSOR_SCAN_COMMAND_RELATIVE_PATH, renderCursorScanSkill, "gdh-scan", pinnedVersion));
2097
- if (path.resolve(integrationRootPath) !== path.resolve(targetPath)) {
2098
- actions.push(planDirectWriteFileAction({
2099
- agent: "cursor",
2100
- targetPath: integrationRootPath,
2101
- relativePath: CURSOR_RULE_RELATIVE_PATH,
2102
- content: renderCursorRule({ targetRelativePath }),
2103
- readySummary: "Root-launched Cursor rule already routes to the managed Godot target.",
2104
- createSummary: "Create root-launched Cursor rule that routes to the managed Godot target.",
2105
- replaceSummary: "Replace root-launched Cursor rule with target-aware links to the managed Godot target.",
2106
- }), ...planRootSymlinkActions({
2107
- agent: "cursor",
2108
- integrationRootPath,
2109
- targetPath,
2110
- relativePaths: CURSOR_COMMAND_RELATIVE_PATHS,
2111
- noun: "Cursor command",
2112
- }));
2113
- }
2114
- return actions;
2115
- }
2116
1838
  function dedupeInstallActions(actions) {
2117
1839
  const seen = new Set();
2118
1840
  const deduped = [];
@@ -2164,8 +1886,11 @@ async function applyWriteFileAction(action) {
2164
1886
  if (action.absolutePath === null) {
2165
1887
  throw new Error("Write-file install action is missing an absolute path.");
2166
1888
  }
1889
+ if (action.content === null) {
1890
+ throw new Error("Write-file install action is missing rendered content.");
1891
+ }
2167
1892
  await fs.mkdir(path.dirname(action.absolutePath), { recursive: true });
2168
- await fs.writeFile(action.absolutePath, action.content ?? renderCursorRule(), "utf8");
1893
+ await fs.writeFile(action.absolutePath, action.content, "utf8");
2169
1894
  }
2170
1895
  async function applyRemoveFileAction(action) {
2171
1896
  if (action.absolutePath === null) {
@@ -2196,16 +1921,6 @@ async function applyLocalHintsAction(action) {
2196
1921
  gdhDevRepoPath: typeof parsed.gdhDevRepoPath === "string" ? parsed.gdhDevRepoPath : null,
2197
1922
  });
2198
1923
  }
2199
- function readCursorRuleVersion(content) {
2200
- if (content === null) {
2201
- return null;
2202
- }
2203
- const match = content.match(/<!-- GDH CURSOR RULE VERSION: (\d+) -->/);
2204
- if (!match?.[1]) {
2205
- return null;
2206
- }
2207
- return Number.parseInt(match[1], 10);
2208
- }
2209
1924
  function resolveProjectMcpEnabled(projectConfig) {
2210
1925
  if (projectConfig === null) {
2211
1926
  return false;
@@ -2305,12 +2020,6 @@ function patchManagedCodexProjectSection(content, section) {
2305
2020
  const afterJoin = afterNonEmpty.length > 0 ? `\n\n${afterNonEmpty}` : "\n";
2306
2021
  return `${beforeJoin}${section}${afterJoin}`;
2307
2022
  }
2308
- function removeManagedCodexAuthoringHookBlock(content) {
2309
- return content
2310
- .replace(/(?:^|\n)# BEGIN GDH managed authoring hooks\n[\s\S]*?# END GDH managed authoring hooks\n?/, "\n")
2311
- .replace(/\n{3,}/g, "\n\n")
2312
- .trimEnd();
2313
- }
2314
2023
  function appendManagedCodexAuthoringHookBlock(content) {
2315
2024
  const normalized = content.trimEnd();
2316
2025
  const separator = normalized.length > 0 ? "\n\n" : "";
@@ -2340,30 +2049,6 @@ function ensureCodexHooksFeature(content) {
2340
2049
  }
2341
2050
  return [...lines.slice(0, featuresStart), ...featureLines, ...lines.slice(featuresEnd)].join("\n");
2342
2051
  }
2343
- function renderManagedCodexAuthoringHookBlock() {
2344
- // Phase 82 / LSP-03. Render PostToolUse and Stop registrations inside one
2345
- // BEGIN/END envelope, in that order. The empty line between the two blocks is
2346
- // for human readability. removeManagedCodexAuthoringHookBlock strips the
2347
- // entire envelope as a single unit, so re-render replaces both blocks
2348
- // atomically (byte-identical idempotency).
2349
- return [
2350
- "# BEGIN GDH managed authoring hooks",
2351
- "[[hooks.PostToolUse]]",
2352
- 'matcher = "^(apply_patch|Edit|Write)$"',
2353
- "[[hooks.PostToolUse.hooks]]",
2354
- 'type = "command"',
2355
- `command = ${JSON.stringify(CODEX_AUTHORING_HOOK_COMMAND)}`,
2356
- "timeout = 30",
2357
- "",
2358
- "[[hooks.Stop]]",
2359
- "[[hooks.Stop.hooks]]",
2360
- 'type = "command"',
2361
- `command = ${JSON.stringify(CODEX_AUTHORING_HOOK_COMMAND)}`,
2362
- "timeout = 60",
2363
- "# END GDH managed authoring hooks",
2364
- "",
2365
- ].join("\n");
2366
- }
2367
2052
  function extractManagedCodexSection(content) {
2368
2053
  const lines = content.split("\n");
2369
2054
  const start = lines.findIndex((line) => /^\[mcp_servers\.gdh\]\s*$/.test(line));
@@ -2995,9 +2680,8 @@ function inspectMcpManifestLifecycleSurface(targetPath, mcpEnabled, adapterStatu
2995
2680
  });
2996
2681
  }
2997
2682
  const claudeMcp = findAdapterSurface(adapterStatus, "claude", "mcp_file");
2998
- const cursorMcp = findAdapterSurface(adapterStatus, "cursor", "mcp_file");
2999
2683
  const codexMcp = findAdapterSurface(adapterStatus, "codex", "mcp_file");
3000
- const probes = [claudeMcp, cursorMcp, codexMcp]
2684
+ const probes = [claudeMcp, codexMcp]
3001
2685
  .filter((surface) => surface !== null)
3002
2686
  .map((surface) => createVersionProbe({
3003
2687
  targetPath,
@@ -3006,13 +2690,13 @@ function inspectMcpManifestLifecycleSurface(targetPath, mcpEnabled, adapterStatu
3006
2690
  expectedVersion: null,
3007
2691
  detectedVersion: surface.present ? surface.version : null,
3008
2692
  }));
3009
- const states = [claudeMcp?.state, cursorMcp?.state, codexMcp?.state].filter((state) => state !== undefined);
2693
+ const states = [claudeMcp?.state, codexMcp?.state].filter((state) => state !== undefined);
3010
2694
  if (states.length > 0 && states.every((state) => state === "ready")) {
3011
2695
  return createLifecycleSurfaceStatus({
3012
2696
  surface: "mcp_manifest",
3013
2697
  management: "managed",
3014
2698
  state: "compatible",
3015
- summary: "Project MCP config files are aligned for Codex, Claude, and Cursor.",
2699
+ summary: "Project MCP config files are aligned for Codex and Claude.",
3016
2700
  reasons: [],
3017
2701
  probes,
3018
2702
  action: null,
@@ -3037,45 +2721,6 @@ function inspectMcpManifestLifecycleSurface(targetPath, mcpEnabled, adapterStatu
3037
2721
  },
3038
2722
  });
3039
2723
  }
3040
- function inspectCursorRuleLifecycleSurface(targetPath, adapterStatus) {
3041
- const surface = findAdapterSurface(adapterStatus, "cursor", "rule_file");
3042
- const probes = surface === null
3043
- ? []
3044
- : [
3045
- createVersionProbe({
3046
- targetPath,
3047
- relativePath: surface.relativePath ?? CURSOR_RULE_RELATIVE_PATH,
3048
- present: surface.present,
3049
- expectedVersion: GDH_CURSOR_RULE_VERSION,
3050
- detectedVersion: surface.present ? surface.version : null,
3051
- }),
3052
- ];
3053
- if (surface?.state === "ready") {
3054
- return createLifecycleSurfaceStatus({
3055
- surface: "cursor_rule",
3056
- management: "managed",
3057
- state: "compatible",
3058
- summary: "Cursor rule file matches the current GDH-managed surface.",
3059
- reasons: [],
3060
- probes,
3061
- action: null,
3062
- });
3063
- }
3064
- return createLifecycleSurfaceStatus({
3065
- surface: "cursor_rule",
3066
- management: "managed",
3067
- state: surface?.present ? "migration_available" : "migration_needed",
3068
- summary: "Cursor rule file needs to be created or refreshed through the adapter install flow.",
3069
- reasons: surface?.present ? ["cursor_rule_misconfigured"] : ["cursor_rule_missing"],
3070
- probes,
3071
- action: {
3072
- kind: "run_repair",
3073
- summary: "Run GDH migrate or adapters install to refresh the managed Cursor rule file.",
3074
- command: ["gdh", "adapters", "install", targetPath],
3075
- autoApplicable: true,
3076
- },
3077
- });
3078
- }
3079
2724
  function inspectRuntimeBridgeLifecycleSurface(targetPath, bridgeStatus) {
3080
2725
  const probes = bridgeStatus.managedArtifacts.map((artifact) => createVersionProbe({
3081
2726
  targetPath,
@@ -3616,14 +3261,4 @@ export { DEFAULT_GRACEFUL_STOP_TIMEOUT_MS, STOP_AND_RESTART_ENV_SUBSET_KEYS, bui
3616
3261
  // package should continue to use inspectProjectLifecycleCompatibility, which
3617
3262
  // wraps this function with filesystem probing and surface discovery.
3618
3263
  export { summarizeProjectLifecycleCompatibility };
3619
- /**
3620
- * Phase 82 / LSP-03. Test-only export of internals to support
3621
- * codex-config-render.test.ts (Plan 82-02 Wave 0 RED test scaffold). Do NOT
3622
- * consume this from production code paths; the public renderers/strippers go
3623
- * through appendManagedCodexAuthoringHookBlock and the regular config patcher.
3624
- */
3625
- export const __testing__ = {
3626
- renderManagedCodexAuthoringHookBlock,
3627
- removeManagedCodexAuthoringHookBlock,
3628
- };
3629
3264
  //# sourceMappingURL=index.js.map