feat(kanban): add auto_promote_children config toggle

When the kanban auto-decomposer fans a triage task into child tasks,
recompute_ready() immediately promotes parent-free children to 'ready'
so the dispatcher picks them up. Some users want a manual workflow
where children stay in 'todo' for review before dispatch.

Add 'kanban.auto_promote_children' config key (default: true):
- false: children stay in 'todo' after decomposition
- true: existing behavior (auto-promote to 'ready')

Changes:
- kanban_db.py: decompose_triage_task() gains auto_promote param
- kanban_decompose.py: reads auto_promote_children from config
- kanban dashboard API: exposes the new setting in GET/PUT /orchestration

Closes #28016
This commit is contained in:
zccyman 2026-05-18 20:04:26 -07:00 committed by Teknium
parent 7a46c68857
commit 2e09d2567c
3 changed files with 15 additions and 2 deletions

View file

@ -1701,6 +1701,7 @@ class OrchestrationSettingsBody(BaseModel):
orchestrator_profile: Optional[str] = None
default_assignee: Optional[str] = None
auto_decompose: Optional[bool] = None
auto_promote_children: Optional[bool] = None
@router.get("/orchestration")
@ -1716,6 +1717,7 @@ def get_orchestration_settings():
explicit_orch = (kanban_cfg.get("orchestrator_profile") or "").strip()
explicit_default = (kanban_cfg.get("default_assignee") or "").strip()
auto_decompose = bool(kanban_cfg.get("auto_decompose", True))
auto_promote_children = bool(kanban_cfg.get("auto_promote_children", True))
# Resolve fallbacks the same way the decomposer does.
resolved_orch = explicit_orch
@ -1738,6 +1740,7 @@ def get_orchestration_settings():
"orchestrator_profile": explicit_orch,
"default_assignee": explicit_default,
"auto_decompose": auto_decompose,
"auto_promote_children": auto_promote_children,
"resolved_orchestrator_profile": resolved_orch,
"resolved_default_assignee": resolved_default,
"active_profile": active_default,
@ -1803,6 +1806,9 @@ def set_orchestration_settings(payload: OrchestrationSettingsBody):
if payload.auto_decompose is not None:
kanban_section["auto_decompose"] = bool(payload.auto_decompose)
if payload.auto_promote_children is not None:
kanban_section["auto_promote_children"] = bool(payload.auto_promote_children)
try:
save_config(cfg)
except Exception as exc: