Do's and don'ts
The rules that keep the graph honest. Each one exists because its opposite was built once and had to be taken out.
Reads
Do declare a view beside its component, select it in the query, mount <page.X />.
Don't write a SomethingAsync leaf component that fetches for itself. It bypasses the query, the mask and the batch.
Do let the graph decide access: a refusal resolves to null, and the view sends the caller home.
Don't gate a page on the viewer's kind. A page that checks kind === "dealer" before rendering duplicates a decision the node's Auth.Authorize already made, and gets it wrong the day a third kind arrives.
Do pass ids down and resolve on the server. The id is the mask. Don't pass opaque fragment refs or raw entities to a client component. Only masked, plain data crosses Flight; a bound view is a function and cannot cross at all.
Do write a connection fragment on the connection type and traverse edges and node explicitly.
Don't pipe a node fragment straight onto a connection. The parent types differ, and the sugar would break the scoping that makes fragments safe.
Do select only the id off a spine when that is all you need. The load is skipped.
Nodes
Do cache the load: globalId → raw entity, context-free.
Don't cache the masked, authorized projection. It poisons the cache across viewers and multiplies entries per fragment.
Do yield keys from every entity-bearing field.
Don't have a field resolve entity data itself. f.list is for non-keyed values only; a node schema in it is a build error.
Do decide authorization on every node: Auth.Authorize or, as one auditable word, Auth.Public.
Don't leave a node unguarded and rely on the page. The compiler rejects an undecided node in a read; that is the point.
Do gate on claims in the context. Don't load a row to decide whether you may load that row.
Do keep a node to its data and volatility; an object that needs async data puts it in its fields, each an Effect.
Don't add per-view projections or tiers to a node (card, detail). Selection is the component's concern.
Composition
Do compose by nesting: a parent fragment calls a child fragment where it wants it. Don't spread one fragment into another's object literal. JS spread overrides silently where GraphQL spread merges.
Do use pipe combinators: .pipe(Auth.Authorize(…), Cache(…), Batch(…)).
Don't introduce a method-chain form. One idiom; more than one way to do a thing is a negative.
Do select a union with match: one view or fragment per variant, exhaustive by construction.
Don't Effect.map over the entity and switch on _tag yourself; that hands every branch the whole entity, unmasked.
Caching and streaming
Do cache the data-shaped leaf with an explicit lifetime and a tag hierarchy, collection plus entity.
Don't put use cache on a page. One lifetime, one invalidation surface, and no request data readable inside.
Do hoist static chrome above the async leaf and wrap only the leaf in Suspense.
Don't await in a component that also renders a heading. The whole component is withheld behind the fallback.
Do batch reads from one uniform source and let the cards land as one wave. Don't add per-item boundaries to a list that comes from one query. That is an N+1 with N skeletons.
Do provide RequestCache per request.
Don't default it to React.cache. Outside a React request it is a no-op and the N+1 comes back silently.
Mutations
Do record every write: updated, created, deleted or mask, naming the node. The tag derives from it.
Don't write a tag string. A misspelled typename emits no tag, silently, and leaves a stale entry live.
Do run a write through action() from a Server Action, which applies updateTag and re-renders the route in the same response; use revalidate() from a cron, webhook or route handler.
Don't router.refresh() after a write that changed an entity, and don't read through a Server Action.
Do use created and deleted when membership changed.
Don't use updated for a new row; only create and delete bust collection tags.
The package
Do extend the public surface when something is missing from it.
Don't widen exports to reach executor.ts, loader.ts or identity.ts. forRequest(ctx) is an internal and must never be named as the way to use Alembic.
Do read DECISIONS.md before changing the package, and record a reversal there with its why.
Don't re-introduce a generated manifest, a runtime injection, a client-side normalized store, per-field caching, or codegen for masking. Each is in the reversals list with the reason it was removed.