Imported from avrunner01/golf_handicap (
AGENTS.md). Install upstream withnpx skills add avrunner01/golf_handicap. Copyright stays with the author.
Agent Instructions
This repo is an Astro app with React islands and Supabase-backed auth/data flows. Keep agent work focused on the current source of truth in src/ and package.json; the current README.md is still starter boilerplate and should not be treated as authoritative.
Working Rules
- Use
npm run dev,npm run build, andnpm run previewfor local validation; there is no dedicated test, lint, or typecheck script inpackage.json. - Prefer Astro frontmatter for page data loading and server-side decisions; use React only for interactive islands.
- Keep shared Supabase logic in src/lib/supabase.ts.
- Treat src/middleware.ts as the place where protected routes are enforced; update it when adding new private pages.
- Keep auth callbacks and data mutations inside API routes under src/pages/api.
Editing Conventions
- Preserve existing Supabase cookie handling, redirect behavior, and server/client boundaries.
- When touching course or tee data, keep the existing fallback shapes intact rather than normalizing them aggressively.
- Avoid broad refactors across pages, components, and API routes in one change unless the request explicitly needs it.