feat(#1049): phase 5d — drive artifactLayout from the runtime descriptor (retire the 128-LOC switch) (#1053)
resolveRuntimeArtifactLayout now builds Layout from
registry.runtimes[id].runtime.artifactLayout[scope] — a loop dispatching each
ArtifactKind through the SAME 5 builders (commandsKind/agentsKind/skillsKind/
convertedCommandsKind/kimiAgentsKind, unchanged) by (kind, converter, nesting) —
replacing the hardcoded switch(runtime). Equivalence-preserving for all 16 runtimes
× {global, local} (Codex-verified, no divergence). -43 LOC; bin/install.js + the
converters + the install loop untouched. getInstallExports()[converterName]
resolution, configDir threading, scope default, unknown-runtime guard all preserved.
Driving the local scope surfaced a 5a gap: the old switch had no scope branch for 13
runtimes (cursor/gemini/codex/copilot/antigravity/windsurf/augment/trae/qwen/hermes/
codebuddy/opencode/kilo) → local == global for them, but 5a authored local:[].
Backfilled local=global for those 13 (descriptor-faithful; a fall-through shim would
wrongly give cline/kimi local=global). claude/cline/kimi scope-gating untouched.
validateArtifactKindEntry tightened: destSubpath/prefix/nesting/converter required
(ConverterName enum still open — 5e). New 39-case deep-equal golden equivalence test.
Closes #1049
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -40,7 +40,16 @@ const capabilities = {
|
||||
"converter": "convertClaudeCommandToAntigravitySkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "nested",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToAntigravitySkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "settings-json",
|
||||
@@ -111,7 +120,24 @@ const capabilities = {
|
||||
"converter": "convertClaudeCommandToAugmentSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "commands",
|
||||
"destSubpath": "commands",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": null
|
||||
},
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "nested",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToAugmentSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "settings-json",
|
||||
@@ -243,7 +269,24 @@ const capabilities = {
|
||||
"converter": "convertClaudeCommandToCodebuddySkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "commands",
|
||||
"destSubpath": "commands",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToCodebuddyCommand"
|
||||
},
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToCodebuddySkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "settings-json",
|
||||
@@ -279,7 +322,16 @@ const capabilities = {
|
||||
"converter": "convertClaudeCommandToCodexSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToCodexSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "shell-var",
|
||||
"hooksSurface": "codex-hooks-json",
|
||||
@@ -316,7 +368,16 @@ const capabilities = {
|
||||
"converter": "convertClaudeCommandToCopilotSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToCopilotSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "copilot-inline",
|
||||
@@ -359,7 +420,24 @@ const capabilities = {
|
||||
"converter": "convertClaudeCommandToCursorCommand"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": true,
|
||||
"converter": "convertClaudeCommandToCursorSkill"
|
||||
},
|
||||
{
|
||||
"kind": "commands",
|
||||
"destSubpath": "commands",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToCursorCommand"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "cursor-hooks-json",
|
||||
@@ -395,7 +473,16 @@ const capabilities = {
|
||||
"converter": null
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "commands",
|
||||
"destSubpath": "commands/gsd",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "settings-json",
|
||||
@@ -461,7 +548,16 @@ const capabilities = {
|
||||
"converter": "convertClaudeCommandToClaudeSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills/gsd",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "nested",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToClaudeSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "settings-json",
|
||||
@@ -540,7 +636,24 @@ const capabilities = {
|
||||
"converter": "convertClaudeCommandToKiloSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "commands",
|
||||
"destSubpath": "command",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": null
|
||||
},
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": true,
|
||||
"converter": "convertClaudeCommandToKiloSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "none",
|
||||
@@ -633,7 +746,24 @@ const capabilities = {
|
||||
"converter": "convertClaudeCommandToOpencodeSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "commands",
|
||||
"destSubpath": "command",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": null
|
||||
},
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": true,
|
||||
"converter": "convertClaudeCommandToOpencodeSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "none",
|
||||
@@ -668,7 +798,16 @@ const capabilities = {
|
||||
"converter": "convertClaudeCommandToClaudeSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "nested",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToClaudeSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "settings-json",
|
||||
@@ -704,7 +843,16 @@ const capabilities = {
|
||||
"converter": "convertClaudeCommandToTraeSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "nested",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToTraeSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "none",
|
||||
@@ -825,7 +973,16 @@ const capabilities = {
|
||||
"converter": "convertClaudeCommandToWindsurfSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToWindsurfSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "none",
|
||||
@@ -1038,7 +1195,16 @@ const runtimes = {
|
||||
"converter": "convertClaudeCommandToAntigravitySkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "nested",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToAntigravitySkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "settings-json",
|
||||
@@ -1082,7 +1248,24 @@ const runtimes = {
|
||||
"converter": "convertClaudeCommandToAugmentSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "commands",
|
||||
"destSubpath": "commands",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": null
|
||||
},
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "nested",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToAugmentSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "settings-json",
|
||||
@@ -1214,7 +1397,24 @@ const runtimes = {
|
||||
"converter": "convertClaudeCommandToCodebuddySkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "commands",
|
||||
"destSubpath": "commands",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToCodebuddyCommand"
|
||||
},
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToCodebuddySkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "settings-json",
|
||||
@@ -1250,7 +1450,16 @@ const runtimes = {
|
||||
"converter": "convertClaudeCommandToCodexSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToCodexSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "shell-var",
|
||||
"hooksSurface": "codex-hooks-json",
|
||||
@@ -1287,7 +1496,16 @@ const runtimes = {
|
||||
"converter": "convertClaudeCommandToCopilotSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToCopilotSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "copilot-inline",
|
||||
@@ -1330,7 +1548,24 @@ const runtimes = {
|
||||
"converter": "convertClaudeCommandToCursorCommand"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": true,
|
||||
"converter": "convertClaudeCommandToCursorSkill"
|
||||
},
|
||||
{
|
||||
"kind": "commands",
|
||||
"destSubpath": "commands",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToCursorCommand"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "cursor-hooks-json",
|
||||
@@ -1366,7 +1601,16 @@ const runtimes = {
|
||||
"converter": null
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "commands",
|
||||
"destSubpath": "commands/gsd",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": null
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "settings-json",
|
||||
@@ -1402,7 +1646,16 @@ const runtimes = {
|
||||
"converter": "convertClaudeCommandToClaudeSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills/gsd",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "nested",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToClaudeSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "settings-json",
|
||||
@@ -1453,7 +1706,24 @@ const runtimes = {
|
||||
"converter": "convertClaudeCommandToKiloSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "commands",
|
||||
"destSubpath": "command",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": null
|
||||
},
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": true,
|
||||
"converter": "convertClaudeCommandToKiloSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "none",
|
||||
@@ -1546,7 +1816,24 @@ const runtimes = {
|
||||
"converter": "convertClaudeCommandToOpencodeSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "commands",
|
||||
"destSubpath": "command",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": null
|
||||
},
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": true,
|
||||
"converter": "convertClaudeCommandToOpencodeSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "none",
|
||||
@@ -1581,7 +1868,16 @@ const runtimes = {
|
||||
"converter": "convertClaudeCommandToClaudeSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "nested",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToClaudeSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "settings-json",
|
||||
@@ -1617,7 +1913,16 @@ const runtimes = {
|
||||
"converter": "convertClaudeCommandToTraeSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "nested",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToTraeSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "none",
|
||||
@@ -1653,7 +1958,16 @@ const runtimes = {
|
||||
"converter": "convertClaudeCommandToWindsurfSkill"
|
||||
}
|
||||
],
|
||||
"local": []
|
||||
"local": [
|
||||
{
|
||||
"kind": "skills",
|
||||
"destSubpath": "skills",
|
||||
"prefix": "gsd-",
|
||||
"nesting": "flat",
|
||||
"recursive": false,
|
||||
"converter": "convertClaudeCommandToWindsurfSkill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"commandStyle": "slash-hyphen",
|
||||
"hooksSurface": "none",
|
||||
|
||||
Reference in New Issue
Block a user