Files
ai_soc_sw/.ai/phases/phase-01-foundation/architecture.md
T
tupingr 4184a6d0b5 refactor(architecture): 信息架构重构 — 从"人类导向单体文档"到"AI优先分层架构"
新增四层信息架构:
- Layer 0: 角色工作台 (.ai/roles/) — AI 每天只需读2个小文件
- Layer 1: 路线图看板 (ROADMAP.md) — 人机共享进度
- Layer 2: 阶段上下文 (.ai/phases/) — 按当前阶段加载
- Layer 3: 知识沉淀 (.ai/knowledge/) — 决策/模式/教训自动积累

新增:
- DASHBOARD.md — 人类仪表盘(30秒了解全貌)
- ROADMAP.md — 任务看板+阻塞追踪
- docs/share/ — 对外分享内容层(一鸡多吃)
- docs/使用手册.md — 人+AI使用手册
- .ai/prompts/architecture/ — 补充缺失的架构提示词
- .ai/principles.md — 信息架构设计原则
- review/active/INDEX.md — 任务索引

修改:
- AGENTS.md: 239行→117行,顶部AI跳转
- README.md: 精简聚焦人类读者
- PROJECT_CONTEXT.md: 精简+分层说明
- DECISIONS.md: 替换为跳转存根
- 5个task.md: 添加phase字段

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-25 16:49:36 +08:00

46 lines
1.6 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.
# Phase 1: 基础搭建 — 架构概览
## 技术栈
| 层 | 技术 | 说明 |
|----|------|------|
| 前端 (P01) | Taro 4 + React 18 + TypeScript + Tailwind CSS | 跨端小程序 |
| 后端 (P01) | NestJS 10 + TypeScript | REST API |
| 数据库 | PostgreSQLSchema 本阶段确定) | 关系型存储 |
| 包管理 | pnpm | monorepo |
| 测试 | Jest | 单元 + 集成 + E2E |
| AI 训练 (P02) | Python + PyTorch | 延期至 Phase 2 |
| Web 后台 (P03) | Next.js | 延期至 Phase 2 |
## 当前架构快照
```
P01_errlens_app/
src/ # Taro 小程序源码(已有骨架)
pages/index/ # 首页(通用模板,待替换为错题本首页)
components/ui/ # shadcn/ui Taro 组件库(~50个组件)
lib/ # 工具函数(cn, platform, measure, hooks
presets/ # H5 适配(navbar, error boundary, styles
server/ # NestJS 后端
src/
main.ts # 启动入口
app.module.ts # 根模块
app.controller.ts # GET /hello, GET /health
tests/ # Jest 测试(已有 utils 测试骨架)
P02_errlens_training/ # 空壳,Phase 2 启动
P03_errlens_web/ # 空壳,Phase 2 启动
```
## 关键约束
- 所有业务代码在 projects/*/src/(权限边界)
- 跨平台目标:微信小程序优先,抖音/H5 为次
- AI 代码必须遵循 `.ai/prompts/coding/code-style.md`
## 待定问题
- 数据库 Schema 设计(PRD 先行)
- P01 页面架构(几个页面、导航结构)
- 后端 API 版本策略