@jaggerxtrm/specialists 3.18.0 → 3.18.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.
- package/config/mandatory-rules/code-quality-defaults.md +58 -1
- package/config/mandatory-rules/executor-delivery.md +4 -0
- package/config/mandatory-rules/test-runner-execution-scope.md +4 -0
- package/config/skills/setup-specialists/SKILL.md +1 -1
- package/config/skills/using-script-specialists/SKILL.md +5 -5
- package/config/skills/using-specialists/SKILL.md +1135 -879
- package/config/skills/using-specialists-auto/SKILL.md +21 -21
- package/config/specialists/chain-coordinator.specialist.json +63 -0
- package/config/specialists/reviewer.specialist.json +1 -1
- package/config/specialists/seconder.specialist.json +1 -1
- package/dist/asset-contract.json +8 -13
- package/dist/index.js +1070 -81
- package/dist/lib.js +185 -9
- package/dist/types/cli/clean.d.ts.map +1 -1
- package/dist/types/cli/doctor.d.ts.map +1 -1
- package/dist/types/cli/feed.d.ts.map +1 -1
- package/dist/types/cli/format-helpers.d.ts.map +1 -1
- package/dist/types/cli/init.d.ts.map +1 -1
- package/dist/types/cli/merge.d.ts.map +1 -1
- package/dist/types/cli/ps.d.ts.map +1 -1
- package/dist/types/cli/run.d.ts +19 -0
- package/dist/types/cli/run.d.ts.map +1 -1
- package/dist/types/cli/status.d.ts.map +1 -1
- package/dist/types/cli/view.d.ts.map +1 -1
- package/dist/types/pi/session.d.ts +1 -0
- package/dist/types/pi/session.d.ts.map +1 -1
- package/dist/types/specialist/control.d.ts.map +1 -1
- package/dist/types/specialist/dead-job-audit.d.ts +20 -0
- package/dist/types/specialist/dead-job-audit.d.ts.map +1 -0
- package/dist/types/specialist/launch.d.ts +8 -0
- package/dist/types/specialist/launch.d.ts.map +1 -1
- package/dist/types/specialist/loader.d.ts +12 -0
- package/dist/types/specialist/loader.d.ts.map +1 -1
- package/dist/types/specialist/observability-db.d.ts +1 -1
- package/dist/types/specialist/observability-sqlite.d.ts +76 -0
- package/dist/types/specialist/observability-sqlite.d.ts.map +1 -1
- package/dist/types/specialist/pr-drift-refresh.d.ts +17 -0
- package/dist/types/specialist/pr-drift-refresh.d.ts.map +1 -0
- package/dist/types/specialist/process-health.d.ts +16 -1
- package/dist/types/specialist/process-health.d.ts.map +1 -1
- package/dist/types/specialist/runner.d.ts +3 -0
- package/dist/types/specialist/runner.d.ts.map +1 -1
- package/dist/types/specialist/status-load.d.ts.map +1 -1
- package/dist/types/specialist/supervisor.d.ts +10 -0
- package/dist/types/specialist/supervisor.d.ts.map +1 -1
- package/dist/types/specialist/timeline-events.d.ts +2 -0
- package/dist/types/specialist/timeline-events.d.ts.map +1 -1
- package/docs/design/roadmap/chain-templates/README.md +1 -1
- package/docs/design/roadmap/chains-prompt-evals.md +3054 -0
- package/docs/design/roadmap/specialists-roadmap.md +75 -7
- package/docs/design/xt-pi-role-pi-flag-passthrough.md +174 -0
- package/docs/skills.md +4 -13
- package/package.json +2 -2
- package/config/skills/using-specialists-v2/SKILL.md +0 -766
- package/config/skills/using-specialists-v3/SKILL.md +0 -1267
|
@@ -82,7 +82,7 @@ Discovered late via `bd help`: bd already implements primitives that several Opp
|
|
|
82
82
|
| `bd gate` (create / check / resolve / list / add-waiter) | Async wait conditions with typed gates: `human` (manual close), `timer` (timeout), `gh:run` (GitHub workflow), `gh:pr` (PR merge), `bead` (cross-rig). Phase rollout 1-4. | **Opp 4** (composition gate), **Opp 8** (step_completed → gate satisfaction), `bd gate add-waiter` covers reviewer-↔-executor loop substrate-style. | `bd gate check` is already the "advance on satisfied" mechanism Opp 8 proposes for the bridge. |
|
|
83
83
|
| `bd swarm` (create / list / status / validate) | "Structured body of work defined by epic + children with DAG"; epic-→-children with dependency graph. | **Opp 4** (chain composition), the molecule mental model in §0 | `bd swarm validate` checks DAG well-formedness — the composition pre-check Opp 4's `sp chain review` proposes. |
|
|
84
84
|
| `bd create --skills <list>` (field) | Required skills declared on issue. | **substrate §10.4** skills-as-capability bridge | No roadmap Opp uses it; D26/D29 talk about skill discipline but never reach for this field. |
|
|
85
|
-
| `bd state` / `bd set-state` | Multi-dimensional state (NOT just status open/closed); creates event + updates label. | **Opp 16** SCRUTINY, future state-dim work | SCRUTINY can be a state dimension instead of a contract field if substrate §6.6 chain-property model lands that way. |
|
|
85
|
+
| `bd state` / `bd set-state` | Multi-dimensional state (NOT just status open/closed); creates event + updates label. | **Opp 16** SCRUTINY, future state-dim work; **[shipped 2026-07-03, doc-only bridge]** `contract:draft`/`contract:ready` bead-promotion gate (§5.3) | SCRUTINY can be a state dimension instead of a contract field if substrate §6.6 chain-property model lands that way. The `contract` dimension is the first state-dim actually in use — taught in skills/CLAUDE.md today; the `run.ts` hard-refuse check per §5.3 is still unbuilt. |
|
|
86
86
|
| `bd wisp-type` (heartbeat/ping/patrol/gc_report/recovery/error/escalation) | TTL ephemeral patterns for short-lived issues subject to GC. | — | New paradigm; not yet referenced in roadmap. May be relevant for orchestrator-observability events. |
|
|
87
87
|
| `bd create` fields not yet leveraged: `acceptance`, `design`, `context`, `due`, `estimate`, `metadata` (custom JSON), `spec-id`, `waits-for` + `waits-for-gate` (fanout) | First-class fields separate from description/notes | **Opp 12** XML contracts proposes embedding much of this in description XML; `waits-for`/`waits-for-gate` may be a cleaner bd-native alternative to Opp 8's event-based hand-off. | The XML-in-description approach (Opp 12) may be reinventing native bd fields. Worth re-evaluating. |
|
|
88
88
|
| `bd federation` | Peer-to-peer federation between workspaces | — | Future cross-repo coordination (`unitAI-eoqxp.5`-shaped) may use this natively. |
|
|
@@ -215,6 +215,8 @@ Each opportunity (a) is implementable without the substrate daemon or `container
|
|
|
215
215
|
|
|
216
216
|
**Opportunity 1 — Worktree lease shimmed onto chain-identity.** Add `worktree_lease_held_by` + `worktree_lease_state` to the chain-identity/status row (today jobs; later containers). Writer-step (executor, debugger) + lease `free` → acquire on dispatch, release on `agent_end` (supervisor.ts:1658). Writer-step + lease `held` → queue (`WAIT: lease held by <job>`). Read-only step → do not touch the lease; bind to the path (Opp 2). Closes Asymmetry 2 + much of 4/6; `--worktree`/`--job` mutual-exclusion becomes derivable from lease state. **Reads forward:** §6.9.6 *is* this column moved job→container; migration is rename + ownership transfer.
|
|
217
217
|
|
|
218
|
+
> **[2026-06-28 ownership note — specialists-05q.5].** Lease arbitration itself is **not owned by specialists**. Container/worktree leasing belongs to **bd merge-slot / substrate lease** (substrate §6.9.6, exposed today via `bd merge-slot` semantics). Specialists does **not** introduce new `sp lease*` columns; the runtime row carries a foreign-key-style pointer to the lease owner (today: the chain-identity row references the bd-side slot; tomorrow: `containers.lease_*` per substrate). Specialists' role is to *observe* and *surface* lease state in `sp ps` / `sp doctor` / job feed, never to hold or arbitrate it. See §B for the full ownership split.
|
|
219
|
+
|
|
218
220
|
**Opportunity 2 — READ_ONLY specialists bind by path, decoupled from owner keep-alive.** Today reviewer/code-sanity via `--job <owner>` requires the owner alive (waiting) — for the *workspace handle*, not LLM-state. Patch: when the dispatched specialist is `permission: READ_ONLY`, runner binds to the worktree **path** stored on `--job <owner>` (read once, cached) instead of requiring the owner live. Owner can be `done`/`closed`/killed; the read-only reviewer enters on its own pi session, reads the diff against the lease base, produces evidence. `--job` becomes a **workspace pointer**, not a **liveness pointer**, for read-only roles. Closes Asymmetry 6 + reduces the forgotten-`sp finalize` leak. **Reads forward:** §6.9.6 read-only steps don't acquire the lease and don't require a writer live — identical semantics; when containers land the lookup target moves job→container, surface identical. **This is the highest-leverage runtime patch. Land first.**
|
|
219
221
|
|
|
220
222
|
**Opportunity 3 — Persist resolved chain shape as data.** Add a thin `chain_shapes` table (or `~/.specialists/chains/<chain-id>.json`). **[adjusted] The shape matches `resolved_chain_json` (§6.9.2): Layer-1 domain steps + Layer-2 overlaid gates, reached/pending per step** — so migration is a true rename, not a content transform:
|
|
@@ -270,6 +272,8 @@ The shape is persisted (Opp 3) on approve; dispatch follows it. Closes Asymmetry
|
|
|
270
272
|
|
|
271
273
|
`--force-` taught "this is normal, override"; `--accept- --reason` makes it deliberate and audit-traceable. Closes B5. **Reads forward:** §6.4 precondition gate (precondition violation, not §5.10 recovery); the envelope matches channels.md §10.2; `--accept --reason` survives into `sb dispatch --allow-unready --reason`. **Stretch (non-blocking):** patch-id equivalence detection in `evaluateMergeWorthiness` — if the sibling's commits are patch-id-equal to commits already on master under a different SHA, the guard does not fire (addresses the over-fire root cause, §9.2).
|
|
272
274
|
|
|
275
|
+
> **[2026-06-28 extension — specialists-05q.5, absorbs `specialists-05q.3`].** The stale-base gate also owns **fetch-and-pin base SHA** semantics — this is *not* a separate opportunity, it lives inside Opp 7. On dispatch the runtime runs `git fetch <remote> <base-branch>` once, resolves the tip to a SHA, and records that SHA on the chain-identity/observability row as `base_sha_pinned` + `base_sha_pinned_at_ms` (durable migration shape in §B). All subsequent staleness checks compare against the *pinned* SHA, not a re-read of `origin/master` HEAD — this eliminates the "base moved mid-chain → false stale" race that drove most over-firing. `--accept-stale-base --reason` continues to override; the refusal envelope gains `base_sha_pinned`, `base_sha_observed`, `commits_behind` fields. **Specialists owns the pinning** because it is a *job-observability* fact (which SHA this run measured against); the *fetch primitive* itself remains in xt (xtrm-tools epic `xtrm-lk4on`). No new bd column, no new substrate entity — pinning is an additive column on the existing job/observability row, mirrored later as `containers.base_sha_pinned` per the §B migration table.
|
|
276
|
+
|
|
273
277
|
**Opportunity 8 — `step_completed` event with next-step recommendation.** On pi `agent_end`, extend the status row: look up Opp 3's resolved-shape row, find the just-completed step, compute the next from the template, emit `runner_event` kind `step_completed` with `{ completed, next, next_dispatch_command }`. `sp result` (§5.2) and `sp chain` (Opp 4) read it. **[recalibrated/principle]** This is also where **D2** lands: the `step_completed` for an executor carries the executor's *claimed* result, but the chain does not advance on it — it advances when the **independent gate** (code-sanity/local-validation) persists its verdict (§3.1). The executor's self-report is informational; the gate's evidence is authoritative. **[absorbed — bridge until channels v0]** Per `channels.md` §11, the channels-v0 `kind=verdict` discriminated-union message subsumes this event; when channels v0 ships, `step_completed` retires and the reviewer-↔-executor loop runs end-to-end via `verdict` + `finding` channel messages with no `sp resume`. Opp 8 supplies the same next-step recommendation in event form until then.
|
|
274
278
|
|
|
275
279
|
**[discipline] Bridge-era restitch is manual-orchestrator-driven.** Substrate §3.1 has a daemon that auto-advances on member `agent_end` from persisted evidence — that's the target state. The bridge has **no daemon**. So when a gate produces a regression-finding verdict and the resolved-shape (Opp 3) says the next step is `debugger`, the `step_completed.next_dispatch_command` is a **recommendation**, not a trigger — the orchestrator (Claude/human/auto-mode harness) reads it via `sp chain <bead>` or the event stream and **executes the `sp run` manually**. Lease handoff is automatic (executor agent_end → lease free → debugger acquires per Opp 1), but the *invocation* is orchestrator-side until substrate's daemon takes over. This keeps the restitch loop honest in the bridge and avoids inventing a half-daemon that would later need to be unwound.
|
|
@@ -441,7 +445,7 @@ Both verbs surface counts (`stopped 7 waiting, skipped 3 terminal, refused 1 run
|
|
|
441
445
|
|
|
442
446
|
**Opportunity 14 [shipped 2026-05-31] — Canonical-pipeline completion: `test-engineer` step + `test-runner` upgrade + chain_template wiring.** *(Beads: epic `unitAI-sfwe1`, design canon `docs/design/chain-templates.md` §2, formula integration `unitAI-f9kku`.)*
|
|
443
447
|
|
|
444
|
-
**Problem today.** The current canonical pipeline (already in production via `using-specialists
|
|
448
|
+
**Problem today.** The current canonical pipeline (already in production via `using-specialists`) runs `executor → code-sanity → obligations-scanner → reviewer` for production diffs. But there is a precise gap between the writer and `code-sanity`: nobody turns a production diff into the right behavioral tests, smoke/E2E checks, and telemetry assertions before the reviewer sees it. The executor is busy implementing; `test-runner` only executes. As a result, autonomous chains repeatedly ship code whose test/log/telemetry contract was never validated against the actual diff — the reviewer either gives a false PASS (no evidence to gate on) or a noisy PARTIAL (asking the operator to fill the gap manually).
|
|
445
449
|
|
|
446
450
|
**Patch.** Two specialist additions/upgrades plus a chain_template formula pass that completes the canonical pipeline:
|
|
447
451
|
|
|
@@ -499,7 +503,7 @@ The fusion is architecturally clean: `reviewer.specialist.json` already declared
|
|
|
499
503
|
**Companion enforcement.**
|
|
500
504
|
|
|
501
505
|
- **Reviewer Release Checklist** (canon §2.6 already updated): three seconder lines (`scope_verdict`, `quality_verdict`, `overall_verdict`). Reviewer cannot PASS without an established `seconder.overall_verdict: PASS` at medium+.
|
|
502
|
-
- **`using-specialists
|
|
506
|
+
- **`using-specialists` + `v4` SKILL docs**: teach the canonical pipeline including `seconder` step; document dual-verdict semantics + failure routing per dimension; cross-reference canon §2.3.
|
|
503
507
|
- **Smoke/eval** (`unitAI-o7j1a` adapted): empirically prove that an off-scope writer dispatch produces `seconder.scope_verdict: FAIL` and blocks `test-engineer` from firing.
|
|
504
508
|
|
|
505
509
|
**Cost: ~3 E-D-E (~half-day wall-clock auto-mode), parallelizable.** seconder spec authoring (inherit + extend code-sanity, 1 E-D-E) + reviewer prompt refactor (0.5 E-D-E) + formula integration (folds into f9kku, ~0 marginal since code-sanity → seconder is a string swap) + skill doc update (0.5 E-D-E) + eval (0.5 E-D-E) + optional mandatory rule (0.5 E-D-E).
|
|
@@ -712,9 +716,12 @@ PASS → `next: sp merge forge-eorh.48 — chain ready`. PARTIAL → `next: sp r
|
|
|
712
716
|
| skip code-sanity on production diff | warn | `SKIP NOT PERMITTED on production diff — only test-only/new-file-only may skip.` |
|
|
713
717
|
| `--force-stale-base` without `--reason` | warn (grace) | `STALE BASE: pass --reason "<why>" (Opp 7); old flag deprecated.` |
|
|
714
718
|
| **cwd inside a worktree dispatching for a different bead (C1)** | **HARD-REFUSE** | `CWD MISMATCH: you're in <wt-path> for <bead-X>, dispatching for <bead-Y>. Refusing (data-loss risk, C1). cd out or pass explicit path.` |
|
|
719
|
+
| **dispatch target bead is `contract:draft` (not yet promoted)** | **HARD-REFUSE** | `DRAFT BEAD: <id> is contract:draft. Promote first — explore + rewrite full 7-section contract + bd set-state <id> contract=ready.` |
|
|
715
720
|
|
|
716
721
|
**[adjusted: R5 dedup]** The last check IS the reviewer-specific R5 — it lives here, once. §7's R5 references this row rather than restating it. This is the data-loss class, hence hard-refuse not warn.
|
|
717
722
|
|
|
723
|
+
**[2026-07-03 addition — draft-bead promotion gate, shipped as a doc-only bridge.]** The `contract:draft`/`contract:ready` HARD-REFUSE row above is **not yet implemented as an `sp run` check** — it exists today only as orchestrator discipline, taught in `using-specialists` (rule #15 + "Draft Beads And The Promotion Gate"), `planning` ("Draft capture mode"), `using-xtrm` (two Trigger Patterns rows), and CLAUDE.md/AGENTS.md (new Dispatch gate row, marked explicitly "bridge — discipline only, not yet hook-enforced"). It reuses the existing `bd state`/`bd set-state` primitive (see the "Existing bd surface inventory" table above — the same row already flagged this primitive as under-used) rather than inventing a new schema field, per this document's own discipline. **What roadmap implementation must still build:** the real `run.ts` pre-dispatch check — `bd state <id> contract`, hard-refuse when `draft` or unset, same code path as the C1 cwd-mismatch check on the row above it. Until that lands, a session that skips the doc-taught discipline has no structural backstop; track this explicitly as unfinished work when Phase 3 (Naming, conventions, environment) or §5.3's implementation lands, not as something already closed by the doc changes.
|
|
724
|
+
|
|
718
725
|
### 5.4 `sp chain <bead>` CLI dashboard view
|
|
719
726
|
|
|
720
727
|
Unifies Opp 3 + Opp 8 data into one display (root beads only, §0 #1):
|
|
@@ -886,7 +893,7 @@ Everything below this phase assumes Phase 0 has shipped. Without it, Phase 2 Pas
|
|
|
886
893
|
| 0.b | Edit `config/specialists/planner.specialist.json` — extend `output_schema` with `recommended_template: enum(<15 formula names> \| 'on-the-run')`; validated at runtime against `bd formula list` (D26 a) | 0.3d | `jq` shows new enum; `sp validate planner` passes |
|
|
887
894
|
| 0.c.1 | **Create canonical `config/skills/planning/SKILL.md` (does not exist today — only `.xtrm/skills/default/planning/SKILL.md` deployed mirror, 531 lines, Phases 1-6).** Add the **7 missing sections** identified by 2026-05-31 audit: (1) Pass-2 `recommended_template` annotation (D26 b core deliverable); (2) chain-template catalog enum with when-to-use briefs (15 templates, refs `chain-templates.md` §3.1-§3.15); (3) contract-creation discipline (D29 — CoT prefill in `<thinking>` tags, 2 worked + 1 anti-example per contract type, critique-before-commit premortem-style); (4) XML semantic structure (D30/Opp 12 — `<change-contract>` for root, `<step-contract>` for step; concrete shape with `<problem>`/`<scope>/<path>`/`<non-goals>`/`<validation>/<criterion>`/`<acceptance>`); (5) memory-recall integration (D27/Opp 11 — `bd memories <keyword>` BEFORE planning, `bd recall <key>` for payloads); (6) SCRUTINY-aware composition (Opp 16 — planner picks tier per scope/risk surface; canon §2.2 auto-escalation table; planner sets floor, reviewer can only escalate); (7) bd dep typed-edges navigation (D28 absorbed — full `--type` vocabulary: validates / informs / discovered-from / parent-child / related / supersedes; worked-template tables). | 1.0d | All 7 sections present + `sp validate planner` reads the new file via `skills.paths` |
|
|
888
895
|
| 0.c.2 | **Cross-repo mirror to `~/dev/xtrm-tools`** — propagate canonical to xtrm-tools update pipeline so `xt update --apply` ships the new content to consumer projects. Requires `npm link` symlink + revendor + 2-pass `xt update --apply` per memory `xtrm-tools-skill-propagation-requires-npm-link-2026-05-23`. Verify identical SHA in ≥2 consumer repos. | 0.5d | `diff -q ~/projects/<repo>/.xtrm/skills/default/planning/SKILL.md ~/dev/specialists/config/skills/planning/SKILL.md` returns identical |
|
|
889
|
-
| 0.d | Verify `/using-specialists
|
|
896
|
+
| 0.d | Verify `/using-specialists` still teaches the manual-chain-discipline + Iron pipeline + manual git per CLAUDE.md rule #9 that holds Phase 1 execution until Opp 4+10 land | 0.1d | Skim §"Orchestration Discipline" + §"Chain Management" sections |
|
|
890
897
|
| 0.e | Smoke: dispatch planner on a vacuum bead (just a title) → confirm `recommended_template` field appears in output_schema-validated output | 0.2d | `sp run planner --bead <test> --json` shows the field; resolved chain pour respects template-declared scrutiny floor |
|
|
891
898
|
|
|
892
899
|
**Why Phase 0 is bootstrap, not Phase 3:** D26 was originally Phase 3 row 11b because the operator could in principle hand-edit it any time. But Phase 2 Pass-2 (planner annotation of `recommended_template`) **cannot run without D26 shipped**. Putting D26 inside Phase 3 created a circular dependency: planning Phase 2 produces the bd board that includes Phase 3 work that planning Phase 2 needs. The fix is sequencing, not redesign.
|
|
@@ -936,18 +943,18 @@ After Phase 0: the operator has the chain templates installed, the planner knows
|
|
|
936
943
|
|---|---|---|---|
|
|
937
944
|
| 17 | bd auto-stage + hooksPath cases + dep/migration verify | §6 / §0 #6 | **`xtrm-h9hqg`** ✓ done (CLOSED 2026-05-27 per D25) |
|
|
938
945
|
| 18 | Orphan worktree cleanup (B-A4), test excludes (B-A5), osv wrapper (B-A6) | §6 | friction-audit-side (~1d) |
|
|
939
|
-
| 19 | `sp merge` / `sp epic merge` / `sp finalize` rework | §5.5 | **NEW epic `unitAI-lyh1b` filed 2026-05-31 as kj651 child** — supersedes the original "dirty-index diagnostic" scope (D18 runway recalibration) with a fuller rework: structured failure envelopes, conflict-recovery paths, auto-rebase suggestion, soak across 3 repos to remove the `using-specialists
|
|
946
|
+
| 19 | `sp merge` / `sp epic merge` / `sp finalize` rework | §5.5 | **NEW epic `unitAI-lyh1b` filed 2026-05-31 as kj651 child** — supersedes the original "dirty-index diagnostic" scope (D18 runway recalibration) with a fuller rework: structured failure envelopes, conflict-recovery paths, auto-rebase suggestion, soak across 3 repos to remove the `using-specialists` rule #9 prohibition. Decomposition into child beads by planner Pass-1. |
|
|
940
947
|
| 20 | `xt init` auto-runs the bootstrap skill on new repos (per D19) | §6 | xtrm-tools (~0.5d) |
|
|
941
948
|
|
|
942
949
|
### Phase 6 — Skills revamp: `using-specialists-v4` as new canonical (~2 days)
|
|
943
950
|
|
|
944
|
-
The operator-facing skills (`using-specialists
|
|
951
|
+
The operator-facing skills (`using-specialists`, `using-specialists-auto`) currently teach the pre-roadmap discipline: `--bead` + `--worktree` / `--job` dispatch, manual chain stitching, Iron pipeline as convention, manual git per rule #9. After Phases 1–5 ship, the discipline has fundamentally changed — `--chain <molecule-id>` is the single dispatch verb, `sp chain review/approve/insert` is the composition gate, step-bead conventions are atomic with `kind:step` as truth, R-checks fire at dispatch, the new mandatory rule replaces auto-injection, the chain-template catalog is live. **This is a revamp, not a patch.** v3 was built for the pre-roadmap world; trying to patch it in-place produces contradictory text where every section disagrees with the next. v4 is the clean canonical successor.
|
|
945
952
|
|
|
946
953
|
| # | Item | Source | Cost |
|
|
947
954
|
|---|---|---|---|
|
|
948
955
|
| 21 | **Create `config/skills/using-specialists-v4/SKILL.md`** as the new canonical operator-facing skill, taught from scratch around the shipped surfaces: `--chain <molecule-id>` as the only dispatch verb (Opp 10); `sp chain review/approve/insert` as composition gate (Opp 4); `bd mol pour` + 13 chain templates as the resolved-shape source (§13); `kind:step` label-as-truth for step beads (Opp 5/D20); atomic role→edge wiring via `sp chain wire-edges` post-pour helper; R-check behavior per §7 (R3/R6/R7 hard-refuse; R1/R2/R5 retired with `--job`); pull-not-push memory recall via the new mandatory rule (Opp 11/D27) — no more bd-prime / .xtrm/memory.md auto-dump; `sp epic` as decorated reader-only surface (§12); manual git per CLAUDE.md rule #9 remains canonical (sp merge / sp epic merge dropped). Mark frontmatter `status: canonical (post-roadmap)`. | §11.1 D28 | 1d |
|
|
949
956
|
| 22 | **Refresh `config/skills/using-specialists-auto/SKILL.md`** to mirror v4 in the auto-orchestration mode; explicitly call out the new smoke-checkpoint cadence (each phase's checkpoint set is the auto-mode validation gate); teach the "eat-your-own-dogfood as it ships" discipline. | §11.1 D28 | 0.5d |
|
|
950
|
-
| 23 | **Freeze `config/skills/using-specialists
|
|
957
|
+
| 23 | **Freeze `config/skills/using-specialists/SKILL.md`** as legacy reference. Prepend a frontmatter banner: `status: legacy — superseded by using-specialists-v4 as of <commit>; preserved for historical reference and for any cold-start sessions that haven't migrated`. Do NOT rewrite v3 in place — patching v3 produces contradictory text where new and old surfaces collide. v3 stays as the pre-roadmap snapshot. Inside-v4 forward-looking section ("Future surfaces") notes channels v0 + substrate concepts as *coming, not active* — so operators know what to expect when those land, without v4 itself being gated on them. | §11.1 D28 | 0.5d |
|
|
951
958
|
|
|
952
959
|
**Why v4 is canonical-now, not channels-gated:** the 11 opportunities ship in ~16 days (Phases 0–5); channels v0 and substrate landing are months out and outside this roadmap. Gating v4 on channels would leave the operator with a stale v3 teaching dead surfaces (`--worktree`/`--job`/raw `--bead`) for months. v4 = canonical for what shipped. Channels/substrate-aware surfaces live as a clearly-marked "Future surfaces" section inside v4 (or as a future `using-specialists-v5` when channels v0 ships) — they do not block v4's release.
|
|
953
960
|
|
|
@@ -1191,3 +1198,64 @@ If an operator objects during the announcement window, the objection itself beco
|
|
|
1191
1198
|
| R3 follow-on: "each gap blocks cutover instead of becoming one bridged edge" | §A.4 makes objections substrate issues, so blocked-by-gap becomes tracked work, not a stall |
|
|
1192
1199
|
| Synthesis cross-cutting A: "deferral compound" | §A.3 carrying-cost ledger surfaces the cost of each deferred retirement so the compound cost is visible per-release, not hidden |
|
|
1193
1200
|
| Synthesis cross-cutting D: "stage acceptance ≠ operator adoption" | §A.3 forensic instrumentation makes adoption measurable — a Stage isn't done when its code ships, it's done when bridges retire because operators stopped using them |
|
|
1201
|
+
|
|
1202
|
+
## §B. Durable runtime track and PR/base drift ownership split (added 2026-06-28, specialists-05q)
|
|
1203
|
+
|
|
1204
|
+
> Companion epic: **specialists-05q** (this repo). Children: `.1` durable PR/base drift fields, `.2` attention surface, `.3` fetch-and-pin (absorbed into Opp 7 per §3.2), `.4` dead-job audit, `.5` (this roadmap edit), `.6` validation suite. Paired upstream: **`xtrm-lk4on`** (xtrm-tools — git/worktree/PR primitives) and **`xtrm-2zd`** (xtrm/Mercury collaborator doc — container composition: webhooks, cron, bot identity, fork topology, see `~/dev/xtrm/docs/devops/mercury-devops-collaborator.md` §4–7).
|
|
1205
|
+
|
|
1206
|
+
### §B.1 Why this section exists
|
|
1207
|
+
|
|
1208
|
+
PR/base drift work straddles four owners. Without an explicit split it gravitates to specialists (because that's where operators feel the pain) and the durable home is missed — repeating the §A "permanent bridge" failure mode. This section pins ownership *before* any of the §3.2 work above lands new columns, refusal envelopes, or restart audits, so each child of `specialists-05q` knows whose surface it extends.
|
|
1209
|
+
|
|
1210
|
+
### §B.2 Ownership split
|
|
1211
|
+
|
|
1212
|
+
| Owner | Surface | What it owns | What it does NOT own |
|
|
1213
|
+
|---|---|---|---|
|
|
1214
|
+
| **xt (`xtrm-tools`, epic `xtrm-lk4on`)** | git, worktree, PR | git/worktree primitives, `xt end`, branch/PR creation, fetch-base, sibling-branch detection, patch-id equivalence | job-state observability, attention scoring, dead-job declaration |
|
|
1215
|
+
| **sp (specialists, epic `specialists-05q`)** | job runtime + observability | job-row PR/base drift fields, `sp ps` / `sp doctor` attention surface, base SHA pin recording, dead-job audit + restart, `--accept-stale-base --reason` UX | the lease itself, the merge slot, the fetch primitive, container composition |
|
|
1216
|
+
| **bd / substrate** | leases + slots | `bd merge-slot` lease, container lease (substrate §6.9.6), slot arbitration | telemetry, attention scoring, dispatch ergonomics |
|
|
1217
|
+
| **xtrm / Mercury collaborator doc (`~/dev/xtrm/docs/devops/mercury-devops-collaborator.md` §4–7, epic `xtrm-2zd`)** | container composition | webhook topology, cron triggers, bot identity, fork topology, what *constitutes* a container in the collaborator model | per-job lease state, per-job observability, per-job dispatch |
|
|
1218
|
+
|
|
1219
|
+
**Reading rule.** When a child of `specialists-05q` (or any future drift bead) needs a primitive that is **not** in the sp column, it does NOT add the primitive to specialists. It (a) opens / extends a bead in the owning epic above, (b) cross-links via `bd dep add … --type tracks`, and (c) consumes the upstream surface read-only. This prevents the "specialists absorbs every adjacent concern" failure mode flagged in §A.1.
|
|
1220
|
+
|
|
1221
|
+
### §B.3 Durable migration table
|
|
1222
|
+
|
|
1223
|
+
Every row below states **bridge home** (where the data/behavior lives pre-substrate), **substrate target** (where it ends up per the §6.9 substrate model), and **migration shape** (`rename` / `attach` / `retire`) consistent with §11 and §A.2. No row introduces a new `sp lease*` column.
|
|
1224
|
+
|
|
1225
|
+
| Concern | Bridge home (today) | Substrate target | Migration shape | Evidence surfaces | Owning epic |
|
|
1226
|
+
|---|---|---|---|---|---|
|
|
1227
|
+
| **PR drift fields** (PR #, head SHA, base ref, drift status, last-refresh ms) | additive columns on the job-observability row (specialists-side) | `containers.pr_*` (substrate §6.9.6 / §6.9.7) | **rename** (column-for-column; ownership transfers job→container) | `sp ps --json` (jobs with `pr_*` populated), `sp doctor` "PR drift" check, job feed `pr_drift_observed` event | `specialists-05q.1` |
|
|
1228
|
+
| **base_sha pin** (pinned SHA + pinned-at ms; refusal envelope fields `base_sha_pinned` / `base_sha_observed` / `commits_behind`) | additive columns on the job-observability row + refusal envelope fields per Opp 7 extension above | `containers.base_sha_pinned` + `containers.base_sha_pinned_at_ms`; refusal envelope unchanged | **rename** (column move job→container; refusal envelope shape stable) | `sp ps --json` (`base_sha_pinned`), `sp doctor` "stale base" check, `--accept-stale-base --reason` audit trail, `xtrm.forensic.v1` `precondition.stale_base.*` | `specialists-05q.3` (absorbed into Opp 7); fetch primitive in `xtrm-lk4on` |
|
|
1229
|
+
| **needs-attention view** (per-job attention score: stale base, drifted PR, dead-job suspect, missing lease holder) | derived view in `sp ps` / `sp doctor` reading existing job-observability columns; specialists computes; surfaces JSON + human | derived view in substrate console reading `containers.*`; the *score* is bridge-only — substrate may project a different attention model in §6.9.x | **retire** (specialists-side derived view retires when substrate console ships its own attention surface; specialists keeps the JSON contract while bridges exist per §A.3) | `sp ps --json` (`attention_reasons[]`), `sp doctor --attention`, job feed `attention_raised` / `attention_cleared` events, Prometheus low-cardinality projection (Opp 18) | `specialists-05q.2`; container-side composition in `xtrm-2zd` |
|
|
1230
|
+
| **dead-job audit** (restart-time scan: jobs marked running with no pi process, no recent heartbeat, no lease activity → declare `dead` and emit audit event) | restart-time hook in specialists runtime + audit table column on the job-observability row | substrate daemon's container-state reconciler (§6.9.x) absorbs the audit; the column moves job→container as `containers.lifecycle_audit_*` | **attach** then **retire** (today: specialists owns the audit because no daemon; once substrate daemon ships, the audit logic is retired — the column is renamed, the *logic* is dropped) | `sp ps --json` (`lifecycle_state=dead`, `lifecycle_audit_reason`), `sp doctor` "dead jobs" check, audit JSONL artifact, `xtrm.forensic.v1` `lifecycle.dead_declared` | `specialists-05q.4`; substrate daemon in `kj651` follow-up |
|
|
1231
|
+
|
|
1232
|
+
**Cross-row invariant.** None of the four rows above introduces a new lease column on the specialists side. The lease holder, when needed, is **read** from the bd / substrate side (today: `bd merge-slot` query; tomorrow: `containers.lease_*`) and **mirrored read-only** onto the attention surface — not stored as authoritative state on the job row. This is the §B.2 ownership rule in schema form.
|
|
1233
|
+
|
|
1234
|
+
### §B.4 Evidence surfaces (per §3 CONSTRAINTS)
|
|
1235
|
+
|
|
1236
|
+
All child work under `specialists-05q` must name evidence in these surfaces before it can close:
|
|
1237
|
+
|
|
1238
|
+
- **`sp ps`** — both human (terminal-aesthetic) and `--json` (machine-consumable) outputs surface the new fields under the existing tokens/cost/state line pattern (per §3.2 Opp 8 / Surface Coverage §v2.0).
|
|
1239
|
+
- **`sp doctor`** — gains the four checks named in §B.3 (PR drift, stale base, attention, dead jobs); each check is independently runnable and JSON-emitable.
|
|
1240
|
+
- **Job/specialist feed** — gains the additive forensic-event families in §B.3 right column; emitted under `xtrm.forensic.v1` envelopes per Opp 18 contract; persisted to `specialist_forensic_events`.
|
|
1241
|
+
- **Prometheus projection** — low-cardinality only per `docs/telemetry/prometheus-projection-contract.md`; never `job_id`/`bead_id` as labels; PR/base/attention/dead-job counters are by `event_family` + `outcome` only.
|
|
1242
|
+
|
|
1243
|
+
### §B.5 Bridge cost per §A
|
|
1244
|
+
|
|
1245
|
+
Each row in §B.3 carries a §A.3 carrying cost. Owners-of-cutover:
|
|
1246
|
+
|
|
1247
|
+
| Bridge | Class (§A.2) | Owner-of-cutover | Retirement gate |
|
|
1248
|
+
|---|---|---|---|
|
|
1249
|
+
| Specialists-side PR drift columns | Migration bridge | specialists-runtime maintainer | `containers.pr_*` projection passes drift-check in CI; `xtrm.forensic.v1` `pr_drift_observed` event count from specialists-side projection drops below threshold for 7d |
|
|
1250
|
+
| Specialists-side base_sha pin columns | Migration bridge | specialists-runtime maintainer | `containers.base_sha_pinned` projection passes; refusal envelope unchanged across the cut |
|
|
1251
|
+
| Specialists-side attention view | Throwaway diagnostic | specialists-CLI maintainer | substrate console ships its own attention surface; operator adoption confirmed via `attention_*` event source-family shift |
|
|
1252
|
+
| Specialists-side dead-job audit logic | Throwaway diagnostic | specialists-runtime maintainer | substrate daemon ships container-state reconciler; `lifecycle.dead_declared` source-family shifts from specialists to substrate |
|
|
1253
|
+
|
|
1254
|
+
Per §A.4 each retirement runs the 7-day announcement window; the column renames are atomic with the substrate landing commit so no row persists with both old and new column names live.
|
|
1255
|
+
|
|
1256
|
+
### §B.6 What this section does NOT do
|
|
1257
|
+
|
|
1258
|
+
- Does not modify the §3.2 Opp 1 / Opp 7 wording beyond the inline 2026-06-28 ownership / extension notes above.
|
|
1259
|
+
- Does not introduce a new opportunity number — fetch-and-pin is absorbed into Opp 7, lease ownership clarifies Opp 1, attention/audit ride existing Opp 8 / `sp doctor` surfaces.
|
|
1260
|
+
- Does not commit specialists to any new substrate-side schema; substrate targets are *informational* per §11 migration shape.
|
|
1261
|
+
- Does not transfer ownership of git/worktree/PR primitives to specialists; those stay in `xtrm-lk4on` (xt) and `xtrm-2zd` (collaborator doc).
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# `xt pi --role` ↔ `pi` runtime flag passthrough
|
|
2
|
+
|
|
3
|
+
**Context:** `xt pi --role <name>` (xtrm-tools/core PR #362, branch
|
|
4
|
+
`feature/xtrm-yd1p1-pi-role-launcher`) launches a `pi` interactive session in
|
|
5
|
+
a worktree. The current implementation forwards **zero flags** to the pi
|
|
6
|
+
subprocess (`cli/src/utils/worktree-session.ts:373`):
|
|
7
|
+
|
|
8
|
+
```ts
|
|
9
|
+
const runtimeCmd = runtime === 'claude' ? 'claude' : 'pi';
|
|
10
|
+
const runtimeArgs = runtime === 'claude' ? ['--dangerously-skip-permissions'] : [];
|
|
11
|
+
const launchResult = spawnSync(runtimeCmd, runtimeArgs, { cwd: worktreePath, stdio: 'inherit' });
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
xt pi's own flags today: `[name]`, `--role <name>`, `--bead <id>`, `--no-attach`.
|
|
15
|
+
Everything `pi` accepts (`pi --help`) is currently unreachable through xt.
|
|
16
|
+
|
|
17
|
+
This doc rules pi's ~30 CLI flags **passthrough / xt-owned / skip** for `xt pi --role`.
|
|
18
|
+
|
|
19
|
+
Coordinated with xt-design.3, epic `xtmux-2i5`.
|
|
20
|
+
|
|
21
|
+
## Recommended shape
|
|
22
|
+
|
|
23
|
+
**Adopt the `--` passthrough convention.** Anything after `--` on the `xt pi`
|
|
24
|
+
command line is forwarded verbatim as pi argv:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
xt pi --role chain-coordinator --bead unitAI-2i5 -- --thinking high --no-extensions -e ./local-ext.js
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Rationale: pi's flag surface is large, changes independently, and includes
|
|
31
|
+
extension-registered flags xt can't enumerate ahead of time (`--gitnexus-cmd`,
|
|
32
|
+
`--mcp-config`, `--plan`, …). Enumerating each is a maintenance treadmill.
|
|
33
|
+
The `--` convention gives full parity with one code change, zero drift.
|
|
34
|
+
|
|
35
|
+
Individual xt flags (below) are reserved for pi flags xt itself needs to
|
|
36
|
+
*read or override* — e.g. session naming, which xt derives from the branch.
|
|
37
|
+
|
|
38
|
+
## Passthrough table
|
|
39
|
+
|
|
40
|
+
Legend:
|
|
41
|
+
- **passthrough** — forward as-is after `--` (no xt interpretation)
|
|
42
|
+
- **xt-owned** — xt sets or overrides these; user cannot pass them
|
|
43
|
+
- **surface** — worth a first-class xt flag (short-form convenience or
|
|
44
|
+
interpretation needed before pi launches)
|
|
45
|
+
- **skip** — not meaningful under `xt pi --role`
|
|
46
|
+
|
|
47
|
+
### Runtime shape
|
|
48
|
+
|
|
49
|
+
| pi flag | Verdict | Rationale |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| `--provider <name>` | passthrough | Runtime shape. `pi --model provider/id` also handles this, but explicit form works. |
|
|
52
|
+
| `--model <pattern>` | **surface** as `--model` | High-value parity flag. Also match `sp run --model`. Support `:thinking` shorthand pi already parses. |
|
|
53
|
+
| `--api-key <key>` | passthrough | Rare; env vars usually suffice. Don't surface (secret on cmdline). |
|
|
54
|
+
| `--thinking <level>` | **surface** as `--thinking` | Runtime shape and highest-frequency override. Match pi's levels: off/minimal/low/medium/high/xhigh. |
|
|
55
|
+
| `--models <patterns>` | passthrough | Ctrl+P cycling config. Not critical to surface. |
|
|
56
|
+
|
|
57
|
+
### Session lifecycle
|
|
58
|
+
|
|
59
|
+
| pi flag | Verdict | Rationale |
|
|
60
|
+
|---|---|---|
|
|
61
|
+
| `--continue, -c` | passthrough | Meaningful when re-entering an existing xt worktree; user knows the intent. |
|
|
62
|
+
| `--resume, -r` | passthrough | Same. |
|
|
63
|
+
| `--session <path\|id>` | passthrough | Advanced use. Passthrough sufficient. |
|
|
64
|
+
| `--session-id <id>` | passthrough | Same. |
|
|
65
|
+
| `--fork <path\|id>` | passthrough | Same. |
|
|
66
|
+
| `--session-dir <dir>` | **xt-owned** | xt sets `PI_CODING_AGENT_SESSION_DIR` (or equivalent) to a worktree-scoped path if desired. Don't let users override — breaks session locality. |
|
|
67
|
+
| `--no-session` | passthrough | Ephemeral run inside a persistent worktree is a valid user choice. |
|
|
68
|
+
| `--name, -n <name>` | **xt-owned** | xt derives the display name from `[name]` positional / branch slug. Overriding here fragments observability. |
|
|
69
|
+
|
|
70
|
+
### Tools / extensions / skills
|
|
71
|
+
|
|
72
|
+
| pi flag | Verdict | Rationale |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| `--no-tools, -nt` | passthrough | Read-only mode; user choice. |
|
|
75
|
+
| `--no-builtin-tools, -nbt` | passthrough | Same. |
|
|
76
|
+
| `--tools, -t <list>` | passthrough | Allowlist. Same. |
|
|
77
|
+
| `--exclude-tools, -xt <list>` | passthrough | Denylist. Same. |
|
|
78
|
+
| `--extension, -e <path>` | passthrough | Load explicit extension file. Multi-use. Passthrough. |
|
|
79
|
+
| `--no-extensions, -ne` | passthrough | Disable discovery. Passthrough. |
|
|
80
|
+
| `--skill <path>` | passthrough | Same as `-e` for skills. |
|
|
81
|
+
| `--no-skills, -ns` | passthrough | Same. |
|
|
82
|
+
| `--prompt-template <path>` | passthrough | Same. |
|
|
83
|
+
| `--no-prompt-templates, -np` | passthrough | Same. |
|
|
84
|
+
| `--theme <path>` | passthrough | Cosmetic. |
|
|
85
|
+
| `--no-themes` | passthrough | Same. |
|
|
86
|
+
| `--no-context-files, -nc` | passthrough | Disable AGENTS.md/CLAUDE.md load. Legitimate override. |
|
|
87
|
+
|
|
88
|
+
### System prompt
|
|
89
|
+
|
|
90
|
+
| pi flag | Verdict | Rationale |
|
|
91
|
+
|---|---|---|
|
|
92
|
+
| `--system-prompt <text>` | **xt-owned when `--role` set** | The role's `specialist.prompt.system` is already the system prompt (see `resolveRole` in worktree-session.ts). Passing this again would clobber the role. Reject with an error when `--role` is present; passthrough when it isn't. |
|
|
93
|
+
| `--append-system-prompt <text>` | passthrough | Additive, not clobbering. Safe alongside `--role`. Multi-use. |
|
|
94
|
+
|
|
95
|
+
### Startup / mode
|
|
96
|
+
|
|
97
|
+
| pi flag | Verdict | Rationale |
|
|
98
|
+
|---|---|---|
|
|
99
|
+
| `--mode <mode>` | passthrough | text/json/rpc — user knows intent. |
|
|
100
|
+
| `--print, -p` | **skip / warn** | Non-interactive mode contradicts `xt pi`'s interactive-tmux design. Warn and refuse (use `sp run` for one-shot). |
|
|
101
|
+
| `--approve, -a` | passthrough | Trust project files this run. |
|
|
102
|
+
| `--no-approve, -na` | passthrough | Same. |
|
|
103
|
+
| `--offline` | passthrough | `PI_OFFLINE=1` alternative. |
|
|
104
|
+
| `--verbose` | passthrough | Debug aid. |
|
|
105
|
+
|
|
106
|
+
### Introspection / one-shot commands
|
|
107
|
+
|
|
108
|
+
| pi flag | Verdict | Rationale |
|
|
109
|
+
|---|---|---|
|
|
110
|
+
| `--list-models [search]` | **skip** | Not a session — no worktree needed. User runs `pi --list-models` directly. |
|
|
111
|
+
| `--export <file>` | **skip** | One-shot session-to-HTML. Not an xt workflow. |
|
|
112
|
+
| `--help, -h` | **skip** | xt owns its own `--help`. |
|
|
113
|
+
| `--version, -v` | **skip** | Use `xt pi status` (already exists per pi.ts). |
|
|
114
|
+
|
|
115
|
+
### Subcommands (`pi install`, `pi update`, `pi list`, `pi config`)
|
|
116
|
+
|
|
117
|
+
| Subcommand | Verdict | Rationale |
|
|
118
|
+
|---|---|---|
|
|
119
|
+
| `pi install / remove / uninstall / update / list / config` | **skip** | Not launch flows. User runs `pi <cmd>` directly outside a worktree. |
|
|
120
|
+
|
|
121
|
+
### Extension-registered flags
|
|
122
|
+
|
|
123
|
+
| Flag | Verdict | Rationale |
|
|
124
|
+
|---|---|---|
|
|
125
|
+
| `--gitnexus-cmd <value>` | passthrough | Registered by extension. Cannot enumerate ahead of time. |
|
|
126
|
+
| `--mcp-config <value>` | passthrough | Same. |
|
|
127
|
+
| Any future extension flag | passthrough | Same. Justifies the `--` convention as primary path. |
|
|
128
|
+
|
|
129
|
+
## Summary
|
|
130
|
+
|
|
131
|
+
**Primary path — do this first:**
|
|
132
|
+
Implement `--` passthrough in `launchWorktreeSession`. Every flag pi supports
|
|
133
|
+
(current or future, first-party or extension-registered) becomes reachable
|
|
134
|
+
with zero per-flag maintenance.
|
|
135
|
+
|
|
136
|
+
**Surface as first-class xt flags** (short-form convenience for the two most
|
|
137
|
+
common overrides):
|
|
138
|
+
- `--model <pattern>` — passes to pi as `--model`
|
|
139
|
+
- `--thinking <level>` — passes to pi as `--thinking`
|
|
140
|
+
|
|
141
|
+
**xt-owned (reject or override user attempts):**
|
|
142
|
+
- `--session-dir` — xt controls session locality
|
|
143
|
+
- `--name` — xt derives from branch slug
|
|
144
|
+
- `--system-prompt` — clobbers `--role`'s specialist prompt when both set (error)
|
|
145
|
+
|
|
146
|
+
**Skip / warn:**
|
|
147
|
+
- `--print, -p` — non-interactive contradicts xt pi's design
|
|
148
|
+
- `--list-models`, `--export`, `--help`, `--version`, subcommands — not launch flows
|
|
149
|
+
|
|
150
|
+
**Everything else** — passthrough via `--`.
|
|
151
|
+
|
|
152
|
+
## Implementation sketch (~10 lines)
|
|
153
|
+
|
|
154
|
+
```ts
|
|
155
|
+
// worktree-session.ts, near line 373
|
|
156
|
+
const passthroughIdx = process.argv.indexOf('--');
|
|
157
|
+
const passthroughArgs = passthroughIdx >= 0 ? process.argv.slice(passthroughIdx + 1) : [];
|
|
158
|
+
|
|
159
|
+
// commander already strips xt-owned flags; combine with surfaced overrides
|
|
160
|
+
const piArgs: string[] = [];
|
|
161
|
+
if (opts.model) piArgs.push('--model', opts.model);
|
|
162
|
+
if (opts.thinking) piArgs.push('--thinking', opts.thinking);
|
|
163
|
+
piArgs.push(...passthroughArgs);
|
|
164
|
+
|
|
165
|
+
// Guard: reject conflicts before spawn
|
|
166
|
+
if (roleName && passthroughArgs.includes('--system-prompt')) {
|
|
167
|
+
console.error(kleur.red('\n ✗ --system-prompt conflicts with --role (role owns the system prompt). Use --append-system-prompt instead.\n'));
|
|
168
|
+
process.exit(1);
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
const runtimeArgs = runtime === 'claude' ? ['--dangerously-skip-permissions'] : piArgs;
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
Decision doc only — no implementation in this PR.
|
package/docs/skills.md
CHANGED
|
@@ -36,26 +36,17 @@ User-authored skills belong in the user/active layer used by the local agent set
|
|
|
36
36
|
|
|
37
37
|
The package ships the source copies under `config/skills/`. The active `.xtrm/skills/...` files in a project may be refreshed by xtrm-tools.
|
|
38
38
|
|
|
39
|
-
### `using-specialists
|
|
39
|
+
### `using-specialists`
|
|
40
40
|
|
|
41
|
-
Location: `config/skills/using-specialists
|
|
41
|
+
Location: `config/skills/using-specialists/SKILL.md`
|
|
42
42
|
|
|
43
|
-
Canonical orchestration doctrine for substantial tracked work. It covers bead contracts, dependency graph shape, conflict-cluster mapping, advisory passes, reviewer rebuttal, debugger-restitch, E2E smoke phases, monitoring cadence,
|
|
43
|
+
Canonical orchestration doctrine for substantial tracked work. It covers bead contracts, dependency graph shape, conflict-cluster mapping, advisory passes, reviewer rebuttal, debugger-restitch, E2E smoke phases, monitoring cadence, manual publication, and session-end handoff. Use this for multi-step implementation, debugging, reviews, docs sync planning, and specialist orchestration.
|
|
44
44
|
|
|
45
45
|
### `using-specialists-auto`
|
|
46
46
|
|
|
47
47
|
Location: `config/skills/using-specialists-auto/SKILL.md`
|
|
48
48
|
|
|
49
|
-
Autonomous/offline orchestration overlay. It delegates shared mechanics to `using-specialists
|
|
50
|
-
|
|
51
|
-
### `using-specialists-v2` / `using-specialists`
|
|
52
|
-
|
|
53
|
-
Locations:
|
|
54
|
-
|
|
55
|
-
- `config/skills/using-specialists-v2/SKILL.md`
|
|
56
|
-
- `config/skills/using-specialists/SKILL.md`
|
|
57
|
-
|
|
58
|
-
Older orchestration references retained for compatibility and migration context. Prefer `using-specialists-v3` for current guidance.
|
|
49
|
+
Autonomous/offline orchestration overlay. It delegates shared mechanics to `using-specialists` and adds auto-mode pacing, per-item loop shape, escalation triggers, and unattended-run discipline.
|
|
59
50
|
|
|
60
51
|
### `sync-docs`
|
|
61
52
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jaggerxtrm/specialists",
|
|
3
|
-
"version": "3.18.
|
|
3
|
+
"version": "3.18.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
|
"types": "dist/types/lib.d.ts",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"lint": "tsc --noEmit",
|
|
46
46
|
"test": "bun --bun vitest run",
|
|
47
47
|
"test:node": "node node_modules/.bin/vitest run",
|
|
48
|
-
"test:bun": "bun test tests/unit/specialist/observability-sqlite.test.ts tests/unit/specialist/observability-db.test.ts tests/unit/cli/db.test.ts",
|
|
48
|
+
"test:bun": "bun test tests/unit/specialist/observability-sqlite.test.ts tests/unit/specialist/observability-sqlite-pr-refresh.test.ts tests/unit/specialist/observability-db.test.ts tests/unit/cli/db.test.ts",
|
|
49
49
|
"test:watch": "bun --bun vitest",
|
|
50
50
|
"test:coverage": "bun --bun vitest run --coverage",
|
|
51
51
|
"test:supervisor": "bun --bun vitest run tests/unit/specialist/supervisor.test.ts --no-file-parallelism",
|