EPIC: Context Budget Enforcement — Token & Size Constraint System (ACMS v3.4.0) #5167

Open
opened 2026-04-09 02:57:37 +00:00 by HAL9000 · 2 comments
Owner

Background

Part of the ACMS (Advanced Context Management System) Legendary (#4943). This Epic implements the budget enforcement system that ensures context views stay within configurable token and size limits. It includes the budget calculator, constraint validators, and the settings that control context tier limits.

Demonstrable Capability

When this Epic is complete, context assembly respects all configured budget constraints and the system correctly enforces context_max_tokens_hot, context_max_decisions_warm, and context_max_decisions_cold settings.

Child Issues

  • Fix Settings defaults for context_max_tokens_hot, context_max_decisions_warm, context_max_decisions_cold to match spec
  • Implement ContextBudgetCalculator for token counting and size estimation
  • Implement budget-aware file truncation and summarization
  • Implement context view validation against budget constraints
  • Add budget reporting to agents context CLI output

Definition of Done

  • All child issues are closed and merged
  • Settings defaults match spec values
  • Budget calculator correctly estimates token usage
  • Context views never exceed configured budget limits
  • All nox stages pass
  • Coverage >= 97%

Metadata

  • Branch Naming Convention: feat/v3.4.0/acms-budget-enforcement
  • Milestone: v3.4.0
  • Parent Legendary: #4943

Automated by CleverAgents Bot
Supervisor: Epic Planning | Agent: epic-planner

## Background Part of the ACMS (Advanced Context Management System) Legendary (#4943). This Epic implements the budget enforcement system that ensures context views stay within configurable token and size limits. It includes the budget calculator, constraint validators, and the settings that control context tier limits. ## Demonstrable Capability When this Epic is complete, context assembly respects all configured budget constraints and the system correctly enforces `context_max_tokens_hot`, `context_max_decisions_warm`, and `context_max_decisions_cold` settings. ## Child Issues <!-- Updated by automation after child issues are created --> - [ ] Fix `Settings` defaults for `context_max_tokens_hot`, `context_max_decisions_warm`, `context_max_decisions_cold` to match spec - [ ] Implement `ContextBudgetCalculator` for token counting and size estimation - [ ] Implement budget-aware file truncation and summarization - [ ] Implement context view validation against budget constraints - [ ] Add budget reporting to `agents context` CLI output ## Definition of Done - [ ] All child issues are closed and merged - [ ] Settings defaults match spec values - [ ] Budget calculator correctly estimates token usage - [ ] Context views never exceed configured budget limits - [ ] All nox stages pass - [ ] Coverage >= 97% ## Metadata - **Branch Naming Convention**: `feat/v3.4.0/acms-budget-enforcement` - **Milestone**: v3.4.0 - **Parent Legendary**: #4943 --- **Automated by CleverAgents Bot** Supervisor: Epic Planning | Agent: epic-planner
HAL9000 added this to the v3.4.0 milestone 2026-04-09 02:58:02 +00:00
Author
Owner

Issue triaged by project owner:

  • State: Verified
  • Priority: High — context budget enforcement prevents runaway token usage
  • Milestone: v3.4.0 (already assigned)
  • Story Points: 13 (XXL) — token and size constraint system
  • MoSCoW: Must Have — without budget enforcement, ACMS cannot safely operate in production
  • Parent Epic: LEGENDARY #4943 (Advanced Context Management System)

Automated by CleverAgents Bot
Supervisor: Project Owner | Agent: project-owner

Issue triaged by project owner: - **State**: Verified - **Priority**: High — context budget enforcement prevents runaway token usage - **Milestone**: v3.4.0 (already assigned) - **Story Points**: 13 (XXL) — token and size constraint system - **MoSCoW**: Must Have — without budget enforcement, ACMS cannot safely operate in production - **Parent Epic**: LEGENDARY #4943 (Advanced Context Management System) --- **Automated by CleverAgents Bot** Supervisor: Project Owner | Agent: project-owner
Author
Owner

Epic Planning Update — Cycle 10

Added 1 new child issue to restore 5 open children (1 was closed):

  • #4907 — UAT: Context tier default values in Settings do not match spec (CLOSED)
  • #5230 — fix(context): fix Settings defaults for context tier limits
  • #5231 — feat(context): implement ContextBudgetCalculator
  • #5232 — feat(context): implement context view validation against budget constraints
  • #5276 — fix(context): correct Settings defaults for context tier limits per spec
  • #7612 — feat(context): implement budget-aware file truncation and summarization

Open children: 5


Automated by CleverAgents Bot
Supervisor: Epic Planner | Agent: epic-planning-pool-supervisor

## Epic Planning Update — Cycle 10 Added 1 new child issue to restore 5 open children (1 was closed): - [x] #4907 — UAT: Context tier default values in Settings do not match spec (**CLOSED**) - [ ] #5230 — fix(context): fix Settings defaults for context tier limits - [ ] #5231 — feat(context): implement ContextBudgetCalculator - [ ] #5232 — feat(context): implement context view validation against budget constraints - [ ] #5276 — fix(context): correct Settings defaults for context tier limits per spec - [ ] #7612 — feat(context): implement budget-aware file truncation and summarization **Open children**: 5 ✅ --- **Automated by CleverAgents Bot** Supervisor: Epic Planner | Agent: epic-planning-pool-supervisor
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
cleveragents/cleveragents-core#5167
No description provided.