@openrig/cli 0.5.2 → 0.5.4

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 (586) hide show
  1. package/daemon/assets/plugins/openrig-core/.claude-plugin/plugin.json +1 -1
  2. package/daemon/assets/plugins/openrig-core/.codex-plugin/plugin.json +1 -1
  3. package/daemon/assets/plugins/openrig-core/README.md +1 -1
  4. package/daemon/assets/plugins/openrig-core/hooks/claude.json +36 -0
  5. package/daemon/assets/plugins/openrig-core/hooks/codex.json +27 -0
  6. package/daemon/assets/plugins/openrig-core/hooks/scripts/refocus.cjs +152 -0
  7. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/SKILL.md +35 -3
  8. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/precompact-hook.mjs +8 -95
  9. package/daemon/assets/plugins/openrig-core/skills/claude-compaction-restore/scripts/restore-from-jsonl.mjs +63 -20
  10. package/daemon/assets/plugins/openrig-core/skills/forming-an-openrig-mental-model/SKILL.md +6 -2
  11. package/daemon/assets/plugins/openrig-core/skills/messaging-the-human/SKILL.md +28 -2
  12. package/daemon/assets/plugins/openrig-core/skills/mission-slice-sop/SKILL.md +42 -52
  13. package/daemon/assets/plugins/openrig-core/skills/openrig-skills/SKILL.md +26 -1
  14. package/daemon/assets/plugins/openrig-core/skills/openrig-user/SKILL.md +7 -2
  15. package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/CHANGELOG.md +64 -0
  16. package/daemon/assets/plugins/openrig-core/skills/orienting-to-an-inherited-seat/SKILL.md +235 -0
  17. package/daemon/assets/plugins/openrig-core/skills/queue-handoff/SKILL.md +31 -1
  18. package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/CHANGELOG.md +48 -0
  19. package/daemon/assets/plugins/openrig-core/skills/retiring-and-inheriting-a-seat/SKILL.md +211 -0
  20. package/daemon/assets/plugins/openrig-core/skills/seat-continuity-and-handover/SKILL.md +8 -0
  21. package/daemon/assets/plugins/openrig-core/skills/software-for-agents/SKILL.md +31 -9
  22. package/daemon/context-packs/skills/core/agent-starters/SKILL.md +132 -0
  23. package/daemon/context-packs/skills/core/agent-starters/manifest.yaml +9 -0
  24. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/SKILL.md +112 -0
  25. package/daemon/context-packs/skills/core/agent-startup-and-context-ingestion/manifest.yaml +9 -0
  26. package/daemon/context-packs/skills/core/attention-queue/SKILL.md +264 -0
  27. package/daemon/context-packs/skills/core/attention-queue/manifest.yaml +9 -0
  28. package/daemon/context-packs/skills/core/cross-host-rig-commands/SKILL.md +195 -0
  29. package/daemon/context-packs/skills/core/cross-host-rig-commands/manifest.yaml +9 -0
  30. package/daemon/context-packs/skills/core/human-in-the-loop/SKILL.md +104 -0
  31. package/daemon/context-packs/skills/core/human-in-the-loop/manifest.yaml +9 -0
  32. package/daemon/context-packs/skills/core/openrig-architect/SKILL.md +378 -0
  33. package/daemon/context-packs/skills/core/openrig-architect/manifest.yaml +9 -0
  34. package/daemon/context-packs/skills/core/openrig-cmux/SKILL.md +81 -0
  35. package/daemon/context-packs/skills/core/openrig-cmux/manifest.yaml +9 -0
  36. package/daemon/context-packs/skills/core/openrig-herdr/SKILL.md +153 -0
  37. package/daemon/context-packs/skills/core/openrig-herdr/manifest.yaml +9 -0
  38. package/daemon/context-packs/skills/core/openrig-upgrade/SKILL.md +460 -0
  39. package/daemon/context-packs/skills/core/openrig-upgrade/manifest.yaml +9 -0
  40. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/SKILL.md +101 -0
  41. package/daemon/context-packs/skills/core/rig-bundles-and-shareable-artifacts/manifest.yaml +9 -0
  42. package/daemon/context-packs/skills/core/rig-lifecycle/SKILL.md +127 -0
  43. package/daemon/context-packs/skills/core/rig-lifecycle/manifest.yaml +9 -0
  44. package/daemon/context-packs/skills/core/session-source-fork/SKILL.md +160 -0
  45. package/daemon/context-packs/skills/core/session-source-fork/manifest.yaml +9 -0
  46. package/daemon/context-packs/skills/core/specification-system/SKILL.md +103 -0
  47. package/daemon/context-packs/skills/core/specification-system/manifest.yaml +9 -0
  48. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/SKILL.md +118 -0
  49. package/daemon/context-packs/skills/core/topology-mutation-and-seat-management/manifest.yaml +9 -0
  50. package/daemon/context-packs/skills/core/watchdog/SKILL.md +126 -0
  51. package/daemon/context-packs/skills/core/watchdog/manifest.yaml +9 -0
  52. package/daemon/context-packs/skills/pm/backlog-capture/SKILL.md +43 -0
  53. package/daemon/context-packs/skills/pm/backlog-capture/manifest.yaml +9 -0
  54. package/daemon/context-packs/skills/pm/context-builder/SKILL.md +87 -0
  55. package/daemon/context-packs/skills/pm/context-builder/manifest.yaml +9 -0
  56. package/daemon/context-packs/skills/pm/exec-summary/SKILL.md +84 -0
  57. package/daemon/context-packs/skills/pm/exec-summary/manifest.yaml +9 -0
  58. package/daemon/context-packs/skills/pm/office-hours/SKILL.md +129 -0
  59. package/daemon/context-packs/skills/pm/office-hours/manifest.yaml +9 -0
  60. package/daemon/context-packs/skills/pm/plan-review/SKILL.md +98 -0
  61. package/daemon/context-packs/skills/pm/plan-review/manifest.yaml +9 -0
  62. package/daemon/context-packs/skills/pm/requirements-writer/SKILL.md +113 -0
  63. package/daemon/context-packs/skills/pm/requirements-writer/manifest.yaml +9 -0
  64. package/daemon/context-packs/skills/pm/ui-mockup/SKILL.md +76 -0
  65. package/daemon/context-packs/skills/pm/ui-mockup/manifest.yaml +9 -0
  66. package/daemon/context-packs/skills/pods/development-team/SKILL.md +156 -0
  67. package/daemon/context-packs/skills/pods/development-team/manifest.yaml +9 -0
  68. package/daemon/context-packs/skills/pods/orchestration-team/SKILL.md +307 -0
  69. package/daemon/context-packs/skills/pods/orchestration-team/manifest.yaml +9 -0
  70. package/daemon/context-packs/skills/pods/oversight-team/SKILL.md +106 -0
  71. package/daemon/context-packs/skills/pods/oversight-team/manifest.yaml +9 -0
  72. package/daemon/context-packs/skills/pods/review-team/SKILL.md +213 -0
  73. package/daemon/context-packs/skills/pods/review-team/manifest.yaml +9 -0
  74. package/daemon/context-packs/skills/process/agent-browser/LOCAL-INSIGHTS.md +189 -0
  75. package/daemon/context-packs/skills/process/agent-browser/OPENRIG.md +40 -0
  76. package/daemon/context-packs/skills/process/agent-browser/SKILL.md +427 -0
  77. package/daemon/context-packs/skills/process/agent-browser/manifest.yaml +13 -0
  78. package/daemon/context-packs/skills/process/brainstorming/OPENRIG.md +48 -0
  79. package/daemon/context-packs/skills/process/brainstorming/SKILL.md +107 -0
  80. package/daemon/context-packs/skills/process/brainstorming/manifest.yaml +11 -0
  81. package/daemon/context-packs/skills/process/context-engineering/SKILL.md +479 -0
  82. package/daemon/context-packs/skills/process/context-engineering/manifest.yaml +9 -0
  83. package/daemon/context-packs/skills/process/dogfood/SKILL.md +225 -0
  84. package/daemon/context-packs/skills/process/dogfood/manifest.yaml +13 -0
  85. package/daemon/context-packs/skills/process/dogfood/references/issue-taxonomy.md +109 -0
  86. package/daemon/context-packs/skills/process/dogfood/templates/dogfood-report-template.md +53 -0
  87. package/daemon/context-packs/skills/process/executing-plans/OPENRIG.md +56 -0
  88. package/daemon/context-packs/skills/process/executing-plans/SKILL.md +94 -0
  89. package/daemon/context-packs/skills/process/executing-plans/manifest.yaml +11 -0
  90. package/daemon/context-packs/skills/process/frontend-design/LICENSE.txt +177 -0
  91. package/daemon/context-packs/skills/process/frontend-design/SKILL.md +50 -0
  92. package/daemon/context-packs/skills/process/frontend-design/manifest.yaml +11 -0
  93. package/daemon/context-packs/skills/process/systematic-debugging/SKILL.md +301 -0
  94. package/daemon/context-packs/skills/process/systematic-debugging/condition-based-waiting-example.ts +158 -0
  95. package/daemon/context-packs/skills/process/systematic-debugging/condition-based-waiting.md +115 -0
  96. package/daemon/context-packs/skills/process/systematic-debugging/defense-in-depth.md +122 -0
  97. package/daemon/context-packs/skills/process/systematic-debugging/find-polluter.sh +63 -0
  98. package/daemon/context-packs/skills/process/systematic-debugging/manifest.yaml +19 -0
  99. package/daemon/context-packs/skills/process/systematic-debugging/root-cause-tracing.md +169 -0
  100. package/daemon/context-packs/skills/process/test-driven-development/SKILL.md +385 -0
  101. package/daemon/context-packs/skills/process/test-driven-development/manifest.yaml +11 -0
  102. package/daemon/context-packs/skills/process/test-driven-development/testing-anti-patterns.md +299 -0
  103. package/daemon/context-packs/skills/process/using-superpowers/OPENRIG.md +48 -0
  104. package/daemon/context-packs/skills/process/using-superpowers/SKILL.md +106 -0
  105. package/daemon/context-packs/skills/process/using-superpowers/manifest.yaml +11 -0
  106. package/daemon/context-packs/skills/process/verification-before-completion/SKILL.md +155 -0
  107. package/daemon/context-packs/skills/process/verification-before-completion/manifest.yaml +9 -0
  108. package/daemon/context-packs/skills/process/writing-plans/OPENRIG.md +52 -0
  109. package/daemon/context-packs/skills/process/writing-plans/SKILL.md +126 -0
  110. package/daemon/context-packs/skills/process/writing-plans/manifest.yaml +11 -0
  111. package/daemon/context-packs/world/install/01-world-from-primitives.md +97 -0
  112. package/daemon/context-packs/world/install/02-permission-self-sleep.md +141 -0
  113. package/daemon/context-packs/world/install/03-what-this-is-for.md +86 -0
  114. package/daemon/context-packs/world/install/04-ontology.md +790 -0
  115. package/daemon/context-packs/world/install/05-harness-power-use.md +355 -0
  116. package/daemon/context-packs/world/install/06-a-competent-turn.md +225 -0
  117. package/daemon/context-packs/world/install/manifest.yaml +125 -0
  118. package/daemon/context-packs/world/install/reference-material.md +125 -0
  119. package/daemon/context-packs/world/install/what-you-can-do.md +416 -0
  120. package/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  121. package/daemon/dist/adapters/claude-code-adapter.js +7 -4
  122. package/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  123. package/daemon/dist/adapters/claude-resume.js +2 -2
  124. package/daemon/dist/adapters/claude-resume.js.map +1 -1
  125. package/daemon/dist/adapters/tmux.d.ts +41 -2
  126. package/daemon/dist/adapters/tmux.d.ts.map +1 -1
  127. package/daemon/dist/adapters/tmux.js +58 -18
  128. package/daemon/dist/adapters/tmux.js.map +1 -1
  129. package/daemon/dist/adapters/yolo-mode.d.ts +18 -0
  130. package/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
  131. package/daemon/dist/adapters/yolo-mode.js +21 -0
  132. package/daemon/dist/adapters/yolo-mode.js.map +1 -1
  133. package/daemon/dist/build-info.js +3 -3
  134. package/daemon/dist/daemon-db-path.d.ts.map +1 -1
  135. package/daemon/dist/daemon-db-path.js +50 -2
  136. package/daemon/dist/daemon-db-path.js.map +1 -1
  137. package/daemon/dist/domain/codex-thread-id.d.ts +95 -0
  138. package/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
  139. package/daemon/dist/domain/codex-thread-id.js +171 -2
  140. package/daemon/dist/domain/codex-thread-id.js.map +1 -1
  141. package/daemon/dist/domain/context-packs/context-pack-types.d.ts +48 -0
  142. package/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
  143. package/daemon/dist/domain/context-packs/context-pack-types.js +8 -0
  144. package/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
  145. package/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
  146. package/daemon/dist/domain/context-packs/manifest-parser.js +234 -2
  147. package/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
  148. package/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts +34 -0
  149. package/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts.map +1 -0
  150. package/daemon/dist/domain/context-packs/probe-eval-bridge.js +38 -0
  151. package/daemon/dist/domain/context-packs/probe-eval-bridge.js.map +1 -0
  152. package/daemon/dist/domain/context-packs/profile-composer.d.ts +49 -0
  153. package/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -0
  154. package/daemon/dist/domain/context-packs/profile-composer.js +125 -0
  155. package/daemon/dist/domain/context-packs/profile-composer.js.map +1 -0
  156. package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +53 -0
  157. package/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -0
  158. package/daemon/dist/domain/context-packs/profile-source-resolver.js +129 -0
  159. package/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -0
  160. package/daemon/dist/domain/context-packs/seat-recap-store.d.ts +48 -0
  161. package/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -0
  162. package/daemon/dist/domain/context-packs/seat-recap-store.js +123 -0
  163. package/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -0
  164. package/daemon/dist/domain/markdown-address.d.ts +56 -0
  165. package/daemon/dist/domain/markdown-address.d.ts.map +1 -0
  166. package/daemon/dist/domain/markdown-address.js +188 -0
  167. package/daemon/dist/domain/markdown-address.js.map +1 -0
  168. package/daemon/dist/domain/model-divergence/current-generation-record.d.ts +8 -2
  169. package/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
  170. package/daemon/dist/domain/model-divergence/current-generation-record.js +1 -1
  171. package/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
  172. package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +33 -21
  173. package/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -1
  174. package/daemon/dist/domain/model-divergence/model-divergence-monitor.js +64 -55
  175. package/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
  176. package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts +4 -0
  177. package/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
  178. package/daemon/dist/domain/periodic-snapshot-scheduler.js +5 -1
  179. package/daemon/dist/domain/periodic-snapshot-scheduler.js.map +1 -1
  180. package/daemon/dist/domain/permission-drift-observer.d.ts.map +1 -1
  181. package/daemon/dist/domain/permission-drift-observer.js +6 -1
  182. package/daemon/dist/domain/permission-drift-observer.js.map +1 -1
  183. package/daemon/dist/domain/plugin-discovery-service.d.ts +16 -0
  184. package/daemon/dist/domain/plugin-discovery-service.d.ts.map +1 -1
  185. package/daemon/dist/domain/plugin-discovery-service.js +175 -1
  186. package/daemon/dist/domain/plugin-discovery-service.js.map +1 -1
  187. package/daemon/dist/domain/plugin-vendor-service.d.ts +9 -5
  188. package/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
  189. package/daemon/dist/domain/plugin-vendor-service.js +101 -12
  190. package/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
  191. package/daemon/dist/domain/process-census.d.ts +25 -0
  192. package/daemon/dist/domain/process-census.d.ts.map +1 -0
  193. package/daemon/dist/domain/process-census.js +47 -0
  194. package/daemon/dist/domain/process-census.js.map +1 -0
  195. package/daemon/dist/domain/queue-repository.d.ts +3 -1
  196. package/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  197. package/daemon/dist/domain/queue-repository.js +50 -2
  198. package/daemon/dist/domain/queue-repository.js.map +1 -1
  199. package/daemon/dist/domain/reconciler.d.ts.map +1 -1
  200. package/daemon/dist/domain/reconciler.js +6 -1
  201. package/daemon/dist/domain/reconciler.js.map +1 -1
  202. package/daemon/dist/domain/resume-metadata-refresher.d.ts +31 -2
  203. package/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
  204. package/daemon/dist/domain/resume-metadata-refresher.js +64 -29
  205. package/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
  206. package/daemon/dist/domain/review/compose.d.ts +5 -26
  207. package/daemon/dist/domain/review/compose.d.ts.map +1 -1
  208. package/daemon/dist/domain/review/compose.js +31 -57
  209. package/daemon/dist/domain/review/compose.js.map +1 -1
  210. package/daemon/dist/domain/rig-repository.d.ts +4 -0
  211. package/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  212. package/daemon/dist/domain/rig-repository.js +9 -0
  213. package/daemon/dist/domain/rig-repository.js.map +1 -1
  214. package/daemon/dist/domain/rigspec-instantiator.d.ts +13 -0
  215. package/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  216. package/daemon/dist/domain/rigspec-instantiator.js +71 -0
  217. package/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  218. package/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  219. package/daemon/dist/domain/rigspec-schema.js +19 -3
  220. package/daemon/dist/domain/rigspec-schema.js.map +1 -1
  221. package/daemon/dist/domain/running-name-guard.d.ts +52 -0
  222. package/daemon/dist/domain/running-name-guard.d.ts.map +1 -0
  223. package/daemon/dist/domain/running-name-guard.js +34 -0
  224. package/daemon/dist/domain/running-name-guard.js.map +1 -0
  225. package/daemon/dist/domain/scope/logical-checkbox.d.ts +26 -0
  226. package/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -0
  227. package/daemon/dist/domain/scope/logical-checkbox.js +65 -0
  228. package/daemon/dist/domain/scope/logical-checkbox.js.map +1 -0
  229. package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts +1 -1
  230. package/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -1
  231. package/daemon/dist/domain/scope/plan-lock-artifacts.js +2 -2
  232. package/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -1
  233. package/daemon/dist/domain/scope/scaffold-placeholder.d.ts +22 -0
  234. package/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -1
  235. package/daemon/dist/domain/scope/scaffold-placeholder.js +24 -0
  236. package/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -1
  237. package/daemon/dist/domain/seat-activity-service.d.ts +1 -0
  238. package/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
  239. package/daemon/dist/domain/seat-activity-service.js +39 -23
  240. package/daemon/dist/domain/seat-activity-service.js.map +1 -1
  241. package/daemon/dist/domain/seat-handover-service.d.ts +22 -0
  242. package/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  243. package/daemon/dist/domain/seat-handover-service.js +32 -2
  244. package/daemon/dist/domain/seat-handover-service.js.map +1 -1
  245. package/daemon/dist/domain/seat-lifecycle-service.d.ts +97 -0
  246. package/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -0
  247. package/daemon/dist/domain/seat-lifecycle-service.js +312 -0
  248. package/daemon/dist/domain/seat-lifecycle-service.js.map +1 -0
  249. package/daemon/dist/domain/session-transport.d.ts +16 -5
  250. package/daemon/dist/domain/session-transport.d.ts.map +1 -1
  251. package/daemon/dist/domain/session-transport.js +155 -16
  252. package/daemon/dist/domain/session-transport.js.map +1 -1
  253. package/daemon/dist/domain/shell-classifier.d.ts +23 -0
  254. package/daemon/dist/domain/shell-classifier.d.ts.map +1 -0
  255. package/daemon/dist/domain/shell-classifier.js +36 -0
  256. package/daemon/dist/domain/shell-classifier.js.map +1 -0
  257. package/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
  258. package/daemon/dist/domain/slices/slice-detail-projector.js +10 -1
  259. package/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
  260. package/daemon/dist/domain/spec-validation-advisory.d.ts +17 -0
  261. package/daemon/dist/domain/spec-validation-advisory.d.ts.map +1 -0
  262. package/daemon/dist/domain/spec-validation-advisory.js +38 -0
  263. package/daemon/dist/domain/spec-validation-advisory.js.map +1 -0
  264. package/daemon/dist/domain/successor-session-launcher.d.ts +7 -0
  265. package/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  266. package/daemon/dist/domain/successor-session-launcher.js +38 -1
  267. package/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  268. package/daemon/dist/domain/topology-defaults-installer.d.ts +47 -0
  269. package/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -0
  270. package/daemon/dist/domain/topology-defaults-installer.js +92 -0
  271. package/daemon/dist/domain/topology-defaults-installer.js.map +1 -0
  272. package/daemon/dist/domain/transcript-rotation.d.ts +4 -0
  273. package/daemon/dist/domain/transcript-rotation.d.ts.map +1 -1
  274. package/daemon/dist/domain/transcript-rotation.js +61 -3
  275. package/daemon/dist/domain/transcript-rotation.js.map +1 -1
  276. package/daemon/dist/domain/transcript-store.d.ts.map +1 -1
  277. package/daemon/dist/domain/transcript-store.js +9 -2
  278. package/daemon/dist/domain/transcript-store.js.map +1 -1
  279. package/daemon/dist/domain/types.d.ts +39 -0
  280. package/daemon/dist/domain/types.d.ts.map +1 -1
  281. package/daemon/dist/domain/types.js.map +1 -1
  282. package/daemon/dist/domain/user-settings/settings-store.d.ts +10 -1
  283. package/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  284. package/daemon/dist/domain/user-settings/settings-store.js +39 -0
  285. package/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  286. package/daemon/dist/routes/context-packs.d.ts.map +1 -1
  287. package/daemon/dist/routes/context-packs.js +205 -0
  288. package/daemon/dist/routes/context-packs.js.map +1 -1
  289. package/daemon/dist/routes/queue.d.ts.map +1 -1
  290. package/daemon/dist/routes/queue.js +29 -24
  291. package/daemon/dist/routes/queue.js.map +1 -1
  292. package/daemon/dist/routes/rigspec.js +20 -6
  293. package/daemon/dist/routes/rigspec.js.map +1 -1
  294. package/daemon/dist/routes/seat.d.ts.map +1 -1
  295. package/daemon/dist/routes/seat.js +69 -0
  296. package/daemon/dist/routes/seat.js.map +1 -1
  297. package/daemon/dist/routes/sessions.js +55 -0
  298. package/daemon/dist/routes/sessions.js.map +1 -1
  299. package/daemon/dist/routes/transport.d.ts.map +1 -1
  300. package/daemon/dist/routes/transport.js +52 -39
  301. package/daemon/dist/routes/transport.js.map +1 -1
  302. package/daemon/dist/routes/up.js +21 -2
  303. package/daemon/dist/routes/up.js.map +1 -1
  304. package/daemon/dist/seat-recap-store-surface.d.ts +2 -0
  305. package/daemon/dist/seat-recap-store-surface.d.ts.map +1 -0
  306. package/daemon/dist/seat-recap-store-surface.js +6 -0
  307. package/daemon/dist/seat-recap-store-surface.js.map +1 -0
  308. package/daemon/dist/startup.d.ts.map +1 -1
  309. package/daemon/dist/startup.js +37 -6
  310. package/daemon/dist/startup.js.map +1 -1
  311. package/daemon/docs/reference/chain-file-convention.md +115 -0
  312. package/daemon/docs/reference/legacy-topology-migration.md +53 -0
  313. package/daemon/docs/reference/refocus-channel.md +80 -0
  314. package/daemon/docs/reference/sdlc-conventions.md +24 -0
  315. package/daemon/specs/agents/shared/skills/core/attention-queue/SKILL.md +1 -1
  316. package/daemon/specs/agents/shared/skills/core/human-in-the-loop/SKILL.md +1 -1
  317. package/daemon/specs/agents/shared/skills/core/session-source-fork/SKILL.md +1 -1
  318. package/daemon/specs/agents/shared/skills/core/watchdog/SKILL.md +4 -4
  319. package/daemon/specs/agents/shared/skills/pods/development-team/SKILL.md +8 -0
  320. package/daemon/specs/agents/shared/skills/pods/orchestration-team/SKILL.md +72 -31
  321. package/daemon/specs/agents/shared/skills/pods/oversight-team/SKILL.md +106 -0
  322. package/daemon/specs/agents/shared/skills/process/context-engineering/SKILL.md +479 -0
  323. package/daemon/specs/agents/shared/skills/process/test-driven-development/SKILL.md +9 -0
  324. package/daemon/specs/rigs/launch/demo/project-example/README.md +25 -0
  325. package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/SPEC.md +19 -0
  326. package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROGRESS.md +6 -0
  327. package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/PROOF.md +7 -0
  328. package/daemon/specs/rigs/launch/demo/project-example/missions/improve-onboarding/slices/01-shorten-first-run/SPEC.md +31 -0
  329. package/daemon/specs/rigs/preview/product-team/topology/instance/CRAFT.md +24 -0
  330. package/daemon/specs/rigs/preview/product-team/topology/rig/CRAFT.md +21 -0
  331. package/daemon/specs/rigs/preview/product-team/topology/rig/ORCHESTRATION-CRAFT.md +50 -0
  332. package/daemon/specs/rigs/preview/product-team/topology/seats/dev1-qa/CRAFT.md +13 -0
  333. package/daemon/specs/rigs/preview/product-team/topology/seats/orch1-lead/CRAFT.md +17 -0
  334. package/daemon/specs/rigs/preview/product-team/topology/seats/rev1-r1/CRAFT.md +17 -0
  335. package/daemon/specs/rigs/preview/product-team/topology/seats/rev1-r2/CRAFT.md +15 -0
  336. package/dist/build-info.js +3 -3
  337. package/dist/cli-error.js +1 -1
  338. package/dist/cli-error.js.map +1 -1
  339. package/dist/commands/broadcast.js +6 -0
  340. package/dist/commands/broadcast.js.map +1 -1
  341. package/dist/commands/config.d.ts.map +1 -1
  342. package/dist/commands/config.js +8 -0
  343. package/dist/commands/config.js.map +1 -1
  344. package/dist/commands/context.d.ts.map +1 -1
  345. package/dist/commands/context.js +363 -48
  346. package/dist/commands/context.js.map +1 -1
  347. package/dist/commands/daemon.d.ts.map +1 -1
  348. package/dist/commands/daemon.js +23 -2
  349. package/dist/commands/daemon.js.map +1 -1
  350. package/dist/commands/import.d.ts.map +1 -1
  351. package/dist/commands/import.js +10 -0
  352. package/dist/commands/import.js.map +1 -1
  353. package/dist/commands/proof.d.ts.map +1 -1
  354. package/dist/commands/proof.js +70 -12
  355. package/dist/commands/proof.js.map +1 -1
  356. package/dist/commands/queue.d.ts.map +1 -1
  357. package/dist/commands/queue.js +36 -13
  358. package/dist/commands/queue.js.map +1 -1
  359. package/dist/commands/rig.d.ts.map +1 -1
  360. package/dist/commands/rig.js +5 -0
  361. package/dist/commands/rig.js.map +1 -1
  362. package/dist/commands/seat.d.ts.map +1 -1
  363. package/dist/commands/seat.js +88 -0
  364. package/dist/commands/seat.js.map +1 -1
  365. package/dist/commands/send.d.ts.map +1 -1
  366. package/dist/commands/send.js +224 -20
  367. package/dist/commands/send.js.map +1 -1
  368. package/dist/commands/transcript.d.ts.map +1 -1
  369. package/dist/commands/transcript.js +25 -1
  370. package/dist/commands/transcript.js.map +1 -1
  371. package/dist/commands/up.d.ts.map +1 -1
  372. package/dist/commands/up.js +8 -0
  373. package/dist/commands/up.js.map +1 -1
  374. package/dist/commands/walk.d.ts +1 -1
  375. package/dist/commands/walk.d.ts.map +1 -1
  376. package/dist/commands/walk.js +293 -30
  377. package/dist/commands/walk.js.map +1 -1
  378. package/dist/config-store.d.ts +15 -1
  379. package/dist/config-store.d.ts.map +1 -1
  380. package/dist/config-store.js +35 -1
  381. package/dist/config-store.js.map +1 -1
  382. package/dist/lib/scope/logical-checkbox.d.ts +26 -0
  383. package/dist/lib/scope/logical-checkbox.d.ts.map +1 -0
  384. package/dist/lib/scope/logical-checkbox.js +65 -0
  385. package/dist/lib/scope/logical-checkbox.js.map +1 -0
  386. package/dist/lib/scope/scaffold-placeholder.d.ts +22 -0
  387. package/dist/lib/scope/scaffold-placeholder.d.ts.map +1 -1
  388. package/dist/lib/scope/scaffold-placeholder.js +24 -0
  389. package/dist/lib/scope/scaffold-placeholder.js.map +1 -1
  390. package/dist/lib/topology-trace.d.ts +36 -0
  391. package/dist/lib/topology-trace.d.ts.map +1 -0
  392. package/dist/lib/topology-trace.js +91 -0
  393. package/dist/lib/topology-trace.js.map +1 -0
  394. package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.d.ts.map +1 -1
  395. package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js +7 -4
  396. package/node_modules/@openrig/daemon/dist/adapters/claude-code-adapter.js.map +1 -1
  397. package/node_modules/@openrig/daemon/dist/adapters/claude-resume.js +2 -2
  398. package/node_modules/@openrig/daemon/dist/adapters/claude-resume.js.map +1 -1
  399. package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts +41 -2
  400. package/node_modules/@openrig/daemon/dist/adapters/tmux.d.ts.map +1 -1
  401. package/node_modules/@openrig/daemon/dist/adapters/tmux.js +58 -18
  402. package/node_modules/@openrig/daemon/dist/adapters/tmux.js.map +1 -1
  403. package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.d.ts +18 -0
  404. package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.d.ts.map +1 -1
  405. package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.js +21 -0
  406. package/node_modules/@openrig/daemon/dist/adapters/yolo-mode.js.map +1 -1
  407. package/node_modules/@openrig/daemon/dist/build-info.js +3 -3
  408. package/node_modules/@openrig/daemon/dist/daemon-db-path.d.ts.map +1 -1
  409. package/node_modules/@openrig/daemon/dist/daemon-db-path.js +50 -2
  410. package/node_modules/@openrig/daemon/dist/daemon-db-path.js.map +1 -1
  411. package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.d.ts +95 -0
  412. package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.d.ts.map +1 -1
  413. package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.js +171 -2
  414. package/node_modules/@openrig/daemon/dist/domain/codex-thread-id.js.map +1 -1
  415. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts +48 -0
  416. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.d.ts.map +1 -1
  417. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js +8 -0
  418. package/node_modules/@openrig/daemon/dist/domain/context-packs/context-pack-types.js.map +1 -1
  419. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.d.ts.map +1 -1
  420. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js +234 -2
  421. package/node_modules/@openrig/daemon/dist/domain/context-packs/manifest-parser.js.map +1 -1
  422. package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts +34 -0
  423. package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.d.ts.map +1 -0
  424. package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.js +38 -0
  425. package/node_modules/@openrig/daemon/dist/domain/context-packs/probe-eval-bridge.js.map +1 -0
  426. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts +49 -0
  427. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.d.ts.map +1 -0
  428. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js +125 -0
  429. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-composer.js.map +1 -0
  430. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts +53 -0
  431. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.d.ts.map +1 -0
  432. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js +129 -0
  433. package/node_modules/@openrig/daemon/dist/domain/context-packs/profile-source-resolver.js.map +1 -0
  434. package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.d.ts +48 -0
  435. package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.d.ts.map +1 -0
  436. package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.js +123 -0
  437. package/node_modules/@openrig/daemon/dist/domain/context-packs/seat-recap-store.js.map +1 -0
  438. package/node_modules/@openrig/daemon/dist/domain/markdown-address.d.ts +56 -0
  439. package/node_modules/@openrig/daemon/dist/domain/markdown-address.d.ts.map +1 -0
  440. package/node_modules/@openrig/daemon/dist/domain/markdown-address.js +188 -0
  441. package/node_modules/@openrig/daemon/dist/domain/markdown-address.js.map +1 -0
  442. package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.d.ts +8 -2
  443. package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.d.ts.map +1 -1
  444. package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.js +1 -1
  445. package/node_modules/@openrig/daemon/dist/domain/model-divergence/current-generation-record.js.map +1 -1
  446. package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts +33 -21
  447. package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.d.ts.map +1 -1
  448. package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.js +64 -55
  449. package/node_modules/@openrig/daemon/dist/domain/model-divergence/model-divergence-monitor.js.map +1 -1
  450. package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.d.ts +4 -0
  451. package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.d.ts.map +1 -1
  452. package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.js +5 -1
  453. package/node_modules/@openrig/daemon/dist/domain/periodic-snapshot-scheduler.js.map +1 -1
  454. package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.d.ts.map +1 -1
  455. package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.js +6 -1
  456. package/node_modules/@openrig/daemon/dist/domain/permission-drift-observer.js.map +1 -1
  457. package/node_modules/@openrig/daemon/dist/domain/plugin-discovery-service.d.ts +16 -0
  458. package/node_modules/@openrig/daemon/dist/domain/plugin-discovery-service.d.ts.map +1 -1
  459. package/node_modules/@openrig/daemon/dist/domain/plugin-discovery-service.js +175 -1
  460. package/node_modules/@openrig/daemon/dist/domain/plugin-discovery-service.js.map +1 -1
  461. package/node_modules/@openrig/daemon/dist/domain/plugin-vendor-service.d.ts +9 -5
  462. package/node_modules/@openrig/daemon/dist/domain/plugin-vendor-service.d.ts.map +1 -1
  463. package/node_modules/@openrig/daemon/dist/domain/plugin-vendor-service.js +101 -12
  464. package/node_modules/@openrig/daemon/dist/domain/plugin-vendor-service.js.map +1 -1
  465. package/node_modules/@openrig/daemon/dist/domain/process-census.d.ts +25 -0
  466. package/node_modules/@openrig/daemon/dist/domain/process-census.d.ts.map +1 -0
  467. package/node_modules/@openrig/daemon/dist/domain/process-census.js +47 -0
  468. package/node_modules/@openrig/daemon/dist/domain/process-census.js.map +1 -0
  469. package/node_modules/@openrig/daemon/dist/domain/queue-repository.d.ts +3 -1
  470. package/node_modules/@openrig/daemon/dist/domain/queue-repository.d.ts.map +1 -1
  471. package/node_modules/@openrig/daemon/dist/domain/queue-repository.js +50 -2
  472. package/node_modules/@openrig/daemon/dist/domain/queue-repository.js.map +1 -1
  473. package/node_modules/@openrig/daemon/dist/domain/reconciler.d.ts.map +1 -1
  474. package/node_modules/@openrig/daemon/dist/domain/reconciler.js +6 -1
  475. package/node_modules/@openrig/daemon/dist/domain/reconciler.js.map +1 -1
  476. package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.d.ts +31 -2
  477. package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.d.ts.map +1 -1
  478. package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.js +64 -29
  479. package/node_modules/@openrig/daemon/dist/domain/resume-metadata-refresher.js.map +1 -1
  480. package/node_modules/@openrig/daemon/dist/domain/review/compose.d.ts +5 -26
  481. package/node_modules/@openrig/daemon/dist/domain/review/compose.d.ts.map +1 -1
  482. package/node_modules/@openrig/daemon/dist/domain/review/compose.js +31 -57
  483. package/node_modules/@openrig/daemon/dist/domain/review/compose.js.map +1 -1
  484. package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts +4 -0
  485. package/node_modules/@openrig/daemon/dist/domain/rig-repository.d.ts.map +1 -1
  486. package/node_modules/@openrig/daemon/dist/domain/rig-repository.js +9 -0
  487. package/node_modules/@openrig/daemon/dist/domain/rig-repository.js.map +1 -1
  488. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts +13 -0
  489. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.d.ts.map +1 -1
  490. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js +71 -0
  491. package/node_modules/@openrig/daemon/dist/domain/rigspec-instantiator.js.map +1 -1
  492. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.d.ts.map +1 -1
  493. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js +19 -3
  494. package/node_modules/@openrig/daemon/dist/domain/rigspec-schema.js.map +1 -1
  495. package/node_modules/@openrig/daemon/dist/domain/running-name-guard.d.ts +52 -0
  496. package/node_modules/@openrig/daemon/dist/domain/running-name-guard.d.ts.map +1 -0
  497. package/node_modules/@openrig/daemon/dist/domain/running-name-guard.js +34 -0
  498. package/node_modules/@openrig/daemon/dist/domain/running-name-guard.js.map +1 -0
  499. package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.d.ts +26 -0
  500. package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.d.ts.map +1 -0
  501. package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.js +65 -0
  502. package/node_modules/@openrig/daemon/dist/domain/scope/logical-checkbox.js.map +1 -0
  503. package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.d.ts +1 -1
  504. package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.d.ts.map +1 -1
  505. package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.js +2 -2
  506. package/node_modules/@openrig/daemon/dist/domain/scope/plan-lock-artifacts.js.map +1 -1
  507. package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.d.ts +22 -0
  508. package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.d.ts.map +1 -1
  509. package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.js +24 -0
  510. package/node_modules/@openrig/daemon/dist/domain/scope/scaffold-placeholder.js.map +1 -1
  511. package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.d.ts +1 -0
  512. package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.d.ts.map +1 -1
  513. package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.js +39 -23
  514. package/node_modules/@openrig/daemon/dist/domain/seat-activity-service.js.map +1 -1
  515. package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.d.ts +22 -0
  516. package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.d.ts.map +1 -1
  517. package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.js +32 -2
  518. package/node_modules/@openrig/daemon/dist/domain/seat-handover-service.js.map +1 -1
  519. package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.d.ts +97 -0
  520. package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.d.ts.map +1 -0
  521. package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.js +312 -0
  522. package/node_modules/@openrig/daemon/dist/domain/seat-lifecycle-service.js.map +1 -0
  523. package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts +16 -5
  524. package/node_modules/@openrig/daemon/dist/domain/session-transport.d.ts.map +1 -1
  525. package/node_modules/@openrig/daemon/dist/domain/session-transport.js +155 -16
  526. package/node_modules/@openrig/daemon/dist/domain/session-transport.js.map +1 -1
  527. package/node_modules/@openrig/daemon/dist/domain/shell-classifier.d.ts +23 -0
  528. package/node_modules/@openrig/daemon/dist/domain/shell-classifier.d.ts.map +1 -0
  529. package/node_modules/@openrig/daemon/dist/domain/shell-classifier.js +36 -0
  530. package/node_modules/@openrig/daemon/dist/domain/shell-classifier.js.map +1 -0
  531. package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.d.ts.map +1 -1
  532. package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.js +10 -1
  533. package/node_modules/@openrig/daemon/dist/domain/slices/slice-detail-projector.js.map +1 -1
  534. package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.d.ts +17 -0
  535. package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.d.ts.map +1 -0
  536. package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.js +38 -0
  537. package/node_modules/@openrig/daemon/dist/domain/spec-validation-advisory.js.map +1 -0
  538. package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.d.ts +7 -0
  539. package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.d.ts.map +1 -1
  540. package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.js +38 -1
  541. package/node_modules/@openrig/daemon/dist/domain/successor-session-launcher.js.map +1 -1
  542. package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts +47 -0
  543. package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.d.ts.map +1 -0
  544. package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js +92 -0
  545. package/node_modules/@openrig/daemon/dist/domain/topology-defaults-installer.js.map +1 -0
  546. package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.d.ts +4 -0
  547. package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.d.ts.map +1 -1
  548. package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.js +61 -3
  549. package/node_modules/@openrig/daemon/dist/domain/transcript-rotation.js.map +1 -1
  550. package/node_modules/@openrig/daemon/dist/domain/transcript-store.d.ts.map +1 -1
  551. package/node_modules/@openrig/daemon/dist/domain/transcript-store.js +9 -2
  552. package/node_modules/@openrig/daemon/dist/domain/transcript-store.js.map +1 -1
  553. package/node_modules/@openrig/daemon/dist/domain/types.d.ts +39 -0
  554. package/node_modules/@openrig/daemon/dist/domain/types.d.ts.map +1 -1
  555. package/node_modules/@openrig/daemon/dist/domain/types.js.map +1 -1
  556. package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.d.ts +10 -1
  557. package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.d.ts.map +1 -1
  558. package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.js +39 -0
  559. package/node_modules/@openrig/daemon/dist/domain/user-settings/settings-store.js.map +1 -1
  560. package/node_modules/@openrig/daemon/dist/routes/context-packs.d.ts.map +1 -1
  561. package/node_modules/@openrig/daemon/dist/routes/context-packs.js +205 -0
  562. package/node_modules/@openrig/daemon/dist/routes/context-packs.js.map +1 -1
  563. package/node_modules/@openrig/daemon/dist/routes/queue.d.ts.map +1 -1
  564. package/node_modules/@openrig/daemon/dist/routes/queue.js +29 -24
  565. package/node_modules/@openrig/daemon/dist/routes/queue.js.map +1 -1
  566. package/node_modules/@openrig/daemon/dist/routes/rigspec.js +20 -6
  567. package/node_modules/@openrig/daemon/dist/routes/rigspec.js.map +1 -1
  568. package/node_modules/@openrig/daemon/dist/routes/seat.d.ts.map +1 -1
  569. package/node_modules/@openrig/daemon/dist/routes/seat.js +69 -0
  570. package/node_modules/@openrig/daemon/dist/routes/seat.js.map +1 -1
  571. package/node_modules/@openrig/daemon/dist/routes/sessions.js +55 -0
  572. package/node_modules/@openrig/daemon/dist/routes/sessions.js.map +1 -1
  573. package/node_modules/@openrig/daemon/dist/routes/transport.d.ts.map +1 -1
  574. package/node_modules/@openrig/daemon/dist/routes/transport.js +52 -39
  575. package/node_modules/@openrig/daemon/dist/routes/transport.js.map +1 -1
  576. package/node_modules/@openrig/daemon/dist/routes/up.js +21 -2
  577. package/node_modules/@openrig/daemon/dist/routes/up.js.map +1 -1
  578. package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.d.ts +2 -0
  579. package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.d.ts.map +1 -0
  580. package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.js +6 -0
  581. package/node_modules/@openrig/daemon/dist/seat-recap-store-surface.js.map +1 -0
  582. package/node_modules/@openrig/daemon/dist/startup.d.ts.map +1 -1
  583. package/node_modules/@openrig/daemon/dist/startup.js +37 -6
  584. package/node_modules/@openrig/daemon/dist/startup.js.map +1 -1
  585. package/node_modules/@openrig/daemon/package.json +6 -1
  586. package/package.json +1 -1
@@ -0,0 +1,106 @@
1
+ ---
2
+ name: oversight-team
3
+ description: Use when you are a seat on the oversight pod (a standing monitor-mode rig that keeps OTHER rigs healthy), configuring or running the drift detectors, or choosing whether to intervene vs escalate. Covers the pull-not-poll posture, the v0 detectors (premature-park, process-drift, off-task, token-burn), the intervention ladder (orchestrator-ping -> refocus -> human escalation), and the cheap+deep model economics. NOT for orchestrating your OWN rig (orchestration-team) and NOT the intervention primitive mechanics (watchdog).
4
+ metadata:
5
+ openrig:
6
+ stage: draft
7
+ sibling_skills:
8
+ - watchdog
9
+ - refocus
10
+ - orchestration-team
11
+ - human-in-the-loop
12
+ - messaging-the-human
13
+ - retiring-and-inheriting-a-seat
14
+ ---
15
+
16
+ # Oversight Team
17
+
18
+ You are on the **oversight pod** — a standing rig (agent-managed infrastructure, like the
19
+ skills-architect pattern: agents + scripts + an SOP owning a function full-time) whose job is
20
+ to keep **other** rigs healthy. You catch the unproductive patterns rigs drift into —
21
+ premature parking, process-drift, off-task wandering, token burn — early, and correct them
22
+ with the lightest touch that works. **Monitor mode: idle until a flag fires; never hyper-poll.**
23
+
24
+ ## Use this when
25
+
26
+ - You are a seat running in **monitor mode** on the oversight pod.
27
+ - Configuring or running the v0 drift detectors over the fleet.
28
+ - Deciding whether to **intervene** (orchestrator-ping / refocus) or **escalate** (human).
29
+
30
+ ## Don't use this when
31
+
32
+ - You are orchestrating your **own** rig — that's `orchestration-team`. Oversight watches
33
+ **across** rigs; it does not run them.
34
+ - You need the intervention **primitive mechanics** (the wake / refocus / alignment-checkpoint
35
+ stack, `rig watchdog` policies, message shape) — that's `watchdog`.
36
+ - A single stuck seat needs recovery — the owning orchestrator or `watchdog` handles that.
37
+
38
+ ## The posture — pull, never poll (load-bearing, and self-referential)
39
+
40
+ Monitor mode means **idle until a flag fires, then wake and check** — not continuous watching.
41
+ Continuous `rig capture` / vigilant-observation loops are the exact anti-pattern that has
42
+ burned entire model accounts: an over-observing watcher is expensive and produces nothing.
43
+ **The oversight seat must model the discipline it enforces** — the token-burn detector below
44
+ exists precisely because seats fell into vigilant loops, so a hyper-polling monitor would be
45
+ the failure it hunts. Cheap models read the large swaths; the expensive watcher acts on
46
+ **aggregated summaries**, never the raw firehose.
47
+
48
+ ## The v0 detectors (scripted + cheap-model-summarized)
49
+
50
+ Cheap, evidence-based checks — each confirms a pattern from durable evidence before anyone acts:
51
+
52
+ - **Premature park** — an in-progress qitem with an idle owner and no handoff. Pull the
53
+ transcript and confirm the turn actually ended *without* passing the ball (not merely quiet).
54
+ - **Process-drift** — the ship-nothing pattern: commits that produce no shipped change, heavy
55
+ test iteration, very large/verbose qitems, endless deliberation. Detectable from git history
56
+ + queue sizes. (This is process winning over product; correct it toward shipping.)
57
+ - **Off-task drift** — a cheap-model summary over a large activity swath (JSONL transcripts,
58
+ the stream, git log) answering one question: *"is this rig on task?"* If a pod drifts too
59
+ long, intervene.
60
+ - **Token burn / hypermonitoring** — a seat consuming unusually — top-N consumers → capture and
61
+ inspect for the vigilant-loop pattern. **Telemetry surface caveat:** the v0 detector uses
62
+ **point-in-time** consumption polling; **per-agent token telemetry OVER TIME** is a later
63
+ upgrade — do NOT assume it exists, and verify the available telemetry against your current
64
+ version before wiring a detector to it.
65
+
66
+ ## Interventions — least-disruptive first
67
+
68
+ 1. **Orchestrator-ping** — nudge the pod's own orchestrator to realign. They run their rig; you
69
+ prompt, you do not seize.
70
+ 2. **The refocus primitive** — `watchdog`'s **Refocus** level: a reactive north-star reminder
71
+ that fires only on **actual** drift, re-centers role / approved workstream / stop conditions,
72
+ and does NOT interrupt valid work or turn into a fresh approval gate. Use `watchdog` for the
73
+ message shape and the cadence discipline.
74
+ 3. **Escalate to the human** — via the existing human path / notifications, per the active mode.
75
+ Reserve for what an agent-level nudge cannot fix.
76
+
77
+ ## Do not (the discipline)
78
+
79
+ - **Don't hyper-poll / vigilant-loop** — you become the token burn you hunt.
80
+ - **Don't seize another rig's work** — ping its orchestrator; oversight corrects patterns, it
81
+ does not take over.
82
+ - **Don't fire refocus on an active, on-task owner** — that's bureaucracy theater (a `watchdog`
83
+ failure mode).
84
+ - **Don't intervene on a glance** — confirm the pattern from evidence (transcript / git / queue)
85
+ before acting. A false alarm costs the fleet trust and tokens.
86
+ - **Don't fire liveness / premature-park flags on a seat in an announced SWAP WINDOW.** A seat mid-handover
87
+ looks idle/parked to the detectors. The executing party pre-announces (seat + expected window) at swap
88
+ start — honor it as a **suppression window** until the handover receipt lands (receipts arrive only at
89
+ swap *end*, so waiting on the receipt alone still misfires on a long swap). See `retiring-and-inheriting-a-seat`.
90
+
91
+ ## Cheap + deep model economics
92
+
93
+ Cheap models do the routine reading (transcripts, logs, stream) and aggregate intelligent
94
+ summaries; an expensive watcher decides on those summaries. This is *why* per-agent model
95
+ assignment matters — you can run the reading far more often without blowing out accounts. Design
96
+ the pod so the deep model never touches the raw firehose.
97
+
98
+ ## See also
99
+
100
+ - `watchdog` — the intervention primitive (wake / refocus / alignment-checkpoint) this SOP
101
+ drives; refocus lives there.
102
+ - `refocus` — the drift doctrine `watchdog` operationalizes.
103
+ - `orchestration-team` — running your own rig (complementary; oversight watches across rigs).
104
+ - `human-in-the-loop` / `messaging-the-human` — the escalation path and how to address a human.
105
+ - `retiring-and-inheriting-a-seat` — a context-threshold detector can fire a planned seat
106
+ handover (sibling oversight signal).
@@ -0,0 +1,479 @@
1
+ ---
2
+ name: context-engineering
3
+ description: >-
4
+ Use when designing, reviewing, or debugging how an agent's context window gets filled, pruned,
5
+ or shared — choosing what loads at boot versus on demand, sizing an install or an always-loaded
6
+ file, fixing an agent that drifts, repeats itself, or forgets constraints mid-task, planning
7
+ compaction or summarization, deciding single-agent versus subagents, engineering handoffs
8
+ between agents, or picking a tool loadout. NOT for rewording a prompt's tone, choosing which
9
+ model to pin, or debugging business logic — those are adjacent moments this skill does not
10
+ serve. Historical 2024–2025 snapshot; not normative for present-day frontier models — see the
11
+ Status section.
12
+ metadata:
13
+ openrig:
14
+ stage: provisional
15
+ ---
16
+
17
+ # Traditional Context Engineering — 2024–2025 Snapshot
18
+
19
+ ## Status: provisional historical research snapshot
20
+
21
+ This skill is a provisional historical research snapshot of context-engineering practice as
22
+ published in 2024–2025. It is NOT normative. Do not apply it prescriptively to current frontier
23
+ models without re-verification. On any conflict, OpenRig current skills, explicit user rulings,
24
+ and directly measured OpenRig practice PREVAIL over this document. Treat these areas as
25
+ particularly suspect pending re-verification: compaction/summarization guidance, minimal-upfront
26
+ versus broad orientation, just-in-time lookup assumptions, fixed context ceilings, and
27
+ single-agent versus multi-agent advice.
28
+
29
+ Curated distillation of the best publicly available expertise on context engineering for coding
30
+ agents, drawn from primary sources at Anthropic, OpenAI, and leading practitioners (Manus,
31
+ Cognition, Chroma, LangChain, Drew Breunig, and others). Load on the moments the description
32
+ names; it is deliberately not part of any base walk.
33
+
34
+ ---
35
+
36
+ ## 1. The mental model: what context engineering is
37
+
38
+ **Definition.** Context engineering is "the set of strategies for curating and maintaining the
39
+ optimal set of tokens (information) during LLM inference" — everything that lands in the window:
40
+ system instructions, tool definitions, retrieved data, message history, and tool outputs, not
41
+ just the prompt text (Anthropic, *Effective context engineering for AI agents*). Andrej
42
+ Karpathy's framing, popularized via LangChain: "the delicate art and science of filling the
43
+ context window with just the right information for the next step" — the LLM is a CPU and the
44
+ context window is its RAM, and your job is deciding what gets loaded into RAM at each step
45
+ (LangChain, *Context Engineering for Agents*).
46
+
47
+ **Why it superseded prompt engineering.** A chatbot answers one question with whatever fits in
48
+ one turn. An agent runs in a loop, accumulating tool results, file contents, and history across
49
+ dozens or hundreds of steps. The improvements stop coming from rewording instructions and start
50
+ coming from *rewiring* — what the agent retrieves, in what order, and what gets evicted when the
51
+ window fills (Anthropic, ibid.). Philipp Schmid's formulation of the practical consequence:
52
+ "Agent failures aren't only model failures; they are context failures." Most of the time when a
53
+ capable model does something dumb, the context it was given made the dumb thing likely
54
+ (Schmid, *The New Skill in AI is Context Engineering*).
55
+
56
+ **The physical constraint: attention is a budget, not a bucket.** Three mechanisms make context
57
+ a scarce resource rather than free storage:
58
+
59
+ 1. **Quadratic attention.** In a transformer, every token attends to every other token — n²
60
+ pairwise relationships. Longer sequences stretch the model's ability to capture them, and
61
+ models are trained on distributions where short sequences dominate, so they have fewer
62
+ specialized parameters for context-wide dependencies. The result is "a performance gradient
63
+ rather than a hard cliff" (Anthropic, *Effective context engineering*).
64
+ 2. **Context rot.** Chroma's study of 18 frontier models showed reliability degrades as input
65
+ length grows *even on trivially simple tasks* like retrieval and text replication — and
66
+ degradation starts well before the window is full. What matters is not just length: distractor
67
+ presence, needle–question similarity, and haystack structure all change how fast performance
68
+ collapses (Chroma, *Context Rot*).
69
+ 3. **Position effects.** Models exhibit a U-shaped attention curve: information at the beginning
70
+ or end of a long context is used far better than information in the middle (Liu et al.,
71
+ *Lost in the Middle*).
72
+
73
+ **The one-sentence discipline.** From Anthropic: **"Find the smallest set of high-signal tokens
74
+ that maximize the likelihood of some desired outcome."** Everything else in this pack is a
75
+ technique in service of that sentence.
76
+
77
+ **The components you are engineering.** Schmid's inventory is a useful checklist of what
78
+ actually occupies the window: (1) system instructions, (2) the user's immediate request,
79
+ (3) state/history of the current session, (4) long-term memory, (5) retrieved external
80
+ information, (6) tool definitions, (7) output-format specifications (Schmid, ibid.). Each is a
81
+ separate dial. When an agent misbehaves, walk this list asking "which of these is missing,
82
+ stale, bloated, or contradictory?"
83
+
84
+ ---
85
+
86
+ ## 2. Core principles (and the why behind each)
87
+
88
+ **P1 — Minimal ≠ short; curate for signal density.** The goal is the smallest *sufficient* set
89
+ of tokens, not the shortest prompt. A system prompt should fully outline expected behavior; the
90
+ sin is low-signal filler, not length (Anthropic, *Effective context engineering*).
91
+
92
+ **P2 — Engineer for the next step, not the whole task.** Context is curated per inference step
93
+ (Karpathy via LangChain). The question is never "what might the agent ever need" but "what does
94
+ this step need to succeed." This is why loading everything upfront loses to just-in-time
95
+ retrieval on long tasks.
96
+
97
+ **P3 — Degradation precedes exhaustion.** Budget context well below the marketed window.
98
+ Chroma showed serious degradation mid-window; Breunig collects the operational evidence: a
99
+ Gemini agent's planning quality collapsed beyond ~100K tokens *[perishable snapshot, 2025–2026: model/vendor-specific — teach the mechanism, re-verify the number]* into repeating past actions, and
100
+ Databricks found correctness falling around 32K for Llama 3.1 405B (Breunig, *How Long Contexts
101
+ Fail*). *[perishable snapshot, 2025–2026: model/vendor-specific — teach the mechanism, re-verify the number]* These specific ceilings are model- and time-specific — the durable lesson is that every
102
+ model has one, and it is lower than the spec sheet.
103
+
104
+ **P4 — Stability is money and latency: design append-only.** Manus calls KV-cache hit rate "the
105
+ single most important metric for a production-stage AI agent": cached input tokens can cost 10x
106
+ less than uncached (their figure: $0.30 vs $3.00/MTok). *[perishable snapshot, 2025–2026: model/vendor-specific — teach the mechanism, re-verify the number]* One changed token invalidates the cache
107
+ for everything after it. Therefore: stable prompt prefixes (never embed a timestamp at the top),
108
+ append-only context (never rewrite history mid-session), deterministic serialization (Manus,
109
+ *Context Engineering for AI Agents*). Anthropic's caching docs confirm the mechanics: exact
110
+ prefix matching, cache reads at 0.1x base price, and a strict tools → system → messages
111
+ hierarchy where a change at any level invalidates everything below it (Anthropic, prompt
112
+ caching docs).
113
+
114
+ **P5 — Attention has a shape; place and refresh accordingly.** Because of the U-curve (Liu et
115
+ al.) and recency effects, put durable instructions at the start, and re-surface the *current
116
+ objective* near the end. Manus operationalizes this as **recitation**: the agent rewrites a
117
+ todo.md and appends it late in context on every step, "reciting its objectives into the end of
118
+ the context" to prevent goal drift across ~50-tool-call tasks (Manus, ibid.).
119
+
120
+ **P6 — Failures are context, not garbage.** Keep failed actions and stack traces in context;
121
+ the model updates its implicit beliefs and stops repeating the mistake (Manus, ibid.). The
122
+ 12-Factor Agents version: "Compact Errors into Context Window" — represent failures efficiently
123
+ so they inform the next step rather than either vanishing or flooding the window (HumanLayer,
124
+ *12-Factor Agents*, Factor 9).
125
+
126
+ **P7 — Share decisions, not just facts.** Cognition's two principles: "Share context, and share
127
+ full agent traces, not just individual messages" and "Actions carry implicit decisions, and
128
+ conflicting decisions carry bad results." Two workers given the same task summary but not each
129
+ other's traces will make incompatible implicit choices (their example: subagents building
130
+ visually clashing pieces of the same game) (Cognition, *Don't Build Multi-Agents*). Any handoff
131
+ or summary that transmits conclusions without the decisions behind them is lossy in the way that
132
+ breaks systems.
133
+
134
+ **P8 — Calibrate instruction altitude.** System prompts fail in two directions: hardcoded
135
+ brittle if-else logic (fragile, high-maintenance) and vague high-level guidance that "falsely
136
+ assumes shared context." Aim for "specific enough to guide behavior effectively, yet flexible
137
+ enough to provide strong heuristics." Start minimal with a capable model, then add instructions
138
+ driven by observed failure modes — not speculation (Anthropic, *Effective context engineering*).
139
+
140
+ **P9 — Own the window; treat the agent as a function of its context.** Deliberately control
141
+ what the model receives rather than accepting framework defaults ("Own your context window,"
142
+ Factor 3), and design the agent as "a stateless reducer" — output is a pure function of the
143
+ context you assembled, which makes context bugs reproducible and testable (HumanLayer,
144
+ *12-Factor Agents*, Factors 3 and 12).
145
+
146
+ ---
147
+
148
+ ## 3. The technique catalog
149
+
150
+ LangChain's taxonomy organizes nearly everything into four moves: **write** (persist outside the
151
+ window), **select** (pull the right things in), **compress** (shrink what's there), **isolate**
152
+ (split across contexts) (LangChain, *Context Engineering for Agents*). The named techniques:
153
+
154
+ ### 3.1 Progressive disclosure
155
+
156
+ **What:** Structure knowledge in layers so the agent loads only what the current task needs.
157
+ Anthropic's Agent Skills are the canonical design: Level 1 is name + description metadata
158
+ (always in the system prompt — just enough to know *when* the skill applies), Level 2 is the
159
+ SKILL.md body (loaded when relevant), Level 3+ is bundled files and scripts the agent navigates
160
+ "only as needed." Context becomes "effectively unbounded" because nothing loads until demanded
161
+ (Anthropic, *Equipping agents for the real world with Agent Skills*).
162
+
163
+ **Why it works:** It converts a token cost into a pointer cost. The analogy Anthropic uses is
164
+ "an onboarding guide for a new hire" — compartmentalized knowledge absorbed progressively.
165
+
166
+ **When:** Any recurring domain knowledge, workflow, or reference material. The rule of thumb
167
+ from Claude Code's docs: always-loaded files (CLAUDE.md) get only what applies broadly to every
168
+ session; anything situational belongs in an on-demand skill (Claude Code best practices).
169
+
170
+ ### 3.2 Just-in-time retrieval (vs. pre-computed context)
171
+
172
+ **What:** The agent maintains lightweight identifiers — file paths, queries, URLs — and loads
173
+ data at runtime with tools, instead of receiving everything up front. This mirrors human
174
+ cognition: we don't memorize corpora, we keep organization systems and retrieve on demand.
175
+ Metadata itself (folder hierarchies, naming conventions, timestamps) is signal (Anthropic,
176
+ *Effective context engineering*).
177
+
178
+ **Trade-off:** Runtime exploration is slower than pre-computed retrieval (embeddings/RAG). The
179
+ production answer is usually **hybrid**: some context up front for speed, plus tools for
180
+ autonomous exploration — Claude Code's CLAUDE.md-plus-grep pattern (Anthropic, ibid.). Classic
181
+ RAG — "selectively adding relevant information to help the LLM generate a better response" —
182
+ remains the right tool when the corpus is large and unindexed by structure (Breunig, *How to
183
+ Fix Your Context*).
184
+
185
+ **When:** Prefer just-in-time for coding agents in navigable environments (filesystems, git,
186
+ APIs); prefer indexed retrieval for large unstructured corpora; hybridize when latency matters.
187
+
188
+ ### 3.3 Compaction and summarization
189
+
190
+ **What:** When the window approaches its limit, summarize the trajectory, reinitialize with the
191
+ summary, and continue. Claude Code auto-compacts near the window limit (LangChain reports at
192
+ ~95%); the model distills decisions, code patterns, and open threads while discarding redundant
193
+ tool outputs (Anthropic, *Effective context engineering*; LangChain, ibid.).
194
+
195
+ **How to tune it:** "Start by maximizing recall to ensure your compaction prompt captures every
196
+ relevant piece of information from the trace, then iterate to improve precision by eliminating
197
+ superfluous content" (Anthropic, ibid.). Good summarization prompts enforce temporal ordering,
198
+ structured sections (environment, steps tried, current status), and explicit "UNVERIFIED"
199
+ marking on uncertain facts — because "if a bad fact enters the summary, it can poison future
200
+ behavior" (OpenAI Cookbook, *Session memory*).
201
+
202
+ **Trimming vs. summarizing** (OpenAI Cookbook, ibid.): keep-last-N-turns trimming is
203
+ deterministic, zero-latency, easy to reason about — but loses old constraints abruptly. LLM
204
+ summarization preserves long-range decisions compactly — but adds latency spikes, drift risk,
205
+ and observability burden. Trimming fits tool-heavy, independent tasks; summarization fits
206
+ long-horizon work where accumulated decisions matter.
207
+
208
+ **Cognition's caution:** a dedicated compressor model that distills "key details, events, and
209
+ decisions" is their recommended path for long tasks — and they note it "is hard to get right."
210
+ Getting it right means capturing decisions and their rationale, not just facts (Cognition,
211
+ ibid.).
212
+
213
+ ### 3.4 Context editing / tool-result clearing
214
+
215
+ **What:** The lightest-touch compaction: automatically drop stale tool calls and results deep in
216
+ history while preserving the conversational thread. Anthropic ships this as "context editing";
217
+ measured effects: context editing alone gave 29% improvement on internal agentic-search evals,
218
+ combined with the memory tool 39%; on a 100-turn web-search eval it let agents complete
219
+ workflows that would otherwise die of context exhaustion while cutting token consumption 84%
220
+ (Anthropic/Claude, *Context management*).
221
+
222
+ **Tension to know:** this conflicts with P4 (append-only for cache) and P6 (keep errors). The
223
+ reconciliation: clear *bulky, stale, already-acted-upon* tool outputs (a 30K-token file read
224
+ from 40 turns ago), keep *decisions and failures*. Manus's version keeps information
225
+ *restorable* — drop a webpage's content but keep its URL, drop a document's body but keep its
226
+ path (Manus, ibid.).
227
+
228
+ ### 3.5 Structured note-taking (agentic memory)
229
+
230
+ **What:** The agent writes notes to persistent storage outside the window — a NOTES.md, a
231
+ todo.md, a memory directory — and pulls them back when relevant. Persistent memory with minimal
232
+ context overhead. Anthropic's example: Claude playing Pokémon "maintains precise tallies across
233
+ thousands of game steps," builds maps, and remembers strategies across multi-hour sessions
234
+ (Anthropic, *Effective context engineering*). Anthropic's memory tool productizes this as
235
+ file-based CRUD in a client-side memory directory persisting across conversations
236
+ (Anthropic/Claude, *Context management*).
237
+
238
+ **The general form — filesystem as ultimate context:** Manus treats the filesystem as memory
239
+ that is "unlimited in size, persistent by nature, and directly operable by the agent itself"
240
+ (Manus, ibid.). Breunig's name for the family is **context offloading**; even a simple
241
+ scratchpad ("think" tool) produced up to 54% improvement on specialized-agent benchmarks
242
+ (Breunig, *How to Fix Your Context*).
243
+
244
+ **Memory layers in practice** (synthesis of LangChain + Anthropic + OpenAI): (1) in-context
245
+ working memory — the current window; (2) session-scoped scratchpads/todo files; (3) persistent
246
+ cross-session memory — files or stores, retrieved by relevance; (4) always-loaded curated core
247
+ (CLAUDE.md-class files), kept ruthlessly small. Information should flow *down* this stack as it
248
+ proves durable, and each layer buys persistence at the price of retrieval reliability.
249
+
250
+ ### 3.6 Sub-agents and context isolation
251
+
252
+ **What:** Breunig's "context quarantine": isolate work in dedicated threads, each with its own
253
+ window (Breunig, *How to Fix Your Context*). Anthropic's research system is the flagship: an
254
+ orchestrator spawns parallel subagents, each exploring one facet with a clean window, each
255
+ returning a *condensed* summary — typically 1,000–2,000 tokens — to the coordinator.
256
+ "Subagents facilitate compression by operating in parallel with their own context windows"
257
+ (Anthropic, *Multi-agent research system*). The multi-agent system beat single-agent Claude
258
+ Opus 4 by 90.2% on their internal research eval, at the price of ~15x the tokens of a chat
259
+ (Anthropic, ibid.).
260
+
261
+ **When it wins:** read-heavy, parallelizable, breadth-first work — research, codebase
262
+ investigation, review — where workers' outputs are *reports* that the orchestrator integrates.
263
+ Claude Code's guidance is exactly this: "use subagents to investigate" so exploration burns a
264
+ disposable context, not your main one; and use a fresh-context subagent for adversarial review,
265
+ because "a fresh context improves code review since Claude won't be biased toward code it just
266
+ wrote" (Claude Code best practices).
267
+
268
+ **When it loses:** write-heavy, coherence-critical work. Cognition's argument (P7): parallel
269
+ workers make conflicting implicit decisions and current models can't negotiate them away;
270
+ "running multiple agents in collaboration only results in fragile systems" for building
271
+ software. Their prescription is a single agent with full traces plus a compressor (Cognition,
272
+ ibid.). OpenAI's builder guidance points the same direction: maximize a single agent's
273
+ capability first and reach for multi-agent orchestration only when single-agent complexity
274
+ demonstrably fails (OpenAI, *A practical guide to building agents*). See §6 for the
275
+ reconciliation.
276
+
277
+ ### 3.7 Structured handoffs and delegation contracts
278
+
279
+ **What:** When context must cross an agent boundary, the transfer is an engineered artifact,
280
+ not a vibe. Anthropic's hard-won spec for what every delegated task must contain: **an
281
+ objective, an output format, guidance on tools and sources, and clear task boundaries.**
282
+ Without it, "agents duplicate work, leave gaps, or fail to find necessary information"
283
+ (Anthropic, *Multi-agent research system*).
284
+
285
+ **Effort scaling belongs in the contract:** encode explicit rules — "simple fact-finding
286
+ requires just 1 agent with 3–10 tool calls, direct comparisons might need 2–4 subagents with
287
+ 10–15 calls each" — or orchestrators over-provision wildly (early versions spawned 50 subagents
288
+ for simple queries) (Anthropic, ibid.).
289
+
290
+ **Returns are contracts too:** the worker's report back is a compression step (1–2K tokens,
291
+ per §3.6) and inherits every summarization risk in §3.3 — a handoff that reports conclusions
292
+ without decisions violates P7. The spec-then-fresh-session pattern is the single-player
293
+ version: interview, write a self-contained SPEC.md (files, interfaces, out-of-scope,
294
+ end-to-end verification step), then start a clean session to execute it (Claude Code best
295
+ practices).
296
+
297
+ ### 3.8 Tool loadout and tool design
298
+
299
+ **Selection:** "Every model performs worse when provided with more than one tool" is the
300
+ provocative headline from Berkeley's function-calling data; a quantized Llama 3.1 8B failed
301
+ with 46 tools and succeeded with 19 (Breunig, *How Long Contexts Fail*). Dynamic tool
302
+ selection — RAG over tool descriptions — improved Llama 3.1 8B performance 44% (Breunig, *How
303
+ to Fix Your Context*); LangChain cites ~3x tool-selection accuracy from the same family of
304
+ techniques (LangChain, ibid.). Anthropic's design rule: tools must have minimal overlap — "if a
305
+ human engineer can't definitively say which tool should be used in a given situation, an agent
306
+ can't be expected to do better" (Anthropic, *Effective context engineering*).
307
+
308
+ **Response design:** tool outputs are context injections; engineer them. Paginate, filter, and
309
+ truncate with sensible defaults (Claude Code caps tool responses at 25,000 tokens *[perishable snapshot, 2025–2026: model/vendor-specific — teach the mechanism, re-verify the number]*); prefer
310
+ semantically meaningful names over UUIDs; offer a `response_format: concise|detailed` knob;
311
+ consolidate chains of granular calls into one higher-level tool (`schedule_event`, not
312
+ `list_users` + `list_events` + `create_event`); use error messages to steer the agent toward
313
+ efficient strategies like "many small targeted searches" (Anthropic, *Writing effective tools
314
+ for agents*). CLI tools are often the most context-efficient integration surface of all
315
+ (Claude Code best practices).
316
+
317
+ **Masking over removal:** dynamically removing tools mid-session invalidates the KV cache and
318
+ confuses the model about past references; prefer masking token logits to constrain choice
319
+ while keeping definitions stable (Manus, ibid.).
320
+
321
+ ### 3.9 Context budgets and caching discipline
322
+
323
+ **What:** Treat the window as a budgeted resource with an explicit spending plan: how much for
324
+ system + tools, how much reserved for the task, at what fill level compaction triggers. Claude
325
+ Code's docs are blunt: "The context window is the most important resource to manage," and its
326
+ UX (a /context inspector, status-line usage tracking, /clear, targeted /compact) is budget
327
+ tooling (Claude Code best practices). Chroma's practical corollary: set working budgets far
328
+ below the advertised window for high-accuracy work (Chroma, ibid.).
329
+
330
+ **Caching discipline (the mechanics behind P4):** structure prompts static-first (tools →
331
+ system → messages); place cache breakpoints on the last *stable* block, never on content that
332
+ changes per request; verify with cache-read/cache-write token counts rather than assuming.
333
+ A timestamp above the fold means you pay cache-write prices on every request forever
334
+ (Anthropic, prompt caching docs; Manus, ibid.).
335
+
336
+ **Few-shot rut:** uniform repeated action-observation patterns in context cause the model to
337
+ mimic rhythm over substance — "drift, overgeneralization, or sometimes hallucination." Inject
338
+ structured variation in serialization and phrasing (Manus, ibid.).
339
+
340
+ ---
341
+
342
+ ## 4. Failure modes
343
+
344
+ Breunig's four-way taxonomy (*How Long Contexts Fail*) is the field's shared vocabulary; know
345
+ these by name:
346
+
347
+ 1. **Context poisoning** — "a hallucination or other error makes it into the context, where it
348
+ is repeatedly referenced." The Gemini-plays-Pokémon agent poisoned its own goals section and
349
+ pursued impossible objectives. Nastiest via summaries: one bad fact in a compaction poisons
350
+ every future turn (OpenAI Cookbook, ibid.). *Mitigations:* validate before persisting, mark
351
+ uncertain facts UNVERIFIED, keep summaries auditable, quarantine risky exploration in
352
+ subagents.
353
+ 2. **Context distraction** — the context grows so long "the model over-focuses on the context,
354
+ neglecting what it learned during training." Symptom: repeating past actions instead of
355
+ synthesizing new plans (Gemini beyond ~100K *[perishable snapshot, 2025–2026: model/vendor-specific — teach the mechanism, re-verify the number]*). *Mitigations:* budgets, compaction, recitation.
356
+ 3. **Context confusion** — "superfluous content in the context is used by the model to generate
357
+ a low-quality response." Prime driver: oversized tool loadouts. *Mitigations:* tool loadout
358
+ selection, pruning, progressive disclosure.
359
+ 4. **Context clash** — accumulated information and instructions that contradict each other.
360
+ Microsoft/Salesforce measured a 39% average drop when prompts were sharded across turns; o3
361
+ fell 98.1 → 64.1, because models "make assumptions in early turns... when LLMs take a wrong
362
+ turn in a conversation, they get lost and do not recover." *Mitigations:* consolidate
363
+ requirements before executing (spec first), clear-and-restart over correcting repeatedly.
364
+
365
+ Add the operational failures from production systems:
366
+
367
+ 5. **Context rot at scale** — silent degradation well before the window is full (Chroma).
368
+ 6. **Coordination failures** — duplicated work, gaps, 50 subagents on a trivial query,
369
+ conflicting implicit decisions between parallel workers (Anthropic, *Multi-agent*;
370
+ Cognition).
371
+ 7. **Kitchen-sink sessions and correction spirals** — Claude Code's docs name the human-loop
372
+ versions: unrelated tasks sharing one window; and repeated corrections polluting context
373
+ with failed approaches — "after two failed corrections, /clear and write a better initial
374
+ prompt incorporating what you learned." Also the over-specified always-loaded file:
375
+ "Bloated CLAUDE.md files cause Claude to ignore your actual instructions" — for each line
376
+ ask "Would removing this cause mistakes?"; if not, cut (Claude Code best practices).
377
+ 8. **Lost-in-the-middle placement bugs** — the critical constraint buried at token 60,000 of
378
+ 120,000 (Liu et al.).
379
+
380
+ ---
381
+
382
+ ## 5. How the best teams operate
383
+
384
+ **They measure token-shaped things.** Anthropic found token usage alone explains 80% of
385
+ performance variance in their research eval (Anthropic, *Multi-agent*); Manus optimizes
386
+ KV-cache hit rate as the top-line production metric (Manus). Elite teams instrument context —
387
+ fill levels, cache hits, tokens per task — before theorizing.
388
+
389
+ **They iterate from observed failures, with the model in the loop.** Anthropic's tool and skill
390
+ guidance is evaluation-first: build representative tasks, watch real transcripts, let the model
391
+ critique its own failures, refine, re-run against held-out sets (Anthropic, *Writing effective
392
+ tools*; *Agent Skills*). Prompts start minimal and grow only where failures demand (P8). And
393
+ automated evals aren't sufficient: human testers caught Anthropic's agents "consistently
394
+ choosing SEO-optimized content farms over authoritative sources" — a context-quality failure no
395
+ programmatic eval flagged (Anthropic, *Multi-agent*).
396
+
397
+ **They keep the always-loaded core tiny and push everything else behind disclosure.** Concise
398
+ checked-in CLAUDE.md-class files for what applies every session; skills for everything
399
+ situational; pruning as routine maintenance ("treat CLAUDE.md like code") (Claude Code best
400
+ practices).
401
+
402
+ **They design the write path around verification and fresh contexts.** Explore → plan →
403
+ implement → verify, with plan mode separating research from execution; a check the agent can
404
+ run (tests, build, screenshot diff) so the loop closes without a human; specs executed in fresh
405
+ sessions; adversarial review in a fresh subagent context (Claude Code best practices).
406
+
407
+ **They engineer for the cache and the filesystem.** Stable prefixes, append-only histories,
408
+ masked (not removed) tools, files as unlimited restorable memory, recitation for goal
409
+ stability, errors left visible (Manus). These are production-economics practices as much as
410
+ quality practices.
411
+
412
+ **They match architecture to task shape.** Anthropic's own selection heuristic: compaction for
413
+ long conversational flows; note-taking for iterative work with milestones (coding fits here);
414
+ multi-agent for parallel-explorable research (Anthropic, *Effective context engineering*).
415
+
416
+ ---
417
+
418
+ ## 6. Decision guide
419
+
420
+ | Situation | Reach for | Source |
421
+ |---|---|---|
422
+ | Recurring domain knowledge, sometimes needed | Skill w/ progressive disclosure | Anthropic Skills |
423
+ | Rules needed every session | Tiny curated always-loaded file; prune ruthlessly | Claude Code docs |
424
+ | Large explorable environment (repo, filesystem) | Just-in-time retrieval via tools; hybrid if latency-bound | Anthropic CE |
425
+ | Large unstructured corpus | Indexed retrieval (RAG) | Breunig |
426
+ | Long task nearing window limit | Compaction (recall-first, then precision); or clear stale tool results | Anthropic CE / context mgmt |
427
+ | Long task with milestones | Structured notes + todo recitation | Anthropic CE, Manus |
428
+ | Cross-session persistence | File-based memory outside the window | Anthropic context mgmt, Manus |
429
+ | Breadth-first research / investigation / review | Parallel subagents, condensed returns, explicit delegation contract + effort scaling | Anthropic multi-agent |
430
+ | Coherent build/edit on one artifact | Single agent, full traces, compressor for length — not parallel workers | Cognition |
431
+ | Many tools available | Loadout selection; consolidate; namespace; no overlap | Breunig, Anthropic tools |
432
+ | Cost/latency pressure | Stable prefix + append-only + cache breakpoints; mask don't remove | Manus, Anthropic caching |
433
+ | Agent repeating itself / drifting | Suspect distraction: check fill level, compact or clear, recite goals | Breunig, Manus |
434
+ | Agent confidently wrong about earlier "facts" | Suspect poisoning: audit summaries and notes, restart from clean spec | Breunig, OpenAI Cookbook |
435
+
436
+ ---
437
+
438
+ ## 7. Contested territory and thin spots (curator flags)
439
+
440
+ - **Multi-agent vs. single-agent is genuinely contested.** Anthropic's 90.2% win (read-heavy
441
+ research) and Cognition's "don't build multi-agents" (write-heavy engineering) are both
442
+ primary, both credible, and resolve on task shape: parallelize *reads*, serialize *writes*,
443
+ and make every boundary-crossing an engineered contract. Present both; don't flatten this
444
+ into one rule.
445
+ - **All numeric ceilings are perishable.** 32K/100K distraction ceilings, minimum-cacheable
446
+ token counts, the 10x cache price ratio, 25K tool-response caps — model- and vendor-specific
447
+ snapshots (2025–2026). Teach the mechanism, re-verify the numbers.
448
+ - **Second-hand figures.** The 44% tool-selection gain, 54% think-tool gain, 39% sharded-prompt
449
+ drop, and Berkeley tool numbers arrive via Breunig's synthesis of third-party papers —
450
+ directionally solid, not independently verified here.
451
+ - **OpenAI's public context-engineering corpus is thinner than Anthropic's.** Their best
452
+ material is SDK cookbooks (trimming vs. summarization is genuinely good) and the general
453
+ agents guide; most named-technique literature comes from Anthropic and practitioners.
454
+ - **Long-context vs. retrieval is unsettled.** Growing windows keep re-raising "just stuff it
455
+ all in"; context rot is the standing rebuttal, but the equilibrium moves with every model
456
+ generation.
457
+
458
+ ---
459
+
460
+ ## Sources
461
+
462
+ 1. Anthropic — Effective context engineering for AI agents — https://www.anthropic.com/engineering/effective-context-engineering-for-ai-agents
463
+ 2. Anthropic — How we built our multi-agent research system — https://www.anthropic.com/engineering/multi-agent-research-system
464
+ 3. Anthropic — Equipping agents for the real world with Agent Skills — https://www.anthropic.com/engineering/equipping-agents-for-the-real-world-with-agent-skills
465
+ 4. Anthropic — Writing effective tools for agents — https://www.anthropic.com/engineering/writing-tools-for-agents
466
+ 5. Anthropic/Claude — Managing context on the Claude Developer Platform (context editing, memory tool) — https://claude.com/blog/context-management
467
+ 6. Anthropic — Claude Code best practices — https://code.claude.com/docs/en/best-practices
468
+ 7. Anthropic — Prompt caching documentation — https://platform.claude.com/docs/en/build-with-claude/prompt-caching
469
+ 8. Chroma — Context Rot: How Increasing Input Tokens Impacts LLM Performance — https://www.trychroma.com/research/context-rot
470
+ 9. Drew Breunig — How Long Contexts Fail — https://www.dbreunig.com/2025/06/22/how-contexts-fail-and-how-to-fix-them.html
471
+ 10. Drew Breunig — How to Fix Your Context — https://www.dbreunig.com/2025/06/26/how-to-fix-your-context.html
472
+ 11. Cognition — Don't Build Multi-Agents — https://cognition.com/blog/dont-build-multi-agents
473
+ 12. Manus (Yichao "Peak" Ji) — Context Engineering for AI Agents: Lessons from Building Manus — https://manus.im/blog/Context-Engineering-for-AI-Agents-Lessons-from-Building-Manus
474
+ 13. LangChain — Context Engineering for Agents — https://www.langchain.com/blog/context-engineering-for-agents
475
+ 14. Philipp Schmid — The New Skill in AI is Context Engineering — https://www.philschmid.de/context-engineering
476
+ 15. HumanLayer (Dex Horthy) — 12-Factor Agents — https://github.com/humanlayer/12-factor-agents
477
+ 16. Liu et al. — Lost in the Middle: How Language Models Use Long Contexts — https://arxiv.org/abs/2307.03172
478
+ 17. OpenAI — A practical guide to building agents — https://openai.com/business/guides-and-resources/a-practical-guide-to-building-ai-agents/
479
+ 18. OpenAI Cookbook — Context engineering: short-term memory management with Sessions — https://developers.openai.com/cookbook/examples/agents_sdk/session_memory
@@ -33,6 +33,15 @@ Write the test first. Watch it fail. Write minimal code to pass.
33
33
 
34
34
  Thinking "skip TDD just this once"? Stop. That's rationalization.
35
35
 
36
+ **Chunk size is a dial, and it points up (2026-08) — this is NOT "skip TDD".** *How much* you build per
37
+ red-green cycle is configurable, and with frontier agents handling hour-plus goal-oriented work it is
38
+ **much larger than the classic tiny ping-pong**, and rising. Keep everything below — the Iron Law, red
39
+ before green, two sets of eyes, the guard structure — **fully intact**; only the *cadence / granularity*
40
+ loosens. You still write the failing test(s) first for the chunk; the chunk is simply bigger. Tiny
41
+ back-and-forth is overhead, not virtue, once the SDLC's gates (QA, review, guards) bound a larger chunk's
42
+ risk. Match the chunk to the task; treat it as a configured lever — never as license to write code before
43
+ its test (that's the rationalization this skill exists to stop).
44
+
36
45
  ## The Iron Law
37
46
 
38
47
  ```
@@ -0,0 +1,25 @@
1
+ # Worked project-tree example (demo)
2
+
3
+ This folder is a WORKED EXAMPLE of the project tree's chain files — the other
4
+ tree from the topology defaults this rig also ships. Copy the shapes, not the
5
+ content.
6
+
7
+ **Why project context cannot ship as a default, plainly:** it describes what
8
+ *you* are building. A mission's intent, a slice's specification, a proof
9
+ contract — no vendor can author those in advance, and installing someone
10
+ else's would put a stranger's project in your agents' heads. That is why the
11
+ topology tree ships curated defaults (how a team runs well is largely
12
+ general) while the project tree ships only this example (what you build is
13
+ yours alone). See `docs/reference/chain-file-convention.md`.
14
+
15
+ The shape, one chain name per altitude:
16
+
17
+ ```
18
+ missions/<mission>/SPEC.md intent in frontmatter; context slices need
19
+ missions/<mission>/slices/<slice>/SPEC.md the ONLY altitude that specifies
20
+ .../PROGRESS.md derived progress rail
21
+ .../PROOF.md retained evidence: did it actually work
22
+ ```
23
+
24
+ `rig scope mission create` / `rig scope slice create` scaffold these for real
25
+ projects — prefer the tooling to hand-copying this folder.
@@ -0,0 +1,19 @@
1
+ ---
2
+ id: demo.improve-onboarding
3
+ intent: >-
4
+ EXAMPLE — New users reach a working first rig in under ten minutes without
5
+ reading reference docs. (A mission states an OUTCOME; it specifies nothing —
6
+ specification is a leaf property, down in the slices.)
7
+ status: example
8
+ created: 2026-08-23
9
+ ---
10
+
11
+ # Mission: improve-onboarding (worked example)
12
+
13
+ A mission is a folder of slices plus the context those slices need. Its
14
+ `intent:` frontmatter composes UP the chain — an agent walking leaf-to-root
15
+ reads the slice's intent, then this one, and knows why the leaf exists.
16
+
17
+ Keep the body short: links to the evidence that motivated the mission, the
18
+ constraint that bounds it, the person who owns the outcome. Everything
19
+ buildable belongs in a slice.