@skillcap/gdh 0.19.1 → 0.19.2

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 (48) hide show
  1. package/INSTALL-BUNDLE.json +1 -1
  2. package/README.md +1 -1
  3. package/RELEASE-SPAN-UPDATE-CONTRACTS.json +84 -0
  4. package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts.map +1 -1
  5. package/node_modules/@gdh/adapters/dist/authoring-hook-render.js +26 -16
  6. package/node_modules/@gdh/adapters/dist/authoring-hook-render.js.map +1 -1
  7. package/node_modules/@gdh/adapters/dist/index.d.ts.map +1 -1
  8. package/node_modules/@gdh/adapters/dist/index.js +108 -6
  9. package/node_modules/@gdh/adapters/dist/index.js.map +1 -1
  10. package/node_modules/@gdh/adapters/dist/skill-rendering.d.ts.map +1 -1
  11. package/node_modules/@gdh/adapters/dist/skill-rendering.js +3 -0
  12. package/node_modules/@gdh/adapters/dist/skill-rendering.js.map +1 -1
  13. package/node_modules/@gdh/adapters/package.json +8 -8
  14. package/node_modules/@gdh/authoring/package.json +2 -2
  15. package/node_modules/@gdh/cli/dist/migrate.d.ts.map +1 -1
  16. package/node_modules/@gdh/cli/dist/migrate.js +12 -2
  17. package/node_modules/@gdh/cli/dist/migrate.js.map +1 -1
  18. package/node_modules/@gdh/cli/dist/setup.d.ts.map +1 -1
  19. package/node_modules/@gdh/cli/dist/setup.js +11 -4
  20. package/node_modules/@gdh/cli/dist/setup.js.map +1 -1
  21. package/node_modules/@gdh/cli/package.json +10 -10
  22. package/node_modules/@gdh/core/dist/index.d.ts +11 -6
  23. package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
  24. package/node_modules/@gdh/core/dist/index.js +6 -6
  25. package/node_modules/@gdh/core/dist/index.js.map +1 -1
  26. package/node_modules/@gdh/core/package.json +1 -1
  27. package/node_modules/@gdh/docs/dist/agent-contract.d.ts +8 -3
  28. package/node_modules/@gdh/docs/dist/agent-contract.d.ts.map +1 -1
  29. package/node_modules/@gdh/docs/dist/agent-contract.js +53 -6
  30. package/node_modules/@gdh/docs/dist/agent-contract.js.map +1 -1
  31. package/node_modules/@gdh/docs/dist/guidance.d.ts.map +1 -1
  32. package/node_modules/@gdh/docs/dist/guidance.js +5 -4
  33. package/node_modules/@gdh/docs/dist/guidance.js.map +1 -1
  34. package/node_modules/@gdh/docs/dist/query.d.ts.map +1 -1
  35. package/node_modules/@gdh/docs/dist/query.js +94 -22
  36. package/node_modules/@gdh/docs/dist/query.js.map +1 -1
  37. package/node_modules/@gdh/docs/package.json +2 -2
  38. package/node_modules/@gdh/mcp/package.json +8 -8
  39. package/node_modules/@gdh/observability/package.json +2 -2
  40. package/node_modules/@gdh/runtime/dist/bridge-surface.js +5 -3
  41. package/node_modules/@gdh/runtime/dist/bridge-surface.js.map +1 -1
  42. package/node_modules/@gdh/runtime/package.json +2 -2
  43. package/node_modules/@gdh/scan/dist/onboard.d.ts.map +1 -1
  44. package/node_modules/@gdh/scan/dist/onboard.js +11 -2
  45. package/node_modules/@gdh/scan/dist/onboard.js.map +1 -1
  46. package/node_modules/@gdh/scan/package.json +3 -3
  47. package/node_modules/@gdh/verify/package.json +7 -7
  48. package/package.json +11 -11
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "product": "GDH",
3
- "version": "0.19.1",
3
+ "version": "0.19.2",
4
4
  "installMode": "packaged_install"
5
5
  }
package/README.md CHANGED
@@ -19,7 +19,7 @@ Then open your agent in that project and run:
19
19
  /gdh-onboard
20
20
  ```
21
21
 
22
- GDH writes the project guidance, agent skill surfaces, MCP config, and local state that supported agents use for future work. Setup records the resolved GDH version in the target project so later updates can migrate that project deliberately.
22
+ GDH writes the project guidance, agent skill surfaces, MCP config, and local state that supported agents use for future work. In monorepos, full guidance and skills stay in the selected Godot project directory while only thin root routing/config surfaces are installed for agents launched from the repo root. Setup records the resolved GDH version in the target project so later updates can migrate that project deliberately.
23
23
 
24
24
  ## Requirements
25
25
 
@@ -1831,6 +1831,90 @@
1831
1831
  }
1832
1832
  ]
1833
1833
  }
1834
+ },
1835
+ {
1836
+ "version": "0.19.2",
1837
+ "releaseTag": "v0.19.2",
1838
+ "migrationStatus": "required",
1839
+ "summary": "v0.19.2 scopes GDH-managed guidance, hooks, skills, Cursor rules, and supporting docs to the configured nested Godot target while keeping monorepo-root agent launches supported through thin pointer guidance and root metadata. Existing targets need `gdh migrate --apply` because GDH_AGENT_CONTRACT_VERSION moves 3 -> 4, GDH_GUIDANCE_INDEX_VERSION moves 3 -> 4, GDH_GUIDANCE_UNIT_VERSION moves 11 -> 12, GDH_CURSOR_RULE_VERSION moves 2 -> 3, GDH_UPDATE_HOOK_VERSION moves 1 -> 2, and GDH_RUNTIME_BRIDGE_SURFACE_VERSION moves 10 -> 11.",
1840
+ "releaseHighlights": {
1841
+ "summary": "v0.19.2 scopes GDH-managed agent guidance, hooks, skills, Cursor rules, and supporting docs to the actual Godot project directory instead of treating a monorepo root as the target surface. This keeps non-game work in a monorepo from loading Godot-specific guidance or firing GDH hooks while still supporting agents and coding harnesses launched from the repository root. The release also fixes a Godot runtime bridge typing issue and keeps the bridge inert when the runtime environment variable is disabled.",
1842
+ "operatorChanges": [
1843
+ "**Target guidance is nested under the Godot project.** GDH writes the full managed `AGENTS.md` contract and generated `docs/agent/` guidance in the target Godot project directory. A monorepo-root `AGENTS.md` is only a thin pointer for Godot/GDH work.",
1844
+ "**Agent adapter surfaces are target-scoped.** Claude hooks, Claude skills, Codex skills, Cursor rules, and related generated docs use target-relative scoping so file edits outside the Godot target do not trigger GDH checks.",
1845
+ "**Monorepo root launch still works.** Root-level project metadata can still point GDH at the nested Godot project, so teams can start agents from the repository root without leaking game-specific instructions into unrelated work.",
1846
+ "**Runtime bridge generation is refreshed.** The managed bridge surface moves to version 11. The bridge script now uses an explicit `Variant` for `JSON.parse_string(...)` and avoids always-on processing when runtime support is disabled."
1847
+ ]
1848
+ },
1849
+ "updateContract": {
1850
+ "summary": "Managed targets need release-specific migration for v0.19.2 because agent contracts, generated guidance, Cursor rules, Claude hooks, shipped skill guidance, and the runtime bridge surface changed to enforce nested Godot target scoping. After self-update, run `gdh migrate --apply` from the monorepo root or target directory so GDH can refresh only the configured Godot target surfaces.",
1851
+ "steps": [
1852
+ {
1853
+ "id": "verify_configured_target_path",
1854
+ "kind": "mechanical",
1855
+ "summary": "Confirm GDH resolves the intended nested Godot target.",
1856
+ "detail": "Run `gdh status` from the monorepo root or target directory and verify the reported target path is the actual Godot project directory, for example `apps/game`, before applying migration.",
1857
+ "commands": [
1858
+ "gdh status"
1859
+ ],
1860
+ "validationCommands": [
1861
+ "gdh status"
1862
+ ]
1863
+ },
1864
+ {
1865
+ "id": "apply_scoped_surface_migration",
1866
+ "kind": "mechanical",
1867
+ "summary": "Refresh nested target guidance, hooks, skills, Cursor rules, and runtime bridge files.",
1868
+ "detail": "Run `gdh migrate --apply` so GDH re-bakes managed target files at the new surface versions. The migration should place full GDH instructions and extra guidance docs under the target project directory while leaving root-level files limited to required metadata and thin routing guidance.",
1869
+ "commands": [
1870
+ "gdh migrate --apply"
1871
+ ],
1872
+ "validationCommands": [
1873
+ "gdh guidance status",
1874
+ "gdh adapters status",
1875
+ "gdh verify drift"
1876
+ ]
1877
+ },
1878
+ {
1879
+ "id": "check_root_instruction_scope",
1880
+ "kind": "agent_reasoning",
1881
+ "summary": "Keep root agent guidance narrow for non-game monorepo work.",
1882
+ "detail": "If the repository root has AGENTS.md or equivalent instruction shims, confirm GDH-managed text only tells agents to read the nested target AGENTS.md for Godot/GDH work. Do not copy the full GDH target contract into the monorepo root.",
1883
+ "commands": [
1884
+ "gdh guidance status"
1885
+ ],
1886
+ "validationCommands": [
1887
+ "gdh verify drift"
1888
+ ]
1889
+ },
1890
+ {
1891
+ "id": "confirm_hooks_ignore_non_target_edits",
1892
+ "kind": "mechanical",
1893
+ "summary": "Confirm generated hooks are gated to the target path.",
1894
+ "detail": "For monorepos with non-game apps or packages, inspect the generated hook status after migration and confirm GDH hooks report no action for file edits outside the configured Godot target directory.",
1895
+ "commands": [
1896
+ "gdh adapters status"
1897
+ ],
1898
+ "validationCommands": [
1899
+ "gdh adapters status",
1900
+ "gdh verify drift"
1901
+ ]
1902
+ },
1903
+ {
1904
+ "id": "verify_runtime_bridge_surface",
1905
+ "kind": "mechanical",
1906
+ "summary": "Refresh the runtime bridge surface only for targets that use GDH runtime support.",
1907
+ "detail": "The bridge surface is versioned with the other managed target files. Projects that use runtime verification should let `gdh migrate --apply` refresh the bridge and then run their normal runtime smoke. When runtime support is disabled by environment, the bridge should remain inert.",
1908
+ "commands": [
1909
+ "gdh migrate --apply"
1910
+ ],
1911
+ "validationCommands": [
1912
+ "gdh status",
1913
+ "gdh verify drift"
1914
+ ]
1915
+ }
1916
+ ]
1917
+ }
1834
1918
  }
1835
1919
  ]
1836
1920
  }
@@ -1 +1 @@
1
- {"version":3,"file":"authoring-hook-render.d.ts","sourceRoot":"","sources":["../src/authoring-hook-render.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mCAAmC,yCAAyC,CAAC;AAC1F,eAAO,MAAM,kCAAkC,wCAAwC,CAAC;AACxF,eAAO,MAAM,6BAA6B,uRAC4O,CAAC;AACvR,eAAO,MAAM,4BAA4B,qRAC2O,CAAC;AAErR,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC;CACpC,GAAG,MAAM,CA+IT"}
1
+ {"version":3,"file":"authoring-hook-render.d.ts","sourceRoot":"","sources":["../src/authoring-hook-render.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mCAAmC,yCAAyC,CAAC;AAC1F,eAAO,MAAM,kCAAkC,wCAAwC,CAAC;AACxF,eAAO,MAAM,6BAA6B,uRAC4O,CAAC;AACvR,eAAO,MAAM,4BAA4B,qRAC2O,CAAC;AAErR,wBAAgB,sBAAsB,CAAC,KAAK,EAAE;IAC5C,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,QAAQ,CAAC;CACpC,GAAG,MAAM,CAyJT"}
@@ -51,7 +51,7 @@ export function renderGdhAuthoringHook(input) {
51
51
  "",
52
52
  "function handleStop(input, targetRoot) {",
53
53
  " const state = readDirtyState(targetRoot);",
54
- " const dirtyFiles = unique(state.dirtyFiles || []);",
54
+ " const dirtyFiles = sanitizeDirtyFiles(state.dirtyFiles || []);",
55
55
  " if (dirtyFiles.length === 0) return allow();",
56
56
  " const result = runGdh(targetRoot, ['authoring', 'check', '--target', targetRoot, '--mode', 'final', '--format', 'compact']);",
57
57
  " if (result.ok && /Completion allowed\\./.test(result.output)) {",
@@ -76,22 +76,23 @@ export function renderGdhAuthoringHook(input) {
76
76
  "}",
77
77
  "",
78
78
  "function collectChangedFiles(input, targetRoot) {",
79
+ " const baseCwd = input && typeof input.cwd === 'string' ? input.cwd : process.cwd();",
79
80
  " const files = [];",
80
- " addFile(files, input.file_path, targetRoot);",
81
- " addFromToolPayload(files, input.tool_input, targetRoot);",
82
- " addFromToolPayload(files, input.tool_response, targetRoot);",
81
+ " addFile(files, input.file_path, targetRoot, baseCwd);",
82
+ " addFromToolPayload(files, input.tool_input, targetRoot, baseCwd);",
83
+ " addFromToolPayload(files, input.tool_response, targetRoot, baseCwd);",
83
84
  " const command = input && input.tool_input && typeof input.tool_input.command === 'string' ? input.tool_input.command : '';",
84
- " for (const file of parsePatchFileNames(command)) addFile(files, file, targetRoot);",
85
+ " for (const file of parsePatchFileNames(command)) addFile(files, file, targetRoot, baseCwd);",
85
86
  " return unique(files);",
86
87
  "}",
87
88
  "",
88
- "function addFromToolPayload(files, payload, targetRoot) {",
89
+ "function addFromToolPayload(files, payload, targetRoot, baseCwd) {",
89
90
  " if (!payload || typeof payload !== 'object') return;",
90
- " addFile(files, payload.file_path, targetRoot);",
91
- " addFile(files, payload.filePath, targetRoot);",
92
- " addFile(files, payload.path, targetRoot);",
93
- " if (Array.isArray(payload.file_paths)) for (const file of payload.file_paths) addFile(files, file, targetRoot);",
94
- " if (Array.isArray(payload.files)) for (const file of payload.files) addFile(files, file, targetRoot);",
91
+ " addFile(files, payload.file_path, targetRoot, baseCwd);",
92
+ " addFile(files, payload.filePath, targetRoot, baseCwd);",
93
+ " addFile(files, payload.path, targetRoot, baseCwd);",
94
+ " if (Array.isArray(payload.file_paths)) for (const file of payload.file_paths) addFile(files, file, targetRoot, baseCwd);",
95
+ " if (Array.isArray(payload.files)) for (const file of payload.files) addFile(files, file, targetRoot, baseCwd);",
95
96
  "}",
96
97
  "",
97
98
  "function parsePatchFileNames(command) {",
@@ -102,19 +103,27 @@ export function renderGdhAuthoringHook(input) {
102
103
  " return files;",
103
104
  "}",
104
105
  "",
105
- "function addFile(files, value, targetRoot) {",
106
+ "function addFile(files, value, targetRoot, baseCwd) {",
106
107
  " if (typeof value !== 'string' || value.trim() === '') return;",
107
- " const normalized = normalizeToTargetRelative(value.trim(), targetRoot);",
108
+ " const normalized = normalizeToTargetRelative(value.trim(), targetRoot, baseCwd);",
108
109
  " if (normalized) files.push(normalized);",
109
110
  "}",
110
111
  "",
111
- "function normalizeToTargetRelative(value, targetRoot) {",
112
+ "function normalizeToTargetRelative(value, targetRoot, baseCwd) {",
112
113
  " if (value.startsWith('res://')) return value.slice('res://'.length);",
113
- " const absolute = path.isAbsolute(value) ? path.resolve(value) : path.resolve(targetRoot, value);",
114
- " const relative = path.relative(targetRoot, absolute);",
114
+ " const canonicalTargetRoot = canonicalPath(targetRoot);",
115
+ " const canonicalBaseCwd = canonicalPath(baseCwd || targetRoot);",
116
+ " const absolute = path.isAbsolute(value) ? canonicalPath(value) : path.resolve(canonicalBaseCwd, value);",
117
+ " const relative = path.relative(canonicalTargetRoot, absolute);",
118
+ " if ((relative.startsWith('..') || path.isAbsolute(relative)) && !path.isAbsolute(value) && isInside(canonicalTargetRoot, canonicalBaseCwd)) {",
119
+ " const fallbackRelative = path.relative(canonicalTargetRoot, path.resolve(canonicalTargetRoot, value));",
120
+ " if (!fallbackRelative.startsWith('..') && !path.isAbsolute(fallbackRelative)) return fallbackRelative.split(path.sep).join('/');",
121
+ " }",
115
122
  " if (relative.startsWith('..') || path.isAbsolute(relative)) return null;",
116
123
  " return relative.split(path.sep).join('/');",
117
124
  "}",
125
+ "function isInside(root, candidate) { const rel = path.relative(root, path.resolve(candidate)); return rel === '' || (!rel.startsWith('..') && !path.isAbsolute(rel)); }",
126
+ "function canonicalPath(value) { try { return fs.realpathSync.native ? fs.realpathSync.native(value) : fs.realpathSync(value); } catch { return path.resolve(value); } }",
118
127
  "",
119
128
  "function isAuthoringPath(file) {",
120
129
  " if (file === 'project.godot' || file.endsWith('/project.godot')) return true;",
@@ -133,6 +142,7 @@ export function renderGdhAuthoringHook(input) {
133
142
  "function readDirtyState(targetRoot) { try { return JSON.parse(fs.readFileSync(dirtyStatePath(targetRoot), 'utf8')); } catch { return { dirtyFiles: [], lastBlockedHash: null }; } }",
134
143
  "function writeDirtyState(targetRoot, state) { const file = dirtyStatePath(targetRoot); fs.mkdirSync(path.dirname(file), { recursive: true }); fs.writeFileSync(file, `${JSON.stringify(state, null, 2)}\\n`, 'utf8'); }",
135
144
  "function clearDirtyState(targetRoot) { try { fs.rmSync(dirtyStatePath(targetRoot), { force: true }); } catch {} }",
145
+ "function sanitizeDirtyFiles(values) { return unique(values).filter((file) => typeof file === 'string' && file !== '' && !file.startsWith('../') && !path.isAbsolute(file) && isAuthoringPath(file)); }",
136
146
  "function unique(values) { return [...new Set(values.filter(Boolean))].sort(); }",
137
147
  "function hash(value) { return crypto.createHash('sha256').update(value).digest('hex'); }",
138
148
  "function readHookInput() { try { return JSON.parse(fs.readFileSync(0, 'utf8') || '{}'); } catch { return {}; } }",
@@ -1 +1 @@
1
- {"version":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C1D,oBAAoB;QACpB,GAAG;QACH,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
1
+ {"version":3,"file":"authoring-hook-render.js","sourceRoot":"","sources":["../src/authoring-hook-render.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAEpD,MAAM,CAAC,MAAM,mCAAmC,GAAG,sCAAsC,CAAC;AAC1F,MAAM,CAAC,MAAM,kCAAkC,GAAG,qCAAqC,CAAC;AACxF,MAAM,CAAC,MAAM,6BAA6B,GACxC,oRAAoR,CAAC;AACvR,MAAM,CAAC,MAAM,4BAA4B,GACvC,kRAAkR,CAAC;AAErR,MAAM,UAAU,sBAAsB,CAAC,KAItC;IACC,OAAO;QACL,qBAAqB;QACrB,wBAAwB,uBAAuB,EAAE;QACjD,8DAA8D;QAC9D,0BAA0B,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG;QAChE,gCAAgC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,kBAAkB,CAAC,GAAG;QAC3E,iBAAiB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG;QAC/C,EAAE;QACF,2BAA2B;QAC3B,+BAA+B;QAC/B,mCAAmC;QACnC,iDAAiD;QACjD,EAAE;QACF,kEAAkE;QAClE,yBAAyB;QACzB,EAAE;QACF,SAAS;QACT,EAAE;QACF,mBAAmB;QACnB,kCAAkC;QAClC,gDAAgD;QAChD,0DAA0D;QAC1D,8BAA8B;QAC9B,oCAAoC;QACpC,6GAA6G;QAC7G,mEAAmE;QACnE,mBAAmB;QACnB,GAAG;QACH,EAAE;QACF,8CAA8C;QAC9C,2DAA2D;QAC3D,sDAAsD;QACtD,+CAA+C;QAC/C,6CAA6C;QAC7C,2EAA2E;QAC3E,qIAAqI;QACrI,0GAA0G;QAC1G,4CAA4C;QAC5C,sLAAsL;QACtL,qEAAqE;QACrE,8HAA8H;Q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iE;QACjE,yBAAyB;QACzB,GAAG;QACH,EAAE;QACF,4HAA4H;QAC5H,qLAAqL;QACrL,yNAAyN;QACzN,mHAAmH;QACnH,wMAAwM;QACxM,iFAAiF;QACjF,0FAA0F;QAC1F,kHAAkH;QAClH,EAAE;QACF,uCAAuC;QACvC,0BAA0B;QAC1B,kDAAkD;QAClD,oHAAoH;QACpH,0DAA0D;QAC1D,oBAAoB;QACpB,GAAG;QACH,EAAE;KACH,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AACf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAcL,KAAK,6BAA6B,EAClC,KAAK,4BAA4B,EACjC,KAAK,cAAc,EAInB,KAAK,sCAAsC,EAE3C,KAAK,gCAAgC,EAIrC,KAAK,eAAe,EACpB,KAAK,iBAAiB,EAIvB,MAAM,WAAW,CAAC;AA2DnB,OAAO,EACL,8BAA8B,EAC9B,qBAAqB,EACrB,aAAa,EACb,cAAc,EACd,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,oBAAoB,EACpB,sBAAsB,EACtB,sBAAsB,EACtB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,wBAAwB,EACxB,qBAAqB,EACrB,uBAAuB,EACvB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAE9B,eAAO,MAAM,eAAe,wCAa1B,CAAC;AAEH,eAAO,MAAM,gBAAgB,wCAIoB,CAAC;AAClD,eAAO,MAAM,yBAAyB,cAAc,CAAC;AACrD,eAAO,MAAM,kCAAkC,wCAAwC,CAAC;AACxF,eAAO,MAAM,yBAAyB,cAAc,CAAC;AACrD,eAAO,MAAM,wBAAwB,qBAAqB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C;AAChF,OAAO,EAAE,sCAAsC,EAAE,MAAM,gCAAgC,CAAC;AACxF,OAAO,EACL,6BAA6B,EAC7B,mCAAmC,EACnC,4BAA4B,EAC5B,kCAAkC,GACnC,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,KAAK,sBAAsB,EAC3B,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AAMpC,OAAO,EAAE,sCAAsC,EAAE,CAAC"}
@@ -317,8 +317,9 @@ export function renderCursorRule() {
317
317
  `<!-- GDH CURSOR RULE VERSION: ${GDH_CURSOR_RULE_VERSION} -->`,
318
318
  "# GDH Cursor Rule",
319
319
  "",
320
- "This repository uses GDH.",
321
- "Follow the canonical repo-local entrypoint in [AGENTS.md](../../AGENTS.md), then load the canonical guidance index at [docs/agent/README.md](../../docs/agent/README.md) before substantive work.",
320
+ "This GDH-managed Godot target uses GDH.",
321
+ "Apply this rule only for files inside this Godot target or when the user explicitly asks for GDH work on this target.",
322
+ "Follow the canonical target-local entrypoint in [AGENTS.md](../../AGENTS.md), then load the canonical guidance index at [docs/agent/README.md](../../docs/agent/README.md) before substantive Godot work.",
322
323
  "For runtime bridge usage, load [docs/agent/authoring-and-validation.md](../../docs/agent/authoring-and-validation.md) and follow its runtime bridge section.",
323
324
  "Do not duplicate or override the canonical GDH guidance chain here.",
324
325
  "",
@@ -1126,7 +1127,7 @@ async function planInstallActions(targetPath, adapters, requestedAgents, options
1126
1127
  continue;
1127
1128
  }
1128
1129
  if (adapter.agent === "claude") {
1129
- actions.push(...planClaudeInstallActions(targetPath, adapter, options.pinnedVersion));
1130
+ actions.push(...planClaudeInstallActions(targetPath, adapter, options.pinnedVersion, options.integrationRootPath));
1130
1131
  continue;
1131
1132
  }
1132
1133
  if (adapter.agent === "cursor") {
@@ -1471,7 +1472,7 @@ function planCodexUserInstallActions(targetPath, projectMcp, integrationRootPath
1471
1472
  }));
1472
1473
  return actions;
1473
1474
  }
1474
- function planClaudeInstallActions(targetPath, adapter, pinnedVersion) {
1475
+ function planClaudeInstallActions(targetPath, adapter, pinnedVersion, integrationRootPath) {
1475
1476
  const actions = [];
1476
1477
  const claudeSurface = adapter.surfaces.find((surface) => surface.relativePath === CLAUDE_SHIM_RELATIVE_PATH);
1477
1478
  if (!claudeSurface || claudeSurface.state === "ready") {
@@ -1515,6 +1516,30 @@ function planClaudeInstallActions(targetPath, adapter, pinnedVersion) {
1515
1516
  targetRelativePath: ".",
1516
1517
  agent: "claude",
1517
1518
  }), "authoring guard", pinnedVersion));
1519
+ if (path.resolve(integrationRootPath) !== path.resolve(targetPath)) {
1520
+ const rootTargetRelativePath = path.relative(integrationRootPath, targetPath) || ".";
1521
+ actions.push(planDirectSymlinkAction({
1522
+ agent: "claude",
1523
+ targetPath: integrationRootPath,
1524
+ relativePath: CLAUDE_SHIM_RELATIVE_PATH,
1525
+ expectedTarget: "AGENTS.md",
1526
+ readySummary: "Root CLAUDE.md already points to the thin root AGENTS.md router.",
1527
+ createSummary: "Create root CLAUDE.md as a symlink to the thin root AGENTS.md router.",
1528
+ replaceSummary: "Replace root CLAUDE.md with a symlink to the thin root AGENTS.md router.",
1529
+ }), planDirectWriteFileAction({
1530
+ agent: "claude",
1531
+ targetPath: integrationRootPath,
1532
+ relativePath: CLAUDE_AUTHORING_HOOK_RELATIVE_PATH,
1533
+ content: renderGdhAuthoringHook({
1534
+ pinnedVersion,
1535
+ targetRelativePath: rootTargetRelativePath,
1536
+ agent: "claude",
1537
+ }),
1538
+ readySummary: "Root-launched Claude authoring hook already matches the managed target-scoped hook.",
1539
+ createSummary: "Create the root-launched Claude authoring hook with target-scoped filtering.",
1540
+ replaceSummary: "Replace the root-launched Claude authoring hook with the target-scoped managed hook.",
1541
+ }), planRootClaudeAuthoringSettingsAction(integrationRootPath));
1542
+ }
1518
1543
  // .claude/settings.json composite patch action.
1519
1544
  // - Plan 02 (Strategy A, planner-lock #1): patch-merge the SessionStart
1520
1545
  // hook entry by exact command-literal match, preserving siblings.
@@ -1530,7 +1555,7 @@ function planClaudeInstallActions(targetPath, adapter, pinnedVersion) {
1530
1555
  // commutative (proven in Task 1 Test J) so application order is irrelevant.
1531
1556
  let existingSettingsContent = "";
1532
1557
  try {
1533
- existingSettingsContent = fsSync.readFileSync(path.join(targetPath, CLAUDE_SETTINGS_RELATIVE_PATH), "utf8");
1558
+ existingSettingsContent = fsSync.readFileSync(path.resolve(targetPath, CLAUDE_SETTINGS_RELATIVE_PATH), "utf8");
1534
1559
  }
1535
1560
  catch {
1536
1561
  existingSettingsContent = "";
@@ -1556,6 +1581,83 @@ function planClaudeInstallActions(targetPath, adapter, pinnedVersion) {
1556
1581
  actions.push(...planLegacyClaudeCommandCleanupActions(targetPath));
1557
1582
  return actions;
1558
1583
  }
1584
+ function planDirectSymlinkAction(input) {
1585
+ const absolutePath = path.resolve(input.targetPath, input.relativePath);
1586
+ let present = false;
1587
+ let ready = false;
1588
+ try {
1589
+ const stat = fsSync.lstatSync(absolutePath);
1590
+ present = true;
1591
+ ready = stat.isSymbolicLink() && fsSync.readlinkSync(absolutePath) === input.expectedTarget;
1592
+ }
1593
+ catch {
1594
+ present = false;
1595
+ }
1596
+ return createInstallAction({
1597
+ agent: input.agent,
1598
+ kind: "ensure_symlink",
1599
+ scope: "repo",
1600
+ targetPath: input.targetPath,
1601
+ relativePath: input.relativePath,
1602
+ state: ready ? "unchanged" : "planned",
1603
+ mode: ready ? "unchanged" : present ? "replace" : "create",
1604
+ summary: ready ? input.readySummary : present ? input.replaceSummary : input.createSummary,
1605
+ expectedTarget: input.expectedTarget,
1606
+ });
1607
+ }
1608
+ function planDirectWriteFileAction(input) {
1609
+ const absolutePath = path.resolve(input.targetPath, input.relativePath);
1610
+ let existingContent = null;
1611
+ try {
1612
+ existingContent = fsSync.readFileSync(absolutePath, "utf8");
1613
+ }
1614
+ catch {
1615
+ existingContent = null;
1616
+ }
1617
+ const ready = existingContent === input.content;
1618
+ return createInstallAction({
1619
+ agent: input.agent,
1620
+ kind: "write_file",
1621
+ scope: "repo",
1622
+ targetPath: input.targetPath,
1623
+ relativePath: input.relativePath,
1624
+ state: ready ? "unchanged" : "planned",
1625
+ mode: ready ? "unchanged" : existingContent === null ? "create" : "replace",
1626
+ summary: ready
1627
+ ? input.readySummary
1628
+ : existingContent === null
1629
+ ? input.createSummary
1630
+ : input.replaceSummary,
1631
+ content: input.content,
1632
+ });
1633
+ }
1634
+ function planRootClaudeAuthoringSettingsAction(integrationRootPath) {
1635
+ const absolutePath = path.join(integrationRootPath, CLAUDE_SETTINGS_RELATIVE_PATH);
1636
+ let existingSettingsContent = "";
1637
+ try {
1638
+ existingSettingsContent = fsSync.readFileSync(absolutePath, "utf8");
1639
+ }
1640
+ catch {
1641
+ existingSettingsContent = "";
1642
+ }
1643
+ const patchedSettings = patchClaudeSettingsForGdhAuthoringHooks(existingSettingsContent);
1644
+ const ready = existingSettingsContent === patchedSettings;
1645
+ return createInstallAction({
1646
+ agent: "claude",
1647
+ kind: "write_file",
1648
+ scope: "repo",
1649
+ targetPath: integrationRootPath,
1650
+ relativePath: CLAUDE_SETTINGS_RELATIVE_PATH,
1651
+ state: ready ? "unchanged" : "planned",
1652
+ mode: ready ? "unchanged" : existingSettingsContent.length > 0 ? "replace" : "create",
1653
+ summary: ready
1654
+ ? "Root-launched Claude authoring hooks are already registered with target-scoped filtering."
1655
+ : existingSettingsContent.length > 0
1656
+ ? "Register root-launched Claude authoring hooks while preserving sibling settings."
1657
+ : "Create root .claude/settings.json with target-scoped authoring hooks.",
1658
+ content: patchedSettings,
1659
+ });
1660
+ }
1559
1661
  function planCursorInstallActions(targetPath, adapter, pinnedVersion) {
1560
1662
  const actions = [];
1561
1663
  const cursorRuleSurface = adapter.surfaces.find((surface) => surface.relativePath === CURSOR_RULE_RELATIVE_PATH);
@@ -2218,7 +2320,7 @@ function inspectAgentContractLifecycleSurface(targetPath, guidanceStatus) {
2218
2320
  const status = guidanceStatus.agentContract;
2219
2321
  const probes = [
2220
2322
  createVersionProbe({
2221
- targetPath,
2323
+ targetPath: path.dirname(status.absolutePath),
2222
2324
  relativePath: status.relativePath,
2223
2325
  present: status.present,
2224
2326
  expectedVersion: GDH_AGENT_CONTRACT_VERSION,