ECC/skills
vazidmansuri005 0efd6ed914
feat(commands): add /context-budget optimizer command (#554)
* feat(commands): add /context-budget optimizer command

Adds a command that audits context window token consumption across
agents, skills, rules, MCP servers, and CLAUDE.md files.

Detects bloated agent descriptions, redundant components, MCP
over-subscription, and CLAUDE.md bloat. Produces a prioritized
report with specific token savings per optimization.

Directly relevant to #434 (agent descriptions too verbose, ~26k
tokens causing performance warnings).

* fix: address review feedback on context-budget command

- Add $ARGUMENTS to enable --verbose flag passthrough
- Fix MCP token estimate: 45 tools × ~500 tokens = ~22,500 (was ~2,200)
- Fix heavy agents example: all 3 now exceed 200-line threshold
- Fix description threshold: warning at >30 words, fail at >50 words
- Add Step 4 instructions (was empty)
- Fix audit cadence: "quarterly" → "regularly" + "monthly" consistently
- Fix Output Format heading level under Step 4
- Replace "Antigravity" with generic "harness versions"
- Recalculate total overhead to match corrected MCP numbers

* fix: correct MCP tool count and savings percentage in sample output

- Fix MCP tool count: table now shows 87 tools matching the issues
  section (was 45 in table vs 87 in issues)
- Fix savings percentage: 5,100 / 66,400 = 7.7% (was 20.6%)
- Recalculate total overhead and effective context to match

* fix: correct sample output arithmetic

- Fix total overhead: 66,400 → 66,100 to match component table sum
  (12,400 + 6,200 + 2,800 + 43,500 + 1,200 = 66,100)
- Fix MCP savings: ~1,500 → ~27,500 tokens (55 tools × 500 tokens/tool)
  to match the per-tool formula defined in Step 1
- Reorder optimizations by savings (MCP removal is now #1)
- Fix total savings and percentage (31,100 / 66,100 = 47.0%)

* fix: distinguish always-on vs on-demand agent overhead

Agent descriptions are always loaded into Task tool routing context,
but the full agent body is only loaded when invoked. The audit now
measures both: description-only tokens as always-on overhead and
full-file tokens as worst-case overhead. This resolves the
contradiction between Step 1 (counting full files) and Tip 1 (saying
only descriptions are loaded per session).

* fix: simplify agent accounting and resolve inconsistencies

- Revert to single agent overhead metric (full file tokens) — simpler
  and matches what the report actually displays
- Add back 200-line threshold for heavy agents in Step 1
- Fix heavy agents action to match issue type (split/trim, not
  description-only)
- Remove .agents/skills/ scan path (doesn't exist in ECC repo)
- Consolidate description threshold to single 30-word check

* fix: add model assumption and verbose mode activation

- Step 4: assume 200K context window by default (Claude has no way to
  introspect its model at runtime)
- Step 4: add explicit instruction to check $ARGUMENTS for --verbose
  flag and include additional output when present

* fix: handle .agents/skills/ duplicates in skill scan

Skills scan now checks .agents/skills/ for Codex harness copies and
skips identical duplicates to avoid double-counting overhead.

* fix: add savings estimate to heavy agents action for consistency

* feat(skills): add context-budget backing skill, slim command to delegator

* fix: use structurally detectable classification criteria instead of session frequency

---------

Co-authored-by: vazidmansuri005 <vazidmansuri005@users.noreply.github.com>
2026-03-20 00:20:23 -07:00
..
agent-eval feat(skills): add agent-eval for head-to-head coding agent comparison (#540) 2026-03-20 00:20:18 -07:00
agent-harness-construction feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
agentic-engineering feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
ai-first-engineering feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
ai-regression-testing feat: add ai-regression-testing skill (#433) 2026-03-16 13:35:31 -07:00
android-clean-architecture fix: address PR review comments for Kotlin/Android/KMP docs 2026-03-10 20:53:39 -07:00
api-design fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
article-writing feat: add generic content and investor skills 2026-02-27 05:50:23 -08:00
autonomous-loops feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
backend-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
blueprint docs: tighten blueprint install guidance 2026-03-10 19:23:00 -07:00
bun-runtime fix: address PR review — skill template (When to use, How it works, Examples), bun.lock, next build note, rust-reviewer CI note, doc-lookup privacy/uncertainty 2026-03-16 14:03:40 -07:00
carrier-relationship-management docs: resolve remaining operational skill comments 2026-03-10 21:13:55 -07:00
claude-api feat: add orchestration workflows and harness skills 2026-03-12 14:49:05 -07:00
claude-devfleet Add Claude DevFleet multi-agent orchestration skill (#505) 2026-03-16 13:35:50 -07:00
clickhouse-io fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
codebase-onboarding feat(skills): add codebase-onboarding skill (#553) 2026-03-20 00:20:20 -07:00
coding-standards fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
compose-multiplatform-patterns docs: tighten kotlin support examples 2026-03-10 20:53:39 -07:00
configure-ecc feat: add laravel skills (#420) 2026-03-16 13:35:23 -07:00
content-engine feat: add generic content and investor skills 2026-02-27 05:50:23 -08:00
content-hash-cache-pattern fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
context-budget feat(commands): add /context-budget optimizer command (#554) 2026-03-20 00:20:23 -07:00
continuous-agent-loop feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
continuous-learning feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
continuous-learning-v2 Merge pull request #664 from ymdvsymd/fix/observer-sandbox-access-661 2026-03-20 00:16:42 -07:00
cost-aware-llm-pipeline fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
cpp-coding-standards fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
cpp-testing chore: replace external repo links with @username attribution 2026-03-03 12:32:35 -08:00
crosspost feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
customs-trade-compliance docs: resolve operational skill review issues 2026-03-10 21:07:36 -07:00
data-scraper-agent feat(skill): add data-scraper-agent — AI-powered public data collection for any source (#503) 2026-03-16 13:35:44 -07:00
database-migrations fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
deep-research feat: add orchestration workflows and harness skills 2026-03-12 14:49:05 -07:00
deployment-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
django-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
django-security fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
django-tdd fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
django-verification fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
dmux-workflows fix: address remaining orchestration review comments 2026-03-12 15:34:05 -07:00
docker-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
documentation-lookup fix: address PR review — skill template (When to use, How it works, Examples), bun.lock, next build note, rust-reviewer CI note, doc-lookup privacy/uncertainty 2026-03-16 14:03:40 -07:00
e2e-testing fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
energy-procurement docs: resolve operational skill review issues 2026-03-10 21:07:36 -07:00
enterprise-agent-ops feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
eval-harness feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
exa-search feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
fal-ai-media feat: orchestration harness, selective install, observer improvements 2026-03-14 12:55:25 -07:00
foundation-models-on-device fix(skills): improve code examples in iOS 26 skills 2026-02-24 14:39:25 +09:00
frontend-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
frontend-slides chore: replace external repo links with @username attribution 2026-03-03 12:32:35 -08:00
golang-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
golang-testing fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
inventory-demand-planning docs: resolve remaining operational skill comments 2026-03-10 21:13:55 -07:00
investor-materials feat: add generic content and investor skills 2026-02-27 05:50:23 -08:00
investor-outreach feat: add generic content and investor skills 2026-02-27 05:50:23 -08:00
iterative-retrieval fix: harden hook portability and plugin docs 2026-03-09 22:49:43 -07:00
java-coding-standards fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
jpa-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
kotlin-coroutines-flows docs: tighten kotlin support examples 2026-03-10 20:53:39 -07:00
kotlin-exposed-patterns feat: add kotlin commands and skill pack 2026-03-10 21:25:52 -07:00
kotlin-ktor-patterns feat: add kotlin commands and skill pack 2026-03-10 21:25:52 -07:00
kotlin-patterns feat: add kotlin commands and skill pack 2026-03-10 21:25:52 -07:00
kotlin-testing fix: align kotlin diagnostics and heading hierarchy 2026-03-12 23:53:23 -07:00
laravel-patterns feat: add laravel skills (#420) 2026-03-16 13:35:23 -07:00
laravel-security feat: add laravel skills (#420) 2026-03-16 13:35:23 -07:00
laravel-tdd feat: add laravel skills (#420) 2026-03-16 13:35:23 -07:00
laravel-verification feat: add laravel skills (#420) 2026-03-16 13:35:23 -07:00
liquid-glass-design fix(skills): improve code examples in iOS 26 skills 2026-02-24 14:39:25 +09:00
logistics-exception-management docs: resolve operational skill review issues 2026-03-10 21:07:36 -07:00
market-research feat: add generic content and investor skills 2026-02-27 05:50:23 -08:00
mcp-server-patterns feat(skills): add mcp-server-patterns (#531) 2026-03-16 13:35:11 -07:00
nanoclaw-repl feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
nextjs-turbopack fix: address PR review — skill template (When to use, How it works, Examples), bun.lock, next build note, rust-reviewer CI note, doc-lookup privacy/uncertainty 2026-03-16 14:03:40 -07:00
nutrient-document-processing feat: add security guides and sanitize external links across repo 2026-02-25 07:20:42 -08:00
perl-patterns docs: tighten perl support guidance 2026-03-10 20:42:54 -07:00
perl-security docs: tighten perl support guidance 2026-03-10 20:42:54 -07:00
perl-testing feat: add Perl skills (patterns, security, testing) 2026-03-10 20:42:54 -07:00
plankton-code-quality feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
postgres-patterns chore: replace external repo links with @username attribution 2026-03-03 12:32:35 -08:00
production-scheduling docs: resolve operational skill review issues 2026-03-10 21:07:36 -07:00
project-guidelines-example fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
prompt-optimizer feat(skills): add prompt-optimizer skill and /prompt-optimize command (#418) 2026-03-12 23:40:02 -07:00
python-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
python-testing fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
pytorch-patterns feat(skills): add pytorch-patterns skill (#550) 2026-03-19 20:49:34 -07:00
quality-nonconformance docs: resolve operational skill review issues 2026-03-10 21:07:36 -07:00
ralphinho-rfc-pipeline feat: deliver v1.8.0 harness reliability and parity updates 2026-03-04 14:48:06 -08:00
regex-vs-llm-structured-text fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
returns-reverse-logistics docs: resolve remaining operational skill comments 2026-03-10 21:13:55 -07:00
rust-patterns feat(agents): add Rust language support (#523) 2026-03-16 13:34:25 -07:00
rust-testing feat(agents): add Rust language support (#523) 2026-03-16 13:34:25 -07:00
search-first feat: separate core vs niche skills and enforce research-first default 2026-02-28 10:06:43 -08:00
security-review fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
security-scan fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
skill-stocktake docs: add skill-stocktake agent invocation example 2026-03-10 20:15:38 -07:00
springboot-patterns fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
springboot-security fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
springboot-tdd fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
springboot-verification fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
strategic-compact feat: add orchestration workflows and harness skills 2026-03-12 14:49:05 -07:00
swift-actor-persistence fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
swift-concurrency-6-2 fix(skills): improve code examples in iOS 26 skills 2026-02-24 14:39:25 +09:00
swift-protocol-di-testing fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
swiftui-patterns fix: correct SwiftUI skill ViewModel injection and Equatable comparison 2026-02-17 17:04:31 +02:00
tdd-workflow fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
team-builder feat(skills): add team-builder skill (#501) 2026-03-16 13:35:38 -07:00
verification-loop fix: add origin metadata to skills for traceability 2026-02-23 19:00:57 +03:00
video-editing feat: add orchestration workflows and harness skills 2026-03-12 14:49:05 -07:00
videodb feat: add /aside command (#407) 2026-03-12 23:52:46 -07:00
visa-doc-translate feat(skills): add visa-doc-translate skill 2026-02-20 16:25:23 +08:00
x-api fix: harden orchestration status and skill docs 2026-03-12 15:07:57 -07:00