Skip to content

feat: /audit and /optimize commands for token profiling - #13

Merged
elynch303 merged 2 commits into
masterfrom
feature/audit-optimize-commands
Apr 15, 2026
Merged

feat: /audit and /optimize commands for token profiling#13
elynch303 merged 2 commits into
masterfrom
feature/audit-optimize-commands

Conversation

@elynch303

Copy link
Copy Markdown
Owner

Summary

  • Adds /audit — read-only token audit of .claude/. Profiles agent description cost, finds unreferenced/cold agents, flags over-permissioned tools, estimates per-session token budget. Degrades gracefully when learning logs are absent.
  • Adds /optimize — AI-rewrites verbose descriptions to ~100 chars with confirmation before writing; prints manual instructions for archiving agents, scoping tools, and cleaning empty dirs (never auto-applies structural changes).
  • Adds entities.json and mempalace.yaml to .gitignore.

Test plan

  • Run /audit → report shows unreferenced agents, verbose descriptions, token totals
  • Run /audit verbose → per-agent token breakdown included
  • Run /optimize → previews rewrites, asks confirmation, writes on approval
  • Run /optimize structural → prints instructions, writes nothing
  • Run /optimize all → does both
  • Delete learning logs → re-run /audit → cold agents section skips gracefully with note

🤖 Generated with Claude Dev Kit

elynch303 and others added 2 commits April 14, 2026 19:59
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
/audit: read-only report of agent description cost, unreferenced agents,
verbose descriptions, tool scope issues, and per-session token budget.
Degrades gracefully when learning logs are absent.

/optimize: AI-rewrites verbose descriptions to ~100 chars with
confirmation before any write; prints manual instructions for archiving
agents, scoping tools, and cleaning empty dirs (no auto-apply).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@elynch303
elynch303 merged commit 04c79a7 into master Apr 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant