What problem does it solve?
Changing structured JSON output from the golem-cli requires keeping Rust DTOs, serde serialization, the handwritten JSON Schema, and property-based test generators in sync, and drift between them silently breaks downstream consumers.
Core Features & Use Cases
- Schema Synchronization Rules: Enforces that command-output.schema.json matches actual serde output, including tagged enums, flattened payloads, and nullable Option fields.
- $type Contract Governance: Defines naming conventions for output type discriminators and required metadata like x-golem-output-mode and x-golem-command.
- Generator and Validation Workflow: Directs updates to DTO-backed arbitrary generators in cli_output/tests.rs and lists the exact cargo test and cargo make commands to validate changes.
- Use Case: When adding a new
agent.invoke output field, follow the workflow to update the DTO, schema, generator, and user-facing skills, then run the focused schema tests to confirm no drift.
Quick Start
Ask the agent to add a new field to a golem-cli structured output type and update the output schema, generators, and tests accordingly.