mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-07-30 03:09:50 +08:00
2.2 KiB
2.2 KiB
Planner Workflow Reference
Use this reference during orchestrator Step 3 when processing multiple bots in a single invocation.
When To Apply
- Apply only when there are more than 1 ready-for-authoring Agent Specs.
- If there is 1 or fewer specs, skip planner workflow and keep specs unchanged.
Inputs
Required inputs to this workflow:
spec_paths: all ready-for-authoring Agent Spec pathsworking_dir: orchestrator working directory where planner output must be written- associated artifacts for each spec when present:
- handoff JSON
- open questions
Required Workflow
- Read all specs and associated artifacts.
- Build a final candidate set of specs that will each map to one actual downstream agent.
- Identify existing subagent grouping/context in each spec.
- Attempt regrouping based on:
- intent
- underlying object/entity
- broad category
- Allowed structural operations across specs:
- merge
- split
- move
- delete
- Apply operations only when they improve:
- modularity
- context-awareness
- interactive user experience
- Never perform changes for superficial consistency only.
- Preserve full functional coverage:
- no input functionality may be lost
- if any functionality loss risk is detected, abandon changes and mark unchanged
Required Output File
Write:
<working_dir>/bot-upgrade-planner-output.json
Schema:
{
"specs_changed": true,
"updated_specs": [
{
"original_spec_path": "/path/original/spec-a.md",
"updated_spec_path": "/path/updated/spec-a.md",
"run_project_dir": "/path/updated/run-project-dir",
"handoff_json_path": "/path/updated/spec-a-einstein-bot-handoff.json",
"open_questions_path": "/path/updated/spec-a-open-questions.md"
}
]
}
Rules:
specs_changedis boolean.- If
specs_changed=false, thenupdated_specs=[]. - If
specs_changed=true,updated_specsmust include entries for all changed specs. - Every changed entry must include:
original_spec_pathupdated_spec_pathrun_project_dirhandoff_json_pathopen_questions_path
- If any functionality-loss risk exists, force:
specs_changed=falseupdated_specs=[]