Add token budget guardrails for Agent Persona Explorer and CI Cleaner #11906
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Token Budget Guardrails Implementation - COMPLETE ✅
Context
Agent Persona Explorer and CI Cleaner workflows are high-cost workflows consuming excessive tokens per run. This PR adds token-budget guardrails to reduce spend while maintaining quality.
Implementation Checklist
Phase 1: Analyze Current Token Consumption
Phase 2: Add Token Budget Guardrails to Agent Persona Explorer
Phase 3: Add Token Budget Guardrails to CI Cleaner
Phase 4: Documentation
Phase 5: Testing & Validation
Key Changes Summary
Agent Persona Explorer Workflow:
CI Cleaner Workflow:
Documentation (
specs/token-budget-guidelines.md):Implementation Approach
Since
max-turnsis not supported by the Copilot engine (only Claude/Custom), the implementation relies on:Files Changed
.github/workflows/agent-persona-explorer.md- Optimized prompt and timeout.github/workflows/agent-persona-explorer.lock.yml- Regenerated.github/workflows/hourly-ci-cleaner.md- Enhanced efficiency guidelines.github/workflows/hourly-ci-cleaner.lock.yml- Regeneratedspecs/token-budget-guidelines.md- Comprehensive documentation (new file)Validation Results ✅
Expected Impact
Monitoring Recommendations
Users can track the effectiveness of these changes using:
.github/workflows/daily-copilot-token-report.md- Daily token usage reportingReady for review and merge ✅
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.