feat: 文档同步

This commit is contained in:
2025-12-15 18:53:39 +08:00
parent 67162d2337
commit 1329643932
16 changed files with 987 additions and 85 deletions

View File

@@ -15,40 +15,43 @@ aide-plugin 是 Claude Code 插件,提供 Aide 工作流体系的 Commands 和
### 1.2 组件关系
```
┌─────────────────────────────────────────────────┐
│ Commands │
│ 定义"做什么"和"按什么顺序做" │
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ │
│ │ init │ │ prep │ │ exec │
│ └────┬────┘ └────┬────┘ └────┬────┘ │
└───────┼────────────┼────────────┼───────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────┐
Skill
│ 定义"怎么调用工具" │
│ ┌─────────────────────────────────────────┐ │
│ │ aide skill
│ │ env | flow | decide | config | init │
│ └─────────────────────────────────────────┘ │
└─────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────
Commands
│ 定义"做什么"和"按什么顺序做"
│ ┌─────────┐ ┌─────────┐ ┌─────────┐ ┌─────────┐
│ │ setup │ │ load │ │ docs │ │ run │
│ └────┬────┘ └────┬────┘ └────┬────┘ └────┬────┘
└───────┼────────────┼────────────┼────────────┼──────────────────┘
│ │ │
▼ ▼ ▼
┌─────────────────────────────────────────────────────────────────
Skills
│ 定义"怎么调用工具"
│ ┌─────────────────────┐ ┌─────────────────────┐
│ │ aide skill │ env-config skill
│ │ (基础命令指南) │ │ (环境配置详细指南) │
│ └─────────────────────┘ └─────────────────────┘
└─────────────────────────────────────────────────────────────────
▼ 调用
┌─────────────────────────────────────────────────┐
│ aide-program │
│ 实际执行操作,返回精简结果 │
└─────────────────────────────────────────────────┘
┌─────────────────────────────────────────────────────────────────
aide-program
│ 实际执行操作,返回精简结果
└─────────────────────────────────────────────────────────────────
```
---
## 二、Commands 索引
| Command | 设计文档 | 执行文件 | 职责 |
|---------|----------|----------|------|
| `/aide:init` | [commands/init.md](commands/init.md) | [../../commands/init.md](../commands/init.md) | 项目认知与环境初始化 |
| `/aide:prep` | [commands/prep.md](commands/prep.md) | [../../commands/prep.md](../commands/prep.md) | 任务准备流程 |
| `/aide:exec` | [commands/exec.md](commands/exec.md) | [../../commands/exec.md](../commands/exec.md) | 任务执行流程 |
| Command | 设计文档 | 执行文件 | 职责 | 独立运行 |
|---------|----------|----------|------|----------|
| `/aide:setup` | [commands/setup.md](commands/setup.md) | [../commands/setup.md](../commands/setup.md) | 环境配置 | 是 |
| `/aide:load` | [commands/load.md](commands/load.md) | [../commands/load.md](../commands/load.md) | 项目认知载入 | 否 |
| `/aide:docs` | [commands/docs.md](commands/docs.md) | [../commands/docs.md](../commands/docs.md) | 项目文档管理 | 是 |
| `/aide:run` | [commands/run.md](commands/run.md) | [../commands/run.md](../commands/run.md) | 任务执行(核心) | 否 |
> 注:原 `/aide:init`、`/aide:prep`、`/aide:exec` 已重组为上述命令
### 2.1 Commands 设计原则
@@ -64,35 +67,42 @@ Commands 只告诉 LLM
### 2.2 工作流程
```
/aide:init /aide:prep /aide:exec
│ │
┌────────┐ ┌──────────┐ ┌──────────┐
│环境检测│ │ 任务分析 │ │ 流程设计 │
项目认知│ │ 任务优化 │ 迭代实现
介绍能力│ │ 待定项 │ 验证交付
└────────┘ │ 生成细则 │ 文档更新
└──────────┘ 收尾
│ └──────────┘
task-spec.md ──────────────▶
/aide:setup /aide:docs /aide:run
(独立运行) (独立运行) (核心命令)
▼ ▼
┌────────┐ ┌──────────┐ ┌──────────────────┐
环境配置│ │ 项目文档│ task-optimize
依赖分析│ │ 区块划分│ ├─ 任务分析
│模块检测│文档生成 │ │ ├─ 复杂度评估
│问题修复│ │ 增量更新 │├─ 待定项处理
└────────┘ └──────────┘ │ └─ 生成细则 │
│ flow-design │
│ └─ 创建流程图 │
│ impl (迭代实现) │
│ verify (验证) │
│ docs (文档更新) │
│ finish (收尾) │
└──────────────────┘
```
> `/aide:load` 由 `/aide:run` 自动调用,用于按需载入项目文档。
---
## 三、Skill 索引
| Skill | 执行文件 | 职责 | 触发时机 |
|-------|----------|------|----------|
| aide | [../skills/aide/SKILL.md](../skills/aide/SKILL.md) | aide 基础命令指南 | 始终加载 |
| env-config | [../skills/env-config/SKILL.md](../skills/env-config/SKILL.md) | 环境配置详细指南 | `aide env ensure` 失败时 |
| aide | [../skills/aide/SKILL.md](../skills/aide/SKILL.md) | aide 基础命令指南 | `/aide:run` 强制触发 |
| env-config | [../skills/env-config/SKILL.md](../skills/env-config/SKILL.md) | 环境配置详细指南 | `/aide:setup` 强制触发 |
### 3.1 Skill 设计原则
**按需触发,避免信息过载**
- `aide` skill始终加载,提供基础命令用法
- `env-config` skill按需触发,仅在环境检测失败时使用
- `aide` skill`/aide:run` 强制触发,提供基础命令用法
- `env-config` skill`/aide:setup` 强制触发,提供详细环境配置指导
**纯工具说明,便于快速查阅**
@@ -106,13 +116,18 @@ Skill 只包含:
### 3.2 Skill 触发逻辑
```
aide env ensure
├─ 全部 ✓ → 继续流程(无需额外 skill
└─ 有 ✗ → 触发 env-config skill
/aide:setup /aide:run
▼ ▼
触发 env-config skill 触发 aide skill
│ │
▼ ▼
aide env ensure aide flow status
│ │
├─ 全部 ✓ → 完成 ├─ 无活跃任务 → 新任务流程
│ │
└─ 有 ✗ → 分析项目类型 └─ 有活跃任务 → 续接流程
├─ 分析项目类型
├─ aide env set 配置
└─ 重试 aide env ensure
```
@@ -129,6 +144,7 @@ aide env ensure
| 待定项呈现与确认 | `aide decide` |
| 状态记录与 git 提交 | `aide flow` |
| 配置读写 | `aide config` |
| 流程图校验与构建 | `aide flow` + PlantUML |
### 4.2 不需要程序约束的场景
@@ -136,9 +152,11 @@ aide env ensure
|------|------|
| 任务分析思考 | LLM 自由发挥 |
| 任务优化思考 | LLM 自由发挥 |
| 复杂度评估 | LLM 根据指导原则判断 |
| 业务决策判断 | LLM 自由发挥 |
| 任务细则编写 | LLM 自由发挥,产出 task-spec.md |
| 业务代码编写 | LLM 自由发挥 |
| 流程图设计 | LLM 自由发挥,产出 .puml 文件 |
---
@@ -146,9 +164,9 @@ aide env ensure
### 5.1 修改 Command
1. 阅读对应的设计文档(如 `commands/init.md`
1. 阅读对应的设计文档(如 `commands/setup.md`
2. 理解职责和流程
3. 修改执行文件(如 `../commands/init.md`
3. 修改执行文件(如 `../commands/setup.md`
4. 更新设计文档(如有重大变更)
5. 更新本导览(如有新增/删除 Command
@@ -178,3 +196,11 @@ aide env ensure
- [aide flow 子命令](../../../aide-program/docs/commands/flow.md)
- [aide flow 详细设计](../../../aide-program/docs/commands/flow/README.md)
- [Claude Code 插件指南](../../../docs/03-插件指南.md)
---
## 七、版本信息
- 当前版本2.0.0
- 更新日期2025-12-15
- 主要变更Commands 体系重组setup/load/docs/run 替代 init/prep/exec