Your API works. But can a developer onboard in 15 minutes? Can an AI agent use it without reading your docs?
Most APIs answer one of those questions. This playbook answers both.
cd tools && npm install
node scan.js --spec your-spec.yamlββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β API Lifecycle Readiness Report Β· your-spec.yaml β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β Overall Score: 20/100 β Needs work β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β DevEx 10/25 ββββββββββββββββββββββ β
β AX 0/25 ββββββββββββββββββββββ β
β Governance 10/25 ββββββββββββββββββββββ β
β Reliability 0/25 ββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β A1 x-capability missing on all operations
β A2 intent not declared β agents can't discover purpose
β A3 safety classification missing β agents can't decide safely
π‘ Run: node scan.js --spec your-spec.yaml --fix
That's any real API today. Including yours. Including Stripe's.
Now fix it:
node scan.js --spec your-spec.yaml --fix
# β writes your-spec-enriched.yaml with x-capability skeleton
# β fill in the intent fields (5 min)
# β re-scan: 80/100Your API now has intent metadata β the thing that makes it work for humans and AI agents simultaneously.
# Before β describes operations
POST /orders
# After β describes intent
POST /orders:
x-capability:
intent: "Create a commerce order with payment capture"
safety: mutating
side-effects: [payment-capture, inventory-reserve]
composable-with: [checkInventory, dispatchFulfillment]A human reads intent and understands the API.
An AI agent reads intent to decide whether this tool solves its current task.
One spec. Two audiences. 15 lines of YAML.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β THE API PRODUCT LIFECYCLE β REDESIGNED FOR THE AGENTIC ERA β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β β
β LIFECYCLE STAGES β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β β DESIGN ββ β BUILD ββ β DISCOVER ββ β OPERATE ββ β EVOLVE ββ SUNSET β
β βContract β βGateway β βPortal β βSLOs per β βSchema + β Runway β
β β+ Intent β β+3 Trust β β+ MCP β βconsumer β βIntent + β + Cap. β
β βFirst β βModels β β+ Catalog β βtype β βArazzo β Redir. β
β ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ ββββββββββββ β
β β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β CONSUMER PLANE β
β Consumer β Discovery β Auth β Key Metric β
β βββββββββββββΌβββββββββββββββββββββββΌββββββββββββββββββββββΌββββββββββββββββββ β
β Human β Portal + Docs β OAuth 2.0 + PKCE β TTFHW < 15 min β
β Pipeline β SDK + CLI β Scoped API Keys β Contract pass % β
β Agent β MCP + Cap. Registry β Short-lived scoped β Intent resolution β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β PLATFORM ENGINEERING PLANE β
β API Gateway Β· Policy Engine (OPA/Cedar) Β· Capability Registry β
β OpenTelemetry Β· Spectral Governance-as-Code Β· Arazzo Workflows β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β PRODUCT DISCIPLINE PLANE β
β API Product Owner Β· Lifecycle Roadmap Β· DevEx + AX Metrics Β· Sunset Plan β
β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ£
β THROUGHLINE: "What can I accomplish?" β not just "What can I call?" β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
cd tools && node scan.js --spec your-spec.yaml| Dimension | What it measures | Max |
|---|---|---|
| DevEx | operationId, descriptions, servers, contact, RFC 9457 errors | 25 |
| AX | x-capability, intent, safety, side-effects, idempotency | 25 |
| Governance | Spectral ruleset, GitHub Actions, deprecation runway | 25 |
| Reliability | ProblemDetails schema, composability, MCP config | 25 |
--fix mode rewrites your spec with x-capability skeleton automatically.
01-spec-pattern/before.yaml β what every API looks like today.
01-spec-pattern/after.yaml β the same API, agent-ready.
Three real domain examples: commerce, identity, payments.
# npm (Mac / Windows / Linux)
cd 02-governance && npm install
npm run lint:api -- --spec your-spec.yaml
# GitHub Actions β copy to your repo, zero config
cp .github/workflows/api-lint.yml your-repo/.github/workflows/5 Spectral rules. Blocks merge if intent metadata is missing.
cd 03-agent-bridge && npm install
node generate-mcp.js --spec your-spec-enriched.yaml --base-url https://your-api.com/v1Generates a valid MCP server config. Register with Claude Desktop or Kiro. Your API is now discoverable by agents.
04-measure/lifecycle-scorecard.md β 30 questions across all 6 lifecycle stages. Score 1β5. Find the weakest stage. Start there.
| Stage | Questions |
|---|---|
| Design | Spec-first? Intent metadata? Design review? |
| Build | Auth at gateway? Multi-consumer auth models? |
| Discover | TTFHW measured? MCP-mappable? |
| Operate | SLOs per consumer type? Developer churn tracked? |
| Evolve | Intent contracts in CI? Consumer registry? |
| Sunset | Deprecation runway? Zombie API detection? |
Also includes: developer churn SQL for AWS API Gateway, Kong, and Nginx.
Open this repo in your AI coding tool and say "make my API agent-ready" β it works automatically.
| Tool | What happens |
|---|---|
| Kiro | Loads 3 steering files + 3 skills: annotate spec, scan, generate MCP config |
| Claude Code | /make-api-agent-ready Β· /scan-api Β· /generate-mcp slash commands |
| Cursor | .cursorrules loaded β understands x-capability pattern |
| GitHub Copilot | .github/copilot-instructions.md loaded |
| Any AI agent | AGENTS.md β universal context |
1. Fork this repo
2. node scan.js --spec your-spec.yaml β see the score
3. node scan.js --spec your-spec.yaml --fix β skeleton generated
4. Fill in intent fields β 5 min
5. node scan.js --spec your-spec-enriched.yaml β verify score
6. node generate-mcp.js --spec ... β MCP config ready
7. Register with Claude Desktop or Kiro β agents can use your API
MIT β fork it, adapt it, ship it.
Authored by Darshit Pandya Senior Principal Engineer β Platform @ Serko Β· AWS Community Builder Β· Auckland, New Zealand
"Great API platforms don't start with endpoints. They start with intent." "The lifecycle is the product. The intent is the interface."
Part of the platformpioneer.io open-source playbook series.
From the talk: "The API Product Playbook: Managing the Full Lifecycle for a World-Class DevEx and Agent Experience" β NZ Tech Rally 2026