Files
digital-psychology/AGENTS.md
T
jackyu66gitandCursor 19d3cd5945 refactor(ECR-001): 接入 ESS 并完成结构对齐 Phase A–E
绑定 ESS 双轨治理,拆分超大 H5 页与 Go 引擎,抽出 membership 服务,
并将 star/fortune 重命名为 outlook(JSON 双写兼容);同时修复 /psy API 代理与首页 + 菜单层级。

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-05 17:51:40 +08:00

69 lines
3.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# AGENTS.md — AI System Entry
You are the software engineer for **愈心谷 (YuXinGu)**.
This file is for AI agents.
## Load order (every task)
1. `.ai/ai-contract.md`
2. `.ai/constitution.md`
3. `.ai/architecture.md`
4. `.ai/domain.md` (+ product/API tasks: `domain/domain-map.md`)
5. `.ai/forbidden.md`
6. `.ai/definition-of-done.md`**完成标准(强制)**Done ≠ build 通过
7. `.ai/environment.md` + `.ai/development.md`(本地)· 部署任务再读 `deployment.md` / `docker.md`
8. `.ai/file-map.md` + `.ai/workflow.md`
9. Task rules: `.ai/coding.md` / `api.md` / `database.md` / `ui.md` / `security.md` / `testing.md`
10. **Product scope:** `.ai/product/lexicon.md` + `feature-map.md` + **`feature-design.md`** + 对应 **`feature-spec/<id>.md`** + `user-journey.md` + `page-tree.md` · 状态 `product/p1-status.md`
11. **Competitor parity / reverse engineering:** `.ai/design/reverse-engineering-spec.md`(强制 STEP 118 · Evidence First · 禁止 Demo 式省略)→ 再映射 lexicon / feature-spec
12. **Any UI work:** `.ai/design/design-system.md` + `component-catalog.md` + matching `design/platform/*.md` (H5 default)
13. Matching **ADR** in `.ai/adr/` before changing stack or API style
14. Prefer **patterns/** + **examples/** + **playbooks/**(含 `feature-spec` over inventing structure
15. Before claiming Done: `.ai/definition-of-done.md` + `.ai/review.md` + `.ai/checklists/*` → 输出 **Review Report**
16. Verify via `.ai/commands.md`(本地默认本机 Go/Vite + compose.dev 仅 DB
17. `prompts/` are optional helpers — not a substitute for rules above
18. **ESS process (when L2+ / architecture / release):** `docs/PROJECT_PROFILE.md` → role from `$ESS_ROOT/agents/``docs/ECR/` · `docs/TASKS/` · `docs/HANDOFF/`;勿把 ESS 整树复制进仓
## ESS dual-track
| Concern | Source of truth |
|---------|-----------------|
| Lexicon · Feature Spec · DoD · domain · architecture freeze | `.ai/` |
| Roles · ECR · Task Contract · Handoff · validate gates | ESS + `docs/` |
```text
Load Agent Profile: ARCHITECT | ENGINEER | REVIEWER | RELEASE_MANAGER
```
- Cursor → ARCHITECT / REVIEWER(禁改生产实现)
- Engineer 实现前:Active Feature Spec +L2+Approved ECR + HANDOFF
- `python scripts/ess-validate.py --phase <phase> --ecr ECR-xxx`
## Hard constraints
- Never violate architecture or Accepted ADRs.
- Never invent APIs, DB tables, or domain synonyms.
- Never guess requirements — **ASK FIRST**.
- **Never** implement new feature behavior or expand an existing feature without an Active `product/feature-spec/<id>.md`(见 `product/feature-design.md`)。无 Spec 时只许明确 bugfix,或先写/补 Spec。
- Never modify files outside the current task.
- New code only under `apps/` and `packages/` (unless legacy migration task).
- One concern per change set. Function ≤50 lines. File ≤400 lines.
- **Never** say「完成 / P1 Complete」unless DoD PASSuse labels: Demo | Feature Complete | P1 Complete.
- Print **Review Report**(见 `definition-of-done.md` §7when a coding task finishes.
- **Never** make Docker-only local coding the default (see `.ai/environment.md`).
## Cursor
`.cursor/` is an Agent Runtime view of this system via symlinks. Edit `.ai/` only.
## Growth
Do not invent Phase 2/3 folders (graph/mcp/skills/anti-patterns/…) unless `ROADMAP.md` says so and the task asks. Prefer improving patterns/examples/playbooks.
## Product one-liner
档案 → 性格探索/个人画像 → 关系理解 → 问答陪伴 → 会员/深度版 →(后)顾问。
语言契约:`.ai/product/lexicon.md`
对标竞品:按 `design/reverse-engineering-spec.md` 做完整逆向;落地用愈心谷命名,不用竞品品牌词与恐吓话术。