← ClaudeAtlas

scale-refactorlisted

Refactor a working prototype toward production shape — surfacing scaling bottlenecks, adding observability, and hardening the trust boundaries it actually crosses — without a wholesale rewrite that loses working behavior. Use when code that started as a proof-of-concept or hackathon-speed build needs to survive real load, real failures, or a real audit, or when the user says something like "this works, now make it not fall over."
hemapriyan-rk/claude-rigor-skills · ★ 1 · AI & Automation · score 74
Install: claude install-skill hemapriyan-rk/claude-rigor-skills
# Scale Refactor A prototype and a production system aren't different in cleverness — they're different in what assumptions they can get away with. This skill finds the assumptions that were fine for a demo and won't survive contact with real load, and fixes them incrementally instead of rewriting the working parts. ## Step 1 — Find the assumptions that break first, not everything at once Look specifically for: - **Single-instance state** — anything held in a local variable or in-process cache that silently breaks the moment there's more than one instance running. - **Unbounded collections/queues** — anything that grows with input volume with no cap, backpressure, or eviction policy. - **Synchronous calls that will become the bottleneck** — a call chain that's fine at demo QPS and serializes badly at real QPS; identify which one hits the wall first, not all of them equally. - **No backpressure** — a producer with no way to signal or respond to a slow consumer, so load just piles up until something falls over. Rank these by which one actually breaks first under realistic load — fixing the fifth-order bottleneck before the first-order one wastes the refactor. ## Step 2 — Add observability at the points that matter Not blanket logging everywhere — structured logs and metrics at the specific decision points and failure modes identified in Step 1, plus trace propagation across the async/service boundaries the request actually crosses. The test: when this breaks in production