feat(orchestration): LLM-based task planner (Phase 2, #1237)#1251
Merged
feat(orchestration): LLM-based task planner (Phase 2, #1237)#1251
Conversation
…hase 2, #1237) Add Planner trait and LlmPlanner implementation that decomposes user goals into validated TaskGraphs via structured LLM output (chat_typed). - Planner trait with async plan() method accepting goal and agent catalog - LlmPlanner<P: LlmProvider> using chat_typed for JSON schema injection, retry-on-malformed, and code fence stripping - PlannerResponse/PlannedTask with schemars::JsonSchema derives - String task_id to TaskId(u32) mapping via HashMap with duplicate detection - Kebab-case task_id validation (max 64 chars, [a-z0-9-]) - Agent hint validation against SubAgentDef catalog (warn on mismatch) - Failure strategy parsing with warn on invalid values - DAG validation via dag::validate after conversion - OrchestrationConfig: add planner_model and planner_max_tokens fields - 24 tests covering conversion, prompt building, and integration
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Plannertrait andLlmPlanner<P: LlmProvider>for LLM-based goal decomposition into validatedTaskGraphchat_typedfor structured JSON output with automatic schema injection, retry-on-malformed, and code fence strippingTaskId(u32)mapping via HashMap, kebab-case validation (max 64 chars)SubAgentDefcatalog (warn on unknown, proceed with None)OrchestrationConfigwithplanner_modelandplanner_max_tokensfieldsParent: #1235
Blocked by: #1236 (merged)
Parallel with: #1238
Test plan
cargo +nightly fmt --checkpassescargo clippy --workspace --features full -- -D warningspassescargo nextest run --workspace --features full --lib --bins— 4198 passed, 11 skipped