Add comprehensive tenant and scope documentation#109
Merged
Conversation
Addresses the gap where tenant management information was scattered across 7+ docs with no single entry point. Developers asking about tenant creation, scopes, lifecycle, and Admin API usage now have a dedicated guide covering the full tenant CRUD lifecycle. New: docs/how-to/tenant-creation-and-management-in-cycles.md - Full Admin API walkthrough (create, list, get, update) - Status lifecycle (ACTIVE/SUSPENDED/CLOSED) with operational guidance - Hierarchical tenants (parent_tenant_id) with worked examples - Tenant config defaults (TTL, overage policy, expiry policy) - Metadata patterns and end-to-end onboarding workflow - Common use cases (SaaS, departments, resellers, environments) - Troubleshooting section for common tenant errors Also updates: - Sidebar: adds Tenant Management entry in How-To Guides - Glossary: adds Tenant entry, cross-links Tenant Isolation and Admin Server - 5 existing docs: adds cross-links for user journey navigation https://claude.ai/code/session_01BTfkquf1MgDxBGjxm4B1ws
…s-linking Developers lacked a single doc explaining how tenants, scopes, and budgets relate as a unified model. Existing docs covered each concept in isolation (architecture = components, scope derivation = mechanics, budget allocation = curl commands) without tying them together. New: docs/how-to/understanding-tenants-scopes-and-budgets-in-cycles.md - Explains the three building blocks and how they relate - Visual diagrams showing the tenant → scope → budget hierarchy - How a reservation flows through the scope hierarchy atomically - Scope design guidance (start simple, decision framework) - Managing scopes in practice (creating budgets, querying, resetting) - Complete worked example with curl commands - Common questions (FAQ format) Also updates: - Sidebar: adds "Tenants, Scopes, and Budgets" as first How-To item - Scope derivation doc: replaces generic GitHub links with targeted cross-links - 5 existing docs: adds model guide links in intro/Next steps - Glossary: enhances Scope entry with link to model guide https://claude.ai/code/session_01BTfkquf1MgDxBGjxm4B1ws
Fixes: - Remove unsupported fields from tenant creation curl example (TenantCreateRequest only accepts tenant_id, name, parent_tenant_id, metadata, default_commit_overage_policy — not TTL/expiry/extension fields) - Clarify server-level defaults vs settable-per-tenant config - Fix pagination max limit: 200 → 100 (matches Math.min(limit, 100)) - Fix budget allocation formula: add missing '- debt' term New best practices sections: - Model guide: tenant, scope, and budget best practices covering isolation boundaries, scope consistency, canonical hierarchy, overage policies, funding idempotency, and monitoring - Tenant management: naming conventions, suspend-before-close, metadata consistency, per-environment API keys, and automated onboarding with scripted example https://claude.ai/code/session_01BTfkquf1MgDxBGjxm4B1ws
fixed architecture layout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds two major new documentation guides that explain the foundational concepts of tenant isolation and budget hierarchy in Cycles, along with updates to existing docs to cross-reference the new material.
Key Changes
New Documentation:
how-to/tenant-creation-and-management-in-cycles.md(741 lines) — Complete guide to the tenant lifecycle including:how-to/understanding-tenants-scopes-and-budgets-in-cycles.md(534 lines) — Conceptual guide explaining how the three building blocks work together:Documentation Updates:
.vitepress/config.tsto add the two new guides to the "How-To" navigation sectionhow-to/api-key-management-in-cycles.md— link to tenant creation guidehow-to/common-budget-patterns.md— link to tenants/scopes/budgets guidequickstart/architecture-overview-how-cycles-fits-together.md— link to tenants/scopes/budgets guidehow-to/how-to-model-tenant-workflow-and-run-budgets-in-cycles.md— updated next steps sectionprotocol/authentication-tenancy-and-api-keys-in-cycles.md— updated next steps sectionprotocol/how-scope-derivation-works-in-cycles.md— updated next steps sectionglossary.mdfor the Scope definitionquickstart/deploying-the-full-cycles-stack.mdto reference tenant creation guideNotable Implementation Details
https://claude.ai/code/session_01BTfkquf1MgDxBGjxm4B1ws