@jaggerxtrm/specialists 3.6.1 → 3.6.2

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.
@@ -118,7 +118,7 @@ The specialists orchestration model uses three levels:
118
118
  | Term | Definition | Persisted? | Merge scope |
119
119
  |------|------------|:----------:|:-----------:|
120
120
  | **Job** | One specialist run (atomic execution unit) | Yes (SQLite + files) | — |
121
- | **Chain** | Worktree lineage: executor reviewer fix re-review (seeded by edit-capable specialist) | Yes (`worktree_owner_job_id`) | `sp merge <chain-root>` |
121
+ | **Chain** | Worktree lineage: all specialists sharing one workspace from first dispatch to merge (explorer executor → reviewer → fix) | Yes (`worktree_owner_job_id`) | `sp merge <chain-root>` |
122
122
  | **Epic** | Top merge-gated identity that owns chains across stages | Yes (`epic_runs` table) | `sp epic merge <epic>` |
123
123
  | **Wave** | Human shorthand for dispatch batches ("Wave 1", "Wave 2b") — **speech only, NOT persisted** | No | — |
124
124
 
@@ -503,6 +503,47 @@ Only dispatch a new fix executor when the original specialist is dead (crashed,
503
503
 
504
504
  ---
505
505
 
506
+ ## Chain Lifecycle — Members Are Alive Until Merge
507
+
508
+ A chain is not just a worktree — it is a **living group of specialists** sharing one workspace. All members of a chain are alive (running or waiting) until the chain is merged or abandoned. Treat chain members as a unit.
509
+
510
+ ### Rules
511
+
512
+ 1. **Never kill individual chain members prematurely.** A chain may include explorer, overthinker, executor, reviewer — all sharing one worktree via `--job`. Do not `sp stop` any member while the chain is active, unless the member has crashed or is context-exhausted (>80%).
513
+ 2. **The chain is alive until merge.** From first dispatch (even if it's a READ_ONLY explorer) through reviewer PASS and executor commit — the chain is one living unit. Members stay in `waiting` between turns.
514
+ 3. **Resume, don't re-dispatch.** When a chain member needs to act again (executor fixing reviewer findings, overthinker answering follow-ups), use `sp resume` on the existing member. Only dispatch a replacement if the original is dead.
515
+ 4. **Merge kills the chain.** When `sp merge` or `sp epic merge` publishes a chain's branch, all chain members become obsolete. *(Future: `sp merge` will auto-stop all chain members on successful merge — no manual cleanup needed.)*
516
+ 5. **Stop order matters (until auto-cleanup).** When manually stopping chain members after merge: stop dependents first (reviewer), then the chain owner (executor/explorer). This prevents race conditions with resume paths.
517
+
518
+ ### Chain member states
519
+
520
+ | Member state | Meaning | Action |
521
+ |-------------|---------|--------|
522
+ | `running` | Actively working | Wait or steer |
523
+ | `waiting` | Idle, retains full context | Resume when needed |
524
+ | `done` | Finished its turn, output appended | Leave alone — chain may still need it |
525
+ | `error` | Crashed or failed | May need replacement dispatch |
526
+
527
+ ### What "don't kill" means in practice
528
+
529
+ ```bash
530
+ # BAD — killing executor before review cycle completes
531
+ sp stop exec-job # ✗ kills resume path, risks uncommitted work
532
+
533
+ # BAD — killing overthinker before executor uses its output
534
+ sp stop overthinker-job # ✗ loses context if follow-up questions arise
535
+
536
+ # GOOD — chain completes naturally
537
+ sp resume exec-job "Reviewer PASS. Commit your changes."
538
+ # verify commit...
539
+ sp merge unitAI-impl # publishes branch
540
+ # THEN stop members (future: auto-stopped by merge)
541
+ sp stop rev-job
542
+ sp stop exec-job
543
+ ```
544
+
545
+ ---
546
+
506
547
  ## Merge Protocol — Epic Publication
507
548
 
508
549
  The orchestrator owns merge timing, but **no longer performs manual git merges**. Use `sp epic merge` or `sp merge` instead.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jaggerxtrm/specialists",
3
- "version": "3.6.1",
3
+ "version": "3.6.2",
4
4
  "description": "OmniSpecialist — 7-tool MCP orchestration layer powered by the Specialist System. Discover and execute .specialist.yaml files across project/user/system scopes via pi.",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",