@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/README.md CHANGED
@@ -1,82 +1,141 @@
1
1
  # Specialists
2
2
 
3
- **One MCP server. Many specialist agents. Bead-first orchestration.**
4
-
5
3
  [![npm version](https://img.shields.io/npm/v/@jaggerxtrm/specialists.svg)](https://www.npmjs.com/package/@jaggerxtrm/specialists)
6
4
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
7
5
  [![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/)
8
6
 
9
- Specialists is a project-scoped runtime for running focused AI agents from the CLI, MCP, scripts, CI, or HTTP sidecars. A specialist definition declares its model, tools, permission tier, prompt, skills, output contract, timeout/stall policy, worktree behavior, and tracking behavior. The orchestrator keeps task identity in a **bead**; specialists run as fresh scoped sessions that report evidence, changes, and results back to that bead.
7
+ **Specialists is an agent-mind runtime for getting real work done.**
8
+
9
+ It is not just “run many agents”. The core idea is that a long single-agent chat becomes cognitively contaminated: old hypotheses, abandoned plans, tool residue, self-review bias, forgotten constraints, and context-window noise all accumulate in one mind. Quality drops because the same context tries to be explorer, implementer, tester, reviewer, security auditor, memory keeper, and release operator at once.
10
+
11
+ Specialists gives an AI workflow a healthier shape:
12
+
13
+ - the **orchestrator** stays the central executive — it owns the user intent, task identity, evidence, and publication decision;
14
+ - the **bead** is the contract and durable working memory — problem, scope, success criteria, validation, dependencies, and handoffs live there;
15
+ - **specialists** are fresh, scoped cognitive faculties — explorer, debugger, executor, test-engineer, reviewer, sync-docs, researcher, and domain roles each get only the context, tools, rules, and output contract they need;
16
+ - **structured handoffs** flow back to the orchestrator — results are evidence to consume, not conversational vibes to remember;
17
+ - **workspaces and gates** keep changes publishable — edit-capable roles work in branches/worktrees, reviewer/QA/security roles judge against the contract.
18
+
19
+ The result is a shared project mind: continuity without hoarding every detail in one agent’s context.
10
20
 
11
21
  Specialists sits in the xt/xtrm stack:
12
22
 
13
- - **[pi coding agent](https://github.com/Jaggerxtrm/pi-coding-agent)** supplies the model/provider execution layer, JSONL/RPC subprocess boundary, tool events, and extension hooks.
14
- - **[xtrm-tools](https://github.com/Jaggerxtrm/xtrm-tools)** supplies the surrounding operator workflow: worktree sessions, `.xtrm/` skills/hooks, session reports, update tooling, and workflow enforcement.
15
- - **[beads](https://github.com/steveyegge/beads)** supplies issue IDs, dependency edges, claims, and durable task/result notes.
23
+ - **[pi coding agent](https://github.com/earendil-works/pi-coding-agent)** executes model sessions and exposes tool events/RPC boundaries.
24
+ - **[xtrm-tools](https://github.com/Jaggerxtrm/xtrm-tools)** provides operator workflow: worktree sessions, `.xtrm/` skills/hooks, reports, update tooling, and gates.
25
+ - **[beads](https://github.com/steveyegge/beads)** provides issue IDs, claims, dependencies, task contracts, and durable notes.
16
26
 
17
- When a run starts from `--bead <id>`, the bead is the task prompt. Dependency context and relevant memory can be injected, the specialist output is appended back to the same bead, and edit-capable specialists work in isolated branches/worktrees that can be reviewed and merged through `sp merge` or `sp epic merge`.
27
+ See [specialists.scheme.md](specialists.scheme.md) for the full rationale.
18
28
 
19
29
  ---
20
30
 
21
- ## Vision
31
+ ## Why not one big agent chat?
32
+
33
+ ```mermaid
34
+ flowchart LR
35
+ Long[One long agent session] --> Residue[Context residue]
36
+ Long --> Bias[Self-review bias]
37
+ Long --> Drift[Goal drift]
38
+ Long --> Noise[Tool/output noise]
39
+ Long --> Fatigue[Instruction fatigue]
40
+
41
+ Residue --> Bad[Lower-quality decisions]
42
+ Bias --> Bad
43
+ Drift --> Bad
44
+ Noise --> Bad
45
+ Fatigue --> Bad
46
+
47
+ Bad --> Symptoms[Symptoms]
48
+ Symptoms --> Vibes[Reviews become vibes]
49
+ Symptoms --> Mirrors[Tests mirror implementation]
50
+ Symptoms --> Scope[Scope silently widens]
51
+ Symptoms --> Forgotten[Constraints disappear]
52
+ ```
53
+
54
+ The problem is not only token count. It is **cognitive contamination**. A single context window carries every role’s history, including false starts and stale assumptions. The agent starts defending its own implementation, testing what it built instead of what was requested, and treating completion claims as proof.
22
55
 
23
- Specialists turns one overloaded agent chat into a coordinated agent mind: a central orchestrator keeps task identity, evidence, and publication control, while fresh specialist sessions act as scoped capabilities with their own prompts, rules, tools, memory, and output contracts.
56
+ Specialists replaces context hoarding with **contract-bound cognition**.
24
57
 
25
- The problem it solves is not just token count. Long single-agent sessions accumulate old hypotheses, partial plans, tool residue, self-review bias, and forgotten constraints. Specialists uses **contract-bound cognition** instead: write the task contract once, dispatch the right expert role with only the relevant context, require a structured handoff, and let the orchestrator decide the next step.
58
+ ---
26
59
 
27
- See [specialists.scheme.md](specialists.scheme.md) for the full diagrams and rationale. The core shape is:
60
+ ## The common-mind model
28
61
 
29
62
  ```mermaid
30
63
  flowchart TD
31
- U[User / project need] --> O[Orchestrator]
32
- O --> B[Bead issue contract]
33
- B --> C{Contract ready?}
34
- C -->|no| R[Repair scope, success, constraints]
35
- R --> B
36
- C -->|yes| D[Dispatch specialist]
37
-
38
- D --> E[Explorer\nfresh read-only context]
39
- D --> G[Debugger\nfresh root-cause context]
40
- D --> X[Executor\nfresh implementation context]
41
- D --> T[Test-runner\nfresh validation context]
42
- D --> S[Code-sanity / Security\nadvisory context]
43
- D --> V[Reviewer\ncontract compliance context]
64
+ U[User / project need] --> O[Orchestrator\ncentral executive]
65
+ O --> B[Bead contract\nproblem · scope · success · validation]
66
+ B --> Check{Contract ready?}
67
+ Check -->|repair needed| Refine[Refine scope / constraints / outputs]
68
+ Refine --> B
69
+ Check -->|ready| O
70
+
71
+ O --> Choose{Choose faculty}
72
+ Choose --> E[Explorer\nfresh read-only context]
73
+ Choose --> D[Debugger\nfresh root-cause context]
74
+ Choose --> X[Executor\nfresh implementation context]
75
+ Choose --> QA[Test-engineer / test-runner\nfresh validation context]
76
+ Choose --> R[Seconder / reviewer\nfresh judgment context]
77
+ Choose --> Docs[Sync-docs / service-skills\nfresh documentation context]
78
+ Choose --> Research[Researcher / domain specialist\nfresh external evidence]
44
79
 
45
80
  B --> E
46
- B --> G
81
+ B --> D
47
82
  B --> X
48
- B --> T
49
- B --> S
50
- B --> V
83
+ B --> QA
84
+ B --> R
85
+ B --> Docs
86
+ B --> Research
87
+
88
+ Rules[Mandatory rules\npermissions · tools · output schema] --> E
89
+ Rules --> D
90
+ Rules --> X
91
+ Rules --> QA
92
+ Rules --> R
93
+ Rules --> Docs
94
+ Rules --> Research
51
95
 
52
96
  E --> H[Structured handoff / evidence]
53
- G --> H
97
+ D --> H
54
98
  X --> H
55
- T --> H
56
- S --> H
57
- V --> H
99
+ QA --> H
100
+ R --> H
101
+ Docs --> H
102
+ Research --> H
103
+
58
104
  H --> O
59
- O --> P[Merge, resume, re-review, or close]
105
+ O --> Decision{Next decision}
106
+ Decision -->|resume / steer| Choose
107
+ Decision -->|fix loop| B
108
+ Decision -->|publish| Merge[Merge / PR / release]
109
+ Decision -->|done| Close[Close bead + durable notes]
60
110
  ```
61
111
 
62
- ## What you can run
112
+ This is close to how a human mind works: a central executive does not consciously compute every perception, motor skill, language move, and memory lookup at once. It activates specialized faculties, receives summaries/evidence, and decides what to do next.
113
+
114
+ Specialists gives an AI workflow the same structure. The orchestrator remains the “self”; specialists are bounded capabilities that can be activated without permanently polluting the central context.
115
+
116
+ ---
63
117
 
64
- | Need | Specialist / surface |
118
+ ## What Specialists lets you do
119
+
120
+ | Need | Use |
65
121
  |---|---|
66
- | Map unfamiliar local code | `explorer` |
67
- | Diagnose a bug with unknown cause | `debugger` |
68
- | Implement a scoped change | `executor` |
69
- | Review an executor/debugger result | `reviewer --job <exec-job>` |
70
- | Run/classify tests | `test-runner` |
71
- | Current library/API/GitHub research | `researcher` |
72
- | Plan a multi-file feature into beads | `planner` |
73
- | Check code shape before review | `code-sanity` |
74
- | Audit security-sensitive diffs | `security-auditor` |
75
- | Sync exactly one doc | `sync-docs` |
76
- | Draft changelog gaps | `changelog-keeper` |
77
- | One-shot script/HTTP generation | `sp script` / `sp serve` |
78
-
79
- The live registry is authoritative:
122
+ | Turn vague work into an executable task contract | bead + planner / orchestrator |
123
+ | Map unfamiliar local code | `sp run explorer --bead <id>` |
124
+ | Diagnose a bug with unknown cause | `sp run debugger --bead <id>` |
125
+ | Implement a scoped change in an isolated workspace | `sp run executor --bead <id> --worktree` |
126
+ | Add tests from the actual implementation diff | `test-engineer` |
127
+ | Run and classify validation commands | `test-runner` |
128
+ | Check scope/quality before final review | `seconder` |
129
+ | Review implementation evidence against the bead contract | `sp run reviewer --bead <id> --job <exec-job>` |
130
+ | Research current docs, repos, APIs, papers, or domain evidence | `researcher`, `quant-researcher`, `transcriber` |
131
+ | Sync one stale doc safely | `sync-docs` |
132
+ | Keep service-expert skill docs aligned with code drift | `service-skills-sync` |
133
+ | Generate immediate JSON/text from a specialist | `sp script` or `sp serve` |
134
+ | Watch all active specialist work across repos | `sp console` |
135
+ | Inspect runtime evidence and telemetry | `sp feed`, `sp log`, `sp forensic`, `sp metrics` |
136
+ | Configure package specialists for your machine | `sp init --global`, `sp edit --global`, `sp setup` |
137
+
138
+ The live catalog is authoritative:
80
139
 
81
140
  ```bash
82
141
  sp list
@@ -85,9 +144,11 @@ sp list-rules
85
144
  sp help
86
145
  ```
87
146
 
147
+ ---
148
+
88
149
  ## Install and bootstrap
89
150
 
90
- Specialists is **Bun-only** and expects xtrm-tools to be installed explicitly. xtrm-tools is a runtime prerequisite, not an npm dependency of this package.
151
+ Specialists is **Bun-first** and expects xtrm-tools to be installed explicitly. xtrm-tools is a runtime prerequisite, not an npm dependency of this package.
91
152
 
92
153
  ```bash
93
154
  # 1. Bun
@@ -101,91 +162,124 @@ xt init
101
162
 
102
163
  # 3. Specialists
103
164
  npm install -g @jaggerxtrm/specialists
104
- sp init
105
- sp doctor
165
+ sp init --global # machine-level user config and model defaults
166
+ sp setup --discovery # inspect available models/config gaps
167
+ sp setup --plan cheap # optional: propose model assignments
168
+ sp init # per-repo wiring: MCP, hooks, skills, db paths
169
+ sp doctor --specialists
106
170
  sp list
107
171
  ```
108
172
 
109
173
  `sp` is an alias for `specialists`.
110
174
 
111
- `sp init` is an interactive, human-run bootstrap. It checks for `xt` and `.xtrm/`, wires project MCP registration, hooks, skill symlinks, `.specialists/` runtime directories, and the Specialists block in `AGENTS.md`. It does **not** require copying package-owned defaults into every repo.
112
-
113
- ## Update and drift repair
175
+ ### Global model config
114
176
 
115
- Specialists uses two distribution tracks:
177
+ Package specialist definitions ship with `execution.model = null`. This is intentional: the package defines roles, tools, contracts, and safety boundaries; your machine-level config defines provider/model choices.
116
178
 
117
- | Track | Owned by | What it covers | Check / update |
118
- |---|---|---|---|
119
- | **Category A** runtime assets | `@jaggerxtrm/specialists` package | specialist JSON, mandatory rules, catalog, nodes, hooks shipped with the package | `sp doctor --check-drift`, `sp prune-stale-defaults --dry-run`, `sp prune-stale-defaults` |
120
- | **Category B** filesystem assets | xtrm-tools | `.xtrm/skills`, `.claude/skills`, `.pi/skills`, hook snapshots read directly from disk | `xt doctor --cwd <repo> --json`, `xt update --repo <repo> --apply` |
179
+ Use:
121
180
 
122
- `.specialists/user/` is your customization layer. `.specialists/default/` is now only for intentional pins or compatibility snapshots; stale default files are drift debt and `sp prune-stale-defaults` removes them by default. `sp init --sync-defaults` remains as a compatibility path, but it is deprecated because it creates repo-local snapshots that can drift from the package-canonical source.
181
+ ```bash
182
+ sp init --global
183
+ sp edit --global
184
+ sp setup --fetch-benchmarks --json
185
+ sp setup --plan <budget-preset>
186
+ sp doctor --specialists
187
+ ```
123
188
 
124
- For an interactive, agent-guided update flow that runs both tracks, diagnoses drift, and asks before applying destructive changes, invoke the `/update-specialists` skill in Claude Code instead of running the raw commands manually.
189
+ The loader merges configuration in this order:
125
190
 
126
- ## Operator skills
191
+ 1. package canonical specialist JSON;
192
+ 2. `~/.config/specialists/user.json` global overrides;
193
+ 3. `.specialists/user/` repo-local overrides.
127
194
 
128
- These skills load into your Claude Code session on demand and guide the most common operator workflows:
195
+ See [docs/installation.md](docs/installation.md), [docs/bootstrap.md](docs/bootstrap.md), and [docs/authoring.md](docs/authoring.md).
129
196
 
130
- | Skill | Invoke | When to use |
131
- |---|---|---|
132
- | `using-specialists-v3` | `/using-specialists-v3` | **Canonical orchestration guide.** Use for any substantial delegated work: implementation, debugging, review, planning, security audit, doc sync, multi-chain epics. Covers bead contracts, role selection, chain lifecycle, merge path, and escalation. |
133
- | `using-specialists-auto` | `/using-specialists-auto` | **Autonomous / offline mode.** Activates when you hand over a multi-item list and step away ("auto mode", "run the list"). Layers pacing discipline and escalation triggers on top of `using-specialists-v3`. |
134
- | `update-specialists` | `/update-specialists` | **Guided drift repair.** Runs both Category A and Category B diagnostics, presents a combined plan, and asks before applying anything. Prefer this over running raw `sp`/`xt` commands directly. |
197
+ ---
135
198
 
136
- ## Core tracked workflow
199
+ ## First tracked run
137
200
 
138
201
  ```bash
139
- bd create "Investigate auth bug" -t bug -p 1 --json
202
+ bd create "Investigate flaky checkout flow" -t bug -p 1 --json
140
203
  bd update <id> --claim --json
141
204
 
142
- sp run debugger --bead <id> --context-depth 3
143
- sp ps
205
+ sp run explorer --bead <id> --context-depth 2
144
206
  sp feed <job-id> --follow
145
207
  sp result <job-id>
146
208
 
147
- # Human-in-the-loop alternative: launch with a live TUI
148
- sp chat debugger --bead <id> # feed-style timeline + status + final result + input
149
-
150
- # After implementation and reviewer PASS
151
- sp merge <chain-root-bead> # standalone chain
152
- sp epic status <epic-id> # multi-chain publication check
153
- sp epic merge <epic-id> # canonical epic publication
209
+ sp run debugger --bead <id> --context-depth 3
210
+ sp run executor --bead <id> --worktree
211
+ sp run reviewer --bead <id> --job <executor-job>
154
212
 
155
- bd close <id> --reason "Done" --json
213
+ bd close <id> --reason "Root cause found, fix reviewed" --json
156
214
  ```
157
215
 
158
- Ad-hoc work is still available, but tracked work should use beads:
216
+ Ad-hoc one-offs are still supported, but tracked work should use beads:
159
217
 
160
218
  ```bash
161
219
  sp run explorer --prompt "Map the CLI architecture"
162
220
  ```
163
221
 
164
- ## Background jobs and monitoring
222
+ ---
223
+
224
+ ## Operator console
225
+
226
+ `sp console` is the multi-repo terminal dashboard for live specialist work.
165
227
 
166
- Normal runtime is DB-first: `.specialists/db/observability.db` stores jobs, events, and results. File mirrors under `.specialists/jobs/` are legacy/operator recovery surfaces.
228
+ It provides:
167
229
 
168
- Useful commands:
230
+ - an **ALL** view aggregating active jobs across configured repos;
231
+ - per-repo tabs and persistent repo registry (`~/.config/specialists/console.json`);
232
+ - job list, feed, result, bead, diff, config, and repo-config views;
233
+ - cursor navigation and direct actions (`↵`, `r`, `i`, `b`, `d`, `g`, `R`, `x`, `0`, `tab`, `1-9`);
234
+ - TUI-styled rows shared with `sp ps`.
169
235
 
170
236
  ```bash
171
- sp ps # actionable dashboard
172
- sp ps -f # TTY dashboard follow; pipes emit ANSI-free snapshots
173
- sp feed <job-id> # full DB-backed event replay
174
- sp feed -f # follow all active jobs
175
- sp chat explorer --bead <id> # launch interactive TUI; input auto-steers/resumes
176
- sp result <job-id> --wait
177
- sp steer <job-id> "focus only on X"
178
- sp resume <job-id> "continue with these findings"
179
- sp finalize <any-chain-job> # cascade-close waiting keep-alive chain after PASS if needed
237
+ sp console
238
+ sp console --add-repo ~/dev/my-project
239
+ sp console --remove-repo old-project
240
+ ```
241
+
242
+ For shell-only workflows:
243
+
244
+ ```bash
245
+ sp ps
246
+ sp feed <job-id>
247
+ sp feed -f
248
+ sp result <job-id>
249
+ sp log <job-id>
250
+ sp steer <job-id> "focus only on the API boundary"
251
+ sp resume <job-id> "continue with this additional evidence"
252
+ sp stop <job-id>
180
253
  sp clean --reap-orphans --dry-run
181
- sp clean --ps # hide terminal dashboard history without deleting DB audit rows
182
254
  ```
183
255
 
184
- `sp chat` is for launching a new interactive specialist session. It renders the same normalized feed style as `sp feed -f`, shows startup/payload context and the final result, and maps typed input to `steer` while running or `resume` while waiting. `/quit` and Ctrl+C detach the TUI without stopping the job; use `/stop` when you intend to stop it. Current `sp attach <job-id>` remains the legacy tmux attach path; chat-style attach to an existing job is tracked separately.
256
+ ---
257
+
258
+ ## Publication and review
259
+
260
+ Specialists separates **doing work** from **publishing work**.
261
+
262
+ - `executor`, `debugger`, `test-engineer`, and `sync-docs` may create changes.
263
+ - `seconder`, `test-runner`, and `reviewer` produce evidence/verdicts.
264
+ - Reviewer PASS is the normal publish gate for implementation work.
265
+ - `sp merge` and `sp epic merge` are publication tools, not authoring tools.
266
+
267
+ ```bash
268
+ # Standalone reviewed chain
269
+ sp merge <chain-root-bead>
270
+
271
+ # Multi-chain epic
272
+ sp epic status <epic-id>
273
+ sp epic merge <epic-id>
274
+ ```
275
+
276
+ Keep-alive specialists may stop in `waiting` after producing a result. Use `sp result <job-id>` to read the handoff, then `sp stop <job-id>` when no follow-up is needed.
277
+
278
+ ---
185
279
 
186
280
  ## Script and service specialists
187
281
 
188
- Use `sp run` for interactive agent orchestration. Use the script/service surfaces when you need a synchronous, READ_ONLY, one-shot generation path:
282
+ Use `sp run` for interactive agent orchestration. Use `sp script` / `sp serve` when you need an immediate one-shot generation contract from a specialist.
189
283
 
190
284
  ```bash
191
285
  sp script <name> --vars key=value --json
@@ -195,49 +289,82 @@ curl -sS http://localhost:8000/v1/generate \
195
289
  -d '{"specialist":"hello","variables":{"name":"world"}}'
196
290
  ```
197
291
 
198
- `sp serve` is intended as a sidecar for script-class specialists. For container deployments, mount the whole `.specialists/` directory read-write, set `HOME=/pi-home`, and align container UID/GID with the host user. See [docs/specialists-service.md](docs/specialists-service.md), [docs/specialists-service-install.md](docs/specialists-service-install.md), and [docs/deploying-alongside.md](docs/deploying-alongside.md).
292
+ Script/service mode is useful for CI, internal services, deterministic JSON generation, and sidecar deployments. Trusted local-script or write-capable execution must be explicitly enabled with the relevant flags; it is not implicit.
293
+
294
+ See [docs/specialists-service.md](docs/specialists-service.md) and [docs/specialists-service-install.md](docs/specialists-service-install.md).
295
+
296
+ ---
297
+
298
+ ## Observability and telemetry
299
+
300
+ Specialists is DB-first. Runtime state lives in `.specialists/db/observability.db`; file mirrors under `.specialists/jobs/` are legacy/operator recovery surfaces.
301
+
302
+ Useful surfaces:
303
+
304
+ ```bash
305
+ sp ps # dashboard row view
306
+ sp feed <job-id> # event stream replay
307
+ sp log <job-id> # control/status/error log
308
+ sp forensic <job-id> --json # persisted forensic envelopes
309
+ sp metrics --prometheus # low-cardinality metrics
310
+ sp serve --port 8000 # exposes /metrics and job feed endpoints
311
+ ```
312
+
313
+ Telemetry uses bounded labels and avoids high-cardinality IDs in Prometheus labels. Forensic events retain drill-down detail in SQLite/JSON output where IDs are appropriate.
314
+
315
+ ---
316
+
317
+ ## Built-in specialist families
318
+
319
+ | Family | Examples | Purpose |
320
+ |---|---|---|
321
+ | Exploration/debugging | `explorer`, `debugger`, `overthinker` | map systems, find root causes, reason deeply |
322
+ | Implementation/review | `executor`, `reviewer`, `seconder` | write changes, verify scope, check quality |
323
+ | QA | `test-engineer`, `test-runner`, `obligations-scanner` | create tests, run exact commands, track TODO/FIXME obligations |
324
+ | Research | `researcher`, `github-researcher`, `transcriber` | gather current docs, code examples, papers, video transcripts |
325
+ | Documentation/release | `sync-docs`, `service-skills-sync`, `changelog-keeper`, `changelog-drafter` | keep docs and release notes current |
326
+ | Operations | `xt-merge`, `memory-processor`, `node-coordinator` | merge queues, curate memory, coordinate node workers |
327
+ | Domain specialists | `quant-researcher`, `quant-methodologist` | market-data and quantitative-method evidence/methodology |
328
+
329
+ Run `sp list --compact` for the exact installed catalog and versions.
330
+
331
+ ---
199
332
 
200
333
  ## Documentation map
201
334
 
202
335
  | Need | Doc |
203
336
  |---|---|
204
- | Install, update, and distribution model | [docs/installation.md](docs/installation.md) |
205
- | Project bootstrap and `sp init` | [docs/bootstrap.md](docs/bootstrap.md) |
337
+ | Install, update, global config | [docs/installation.md](docs/installation.md) |
338
+ | Bootstrap a project | [docs/bootstrap.md](docs/bootstrap.md) |
206
339
  | Bead-first workflow | [docs/workflow.md](docs/workflow.md) |
207
340
  | CLI commands and flags | [docs/cli-reference.md](docs/cli-reference.md) |
208
- | Background jobs / `ps` / `feed` / `result` | [docs/background-jobs.md](docs/background-jobs.md) |
341
+ | Feature-level behavior | [docs/features.md](docs/features.md) |
342
+ | Background jobs / feed / result | [docs/background-jobs.md](docs/background-jobs.md) |
209
343
  | Specialist JSON authoring | [docs/authoring.md](docs/authoring.md) |
210
- | Built-in specialists | [docs/specialists-catalog.md](docs/specialists-catalog.md) |
211
- | Tool catalog and permission resolver | [docs/manifest.md](docs/manifest.md) |
212
- | MCP registration and tool surface | [docs/mcp-servers.md](docs/mcp-servers.md), [docs/mcp-tools.md](docs/mcp-tools.md) |
213
- | Hooks | [docs/hooks.md](docs/hooks.md) |
214
- | Skills and operator skill reference | [docs/skills.md](docs/skills.md) |
215
- | Orchestration skill (`using-specialists-v3`) | [docs/skills.md#using-specialists-v3](docs/skills.md#using-specialists-v3) |
216
- | Auto mode skill (`using-specialists-auto`) | [docs/skills.md#using-specialists-auto](docs/skills.md#using-specialists-auto) |
217
- | Update / drift repair skill (`update-specialists`) | [docs/skills.md#update-specialists](docs/skills.md#update-specialists) |
218
- | Worktrees and session close | [docs/worktrees.md](docs/worktrees.md), [docs/worktree.md](docs/worktree.md) |
219
- | Runtime architecture | [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) |
220
- | Pi subprocess isolation / RPC boundary | [docs/pi-session.md](docs/pi-session.md), [docs/pi-rpc-boundary.md](docs/pi-rpc-boundary.md) |
221
- | NodeSupervisor | [docs/nodes.md](docs/nodes.md) |
222
- | Service sidecar / HTTP contract | [docs/specialists-service.md](docs/specialists-service.md) |
223
- | Compose deployment recipe | [docs/deploying-alongside.md](docs/deploying-alongside.md) |
344
+ | Built-in specialist catalog | [docs/specialists-catalog.md](docs/specialists-catalog.md) |
345
+ | MCP server/tool surface | [docs/mcp-servers.md](docs/mcp-servers.md), [docs/mcp-tools.md](docs/mcp-tools.md) |
346
+ | Pi subprocess isolation | [docs/pi-session.md](docs/pi-session.md), [docs/pi-rpc-boundary.md](docs/pi-rpc-boundary.md) |
347
+ | Script/service sidecar | [docs/specialists-service.md](docs/specialists-service.md), [docs/specialists-service-install.md](docs/specialists-service-install.md) |
348
+ | Worktrees and publication | [docs/worktrees.md](docs/worktrees.md), [docs/worktree.md](docs/worktree.md) |
349
+ | Architecture | [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) |
224
350
  | Release notes | [CHANGELOG.md](CHANGELOG.md) |
225
351
 
226
- ## Project structure
352
+ ---
353
+
354
+ ## Project layout
227
355
 
228
356
  ```text
229
357
  config/
230
- ├── specialists/ package-canonical specialist definitions (.specialist.json)
231
- ├── mandatory-rules/ package-canonical rule sets injected into specialist prompts
232
- ├── catalog/ package-canonical tool catalog
233
- ├── nodes/ package-canonical node configs
358
+ ├── specialists/ package-canonical specialist definitions
359
+ ├── mandatory-rules/ package-canonical rule sets injected into prompts
360
+ ├── catalog/ tool catalog and permission metadata
361
+ ├── nodes/ node coordinator configs
234
362
  ├── hooks/ bundled hook scripts
235
- └── skills/ repo-local skills shipped by this package
363
+ └── skills/ package-shipped skills
236
364
 
237
365
  .specialists/
238
- ├── user/ repo-owned specialists and overrides (highest precedence)
366
+ ├── user/ repo-local specialists and overrides
239
367
  ├── default/ optional pins / compatibility snapshots; prune stale files
240
- ├── mandatory-rules/ legacy/repo rule overlay compatibility
241
368
  ├── db/ runtime SQLite state (gitignored)
242
369
  ├── jobs/ legacy runtime mirror (gitignored)
243
370
  └── ready/ legacy ready markers (gitignored)
@@ -249,24 +376,33 @@ config/
249
376
  src/ CLI, server, loader, runner, supervisor, MCP tool
250
377
  ```
251
378
 
379
+ ---
380
+
252
381
  ## Core rules
253
382
 
254
383
  - Use `--bead` for tracked work; use `--prompt` only for quick untracked work.
255
- - `--context-depth` controls completed dependency context injection; default is 3 for bead runs.
256
- - `--no-beads` disables tracking bead creation/updates, but it does not disable reading the input bead when `--bead` is provided.
257
- - Edit-capable specialists run in isolated worktrees. Review/fix passes should use `--job <exec-job>` to reuse the same workspace.
258
- - Reviewer PASS is the publish gate. Code-sanity/security/test-runner outputs are advisory evidence, not merge approval.
259
- - Specialists are project-scoped. User-scope specialist discovery is deprecated.
384
+ - Put scope, success criteria, constraints, validation, and output expectations in the bead before dispatch.
385
+ - Use `--context-depth` to inject completed dependency context; default is 3 for bead runs.
386
+ - Use `--job <prior-job>` when a follow-up role must reuse the same worktree.
387
+ - Prefer `sp console`, `sp ps`, `sp feed`, `sp log`, and `sp result` for operations; inspect raw files only for recovery.
388
+ - Keep package defaults canonical. Put machine preferences in `~/.config/specialists/user.json` and repo exceptions in `.specialists/user/`.
389
+ - Run `sp doctor --specialists` and `xt update --apply` when runtime or xtrm-managed assets drift.
260
390
 
261
- ## Deprecated commands
391
+ ---
392
+
393
+ ## Deprecated / compatibility surfaces
262
394
 
263
- These commands are still recognized for migration guidance but are no longer onboarding paths:
395
+ These commands or paths may still exist for migration, but they are not the preferred onboarding path:
264
396
 
265
397
  - `specialists setup`
266
398
  - `specialists install`
267
- - `sp release prepare` / `sp release publish` (deprecated aliases; release flow is skill-driven)
399
+ - `sp init --sync-defaults` for routine setup
400
+ - `.specialists/default/` as an always-synced mirror
401
+ - `sp release prepare` / `sp release publish` aliases (release flow is skill-driven)
268
402
 
269
- Use `sp init`, `xt update`, and the release skill flow instead.
403
+ Use `sp init`, `sp init --global`, `sp setup`, `xt update`, and the release skill flow instead.
404
+
405
+ ---
270
406
 
271
407
  ## Development
272
408
 
@@ -0,0 +1,13 @@
1
+ ---
2
+ name: json-only-final-output
3
+ kind: mandatory-rule
4
+ ---
5
+ Final answer must be **JSON only**.
6
+
7
+ Requirements:
8
+ - No prose before or after the JSON object.
9
+ - No Markdown fences.
10
+ - No headings, bullets, or commentary.
11
+ - Emit exactly one top-level JSON object.
12
+ - Include required top-level keys promised by the specialist contract.
13
+ - If work succeeded but some inner detail is uncertain, keep uncertainty inside JSON fields — never escape into prose.
@@ -7,6 +7,10 @@ Pick the right source before invoking research. Default to the project knowledge
7
7
  - `find-docs` / context7 — library, framework, SDK, CLI, or cloud-service docs (API syntax, config, migration).
8
8
  - `deepwiki` — public GitHub repo internals (architecture, conventions, code paths).
9
9
  - `github-search` (ghgrep) — real-world code patterns and API usage examples.
10
+ - `ddgs` — general web search, no API key (`ddgs text -q "<query>" -m 8`). Discover authoritative URLs for vendor docs, blogs, papers, or proprietary products the above don't cover.
11
+ - `agent-browser` — read/interact with any URL, including JS-rendered pages (`agent-browser open <url>` → `get text body`; close with `agent-browser close --all`).
10
12
  - `last30days` — recent web/social signals (Reddit, X, HN, YouTube). Early-warning only, never authoritative.
11
13
 
14
+ General web (not a library/repo/social topic): use `ddgs` to discover URLs, then `agent-browser` to read them. Never point `agent-browser` at a search engine — headless Chrome gets CAPTCHA-blocked; search with `ddgs` instead. If `ddgs`/`agent-browser` aren't installed, report the gap (`uv tool install ddgs`; `npm i -g agent-browser && agent-browser install`) rather than answering from memory.
15
+
12
16
  Invoke skills on demand, not by default. Cite the source for every external claim.
@@ -0,0 +1,26 @@
1
+ ---
2
+ name: service-skills-diff-scan-mandatory
3
+ kind: mandatory-rule
4
+ ---
5
+ **Phase 2.5 — Diff content scan is mandatory for every drifted service file.**
6
+
7
+ Between Phase 2(c) (Serena cross-check) and Phase 2(d) (classify), run the actual diff body for each territory file that drifted:
8
+
9
+ ```bash
10
+ git diff <last_sync_ref>..HEAD -- <file>
11
+ ```
12
+
13
+ Grep the diff output for these patterns and feed every hit into Phase 2(d) classify:
14
+
15
+ - `^[+-]\s*(raise|except)\b` — new/removed exception sites
16
+ - `^[+-]\s*logger\.(error|critical|warning)` — new/removed error logs
17
+ - `^[+-]\s*[A-Z][A-Z0-9_]+\s*=` — env var keys / config constants
18
+ - `^[+-].*container_name:` — docker container renames
19
+ - `^[+-].*@(app|router)\.(get|post|put|delete)` — endpoint additions/removals (FastAPI/Flask/Express)
20
+ - `^[+-].*image:` — docker image refs (rename detection)
21
+
22
+ **If `last_sync_ref` is unset** (`gitnexus_status: no_ref` or `git diff` returns empty due to missing ref): record `diff-scan-unavailable: no last_sync_ref` in the per-service report and DO NOT emit `audited-and-unchanged`. Treat as a triage-incomplete verdict requiring operator action.
23
+
24
+ **Token budget:** for each drifted file, sample at most ~200 lines of diff (head + tail). If the diff exceeds that, run `gitnexus_impact` on the file's changed symbols and grep for the keyword set instead.
25
+
26
+ This scan is complementary to the gitnexus symbol-graph check — it catches non-symbol drift (renamed env vars, new error strings, renamed containers, new endpoints) that the graph cannot see. It does NOT replace gitnexus triage; `audited-and-unchanged` still requires a cited gitnexus signal in addition to a clean diff scan.
@@ -0,0 +1,5 @@
1
+ ---
2
+ name: service-skills-gitnexus-triage
3
+ kind: mandatory-rule
4
+ ---
5
+ Service-skills drift triage is gitnexus-backed, not string-based. A failed or absent `drift_detector` pre-script (tier=unknown / gitnexus_status=absent|no_ref|cli_error) is NOT license to skip semantic triage: repair gitnexus first (`npx gitnexus analyze`; have the operator run `xt update --apply` if machinery/last_sync_ref is missing), then re-triage. The `audited-and-unchanged` verdict is gitnexus-only — it must cite a gitnexus signal (detect_changes/impact/context) confirming the SKILL.md's Architecture/Data-Flow/Failure-Mode symbols still exist with documented signatures. If gitnexus genuinely cannot run, emit the weaker `synced (string-level only)` verdict, name what was not verified, and flag a follow-up gitnexus pass. Grep/string matching is a secondary cross-check, never the basis for an "unchanged" verdict.
@@ -2,4 +2,4 @@
2
2
  name: test-runner-execution-scope
3
3
  kind: mandatory-rule
4
4
  ---
5
- Run only requested tests. Report failures with root cause and fix hints; do not expand scope.
5
+ Run only requested tests. Exact command input wins over manifest fallback. If fallback is used, label it clearly as fallback. Report failures with root cause, owner classification, and next-recipient hints; do not expand scope.