From 684bc8cb3a5dc84aa6df459a5d10f108236d2568 Mon Sep 17 00:00:00 2001 From: "jiashuai.shi@qq.com" Date: Tue, 26 May 2026 02:51:38 +0800 Subject: [PATCH] refactor: simplify repository surfaces Remove residual AI workflow files, collapse duplicate docs trees, drop legacy app aliases, and keep dialogue orchestration instance-scoped. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/copilot-instructions.md | 30 -- .gitignore | 7 - CHANGELOG.md | 6 +- README.md | 22 +- README.zh-CN.md | 22 +- docs/.vitepress/config.ts | 4 +- docs/agents/domain.md | 28 -- docs/agents/issue-tracker.md | 28 -- docs/agents/triage-labels.md | 39 -- docs/api/README.md | 174 --------- docs/api/rest-api.md | 368 ------------------- docs/api/websocket.md | 325 ----------------- docs/architecture/README.md | 394 --------------------- docs/contributing/README.md | 37 +- docs/en/guide/configuration.md | 2 +- docs/en/guide/getting-started.md | 4 +- docs/guide/README.md | 226 ------------ docs/guide/configuration.md | 327 ----------------- docs/guide/installation.md | 300 ---------------- docs/zh/guide/configuration.md | 2 +- docs/zh/guide/getting-started.md | 4 +- src/App.tsx | 5 +- src/__tests__/dialogueOrchestrator.test.ts | 32 +- src/__tests__/useChatStream.test.tsx | 14 - src/__tests__/useSessionManager.test.tsx | 8 - src/core/dialogue/dialogueOrchestrator.ts | 61 ---- src/core/dialogue/index.ts | 6 +- src/main.tsx | 2 +- src/pages/DigitalHumanPage.tsx | 224 ------------ 29 files changed, 80 insertions(+), 2621 deletions(-) delete mode 100644 .github/copilot-instructions.md delete mode 100644 docs/agents/domain.md delete mode 100644 docs/agents/issue-tracker.md delete mode 100644 docs/agents/triage-labels.md delete mode 100644 docs/api/README.md delete mode 100644 docs/api/rest-api.md delete mode 100644 docs/api/websocket.md delete mode 100644 docs/architecture/README.md delete mode 100644 docs/guide/README.md delete mode 100644 docs/guide/configuration.md delete mode 100644 docs/guide/installation.md delete mode 100644 src/pages/DigitalHumanPage.tsx diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md deleted file mode 100644 index 9ae98be..0000000 --- a/.github/copilot-instructions.md +++ /dev/null @@ -1,30 +0,0 @@ -# Copilot Instructions — MetaHuman Engine - -基于 React 19 + Three.js + TypeScript 的 3D 数字人交互引擎。 -完整规范参见项目根目录 `AGENTS.md`。 - -## 核心规则 - -1. 使用 `@/*` 路径别名(`@/components/...`, `@/store/...`) -2. 服务层通过 `useXStore.getState()` 读写状态(非 props) -3. 所有外部调用必须有降级方案 -4. `core/` 目录禁止引入 React 依赖 - -## 常用命令 - -```bash -npm run dev # 开发服务器 -npm run typecheck # 类型检查 -npm run lint # ESLint -npm run test:run # 测试 -``` - -## 关键文件 - -| 文件 | 职责 | -|------|------| -| `src/core/avatar/DigitalHumanEngine.ts` | 数字人控制门面 | -| `src/core/dialogue/dialogueService.ts` | 对话服务(重试/降级) | -| `src/core/dialogue/dialogueOrchestrator.ts` | 对话轮次编排 | -| `src/store/digitalHumanStore.ts` | 数字人状态 | -| `src/components/DigitalHumanViewer.tsx` | 3D 视口组件 | diff --git a/.gitignore b/.gitignore index 3d89fc6..467d606 100644 --- a/.gitignore +++ b/.gitignore @@ -38,12 +38,5 @@ __pycache__/ .pytest_cache/ *.egg-info/ -# AI / workflow tool state (local only) -.claude/ -.opencode/ -.trellis/ -.omc/ -CLAUDE.local.md - # Local config *.local diff --git a/CHANGELOG.md b/CHANGELOG.md index bf650d5..73cb947 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### 🧹 Repository Simplification - Removed repository-scoped AI workflow frameworks and generated automation from `.trellis/`, `.claude/`, and `.opencode/` -- Simplified contributor guidance to a minimal `AGENTS.md` / `CLAUDE.md` / Copilot instruction surface +- Simplified contributor guidance to a minimal `AGENTS.md` / `CLAUDE.md` surface +- Removed residual AI workflow docs from `docs/agents/` and deleted the repository Copilot instruction file +- Dropped the duplicate root `docs/api/`, `docs/architecture/`, and `docs/guide/` trees in favor of the canonical localized docs +- Removed the legacy `/advanced` and `/digital-human` app aliases so the product runtime has a single `/app` entry +- Removed deprecated module-level dialogue orchestrator wrappers and kept orchestration instance-scoped - Stopped exposing changelog navigation in the landing page and docs site - Corrected stale docs and Pages copy that still claimed Docker, Render, CLI scaffolds, templates, and old backend paths - Consolidated historical notes from the removed `changelog/` directory into this file diff --git a/README.md b/README.md index fb657b8..8ec970f 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Features · Performance · Architecture · - Documentation · + Documentation · Changelog · 中文

@@ -180,7 +180,7 @@ Benchmarks measured on typical devices: | **Bundle Size** | 180 KB (gzipped) | 180 KB | 180 KB | | **Memory Usage** | ~120 MB | ~80 MB | ~60 MB | -> Performance automatically scales based on device capabilities. See [Performance Module](docs/architecture/) for details. +> Performance automatically scales based on device capabilities. See the [architecture overview](docs/en/architecture/overview.md) for details. --- @@ -218,7 +218,7 @@ Three focused domains minimize re-renders: | `systemStore` | Connection status, errors, performance metrics | | `digitalHumanStore` | Avatar runtime state (expression, animation, audio) | -**[📖 Architecture Docs →](docs/architecture/)** +**[📖 Architecture Docs →](docs/en/architecture/overview.md)** --- @@ -260,9 +260,9 @@ src/ This project uses Vite path aliases configured in `vite.config.ts` and `tsconfig.json`: -| Alias | Maps to | -| ------ | -------- | -| `@/*` | `src/*` | +| Alias | Maps to | +| ----- | ------- | +| `@/*` | `src/*` | --- @@ -278,7 +278,7 @@ npm run build:pages 2. Push to `master` — CI auto-deploys 3. Live at: `https://lessup.github.io/meta-human/` -**[📖 Deployment Guide →](docs/guide/installation.md)** +**[📖 Deployment Guide →](docs/en/guide/installation.md)** --- @@ -337,10 +337,10 @@ npm run test:ui # Vitest UI mode ## 📚 Documentation -- **[Quick Start](docs/guide/)** — Get running in 5 minutes -- **[API Reference](docs/api/)** — Backend API documentation -- **[Architecture](docs/architecture/)** — System design -- **[Configuration](docs/guide/configuration.md)** — Environment variables and settings +- **[Quick Start](docs/en/guide/getting-started.md)** — Get running in 5 minutes +- **[API Reference](docs/en/api/overview.md)** — Backend API documentation +- **[Architecture](docs/en/architecture/overview.md)** — System design +- **[Configuration](docs/en/guide/configuration.md)** — Environment variables and settings - **[Contributing](docs/contributing/)** — Contribution guidelines - **[Changelog](CHANGELOG.md)** — Version history diff --git a/README.zh-CN.md b/README.zh-CN.md index 5de02f9..f2059c4 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -31,7 +31,7 @@ 功能 · 性能 · 架构 · - 文档 · + 文档 · 更新日志 · English

@@ -180,7 +180,7 @@ const response = await dialogueService.send({ | **包体积** | 180 KB (gzipped) | 180 KB | 180 KB | | **内存占用** | ~120 MB | ~80 MB | ~60 MB | -> 性能根据设备能力自动调节。详见[性能模块文档](docs/architecture/)。 +> 性能根据设备能力自动调节。详见[架构概览](docs/zh/architecture/overview.md)。 --- @@ -218,7 +218,7 @@ const response = await dialogueService.send({ | `systemStore` | 连接状态、错误、性能指标 | | `digitalHumanStore` | 数字人运行时状态(表情、动画、音频) | -**[📖 架构文档 →](docs/architecture/)** +**[📖 架构文档 →](docs/zh/architecture/overview.md)** --- @@ -260,9 +260,9 @@ src/ 本项目使用 Vite 路径别名,配置在 `vite.config.ts` 和 `tsconfig.json`: -| 别名 | 映射路径 | -| ------ | -------- | -| `@/*` | `src/*` | +| 别名 | 映射路径 | +| ----- | -------- | +| `@/*` | `src/*` | --- @@ -278,7 +278,7 @@ npm run build:pages 2. 推送到 `master` — CI 自动部署 3. 访问:`https://lessup.github.io/meta-human/` -**[📖 部署指南 →](docs/guide/installation.md)** +**[📖 部署指南 →](docs/zh/guide/installation.md)** --- @@ -337,10 +337,10 @@ npm run test:ui # Vitest UI 模式 ## 📚 文档 -- **[快速开始](docs/guide/)** — 5 分钟快速上手 -- **[API 参考](docs/api/)** — 后端 API 文档 -- **[架构设计](docs/architecture/)** — 系统设计 -- **[配置说明](docs/guide/configuration.md)** — 环境变量与设置 +- **[快速开始](docs/zh/guide/getting-started.md)** — 5 分钟快速上手 +- **[API 参考](docs/zh/api/overview.md)** — 后端 API 文档 +- **[架构设计](docs/zh/architecture/overview.md)** — 系统设计 +- **[配置说明](docs/zh/guide/configuration.md)** — 环境变量与设置 - **[贡献指南](docs/contributing/)** — 贡献指南 - **[更新日志](CHANGELOG.md)** — 版本历史 diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index de67818..9c2de44 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -20,8 +20,8 @@ export default defineConfig({ hostname: 'https://lessup.github.io/meta-human/', }, - // 忽略本地开发链接和某些相对链接 - ignoreDeadLinks: [/localhost/, /\.\.\/api\//, /\.\.\/architecture\//], + // 忽略本地开发链接 + ignoreDeadLinks: [/localhost/], locales: { zh: { diff --git a/docs/agents/domain.md b/docs/agents/domain.md deleted file mode 100644 index 2126069..0000000 --- a/docs/agents/domain.md +++ /dev/null @@ -1,28 +0,0 @@ -# Domain Docs - -This repo uses a **single-context** layout for domain documentation. - -## Location - -| Doc | Path | Purpose | -| -------------- | ------------------------ | ---------------------------------------------- | -| Domain context | `CONTEXT.md` (repo root) | Project domain language, terminology, concepts | -| ADRs | `docs/adr/` | Architectural Decision Records | - -## Consumer Rules - -Skills that read domain docs should: - -1. **Read `CONTEXT.md` first** — if it exists, use it to understand domain language before making changes -2. **Check `docs/adr/`** — read relevant ADRs before making architectural decisions -3. **Update as needed** — if domain concepts crystallize during work, update `CONTEXT.md`; if an architectural decision is made, create an ADR - -## If Missing - -If `CONTEXT.md` doesn't exist, skills will proceed without domain context. Consider creating one to capture: - -- Core domain concepts and terminology -- Bounded contexts and their relationships -- Ubiquitous language used by the team - -If `docs/adr/` doesn't exist, skills will proceed without historical context. Consider creating it for significant decisions. diff --git a/docs/agents/issue-tracker.md b/docs/agents/issue-tracker.md deleted file mode 100644 index 6e85b1f..0000000 --- a/docs/agents/issue-tracker.md +++ /dev/null @@ -1,28 +0,0 @@ -# Issue Tracker: GitHub - -This repo uses GitHub Issues for tracking work. - -## Location - -`https://github.com/LessUp/meta-human/issues` - -## CLI - -Uses `gh` CLI for all issue operations: - -- Create issue: `gh issue create` -- View issue: `gh issue view ` -- List issues: `gh issue list` -- Close issue: `gh issue close ` -- Add label: `gh issue edit --add-label