Wave 5 Step 14. Threads the humanizer vocabulary through the remaining
six audit/analysis command templates and adds a shape test that locks
the structure plus a pair of anchor must-contains.
- commands/drift.md: --raw pass-through; new/resolved/changed-finding
rendering instructions reference userActionLanguage and
relevanceContext rather than raw severity.
- commands/plugin-health.md: --raw pass-through; finding rendering
groups by userImpactCategory and leads with userActionLanguage.
- commands/config-audit.md (router): replaces the 25-line A/B/C/D/F
prose ladder with a humanized stderr-scorecard reference + three
userActionLanguage-grouped "What you can do next" branches; --raw
threaded through both scan-orchestrator and posture invocations.
- commands/discover.md: --raw pass-through; finding-summary rendering
groups by userImpactCategory.
- commands/analyze.md: --raw pass-through; analyzer-agent prompt now
instructs grouping by userImpactCategory and leading with
userActionLanguage; humanized title/description/recommendation
strings rendered verbatim, no paraphrasing.
- commands/status.md: phase-label humanization table — current_phase
machine field name preserved, user-facing labels translated
("Looking at your config files", "Working out what to recommend",
"Asking what you'd like to focus on", "Putting together your action
plan", "Making the changes", "Double-checking everything worked");
--raw preserves verbatim machine field values.
tests/commands/group-b-shape.test.mjs (new, +8 tests, 772 → 780):
- structural: bash block + Read tool + --raw/$ARGUMENTS plumbing
across all 6 files
- findings-renderers: humanized field reference + no grade-prose
- anchor must-contains per plan: config-audit.md ⊇
userImpactCategory|userActionLanguage; drift.md ⊇ --raw|humanized
- status.md: current_phase preserved + ≥3 humanized phase labels
79 lines
2.6 KiB
Markdown
79 lines
2.6 KiB
Markdown
---
|
|
name: config-audit:plugin-health
|
|
description: Audit plugin configuration quality — validates structure, frontmatter, and cross-plugin coherence
|
|
argument-hint: "[plugin-path]"
|
|
allowed-tools: Read, Glob, Grep, Bash
|
|
model: sonnet
|
|
---
|
|
|
|
# Config-Audit: Plugin Health
|
|
|
|
Audit Claude Code plugin structure and quality — validates plugin.json, CLAUDE.md, command/agent frontmatter, and detects cross-plugin conflicts.
|
|
|
|
## Arguments
|
|
|
|
- `$ARGUMENTS` may contain a path to a specific plugin directory
|
|
- If omitted: scans all plugins in the marketplace root
|
|
- `--raw`: pass-through to the scanner; produces v5.0.0 verbatim envelope (bypasses the humanizer) for byte-stable diff tooling
|
|
|
|
## Implementation
|
|
|
|
### Step 1: Discover plugins and greet
|
|
|
|
If a specific path is given, scan only that plugin. Otherwise, find all plugins using Glob for `**/.claude-plugin/plugin.json`.
|
|
|
|
Tell the user:
|
|
|
|
```
|
|
## Plugin Health Check
|
|
|
|
Auditing {N} plugin(s) for structure, frontmatter quality, and cross-plugin conflicts...
|
|
```
|
|
|
|
### Step 2: Run scanner
|
|
|
|
Run silently for each plugin. Default mode emits a humanized JSON envelope where each PLH finding carries `userImpactCategory`, `userActionLanguage`, and `relevanceContext` alongside the v5.0.0 fields. `--raw` is passed through verbatim when present.
|
|
|
|
```bash
|
|
RAW_FLAG=""
|
|
if echo "$ARGUMENTS" | grep -q -- "--raw"; then RAW_FLAG="--raw"; fi
|
|
node ${CLAUDE_PLUGIN_ROOT}/scanners/plugin-health-scanner.mjs <path> $RAW_FLAG 2>/dev/null
|
|
```
|
|
|
|
Read stdout output (JSON) using the Read tool. Parse findings.
|
|
|
|
### Step 3: Present results
|
|
|
|
```markdown
|
|
### Plugin Health Report
|
|
|
|
| Plugin | Grade | Commands | Agents | Status |
|
|
|--------|-------|----------|--------|--------|
|
|
| {name} | {grade} ({score}) | {cmd_count} | {agent_count} | {Good/Issues found} |
|
|
| ... | ... | ... | ... | ... |
|
|
|
|
{If cross-plugin issues:}
|
|
#### Cross-Plugin Issues ({count})
|
|
| Issue | Plugins | Recommendation |
|
|
|-------|---------|----------------|
|
|
| ... | ... | ... |
|
|
|
|
{If findings:}
|
|
#### Findings by Plugin
|
|
|
|
**{plugin-name}** ({finding_count} findings):
|
|
1. [{userActionLanguage}] {humanized title} ({id}) — {humanized recommendation}
|
|
2. ...
|
|
```
|
|
|
|
Group findings within each plugin by `userImpactCategory` (e.g., "Configuration mistake", "Conflict") and lead each line with `userActionLanguage` ("Fix this now", "Fix soon", "Optional cleanup"). The humanizer already produced the plain-language `title`/`recommendation` strings — render them verbatim, do not paraphrase.
|
|
|
|
### Step 4: Suggest next steps
|
|
|
|
```
|
|
### What's next
|
|
|
|
- Fix structural issues based on recommendations above
|
|
- `/config-audit posture` — Full configuration posture assessment
|
|
- `/config-audit fix` — Auto-fix deterministic issues
|
|
```
|