authoring-executable-contracts
Skill1 starsChanged 3 months agoApache-2.0View on GitHub
Use when an approved design identifies APIs, events, UI-provider boundaries, or other shared interfaces that independent implementation owners must consume or provide.
In this repository13 other files it gives its agents.
- accepting-contract-first-featuresSkill
- designing-contract-first-featuresSkill
- developing-contract-first-featuresSkill
- executing-persistent-workstreamsSkill
- managing-contract-revisionsSkill
- planning-contract-workstreamsSkill
- review-agentSkill
- reviewing-and-freezing-contractsSkill
- reviewing-workstreamsSkill
- test-driven-developmentSkill
- verifying-contract-first-featureSkill
- verifying-runtime-integrationSkill
- verifying-task-gatesSkill
The file
We split this skill into the rules it gives an agent
5 rules. About 0 are common, 4 are distinctive, and 1 is very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
1
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 8
Create .dream/specs/<feature>/contracts/ from approved requirements and design.
- Distinctive: line 16
Create one artifact per boundary in its native format — HTTP APIs (OpenAPI), RPC/gRPC (protobuf or equivalent IDL), events/streams …
- Distinctive: line 41
Use OpenAPI, protobuf/IDL, AsyncAPI, JSON Schema, Avro, or typed interface schemas where appropriate, plus scenarios for stateful/semantic …
- Distinctive: line 43
When a contract has independent consumers, state the verification expectation for both sides — provider checks and consumer checks against …
- Distinctive: line 61
Only contract behavior that another owner or observable client depends on.
≈ “Common” is an estimate: at least 1 in 5 of the 213,895 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Authoring Executable Contracts
Create .dream/specs/<feature>/contracts/ from approved requirements and design.
Required Artifacts
Use:
references/contract-manifest.template.yamlreferences/scenarios.template.yaml
Create one artifact per boundary in its native format — HTTP APIs (OpenAPI), RPC/gRPC (protobuf or equivalent IDL), events/streams (AsyncAPI, JSON Schema, Avro), typed UI-provider boundaries:
.dream/specs/<feature>/contracts/
├── manifest.yaml
├── order-api.yaml # OpenAPI when applicable
├── inventory-api.proto # RPC/IDL when applicable
├── order-confirmed-event.json # event/stream schema when applicable
└── scenarios.yamlContract contents
For each boundary, define the exact observable agreement needed for independent implementation:
- identifier and revision;
- producer/provider and consumers;
- request/input shape and caller context;
- success status/result shape;
- each material failure status/result shape;
- semantic rules not expressible by schema alone;
- concrete Given/When/Then examples (follow
references/scenarios.template.yaml); - requirement IDs;
- compatibility classification for later changes.
Use OpenAPI, protobuf/IDL, AsyncAPI, JSON Schema, Avro, or typed interface schemas where appropriate, plus scenarios for stateful/semantic behavior. Schema alone is insufficient when the same shape can carry different meaning.
When a contract has independent consumers, state the verification expectation for both sides — provider checks and consumer checks against the same frozen revision (consumer-driven contract testing or equivalent schema-based verification) — so independently implemented services cannot each pass locally yet fail at integration.
Example scenario
- id: PRODUCT-DETAIL-004
requirement: REQ-PRODUCT-07
given: authenticated user has liked product P1
when: GET /products/P1
then:
status: 200
body.viewer.isLiked: trueSpecify anonymous behavior explicitly when response fields depend on current-user context.
Boundary rule
Only contract behavior that another owner or observable client depends on. Do not contract private class names, helper methods, or internal persistence structure.
Set new contracts to DRAFT in manifest.yaml (following references/contract-manifest.template.yaml). They are not implementation authority until reviewing-and-freezing-contracts marks a revision FROZEN.
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.

