contracts

Define and enforce contracts coordinating cross-task dependencies across design phases.

Updated Dec 1, 2025
One-click install
npx skills add https://github.com/Clouder0/dotagent --skill contracts
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: contracts
Source: https://github.com/Clouder0/dotagent/tree/main/.claude/skills/contracts
Command: npx skills add https://github.com/Clouder0/dotagent --skill contracts

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Contract lifecycle management - creation, consumption, modification, and resolution.

Core Features & Use Cases

  • Phase-based contracts: Design, materialize, implement, verify, and resolve.
  • Explicit dependencies: Contracts declare providers and consumers.

Quick Start

Define a new contract in the design phase and materialize it before parallel implementation.

Frequently Asked Questions about contracts

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

FAQPage Schema
How do I define contracts between tasks to coordinate parallel work?▼

Contracts define safe cross-task interfaces by declaring providers, consumers, and dependencies. Create a contract in the design phase, specify its type (interface, data_structure, api, or event), and store it in memory/contracts/{contract-name}.json with name, version, status, definition, and description fields. This enables parallel task execution with enforced boundaries.

What's the difference between contract types, and when should I use each one?▼

Contract types serve different coordination needs: interface contracts define function signatures, data_structure contracts specify format schemas, api contracts document endpoint requirements, and event contracts establish message flows. Choose based on how tasks exchange information—use interface for function calls, data_structure for shared formats, api for service boundaries, and event for asynchronous messaging.

Can I modify a contract after tasks have started consuming it?▼

Contracts support versioning and breaking-change rules to manage modifications. Update the version field and document changes in the history array. Breaking changes require consumer notification and coordination; non-breaking changes (additions) can proceed with version increment. Store all versions in memory/contracts/{contract-name}.json to track evolution.

How do I track which tasks are providing or consuming a contract?▼

Each contract stores a consumers array listing all tasks that depend on it, and the source_design field captures the originating task or architect decision. This explicit dependency declaration enables impact analysis when contracts change and prevents circular dependencies across design, materialize, implement, verify, and resolve phases.

What happens when a contract violation occurs during task execution?▼

The Contract-Resolver role detects violations during the resolve phase by comparing task outputs against contract definitions. Use the status field (draft, active, deprecated) and history to trace which version was violated. Violations trigger resolution workflows that either enforce compliance or escalate breaking changes for architect review.

Do I need contracts for all task dependencies or only critical ones?▼

Use contracts for dependencies where explicit interface definition prevents integration failures—particularly across architect, executor, implementer, and verifier roles. Minimal, complete contracts capture only required fields and behaviors. Lightweight intra-phase dependencies may not need formal contracts if coupling is low.

Related Skills