-
Notifications
You must be signed in to change notification settings - Fork 0
Bug: pair package --layout target produces .skills/ output with links still relative to .claude/skills/ depth (off-by-one ../) #187
Description
Summary
When packaging from target layout (pair package --layout target), the produced artifact is structured as source layout (skills end up under .skills/<skill>/SKILL.md). However, links inside the packaged SKILL.md remain relative to the consumer target depth (.claude/skills/<skill>/...), resulting in off-by-one ../ and broken internal links when validating the KB repo/artifact in source layout.
Context
- Consumer target layout installs skills at:
.claude/skills/pair-<skill-name>/SKILL.md(3 levels deep to repo root) - Source/packaged layout stores skills at:
.skills/pair-<skill-name>/SKILL.md(2 levels deep to repo root)
Reproduction
- In a consumer repo, have installed skills in target layout (e.g.
.claude/skills/pair-capability-assess-ai/SKILL.md). - Ensure
SKILL.mdcontains links to KB files under.pair/...that are correct for the consumer target depth, e.g.:../../../.pair/adoption/tech/tech-stack.md
- Run:
pair package --layout target(packaging from targets)
- Inspect the produced package contents:
- skills are located under
.skills/pair-capability-assess-ai/SKILL.md - but links still use
../../../...(consumer depth)
- skills are located under
- Validate the packaged KB/repo in source layout:
pair kb-validate --layout source
Expected
When the package output places skills under .skills/<skill>/, links should be rewritten to the correct source-layout depth, e.g.:
../../.pair/adoption/tech/tech-stack.md
Actual
Packaged skills still contain links with consumer-depth ../../../..., which resolve outside the repo root in source layout and are reported as broken by kb-validate.
Notes
This is distinct from update-time link rewriting issues: this is about packaging from target layout while emitting a source-layout artifact, but not normalizing internal relative links for the output layout.