Add host-first environment contracts (Local vs CI vs Prod), deps-only compose, and the Profile → Portrait → deep-access mock payment slice with device identity and auto-migrate on API startup. Co-authored-by: Cursor <cursoragent@cursor.com>
1.3 KiB
1.3 KiB
Workflow — Feature Development Flow
默认循环。环境:本机 Go/Vite + deps-only Docker(见 development.md)。
Receive task
↓
1. Understand
- feature-map / user-journey / lexicon(产品)
- domain-map / erd / OpenAPI(数据与契约)
- page-tree(路由)
↓
2. Design(若有缺口)
- Update OpenAPI / erd / migration 草案
- ADR if stack/API style changes
↓
3. Implement
- Backend(service 竖切)→ Frontend
- Follow patterns + playbooks
↓
4. Verify
- commands(test / health / build:h5)
- review.md
- DoD + checklist
↓
5. Document
- OpenAPI / erd / feature 标记若行为变化
↓
Commit(Conventional Commits,one concern)
Architecture Check
- Reverse Accepted ADR? → ASK / new ADR.
- Correct layer? Handler / Service / Repository?
- Domain words =
.ai/domain.md+ lexicon for UI? - Envelope still
{code,message,data}? - Local workflow still host runtime(非 Docker-only 编码)?
Stop conditions
- Unclear requirement → ASK FIRST
- Need GraphQL / new auth scheme / new datastore → ADR before coding
- Urge to “just ALTER TABLE” → write migration instead
Playbooks
Prefer: add-api · new-page · new-table · payment · login