@jaggerxtrm/specialists 3.16.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 (257) hide show
  1. package/README.md +268 -132
  2. package/config/mandatory-rules/json-only-final-output.md +13 -0
  3. package/config/mandatory-rules/research-tool-routing.md +4 -0
  4. package/config/mandatory-rules/service-skills-diff-scan-mandatory.md +26 -0
  5. package/config/mandatory-rules/service-skills-gitnexus-triage.md +5 -0
  6. package/config/mandatory-rules/test-runner-execution-scope.md +1 -1
  7. package/config/skills/setup-specialists/SKILL.md +556 -0
  8. package/config/skills/specialists-creator/SKILL.md +160 -5
  9. package/config/skills/specialists-creator/scripts/audit-spec-uniformity.mjs +1 -1
  10. package/config/skills/using-specialists-auto/SKILL.md +1 -1
  11. package/config/skills/using-specialists-v2/SKILL.md +7 -7
  12. package/config/skills/using-specialists-v3/SKILL.md +223 -147
  13. package/config/specialists/bare.specialist.json +3 -3
  14. package/config/specialists/changelog-drafter.specialist.json +9 -6
  15. package/config/specialists/changelog-keeper.specialist.json +10 -7
  16. package/config/specialists/debugger.specialist.json +8 -6
  17. package/config/specialists/executor.specialist.json +9 -7
  18. package/config/specialists/explorer.specialist.json +8 -6
  19. package/config/specialists/memory-processor.specialist.json +7 -5
  20. package/config/specialists/node-coordinator.specialist.json +7 -5
  21. package/config/specialists/obligations-scanner.specialist.json +149 -0
  22. package/config/specialists/overthinker.specialist.json +7 -5
  23. package/config/specialists/planner.specialist.json +8 -6
  24. package/config/specialists/quant-methodologist.specialist.json +145 -0
  25. package/config/specialists/quant-researcher.specialist.json +144 -0
  26. package/config/specialists/researcher.specialist.json +14 -9
  27. package/config/specialists/reviewer.specialist.json +11 -9
  28. package/config/specialists/seconder.specialist.json +170 -0
  29. package/config/specialists/security-auditor.specialist.json +6 -4
  30. package/config/specialists/service-skills-sync.specialist.json +93 -0
  31. package/config/specialists/specialists-creator.specialist.json +9 -7
  32. package/config/specialists/sync-docs.specialist.json +6 -4
  33. package/config/specialists/test-engineer.specialist.json +134 -0
  34. package/config/specialists/test-runner.specialist.json +11 -9
  35. package/config/specialists/transcriber.specialist.json +59 -0
  36. package/config/specialists/xt-merge.specialist.json +7 -5
  37. package/dist/asset-contract.json +39 -8
  38. package/dist/index.js +37083 -26912
  39. package/dist/lib.js +9850 -6147
  40. package/dist/types/cli/console/components.d.ts +83 -0
  41. package/dist/types/cli/console/components.d.ts.map +1 -0
  42. package/dist/types/cli/console/config-source.d.ts +58 -0
  43. package/dist/types/cli/console/config-source.d.ts.map +1 -0
  44. package/dist/types/cli/console/forensic.d.ts +11 -0
  45. package/dist/types/cli/console/forensic.d.ts.map +1 -0
  46. package/dist/types/cli/console/git.d.ts +28 -0
  47. package/dist/types/cli/console/git.d.ts.map +1 -0
  48. package/dist/types/cli/console/help.d.ts +2 -0
  49. package/dist/types/cli/console/help.d.ts.map +1 -0
  50. package/dist/types/cli/console/log.d.ts +13 -0
  51. package/dist/types/cli/console/log.d.ts.map +1 -0
  52. package/dist/types/cli/console/repo-config.d.ts +26 -0
  53. package/dist/types/cli/console/repo-config.d.ts.map +1 -0
  54. package/dist/types/cli/console/repo-discovery.d.ts +12 -0
  55. package/dist/types/cli/console/repo-discovery.d.ts.map +1 -0
  56. package/dist/types/cli/console/runtime.d.ts +12 -0
  57. package/dist/types/cli/console/runtime.d.ts.map +1 -0
  58. package/dist/types/cli/console/subscribe-prototype.d.ts +18 -0
  59. package/dist/types/cli/console/subscribe-prototype.d.ts.map +1 -0
  60. package/dist/types/cli/console/theme.d.ts +91 -0
  61. package/dist/types/cli/console/theme.d.ts.map +1 -0
  62. package/dist/types/cli/console/types.d.ts +231 -0
  63. package/dist/types/cli/console/types.d.ts.map +1 -0
  64. package/dist/types/cli/console/view-model.d.ts +252 -0
  65. package/dist/types/cli/console/view-model.d.ts.map +1 -0
  66. package/dist/types/cli/console.d.ts +2 -0
  67. package/dist/types/cli/console.d.ts.map +1 -0
  68. package/dist/types/cli/db.d.ts.map +1 -1
  69. package/dist/types/cli/doctor.d.ts.map +1 -1
  70. package/dist/types/cli/edit.d.ts.map +1 -1
  71. package/dist/types/cli/epic.d.ts.map +1 -1
  72. package/dist/types/cli/feed.d.ts.map +1 -1
  73. package/dist/types/cli/forensic.d.ts +2 -0
  74. package/dist/types/cli/forensic.d.ts.map +1 -0
  75. package/dist/types/cli/format-helpers.d.ts +4 -2
  76. package/dist/types/cli/format-helpers.d.ts.map +1 -1
  77. package/dist/types/cli/help.d.ts.map +1 -1
  78. package/dist/types/cli/init.d.ts +10 -0
  79. package/dist/types/cli/init.d.ts.map +1 -1
  80. package/dist/types/cli/list.d.ts.map +1 -1
  81. package/dist/types/cli/log.d.ts +2 -0
  82. package/dist/types/cli/log.d.ts.map +1 -0
  83. package/dist/types/cli/metrics.d.ts +2 -0
  84. package/dist/types/cli/metrics.d.ts.map +1 -0
  85. package/dist/types/cli/ps.d.ts.map +1 -1
  86. package/dist/types/cli/result.d.ts.map +1 -1
  87. package/dist/types/cli/resume.d.ts.map +1 -1
  88. package/dist/types/cli/run.d.ts +1 -0
  89. package/dist/types/cli/run.d.ts.map +1 -1
  90. package/dist/types/cli/script.d.ts +3 -0
  91. package/dist/types/cli/script.d.ts.map +1 -1
  92. package/dist/types/cli/serve.d.ts.map +1 -1
  93. package/dist/types/cli/setup.d.ts +19 -1
  94. package/dist/types/cli/setup.d.ts.map +1 -1
  95. package/dist/types/cli/status.d.ts.map +1 -1
  96. package/dist/types/cli/steer.d.ts.map +1 -1
  97. package/dist/types/cli/version-check.d.ts +1 -0
  98. package/dist/types/cli/version-check.d.ts.map +1 -1
  99. package/dist/types/index.d.ts +1 -1
  100. package/dist/types/pi/session.d.ts +11 -1
  101. package/dist/types/pi/session.d.ts.map +1 -1
  102. package/dist/types/server.d.ts +15 -0
  103. package/dist/types/server.d.ts.map +1 -1
  104. package/dist/types/specialist/benchmarks.d.ts +37 -0
  105. package/dist/types/specialist/benchmarks.d.ts.map +1 -0
  106. package/dist/types/specialist/chain-identity.d.ts +7 -1
  107. package/dist/types/specialist/chain-identity.d.ts.map +1 -1
  108. package/dist/types/specialist/control.d.ts.map +1 -1
  109. package/dist/types/specialist/forensic-events.d.ts +138 -0
  110. package/dist/types/specialist/forensic-events.d.ts.map +1 -0
  111. package/dist/types/specialist/forensic-renderer.d.ts +34 -0
  112. package/dist/types/specialist/forensic-renderer.d.ts.map +1 -0
  113. package/dist/types/specialist/git-diff-evidence.d.ts +28 -0
  114. package/dist/types/specialist/git-diff-evidence.d.ts.map +1 -0
  115. package/dist/types/specialist/global-config.d.ts +389 -0
  116. package/dist/types/specialist/global-config.d.ts.map +1 -0
  117. package/dist/types/specialist/job-file-output.d.ts +2 -0
  118. package/dist/types/specialist/job-file-output.d.ts.map +1 -1
  119. package/dist/types/specialist/launch.d.ts +1 -0
  120. package/dist/types/specialist/launch.d.ts.map +1 -1
  121. package/dist/types/specialist/live-aggregates.d.ts +46 -0
  122. package/dist/types/specialist/live-aggregates.d.ts.map +1 -0
  123. package/dist/types/specialist/loader.d.ts +50 -1
  124. package/dist/types/specialist/loader.d.ts.map +1 -1
  125. package/dist/types/specialist/model-chain.d.ts +7 -0
  126. package/dist/types/specialist/model-chain.d.ts.map +1 -0
  127. package/dist/types/specialist/model-probes.d.ts +28 -0
  128. package/dist/types/specialist/model-probes.d.ts.map +1 -0
  129. package/dist/types/specialist/node-contract.d.ts +18 -18
  130. package/dist/types/specialist/node-supervisor.d.ts.map +1 -1
  131. package/dist/types/specialist/observability-db.d.ts +1 -1
  132. package/dist/types/specialist/observability-db.d.ts.map +1 -1
  133. package/dist/types/specialist/observability-sqlite.d.ts +25 -0
  134. package/dist/types/specialist/observability-sqlite.d.ts.map +1 -1
  135. package/dist/types/specialist/preset-resolver.d.ts +56 -0
  136. package/dist/types/specialist/preset-resolver.d.ts.map +1 -0
  137. package/dist/types/specialist/prometheus-projection.d.ts +25 -0
  138. package/dist/types/specialist/prometheus-projection.d.ts.map +1 -0
  139. package/dist/types/specialist/runner.d.ts +29 -1
  140. package/dist/types/specialist/runner.d.ts.map +1 -1
  141. package/dist/types/specialist/schema.d.ts +181 -63
  142. package/dist/types/specialist/schema.d.ts.map +1 -1
  143. package/dist/types/specialist/script-runner.d.ts +5 -1
  144. package/dist/types/specialist/script-runner.d.ts.map +1 -1
  145. package/dist/types/specialist/snapshot-diff.d.ts +8 -0
  146. package/dist/types/specialist/snapshot-diff.d.ts.map +1 -0
  147. package/dist/types/specialist/source-queue.d.ts +13 -0
  148. package/dist/types/specialist/source-queue.d.ts.map +1 -0
  149. package/dist/types/specialist/supervisor.d.ts +39 -2
  150. package/dist/types/specialist/supervisor.d.ts.map +1 -1
  151. package/dist/types/specialist/timeline-events.d.ts +88 -2
  152. package/dist/types/specialist/timeline-events.d.ts.map +1 -1
  153. package/dist/types/tools/specialist/resume_specialist.tool.d.ts +4 -4
  154. package/dist/types/tools/specialist/specialist_status.tool.d.ts +1 -1
  155. package/dist/types/tools/specialist/steer_specialist.tool.d.ts +4 -4
  156. package/dist/types/tools/specialist/use_specialist.tool.d.ts +16 -16
  157. package/docs/ARCHITECTURE.md +1176 -0
  158. package/docs/TODO.md +9 -0
  159. package/docs/architecture.md +11 -0
  160. package/docs/archive/2026-03-13-bd-decision-context-template-plan.md +96 -0
  161. package/docs/archive/AGENT-HANDOFF.md +351 -0
  162. package/docs/archive/PARITY-ANALYSIS.md +296 -0
  163. package/docs/archive/SPECIALISTS_REFACTOR.md.md +30 -0
  164. package/docs/archive/cc-programmatic.md +216 -0
  165. package/docs/archive/claude-agent-sdk.md +594 -0
  166. package/docs/archive/decision-specialist-directory.md +41 -0
  167. package/docs/archive/discoveries.md +148 -0
  168. package/docs/archive/executor-benchmark-protocol.md +198 -0
  169. package/docs/archive/future-features.md +66 -0
  170. package/docs/archive/gzrx-completion-critique.md +183 -0
  171. package/docs/archive/gzrx-research-notes.md +401 -0
  172. package/docs/archive/gzrx-tool-catalog.md +760 -0
  173. package/docs/archive/iron-review-hardening-qa-chain-substrate.md +322 -0
  174. package/docs/archive/iron-review-hardening.html +1004 -0
  175. package/docs/archive/issuetracking.md +312 -0
  176. package/docs/archive/qa-v3.0.2.md +220 -0
  177. package/docs/archive/restructure.md +231 -0
  178. package/docs/archive/script-specialists.md +1254 -0
  179. package/docs/archive/spec-v3.md +792 -0
  180. package/docs/archive/specialist-stats.md +127 -0
  181. package/docs/archive/specialists-friction-audit.md +1347 -0
  182. package/docs/archive/specialists-runtime-critique.md +170 -0
  183. package/docs/archive/specialists-service-evaluation.md +713 -0
  184. package/docs/archive/specialists-substrate-alignment.md +255 -0
  185. package/docs/archive/substrate-review.md +1288 -0
  186. package/docs/archive/test-writer-specialist.md +254 -0
  187. package/docs/archive/using-specialists-v3-improvements-2026-05-09.md +600 -0
  188. package/docs/archive/xtrm-specialists-analysis.md +314 -0
  189. package/docs/authoring.md +701 -0
  190. package/docs/background-jobs.md +203 -0
  191. package/docs/bare-specialists.md +83 -0
  192. package/docs/benchmarks/executor-benchmark-runner.md +66 -0
  193. package/docs/bootstrap.md +161 -0
  194. package/docs/cli-reference.md +1645 -0
  195. package/docs/deploying-alongside.md +155 -0
  196. package/docs/design/README.md +36 -0
  197. package/docs/design/darth-feedor-migration.md +290 -0
  198. package/docs/design/roadmap/README.md +32 -0
  199. package/docs/design/roadmap/chain-templates/README.md +146 -0
  200. package/docs/design/roadmap/chain-templates/code-quick.formula.json +27 -0
  201. package/docs/design/roadmap/chain-templates/code-standard.formula.json +126 -0
  202. package/docs/design/roadmap/chain-templates/code-with-advisors.formula.json +128 -0
  203. package/docs/design/roadmap/chain-templates/code-with-tests.formula.json +76 -0
  204. package/docs/design/roadmap/chain-templates/debug.formula.json +128 -0
  205. package/docs/design/roadmap/chain-templates/doc-sync.formula.json +28 -0
  206. package/docs/design/roadmap/chain-templates/memory-hygiene.formula.json +27 -0
  207. package/docs/design/roadmap/chain-templates/planning.formula.json +27 -0
  208. package/docs/design/roadmap/chain-templates/premortem.formula.json +26 -0
  209. package/docs/design/roadmap/chain-templates/release-prep.formula.json +36 -0
  210. package/docs/design/roadmap/chain-templates/research-only.formula.json +28 -0
  211. package/docs/design/roadmap/chain-templates/restitch.formula.json +125 -0
  212. package/docs/design/roadmap/chain-templates/security-deep.formula.json +161 -0
  213. package/docs/design/roadmap/chain-templates/test-only.formula.json +52 -0
  214. package/docs/design/roadmap/chain-templates/triage.formula.json +35 -0
  215. package/docs/design/roadmap/history/handoff-from-substrate-design.md +87 -0
  216. package/docs/design/roadmap/history/substrate-reconciliation.md +105 -0
  217. package/docs/design/roadmap/specialists-roadmap.md +1193 -0
  218. package/docs/design/sp-console-subscribe-via-materializer.md +231 -0
  219. package/docs/design/sp-console-tui-mock-v2.html +293 -0
  220. package/docs/design/sp-console-tui-mock.html +120 -0
  221. package/docs/design/sp-console-tui.md +340 -0
  222. package/docs/design/specialist-agentops-suite.md +323 -0
  223. package/docs/design/substrate/channels.md +14 -0
  224. package/docs/design/substrate/devops-platform-engineering-prd.md +446 -0
  225. package/docs/design/substrate/html-design-example.md +339 -0
  226. package/docs/design/xtrm-tiers-architecture.svg +132 -0
  227. package/docs/devops/dependency-verdict-materialization.md +46 -0
  228. package/docs/epic-readiness.md +75 -0
  229. package/docs/examples/mercury-atomic-summarizer.specialist.json +26 -0
  230. package/docs/examples/smoke-echo-text-expected-keys.specialist.json +25 -0
  231. package/docs/examples/smoke-echo.specialist.json +25 -0
  232. package/docs/features.md +1577 -0
  233. package/docs/hooks.md +81 -0
  234. package/docs/installation.md +142 -0
  235. package/docs/manifest.md +184 -0
  236. package/docs/mcp-servers.md +73 -0
  237. package/docs/mcp-tools.md +71 -0
  238. package/docs/nodes.md +231 -0
  239. package/docs/observability-metrics.md +152 -0
  240. package/docs/operator/sp-console-v2-walkthrough.md +410 -0
  241. package/docs/overrides-guide.md +306 -0
  242. package/docs/pi-rpc-boundary.md +118 -0
  243. package/docs/pi-session.md +195 -0
  244. package/docs/release.md +22 -0
  245. package/docs/skills.md +132 -0
  246. package/docs/specialists/handoff-schema.md +181 -0
  247. package/docs/specialists-catalog.md +99 -0
  248. package/docs/specialists-service-install.md +226 -0
  249. package/docs/specialists-service.md +363 -0
  250. package/docs/surface-ownership.md +138 -0
  251. package/docs/upgrade-notes/kan-90-global-user-config.md +114 -0
  252. package/docs/upgrade-notes/kan-91-expanded-overrides.md +261 -0
  253. package/docs/workflow.md +114 -0
  254. package/docs/worktree.md +71 -0
  255. package/docs/worktrees.md +309 -0
  256. package/package.json +17 -12
  257. package/config/specialists/code-sanity.specialist.json +0 -108
package/docs/hooks.md ADDED
@@ -0,0 +1,81 @@
1
+ ---
2
+ title: Hooks Reference
3
+ scope: hooks
4
+ category: reference
5
+ version: 1.2.0
6
+ updated: 2026-03-23
7
+ description: Bundled Specialists hooks and their runtime behavior.
8
+ source_of_truth_for:
9
+ - "hooks/specialists-complete.mjs"
10
+ - "hooks/specialists-session-start.mjs"
11
+ domain:
12
+ - hooks
13
+ ---
14
+
15
+ <!-- INDEX: auto-generated by validate_doc.py — do not edit manually -->
16
+ | Section | Summary |
17
+ |---|---|
18
+ | [Hook inventory](#hook-inventory) | | Hook | Event | Purpose | |
19
+ | [`specialists-complete.mjs`](#specialists-completemjs) | Behavior: |
20
+ | [`specialists-session-start.mjs`](#specialists-session-startmjs) | Behavior: |
21
+ | [Installation notes](#installation-notes) | The current canonical bootstrap is `specialists init` |
22
+ | [Beads hooks](#beads-hooks) | Beads workflow enforcement hooks are owned outside this package |
23
+ | [See also](#see-also) | - [workflow |
24
+ <!-- END INDEX -->
25
+
26
+ # Hooks Reference
27
+
28
+ This package bundles hook scripts used by Specialists-aware environments.
29
+
30
+ Specialists works alongside **[xtrm-tools](https://github.com/Jaggerxtrm/xtrm-tools)**. Specialists owns only its specialist-specific hooks; xtrm-tools owns the broader beads/workflow enforcement hook layer.
31
+
32
+ ## Hook inventory
33
+
34
+ | Hook | Event | Purpose |
35
+ |---|---|---|
36
+ | `specialists-complete.mjs` | `UserPromptSubmit` | inject background completion banners |
37
+ | `specialists-session-start.mjs` | `SessionStart` | inject active jobs, available specialists, and workflow reminders |
38
+
39
+ ## `specialists-complete.mjs`
40
+
41
+ Behavior:
42
+
43
+ - scans `.specialists/ready/` for completion markers
44
+ - reads job metadata from `status.json`
45
+ - injects a completion banner for finished jobs
46
+ - removes the marker after injection
47
+
48
+ ## `specialists-session-start.mjs`
49
+
50
+ Behavior:
51
+
52
+ - lists active background jobs
53
+ - lists available project specialists
54
+ - injects a concise bead-first workflow reminder:
55
+ - `--bead` for tracked work
56
+ - `--prompt` for ad-hoc work
57
+ - `--context-depth` default
58
+ - `--no-beads` semantics
59
+
60
+ ## Installation notes
61
+
62
+ Hook distribution is Category B: hook files and `.claude/settings.json` wiring must exist on disk, so xtrm-tools owns the managed mirror under `.xtrm/hooks/default/` and refreshes it with `xt update`.
63
+
64
+ Use:
65
+
66
+ ```bash
67
+ xt doctor --cwd <repo> --json
68
+ xt update --repo <repo> --apply
69
+ ```
70
+
71
+ `specialists init` still manages specialists-specific runtime dirs, MCP registration, and specialists hook wiring. Use `specialists doctor` for runtime health; use `xt doctor` / `xt update` for xtrm-managed hook drift.
72
+
73
+ ## Beads hooks
74
+
75
+ Beads workflow enforcement hooks are owned outside this package. Specialists focuses on specialist execution and workflow guidance.
76
+
77
+ ## See also
78
+
79
+ - [workflow.md](workflow.md)
80
+ - [background-jobs.md](background-jobs.md)
81
+ - [bootstrap.md](bootstrap.md)
@@ -0,0 +1,142 @@
1
+ ---
2
+ title: Installation and Distribution
3
+ scope: installation
4
+ category: guide
5
+ version: 1.0.2
6
+ updated: 2026-06-24
7
+ synced_at: 833bc435
8
+ description: Canonical-from-package install model, global user config, user overlays, and managed xtrm assets.
9
+ source_of_truth_for:
10
+ - package.json
11
+ - src/specialist/canonical-asset-resolver.ts
12
+ - src/cli/init.ts
13
+ - docs/skills.md
14
+ - docs/hooks.md
15
+ domain:
16
+ - installation
17
+ - distribution
18
+ ---
19
+
20
+ # Installation and Distribution
21
+
22
+ ## Runtime requirement: Bun
23
+
24
+ Specialists is Bun-only. Require Bun >= 1.0.0 before installing or running the package.
25
+
26
+ Verify:
27
+
28
+ ```bash
29
+ bun --version
30
+ ```
31
+
32
+ Install Bun if missing:
33
+
34
+ ```bash
35
+ curl -fsSL https://bun.sh/install | bash
36
+ ```
37
+
38
+
39
+ Specialists now uses a two-category distribution model. Install or upgrade the npm package to choose the canonical Specialist runtime version; do not copy default files into every repository as the normal path.
40
+
41
+ ## Prerequisites and install order
42
+
43
+ Specialists uses xtrm-tools as a runtime prerequisite, not a normal npm dependency. Keep it installed separately so `specialists init` can verify `xt` and manage `.xtrm/`.
44
+
45
+ Ordered install flow:
46
+
47
+ 1. Install Bun.
48
+ 2. Install xtrm-tools globally: `npm install -g xtrm-tools`
49
+ 3. Run `xt install`
50
+ 4. Run `xt init` in this repo
51
+ 5. Install Specialists: `npm install -g @jaggerxtrm/specialists`
52
+ 6. Run `sp init --global` if you want machine-level user config
53
+ 7. Run `sp init`
54
+
55
+ Category A and bootstrap note:
56
+ - `sp list`, `sp doctor --check-drift`, and `sp prune-stale-defaults` are Category A commands.
57
+ - They do not require `xt` or `.xtrm/`.
58
+
59
+ ### Naming and prerequisite policy
60
+
61
+ - Specialists ships as the scoped package `@jaggerxtrm/specialists`. Binaries: `specialists` and `sp` (alias).
62
+ - xtrm-tools is a separate published package; the canonical name is `xtrm-tools` and its CLI is `xt`.
63
+ - Specialists does NOT declare xtrm-tools as a normal dependency, devDependency, or peerDependency. It is recorded as a runtime prerequisite in the underscore-prefixed `_runtime_prerequisites` field in `package.json` (npm ignores underscore-prefixed top-level fields), and enforced at runtime by `sp init` via `assertXtrmPrerequisites` in `src/cli/init.ts`.
64
+ - `sp init --global` sets up machine-level user config. Use it once per operator account when you want shared personal defaults; plain `sp init` stays repo-local.
65
+ - Rationale: a normal/peer dependency on xtrm-tools would couple specialists publishes to xtrm-tools version cuts and risk transitive-bin ambiguity. Operators install both packages globally; `xt --version` is the source of truth for xtrm CLI presence.
66
+ - Migration: legacy installs that depended on `xtrm-tools` transitively should switch to explicit global install per the ordered flow above.
67
+
68
+ GitHub CI now includes a package-payload smoke gate that packs the tarball, asserts required runtime assets are present, installs into an isolated prefix, and runs `sp --version`, `sp doctor --check-drift`, `sp prune-stale-defaults --dry-run`, `sp clean --dry-run`, and `sp list --compact` to catch payload regressions before publish.
69
+
70
+ ## Category A: runtime-resolved package assets
71
+
72
+ Category A assets are read by the `sp` runtime itself:
73
+
74
+ - specialist definitions from `config/specialists/`
75
+ - mandatory rules from `config/mandatory-rules/`
76
+ - tool catalog files from `config/catalog/` / `.specialists/catalog/` override
77
+ - node configs
78
+
79
+ The loader resolves them live from the installed package when a repo has no intentional override. Precedence is:
80
+
81
+ ```text
82
+ .specialists/user/ > .specialists/default/ > config/<kind>/ > package canonical > legacy
83
+ ```
84
+
85
+ For new repositories this means no default snapshot is required. Pin the canonical runtime version with `package.json` / lockfile by depending on the desired `@jaggerxtrm/specialists` version; global installs only choose which package version is active on the machine. Put custom project definitions in `.specialists/user/`; they intentionally outrank package canonical assets.
86
+
87
+ `sp init --sync-defaults` is deprecated. It still works as a compatibility alias, but it prints a loud warning because it creates drift debt.
88
+
89
+ `.specialists/default/` stays empty by default. Populate it only when you intentionally pin a specialist, mandatory rule, or node config for repo-local override.
90
+
91
+ Use `sp pin <id>` for intentional pins when available; otherwise copy the specific asset into `.specialists/default/` only for an operator-approved override.
92
+
93
+ ## Category B: filesystem-bound xtrm-managed assets
94
+
95
+ Category B assets must exist on disk because external tools read them directly:
96
+
97
+ - skills under `.xtrm/skills/default/` and the active `.claude/skills` / `.pi/skills` surfaces
98
+ - hooks under `.xtrm/hooks/default/` and `.claude/settings.json` hook wiring
99
+
100
+ xtrm-tools owns these snapshots. Check drift with:
101
+
102
+ ```bash
103
+ xt doctor --cwd <repo-or-root> --json
104
+ ```
105
+
106
+ Refresh one repo or many with:
107
+
108
+ ```bash
109
+ xt update --repo <repo> --apply
110
+ xt update --root <projects-root> --apply
111
+ ```
112
+
113
+ Omit `--apply` for a dry run. See [skills.md](skills.md), [hooks.md](hooks.md), and the `update-specialists` skill for the operator-facing flow.
114
+
115
+ ## Pin a specialist version
116
+
117
+ If you need to keep one specialist pinned in a repo, copy it into the user layer before pruning defaults:
118
+
119
+ ```bash
120
+ cp .specialists/default/<name>.specialist.json .specialists/user/
121
+ sp prune-stale-defaults
122
+ ```
123
+
124
+ User overlays stay untouched by prune.
125
+
126
+ ## Migrating existing repositories
127
+
128
+ 1. Upgrade the `@jaggerxtrm/specialists` package version you want to run.
129
+ 2. Run `sp doctor --check-drift` to find stale Category A snapshots in `.specialists/default/`.
130
+ 3. Run `sp prune-stale-defaults` to remove stale default mirrors. Add `--keep-diverged` if you want to preserve intentional pins.
131
+ 4. Run `xt doctor --cwd <repo> --json` for Category B drift.
132
+ 5. Run `xt update --repo <repo> --apply` or `xt update --root <projects-root> --apply` after operator confirmation.
133
+
134
+ Do not move user-authored specialists, skills, or hooks into default mirrors. User-owned layers are custom policy, not drift.
135
+
136
+ ## See also
137
+
138
+ - [authoring.md](authoring.md)
139
+ - [manifest.md](manifest.md)
140
+ - [skills.md](skills.md) — xtrm-managed skill install and update flow
141
+ - [hooks.md](hooks.md)
142
+ - [cli-reference.md](cli-reference.md)
@@ -0,0 +1,184 @@
1
+ ---
2
+ title: Tool Manifest and Permissions
3
+ scope: manifest
4
+ category: reference
5
+ version: 1.0.1
6
+ updated: 2026-05-15
7
+ synced_at: b92a11ba
8
+ description: Manifest-driven tool catalog, permission tiers, and per-specialist permissions[TIER] override blocks.
9
+ source_of_truth_for:
10
+ - "config/catalog/*.json"
11
+ - ".specialists/catalog/*.json"
12
+ - "src/specialist/manifest-resolver.ts"
13
+ - "src/specialist/resolution-diagnostics.ts"
14
+ - "src/pi/session.ts:resolvePermissionTools"
15
+ domain:
16
+ - manifest
17
+ - permissions
18
+ - tools
19
+ ---
20
+
21
+ # Tool Manifest and Permissions
22
+
23
+ This document is the user-facing reference for the tool resolver: how each specialist's effective `--tools` list is computed, how to declare a per-specialist override, and how the deny modes interact with extension health.
24
+
25
+ > History: this system replaces the legacy hardcoded tier→tool arrays in `src/pi/session.ts` (removed in unitAI-qujxo.2). Design lives in `docs/design/gzrx-tool-catalog.md`. Critique of the parity-window cleanup in `docs/design/gzrx-completion-critique.md`.
26
+
27
+ ## What runs at session start
28
+
29
+ When a specialist is dispatched, `PiAgentSession.start()` produces a comma-joined `--tools` argument for the underlying `pi` subprocess by calling `resolvePermissionTools` with three inputs:
30
+
31
+ 1. The specialist's coarse tier from `execution.permission_required` (`READ_ONLY` | `LOW` | `MEDIUM` | `HIGH`).
32
+ 2. The specialist's optional `permissions[<TIER>]` override block.
33
+ 3. The catalog index resolved from `.specialists/catalog/index.json` when a local override exists, otherwise package-canonical `config/catalog/index.json`, plus the live health probe of the `pi-gitnexus` and `pi-serena-tools` npm extensions.
34
+
35
+ The resolver is the only path. There is no env-flag fallback. There are no hardcoded tool arrays in source.
36
+
37
+
38
+ Catalog files are Category A assets in the distribution model: the runtime resolves them from the installed package when the repo has no intentional local catalog override. New repos do not need a copied `.specialists/catalog/` snapshot just to get current policy. Pin policy by pinning the specialists package version; override locally only when the project deliberately diverges. See [installation.md](installation.md).
39
+
40
+ ## Catalog architecture
41
+
42
+ The resolved catalog `index.json` declares the precedence order and inlines per-catalog tier policies. Package installs read `config/catalog/index.json`; `.specialists/catalog/index.json` is an intentional local override when present:
43
+
44
+ ```json
45
+ {
46
+ "precedence_order": ["native", "gitnexus", "serena"],
47
+ "catalogs": [
48
+ {
49
+ "catalog": "native",
50
+ "package": "specialists",
51
+ "version": "3.11.0",
52
+ "precedence": 0,
53
+ "source_tiers": {
54
+ "READ_ONLY": ["read", "grep", "find", "ls"],
55
+ "LOW": ["read", "grep", "find", "ls", "bash"],
56
+ "MEDIUM": ["read", "grep", "find", "ls", "bash", "edit"],
57
+ "HIGH": ["read", "grep", "find", "ls", "bash", "edit", "write"]
58
+ }
59
+ },
60
+ { "catalog": "gitnexus", "package": "pi-gitnexus", "...": "..." },
61
+ { "catalog": "serena", "package": "pi-serena-tools", "...": "..." }
62
+ ]
63
+ }
64
+ ```
65
+
66
+ Three catalog files (`native.json`, `gitnexus.json`, `serena.json`) sit alongside the index and contain richer per-tool metadata. The index is the canonical input the resolver reads at session start.
67
+
68
+ The flat tool list emitted to `pi --tools` is the union of each catalog's `source_tiers[<TIER>]` for the active tier, gated by extension health (see below).
69
+
70
+ ## The four tiers
71
+
72
+ | Tier | Native | GitNexus | Serena |
73
+ |------|--------|----------|--------|
74
+ | `READ_ONLY` | read, grep, find, ls | read tools (query/context/impact/detect_changes/list_repos) | read tools (find_symbol, search_for_pattern, list_dir, find_file, …) |
75
+ | `LOW` | + bash | (same as READ_ONLY) | + execute_shell_command |
76
+ | `MEDIUM` | + edit | + rename, cypher | + write tools (replace_symbol_body, create_text_file, …) |
77
+ | `HIGH` | + write | (same as MEDIUM) | (same as MEDIUM) |
78
+
79
+ Inspect the actual resolved set for any specialist with `sp config show <name> --resolved` (see `docs/cli-reference.md`).
80
+
81
+ ## Extension health gating
82
+
83
+ Three states per extension affect resolution:
84
+
85
+ | Probe state | Effect on resolved tools |
86
+ |-------------|--------------------------|
87
+ | `loaded_healthy` | Catalog tools included normally; hard-deny of natives is allowed. |
88
+ | `loaded_unhealthy` / `not_installed` / `disabled` / `unknown` | Catalog's tools are dropped from the resolved set; if a hard-deny is configured against natives, those natives are *restored* automatically and a downgrade reason is recorded. |
89
+
90
+ Restoration is the safety net: an explorer that hard-denies `grep`/`find`/`ls` will get them back as a fallback if `pi-serena-tools` becomes unhealthy mid-run. You see this in `sp config show --resolved` as `restored native fallback: ...` in `downgrade reasons`.
91
+
92
+ Probes inspect `pi-gitnexus` and `pi-serena-tools` in the global npm modules directory.
93
+
94
+ ## Per-specialist override block
95
+
96
+ Most specialists need nothing special — catalog `default_overrides` define runtime-native deny defaults, and tier-local `permissions[<TIER>]` blocks only appear when a specialist must diverge from that baseline. Put specialist overrides at top level of specialist JSON (sibling to `execution`, not nested inside it).
97
+
98
+ ### Schema
99
+
100
+ ```jsonc
101
+ {
102
+ "specialist": {
103
+ "execution": { "permission_required": "READ_ONLY", "...": "..." },
104
+ "permissions": {
105
+ "READ_ONLY": {
106
+ "denied_natives_when_extension": ["grep", "find", "ls"],
107
+ "denied_natives_mode": "hard"
108
+ }
109
+ }
110
+ }
111
+ }
112
+ ```
113
+
114
+ | Field | Type | Default | Notes |
115
+ |-------|------|---------|-------|
116
+ | `denied_natives_when_extension` | `string[]` | `[]` | Native tools to deny **only when a replacement extension is healthy**. Order doesn't matter. Catalog defaults apply first, specialist overrides replace them when present. |
117
+ | `denied_natives_mode` | `"soft"` \| `"hard"` | `"soft"` | Whether the denial actually removes the tool (`hard`) or only emits a preference signal (`soft`). |
118
+
119
+ Only the tier matching the specialist's `execution.permission_required` is consulted. Unused tiers in the block are silently ignored.
120
+
121
+ ### Soft vs hard deny
122
+
123
+ | Mode | Effect on `--tools` | When to use |
124
+ |------|---------------------|-------------|
125
+ | `soft` | Final tool list is **unchanged**; resolver emits a `preference signals` line in the resolved report. The model still receives the native tool, with a hint to prefer the extension. | Gentle nudges; rollouts you want to observe before tightening; cases where the replacement might not always cover the native's edge cases. |
126
+ | `hard` | Native tool is removed from `--tools` entirely (when the replacement extension is healthy). Falls back to native automatically if the replacement degrades. | Strong opinions where the native tool is genuinely worse and the replacement is reliable. |
127
+
128
+ Soft is the default — bias toward observability before enforcement.
129
+
130
+ ### Canonical example: explorer
131
+
132
+ `config/specialists/explorer.specialist.json` is currently the only specialist with an override block:
133
+
134
+ ```json
135
+ {
136
+ "specialist": {
137
+ "execution": { "permission_required": "READ_ONLY" },
138
+ "permissions": {
139
+ "READ_ONLY": {
140
+ "denied_natives_when_extension": ["grep", "find", "ls"],
141
+ "denied_natives_mode": "hard"
142
+ }
143
+ }
144
+ }
145
+ }
146
+ ```
147
+
148
+ Why: explorer is meant to discover code through the symbol/process graph — `gitnexus_query` and serena's `search_for_pattern` / `find_symbol` / `find_file` give richer, ranked, structured results than native `grep`/`find`/`ls`. Hard-denying the natives forces explorer to use the better tools when they're available, while the health-gated restore guarantees it still works if the extensions go offline.
149
+
150
+ `read` stays soft (not in the deny list) because no extension currently provides large-file or non-code reading equivalents.
151
+
152
+ ## When NOT to declare an override
153
+
154
+ - **Tier defaults are correct.** Most specialists are in this bucket.
155
+ - You're tempted to copy explorer's block into another specialist "just in case." Don't — drift is a real cost, and the file then has to track catalog changes by hand.
156
+ - You want to *add* tools beyond the tier default. The override block can only deny natives, not extend the catalog. Adjust the catalog file or change the specialist's tier instead.
157
+
158
+ ## Inspecting the resolution
159
+
160
+ ```bash
161
+ sp config show <name> --resolved
162
+ ```
163
+
164
+ The output shows, in order:
165
+
166
+ - The full resolved JSON for the specialist
167
+ - `layer attribution`: which layer (catalog / specialist_override / runtime_health) contributed which tools
168
+ - `extension availability`: live health probe per extension
169
+ - `catalog compatibility`: schema-version check
170
+ - `denied natives`: tools removed by override
171
+ - `deny mode`: `soft` or `hard`
172
+ - `preference signals`: present when soft-deny is configured
173
+ - `downgrade reasons`: present when hard-deny had to restore natives due to unhealthy extensions
174
+ - `--tools`: the literal comma-joined string passed to `pi`
175
+
176
+ Use this command after editing a specialist's tier or override block to confirm the resolved output is what you expect — *before* dispatching a real run.
177
+
178
+ ## See also
179
+
180
+ - [authoring.md](authoring.md) — full specialist JSON schema
181
+ - [cli-reference.md](cli-reference.md#specialists-config) — `sp config show --resolved` flag reference
182
+ - [specialists-catalog.md](specialists-catalog.md) — current specialist roster and their tier assignments
183
+ - [design/gzrx-tool-catalog.md](design/gzrx-tool-catalog.md) — original design document
184
+ - [design/gzrx-completion-critique.md](design/gzrx-completion-critique.md) — gap analysis that drove the qujxo.2 cleanup
@@ -0,0 +1,73 @@
1
+ ---
2
+ title: MCP Servers Configuration
3
+ scope: mcp-servers
4
+ category: reference
5
+ version: 1.3.1
6
+ updated: 2026-05-15
7
+ synced_at: bf6baf7a
8
+ description: Project-scoped MCP registration for Specialists.
9
+ source_of_truth_for:
10
+ - ".mcp.json"
11
+ - "src/cli/init.ts"
12
+ domain:
13
+ - mcp
14
+ ---
15
+
16
+ <!-- INDEX: auto-generated by validate_doc.py — do not edit manually -->
17
+ | Section | Summary |
18
+ |---|---|
19
+ | [MCP tools](#mcp-tools) | | Tool | Description | |
20
+ | [Registration](#registration) | The MCP server is registered at **project scope** by `specialists init` |
21
+ | [Verification](#verification) | You should see Specialists registered at **Project config** scope |
22
+ | [See also](#see-also) | - [bootstrap |
23
+ <!-- END INDEX -->
24
+
25
+ # MCP Servers Configuration
26
+
27
+ Specialists exposes an MCP server for Claude Code integration.
28
+
29
+ ## MCP tools
30
+
31
+ The server exposes a single tool. For full tool contract, see [mcp-tools.md](mcp-tools.md).
32
+
33
+ | Tool | Description |
34
+ |---|---|
35
+ | `use_specialist` | run a specialist synchronously |
36
+
37
+ Orchestration, monitoring, steering, resume, and cancellation are CLI-only. See [cli-reference.md](cli-reference.md).
38
+
39
+ ## Registration
40
+
41
+ The MCP server is registered at **project scope** by `specialists init`.
42
+
43
+ Init writes `.mcp.json` directly (no `claude mcp add` shell-out).
44
+
45
+ Typical entry:
46
+
47
+ ```json
48
+ {
49
+ "mcpServers": {
50
+ "specialists": {
51
+ "type": "stdio",
52
+ "command": "specialists",
53
+ "args": [],
54
+ "env": {}
55
+ }
56
+ }
57
+ }
58
+ ```
59
+
60
+ ## Verification
61
+
62
+ ```bash
63
+ # `sp init` is human-only and writes project `.mcp.json` during bootstrap.
64
+ claude mcp get specialists
65
+ sp doctor
66
+ ```
67
+
68
+ You should see Specialists registered at **Project config** scope.
69
+
70
+ ## See also
71
+
72
+ - [bootstrap.md](bootstrap.md)
73
+ - [workflow.md](workflow.md)
@@ -0,0 +1,71 @@
1
+ ---
2
+ title: MCP Tools Reference
3
+ scope: mcp-tools
4
+ category: reference
5
+ version: 2.1.1
6
+ updated: 2026-05-15
7
+ synced_at: bf6baf7a
8
+ description: MCP tool contract for the Specialists server.
9
+ source_of_truth_for:
10
+ - "src/server.ts"
11
+ - "src/tools/specialist/use_specialist.tool.ts"
12
+ domain:
13
+ - mcp
14
+ - tools
15
+ ---
16
+
17
+ # MCP Tools Reference
18
+
19
+ This server now exposes a single MCP tool.
20
+
21
+ ## Active tool inventory
22
+
23
+ | Tool | Purpose |
24
+ |---|---|
25
+ | `use_specialist` | synchronous specialist run with result returned directly in MCP response |
26
+
27
+ ## `use_specialist`
28
+
29
+ ### Input schema
30
+
31
+ ```ts
32
+ z.object({
33
+ name: z.string().describe('Specialist identifier (e.g. explorer, debugger, reviewer)'),
34
+ prompt: z.string().optional().describe('The task or question for the specialist'),
35
+ bead_id: z.string().optional().describe('Use an existing bead as the specialist prompt'),
36
+ variables: z.record(z.string()).optional().describe('Additional $variable substitutions'),
37
+ backend_override: z.string().optional().describe('Force a specific backend/model provider when supported by the runtime'),
38
+ autonomy_level: z.enum(['READ_ONLY', 'LOW', 'MEDIUM', 'HIGH']).optional().describe('Override permission level for this invocation'),
39
+ context_depth: z.number().min(0).max(10).optional().describe('Depth of blocker context injection (0 = none, 1 = immediate blockers, etc.)'),
40
+ }).refine((input) => Boolean(input.prompt?.trim() || input.bead_id), {
41
+ message: 'Either prompt or bead_id is required',
42
+ path: ['prompt'],
43
+ })
44
+ ```
45
+
46
+ ### Behavior highlights
47
+
48
+ - `bead_id` links execution to an existing bead and uses it as task context.
49
+ - The tool runs in foreground and returns final output directly in the MCP result.
50
+ - For orchestration, monitoring, steering, resume, and cancellation, use the CLI (`specialists run/feed/result/steer/resume/stop`).
51
+
52
+ ## Removed MCP tools
53
+
54
+ The following tools were intentionally removed from MCP surface and are CLI-only workflows now:
55
+
56
+ - `start_specialist` *(legacy compatibility implementations may still emit a deprecation warning; migrate to `specialists run <name> --prompt "..." --background` now — full removal in next major)*
57
+ - `feed_specialist`
58
+ - `stop_specialist`
59
+ - `steer_specialist`
60
+ - `resume_specialist`
61
+ - `specialist_status`
62
+ - `run_parallel`
63
+ - `follow_up_specialist`
64
+ - `specialist_init`
65
+ - `list_specialists`
66
+
67
+ ## See also
68
+
69
+ - [cli-reference.md](cli-reference.md)
70
+ - [workflow.md](workflow.md)
71
+ - [background-jobs.md](background-jobs.md)