feat(plh): flag plugin.json paths that shadow default folders (CA-PLH-015)
PLH now flags a plugin.json component-path key (commands/agents/outputStyles) that replaces a default folder still present on disk — Claude Code stops scanning that folder, so its contents are silently ignored (dead config). Mirrors CC's /doctor & `claude plugin list` warning (v2.1.140+). Field set pinned to the docs' "replaces" category only (Verifiseringsplikt, code.claude.com/docs path-behavior-rules): skills is excluded (adds to the default skills/ scan — both load) as are hooks/mcpServers/lspServers (own merge rules); a custom path that addresses the default folder is not flagged. Tests +5 (936->941). Scanner count unchanged (13). --json/--raw byte-stable. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Ter3E2JSi1Khgmuf2kady8
This commit is contained in:
parent
c6992cad57
commit
7abc5a1dcb
10 changed files with 217 additions and 1 deletions
9
tests/fixtures/plugin-shadow-folder/.claude-plugin/plugin.json
vendored
Normal file
9
tests/fixtures/plugin-shadow-folder/.claude-plugin/plugin.json
vendored
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
{
|
||||
"name": "shadow-folder-plugin",
|
||||
"description": "Fixture: plugin.json manifest paths that shadow default folders (CA-PLH-015)",
|
||||
"version": "1.0.0",
|
||||
"commands": "./custom-cmds/",
|
||||
"agents": ["./agents/", "./more-agents/"],
|
||||
"skills": "./custom-skills/",
|
||||
"outputStyles": "./styles/"
|
||||
}
|
||||
21
tests/fixtures/plugin-shadow-folder/CLAUDE.md
vendored
Normal file
21
tests/fixtures/plugin-shadow-folder/CLAUDE.md
vendored
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# Shadow Folder Plugin
|
||||
|
||||
Fixture for CA-PLH-015 shadow-folder detection.
|
||||
|
||||
## Commands
|
||||
|
||||
| Command | Description |
|
||||
|---------|-------------|
|
||||
| `/shadow-folder-plugin:shadow-fixture-cmd` | A command |
|
||||
|
||||
## Agents
|
||||
|
||||
| Agent | Role | Model |
|
||||
|-------|------|-------|
|
||||
| shadow-fixture-agent | Test | sonnet |
|
||||
|
||||
## Hooks
|
||||
|
||||
| Event | Script | Purpose |
|
||||
|-------|--------|---------|
|
||||
| (none) | — | — |
|
||||
8
tests/fixtures/plugin-shadow-folder/agents/real.md
vendored
Normal file
8
tests/fixtures/plugin-shadow-folder/agents/real.md
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
name: shadow-fixture-agent
|
||||
description: An agent in the default agents/ folder
|
||||
model: sonnet
|
||||
tools: ["Read"]
|
||||
---
|
||||
|
||||
# Shadow Fixture Agent
|
||||
8
tests/fixtures/plugin-shadow-folder/commands/real.md
vendored
Normal file
8
tests/fixtures/plugin-shadow-folder/commands/real.md
vendored
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
name: shadow-fixture-cmd
|
||||
description: A command that lives in the default commands/ folder
|
||||
allowed-tools: Read
|
||||
model: sonnet
|
||||
---
|
||||
|
||||
# Shadow Fixture Command
|
||||
6
tests/fixtures/plugin-shadow-folder/skills/some-skill/SKILL.md
vendored
Normal file
6
tests/fixtures/plugin-shadow-folder/skills/some-skill/SKILL.md
vendored
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
name: shadow-fixture-skill
|
||||
description: A skill in the default skills/ folder
|
||||
---
|
||||
|
||||
# Shadow Fixture Skill
|
||||
Loading…
Add table
Add a link
Reference in a new issue