Then produce a short technical plan: data model, API contract (method, path,
request/response JSON, status codes), state management, and error handling. 3. Wait for my approval before coding. Implementation requirements: - Follow the existing conventions in {{REPO/FILES I WILL PASTE}}. - Use {{STYLE GUIDE: e.g. strict TypeScript, no any, functional components, hooks}}. - Validate ALL external input; handle auth, authorization, and pagination. - Write idempotent handlers; never trust client-supplied IDs or roles. - Include logging (no secrets in logs), retries for external calls, and meaningful error messages mapped to proper HTTP status codes. - Add unit tests for business logic and integration tests for the happy path + 3 failure cases. Include a migration if the schema changes. - Optimize for readability first; add comments only where the "why" is non-obvious. Output structure: (A) Plan, (B) File-by-file code with paths, (C) Migration, (D) Tests, (E) curl examples, (F) Rollback notes. If anything is ambiguous, STOP and ask instead of inventing behavior. ================================================================================
自动翻译
自动翻译中…