Skip to content

v0.2.0 — Structured Output, Guardrails, Facts & Provenance

Choose a tag to compare

@rhgs rhgs released this 07 Aug 17:00
· 22 commits to main since this release
Immutable release. Only release title and notes can be modified.
fcb59cb

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

  • gofmt applied to all Go files (CI now enforces formatting).

Full Changelog: v0.1.0...v0.2.0