Detect workstreams (1 = single session, 2-5 = parallel via multitask)
Register session in tree (depth/capacity enforcement)
Execute rounds (up to 3, goal-seeking reflection loop)
Summarize results with PR links and GOAL_STATUS
Session tree
Prevents infinite recursion
AMPLIHACK_MAX_DEPTH=3
(default) — increase to 5 for deep orchestration
AMPLIHACK_MAX_SESSIONS=10
(default) — max concurrent sessions per tree
Status signals:
GOAL_STATUS: ACHIEVED
— all criteria met
GOAL_STATUS: PARTIAL -- [gaps]
— another round will run
GOAL_STATUS: NOT_ACHIEVED -- [reason]
— final failure status
Related Docs
reference.md: Architecture (5 mechanisms, 5 layers, hooks)
examples.md: Scenarios (5+ real examples)
@~/.amplihack/.claude/context/PHILOSOPHY.md: Core principles
@~/.amplihack/.claude/workflow/DEFAULT_WORKFLOW.md: 23 steps
@~/.amplihack/.claude/agents/amplihack/: All agents
@~/.amplihack/.claude/commands/amplihack/: All commands
@~/.amplihack/.claude/tools/amplihack/hooks/: Hook system
amplifier-bundle/recipes/smart-orchestrator.yaml: Core orchestration recipe
amplifier-bundle/tools/session_tree.py: Recursion guard (depth limits)
amplifier-bundle/tools/orch_helper.py: JSON extraction helper