design-output-contracts

Designs structural output contracts forcing AI models to render designed UI instead of prose.

1|Updated Jul 13, 2026
One-click install
npx skills add https://github.com/dineshrevunuru/SuperSkills --skill design-output-contracts-dineshrevunuru
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: design-output-contracts
Source: https://github.com/dineshrevunuru/SuperSkills/tree/main/design-output-contracts
Command: npx skills add https://github.com/dineshrevunuru/SuperSkills --skill design-output-contracts-dineshrevunuru

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? AI features leak prose replies and fabricate facts when the model is merely prompted to behave. This Skill replaces prompt-level requests with structural guarantees — forced tool calls, closed enums, and verified data stores — so the model physically cannot emit raw text or invent numbers. ## Core Features & Use Cases - Three contract levels: classifier contracts (closed-enum intent routing), render-tools contracts (component library as tool set), and tool-loop contracts with server-side fact hydration for live agents. - Five structural layers: forced tool_choice, prose-free schemas, closed and total enums with designed fallback recipes, renderer-only screen access, and verified-store data hydration. - Reliability spine: keyword-regex backstop, server-side output validation, confidence thresholds, and a split between guide (willing-but-lost) and fallback (off-limits) failure intents. - Use Case: Building a voice-first portfolio router where any visitor utterance — including gibberish or off-limits salary questions — resolves to a designed UI recipe, never a raw model sentence. ## Quick Start Use this skill to design the intent router and output contract for my AI feature so the model can only render designed components and never reply in prose.

Frequently Asked Questions about design-output-contracts

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I stop an LLM from replying in prose instead of structured output?

Force a named tool call with tool_choice so the model must return a tool-use JSON block and cannot emit an assistant text message. Combine this with a schema containing no prose-shaped fields like message, reply, or text.

How do I prevent an AI feature from hallucinating numbers or prices?

Have the model select fact IDs only, and hydrate every rendered price, metric, or quote from a hand-verified server-side data store keyed by ID. The model names which verified fact renders but never authors its value, making fabrication structurally impossible.

What is the difference between prompting for JSON and forcing a tool call?

Prompting for JSON buys a tendency — the model usually complies but can still leak prose. Forcing tool_choice is an API-level lock that buys a guarantee, since the model physically cannot return a plain text message.

What should happen when user input matches no intent?

Split unmatched input into two designed intents: guide for willing-but-lost users needing re-orientation, and fallback for off-limits or off-catalog asks requiring an honest decline. Both are designed recipes inside the enum, never a raw error string.

Does a forced tool call still need output validation?

Yes. Validate server-side that a tool_use block exists, the intent is actually in the enum, and confidence clears a threshold such as 0.45. On any failure, degrade to a deterministic keyword backstop route rather than a blank screen.

When is a constrained output contract not necessary?

Skip it for internal tools where an occasional prose leak costs nothing — a tendency from prompting is enough. Use the guarantee only when one leak kills credibility, such as a wrong spoken price or a stray paragraph on a customer-facing surface.