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>
722 B
722 B
Playbook: Add API
Use when: “新增xxx接口”
Steps
- OpenAPI — add path to
proto/openapi.yaml - Migration — if new/changed table (
apps/api/migrations/) - Model —
internal/model - Repository — SQL only
- Service — business + authz
- Handler — bind + envelope; interface at handler
- Wire — register route in
cmd/serveror router file - Test — at least service/engine unit test if logic-heavy
- SDK/types — update
packages/sdk+packages/typesif clients need it - Commands —
go test ./..., hit with curl - Review + DoD + checklist/feature.md
Follow patterns: handler.md service.md repository.md pagination.md.