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