[aide] flow-design: 流程图设计完成

This commit is contained in:
2025-12-17 04:03:48 +08:00
parent 1cb2c894cb
commit 0630bfc4cd
8 changed files with 217 additions and 4 deletions

View File

@@ -0,0 +1,76 @@
@startuml git-branch-finish-logic
!theme plain
title 程序逻辑流图aide flow finish 安全合并
start
:FlowTracker.next_part("finish", summary);
partition "分支合并准备" {
:从 FlowStatus 获取分支信息;
note right
- source_branch
- start_commit
- task_branch (当前分支)
end note
:记录 end_commit = rev_parse_head();
}
partition "检测源分支变更" {
:GitIntegration.has_commits_since(start_commit, source_branch);
if (源分支有新提交?) then (是)
partition "创建临时分支处理" {
:从 start_commit 检出临时分支;
:temp_branch = task_branch + "-merge";
:git checkout -b temp_branch start_commit;
:在临时分支执行 squash 合并;
:git merge --squash task_branch;
:git commit -m "任务压缩提交";
:BranchManager.record_branch_finish();
note right
status: "merged-to-temp"
temp_branch: temp_branch
end note
:输出警告;
note right
"⚠ 源分支有新提交"
"已在临时分支完成合并"
"请手动处理后续操作"
end note
}
else (否)
partition "正常合并流程" {
:切回源分支;
:git checkout source_branch;
:软重置到起始提交;
:git reset --soft start_commit;
:创建压缩提交;
:git add .;
:git commit -m "[aide] 任务: {summary}";
:BranchManager.record_branch_finish();
note right
status: "finished"
end_commit: 新提交哈希
end note
}
endif
}
partition "更新分支概况" {
:BranchManager.save_branches();
note right: 同时生成 JSON 和 MD
}
:继续原有 finish 逻辑;
stop
@enduml

View File

@@ -0,0 +1,60 @@
@startuml git-branch-logic
!theme plain
title 程序逻辑流图aide flow start 分支创建
start
:FlowTracker.start(phase, summary);
partition "Git 状态检查" {
:GitIntegration.is_clean();
if (工作目录干净?) then (否)
:git add .;
:git commit -m "保存未提交的变更";
else (是)
endif
:GitIntegration.has_commits();
if (有提交历史?) then (否)
:创建 .gitkeep;
:git commit -m "初始提交";
else (是)
endif
}
partition "分支创建" {
:记录 source_branch = get_current_branch();
:记录 start_commit = rev_parse_head();
:BranchManager.get_next_branch_number();
note right: 从 branches.json 读取
:branch_name = "aide/" + 编号;
:GitIntegration.create_branch(branch_name);
:GitIntegration.checkout(branch_name);
:BranchManager.record_branch_start();
note right
记录到 branches.json:
- branch_name
- source_branch
- start_commit
- task_id
- task_summary
- started_at
- status: "active"
end note
:BranchManager.save_branches();
note right: 同时生成 JSON 和 MD
}
:继续原有 start 逻辑;
:保存 FlowStatus;
:git add . && commit;
stop
@enduml

View File

@@ -0,0 +1,64 @@
@startuml git-branch-management-task
!theme plain
title 任务执行流程图Git 分支管理功能实现
start
partition "子计划 1: Git 分支管理核心功能" {
:扩展 GitIntegration 类;
note right
新增方法:
- get_current_branch()
- is_clean()
- has_commits()
- create_branch()
- checkout()
- has_commits_since()
- reset_soft()
end note
:创建 BranchManager 类;
note right
branch.py 新文件
管理分支编号和概况文档
end note
:修改 FlowTracker.start();
note right
集成分支创建逻辑
end note
:修改 FlowTracker (finish 逻辑);
note right
集成安全合并策略
end note
:测试验证子计划 1;
}
partition "子计划 2: 流程更新" {
:更新 command/run.md 续接逻辑;
note right
智能判断细则符合度
end note
:更新确认机制;
note right
待定项: aide decide
细则: AskUserQuestion
end note
:测试验证子计划 2;
}
partition "子计划 3: 文档更新" {
:更新 aide skill;
:更新 flow 命令文档;
:更新 CHANGELOG;
:测试验证子计划 3;
}
:完成验证;
stop
@enduml

View File

@@ -1,7 +1,7 @@
{ {
"task_id": "2025-12-17T03-13-17", "task_id": "2025-12-17T03-13-17",
"current_phase": "flow-design", "current_phase": "flow-design",
"current_step": 6, "current_step": 7,
"started_at": "2025-12-17T03:13:17+08:00", "started_at": "2025-12-17T03:13:17+08:00",
"history": [ "history": [
{ {
@@ -49,7 +49,15 @@
"action": "next-part", "action": "next-part",
"phase": "flow-design", "phase": "flow-design",
"step": 6, "step": 6,
"summary": "进入流程设计环节" "summary": "进入流程设计环节",
"git_commit": "1cb2c894cbbbfc246c7e0e5869c6c95e69fc131e"
},
{
"timestamp": "2025-12-17T04:03:48+08:00",
"action": "next-step",
"phase": "flow-design",
"step": 7,
"summary": "流程图设计完成"
} }
] ]
} }

View File

@@ -1 +1 @@
23922 26001

View File

@@ -1,7 +1,7 @@
{ {
"name": "aide-plugin", "name": "aide-plugin",
"description": "Aide 工作流体系插件,提供环境配置、项目认知、文档管理和任务执行的标准化流程", "description": "Aide 工作流体系插件,提供环境配置、项目认知、文档管理和任务执行的标准化流程",
"version": "2.0.6", "version": "2.0.7",
"author": { "author": {
"name": "Aide Team" "name": "Aide Team"
}, },

View File

@@ -10,6 +10,9 @@
**首先触发 `aide` skill 学习 aide 命令的使用方法。** **首先触发 `aide` skill 学习 aide 命令的使用方法。**
这是一个非常长的任务,因此规划您的工作可能会很有益。**建议花费您的整个输出上下文来处理任务 - 只需确保您不会在有大量未提交的工作时用尽上下文。**继续系统地工作,直到您完成此任务。**您的上下文窗口将在接近其限制时自动压缩,允许您从中断的地方继续无限期地工作。因此,不要因为令牌预算问题而提前停止任务。**当您接近令牌预算限制时,在上下文窗口刷新前将您当前的进度和状态保存到内存中。始终尽可能坚持和自主,并完全完成任务,即使您的预算即将用尽。无论剩余上下文如何,永远不要人为地提前停止任何任务。
--- ---
## 开始 ## 开始

View File

@@ -13,6 +13,8 @@
**首先触发 `aide` skill 学习 aide 命令的使用方法。** **首先触发 `aide` skill 学习 aide 命令的使用方法。**
这是一个非常长的任务,因此规划您的工作可能会很有益。**建议花费您的整个输出上下文来处理任务 - 只需确保您不会在有大量未提交的工作时用尽上下文。**继续系统地工作,直到您完成此任务。**您的上下文窗口将在接近其限制时自动压缩,允许您从中断的地方继续无限期地工作。因此,不要因为令牌预算问题而提前停止任务。**当您接近令牌预算限制时,在上下文窗口刷新前将您当前的进度和状态保存到内存中。始终尽可能坚持和自主,并完全完成任务,即使您的预算即将用尽。无论剩余上下文如何,永远不要人为地提前停止任何任务。
--- ---
## 开始 ## 开始