落地 synastry/star/ask API 与 H5 页面,补齐 cece-frontend-re complete-design 证据文档,并加入 Android 模拟器截图抓取脚本。 Co-authored-by: Cursor <cursoragent@cursor.com>
1.7 KiB
1.7 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).
- Local feedback speed > local environment purity. 本地开发追求分钟级反馈;生产/CI 追求环境一致。二者禁止混用工作流(见
.ai/environment.md)。 - Done ≠ Code Complete. 功能完成标准见
.ai/definition-of-done.md;禁止仅以「有 API / 能打开页 / build 过」宣告完成。
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.