Trigger
- When creating or editing files related to API client usage, data fetching, or server-side logic
- When adding new API integrations or modifying data flow patterns
- When working with
packages/api/,packages/errors/,packages/dayjs/, orpackages/logging/
Execution Checklist
- Use
@vspo-lab/api(VSPOApi) for all external API calls - Handle all results with
Result<T, AppError>— no try-catch - Add JSDoc with preconditions and postconditions to public functions
- Define types with Zod Schema First (
z.infer<typeof schema>) - Use
@vspo-lab/dayjsfor all date/time operations — no rawDate
Reference Documents
docs/backend/server-architecture.md- Next.js 15 on Cloudflare Workers, VSPOApi client, Result type, mock systemdocs/backend/function-documentation.md- JSDoc conventions (preconditions, postconditions)docs/backend/pr-guidelines.md- PR guidelines (current state, problem, implementation)docs/backend/datetime-handling.md- UTC-first date handling with @vspo-lab/dayjs