@sulhadin/orchestrator 3.1.5 → 4.0.0-beta

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/README.md +14 -23
  2. package/bin/build-template.js +0 -1
  3. package/bin/index.js +1 -23
  4. package/package.json +1 -1
  5. package/template/.claude-plugin/plugin.json +1 -1
  6. package/template/.orchestra/README.md +55 -73
  7. package/template/.orchestra/blueprints/README.md +7 -7
  8. package/template/.orchestra/blueprints/api-only.md +7 -7
  9. package/template/.orchestra/blueprints/component-crud-resource.md +3 -3
  10. package/template/.orchestra/blueprints/saas-starter.md +17 -17
  11. package/template/.orchestra/config.yml +1 -1
  12. package/template/.orchestra/roles/orchestrator.md +2 -3
  13. package/template/.orchestra/roles/product-manager.md +48 -25
  14. package/template/CLAUDE.md +5 -9
  15. package/template/agents/{conductor.md → lead.md} +123 -91
  16. package/template/agents/reviewer.md +2 -2
  17. package/template/commands/create-role.md +1 -1
  18. package/template/commands/help.md +7 -12
  19. package/template/commands/hotfix.md +1 -2
  20. package/template/commands/pm.md +1 -2
  21. package/template/commands/rewind.md +0 -1
  22. package/template/commands/start.md +5 -5
  23. package/template/commands/status.md +1 -1
  24. package/template/rules/role-boundaries.orchestra.md +2 -2
  25. package/template/.orchestra/knowledge.md +0 -99
  26. package/template/.orchestra/roles/adaptive.md +0 -38
  27. package/template/.orchestra/roles/architect.md +0 -33
  28. package/template/.orchestra/roles/backend-engineer.md +0 -27
  29. package/template/.orchestra/roles/frontend-engineer.md +0 -27
  30. package/template/commands/adaptive.md +0 -7
  31. package/template/commands/architect.md +0 -7
  32. package/template/commands/backend.md +0 -7
  33. package/template/commands/frontend.md +0 -7
package/README.md CHANGED
@@ -4,7 +4,7 @@ AI team orchestration for [Claude Code](https://docs.anthropic.com/en/docs/claud
4
4
 
5
5
  ## What is Orchestra?
6
6
 
7
- Orchestra turns a single Claude Code session into a coordinated development team. A Product Manager plans features, a Conductor orchestrates them delegating each phase to a sub-agent with the right role (backend, frontend, architect). Sub-agents own implementation and verification; conductor owns commits. Each role has strict boundaries, every commit passes verification, and the system learns from past milestones.
7
+ Orchestra turns a single Claude Code session into a coordinated development team. A Product Manager plans features, a Lead assembles the right team deriving sub-agent identity dynamically from phase content and delegating each phase. Sub-agents own implementation and verification; lead owns commits. Each role has strict boundaries, every commit passes verification, and the system learns from past milestones.
8
8
 
9
9
  No infrastructure. No API keys. Just markdown files and Claude Code.
10
10
 
@@ -31,15 +31,14 @@ Both options use the same commands: `/orchestra:pm`, `/orchestra:start`, etc.
31
31
  ## How It Works
32
32
 
33
33
  ```
34
- Terminal 1 (PM): Terminal 2 (Conductor):
34
+ Terminal 1 (PM): Terminal 2 (Lead):
35
35
  /orchestra pm /orchestra start
36
36
  │ │
37
37
  ├─ Discuss features ├─ Scan milestones
38
- ├─ Create milestones ├─ Delegate to architect → RFC
39
- ├─ Groom phases ├─ Delegate to backend → code + tests
40
- │ ├─ Delegate to frontend UI
41
- │ (plan M2 while M1 runs) ├─ Call reviewer code review
42
- │ ├─ Push → milestone done
38
+ ├─ Create milestones ├─ Design phase → RFC
39
+ ├─ Groom phases ├─ Delegate to sub-agents → code + tests
40
+ │ ├─ Call reviewercode review
41
+ │ (plan M2 while M1 runs) ├─ Pushmilestone done
43
42
  │ └─ Stop (inline) or next milestone (agent)
44
43
  ```
45
44
 
@@ -56,10 +55,10 @@ PM challenges scope, creates M1-user-auth with 3 phases
56
55
  ```
57
56
  /orchestra start
58
57
  📋 Starting M1-user-auth
59
- 🏗️ architect → RFC ready → user approves
60
- ⚙️ backend → phase-1: DB schema → committed
61
- ⚙️ backend → phase-2: API endpoints → committed
62
- 🎨 frontend → phase-3: Login UI → committed
58
+ 🏗️ design → RFC ready → user approves
59
+ ⚙️ phase-1: DB schema → committed
60
+ ⚙️ phase-2: API endpoints → committed
61
+ ⚙️ phase-3: Login UI → committed
63
62
  🔍 reviewer → approved
64
63
  ✅ M1-user-auth done. Pushed to origin.
65
64
  ```
@@ -85,10 +84,6 @@ PM challenges scope, creates M1-user-auth with 3 phases
85
84
  | Command | Role |
86
85
  |---------|------|
87
86
  | `/orchestra pm` | Product Manager — plan and orchestrate |
88
- | `/orchestra backend` | Backend Engineer — code + tests |
89
- | `/orchestra frontend` | Frontend Engineer — UI + design |
90
- | `/orchestra architect` | Architect — technical design |
91
- | `/orchestra adaptive` | Adaptive expert — any domain (iOS, DevOps, ML...) |
92
87
  | `/orchestra orchestrator` | System maintenance |
93
88
 
94
89
  ## Architecture
@@ -96,7 +91,7 @@ PM challenges scope, creates M1-user-auth with 3 phases
96
91
  ```
97
92
  .claude/ ← Claude Code integration
98
93
  ├── agents/
99
- │ ├── conductor.md ← Autonomous milestone executor
94
+ │ ├── lead.md ← Autonomous milestone executor
100
95
  │ └── reviewer.md ← Independent code review
101
96
  ├── skills/*.orchestra.md ← 14 domain checklists
102
97
  ├── rules/*.orchestra.md ← Discipline rules (auto-loaded)
@@ -104,9 +99,8 @@ PM challenges scope, creates M1-user-auth with 3 phases
104
99
 
105
100
  .orchestra/ ← Project data + config
106
101
  ├── config.yml ← Pipeline settings (customize per stack)
107
- ├── roles/ ← Role identities
102
+ ├── roles/ ← Role identities (orchestrator, product-manager)
108
103
  ├── blueprints/ ← Project templates
109
- ├── knowledge.md ← Project knowledge log
110
104
  └── milestones/ ← Your work
111
105
  ```
112
106
 
@@ -122,12 +116,10 @@ PM challenges scope, creates M1-user-auth with 3 phases
122
116
 
123
117
  **Verification gate** — Tests + lint must pass before every commit. Commands come from config. Fails 3 times → phase marked failed, escalated to user.
124
118
 
125
- **14 built-in skills** — Domain checklists for auth, CRUD, deployment, accessibility, React, testing, debugging, and more. PM assigns to phases, conductor loads them automatically.
119
+ **14 built-in skills** — Domain checklists for auth, CRUD, deployment, accessibility, React, testing, debugging, and more. PM assigns to phases, lead loads them automatically.
126
120
 
127
121
  **Blueprints** — Start from templates instead of scratch. `saas-starter` creates 5 milestones instantly. `blueprint add` saves your work as a reusable template.
128
122
 
129
- **Learning system** — `knowledge.md` accumulates decisions and lessons. 5-line retrospective after each milestone. PM reads before grooming new work. System gets smarter over time.
130
-
131
123
  **Role boundaries** — Enforced via `.claude/rules/`. PM cannot write code. Engineers cannot modify system files. Orchestrator cannot write features. Boundaries checked by file path, not by words.
132
124
 
133
125
  **Milestone isolation** — `inline` mode stops after each milestone (user compacts manually). `agent` mode spawns each milestone in its own sub-agent — context freed automatically, enabling 20+ milestones in a single `--auto` session.
@@ -150,7 +142,6 @@ Smart merge on upgrade:
150
142
  | Blueprints (template) | Updated |
151
143
  | Blueprints (your custom) | Preserved |
152
144
  | milestones/ | Untouched |
153
- | knowledge.md | Preserved |
154
145
  | config.yml | Smart merged (user values preserved, new keys added) |
155
146
 
156
147
  ## Documentation
@@ -159,7 +150,7 @@ Full docs at [docs/](https://github.com/sulhadin/orchestrator/blob/main/docs/REA
159
150
 
160
151
  - [Getting Started](https://github.com/sulhadin/orchestrator/blob/main/docs/getting-started.md) — installation, first milestone, two-terminal model
161
152
  - [Commands](https://github.com/sulhadin/orchestrator/blob/main/docs/commands.md) — all commands with examples
162
- - [Roles](https://github.com/sulhadin/orchestrator/blob/main/docs/roles.md) — 6 roles + adaptive, responsibilities, boundaries
153
+ - [Roles](https://github.com/sulhadin/orchestrator/blob/main/docs/roles.md) — roles, responsibilities, boundaries
163
154
  - [Features](https://github.com/sulhadin/orchestrator/blob/main/docs/features.md) — config, verification, skills, blueprints, and more
164
155
  - [Blueprints](https://github.com/sulhadin/orchestrator/blob/main/docs/blueprints.md) — project templates, customization
165
156
  - [Skills](https://github.com/sulhadin/orchestrator/blob/main/docs/skills.md) — domain checklists, creating new skills
@@ -42,7 +42,6 @@ const SYSTEM_PATHS = [
42
42
  { src: ".orchestra/roles", dest: ".orchestra/roles" },
43
43
  { src: ".orchestra/blueprints", dest: ".orchestra/blueprints" },
44
44
  { src: ".orchestra/config.yml", dest: ".orchestra/config.yml" },
45
- { src: ".orchestra/knowledge.md", dest: ".orchestra/knowledge.md" },
46
45
  { src: ".orchestra/README.md", dest: ".orchestra/README.md" },
47
46
  { src: "CLAUDE.md", dest: "CLAUDE.md" }
48
47
  ];
package/bin/index.js CHANGED
@@ -355,21 +355,6 @@ function run() {
355
355
  }
356
356
  }
357
357
 
358
- // knowledge.md
359
- const knowledgePath = path.join(orchestraDest, "knowledge.md");
360
- const knowledgeBackup = path.join(targetDir, ".orchestra-backup-knowledge.md");
361
- let hasKnowledge = false;
362
- if (fs.existsSync(knowledgePath)) {
363
- const content = fs.readFileSync(knowledgePath, "utf-8");
364
- const marker = "<!-- New entries go here";
365
- const idx = content.indexOf(marker);
366
- if (idx !== -1 && content.slice(idx + marker.length).trim().length > 10) {
367
- fs.copyFileSync(knowledgePath, knowledgeBackup);
368
- hasKnowledge = true;
369
- console.log(" [~] Backed up knowledge.md");
370
- }
371
- }
372
-
373
358
  // config.yml (user may have customized)
374
359
  const configPath = path.join(orchestraDest, "config.yml");
375
360
  const configBackup = path.join(targetDir, ".orchestra-backup-config.yml");
@@ -392,7 +377,7 @@ function run() {
392
377
  // Only remove orchestra files, keep user's custom agents/commands
393
378
  const files = fs.readdirSync(dirPath);
394
379
  for (const file of files) {
395
- if (file === "conductor.md" || file === "reviewer.md" || file === "orchestra") {
380
+ if (file === "conductor.md" || file === "lead.md" || file === "reviewer.md" || file === "orchestra") {
396
381
  const fullPath = path.join(dirPath, file);
397
382
  if (fs.statSync(fullPath).isDirectory()) {
398
383
  rmDirRecursive(fullPath);
@@ -441,13 +426,6 @@ function run() {
441
426
  rmDirRecursive(backupPath);
442
427
  }
443
428
 
444
- // Restore knowledge.md
445
- if (hasKnowledge && fs.existsSync(knowledgeBackup)) {
446
- fs.copyFileSync(knowledgeBackup, path.join(orchestraDest, "knowledge.md"));
447
- fs.unlinkSync(knowledgeBackup);
448
- console.log(" [+] Restored knowledge.md");
449
- }
450
-
451
429
  // Merge config.yml: new template keys added, user values preserved
452
430
  if (hasConfig && fs.existsSync(configBackup)) {
453
431
  const userConfig = fs.readFileSync(configBackup, "utf-8");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sulhadin/orchestrator",
3
- "version": "3.1.5",
3
+ "version": "4.0.0-beta",
4
4
  "description": "AI Team Orchestration System — multi-role coordination for Claude Code",
5
5
  "bin": "bin/index.js",
6
6
  "scripts": {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "orchestra",
3
3
  "description": "AI Team Orchestration — multi-role coordination with milestones, phases, and quality gates for Claude Code",
4
- "version": "3.1.5",
4
+ "version": "4.0.0-beta",
5
5
  "author": {
6
6
  "name": "Sulhadin Öney"
7
7
  },
@@ -1,21 +1,20 @@
1
1
  # Orchestra — AI Team Orchestration
2
2
 
3
3
  A milestone-based orchestration system for coordinating AI agent sessions
4
- working on the same codebase. Two terminals: PM plans, conductor executes.
4
+ working on the same codebase. Two terminals: PM plans, lead executes.
5
5
 
6
6
  ## How It Works
7
7
 
8
8
  ```
9
- Terminal 1 (PM): Terminal 2 (Conductor):
9
+ Terminal 1 (PM): Terminal 2 (Lead):
10
10
  /orchestra pm /orchestra start
11
11
  │ │
12
12
  ├─ Discuss features with user ├─ Scan milestones
13
- ├─ Create milestones ├─ 🏗️ delegate to architect → RFC
13
+ ├─ Create milestones ├─ 🏗️ design phase → RFC
14
14
  ├─ Groom phases ├─ 🚦 User approves RFC
15
- ├─ Always available ├─ ⚙️ delegate to backend → phase by phase
16
- │ ├─ 🎨 delegate to frontend phase by phase
17
- │ (can plan M2 while M1 runs) ├─ 🔍 reviewerreview commits
18
- │ ├─ git push → milestone done
15
+ ├─ Always available ├─ ⚙️ delegate to sub-agent → phase by phase
16
+ │ ├─ 🔍 reviewerreview commits
17
+ │ (can plan M2 while M1 runs) ├─ git pushmilestone done
19
18
  │ └─ Stop (inline) or next milestone (agent)
20
19
  ```
21
20
 
@@ -26,21 +25,16 @@ Terminal 1 (PM): Terminal 2 (Conductor):
26
25
  ├── README.md # This file
27
26
  ├── roles/ # Role identities (one file per role)
28
27
  │ ├── product-manager.md
29
- │ ├── architect.md
30
- │ ├── backend-engineer.md
31
- │ ├── frontend-engineer.md
32
- │ ├── adaptive.md
33
28
  │ └── orchestrator.md
34
29
  ├── config.yml # Pipeline settings, thresholds, verification commands
35
30
  ├── blueprints/ # Project/component milestone templates
36
- ├── knowledge.md # Append-only project knowledge log
37
31
  ├── milestones/ # Feature work (one dir per feature)
38
32
  │ └── M1-feature-name/
39
33
  │ ├── prd.md # Product requirements (PM writes)
40
34
  │ ├── milestone.md # Summary, acceptance criteria, status
41
35
  │ ├── grooming.md # Discussion, scope, decisions
42
- │ ├── rfc.md # Technical design (architect fills)
43
- │ ├── context.md # Running log (conductor maintains for resume)
36
+ │ ├── rfc.md # Technical design (lead fills during design phase)
37
+ │ ├── context.md # Running log (lead maintains for resume)
44
38
  │ └── phases/ # Sequential units of work
45
39
  │ ├── phase-1.md
46
40
  │ └── ...
@@ -51,12 +45,12 @@ Terminal 1 (PM): Terminal 2 (Conductor):
51
45
  ### Terminal 1: `/orchestra pm` (Planning)
52
46
 
53
47
  PM is always available for discussion. Creates milestones, never writes code.
54
- You can plan new milestones while the conductor is executing another one.
48
+ You can plan new milestones while the lead is executing another one.
55
49
 
56
50
  ### Terminal 2: `/orchestra start` (Execution)
57
51
 
58
- Conductor reads milestones, delegates each phase to a sub-agent with the right role.
59
- Sub-agents implement + verify; conductor commits. After milestone completion, behavior
52
+ Lead reads milestones, derives the right team member identity from phase content, and delegates each phase to a sub-agent.
53
+ Sub-agents implement + verify; lead commits. After milestone completion, behavior
60
54
  depends on `milestone_isolation` config: stops (inline) or continues to next (agent).
61
55
  Maintains `context.md` for resume capability.
62
56
 
@@ -76,14 +70,12 @@ PM discusses feature with user
76
70
  → PM plans scope, phases, acceptance criteria
77
71
  → [USER APPROVAL GATE: Milestone creation]
78
72
  → PM creates milestone (status: planning)
79
- Conductor activates architect: writes RFC + validates grooming
73
+ Lead runs design phase: writes RFC + validates grooming
80
74
  → [USER APPROVAL GATE: RFC + grooming validation → Implementation]
81
- Conductor executes backend phases (sequential, each → commit)
82
- Conductor executes frontend phases (sequential, each → commit)
83
- → Conductor calls reviewer agent (reviews unpushed commits)
75
+ Lead delegates phases to sub-agents (sequential, each → commit)
76
+ Lead calls reviewer agent (reviews unpushed commits)
84
77
  → FIX cycle if changes-requested (re-review if fix >= 30 lines)
85
- Conductor pushes, PM verifies acceptance criteria, closes milestone
86
- → Conductor appends 5-line retrospective to knowledge.md
78
+ Lead pushes, PM verifies acceptance criteria, closes milestone
87
79
 
88
80
  Hotfix (production bugs):
89
81
  /orchestra hotfix {description}
@@ -93,8 +85,8 @@ Hotfix (production bugs):
93
85
 
94
86
  ### Milestone Lock
95
87
 
96
- Conductor claims a milestone by writing `Locked-By: {timestamp}` to milestone.md before execution.
97
- Other conductors skip locked milestones. Lock expires after config.yml `thresholds.milestone_lock_timeout` minutes (default 120).
88
+ Lead claims a milestone by writing `Locked-By: {timestamp}` to milestone.md before execution.
89
+ Other leads skip locked milestones. Lock expires after config.yml `thresholds.milestone_lock_timeout` minutes (default 120).
98
90
 
99
91
  ### Pipeline Modes (Complexity)
100
92
 
@@ -105,18 +97,18 @@ PM sets `Complexity` on milestone (pipeline) and `complexity` on each phase (mod
105
97
  | `trivial` | Haiku | Phases → Commit → Push | Version bumps, env vars, config changes |
106
98
  | `quick` | Sonnet | Phases → Commit → Push (skip review) | Single-file fixes, simple CRUD |
107
99
  | `standard` | Sonnet | Phases → Review → Push | Typical features, clear requirements |
108
- | `complex` | Opus | Architect → Phases → Review → Push | New subsystems, unfamiliar territory |
100
+ | `complex` | Opus | Design → Phases → Review → Push | New subsystems, unfamiliar territory |
109
101
 
110
102
  Defaults: config.yml `pipeline.default_pipeline` and `pipeline.default_complexity`.
111
103
 
112
104
  ### Milestone Isolation
113
105
 
114
- Config `pipeline.milestone_isolation` controls how the conductor handles multiple milestones:
106
+ Config `pipeline.milestone_isolation` controls how the lead handles multiple milestones:
115
107
 
116
108
  | Mode | Behavior | Best for |
117
109
  |------|----------|----------|
118
- | `inline` (default) | Conductor runs milestone directly, **stops** after completion. User runs `/compact` then `/orchestra start` for next milestone. | Manual sessions, PC-based work |
119
- | `agent` | Conductor spawns a sub-agent per milestone. Context freed automatically after each. Loops to next milestone. | `--auto` overnight batch runs |
110
+ | `inline` (default) | Lead runs milestone directly, **stops** after completion. User runs `/compact` then `/orchestra start` for next milestone. | Manual sessions, PC-based work |
111
+ | `agent` | Lead spawns a sub-agent per milestone. Context freed automatically after each. Loops to next milestone. | `--auto` overnight batch runs |
120
112
 
121
113
  ```
122
114
  Inline mode: Agent mode:
@@ -129,7 +121,7 @@ Inline mode: Agent mode:
129
121
 
130
122
  In agent mode, the delegation is two-tier:
131
123
  ```
132
- Conductor (lean dispatcher)
124
+ Lead (lean dispatcher)
133
125
  └── Milestone Agent (fresh context)
134
126
  └── Phase Agent (unchanged)
135
127
  ```
@@ -148,7 +140,7 @@ Conductor (lean dispatcher)
148
140
  | Status | Meaning |
149
141
  |--------|---------|
150
142
  | `pending` | Not yet started |
151
- | `in-progress` | Conductor is executing |
143
+ | `in-progress` | Lead is executing |
152
144
  | `done` | Completed and committed |
153
145
  | `failed` | Execution failed — needs retry or manual intervention |
154
146
 
@@ -158,18 +150,17 @@ Conductor (lean dispatcher)
158
150
 
159
151
  Phases always execute in this order:
160
152
 
161
- 1. **Architect** (RFC) — if technical design is needed
162
- 2. **Backend phases** — always before frontend
163
- 3. **Frontend phases** — after backend is done
164
- 4. **Reviewer** — reviews all unpushed commits
153
+ 1. **Design** (RFC) — if technical design is needed
154
+ 2. **Implementation phases** — lead derives sub-agent identity from phase scope
155
+ 3. **Reviewer** — reviews all unpushed commits
165
156
 
166
- Within each domain (backend/frontend), phases run in order: phase-1 → phase-2 → phase-3.
157
+ Phases run in order: phase-1 → phase-2 → phase-3.
167
158
 
168
159
  **Parallel execution:** If PM sets `depends_on` in phase frontmatter, independent phases
169
160
  can run in parallel via subagent worktree isolation. No `depends_on` = sequential (default).
170
161
 
171
162
  **Verification Gate:** Sub-agents run typecheck + tests + lint (from config.yml) before reporting.
172
- Conductor NEVER commits unless verification passes.
163
+ Lead NEVER commits unless verification passes.
173
164
 
174
165
  ---
175
166
 
@@ -212,14 +203,14 @@ Rules:
212
203
 
213
204
  The user must approve before these transitions:
214
205
  - **Milestone creation** — PM discusses and plans, but must get user approval before creating the milestone directory and files
215
- - **RFC → Implementation** — user reviews architect's RFC (if `rfc_approval` is not `skip`)
206
+ - **RFC → Implementation** — user reviews design RFC (if `rfc_approval` is not `skip`)
216
207
 
217
208
  Push is automatic after review passes. All other transitions are automatic.
218
209
 
219
210
  ### Rejection Handling
220
211
 
221
212
  If the user says **no** at any gate:
222
- - **RFC rejected** → Architect revises based on feedback, re-submits (max config `pipeline.max_rfc_rounds`)
213
+ - **RFC rejected** → Lead revises based on feedback, re-submits (max config `pipeline.max_rfc_rounds`)
223
214
  - **Milestone rejected** → PM revises in PM terminal
224
215
 
225
216
  Rejections are normal. The system does not stall — it loops back with feedback.
@@ -228,13 +219,13 @@ Rejections are normal. The system does not stall — it loops back with feedback
228
219
 
229
220
  ## Review Flow (Git-Native)
230
221
 
231
- Reviewer is a separate agent called by the conductor. Review is based on **unpushed commits**.
222
+ Reviewer is a separate agent called by the lead. Review is based on **unpushed commits**.
232
223
 
233
224
  ```
234
- Conductor calls reviewer agent
225
+ Lead calls reviewer agent
235
226
  → Reviewer runs: git log origin/{branch}..HEAD
236
227
  → Reviewer runs: git diff origin/{branch}...HEAD
237
- → Reviewer applies full checklist (backend or frontend mode)
228
+ → Reviewer applies full checklist
238
229
  → Returns: approved / approved-with-comments / changes-requested
239
230
  ```
240
231
 
@@ -242,7 +233,7 @@ Conductor calls reviewer agent
242
233
 
243
234
  **If approved-with-comments** → push immediately. Comments are logged in context.md.
244
235
 
245
- **If changes-requested** → Conductor continues the phase's sub-agent via SendMessage with
236
+ **If changes-requested** → Lead continues the phase's sub-agent via SendMessage with
246
237
  reviewer findings. Re-review triggered if fix >= config `re_review_lines` threshold.
247
238
 
248
239
  ---
@@ -260,7 +251,7 @@ No role may create, edit, delete, or modify these files:
260
251
  - `.orchestra/roles/*.md`
261
252
  - `.orchestra/config.yml`
262
253
  - `.orchestra/blueprints/`
263
- - `.claude/agents/conductor.md`, `.claude/agents/reviewer.md`
254
+ - `.claude/agents/lead.md`, `.claude/agents/reviewer.md`
264
255
  - `.claude/rules/*.orchestra.md`
265
256
  - `.claude/skills/*/SKILL.md`
266
257
  - `.claude/commands/orchestra/`
@@ -278,9 +269,7 @@ No role may create, edit, delete, or modify these files:
278
269
  |---------------|-----------------|
279
270
  | Orchestrator | Write feature code, RFCs, design specs, review code, create milestones |
280
271
  | Product Manager | Write code, fix bugs, run tests, create design specs, modify system files |
281
- | Architect | Write feature code, implement endpoints, fix bugs, write tests |
282
- | Backend Engineer | Write RFCs, design UI, review your own code, make product decisions |
283
- | Frontend Engineer | Modify backend code, write RFCs, review your own code |
272
+ | Sub-agents | Write outside phase `## Scope`, modify system files, review your own code |
284
273
 
285
274
  ## File Ownership Rules
286
275
 
@@ -288,38 +277,35 @@ Each role has exclusive write access to specific directories:
288
277
 
289
278
  | Role | Owns (can write) | Reads |
290
279
  |------|-------------------|-------|
291
- | orchestrator | `.orchestra/roles/*`, `.orchestra/config.yml`, `.orchestra/README.md`, `.orchestra/blueprints/`, `CLAUDE.md`, `.claude/agents/`, `.claude/skills/*/SKILL.md`, `.claude/rules/*.orchestra.md`, `.claude/commands/orchestra/`, `.orchestra/knowledge.md`, `docs/` | Everything |
280
+ | orchestrator | `.orchestra/roles/*`, `.orchestra/config.yml`, `.orchestra/README.md`, `.orchestra/blueprints/`, `CLAUDE.md`, `.claude/agents/`, `.claude/skills/*/SKILL.md`, `.claude/rules/*.orchestra.md`, `.claude/commands/orchestra/`, `docs/` | Everything |
292
281
  | product-manager | `.orchestra/milestones/*` (prd.md, milestone.md, grooming.md, phases) | Everything |
293
- | architect | `.orchestra/milestones/*/rfc.md`, `.orchestra/milestones/*/architecture.md`, `.orchestra/milestones/*/adrs/*`, project configs | Everything |
294
- | backend-engineer | Defined by PM in phase scope (typically `src/`, `tests/`, `migrations/`) | `.orchestra/milestones/*/phases/*` |
295
- | frontend-engineer | Defined by PM in phase scope (typically `frontend/`, `app/`) | `.orchestra/milestones/*/phases/*` |
296
- | adaptive | Defined by `scope:` field in phase file — dynamic per phase | `.orchestra/milestones/*/phases/*` |
297
- | conductor (all roles) | `.orchestra/milestones/*/context.md`, `.orchestra/knowledge.md` (append only) | Everything in active milestone |
282
+ | sub-agents | Only what phase `## Scope` defines — dynamic per phase | `.orchestra/milestones/*/phases/*` |
283
+ | lead | `.orchestra/milestones/*/context.md` | Everything in active milestone |
298
284
 
299
285
  ---
300
286
 
301
- ## PM ↔ Conductor Communication
287
+ ## PM ↔ Lead Communication
302
288
 
303
- PM and conductor run in **separate terminals**. They communicate through milestone files:
289
+ PM and lead run in **separate terminals**. They communicate through milestone files:
304
290
 
305
291
  - **PM writes:** prd.md, grooming.md, milestone.md, phase files
306
- - **Conductor reads:** milestone files → executes phases → updates results + context.md
307
- - **No direct messaging** between PM and conductor — file system is the interface
292
+ - **Lead reads:** milestone files → executes phases → updates results + context.md
293
+ - **No direct messaging** between PM and lead — file system is the interface
308
294
 
309
295
  ### Context Persistence
310
296
 
311
- Conductor maintains `context.md` in each milestone directory with a fixed structure:
297
+ Lead maintains `context.md` in each milestone directory with a fixed structure:
312
298
  - `## Status` — milestone id, start date, pipeline type
313
299
  - `## Phases` — per-phase status, commit hash, files changed, errors
314
300
  - `## Codebase Map` — scout-generated file map (survives milestone clear)
315
301
  - `## Decisions` — key choices from each phase that affect later phases
316
302
  - `## Metrics` — phase duration and verification retries (used by `/orchestra status`)
317
303
 
318
- This enables resume after terminal close/reopen. On restart, conductor reads context.md and skips completed phases.
304
+ This enables resume after terminal close/reopen. On restart, lead reads context.md and skips completed phases.
319
305
 
320
- ### Approval Gates (Conductor Terminal)
306
+ ### Approval Gates (Lead Terminal)
321
307
 
322
- Conductor asks the user directly (not PM) at this point:
308
+ Lead asks the user directly (not PM) at this point:
323
309
  1. **RFC ready** — "Approve RFC to start implementation?" (if `rfc_approval` is not `skip`)
324
310
 
325
311
  Push is automatic after review passes — no approval needed.
@@ -334,7 +320,7 @@ Push is automatic after review passes — no approval needed.
334
320
  sequenceDiagram
335
321
  actor U as User
336
322
  participant PM as Terminal 1: PM
337
- participant C as Terminal 2: Conductor
323
+ participant C as Terminal 2: Lead
338
324
 
339
325
  U->>PM: "I want user auth"
340
326
  PM->>PM: Discuss, plan, create milestone
@@ -342,16 +328,12 @@ sequenceDiagram
342
328
  U->>C: /orchestra start
343
329
  C->>C: Read milestone files
344
330
 
345
- C->>C: architect → write RFC
331
+ C->>C: design phase → write RFC
346
332
  C->>U: Approve RFC?
347
333
  U->>C: Yes
348
334
 
349
- loop Each backend phase
350
- C->>C: backend → phase-N → commit
351
- end
352
-
353
- loop Each frontend phase
354
- C->>C: frontend → phase-N → commit
335
+ loop Each phase
336
+ C->>C: sub-agent → phase-N → commit
355
337
  end
356
338
 
357
339
  C->>C: reviewer agent → review commits
@@ -371,11 +353,11 @@ sequenceDiagram
371
353
  Note over PM: PM is free the entire time<br/>Can plan M2 while M1 executes
372
354
  ```
373
355
 
374
- ### 2. Conductor Execution Loop (Inline Mode)
356
+ ### 2. Lead Execution Loop (Inline Mode)
375
357
 
376
358
  ```mermaid
377
359
  sequenceDiagram
378
- participant C as Conductor
360
+ participant C as Lead
379
361
 
380
362
  C->>C: Scan milestones/
381
363
  Note over C: M1: in-progress<br/>M2: planning<br/>M3: done
@@ -389,11 +371,11 @@ sequenceDiagram
389
371
  Note over C: STOP. "Run /compact or /clear then /orchestra start"
390
372
  ```
391
373
 
392
- ### 3. Conductor Execution Loop (Agent Mode)
374
+ ### 3. Lead Execution Loop (Agent Mode)
393
375
 
394
376
  ```mermaid
395
377
  sequenceDiagram
396
- participant C as Conductor
378
+ participant C as Lead
397
379
  participant MA as Milestone Agent
398
380
 
399
381
  C->>C: Scan milestones/
@@ -9,7 +9,7 @@ set of milestones pre-groomed with phases, skills, and acceptance criteria.
9
9
  1. PM activates: `/orchestra blueprint saas-starter`
10
10
  2. PM reviews the generated milestones — customize as needed
11
11
  3. PM approves → milestones are created in `.orchestra/milestones/`
12
- 4. Conductor executes with `/orchestra start`
12
+ 4. Lead executes with `/orchestra start`
13
13
 
14
14
  ## How to Customize
15
15
 
@@ -35,9 +35,9 @@ What this blueprint is for, what it produces.
35
35
  ### M1 — {title}
36
36
  - Complexity: {quick/standard/full}
37
37
  - Phases:
38
- 1. (backend) {description} [skills: {skill-list}]
39
- 2. (backend) {description}
40
- 3. (frontend) {description}
38
+ 1. {description} [skills: {skill-list}]
39
+ 2. {description}
40
+ 3. {description}
41
41
  - Acceptance Criteria:
42
42
  - [ ] {criterion}
43
43
 
@@ -66,9 +66,9 @@ Use this whenever you need a new entity in your API.
66
66
  ### M{N} — {RESOURCE_NAME} CRUD
67
67
  - Complexity: standard
68
68
  - Phases:
69
- 1. (backend) DB schema + migration for {RESOURCE_NAME} [skills: crud-api]
70
- 2. (backend) CRUD endpoints + validation + tests [skills: crud-api]
71
- 3. (frontend) {RESOURCE_NAME} list + detail + form UI
69
+ 1. DB schema + migration for {RESOURCE_NAME} [skills: crud-api]
70
+ 2. CRUD endpoints + validation + tests [skills: crud-api]
71
+ 3. {RESOURCE_NAME} list + detail + form UI
72
72
  - Acceptance Criteria:
73
73
  - [ ] All CRUD operations work
74
74
  - [ ] Input validation on all mutations
@@ -9,8 +9,8 @@ and deployment pipeline. Ideal for microservices or API-first projects.
9
9
  ### M1 — Project Setup + Database
10
10
  - Complexity: standard
11
11
  - Phases:
12
- 1. (backend) Project skeleton — framework, configs, linting, structure
13
- 2. (backend) Database setup — ORM, connection, base migration [skills: deployment]
12
+ 1. (impl) Project skeleton — framework, configs, linting, structure
13
+ 2. (impl) Database setup — ORM, connection, base migration [skills: deployment]
14
14
  - Acceptance Criteria:
15
15
  - [ ] Project builds and runs locally
16
16
  - [ ] Database connection works
@@ -19,8 +19,8 @@ and deployment pipeline. Ideal for microservices or API-first projects.
19
19
  ### M2 — Authentication
20
20
  - Complexity: standard
21
21
  - Phases:
22
- 1. (backend) User model + auth endpoints [skills: auth-setup]
23
- 2. (backend) Auth middleware + API key support [skills: auth-setup]
22
+ 1. (impl) User model + auth endpoints [skills: auth-setup]
23
+ 2. (impl) Auth middleware + API key support [skills: auth-setup]
24
24
  - Acceptance Criteria:
25
25
  - [ ] Login, signup, token refresh work
26
26
  - [ ] Protected endpoints reject unauthenticated requests
@@ -29,8 +29,8 @@ and deployment pipeline. Ideal for microservices or API-first projects.
29
29
  ### M3 — Core API
30
30
  - Complexity: standard
31
31
  - Phases:
32
- 1. (backend) Core resource endpoints + validation [skills: crud-api]
33
- 2. (backend) Pagination, filtering, error handling [skills: crud-api]
32
+ 1. (impl) Core resource endpoints + validation [skills: crud-api]
33
+ 2. (impl) Pagination, filtering, error handling [skills: crud-api]
34
34
  - Acceptance Criteria:
35
35
  - [ ] All CRUD operations work
36
36
  - [ ] Consistent error format
@@ -39,7 +39,7 @@ and deployment pipeline. Ideal for microservices or API-first projects.
39
39
  ### M4 — CI/CD + Deploy
40
40
  - Complexity: quick
41
41
  - Phases:
42
- 1. (backend) Dockerfile + CI pipeline + health check [skills: deployment]
42
+ 1. (impl) Dockerfile + CI pipeline + health check [skills: deployment]
43
43
  - Acceptance Criteria:
44
44
  - [ ] Docker build works
45
45
  - [ ] CI pipeline passes
@@ -13,9 +13,9 @@ validation, frontend UI, and tests. Use whenever you need a new entity.
13
13
  ### M{N} — {RESOURCE_NAME} CRUD
14
14
  - Complexity: standard
15
15
  - Phases:
16
- 1. (backend) DB schema + migration for {RESOURCE_NAME} table [skills: crud-api]
17
- 2. (backend) {RESOURCE_NAME} CRUD endpoints + validation + tests [skills: crud-api]
18
- 3. (frontend) {RESOURCE_NAME} list view + detail view + create/edit form
16
+ 1. (impl) DB schema + migration for {RESOURCE_NAME} table [skills: crud-api]
17
+ 2. (impl) {RESOURCE_NAME} CRUD endpoints + validation + tests [skills: crud-api]
18
+ 3. (impl) {RESOURCE_NAME} list view + detail view + create/edit form
19
19
  - Acceptance Criteria:
20
20
  - [ ] Create, read, update, delete operations work
21
21
  - [ ] Input validation on create and update