the goose recipe renderer (YamlIntegration._render_yaml in src/specify_cli/integrations/base.py) writes the prompt body under a bare | block scalar. yaml infers a plain block scalar's indentation from its first non-empty line, so when a command body's first line is itself indented (for example a markdown code block or a nested list continuation), the parser expects that deeper indentation for the whole block and rejects the later, shallower lines. the generated .goose recipe then fails to parse.
repro:
import yaml
from specify_cli.integrations.base import YamlIntegration
body = " indented first line\nback to normal"
out = YamlIntegration._render_yaml("Title", "Desc", body, "src")
yaml.safe_load(out) # yaml.parser.ParserError: expected <block end>, but found '<scalar>'
it also reproduces through the public CommandRegistrar().render_yaml_command({"description": "d"}, body, "src") path.
a plain body (first line not indented) is unaffected, which is why the existing fixtures don't catch it.
note: i used an ai assistant to help investigate and write this up.
the goose recipe renderer (
YamlIntegration._render_yamlinsrc/specify_cli/integrations/base.py) writes the prompt body under a bare|block scalar. yaml infers a plain block scalar's indentation from its first non-empty line, so when a command body's first line is itself indented (for example a markdown code block or a nested list continuation), the parser expects that deeper indentation for the whole block and rejects the later, shallower lines. the generated.gooserecipe then fails to parse.repro:
it also reproduces through the public
CommandRegistrar().render_yaml_command({"description": "d"}, body, "src")path.a plain body (first line not indented) is unaffected, which is why the existing fixtures don't catch it.
note: i used an ai assistant to help investigate and write this up.