Contract

From griffinwork40/agent-framework · View interactive version

Contract is an AI agent skill from the GitHub repository griffinwork40/agent-framework. Reference convention for sub-agent I/O schemas. Loaded by orchestrator skills via /contract and into agents via the `skills:` field.

How to use this skill

Skill file

Contract

For each sub-agent you plan to dispatch, define a schema before the call:

Embed the schema at the top of every sub-agent's prompt and require results in that exact shape. Instruct each sub-agent explicitly: "Return ONLY the schema fields. No preamble, no analysis prose, no explanation — begin your response with the first schema field." When sub-agents return, validate field-by-field. If any artifact is missing, malformed, or wrapped in prose, re-dispatch only the failing sub-agent with the gap cited. Merge only schema-valid responses.

Also instruct each sub-agent to stop on non-convergence: if repeated attempts at the same sub-goal stop making progress after a few tries, do not keep retrying — return the best partial result through the schema's designated failure/partial channel (failure_modes, or whatever blocked/unverified field that agent's schema defines), naming what could not be resolved. Activity is not progress.

Epistemic confidence

Recommended for all sub-agents. Add to your return schema:

This is NOT required — skills that don't return it continue to work. But when present, coverage gaps and boundary flags surface automatically during merge, preventing silent failures.

Skip if

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.