#704·agents

Gardener: parse generated frontmatter with a real YAML loader

Author: wshobsonCreated Sep 13, 2026Updated Sep 13, 2026

PR #700 fixes the OpenCode and Copilot adapters dropping quotes from frontmatter values. Before the fix, 9 OpenCode files and 31 Copilot files under the generated trees failed yaml.safe_load, and neither make validate nor make garden noticed. Both read frontmatter with the tolerant parse_frontmatter helper in tools/adapters/base.py rather than a YAML parser.

Proposal: add a gardener check at error severity that runs yaml.safe_load over every emitted frontmatter block under .codex, .opencode, .copilot, and .antigravity, and reports the file and the parser error. #700 adds PyYAML unit tests for the emitters. The gardener check covers the generated trees end to end, so a new adapter or a new value shape can't regress silently.

Acceptance: make garden reports 0 errors on main once #700 is merged, and restoring the old OpenCode emitter makes it report 9 errors.