flowchart LR
subgraph main[" "]
direction TB
Start([開始]) --> Running[実行中]
SubReport --> Running
Running --> Goal
Running --> Budget{予算}
Running --> User{ユーザ干渉}
Running --> Limit{Claude側<br>レート制限}
subgraph 目標達成["目標達成判定"]
Goal{目標}
Complete[完了]
Partial[部分完了]
Goal -->|達成| Complete
Goal -->|部分達成| Partial
end
end
subgraph STOP管理["STOP回数管理"]
direction TB
Stop{STOP回数}
PMControl{PM判断}
Stop -->|閾値到達| PMControl
end
Running --> Stop
PMControl -->|継続/転属/個別終了| Running
%% 予算
Budget -->|枯渇| BudgetEnd[予算終了]
%% ユーザ
User -->|一時停止指示| Pause[待機]
User -->|終了指示| Report
Pause -->|再開| Running
%% レート制限
Limit --> Pause
%% 中間報告
Partial --> SubReport[中間レポート]
%% 終了
BudgetEnd --> Report[最終レポート]
Complete --> Report
Report --> End([終了])
%% スタイル
classDef warn fill:#ff9
classDef err fill:#f99
classDef ok fill:#9f9
classDef report fill:#9cf
classDef transparent fill:transparent,stroke:none
class Stop warn
class BudgetEnd err
class Complete,Partial ok
class SubReport,Report report
class main transparent
プロジェクト終了フローチャート
状態遷移図
flowchart LR subgraph main[" "] direction TB Start([開始]) --> Running[実行中] SubReport --> Running Running --> Goal Running --> Budget{予算} Running --> User{ユーザ干渉} Running --> Limit{Claude側<br>レート制限} subgraph 目標達成["目標達成判定"] Goal{目標} Complete[完了] Partial[部分完了] Goal -->|達成| Complete Goal -->|部分達成| Partial end end subgraph STOP管理["STOP回数管理"] direction TB Stop{STOP回数} PMControl{PM判断} Stop -->|閾値到達| PMControl end Running --> Stop PMControl -->|継続/転属/個別終了| Running %% 予算 Budget -->|枯渇| BudgetEnd[予算終了] %% ユーザ User -->|一時停止指示| Pause[待機] User -->|終了指示| Report Pause -->|再開| Running %% レート制限 Limit --> Pause %% 中間報告 Partial --> SubReport[中間レポート] %% 終了 BudgetEnd --> Report[最終レポート] Complete --> Report Report --> End([終了]) %% スタイル classDef warn fill:#ff9 classDef err fill:#f99 classDef ok fill:#9f9 classDef report fill:#9cf classDef transparent fill:transparent,stroke:none class Stop warn class BudgetEnd err class Complete,Partial ok class SubReport,Report report class main transparentSTOP回数閾値(stop_polling_v2.py実装)
閾値の動的管理
/Agent-shared/stop_thresholds.json.claude/hooks/stop_count.txtを直接編集終了時のチェックリスト
PMの終了時タスク
/Agent-shared/budget_history.md)/User-shared/final_report.md)SEの終了時タスク
CIの終了時タスク
PGの終了時タスク
CDの終了時タスク
実装上の注意点
stop_count.txtの管理
.claude/hooks/ディレクトリに保存終了時の通信
agent_send.shで終了通知を送信データの永続性
/User-shared/に保存