工作流模型
這份文件定義 Bullinv Forge 中 task 的流動方式。
Task Lifecycle
建議第一版先定義以下狀態:
draftqueuedclaimedrunningblockedin_reviewcompletedfailedreopened
狀態轉移圖
flowchart LR
draft --> queued
queued --> claimed
claimed --> running
running --> blocked
running --> in_review
running --> completed
running --> failed
blocked --> queued
in_review --> completed
in_review --> reopened
failed --> reopened
reopened --> queued
關鍵節點
Claim
代表某個 human 或 agent 正式接手任務。
Run
代表任務執行中,會持續產生:
- progress updates
- blocker updates
- tool call records
- result drafts
Blocked
代表任務暫時卡住,需要:
- 更多上下文
- 更多權限
- 人工決策
- 外部系統恢復
In Review
代表任務已有結果,但需人工確認後才算完成。
Human Handoff
平台必須支援:
- human -> agent
- agent -> human
- agent -> agent
交接時至少要有:
- 任務摘要
- 當前狀態
- 已完成事項
- blocker
- 下一步建議
Retry / Reopen
任務不應只分成功或失敗。
應允許:
- retry
- reopen
- revise after review
第一版原則
- 先把 state machine 定清楚
- 不用一開始就做很複雜的 BPM
- 先讓 task lifecycle 在 UI 與 runtime 中一致