refactor(#887): consolidate duplicated CHILD_ROUTER test maps into shared helper (#889)

Three test files copy-pasted the concrete-skill->namespace-router CHILD_ROUTER
map verbatim, and two more duplicated an identical local parseRouterRequires
regex. Introduce tests/helpers/nested-layout.cjs that derives the child->router
map from the authoritative commands/gsd/ns-*.md requires: lists once, reusing
the production parseRequires (now exported from install-profiles) plus a
nestedSkillPath(skillsRoot, prefix, stem) helper. Refactor all five test files
to import from it.

Test-only + a single internal export addition; no production behavior change.

Closes #887

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Tom Boucher
2026-06-08 16:05:59 -04:00
committed by GitHub
parent a74e71b049
commit b6199460ed
7 changed files with 90 additions and 184 deletions

View File

@@ -720,6 +720,7 @@ export = {
readActiveProfile,
writeActiveProfile,
// Shared internals
parseRequires,
cleanupStagedSkills,
// Back-compat / deprecated
MINIMAL_SKILL_ALLOWLIST,