From d2c4084ff5a806efb39303c9372e487a70e55d81 Mon Sep 17 00:00:00 2001 From: Kjell Tore Guttormsen Date: Sun, 19 Apr 2026 22:57:31 +0200 Subject: [PATCH] docs(config-audit): update CLAUDE.md and README test count for v4.0.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - scanner-agent + verifier-agent rows: haiku → sonnet - Add /config-audit tokens row to commands - Add token-hotspots.mjs row to scanners - Add token-hotspots-cli.mjs row to action engines - Add opus-4.7-patterns.md to knowledge base table - Test count: 486 → 543 across 31 files (real run pass count) - README test badge: 498+ → 543+ Co-Authored-By: Claude Opus 4.7 --- plugins/config-audit/CLAUDE.md | 12 ++++++++---- plugins/config-audit/README.md | 4 ++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/plugins/config-audit/CLAUDE.md b/plugins/config-audit/CLAUDE.md index 6ff8eaf..62daace 100644 --- a/plugins/config-audit/CLAUDE.md +++ b/plugins/config-audit/CLAUDE.md @@ -16,7 +16,8 @@ Analyzes and optimizes Claude Code configuration across three pillars: | Command | Description | |---------|-------------| | `/config-audit` | Full audit with auto-scope detection (no setup needed) | -| `/config-audit posture` | Quick health scorecard (A-F grades, 7 quality areas) | +| `/config-audit posture` | Quick health scorecard (A-F grades, 8 quality areas incl. Token Efficiency) | +| `/config-audit tokens` | Opus-4.7-aware token hotspots (4 patterns: cache-breaking, redundant perms, deep imports, sonnet-era) | | `/config-audit feature-gap` | Context-aware feature recommendations grouped by impact | | `/config-audit fix` | Auto-fix deterministic issues with backup + verification | | `/config-audit rollback` | Restore configuration from backup | @@ -41,11 +42,11 @@ Analyzes and optimizes Claude Code configuration across three pillars: | Agent | Role | Model | Color | Tools | |-------|------|-------|-------|-------| -| scanner-agent | Find config files | haiku | cyan | Read, Glob, Grep, Write | +| scanner-agent | Find config files | sonnet | cyan | Read, Glob, Grep, Write | | analyzer-agent | Generate report | sonnet | blue | Read, Glob, Grep, Write | | planner-agent | Create action plan | opus | yellow | Read, Glob, Write | | implementer-agent | Execute changes | sonnet | magenta | Read, Write, Edit, Bash, Glob | -| verifier-agent | Verify results | haiku | purple | Read, Glob, Grep | +| verifier-agent | Verify results | sonnet | purple | Read, Glob, Grep | | feature-gap-agent | Context-aware feature recommendations | opus | green | Read, Glob, Grep, Write | ## Deterministic Scanners @@ -64,6 +65,7 @@ Scanner CLI: `node scanners/scan-orchestrator.mjs [--global] [--full-mach | `import-resolver.mjs` | IMP | Broken @imports, circular refs, deep chains, tilde paths | | `conflict-detector.mjs` | CNF | Settings conflicts, permission contradictions, hook duplicates | | `feature-gap-scanner.mjs` | GAP | 25 feature checks across 4 tiers — shown as opportunities, not grades | +| `token-hotspots.mjs` | TOK | Cache-breaking volatile content, redundant tool permissions, deep import chains, sonnet-era setups (Opus 4.7 patterns) | ### Scanner Lib (`scanners/lib/`) @@ -91,6 +93,7 @@ Scanner CLI: `node scanners/scan-orchestrator.mjs [--global] [--full-mach | `fix-cli.mjs` | CLI: `node fix-cli.mjs [--apply] [--json] [--global]` | | `drift-cli.mjs` | CLI: `node drift-cli.mjs [--save] [--baseline name] [--json]` | | `whats-active.mjs` | CLI: `node whats-active.mjs [--json] [--verbose] [--suggest-disables]` — read-only active-config inventory | +| `token-hotspots-cli.mjs` | CLI: `node token-hotspots-cli.mjs [--json] [--global] [--output-file path]` — Opus-4.7 token hotspots ranking | ### Standalone Scanner @@ -109,6 +112,7 @@ Scanner CLI: `node scanners/scan-orchestrator.mjs [--global] [--full-mach | `hook-events-reference.md` | All 26 hook events with details | | `feature-evolution.md` | Feature timeline for staleness detection | | `gap-closure-templates.md` | Config-specific templates for closing gaps | +| `opus-4.7-patterns.md` | Token-cost dynamics for Opus 4.7 era — 4 patterns powering the TOK scanner | ## Hooks @@ -154,7 +158,7 @@ Default: auto-detects scope from git context. Override with `/config-audit full| node --test 'tests/**/*.test.mjs' ``` -486 tests across 27 test files (10 lib + 16 scanner + 1 hook). Test fixtures in `tests/fixtures/`. +543 tests across 31 test files (11 lib + 19 scanner + 1 hook). Test fixtures in `tests/fixtures/`. ## Gotchas diff --git a/plugins/config-audit/README.md b/plugins/config-audit/README.md index ef6d296..a37d79c 100644 --- a/plugins/config-audit/README.md +++ b/plugins/config-audit/README.md @@ -12,7 +12,7 @@ ![Commands](https://img.shields.io/badge/commands-17-green) ![Agents](https://img.shields.io/badge/agents-6-orange) ![Hooks](https://img.shields.io/badge/hooks-4-red) -![Tests](https://img.shields.io/badge/tests-498+-brightgreen) +![Tests](https://img.shields.io/badge/tests-543+-brightgreen) ![License](https://img.shields.io/badge/license-MIT-lightgrey) A Claude Code plugin that checks configuration health, suggests context-aware improvements, and auto-fixes issues — `CLAUDE.md`, `settings.json`, hooks, rules, MCP servers, `@imports`, and plugins. 8 quality scanners for correctness, context-aware feature recommendations, auto-fix with backup/rollback, plus an Opus-4.7-aware Token Hotspots scanner. Zero external dependencies. @@ -530,7 +530,7 @@ This plugin is cautious by design — configuration files are important, and a b | Version | Date | Highlights | |---------|------|-----------| -| **4.0.0** | 2026-04-19 | Opus 4.7 era: new TOK scanner (cache-breaking volatile content, redundant tool permissions, deep import chains, sonnet-era setups), `/config-audit tokens` command, Token Efficiency 8th quality area, scanner-agent + verifier-agent migrated haiku → sonnet. 498+ tests | +| **4.0.0** | 2026-04-19 | Opus 4.7 era: new TOK scanner (cache-breaking volatile content, redundant tool permissions, deep import chains, sonnet-era setups), `/config-audit tokens` command, Token Efficiency 8th quality area, scanner-agent + verifier-agent migrated haiku → sonnet. 543 tests | | **3.1.0** | 2026-04-14 | New `/config-audit whats-active` — read-only inventory of active plugins, skills, MCP, hooks, CLAUDE.md for a repo, with token estimates. 522 tests | | **3.0.1** | 2026-04-04 | Cross-platform fix: Windows path separators. 486 tests | | **3.0.0** | 2026-04-04 | Health redesign: quality-only grades, context-aware opportunities (replaces utilization/maturity/segment), Anthropic guidance. 482 tests |