contract-tests
Skill1 starsChanged 3 months agoMITView on GitHub
Defines the content and structure of consumer-driven contract tests for a Slice's interfaces. Reference when assembling or reviewing slices/<id>/verification/contracts/*.
In this repository17 other files it gives its agents.
- acceptance-criteriaSkill
- adjudication-recordSkill
- adrSkill
- behavior-inventorySkill
- characterization-suiteSkill
- context-modelSkill
- cutover-planSkill
- design-docSkill
- divergence-registerSkill
- interface-inventorySkill
- migration-waypointsSkill
- observability-specSkill
- retirement-registerSkill
- roadmapSkill
- slice-outlineSkill
- tactical-modelSkill
- variation-policySkill
The file
Files
Contract Tests
Defines what a contract test must assert. Distinct from the characterization suite: characterization proves the new implementation matches the old system's observed behavior; contract tests prove the new implementation's published surface still satisfies what its actual consumers depend on, independent of internal changes.
Schema anchor
schemas/interface.schema.json. Each contract test corresponds to exactly one Interface record and should be named or tagged with that Interface's id — the traceability spine runs Interface → contract test just as it runs Behavior → characterization test.
Content obligations
- One contract test set per Interface with known consumers (
interface.consumers[]non-empty, orconsumers_complete: false— an interface with possibly-unknown consumers still needs its declared contract tested). - For sync interfaces: assert the request/response schema consumers actually rely on, not the full internal schema if it is broader than what is published.
- For async interfaces: assert payload schema, and where ordering or partition key are part of the published contract, assert those too — a consumer relying on partition-key-based ordering breaks silently if that contract is dropped, with no error anywhere.
- Where
consumers[]entries have low or unknown confidence, treat the contract conservatively — do not narrow it based on unconfirmed consumer assumptions.
Behavior-ID citation
Contract tests cite the Interface, not a Behavior directly, but should reference the Behaviors whose evidence established the contract's shape (behavior.interfaces[] pointing at this Interface) so a reviewer can trace why the contract looks the way it does.
What this skill does not cover
Consumer migration guidance or deprecation notices for the legacy surface — that is the Consumer Migration Workstream's territory (07-stages.md §4), driven by /ddd-migrate, not this skill.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

