[aide] flow-design: 流程图设计完成
This commit is contained in:
76
.aide/diagrams/git-branch-finish-logic.puml
Normal file
76
.aide/diagrams/git-branch-finish-logic.puml
Normal 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
|
||||
60
.aide/diagrams/git-branch-logic.puml
Normal file
60
.aide/diagrams/git-branch-logic.puml
Normal 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
|
||||
64
.aide/diagrams/git-branch-management-task.puml
Normal file
64
.aide/diagrams/git-branch-management-task.puml
Normal 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
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"task_id": "2025-12-17T03-13-17",
|
||||
"current_phase": "flow-design",
|
||||
"current_step": 6,
|
||||
"current_step": 7,
|
||||
"started_at": "2025-12-17T03:13:17+08:00",
|
||||
"history": [
|
||||
{
|
||||
@@ -49,7 +49,15 @@
|
||||
"action": "next-part",
|
||||
"phase": "flow-design",
|
||||
"step": 6,
|
||||
"summary": "进入流程设计环节"
|
||||
"summary": "进入流程设计环节",
|
||||
"git_commit": "1cb2c894cbbbfc246c7e0e5869c6c95e69fc131e"
|
||||
},
|
||||
{
|
||||
"timestamp": "2025-12-17T04:03:48+08:00",
|
||||
"action": "next-step",
|
||||
"phase": "flow-design",
|
||||
"step": 7,
|
||||
"summary": "流程图设计完成"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
23922
|
||||
26001
|
||||
Reference in New Issue
Block a user