v0.2.0 — Structured Output, Guardrails, Facts & Provenance
What's New
All features are backward compatible — no breaking changes.
Structured Output
Task.Structured (*StructuredOutput) requires the model to produce JSON validated against a JSON Schema, with a bounded repair loop (RepairMax, default 2). New sentinels ErrInvalidOutput and ErrRepairBudgetExceeded. Minimal in-house schema validator (type, properties, required, enum, items) — stdlib only, no new dependencies.
Guardrails
Crew-level (Crew.Guardrails) and task-level (Task.Guardrail) post-output validation hooks that block publication of outputs violating business invariants. New sentinel ErrBlockedByGuardrail. Functional options WithGuardrails (crew) and WithGuardrail (task). Complements structured-output schema validation (shape vs. meaning).
Facts & Provenance
First-class Fact type populated only by FactSource tools, never by the LLM. Facts carry source org, source URL, collection time, and payload hash (SHA-256). NewFactSourceTool constructor, AllFactsProvenanced helper for guardrails, dedupFacts by PayloadHash. CrewOutput.Facts and TaskOutput.Facts.
Other
gofmtapplied to all Go files (CI now enforces formatting).
Full Changelog: v0.1.0...v0.2.0