@skillcap/gdh 0.17.2 → 0.18.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/INSTALL-BUNDLE.json +1 -1
- package/RELEASE-SPAN-UPDATE-CONTRACTS.json +169 -0
- package/node_modules/@gdh/adapters/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/adapters/dist/index.js +76 -7
- package/node_modules/@gdh/adapters/dist/index.js.map +1 -1
- package/node_modules/@gdh/adapters/package.json +8 -8
- package/node_modules/@gdh/authoring/package.json +2 -2
- package/node_modules/@gdh/cli/package.json +10 -10
- package/node_modules/@gdh/core/dist/index.d.ts +4 -4
- package/node_modules/@gdh/core/dist/index.d.ts.map +1 -1
- package/node_modules/@gdh/core/dist/index.js +4 -4
- package/node_modules/@gdh/core/dist/index.js.map +1 -1
- package/node_modules/@gdh/core/package.json +1 -1
- package/node_modules/@gdh/docs/dist/agent-contract.d.ts.map +1 -1
- package/node_modules/@gdh/docs/dist/agent-contract.js +1 -0
- package/node_modules/@gdh/docs/dist/agent-contract.js.map +1 -1
- package/node_modules/@gdh/docs/dist/guidance.d.ts.map +1 -1
- package/node_modules/@gdh/docs/dist/guidance.js +2 -0
- package/node_modules/@gdh/docs/dist/guidance.js.map +1 -1
- package/node_modules/@gdh/docs/package.json +2 -2
- package/node_modules/@gdh/mcp/package.json +8 -8
- package/node_modules/@gdh/observability/package.json +2 -2
- package/node_modules/@gdh/runtime/dist/bridge-surface.js +66 -17
- package/node_modules/@gdh/runtime/dist/bridge-surface.js.map +1 -1
- package/node_modules/@gdh/runtime/package.json +2 -2
- package/node_modules/@gdh/scan/package.json +3 -3
- package/node_modules/@gdh/verify/package.json +7 -7
- package/package.json +11 -11
package/INSTALL-BUNDLE.json
CHANGED
|
@@ -1471,6 +1471,175 @@
|
|
|
1471
1471
|
}
|
|
1472
1472
|
]
|
|
1473
1473
|
}
|
|
1474
|
+
},
|
|
1475
|
+
{
|
|
1476
|
+
"version": "0.18.0",
|
|
1477
|
+
"releaseTag": "v0.18.0",
|
|
1478
|
+
"migrationStatus": "required",
|
|
1479
|
+
"summary": "v0.18.0 adds current-scene, whole-tree, and arbitrary-subtree runtime bridge discovery, refreshes managed bridge guidance and agent entrypoints, and refactors generated bridge internals to native Godot APIs. The release changes GDH_AGENT_CONTRACT_VERSION (1 -> 2), GDH_GUIDANCE_UNIT_VERSION (7 -> 8), GDH_CURSOR_RULE_VERSION (1 -> 2), and GDH_RUNTIME_BRIDGE_SURFACE_VERSION (7 -> 10), so managed targets need adapter/guidance migration and bridge repair before they are treated as current.",
|
|
1480
|
+
"releaseHighlights": {
|
|
1481
|
+
"summary": "v0.18.0 improves runtime bridge discoverability for agents and tightens managed agent entrypoints. Agents can now ask the bridge for the current scene, search from the whole SceneTree, or search from an arbitrary node path when the target is outside the active scene. Managed guidance and Cursor/AGENTS entrypoints now point agents directly at the bridge usage guidance, and the generated bridge uses native Godot APIs for node search, inheritance-aware type checks, and indexed property reads.",
|
|
1482
|
+
"operatorChanges": [
|
|
1483
|
+
"**Runtime bridge node discovery is broader and clearer.** `scene.current.get` returns the current scene snapshot, `scene.tree.nodes.find` searches from `SceneTree.root`, and `scene.node.nodes.find` searches below one `rootNodePath`.",
|
|
1484
|
+
"**Existing active-scene search stays stable.** `scene.nodes.find` remains the active-scene scoped query for ordinary scene-local discovery.",
|
|
1485
|
+
"**Bridge guidance is easier to find.** Managed `AGENTS.md` and Cursor rule surfaces now direct agents to `docs/agent/authoring-and-validation.md` for runtime bridge usage.",
|
|
1486
|
+
"**Generated runtime guidance names the discovery boundary.** Agents are told when to use active-scene search, whole-tree search, or bounded arbitrary-subtree search.",
|
|
1487
|
+
"**Bridge internals now lean on native Godot APIs.** Generated bridge code uses `Node.find_children`, `Object.is_class`, GDScript property membership, and `Object.get_indexed` instead of manual tree walking, exact class-string matching, property-list scans, and flat property reads.",
|
|
1488
|
+
"**Maintainer release/publish skills are namespaced.** GDH repo maintainer-only adapters use the `gdh-dev-*` / `/gdh-dev:*` namespace to reduce confusion with target-project GDH skills."
|
|
1489
|
+
]
|
|
1490
|
+
},
|
|
1491
|
+
"updateContract": {
|
|
1492
|
+
"summary": "Managed targets need release-specific migration for v0.18.0 because agent contract, Cursor rule, guidance, and runtime bridge surfaces changed. Agents should inspect status, rebake adapter surfaces when drift is reported, migrate guidance, repair the runtime bridge when drift is active, complete plugin/autoload follow-through when required, and validate the target lifecycle.",
|
|
1493
|
+
"steps": [
|
|
1494
|
+
{
|
|
1495
|
+
"id": "verify_post_update_status",
|
|
1496
|
+
"kind": "mechanical",
|
|
1497
|
+
"summary": "Run the standard post-update lifecycle check.",
|
|
1498
|
+
"detail": "Start with `gdh status` so GDH can report whether the target needs guidance migration, adapter repair, runtime bridge repair, or plugin/autoload follow-through for v0.18.0.",
|
|
1499
|
+
"commands": [
|
|
1500
|
+
"gdh status"
|
|
1501
|
+
],
|
|
1502
|
+
"validationCommands": [
|
|
1503
|
+
"gdh status"
|
|
1504
|
+
]
|
|
1505
|
+
},
|
|
1506
|
+
{
|
|
1507
|
+
"id": "rebake_agent_adapters",
|
|
1508
|
+
"kind": "mechanical",
|
|
1509
|
+
"summary": "Re-bake supported-agent entrypoint surfaces when drift is active.",
|
|
1510
|
+
"detail": "When GDH reports adapter drift, run `gdh adapters install <target>` so managed AGENTS.md and Cursor rule surfaces carry the runtime bridge guidance pointer at the current surface versions.",
|
|
1511
|
+
"commands": [
|
|
1512
|
+
"gdh adapters install <target>"
|
|
1513
|
+
],
|
|
1514
|
+
"validationCommands": [
|
|
1515
|
+
"gdh adapters status <target>",
|
|
1516
|
+
"gdh verify drift <target>"
|
|
1517
|
+
]
|
|
1518
|
+
},
|
|
1519
|
+
{
|
|
1520
|
+
"id": "apply_guidance_migration",
|
|
1521
|
+
"kind": "mechanical",
|
|
1522
|
+
"summary": "Apply managed guidance migration.",
|
|
1523
|
+
"detail": "When `gdh status` or `gdh migrate` reports guidance migration work, run `gdh migrate --apply` to refresh guidance units with current-scene, whole-tree, and arbitrary-subtree bridge discovery instructions.",
|
|
1524
|
+
"commands": [
|
|
1525
|
+
"gdh migrate --apply"
|
|
1526
|
+
],
|
|
1527
|
+
"validationCommands": [
|
|
1528
|
+
"gdh guidance status",
|
|
1529
|
+
"gdh status"
|
|
1530
|
+
]
|
|
1531
|
+
},
|
|
1532
|
+
{
|
|
1533
|
+
"id": "inspect_bridge_repair_branch",
|
|
1534
|
+
"kind": "agent_reasoning",
|
|
1535
|
+
"summary": "Decide whether runtime bridge repair is active for this target.",
|
|
1536
|
+
"detail": "If lifecycle output surfaces runtime-bridge reasons, inspect `gdh bridge status` and treat the surfaced terminal commands as release-specific follow-up. If no runtime-bridge reasons appear, no release-specific bridge repair is needed.",
|
|
1537
|
+
"commands": [
|
|
1538
|
+
"gdh bridge status"
|
|
1539
|
+
],
|
|
1540
|
+
"validationCommands": [
|
|
1541
|
+
"gdh status"
|
|
1542
|
+
]
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
"id": "repair_runtime_bridge_surface",
|
|
1546
|
+
"kind": "mechanical",
|
|
1547
|
+
"summary": "Repair managed runtime bridge files when drift is active.",
|
|
1548
|
+
"detail": "Bridge-enabled targets on older runtime bridge surfaces drift until they are repaired to runtime bridge surface version 10. Run `gdh bridge repair` to rewrite the managed bridge addon with `scene.current.get`, whole-tree node search, arbitrary-subtree node search, and native Godot API internals.",
|
|
1549
|
+
"commands": [
|
|
1550
|
+
"gdh bridge repair"
|
|
1551
|
+
],
|
|
1552
|
+
"validationCommands": [
|
|
1553
|
+
"gdh bridge status"
|
|
1554
|
+
]
|
|
1555
|
+
},
|
|
1556
|
+
{
|
|
1557
|
+
"id": "enable_plugin_and_finish_gdhbridge_registration",
|
|
1558
|
+
"kind": "manual_review",
|
|
1559
|
+
"summary": "Enable the GDH Runtime Bridge plugin so GDHBridge registers when required.",
|
|
1560
|
+
"detail": "GDH does not hand-edit `project.godot` for operators. After bridge repair, if bridge status still reports plugin/autoload follow-through, open the project in the Godot editor and enable the `GDH Runtime Bridge` plugin so it can register `GDHBridge`.",
|
|
1561
|
+
"commands": [],
|
|
1562
|
+
"validationCommands": [
|
|
1563
|
+
"gdh bridge status",
|
|
1564
|
+
"gdh status"
|
|
1565
|
+
]
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
"id": "validate_repaired_lifecycle",
|
|
1569
|
+
"kind": "mechanical",
|
|
1570
|
+
"summary": "Validate guidance, adapter, bridge, and project lifecycle after migration.",
|
|
1571
|
+
"detail": "After migration, adapter rebake, bridge repair, and any plugin follow-through, rerun `gdh guidance status`, `gdh adapters status`, `gdh bridge status`, and `gdh status`. The target should return to the current lifecycle state for the refreshed surfaces.",
|
|
1572
|
+
"commands": [
|
|
1573
|
+
"gdh guidance status",
|
|
1574
|
+
"gdh adapters status <target>",
|
|
1575
|
+
"gdh bridge status",
|
|
1576
|
+
"gdh status"
|
|
1577
|
+
],
|
|
1578
|
+
"validationCommands": [
|
|
1579
|
+
"gdh guidance status",
|
|
1580
|
+
"gdh adapters status <target>",
|
|
1581
|
+
"gdh bridge status",
|
|
1582
|
+
"gdh status"
|
|
1583
|
+
]
|
|
1584
|
+
}
|
|
1585
|
+
]
|
|
1586
|
+
}
|
|
1587
|
+
},
|
|
1588
|
+
{
|
|
1589
|
+
"version": "0.18.1",
|
|
1590
|
+
"releaseTag": "v0.18.1",
|
|
1591
|
+
"migrationStatus": "no_op",
|
|
1592
|
+
"summary": "v0.18.1 closes Session 8 (TheBeacon 2026-04-25) dogfooding regressions on the upgrade path without changing managed project schema or lifecycle surface versions. Existing targets do not need release-scoped schema migration; the ordinary `gdh migrate --apply` flow now cleans up stale managed `.codex/skills/<skill>/SKILL.md` files and auto-refreshes default-content `.gdh/rules.yaml` whose schema-version header is behind.",
|
|
1593
|
+
"releaseHighlights": {
|
|
1594
|
+
"summary": "v0.18.1 closes Session 8 (TheBeacon 2026-04-25) dogfooding regressions on the upgrade path: stale managed `.codex/skills/<skill>/SKILL.md` files now get cleaned up during migrate regardless of which prior GDH version rendered them, and a `.gdh/rules.yaml` that still carries a prior-version header but matches the current default boilerplate now refreshes automatically through `gdh migrate --apply` instead of blocking behind `manual_review_required`. Real customizations still gate on manual review and now ship actionable `manualSteps` that steer agents away from `/gdh-update` (which only changes the installed GDH version, not the on-disk schema marker).",
|
|
1595
|
+
"operatorChanges": [
|
|
1596
|
+
"**Stale legacy `.codex/skills/<skill>/SKILL.md` files are removed during migrate.** `gdh migrate --apply` now detects managed legacy Codex skills by the `<codex_skill_adapter>` marker every render embeds, so stale-version managed files (e.g. a `.codex/skills/gdh-migrate/SKILL.md` still pinning `0.16.0` after the target moved to `0.18.x`) get cleaned up. User-authored content accidentally placed at a legacy path is preserved.",
|
|
1597
|
+
"**Default-content `.gdh/rules.yaml` upgrades automatically.** When the on-disk rules file is the verbatim default boilerplate (no project-specific edits) but its schema-version header is behind, the lifecycle inspector now reports `state: migration_needed` with `autoApplicable: true`, so `gdh migrate --apply` refreshes it in-place. Targets no longer need to hand-edit a file they never customized.",
|
|
1598
|
+
"**Customized `.gdh/rules.yaml` keeps the manual-review gate, with clearer next steps.** When the rules body really did diverge from the current default, the `manual_review` action now ships explicit `manualSteps` describing the safe options (bump the version header or port custom rules into a fresh file, then rerun `gdh migrate --apply`) and explicitly tells the agent NOT to use `/gdh-update`, which only changes the installed GDH version and cannot edit the on-disk schema marker."
|
|
1599
|
+
]
|
|
1600
|
+
},
|
|
1601
|
+
"updateContract": {
|
|
1602
|
+
"summary": "No release-scoped managed schema migration is required for v0.18.1. After self-update, running `gdh migrate --apply` on existing targets is enough: it now cleans up stale managed `.codex/skills/<skill>/SKILL.md` files regardless of their pinned-version string, and it auto-refreshes default-content `.gdh/rules.yaml` whose schema-version header is behind. Customized rules files remain on the manual-review path, with clearer `manualSteps` and an explicit anti-recommendation against `/gdh-update`.",
|
|
1603
|
+
"steps": [
|
|
1604
|
+
{
|
|
1605
|
+
"id": "rerun_migrate_for_legacy_codex_cleanup",
|
|
1606
|
+
"kind": "mechanical",
|
|
1607
|
+
"summary": "Run `gdh migrate --apply` to clean up stale managed `.codex/skills/<skill>/SKILL.md` files left over from older GDH onboarding.",
|
|
1608
|
+
"detail": "The pre-fix cleanup planner only deleted legacy files whose body was byte-equal to the current pinned GDH render, so stale-version content survived migration indefinitely. v0.18.1 detects managed legacy files by the `<codex_skill_adapter>` marker that every Codex skill render embeds and removes them. User-authored content at a legacy path without that marker is preserved.",
|
|
1609
|
+
"commands": [
|
|
1610
|
+
"gdh migrate --apply"
|
|
1611
|
+
],
|
|
1612
|
+
"validationCommands": [
|
|
1613
|
+
"gdh adapters status <target>",
|
|
1614
|
+
"gdh status <target>"
|
|
1615
|
+
]
|
|
1616
|
+
},
|
|
1617
|
+
{
|
|
1618
|
+
"id": "rerun_migrate_for_default_rules_refresh",
|
|
1619
|
+
"kind": "mechanical",
|
|
1620
|
+
"summary": "Run `gdh migrate --apply` to auto-refresh `.gdh/rules.yaml` when its body is the prior-version default boilerplate.",
|
|
1621
|
+
"detail": "The `rules_schema` lifecycle inspector now structurally compares the on-disk file (parsed back through `readRulesDocument`, which version-normalizes the header) against the current default boilerplate. A match becomes `state: migration_needed, autoApplicable: true` so migrate refreshes the file in place. Customized content stays on the manual-review path.",
|
|
1622
|
+
"commands": [
|
|
1623
|
+
"gdh migrate --apply"
|
|
1624
|
+
],
|
|
1625
|
+
"validationCommands": [
|
|
1626
|
+
"gdh status <target>"
|
|
1627
|
+
]
|
|
1628
|
+
},
|
|
1629
|
+
{
|
|
1630
|
+
"id": "follow_manual_steps_for_customized_rules",
|
|
1631
|
+
"kind": "agent_reasoning",
|
|
1632
|
+
"summary": "When the rules surface stays on `manual_review_required`, follow the new `manualSteps`; do NOT use `/gdh-update`.",
|
|
1633
|
+
"detail": "If `gdh migrate --apply` reports `terminal.state: manual_review_required` for the rules surface, the on-disk `.gdh/rules.yaml` is treated as customized. The new `manualSteps` walk the agent through inspecting the file, bumping the schema marker to the current `GDH_RULES_SCHEMA_VERSION` (or porting custom rules into a fresh file), then rerunning `gdh migrate --apply`. `/gdh-update` only changes the installed GDH version; it cannot edit the on-disk schema marker and will not resolve `rules_version_unrecognized`.",
|
|
1634
|
+
"commands": [
|
|
1635
|
+
"gdh migrate --apply"
|
|
1636
|
+
],
|
|
1637
|
+
"validationCommands": [
|
|
1638
|
+
"gdh status <target>"
|
|
1639
|
+
]
|
|
1640
|
+
}
|
|
1641
|
+
]
|
|
1642
|
+
}
|
|
1474
1643
|
}
|
|
1475
1644
|
]
|
|
1476
1645
|
}
|
|
@@ -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,
|
|
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,EACtB,KAAK,iBAAiB,EAIvB,MAAM,WAAW,CAAC;AA8BnB,eAAO,MAAM,eAAe,wCAc1B,CAAC;AAEH,eAAO,MAAM,gBAAgB,wCAIoB,CAAC;AAClD,eAAO,MAAM,yBAAyB,cAAc,CAAC;AACrD,eAAO,MAAM,oCAAoC,oCAAoC,CAAC;AACtF,eAAO,MAAM,yBAAyB,cAAc,CAAC;AACrD,eAAO,MAAM,wBAAwB,qBAAqB,CAAC;AAC3D,eAAO,MAAM,yBAAyB,gCAAgC,CAAC;AACvE,eAAO,MAAM,kCAAkC,wCAAwC,CAAC;AACxF,eAAO,MAAM,iCAAiC,wCAAwC,CAAC;AACvF,eAAO,MAAM,mCAAmC,mCAAmC,CAAC;AACpF,eAAO,MAAM,oCAAoC,oCAAoC,CAAC;AACtF,eAAO,MAAM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e,EAAE,MAAM,GAAG,IAAI,EAC9B,aAAa,EAAE,MAAM,GACpB,MAAM,CA+BR;AAqpCD,iBAAS,sCAAsC,CAC7C,UAAU,EAAE,MAAM,EAClB,QAAQ,EAAE,SAAS,gCAAgC,EAAE,GACpD,sCAAsC,CAmCxC;AAiPD,OAAO,EAAE,+BAA+B,EAAE,MAAM,+BAA+B,CAAC;AAChF,OAAO,EAAE,sCAAsC,EAAE,MAAM,gCAAgC,CAAC;AACxF,OAAO,EACL,KAAK,sBAAsB,EAC3B,gBAAgB,GACjB,MAAM,4BAA4B,CAAC;AAMpC,OAAO,EAAE,sCAAsC,EAAE,CAAC"}
|
|
@@ -6,7 +6,7 @@ import path from "node:path";
|
|
|
6
6
|
import { promisify } from "node:util";
|
|
7
7
|
import { readProjectConfig, readWorktreeState, resolveAuthoringStatus, resolvePinnedVersion, resolvePinnedVersionOrNull, resolveProjectRoot, } from "@gdh/authoring";
|
|
8
8
|
import { 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";
|
|
9
|
-
import { createDefaultGuidanceUnits, getGuidanceStatus, resolveGuidanceQuery, resolveRecoveryHints, } from "@gdh/docs";
|
|
9
|
+
import { createDefaultGuidanceUnits, createDefaultRulesDocument, getGuidanceStatus, readRulesDocument, renderRulesYaml, resolveGuidanceQuery, resolveRecoveryHints, } from "@gdh/docs";
|
|
10
10
|
import { inspectGuidanceAudit } from "@gdh/observability";
|
|
11
11
|
import { inspectRuntimeBridgeSurface, inspectRuntimeKnowledgeSurface } from "@gdh/runtime";
|
|
12
12
|
import { readInventoryCacheOrScan } from "@gdh/scan";
|
|
@@ -230,7 +230,7 @@ export async function inspectProjectLifecycleCompatibility(targetPath) {
|
|
|
230
230
|
await inspectProjectConfigLifecycleSurface(resolvedTargetPath),
|
|
231
231
|
await inspectRunConfigurationLifecycleSurface(resolvedTargetPath),
|
|
232
232
|
await inspectVerificationScenarioLifecycleSurface(resolvedTargetPath),
|
|
233
|
-
await inspectRulesLifecycleSurface(resolvedTargetPath),
|
|
233
|
+
await inspectRulesLifecycleSurface(resolvedTargetPath, projectConfig),
|
|
234
234
|
inspectAgentContractLifecycleSurface(resolvedTargetPath, guidanceStatus),
|
|
235
235
|
await inspectGuidanceIndexLifecycleSurface(resolvedTargetPath),
|
|
236
236
|
await inspectGuidanceUnitLifecycleSurface(resolvedTargetPath, projectConfig),
|
|
@@ -345,6 +345,7 @@ export function renderCursorRule() {
|
|
|
345
345
|
"",
|
|
346
346
|
"This repository uses GDH.",
|
|
347
347
|
"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.",
|
|
348
|
+
"For runtime bridge usage, load [docs/agent/authoring-and-validation.md](../../docs/agent/authoring-and-validation.md) and follow its runtime bridge section.",
|
|
348
349
|
"Do not duplicate or override the canonical GDH guidance chain here.",
|
|
349
350
|
"",
|
|
350
351
|
].join("\n");
|
|
@@ -2215,14 +2216,30 @@ function planCodexRepoInstallActions(targetPath, adapter, pinnedVersion, project
|
|
|
2215
2216
|
actions.push(...planLegacyCodexSkillCleanupActions(targetPath, pinnedVersion));
|
|
2216
2217
|
return actions;
|
|
2217
2218
|
}
|
|
2218
|
-
|
|
2219
|
+
// The signature embedded in every codex skill render body via the
|
|
2220
|
+
// `<codex_skill_adapter>` block. Detecting this marker lets the legacy
|
|
2221
|
+
// cleanup recognize a managed file regardless of which prior GDH version
|
|
2222
|
+
// rendered it, so stale-version skills at `.codex/skills/...` get removed
|
|
2223
|
+
// during migrate even when their pinned-npx string no longer matches the
|
|
2224
|
+
// current `pinnedVersion` (D-22 fix; see Session 7 dogfooding follow-up).
|
|
2225
|
+
const CODEX_MANAGED_SKILL_MARKER = "<codex_skill_adapter>";
|
|
2226
|
+
function isManagedLegacyCodexSkillContent(content) {
|
|
2227
|
+
return content.includes(CODEX_MANAGED_SKILL_MARKER);
|
|
2228
|
+
}
|
|
2229
|
+
function planLegacyCodexSkillCleanupActions(targetPath, _pinnedVersion) {
|
|
2219
2230
|
const actions = [];
|
|
2220
|
-
for (const [relativePath,
|
|
2231
|
+
for (const [relativePath, _renderFn, skillName] of LEGACY_CODEX_SKILL_RELATIVE_PATHS) {
|
|
2221
2232
|
const absolutePath = path.join(targetPath, relativePath);
|
|
2222
2233
|
const content = fsSync.existsSync(absolutePath)
|
|
2223
2234
|
? fsSync.readFileSync(absolutePath, "utf8")
|
|
2224
2235
|
: null;
|
|
2225
|
-
if (content === null
|
|
2236
|
+
if (content === null) {
|
|
2237
|
+
continue;
|
|
2238
|
+
}
|
|
2239
|
+
// Preserve any non-managed file a user may have intentionally placed at
|
|
2240
|
+
// the legacy path. Only remove files we recognize as previously managed
|
|
2241
|
+
// GDH skill renders (any version), not arbitrary user content.
|
|
2242
|
+
if (!isManagedLegacyCodexSkillContent(content)) {
|
|
2226
2243
|
continue;
|
|
2227
2244
|
}
|
|
2228
2245
|
actions.push(createInstallAction({
|
|
@@ -2853,7 +2870,7 @@ async function inspectVerificationScenarioLifecycleSurface(targetPath) {
|
|
|
2853
2870
|
migrationSummary: "Verification scenarios use a legacy directory or older schema and can be normalized through the migration flow.",
|
|
2854
2871
|
});
|
|
2855
2872
|
}
|
|
2856
|
-
async function inspectRulesLifecycleSurface(targetPath) {
|
|
2873
|
+
async function inspectRulesLifecycleSurface(targetPath, projectConfig) {
|
|
2857
2874
|
const relativePath = ".gdh/rules.yaml";
|
|
2858
2875
|
const content = await fs.readFile(path.join(targetPath, relativePath), "utf8").catch(() => null);
|
|
2859
2876
|
const detectedVersion = readYamlVersionHeader(content);
|
|
@@ -2893,11 +2910,42 @@ async function inspectRulesLifecycleSurface(targetPath) {
|
|
|
2893
2910
|
action: null,
|
|
2894
2911
|
});
|
|
2895
2912
|
}
|
|
2913
|
+
// Detect whether the on-disk file is just a prior-version copy of the
|
|
2914
|
+
// default boilerplate (no project-specific customizations). When that's
|
|
2915
|
+
// true the file is safe to overwrite with the current default during
|
|
2916
|
+
// migrate, so surface it as `migration_needed` + auto-applicable rather
|
|
2917
|
+
// than blocking on manual review. This closes Session 8 (TheBeacon
|
|
2918
|
+
// 2026-04-25): a fresh-installed target's `.gdh/rules.yaml` is the
|
|
2919
|
+
// verbatim default boilerplate, but a rules-schema bump (v1 -> v2) made
|
|
2920
|
+
// the surface gate apply behind a `manual_review_required` terminal,
|
|
2921
|
+
// forcing every dogfood target to hand-edit a file the user never
|
|
2922
|
+
// touched. See `docs/development/dogfooding.md` Session 8.
|
|
2923
|
+
if (await isDefaultRulesBoilerplate(targetPath, projectConfig)) {
|
|
2924
|
+
return createLifecycleSurfaceStatus({
|
|
2925
|
+
surface: "rules_schema",
|
|
2926
|
+
management: "project_owned",
|
|
2927
|
+
state: "migration_needed",
|
|
2928
|
+
summary: "Rules file is a prior-version default boilerplate and can be safely refreshed to the current schema.",
|
|
2929
|
+
reasons: ["rules_version_behind"],
|
|
2930
|
+
probes,
|
|
2931
|
+
action: {
|
|
2932
|
+
kind: "apply_migration",
|
|
2933
|
+
summary: "Run GDH migrate to refresh .gdh/rules.yaml from the prior-version default to the current schema. No project-specific rule edits will be lost.",
|
|
2934
|
+
command: migrateApplyCommand(targetPath),
|
|
2935
|
+
autoApplicable: true,
|
|
2936
|
+
},
|
|
2937
|
+
});
|
|
2938
|
+
}
|
|
2939
|
+
// File exists, version does not match, and content is not recognizable
|
|
2940
|
+
// default boilerplate. Treat as a real customization that GDH must not
|
|
2941
|
+
// silently overwrite. Steer the agent to either bump the version header
|
|
2942
|
+
// or delete-and-remigrate, NOT to `gdh-update` (which only changes the
|
|
2943
|
+
// GDH version, not the on-disk schema marker).
|
|
2896
2944
|
return createLifecycleSurfaceStatus({
|
|
2897
2945
|
surface: "rules_schema",
|
|
2898
2946
|
management: "project_owned",
|
|
2899
2947
|
state: "compatibility_degraded",
|
|
2900
|
-
summary: "Rules file
|
|
2948
|
+
summary: "Rules file appears customized and its schema version differs from this GDH build, so GDH cannot refresh it automatically.",
|
|
2901
2949
|
reasons: ["rules_version_unrecognized"],
|
|
2902
2950
|
probes,
|
|
2903
2951
|
action: {
|
|
@@ -2905,9 +2953,30 @@ async function inspectRulesLifecycleSurface(targetPath) {
|
|
|
2905
2953
|
summary: "Inspect .gdh/rules.yaml manually before overwriting project-specific rule content.",
|
|
2906
2954
|
command: ["gdh", "migrate", targetPath],
|
|
2907
2955
|
autoApplicable: false,
|
|
2956
|
+
manualSteps: [
|
|
2957
|
+
`Open .gdh/rules.yaml and confirm whether project-specific rules were added beyond the default GDH boilerplate.`,
|
|
2958
|
+
`If the file holds only default boilerplate, bump its first line to \`version: ${GDH_RULES_SCHEMA_VERSION}\` (or delete the file) and rerun \`gdh migrate --apply\` so GDH can refresh it.`,
|
|
2959
|
+
`If the file holds custom rules, port those rules into a fresh \`.gdh/rules.yaml\` whose first line is \`version: ${GDH_RULES_SCHEMA_VERSION}\`, then rerun \`gdh migrate --apply\`.`,
|
|
2960
|
+
`Do NOT use \`/gdh-update\` to resolve this surface: that command only changes the installed GDH version and will not edit the rules schema marker on disk.`,
|
|
2961
|
+
],
|
|
2908
2962
|
},
|
|
2909
2963
|
});
|
|
2910
2964
|
}
|
|
2965
|
+
async function isDefaultRulesBoilerplate(targetPath, projectConfig) {
|
|
2966
|
+
const onDisk = await readRulesDocument(targetPath);
|
|
2967
|
+
if (onDisk === null) {
|
|
2968
|
+
return false;
|
|
2969
|
+
}
|
|
2970
|
+
// `readRulesDocument` always coerces `schemaVersion` to the current
|
|
2971
|
+
// `GDH_RULES_SCHEMA_VERSION` regardless of the file's on-disk version
|
|
2972
|
+
// header (see `coerceRulesDocument` in @gdh/docs). That means the
|
|
2973
|
+
// structural compare below is version-marker-insensitive: it answers
|
|
2974
|
+
// "does the body match the current GDH default?", which is exactly the
|
|
2975
|
+
// signal needed to decide whether overwriting the file is safe.
|
|
2976
|
+
const expected = renderRulesYaml(createDefaultRulesDocument(projectConfig));
|
|
2977
|
+
const actual = renderRulesYaml(onDisk);
|
|
2978
|
+
return actual === expected;
|
|
2979
|
+
}
|
|
2911
2980
|
function inspectAgentContractLifecycleSurface(targetPath, guidanceStatus) {
|
|
2912
2981
|
const status = guidanceStatus.agentContract;
|
|
2913
2982
|
const probes = [
|