Skip to content

feat: Per-file token budget configuration in .waza.yaml #86

Description

@spboyer

Summary

Support per-file token budget configuration in .waza.yaml using glob patterns, extending the current task-level max_tokens in the behavior grader.

Motivation

Skills often have multiple files (SKILL.md, prompts, configs) with different token budgets. The current behavior_grader.max_tokens only checks total task output. A per-file budget config allows finer-grained token limits.

Proposed Implementation

.waza.yaml config

tokens:
limits:
defaults:
skill_md: 5000
prompt: 8000
overrides:
skills/complex-skill/SKILL.md: 7500

Integration with waza tokens check

  • Read per-file limits from .waza.yaml
  • Fall back to .token-limits.json for legacy support (with deprecation warning)
  • Report per-file results

Acceptance Criteria

  • .waza.yaml supports tokens.limits.defaults and tokens.limits.overrides with glob patterns
  • waza tokens check reads per-file limits
  • Legacy .token-limits.json fallback with deprecation warning
  • Per-file reporting in both text and JSON formats
  • Tests covering: defaults, overrides, glob matching, legacy fallback

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestgoPull requests that update go codepriority:p2Next sprintsquad:linusAssigned to Linus (Backend Developer)

Fields

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions