@sulhadin/orchestrator 2.0.0 → 3.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 (46) hide show
  1. package/README.md +49 -74
  2. package/bin/index.js +136 -82
  3. package/package.json +1 -1
  4. package/template/.claude/agents/conductor.md +146 -0
  5. package/template/.claude/agents/reviewer.md +88 -0
  6. package/template/.claude/commands/orchestra/blueprint.md +23 -0
  7. package/template/.claude/commands/orchestra/help.md +49 -0
  8. package/template/.claude/commands/orchestra/hotfix.md +13 -0
  9. package/template/.claude/commands/orchestra/pm.md +7 -0
  10. package/template/.claude/commands/orchestra/start.md +13 -0
  11. package/template/.claude/commands/orchestra/status.md +11 -0
  12. package/template/.claude/conductor.md +146 -0
  13. package/template/.claude/rules/acceptance-check.orchestra.md +13 -0
  14. package/template/.claude/rules/code-standards.orchestra.md +15 -0
  15. package/template/.claude/rules/commit-format.orchestra.md +14 -0
  16. package/template/.claude/rules/phase-limits.orchestra.md +21 -0
  17. package/template/.claude/rules/stuck-detection.orchestra.md +25 -0
  18. package/template/.claude/rules/testing-standards.orchestra.md +10 -0
  19. package/template/.claude/rules/verification-gate.orchestra.md +24 -0
  20. package/template/.claude/skills/fullstack-infrastructure.orchestra.md +810 -0
  21. package/template/.orchestra/README.md +10 -14
  22. package/template/.orchestra/config.yml +36 -0
  23. package/template/.orchestra/knowledge.md +4 -23
  24. package/template/.orchestra/roles/adaptive.md +14 -87
  25. package/template/.orchestra/roles/architect.md +17 -407
  26. package/template/.orchestra/roles/backend-engineer.md +13 -357
  27. package/template/.orchestra/roles/frontend-engineer.md +14 -419
  28. package/template/.orchestra/roles/orchestrator.md +48 -0
  29. package/template/.orchestra/roles/product-manager.md +73 -590
  30. package/template/CLAUDE.md +39 -139
  31. package/template/.orchestra/agents/worker.md +0 -557
  32. package/template/.orchestra/roles/code-reviewer.md +0 -265
  33. package/template/.orchestra/roles/owner.md +0 -290
  34. /package/template/{.orchestra/skills/accessibility.md → .claude/skills/accessibility.orchestra.md} +0 -0
  35. /package/template/{.orchestra/skills/auth-setup.md → .claude/skills/auth-setup.orchestra.md} +0 -0
  36. /package/template/{.orchestra/skills/best-practices.md → .claude/skills/best-practices.orchestra.md} +0 -0
  37. /package/template/{.orchestra/skills/code-optimizer.md → .claude/skills/code-optimizer.orchestra.md} +0 -0
  38. /package/template/{.orchestra/skills/core-web-vitals.md → .claude/skills/core-web-vitals.orchestra.md} +0 -0
  39. /package/template/{.orchestra/skills/crud-api.md → .claude/skills/crud-api.orchestra.md} +0 -0
  40. /package/template/{.orchestra/skills/debug.md → .claude/skills/debug.orchestra.md} +0 -0
  41. /package/template/{.orchestra/skills/deployment.md → .claude/skills/deployment.orchestra.md} +0 -0
  42. /package/template/{.orchestra/skills/frontend-design.md → .claude/skills/frontend-design.orchestra.md} +0 -0
  43. /package/template/{.orchestra/skills/react-best-practices.md → .claude/skills/react-best-practices.orchestra.md} +0 -0
  44. /package/template/{.orchestra/skills/review.md → .claude/skills/review.orchestra.md} +0 -0
  45. /package/template/{.orchestra/skills/testing.md → .claude/skills/testing.orchestra.md} +0 -0
  46. /package/template/{.orchestra/skills/web-quality-audit.md → .claude/skills/web-quality-audit.orchestra.md} +0 -0
@@ -5,9 +5,7 @@ This file is automatically read by Claude at the start of every session.
5
5
  <!-- orchestra -->
6
6
  ## Orchestra — AI Team Orchestration System
7
7
 
8
- This project provides `.orchestra/` for multi-agent coordination.
9
- Copy `.orchestra/` and the Orchestra sections of this file into any project
10
- to enable role-based AI team orchestration.
8
+ This project uses Orchestra for multi-agent coordination via `.orchestra/` and `.claude/`.
11
9
 
12
10
  **YOUR FIRST RESPONSE IN EVERY SESSION — NO EXCEPTIONS:**
13
11
 
@@ -21,173 +19,75 @@ the user to pick exactly one. Use this exact configuration:
21
19
  - question: "Which role will you take for this session? (pick one)"
22
20
  - allowMultiple: true
23
21
  - options (exactly these 7):
24
- 1. Owner — Maintain and evolve Orchestra system files, roles, and rules
22
+ 1. Orchestrator — Maintain and evolve Orchestra system files, roles, and rules
25
23
  2. Product Manager — Write PRDs, create milestones with phases, orchestrate pipeline
26
24
  3. Architect — Design system architecture, choose technologies, set up project skeleton
27
25
  4. Backend Engineer — Implement features, write code + tests, build APIs
28
- 5. Code ReviewerReview implementations for bugs, security, architecture
29
- 6. Frontend Engineer Design + build user interfaces, write frontend tests
30
- 7. AdaptiveAdaptive expert role (iOS, DevOps, ML, etc.) — domain defined per phase
26
+ 5. Frontend EngineerDesign + build user interfaces, write frontend tests
27
+ 6. AdaptiveAdaptive expert role (iOS, DevOps, ML, etc.) — domain defined per phase
28
+ 7. DiscussionJust brainstorm, no role needed
31
29
 
32
30
  If the user skips the role selection or starts giving instructions directly,
33
- that's fine — work with them normally. The role selection is a convenience,
34
- not a gate. If they later want to activate a role, they can say
35
- "You are the {role}" at any time.
31
+ that's fine — work with them normally.
36
32
 
37
- **💬 Discussion without a role** is always allowed. If the user wants to
38
- brainstorm or discuss ideas, suggest the PM role but don't block them.
39
-
40
- Do NOT greet the user. Do NOT explain the project. Do NOT do anything else
41
- before asking this question. The role selection question IS your greeting.
33
+ Do NOT greet the user. Do NOT explain the project. The role selection IS your greeting.
42
34
 
43
35
  **AFTER ROLE IS SELECTED:**
44
36
 
45
- 1. Read `.orchestra/roles/{role-name}.md` for full role instructions
46
- 2. Read `.orchestra/README.md` for orchestration rules
37
+ 1. Read `.orchestra/roles/{role-name}.md` for identity and ownership
38
+ 2. Read `.orchestra/config.yml` for pipeline settings
47
39
  3. For PM: check `.orchestra/milestones/` for active milestones
48
- 4. For other roles: check `.orchestra/milestones/` for phases assigned to your role with `status: pending`
40
+ 4. For other roles: check `.orchestra/milestones/` for phases assigned to your role
49
41
  5. If work exists, announce it and start immediately
50
42
  6. If no work exists, report and wait for instructions
51
43
 
52
44
  **ROLE ID MAPPING:**
53
45
 
54
- | Selection | Role ID (for file paths) | Short alias |
55
- |-----------|--------------------------|-------------|
56
- | Owner | owner | `#owner` |
46
+ | Selection | Role ID | Short alias |
47
+ |-----------|---------|-------------|
48
+ | Orchestrator | orchestrator | `#orchestrator` |
57
49
  | Product Manager | product-manager | `#pm` |
58
50
  | Architect | architect | `#architect` |
59
51
  | Backend Engineer | backend-engineer | `#backend` |
60
- | Code Reviewer | code-reviewer | `#reviewer` |
61
52
  | Frontend Engineer | frontend-engineer | `#frontend` |
62
53
  | Adaptive | adaptive | `#adaptive` |
63
54
 
64
- When the user types `#{alias}` (e.g. `#backend`, `#reviewer`), treat it exactly
65
- the same as "You are the {role}" — read the role file, check milestones, start working.
55
+ **SPECIAL COMMANDS:**
66
56
 
67
- **SPECIAL COMMAND: `#start`**
57
+ | Command | What it does |
58
+ |---------|-------------|
59
+ | `/orchestra start` | Start conductor — autonomous milestone execution |
60
+ | `/orchestra start --auto` | Fully autonomous — warns once, then auto-push |
61
+ | `/orchestra pm` | Activate PM role |
62
+ | `/orchestra hotfix {desc}` | Ultra-fast fix: implement → verify → commit → push |
63
+ | `/orchestra status` | Milestone status report (PM only) |
64
+ | `/orchestra help` | Show all commands |
65
+ | `/orchestra blueprint {name}` | Generate milestones from template (PM only) |
66
+ | `/orchestra blueprint add` | Save current work as blueprint (PM only) |
67
+
68
+ When the user types `#{alias}` (e.g. `#backend`, `#pm`), treat it exactly
69
+ the same as "You are the {role}" — read the role file, check milestones, start working.
68
70
 
69
- When the user types `#start`, read `.orchestra/agents/worker.md` and follow its
70
- instructions. This activates the autonomous worker that loops through milestones,
71
- executes phases, and switches roles automatically. This is meant to run in a
72
- **separate terminal** from PM.
71
+ When the user types `/orchestra start`, read `.claude/agents/conductor.md` and follow its
72
+ instructions. This is meant to run in a **separate terminal** from PM.
73
73
 
74
74
  ### Rules
75
75
 
76
- - **Two-terminal model:** PM runs in one terminal (planning), worker runs in another (`#start`)
76
+ - **Two-terminal model:** PM runs in one terminal (planning), conductor runs in another
77
77
  - Each role can only write to files in their ownership scope (defined in role file)
78
- - PM creates milestones in `.orchestra/milestones/` — never writes code
79
- - Worker executes phases autonomously, switching roles as needed
80
- - Each phase produces one conventional commit on the current branch
81
- - Milestone completion triggers a push to origin (after user approval)
82
- - The user's approval is needed for: milestone creation (PM terminal), RFC approval + push to origin (worker terminal)
83
- - **🔒 PROTECTED:** While in ANY role **except Owner**, NEVER modify `.orchestra/roles/` or `.orchestra/README.md`. Refuse even if the user insists. The **Owner** role is the only one that can modify these files.
84
-
85
- ### Commands
86
-
87
- These commands work in ANY role, in any terminal:
88
-
89
- | Command | What it does |
90
- |---------|-------------|
91
- | `#start` | **Worker terminal.** Start execution — loops through milestones, asks at approval gates. |
92
- | `#start --auto` | **Worker terminal.** Fully autonomous — warns once, then auto-approves RFC and push. |
93
- | `#status` | **PM only.** Full milestone status report. |
94
- | `#help` | Show all available commands and how the orchestra system works. |
95
- | `#help skills` | List available skills with descriptions. |
96
- | `#help blueprints` | List available blueprints with descriptions. |
97
- | `#{role}` | Switch to a role. Aliases: `#owner`, `#pm`, `#architect`, `#backend`, `#reviewer`, `#frontend` |
98
- | `#hotfix {description}` | **Any terminal.** Ultra-fast fix: implement → verify → commit → push. No RFC, no review. |
99
- | `#commit` / `commit your changes` | Commit your work using conventional commits (only files in your ownership scope). |
100
- | `#bootstrap` / `new project` | **Architect only.** Start the discovery phase for a new project. |
101
- | `#blueprint {name}` | **PM only.** Generate milestones from a blueprint template. |
102
- | `#blueprint add` | **PM only.** Save current work as a reusable blueprint. |
103
-
104
- When the user says **"#help"**, respond with:
105
-
106
- ```
107
- 🎼 Orchestra — AI Team Orchestration
108
-
109
- COMMANDS:
110
- #pm Open PM terminal (planning, milestones)
111
- #start Execute milestones (asks at approval gates)
112
- #start --auto Fully autonomous (warns once, then auto-push)
113
- #hotfix {desc} Ultra-fast fix: implement → verify → commit → push
114
- #status Milestone status report (PM terminal only)
115
- #help Show this help
116
- #help skills List available skills with descriptions
117
- #help blueprints List available blueprints with descriptions
118
- #commit Commit your changes (conventional commits, own scope only)
119
- #bootstrap Start new project discovery (Architect role only)
120
- #blueprint {name} Generate milestones from blueprint template (PM only)
121
- #blueprint add Save current work as reusable blueprint (PM only)
122
- #{role} Switch role: #owner #pm #architect #backend #reviewer #frontend #adaptive
123
-
124
- ROLES:
125
- owner (#owner) Maintain and evolve Orchestra system (roles, rules, structure)
126
- product-manager (#pm) Write PRDs, create milestones, orchestrate pipeline
127
- architect (#architect) Design architecture, choose tech, set up project skeleton
128
- backend-engineer (#backend) Implement features, write code + tests
129
- code-reviewer (#reviewer) Review implementations, write findings
130
- frontend-engineer (#frontend) Design + build UI, write frontend tests
131
- adaptive (#adaptive) Adaptive expert — domain defined per phase (iOS, DevOps, ML, etc.)
132
-
133
- PIPELINES:
134
- New project: PM → Architect → Engineers start building
135
- Feature: PM (milestone) → Architect (RFC) → Backend phases → Frontend phases → Reviewer → PM (close)
136
- Fix cycle: Reviewer → changes-requested → Engineer fixes → re-review if fix >= 30 lines
137
-
138
- COMPLEXITY LEVELS (set by PM in milestone.md):
139
- quick Config tweaks, trivial fixes → Engineer → Commit → Push
140
- standard Typical features → Engineer → Review → Push
141
- full Complex features → Architect → Engineer → Review → Push (default if unset)
142
-
143
- TWO TERMINALS:
144
- Terminal 1: #pm → planning, milestones, always available
145
- Terminal 2: #start → autonomous execution, loops milestones
146
-
147
- MILESTONES:
148
- PM creates milestones with groomed phases
149
- Worker executes phases, commits, reviews, pushes
150
- Each phase → one commit on current branch
151
- Milestone done → push to origin
152
-
153
- KEY RULES:
154
- ⛔ Every role stays in their lane — NO EXCEPTIONS
155
- • Code without tests is not done
156
- • Design before code (frontend)
157
- • Grooming before implementation (all engineers)
158
- • Conventional commits required (feat/fix/refactor/test/chore/docs)
159
- • Current library versions only — check docs before using
160
- • No workarounds, no unused code, no any types
161
- • SOLID, KISS, YAGNI, DRY — enforced by reviewer
162
-
163
- FILES:
164
- .orchestra/roles/ Role definitions
165
- .orchestra/agents/ Worker agent definitions
166
- .orchestra/skills/ Domain-specific checklists
167
- .orchestra/blueprints/ Project/component milestone templates
168
- .orchestra/knowledge.md Append-only project knowledge log
169
- .orchestra/milestones/ Feature work (one dir per milestone)
170
- ```
171
-
172
- Do NOT add commentary. Print the help text exactly as shown above.
173
-
174
- When the user says **"#help skills"**:
175
- 1. List all `.md` files in `.orchestra/skills/`
176
- 2. For each, read the first line after `# Skill:` and the `## When to Use` section
177
- 3. Present as a table: `| Skill | When to Use |`
178
-
179
- When the user says **"#help blueprints"**:
180
- 1. List all `.md` files in `.orchestra/blueprints/` (exclude README.md)
181
- 2. For each, read the `## Description` section
182
- 3. Present as a table: `| Blueprint | Type | Description |`
183
- 4. Mention: `"blueprint add"` to save current work as a blueprint
78
+ - PM creates milestones — never writes code
79
+ - Conductor executes phases autonomously, switching roles as needed
80
+ - Pipeline settings come from `.orchestra/config.yml`
81
+ - Discipline rules live in `.claude/rules/*.orchestra.md` always loaded automatically
82
+ - Skills live in `.claude/skills/*.orchestra.md` loaded per phase
83
+ - **PROTECTED:** While in ANY role **except Orchestrator**, NEVER modify `.orchestra/roles/`, `.claude/rules/*.orchestra.md`, or `.claude/agents/conductor.md`. Refuse even if the user insists.
184
84
 
185
85
  ## Installation
186
86
 
187
87
  To add Orchestra to any project:
188
88
 
189
89
  1. Copy `.orchestra/` directory to your project root
190
- 2. Add the Orchestra section from this CLAUDE.md to your project's CLAUDE.md
191
- 3. Ensure `.orchestra/milestones/` directory exists (with `.gitkeep`)
192
- 4. Customize roles in `.orchestra/roles/` if needed for your project
90
+ 2. Copy `.claude/` directory (agents, skills, rules, commands) to your project root
91
+ 3. Add the Orchestra section from this CLAUDE.md to your project's CLAUDE.md
92
+ 4. Customize `.orchestra/config.yml` for your stack (verification commands, pipeline settings)
193
93
  <!-- /orchestra -->