-
Notifications
You must be signed in to change notification settings - Fork 1
feat(cli): prs inspect <skill> --layers debugging command #203
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or request
Description
Context
When skills are composed across multiple registry layers (e.g., Comarch's 4-layer architecture: company → product → BU → project), debugging which layer contributed which property becomes difficult. There is no way to see the composition breakdown without manually tracing imports and extends.
Parent issue: #199 (Phase 2)
Spec: docs/superpowers/specs/2026-03-30-skill-overlay-extends-design.md §13
Review: docs/superpowers/specs/2026-03-30-skill-overlay-extends-review.md §10
Proposal
Add a new CLI command prs inspect <skill-name> --layers that shows each layer's contribution to a composed skill.
Example output
$ prs inspect clm512-expert --layers
Skill: clm512-expert
Layers: 3
Layer 1 — @clm5core/skills/clm512-expert (base)
description: "CLM 5.12+ development expert"
content: ✓ (247 lines)
references: [spring-patterns.md]
allowedTools: [Read, Bash]
Layer 2 — @bu/skills/clm512-expert (@extend)
description: "CLM 5.12+ Expert z kontekstem BU CRM Retail" (replaces Layer 1)
references: [architecture.md, modules.md, patterns.md, integrations.md] (appended)
Layer 3 — project/.promptscript/project.prs (@extend)
allowedTools: [Read, Bash, Write] (replaces Layer 2)
Composed result:
description: "CLM 5.12+ Expert z kontekstem BU CRM Retail"
content: 247 lines
references: 5 files (spring-patterns.md, architecture.md, modules.md, patterns.md, integrations.md)
allowedTools: [Read, Bash, Write]
Design considerations
- Read-only command — no resolver changes needed, only inspection of the resolution pipeline
- Should work with
--format jsonfor programmatic consumption - Must handle skill composition (
@usephases) and extensions (@extend) independently - Should show merge strategy applied per property (replace / append / shallow-merge)
Acceptance criteria
-
prs inspect <skill-name> --layersshows per-layer property contributions - Each layer shows source path and composition mechanism (@extend, @use)
- Merge strategy is indicated for overridden properties
-
--format jsonoutputs structured JSON - Works with multi-registry configurations
- Handles missing/unresolvable skills gracefully with actionable error messages
- Unit and integration tests
- CLI help text and documentation
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request