[aide] task-optimize: 开始任务准备: 重写 README.md,提供快速上手指南

This commit is contained in:
2025-12-15 21:48:00 +08:00
parent 33372e5102
commit 334a25617a
27 changed files with 230 additions and 2225 deletions

View File

@@ -1,56 +0,0 @@
@startuml overall-flow
!theme plain
title Aide 工作流体系重构 - 总体执行流程
start
:读取任务细则;
note right: .aide/task-spec.md
partition "子计划 1: 配置系统增强" {
:修改 config.py;
:自文档化配置模板;
:复制 plantuml.jar;
:更新 aide init 逻辑;
}
partition "子计划 2: aide flow 状态查看" {
:设计 flow 状态数据格式;
:实现 flow status;
:实现 flow list;
:实现 flow show;
:更新 skill 文档;
}
partition "子计划 3: aide flow 流程图集成" {
:创建 plantuml 环境模块;
:实现校验功能;
:实现构建功能;
:集成到 flow 逻辑;
}
partition "子计划 4: 项目文档体系" {
:设计文档结构规范;
:设计创建/更新流程;
:创建 /aide:docs command;
}
partition "子计划 5: Commands 重组" {
:创建 /aide:setup;
:创建 /aide:load;
:重构 /aide:run;
:更新 plugin.json;
}
partition "子计划 6: 任务分析增强" {
:复杂度评估指导原则;
:子计划结构设计;
:循环执行机制;
}
:验证所有功能;
:更新文档;
:清理收尾;
stop
@enduml

View File

@@ -1,66 +0,0 @@
@startuml subplan1-config
!theme plain
title 子计划 1: 配置系统增强
start
:读取当前 config.py;
note right: aide-program/aide/core/config.py
partition "1. 新增配置项支持" {
:添加 [general] 节;
note right
gitignore_aide = true/false
end note
:添加 [docs] 节;
note right
path = "..."
block_plan_path = "..."
end note
:添加 [flow] 节扩展;
note right
diagram_path = "..."
end note
:添加 [plantuml] 节;
note right
jar_path = "lib/plantuml.jar"
end note
}
partition "2. 自文档化配置模板" {
:编写 DEFAULT_CONFIG;
:添加完整 TOML 注释;
:所有配置项含说明;
:提供示例值;
}
partition "3. 复制 plantuml.jar" {
:创建 lib/ 目录;
:复制 jar 文件;
note right
从: /home/user/env-hub/jar/plantuml.jar
到: aide-program/lib/plantuml.jar
end note
}
partition "4. 修改 aide init 逻辑" {
:读取 gitignore_aide 配置;
if (gitignore_aide == true?) then (是)
:添加 .aide/ 到 .gitignore;
else (否)
:不修改 .gitignore;
endif
}
partition "5. 更新设计文档" {
:更新 formats/config.md;
:更新 README.md;
}
:验证配置功能;
stop
@enduml

View File

@@ -1,69 +0,0 @@
@startuml subplan2-flow-status
!theme plain
title 子计划 2: aide flow 状态查看功能
start
partition "1. 设计数据存储格式" {
:分析现有 flow-status.json;
:设计任务列表索引;
note right
.aide/flow-index.json
记录所有任务的 task_id 和概要
end note
:设计归档命名规则;
}
partition "2. 实现 flow status" {
:读取 flow-status.json;
if (文件存在?) then (是)
:解析当前状态;
:输出格式化信息;
note right
环节: impl
步骤: 3
简述: xxx
时间: 2025-12-15 10:30
提交: abc1234
end note
else (否)
:输出 "当前无活跃任务";
endif
}
partition "3. 实现 flow list" {
:读取 flow-index.json;
:读取 logs/ 目录下归档文件;
:合并任务列表;
:按时间倒序排列;
:输出任务列表;
note right
[1] 20251215-103000 Aide重构 (finish)
[2] 20251214-090000 贪吃蛇游戏 (impl)
end note
}
partition "4. 实现 flow show" {
:接收 task_id 参数;
:查找对应状态文件;
if (找到?) then (是)
:解析历史记录;
:格式化输出;
note right
输出每个历史条目:
环节、简述、时间戳、git提交
end note
else (否)
:输出错误 "任务不存在";
endif
}
partition "5. 更新相关文档" {
:更新 aide skill SKILL.md;
:更新 flow 设计文档;
}
:测试新命令;
stop
@enduml

View File

@@ -1,81 +0,0 @@
@startuml subplan3-plantuml
!theme plain
title 子计划 3: aide flow 流程图集成
start
partition "1. 创建 plantuml 环境模块" {
:创建 env/modules/plantuml.py;
:继承 BaseModule;
:实现 check() 方法;
note right
检查:
- java 命令可用
- jar 文件存在
end note
:注册到 registry;
}
partition "2. 实现校验功能" {
:创建 flow/plantuml.py;
:实现 validate_puml(file_path);
note right
调用: java -jar plantuml.jar -checkonly file.puml
返回: (success, error_message)
end note
:实现 validate_all(directory);
note right
遍历目录下所有 .puml 文件
返回: [(file, success, error)]
end note
}
partition "3. 实现构建功能" {
:实现 build_puml(file_path);
note right
调用: java -jar plantuml.jar -tpng file.puml
生成: file.png
end note
:实现 build_all(directory);
note right
遍历目录下所有 .puml 文件
批量生成 PNG
end note
}
partition "4. 集成到 flow 逻辑" {
:修改 hooks.py;
:修改 next-step 钩子;
if (当前环节 == flow-design?) then (是)
:校验流程图目录;
if (校验通过?) then (是)
:继续执行;
else (否)
:记录问题到 git;
:返回错误提示;
endif
endif
:修改 next-part impl 钩子;
if (从 flow-design 进入?) then (是)
:校验所有 .puml 文件;
if (校验通过?) then (是)
:批量构建 PNG;
:继续执行;
else (否)
:记录问题到 git;
:返回错误提示;
endif
endif
}
partition "5. 更新设计文档" {
:更新 hooks 设计文档;
:更新 flow 设计文档;
}
:测试集成功能;
stop
@enduml

View File

@@ -1,109 +0,0 @@
@startuml subplan4-docs-system
!theme plain
title 子计划 4: 项目文档体系设计与实现
start
partition "1. 设计文档结构规范" {
:设计总导览文档格式;
note right
# 项目导览
## 项目简介
## 架构概述
## 区块索引
- [区块A](./blocks/a.md)
- [区块B](./blocks/b.md)
end note
:设计子区块文档格式;
note right
# 区块名称
## 概述
## 文件清单
## 核心组件
## 接口说明
## 依赖关系
end note
:制定区块划分规则;
note right
1. 按目录结构自然划分
2. 按功能模块语义划分
3. 单个区块不超过 5000 行
4. 保持区块间低耦合
end note
}
partition "2. 设计文档创建流程" {
:目录探索;
note right
遍历目录结构
统计文件数量和大小
识别 .gitignore 排除项
end note
:初步区块划分;
note right
根据目录结构和文件类型
生成初步区块计划
end note
:区块验证;
note right
浅层探索各区块
验证划分合理性
调整区块边界
end note
:逐区块深度了解;
note right
每个区块完整阅读
提取核心信息
生成文档
end note
:进度检查点;
note right
记录进度到区块计划文档
支持多对话续接
end note
}
partition "3. 设计文档更新流程" {
:分区块验证;
note right
对比文档与代码
识别差异
end note
:差异检测;
note right
标记需要更新的部分
end note
:增量更新;
note right
只更新有变化的区块
更新导览索引
end note
}
partition "4. 创建 /aide:docs command" {
:创建 commands/docs.md;
:定义命令流程;
note right
- 检查文档目录配置
- 首次创建/更新逻辑
- 区块进度追踪
- 多对话续接支持
end note
:强制触发 aide skill;
}
partition "5. 更新相关文档" {
:创建文档规范文档;
:更新 plugin 设计文档;
}
stop
@enduml

View File

@@ -1,109 +0,0 @@
@startuml subplan5-commands
!theme plain
title 子计划 5: Commands 重组
start
partition "1. 创建 /aide:setup" {
:创建 commands/setup.md;
:定义职责;
note right
独立运行的环境管理命令
专注: 分析、配置、检测、修复
end note
:定义流程;
note right
1. 强制触发 env-config skill
2. 运行 aide env ensure --runtime
3. 分析项目依赖
4. 配置环境模块
5. 运行 aide env ensure
6. 处理问题(重试或询问)
end note
}
partition "2. 创建 /aide:load" {
:创建 commands/load.md;
:定义职责;
note right
项目文档按需载入
由 /aide:run 调用
end note
:定义流程;
note right
1. 检查项目文档目录配置
2. 读取总导览文档
3. 建立项目脉络认知
4. 支持后续按需深入
end note
:处理文档不存在;
note right
提示用户先执行 /aide:docs
或按需创建文档
end note
}
partition "3. 重构 /aide:run" {
:创建 commands/run.md;
:强制触发 aide skill;
:检查 flow 状态;
if (flow 为空或已 finish?) then (是)
:启动新 flow;
note right
aide flow start task-optimize "..."
end note
:执行 task-optimize 阶段;
:处理待定项;
:生成任务细则;
else (否)
:分析当前进度;
:调用 /aide:load 载入文档;
:续接任务;
endif
:执行 flow-design 阶段;
note right
创建流程图
end note
:执行 impl 阶段;
:执行 verify 阶段;
:执行 docs 阶段;
:执行 finish 阶段;
}
partition "4. 处理旧命令" {
:重命名 init.md → _deprecated_init.md;
:重命名 prep.md → _deprecated_prep.md;
:重命名 exec.md → _deprecated_exec.md;
note right
保留旧文件便于参考
但不再注册到 plugin
end note
}
partition "5. 更新 plugin.json" {
:移除旧命令注册;
:添加新命令注册;
note right
/aide:setup
/aide:load
/aide:docs
/aide:run
end note
}
partition "6. 更新设计文档" {
:更新 docs/commands/;
:更新 docs/README.md;
}
stop
@enduml

View File

@@ -1,99 +0,0 @@
@startuml subplan6-task-analysis
!theme plain
title 子计划 6: 任务分析阶段增强
start
partition "1. 复杂度评估指导原则" {
:整理评估维度;
note right
结构维度: 模块数、文件数、依赖关系
逻辑维度: 业务复杂度、状态管理
集成维度: 外部依赖、数据格式
风险维度: 技术风险、影响范围
end note
:定义复杂度等级;
note right
简单: 直接执行
中等: 直接执行,注意顺序
复杂: 必须拆分子计划
超大: 拆分为独立任务
end note
:制定拆分标准;
note right
1. 涉及 3+ 独立模块
2. 自然分为多个阶段
3. 存在高风险环节
4. 明确的前后依赖
5. 需要多次对话
end note
}
partition "2. 设计子计划结构" {
:设计任务导览格式;
note right
# 任务导览
## 任务概述
## 子计划列表
| 序号 | 名称 | 状态 | 依赖 |
## 当前进度
end note
:设计子计划细则格式;
note right
# 子计划 N: 名称
## 目标
## 成功标准
## 执行步骤
## 交付物
end note
}
partition "3. 实现拆分逻辑" {
:修改 /aide:run 的 task-optimize;
:任务分析;
:复杂度评估;
if (复杂度 >= 复杂?) then (是)
:识别可独立交付阶段;
:按依赖关系排序;
:生成任务导览文档;
:生成各子计划细则;
else (否)
:生成单一任务细则;
endif
}
partition "4. 实现循环执行机制" {
:修改 /aide:run 执行逻辑;
:读取任务导览;
:确定当前子计划;
while (还有未完成的子计划?) is (是)
:执行 flow-design;
:执行 impl;
:执行 verify;
:执行 docs;
:标记子计划完成;
:更新任务导览;
endwhile (否)
:执行 finish;
}
partition "5. 更新 /aide:run command" {
:整合上述逻辑;
:更新命令文档;
}
partition "6. 更新设计文档" {
:创建复杂度评估指南;
:更新 run command 文档;
}
stop
@enduml

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 151 KiB