environments
Environments — development, production, and what moves between them
Two of everything, never mixed, and every claim about which is which written down with the date it was checked. This skill is how the environments are kept apart, how configuration and secrets enter them and leave them, how a schema change meets the code that is already serving, and what to do when something leaks, breaks or has to be rebuilt.
The rules were learned on Next.js (App Router) + Supabase + Clerk + Netlify, by several products: a live Q&A product, a monitoring product that also runs Workers and worker boxes, and others, named here only by kind. Each states its principle first and the stack's mechanism second; on another stack, keep the principle and swap the mechanism. The product's own instructions come first — where they name its environments doc, variables doc or branches, follow them.
The product's records this skill writes to, whatever the product calls them:
- the environments doc: which resource each environment uses, verified and dated, ending in the environment log, one row per environment event;
- the variables doc: one row per variable, and where every copy of each secret lives;
- the env schema: the one module that validates configuration, at build and at boot;
.env, the local configuration, never committed, and.env.example, its committed list of placeholders;- the backlog: deferred work, each item with its reason and the trigger that reopens it.