-
Notifications
You must be signed in to change notification settings - Fork 6
refactor: deduplicate agent instructions for token efficiency (~888 tokens/session) #651
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… efficiency Consolidate repeated instructions to single authoritative sources: - Worker TODO.md restriction: 7 files -> plans.md (authoritative) + compact refs - Terminal/Browser/Memory/Getting Started: inline detail -> compact pointers Savings: ~888 tokens per session from AGENTS.md (always-loaded), ~979 tokens total across worker-loaded files. Over an 8-task batch: ~11K tokens saved. No knowledge lost — all detail preserved in authoritative source files (workflows/plans.md, tools/browser/browser-automation.md, memory/README.md). Compact refs point to the full docs.
Summary of ChangesHello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request refactors agent instructions to improve token efficiency by centralizing and compressing documentation. It consolidates repetitive information, such as worker restrictions and detailed operational guides, into single authoritative sources, replacing verbose inline content with concise references. This optimization significantly reduces the token count required for agent sessions while ensuring all comprehensive details remain accessible in their designated documentation files. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
WalkthroughAgent documentation is consolidated and tightened across multiple files, with verbose guidance condensed into concise statements and worker editing restrictions on TODO.md explicitly standardized to a blanket prohibition across all agent planning and execution workflows. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 Code Quality Report�[0;35m[MONITOR]�[0m Code Review Monitoring Report �[0;34m[INFO]�[0m Latest Quality Status: �[0;34m[INFO]�[0m Recent monitoring activity: 📈 Current Quality Metrics
Generated on: Sun Feb 8 19:09:45 UTC 2026 Generated by AI DevOps Framework Code Review Monitoring |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request effectively refactors several agent instruction files to improve token efficiency. The changes are well-aligned with the goal of deduplicating content and relying on single sources of truth, which should result in the token savings outlined in the description. The approach is consistent across all modified files. I have one suggestion for .agents/AGENTS.md to consider retaining a key instruction that was removed during the compression, as its absence might affect the agent's operational correctness.
| - Use `.local` domains (enables password manager autofill) | ||
| - Always SSL via Traefik + mkcert | ||
| - See `services/hosting/localhost.md` | ||
| `.local` domains + SSL via Traefik + mkcert. See `services/hosting/localhost.md`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The summary for Localhost Standards has removed the instruction to check for an open port first using localhost-helper.sh check-port <port>. This seems like a crucial operational step that might be worth retaining in the summary for the agent's immediate awareness, even with the goal of token reduction. Losing this quick reference could lead to errors if the agent tries to start a service on an occupied port.
| `.local` domains + SSL via Traefik + mkcert. See `services/hosting/localhost.md`. | |
| Check port first with `localhost-helper.sh check-port <port>`. Use `.local` domains + SSL via Traefik + mkcert. See `services/hosting/localhost.md`. |



Summary
workflows/plans.md) + compact one-liner refsToken Savings
Over an 8-task batch with ~1.5 retries avg: ~11,448 tokens saved.
Knowledge Preservation
Every removed paragraph has its full detail preserved in the designated authoritative source:
workflows/plans.mdscripts/commands/runners.mdtools/browser/browser-automation.mdmemory/README.md/onboardingwizardTesting
All 78 tests pass (77 pass, 1 pre-existing skip, 0 failures).
Summary by CodeRabbit