@skillcap/gdh 0.23.0 → 0.24.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 (128) hide show
  1. package/INSTALL-BUNDLE.json +1 -1
  2. package/RELEASE-SPAN-UPDATE-CONTRACTS.json +64 -0
  3. package/node_modules/@gdh/adapters/dist/authoring-hook-render.d.ts.map +1 -1
  4. package/node_modules/@gdh/adapters/dist/authoring-hook-render.js +2 -1
  5. package/node_modules/@gdh/adapters/dist/authoring-hook-render.js.map +1 -1
  6. package/node_modules/@gdh/adapters/dist/claude-statusline-render.d.ts.map +1 -1
  7. package/node_modules/@gdh/adapters/dist/claude-statusline-render.js +2 -1
  8. package/node_modules/@gdh/adapters/dist/claude-statusline-render.js.map +1 -1
  9. package/node_modules/@gdh/adapters/dist/claude-update-hook-render.d.ts.map +1 -1
  10. package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js +2 -1
  11. package/node_modules/@gdh/adapters/dist/claude-update-hook-render.js.map +1 -1
  12. package/node_modules/@gdh/adapters/dist/claude-update-worker-render.d.ts.map +1 -1
  13. package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js +2 -1
  14. package/node_modules/@gdh/adapters/dist/claude-update-worker-render.js.map +1 -1
  15. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.d.ts +71 -0
  16. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.d.ts.map +1 -0
  17. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.js +89 -0
  18. package/node_modules/@gdh/adapters/dist/deferred-actions-advisory.js.map +1 -0
  19. package/node_modules/@gdh/adapters/dist/durable-backup.d.ts +209 -0
  20. package/node_modules/@gdh/adapters/dist/durable-backup.d.ts.map +1 -0
  21. package/node_modules/@gdh/adapters/dist/durable-backup.js +346 -0
  22. package/node_modules/@gdh/adapters/dist/durable-backup.js.map +1 -0
  23. package/node_modules/@gdh/adapters/dist/index.d.ts +10 -1
  24. package/node_modules/@gdh/adapters/dist/index.d.ts.map +1 -1
  25. package/node_modules/@gdh/adapters/dist/index.js +24 -2
  26. package/node_modules/@gdh/adapters/dist/index.js.map +1 -1
  27. package/node_modules/@gdh/adapters/dist/inventory-sweep.d.ts +53 -0
  28. package/node_modules/@gdh/adapters/dist/inventory-sweep.d.ts.map +1 -0
  29. package/node_modules/@gdh/adapters/dist/inventory-sweep.js +98 -0
  30. package/node_modules/@gdh/adapters/dist/inventory-sweep.js.map +1 -0
  31. package/node_modules/@gdh/adapters/dist/process-orchestration.d.ts +223 -0
  32. package/node_modules/@gdh/adapters/dist/process-orchestration.d.ts.map +1 -0
  33. package/node_modules/@gdh/adapters/dist/process-orchestration.js +368 -0
  34. package/node_modules/@gdh/adapters/dist/process-orchestration.js.map +1 -0
  35. package/node_modules/@gdh/adapters/dist/self-update-mechanics.d.ts +157 -14
  36. package/node_modules/@gdh/adapters/dist/self-update-mechanics.d.ts.map +1 -1
  37. package/node_modules/@gdh/adapters/dist/self-update-mechanics.js +570 -89
  38. package/node_modules/@gdh/adapters/dist/self-update-mechanics.js.map +1 -1
  39. package/node_modules/@gdh/adapters/dist/skill-rendering.d.ts.map +1 -1
  40. package/node_modules/@gdh/adapters/dist/skill-rendering.js +25 -0
  41. package/node_modules/@gdh/adapters/dist/skill-rendering.js.map +1 -1
  42. package/node_modules/@gdh/adapters/package.json +8 -8
  43. package/node_modules/@gdh/authoring/package.json +2 -2
  44. package/node_modules/@gdh/cli/dist/index.d.ts +9 -0
  45. package/node_modules/@gdh/cli/dist/index.d.ts.map +1 -1
  46. package/node_modules/@gdh/cli/dist/index.js +244 -2
  47. package/node_modules/@gdh/cli/dist/index.js.map +1 -1
  48. package/node_modules/@gdh/cli/dist/migrate.d.ts +152 -1
  49. package/node_modules/@gdh/cli/dist/migrate.d.ts.map +1 -1
  50. package/node_modules/@gdh/cli/dist/migrate.js +290 -6
  51. package/node_modules/@gdh/cli/dist/migrate.js.map +1 -1
  52. package/node_modules/@gdh/cli/dist/self-update.d.ts +14 -0
  53. package/node_modules/@gdh/cli/dist/self-update.d.ts.map +1 -1
  54. package/node_modules/@gdh/cli/dist/self-update.js +197 -15
  55. package/node_modules/@gdh/cli/dist/self-update.js.map +1 -1
  56. package/node_modules/@gdh/cli/package.json +10 -10
  57. package/node_modules/@gdh/core/dist/index.d.ts +97 -5
  58. package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
  59. package/node_modules/@gdh/core/dist/index.js +23 -5
  60. package/node_modules/@gdh/core/dist/index.js.map +1 -1
  61. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.d.ts +3 -0
  62. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.d.ts.map +1 -0
  63. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.js +247 -0
  64. package/node_modules/@gdh/core/dist/migrations/entries/s2c2_to_s2c3_rules_schema_v2_to_v3.js.map +1 -0
  65. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.d.ts +3 -0
  66. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.d.ts.map +1 -0
  67. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.js +152 -0
  68. package/node_modules/@gdh/core/dist/migrations/entries/s3c8_to_s3c9_register_runtime_bridge_autoload.js.map +1 -0
  69. package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.d.ts +3 -0
  70. package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.d.ts.map +1 -0
  71. package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.js +67 -0
  72. package/node_modules/@gdh/core/dist/migrations/envelopes/envelope-output-validator.js.map +1 -0
  73. package/node_modules/@gdh/core/dist/migrations/envelopes/index.d.ts +37 -0
  74. package/node_modules/@gdh/core/dist/migrations/envelopes/index.d.ts.map +1 -0
  75. package/node_modules/@gdh/core/dist/migrations/envelopes/index.js +60 -0
  76. package/node_modules/@gdh/core/dist/migrations/envelopes/index.js.map +1 -0
  77. package/node_modules/@gdh/core/dist/migrations/envelopes/types.d.ts +121 -0
  78. package/node_modules/@gdh/core/dist/migrations/envelopes/types.d.ts.map +1 -0
  79. package/node_modules/@gdh/core/dist/migrations/envelopes/types.js +2 -0
  80. package/node_modules/@gdh/core/dist/migrations/envelopes/types.js.map +1 -0
  81. package/node_modules/@gdh/core/dist/migrations/golden-harness.d.ts +40 -0
  82. package/node_modules/@gdh/core/dist/migrations/golden-harness.d.ts.map +1 -0
  83. package/node_modules/@gdh/core/dist/migrations/golden-harness.js +71 -0
  84. package/node_modules/@gdh/core/dist/migrations/golden-harness.js.map +1 -0
  85. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts +322 -0
  86. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.d.ts.map +1 -0
  87. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js +384 -0
  88. package/node_modules/@gdh/core/dist/migrations/managed-surface-classes.js.map +1 -0
  89. package/node_modules/@gdh/core/dist/migrations/probes.d.ts +58 -0
  90. package/node_modules/@gdh/core/dist/migrations/probes.d.ts.map +1 -0
  91. package/node_modules/@gdh/core/dist/migrations/probes.js +112 -0
  92. package/node_modules/@gdh/core/dist/migrations/probes.js.map +1 -0
  93. package/node_modules/@gdh/core/dist/migrations/registry.d.ts +205 -0
  94. package/node_modules/@gdh/core/dist/migrations/registry.d.ts.map +1 -0
  95. package/node_modules/@gdh/core/dist/migrations/registry.js +214 -0
  96. package/node_modules/@gdh/core/dist/migrations/registry.js.map +1 -0
  97. package/node_modules/@gdh/core/dist/state/atomic-write.d.ts +19 -0
  98. package/node_modules/@gdh/core/dist/state/atomic-write.d.ts.map +1 -0
  99. package/node_modules/@gdh/core/dist/state/atomic-write.js +34 -0
  100. package/node_modules/@gdh/core/dist/state/atomic-write.js.map +1 -0
  101. package/node_modules/@gdh/core/dist/state/migration-state.d.ts +135 -0
  102. package/node_modules/@gdh/core/dist/state/migration-state.d.ts.map +1 -0
  103. package/node_modules/@gdh/core/dist/state/migration-state.js +186 -0
  104. package/node_modules/@gdh/core/dist/state/migration-state.js.map +1 -0
  105. package/node_modules/@gdh/core/dist/state/processes-snapshot.d.ts +72 -0
  106. package/node_modules/@gdh/core/dist/state/processes-snapshot.d.ts.map +1 -0
  107. package/node_modules/@gdh/core/dist/state/processes-snapshot.js +113 -0
  108. package/node_modules/@gdh/core/dist/state/processes-snapshot.js.map +1 -0
  109. package/node_modules/@gdh/core/dist/state/render-inventory.d.ts +54 -0
  110. package/node_modules/@gdh/core/dist/state/render-inventory.d.ts.map +1 -0
  111. package/node_modules/@gdh/core/dist/state/render-inventory.js +77 -0
  112. package/node_modules/@gdh/core/dist/state/render-inventory.js.map +1 -0
  113. package/node_modules/@gdh/core/package.json +1 -1
  114. package/node_modules/@gdh/docs/dist/agent-contract.d.ts.map +1 -1
  115. package/node_modules/@gdh/docs/dist/agent-contract.js +2 -1
  116. package/node_modules/@gdh/docs/dist/agent-contract.js.map +1 -1
  117. package/node_modules/@gdh/docs/dist/guidance.d.ts.map +1 -1
  118. package/node_modules/@gdh/docs/dist/guidance.js +3 -1
  119. package/node_modules/@gdh/docs/dist/guidance.js.map +1 -1
  120. package/node_modules/@gdh/docs/package.json +2 -2
  121. package/node_modules/@gdh/mcp/package.json +8 -8
  122. package/node_modules/@gdh/observability/package.json +2 -2
  123. package/node_modules/@gdh/runtime/dist/bridge-surface.js +63 -2
  124. package/node_modules/@gdh/runtime/dist/bridge-surface.js.map +1 -1
  125. package/node_modules/@gdh/runtime/package.json +2 -2
  126. package/node_modules/@gdh/scan/package.json +3 -3
  127. package/node_modules/@gdh/verify/package.json +7 -7
  128. package/package.json +11 -11
@@ -0,0 +1,121 @@
1
+ import type { GdhMigrationVersionPair } from "../registry.js";
2
+ /**
3
+ * Phase 73 migration envelope schema (D-01 / D-02 / D-03 / D-04).
4
+ *
5
+ * The envelope is the typed escape hatch for genuinely semantic migrations
6
+ * that mechanical Rule A (deterministic transform) cannot express. Every
7
+ * field name is `snake_case` to match the on-disk JSON conventions Phase 72
8
+ * established for `migration.json` (`recorded_at`, `from_pin`, `to_pin`,
9
+ * `output_contract`, …); per-field `readonly` mirrors the immutability
10
+ * pattern at `packages/core/src/migrations/registry.ts:31-56`.
11
+ *
12
+ * This file is the single shared schema surface consumed by:
13
+ * - `applyMigrationChain` (Plan 03) — emits the envelope when an entry
14
+ * declares `envelope_ref`.
15
+ * - `gdh migration record-envelope-result` (Plan 05) — validates the
16
+ * agent-supplied output_contract against `GdhMigrationEnvelopeOutput`
17
+ * via `isEnvelopeOutput` (`./envelope-output-validator.ts`).
18
+ * - The static slug→envelope manifest (`./index.ts`).
19
+ *
20
+ * D-01 explicitly excludes a clarifying-questions mandate field (it would
21
+ * conflict with batch `gdh self-update` runs). D-03 explicitly excludes a
22
+ * per-envelope output_contract extension slot in v1.18 (YAGNI; reintroduce
23
+ * when envelope variance is real). Per D-04, `envelope_ref` is a slug only
24
+ * — inline-literal envelope objects on `GdhMigrationEntry.envelope_ref` are
25
+ * unsupported by construction.
26
+ */
27
+ /**
28
+ * Structured mandate (D-01).
29
+ *
30
+ * `acceptance_criteria` MUST be enumerated at authoring time so the agent
31
+ * has a verifiable rubric for its `output_contract` and downstream evidence
32
+ * recording knows what "done" looks like.
33
+ */
34
+ export interface GdhMigrationEnvelopeMandate {
35
+ readonly instruction: string;
36
+ readonly acceptance_criteria: readonly string[];
37
+ readonly examples?: readonly string[];
38
+ }
39
+ /**
40
+ * Tool scope (D-02). Glob patterns mirror gitignore semantics the author
41
+ * already knows. No deny-list carve-outs in v1.18 (YAGNI).
42
+ */
43
+ export interface GdhMigrationEnvelopeToolScope {
44
+ /** Glob patterns the agent MAY read from. */
45
+ readonly read: readonly string[];
46
+ /** Glob patterns the agent MAY write to. */
47
+ readonly write: readonly string[];
48
+ }
49
+ /**
50
+ * Seed shape for `apply.changes` (D-03). Phase 73 stores the array as
51
+ * evidence; later phases that ship a real envelope-using migration define
52
+ * concrete consumers. Keep field names primitive and JSON-safe so the
53
+ * recorded slot in `migration.json` remains round-trippable through
54
+ * `JSON.parse`/`JSON.stringify` without per-shape codecs.
55
+ */
56
+ export type GdhFileChange = {
57
+ readonly kind: "rewrite";
58
+ readonly relativePath: string;
59
+ readonly content: string;
60
+ } | {
61
+ readonly kind: "delete";
62
+ readonly relativePath: string;
63
+ };
64
+ /**
65
+ * Typed discriminated union for the agent's output (D-03).
66
+ *
67
+ * Three named outcomes:
68
+ * - `apply` — agent produced a concrete change set; `migration.json`
69
+ * records `changes` as evidence.
70
+ * - `abort` — agent declined; `reason` is recorded for audit trail.
71
+ * - `needs_clarification` — agent wants questions answered before applying;
72
+ * `questions` are recorded so the operator/next session can resolve them.
73
+ *
74
+ * D-03 explicitly excludes a per-envelope extension slot — adding one now
75
+ * would invite untyped expansion ahead of any real envelope-using migration.
76
+ */
77
+ export type GdhMigrationEnvelopeOutput = {
78
+ readonly state: "apply";
79
+ readonly changes: readonly GdhFileChange[];
80
+ } | {
81
+ readonly state: "abort";
82
+ readonly reason: string;
83
+ } | {
84
+ readonly state: "needs_clarification";
85
+ readonly questions: readonly string[];
86
+ };
87
+ /**
88
+ * Migration envelope (D-04).
89
+ *
90
+ * Each envelope file under `packages/core/src/migrations/envelopes/<slug>.ts`
91
+ * exports a single typed `GdhMigrationEnvelope`. `envelope_ref` MUST equal
92
+ * the file basename and pass `isEnvelopeSlug` (`./index.ts`); the
93
+ * defense-in-depth invariant test in `./index.test.ts` enforces that
94
+ * registry key === entry's `envelope_ref` for every shipped envelope.
95
+ *
96
+ * `from`/`to` drive the D-10 staleness gate: a previously-recorded envelope
97
+ * result is valid only when `(envelope_ref, from_pin, to_pin)` all match the
98
+ * current chain step's bump pair. Pin change → stale → re-emit envelope.
99
+ *
100
+ * `fallback_note` reminds the inline-running agent (host that cannot spawn
101
+ * subagents) that the same mandate, tool_scope, and output_contract apply;
102
+ * tool scope is discipline-bound rather than enforced by a sandboxed
103
+ * subagent (per MIGRATION-WORKFLOW.md §4.2).
104
+ */
105
+ export interface GdhMigrationEnvelope {
106
+ /** Slug == file basename under envelopes/ (D-04). Lower-case + underscore + digit only. */
107
+ readonly envelope_ref: string;
108
+ /** From-pair the envelope is valid for. Used by the D-10 staleness gate. */
109
+ readonly from: GdhMigrationVersionPair;
110
+ /** To-pair the envelope is valid for. */
111
+ readonly to: GdhMigrationVersionPair;
112
+ readonly mandate: GdhMigrationEnvelopeMandate;
113
+ readonly tool_scope: GdhMigrationEnvelopeToolScope;
114
+ /**
115
+ * Identical mandate prompt and output_contract between subagent and inline
116
+ * paths (MIGRATION-WORKFLOW.md §4.2). The fallback note reminds the
117
+ * inline-running agent that tool scope is discipline-bound.
118
+ */
119
+ readonly fallback_note: string;
120
+ }
121
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/migrations/envelopes/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAE9D;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH;;;;;;GAMG;AACH,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,QAAQ,CAAC,mBAAmB,EAAE,SAAS,MAAM,EAAE,CAAC;IAChD,QAAQ,CAAC,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CACvC;AAED;;;GAGG;AACH,MAAM,WAAW,6BAA6B;IAC5C,6CAA6C;IAC7C,QAAQ,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,CAAC;IACjC,4CAA4C;IAC5C,QAAQ,CAAC,KAAK,EAAE,SAAS,MAAM,EAAE,CAAC;CACnC;AAED;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACrF;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAA;CAAE,CAAC;AAE/D;;;;;;;;;;;;GAYG;AACH,MAAM,MAAM,0BAA0B,GAClC;IAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,aAAa,EAAE,CAAA;CAAE,GACvE;IAAE,QAAQ,CAAC,KAAK,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACpD;IAAE,QAAQ,CAAC,KAAK,EAAE,qBAAqB,CAAC;IAAC,QAAQ,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,CAAC;AAErF;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,oBAAoB;IAEnC,2FAA2F;IAC3F,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,4EAA4E;IAC5E,QAAQ,CAAC,IAAI,EAAE,uBAAuB,CAAC;IACvC,yCAAyC;IACzC,QAAQ,CAAC,EAAE,EAAE,uBAAuB,CAAC;IACrC,QAAQ,CAAC,OAAO,EAAE,2BAA2B,CAAC;IAC9C,QAAQ,CAAC,UAAU,EAAE,6BAA6B,CAAC;IACnD;;;;OAIG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;CAChC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/migrations/envelopes/types.ts"],"names":[],"mappings":""}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Per-entry golden fixture harness for migration registry entries.
3
+ *
4
+ * Provides `runMigrationGolden(entry, fixturePath)` — reads `<fixturePath>/before/`,
5
+ * runs the entry's mechanical transform (Phase 72) or future subagent envelope
6
+ * (Phase 73), and asserts byte-equal match against `<fixturePath>/after/`.
7
+ *
8
+ * Phase 71 ships the harness scaffold + one stub golden test that proves the
9
+ * harness works against a noop transform. Phase 72 authors real registry
10
+ * entries that consume the harness. Per CONTEXT.md D-15 / D-16: the harness
11
+ * is a pure utility with no registry dependency — Phase 72's registry imports
12
+ * the harness, not the other way around.
13
+ *
14
+ * Consumers:
15
+ * - Phase 71: stub test in golden-harness.test.ts proves the harness works.
16
+ * - Phase 72: every migration registry entry's per-entry golden test.
17
+ *
18
+ * Per-entry fixture layout (CONTEXT.md D-17):
19
+ * tests/fixtures/migration-goldens/<entry-id>/
20
+ * before/ <- input file tree, paths relative to the per-entry root
21
+ * after/ <- expected output file tree, same path scheme
22
+ *
23
+ * Comparison semantics:
24
+ * - Default: byte-equal on every file declared in `after/`.
25
+ * - Class-2 user-data goldens (Phase 72) may opt into structural
26
+ * comparison via an entry-level comparator override (extension point;
27
+ * not implemented in Phase 71).
28
+ */
29
+ export interface GdhMigrationGoldenInputs {
30
+ readonly files: ReadonlyMap<string, string>;
31
+ }
32
+ export interface GdhMigrationGoldenOutputs {
33
+ readonly files: ReadonlyMap<string, string>;
34
+ }
35
+ export interface GdhMigrationGoldenEntry {
36
+ readonly id: string;
37
+ readonly transform: (input: GdhMigrationGoldenInputs) => Promise<GdhMigrationGoldenOutputs>;
38
+ }
39
+ export declare function runMigrationGolden(entry: GdhMigrationGoldenEntry, fixturePath: string): Promise<void>;
40
+ //# sourceMappingURL=golden-harness.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"golden-harness.d.ts","sourceRoot":"","sources":["../../src/migrations/golden-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAKH,MAAM,WAAW,wBAAwB;IACvC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAC7C;AAED,MAAM,WAAW,uBAAuB;IACtC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,SAAS,EAAE,CAClB,KAAK,EAAE,wBAAwB,KAC5B,OAAO,CAAC,yBAAyB,CAAC,CAAC;CACzC;AA0BD,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,uBAAuB,EAC9B,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,IAAI,CAAC,CAgCf"}
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Per-entry golden fixture harness for migration registry entries.
3
+ *
4
+ * Provides `runMigrationGolden(entry, fixturePath)` — reads `<fixturePath>/before/`,
5
+ * runs the entry's mechanical transform (Phase 72) or future subagent envelope
6
+ * (Phase 73), and asserts byte-equal match against `<fixturePath>/after/`.
7
+ *
8
+ * Phase 71 ships the harness scaffold + one stub golden test that proves the
9
+ * harness works against a noop transform. Phase 72 authors real registry
10
+ * entries that consume the harness. Per CONTEXT.md D-15 / D-16: the harness
11
+ * is a pure utility with no registry dependency — Phase 72's registry imports
12
+ * the harness, not the other way around.
13
+ *
14
+ * Consumers:
15
+ * - Phase 71: stub test in golden-harness.test.ts proves the harness works.
16
+ * - Phase 72: every migration registry entry's per-entry golden test.
17
+ *
18
+ * Per-entry fixture layout (CONTEXT.md D-17):
19
+ * tests/fixtures/migration-goldens/<entry-id>/
20
+ * before/ <- input file tree, paths relative to the per-entry root
21
+ * after/ <- expected output file tree, same path scheme
22
+ *
23
+ * Comparison semantics:
24
+ * - Default: byte-equal on every file declared in `after/`.
25
+ * - Class-2 user-data goldens (Phase 72) may opt into structural
26
+ * comparison via an entry-level comparator override (extension point;
27
+ * not implemented in Phase 71).
28
+ */
29
+ import fs from "node:fs/promises";
30
+ import path from "node:path";
31
+ async function readFixtureTree(rootPath) {
32
+ const files = new Map();
33
+ async function walk(currentDir, relativePrefix) {
34
+ const entries = await fs.readdir(currentDir, { withFileTypes: true });
35
+ for (const entry of entries) {
36
+ const entryPath = path.join(currentDir, entry.name);
37
+ const entryRelative = relativePrefix === "" ? entry.name : `${relativePrefix}/${entry.name}`;
38
+ if (entry.isDirectory()) {
39
+ await walk(entryPath, entryRelative);
40
+ }
41
+ else if (entry.isFile()) {
42
+ files.set(entryRelative, await fs.readFile(entryPath, "utf8"));
43
+ }
44
+ }
45
+ }
46
+ await walk(rootPath, "");
47
+ return files;
48
+ }
49
+ export async function runMigrationGolden(entry, fixturePath) {
50
+ const beforeFiles = await readFixtureTree(path.join(fixturePath, "before"));
51
+ const expectedAfterFiles = await readFixtureTree(path.join(fixturePath, "after"));
52
+ const result = await entry.transform({ files: beforeFiles });
53
+ const actualAfterFiles = result.files;
54
+ // 1. Every expected file must be present and byte-equal.
55
+ for (const [relativePath, expectedContent] of expectedAfterFiles) {
56
+ if (!actualAfterFiles.has(relativePath)) {
57
+ throw new Error(`Migration golden mismatch: missing expected output file "${relativePath}" for entry "${entry.id}".`);
58
+ }
59
+ const actualContent = actualAfterFiles.get(relativePath);
60
+ if (actualContent !== expectedContent) {
61
+ throw new Error(`Migration golden mismatch: content differs at "${relativePath}" for entry "${entry.id}".`);
62
+ }
63
+ }
64
+ // 2. Orphan detection — no unexpected output files.
65
+ for (const relativePath of actualAfterFiles.keys()) {
66
+ if (!expectedAfterFiles.has(relativePath)) {
67
+ throw new Error(`Migration golden mismatch: unexpected output file "${relativePath}" produced by entry "${entry.id}".`);
68
+ }
69
+ }
70
+ }
71
+ //# sourceMappingURL=golden-harness.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"golden-harness.js","sourceRoot":"","sources":["../../src/migrations/golden-harness.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AAEH,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAClC,OAAO,IAAI,MAAM,WAAW,CAAC;AAiB7B,KAAK,UAAU,eAAe,CAC5B,QAAgB;IAEhB,MAAM,KAAK,GAAG,IAAI,GAAG,EAAkB,CAAC;IACxC,KAAK,UAAU,IAAI,CACjB,UAAkB,EAClB,cAAsB;QAEtB,MAAM,OAAO,GAAG,MAAM,EAAE,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC;QACtE,KAAK,MAAM,KAAK,IAAI,OAAO,EAAE,CAAC;YAC5B,MAAM,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,KAAK,CAAC,IAAI,CAAC,CAAC;YACpD,MAAM,aAAa,GACjB,cAAc,KAAK,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,cAAc,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC;YACzE,IAAI,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC;gBACxB,MAAM,IAAI,CAAC,SAAS,EAAE,aAAa,CAAC,CAAC;YACvC,CAAC;iBAAM,IAAI,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;gBAC1B,KAAK,CAAC,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC,CAAC;YACjE,CAAC;QACH,CAAC;IACH,CAAC;IACD,MAAM,IAAI,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;IACzB,OAAO,KAAK,CAAC;AACf,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CACtC,KAA8B,EAC9B,WAAmB;IAEnB,MAAM,WAAW,GAAG,MAAM,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IAC5E,MAAM,kBAAkB,GAAG,MAAM,eAAe,CAC9C,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,OAAO,CAAC,CAChC,CAAC;IACF,MAAM,MAAM,GAAG,MAAM,KAAK,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;IAE7D,MAAM,gBAAgB,GAAG,MAAM,CAAC,KAAK,CAAC;IAEtC,yDAAyD;IACzD,KAAK,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,IAAI,kBAAkB,EAAE,CAAC;QACjE,IAAI,CAAC,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YACxC,MAAM,IAAI,KAAK,CACb,4DAA4D,YAAY,gBAAgB,KAAK,CAAC,EAAE,IAAI,CACrG,CAAC;QACJ,CAAC;QACD,MAAM,aAAa,GAAG,gBAAgB,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACzD,IAAI,aAAa,KAAK,eAAe,EAAE,CAAC;YACtC,MAAM,IAAI,KAAK,CACb,kDAAkD,YAAY,gBAAgB,KAAK,CAAC,EAAE,IAAI,CAC3F,CAAC;QACJ,CAAC;IACH,CAAC;IAED,oDAAoD;IACpD,KAAK,MAAM,YAAY,IAAI,gBAAgB,CAAC,IAAI,EAAE,EAAE,CAAC;QACnD,IAAI,CAAC,kBAAkB,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;YAC1C,MAAM,IAAI,KAAK,CACb,sDAAsD,YAAY,wBAAwB,KAAK,CAAC,EAAE,IAAI,CACvG,CAAC;QACJ,CAAC;IACH,CAAC;AACH,CAAC"}
@@ -0,0 +1,322 @@
1
+ /**
2
+ * Managed-surface drift classification manifest.
3
+ *
4
+ * Single source of truth for assigning every GDH-managed render call site to
5
+ * one of three drift classes: `"deterministic"`, `"user-data"`, or
6
+ * `"project-native"`. Required by GOV-03 (.planning/REQUIREMENTS.md) and
7
+ * locked by Phase 70 decisions D-05, D-06, D-08, D-13..D-24 in
8
+ * .planning/phases/70-governance-and-managed-surface-drift-classification/70-CONTEXT.md.
9
+ *
10
+ * Consumers:
11
+ * - Migration registry (Phase 72)
12
+ * - Chain matrix (Phase 71)
13
+ * - Migration verifier (Phase 74)
14
+ * - Renderer-side load-time guards (Plan 70-05) via `assertClassRegistered`
15
+ * - `validate:docs` manifest-covers-renderers check (Plan 70-06)
16
+ *
17
+ * Out of classification scope per D-23: every path under `.gdh-state/` is
18
+ * machine-local state owned entirely by GDH; it is intentionally not a
19
+ * managed surface in the migration sense and is therefore absent from this
20
+ * manifest. The renderer `renderLocalPathHints` (which writes
21
+ * `.gdh-state/local-paths.json`) is the canonical example of an excluded
22
+ * surface.
23
+ *
24
+ * Three-class lock (D-24): the union below has exactly three members. No
25
+ * fourth class. No subclasses. Project-native surfaces declare a narrow op
26
+ * allowlist instead of a subclass.
27
+ */
28
+ export type GdhManagedSurfaceClass = "deterministic" | "user-data" | "project-native";
29
+ export interface GdhProjectNativeOpAllowlistEntry {
30
+ /** Stable op identifier referenced by registry entries (Phase 72). */
31
+ readonly op: string;
32
+ /** One-line human-readable description of what the op does. */
33
+ readonly summary: string;
34
+ }
35
+ export interface GdhManagedSurfaceClassEntry {
36
+ /**
37
+ * Stable surface identifier. Audit-time-frozen. No synonyms, no renames
38
+ * after audit — downstream consumers (registry, matrix, verifier) bind to
39
+ * these strings.
40
+ */
41
+ readonly surfaceId: string;
42
+ /**
43
+ * Workspace-relative output path of the surface, or `null` when the path
44
+ * varies (per-agent skills, per-target paths, multi-file surfaces).
45
+ */
46
+ readonly relativePath: string | null;
47
+ /** One of the three locked drift classes. */
48
+ readonly class: GdhManagedSurfaceClass;
49
+ /** Why this class — the audit decision rationale. */
50
+ readonly notes: string;
51
+ /**
52
+ * For project-native surfaces only — the narrow set of ops the
53
+ * migration registry may invoke against this surface. Anything outside the
54
+ * allowlist is rejected at audit-time. Adding an op requires both a
55
+ * manifest update AND a registry entry that declares it explicitly.
56
+ */
57
+ readonly projectNativeAllowlist?: readonly GdhProjectNativeOpAllowlistEntry[];
58
+ }
59
+ /**
60
+ * The classification manifest. Every render call site discovered during the
61
+ * Phase 70 audit appears here exactly once. The `as const satisfies` form
62
+ * preserves literal-string typing (downstream narrowing) while shape-checking
63
+ * each entry against `GdhManagedSurfaceClassEntry`.
64
+ */
65
+ export declare const GDH_MANAGED_SURFACE_CLASSES: readonly [{
66
+ readonly surfaceId: "skill.claude.onboard";
67
+ readonly relativePath: null;
68
+ readonly class: "deterministic";
69
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('claude', 'onboard', version). Per-target path: .claude/skills/gdh-onboard/SKILL.md.";
70
+ }, {
71
+ readonly surfaceId: "skill.claude.status";
72
+ readonly relativePath: null;
73
+ readonly class: "deterministic";
74
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('claude', 'status', version). Per-target path: .claude/skills/gdh-status/SKILL.md.";
75
+ }, {
76
+ readonly surfaceId: "skill.claude.scan";
77
+ readonly relativePath: null;
78
+ readonly class: "deterministic";
79
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('claude', 'scan', version). Per-target path: .claude/skills/gdh-scan/SKILL.md.";
80
+ }, {
81
+ readonly surfaceId: "skill.claude.migrate";
82
+ readonly relativePath: null;
83
+ readonly class: "deterministic";
84
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('claude', 'migrate', version). Per-target path: .claude/skills/gdh-migrate/SKILL.md.";
85
+ }, {
86
+ readonly surfaceId: "skill.claude.update";
87
+ readonly relativePath: null;
88
+ readonly class: "deterministic";
89
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('claude', 'update', version). Per-target path: .claude/skills/gdh-update/SKILL.md.";
90
+ }, {
91
+ readonly surfaceId: "skill.claude.check";
92
+ readonly relativePath: null;
93
+ readonly class: "deterministic";
94
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('claude', 'check', version). Per-target path: .claude/skills/gdh-check/SKILL.md.";
95
+ }, {
96
+ readonly surfaceId: "skill.claude.prepare";
97
+ readonly relativePath: null;
98
+ readonly class: "deterministic";
99
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('claude', 'prepare', version). Per-target path: .claude/skills/gdh-prepare/SKILL.md.";
100
+ }, {
101
+ readonly surfaceId: "skill.claude.run-game";
102
+ readonly relativePath: null;
103
+ readonly class: "deterministic";
104
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('claude', 'run-game', version). Per-target path: .claude/skills/gdh-run-game/SKILL.md.";
105
+ }, {
106
+ readonly surfaceId: "skill.codex.onboard";
107
+ readonly relativePath: null;
108
+ readonly class: "deterministic";
109
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('codex', 'onboard', version). Per-target path: .codex/skills/gdh-onboard/SKILL.md.";
110
+ }, {
111
+ readonly surfaceId: "skill.codex.status";
112
+ readonly relativePath: null;
113
+ readonly class: "deterministic";
114
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('codex', 'status', version). Per-target path: .codex/skills/gdh-status/SKILL.md.";
115
+ }, {
116
+ readonly surfaceId: "skill.codex.scan";
117
+ readonly relativePath: null;
118
+ readonly class: "deterministic";
119
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('codex', 'scan', version). Per-target path: .codex/skills/gdh-scan/SKILL.md.";
120
+ }, {
121
+ readonly surfaceId: "skill.codex.migrate";
122
+ readonly relativePath: null;
123
+ readonly class: "deterministic";
124
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('codex', 'migrate', version). Per-target path: .codex/skills/gdh-migrate/SKILL.md.";
125
+ }, {
126
+ readonly surfaceId: "skill.codex.update";
127
+ readonly relativePath: null;
128
+ readonly class: "deterministic";
129
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('codex', 'update', version). Per-target path: .codex/skills/gdh-update/SKILL.md.";
130
+ }, {
131
+ readonly surfaceId: "skill.codex.check";
132
+ readonly relativePath: null;
133
+ readonly class: "deterministic";
134
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('codex', 'check', version). Per-target path: .codex/skills/gdh-check/SKILL.md.";
135
+ }, {
136
+ readonly surfaceId: "skill.codex.prepare";
137
+ readonly relativePath: null;
138
+ readonly class: "deterministic";
139
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('codex', 'prepare', version). Per-target path: .codex/skills/gdh-prepare/SKILL.md.";
140
+ }, {
141
+ readonly surfaceId: "skill.codex.run-game";
142
+ readonly relativePath: null;
143
+ readonly class: "deterministic";
144
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('codex', 'run-game', version). Per-target path: .codex/skills/gdh-run-game/SKILL.md.";
145
+ }, {
146
+ readonly surfaceId: "skill.cursor.onboard";
147
+ readonly relativePath: null;
148
+ readonly class: "deterministic";
149
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('cursor', 'onboard', version). Per-target path: .cursor/skills/gdh-onboard/SKILL.md.";
150
+ }, {
151
+ readonly surfaceId: "skill.cursor.status";
152
+ readonly relativePath: null;
153
+ readonly class: "deterministic";
154
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('cursor', 'status', version). Per-target path: .cursor/skills/gdh-status/SKILL.md.";
155
+ }, {
156
+ readonly surfaceId: "skill.cursor.scan";
157
+ readonly relativePath: null;
158
+ readonly class: "deterministic";
159
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('cursor', 'scan', version). Per-target path: .cursor/skills/gdh-scan/SKILL.md.";
160
+ }, {
161
+ readonly surfaceId: "skill.cursor.migrate";
162
+ readonly relativePath: null;
163
+ readonly class: "deterministic";
164
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('cursor', 'migrate', version). Per-target path: .cursor/skills/gdh-migrate/SKILL.md.";
165
+ }, {
166
+ readonly surfaceId: "skill.cursor.update";
167
+ readonly relativePath: null;
168
+ readonly class: "deterministic";
169
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('cursor', 'update', version). Per-target path: .cursor/skills/gdh-update/SKILL.md.";
170
+ }, {
171
+ readonly surfaceId: "skill.cursor.check";
172
+ readonly relativePath: null;
173
+ readonly class: "deterministic";
174
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('cursor', 'check', version). Per-target path: .cursor/skills/gdh-check/SKILL.md.";
175
+ }, {
176
+ readonly surfaceId: "skill.cursor.prepare";
177
+ readonly relativePath: null;
178
+ readonly class: "deterministic";
179
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('cursor', 'prepare', version). Per-target path: .cursor/skills/gdh-prepare/SKILL.md.";
180
+ }, {
181
+ readonly surfaceId: "skill.cursor.run-game";
182
+ readonly relativePath: null;
183
+ readonly class: "deterministic";
184
+ readonly notes: "Generated agent skill rendered by renderGdhSkill('cursor', 'run-game', version). Per-target path: .cursor/skills/gdh-run-game/SKILL.md.";
185
+ }, {
186
+ readonly surfaceId: "cursor_rule";
187
+ readonly relativePath: ".cursor/rules/gdh-agent.mdc";
188
+ readonly class: "deterministic";
189
+ readonly notes: "Cursor rule file rendered by renderCursorRule() in packages/adapters/src/index.ts (line 555). Path constant CURSOR_RULE_RELATIVE_PATH (line 171) defines the workspace-relative location.";
190
+ }, {
191
+ readonly surfaceId: "claude_onboard_command";
192
+ readonly relativePath: null;
193
+ readonly class: "deterministic";
194
+ readonly notes: "Legacy Claude command shim rendered by renderClaudeOnboardCommand() (packages/adapters/src/index.ts line 573); delegates to renderClaudeOnboardSkill. Per-target path under .claude/commands/gdh/ (legacy command-file location, retained for backwards compatibility).";
195
+ }, {
196
+ readonly surfaceId: "claude_status_command";
197
+ readonly relativePath: null;
198
+ readonly class: "deterministic";
199
+ readonly notes: "Legacy Claude command shim rendered by renderClaudeStatusCommand() (packages/adapters/src/index.ts line 577); delegates to renderClaudeStatusSkill. Per-target path under .claude/commands/gdh/.";
200
+ }, {
201
+ readonly surfaceId: "claude_scan_command";
202
+ readonly relativePath: null;
203
+ readonly class: "deterministic";
204
+ readonly notes: "Legacy Claude command shim rendered by renderClaudeScanCommand() (packages/adapters/src/index.ts line 581); delegates to renderClaudeScanSkill. Per-target path under .claude/commands/gdh/.";
205
+ }, {
206
+ readonly surfaceId: "claude_migrate_command";
207
+ readonly relativePath: null;
208
+ readonly class: "deterministic";
209
+ readonly notes: "Legacy Claude command shim rendered by renderClaudeMigrateCommand() (packages/adapters/src/index.ts line 585); delegates to renderClaudeMigrateSkill. Per-target path under .claude/commands/gdh/.";
210
+ }, {
211
+ readonly surfaceId: "claude_update_command";
212
+ readonly relativePath: null;
213
+ readonly class: "deterministic";
214
+ readonly notes: "Legacy Claude command shim rendered by renderClaudeUpdateCommand() (packages/adapters/src/index.ts line 589); delegates to renderClaudeUpdateSkill. Per-target path under .claude/commands/gdh/.";
215
+ }, {
216
+ readonly surfaceId: "claude_check_command";
217
+ readonly relativePath: null;
218
+ readonly class: "deterministic";
219
+ readonly notes: "Legacy Claude command shim rendered by renderClaudeCheckCommand() (packages/adapters/src/index.ts line 593); delegates to renderClaudeCheckSkill. Per-target path under .claude/commands/gdh/.";
220
+ }, {
221
+ readonly surfaceId: "claude_prepare_command";
222
+ readonly relativePath: null;
223
+ readonly class: "deterministic";
224
+ readonly notes: "Legacy Claude command shim rendered by renderClaudePrepareCommand() (packages/adapters/src/index.ts line 597); delegates to renderClaudePrepareSkill. Per-target path under .claude/commands/gdh/.";
225
+ }, {
226
+ readonly surfaceId: "claude_run_game_command";
227
+ readonly relativePath: null;
228
+ readonly class: "deterministic";
229
+ readonly notes: "Legacy Claude command shim rendered by renderClaudeRunGameCommand() (packages/adapters/src/index.ts line 601); delegates to renderClaudeRunGameSkill. Per-target path under .claude/commands/gdh/.";
230
+ }, {
231
+ readonly surfaceId: "mcp_config_entry";
232
+ readonly relativePath: null;
233
+ readonly class: "deterministic";
234
+ readonly notes: "Managed `gdh` MCP server entry rendered by renderManagedMcpConfig() (packages/adapters/src/index.ts line 3061). Per D-21 the entry GDH owns by marker is deterministic; the surrounding user MCP config (.mcp.json or .cursor/mcp.json) is project-native and not classified — GDH only operates on the entry it owns.";
235
+ }, {
236
+ readonly surfaceId: "codex_project_mcp_section";
237
+ readonly relativePath: ".codex/config.toml";
238
+ readonly class: "deterministic";
239
+ readonly notes: "Managed `[mcp_servers.gdh]` section in .codex/config.toml rendered by renderManagedCodexProjectSection() (packages/adapters/src/index.ts line 3096) and stitched into the file via renderManagedCodexProjectConfig() (line 3106). Path constant CODEX_PROJECT_CONFIG_RELATIVE_PATH (line 231).";
240
+ }, {
241
+ readonly surfaceId: "codex_authoring_hook_block";
242
+ readonly relativePath: ".codex/config.toml";
243
+ readonly class: "deterministic";
244
+ readonly notes: "Managed `# BEGIN GDH managed authoring hooks` block in .codex/config.toml rendered by renderManagedCodexAuthoringHookBlock() (packages/adapters/src/index.ts line 3193). Marker-bounded; deterministic per D-22.";
245
+ }, {
246
+ readonly surfaceId: "authoring_hook";
247
+ readonly relativePath: null;
248
+ readonly class: "deterministic";
249
+ readonly notes: "Authoring validation hook rendered by renderGdhAuthoringHook() in packages/adapters/src/authoring-hook-render.ts (line 10). Per-agent paths: .claude/hooks/gdh-authoring-guard.js (CLAUDE_AUTHORING_HOOK_RELATIVE_PATH) and .codex/hooks/gdh-authoring-guard.js (CODEX_AUTHORING_HOOK_RELATIVE_PATH).";
250
+ }, {
251
+ readonly surfaceId: "claude_update_hook";
252
+ readonly relativePath: ".claude/hooks/gdh-check-update.js";
253
+ readonly class: "deterministic";
254
+ readonly notes: "Claude SessionStart parent hook rendered by renderClaudeCheckUpdateHook() in packages/adapters/src/claude-update-hook-render.ts. Path constant CLAUDE_CHECK_UPDATE_HOOK_RELATIVE_PATH.";
255
+ }, {
256
+ readonly surfaceId: "claude_update_worker";
257
+ readonly relativePath: ".claude/hooks/gdh-check-update-worker.js";
258
+ readonly class: "deterministic";
259
+ readonly notes: "Claude background update-check worker rendered by the renderer in packages/adapters/src/claude-update-worker-render.ts. Path constant CLAUDE_CHECK_UPDATE_WORKER_RELATIVE_PATH.";
260
+ }, {
261
+ readonly surfaceId: "claude_statusline";
262
+ readonly relativePath: ".claude/hooks/gdh-statusline.js";
263
+ readonly class: "deterministic";
264
+ readonly notes: "Optional Claude statusline script rendered by the renderer in packages/adapters/src/claude-statusline-render.ts. Path constant CLAUDE_STATUSLINE_RELATIVE_PATH. GDH bakes the file but does not auto-register it in .claude/settings.json (single-slot conflict); registration is opt-in.";
265
+ }, {
266
+ readonly surfaceId: "agents_md_managed_block";
267
+ readonly relativePath: "AGENTS.md";
268
+ readonly class: "deterministic";
269
+ readonly notes: "Managed BEGIN/END-marker block in AGENTS.md rendered by renderManagedAgentContractBlock() (packages/docs/src/agent-contract.ts line 24) and stitched in by upsertManagedAgentContract() (line 70). Path constant AGENT_CONTRACT_RELATIVE_PATH (line 12). Per D-18 the managed block specifically is deterministic; surrounding user content in AGENTS.md is project-native and not classified — GDH operates only on the marker-bounded region.";
270
+ }, {
271
+ readonly surfaceId: "guidance_unit_set";
272
+ readonly relativePath: null;
273
+ readonly class: "deterministic";
274
+ readonly notes: "Managed guidance unit files (multiple) under docs/agent/ rendered by createDefaultGuidanceUnits() in packages/docs/src/guidance.ts (line 27). Each unit is GDH-rendered with metadata + body; relativePath is null because the surface emits multiple files. Class deterministic per D-19 (Session 9 nested-monorepo migration is the canonical drift mode).";
275
+ }, {
276
+ readonly surfaceId: "guidance_index";
277
+ readonly relativePath: "docs/agent/README.md";
278
+ readonly class: "deterministic";
279
+ readonly notes: "Managed guidance index file rendered by createDefaultGuidanceIndex() in packages/docs/src/guidance.ts (line 391). Path constant GUIDANCE_INDEX_RELATIVE_PATH (line 19). Class deterministic per D-19.";
280
+ }, {
281
+ readonly surfaceId: "gdh_project_yaml";
282
+ readonly relativePath: ".gdh/project.yaml";
283
+ readonly class: "user-data";
284
+ readonly notes: "Schema is GDH-shape; field values (especially gdh_version pin) are user-installed truth. This file defines the schema being migrated and is the canonical source of 'current schema version' when computing the migration plan. Per D-14.";
285
+ }, {
286
+ readonly surfaceId: "gdh_rules_yaml";
287
+ readonly relativePath: ".gdh/rules.yaml";
288
+ readonly class: "user-data";
289
+ readonly notes: "Default boilerplate from a prior version is byte-equal-matched against registry-stored prior-version default and auto-migrated; non-byte-equal content is treated as user-customized and routes through the conflict policy. Per D-15.";
290
+ }, {
291
+ readonly surfaceId: "run_configuration_set";
292
+ readonly relativePath: null;
293
+ readonly class: "user-data";
294
+ readonly notes: "Multiple files under .gdh/run-configurations/ created via `gdh run-config`. User owns content; GDH owns shape; semantic schema changes route through subagent envelope. Per D-16.";
295
+ }, {
296
+ readonly surfaceId: "verification_scenario_set";
297
+ readonly relativePath: null;
298
+ readonly class: "user-data";
299
+ readonly notes: "Multiple files under .gdh/verification-scenarios/ created via `gdh verification-scenario`. User owns content; GDH owns shape; semantic schema changes route through subagent envelope. Per D-16.";
300
+ }, {
301
+ readonly surfaceId: "project_godot";
302
+ readonly relativePath: "project.godot";
303
+ readonly class: "project-native";
304
+ readonly notes: "Owned by the Godot project. Anything outside projectNativeAllowlist is rejected at audit-time. Adding an op requires a registry entry that declares it explicitly. Per D-17.";
305
+ readonly projectNativeAllowlist: readonly [{
306
+ readonly op: "edit_editor_plugins_array";
307
+ readonly summary: "Add or remove entries in the [editor_plugins] section.";
308
+ }, {
309
+ readonly op: "register_autoload";
310
+ readonly summary: "Register or unregister an autoload entry.";
311
+ }];
312
+ }];
313
+ /**
314
+ * Load-time guard used by renderer modules (Plan 70-05) to assert their
315
+ * surface is registered in the manifest under the expected class. Throws
316
+ * loudly on drift — module init aborts before any write can happen.
317
+ *
318
+ * Mirrors the throw-on-violation discipline of
319
+ * packages/core/src/release-span-update-contract.ts (lines 60-83).
320
+ */
321
+ export declare function assertClassRegistered(surfaceId: string, expectedClass: GdhManagedSurfaceClass): void;
322
+ //# sourceMappingURL=managed-surface-classes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"managed-surface-classes.d.ts","sourceRoot":"","sources":["../../src/migrations/managed-surface-classes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,MAAM,MAAM,sBAAsB,GAC9B,eAAe,GACf,WAAW,GACX,gBAAgB,CAAC;AAErB,MAAM,WAAW,gCAAgC;IAC/C,sEAAsE;IACtE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,+DAA+D;IAC/D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;;OAIG;IACH,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC;IAC3B;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,MAAM,GAAG,IAAI,CAAC;IACrC,6CAA6C;IAC7C,QAAQ,CAAC,KAAK,EAAE,sBAAsB,CAAC;IACvC,qDAAqD;IACrD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,QAAQ,CAAC,sBAAsB,CAAC,EAAE,SAAS,gCAAgC,EAAE,CAAC;CAC/E;AAED;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiYmB,CAAC;AAE5D;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,sBAAsB,GACpC,IAAI,CAcN"}