You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(goose): map commands to recipes and subagents to sub-recipes
Goose recipes are reusable YAML workflow files discovered in .goose/recipes/
(project) and ~/.config/goose/recipes/ (global). Add two adapters:
- GooseCommand: commands -> top-level recipes (.goose/recipes/<name>.yaml).
The command body becomes the recipe `prompt`.
- GooseSubagent: subagents -> sub-recipes (.goose/recipes/subagents/<name>.yaml),
referenced from a parent recipe's `sub_recipes` by relative path. The subagent
body becomes the recipe `instructions`.
Recipes require version/title/description plus instructions|prompt; title
defaults to the file name and description to the rulesync description (falling
back to title), version to 1.0.0. Any other recipe field (parameters,
extensions, sub_recipes, …) round-trips through the rulesync `goose` section.
Subagents live in the `subagents/` subdirectory so the command-recipe and
subagent-recipe file sets stay disjoint (the command importer scans
.goose/recipes/*.yaml non-recursively), preventing import/orphan-deletion
cross-over. Register goose in the commands and subagents processors (both
project + global), add gitignore entries, README/docs matrix updates, and
unit + E2E happy-path coverage.
Refs #1823 (Goose recipes/sub-recipes; skills still tracked by #1115)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Goose configures MCP servers as **extensions** in the shared user config `~/.config/goose/config.yaml`, which is **global only** (Goose has no project-scoped MCP location), so they are generated with `--global`. The schema is non-standard, so Rulesync maps canonical MCP fields to Goose's: `command` → `cmd` (an array `command` folds its tail into `args`), `env` → `envs`, `url`/`httpUrl` → `uri`, and `disabled: true` → `enabled: false`. The `type` is derived — `command` ⇒ `stdio`, a remote `url` ⇒ `streamable_http` (or `sse` when the canonical `type` is `sse`). Each extension also carries its own `name`. Generation merges the `extensions:` block into the existing `config.yaml`, preserving other Goose settings (model, provider, ...), and the file is never deleted. See the [Goose extensions docs](https://block.github.io/goose/docs/getting-started/using-extensions/).
573
573
574
+
### Goose-specific: commands and subagents as recipes
575
+
576
+
Goose [recipes](https://block.github.io/goose/docs/guides/recipes/recipe-reference/) are reusable YAML workflow files (`version`, `title`, `description`, plus at least one of `instructions` / `prompt`, and optional `extensions`, `parameters`, `sub_recipes`, …). Rulesync maps:
577
+
578
+
-**commands → top-level recipes** at `.goose/recipes/<name>.yaml` (project) and `~/.config/goose/recipes/<name>.yaml` (global). The command body becomes the recipe `prompt`.
579
+
-**subagents → sub-recipes** at `.goose/recipes/subagents/<name>.yaml` (project) and `~/.config/goose/recipes/subagents/<name>.yaml` (global), referenced from a parent recipe's `sub_recipes` list by relative `path`. The subagent body becomes the recipe `instructions`.
580
+
581
+
Subagents live in the `subagents/` subdirectory so the command-recipe and subagent-recipe file sets stay disjoint (import and orphan deletion never cross over). `title` defaults to the file name and `description` to the rulesync `description` (falling back to `title`) since recipes require both; `version` defaults to `1.0.0`. Any other recipe field round-trips through the rulesync `goose` section of a command/subagent.
582
+
574
583
## `.rulesync/.aiignore` or `.rulesyncignore`
575
584
576
585
Rulesync supports a single ignore list that can live in either location below:
Goose configures MCP servers as **extensions** in the shared user config `~/.config/goose/config.yaml`, which is **global only** (Goose has no project-scoped MCP location), so they are generated with `--global`. The schema is non-standard, so Rulesync maps canonical MCP fields to Goose's: `command` → `cmd` (an array `command` folds its tail into `args`), `env` → `envs`, `url`/`httpUrl` → `uri`, and `disabled: true` → `enabled: false`. The `type` is derived — `command` ⇒ `stdio`, a remote `url` ⇒ `streamable_http` (or `sse` when the canonical `type` is `sse`). Each extension also carries its own `name`. Generation merges the `extensions:` block into the existing `config.yaml`, preserving other Goose settings (model, provider, ...), and the file is never deleted. See the [Goose extensions docs](https://block.github.io/goose/docs/getting-started/using-extensions/).
573
573
574
+
### Goose-specific: commands and subagents as recipes
575
+
576
+
Goose [recipes](https://block.github.io/goose/docs/guides/recipes/recipe-reference/) are reusable YAML workflow files (`version`, `title`, `description`, plus at least one of `instructions` / `prompt`, and optional `extensions`, `parameters`, `sub_recipes`, …). Rulesync maps:
577
+
578
+
-**commands → top-level recipes** at `.goose/recipes/<name>.yaml` (project) and `~/.config/goose/recipes/<name>.yaml` (global). The command body becomes the recipe `prompt`.
579
+
-**subagents → sub-recipes** at `.goose/recipes/subagents/<name>.yaml` (project) and `~/.config/goose/recipes/subagents/<name>.yaml` (global), referenced from a parent recipe's `sub_recipes` list by relative `path`. The subagent body becomes the recipe `instructions`.
580
+
581
+
Subagents live in the `subagents/` subdirectory so the command-recipe and subagent-recipe file sets stay disjoint (import and orphan deletion never cross over). `title` defaults to the file name and `description` to the rulesync `description` (falling back to `title`) since recipes require both; `version` defaults to `1.0.0`. Any other recipe field round-trips through the rulesync `goose` section of a command/subagent.
582
+
574
583
## `.rulesync/.aiignore` or `.rulesyncignore`
575
584
576
585
Rulesync supports a single ignore list that can live in either location below:
0 commit comments