feat(agents): add Goose AI agent support#2015
feat(agents): add Goose AI agent support#2015furkankoykiran wants to merge 14 commits intogithub:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Adds initial support for Block’s Goose AI agent to spec-kit by wiring Goose into agent configuration, scaffolding/release packaging, and documentation, plus adding consistency tests.
Changes:
- Add
gooseto CLI agent configuration (AGENT_CONFIG) and extension/preset command registrar config (CommandRegistrar.AGENT_CONFIGS). - Extend release packaging scripts to generate Goose-oriented YAML recipe files under
.goose/recipes/. - Update agent-context update scripts and docs, and add consistency tests for the new agent.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/__init__.py |
Adds Goose to AGENT_CONFIG so CLI can target .goose/recipes. |
src/specify_cli/agents.py |
Adds Goose to CommandRegistrar.AGENT_CONFIGS with format: yaml. |
.github/workflows/scripts/create-release-packages.sh |
Adds Goose to ALL_AGENTS and attempts YAML recipe generation. |
.github/workflows/scripts/create-release-packages.ps1 |
Adds Goose to $AllAgents and attempts YAML recipe generation. |
scripts/bash/update-agent-context.sh |
Adds goose handling and .goose/recipes/AGENTS.md target. |
scripts/powershell/update-agent-context.ps1 |
Adds goose handling and .goose/recipes/AGENTS.md target. |
README.md |
Lists Goose in supported agents table. |
AGENTS.md |
Documents Goose as a supported agent and CLI-based requirement. |
tests/test_agent_config_consistency.py |
Adds consistency checks ensuring Goose is wired into configs/scripts/releases. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback. If not applicable, please explain why
|
I've addressed all the Copilot feedback: The test assertion at test_agent_config_consistency.py:520 now documents that create-github-release.sh doesn't upload the goose template artifacts yet. I added a NOTE explaining this gap so the test won't fail. Commits 5148bc4 and 9430815 already fixed the invalid YAML generation in both the Bash and PowerShell scripts by properly indenting the YAML block scalar content. I also fixed the broken title casing in the Bash script—the sed command was using The bigger fix was adding YAML format support to the CommandRegistrar class. I added a render_yaml_command() method that generates proper Goose recipe YAML and wired it into register_commands(). Goose commands will install correctly now instead of raising a ValueError. Everything is committed and pushed to the branch. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (2)
.github/workflows/scripts/create-release-packages.sh:150
- The
yaml)branch appears to contain an extra, duplicated YAML fragment after the firstYAML_EOFterminator (lines following the here-doc). Those lines will be executed as shell commands and will breakcreate-release-packages.shat runtime. Remove the stray block and keep only a singlecat <<YAML_EOF ... YAML_EOFhere-doc for YAML output.
cat > "$output_dir/speckit.$name.$ext" <<YAML_EOF
version: 1.0.0
title: "$title"
description: "$description"
author:
contact: "spec-kit"
extensions:
- type: builtin
name: developer
activities:
- "Spec-Driven Development"
prompt: |
${indented_body}
YAML_EOF
author:
contact: "spec-kit"
extensions:
- type: builtin
name: developer
activities:
- "Spec-Driven Development"
prompt: |
$body
YAML_EOF
;;
.github/workflows/scripts/create-release-packages.sh:138
- In the
yaml)generator,instructions=$(... | sed 's/"/\\"/g')will change the actual prompt text by injecting backslashes; YAML block scalars don’t require quote-escaping. Also, placing${indented_body}on an indented here-doc line means only the first expanded line gets the leading indentation; subsequent lines start with just the variable’s" "prefix, which is less-indented thanprompt:and can make the YAML invalid. Emit the block scalar content without extra leading spaces (or print the indented body separately) so every prompt line is consistently indented relative toprompt: |.
instructions=$(printf '%s\n' "$body" | sed 's/"/\\"/g')
# Indent every line of body for valid YAML block scalar syntax
indented_body=$(printf '%s\n' "$instructions" | sed 's/^/ /')
cat > "$output_dir/speckit.$name.$ext" <<YAML_EOF
version: 1.0.0
title: "$title"
description: "$description"
author:
contact: "spec-kit"
extensions:
- type: builtin
name: developer
activities:
- "Spec-Driven Development"
prompt: |
${indented_body}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback
|
I've addressed the Copilot feedback:
Committed and pushed |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback
|
@mnriem I've addressed the final piece of Copilot feedback - updated the usage header comment in create-release-packages.sh to include goose in the AGENTS list. This was the last unresolved comment. All Copilot feedback has now been addressed:
Ready for review when you have a chance! |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback
|
@mnriem Three things from the latest Copilot round, plus the merge conflict. Title fallback in
Merged upstream; AGENTS.md conflict resolved by keeping both the iFlow and Goose entries. 54 tests pass, 1 skipped (expected). |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Adds a new CLI-based integration for Block’s Goose agent, including YAML “recipe” command generation and end-to-end integration tests to keep agent configs consistent across the CLI, scripts, and integration registry.
Changes:
- Introduces a new
YamlIntegrationbase class and aGooseIntegrationimplementation that generates.yamlrecipes under.goose/recipes/. - Extends
CommandRegistrarto support a newyamlcommand output format for extension/preset command registration. - Adds Goose-specific tests (including a reusable YAML integration test mixin) plus updates context-update scripts and documentation to include Goose.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/integrations/base.py |
Adds YamlIntegration for YAML recipe-based agents and wires template → YAML conversion. |
src/specify_cli/integrations/goose/__init__.py |
Defines GooseIntegration config/registrar settings. |
src/specify_cli/integrations/__init__.py |
Registers Goose as a built-in integration. |
src/specify_cli/agents.py |
Adds YAML rendering support in CommandRegistrar for command overrides. |
src/specify_cli/integrations/goose/scripts/update-context.sh |
Adds Goose integration wrapper to delegate to the shared bash context updater. |
src/specify_cli/integrations/goose/scripts/update-context.ps1 |
Adds Goose integration wrapper to delegate to the shared PowerShell context updater. |
scripts/bash/update-agent-context.sh |
Adds goose to supported agent types and routes Goose updates to AGENTS.md. |
scripts/powershell/update-agent-context.ps1 |
Adds goose to supported agent types and routes Goose updates to AGENTS.md. |
tests/integrations/test_integration_base_yaml.py |
Adds a reusable YAML integration test suite (mirrors existing TOML/Markdown patterns). |
tests/integrations/test_integration_goose.py |
Adds Goose integration test class using the YAML test mixin. |
tests/test_agent_config_consistency.py |
Adds Goose consistency assertions across runtime config, registrar config, scripts, and help text. |
README.md |
Documents Goose as a supported agent and updates tool-check wording to include Goose. |
AGENTS.md |
Adds Goose to supported agents and documents the Goose integration (but needs format-section correction). |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 13/13 changed files
- Comments generated: 2
|
@mnriem Two more from Copilot's latest pass. AGENTS.md had Goose listed under "Markdown Format" despite the rest of the doc treating it as YAML. Moved it out and added a "YAML Format" section after TOML Format with a recipe example.
1239 passed, 18 skipped. |
There was a problem hiding this comment.
Pull request overview
Adds first-class integration for Block’s Goose agent by introducing YAML recipe generation as a new command format alongside existing Markdown/TOML agents, plus docs and tests to keep agent wiring consistent.
Changes:
- Introduce
YamlIntegrationbase class andGooseIntegrationto generate.goose/recipes/speckit.*.yamlrecipe files. - Extend
CommandRegistrarto render/register YAML recipe commands (incl. title fallback + shared renderer). - Update agent-context scripts and documentation, and add integration/consistency tests for Goose.
Show a summary per file
| File | Description |
|---|---|
src/specify_cli/integrations/base.py |
Adds YamlIntegration (YAML recipe renderer + setup pipeline) used by Goose. |
src/specify_cli/integrations/goose/__init__.py |
Registers Goose integration config (folder, recipes subdir, YAML format). |
src/specify_cli/integrations/goose/scripts/update-context.sh |
Adds Goose integration wrapper to delegate context updates to shared script. |
src/specify_cli/integrations/goose/scripts/update-context.ps1 |
PowerShell equivalent Goose context-update wrapper. |
src/specify_cli/integrations/__init__.py |
Registers GooseIntegration in built-in integration registry. |
src/specify_cli/agents.py |
Adds YAML command rendering path so extensions/presets can emit Goose recipes. |
scripts/bash/update-agent-context.sh |
Adds goose agent type support (AGENTS.md shared context update). |
scripts/powershell/update-agent-context.ps1 |
Adds goose to ValidateSet + update dispatch; maps Goose to AGENTS.md updates. |
tests/integrations/test_integration_base_yaml.py |
New reusable YAML integration test mixin (mirrors TOML tests). |
tests/integrations/test_integration_goose.py |
Goose integration test coverage via YAML test mixin. |
tests/test_agent_config_consistency.py |
Adds Goose wiring consistency tests across config/registrar/scripts/help. |
README.md |
Documents Goose as a supported agent and notes .goose/recipes/ YAML recipes. |
AGENTS.md |
Documents Goose integration + YAML recipe format and conventions. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 13/13 changed files
- Comments generated: 1
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback and make sure to resolve conflicts
…ents Signed-off-by: Furkan Köykıran <furkankoykiran@gmail.com>
… support Signed-off-by: Furkan Köykıran <furkankoykiran@gmail.com>
…stry Signed-off-by: Furkan Köykıran <furkankoykiran@gmail.com>
…on/preset commands Signed-off-by: Furkan Köykıran <furkankoykiran@gmail.com>
Signed-off-by: Furkan Köykıran <furkankoykiran@gmail.com>
…t script Signed-off-by: Furkan Köykıran <furkankoykiran@gmail.com>
Signed-off-by: Furkan Köykıran <furkankoykiran@gmail.com>
Signed-off-by: Furkan Köykıran <furkankoykiran@gmail.com>
…t testing Signed-off-by: Furkan Köykıran <furkankoykiran@gmail.com>
Signed-off-by: Furkan Köykıran <furkankoykiran@gmail.com>
…, and scripts Signed-off-by: Furkan Köykıran <furkankoykiran@gmail.com>
Goose uses YAML recipes, not Markdown. Remove it from the Markdown Format
list and add a dedicated YAML Format subsection with a representative
recipe example showing prompt: | and {{args}} placeholders.
Remove the duplicate header dict, yaml.safe_dump call, body indentation, and _human_title logic from CommandRegistrar.render_yaml_command(). Delegate to YamlIntegration._render_yaml() and _human_title() so YAML recipe output stays consistent across the init-time generation and command-registration code paths.
Validate that alias_file resolves within commands_dir before writing. Uses the same resolve().relative_to() pattern already established in extensions.py for ZIP path containment checks.
6b17af4 to
3353eae
Compare
|
@mnriem Latest Copilot round addressed, plus rebased on upstream/main. Path traversal fix: The AGENTS.md rewrite in upstream (#2119) removed the agent table and agent category sections entirely, so the resolution was to drop those and carry forward only the content that fits the new architecture-focused structure: the YAML Format section in "Command File Formats", the YAML entry in "Argument Patterns", the Goose special processing notes, and the 1239 passed, 18 skipped. |
There was a problem hiding this comment.
Pull request overview
Adds a new built-in integration for Block’s Goose agent and introduces first-class YAML “recipe” generation support across Spec Kit’s integration and command-registration pipelines.
Changes:
- Introduces
YamlIntegrationbase class to generate Goose-compatible YAML recipe files (includingprompt: |blocks and{{args}}). - Adds
GooseIntegrationand registers it in the integration registry, plus updatesCommandRegistrarto emit YAML output format. - Updates agent context update scripts/docs and adds YAML-focused integration test coverage (including full file-inventory assertions).
Show a summary per file
| File | Description |
|---|---|
| tests/test_agent_config_consistency.py | Adds Goose consistency assertions across config/help/context scripts; minor test formatting refactors. |
| tests/integrations/test_integration_goose.py | Adds Goose integration test harness using the shared YAML integration test mixin. |
| tests/integrations/test_integration_base_yaml.py | Adds reusable, comprehensive test mixin for YAML-format integrations (setup/install/uninstall/CLI inventory). |
| src/specify_cli/integrations/goose/scripts/update-context.sh | Adds Goose integration wrapper to delegate context updates to shared script. |
| src/specify_cli/integrations/goose/scripts/update-context.ps1 | Adds PowerShell wrapper for Goose context updates (delegates to shared script). |
| src/specify_cli/integrations/goose/init.py | Defines GooseIntegration metadata (folder, recipes dir, YAML registrar config). |
| src/specify_cli/integrations/base.py | Adds YamlIntegration implementation (frontmatter extraction + YAML recipe rendering). |
| src/specify_cli/integrations/init.py | Registers Goose as a built-in integration. |
| src/specify_cli/agents.py | Adds YAML rendering path (render_yaml_command) and YAML support in command registration. |
| scripts/powershell/update-agent-context.ps1 | Adds goose to ValidateSet and dispatch mapping for context updates. |
| scripts/bash/update-agent-context.sh | Adds goose to supported agent list and dispatch mapping for context updates. |
| README.md | Documents Goose as a supported agent and updates CLI tool-check list. |
| AGENTS.md | Documents YAML recipe format and Goose’s integration behavior. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 13/13 changed files
- Comments generated: 1
| # | ||
| # Usage: ./update-agent-context.sh [agent_type] | ||
| # Agent types: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|junie|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|trae|pi|iflow|forge|generic | ||
| # Agent types: claude|gemini|copilot|cursor-agent|qwen|opencode|codex|windsurf|junie|kilocode|auggie|roo|codebuddy|amp|shai|tabnine|kiro-cli|agy|bob|vibe|qodercli|kimi|trae|pi|iflow|forge|goose|generic |
There was a problem hiding this comment.
The top-of-file “Multi-Agent Support” comment list a few lines above still doesn’t mention goose, but the usage line here now does. Please update the earlier list as well so the header documentation stays consistent with the actual supported agent set.
mnriem
left a comment
There was a problem hiding this comment.
Please address Copilot feedback
Description
This PR adds support for Block's Goose AI Agent to the spec-kit project. Goose is an open source AI agent (20.5k+ GitHub stars) that uses a "recipe" system with slash command support (merged in PR aaif-goose/goose#5718, November 2025).
Key Features of Goose:
.goose/recipes/directory/implement)goose --instructions <recipe.yaml>or slash commandsChanges
src/specify_cli/__init__.pysrc/specify_cli/agents.py.github/workflows/scripts/create-release-packages.sh.github/workflows/scripts/create-release-packages.ps1scripts/bash/update-agent-context.shscripts/powershell/update-agent-context.ps1README.mdAGENTS.mdtests/test_agent_config_consistency.pyTesting
uv run specify --helpuv sync && uv run pytestNote: Test execution encountered a
json5import issue that appears to be a pre-existing environment problem, not related to the Goose integration changes themselves. The consistency tests for Goose follow the exact same pattern as other agents (e.g., iflow, pi).AI Disclosure