fix(agents): resolve skill placeholders in Goose (yaml) command output#3374
Open
jawwad-ali wants to merge 1 commit into
Open
fix(agents): resolve skill placeholders in Goose (yaml) command output#3374jawwad-ali wants to merge 1 commit into
jawwad-ali wants to merge 1 commit into
Conversation
CommandRegistrar.register_commands resolves {SCRIPT}/__AGENT__ and the
$ARGUMENTS placeholder in the markdown and toml branches, but the yaml
branch (Goose recipes) called render_yaml_command directly, skipping
both. So extension/preset command bodies installed for Goose kept literal
{SCRIPT}, __AGENT__, and repo-relative script paths in the generated
.goose/recipes/*.yaml prompt. Mirror the markdown/toml branches: run
resolve_skill_placeholders + _convert_argument_placeholder on the body
before render_yaml_command.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Description
CommandRegistrar.register_commandsresolves command-body placeholders —{SCRIPT},__AGENT__(viaresolve_skill_placeholders) and$ARGUMENTS(via_convert_argument_placeholder) — in the markdown and toml branches, but the yaml branch (Goose recipes) calledrender_yaml_commanddirectly and skipped both:So an extension/preset command installed for Goose kept the literal
{SCRIPT},__AGENT__, and unrewritten repo-relative script paths in the generated.goose/recipes/*.yamlprompt. Reproduced on main @92b7cf7: the same command body renders correctly forclaude(skills) andgemini(toml) but Goose emittedRun {SCRIPT} for agent __AGENT__ with $ARGUMENTS.verbatim.Fix
Mirror the markdown/toml branches — run
resolve_skill_placeholders+_convert_argument_placeholderonbodybeforerender_yaml_command. (bodyis reassigned before the downstream alias loop, so aliases inherit the resolved text too.)Testing
New
TestGooseCommandPlaceholderResolution: registers a command whose body has{SCRIPT}/__AGENT__/$ARGUMENTSforgoose, then asserts the generated.goose/recipes/speckit.example.yamlcontains none of the literals (they resolve to.specify/scripts/...,agent goose,{{args}}). Fails before (literals present — verified by source-stash), passes after. Full goose suite: 25 passed.uvx ruff checkclean.AI Disclosure
Found and fixed with Claude Code (Claude Fable 5) under my direction. AI flagged the yaml branch as the odd one out across the three format branches; I reproduced the literal-placeholder leak against the claude/gemini baselines, verified fail-before/pass-after, and reviewed the diff.