Commit 2de817e
[copilot-token-optimizer] Architecture Guardian: reduce 47-turn analysis via bash pre-step consolidation (#28141)
* Initial plan
* feat: optimize architecture-guardian with bash pre-step consolidation
- Add bash pre-step that collects all file metrics upfront into
/tmp/gh-aw/agent/arch-metrics.json, replacing ~20-30 per-file
agent turns with a single deterministic bash step
- Remove github: toolsets: [repos] (unused in local static analysis)
- Remove edit: tool (workflow is read-only, tool was never called)
- Simplify violation reporting to 2-line templated format per violation
instead of verbose 3-part narrative suggestions
- Improve Go receiver method detection in awk pattern
- Expand JS function detection to cover arrow functions and exports
- Add comment explaining go list error handling
- Add instruction for agent to replace template placeholders
Estimated savings: ~800K-1.1M tokens per run (~40-55% reduction)
Reduces expected turns from 47 to ~15-20
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/8b9b7035-c5bd-4617-9684-7537d0c6b157
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: lpcox <15877973+lpcox@users.noreply.github.com>1 parent 4efcb3f commit 2de817e
2 files changed
Lines changed: 156 additions & 195 deletions
0 commit comments