@jaggerxtrm/specialists 3.17.0 → 3.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. package/README.md +268 -134
  2. package/config/mandatory-rules/json-only-final-output.md +13 -0
  3. package/config/mandatory-rules/service-skills-diff-scan-mandatory.md +26 -0
  4. package/config/mandatory-rules/service-skills-gitnexus-triage.md +5 -0
  5. package/config/skills/setup-specialists/SKILL.md +556 -0
  6. package/config/skills/specialists-creator/SKILL.md +132 -4
  7. package/config/skills/specialists-creator/scripts/audit-spec-uniformity.mjs +1 -1
  8. package/config/specialists/bare.specialist.json +3 -3
  9. package/config/specialists/changelog-drafter.specialist.json +5 -4
  10. package/config/specialists/changelog-keeper.specialist.json +7 -6
  11. package/config/specialists/debugger.specialist.json +2 -2
  12. package/config/specialists/executor.specialist.json +2 -2
  13. package/config/specialists/explorer.specialist.json +4 -4
  14. package/config/specialists/memory-processor.specialist.json +3 -3
  15. package/config/specialists/node-coordinator.specialist.json +3 -3
  16. package/config/specialists/obligations-scanner.specialist.json +67 -17
  17. package/config/specialists/overthinker.specialist.json +3 -3
  18. package/config/specialists/planner.specialist.json +4 -4
  19. package/config/specialists/quant-methodologist.specialist.json +145 -0
  20. package/config/specialists/quant-researcher.specialist.json +144 -0
  21. package/config/specialists/researcher.specialist.json +5 -5
  22. package/config/specialists/reviewer.specialist.json +1 -1
  23. package/config/specialists/seconder.specialist.json +2 -2
  24. package/config/specialists/security-auditor.specialist.json +2 -2
  25. package/config/specialists/service-skills-sync.specialist.json +90 -75
  26. package/config/specialists/specialists-creator.specialist.json +4 -4
  27. package/config/specialists/sync-docs.specialist.json +4 -4
  28. package/config/specialists/test-engineer.specialist.json +3 -3
  29. package/config/specialists/test-runner.specialist.json +7 -7
  30. package/config/specialists/transcriber.specialist.json +3 -3
  31. package/config/specialists/xt-merge.specialist.json +4 -4
  32. package/dist/asset-contract.json +21 -2
  33. package/dist/index.js +25704 -16376
  34. package/dist/lib.js +9849 -6147
  35. package/dist/types/cli/console/components.d.ts +83 -0
  36. package/dist/types/cli/console/components.d.ts.map +1 -0
  37. package/dist/types/cli/console/config-source.d.ts +58 -0
  38. package/dist/types/cli/console/config-source.d.ts.map +1 -0
  39. package/dist/types/cli/console/forensic.d.ts +11 -0
  40. package/dist/types/cli/console/forensic.d.ts.map +1 -0
  41. package/dist/types/cli/console/git.d.ts +28 -0
  42. package/dist/types/cli/console/git.d.ts.map +1 -0
  43. package/dist/types/cli/console/help.d.ts +2 -0
  44. package/dist/types/cli/console/help.d.ts.map +1 -0
  45. package/dist/types/cli/console/log.d.ts +13 -0
  46. package/dist/types/cli/console/log.d.ts.map +1 -0
  47. package/dist/types/cli/console/repo-config.d.ts +26 -0
  48. package/dist/types/cli/console/repo-config.d.ts.map +1 -0
  49. package/dist/types/cli/console/repo-discovery.d.ts +12 -0
  50. package/dist/types/cli/console/repo-discovery.d.ts.map +1 -0
  51. package/dist/types/cli/console/runtime.d.ts +12 -0
  52. package/dist/types/cli/console/runtime.d.ts.map +1 -0
  53. package/dist/types/cli/console/subscribe-prototype.d.ts +18 -0
  54. package/dist/types/cli/console/subscribe-prototype.d.ts.map +1 -0
  55. package/dist/types/cli/console/theme.d.ts +91 -0
  56. package/dist/types/cli/console/theme.d.ts.map +1 -0
  57. package/dist/types/cli/console/types.d.ts +231 -0
  58. package/dist/types/cli/console/types.d.ts.map +1 -0
  59. package/dist/types/cli/console/view-model.d.ts +252 -0
  60. package/dist/types/cli/console/view-model.d.ts.map +1 -0
  61. package/dist/types/cli/console.d.ts +2 -0
  62. package/dist/types/cli/console.d.ts.map +1 -0
  63. package/dist/types/cli/db.d.ts.map +1 -1
  64. package/dist/types/cli/doctor.d.ts.map +1 -1
  65. package/dist/types/cli/edit.d.ts.map +1 -1
  66. package/dist/types/cli/epic.d.ts.map +1 -1
  67. package/dist/types/cli/feed.d.ts.map +1 -1
  68. package/dist/types/cli/forensic.d.ts +2 -0
  69. package/dist/types/cli/forensic.d.ts.map +1 -0
  70. package/dist/types/cli/format-helpers.d.ts +4 -2
  71. package/dist/types/cli/format-helpers.d.ts.map +1 -1
  72. package/dist/types/cli/help.d.ts.map +1 -1
  73. package/dist/types/cli/init.d.ts +10 -0
  74. package/dist/types/cli/init.d.ts.map +1 -1
  75. package/dist/types/cli/list.d.ts.map +1 -1
  76. package/dist/types/cli/log.d.ts.map +1 -1
  77. package/dist/types/cli/metrics.d.ts +2 -0
  78. package/dist/types/cli/metrics.d.ts.map +1 -0
  79. package/dist/types/cli/ps.d.ts.map +1 -1
  80. package/dist/types/cli/result.d.ts.map +1 -1
  81. package/dist/types/cli/run.d.ts +1 -0
  82. package/dist/types/cli/run.d.ts.map +1 -1
  83. package/dist/types/cli/script.d.ts +3 -0
  84. package/dist/types/cli/script.d.ts.map +1 -1
  85. package/dist/types/cli/serve.d.ts.map +1 -1
  86. package/dist/types/cli/setup.d.ts +19 -1
  87. package/dist/types/cli/setup.d.ts.map +1 -1
  88. package/dist/types/cli/status.d.ts.map +1 -1
  89. package/dist/types/cli/version-check.d.ts +1 -0
  90. package/dist/types/cli/version-check.d.ts.map +1 -1
  91. package/dist/types/index.d.ts +1 -1
  92. package/dist/types/pi/session.d.ts +11 -1
  93. package/dist/types/pi/session.d.ts.map +1 -1
  94. package/dist/types/server.d.ts +15 -0
  95. package/dist/types/server.d.ts.map +1 -1
  96. package/dist/types/specialist/benchmarks.d.ts +37 -0
  97. package/dist/types/specialist/benchmarks.d.ts.map +1 -0
  98. package/dist/types/specialist/chain-identity.d.ts +7 -1
  99. package/dist/types/specialist/chain-identity.d.ts.map +1 -1
  100. package/dist/types/specialist/control.d.ts.map +1 -1
  101. package/dist/types/specialist/forensic-events.d.ts +138 -0
  102. package/dist/types/specialist/forensic-events.d.ts.map +1 -0
  103. package/dist/types/specialist/forensic-renderer.d.ts +34 -0
  104. package/dist/types/specialist/forensic-renderer.d.ts.map +1 -0
  105. package/dist/types/specialist/git-diff-evidence.d.ts +28 -0
  106. package/dist/types/specialist/git-diff-evidence.d.ts.map +1 -0
  107. package/dist/types/specialist/global-config.d.ts +389 -0
  108. package/dist/types/specialist/global-config.d.ts.map +1 -0
  109. package/dist/types/specialist/launch.d.ts +1 -0
  110. package/dist/types/specialist/launch.d.ts.map +1 -1
  111. package/dist/types/specialist/live-aggregates.d.ts +46 -0
  112. package/dist/types/specialist/live-aggregates.d.ts.map +1 -0
  113. package/dist/types/specialist/loader.d.ts +50 -1
  114. package/dist/types/specialist/loader.d.ts.map +1 -1
  115. package/dist/types/specialist/model-chain.d.ts +7 -0
  116. package/dist/types/specialist/model-chain.d.ts.map +1 -0
  117. package/dist/types/specialist/model-probes.d.ts +28 -0
  118. package/dist/types/specialist/model-probes.d.ts.map +1 -0
  119. package/dist/types/specialist/node-contract.d.ts +18 -18
  120. package/dist/types/specialist/node-supervisor.d.ts.map +1 -1
  121. package/dist/types/specialist/observability-db.d.ts +1 -1
  122. package/dist/types/specialist/observability-db.d.ts.map +1 -1
  123. package/dist/types/specialist/observability-sqlite.d.ts +25 -0
  124. package/dist/types/specialist/observability-sqlite.d.ts.map +1 -1
  125. package/dist/types/specialist/preset-resolver.d.ts +56 -0
  126. package/dist/types/specialist/preset-resolver.d.ts.map +1 -0
  127. package/dist/types/specialist/prometheus-projection.d.ts +25 -0
  128. package/dist/types/specialist/prometheus-projection.d.ts.map +1 -0
  129. package/dist/types/specialist/runner.d.ts +26 -1
  130. package/dist/types/specialist/runner.d.ts.map +1 -1
  131. package/dist/types/specialist/schema.d.ts +163 -54
  132. package/dist/types/specialist/schema.d.ts.map +1 -1
  133. package/dist/types/specialist/script-runner.d.ts +5 -1
  134. package/dist/types/specialist/script-runner.d.ts.map +1 -1
  135. package/dist/types/specialist/snapshot-diff.d.ts +8 -0
  136. package/dist/types/specialist/snapshot-diff.d.ts.map +1 -0
  137. package/dist/types/specialist/source-queue.d.ts +13 -0
  138. package/dist/types/specialist/source-queue.d.ts.map +1 -0
  139. package/dist/types/specialist/supervisor.d.ts +15 -1
  140. package/dist/types/specialist/supervisor.d.ts.map +1 -1
  141. package/dist/types/specialist/timeline-events.d.ts +68 -1
  142. package/dist/types/specialist/timeline-events.d.ts.map +1 -1
  143. package/dist/types/tools/specialist/resume_specialist.tool.d.ts +4 -4
  144. package/dist/types/tools/specialist/specialist_status.tool.d.ts +1 -1
  145. package/dist/types/tools/specialist/steer_specialist.tool.d.ts +4 -4
  146. package/dist/types/tools/specialist/use_specialist.tool.d.ts +16 -16
  147. package/docs/ARCHITECTURE.md +1176 -0
  148. package/docs/TODO.md +9 -0
  149. package/docs/architecture.md +11 -0
  150. package/docs/archive/2026-03-13-bd-decision-context-template-plan.md +96 -0
  151. package/docs/archive/AGENT-HANDOFF.md +351 -0
  152. package/docs/archive/PARITY-ANALYSIS.md +296 -0
  153. package/docs/archive/SPECIALISTS_REFACTOR.md.md +30 -0
  154. package/docs/archive/cc-programmatic.md +216 -0
  155. package/docs/archive/claude-agent-sdk.md +594 -0
  156. package/docs/archive/decision-specialist-directory.md +41 -0
  157. package/docs/archive/discoveries.md +148 -0
  158. package/docs/archive/executor-benchmark-protocol.md +198 -0
  159. package/docs/archive/future-features.md +66 -0
  160. package/docs/archive/gzrx-completion-critique.md +183 -0
  161. package/docs/archive/gzrx-research-notes.md +401 -0
  162. package/docs/archive/gzrx-tool-catalog.md +760 -0
  163. package/docs/archive/iron-review-hardening-qa-chain-substrate.md +322 -0
  164. package/docs/archive/iron-review-hardening.html +1004 -0
  165. package/docs/archive/issuetracking.md +312 -0
  166. package/docs/archive/qa-v3.0.2.md +220 -0
  167. package/docs/archive/restructure.md +231 -0
  168. package/docs/archive/script-specialists.md +1254 -0
  169. package/docs/archive/spec-v3.md +792 -0
  170. package/docs/archive/specialist-stats.md +127 -0
  171. package/docs/archive/specialists-friction-audit.md +1347 -0
  172. package/docs/archive/specialists-runtime-critique.md +170 -0
  173. package/docs/archive/specialists-service-evaluation.md +713 -0
  174. package/docs/archive/specialists-substrate-alignment.md +255 -0
  175. package/docs/archive/substrate-review.md +1288 -0
  176. package/docs/archive/test-writer-specialist.md +254 -0
  177. package/docs/archive/using-specialists-v3-improvements-2026-05-09.md +600 -0
  178. package/docs/archive/xtrm-specialists-analysis.md +314 -0
  179. package/docs/authoring.md +701 -0
  180. package/docs/background-jobs.md +203 -0
  181. package/docs/bare-specialists.md +83 -0
  182. package/docs/benchmarks/executor-benchmark-runner.md +66 -0
  183. package/docs/bootstrap.md +161 -0
  184. package/docs/cli-reference.md +1645 -0
  185. package/docs/deploying-alongside.md +155 -0
  186. package/docs/design/README.md +36 -0
  187. package/docs/design/darth-feedor-migration.md +290 -0
  188. package/docs/design/roadmap/README.md +32 -0
  189. package/docs/design/roadmap/chain-templates/README.md +146 -0
  190. package/docs/design/roadmap/chain-templates/code-quick.formula.json +27 -0
  191. package/docs/design/roadmap/chain-templates/code-standard.formula.json +126 -0
  192. package/docs/design/roadmap/chain-templates/code-with-advisors.formula.json +128 -0
  193. package/docs/design/roadmap/chain-templates/code-with-tests.formula.json +76 -0
  194. package/docs/design/roadmap/chain-templates/debug.formula.json +128 -0
  195. package/docs/design/roadmap/chain-templates/doc-sync.formula.json +28 -0
  196. package/docs/design/roadmap/chain-templates/memory-hygiene.formula.json +27 -0
  197. package/docs/design/roadmap/chain-templates/planning.formula.json +27 -0
  198. package/docs/design/roadmap/chain-templates/premortem.formula.json +26 -0
  199. package/docs/design/roadmap/chain-templates/release-prep.formula.json +36 -0
  200. package/docs/design/roadmap/chain-templates/research-only.formula.json +28 -0
  201. package/docs/design/roadmap/chain-templates/restitch.formula.json +125 -0
  202. package/docs/design/roadmap/chain-templates/security-deep.formula.json +161 -0
  203. package/docs/design/roadmap/chain-templates/test-only.formula.json +52 -0
  204. package/docs/design/roadmap/chain-templates/triage.formula.json +35 -0
  205. package/docs/design/roadmap/history/handoff-from-substrate-design.md +87 -0
  206. package/docs/design/roadmap/history/substrate-reconciliation.md +105 -0
  207. package/docs/design/roadmap/specialists-roadmap.md +1193 -0
  208. package/docs/design/sp-console-subscribe-via-materializer.md +231 -0
  209. package/docs/design/sp-console-tui-mock-v2.html +293 -0
  210. package/docs/design/sp-console-tui-mock.html +120 -0
  211. package/docs/design/sp-console-tui.md +340 -0
  212. package/docs/design/specialist-agentops-suite.md +323 -0
  213. package/docs/design/substrate/channels.md +14 -0
  214. package/docs/design/substrate/devops-platform-engineering-prd.md +446 -0
  215. package/docs/design/substrate/html-design-example.md +339 -0
  216. package/docs/design/xtrm-tiers-architecture.svg +132 -0
  217. package/docs/devops/dependency-verdict-materialization.md +46 -0
  218. package/docs/epic-readiness.md +75 -0
  219. package/docs/examples/mercury-atomic-summarizer.specialist.json +26 -0
  220. package/docs/examples/smoke-echo-text-expected-keys.specialist.json +25 -0
  221. package/docs/examples/smoke-echo.specialist.json +25 -0
  222. package/docs/features.md +1577 -0
  223. package/docs/hooks.md +81 -0
  224. package/docs/installation.md +142 -0
  225. package/docs/manifest.md +184 -0
  226. package/docs/mcp-servers.md +73 -0
  227. package/docs/mcp-tools.md +71 -0
  228. package/docs/nodes.md +231 -0
  229. package/docs/observability-metrics.md +152 -0
  230. package/docs/operator/sp-console-v2-walkthrough.md +410 -0
  231. package/docs/overrides-guide.md +306 -0
  232. package/docs/pi-rpc-boundary.md +118 -0
  233. package/docs/pi-session.md +195 -0
  234. package/docs/release.md +22 -0
  235. package/docs/skills.md +132 -0
  236. package/docs/specialists/handoff-schema.md +181 -0
  237. package/docs/specialists-catalog.md +99 -0
  238. package/docs/specialists-service-install.md +226 -0
  239. package/docs/specialists-service.md +363 -0
  240. package/docs/surface-ownership.md +138 -0
  241. package/docs/upgrade-notes/kan-90-global-user-config.md +114 -0
  242. package/docs/upgrade-notes/kan-91-expanded-overrides.md +261 -0
  243. package/docs/workflow.md +114 -0
  244. package/docs/worktree.md +71 -0
  245. package/docs/worktrees.md +309 -0
  246. package/package.json +6 -3
@@ -0,0 +1,28 @@
1
+ {
2
+ "formula": "doc-sync",
3
+ "type": "workflow",
4
+ "version": 1,
5
+ "description": "Single-document drift-aware update. sync-docs reads scoped report/commit context + the target doc + applies minimal-diff updates. For one doc at a time — not broad rewrites, not multi-doc audits.",
6
+ "vars": {
7
+ "root_title": { "default": "Sync doc with recent changes", "required": false },
8
+ "doc_path": { "default": "docs/README.md", "required": false },
9
+ "context_scope": { "default": "src/**", "required": false }
10
+ },
11
+ "steps": [
12
+ {
13
+ "id": "root",
14
+ "title": "{{root_title}}",
15
+ "type": "chore",
16
+ "description": "PROBLEM: doc at {{doc_path}} has drifted from current code/behavior. Reconcile minimal-diff.\nSCOPE: {{doc_path}} only.\nNON_GOALS: no broad rewrites; no style changes; no other docs touched; no code edits.\nVALIDATION: doc accurately describes current behavior in {{context_scope}}; no orphan references to removed symbols.\nACCEPTANCE: doc is current; minimal diff (preserves existing structure where accurate).\n\nDoc-sync chain — single-doc drift update.",
17
+ "labels": ["chain-root", "kind:root", "type:chore", "documentation"]
18
+ },
19
+ {
20
+ "id": "sync-docs",
21
+ "title": "sync-docs:{{root_title}}",
22
+ "type": "task",
23
+ "needs": ["root"],
24
+ "description": "MANDATE: single-document drift-aware update. Read doc + relevant code context + recent commits/reports; apply minimal-diff edits to reconcile.\nINPUTS: {{doc_path}} current content; {{context_scope}} current code; recent xt reports referencing related changes.\nOUTPUTS: edited {{doc_path}} with minimal diff. Preserve structure; update content. Drift-detector pre-script runs before specialist starts.\nSCOPE: {{doc_path}} only.\nNON_GOALS: no broad rewrites; no style changes; no multi-doc audits; no code edits.",
25
+ "labels": ["chain-step", "kind:step", "role:sync-docs", "edge:implements->root"]
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "formula": "memory-hygiene",
3
+ "type": "workflow",
4
+ "version": 1,
5
+ "description": "Memory consolidation pass. memory-processor curates persistent project memory into .xtrm/memory.md. Use after many closed runs or when stale/contradictory memories accumulate (e.g., post-epic completion). Single specialist, writes memory summary only.",
6
+ "vars": {
7
+ "root_title": { "default": "Memory hygiene pass", "required": false },
8
+ "trigger_reason": { "default": "post-epic-close", "required": false }
9
+ },
10
+ "steps": [
11
+ {
12
+ "id": "root",
13
+ "title": "{{root_title}}",
14
+ "type": "chore",
15
+ "description": "PROBLEM: persistent project memory has accumulated stale, redundant, or contradictory entries. Reason: {{trigger_reason}}.\nSCOPE: .xtrm/memory.md + bd memories (project-scope).\nNON_GOALS: no code edits; no bd issue edits; no specialist edits; no removal of memories that are still relevant (only consolidate / dedupe / archive stale).\nVALIDATION: memory.md is current, dedupe'd, contradictions resolved. Bulk-export pre-script runs before specialist starts.\nACCEPTANCE: future sessions read consolidated memory and pick up relevant context faster.\n\nMemory hygiene chain — curates persistent memory.",
16
+ "labels": ["chain-root", "kind:root", "type:chore", "memory", "hygiene"]
17
+ },
18
+ {
19
+ "id": "memory-processor",
20
+ "title": "memory-processor:{{root_title}}",
21
+ "type": "task",
22
+ "needs": ["root"],
23
+ "description": "MANDATE: curate persistent project memory. Dedupe duplicates; consolidate related memories; archive stale (older than relevance window without recent reference); resolve contradictions (newest-wins unless explicitly marked); update .xtrm/memory.md with the consolidated summary.\nINPUTS: bd memories (full list, JSON); current .xtrm/memory.md; recent activity surface (which memories were referenced recently).\nOUTPUTS: edited .xtrm/memory.md with consolidated summary; structured report of: dedupe count, consolidate count, archive count, contradictions resolved. Optionally: list of bd kv keys to forget.\nSCOPE: .xtrm/memory.md + memory-processor's own bd queries.\nNON_GOALS: no code edits; no bd issue edits; no memories removed without explicit archive reason.",
24
+ "labels": ["chain-step", "kind:step", "role:memory-processor", "edge:implements->root"]
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "formula": "planning",
3
+ "type": "workflow",
4
+ "version": 1,
5
+ "description": "Turn vague feature/initiative into a phased bd issue board with dependencies and test planning. Single specialist (planner, HIGH-authority). Output is an executable bd issue graph the operator dispatches subsequent chains against.",
6
+ "vars": {
7
+ "root_title": { "default": "Untitled initiative", "required": false },
8
+ "scope": { "default": "src/**", "required": false }
9
+ },
10
+ "steps": [
11
+ {
12
+ "id": "root",
13
+ "title": "{{root_title}}",
14
+ "type": "task",
15
+ "description": "PROBLEM: (the broad initiative — what we want to deliver and why)\nSCOPE: {{scope}} (initial; planner may propose expansion)\nNON_GOALS: NO implementation in this chain — planning only; no architecture decisions beyond what's needed for phasing.\nVALIDATION: planner produces a phased bd issue board with dependencies; each phase has acceptance criteria; test planning included.\nACCEPTANCE: operator can dispatch sub-chains against the planned board.\n\nPlanning chain — turn vague into structured work graph.",
16
+ "labels": ["chain-root", "kind:root", "type:task", "planning"]
17
+ },
18
+ {
19
+ "id": "planner",
20
+ "title": "planner:{{root_title}}",
21
+ "type": "task",
22
+ "needs": ["root"],
23
+ "description": "MANDATE: turn root's initiative into a phased bd issue board with dependencies, test planning, and acceptance criteria per phase. HIGH planning authority.\nINPUTS: root's PROBLEM + SCOPE; current codebase shape (read via grep/find/explorer-equivalent capability).\nOUTPUTS: bd issues created via bd create with proper --parent/--deps; each issue has change-contract sections; phases identified; companion test issues filed. Final summary memo lists the bead-ids + phase order.\nSCOPE: bd graph + design proposals; no code edits.\nNON_GOALS: no implementation; no architecture lock-in beyond what's needed to phase; no test execution.",
24
+ "labels": ["chain-step", "kind:step", "role:planner", "edge:implements->root"]
25
+ }
26
+ ]
27
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "formula": "premortem",
3
+ "type": "workflow",
4
+ "version": 1,
5
+ "description": "Devil's-advocate review of a risky design / architecture / tradeoff decision BEFORE implementation. Single specialist (overthinker, READ_ONLY, 4-phase chain-of-thought). Output is a structured premortem memo with explicit uncertainty + actionable mitigations. Forces the orchestrator to consult overthinker before high-stakes work.",
6
+ "vars": {
7
+ "root_title": { "default": "Risky design premortem", "required": false }
8
+ },
9
+ "steps": [
10
+ {
11
+ "id": "root",
12
+ "title": "{{root_title}}",
13
+ "type": "decision",
14
+ "description": "PROBLEM: (the risky design / architecture choice / tradeoff being considered)\nSCOPE: design space; no specific file scope (this is pre-impl analysis).\nNON_GOALS: NO implementation; no architecture lock-in (premortem informs the decision, doesn't make it); no executor dispatch from this chain.\nVALIDATION: overthinker produces 4-phase premortem memo (initial analysis → critique → synthesis → distilled recommendation).\nACCEPTANCE: operator has explicit list of risks + mitigations + uncertainty markers; operator decides whether to proceed, modify, or abandon.\n\nPremortem chain — devil's advocate before commitment.",
15
+ "labels": ["chain-root", "kind:root", "type:decision", "premortem", "scope-empty:code"]
16
+ },
17
+ {
18
+ "id": "overthinker",
19
+ "title": "overthinker:{{root_title}}",
20
+ "type": "task",
21
+ "needs": ["root"],
22
+ "description": "MANDATE: 4-phase devil's-advocate review of root's design proposal. READ_ONLY.\nINPUTS: root's PROBLEM + design proposal narrative.\nOUTPUTS: structured 4-phase markdown:\n Phase 1 — Initial Analysis: goals, constraints, assumptions, unknowns.\n Phase 2 — Devil's Advocate: challenge every assumption; what could go wrong; what was missed; steelman opposing views.\n Phase 3 — Synthesis: integrate critiques; resolve contradictions; acknowledge tradeoffs.\n Phase 4 — Final Answer: distilled recommendation with explicit uncertainty + concrete mitigations.\nSCOPE: design space; no file scope.\nNON_GOALS: NO file edits; no implementation; no architecture decisions (recommend, don't decide).",
23
+ "labels": ["chain-step", "kind:step", "role:overthinker", "edge:informs->root", "advisor:standalone"]
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,36 @@
1
+ {
2
+ "formula": "release-prep",
3
+ "type": "workflow",
4
+ "version": 1,
5
+ "description": "Release preparation. Reconciles [Unreleased] CHANGELOG.md from xt reports + commit subjects in a tag range. changelog-drafter (READ_ONLY) produces bundle synthesis first; changelog-keeper edits CHANGELOG.md. Does NOT bump version, build, commit, tag, push, or publish — operator handles those via /releasing skill.",
6
+ "vars": {
7
+ "root_title": { "default": "Release prep", "required": false },
8
+ "prev_tag": { "default": "HEAD~50", "required": false },
9
+ "next_tag": { "default": "HEAD", "required": false }
10
+ },
11
+ "steps": [
12
+ {
13
+ "id": "root",
14
+ "title": "{{root_title}}",
15
+ "type": "chore",
16
+ "description": "PROBLEM: prepare release by reconciling [Unreleased] CHANGELOG.md from {{prev_tag}}..{{next_tag}}.\nSCOPE: CHANGELOG.md only.\nNON_GOALS: no version bump; no build; no commit/tag/push/publish; no code edits.\nVALIDATION: CHANGELOG.md [Unreleased] section populated with Added/Changed/Fixed/Removed entries reflecting commits + xt reports in range.\nACCEPTANCE: operator runs /releasing and sees populated [Unreleased] ready for version bump.\n\nRelease prep chain: drafter synthesizes, keeper writes.",
17
+ "labels": ["chain-root", "kind:root", "type:chore", "release"]
18
+ },
19
+ {
20
+ "id": "changelog-drafter",
21
+ "title": "changelog-drafter:{{root_title}}",
22
+ "type": "task",
23
+ "needs": ["root"],
24
+ "description": "MANDATE: READ_ONLY bundle synthesis from {{prev_tag}}..{{next_tag}}. Group commits and xt reports by category (Added/Changed/Fixed/Removed).\nINPUTS: git log {{prev_tag}}..{{next_tag}}; .xtrm/reports/*.md in range.\nOUTPUTS: structured draft markdown — categorized bullet list with PR/commit refs. No file edits.\nSCOPE: read-only synthesis.\nNON_GOALS: no edits; no publishing; no tagging.",
25
+ "labels": ["chain-step", "kind:step", "role:changelog-drafter", "edge:informs->root", "advisor:pre-impl"]
26
+ },
27
+ {
28
+ "id": "changelog-keeper",
29
+ "title": "changelog-keeper:{{root_title}}",
30
+ "type": "task",
31
+ "needs": ["changelog-drafter"],
32
+ "description": "MANDATE: edit CHANGELOG.md [Unreleased] section using drafter's structured draft.\nINPUTS: changelog-drafter's draft; current CHANGELOG.md.\nOUTPUTS: edited CHANGELOG.md with [Unreleased] populated. Preserves existing entries below [Unreleased]. Single-file diff.\nSCOPE: CHANGELOG.md only.\nNON_GOALS: no version bump; no build; no commit/tag/push/publish; no other files touched.",
33
+ "labels": ["chain-step", "kind:step", "role:changelog-keeper", "edge:implements->root"]
34
+ }
35
+ ]
36
+ }
@@ -0,0 +1,28 @@
1
+ {
2
+ "formula": "research-only",
3
+ "type": "workflow",
4
+ "version": 1,
5
+ "description": "Investigation that deliberately does NOT produce code. Single specialist (default: explorer for local codebase; operator overrides to researcher for external sources). Output is a findings memo — saved to bd notes + optionally to a design doc. Use for: pre-feature research, post-mortem investigation, exploratory mapping.",
6
+ "vars": {
7
+ "root_title": { "default": "Untitled investigation", "required": false },
8
+ "scope": { "default": "src/**", "required": false },
9
+ "specialist": { "default": "explorer", "required": false }
10
+ },
11
+ "steps": [
12
+ {
13
+ "id": "root",
14
+ "title": "{{root_title}}",
15
+ "type": "task",
16
+ "description": "PROBLEM: (the question being investigated)\nSCOPE: {{scope}} (or external research target)\nNON_GOALS: NO CODE CHANGES (this is research-only); no implementation; no design decisions (those go through separate planning chain).\nVALIDATION: findings memo produced; cites concrete evidence (file:line for code; URL+date for external).\nACCEPTANCE: operator has structured evidence to inform a follow-up decision.\n\nResearch-only chain. Single specialist ({{specialist}}). If external sources needed, override to researcher; if internal codebase, keep default explorer.",
17
+ "labels": ["chain-root", "kind:root", "type:task", "research", "scope-empty:code"]
18
+ },
19
+ {
20
+ "id": "investigation",
21
+ "title": "{{specialist}}:{{root_title}}",
22
+ "type": "task",
23
+ "needs": ["root"],
24
+ "description": "MANDATE: READ_ONLY investigation. Produce structured findings memo answering root's PROBLEM.\nINPUTS: root contract; relevant code in {{scope}} (for explorer) OR external sources (for researcher).\nOUTPUTS: structured findings — for explorer: call flows, dependencies, file:line evidence; for researcher: ecosystem evidence with URL+date citations. Markdown format.\nSCOPE: research-only.\nNON_GOALS: NO CODE EDITS; no implementation recommendations beyond what root asked.",
25
+ "labels": ["chain-step", "kind:step", "role:{{specialist}}", "edge:informs->root", "advisor:standalone"]
26
+ }
27
+ ]
28
+ }
@@ -0,0 +1,125 @@
1
+ {
2
+ "formula": "restitch",
3
+ "type": "workflow",
4
+ "version": 1,
5
+ "description": "Conflict recovery after a failed merge. Debugger investigates the conflict + applies targeted resolution + re-validates. Seconder + QA pipeline apply after the fix.",
6
+ "vars": {
7
+ "root_title": {
8
+ "default": "Restitch failed merge",
9
+ "required": false
10
+ },
11
+ "conflict_source": {
12
+ "default": "",
13
+ "required": false
14
+ }
15
+ },
16
+ "steps": [
17
+ {
18
+ "id": "root",
19
+ "title": "{{root_title}}",
20
+ "type": "bug",
21
+ "description": "PROBLEM: failed merge / conflict / restitch needed. Source: {{conflict_source}}\nSCOPE: the conflicted files identified by the failed merge.\nNON_GOALS: no scope expansion beyond conflict resolution; no refactoring; no feature additions.\nVALIDATION: targeted tests for the conflicted scope pass; integration smoke OK.\nACCEPTANCE: chain branch is mergeable cleanly to integration target.\n\nRestitch chain: debugger investigates + resolves + re-validates.",
22
+ "labels": [
23
+ "chain-root",
24
+ "kind:root",
25
+ "type:bug",
26
+ "restitch",
27
+ "conflict-recovery"
28
+ ]
29
+ },
30
+ {
31
+ "id": "debugger",
32
+ "title": "debugger:{{root_title}}",
33
+ "type": "task",
34
+ "needs": [
35
+ "root"
36
+ ],
37
+ "description": "MANDATE: investigate conflict from {{conflict_source}}; identify whose change should win (upstream vs chain) per-hunk; apply minimal-diff resolution; re-run targeted validation.\nINPUTS: root's conflict description; git status output; conflicted files.\nOUTPUTS: resolved diff on chain branch; conflict-resolution rationale per hunk; passing targeted tests.\nSCOPE: conflicted files only.\nNON_GOALS: no scope creep; no refactoring; no `--no-verify`.",
38
+ "labels": [
39
+ "chain-step",
40
+ "kind:step",
41
+ "role:debugger",
42
+ "edge:implements->root",
43
+ "non-skippable:true"
44
+ ]
45
+ },
46
+ {
47
+ "id": "seconder",
48
+ "title": "seconder:{{root_title}}",
49
+ "type": "task",
50
+ "needs": [
51
+ "debugger"
52
+ ],
53
+ "description": "MANDATE: fused scope/compliance + quality gate on debugger's diff.\nINPUTS: debugger's diff; root contract.\nOUTPUTS: verdict JSON with scope_verdict, scope_findings, quality_verdict, quality_findings, overall_verdict.\nSCOPE: same as root.\nNON_GOALS: no edits.",
54
+ "labels": [
55
+ "chain-step",
56
+ "kind:step",
57
+ "role:seconder",
58
+ "edge:validates->debugger",
59
+ "gate:mandatory"
60
+ ]
61
+ },
62
+ {
63
+ "id": "test-engineer",
64
+ "title": "test-engineer:{{root_title}}",
65
+ "type": "task",
66
+ "needs": [
67
+ "seconder"
68
+ ],
69
+ "description": "MANDATE: write tests against the actual diff.\nINPUTS: debugger's diff; seconder verdict; root contract.\nOUTPUTS: tests, fixtures, smoke scripts, telemetry assertions, exact test-runner commands.\nSCOPE: test paths plus diff-adjacent harness code.\nNON_GOALS: no production source edits unless root explicitly authorizes helper/export change.",
70
+ "labels": [
71
+ "chain-step",
72
+ "kind:step",
73
+ "role:test-engineer",
74
+ "edge:validates->debugger"
75
+ ]
76
+ },
77
+ {
78
+ "id": "test-runner",
79
+ "title": "test-runner:{{root_title}}",
80
+ "type": "task",
81
+ "needs": [
82
+ "test-engineer"
83
+ ],
84
+ "description": "MANDATE: execute exact commands supplied by test-engineer and classify failures by owner.\nINPUTS: exact commands; tests; telemetry assertions.\nOUTPUTS: pass/fail counts, artifact evidence, owner routing, rerun guidance.\nSCOPE: requested commands only; fallback must be labeled.\nNON_GOALS: no edits; no scope expansion.",
85
+ "labels": [
86
+ "chain-step",
87
+ "kind:step",
88
+ "role:test-runner",
89
+ "gate:mandatory"
90
+ ]
91
+ },
92
+ {
93
+ "id": "obligations-scanner",
94
+ "title": "obligations-scanner:{{root_title}}",
95
+ "type": "task",
96
+ "needs": [
97
+ "test-runner"
98
+ ],
99
+ "description": "MANDATE: scan debugger's diff for unstructured markers in production code.\nINPUTS: debugger's diff.\nOUTPUTS: CLEAN | OBLIGATIONS_FOUND | BLOCKED.\nSCOPE: same as root.\nNON_GOALS: no edits.",
100
+ "labels": [
101
+ "chain-step",
102
+ "kind:step",
103
+ "role:obligations-scanner",
104
+ "edge:validates->debugger",
105
+ "gate:mandatory"
106
+ ]
107
+ },
108
+ {
109
+ "id": "reviewer",
110
+ "title": "reviewer:{{root_title}}",
111
+ "type": "task",
112
+ "needs": [
113
+ "obligations-scanner"
114
+ ],
115
+ "description": "MANDATE: compliance reviewer; verify restitch resolves the conflict without regressing the chain's intent.\nINPUTS: debugger diff + seconder verdict + obligations-scanner output + root's conflict context + chain's original intent.\nOUTPUTS: verdict PASS|PARTIAL|FAIL + Release Checklist.\nSCOPE: conflicted files + integration concerns.\nNON_GOALS: no edits; do not extend scope to non-conflict items.",
116
+ "labels": [
117
+ "chain-step",
118
+ "kind:step",
119
+ "role:reviewer",
120
+ "edge:validates->root",
121
+ "gate:final"
122
+ ]
123
+ }
124
+ ]
125
+ }
@@ -0,0 +1,161 @@
1
+ {
2
+ "formula": "security-deep",
3
+ "type": "workflow",
4
+ "version": 1,
5
+ "description": "Sensitive-surface chain. Security-auditor runs TWICE: as advisor before executor (threat modeling + recommendations) and as gate after test-runner (validates implementation). For changes touching auth, secrets, crypto, migrations, agent/MCP config, lockfiles, GitHub workflows, permissions. Scrutiny defaults to critical.",
6
+ "vars": {
7
+ "root_title": {
8
+ "default": "Untitled sensitive change",
9
+ "required": false
10
+ },
11
+ "scope": {
12
+ "default": "src/**",
13
+ "required": false
14
+ },
15
+ "scrutiny": {
16
+ "default": "critical",
17
+ "required": false
18
+ }
19
+ },
20
+ "steps": [
21
+ {
22
+ "id": "root",
23
+ "title": "{{root_title}}",
24
+ "type": "task",
25
+ "description": "PROBLEM: (sensitive-surface change; specify auth/secrets/crypto/migration/config aspect)\nSCOPE: {{scope}}\nNON_GOALS: (fill in)\nVALIDATION: (tests + security smoke)\nACCEPTANCE: (functional + security invariants preserved)\n\nSensitive surface. Security-auditor runs pre (advisor) AND post (gate). Reviewer scrutiny={{scrutiny}}; reviewer may auto-escalate further on surface table match.",
26
+ "labels": [
27
+ "chain-root",
28
+ "kind:root",
29
+ "scrutiny:{{scrutiny}}",
30
+ "surface:sensitive"
31
+ ]
32
+ },
33
+ {
34
+ "id": "security-auditor-advisor",
35
+ "title": "security-auditor-advisor:{{root_title}}",
36
+ "type": "task",
37
+ "needs": [
38
+ "root"
39
+ ],
40
+ "description": "MANDATE: LOW-permission threat-modeling pass BEFORE executor. Identify attack surface, dependency risks, auth/secret/crypto invariants.\nINPUTS: root contract; current code at {{scope}}.\nOUTPUTS: structured recommendations for executor — invariants to preserve, tests to add, library/config choices to avoid. Cite CVE/CWE refs where applicable.\nSCOPE: {{scope}} and adjacent security boundaries.\nNON_GOALS: no edits; no exploits; recommendations only.",
41
+ "labels": [
42
+ "chain-step",
43
+ "kind:step",
44
+ "role:security-auditor",
45
+ "phase:advisor",
46
+ "edge:informs->root"
47
+ ]
48
+ },
49
+ {
50
+ "id": "executor",
51
+ "title": "executor:{{root_title}}",
52
+ "type": "task",
53
+ "needs": [
54
+ "security-auditor-advisor"
55
+ ],
56
+ "description": "MANDATE: implement root's deliverable per its contract, applying security-auditor-advisor's recommendations.\nINPUTS: root contract + security-auditor-advisor's structured recommendations.\nOUTPUTS: diff on chain branch satisfying ACCEPTANCE; tests per VALIDATION; security invariants preserved.\nSCOPE: same as root.\nNON_GOALS: no `--no-verify`; no scope creep into adjacent security surfaces unless advisor flagged.",
57
+ "labels": [
58
+ "chain-step",
59
+ "kind:step",
60
+ "role:executor",
61
+ "edge:implements->root"
62
+ ]
63
+ },
64
+ {
65
+ "id": "seconder",
66
+ "title": "seconder:{{root_title}}",
67
+ "type": "task",
68
+ "needs": [
69
+ "executor"
70
+ ],
71
+ "description": "MANDATE: fused scope/compliance + quality gate on executor's diff.\nINPUTS: executor's diff; root contract.\nOUTPUTS: verdict JSON with scope_verdict, scope_findings, quality_verdict, quality_findings, overall_verdict.\nSCOPE: same as root.\nNON_GOALS: no edits.",
72
+ "labels": [
73
+ "chain-step",
74
+ "kind:step",
75
+ "role:seconder",
76
+ "edge:validates->executor",
77
+ "gate:mandatory"
78
+ ]
79
+ },
80
+ {
81
+ "id": "test-engineer",
82
+ "title": "test-engineer:{{root_title}}",
83
+ "type": "task",
84
+ "needs": [
85
+ "seconder"
86
+ ],
87
+ "description": "MANDATE: write tests, fixtures, smoke scripts, and telemetry assertions against the actual diff.\nINPUTS: executor's diff; seconder verdict; root contract.\nOUTPUTS: tests, fixtures, smoke scripts, telemetry assertions, exact test-runner commands.\nSCOPE: test paths plus diff-adjacent harness code.\nNON_GOALS: no production source edits unless root explicitly authorizes helper/export change.",
88
+ "labels": [
89
+ "chain-step",
90
+ "kind:step",
91
+ "role:test-engineer",
92
+ "edge:validates->executor"
93
+ ]
94
+ },
95
+ {
96
+ "id": "test-runner",
97
+ "title": "test-runner:{{root_title}}",
98
+ "type": "task",
99
+ "needs": [
100
+ "test-engineer"
101
+ ],
102
+ "description": "MANDATE: execute exact commands supplied by test-engineer and classify failures by owner.\nINPUTS: exact commands; tests; telemetry assertions.\nOUTPUTS: pass/fail counts, artifact evidence, owner routing, rerun guidance.\nSCOPE: requested commands only; fallback must be labeled.\nNON_GOALS: no edits; no scope expansion.",
103
+ "labels": [
104
+ "chain-step",
105
+ "kind:step",
106
+ "role:test-runner",
107
+ "gate:mandatory"
108
+ ]
109
+ },
110
+ {
111
+ "id": "security-auditor-gate",
112
+ "title": "security-auditor-gate:{{root_title}}",
113
+ "type": "task",
114
+ "needs": [
115
+ "test-runner"
116
+ ],
117
+ "description": "MANDATE: LOW-permission validation pass AFTER test-runner. Validate executor's diff against security-auditor-advisor's recommendations + general security review.\nINPUTS: executor's diff; security-auditor-advisor's recommendations; test evidence.\nOUTPUTS: verdict OK or FINDINGS (with severity + remediation). Reviewer treats OK as pre-condition for PASS.\nSCOPE: same as root.\nNON_GOALS: no edits; no exploits.",
118
+ "labels": [
119
+ "chain-step",
120
+ "kind:step",
121
+ "role:security-auditor",
122
+ "phase:gate",
123
+ "edge:validates->executor",
124
+ "gate:mandatory"
125
+ ]
126
+ },
127
+ {
128
+ "id": "obligations-scanner",
129
+ "title": "obligations-scanner:{{root_title}}",
130
+ "type": "task",
131
+ "needs": [
132
+ "test-runner"
133
+ ],
134
+ "description": "MANDATE: scan executor's diff for unstructured markers.\nINPUTS: executor's diff.\nOUTPUTS: CLEAN | OBLIGATIONS_FOUND | BLOCKED.\nSCOPE: same as root.\nNON_GOALS: no edits.",
135
+ "labels": [
136
+ "chain-step",
137
+ "kind:step",
138
+ "role:obligations-scanner",
139
+ "edge:validates->executor",
140
+ "gate:mandatory"
141
+ ]
142
+ },
143
+ {
144
+ "id": "reviewer",
145
+ "title": "reviewer:{{root_title}}",
146
+ "type": "task",
147
+ "needs": [
148
+ "security-auditor-gate",
149
+ "obligations-scanner"
150
+ ],
151
+ "description": "MANDATE: compliance reviewer at SCRUTINY={{scrutiny}} (critical by default for this template).\nINPUTS: executor diff + seconder verdict + security-auditor-gate verdict + obligations-scanner output + advisor recommendations + root contract.\nOUTPUTS: verdict PASS|PARTIAL|FAIL + Release Checklist with security-specific items.\nSCOPE: same as root.\nNON_GOALS: no edits; do not waive security-auditor-gate findings.",
152
+ "labels": [
153
+ "chain-step",
154
+ "kind:step",
155
+ "role:reviewer",
156
+ "edge:validates->root",
157
+ "gate:final"
158
+ ]
159
+ }
160
+ ]
161
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "formula": "test-only",
3
+ "type": "workflow",
4
+ "version": 1,
5
+ "description": "Single-writer test chain. test-engineer is primary writer, seconder validates scope+quality, test-runner executes exact commands, reviewer closes. No production diff by default.",
6
+ "vars": {
7
+ "root_title": { "default": "Untitled tests", "required": false },
8
+ "scope": { "default": "tests/**", "required": false },
9
+ "scrutiny": { "default": "medium", "required": false }
10
+ },
11
+ "steps": [
12
+ {
13
+ "id": "root",
14
+ "title": "{{root_title}}",
15
+ "type": "task",
16
+ "description": "PROBLEM: (fill in: what tests need adding/updating and why)\nSCOPE: {{scope}}\nNON_GOALS: (fill in)\nVALIDATION: (fill in)\nACCEPTANCE: (fill in: externally observable outcome)\n\nTest-only chain. test-engineer is the primary writer; write tests that satisfy the bead contract.",
17
+ "labels": ["chain-root", "kind:root", "scrutiny:{{scrutiny}}"]
18
+ },
19
+ {
20
+ "id": "test-engineer",
21
+ "title": "test-engineer:{{root_title}}",
22
+ "type": "task",
23
+ "needs": ["root"],
24
+ "description": "MANDATE: you are the primary writer; write tests that satisfy the bead contract.\nINPUTS: root contract; existing test style; current implementation diff.\nOUTPUTS: tests, fixtures, smoke scripts, telemetry assertions, exact test-runner commands.\nSCOPE: test paths plus harness/fixture updates.\nNON_GOALS: no production source edits unless root explicitly authorizes helper/export change.",
25
+ "labels": ["chain-step", "kind:step", "role:test-engineer", "edge:validates->root", "position:primary-writer"]
26
+ },
27
+ {
28
+ "id": "seconder",
29
+ "title": "seconder:{{root_title}}",
30
+ "type": "task",
31
+ "needs": ["test-engineer"],
32
+ "description": "MANDATE: fused scope/compliance + quality gate on the test diff.\nINPUTS: test-engineer diff; root contract.\nOUTPUTS: verdict JSON with scope_verdict, scope_findings, quality_verdict, quality_findings, overall_verdict.\nSCOPE: same as root.\nNON_GOALS: no edits.",
33
+ "labels": ["chain-step", "kind:step", "role:seconder", "edge:validates->root", "gate:mandatory"]
34
+ },
35
+ {
36
+ "id": "test-runner",
37
+ "title": "test-runner:{{root_title}}",
38
+ "type": "task",
39
+ "needs": ["seconder"],
40
+ "description": "MANDATE: execute exact commands supplied by test-engineer and classify failures by owner.\nINPUTS: exact commands; tests; telemetry assertions.\nOUTPUTS: pass/fail counts, artifact evidence, owner routing, rerun guidance.\nSCOPE: requested commands only; fallback must be labeled.\nNON_GOALS: no edits; no scope expansion.",
41
+ "labels": ["chain-step", "kind:step", "role:test-runner", "gate:mandatory"]
42
+ },
43
+ {
44
+ "id": "reviewer",
45
+ "title": "reviewer:{{root_title}}",
46
+ "type": "task",
47
+ "needs": ["test-runner"],
48
+ "description": "MANDATE: compliance reviewer for test quality and coverage adequacy at SCRUTINY={{scrutiny}}.\nINPUTS: test diff + seconder verdict + test-runner evidence + root contract.\nOUTPUTS: verdict PASS|PARTIAL|FAIL + Release Checklist.\nSCOPE: same as root.\nNON_GOALS: no edits; do not waive mandatory gates.",
49
+ "labels": ["chain-step", "kind:step", "role:reviewer", "edge:validates->root", "gate:final"]
50
+ }
51
+ ]
52
+ }
@@ -0,0 +1,35 @@
1
+ {
2
+ "formula": "triage",
3
+ "type": "workflow",
4
+ "version": 1,
5
+ "description": "Board health work. explorer (semantic clustering + duplicate detection) → overthinker (rewire recommendations, priority re-balancing, decompose-or-merge proposals). READ_ONLY chain — no code edits. Output is advisory; operator applies recommendations via bd dep / bd duplicate / bd supersede / bd close.",
6
+ "vars": {
7
+ "root_title": { "default": "Board triage pass", "required": false },
8
+ "filter": { "default": "status=open", "required": false }
9
+ },
10
+ "steps": [
11
+ {
12
+ "id": "root",
13
+ "title": "{{root_title}}",
14
+ "type": "chore",
15
+ "description": "PROBLEM: board accumulates open issues, duplicates, stale advisors, orphan tracking-beads, mis-prioritized work. Periodic triage keeps the graph navigable.\nSCOPE: bd issues matching filter `{{filter}}`.\nNON_GOALS: no bd edits during this chain — operator applies recommendations after; no specialist edits.\nVALIDATION: explorer produces clustering+dup table; overthinker produces ranked recommendation list.\nACCEPTANCE: operator has actionable list of bd dep / bd duplicate / bd supersede / bd close commands.\n\nBoard triage: explorer maps, overthinker recommends.",
16
+ "labels": ["chain-root", "kind:root", "type:chore", "triage", "board-health"]
17
+ },
18
+ {
19
+ "id": "explorer",
20
+ "title": "explorer:{{root_title}}",
21
+ "type": "task",
22
+ "needs": ["root"],
23
+ "description": "MANDATE: READ_ONLY board mapper. For filter `{{filter}}`: cluster semantically related issues, identify duplicates (mechanical + semantic), flag stale advisors (no recent activity), flag orphan tracking-beads (step-beads missing validates edge to root), surface priority-vs-blast-radius mismatches.\nINPUTS: bd list --status=open --json + filter.\nOUTPUTS: structured table — clusters, candidate dups, stale advisors, orphans, mismatches. Cite bead-ids.\nSCOPE: bd graph queries only.\nNON_GOALS: no bd edits; no specialist edits; no recommendations (that's overthinker's job).",
24
+ "labels": ["chain-step", "kind:step", "role:explorer", "edge:informs->root", "advisor:pre-impl"]
25
+ },
26
+ {
27
+ "id": "overthinker",
28
+ "title": "overthinker:{{root_title}}",
29
+ "type": "task",
30
+ "needs": ["explorer"],
31
+ "description": "MANDATE: devil's-advocate review of explorer's board map. 4-phase synthesis: initial analysis → critique (what would actually break if we merge cluster X? are these REALLY duplicates? is this stale advisor still relevant?) → synthesis → distilled recommendations.\nINPUTS: explorer's structured table.\nOUTPUTS: ranked recommendations — for each cluster/dup/orphan/mismatch, propose action (merge / supersede / close / re-prioritize / leave) with reasoning. Generate ready-to-run bd commands.\nSCOPE: explorer's findings only.\nNON_GOALS: no bd edits; no expansion of scope beyond explorer's findings.",
32
+ "labels": ["chain-step", "kind:step", "role:overthinker", "edge:informs->root", "advisor:pre-impl"]
33
+ }
34
+ ]
35
+ }