@sulhadin/orchestrator 3.1.5 → 4.0.0-beta.1
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 +15 -24
- package/bin/build-template.js +0 -1
- package/bin/index.js +1 -23
- package/package.json +1 -1
- package/template/.claude-plugin/plugin.json +1 -1
- package/template/.orchestra/README.md +75 -110
- 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 +0 -23
- package/template/.orchestra/roles/orchestrator.md +2 -3
- package/template/.orchestra/roles/product-manager.md +52 -26
- package/template/CLAUDE.md +5 -9
- package/template/agents/{conductor.md → lead.md} +133 -118
- 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 +7 -9
- package/template/commands/status.md +1 -1
- package/template/rules/phase-limits.orchestra.md +0 -7
- 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,15 +116,13 @@ 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
|
-
**Milestone isolation** —
|
|
125
|
+
**Milestone isolation** — Every milestone runs in its own sub-agent — context freed automatically, enabling 20+ milestones in a single session. Normal mode asks before continuing; `--auto` chains milestones automatically.
|
|
134
126
|
|
|
135
127
|
**Stuck detection** — Detects repeated failures, circular fixes, over-engineering. Tries different approach once, then escalates. Auto mode skips to next phase.
|
|
136
128
|
|
|
@@ -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
|
@@ -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,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,14 +45,14 @@ 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;
|
|
60
|
-
|
|
61
|
-
Maintains `context.md` for resume capability.
|
|
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. Each milestone runs in its own sub-agent
|
|
54
|
+
for context isolation. After completion, `--auto` continues to next milestone automatically;
|
|
55
|
+
normal mode asks user before continuing. Maintains `context.md` for resume capability.
|
|
62
56
|
|
|
63
57
|
```
|
|
64
58
|
/orchestra start
|
|
@@ -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 60 minutes.
|
|
98
90
|
|
|
99
91
|
### Pipeline Modes (Complexity)
|
|
100
92
|
|
|
@@ -105,31 +97,28 @@ 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
|
-
### Milestone
|
|
104
|
+
### Milestone Execution
|
|
113
105
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|------|----------|----------|
|
|
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 |
|
|
106
|
+
Every milestone runs in its own sub-agent for context isolation. After completion:
|
|
107
|
+
- **Normal mode:** Lead asks "Continue to next milestone?" — user decides
|
|
108
|
+
- **`--auto` mode:** Lead continues to next milestone automatically
|
|
120
109
|
|
|
121
110
|
```
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
→
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
→
|
|
111
|
+
/orchestra start /orchestra start --auto
|
|
112
|
+
→ Spawn Agent(M1) → done → Spawn Agent(M1) → done → freed
|
|
113
|
+
→ "Continue to M2?" → yes → Spawn Agent(M2) → done → freed
|
|
114
|
+
→ Spawn Agent(M2) → done → Spawn Agent(M3) → done → freed
|
|
115
|
+
→ "Continue to M3?" → yes → All done
|
|
116
|
+
→ Spawn Agent(M3) → done
|
|
128
117
|
```
|
|
129
118
|
|
|
130
|
-
|
|
119
|
+
Delegation is two-tier:
|
|
131
120
|
```
|
|
132
|
-
|
|
121
|
+
Lead (lean dispatcher)
|
|
133
122
|
└── Milestone Agent (fresh context)
|
|
134
123
|
└── Phase Agent (unchanged)
|
|
135
124
|
```
|
|
@@ -148,7 +137,7 @@ Conductor (lean dispatcher)
|
|
|
148
137
|
| Status | Meaning |
|
|
149
138
|
|--------|---------|
|
|
150
139
|
| `pending` | Not yet started |
|
|
151
|
-
| `in-progress` |
|
|
140
|
+
| `in-progress` | Lead is executing |
|
|
152
141
|
| `done` | Completed and committed |
|
|
153
142
|
| `failed` | Execution failed — needs retry or manual intervention |
|
|
154
143
|
|
|
@@ -158,18 +147,17 @@ Conductor (lean dispatcher)
|
|
|
158
147
|
|
|
159
148
|
Phases always execute in this order:
|
|
160
149
|
|
|
161
|
-
1. **
|
|
162
|
-
2. **
|
|
163
|
-
3. **
|
|
164
|
-
4. **Reviewer** — reviews all unpushed commits
|
|
150
|
+
1. **Design** (RFC) — if technical design is needed
|
|
151
|
+
2. **Implementation phases** — lead derives sub-agent identity from phase scope
|
|
152
|
+
3. **Reviewer** — reviews all unpushed commits
|
|
165
153
|
|
|
166
|
-
|
|
154
|
+
Phases run in order: phase-1 → phase-2 → phase-3.
|
|
167
155
|
|
|
168
156
|
**Parallel execution:** If PM sets `depends_on` in phase frontmatter, independent phases
|
|
169
157
|
can run in parallel via subagent worktree isolation. No `depends_on` = sequential (default).
|
|
170
158
|
|
|
171
159
|
**Verification Gate:** Sub-agents run typecheck + tests + lint (from config.yml) before reporting.
|
|
172
|
-
|
|
160
|
+
Lead NEVER commits unless verification passes.
|
|
173
161
|
|
|
174
162
|
---
|
|
175
163
|
|
|
@@ -212,14 +200,14 @@ Rules:
|
|
|
212
200
|
|
|
213
201
|
The user must approve before these transitions:
|
|
214
202
|
- **Milestone creation** — PM discusses and plans, but must get user approval before creating the milestone directory and files
|
|
215
|
-
- **RFC → Implementation** — user reviews
|
|
203
|
+
- **RFC → Implementation** — user reviews design RFC (if `rfc_approval` is not `skip`)
|
|
216
204
|
|
|
217
205
|
Push is automatic after review passes. All other transitions are automatic.
|
|
218
206
|
|
|
219
207
|
### Rejection Handling
|
|
220
208
|
|
|
221
209
|
If the user says **no** at any gate:
|
|
222
|
-
- **RFC rejected** →
|
|
210
|
+
- **RFC rejected** → Lead revises based on feedback, re-submits (max 3 rounds)
|
|
223
211
|
- **Milestone rejected** → PM revises in PM terminal
|
|
224
212
|
|
|
225
213
|
Rejections are normal. The system does not stall — it loops back with feedback.
|
|
@@ -228,13 +216,13 @@ Rejections are normal. The system does not stall — it loops back with feedback
|
|
|
228
216
|
|
|
229
217
|
## Review Flow (Git-Native)
|
|
230
218
|
|
|
231
|
-
Reviewer is a separate agent called by the
|
|
219
|
+
Reviewer is a separate agent called by the lead. Review is based on **unpushed commits**.
|
|
232
220
|
|
|
233
221
|
```
|
|
234
|
-
|
|
222
|
+
Lead calls reviewer agent
|
|
235
223
|
→ Reviewer runs: git log origin/{branch}..HEAD
|
|
236
224
|
→ Reviewer runs: git diff origin/{branch}...HEAD
|
|
237
|
-
→ Reviewer applies full checklist
|
|
225
|
+
→ Reviewer applies full checklist
|
|
238
226
|
→ Returns: approved / approved-with-comments / changes-requested
|
|
239
227
|
```
|
|
240
228
|
|
|
@@ -242,8 +230,8 @@ Conductor calls reviewer agent
|
|
|
242
230
|
|
|
243
231
|
**If approved-with-comments** → push immediately. Comments are logged in context.md.
|
|
244
232
|
|
|
245
|
-
**If changes-requested** →
|
|
246
|
-
reviewer findings. Re-review triggered if fix >=
|
|
233
|
+
**If changes-requested** → Lead continues the phase's sub-agent via SendMessage with
|
|
234
|
+
reviewer findings. Re-review triggered if fix >= 50 lines.
|
|
247
235
|
|
|
248
236
|
---
|
|
249
237
|
|
|
@@ -260,7 +248,7 @@ No role may create, edit, delete, or modify these files:
|
|
|
260
248
|
- `.orchestra/roles/*.md`
|
|
261
249
|
- `.orchestra/config.yml`
|
|
262
250
|
- `.orchestra/blueprints/`
|
|
263
|
-
- `.claude/agents/
|
|
251
|
+
- `.claude/agents/lead.md`, `.claude/agents/reviewer.md`
|
|
264
252
|
- `.claude/rules/*.orchestra.md`
|
|
265
253
|
- `.claude/skills/*/SKILL.md`
|
|
266
254
|
- `.claude/commands/orchestra/`
|
|
@@ -278,9 +266,7 @@ No role may create, edit, delete, or modify these files:
|
|
|
278
266
|
|---------------|-----------------|
|
|
279
267
|
| Orchestrator | Write feature code, RFCs, design specs, review code, create milestones |
|
|
280
268
|
| 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 |
|
|
269
|
+
| Sub-agents | Write outside phase `## Scope`, modify system files, review your own code |
|
|
284
270
|
|
|
285
271
|
## File Ownership Rules
|
|
286
272
|
|
|
@@ -288,38 +274,35 @@ Each role has exclusive write access to specific directories:
|
|
|
288
274
|
|
|
289
275
|
| Role | Owns (can write) | Reads |
|
|
290
276
|
|------|-------------------|-------|
|
|
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/`,
|
|
277
|
+
| 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
278
|
| 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 |
|
|
279
|
+
| sub-agents | Only what phase `## Scope` defines — dynamic per phase | `.orchestra/milestones/*/phases/*` |
|
|
280
|
+
| lead | `.orchestra/milestones/*/context.md` | Everything in active milestone |
|
|
298
281
|
|
|
299
282
|
---
|
|
300
283
|
|
|
301
|
-
## PM ↔
|
|
284
|
+
## PM ↔ Lead Communication
|
|
302
285
|
|
|
303
|
-
PM and
|
|
286
|
+
PM and lead run in **separate terminals**. They communicate through milestone files:
|
|
304
287
|
|
|
305
288
|
- **PM writes:** prd.md, grooming.md, milestone.md, phase files
|
|
306
|
-
- **
|
|
307
|
-
- **No direct messaging** between PM and
|
|
289
|
+
- **Lead reads:** milestone files → executes phases → updates results + context.md
|
|
290
|
+
- **No direct messaging** between PM and lead — file system is the interface
|
|
308
291
|
|
|
309
292
|
### Context Persistence
|
|
310
293
|
|
|
311
|
-
|
|
294
|
+
Lead maintains `context.md` in each milestone directory with a fixed structure:
|
|
312
295
|
- `## Status` — milestone id, start date, pipeline type
|
|
313
296
|
- `## Phases` — per-phase status, commit hash, files changed, errors
|
|
314
297
|
- `## Codebase Map` — scout-generated file map (survives milestone clear)
|
|
315
298
|
- `## Decisions` — key choices from each phase that affect later phases
|
|
316
299
|
- `## Metrics` — phase duration and verification retries (used by `/orchestra status`)
|
|
317
300
|
|
|
318
|
-
This enables resume after terminal close/reopen. On restart,
|
|
301
|
+
This enables resume after terminal close/reopen. On restart, lead reads context.md and skips completed phases.
|
|
319
302
|
|
|
320
|
-
### Approval Gates (
|
|
303
|
+
### Approval Gates (Lead Terminal)
|
|
321
304
|
|
|
322
|
-
|
|
305
|
+
Lead asks the user directly (not PM) at this point:
|
|
323
306
|
1. **RFC ready** — "Approve RFC to start implementation?" (if `rfc_approval` is not `skip`)
|
|
324
307
|
|
|
325
308
|
Push is automatic after review passes — no approval needed.
|
|
@@ -334,7 +317,7 @@ Push is automatic after review passes — no approval needed.
|
|
|
334
317
|
sequenceDiagram
|
|
335
318
|
actor U as User
|
|
336
319
|
participant PM as Terminal 1: PM
|
|
337
|
-
participant C as Terminal 2:
|
|
320
|
+
participant C as Terminal 2: Lead
|
|
338
321
|
|
|
339
322
|
U->>PM: "I want user auth"
|
|
340
323
|
PM->>PM: Discuss, plan, create milestone
|
|
@@ -342,16 +325,12 @@ sequenceDiagram
|
|
|
342
325
|
U->>C: /orchestra start
|
|
343
326
|
C->>C: Read milestone files
|
|
344
327
|
|
|
345
|
-
C->>C:
|
|
328
|
+
C->>C: design phase → write RFC
|
|
346
329
|
C->>U: Approve RFC?
|
|
347
330
|
U->>C: Yes
|
|
348
331
|
|
|
349
|
-
loop Each
|
|
350
|
-
C->>C:
|
|
351
|
-
end
|
|
352
|
-
|
|
353
|
-
loop Each frontend phase
|
|
354
|
-
C->>C: frontend → phase-N → commit
|
|
332
|
+
loop Each phase
|
|
333
|
+
C->>C: sub-agent → phase-N → commit
|
|
355
334
|
end
|
|
356
335
|
|
|
357
336
|
C->>C: reviewer agent → review commits
|
|
@@ -362,38 +341,20 @@ sequenceDiagram
|
|
|
362
341
|
|
|
363
342
|
C->>C: git push → milestone done
|
|
364
343
|
|
|
365
|
-
alt
|
|
366
|
-
C->>C:
|
|
367
|
-
else
|
|
368
|
-
C->>C:
|
|
344
|
+
alt --auto mode
|
|
345
|
+
C->>C: Next milestone → loop or done
|
|
346
|
+
else Normal mode
|
|
347
|
+
C->>C: Ask user: "Continue to next?"
|
|
369
348
|
end
|
|
370
349
|
|
|
371
350
|
Note over PM: PM is free the entire time<br/>Can plan M2 while M1 executes
|
|
372
351
|
```
|
|
373
352
|
|
|
374
|
-
### 2.
|
|
353
|
+
### 2. Lead Execution Loop
|
|
375
354
|
|
|
376
355
|
```mermaid
|
|
377
356
|
sequenceDiagram
|
|
378
|
-
participant C as
|
|
379
|
-
|
|
380
|
-
C->>C: Scan milestones/
|
|
381
|
-
Note over C: M1: in-progress<br/>M2: planning<br/>M3: done
|
|
382
|
-
|
|
383
|
-
C->>C: Resume M1 (read context.md)
|
|
384
|
-
C->>C: backend phase-2 (resuming)
|
|
385
|
-
C->>C: backend phase-3
|
|
386
|
-
C->>C: reviewer → approved
|
|
387
|
-
C->>C: Push → M1 done
|
|
388
|
-
|
|
389
|
-
Note over C: STOP. "Run /compact or /clear then /orchestra start"
|
|
390
|
-
```
|
|
391
|
-
|
|
392
|
-
### 3. Conductor Execution Loop (Agent Mode)
|
|
393
|
-
|
|
394
|
-
```mermaid
|
|
395
|
-
sequenceDiagram
|
|
396
|
-
participant C as Conductor
|
|
357
|
+
participant C as Lead
|
|
397
358
|
participant MA as Milestone Agent
|
|
398
359
|
|
|
399
360
|
C->>C: Scan milestones/
|
|
@@ -401,12 +362,16 @@ sequenceDiagram
|
|
|
401
362
|
C->>MA: Spawn Agent(M1)
|
|
402
363
|
MA->>MA: phase-1 → phase-2 → review → push
|
|
403
364
|
MA-->>C: {status: done, retro: ...}
|
|
404
|
-
Note over C:
|
|
365
|
+
Note over C: ~1-2k tokens retained
|
|
405
366
|
|
|
406
|
-
|
|
367
|
+
alt --auto mode
|
|
368
|
+
C->>MA: Spawn Agent(M2) automatically
|
|
369
|
+
else Normal mode
|
|
370
|
+
C->>C: "Continue to M2?" → user says yes
|
|
371
|
+
C->>MA: Spawn Agent(M2)
|
|
372
|
+
end
|
|
407
373
|
MA->>MA: phase-1 → phase-2 → review → push
|
|
408
374
|
MA-->>C: {status: done, retro: ...}
|
|
409
|
-
Note over C: Write retro, ~1-2k tokens retained
|
|
410
375
|
|
|
411
376
|
C->>C: No more milestones
|
|
412
377
|
Note over C: "All done. Waiting for new work."
|
|
@@ -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
|