thread-master/docs/product/growth-loop/tasks/T300-api-shells-outcomes-ch...

1.3 KiB
Raw Blame History

T300 — api-shells-outcomes-checkups-health-workspaces

Status: done
Milestone: M0
Kind: feat
Est. change: ~160 lines

Goal

完成後系統應go-zero .api 具備 outcomescheckupsaccount-healthworkspaces 路由骨架,經 make gen-api 可編譯;未實作 logic 回明確錯誤(非 102000 空 data

Depends on

Inputs

  • Spec../spec.md §5.2
  • 既有:apps/backend/generate/api/*.apimake gen-api
  • 契約AGENTS.md envelopegoctl

Outputs

程式變更(預期路徑)

路徑 動作 說明
apps/backend/generate/api/*.api add/edit outcomes、checkups、health、workspaces 分組
apps/backend/internal/handler/** gen goctl 產出
apps/backend/internal/logic/** add stub未實作錯誤
apps/backend/internal/types/** gen req/resp 型別

行為變更

  • 新路由存在;呼叫未完成能力 → code≠102000、message 可讀

Out of scope

  • 真實業務邏輯M1+
  • FE 接線

Acceptance

  • make gen-api(或專案等價)成功
  • go build ./... 通過
  • 抽樣 hit 新 API ≠ 102000 空成功
  • 指令:
cd apps/backend && make gen-api && go build ./...

Notes

路徑前綴建議 /api/v1;精確 path 可微調但能力名對齊 spec。