fix(#1858): detect flat commands/gsd-<stem>.md layout in _resolveManifest
_resolveManifest only recognized the nested source layout (commands/gsd/*.md) and the installed-runtime skills layout (skills/gsd-<stem>/SKILL.md). A flat source install (Claude local project shape: commands/gsd-<stem>.md, no commands/gsd/ subdir) matched neither branch, so the manifest came back empty and resolveSurface materialized the full profile to an empty Set — silently reporting every skill-bearing capability as surfaced:false / enabled:false / active:false. The nyquist/code-review/security/ui verify:post and execute:post hooks never fired even with their workflow.* toggles on. Add a third branch: when commandsGsdDir is absent, scan dirname(commandsGsdDir) for gsd-<stem>.md files, strip the gsd- prefix, and build the same Map shape the nested loader produces (requires via shared parseRequires, companion _calls_agents_<stem> via shared parseCallsAgents). Falls through to the installed-skills branch when the flat dir has no gsd-*.md files (precedence: nested > flat-source > installed). Also export parseCallsAgents from install-profiles so capability-state reuses the SAME parser the nested loader uses (no drift; mirrors the existing parseRequires export+reuse pattern).
This commit is contained in:
@@ -875,6 +875,7 @@ export = {
|
||||
writeActiveProfile,
|
||||
// Shared internals
|
||||
parseRequires,
|
||||
parseCallsAgents,
|
||||
cleanupStagedSkills,
|
||||
// Back-compat / deprecated
|
||||
MINIMAL_SKILL_ALLOWLIST,
|
||||
|
||||
Reference in New Issue
Block a user