add-contract

Define or update interface contracts between graph nodes with edge tests.

Updated May 17, 2026
One-click install
npx skills add https://github.com/Arrosam/Modular-Dev --skill add-contract
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: add-contract
Source: https://github.com/Arrosam/Modular-Dev/tree/main/skills/add-contract
Command: npx skills add https://github.com/Arrosam/Modular-Dev --skill add-contract

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill removes the manual overhead of defining and changing interfaces between modular nodes, helping you avoid broken dependencies, hidden coupling, and inconsistent project graphs.

Core Features & Use Cases

  • New Contract Setup: Create a contract from scratch, connect the relevant nodes, and add the required graph and overview artifacts.
  • Breaking Change Handling: Safely modify an existing contract by analyzing impacted nodes, snapshotting done work, and retesting compatibility.
  • Contract-Driven Validation: Generate edge tests that verify positive paths, boundary cases, error handling, and state transitions before implementation proceeds.

Quick Start

Use the add-contract skill to define a new interface between two nodes, update the graph, and create the matching edge tests.

Frequently Asked Questions about add-contract

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

FAQPage Schema
How do I keep interface contracts and tests in sync during modular development?

You sync interface contracts and tests by updating graph node connections and generating matching edge tests. This workflow prevents broken dependencies and inconsistent module behavior in modular codebases.

What is the best way to handle breaking changes in modular codebase dependencies?

Handling breaking changes requires analyzing impacted nodes, snapshotting completed work, and retesting compatibility. This ensures contract modifications do not introduce hidden coupling or break existing interface connections within the project graph.

How do I generate edge tests for contract-driven development workflows?

Generate edge tests for contract-driven development by validating positive paths, boundary cases, error handling, and state transitions. This verifies interface connections before implementation proceeds and ensures modular code behaves consistently.

Do I need to update graph.json when adding a new contract between nodes?

Yes, adding a new contract requires graph.json updates to register the interface connection. You must also create contract overviews and apply scoped commits to accurately reflect the new dependencies in the project graph.

Can I use contract-driven validation to prevent hidden coupling in a project graph?

Contract-driven validation prevents hidden coupling by enforcing impact analysis and node retesting before modifying connections. By defining explicit interface contracts, you remove manual overhead and avoid inconsistent project graph dependencies.