You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: Add pluggable orchestrators with /ce:run, agent shims, and /lfg refactor
Orchestrators are pluggable workflow definitions that compose existing
skills and reviewers with different intent. They use the same .md format
as reviewers (YAML frontmatter + prose body) and sync via /ce:refresh.
- Add /ce:run skill to load and execute named orchestrators
- Add orchestrator-registry.yaml as default source config
- Generalize sync-reviewers.sh to handle reviewers, orchestrators,
and other content types via a config-name parameter
- Add generate-shims.sh to auto-create agent shims from definitions
with agent-shim: true in frontmatter, making them addressable by
name in natural language
- Update /ce:refresh to sync orchestrators and generate agent shims
- Refactor /lfg to delegate to /ce:run lfg
- Update default reviewer registry path to reviewers/ subdirectory
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
description: "Run a named orchestrator to manage a full engineering workflow. Orchestrators define which phases to execute, which reviewers to prioritize, and how to synthesize findings. Use when you want a specific workflow style — e.g., /ce:run erin for full-process PM, /ce:run max for a quick spike."
Loads a named orchestrator definition and executes its workflow.
10
+
11
+
## Step 1: Parse arguments
12
+
13
+
Split `$ARGUMENTS` into:
14
+
-**Orchestrator name** — the first word (e.g., `erin`, `max`, `lfg`)
15
+
-**Feature description** — everything after the first word
16
+
17
+
If no orchestrator name is provided, list available orchestrators and ask which to use.
18
+
19
+
## Step 2: Locate plugin
20
+
21
+
Find the plugin's install location:
22
+
23
+
```bash
24
+
PLUGIN_DIR=$(find "$HOME/.claude""$HOME/.claude-"* -path "*/compound-engineering/*/orchestrators" -type d 2>/dev/null | head -1 | sed 's|/orchestrators$||')
Look for `$PLUGIN_DIR/orchestrators/<name>.md`. If not found:
36
+
37
+
1. List available orchestrators: `ls $PLUGIN_DIR/orchestrators/*.md`
38
+
2. Show the user what's available
39
+
3. Suggest running `/ce:refresh` if no orchestrators are found
40
+
41
+
Read the orchestrator file. Parse the YAML frontmatter for structured data (phases, review-preferences, synthesis) and the markdown body for personality/behavior prose.
42
+
43
+
## Step 4: Adopt the orchestrator persona
44
+
45
+
Before executing any phases, adopt the orchestrator's personality from the markdown body. This shapes how you communicate, make judgment calls, and interact with the user throughout the workflow.
46
+
47
+
If the orchestrator has `skip-when` conditions on optional phases, evaluate them against the feature description and current context to decide which phases to include.
48
+
49
+
## Step 5: Execute phases
50
+
51
+
For each phase in the `phases` list from frontmatter:
52
+
53
+
1.**Check if optional** — If the phase has `optional: true` and `skip-when`, evaluate whether to skip based on the feature description and context. Explain your reasoning to the user.
54
+
55
+
2.**Invoke the skill** — Run the skill specified in `skill:`, passing `args:` with variable substitution:
56
+
-`$ARGUMENTS` → the feature description from step 1
57
+
-`$PLAN_PATH` → the path to the plan file created during the plan phase
58
+
59
+
3.**Evaluate the gate** — If the phase has a `gate:`, verify the gate conditions are met before proceeding to the next phase. If the gate fails, retry or ask the user for guidance (depending on orchestrator personality).
60
+
61
+
4.**Track state** — Remember the plan file path when created, track which phases have completed, note key decisions.
62
+
63
+
5.**Handle signals** — If the phase has a `signal:` instead of a `skill:`, output that signal (e.g., `<promise>DONE</promise>`).
64
+
65
+
### Variable threading
66
+
67
+
- After the plan phase completes, scan `docs/plans/` for the most recently created plan file and store its path as `$PLAN_PATH`.
68
+
- Pass `$PLAN_PATH` to subsequent phases that reference it in their `args:`.
69
+
70
+
## Step 6: Review preferences
71
+
72
+
When invoking `/ce:review`, pass the orchestrator's `review-preferences` and `synthesis` configuration as context:
73
+
74
+
-**min-reviewers** — Minimum number of reviewers to spawn
75
+
-**require-categories** — Categories that must be represented (warn if no reviewer available)
76
+
-**prefer-categories** — Categories to include if available
77
+
-**synthesis.lens** — Pass this to the synthesis reviewer to shape how findings are weighted
78
+
79
+
These preferences guide reviewer selection but don't override the existing ce:review selection logic — they add constraints on top of it.
80
+
81
+
## Step 7: Model selection
82
+
83
+
Orchestrators define two model fields:
84
+
85
+
-**`orchestrator-model`** — The model for the orchestrator itself (the main conversation thread). `inherit` means use the session model.
86
+
-**`agent-model`** — The default model for skills and subagents the orchestrator spawns.
87
+
88
+
Per-phase `model:` overrides take precedence over `agent-model`. Resolution order:
When spawning Agent subagents, pass the resolved model. When invoking skills in the main conversation (e.g., `/ce:plan`), the orchestrator-model applies since skills run in the main thread.
95
+
96
+
## Step 8: Completion
97
+
98
+
When all phases are done, summarize the workflow:
99
+
- Which phases ran (and which were skipped, with reasons)
100
+
- Key decisions made along the way
101
+
- Any learnings captured in the compound phase
102
+
103
+
Communicate completion in the orchestrator's voice.
104
+
105
+
## Available Orchestrators
106
+
107
+
To see what's installed, run:
108
+
109
+
```bash
110
+
ls $PLUGIN_DIR/orchestrators/*.md 2>/dev/null | xargs -I{} basename {} .md
111
+
```
112
+
113
+
If no orchestrators are found, run `/ce:refresh` to sync from configured sources.
description: "Full autonomous engineering workflow. Shortcut for /ce:run lfg."
4
4
argument-hint: "[feature description]"
5
-
disable-model-invocation: true
6
5
---
7
6
8
-
CRITICAL: You MUST execute every step below IN ORDER. Do NOT skip any required step. Do NOT jump ahead to coding or implementation. The plan phase (step 2) MUST be completed and verified BEFORE any work begins. Violating this order produces bad output.
9
-
10
-
1.**Optional:** If the `ralph-loop` skill is available, run `/ralph-loop:ralph-loop "finish all slash commands" --completion-promise "DONE"`. If not available or it fails, skip and continue to step 2 immediately.
11
-
12
-
2.`/ce:plan $ARGUMENTS`
13
-
14
-
GATE: STOP. Verify that the `ce:plan` workflow produced a plan file in `docs/plans/`. If no plan file was created, run `/ce:plan $ARGUMENTS` again. Do NOT proceed to step 3 until a written plan exists. **Record the plan file path** — it will be passed to ce:review in step 4.
15
-
16
-
3.`/ce:work`
17
-
18
-
GATE: STOP. Verify that implementation work was performed - files were created or modified beyond the plan. Do NOT proceed to step 4 if no code changes were made.
Copy file name to clipboardExpand all lines: plugins/compound-engineering/skills/refresh/SKILL.md
+58-19Lines changed: 58 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
1
---
2
2
name: ce:refresh
3
-
description: "Sync reviewer personas from external Git repos into the local plugin. Reads sources from reviewer-registry.yaml, fetches .md files, and places them in agents/review/. Use when setting up the plugin for the first time, after updating your reviewer repo, or to pull in new reviewer personas."
3
+
description: "Sync reviewer personas and orchestrator definitions from external Git repos into the local plugin. Use when setting up the plugin for the first time, after updating your repos, or to pull in new reviewers or orchestrators."
4
4
---
5
5
6
-
# Refresh Reviewers
6
+
# Refresh Reviewers & Orchestrators
7
7
8
-
Syncs reviewer persona files from external Git repositories into the plugin's `agents/review/` directory.
8
+
Syncs reviewer persona files and orchestrator definitions from external Git repositories into the plugin.
9
9
10
10
## Step 1: Locate plugin
11
11
@@ -21,56 +21,95 @@ Fall back to relative path if not found (e.g., running from source repo):
Read the user's source config at `~/.config/compound-engineering/reviewer-sources.yaml`. If it doesn't exist, the sync script will create it on first run — skip this step and go directly to Step 3.
32
+
Read the user's reviewer source config at `~/.config/compound-engineering/reviewer-sources.yaml`. If it doesn't exist, the sync script will create it on first run — skip this step and go directly to Step 3.
27
33
28
34
If the file exists, parse it and present the current sources to the user like this:
29
35
30
36
List the current sources, then present three options using AskUserQuestion:
3. Or type a request (e.g., "add owner/repo", "remove ce-default")
40
49
```
41
50
42
51
Handle the response:
43
52
-**1 / Sync now** — proceed to Step 3.
44
-
-**2 / Edit config file** — open `~/.config/compound-engineering/reviewer-sources.yaml` via Bash: `${EDITOR:-$(command -v code 2>/dev/null || echo nano)} ~/.config/compound-engineering/reviewer-sources.yaml`. After the editor, re-read the file and present the menu again.
45
-
-**Anything else** — interpret as a natural language request to modify the config (add a source, remove one, change a branch, add an except entry, etc.). Edit the YAML accordingly, then present the menu again.
53
+
-**2 / Edit config files** — open both config files in editor. After editing, re-read and present the menu again.
54
+
-**Anything else** — interpret as a natural language request to modify one or both configs. Edit accordingly, then present the menu again.
**Note:** The sync script's third argument tells it which user config to use (`orchestrator-sources.yaml` instead of `reviewer-sources.yaml`). It fetches `.md` files from configured sources regardless of content type.
78
+
79
+
## Step 5: Generate agent shims
80
+
81
+
Run the shim generation script. This scans synced reviewers and orchestrators for `agent-shim: true` in their frontmatter and generates `_shim-*.md` files in `agents/review/`:
Show the script's output to the user — it lists which shims were generated.
88
+
89
+
## Step 6: Show results
58
90
59
-
The script writes a summary to `~/.config/compound-engineering/last-refresh-summary.md`. Read that file and **output its contents to the user exactly as written**. The summary is already formatted as markdown — do not summarize, paraphrase, or reformat it. Just show it.
91
+
The sync script writes summaries to `~/.config/compound-engineering/`:
Read all summary files that exist and **output their contents to the user exactly as written**. The summaries are already formatted as markdown — do not summarize, paraphrase, or reformat them.
60
96
61
97
## Source YAML Format
62
98
99
+
Both reviewer and orchestrator source configs use the same format:
100
+
63
101
```yaml
64
102
sources:
65
-
- name: my-reviewers
103
+
- name: my-source
66
104
repo: username/repo-name
67
105
branch: main
68
-
path: .
106
+
path: reviewers
69
107
70
-
- name: community-reviewers
108
+
- name: another-source
71
109
repo: SomeOrg/ce-reviewers
110
+
path: orchestrators
72
111
except:
73
-
- kieran-python-reviewer
112
+
- name-to-skip
74
113
```
75
114
76
115
| Field | Required | Default | Description |
@@ -79,7 +118,7 @@ sources:
79
118
| `repo` | yes | — | GitHub owner/repo |
80
119
| `branch` | no | `main` | Branch to fetch from |
81
120
| `path` | no | `.` | Directory in the repo containing .md files |
82
-
| `except` | no | `[]` | Reviewer filenames (without .md) to skip |
121
+
| `except` | no | `[]` | Filenames (without .md) to skip |
0 commit comments