@sulhadin/orchestrator 3.1.4 → 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.
- package/README.md +14 -23
- package/bin/build-template.js +0 -1
- package/bin/index.js +12 -24
- package/package.json +1 -1
- package/template/.claude-plugin/plugin.json +1 -1
- package/template/.orchestra/README.md +55 -73
- package/template/.orchestra/blueprints/README.md +7 -7
- package/template/.orchestra/blueprints/api-only.md +7 -7
- package/template/.orchestra/blueprints/component-crud-resource.md +3 -3
- package/template/.orchestra/blueprints/saas-starter.md +17 -17
- package/template/.orchestra/config.yml +1 -1
- package/template/.orchestra/roles/orchestrator.md +2 -3
- package/template/.orchestra/roles/product-manager.md +48 -25
- package/template/CLAUDE.md +5 -9
- package/template/agents/{conductor.md → lead.md} +123 -91
- package/template/agents/reviewer.md +2 -2
- package/template/commands/create-role.md +1 -1
- package/template/commands/help.md +7 -12
- package/template/commands/hotfix.md +1 -2
- package/template/commands/pm.md +1 -2
- package/template/commands/rewind.md +0 -1
- package/template/commands/start.md +5 -5
- package/template/commands/status.md +1 -1
- package/template/rules/role-boundaries.orchestra.md +2 -2
- package/template/.orchestra/knowledge.md +0 -99
- package/template/.orchestra/roles/adaptive.md +0 -38
- package/template/.orchestra/roles/architect.md +0 -33
- package/template/.orchestra/roles/backend-engineer.md +0 -27
- package/template/.orchestra/roles/frontend-engineer.md +0 -27
- package/template/commands/adaptive.md +0 -7
- package/template/commands/architect.md +0 -7
- package/template/commands/backend.md +0 -7
- 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
|
|
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 (
|
|
34
|
+
Terminal 1 (PM): Terminal 2 (Lead):
|
|
35
35
|
/orchestra pm /orchestra start
|
|
36
36
|
│ │
|
|
37
37
|
├─ Discuss features ├─ Scan milestones
|
|
38
|
-
├─ Create milestones ├─
|
|
39
|
-
├─ Groom phases ├─ Delegate to
|
|
40
|
-
│ ├─
|
|
41
|
-
│ (plan M2 while M1 runs) ├─
|
|
42
|
-
│ ├─ Push → milestone done
|
|
38
|
+
├─ Create milestones ├─ Design phase → RFC
|
|
39
|
+
├─ Groom phases ├─ Delegate to sub-agents → code + tests
|
|
40
|
+
│ ├─ Call reviewer → code review
|
|
41
|
+
│ (plan M2 while M1 runs) ├─ Push → milestone 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
|
-
🏗️
|
|
60
|
-
⚙️
|
|
61
|
-
⚙️
|
|
62
|
-
|
|
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
|
-
│ ├──
|
|
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,
|
|
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) —
|
|
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
|
package/bin/build-template.js
CHANGED
|
@@ -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
|
@@ -81,7 +81,7 @@ function copyDirRecursive(src, dest) {
|
|
|
81
81
|
copyDirRecursive(srcPath, destPath);
|
|
82
82
|
} else if (entry.isSymbolicLink()) {
|
|
83
83
|
const linkTarget = fs.readlinkSync(srcPath);
|
|
84
|
-
|
|
84
|
+
try { fs.unlinkSync(destPath); } catch {}
|
|
85
85
|
fs.symlinkSync(linkTarget, destPath);
|
|
86
86
|
} else {
|
|
87
87
|
fs.copyFileSync(srcPath, destPath);
|
|
@@ -314,6 +314,16 @@ function run() {
|
|
|
314
314
|
const isUpgrade = fs.existsSync(orchestraDest);
|
|
315
315
|
|
|
316
316
|
if (isUpgrade) {
|
|
317
|
+
// ── Clean stale backups from previous failed runs ──
|
|
318
|
+
for (const dir of ORCHESTRA_USER_DIRS) {
|
|
319
|
+
const stale = path.join(targetDir, ".orchestra-backup-" + dir);
|
|
320
|
+
if (fs.existsSync(stale)) rmDirRecursive(stale);
|
|
321
|
+
}
|
|
322
|
+
for (const dir of CLAUDE_USER_DIRS) {
|
|
323
|
+
const stale = path.join(targetDir, ".claude-backup-" + dir);
|
|
324
|
+
if (fs.existsSync(stale)) rmDirRecursive(stale);
|
|
325
|
+
}
|
|
326
|
+
|
|
317
327
|
// ── Backup user data ──
|
|
318
328
|
const backups = {};
|
|
319
329
|
|
|
@@ -345,21 +355,6 @@ function run() {
|
|
|
345
355
|
}
|
|
346
356
|
}
|
|
347
357
|
|
|
348
|
-
// knowledge.md
|
|
349
|
-
const knowledgePath = path.join(orchestraDest, "knowledge.md");
|
|
350
|
-
const knowledgeBackup = path.join(targetDir, ".orchestra-backup-knowledge.md");
|
|
351
|
-
let hasKnowledge = false;
|
|
352
|
-
if (fs.existsSync(knowledgePath)) {
|
|
353
|
-
const content = fs.readFileSync(knowledgePath, "utf-8");
|
|
354
|
-
const marker = "<!-- New entries go here";
|
|
355
|
-
const idx = content.indexOf(marker);
|
|
356
|
-
if (idx !== -1 && content.slice(idx + marker.length).trim().length > 10) {
|
|
357
|
-
fs.copyFileSync(knowledgePath, knowledgeBackup);
|
|
358
|
-
hasKnowledge = true;
|
|
359
|
-
console.log(" [~] Backed up knowledge.md");
|
|
360
|
-
}
|
|
361
|
-
}
|
|
362
|
-
|
|
363
358
|
// config.yml (user may have customized)
|
|
364
359
|
const configPath = path.join(orchestraDest, "config.yml");
|
|
365
360
|
const configBackup = path.join(targetDir, ".orchestra-backup-config.yml");
|
|
@@ -382,7 +377,7 @@ function run() {
|
|
|
382
377
|
// Only remove orchestra files, keep user's custom agents/commands
|
|
383
378
|
const files = fs.readdirSync(dirPath);
|
|
384
379
|
for (const file of files) {
|
|
385
|
-
if (file === "conductor.md" || file === "reviewer.md" || file === "orchestra") {
|
|
380
|
+
if (file === "conductor.md" || file === "lead.md" || file === "reviewer.md" || file === "orchestra") {
|
|
386
381
|
const fullPath = path.join(dirPath, file);
|
|
387
382
|
if (fs.statSync(fullPath).isDirectory()) {
|
|
388
383
|
rmDirRecursive(fullPath);
|
|
@@ -431,13 +426,6 @@ function run() {
|
|
|
431
426
|
rmDirRecursive(backupPath);
|
|
432
427
|
}
|
|
433
428
|
|
|
434
|
-
// Restore knowledge.md
|
|
435
|
-
if (hasKnowledge && fs.existsSync(knowledgeBackup)) {
|
|
436
|
-
fs.copyFileSync(knowledgeBackup, path.join(orchestraDest, "knowledge.md"));
|
|
437
|
-
fs.unlinkSync(knowledgeBackup);
|
|
438
|
-
console.log(" [+] Restored knowledge.md");
|
|
439
|
-
}
|
|
440
|
-
|
|
441
429
|
// Merge config.yml: new template keys added, user values preserved
|
|
442
430
|
if (hasConfig && fs.existsSync(configBackup)) {
|
|
443
431
|
const userConfig = fs.readFileSync(configBackup, "utf-8");
|
package/package.json
CHANGED
|
@@ -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,
|
|
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 (
|
|
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 ├─ 🏗️
|
|
13
|
+
├─ Create milestones ├─ 🏗️ design phase → RFC
|
|
14
14
|
├─ Groom phases ├─ 🚦 User approves RFC
|
|
15
|
-
├─ Always available ├─ ⚙️ delegate to
|
|
16
|
-
│ ├─
|
|
17
|
-
│ (can plan M2 while M1 runs) ├─
|
|
18
|
-
│ ├─ git push → milestone done
|
|
15
|
+
├─ Always available ├─ ⚙️ delegate to sub-agent → phase by phase
|
|
16
|
+
│ ├─ 🔍 reviewer → review commits
|
|
17
|
+
│ (can plan M2 while M1 runs) ├─ git push → milestone 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 (
|
|
43
|
-
│ ├── context.md # Running log (
|
|
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
|
|
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
|
-
|
|
59
|
-
Sub-agents implement + verify;
|
|
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
|
-
→
|
|
73
|
+
→ Lead runs design phase: writes RFC + validates grooming
|
|
80
74
|
→ [USER APPROVAL GATE: RFC + grooming validation → Implementation]
|
|
81
|
-
→
|
|
82
|
-
→
|
|
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
|
-
→
|
|
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
|
-
|
|
97
|
-
Other
|
|
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 |
|
|
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
|
|
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) |
|
|
119
|
-
| `agent` |
|
|
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
|
-
|
|
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` |
|
|
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. **
|
|
162
|
-
2. **
|
|
163
|
-
3. **
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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** →
|
|
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
|
|
222
|
+
Reviewer is a separate agent called by the lead. Review is based on **unpushed commits**.
|
|
232
223
|
|
|
233
224
|
```
|
|
234
|
-
|
|
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
|
|
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** →
|
|
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/
|
|
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
|
-
|
|
|
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/`,
|
|
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
|
-
|
|
|
294
|
-
|
|
|
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 ↔
|
|
287
|
+
## PM ↔ Lead Communication
|
|
302
288
|
|
|
303
|
-
PM and
|
|
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
|
-
- **
|
|
307
|
-
- **No direct messaging** between PM and
|
|
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
|
-
|
|
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,
|
|
304
|
+
This enables resume after terminal close/reopen. On restart, lead reads context.md and skips completed phases.
|
|
319
305
|
|
|
320
|
-
### Approval Gates (
|
|
306
|
+
### Approval Gates (Lead Terminal)
|
|
321
307
|
|
|
322
|
-
|
|
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:
|
|
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:
|
|
331
|
+
C->>C: design phase → write RFC
|
|
346
332
|
C->>U: Approve RFC?
|
|
347
333
|
U->>C: Yes
|
|
348
334
|
|
|
349
|
-
loop Each
|
|
350
|
-
C->>C:
|
|
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.
|
|
356
|
+
### 2. Lead Execution Loop (Inline Mode)
|
|
375
357
|
|
|
376
358
|
```mermaid
|
|
377
359
|
sequenceDiagram
|
|
378
|
-
participant C as
|
|
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.
|
|
374
|
+
### 3. Lead Execution Loop (Agent Mode)
|
|
393
375
|
|
|
394
376
|
```mermaid
|
|
395
377
|
sequenceDiagram
|
|
396
|
-
participant C as
|
|
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.
|
|
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.
|
|
39
|
-
2.
|
|
40
|
-
3.
|
|
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.
|
|
70
|
-
2.
|
|
71
|
-
3.
|
|
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. (
|
|
13
|
-
2. (
|
|
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. (
|
|
23
|
-
2. (
|
|
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. (
|
|
33
|
-
2. (
|
|
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. (
|
|
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. (
|
|
17
|
-
2. (
|
|
18
|
-
3. (
|
|
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
|