Arbor Coordinator
Use this to run the strategic loop. The coordinator is a research commander,
not the code author.
Coordinator Role
- Do not edit benchmark code directly.
- Maintain the Idea Tree as durable memory.
- Dispatch executors to implement leaf ideas.
- Learn from results, update insights, merge winners, prune dead ends, and
stop when further cycles are not justified.
- Treat user dashboard notes as operator input, not benchmark evidence.
Arbor Cycle
Step 0: INIT
Run once at the start unless resuming.
- Inspect the project structure, source files, evaluation scripts, and data.
- Identify B_dev and B_test.
- Run or locate the unmodified baseline on B_dev.
- Persist metadata with
TreeSetMeta:
baseline_score, trunk_score, eval_cmd, eval_cmd_test,
dataset_info, metric_direction, trunk_branch, and any
timeout/retry settings.
- If a plugin supplies an
eval_contract, prefill the matching metadata.
If resuming, skip INIT and call TreeView to re-orient.
If the run is smoke-only, do not run expensive baselines or inherited real
eval commands. Persist a cheap cached-score parser or explicitly mocked score
as the eval command, set short timeout metadata, and mark dataset_info and
node reports as smoke-only.
Step 1: OBSERVE
Read code, logs, prior experiment reports, tree insights, failure cases, and
score patterns. Focus on failure classes and bottlenecks, not just symptoms.
For large logs, use arbor_state.py parse-log or normalize carriage returns
before matching metric lines. Do not flood context with full training logs
during smoke or forward tests.
Step 2: IDEATE
- Call
TreeView(format="constraints") first.
- If strict skills are enabled, immediately load
arbor-agent-ideate.
- Add only ideas that pass the ideation gate.
Depth semantics:
- Depth 0: root objective and global insight.
- Depth 1: broad strategy categories.
- Depth 2+: concrete implementable approaches.
Step 3: SELECT
Choose pending leaves using evidence, expected impact, feasibility, diversity,
and recoverable failure modes. Use TreeView(format="pending") or compact view.
Step 4: DISPATCH And UPDATE
Load arbor-agent-executor and dispatch:
- One idea:
RunExecutor(node_id, additional_context=...).
- Independent ideas:
RunExecutorParallel(tasks=[...]), usually 2-4 tasks.
Executors auto-update node status, score, insight, result, branch, artifacts,
and propagated ancestor insights. If extraction is wrong, correct it with
TreeUpdateNode.
Scores in the tree are absolute B_dev metric values, not deltas.
Step 5: DECIDE
Use arbor-agent-merge-eval for merge decisions.
- Continue: more promising directions exist.
- Merge: B_dev beats trunk enough and B_test verification passes.
- Prune: repeated failures with no credible recovery path.
- Stop: cap/budget reached, diminishing returns, or no pending ideas.
Before stopping, run final B_test only if it is available, the contract permits
it, and the run is not smoke-only. Record test_trunk_score when the final
test run is valid.
Idea Tree Schema
Node statuses are:
pending
running
done
merged
pruned
Each node stores:
id, parent_id, children_ids, depth
hypothesis
status
insight
result
score
code_ref
related_work
Tree metadata stores:
baseline_score, trunk_score
test_baseline_score, test_trunk_score
eval_cmd, eval_cmd_test
eval_timeout, eval_retries, retry backoff
dataset_info
metric_direction
trunk_branch
submission_path, sample_submission_path
Tool Mapping
Native Arbor tools:
TreeView: compact/full/node/pending/constraints.
TreeAddNode: add child with generated id.
TreeUpdateNode: update status, insight, result, score, code_ref,
hypothesis, related_work.
TreeSetMeta: persist evaluation metadata.
TreePrune: mark a subtree pruned.
TreePropagate: synthesize child insights upward.
RunExecutor, RunExecutorParallel: run implementation agents.
GitMergeBranch: B_test verify and merge.
SearchIdeaContext, SearchIdeaContextParallel, SearchStatus: related
work annotation.
If these are not available, load arbor-agent-tools and use
scripts/arbor_state.py as the state backend.
When using the fallback helper, serialize tree-mutating commands for the same
run. Do not launch meta, add, update, prune, propagate, eval,
record, worktree, or merge in parallel.
Cycle Caps
Count cycles once a node is done, merged, pruned, or failed. If the hard cap is
reached, do not launch more executors. Finalize: merge the best verified branch
if it passes, otherwise stop and report.
AskUser And Live Notes
Use human questions only when genuinely blocked on information that cannot be
discovered locally. In direction or collaborative mode, ask for direction
after constraints and before adding nodes. In review modes, respect skipped
or edited ideas and executor gates.
1---2name: arbor-agent-coordinator3description: Coordinator phase for Arbor: persistent ReAct loop, Idea Tree state, INIT/OBSERVE/IDEATE/SELECT/DISPATCH/DECIDE protocol, tool mapping, cycle caps, and coordinator-only behavior. Use after setup/intake and before phase-specific ideation, executor, merge, search, or report skills.4---56# Arbor Coordinator78Use this to run the strategic loop. The coordinator is a research commander,9not the code author.1011## Coordinator Role1213- Do not edit benchmark code directly.14- Maintain the Idea Tree as durable memory.15- Dispatch executors to implement leaf ideas.16- Learn from results, update insights, merge winners, prune dead ends, and17 stop when further cycles are not justified.18- Treat user dashboard notes as operator input, not benchmark evidence.1920## Arbor Cycle2122### Step 0: INIT2324Run once at the start unless resuming.25261. Inspect the project structure, source files, evaluation scripts, and data.272. Identify B_dev and B_test.283. Run or locate the unmodified baseline on B_dev.294. Persist metadata with `TreeSetMeta`:30 `baseline_score`, `trunk_score`, `eval_cmd`, `eval_cmd_test`,31 `dataset_info`, `metric_direction`, `trunk_branch`, and any32 timeout/retry settings.335. If a plugin supplies an `eval_contract`, prefill the matching metadata.3435If resuming, skip INIT and call `TreeView` to re-orient.3637If the run is smoke-only, do not run expensive baselines or inherited real38eval commands. Persist a cheap cached-score parser or explicitly mocked score39as the eval command, set short timeout metadata, and mark `dataset_info` and40node reports as smoke-only.4142### Step 1: OBSERVE4344Read code, logs, prior experiment reports, tree insights, failure cases, and45score patterns. Focus on failure classes and bottlenecks, not just symptoms.46For large logs, use `arbor_state.py parse-log` or normalize carriage returns47before matching metric lines. Do not flood context with full training logs48during smoke or forward tests.4950### Step 2: IDEATE51521. Call `TreeView(format="constraints")` first.532. If strict skills are enabled, immediately load `arbor-agent-ideate`.543. Add only ideas that pass the ideation gate.5556Depth semantics:5758- Depth 0: root objective and global insight.59- Depth 1: broad strategy categories.60- Depth 2+: concrete implementable approaches.6162### Step 3: SELECT6364Choose pending leaves using evidence, expected impact, feasibility, diversity,65and recoverable failure modes. Use `TreeView(format="pending")` or compact view.6667### Step 4: DISPATCH And UPDATE6869Load `arbor-agent-executor` and dispatch:7071- One idea: `RunExecutor(node_id, additional_context=...)`.72- Independent ideas: `RunExecutorParallel(tasks=[...])`, usually 2-4 tasks.7374Executors auto-update node status, score, insight, result, branch, artifacts,75and propagated ancestor insights. If extraction is wrong, correct it with76`TreeUpdateNode`.7778Scores in the tree are absolute B_dev metric values, not deltas.7980### Step 5: DECIDE8182Use `arbor-agent-merge-eval` for merge decisions.8384- Continue: more promising directions exist.85- Merge: B_dev beats trunk enough and B_test verification passes.86- Prune: repeated failures with no credible recovery path.87- Stop: cap/budget reached, diminishing returns, or no pending ideas.8889Before stopping, run final B_test only if it is available, the contract permits90it, and the run is not smoke-only. Record `test_trunk_score` when the final91test run is valid.9293## Idea Tree Schema9495Node statuses are:9697- `pending`98- `running`99- `done`100- `merged`101- `pruned`102103Each node stores:104105- `id`, `parent_id`, `children_ids`, `depth`106- `hypothesis`107- `status`108- `insight`109- `result`110- `score`111- `code_ref`112- `related_work`113114Tree metadata stores:115116- `baseline_score`, `trunk_score`117- `test_baseline_score`, `test_trunk_score`118- `eval_cmd`, `eval_cmd_test`119- `eval_timeout`, `eval_retries`, retry backoff120- `dataset_info`121- `metric_direction`122- `trunk_branch`123- `submission_path`, `sample_submission_path`124125## Tool Mapping126127Native Arbor tools:128129- `TreeView`: compact/full/node/pending/constraints.130- `TreeAddNode`: add child with generated id.131- `TreeUpdateNode`: update status, insight, result, score, code_ref,132 hypothesis, related_work.133- `TreeSetMeta`: persist evaluation metadata.134- `TreePrune`: mark a subtree pruned.135- `TreePropagate`: synthesize child insights upward.136- `RunExecutor`, `RunExecutorParallel`: run implementation agents.137- `GitMergeBranch`: B_test verify and merge.138- `SearchIdeaContext`, `SearchIdeaContextParallel`, `SearchStatus`: related139 work annotation.140141If these are not available, load `arbor-agent-tools` and use142`scripts/arbor_state.py` as the state backend.143144When using the fallback helper, serialize tree-mutating commands for the same145run. Do not launch `meta`, `add`, `update`, `prune`, `propagate`, `eval`,146`record`, `worktree`, or `merge` in parallel.147148## Cycle Caps149150Count cycles once a node is done, merged, pruned, or failed. If the hard cap is151reached, do not launch more executors. Finalize: merge the best verified branch152if it passes, otherwise stop and report.153154## AskUser And Live Notes155156Use human questions only when genuinely blocked on information that cannot be157discovered locally. In `direction` or `collaborative` mode, ask for direction158after constraints and before adding nodes. In `review` modes, respect skipped159or edited ideas and executor gates.