Skill Tracer
Skills › Compound Engineering › ce-work › execution-engines.md

execution-engines.md

64 lines · skills/ce-work/references/execution-engines.md at 3449230

Open on GitHub

Most marks come from matching words in the file, so treat them as pointers.

1# Execution Engines
2
3`ce-work` has two implementation engines: native execution (inline or subagents, scheduled by `references/execution-strategy.md`) and cross-model execution. The engine decides who authors the code. It never changes who runs the finishing steps (final simplify, review, PR, and CI; see "Resume the correct tail" below). Native execution is the default: it stays selected unless applicable live intent, a caller binding, or an enabled standing preference selects cross-model execution.
4
5Engine selection applies only to code execution. Knowledge-work keeps its carve-out. Legacy plans and bare code prompts may select cross-model execution; otherwise they use the inline/subagent flow in `references/execution-strategy.md`.
6
7Invocation origin supplies no routing authority and may not be detectable. Resolve the same inputs whether `ce-work` was explicitly invoked or selected by the host: current-task intent, still-active session intent, typed caller binding, active project instructions, enabled checkout configuration, then native execution.
8

Execution Engines

ce-work has two implementation engines: native execution (inline or subagents, scheduled by references/execution-strategy.md) and cross-model execution. The engine decides who authors the code. It never changes who runs the finishing steps (final simplify, review, PR, and CI; see "Resume the correct tail" below). Native execution is the default: it stays selected unless applicable live intent, a caller binding, or an enabled standing preference selects cross-model execution.

Engine selection applies only to code execution. Knowledge-work keeps its carve-out. Legacy plans and bare code prompts may select cross-model execution; otherwise they use the inline/subagent flow in references/execution-strategy.md.

Invocation origin supplies no routing authority and may not be detectable. Resolve the same inputs whether ce-work was explicitly invoked or selected by the host: current-task intent, still-active session intent, typed caller binding, active project instructions, enabled checkout configuration, then native execution.

Raw lines 1 to 8
Starts an agent subagents :3
Starts an agent subagent :5
9## Decide whether an external route applies
11Resolve one implementation binding from applicable authority and scope; do not reduce routing to keyword matching or a closed state machine. Obey the host's instruction hierarchy first. Within the same authority, prefer narrower and more current intent, using these sources:
131. an explicit assignment or constraint in the current task;
142. a still-active session preference or constraint;
153. a typed caller binding at its recorded provenance (for example, an LFG current-task assignment keeps current-task authority when it reaches `ce-work`);
164. the project's active instructions and conventions already in context;
175. enabled per-checkout configuration; then
186. native execution.
20Lower sources may fill an unspecified detail but cannot contradict or broaden a higher source. Incidental mentions in feature prose, quoted material, examples, comparisons, filenames, or discussion do not activate routing. If two applicable instructions of equal authority genuinely conflict on which external worker receives the work, or on whether work leaves the host at all, tell the user about the conflict instead of guessing.
22For example, current-task strict Composer resolves to Composer with `require` even when a caller Codex binding and config Cursor preference are both present. Without that task instruction, a caller Codex binding sourced from the current LFG task keeps that provenance. Without applicable live or caller intent, the ordered config candidates apply only when standing mode is enabled.

Decide whether an external route applies

Resolve one implementation binding from applicable authority and scope; do not reduce routing to keyword matching or a closed state machine. Obey the host's instruction hierarchy first. Within the same authority, prefer narrower and more current intent, using these sources:

  1. an explicit assignment or constraint in the current task;
  2. a still-active session preference or constraint;
  3. a typed caller binding at its recorded provenance (for example, an LFG current-task assignment keeps current-task authority when it reaches ce-work);
  4. the project's active instructions and conventions already in context;
  5. enabled per-checkout configuration; then
  6. native execution.

Lower sources may fill an unspecified detail but cannot contradict or broaden a higher source. Incidental mentions in feature prose, quoted material, examples, comparisons, filenames, or discussion do not activate routing. If two applicable instructions of equal authority genuinely conflict on which external worker receives the work, or on whether work leaves the host at all, tell the user about the conflict instead of guessing.

For example, current-task strict Composer resolves to Composer with require even when a caller Codex binding and config Cursor preference are both present. Without that task instruction, a caller Codex binding sourced from the current LFG task keeps that provenance. Without applicable live or caller intent, the ordered config candidates apply only when standing mode is enabled.

Raw lines 9 to 23
24### Typed caller binding
26Input triage passes only a fully validated and normalized typed caller binding. Treat it as one already-selected candidate; preserve its caller-visible provenance in the durable run record and never send its fields into planning or review input. Downstream consumers and workers may narrow its authority or restrictions but never broaden them.
28A validated recovery run id selects durable state. It never authorizes a fresh dispatch or a different route.

Typed caller binding

Input triage passes only a fully validated and normalized typed caller binding. Treat it as one already-selected candidate; preserve its caller-visible provenance in the durable run record and never send its fields into planning or review input. Downstream consumers and workers may narrow its authority or restrictions but never broaden them.

A validated recovery run id selects durable state. It never authorizes a fresh dispatch or a different route.

Raw lines 24 to 29
Starts an agent dispatch :28
30### Standing configuration
32<!-- ce-config-layers:start -->
33**Resolve ordinary CE yaml keys from the two repo files.**
35- **Read** `<repo-root>/.compound-engineering/config.local.yaml`, then `config.yaml` (`<repo-root>` = `git rev-parse --show-toplevel`). Missing files are skipped. Gitignore does not change resolution.
36- **Win** with the first active (non-commented) value. For scalars, empty is unset; an invalid value continues to the next layer, then the skill default. For lists and maps, a present key — including an empty list or map — replaces the whole key.
37- **Do not** use this rule for `docs_root` — that key is `config.yaml` only.
38<!-- ce-config-layers:end -->
42Standing configuration selects cross-model execution only when `work_engine_mode` resolves to `prefer` or `require` (`off | prefer | require`) from the two repo files, `config.local.yaml` then `config.yaml`. `off` disables only the standing preference. It does not cancel applicable live intent or a typed caller binding.
44When no source applies, run native execution and do not load the cross-model reference. When one does, read `references/cross-model-execution.md` and resolve the route there before any content or authority leaves the host. It owns route strength, the target vocabulary, the `work_engine_preferences` and `work_engine_effort` schema, candidate traversal, and preflight. If no candidate qualifies there, continue natively as that reference directs.
46For a bare prompt, cross-model execution is eligible only after Phase 0 has established a concrete goal, bounded scope, and authoritative verification. The cross-model reference turns that discovery into a private prompt brief and conservative P-unit packet. An unclear bare prompt returns to clarification or planning before any work is sent to an external worker; it does not fall through to a smarter external worker and ask that worker to invent the scope.

Standing configuration

<!-- ce-config-layers:start --> Resolve ordinary CE yaml keys from the two repo files.

  • Read <repo-root>/.compound-engineering/config.local.yaml, then config.yaml (<repo-root> = git rev-parse --show-toplevel). Missing files are skipped. Gitignore does not change resolution.
  • Win with the first active (non-commented) value. For scalars, empty is unset; an invalid value continues to the next layer, then the skill default. For lists and maps, a present key — including an empty list or map — replaces the whole key.
  • Do not use this rule for docs_root — that key is config.yaml only.

<!-- ce-config-layers:end -->

Standing configuration selects cross-model execution only when work_engine_mode resolves to prefer or require (off | prefer | require) from the two repo files, config.local.yaml then config.yaml. off disables only the standing preference. It does not cancel applicable live intent or a typed caller binding.

When no source applies, run native execution and do not load the cross-model reference. When one does, read references/cross-model-execution.md and resolve the route there before any content or authority leaves the host. It owns route strength, the target vocabulary, the work_engine_preferences and work_engine_effort schema, candidate traversal, and preflight. If no candidate qualifies there, continue natively as that reference directs.

For a bare prompt, cross-model execution is eligible only after Phase 0 has established a concrete goal, bounded scope, and authoritative verification. The cross-model reference turns that discovery into a private prompt brief and conservative P-unit packet. An unclear bare prompt returns to clarification or planning before any work is sent to an external worker; it does not fall through to a smarter external worker and ask that worker to invent the scope.

Raw lines 30 to 47
48## Run the chosen engine
50- **Native:** follow `references/execution-strategy.md` for scheduling and dispatch, and the Phase 2 loop in `references/implementation-loop.md`. `ce-work` creates the tasks, orders the units, dispatches, verifies, and commits.
51- **Cross-model:** follow the serial external-unit transaction in `references/cross-model-execution.md` through the bundled controller, detached runner, and fixed adapter. Never let the detached worker select a fallback recipient.

Run the chosen engine

  • Native: follow references/execution-strategy.md for scheduling and dispatch, and the Phase 2 loop in references/implementation-loop.md. ce-work creates the tasks, orders the units, dispatches, verifies, and commits.
  • Cross-model: follow the serial external-unit transaction in references/cross-model-execution.md through the bundled controller, detached runner, and fixed adapter. Never let the detached worker select a fallback recipient.
Raw lines 48 to 52
Starts an agent dispatch :50
Starts an agent dispatches :50
53## Resume the correct tail
55After either engine finishes implementation, inspect the diff and continue with the finishing steps that belong to whoever owns them. On its own, an engine does no more than implementation and local verification.
57| Mode | After implementation, `ce-work` ... |
58|---|---|
59| **Standalone** (user invoked `ce-work` directly, or `ce-plan` handed off interactively) | Resumes its Phase 3-4 finishing steps: quality checks, simplification, review, commit, and handoff in `references/shipping-workflow.md`. |
60| **Return-to-caller** (`mode:return-to-caller`, e.g. under `lfg`) | Performs implementation and local verification only, then returns the structured summary in `references/return-to-caller.md` (`standalone_shipping_skipped: true`). Does not run simplify/review/PR/CI; the caller runs those. |

Resume the correct tail

After either engine finishes implementation, inspect the diff and continue with the finishing steps that belong to whoever owns them. On its own, an engine does no more than implementation and local verification.

ModeAfter implementation, ce-work ...
Standalone (user invoked ce-work directly, or ce-plan handed off interactively)Resumes its Phase 3-4 finishing steps: quality checks, simplification, review, commit, and handoff in references/shipping-workflow.md.
Return-to-caller (mode:return-to-caller, e.g. under lfg)Performs implementation and local verification only, then returns the structured summary in references/return-to-caller.md (standalone_shipping_skipped: true). Does not run simplify/review/PR/CI; the caller runs those.
Raw lines 53 to 61
Names a skill ce-plan :59
Names a skill lfg :60
62## Progress visibility (independent of tail ownership)
64Whoever runs the finishing steps opens the PR. During a long run, commit each completed unit so progress stays observable in git. In return-to-caller mode `ce-work` must not open any PR, but it may commit and report progress in its structured summary. Never write progress or status into the plan body; git, commits, and the returned summary carry it.

Progress visibility (independent of tail ownership)

Whoever runs the finishing steps opens the PR. During a long run, commit each completed unit so progress stays observable in git. In return-to-caller mode ce-work must not open any PR, but it may commit and report progress in its structured summary. Never write progress or status into the plan body; git, commits, and the returned summary carry it.

Raw lines 62 to 64