[sol-orch] perf: trim heavyweight tool descriptions (-3k tokens/turn) - #5
Merged
Conversation
Reduce per-turn static prompt bytes for todo, shell, and task tool descriptions while preserving behavior-critical contracts.\n\nCo-authored-by: wakesync <shadow@shad0w.xyz>
|
Hey! Your PR title Please update it to start with one of:
Where See CONTRIBUTING.md for details. |
|
This PR doesn't fully meet our contributing guidelines and PR template. What needs to be fixed:
Please edit this PR description to address the above within 2 hours, or it will be automatically closed. If you believe this was flagged incorrectly, please let a maintainer know. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Trims the three largest per-turn tool description files while preserving behavior-critical contracts: when to use each tool, argument/status semantics, safety rules, git/PR guardrails, and user-visible output expectations.
Byte savings
packages/opencode/src/tool/todowrite.txtpackages/opencode/src/tool/shell/shell.txtpackages/opencode/src/tool/task.txtApproximate token reduction: ~3,581 tokens/turn using the audit's 4 bytes/token rule.
Preserved
todowrite: use/skip criteria, status enum meanings, onein_progressitem rule, immediate completion/cancellation updates, actionable task breakdown.shell: temp-dir guidance, file-operation prohibition, commit/PR workflows, git safety rules, no force/destructive actions without explicit request, no secret commits, no interactive git,ghrequirement for GitHub operations.task:subagent_typerequirement, slash-command behavior, when not to delegate, concurrent agent launches, fresh-context prompting requirements, background/task_status behavior, trusted-but-summarized outputs.Cut
Verification
.txtbodies.bun run buildinpackages/opencodewas attempted but blocked by the existing worktree dependency state:@opentui/solid/preloadis missing from the available install.bun install --frozen-lockfilealso fails because the lockfile would change.bun run typecheckwas also attempted and failed on missing workspace/dependency modules in the worktree install, not on the edited.txtcontent.