feat(openspec): Phase 4 Developer Growth & Go-to-Market Readiness

OpenSpec change: phase-4-developer-growth (spec-driven, 4/4 artifacts)

6 workstreams, 90 implementation tasks, delivery sequence:
WS1 → WS2 + WS3 (parallel) → WS4 → WS5 → WS6

Workstreams:
1. Production Hardening — ioredis rate limiting, DB pool tuning, /health/detailed, k6 load tests
2. Developer Portal — Next.js 14, Swagger UI explorer, onboarding wizard, pricing/SDK pages
3. CLI Tool — sentryagent npm CLI, 5 commands, shell completion
4. Agent Marketplace — public searchable registry powered by existing agent/DID infrastructure
5. GitHub Actions — register-agent + issue-token Actions via OIDC (no stored secrets)
6. Billing & Usage Metering — Stripe Checkout, webhook-driven state, free tier enforcement

New capabilities (8 specs): production-hardening, developer-portal, cli-tool,
agent-marketplace, github-actions, billing-metering (+delta: web-dashboard, monitoring)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
SentryAgent.ai Developer
2026-04-02 04:00:34 +00:00
parent f1fbe0e29a
commit b0f70b7ac4
12 changed files with 630 additions and 0 deletions

View File

@@ -0,0 +1,50 @@
## Why
Phases 13 delivered a complete, enterprise-grade AgentIdP — authenticated, federated, multi-tenanted, and SOC 2 prepared. The product now needs to reach developers: Phase 4 shifts from building infrastructure to growing the ecosystem by making SentryAgent.ai frictionless to discover, adopt, and operate at scale in production.
## What Changes
- **Production Hardening**: Replace in-memory rate limiter with Redis-backed distributed limiter; tune database connection pooling; add detailed health endpoint; introduce k6 load test suite
- **Public Developer Portal**: Next.js 14 public website with interactive API explorer (Swagger UI), guided agent registration wizard, free tier docs, and SDK links
- **CLI Tool** (`sentryagent`): npm-installable CLI for register-agent, list-agents, issue-token, rotate-credentials, and tail-audit-log with `~/.sentryagent/config.json` and shell completion
- **Agent Marketplace**: Searchable public registry of AGNTCY-compliant agents with DID documents, capabilities, and publisher profiles — powered by existing agent registry and DID infrastructure
- **GitHub Actions Integration**: `sentryagent/register-agent` and `sentryagent/issue-token` Actions using OIDC federation with GitHub's OIDC provider — published to the GitHub Actions Marketplace
- **Billing & Usage Metering**: Stripe integration for paid tier; per-tenant usage tracking (API calls, active agents, token issuances); free tier limits enforced; usage dashboard in existing web dashboard
## Capabilities
### New Capabilities
- `production-hardening`: Redis-backed rate limiting, connection pooling, detailed health endpoint, and k6 load test suite
- `developer-portal`: Next.js 14 public website with Swagger UI API explorer, onboarding wizard, and SDK links
- `cli-tool`: `sentryagent` npm CLI with full agent lifecycle commands and shell completion
- `agent-marketplace`: Searchable public registry of published AGNTCY-compliant agents with DID documents
- `github-actions`: `register-agent` and `issue-token` GitHub Actions using OIDC federation
- `billing-metering`: Stripe-backed paid tier, per-tenant usage tracking, free tier enforcement, and usage dashboard
### Modified Capabilities
- `web-dashboard`: Usage metering panel added to existing dashboard (new billing/usage tab)
- `monitoring`: New Prometheus metrics for rate limiter hits, connection pool saturation, and per-tenant API call counters
## Impact
**Code affected:**
- `src/middleware/rateLimiter.ts` — replace express-rate-limit (in-memory) with ioredis-backed limiter
- `src/infrastructure/database.ts` — pg connection pool tuning
- `src/routes/health.ts` — add `/health/detailed` endpoint
- `src/services/UsageService.ts` — new service for per-tenant metering
- `src/controllers/BillingController.ts` — new controller for Stripe webhooks and subscription management
- `portal/` — new Next.js 14 application (separate directory)
- `cli/` — new CLI package (separate directory)
- `marketplace/` — new marketplace routes added to existing Express API
- `.github/actions/` — two new GitHub Actions
**New dependencies (CEO approved):**
- `ioredis` — Redis-backed rate limiting (WS1)
- `next` + `tailwindcss` — Developer portal (WS2)
- `swagger-ui-react` — Interactive API explorer (WS2)
- `commander` + `chalk` — CLI framework (WS3)
- `stripe` — Billing (WS6)
**Delivery sequence:** WS1 → WS2 + WS3 (parallel) → WS4 → WS5 → WS6