refactor(config): Make tool prompts configurable via prompts.yaml#450
Merged
refactor(config): Make tool prompts configurable via prompts.yaml#450
Conversation
Move the LLM-visible description from each tool's Definition() into config/prompts.go so users can override per-tool descriptions in .infer/prompts.yaml under the new `tools` key (or via INFER_PROMPTS_TOOLS_<NAME>_DESCRIPTION). Defaults are unchanged — a missing or empty entry falls back to the verbatim string previously hardcoded in each tool, courtesy of mergeToolDefaults backfill. MCP tool descriptions remain runtime-sourced from the MCP server. Parameter descriptions stay in code (some are dynamic, e.g. Bash whitelist enum) — out of scope for this change. Closes #446
ig-semantic-release-bot Bot
pushed a commit
that referenced
this pull request
Apr 27, 2026
## [0.104.1](v0.104.0...v0.104.1) (2026-04-27) ### 🐛 Bug Fixes * **ui:** Restore typing while agent is busy ([#455](#455)) ([92840d6](92840d6)), closes [#410](#410) * **services:** Trigger auto-compact from gateway-reported tokens ([#454](#454)) ([1fc19dd](1fc19dd)) * **config:** Update model context windows and pricing for current model lineup ([#452](#452)) ([655f9f8](655f9f8)) ### ♻️ Code Refactoring * **config:** Centralize config loading and remove service indirection ([#443](#443)) ([babf173](babf173)) * **config:** Centralize sub-config definitions and consolidate prompts ([#448](#448)) ([9979ac7](9979ac7)) * Extract keybindings configuration to separate file ([#438](#438)) ([6d04195](6d04195)) * **config:** Generate viper defaults via reflection over DefaultConfig() ([#436](#436)) ([85c6e0a](85c6e0a)) * **config:** Make tool prompts configurable via prompts.yaml ([#450](#450)) ([9fc1bb5](9fc1bb5)), closes [#446](#446) * Move channels to separate channels.yaml config ([#444](#444)) ([aa43e0e](aa43e0e)), closes [#441](#441) * Move computer_use to a separate config ([#447](#447)) ([a762c64](a762c64)), closes [#444](#444) * Move prompts to separate prompts.yaml config ([#442](#442)) ([45e4fb6](45e4fb6)) * **config:** Unify sub-configs behind CollectionConfig + utils.{Load,Save}YAML ([#445](#445)) ([aab481c](aab481c)) ### 📚 Documentation * Add directory-structure reference ([#451](#451)) ([95d26f8](95d26f8)) ### 👷 CI/CD * Reduce runs of nix ([acac364](acac364)) ### 🧹 Maintenance * **deps:** Bump modernc.org/sqlite from 1.49.1 to 1.50.0 ([#449](#449)) ([06a535d](06a535d)) * **nix:** Update package to v0.104.0 ([#432](#432)) ([5564697](5564697))
Contributor
|
🎉 This PR is included in version 0.104.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
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
Definition()and intoconfig/prompts.goso users can override them in.infer/prompts.yamlunder the newtoolskey.INFER_PROMPTS_TOOLS_<NAME>_DESCRIPTIONenv-var overrides for every tool, following the existing prompts-env precedence (env > file > in-code defaults).What's covered
27 static tools: Bash, BashOutput, KillShell, ListShells, Read, Write, Edit, MultiEdit, Delete, Grep, Tree, TodoWrite, RequestPlanApproval, WebFetch, WebSearch, Github, Schedule, A2A_QueryAgent/QueryTask/SubmitTask, MouseMove/Click/Scroll, KeyboardType, GetFocusedApp, ActivateApp, GetLatestScreenshot.
Out of scope (intentional):
Notes
configfield (previously didn't store it).*_test.goDefinition tests now seedPrompts: *config.DefaultPromptsConfig()in their test config — without the seed, the new config-drivenDefinition()would produce empty descriptions.config/prompts_test.goandcmd/prompts_load_test.gocover defaults, partial-file backfill, env-override precedence, and the YAML key contract (PascalCase +A2A_*underscore form).docs/tools-reference.md,CLAUDE.md.Closes #446