@jaggerxtrm/specialists 3.17.0 → 3.18.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.
Files changed (246) hide show
  1. package/README.md +268 -134
  2. package/config/mandatory-rules/json-only-final-output.md +13 -0
  3. package/config/mandatory-rules/service-skills-diff-scan-mandatory.md +26 -0
  4. package/config/mandatory-rules/service-skills-gitnexus-triage.md +5 -0
  5. package/config/skills/setup-specialists/SKILL.md +556 -0
  6. package/config/skills/specialists-creator/SKILL.md +132 -4
  7. package/config/skills/specialists-creator/scripts/audit-spec-uniformity.mjs +1 -1
  8. package/config/specialists/bare.specialist.json +3 -3
  9. package/config/specialists/changelog-drafter.specialist.json +5 -4
  10. package/config/specialists/changelog-keeper.specialist.json +7 -6
  11. package/config/specialists/debugger.specialist.json +2 -2
  12. package/config/specialists/executor.specialist.json +2 -2
  13. package/config/specialists/explorer.specialist.json +4 -4
  14. package/config/specialists/memory-processor.specialist.json +3 -3
  15. package/config/specialists/node-coordinator.specialist.json +3 -3
  16. package/config/specialists/obligations-scanner.specialist.json +67 -17
  17. package/config/specialists/overthinker.specialist.json +3 -3
  18. package/config/specialists/planner.specialist.json +4 -4
  19. package/config/specialists/quant-methodologist.specialist.json +145 -0
  20. package/config/specialists/quant-researcher.specialist.json +144 -0
  21. package/config/specialists/researcher.specialist.json +5 -5
  22. package/config/specialists/reviewer.specialist.json +1 -1
  23. package/config/specialists/seconder.specialist.json +2 -2
  24. package/config/specialists/security-auditor.specialist.json +2 -2
  25. package/config/specialists/service-skills-sync.specialist.json +90 -75
  26. package/config/specialists/specialists-creator.specialist.json +4 -4
  27. package/config/specialists/sync-docs.specialist.json +4 -4
  28. package/config/specialists/test-engineer.specialist.json +3 -3
  29. package/config/specialists/test-runner.specialist.json +7 -7
  30. package/config/specialists/transcriber.specialist.json +3 -3
  31. package/config/specialists/xt-merge.specialist.json +4 -4
  32. package/dist/asset-contract.json +21 -2
  33. package/dist/index.js +25704 -16376
  34. package/dist/lib.js +9849 -6147
  35. package/dist/types/cli/console/components.d.ts +83 -0
  36. package/dist/types/cli/console/components.d.ts.map +1 -0
  37. package/dist/types/cli/console/config-source.d.ts +58 -0
  38. package/dist/types/cli/console/config-source.d.ts.map +1 -0
  39. package/dist/types/cli/console/forensic.d.ts +11 -0
  40. package/dist/types/cli/console/forensic.d.ts.map +1 -0
  41. package/dist/types/cli/console/git.d.ts +28 -0
  42. package/dist/types/cli/console/git.d.ts.map +1 -0
  43. package/dist/types/cli/console/help.d.ts +2 -0
  44. package/dist/types/cli/console/help.d.ts.map +1 -0
  45. package/dist/types/cli/console/log.d.ts +13 -0
  46. package/dist/types/cli/console/log.d.ts.map +1 -0
  47. package/dist/types/cli/console/repo-config.d.ts +26 -0
  48. package/dist/types/cli/console/repo-config.d.ts.map +1 -0
  49. package/dist/types/cli/console/repo-discovery.d.ts +12 -0
  50. package/dist/types/cli/console/repo-discovery.d.ts.map +1 -0
  51. package/dist/types/cli/console/runtime.d.ts +12 -0
  52. package/dist/types/cli/console/runtime.d.ts.map +1 -0
  53. package/dist/types/cli/console/subscribe-prototype.d.ts +18 -0
  54. package/dist/types/cli/console/subscribe-prototype.d.ts.map +1 -0
  55. package/dist/types/cli/console/theme.d.ts +91 -0
  56. package/dist/types/cli/console/theme.d.ts.map +1 -0
  57. package/dist/types/cli/console/types.d.ts +231 -0
  58. package/dist/types/cli/console/types.d.ts.map +1 -0
  59. package/dist/types/cli/console/view-model.d.ts +252 -0
  60. package/dist/types/cli/console/view-model.d.ts.map +1 -0
  61. package/dist/types/cli/console.d.ts +2 -0
  62. package/dist/types/cli/console.d.ts.map +1 -0
  63. package/dist/types/cli/db.d.ts.map +1 -1
  64. package/dist/types/cli/doctor.d.ts.map +1 -1
  65. package/dist/types/cli/edit.d.ts.map +1 -1
  66. package/dist/types/cli/epic.d.ts.map +1 -1
  67. package/dist/types/cli/feed.d.ts.map +1 -1
  68. package/dist/types/cli/forensic.d.ts +2 -0
  69. package/dist/types/cli/forensic.d.ts.map +1 -0
  70. package/dist/types/cli/format-helpers.d.ts +4 -2
  71. package/dist/types/cli/format-helpers.d.ts.map +1 -1
  72. package/dist/types/cli/help.d.ts.map +1 -1
  73. package/dist/types/cli/init.d.ts +10 -0
  74. package/dist/types/cli/init.d.ts.map +1 -1
  75. package/dist/types/cli/list.d.ts.map +1 -1
  76. package/dist/types/cli/log.d.ts.map +1 -1
  77. package/dist/types/cli/metrics.d.ts +2 -0
  78. package/dist/types/cli/metrics.d.ts.map +1 -0
  79. package/dist/types/cli/ps.d.ts.map +1 -1
  80. package/dist/types/cli/result.d.ts.map +1 -1
  81. package/dist/types/cli/run.d.ts +1 -0
  82. package/dist/types/cli/run.d.ts.map +1 -1
  83. package/dist/types/cli/script.d.ts +3 -0
  84. package/dist/types/cli/script.d.ts.map +1 -1
  85. package/dist/types/cli/serve.d.ts.map +1 -1
  86. package/dist/types/cli/setup.d.ts +19 -1
  87. package/dist/types/cli/setup.d.ts.map +1 -1
  88. package/dist/types/cli/status.d.ts.map +1 -1
  89. package/dist/types/cli/version-check.d.ts +1 -0
  90. package/dist/types/cli/version-check.d.ts.map +1 -1
  91. package/dist/types/index.d.ts +1 -1
  92. package/dist/types/pi/session.d.ts +11 -1
  93. package/dist/types/pi/session.d.ts.map +1 -1
  94. package/dist/types/server.d.ts +15 -0
  95. package/dist/types/server.d.ts.map +1 -1
  96. package/dist/types/specialist/benchmarks.d.ts +37 -0
  97. package/dist/types/specialist/benchmarks.d.ts.map +1 -0
  98. package/dist/types/specialist/chain-identity.d.ts +7 -1
  99. package/dist/types/specialist/chain-identity.d.ts.map +1 -1
  100. package/dist/types/specialist/control.d.ts.map +1 -1
  101. package/dist/types/specialist/forensic-events.d.ts +138 -0
  102. package/dist/types/specialist/forensic-events.d.ts.map +1 -0
  103. package/dist/types/specialist/forensic-renderer.d.ts +34 -0
  104. package/dist/types/specialist/forensic-renderer.d.ts.map +1 -0
  105. package/dist/types/specialist/git-diff-evidence.d.ts +28 -0
  106. package/dist/types/specialist/git-diff-evidence.d.ts.map +1 -0
  107. package/dist/types/specialist/global-config.d.ts +389 -0
  108. package/dist/types/specialist/global-config.d.ts.map +1 -0
  109. package/dist/types/specialist/launch.d.ts +1 -0
  110. package/dist/types/specialist/launch.d.ts.map +1 -1
  111. package/dist/types/specialist/live-aggregates.d.ts +46 -0
  112. package/dist/types/specialist/live-aggregates.d.ts.map +1 -0
  113. package/dist/types/specialist/loader.d.ts +50 -1
  114. package/dist/types/specialist/loader.d.ts.map +1 -1
  115. package/dist/types/specialist/model-chain.d.ts +7 -0
  116. package/dist/types/specialist/model-chain.d.ts.map +1 -0
  117. package/dist/types/specialist/model-probes.d.ts +28 -0
  118. package/dist/types/specialist/model-probes.d.ts.map +1 -0
  119. package/dist/types/specialist/node-contract.d.ts +18 -18
  120. package/dist/types/specialist/node-supervisor.d.ts.map +1 -1
  121. package/dist/types/specialist/observability-db.d.ts +1 -1
  122. package/dist/types/specialist/observability-db.d.ts.map +1 -1
  123. package/dist/types/specialist/observability-sqlite.d.ts +25 -0
  124. package/dist/types/specialist/observability-sqlite.d.ts.map +1 -1
  125. package/dist/types/specialist/preset-resolver.d.ts +56 -0
  126. package/dist/types/specialist/preset-resolver.d.ts.map +1 -0
  127. package/dist/types/specialist/prometheus-projection.d.ts +25 -0
  128. package/dist/types/specialist/prometheus-projection.d.ts.map +1 -0
  129. package/dist/types/specialist/runner.d.ts +26 -1
  130. package/dist/types/specialist/runner.d.ts.map +1 -1
  131. package/dist/types/specialist/schema.d.ts +163 -54
  132. package/dist/types/specialist/schema.d.ts.map +1 -1
  133. package/dist/types/specialist/script-runner.d.ts +5 -1
  134. package/dist/types/specialist/script-runner.d.ts.map +1 -1
  135. package/dist/types/specialist/snapshot-diff.d.ts +8 -0
  136. package/dist/types/specialist/snapshot-diff.d.ts.map +1 -0
  137. package/dist/types/specialist/source-queue.d.ts +13 -0
  138. package/dist/types/specialist/source-queue.d.ts.map +1 -0
  139. package/dist/types/specialist/supervisor.d.ts +15 -1
  140. package/dist/types/specialist/supervisor.d.ts.map +1 -1
  141. package/dist/types/specialist/timeline-events.d.ts +68 -1
  142. package/dist/types/specialist/timeline-events.d.ts.map +1 -1
  143. package/dist/types/tools/specialist/resume_specialist.tool.d.ts +4 -4
  144. package/dist/types/tools/specialist/specialist_status.tool.d.ts +1 -1
  145. package/dist/types/tools/specialist/steer_specialist.tool.d.ts +4 -4
  146. package/dist/types/tools/specialist/use_specialist.tool.d.ts +16 -16
  147. package/docs/ARCHITECTURE.md +1176 -0
  148. package/docs/TODO.md +9 -0
  149. package/docs/architecture.md +11 -0
  150. package/docs/archive/2026-03-13-bd-decision-context-template-plan.md +96 -0
  151. package/docs/archive/AGENT-HANDOFF.md +351 -0
  152. package/docs/archive/PARITY-ANALYSIS.md +296 -0
  153. package/docs/archive/SPECIALISTS_REFACTOR.md.md +30 -0
  154. package/docs/archive/cc-programmatic.md +216 -0
  155. package/docs/archive/claude-agent-sdk.md +594 -0
  156. package/docs/archive/decision-specialist-directory.md +41 -0
  157. package/docs/archive/discoveries.md +148 -0
  158. package/docs/archive/executor-benchmark-protocol.md +198 -0
  159. package/docs/archive/future-features.md +66 -0
  160. package/docs/archive/gzrx-completion-critique.md +183 -0
  161. package/docs/archive/gzrx-research-notes.md +401 -0
  162. package/docs/archive/gzrx-tool-catalog.md +760 -0
  163. package/docs/archive/iron-review-hardening-qa-chain-substrate.md +322 -0
  164. package/docs/archive/iron-review-hardening.html +1004 -0
  165. package/docs/archive/issuetracking.md +312 -0
  166. package/docs/archive/qa-v3.0.2.md +220 -0
  167. package/docs/archive/restructure.md +231 -0
  168. package/docs/archive/script-specialists.md +1254 -0
  169. package/docs/archive/spec-v3.md +792 -0
  170. package/docs/archive/specialist-stats.md +127 -0
  171. package/docs/archive/specialists-friction-audit.md +1347 -0
  172. package/docs/archive/specialists-runtime-critique.md +170 -0
  173. package/docs/archive/specialists-service-evaluation.md +713 -0
  174. package/docs/archive/specialists-substrate-alignment.md +255 -0
  175. package/docs/archive/substrate-review.md +1288 -0
  176. package/docs/archive/test-writer-specialist.md +254 -0
  177. package/docs/archive/using-specialists-v3-improvements-2026-05-09.md +600 -0
  178. package/docs/archive/xtrm-specialists-analysis.md +314 -0
  179. package/docs/authoring.md +701 -0
  180. package/docs/background-jobs.md +203 -0
  181. package/docs/bare-specialists.md +83 -0
  182. package/docs/benchmarks/executor-benchmark-runner.md +66 -0
  183. package/docs/bootstrap.md +161 -0
  184. package/docs/cli-reference.md +1645 -0
  185. package/docs/deploying-alongside.md +155 -0
  186. package/docs/design/README.md +36 -0
  187. package/docs/design/darth-feedor-migration.md +290 -0
  188. package/docs/design/roadmap/README.md +32 -0
  189. package/docs/design/roadmap/chain-templates/README.md +146 -0
  190. package/docs/design/roadmap/chain-templates/code-quick.formula.json +27 -0
  191. package/docs/design/roadmap/chain-templates/code-standard.formula.json +126 -0
  192. package/docs/design/roadmap/chain-templates/code-with-advisors.formula.json +128 -0
  193. package/docs/design/roadmap/chain-templates/code-with-tests.formula.json +76 -0
  194. package/docs/design/roadmap/chain-templates/debug.formula.json +128 -0
  195. package/docs/design/roadmap/chain-templates/doc-sync.formula.json +28 -0
  196. package/docs/design/roadmap/chain-templates/memory-hygiene.formula.json +27 -0
  197. package/docs/design/roadmap/chain-templates/planning.formula.json +27 -0
  198. package/docs/design/roadmap/chain-templates/premortem.formula.json +26 -0
  199. package/docs/design/roadmap/chain-templates/release-prep.formula.json +36 -0
  200. package/docs/design/roadmap/chain-templates/research-only.formula.json +28 -0
  201. package/docs/design/roadmap/chain-templates/restitch.formula.json +125 -0
  202. package/docs/design/roadmap/chain-templates/security-deep.formula.json +161 -0
  203. package/docs/design/roadmap/chain-templates/test-only.formula.json +52 -0
  204. package/docs/design/roadmap/chain-templates/triage.formula.json +35 -0
  205. package/docs/design/roadmap/history/handoff-from-substrate-design.md +87 -0
  206. package/docs/design/roadmap/history/substrate-reconciliation.md +105 -0
  207. package/docs/design/roadmap/specialists-roadmap.md +1193 -0
  208. package/docs/design/sp-console-subscribe-via-materializer.md +231 -0
  209. package/docs/design/sp-console-tui-mock-v2.html +293 -0
  210. package/docs/design/sp-console-tui-mock.html +120 -0
  211. package/docs/design/sp-console-tui.md +340 -0
  212. package/docs/design/specialist-agentops-suite.md +323 -0
  213. package/docs/design/substrate/channels.md +14 -0
  214. package/docs/design/substrate/devops-platform-engineering-prd.md +446 -0
  215. package/docs/design/substrate/html-design-example.md +339 -0
  216. package/docs/design/xtrm-tiers-architecture.svg +132 -0
  217. package/docs/devops/dependency-verdict-materialization.md +46 -0
  218. package/docs/epic-readiness.md +75 -0
  219. package/docs/examples/mercury-atomic-summarizer.specialist.json +26 -0
  220. package/docs/examples/smoke-echo-text-expected-keys.specialist.json +25 -0
  221. package/docs/examples/smoke-echo.specialist.json +25 -0
  222. package/docs/features.md +1577 -0
  223. package/docs/hooks.md +81 -0
  224. package/docs/installation.md +142 -0
  225. package/docs/manifest.md +184 -0
  226. package/docs/mcp-servers.md +73 -0
  227. package/docs/mcp-tools.md +71 -0
  228. package/docs/nodes.md +231 -0
  229. package/docs/observability-metrics.md +152 -0
  230. package/docs/operator/sp-console-v2-walkthrough.md +410 -0
  231. package/docs/overrides-guide.md +306 -0
  232. package/docs/pi-rpc-boundary.md +118 -0
  233. package/docs/pi-session.md +195 -0
  234. package/docs/release.md +22 -0
  235. package/docs/skills.md +132 -0
  236. package/docs/specialists/handoff-schema.md +181 -0
  237. package/docs/specialists-catalog.md +99 -0
  238. package/docs/specialists-service-install.md +226 -0
  239. package/docs/specialists-service.md +363 -0
  240. package/docs/surface-ownership.md +138 -0
  241. package/docs/upgrade-notes/kan-90-global-user-config.md +114 -0
  242. package/docs/upgrade-notes/kan-91-expanded-overrides.md +261 -0
  243. package/docs/workflow.md +114 -0
  244. package/docs/worktree.md +71 -0
  245. package/docs/worktrees.md +309 -0
  246. package/package.json +6 -3
@@ -0,0 +1,203 @@
1
+ ---
2
+ title: Background Jobs
3
+ scope: background-jobs
4
+ category: guide
5
+ version: 1.8.0
6
+ updated: 2026-06-23
7
+ synced_at: bf6baf7a
8
+ description: Supervisor-backed job model, keep-alive semantics, and monitoring commands.
9
+ source_of_truth_for:
10
+ - "src/cli/run.ts"
11
+ - "src/cli/feed.ts"
12
+ - "src/cli/chat.ts"
13
+ - "src/cli/chat/control.ts"
14
+ - "src/cli/chat/feed.ts"
15
+ - "src/cli/chat/status.ts"
16
+ - "src/cli/steer.ts"
17
+ - "src/cli/resume.ts"
18
+ - "src/specialist/supervisor.ts"
19
+ domain:
20
+ - jobs
21
+ ---
22
+
23
+ # Background Jobs
24
+
25
+ > `sp` is an alias for `specialists`.
26
+
27
+ Every `specialists run` is DB-backed in normal runtime. `.specialists/jobs/<job-id>/` remains a legacy/operator mirror for recovery and debugging.
28
+
29
+ ## Start a run
30
+
31
+ ```bash
32
+ specialists run sync-docs --bead unitAI-26s
33
+ # stderr: [job started: 49adda]
34
+ ```
35
+
36
+ `specialists run --background` spawns a detached child process that runs the full Supervisor-backed flow in its own process group. The parent prints the job id and exits immediately.
37
+
38
+ When `tmux` is installed:
39
+ - a named tmux session is created as `sp-<specialist>-<id>`
40
+ - use `specialists attach <job-id>` to attach directly to that legacy tmux session
41
+ - use `specialists list --live` for an interactive tmux session picker
42
+
43
+ For a first-class interactive TUI while launching a new specialist, use `sp chat <specialist> ...`. Chat is separate from legacy tmux attach: it owns the terminal, renders the normalized feed, shows status, and sends steer/resume messages from one prompt.
44
+
45
+ When `tmux` is not installed, the CLI falls back to detached process mode (stdio ignored, spawned with `detached: true`) and still keeps DB state canonical; file mirrors are legacy/operator-only.
46
+
47
+ Latest job id is surfaced by active-mode detection. Legacy file mirror, when enabled, may still write:
48
+
49
+ ```text
50
+ .specialists/jobs/latest
51
+ ```
52
+
53
+ ## Keep-alive sessions
54
+
55
+ ```bash
56
+ specialists run debugger --bead unitAI-abc --keep-alive
57
+ ```
58
+
59
+ You can also make keep-alive the default in specialist YAML:
60
+
61
+ ```yaml
62
+ specialist:
63
+ execution:
64
+ interactive: true
65
+ ```
66
+
67
+ After the first turn, keep-alive jobs transition to `waiting` and preserve full conversation context for future turns.
68
+
69
+ Keep-alive sessions support automatic cleanup via `waiting_auto_close_ms` in stall detection configuration. When configured (value > 0), waiting sessions automatically close after the specified silence threshold. The close attempt has a 5-second graceful timeout; if the session close hangs, forced termination is triggered.
70
+
71
+ Run-time precedence:
72
+ - `--no-keep-alive` / `no_keep_alive` forces one-shot mode
73
+ - `--keep-alive` / `keep_alive` forces keep-alive mode
74
+ - otherwise `execution.interactive` decides (default `false`)
75
+
76
+ ## Observe progress
77
+
78
+ ```bash
79
+ sp ps # actionable dashboard
80
+ sp ps -f # TTY in-place dashboard; pipes append ANSI-free snapshots
81
+ sp feed 49adda --follow # per-job follow, including future resume turns
82
+ sp feed -f # global follow; keep-alive waiting jobs are terminal-equivalent unless --forever
83
+ sp feed 49adda # compact DB-backed event replay for that job
84
+ sp log 49adda # lean runtime/control/error log; parent dirs aggregate child repo DBs
85
+ sp log --specialist reviewer -f # follow reviewer runtime logs
86
+ sp ps 49adda --json
87
+ ```
88
+
89
+ Snapshot `sp feed <job-id>` reads compact DB event history for that job. Use `sp log <job-id>` for the lean runtime/debug stream: dispatch, control signals, resume/steer consumption, stop/SIGTERM/SIGKILL, crashes, status transitions, and terminal error provenance. It intentionally excludes feed-owned agent internals by default; add `--all-events` when you need them. Legacy file mirrors, when enabled, are recovery surfaces rather than the normal source of truth.
90
+
91
+ ## Interactive chat TUI
92
+
93
+ Use `sp chat` when you want to launch a specialist and keep a live, interactive control surface open:
94
+
95
+ ```bash
96
+ sp chat explorer "map this failure"
97
+ sp chat reviewer --bead unitAI-929wj
98
+ ```
99
+
100
+ The chat feed intentionally matches `sp feed -f` formatting. It reads timeline events from SQLite first and falls back to `events.jsonl` only for recovery. It suppresses raw launch preamble/stderr noise, shows startup/payload context side-lines, dedupes repeated streaming `THINK`/`TEXT` events once per turn, and appends the final `run_complete.output` so the result is visible in the same screen.
101
+
102
+ Typed chat input uses the same FIFO as the explicit commands:
103
+
104
+ | Current status | Chat input becomes | CLI equivalent |
105
+ |---|---|---|
106
+ | `running` / `starting` | `{"type":"steer","message":"..."}` | `sp steer <job-id> "..."` |
107
+ | `waiting` | `{"type":"resume","task":"..."}` | `sp resume <job-id> "..."` |
108
+
109
+ Slash commands in chat:
110
+
111
+ - `/quit` detaches without killing the job.
112
+ - `Ctrl+C` behaves like `/quit`: it restores the terminal and detaches, but does not stop the job.
113
+ - `/stop` stops the job through the normal control path.
114
+ - `/finalize` finalizes a waiting chain/job.
115
+ - `/notes <text>` appends to the current bead.
116
+ - `/show` prints current context.
117
+
118
+ `sp attach <job-id>` is still the legacy tmux attach path. TUI attach to an already-existing job is planned separately in bead `unitAI-hx4ln`; until then, use `sp feed` + `sp steer`/`sp resume` for existing jobs that were not started by `sp chat`.
119
+
120
+ ## Read final output
121
+
122
+ ```bash
123
+ specialists result 49adda
124
+ ```
125
+
126
+ ## Steer a running job
127
+
128
+ `steer` works for **any running job** (keep-alive or not). It injects a mid-turn instruction and does not cancel the run.
129
+
130
+ ```bash
131
+ specialists steer 49adda "focus only on supervisor.ts"
132
+ specialists steer 49adda "skip tests and isolate root cause"
133
+ ```
134
+
135
+ FIFO payload:
136
+
137
+ ```json
138
+ {"type":"steer","message":"..."}
139
+ ```
140
+
141
+ ## Resume a waiting keep-alive job
142
+
143
+ `resume` is for keep-alive sessions in `waiting` state only.
144
+
145
+ ```bash
146
+ specialists resume 49adda "now write the fix"
147
+ specialists resume 49adda "add regression tests"
148
+ ```
149
+
150
+ If status is `running`, use `steer` instead.
151
+
152
+ `specialists follow-up` remains as a deprecated alias that delegates to `resume`.
153
+
154
+ ## Stop a job
155
+
156
+ ```bash
157
+ specialists stop 49adda
158
+ ```
159
+
160
+ ## Job files
161
+
162
+ ```text
163
+ .specialists/jobs/<job-id>/
164
+ ```
165
+
166
+ | File | Purpose |
167
+ |---|---|
168
+ | `status.json` | legacy/operator mirror of current state (`starting/running/waiting/done/error`), pid, model, bead_id, tmux_session? |
169
+ | `events.jsonl` | legacy/operator mirror of append-only normalized timeline |
170
+ | `result.txt` | legacy/operator mirror of final assistant output |
171
+ | `steer.pipe` | FIFO for `steer` / `resume` messages (removed on completion) |
172
+
173
+ Ready markers:
174
+
175
+ ```text
176
+ .specialists/ready/
177
+ ```
178
+
179
+ ## Stall detection thresholds
180
+
181
+ Background jobs support configurable stall detection via `specialist.stall_detection` in specialist YAML:
182
+
183
+ | Option | Default | Description |
184
+ |---|---|---|
185
+ | `running_silence_warn_ms` | 60000 | Warn when no output received during running state |
186
+ | `running_silence_error_ms` | 300000 | Error/cancel when running silence exceeds threshold |
187
+ | `waiting_stale_ms` | 3600000 | Warn when waiting job has no activity |
188
+ | `waiting_auto_close_ms` | 0 | Auto-close waiting sessions after N ms (0 = disabled) |
189
+ | `tool_duration_warn_ms` | 120000 | Warn when tool call exceeds duration |
190
+
191
+ YAML example:
192
+
193
+ ```yaml
194
+ specialist:
195
+ stall_detection:
196
+ waiting_auto_close_ms: 1800000 # Auto-close after 30 min idle
197
+ ```
198
+
199
+ ## See also
200
+
201
+ - [workflow.md](workflow.md)
202
+ - [cli-reference.md](cli-reference.md)
203
+ - [mcp-tools.md](mcp-tools.md)
@@ -0,0 +1,83 @@
1
+ ---
2
+ title: Bare Specialists
3
+ scope: authoring
4
+ category: guide
5
+ version: 1.0.0
6
+ updated: 2026-05-23
7
+ synced_at: bf6baf7a
8
+ description: How to author bare-mode specialists for non-coding LLM transforms.
9
+ source_of_truth_for:
10
+ - "config/specialists/bare.specialist.json"
11
+ - "src/specialist/runner.ts"
12
+ - "src/specialist/schema.ts"
13
+ - "config/skills/specialists-creator/SKILL.md"
14
+ domain:
15
+ - authoring
16
+ ---
17
+
18
+ # Bare Specialists
19
+
20
+ ## What bare mode is
21
+
22
+ Bare mode runs specialist prompt with runtime injections stripped away, so output starts from only `prompt.system` plus `prompt.task_template` and does not pick up package-class specialist framing.
23
+
24
+ ## When to use it
25
+
26
+ Use bare mode for non-coding LLM transforms:
27
+ - research
28
+ - summarization
29
+ - extraction
30
+ - document analysis
31
+ - translation
32
+
33
+ Do not use it for coding agents, implementation work, or specialist roles that need runtime rules, tools, or workflow framing.
34
+
35
+ ## What gets disabled
36
+
37
+ Bare mode disables these package-runner injection sites:
38
+
39
+ | Injection site | Disabled in bare mode |
40
+ |---|---|
41
+ | Specialist Run Context | yes |
42
+ | Output Style | yes |
43
+ | GitNexus mandate | yes |
44
+ | `STATIC_WORKFLOW_RULES_BLOCK` | yes |
45
+ | memory injection | yes |
46
+ | GitNexus pre-query snapshot | yes |
47
+ | reviewer patch retrieval | yes |
48
+ | output contract | yes |
49
+ | task-side mandatory rules | yes |
50
+ | reviewer diff context | yes |
51
+
52
+ ## Orthogonality with `system_prompt_mode`
53
+
54
+ | `execution.bare` | `prompt.system_prompt_mode` | Result |
55
+ |---|---|---|
56
+ | `false` | `append` | default package-class runtime; base prompt plus specialist runtime injections |
57
+ | `false` | `replace` | package-class runtime with coding-agent base prompt removed; teach all behavior explicitly |
58
+ | `true` | `append` | bare runtime; only `prompt.system` plus `prompt.task_template` matter |
59
+ | `true` | `replace` | bare runtime; same stripped surface, with base prompt removed too |
60
+
61
+ ## How to create one
62
+
63
+ Copy starter from installed npm package, not repo clone:
64
+
65
+ ```bash
66
+ cp "$(node -p \"require.resolve('@jaggerxtrm/specialists/package.json').replace(/package\\.json$/, '')\")config/specialists/bare.specialist.json" ".specialists/user/<your-name>.specialist.json"
67
+ ```
68
+
69
+ Then edit fields:
70
+ - `metadata.name` — kebab-case specialist id
71
+ - `metadata.description` — routing summary for `specialists list`
72
+ - `prompt.system` — task-specific instruction set; include every behavior bare mode will not inject
73
+
74
+ ## Verification
75
+
76
+ - `specialists list` shows your specialist
77
+ - `sp config show <name> --resolved` shows resolved tools and runtime surface
78
+ - `bun config/skills/specialists-creator/scripts/validate-specialist.ts <path>` validates schema
79
+
80
+ ## Caveats
81
+
82
+ - Bare mode bypasses `mandatory_rules` entirely; put needed rules directly in `prompt.system` text instead.
83
+ - `script-class` specialists are an alternate path for the simplest cases; see [Script-Class vs Package-Class Runtime](authoring.md#script-class-vs-package-class-runtime).
@@ -0,0 +1,66 @@
1
+ # Executor benchmark runner (unitAI-gc2a.3)
2
+
3
+ ## One-command launch
4
+
5
+ ```bash
6
+ node scripts/run-executor-benchmark.mjs --run-id unitAI-gc2a-r1
7
+ ```
8
+
9
+ Default matrix source: `config/benchmarks/executor-benchmark-matrix.json`.
10
+
11
+ ## Deterministic matrix order
12
+
13
+ Runner expands queue in fixed order:
14
+ 1. Task order from `tasks[]`
15
+ 2. Model order from `models[]`
16
+ 3. Replicate fixed at `1`
17
+
18
+ Current matrix size: `3 tasks × 4 models × 1 rep = 12 runs`.
19
+
20
+ ## Isolation strategy (no cross-run contamination)
21
+
22
+ Per sample runner creates fresh benchmark bead cloned from seed bead content.
23
+ That bead gets unique title with run id + model id.
24
+ Executor always runs with `--worktree` on that benchmark bead.
25
+ Reviewer always runs with `--job <executor-job-id>` on same benchmark bead.
26
+
27
+ Guardrail before reviewer dispatch:
28
+ - runner checks worktree has commit diff vs `origin/main`
29
+ - if no diff / stale state, reviewer skipped, sample marked failed (`stale_or_empty_diff`)
30
+
31
+ ## Artifacts
32
+
33
+ Output root: `.specialists/benchmarks/runs/<run-id>/`
34
+
35
+ - `manifest.json` — immutable sample plan for run id
36
+ - `attempts.jsonl` — append-only rows, one row per attempt
37
+ - `summary.json` — machine summary
38
+ - `summary.md` — human summary table
39
+
40
+ Each `attempts.jsonl` row includes:
41
+ - `model_id`
42
+ - `task_id`
43
+ - `run_number`
44
+ - `executor_job_id`
45
+ - `reviewer_job_id`
46
+ - `status`
47
+ - lint/tsc/verdict + token/cost/elapsed fields
48
+
49
+ ## Rerun failed samples only
50
+
51
+ ```bash
52
+ node scripts/run-executor-benchmark.mjs --run-id unitAI-gc2a-r1 --rerun-failed
53
+ ```
54
+
55
+ Runner reads `manifest.json` + `attempts.jsonl`.
56
+ Only samples whose latest status != `success` re-queued.
57
+ Completed success samples remain untouched. Rows append-only for audit trail.
58
+
59
+ ## Lint + tsc recording policy
60
+
61
+ Executor workflow rule forbids full test suite in harness runs.
62
+ Runner records lint/tsc from reviewer output parsing:
63
+ - `lint_pass|lint`
64
+ - `tsc_pass|tsc --noEmit`
65
+
66
+ This aligns with benchmark protocol confounder control (`supervisor.test.ts` hang risk).
@@ -0,0 +1,161 @@
1
+ ---
2
+ title: Specialists Bootstrap
3
+ scope: bootstrap
4
+ category: guide
5
+ version: 1.6.1
6
+ updated: 2026-06-24
7
+ synced_at: bf6baf7a
8
+ description: Project bootstrap and installation flow for Specialists.
9
+ source_of_truth_for:
10
+ - "src/cli/init.ts"
11
+ - ".mcp.json"
12
+ - "AGENTS.md"
13
+ - "CLAUDE.md"
14
+ domain:
15
+ - bootstrap
16
+ - mcp
17
+ ---
18
+
19
+ <!-- INDEX: auto-generated by validate_doc.py — do not edit manually -->
20
+ | Section | Summary |
21
+ |---|---|
22
+ | [Install](#install) | From the project root: |
23
+ | [Bootstrap a project](#bootstrap-a-project) | From the project root: |
24
+ | [Force-refresh workflow instructions](#force-refresh-workflow-instructions) | If `AGENTS |
25
+ | [Specialists Workflow](#specialists-workflow) | _no summary_ |
26
+ | [Directory structure](#directory-structure) | Specialists live in ` |
27
+ | [Verify bootstrap](#verify-bootstrap) | Run `specialists status`, `doctor`, `list` to verify install. |
28
+ | [Deprecated commands](#deprecated-commands) | These commands are migration shims only: |
29
+ | [See also](#see-also) | - [workflow |
30
+ <!-- END INDEX -->
31
+
32
+ # Specialists Bootstrap
33
+
34
+ > **Alias:** `sp` is a shorter alias for `specialists` — `sp run`, `sp list`, `sp feed` etc. work identically.
35
+
36
+ `specialists init` is the **sole** project bootstrap command. `specialists init --global` manages a separate XDG-aware global override layer in `~/.config/specialists/user.json`.
37
+
38
+ Specialists is built on the **[pi coding agent](https://github.com/earendil-works/pi-coding-agent)** and is designed to run alongside **[xtrm-tools](https://github.com/Jaggerxtrm/xtrm-tools)**. pi provides the multi-provider execution layer, lifecycle events, and RPC protocol; xtrm-tools provides the surrounding worktree/session workflow and hook environment. Specialists bootstraps the project-local specialist runtime, workflow instructions, and MCP registration on top of that stack.
39
+
40
+ ## Prerequisites
41
+
42
+ `specialists init` requires `xt` CLI and a local `.xtrm/` directory. See [docs/installation.md](installation.md) for ordered install steps and runtime-prerequisite details.
43
+
44
+ ## Install
45
+
46
+ ```bash
47
+ npm install -g @jaggerxtrm/specialists
48
+ ```
49
+
50
+ ## Bootstrap a project
51
+
52
+ > **Human-only command.** `specialists init` detects agent sessions (missing TTY, `PI_SESSION_ID`, `PI_RPC_SOCKET`, `SPECIALISTS_JOB_ID`, etc.) and exits with an error. Run it yourself from an interactive terminal — do not invoke it from scripts, hooks, or agent sessions.
53
+
54
+ ```bash
55
+ specialists init
56
+ ```
57
+
58
+ What it does (always safe, idempotent):
59
+
60
+ 1. creates `.specialists/default/` (managed mirror root) and `.specialists/user/` (repo custom layer)
61
+ 2. creates runtime dirs `.specialists/jobs/`, `.specialists/ready/`, `.specialists/db/` (observability.db is canonical runtime store)
62
+ 3. adds runtime/db paths to `.gitignore`:
63
+ - `.specialists/jobs/`
64
+ - `.specialists/ready/`
65
+ - `.specialists/db/*.db` / `*.db-wal` / `*.db-shm`
66
+ 4. injects Specialists section into `AGENTS.md`
67
+ 5. registers Specialists in `.mcp.json`
68
+ 6. installs canonical hooks into `.xtrm/hooks/specialists/`, then symlinks `.claude/hooks/*`
69
+ 7. wires hook commands in `.claude/settings.json`
70
+ 8. installs canonical skills into `.xtrm/skills/default/`, verifies `.xtrm/skills/active/` symlinks, and ensures `.claude/skills` + `.pi/skills` root symlinks
71
+ 9. runs full FTS memory cache sync from `bd memories` (non-fatal if unavailable)
72
+
73
+ ## Global override layer
74
+
75
+ ```bash
76
+ specialists init --global
77
+ specialists edit --global <name>.execution.model <value>
78
+ ```
79
+
80
+ `--global` manages `~/.config/specialists/user.json`, seeds every shipped specialist with override-allowed defaults, and preserves user-filled values on rerun. It does not bootstrap a repo or touch `.specialists/default/`.
81
+
82
+ ## Package-canonical defaults and drift repair
83
+
84
+ Current installs resolve Category A runtime assets from the installed package by default. New repositories do **not** need a committed `.specialists/default/` mirror.
85
+
86
+ Use `.specialists/default/` only for intentional pins or compatibility snapshots. `sp init --sync-defaults` still exists, but it is deprecated because it creates repo-local snapshots that drift from package-canonical assets.
87
+
88
+ Preferred drift workflow:
89
+
90
+ ```bash
91
+ sp doctor --check-drift
92
+ sp prune-stale-defaults --dry-run
93
+ sp prune-stale-defaults
94
+ ```
95
+
96
+ Use `--keep-diverged` only when you intentionally want to preserve a diverged default snapshot. Put normal customizations in `.specialists/user/` instead.
97
+
98
+ > **Human-only.** `specialists init` remains an interactive bootstrap command. Agents should not invoke plain `sp init` or compatibility flags from scripts/hooks.
99
+
100
+ ## Directory structure
101
+
102
+ Specialists live in `.specialists/` in the project root. Skills and hooks are project-local for Claude Code and pi.
103
+
104
+ ```
105
+ .claude/
106
+ ├── hooks/ # symlinks -> .xtrm/hooks/specialists/*.mjs
107
+ ├── settings.json # hook wiring (settings.hooks)
108
+ └── skills -> ../.xtrm/skills/active
109
+
110
+ .pi/
111
+ └── skills -> ../.xtrm/skills/active
112
+
113
+ .xtrm/
114
+ ├── hooks/specialists/ # canonical specialist hooks
115
+ └── skills/
116
+ ├── default/ # canonical specialist skills mirror
117
+ └── active/ # active symlinks to default/*
118
+
119
+ .specialists/
120
+ ├── default/ # managed mirror (specialists, mandatory-rules, nodes)
121
+ ├── user/ # repo-owned custom specialists
122
+ ├── db/ # runtime db (gitignored)
123
+ ├── jobs/ # runtime (gitignored)
124
+ └── ready/ # runtime (gitignored)
125
+ ```
126
+
127
+ Add custom specialists to `.specialists/user/`.
128
+
129
+ ## Managed mirror guidance
130
+
131
+ - Treat `.specialists/default/` as optional pin/compatibility state, not the normal install source.
132
+ - Do not hand-edit files under `.specialists/default/`.
133
+ - For custom behavior use `.specialists/user/` (specialists) or `config/nodes/` (nodes).
134
+ - Reconcile drift with `sp doctor --check-drift` and `sp prune-stale-defaults`; use `--keep-diverged` only for intentional pins.
135
+
136
+ ## Explicit non-goal
137
+
138
+ This bootstrap/migration contract does not change backlog-clean behavior or ownership.
139
+
140
+ ## Verify bootstrap
141
+
142
+ ```bash
143
+ specialists status
144
+ specialists doctor
145
+ specialists list
146
+ ```
147
+
148
+ ## Deprecated commands
149
+
150
+ These commands are migration shims only:
151
+
152
+ - `specialists setup`
153
+ - `specialists install`
154
+
155
+ They show deprecation warnings and redirect users to `specialists init`.
156
+
157
+ ## See also
158
+
159
+ - [workflow.md](workflow.md)
160
+ - [mcp-servers.md](mcp-servers.md)
161
+ - [hooks.md](hooks.md)