|
1 | 1 | # Operations |
2 | 2 |
|
| 3 | +Operational concerns for running Kaleidoscope in production. This document |
| 4 | +covers how the app is set up to operate, the guardrails around that setup, and |
| 5 | +the decisions behind them. |
| 6 | + |
| 7 | +> **Maintenance:** Keep this document current. Any change to deployment |
| 8 | +> (`fly.toml`, `bin/` deploy scripts, Docker/build, secrets/env) or to the |
| 9 | +> Taskfile / `bin/` interface must be reflected here in the same change. |
| 10 | +
|
3 | 11 | ## Synthetic monitoring (Checkly) |
4 | 12 |
|
5 | 13 | Synthetic checks live in `checkly/` as a standard Playwright project |
@@ -32,3 +40,36 @@ is include-only. |
32 | 40 | **Deployed monitors need these Checkly environment variables** (set once in the |
33 | 41 | Checkly account, not committed): `AUTH0_CLIENT_ID`, `AUTH0_CLIENT_SECRET`. |
34 | 42 | `ENVIRONMENT_URL` is omitted in production so checks default to the live site. |
| 43 | + |
| 44 | +## Claude Code workspaces |
| 45 | + |
| 46 | +Kaleidoscope's AI features (the workflow engine and project scorer) call the |
| 47 | +Anthropic API. Rather than running Claude Code against the same Anthropic |
| 48 | +account and API key used for production traffic, we provision a **separate, |
| 49 | +dedicated Claude Code workspace** with its own key. |
| 50 | + |
| 51 | +That workspace is capped at a **hard spend limit of $10 per month**. |
| 52 | + |
| 53 | +**Why a separate workspace with a hard cap:** |
| 54 | + |
| 55 | +- **Blast radius.** A Claude Code API key can end up in more places than a |
| 56 | + production key — shell history, local config, CI logs, a subagent's |
| 57 | + environment. Isolating it in its own workspace means a leaked or misused key |
| 58 | + can never draw down the production Anthropic budget or touch production usage. |
| 59 | +- **The cap bounds the damage.** $10/month is the ceiling on what a leaked key |
| 60 | + can cost before it's cut off. It's high enough for normal development use and |
| 61 | + low enough that a compromised key is an annoyance, not an incident. |
| 62 | +- **Clean attribution.** Keeping the workspaces separate makes Claude Code |
| 63 | + spend legible on its own, distinct from the app's production API usage. |
| 64 | + |
| 65 | +**Operational notes:** |
| 66 | + |
| 67 | +- The workspace key is only for development tooling (Claude Code). It is **not** |
| 68 | + the key the deployed app uses for its own Anthropic calls — that key lives in |
| 69 | + Fly.io secrets (`ANTHROPIC_API_KEY`) and is scoped to the production |
| 70 | + workspace/budget. |
| 71 | +- If the $10 cap is hit mid-month, Claude Code requests will start failing. |
| 72 | + That's the intended signal — investigate the spend before raising the limit, |
| 73 | + don't reflexively bump it. |
| 74 | +- If the workspace key is ever suspected leaked, rotate it in that workspace; |
| 75 | + no production credential or budget is affected. |
0 commit comments