Files
digital-psychology/.ai/playbooks/add-api.md
T
jackyu66gitandCursor 2fb1dfee14 chore: seal Design Vision v1 and monorepo scaffold
Archive the differentiated YuXinGu product docs, AI engineering system,
design contract, and Go/Vue scaffold. Next execution prioritizes Cece-parity
over early innovation (see .ai/product/STRATEGY.md).

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-02 16:00:44 +08:00

722 B

Playbook: Add API

Use when: “新增xxx接口”

Steps

  1. OpenAPI — add path to proto/openapi.yaml
  2. Migration — if new/changed table (apps/api/migrations/)
  3. Modelinternal/model
  4. Repository — SQL only
  5. Service — business + authz
  6. Handler — bind + envelope; interface at handler
  7. Wire — register route in cmd/server or router file
  8. Test — at least service/engine unit test if logic-heavy
  9. SDK/types — update packages/sdk + packages/types if clients need it
  10. Commandsgo test ./..., hit with curl
  11. Review + DoD + checklist/feature.md

Follow patterns: handler.md service.md repository.md pagination.md.