docs(plans): plan entitlements contract: plan fields on credits, 402 plan_limit on tasks, plan on subscription sessions (app#2044 row 2)
Merged
SW
3mo ago+250+250+012345678901234567890123456789-15-15-01234567890123456789
Implements row 2 of app#2044: the contract for three plans (Free, Starter, Pro) and the task gate, ahead of the api PR that fulfils it.
What changed
AccountCreditsResponse(GET /api/accounts/{id}/credits) gainsplan(free|starter|pro),task_limit(nullable, null = uncapped),min_cadence_minutes.is_prodescription now states Starter is not pro.POST /api/tasksandPATCH /api/tasksdocument 402plan_limitwith a newPlanLimitErrorschema and two examples (task_count,min_cadence). Body keeps the tasks envelope (status: "error"), machine code inerror, human text inmessage,billingUrlconstant likeinsufficient_credits.CreateSubscriptionSessionRequest(POST /api/subscriptions/sessions) gains optionalplan(starter|pro, defaultpro); the 400 documentsstarter_unavailablewhen the Starter price is not configured.credits.mdx: three-plan table (price, credits, tasks, shortest cadence), plan resolution rule, the Task limits section with the 402 body, and the grandfathering date (tasks that predate the gate run until 2026-10-01).
Assumptions carried from the tracking issue (Sweets' "Go" on 2026-08-29)
- Pro credits = 3x price ($300/month); Starter = $20; Free = $3.33.
- Shortest cadence: Free weekly (10080 min), Starter daily (1440), Pro hourly (60).
- Starter has no trial; Pro keeps the 30-day trial.
- Grandfathering until 2026-10-01T00:00:00Z.
Merge order
This PR first, then api#877. Edits to the OpenAPI JSON are anchored text insertions; both files re-parse.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GkSubbDhRVoNanCEoKgL6K
Summary by cubic
Documents row 2 of app#2044: the Free, Starter, and Pro plan entitlements contract ahead of the API PR that implements it. Task creation and updates return a 402 plan_limit, credits responses carry plan fields, and subscription sessions accept a plan selector. API keys now work on every plan, not just Pro.
What changed
AccountCreditsResponseaddsplan,task_limit, andmin_cadence_minutes;is_pronow only reflects Pro features, so Starter accounts are not pro.POST /api/tasksandPATCH /api/tasksdocument the 402plan_limitbody via a newPlanLimitErrorschema withtask_countandmin_cadenceexamples; both linkbillingUrlto/plan.CreateSubscriptionSessionRequestgains optionalplan(defaultpro), and its 400 response documentsstarter_unavailablewhen the Starter price is not configured.credits.mdxadds a three-plan table matching the in-app comparison, a task limits section, and upgrade steps pointing to/plan; limits apply immediately, with no grandfathering.
Assumptions
- Credits per month: Pro $300, Starter $20, Free $3.33; shortest cadence: Free weekly (10080 min), Starter daily (1440), Pro hourly (60).
- Starter has no trial; Pro keeps the 30-day trial.
Summary by CodeRabbit
-
New Features
- Added documentation for Free, Starter, and Pro subscription tiers.
- Added plan selection when starting a subscription.
- Account credit responses now include plan details, task limits, and minimum scheduling cadence.
- Task creation and updates now document payment-required responses when plan limits are exceeded.
-
Documentation
- Expanded subscription comparisons, plan-resolution rules, task limits, and upgrade instructions.
- Added examples for plan-limit errors and Starter availability errors.
- Clarified Pro status for enterprise domains and Starter accounts.
- Updated credit balance examples and Pro-only feature restrictions.