session-orchestrator 3.24.0 → 4.0.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 (350) hide show
  1. package/.agents/skills/architecture/SKILL.md +18 -0
  2. package/.agents/skills/autopilot/SKILL.md +17 -0
  3. package/.agents/skills/bootstrap/SKILL.md +20 -0
  4. package/.agents/skills/brainstorm/SKILL.md +22 -0
  5. package/.agents/skills/claude-md-drift-check/SKILL.md +15 -0
  6. package/.agents/skills/convergence-monitoring/SKILL.md +22 -0
  7. package/.agents/skills/debug/SKILL.md +22 -0
  8. package/.agents/skills/discovery/SKILL.md +20 -0
  9. package/.agents/skills/dispatcher/SKILL.md +15 -0
  10. package/.agents/skills/docs-orchestrator/SKILL.md +18 -0
  11. package/.agents/skills/ecosystem-health/SKILL.md +20 -0
  12. package/.agents/skills/eli5/SKILL.md +20 -0
  13. package/.agents/skills/eval/SKILL.md +21 -0
  14. package/.agents/skills/evolve/SKILL.md +21 -0
  15. package/.agents/skills/frontmatter-guard/SKILL.md +15 -0
  16. package/.agents/skills/gitlab-ops/SKILL.md +20 -0
  17. package/.agents/skills/gitlab-portfolio/SKILL.md +15 -0
  18. package/.agents/skills/grill/SKILL.md +22 -0
  19. package/.agents/skills/hook-development/SKILL.md +15 -0
  20. package/.agents/skills/mcp-builder/SKILL.md +15 -0
  21. package/.agents/skills/memory-cleanup/SKILL.md +21 -0
  22. package/.agents/skills/mode-selector/SKILL.md +17 -0
  23. package/.agents/skills/npm-publish/SKILL.md +16 -0
  24. package/.agents/skills/peekaboo-driver/SKILL.md +18 -0
  25. package/.agents/skills/persona-panel/SKILL.md +17 -0
  26. package/.agents/skills/plan/SKILL.md +20 -0
  27. package/.agents/skills/playwright-driver/SKILL.md +20 -0
  28. package/.agents/skills/quality-gates/SKILL.md +20 -0
  29. package/.agents/skills/reconcile/SKILL.md +21 -0
  30. package/.agents/skills/remote-offload/SKILL.md +20 -0
  31. package/.agents/skills/repo-audit/SKILL.md +16 -0
  32. package/.agents/skills/session-end/SKILL.md +20 -0
  33. package/.agents/skills/session-plan/SKILL.md +20 -0
  34. package/.agents/skills/session-start/SKILL.md +20 -0
  35. package/.agents/skills/spinout/SKILL.md +16 -0
  36. package/.agents/skills/sunset-review/SKILL.md +16 -0
  37. package/.agents/skills/test-runner/SKILL.md +20 -0
  38. package/.agents/skills/tmux-layout/SKILL.md +21 -0
  39. package/.agents/skills/using-orchestrator/SKILL.md +17 -0
  40. package/.agents/skills/vault-mirror/SKILL.md +15 -0
  41. package/.agents/skills/vault-sync/SKILL.md +15 -0
  42. package/.agents/skills/wave-executor/SKILL.md +20 -0
  43. package/.agents/skills/write-executable-plan/SKILL.md +22 -0
  44. package/.claude-plugin/marketplace.json +1 -1
  45. package/.claude-plugin/plugin.json +1 -1
  46. package/.codex-plugin/plugin.json +1 -1
  47. package/.cursor/commands/autopilot.md +2 -2
  48. package/.cursor/commands/bootstrap.md +1 -1
  49. package/.cursor/commands/brainstorm.md +1 -1
  50. package/.cursor/commands/debug.md +1 -1
  51. package/.cursor/commands/discovery.md +1 -1
  52. package/.cursor/commands/dispatcher.md +2 -2
  53. package/.cursor/commands/eli5.md +2 -2
  54. package/.cursor/commands/eval.md +2 -2
  55. package/.cursor/commands/evolve.md +1 -1
  56. package/.cursor/commands/go.md +1 -1
  57. package/.cursor/commands/grill.md +2 -2
  58. package/.cursor/commands/memory-cleanup.md +2 -2
  59. package/.cursor/commands/persona-panel.md +1 -1
  60. package/.cursor/commands/plan.md +1 -1
  61. package/.cursor/commands/portfolio.md +1 -1
  62. package/.cursor/commands/reconcile.md +2 -2
  63. package/.cursor/commands/release.md +2 -2
  64. package/.cursor/commands/session.md +2 -2
  65. package/.cursor/commands/spinout.md +2 -2
  66. package/.cursor/commands/sunset-review.md +2 -2
  67. package/.cursor/commands/templates-ack.md +2 -2
  68. package/.cursor/commands/test.md +2 -2
  69. package/.cursor/skills/brainstorm/SKILL.md +1 -1
  70. package/.cursor/skills/eval/SKILL.md +1 -1
  71. package/.cursor/skills/quality-gates/SKILL.md +1 -1
  72. package/.cursor/skills/remote-offload/SKILL.md +1 -1
  73. package/.orchestrator/policy/blocked-commands.json +121 -0
  74. package/.orchestrator/policy/ecosystem.schema.json +66 -0
  75. package/.orchestrator/policy/quality-gates.example.json +16 -0
  76. package/.orchestrator/policy/quality-gates.schema.json +38 -0
  77. package/.orchestrator/policy/templates-policy.json +27 -0
  78. package/.orchestrator/policy/test-profiles.json +47 -0
  79. package/AGENTS.md +225 -0
  80. package/CHANGELOG.md +1125 -2
  81. package/NOTICE +11 -6
  82. package/README.md +127 -94
  83. package/agents/eval-judge.md +1 -1
  84. package/agents/skill-applied-judge.md +1 -1
  85. package/assets/wave-lifecycle.svg +98 -0
  86. package/commands/release.md +6 -3
  87. package/commands/session.md +18 -3
  88. package/docs/README.md +4 -0
  89. package/{agents/AGENTS.md → docs/agent-authoring.md} +19 -26
  90. package/docs/baseline.md +67 -0
  91. package/docs/ci-setup.md +108 -62
  92. package/docs/codex-setup.md +65 -21
  93. package/docs/components.md +36 -15
  94. package/docs/cursor-setup.md +6 -2
  95. package/docs/events-schema.md +9 -6
  96. package/docs/instruction-delivery.md +62 -0
  97. package/{agents/memory-proposal-collector.md → docs/memory-proposal-flow.md} +1 -8
  98. package/docs/migration-v4.md +341 -0
  99. package/docs/pi-setup.md +6 -1
  100. package/docs/plugin-architecture-v3.md +1 -1
  101. package/docs/rule-authoring.md +85 -19
  102. package/docs/scope-collision-guard.md +5 -5
  103. package/docs/session-config-reference.md +57 -56
  104. package/docs/session-config-template.md +6 -29
  105. package/docs/telemetry.md +157 -3
  106. package/docs/vault-docs-architecture.md +50 -11
  107. package/hooks/_lib/hook-import-set.json +1487 -0
  108. package/hooks/_lib/subagent-transcript.mjs +562 -0
  109. package/hooks/config-protection.mjs +2 -2
  110. package/hooks/cwd-change-restore.mjs +2 -2
  111. package/hooks/enforce-commands.mjs +69 -0
  112. package/hooks/hooks-codex.json +1 -1
  113. package/hooks/hooks-cursor.json +10 -0
  114. package/hooks/hooks-pi.json +5 -0
  115. package/hooks/hooks.json +6 -1
  116. package/hooks/loop-guard.mjs +3 -3
  117. package/hooks/on-session-end.mjs +2 -2
  118. package/hooks/on-session-start.mjs +103 -2
  119. package/hooks/on-stop.mjs +36 -11
  120. package/hooks/operator-steer.mjs +2 -2
  121. package/hooks/post-bash-write-verify.mjs +85 -0
  122. package/hooks/post-edit-import-probe.mjs +344 -0
  123. package/hooks/post-subagent-discovery-validator.mjs +187 -431
  124. package/hooks/post-tool-batch-wave-signal.mjs +118 -4
  125. package/hooks/post-tool-failure-corrective-context.mjs +2 -2
  126. package/hooks/post-tooluse-frontend-slop.mjs +3 -3
  127. package/hooks/pre-bash-destructive-guard.mjs +39 -13
  128. package/hooks/skill-invocation-telemetry.mjs +17 -5
  129. package/hooks/subagent-telemetry.mjs +13 -4
  130. package/monitors/monitors.json +3 -3
  131. package/package.json +9 -1
  132. package/pi/prompts/session.md +2 -2
  133. package/plugin.json +27 -0
  134. package/scripts/backfill-abandoned-sessions.mjs +50 -4
  135. package/scripts/backfill-learnings-from-vault.mjs +9 -3
  136. package/scripts/dialectic-deriver.mjs +73 -8
  137. package/scripts/export-hw-learnings.mjs +113 -1
  138. package/scripts/generate-agents-skills.mjs +378 -0
  139. package/scripts/generate-cursor-adapter.mjs +45 -8
  140. package/scripts/generate-hook-import-set.mjs +249 -0
  141. package/scripts/lib/agent-status.mjs +13 -2
  142. package/scripts/lib/auto-dream.mjs +38 -36
  143. package/scripts/lib/autonomy/suitability.mjs +6 -0
  144. package/scripts/lib/autopilot/loop.mjs +2 -2
  145. package/scripts/lib/ci-status-banner.mjs +220 -75
  146. package/scripts/lib/codex/plugin-contract.mjs +82 -6
  147. package/scripts/lib/config/auto-dream.mjs +2 -1
  148. package/scripts/lib/config/block-header.mjs +8 -0
  149. package/scripts/lib/config/block-preprocess.mjs +177 -0
  150. package/scripts/lib/config/broken-window.mjs +2 -1
  151. package/scripts/lib/config/cold-start.mjs +2 -1
  152. package/scripts/lib/config/config-protection.mjs +22 -2
  153. package/scripts/lib/config/context-coverage.mjs +2 -1
  154. package/scripts/lib/config/cross-repo.mjs +2 -1
  155. package/scripts/lib/config/custom-phases.mjs +2 -1
  156. package/scripts/lib/config/dialectic.mjs +2 -1
  157. package/scripts/lib/config/discovery-validator.mjs +2 -1
  158. package/scripts/lib/config/dispatcher-autonomy-capture.mjs +24 -1
  159. package/scripts/lib/config/dispatcher-autonomy.mjs +2 -1
  160. package/scripts/lib/config/docs-orchestrator.mjs +2 -1
  161. package/scripts/lib/config/docs-staleness.mjs +2 -1
  162. package/scripts/lib/config/drift-check.mjs +2 -1
  163. package/scripts/lib/config/eval.mjs +2 -1
  164. package/scripts/lib/config/events-rotation.mjs +2 -1
  165. package/scripts/lib/config/evolve.mjs +8 -2
  166. package/scripts/lib/config/frontend-slop-hook.mjs +7 -3
  167. package/scripts/lib/config/gitlab-portfolio.mjs +2 -1
  168. package/scripts/lib/config/handover-gate.mjs +2 -1
  169. package/scripts/lib/config/health-endpoints.mjs +7 -2
  170. package/scripts/lib/config/issue-budget.mjs +2 -1
  171. package/scripts/lib/config/loop-guard.mjs +2 -1
  172. package/scripts/lib/config/memory.mjs +2 -1
  173. package/scripts/lib/config/moc-staleness.mjs +2 -1
  174. package/scripts/lib/config/persona-gate-wave.mjs +2 -1
  175. package/scripts/lib/config/private-config-dir.mjs +67 -0
  176. package/scripts/lib/config/reconcile.mjs +2 -1
  177. package/scripts/lib/config/remote-hosts.mjs +2 -1
  178. package/scripts/lib/config/section-extractor.mjs +7 -1
  179. package/scripts/lib/config/skill-evolution.mjs +2 -1
  180. package/scripts/lib/config/slopcheck.mjs +2 -1
  181. package/scripts/lib/config/state-md-lock.mjs +2 -1
  182. package/scripts/lib/config/templates-first.mjs +2 -1
  183. package/scripts/lib/config/test.mjs +2 -1
  184. package/scripts/lib/config/vault-integration.mjs +7 -1
  185. package/scripts/lib/config/vault-mirror-quality.mjs +2 -1
  186. package/scripts/lib/config/vault-staleness.mjs +2 -1
  187. package/scripts/lib/config/vault-sync.mjs +2 -1
  188. package/scripts/lib/config/verification-auto-fix.mjs +2 -1
  189. package/scripts/lib/config/wave-reviewers.mjs +2 -1
  190. package/scripts/lib/config/worktree-orphans.mjs +2 -1
  191. package/scripts/lib/convergence-monitor.mjs +82 -16
  192. package/scripts/lib/dispatcher/rank.mjs +124 -48
  193. package/scripts/lib/ecosystem-health.mjs +16 -2
  194. package/scripts/lib/eval/engine.mjs +9 -1
  195. package/scripts/lib/eval/session-resolve.mjs +23 -4
  196. package/scripts/lib/events.mjs +22 -6
  197. package/scripts/lib/frontmatter-guard.mjs +131 -13
  198. package/scripts/lib/gates/gate-full.mjs +26 -0
  199. package/scripts/lib/gates/gate-helpers.mjs +76 -0
  200. package/scripts/lib/hardware-pattern-detector.mjs +18 -1
  201. package/scripts/lib/harness-audit/categories/category4.mjs +31 -11
  202. package/scripts/lib/host-identity.mjs +50 -11
  203. package/scripts/lib/instruction-budget-guard.mjs +171 -5
  204. package/scripts/lib/learnings/evolve-telemetry.mjs +178 -0
  205. package/scripts/lib/learnings/io.mjs +60 -6
  206. package/scripts/lib/memory-proposals/store.mjs +30 -22
  207. package/scripts/lib/owner-config-banner.mjs +43 -6
  208. package/scripts/lib/owner-config-loader.mjs +21 -10
  209. package/scripts/lib/owner-interview.mjs +3 -3
  210. package/scripts/lib/owner-yaml.mjs +207 -14
  211. package/scripts/lib/platform.mjs +108 -15
  212. package/scripts/lib/plugin-update-banner.mjs +406 -0
  213. package/scripts/lib/project-hygiene.mjs +38 -2
  214. package/scripts/lib/qg-command-drift-banner.mjs +50 -12
  215. package/scripts/lib/quality-gate.mjs +133 -44
  216. package/scripts/lib/reconcile/emitter.mjs +68 -6
  217. package/scripts/lib/reconcile/engine.mjs +13 -4
  218. package/scripts/lib/reconcile/idempotency.mjs +37 -4
  219. package/scripts/lib/reconcile/writer.mjs +40 -18
  220. package/scripts/lib/session-close-backfill.mjs +67 -9
  221. package/scripts/lib/session-id.mjs +12 -23
  222. package/scripts/lib/session-identity/own-session.mjs +125 -10
  223. package/scripts/lib/session-lock-shape.mjs +43 -0
  224. package/scripts/lib/session-lock.mjs +5 -10
  225. package/scripts/lib/session-registry.mjs +25 -9
  226. package/scripts/lib/session-schema/constants.mjs +36 -2
  227. package/scripts/lib/session-schema/validator.mjs +38 -4
  228. package/scripts/lib/session-start-probes.mjs +18 -1
  229. package/scripts/lib/sessions-staleness-banner.mjs +18 -11
  230. package/scripts/lib/skill-health/join.mjs +17 -4
  231. package/scripts/lib/state-md.mjs +78 -0
  232. package/scripts/lib/sunset/walker.mjs +6 -0
  233. package/scripts/lib/telemetry/schema.mjs +181 -9
  234. package/scripts/lib/telemetry/sync.mjs +368 -12
  235. package/scripts/lib/validate/check-agents-skills.mjs +327 -0
  236. package/scripts/lib/validate/check-agents.mjs +3 -3
  237. package/scripts/lib/validate/check-cursor-adapter.mjs +234 -72
  238. package/scripts/lib/validate/check-hooks-symmetry.mjs +45 -16
  239. package/scripts/lib/validate/check-owner-leakage.mjs +281 -20
  240. package/scripts/lib/validate/check-skill-links.mjs +163 -0
  241. package/scripts/lib/validate/check-skill-script-paths.mjs +47 -28
  242. package/scripts/lib/validate/check-unwired-features.mjs +0 -2
  243. package/scripts/lib/validate/check-validator-registration.mjs +10 -4
  244. package/scripts/lib/validate/enumerate-repo-files.mjs +317 -0
  245. package/scripts/lib/vault-backfill/template.mjs +63 -6
  246. package/scripts/lib/vault-mirror/process.mjs +165 -42
  247. package/scripts/lib/vault-mirror/telemetry.mjs +2 -2
  248. package/scripts/lib/vault-status/narrative-mirror.mjs +127 -18
  249. package/scripts/lib/wave-executor/dispatch-common.mjs +164 -0
  250. package/scripts/lib/wave-executor/foreign-dispatch.mjs +7 -142
  251. package/scripts/lib/wave-executor/remote-dispatch.mjs +5 -7
  252. package/scripts/lib/wave-resource-gate.mjs +8 -2
  253. package/scripts/lib/wave-sizing.mjs +4 -1
  254. package/scripts/lib/wave-transcript-tail.mjs +118 -4
  255. package/scripts/materialize-wave-scope.mjs +12 -5
  256. package/scripts/memory-propose.mjs +19 -5
  257. package/scripts/migrate-cold-start-seed.mjs +4 -1
  258. package/scripts/parse-config.mjs +60 -3
  259. package/scripts/release.mjs +337 -29
  260. package/scripts/repair-invalid-sessions.mjs +3 -3
  261. package/scripts/run-quality-gate.mjs +128 -11
  262. package/scripts/sweep-expired-learnings.mjs +90 -0
  263. package/scripts/sync-vault-schema.mjs +3 -1
  264. package/scripts/telemetry.mjs +2 -2
  265. package/scripts/validate-plugin.mjs +161 -0
  266. package/scripts/validate-wave-scope.mjs +28 -8
  267. package/scripts/wave-scope-binding.mjs +215 -0
  268. package/skills/_shared/instruction-file-resolution.md +10 -0
  269. package/skills/_shared/parallel-aware-preamble.md +1 -0
  270. package/skills/_shared/platform-tools.md +1 -1
  271. package/skills/_shared/state-ownership.md +1 -1
  272. package/skills/architecture/SKILL.md +7 -5
  273. package/skills/{domain-model/SKILL.md → architecture/references/domain-model.md} +9 -9
  274. package/skills/autopilot/SKILL.md +4 -18
  275. package/skills/claude-md-drift-check/SKILL.md +5 -1
  276. package/skills/claude-md-drift-check/checker.mjs +62 -2
  277. package/skills/convergence-monitoring/SIGNALS.md +55 -0
  278. package/skills/discovery/probes/vault-staleness.mjs +37 -13
  279. package/skills/discovery/probes-arch.md +20 -18
  280. package/skills/dispatcher/SKILL.md +3 -2
  281. package/skills/evolve/SKILL.md +65 -26
  282. package/skills/frontmatter-guard/SKILL.md +11 -5
  283. package/skills/npm-publish/SKILL.md +1 -1
  284. package/skills/reconcile/SKILL.md +33 -0
  285. package/skills/remote-offload/SKILL.md +1 -1
  286. package/skills/session-end/SKILL.md +18 -905
  287. package/skills/session-end/phase-3-6-tail.md +10 -3
  288. package/skills/session-end/plan-verification.md +221 -155
  289. package/skills/session-end/references/phase-2-quality-gate.md +93 -0
  290. package/skills/session-end/references/phase-3-documentation-updates.md +229 -0
  291. package/skills/session-end/references/phase-4a-worktree-cleanup.md +120 -0
  292. package/skills/session-end/references/phase-4b-worktree-orphan-sweep.md +58 -0
  293. package/skills/session-end/references/phase-5-issue-cleanup.md +104 -0
  294. package/skills/session-end/references/session-summary-template.md +62 -0
  295. package/skills/session-plan/SKILL.md +49 -0
  296. package/skills/session-start/SKILL.md +22 -904
  297. package/skills/session-start/phase-8-5-express-path.md +1 -1
  298. package/skills/session-start/references/phase-1-1-dispatcher-autonomy-capture.md +55 -0
  299. package/skills/session-start/references/phase-1-2-session-lock.md +140 -0
  300. package/skills/session-start/references/phase-1-5-session-continuity.md +254 -0
  301. package/skills/session-start/references/phase-1-7-vault-status-board.md +53 -0
  302. package/skills/session-start/references/phase-2-7-portfolio-snapshot.md +75 -0
  303. package/skills/session-start/references/phase-4-ssot-environment-check.md +155 -0
  304. package/skills/session-start/references/phase-6-5-forced-reads.md +75 -0
  305. package/skills/session-start/references/phase-6-6-project-intelligence.md +81 -0
  306. package/skills/session-start/references/phase-6-7-memory-banner-telemetry-consent.md +103 -0
  307. package/skills/vault-sync/validator.mjs +21 -27
  308. package/skills/wave-executor/SKILL.md +15 -1
  309. package/skills/wave-executor/references/wave-loop-dispatch.md +612 -0
  310. package/skills/wave-executor/references/wave-loop-review.md +570 -0
  311. package/skills/wave-executor/references/wave-loop-scope-manifest.md +162 -0
  312. package/skills/wave-executor/wave-loop.md +14 -1309
  313. package/templates/_shared/journey-manifest.md +10 -6
  314. package/.cursor/commands/autopilot-multi.md +0 -14
  315. package/.cursor/commands/contract-version-bump.md +0 -14
  316. package/.cursor/commands/journey-audit.md +0 -14
  317. package/.cursor/skills/contract-version-bump/SKILL.md +0 -12
  318. package/.cursor/skills/daily/SKILL.md +0 -12
  319. package/.cursor/skills/domain-model/SKILL.md +0 -13
  320. package/.cursor/skills/journey-audit/SKILL.md +0 -13
  321. package/.cursor/skills/skill-creator/SKILL.md +0 -13
  322. package/.cursor/skills/ubiquitous-language/SKILL.md +0 -13
  323. package/commands/autopilot-multi.md +0 -74
  324. package/commands/contract-version-bump.md +0 -28
  325. package/commands/journey-audit.md +0 -43
  326. package/pi/prompts/autopilot-multi.md +0 -12
  327. package/pi/prompts/contract-version-bump.md +0 -12
  328. package/pi/prompts/journey-audit.md +0 -12
  329. package/scripts/autopilot-multi.mjs +0 -885
  330. package/scripts/backfill-learnings-expires.mjs +0 -196
  331. package/scripts/backfill-learnings.mjs +0 -203
  332. package/scripts/fleet-instruction-scan.mjs +0 -141
  333. package/scripts/lib/autopilot/dep-graph.mjs +0 -417
  334. package/scripts/lib/autopilot/multi-killswitch.mjs +0 -184
  335. package/scripts/lib/webhook-url.mjs +0 -105
  336. package/scripts/lifecycle-sim-v6.mjs +0 -347
  337. package/scripts/migrate-learnings-jsonl.mjs +0 -189
  338. package/scripts/migrate-subagents-jsonl.mjs +0 -196
  339. package/scripts/upload-social-preview.mjs +0 -316
  340. package/skills/_shared/model-selection.md +0 -64
  341. package/skills/contract-version-bump/SKILL.md +0 -219
  342. package/skills/daily/SKILL.md +0 -222
  343. package/skills/daily/generate.sh +0 -92
  344. package/skills/daily/templates/daily.md.tpl +0 -36
  345. package/skills/journey-audit/SKILL.md +0 -270
  346. package/skills/skill-creator/SKILL.md +0 -168
  347. package/skills/ubiquitous-language/SKILL.md +0 -97
  348. package/skills/vault-sync/package-lock.json +0 -40
  349. /package/skills/{domain-model → architecture/references}/ADR-FORMAT.md +0 -0
  350. /package/skills/{domain-model → architecture/references}/CONTEXT-FORMAT.md +0 -0
@@ -0,0 +1,121 @@
1
+ {
2
+ "version": 1,
3
+ "rationale": "Main-session destructive-command guard (#155). Consolidated blocklist for pre-bash hook + wave-executor wave-scope.",
4
+ "rules": [
5
+ {
6
+ "id": "git-reset-hard",
7
+ "pattern": "git reset --hard",
8
+ "severity": "block",
9
+ "allow-override-flag": null,
10
+ "sources": ["PSA-003", "#155"],
11
+ "rationale": "Hard reset permanently discards staged and committed work that may belong to another parallel session (#155 incident). Blocked unconditionally per PSA-003 to prevent cross-session data loss."
12
+ },
13
+ {
14
+ "id": "git-reset-mixed",
15
+ "pattern": "git reset --mixed",
16
+ "severity": "warn",
17
+ "allow-override-flag": null,
18
+ "sources": ["PSA-003", "#155"],
19
+ "rationale": "Mixed reset unstages changes silently and can discard parallel-session work from the index. Warn so the coordinator can confirm intent before proceeding."
20
+ },
21
+ {
22
+ "id": "git-reset-soft",
23
+ "pattern": "git reset --soft",
24
+ "severity": "warn",
25
+ "allow-override-flag": null,
26
+ "sources": ["PSA-003", "#155"],
27
+ "rationale": "Soft reset moves HEAD and may reorder commits from concurrent sessions. Warn to surface the operation to the coordinator for explicit approval."
28
+ },
29
+ {
30
+ "id": "git-checkout-discard",
31
+ "pattern": "git checkout --",
32
+ "severity": "block",
33
+ "allow-override-flag": null,
34
+ "sources": ["PSA-003", "#155"],
35
+ "rationale": "Discards uncommitted file changes that another session may be actively building. Blocked per PSA-003 to protect in-progress work."
36
+ },
37
+ {
38
+ "id": "git-clean-force",
39
+ "pattern": "git clean -f",
40
+ "severity": "block",
41
+ "allow-override-flag": null,
42
+ "sources": ["PSA-003", "#155"],
43
+ "rationale": "Force-clean deletes untracked files that may be unfinished output from a parallel session. Blocked unconditionally per PSA-003."
44
+ },
45
+ {
46
+ "id": "git-clean-force-d",
47
+ "pattern": "git clean -fd",
48
+ "severity": "block",
49
+ "allow-override-flag": null,
50
+ "sources": ["PSA-003", "#155"],
51
+ "rationale": "Force-clean including directories amplifies the blast radius of git-clean-force, removing entire untracked directory trees. Blocked per PSA-003."
52
+ },
53
+ {
54
+ "id": "git-stash-any",
55
+ "pattern": "git stash",
56
+ "severity": "warn",
57
+ "allow-override-flag": null,
58
+ "sources": ["PSA-003", "#155"],
59
+ "rationale": "Stashing captures another session's uncommitted changes into a stash they cannot find, effectively hiding their work. Warn to confirm the coordinator owns all affected changes."
60
+ },
61
+ {
62
+ "id": "rm-rf-destructive",
63
+ "pattern": "rm -rf",
64
+ "severity": "block",
65
+ "allow-override-flag": null,
66
+ "path-allowlist": ["/tmp/", "/private/tmp/", "$TMPDIR"],
67
+ "sources": ["PSA-003", "#155", "wave-executor-baseline", "#641"],
68
+ "rationale": "Recursive force-removal can destroy project files or another session's work with no recovery path. Blocked except for safe paths (.orchestrator/tmp, node_modules, /tmp, $TMPDIR) which the pre-bash hook evaluates separately."
69
+ },
70
+ {
71
+ "id": "git-push-force",
72
+ "pattern": "git push --force",
73
+ "severity": "block",
74
+ "allow-override-flag": null,
75
+ "sources": ["PSA-003", "#155", "#138-SECURITY-REQ-07"],
76
+ "rationale": "Force-push rewrites shared remote history, permanently discarding commits from other sessions or collaborators. Blocked unconditionally per PSA-003 and SECURITY-REQ-07."
77
+ },
78
+ {
79
+ "id": "git-push-force-short",
80
+ "pattern": "git push -f",
81
+ "severity": "block",
82
+ "allow-override-flag": null,
83
+ "sources": ["PSA-003", "#155", "#138-SECURITY-REQ-07"],
84
+ "rationale": "Short-flag alias for git push --force; same destructive effect on remote history. Blocked for full parity with git-push-force per SECURITY-REQ-07."
85
+ },
86
+ {
87
+ "id": "git-push-force-with-lease",
88
+ "pattern": "git push --force-with-lease",
89
+ "severity": "warn",
90
+ "allow-override-flag": null,
91
+ "sources": ["PSA-003", "#155"],
92
+ "rationale": "Safer than bare force-push but still rewrites remote history if the lease condition is met. Warn so the coordinator confirms this is the intended recovery action."
93
+ },
94
+ {
95
+ "id": "sql-drop-table-upper",
96
+ "pattern": "DROP TABLE",
97
+ "severity": "block",
98
+ "allow-override-flag": null,
99
+ "sources": ["wave-executor-baseline", "#155"],
100
+ "rationale": "Uppercase DROP TABLE is an irreversible DDL operation that destroys database schema and data. Blocked as part of the wave-executor baseline destructive-command guard."
101
+ },
102
+ {
103
+ "id": "sql-drop-table-lower",
104
+ "pattern": "drop table",
105
+ "severity": "block",
106
+ "allow-override-flag": null,
107
+ "sources": ["wave-executor-baseline", "#155"],
108
+ "rationale": "Lowercase alias for DROP TABLE; same irreversible DDL destruction. Blocked to ensure case-insensitive SQL issued via shell (e.g., psql -c) is caught by commandMatchesBlocked()."
109
+ },
110
+ {
111
+ "id": "redirect-truncate-protected",
112
+ "type": "redirect-truncate",
113
+ "pattern": ">",
114
+ "severity": "block",
115
+ "target-denylist": ["CLAUDE.md", "AGENTS.md", ".claude/rules/**", ".orchestrator/policy/**", ".orchestrator/metrics/*.jsonl", ".git/**", "SECURITY.md"],
116
+ "modes": ["truncate"],
117
+ "rationale": "Truncating redirect (>, &>, N>) onto protected artefacts silently destroys them — #983. Append (>>) stays allowed.",
118
+ "sources": ["#983"]
119
+ }
120
+ ]
121
+ }
@@ -0,0 +1,66 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://raw.githubusercontent.com/Kanevry/session-orchestrator/main/.orchestrator/policy/ecosystem.schema.json",
4
+ "title": "Session-Orchestrator Ecosystem Health Policy",
5
+ "description": "Ecosystem health configuration: service endpoints, CI pipelines, and critical issue labels. Consumed by the ecosystem-health skill during session-start. Generated by /bootstrap --ecosystem-health. See issue #188.",
6
+ "type": "object",
7
+ "required": ["version"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "version": { "const": 1 },
11
+ "rationale": { "type": "string" },
12
+ "endpoints": {
13
+ "type": "array",
14
+ "description": "Service health endpoints to probe during ecosystem-health checks.",
15
+ "items": { "$ref": "#/$defs/endpoint" },
16
+ "default": []
17
+ },
18
+ "pipelines": {
19
+ "type": "array",
20
+ "description": "CI pipeline identifiers to query for status.",
21
+ "items": { "$ref": "#/$defs/pipeline" },
22
+ "default": []
23
+ },
24
+ "criticalIssueLabels": {
25
+ "type": "array",
26
+ "description": "Issue labels that classify an issue as critical across cross-repos.",
27
+ "items": { "type": "string", "minLength": 1 },
28
+ "default": []
29
+ }
30
+ },
31
+ "$defs": {
32
+ "endpoint": {
33
+ "type": "object",
34
+ "required": ["name", "url"],
35
+ "additionalProperties": false,
36
+ "properties": {
37
+ "name": {
38
+ "type": "string",
39
+ "minLength": 1,
40
+ "description": "Human-readable display name for the service."
41
+ },
42
+ "url": {
43
+ "type": "string",
44
+ "minLength": 1,
45
+ "description": "URL to probe (curl -sf). Should return HTTP 2xx when healthy."
46
+ }
47
+ }
48
+ },
49
+ "pipeline": {
50
+ "type": "object",
51
+ "required": ["id"],
52
+ "additionalProperties": false,
53
+ "properties": {
54
+ "id": {
55
+ "type": "string",
56
+ "minLength": 1,
57
+ "description": "CI pipeline identifier. For GitLab: branch name or pipeline ID. For GitHub: workflow file name."
58
+ },
59
+ "label": {
60
+ "type": "string",
61
+ "description": "Optional display label shown in the health dashboard."
62
+ }
63
+ }
64
+ }
65
+ }
66
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "version": 1,
3
+ "rationale": "Centralized quality-gate commands. Consumed by scripts/run-quality-gate.sh and the quality-gates skill. Package-manager-aware defaults are written by bootstrap; hand-edit to customize test/typecheck/lint invocations across the project.",
4
+ "commands": {
5
+ "typecheck": { "command": "npm run typecheck", "required": true },
6
+ "lint": { "command": "npm run lint", "required": true },
7
+ "test": {
8
+ "command": "npm test",
9
+ "required": true,
10
+ "variants": {
11
+ "incremental": "npm test --",
12
+ "watch": "npm run test:watch"
13
+ }
14
+ }
15
+ }
16
+ }
@@ -0,0 +1,38 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "https://raw.githubusercontent.com/Kanevry/session-orchestrator/main/.orchestrator/policy/quality-gates.schema.json",
4
+ "title": "Session-Orchestrator Quality Gates Policy",
5
+ "description": "Canonical quality-gate commands. Consumed by scripts/run-quality-gate.sh and the quality-gates skill. Generated by bootstrap with package-manager-aware defaults. See issue #183.",
6
+ "type": "object",
7
+ "required": ["version", "commands"],
8
+ "additionalProperties": false,
9
+ "properties": {
10
+ "version": { "const": 1 },
11
+ "rationale": { "type": "string" },
12
+ "commands": {
13
+ "type": "object",
14
+ "required": ["test", "typecheck", "lint"],
15
+ "additionalProperties": false,
16
+ "properties": {
17
+ "test": { "$ref": "#/$defs/commandEntry" },
18
+ "typecheck": { "$ref": "#/$defs/commandEntry" },
19
+ "lint": { "$ref": "#/$defs/commandEntry" }
20
+ }
21
+ }
22
+ },
23
+ "$defs": {
24
+ "commandEntry": {
25
+ "type": "object",
26
+ "required": ["command", "required"],
27
+ "additionalProperties": false,
28
+ "properties": {
29
+ "command": { "type": "string", "minLength": 1 },
30
+ "required": { "type": "boolean" },
31
+ "variants": {
32
+ "type": "object",
33
+ "additionalProperties": { "type": "string" }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
@@ -0,0 +1,27 @@
1
+ {
2
+ "version": 1,
3
+ "rationale": "Pre-bash templates-first guard policy (#519, PRD docs/prd/2026-05-22-gsd-pattern-adoption-quickwins.md § Pattern 3). Defines per-host template paths the operator must read before invoking gh/glab pr|mr|issue create. The hook checks the live session transcript for a prior Read tool call against any listed path; absent that, the create call is blocked. An explicit acknowledgement file at .orchestrator/runtime/templates-acknowledged.json bypasses the check for the session.",
4
+ "enforcement": "block",
5
+ "hosts": {
6
+ "github": {
7
+ "template_paths": [
8
+ ".github/PULL_REQUEST_TEMPLATE",
9
+ ".github/PULL_REQUEST_TEMPLATE.md",
10
+ ".github/pull_request_template.md",
11
+ ".github/ISSUE_TEMPLATE",
12
+ ".github/ISSUE_TEMPLATE/"
13
+ ]
14
+ },
15
+ "gitlab": {
16
+ "template_paths": [
17
+ ".gitlab/merge_request_templates/",
18
+ ".gitlab/issue_templates/"
19
+ ]
20
+ }
21
+ },
22
+ "bypass_patterns": [
23
+ "gh issue create --label bot",
24
+ "glab issue create --label ci"
25
+ ],
26
+ "acknowledgement_file": ".orchestrator/runtime/templates-acknowledged.json"
27
+ }
@@ -0,0 +1,47 @@
1
+ {
2
+ "web-gate": {
3
+ "name": "web-gate",
4
+ "target": null,
5
+ "driver": "playwright",
6
+ "mode": "headless",
7
+ "rubric": "skills/test-runner/rubric-v1.md",
8
+ "checks": ["onboarding", "axe", "console"],
9
+ "tags": ["smoke", "web"],
10
+ "timeout_ms": 120000,
11
+ "description": "Default web target smoke test profile via Playwright"
12
+ },
13
+ "mac-gate": {
14
+ "name": "mac-gate",
15
+ "target": null,
16
+ "driver": "peekaboo",
17
+ "mode": "headed",
18
+ "rubric": "skills/test-runner/rubric-v1.md",
19
+ "checks": ["onboarding", "glass"],
20
+ "tags": ["smoke", "mac"],
21
+ "timeout_ms": 180000,
22
+ "description": "macOS app smoke test profile via peekaboo (driver landing in #381)",
23
+ "rubric_features": ["glass-v2"]
24
+ },
25
+ "mac-target-onboarding": {
26
+ "name": "mac-target-onboarding",
27
+ "target_name": "mac-target",
28
+ "driver": "peekaboo",
29
+ "mode": "headed",
30
+ "rubric": "skills/test-runner/rubric-v1.md",
31
+ "checks": ["onboarding-step-count", "liquid-glass-conformance"],
32
+ "tags": ["onboarding", "mac", "mac-target"],
33
+ "timeout_ms": 180000,
34
+ "scenarios": [
35
+ "LLM-Provider",
36
+ "Test-Run",
37
+ "Keychain",
38
+ "Mail-Surface"
39
+ ],
40
+ "liquid_glass_skipped": true,
41
+ "liquid_glass_skip_reason": "deployment target macOS .v14 < 26; liquid-glass-conformance check is a no-op at runtime until the target bumps to macOS 26+",
42
+ "app_source": "<app-source-path>",
43
+ "swift_ref_note": "V3.3 = b29ea71; HEAD is v3.21 — operator must checkout V3.3 ref before running to reproduce the 10-step onboarding regression",
44
+ "description": "mac-target onboarding regression proof (issue #386). Covers the 4-stage onboarding sequence in V3.3 (b29ea71) that shipped a 10-step flow (rubric CRITICAL). axe-violations and console-errors are N/A for native SwiftUI — skipped.",
45
+ "rubric_features": ["glass-v2"]
46
+ }
47
+ }
package/AGENTS.md ADDED
@@ -0,0 +1,225 @@
1
+ # Session Orchestrator Plugin
2
+
3
+ > Project-instruction file resolution: this is `CLAUDE.md` on Claude Code / Cursor IDE; the equivalent file on Codex CLI is `AGENTS.md`. See [skills/_shared/instruction-file-resolution.md](skills/_shared/instruction-file-resolution.md).
4
+
5
+ > Lean root by design (Anthropic large-codebase best-practice: root = pointers + critical gotchas). Delegated docs:
6
+ > - **Install, CLI usage, architecture, component inventory** → [`README.md`](./README.md) (full inventory: [`docs/components.md`](./docs/components.md))
7
+ > - **Plugin ↔ private baseline relationship** (what degrades without it, the public fallback) → [`docs/baseline.md`](./docs/baseline.md)
8
+ > - **Sub-agent authoring spec** (frontmatter, body, `sandbox-tier`, `output-schema`) → [`docs/agent-authoring.md`](./docs/agent-authoring.md) (moved out of `agents/` in 4.0.0 — the plugin loader registers every `agents/*.md` by directory convention, and the spec was dispatched as an agent 5× fleet-wide)
9
+ > - **Stable product/tech/structure context** → [`.orchestrator/steering/`](./.orchestrator/steering/) (injected at session-start Phase 2.6)
10
+ > - **Always-on + path-scoped rules** → [`.claude/rules/`](./.claude/rules/) (per-wave via `rule-loader.mjs`, #336/#694); authoring spec → [`docs/rule-authoring.md`](./docs/rule-authoring.md)
11
+ > - **Decisions log** (hand-authored) → [[01-projects/session-orchestrator/decisions]] in the Meta-Vault
12
+ > - **Session narrative** (machine-written by session-end Phase 3.7 via `scripts/lib/vault-status/narrative-mirror.mjs`) → `01-projects/session-orchestrator/_session-narrative.md`
13
+ > - **Operator tmux side-channel** → `/tmux-layout` (4-pane: STATE.md/CI-watch/events; [ADR-0007](docs/adr/0007-tmux-visualization-substrate.md))
14
+ >
15
+ > Additive instruction-file layering: this root for the big picture, nested files (`.claude/rules/*.md`) for local conventions; the authoring spec lives in `docs/agent-authoring.md`.
16
+ >
17
+ > **Root `AGENTS.md` is GENERATED byte-identical from this file** (`node scripts/generate-agents-skills.mjs`) for harnesses that read only `AGENTS.md` (Codex CLI, OpenCode, Kiro, Cursor's AGENTS path). Never edit it; edit here and regenerate. `validate-plugin` fails on drift.
18
+
19
+ ## Current State <!-- consistency:exempt:lean-root-pointer-section -->
20
+
21
+ State-free by design (see the **Live state is not in this file** gotcha below). The live version, test/coverage counts, backlog, and component inventory live in their SSOTs — never inline here, because they drift faster than this file is edited:
22
+ - **Version + test/coverage** → README badges
23
+ - **Per-session metrics & history** → [`.orchestrator/metrics/sessions.jsonl`](./.orchestrator/metrics/sessions.jsonl)
24
+ - **Decisions** (hand-authored) → [[01-projects/session-orchestrator/decisions]] (Meta-Vault) · **Session narrative** (generated) → `_session-narrative.md` beside it
25
+
26
+ ## Critical Gotchas <!-- consistency:exempt:lean-root-pointer-section -->
27
+
28
+ These are the non-obvious, mistake-causing facts that must load every session. Everything else is delegated above.
29
+
30
+ - **CI status is the source of truth at session-start.** Local-only test runs are insufficient evidence of CI green.
31
+ Phase 4 of session-start invokes `scripts/lib/ci-status-banner.mjs` via `checkCiStatus({ repoRoot })` to render a 🚨 banner when CI is red on HEAD.
32
+ Never claim CI green from `npm test` alone — the 8-pipeline silent regression (2026-05-09 → 2026-05-10, fixed in deep-2) is the cautionary tale. <!-- consistency:exempt:runtime-only -->
33
+ - **Destructive-Command Guard is active in main + subagent waves.** `hooks/pre-bash-destructive-guard.mjs` blocks destructive shell commands per `.orchestrator/policy/blocked-commands.json` — **10 of its 14 rules are `severity: block`, the other 4 only warn** (measured 2026-09-06: `jq '[.rules[].severity]|group_by(.)|map({(.[0]):length})|add' .orchestrator/policy/blocked-commands.json`).
34
+ Rule source of truth: [`.claude/rules/parallel-sessions.md`](.claude/rules/parallel-sessions.md) (PSA-003). Per-session bypass via Session Config: `allow-destructive-ops: true` (intentional maintenance only).
35
+ - **Session Config below is runtime-critical.** `scripts/parse-config.mjs` parses the `## Session Config` block; `claude-md-drift-check` Check 6 enforces top-level-key parity against `docs/session-config-template.md`. Edit it like code, not prose — a dropped key changes runtime behaviour.
36
+ - **Live state is not in this file.** Stack: Node 24+, vitest, ESLint 10 (`npm ci` after clone). Test counts, backlog, version, component inventory drift fast — the SSOT is README badges + `.orchestrator/metrics/sessions.jsonl`. Per-session detail lives in the Meta-Vault decisions log (linked above), not here.
37
+ - **`memory.propose` requires `SO_WAVE_AGENT=1`.** `scripts/memory-propose.mjs` exits `3` (`rejected-wrong-context`) unless `process.env.SO_WAVE_AGENT === '1'`.
38
+ The wave-executor boilerplate (see `skills/wave-executor/SKILL.md`) sets this env-var for every dispatched agent automatically. Direct invocation from the coordinator thread will always be rejected — use `/evolve` there instead.
39
+ Full status dict: `queued` (0), `dry-run-ok` (0, validate-only via `--dry-run` — validates + prints, never writes proposals.jsonl; #741.3), `quota-exceeded` (1), `rejected-low-confidence` (2), `rejected-wrong-context` (3), `error` (4).
40
+ See `docs/session-config-reference.md` § Memory Proposals. <!-- consistency:exempt:runtime-only -->
41
+ - **Auto-promoted worktree cleanup is Hybrid Pattern (Anthropic-style) — and detection keys on a marker, not on session-id coincidence (#1069).** When a session ran in a sibling worktree created via `enterWorktree()` (Phase 0.5 PROMOTION_OFFER outcome), `/close` Phase 4a detects this via `detectAutoPromotedWorktree()`.
42
+ Since #1069 the worktree-promotion is a PROCESS BOUNDARY, not a live migration: the session that ends up RUNNING in the promoted worktree is a brand-new session with its own id (see ADR-0013), so the CURRENT session's id never equals the worktree's directory suffix or branch.
43
+ Detection therefore tries the `.orchestrator/promoted-from.json` marker `enterWorktree()` writes at creation time FIRST (`source: 'marker'` — carries the source session id + branch, survives the process boundary), falling back to the legacy `path.basename(repoRoot) === <repo-name>-<sessionId>` basename match (`source: 'basename'`) only for worktrees created before the marker existed.
44
+ Clean worktree → auto-remove with WARN. Dirty (uncommitted/untracked/unpushed) → AUQ `[Behalten/Löschen/Manuell]` (`isWorktreeClean()` discounts exactly the marker's own untracked line, never operator work).
45
+ The Phase 4a cleanup runs AFTER Phase 4 commit+push, not before — this respects #490 durableCommit ordering so sessions.jsonl + STATE.md are persisted to origin BEFORE worktree-removal.
46
+ PSA-003 compliance enforced. Implementation: `skills/session-end/references/phase-4a-worktree-cleanup.md`; process-boundary rationale: `docs/adr/0013-worktree-promotion-process-boundary.md`. <!-- consistency:exempt:runtime-only -->
47
+ - **`allowedPaths` is COMPUTED, and the scope declaration has TWO shapes — writing only one is the silent failure (#1020).**
48
+ (a) **Per agent**, `<state-dir>/filescopes/wave-<N>/<agent-id>.json`, a JSON array of path STRINGS. This is `$AGENT_FILESCOPE_JSON` — what the `FILE-SCOPE` prompt injection, the Learnings-Index and `--assert-subset` read.
49
+ (b) **Per wave**, ONE aggregate sidecar holding an array of `{id, files}` RECORDS, built from every file in (a) plus the coordinator's own. This is the only thing `--assert-disjoint` and `--union` accept: pass them the wave directory and you get `Cannot read --union file`; pass them a single (a)-file and you get `must be a JSON array of {id, files} records`.
50
+ `node scripts/materialize-wave-scope.mjs --state-dir <state-dir> --wave <N>` is the canonical writer: it receives that one record array on stdin, writes every (a) file first, then (b) last. Neither is a `$TMPDIR` copy, and neither substitutes for the other.
51
+ Skipping (a) degrades the chain to signal-free ALLOW: no `FILE-SCOPE` block reaches the prompt, so `hooks/pre-task-scope-disjoint.mjs` extracts nothing, permits the dispatch, and writes no ledger entry — the absence looks identical to a clean run.
52
+ **Measured 2026-08-19:** a coordinator that wrote only (b) ran SIX waves and ~27 dispatches with zero injection; `.orchestrator/wave-dispatch-scopes.json` still carried a `|w2|` entry from two days earlier. Only `wave-scope.json` `allowedPaths` (global Gate 7) was live, which is why blocks still fired and the gap stayed invisible.
53
+ The coordinator's OWN direct edits go in a `coordinator.json` under (a) **and must be folded into (b)** — a `coordinator.json` that is never folded in is read by nothing. 2 of the 5 recorded divergences were coordinator-direct edits, which no agent scope file covers by construction.
54
+ Mechanism, error-class matrix and named limits: [`docs/scope-collision-guard.md`](docs/scope-collision-guard.md); the authoritative two-stage procedure is `skills/wave-executor/references/wave-loop-scope-manifest.md` § 3.1/3.2. <!-- consistency:exempt:runtime-only -->
55
+ - **`vault-dir` resolves HOST-LOCALLY — a hand-run vault probe writes into the operator's REAL vault.** Precedence is `SO_VAULT_DIR` > `owner.yaml` `paths.vault-dir` > the committed `vault-integration.vault-dir` below (`scripts/lib/config/host-paths.mjs`); the literal value in this file LOSES against both.
56
+ So a throwaway invocation of a vault writer (`mirrorNarrative()`, `vault-mirror.mjs`, the board writer) with a synthetic `repoRoot` does **not** land in a sandbox — the fake repo path only fakes the SOURCE, never the DESTINATION. A reviewer in this repo walked into exactly that.
57
+ Export `SO_VAULT_DIR=<tmpdir>` before ANY manual invocation of vault-writing code. <!-- consistency:exempt:runtime-only -->
58
+
59
+ ## Session Config
60
+
61
+ persistence: true
62
+ enforcement: warn
63
+ agents-per-wave: 6 (deep: 18)
64
+ waves: 5
65
+ recent-commits: 20
66
+ test-command: npm test
67
+ typecheck-command: npm run typecheck
68
+ lint-command: npm run lint
69
+ stale-branch-days: 7
70
+ plugin-freshness-days: 30
71
+ plan-baseline-path: OVERRIDE-IN-owner.yaml # placeholder, NOT a real path — resolve host-locally
72
+ plan-prd-location: docs/prd
73
+ plan-retro-location: docs/retro
74
+ plan-default-visibility: internal
75
+ vcs: gitlab
76
+ auto-skill-dispatch: false
77
+ vault-integration:
78
+ enabled: true
79
+ vault-dir: ~/Projects/vault
80
+ mode: warn
81
+ vault-name:
82
+ docs-orchestrator:
83
+ enabled: false
84
+ audiences: [user, dev, vault]
85
+ mode: warn
86
+ vault-staleness:
87
+ enabled: false
88
+ thresholds:
89
+ top: 30
90
+ active: 60
91
+ archived: 180
92
+ mode: warn
93
+ docs-staleness:
94
+ enabled: false
95
+ thresholds:
96
+ living: 90
97
+ mode: warn
98
+ moc-staleness:
99
+ enabled: false
100
+ thresholds:
101
+ moc: 90
102
+ mode: warn
103
+ context-coverage:
104
+ enabled: false
105
+ mode: warn
106
+ worktree-orphans:
107
+ enabled: false
108
+ base-branch: main
109
+ mode: warn
110
+ drift-check:
111
+ enabled: true
112
+ mode: warn
113
+ check-docs-parity: true
114
+ wave-reviewers:
115
+ enabled: false
116
+ reviewers: []
117
+ mode: warn
118
+ memory-cleanup-soft-limit: 180
119
+ vault-mirror:
120
+ quality:
121
+ min-narrative-chars: 400
122
+ min-confidence: 0.5
123
+ memory:
124
+ banner:
125
+ enabled: true
126
+ proposals:
127
+ enabled: true
128
+ quota-per-wave: 5
129
+ confidence-floor: 0.5
130
+ auto-dream:
131
+ min-confidence: 0.5
132
+ cold-start:
133
+ enabled: true
134
+ nudge-after-hours: 1
135
+ silence-after-sessions: 1
136
+ state-md-lock:
137
+ enabled: true
138
+ timeout-ms: 10000
139
+ handover-gate:
140
+ enabled: true
141
+ max-open-questions: 3
142
+ issue-budget:
143
+ max-per-session: 12
144
+ mode: strict
145
+ overflow: collect-issue
146
+ broken-window-budget:
147
+ enabled: false
148
+ due-days: 7
149
+ slopcheck:
150
+ enabled: false
151
+ sources: [plan, discovery]
152
+ templates-first:
153
+ enabled: true
154
+ hosts: [github, gitlab]
155
+ verification-auto-fix:
156
+ enabled: false
157
+ max-retries: 2
158
+ discovery-validator:
159
+ enabled: false
160
+ frontend-slop-hook:
161
+ enabled: false
162
+ loop-guard:
163
+ enabled: true
164
+ threshold: 3
165
+ window: 5
166
+ instruction-budget:
167
+ enabled: true
168
+ ceiling: 480
169
+ mode: warn
170
+ config-protection:
171
+ enabled: true
172
+ mode: warn
173
+ allow-config-weakening: false
174
+ custom-phases:
175
+ - name: archive-closed-prds
176
+ when: both
177
+ command: node scripts/archive-closed-prds.mjs --apply
178
+ mode: warn
179
+ - name: archive-closed-plans
180
+ when: both
181
+ command: node scripts/archive-closed-prds.mjs --apply --prd-dir docs/plans --vault-subdir 01-projects/session-orchestrator/plans
182
+ mode: warn
183
+ remote-hosts:
184
+ - alias: m5
185
+ roles-allowed: [test, ui, perf]
186
+ evolve:
187
+ extra-sources: []
188
+ dialectic:
189
+ cadence: 5
190
+ model: haiku
191
+ budget-tokens: 32000
192
+ eval:
193
+ enabled: true
194
+ mode: warn
195
+ judge: off
196
+ report: html
197
+ handle:
198
+ reconcile:
199
+ enabled: false
200
+ mode: warn
201
+ targets: [repo-local]
202
+ rule-expiry-days: null
203
+ confidence-floor: 0.5
204
+ min-rule-days: 7
205
+ min-insight-chars: 24
206
+
207
+ ## Skill Evolution <!-- consistency:exempt:parity-exempt-skill-evolution-block -->
208
+
209
+ > Opt-in self-evolution autonomy gate (Epic #643). A DISTINCT top-level block from the `evolve:` Session Config key above — `scripts/lib/config/skill-evolution.mjs` parses it independently of the `## Session Config` boundary, so `claude-md-drift-check` Check 6 (session-config-parity) never flags it.
210
+ > See `docs/session-config-reference.md` § Skill Evolution for the #652 activation history, the C2/H1-guard detail, and the quadruple-gate + MR-only rules.
211
+
212
+ skill-evolution:
213
+ autonomy: autonomous-gated # off | advisory | autonomous-gated — armed (#652)
214
+ evidence-floor: 0.5 # float 0.0..1.0 — min evidence before an autonomous-gated repair acts
215
+ judge: off # opt-in session-end LLM-judge (advisory only); default off
216
+
217
+ ## Dispatcher Autonomy <!-- consistency:exempt:parity-exempt-dispatcher-autonomy-block -->
218
+
219
+ > **Parity-exempt section** (Epic #673, #679). Intentionally OUTSIDE `## Session Config` so `claude-md-drift-check` Check-6 (session-config-parity) does not flag repos that have not adopted this feature — `scripts/lib/config/dispatcher-autonomy.mjs` parses it independently.
220
+ > This block's committed presence is itself the never-re-ask marker (session-start Phase 1.1 migration trigger). Effective autonomy resolves host-locally: env > `owner.yaml` > committed > `off`.
221
+ > See `docs/session-config-reference.md` § Dispatcher Autonomy for the #681 capture history and the full precedence chain.
222
+
223
+ dispatcher-autonomy:
224
+ autonomy: off # off | advisory | autonomous-gated — default off (fail-closed)
225
+ confidence-floor: 0.5 # float 0.0..1.0