App Code Standards Gate
Do not write product code first. Guessing these rules from memory or a prior turn = fail. Read the linked files this turn before the first Write / StrReplace of application .ts / .tsx.
Triggers (any one)
- New, edited, or moved
.ts/.tsxunderapp/,actions/,components/(exceptcomponents/ui/),hooks/,store/,providers/,services/,managers/, applib/,types/,schemas/ - User asks for a page, component, hook, action, route, provider, store change, remap, or form
- Task is Next.js / React web product work (not this skills repo, not markdown-only)
Same-turn reads (required)
- project-structure and REFERENCE.md — placement, I/O boundaries,
"use server", Pattern A - code-style — arrow fns, default export, Tailwind token scope, complexity ≤ 15, async+await
- forms-standard — also if any of:
<form,useForm,useFieldArray, field/validation/submit,useStatefor inputs / loading / errors, “login/signup/settings form” - shadcn-standard — also if composing registry UI (
Button,nativeButton,asChild,render, triggers). Still Read shadcn this turn; house skill wins on conflict.
Then follow them. Do not “match existing sloppy file” when that file violates these skills.
Skip only
| Skip this gate | Use instead |
|---|---|
This ~/.agents skills repo |
create-skill / the matching skill |
| React Native / Expo UI | react-native-ui + react-native-styling + ui-design-native |
shadcn-managed components/ui/ |
shadcn + shadcn-standard (do not restyle exports; do not patch gitignored shadcn) |
Markdown / .artifacts/ only |
dev-artifacts / artifacts-upkeep |
HTTP envelope / /api/vN → still load this gate, plus api-contracts.
Finish
Before claiming done:
- Placement matches project-structure (I/O in action
index.ts;services/connect/send only;lib/no I/O) "use server"files export async fns only; those fnsawait- Client UI uses
use*.ts; RSC / routes / cron useindex.ts - Style matches code-style
- Forms: RHF + zod +
zodResolver, no formuseState