docs: replace workflow contract with overview diagrams - #110
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 1f32fb9dbb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| ### PLAN.md lifecycle | ||
|
|
||
| Each workflow uses only `<CODEX_ROOT>/model-router/workflows/<workflow_id>/PLAN.md`. Only the active writable executor writes atomically; reviewers do not write it. After `PASS`, the same owner removes the directory. Blocking, resume, replacement, and primary switches preserve path, version, and owner; cleanup failure is stored as `cleanup-failed`. | ||
|  |
There was a problem hiding this comment.
Use the contract's exact persisted state field names
The “Workflow State Fields” panel in both linked diagrams presents allowed_actions, execution_attempts, failure_class, and plan_hash as atomically persisted fields, but the declarative contract requires luna_allowed_actions, terra_execution_attempts, and rollback_class, and defines no plan_hash. Since this diagram replaces the textual contract, a host following it can persist incompatible state and lose action policy, retry counters, or rollback classification during recovery; regenerate the panel with the exact schema or clearly label these as non-schema examples.
Useful? React with 👍 / 👎.
| ### PLAN.md 生命週期 | ||
|
|
||
| 每個 workflow 只使用 `<CODEX_ROOT>/model-router/workflows/<workflow_id>/PLAN.md`。只有 active writable executor 能原子寫入;reviewer 不寫檔。`PASS` 後由同一 owner 清理該目錄;阻塞、恢復、替換與 primary switch 保留 path、version、owner;清理失敗標記為 `cleanup-failed`。 | ||
|  |
There was a problem hiding this comment.
Preserve the second Terra execution attempt in the diagram
In both language-specific diagrams, a failure of the Stage 3 Terra-execute/Sol-review sequence goes directly to full takeover. The production transition table instead keeps the first failure in SOL_PLAN_REVIEW_WITH_TERRA, increments terra_execution_attempts, and permits a second Terra attempt; only the second failure starts SOL_FULL_TAKEOVER. A host implementing this replacement overview would therefore escalate one attempt too early, so the diagram needs a retry loop before the takeover arrow.
Useful? React with 👍 / 👎.
Summary
Workflow contractsection with the dedicated multi-agent workflow overview diagrams多代理工作流程總覽/Multi-Agent Workflow Overviewworkflow-overview.pngValidation
npm test(109 passed)npm run checknpm run test:packageNo issue number was specified for this change.