@sulhadin/orchestrator 1.7.0 → 1.8.0

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sulhadin/orchestrator",
3
- "version": "1.7.0",
3
+ "version": "1.8.0",
4
4
  "description": "AI Team Orchestration System — multi-role coordination for Claude Code",
5
5
  "bin": {
6
6
  "orchestrator": "bin/index.js"
@@ -85,11 +85,11 @@ PM discusses feature with user
85
85
  → PM plans scope, phases, acceptance criteria
86
86
  → [USER APPROVAL GATE: Milestone creation]
87
87
  → PM creates milestone (status: planning)
88
- PM dispatches architect: write RFC + validate grooming (phase breakdown, dependencies, scope)
88
+ Worker activates #architect: writes RFC + validates grooming
89
89
  → [USER APPROVAL GATE: RFC + grooming validation → Implementation]
90
- PM dispatches backend phases (sequential, each → commit)
91
- PM dispatches frontend phases (sequential, each → commit)
92
- PM dispatches reviewer (reviews unpushed commits)
90
+ Worker executes backend phases (sequential, each → commit)
91
+ Worker executes frontend phases (sequential, each → commit)
92
+ Worker activates #reviewer (reviews unpushed commits)
93
93
  → FIX cycle if changes-requested (one round, no re-review)
94
94
  → [USER APPROVAL GATE: Push to origin]
95
95
  → PM pushes, verifies acceptance criteria, closes milestone
@@ -177,7 +177,7 @@ All other transitions are automatic.
177
177
  Reviewer no longer needs task files. Review is based on **unpushed commits**.
178
178
 
179
179
  ```
180
- PM dispatches #reviewer via worker agent
180
+ Worker activates #reviewer
181
181
  → Reviewer runs: git log origin/{branch}..HEAD
182
182
  → Reviewer runs: git diff origin/{branch}...HEAD
183
183
  → Reviewer applies full checklist (backend or frontend mode)
@@ -186,7 +186,7 @@ PM dispatches #reviewer via worker agent
186
186
 
187
187
  **If approved** → PM proceeds to push gate.
188
188
 
189
- **If changes-requested** → PM dispatches FIX to relevant role. Worker fixes
189
+ **If changes-requested** → Worker switches to the relevant role, fixes
190
190
  and commits. Pipeline proceeds — **no re-review** (single review round).
191
191
 
192
192
  ---
@@ -76,9 +76,20 @@ For each milestone (in order: in-progress first, then planning):
76
76
  ✅ All milestones complete. Waiting for new work from PM.
77
77
  ```
78
78
 
79
- ## Role Switching
79
+ ## Role Switching — Automatic, Based on Phase File
80
80
 
81
- Each phase file specifies a `role:` field. Activate that role for the phase:
81
+ You switch roles **automatically** based on the `role:` field in each phase file.
82
+ Nobody tells you which role to use — you read it from the phase file and activate
83
+ the corresponding role, its rules, its ownership scope, and its engineering principles.
84
+
85
+ ```
86
+ phase-1.md → role: backend-engineer → you become #backend
87
+ phase-2.md → role: backend-engineer → you stay #backend
88
+ phase-3.md → role: frontend-engineer → you switch to #frontend
89
+ review → always #reviewer
90
+ ```
91
+
92
+ Role mapping:
82
93
 
83
94
  | Role prefix | Role | Icon |
84
95
  |-------------|------|------|
@@ -103,8 +114,20 @@ as a CONCERN in context.md and continue.
103
114
 
104
115
  ## Context Persistence — `context.md`
105
116
 
106
- **After every phase completion**, update `context.md` in the milestone directory.
107
- This file allows you to resume if the terminal is closed and reopened.
117
+ Update `context.md` in the milestone directory at these moments:
118
+
119
+ | When | What to write |
120
+ |------|---------------|
121
+ | **Phase starts** | Current phase name, objective, plan |
122
+ | **Key decision made** | What was decided and why (e.g. "chose argon2 over bcrypt") |
123
+ | **Files created/modified** | Which files were touched and why |
124
+ | **Phase completes** | Commit message, result summary |
125
+ | **Error occurs** | What failed, why, current state |
126
+ | **User gives instruction** | What the user asked to change mid-phase |
127
+
128
+ This ensures that if the terminal closes at ANY point — even mid-phase — the
129
+ next `#start` can resume with full context. Don't wait until phase completion
130
+ to update; write incrementally as you work.
108
131
 
109
132
  ### context.md Format
110
133
 
@@ -146,9 +169,9 @@ When `#start` is called and a milestone has `status: in-progress`:
146
169
 
147
170
  For each phase:
148
171
 
149
- 1. **Print start status** — `{icon} #role phase-N: description...`
150
- 2. **Read the phase file** — understand objective, scope, acceptance criteria
151
- 3. **Activate the role** — follow its rules, principles, ownership scope
172
+ 1. **Read the phase file** — check `role:` field, objective, scope, acceptance criteria
173
+ 2. **Activate the role from `role:` field** — read the corresponding role file in `.orchestra/roles/`, follow its rules, principles, ownership scope
174
+ 3. **Print start status** — `{icon} #role phase-N: description...`
152
175
  4. **Implement** — write code, tests, following the role's engineering standards
153
176
  5. **Verify** — `npx tsc --noEmit`, run tests (if applicable)
154
177
  6. **Commit** — one conventional commit per phase on current branch
@@ -25,7 +25,7 @@ When the user says "You are the code-reviewer", do the following:
25
25
  1. Read this file completely.
26
26
  2. Read `.orchestra/README.md` for orchestration rules.
27
27
  3. Determine activation mode:
28
- - **Autonomous mode:** PM dispatches reviewer via worker agent with context (milestone, branch, RFC). No queue to check start reviewing immediately with the provided context.
28
+ - **Autonomous mode (#start):** Worker activates you automatically after all phases complete. Start reviewing immediatelycontext is already available from the milestone.
29
29
  - **Manual mode:** Check if there are unpushed commits on the current branch using `git log origin/{branch}..HEAD`. If commits exist, review them. If no unpushed commits, report: "No unpushed commits to review. Ready for instructions."
30
30
  4. Read the milestone's RFC for context on what was intended.
31
31
  5. Start reviewing immediately without asking for confirmation.
@@ -117,7 +117,7 @@ Fix: Reviewer → changes-requested → Engineer fixes → proceed (no re-r
117
117
  - Current library versions only
118
118
  - No workarounds, no unused code, no `any` types
119
119
  - SOLID, KISS, YAGNI, DRY — enforced by reviewer
120
- - PM dispatches a single worker agent (all roles loaded, await-based)
120
+ - Worker (#start) reads milestones, switches roles automatically per phase
121
121
  - Each phase → one commit, milestone done → push to origin
122
122
 
123
123
  ### Commands