Applications 🇷🇺 12.08.2026 14:02

Agent Development and Documentation Driven Development: When AI Writes Contracts, Not Code

An article describes an agentic approach where LLMs first design system contracts (OpenAPI, Proto, JSON Schema, CloudEvents, AsyncAPI) before code generation. The method, called Documentation Driven Agent Development, uses multiple prompt stages to produce and review contracts. The author demonstrates on an automatic telephone exchange (PBX) service example, distinguishing between generators and agents.
The author, Matvey Likhota, a senior Go developer, proposes a development approach where an LLM first designs a system and produces contracts such as OpenAPI, Proto, JSON Schema, CloudEvents, and AsyncAPI, with code being generated later by repeatable generators and project-dependent parts by developers and agents. He calls this Documentation Driven Agent Development or Specification Driven Agent Development. The article shows the process on a simple PBX service example. The first prompt asks the LLM to list architecturally significant questions without writing code. The second prompt generates an OpenAPI 3.1 contract with strict requirements including RFC 9457 errors, Idempotency-Key, If-Match/ETag, and cursor pagination. Then an adversarial review prompt critiques the contract for defects. For event contracts, CloudEvents 1.0 is used with a catalog of events like CallStarted, CallAnswered, CallMissed. WebSocket contracts are described via AsyncAPI 3.0, and internal APIs are designed as gRPC with proto3. The article emphasizes separating contract design from code generation and using review prompts to catch inconsistencies.
Source: Habr — хаб ИИ — original
Our earlier posts on this topic ↓
Fresh news