[Feature]PlanOnly mode#203
Conversation
|
@codex review plz |
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
Approach looks right, but there is one real lifecycle bug. P1 (must fix): P2 (optional, can be follow-up): |
fddee4f to
1f9556c
Compare
1f9556c to
ea42f2b
Compare
|
P1 fixed. P2 is non-blocking / follow-up. Good to merge. |
What
Adds a
planOnlyoption torunTeam()that lets the coordinator decompose a goal into tasks without executing any task agents. The result hassuccess: true,planOnly: true, andtaskspopulated with pending/blocked task records: useful for integration testing the task DAG or previewing cost before a real run.What changed
src/types.ts— newRunTeamOptionsinterface (replaces the inline anonymous options type onrunTeam()); addsplanOnly?: booleanto bothRunTeamOptionsandTeamRunResultsrc/orchestrator/orchestrator.ts—runTeam()now acceptsRunTeamOptions; bypasses the simple-goal short circuit whenplanOnly: true; inserts a short-circuit afteronPlanReadyfires (but beforeexecuteQueue) that returnssuccess: truewith tasks fromqueue.list()src/index.ts— exportsRunTeamOptionsas part of the public APItests/orchestrator.test.ts— four new test cases covering: plan returned without executing tasks,onPlanReadystill fires,onPlanReadyrejection wins overplanOnly, and simple-goal short-circuit is bypassedBehavior notes
onPlanReadystill fires whenplanOnly: true. If the callback returnsfalse, the rejection wins — result issuccess: falseandplanOnlyisundefined(same as today's abort behavior).planOnlyis a per-call option on the third argument, not onOrchestratorConfig: consistent with the scope guidance in the issue.planOnlyon a single-agent team is valid and returns a single-task plan.Why
fixed #192