Skip to content

Darshitpandya/api-lifecycle-devex-ax

api-lifecycle-devex-ax

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.

License: MIT platformpioneer.io OpenAPI Spectral


See the gap in 30 seconds

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/100

What just happened

Your 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 Blueprint

╔════════════════════════════════════════════════════════════════════════════════╗
β•‘      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?"           β•‘
β•šβ•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•β•

What's in the box

πŸ”¬ Scanner β€” scores your API /100 across 4 dimensions

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.


πŸ“ Spec Pattern β€” the before/after that explains everything

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.


βš™οΈ Governance-as-Code β€” drop into CI today

# 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.


πŸ€– Agent Bridge β€” connect your API to any AI agent

cd 03-agent-bridge && npm install
node generate-mcp.js --spec your-spec-enriched.yaml --base-url https://your-api.com/v1

Generates a valid MCP server config. Register with Claude Desktop or Kiro. Your API is now discoverable by agents.


πŸ“Š Lifecycle Scorecard β€” rate your entire API program

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.


🧠 Works with your AI coding tool

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

The 30-minute path from any API to agent-ready

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

License

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

About

Score any OpenAPI spec /100 for DevEx + Agent Experience. x-capability pattern, Spectral governance, MCP generator.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors