doc-ctr

Create Layer 9 Data Contracts with Markdown and YAML files.

16|3|Updated Nov 10, 2025
One-click install
npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill doc-ctr
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: doc-ctr
Source: https://github.com/vladm3105/aidoc-flow-framework/tree/main/.claude/skills/doc-ctr
Command: npx skills add https://github.com/vladm3105/aidoc-flow-framework --skill doc-ctr

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill defines Data Contracts (CTR) that specify APIs and data schemas, providing a dual-file format (MD + YAML) when needed to ensure precise interface definitions and contract testing.

Core Features & Use Cases

  • Specify endpoints, data models, and validation rules
  • Link CTR to REQ, SPEC, and TASKS for traceability
  • Enable contract testing and integration planning

Quick Start

Create a CTR with API endpoints and corresponding YAML schema, linked to REQ IDs.

Frequently Asked Questions about doc-ctr

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

FAQPage Schema
How do I define API contracts using OpenAPI and JSON Schema?

API contracts formalize endpoint definitions, data models, and validation rules using OpenAPI 3.0 or JSON Schema. Create a dual-file format (Markdown + YAML) with structured sections including Document Control, Contract Overview, Business Context, Contract Definition, Usage Examples, Validation Rules, Error Handling, and Traceability to establish precise, verifiable interface specifications across distributed systems.

When do I need Data Contracts (CTR) for microservices?

Data Contracts are essential when multiple teams share APIs, building microservices or distributed systems requiring formal interface documentation. Apply CTR when business requirements, specifications, and implementation artifacts exist upstream, ensuring traceable contracts that enable contract testing and integration planning between services.

How do I link API contracts to requirements and implementation artifacts?

Link CTR documents to REQ, SPEC, and TASKS artifacts using traceability sections within the contract structure. This establishes bidirectional mapping between business requirements, formal specifications, and implementation tasks, enabling teams to verify that APIs fulfill original requirements and support downstream deployment validation.

What's the difference between defining contracts in Markdown versus YAML?

The dual-file format uses Markdown for human-readable documentation (sections, context, examples, rationale) and YAML for machine-readable schema definitions and validation rules. This combination enables both team collaboration and automated contract testing while maintaining a single source of truth for interface specifications.

Can I use Data Contracts for validation and error handling?

Yes. CTR includes structured Validation Rules and Error Handling sections that define constraints, data types, required fields, and error responses. These machine-readable specifications enable contract testing frameworks to automatically validate API payloads and enforce consistent error behavior across microservices.

Do I need existing documentation before creating a Data Contract?

Data Contracts require upstream artifacts—business requirements documents (BRD), specifications, and implementation tasks—to establish context and traceability. This ensures contracts reflect agreed-upon business intent and link technical interface definitions to organizational requirements and deployment plans.