| name | baton-merge |
| description | Mechanically compose passed Baton candidates or integrate the exact assembled candidate that passed. |
Treat the free-form invocation text as the operation inputs. Resolve the Baton package root from the current Git project .codex/baton install when present and valid; otherwise use the configured Codex user directory baton install. Read package-relative files from that root.
operation: baton-merge
version: baton.operation/v2
Purpose
Mechanically compose passed track candidates or integrate the exact assembled
candidate covered by current PASS.
Inputs
- The applicable approved plan revision and one captured Git snapshot.
- For track composition, the ordered passed slice candidates.
- For release integration, the exact assembled candidate and fresh assembly
PASS.
Authority
Merge never invents a verdict or resolves a product conflict. Derive candidates,
topology, and expected targets from approved facts. Refuse unsafe mutation, then
allow the surrounding system to rescan and reconcile operational outcomes.
Actions
- For a track, prove every required slice has applicable
PASS, freeze the
exact candidate, and compose it through the approved topology.
- After all tracks are present, identify the exact assembled candidate and
stop for fresh
baton-verify assembly.
- For release Merge, recheck the assembly
PASS, candidate, authority, and
expected target immediately before integration.
- Perform the exact Git effect and observe the resulting target.
- On an exact retry, return the already observed canonical result without
duplicating the effect.
Required output
Return the scope, applicable pass bindings, component candidates, expected and
observed targets, resulting commit, and concise outcome for a machine-written
receipt. Never report partial success as MERGED.
Stop conditions
Stop before mutation on missing PASS, changed candidate, unsafe target
movement, conflict, unexpected ancestry or tree, ambiguous authority, or an
unreconciled effect. A stale snapshot is an operational rescan condition, not a
Baton verdict.
Next handoff
Completed track composition waits for remaining tracks or assembly
verification. Exact release integration is terminal for Baton; deployment is
external.