Context Budget¶
Warns when instruction and configuration files exceed recommended token limits. Uses a len(text) / 4 approximation for token counting. Supports per-category warn and error thresholds. Disabled by default.
| Rule ID | Description | Default Severity | Autofix |
|---|---|---|---|
context-budget |
Warn when instruction or config files exceed recommended token limits | warning (auto) | - |
context-budget parameters:
| Parameter | Description | Default |
|---|---|---|
limits |
Token limits per file category (int for warn-only, or {warn, error} dict) | {"agents-md": {"warn": 6000, "error": 12000}, "claude-md": {"warn": 6000, "error": 12000}, "gemini-md": {"warn": 6000, "error": 12000}, "instruction": {"warn": 4000, "error": 8000}, "skill": {"warn": 3000, "error": 6000}, "command": {"warn": 2000, "error": 4000}, "agent": {"warn": 2000, "error": 4000}, "rule": {"warn": 2000, "error": 4000}, "skill-description": {"warn": 200, "error": 500}, "command-description": {"warn": 200, "error": 500}} |