feat(ECR-012–016): 合规、题库、时辰刷新、头像、MBTI OEJTS 与埋点

落地输入合规、探索题库、报告日/时辰刷新、账号头像、OEJTS 量表,并补齐 H5 埋点与 Admin 漏斗;同步 ESS 工件、切至自建 Git、清理 GitHub Actions。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
jackyu66git
2026-08-13 01:27:58 +08:00
co-authored by Cursor
parent 13860bf1ef
commit 89756f65b4
227 changed files with 7405 additions and 1407 deletions
+43 -21
View File
@@ -4,40 +4,62 @@ You are the software engineer for **愈心谷 (YuXinGu)**.
This file is for AI agents.
## 0. ESS Intake Bootstrap(任何改码任务最先做)
`$ESS_ROOT/governance/SESSION_BOOTSTRAP.md`**先输出 ESS Mode 块**,再改文件或扩 Scope。
```text
ESS Mode: L0 | L1 | L2 | L2-BLOCKED | L3 | RETRO
Change: <one line>
ECR: <id|NONE>
Phase: <ARCHITECT|ENGINEER|REVIEWER|none>
Execution Context: <ECR id|TASK id|NONE>
Allowed: <...>
Forbidden: <...>
Action: CONTINUE | STOP
Reason: <...>
```
- `Action: STOP``L2-BLOCKED` → **禁止**改 `apps/` / `packages/` / `proto/` / `migrations/`
- 本仓 `ess_intake: strict`(见 `docs/PROJECT_RULES.md`):Retro ECR 须四字段;新主题 OUT OF SCOPE
- Solo multi-role 允许同 Session 串行换 Phase**同一 review turn 禁止 Approve + Modify**
## 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 整树复制进仓
1. **§0 ESS Mode 块**(上)→ `docs/PROJECT_PROFILE.md` · `docs/PROJECT_RULES.md`
2. `.ai/ai-contract.md`
3. `.ai/constitution.md`
4. `.ai/architecture.md`
5. `.ai/domain.md` (+ product/API tasks: `domain/domain-map.md`)
6. `.ai/forbidden.md`
7. `.ai/definition-of-done.md`**完成标准(强制)**Done ≠ build 通过
8. `.ai/environment.md` + `.ai/development.md`(本地)· 部署任务再读 `deployment.md` / `docker.md`
9. `.ai/file-map.md` + `.ai/workflow.md`
10. Task rules: `.ai/coding.md` / `api.md` / `database.md` / `ui.md` / `security.md` / `testing.md`
11. **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`
12. **Competitor parity / reverse engineering:** `.ai/design/reverse-engineering-spec.md`(强制 STEP 118 · Evidence First · 禁止 Demo 式省略)→ 再映射 lexicon / feature-spec
13. **Any UI work:** `.ai/design/design-system.md` + `component-catalog.md` + matching `design/platform/*.md` (H5 default)
14. Matching **ADR** in `.ai/adr/` before changing stack or API style
15. Prefer **patterns/** + **examples/** + **playbooks/**(含 `feature-spec` over inventing structure
16. Before claiming Done: `.ai/definition-of-done.md` + `.ai/review.md` + `.ai/checklists/*` → 输出 **Review Report**
17. Verify via `.ai/commands.md`(本地默认本机 Go/Vite + compose.dev 仅 DB
18. `prompts/` are optional helpers — not a substitute for rules above
19. **ESS process (L2+ / architecture / release):** `$ESS_ROOT/SKILL.md` · `SESSION_BOOTSTRAP` · 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/` |
| Intake Mode · Roles · ECR · Task · Handoff · validate | ESS + `docs/` |
```text
Load Agent Profile: ARCHITECT | ENGINEER | REVIEWER | RELEASE_MANAGER
```
- Cursor → ARCHITECT / REVIEWER(禁改生产实现)
- Engineer 实现前:Active Feature Spec +L2+Approved ECR + HANDOFF
- Cursor Session 可 Solo 串行三角色;**当前 Phase 权限唯一**
- ARCHITECT / REVIEWER phase:禁改生产实现;REVIEWER 禁 Approve+Modify 同 turn
- EngineerActive Feature Spec +L2+Approved ECR + HANDOFF;无 ECR → `L2-BLOCKED`
- `python scripts/ess-validate.py --phase <phase> --ecr ECR-xxx`
## Hard constraints