@sulhadin/orchestrator 1.3.0 → 1.4.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/package.json
CHANGED
|
@@ -81,8 +81,8 @@ PM discusses feature with user
|
|
|
81
81
|
→ PM plans scope, phases, acceptance criteria
|
|
82
82
|
→ [USER APPROVAL GATE: Milestone creation]
|
|
83
83
|
→ PM creates milestone (status: planning)
|
|
84
|
-
→ PM dispatches architect
|
|
85
|
-
→ [USER APPROVAL GATE: RFC → Implementation]
|
|
84
|
+
→ PM dispatches architect: write RFC + validate grooming (phase breakdown, dependencies, scope)
|
|
85
|
+
→ [USER APPROVAL GATE: RFC + grooming validation → Implementation]
|
|
86
86
|
→ PM dispatches backend phases (sequential, each → commit)
|
|
87
87
|
→ PM dispatches frontend phases (sequential, each → commit)
|
|
88
88
|
→ PM dispatches reviewer (reviews unpushed commits)
|
|
@@ -90,8 +90,13 @@ git diff origin/{current-branch}...HEAD # see full changeset
|
|
|
90
90
|
When activated as `#architect`:
|
|
91
91
|
- Write RFC to the milestone's `rfc.md` file
|
|
92
92
|
- Write ADRs to the milestone's `adrs/` directory if needed
|
|
93
|
+
- **Validate grooming** — review PM's phase breakdown:
|
|
94
|
+
- Are phases split at correct technical boundaries?
|
|
95
|
+
- Missing phases? (e.g. migration should be separate)
|
|
96
|
+
- Phase order correct for dependencies?
|
|
97
|
+
- Scope clear enough for engineers?
|
|
93
98
|
- Follow the architect role's technical RFC format
|
|
94
|
-
- Return result to PM with RFC summary
|
|
99
|
+
- Return result to PM with RFC summary + grooming validation findings
|
|
95
100
|
|
|
96
101
|
## Communication with PM
|
|
97
102
|
|
|
@@ -40,7 +40,12 @@ When the user says "You are the architect", do the following:
|
|
|
40
40
|
- Define error handling, logging, and health check patterns
|
|
41
41
|
- Create the project skeleton with all configs
|
|
42
42
|
- Write Architecture Decision Records (ADRs)
|
|
43
|
-
-
|
|
43
|
+
- **Validate milestone grooming** — before implementation starts, review PM's phase breakdown for technical correctness:
|
|
44
|
+
- Are phases split at the right boundaries?
|
|
45
|
+
- Are there missing phases (e.g. migration should be separate)?
|
|
46
|
+
- Is the phase order correct for dependencies?
|
|
47
|
+
- Is scope technically clear enough for engineers to start?
|
|
48
|
+
- Report findings to PM — PM adjusts phases if needed
|
|
44
49
|
|
|
45
50
|
## File Ownership
|
|
46
51
|
|
|
@@ -386,24 +386,87 @@ use `SendMessage` to the same session — zero warmup, full context preserved.
|
|
|
386
386
|
|
|
387
387
|
### Dispatching a Phase
|
|
388
388
|
|
|
389
|
-
|
|
389
|
+
**CRITICAL:** Every dispatch MUST start with the role prefix (`#backend:`, `#frontend:`, `#architect:`, `#reviewer:`). The worker agent uses this prefix to activate the correct role and its ownership scope. Without it, the worker doesn't know which role to follow.
|
|
390
|
+
|
|
391
|
+
**Dispatch format — use this exact structure:**
|
|
390
392
|
|
|
391
393
|
```
|
|
392
394
|
SendMessage to worker:
|
|
393
|
-
"#backend:
|
|
394
|
-
|
|
395
|
-
|
|
395
|
+
"#backend: You are now the backend-engineer for this task.
|
|
396
|
+
|
|
397
|
+
Phase: phase-1 of M1-user-auth
|
|
398
|
+
Phase file: .orchestra/milestones/M1-user-auth/phases/phase-1.md
|
|
399
|
+
|
|
400
|
+
Read the phase file, implement according to its objective and scope.
|
|
401
|
+
Follow backend-engineer role rules and ownership scope.
|
|
402
|
+
Write tests. Commit with conventional commit format when done.
|
|
403
|
+
Update the phase file's Result section."
|
|
404
|
+
```
|
|
405
|
+
|
|
406
|
+
**Always include:**
|
|
407
|
+
1. Role prefix (`#backend:`, `#frontend:`, etc.)
|
|
408
|
+
2. Explicit role activation ("You are now the backend-engineer")
|
|
409
|
+
3. Phase reference (milestone name + phase file path)
|
|
410
|
+
4. Instruction to read phase file, implement, test, commit, update result
|
|
411
|
+
|
|
412
|
+
### Progress Reporting — MANDATORY
|
|
413
|
+
|
|
414
|
+
**Before every dispatch**, print a visible status line so the user knows what's happening:
|
|
415
|
+
|
|
416
|
+
```
|
|
417
|
+
🏗️ #architect ▶ RFC + grooming validation...
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
**After every dispatch**, print the result:
|
|
421
|
+
|
|
422
|
+
```
|
|
423
|
+
⚙️ #backend ✅ phase-1 done (feat(db): add auth tables)
|
|
424
|
+
```
|
|
425
|
+
|
|
426
|
+
This is critical because `Agent` and `SendMessage` calls collapse in the UI.
|
|
427
|
+
Without these status lines, the user has no visibility into which role is working.
|
|
428
|
+
|
|
429
|
+
**Role icons:**
|
|
430
|
+
|
|
431
|
+
| Role | Icon |
|
|
432
|
+
|------|------|
|
|
433
|
+
| #architect | 🏗️ |
|
|
434
|
+
| #backend | ⚙️ |
|
|
435
|
+
| #frontend | 🎨 |
|
|
436
|
+
| #reviewer | 🔍 |
|
|
437
|
+
| PM (you) | 🎯 |
|
|
438
|
+
|
|
439
|
+
**Full progress format for a milestone:**
|
|
440
|
+
|
|
441
|
+
```
|
|
442
|
+
🏗️ #architect ▶ RFC + grooming validation...
|
|
443
|
+
🏗️ #architect ✅ RFC ready
|
|
444
|
+
|
|
445
|
+
🚦 Approve RFC to start implementation?
|
|
446
|
+
|
|
447
|
+
⚙️ #backend ▶ phase-1: DB schema + migrations...
|
|
448
|
+
⚙️ #backend ✅ phase-1 done (feat(db): add auth tables)
|
|
449
|
+
|
|
450
|
+
⚙️ #backend ▶ phase-2: API endpoints + tests...
|
|
451
|
+
⚙️ #backend ✅ phase-2 done (feat(auth): add login endpoint)
|
|
452
|
+
|
|
453
|
+
🎨 #frontend ▶ phase-3: Login UI...
|
|
454
|
+
🎨 #frontend ✅ phase-3 done (feat(auth): add login page)
|
|
455
|
+
|
|
456
|
+
🔍 #reviewer ▶ reviewing unpushed commits...
|
|
457
|
+
🔍 #reviewer ✅ approved
|
|
458
|
+
|
|
459
|
+
🚦 Push to origin?
|
|
396
460
|
```
|
|
397
461
|
|
|
398
462
|
### Await and Next Step
|
|
399
463
|
|
|
400
464
|
`SendMessage` **blocks** until the worker agent returns a result. When it does:
|
|
401
465
|
|
|
402
|
-
1. **
|
|
466
|
+
1. **Print completion status** — `{icon} #role ✅ phase-N done (commit message)`
|
|
403
467
|
2. **Update the phase file** status if the worker didn't
|
|
404
|
-
3. **
|
|
405
|
-
|
|
406
|
-
- More phases remaining → dispatch next phase
|
|
468
|
+
3. **Decide next action:**
|
|
469
|
+
- More phases remaining → print next status line, dispatch next phase
|
|
407
470
|
- All phases done → dispatch reviewer
|
|
408
471
|
- Worker returned a QUESTION → ask user, re-dispatch with answer
|
|
409
472
|
- Worker returned a CONCERN → evaluate and decide
|
|
@@ -412,8 +475,8 @@ Follow backend-engineer role rules. Commit when done."
|
|
|
412
475
|
### Dispatch Order
|
|
413
476
|
|
|
414
477
|
Always sequential, always in this order:
|
|
415
|
-
1. **Architect**
|
|
416
|
-
2. **[USER APPROVAL GATE]** — ask user to approve RFC before implementation
|
|
478
|
+
1. **Architect** → write RFC to milestone's `rfc.md` + validate grooming (check phase breakdown, scope, dependencies)
|
|
479
|
+
2. **[USER APPROVAL GATE]** — ask user to approve RFC + grooming validation before implementation
|
|
417
480
|
3. **Backend phases** (phase-1, phase-2, ...) → each produces a commit
|
|
418
481
|
4. **Frontend phases** (phase-N, phase-N+1, ...) → each produces a commit
|
|
419
482
|
5. **Reviewer** → reviews unpushed commits on current branch
|
|
@@ -421,15 +484,30 @@ Always sequential, always in this order:
|
|
|
421
484
|
7. **[USER APPROVAL GATE]** — ask user to approve push to origin
|
|
422
485
|
8. **Push + Close** — push to origin, verify acceptance criteria, close milestone
|
|
423
486
|
|
|
487
|
+
### When User Requests Changes at a Gate
|
|
488
|
+
|
|
489
|
+
Gates are not pass/fail — they are revision points. If the user wants changes:
|
|
490
|
+
|
|
491
|
+
**At milestone creation:** PM revises scope, phases, or acceptance criteria based on user feedback. Updates the plan and presents again.
|
|
492
|
+
|
|
493
|
+
**At RFC + grooming validation:** PM updates grooming and phases directly, dispatches #architect to revise RFC if needed. Presents updated version.
|
|
494
|
+
|
|
495
|
+
**At push to origin:** PM dispatches relevant role to make changes (additional phases, code fixes, more tests). After commits, presents again.
|
|
496
|
+
|
|
424
497
|
### Review Dispatch
|
|
425
498
|
|
|
426
499
|
Reviewer reviews all unpushed commits on the current branch:
|
|
427
500
|
|
|
428
501
|
```
|
|
429
502
|
SendMessage to worker:
|
|
430
|
-
"#reviewer:
|
|
431
|
-
|
|
432
|
-
|
|
503
|
+
"#reviewer: You are now the code-reviewer for this task.
|
|
504
|
+
|
|
505
|
+
Milestone: M1-user-auth
|
|
506
|
+
Review unpushed commits: git log origin/{branch}..HEAD
|
|
507
|
+
Full changeset: git diff origin/{branch}...HEAD
|
|
508
|
+
|
|
509
|
+
Apply the full review checklist (detect backend or frontend mode from the files changed).
|
|
510
|
+
Return verdict: approved or changes-requested with specific issues per file."
|
|
433
511
|
```
|
|
434
512
|
|
|
435
513
|
- If **approved** → proceed to push gate
|