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>
1.6 KiB
1.6 KiB
ADDED Requirements
Requirement: Usage dashboard tab displays per-tenant metering data
The web dashboard SHALL include a "Usage" tab in the main navigation displaying the current billing period's usage: API calls used / daily limit, active agents count / agent limit, token issuances this period. Usage data SHALL be fetched from GET /billing/usage (new authenticated endpoint). The tab SHALL update on page load and on a 60-second polling interval.
Scenario: Usage tab shows current metrics
- WHEN an authenticated user navigates to the Usage tab
- THEN the dashboard displays current API call count, agent count, and token issuance count for the current billing period
Scenario: Free tier warning shown when approaching limit
- WHEN a free-tier tenant has used ≥ 80% of their daily API call limit
- THEN a warning banner is displayed with a link to the upgrade/pricing page
Requirement: Billing status panel shows subscription tier and upgrade CTA
The web dashboard Usage tab SHALL include a billing status panel showing: current tier (Free / Paid), subscription status (active / cancelled / trial), and — for free-tier tenants — an "Upgrade" button linking to POST /billing/checkout flow.
Scenario: Free tier tenant sees upgrade CTA
- WHEN a free-tier tenant views the Usage tab
- THEN an "Upgrade to Paid" button is visible and initiates Stripe Checkout when clicked
Scenario: Paid tier tenant sees subscription status
- WHEN a paid-tier tenant views the Usage tab
- THEN the panel shows "Paid" tier with subscription status and next renewal date, with no upgrade CTA