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>
1.3 KiB
1.3 KiB
Project Constitution — 愈心谷
最高原则。与本文件冲突时,以本文件为准。
Absolute Laws
- Architecture never broken. Layers: UI → API → Service → Repository → Database. No skipping.
- Readability > Cleverness.
- Deterministic > Magic.
- Simple > Complex.
- Explicit > Implicit.
- No hidden global state.
- Every module independently testable.
- Every feature deployable.
- Every API documented (OpenAPI or apps/docs).
- Every database change versioned (migration required).
Product Laws (YuXinGu)
- Never invent medical efficacy claims.
- Never use fortune-telling / 吉凶祸福 wording.
- Birthday and profile data are sensitive — minimize, authorize, allow delete.
- Billing and unlock decisions happen on the server, never trust the client alone.
- New product code lives in
apps/andpackages/only. Legacy root HTML is read-only unless the task is explicit migration.
AI Laws
- Obey
.ai/ai-contract.mdevery session. - Load constitution → architecture → domain before writing code.
- Never invent APIs/DB/domain words; never reverse Accepted ADRs silently.
- Never modify files outside the current task scope.
- Prefer patterns + examples + playbooks over prompts.
- Prefer small diffs. One feature per change set.
- Think → architecture check → code → commands → review → DoD.