← ClaudeAtlas

authoring-vertical-slicelisted

The migration -> RLS -> ./client read -> tRPC procedure -> web screen -> mobile screen -> test recipe for shipping one whole feature slice through the Next 16 web + Expo 57 mobile + Supabase monorepo in a single turn. Use when asked to add a feature, procedure, or screen end-to-end.
BhodiSea/next-expo-supabase-agent-harness · ★ 1 · API & Backend · score 70
Install: claude install-skill BhodiSea/next-expo-supabase-agent-harness
# Authoring a vertical slice One backend, two surfaces: a `packages/verticals/<slice>` domain, a tRPC procedure in `@app/api` that `apps/web` serves and `apps/mobile` consumes, and a Server Action for the web write. Build the slice in this strict order. Each layer has a lazy reference file — read it before writing that layer (progressive disclosure keeps context lean). Delegate the two non-trivial layers to the named subagent. ## Step 0 — read the contracts surface FIRST, and stop if the operation already exists Before you write anything, read what the API already exposes: - `tools/generated/action-inventory.json` — every tRPC procedure `appRouter` exposes, one committed row per procedure (emitted by `tools/gen-action-inventory.mjs`, regen-diffed by the `contracts` gate). - `tools/generated/event-catalog.json` — every event the platform and vertical catalogs declare (emitted by `tools/gen-event-catalog.mjs`). - `packages/api/src/routers/*.ts` — the routers themselves (`notes.ts` is the worked example, `system.ts` the health/`me` pair). If an equivalent operation already exists, STOP and reuse it — a second `list`/`create` for the same entity is exactly the drift the "one operation, two callers" rule exists to prevent. Only when nothing covers the need do you scaffold a new slice. ## The order 1. **Migration + RLS** — read `references/migration-rls.md`. The desired shape is a declarative table in `supabase/schemas/<NN>_<slice>.sql`; the APPLIED change is a NE