create-egregore 0.20.2 → 0.21.0-runtime-mvp.2

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 (706) hide show
  1. package/assets/egregore-launcher.js +1013 -16
  2. package/bin/cli.js +11 -0
  3. package/lib/claude-runtime.js +192 -0
  4. package/lib/local.js +38 -31
  5. package/lib/pi-runtime.js +1 -0
  6. package/lib/prime-runtime.js +1 -0
  7. package/lib/runtime-identity.js +146 -0
  8. package/lib/setup.js +116 -17
  9. package/package.json +10 -6
  10. package/runtime/claude/.claude/context/commit-format.md +110 -0
  11. package/runtime/claude/.claude/context/git-language.md +46 -0
  12. package/runtime/claude/.claude/context/notification-consent.md +66 -0
  13. package/runtime/claude/.claude/context/pr-format.md +67 -0
  14. package/runtime/claude/.claude/context/telemetry.md +133 -0
  15. package/runtime/claude/.claude/hooks/boundary-check.sh +333 -0
  16. package/runtime/claude/.claude/hooks/branch-guard.sh +231 -0
  17. package/runtime/claude/.claude/hooks/card-context.sh +38 -0
  18. package/runtime/claude/.claude/hooks/emissary-detect.sh +53 -0
  19. package/runtime/claude/.claude/hooks/memory-refresh.sh +67 -0
  20. package/runtime/claude/.claude/hooks/onboarding-guard.sh +86 -0
  21. package/runtime/claude/.claude/hooks/retrieval-context.sh +43 -0
  22. package/runtime/claude/.claude/rules/voice-bedrock.md +73 -0
  23. package/runtime/claude/.claude/settings.json +131 -0
  24. package/runtime/claude/.claude/skills/activity/SKILL.md +68 -0
  25. package/runtime/claude/.claude/skills/announce/SKILL.md +54 -0
  26. package/runtime/claude/.claude/skills/archive/SKILL.md +71 -0
  27. package/runtime/claude/.claude/skills/branch/SKILL.md +147 -0
  28. package/runtime/claude/.claude/skills/checkup/SKILL.md +159 -0
  29. package/runtime/claude/.claude/skills/commit/SKILL.md +103 -0
  30. package/runtime/claude/.claude/skills/contribute/SKILL.md +343 -0
  31. package/runtime/claude/.claude/skills/create-skill/SKILL.md +135 -0
  32. package/runtime/claude/.claude/skills/dark-mode/SKILL.md +410 -0
  33. package/runtime/claude/.claude/skills/dashboard/SKILL.md +43 -0
  34. package/runtime/claude/.claude/skills/deep-reflect/REPORT.md +140 -0
  35. package/runtime/claude/.claude/skills/deep-reflect/RESEARCH.md +132 -0
  36. package/runtime/claude/.claude/skills/deep-reflect/ROLES.md +104 -0
  37. package/runtime/claude/.claude/skills/deep-reflect/SKILL.md +170 -0
  38. package/runtime/claude/.claude/skills/delete-user/SKILL.md +150 -0
  39. package/runtime/claude/.claude/skills/emissary/SKILL.md +220 -0
  40. package/runtime/claude/.claude/skills/handoff/SKILL.md +124 -0
  41. package/runtime/claude/.claude/skills/harvest/AUDIT.md +546 -0
  42. package/runtime/claude/.claude/skills/harvest/FORMAT.md +436 -0
  43. package/runtime/claude/.claude/skills/harvest/PROCESS.md +395 -0
  44. package/runtime/claude/.claude/skills/harvest/QUESTION_PALETTE.md +76 -0
  45. package/runtime/claude/.claude/skills/harvest/SKILL.md +100 -0
  46. package/runtime/claude/.claude/skills/ingest/SKILL.md +112 -0
  47. package/runtime/claude/.claude/skills/ingest-corpus/SKILL.md +187 -0
  48. package/runtime/claude/.claude/skills/ingest-notion/SKILL.md +214 -0
  49. package/runtime/claude/.claude/skills/ingest-user-interview/SKILL.md +65 -0
  50. package/runtime/claude/.claude/skills/ingest-user-interview/references/analysis-contract.md +125 -0
  51. package/runtime/claude/.claude/skills/invite/SKILL.md +111 -0
  52. package/runtime/claude/.claude/skills/issue/SKILL.md +104 -0
  53. package/runtime/claude/.claude/skills/me/SKILL.md +81 -0
  54. package/runtime/claude/.claude/skills/meeting/SKILL.md +76 -0
  55. package/runtime/claude/.claude/skills/meeting/references/analysis-contract.md +102 -0
  56. package/runtime/claude/.claude/skills/note/SKILL.md +71 -0
  57. package/runtime/claude/.claude/skills/notion-connect/SKILL.md +124 -0
  58. package/runtime/claude/.claude/skills/onboarding/SKILL.md +159 -0
  59. package/runtime/claude/.claude/skills/pr/SKILL.md +85 -0
  60. package/runtime/claude/.claude/skills/pull/SKILL.md +79 -0
  61. package/runtime/claude/.claude/skills/push/SKILL.md +47 -0
  62. package/runtime/claude/.claude/skills/quest/SKILL.md +121 -0
  63. package/runtime/claude/.claude/skills/reflect/SKILL.md +69 -0
  64. package/runtime/claude/.claude/skills/review-pr/SKILL.md +276 -0
  65. package/runtime/claude/.claude/skills/save/SKILL.md +92 -0
  66. package/runtime/claude/.claude/skills/slack-connect/SKILL.md +148 -0
  67. package/runtime/claude/.claude/skills/summon/SKILL.md +240 -0
  68. package/runtime/claude/.claude/skills/sync-repos/SKILL.md +82 -0
  69. package/runtime/claude/.claude/skills/teams-connect/SKILL.md +216 -0
  70. package/runtime/claude/.claude/skills/telegram-connect/SKILL.md +110 -0
  71. package/runtime/claude/.claude/skills/telemetry/SKILL.md +117 -0
  72. package/runtime/claude/.claude/skills/test/SKILL.md +87 -0
  73. package/runtime/claude/.claude/skills/the-spiral/SKILL.md +492 -0
  74. package/runtime/claude/.claude/skills/tui-design/SKILL.md +188 -0
  75. package/runtime/claude/.claude/skills/tutorial/SKILL.md +100 -0
  76. package/runtime/claude/.claude/skills/update/SKILL.md +265 -0
  77. package/runtime/claude/.claude/skills/view/SKILL.md +393 -0
  78. package/runtime/claude/.claude/skills/view/compose-scaffold.html +221 -0
  79. package/runtime/claude/.claude/skills/visual-explain/SKILL.md +132 -0
  80. package/runtime/claude/.claude/skills/wrap/SKILL.md +98 -0
  81. package/runtime/claude/CLAUDE.md +447 -0
  82. package/runtime/claude/bin/activity-action.sh +92 -0
  83. package/runtime/claude/bin/activity-data.sh +17 -0
  84. package/runtime/claude/bin/agent.sh +783 -0
  85. package/runtime/claude/bin/artifact-register.sh +164 -0
  86. package/runtime/claude/bin/artifact-writeback.sh +53 -0
  87. package/runtime/claude/bin/artifacts.sh +288 -0
  88. package/runtime/claude/bin/attendant.sh +707 -0
  89. package/runtime/claude/bin/autosave.sh +112 -0
  90. package/runtime/claude/bin/boundary.sh +253 -0
  91. package/runtime/claude/bin/build-sealed-dataroom.mjs +722 -0
  92. package/runtime/claude/bin/capture-reconcile.sh +69 -0
  93. package/runtime/claude/bin/capture-run.sh +357 -0
  94. package/runtime/claude/bin/codex-install-skills.sh +78 -0
  95. package/runtime/claude/bin/codex-render-spec.mjs +462 -0
  96. package/runtime/claude/bin/codex-session-start.sh +275 -0
  97. package/runtime/claude/bin/codex-skill-render.mjs +349 -0
  98. package/runtime/claude/bin/codex-sync-skills.sh +237 -0
  99. package/runtime/claude/bin/connect-refresh.sh +33 -0
  100. package/runtime/claude/bin/contribute-guard.sh +79 -0
  101. package/runtime/claude/bin/corpus_map.py +806 -0
  102. package/runtime/claude/bin/corpus_survey.py +304 -0
  103. package/runtime/claude/bin/dashboard-data.sh +18 -0
  104. package/runtime/claude/bin/github-auth.sh +121 -0
  105. package/runtime/claude/bin/graph-batch.sh +86 -0
  106. package/runtime/claude/bin/graph-op.sh +1106 -0
  107. package/runtime/claude/bin/graph-projection.sh +54 -0
  108. package/runtime/claude/bin/graph-wal.sh +242 -0
  109. package/runtime/claude/bin/graph.sh +267 -0
  110. package/runtime/claude/bin/handoff-lifecycle-job.sh +146 -0
  111. package/runtime/claude/bin/handoff-lifecycle.sh +280 -0
  112. package/runtime/claude/bin/handoff-pr-backfill.sh +86 -0
  113. package/runtime/claude/bin/handoff-preview.sh +169 -0
  114. package/runtime/claude/bin/handoff-run.sh +692 -0
  115. package/runtime/claude/bin/handoff-save-egregore.sh +224 -0
  116. package/runtime/claude/bin/index-handoff.sh +322 -0
  117. package/runtime/claude/bin/ingest-graph.sh +86 -0
  118. package/runtime/claude/bin/ingest-item.sh +10 -0
  119. package/runtime/claude/bin/ingest-surface.html +495 -0
  120. package/runtime/claude/bin/ingest.py +1011 -0
  121. package/runtime/claude/bin/ingest.sh +308 -0
  122. package/runtime/claude/bin/ingest_graph.py +856 -0
  123. package/runtime/claude/bin/ingest_surface.py +544 -0
  124. package/runtime/claude/bin/invite.sh +6 -0
  125. package/runtime/claude/bin/issue.sh +10 -0
  126. package/runtime/claude/bin/knowledge.sh +10 -0
  127. package/runtime/claude/bin/lib/artifact-id.sh +46 -0
  128. package/runtime/claude/bin/lib/config.sh +136 -0
  129. package/runtime/claude/bin/lib/context.sh +642 -0
  130. package/runtime/claude/bin/lib/dashboard-artifact.sh +242 -0
  131. package/runtime/claude/bin/lib/ensure-develop.sh +183 -0
  132. package/runtime/claude/bin/lib/git-message.sh +37 -0
  133. package/runtime/claude/bin/lib/git-sync.sh +494 -0
  134. package/runtime/claude/bin/lib/greeting.sh +548 -0
  135. package/runtime/claude/bin/lib/handoff-meta.sh +97 -0
  136. package/runtime/claude/bin/lib/hash.sh +13 -0
  137. package/runtime/claude/bin/lib/identity.sh +213 -0
  138. package/runtime/claude/bin/lib/metrics.sh +374 -0
  139. package/runtime/claude/bin/lib/noncode.sh +31 -0
  140. package/runtime/claude/bin/lib/permissions.sh +106 -0
  141. package/runtime/claude/bin/lib/time.sh +56 -0
  142. package/runtime/claude/bin/lib/worktree-links.sh +85 -0
  143. package/runtime/claude/bin/node-run.sh +42 -0
  144. package/runtime/claude/bin/notification.sh +6 -0
  145. package/runtime/claude/bin/notify.sh +636 -0
  146. package/runtime/claude/bin/observe-context.sh +14 -0
  147. package/runtime/claude/bin/onboarding.sh +6 -0
  148. package/runtime/claude/bin/person.py +634 -0
  149. package/runtime/claude/bin/person.sh +481 -0
  150. package/runtime/claude/bin/pi-render-spec.mjs +140 -0
  151. package/runtime/claude/bin/post-update.sh +37 -0
  152. package/runtime/claude/bin/prime-render-spec.mjs +147 -0
  153. package/runtime/claude/bin/publish-artifact.sh +324 -0
  154. package/runtime/claude/bin/publish-references.sh +144 -0
  155. package/runtime/claude/bin/quest.sh +9 -0
  156. package/runtime/claude/bin/question.sh +8 -0
  157. package/runtime/claude/bin/repo-state.sh +96 -0
  158. package/runtime/claude/bin/research-ingest.sh +7 -0
  159. package/runtime/claude/bin/restore-owned-skills.sh +67 -0
  160. package/runtime/claude/bin/retrieval_eval.py +385 -0
  161. package/runtime/claude/bin/runtime-identity.sh +70 -0
  162. package/runtime/claude/bin/runtime-upgrade.sh +43 -0
  163. package/runtime/claude/bin/scroll.sh +9 -0
  164. package/runtime/claude/bin/search.sh +318 -0
  165. package/runtime/claude/bin/session-autosave.sh +220 -0
  166. package/runtime/claude/bin/session-log.sh +199 -0
  167. package/runtime/claude/bin/session-start.sh +696 -0
  168. package/runtime/claude/bin/settings.sh +532 -0
  169. package/runtime/claude/bin/startup-check.sh +136 -0
  170. package/runtime/claude/bin/statusline.sh +41 -0
  171. package/runtime/claude/bin/telemetry.sh +666 -0
  172. package/runtime/claude/bin/test-changes.sh +344 -0
  173. package/runtime/claude/bin/thread.sh +9 -0
  174. package/runtime/claude/bin/todo.sh +9 -0
  175. package/runtime/claude/bin/view-render.sh +126 -0
  176. package/runtime/claude/bin/worktree-create.sh +145 -0
  177. package/runtime/claude/bin/worktree-remove.sh +50 -0
  178. package/runtime/claude/bin/worktree.sh +198 -0
  179. package/runtime/claude/egregore_runtime/__init__.py +228 -0
  180. package/runtime/claude/egregore_runtime/adapters/__init__.py +5 -0
  181. package/runtime/claude/egregore_runtime/adapters/invitation.py +237 -0
  182. package/runtime/claude/egregore_runtime/adapters/notification.py +59 -0
  183. package/runtime/claude/egregore_runtime/adapters/qmd.py +1701 -0
  184. package/runtime/claude/egregore_runtime/adapters/qmd_cli.py +210 -0
  185. package/runtime/claude/egregore_runtime/adapters/qmd_embed_worker.py +59 -0
  186. package/runtime/claude/egregore_runtime/admin_gate.py +102 -0
  187. package/runtime/claude/egregore_runtime/artifacts.py +523 -0
  188. package/runtime/claude/egregore_runtime/contracts.py +499 -0
  189. package/runtime/claude/egregore_runtime/entitlements.py +85 -0
  190. package/runtime/claude/egregore_runtime/errors.py +10 -0
  191. package/runtime/claude/egregore_runtime/graph.py +356 -0
  192. package/runtime/claude/egregore_runtime/handoff_lookup.py +196 -0
  193. package/runtime/claude/egregore_runtime/harness_cli.py +1221 -0
  194. package/runtime/claude/egregore_runtime/identity.py +734 -0
  195. package/runtime/claude/egregore_runtime/identity_cli.py +91 -0
  196. package/runtime/claude/egregore_runtime/ingest.py +575 -0
  197. package/runtime/claude/egregore_runtime/ingest_cli.py +254 -0
  198. package/runtime/claude/egregore_runtime/ingest_index_cli.py +147 -0
  199. package/runtime/claude/egregore_runtime/invitation_cli.py +51 -0
  200. package/runtime/claude/egregore_runtime/invitations.py +116 -0
  201. package/runtime/claude/egregore_runtime/issue_cli.py +305 -0
  202. package/runtime/claude/egregore_runtime/issues.py +359 -0
  203. package/runtime/claude/egregore_runtime/knowledge.py +376 -0
  204. package/runtime/claude/egregore_runtime/knowledge_cli.py +173 -0
  205. package/runtime/claude/egregore_runtime/lifecycle.py +888 -0
  206. package/runtime/claude/egregore_runtime/lifecycle_cli.py +269 -0
  207. package/runtime/claude/egregore_runtime/notification_cli.py +125 -0
  208. package/runtime/claude/egregore_runtime/notifications.py +230 -0
  209. package/runtime/claude/egregore_runtime/observe.py +342 -0
  210. package/runtime/claude/egregore_runtime/onboarding.py +290 -0
  211. package/runtime/claude/egregore_runtime/onboarding_cli.py +110 -0
  212. package/runtime/claude/egregore_runtime/policy.py +144 -0
  213. package/runtime/claude/egregore_runtime/profile.py +193 -0
  214. package/runtime/claude/egregore_runtime/quest_cli.py +216 -0
  215. package/runtime/claude/egregore_runtime/question_cli.py +180 -0
  216. package/runtime/claude/egregore_runtime/questions.py +304 -0
  217. package/runtime/claude/egregore_runtime/quests.py +419 -0
  218. package/runtime/claude/egregore_runtime/readiness.py +379 -0
  219. package/runtime/claude/egregore_runtime/research_ingest.py +256 -0
  220. package/runtime/claude/egregore_runtime/research_ingest_cli.py +44 -0
  221. package/runtime/claude/egregore_runtime/runtime.py +464 -0
  222. package/runtime/claude/egregore_runtime/scroll_cli.py +185 -0
  223. package/runtime/claude/egregore_runtime/scrolls.py +726 -0
  224. package/runtime/claude/egregore_runtime/status.py +412 -0
  225. package/runtime/claude/egregore_runtime/status_cli.py +174 -0
  226. package/runtime/claude/egregore_runtime/sync.py +218 -0
  227. package/runtime/claude/egregore_runtime/teamsync.py +139 -0
  228. package/runtime/claude/egregore_runtime/telemetry.py +640 -0
  229. package/runtime/claude/egregore_runtime/thread_cli.py +173 -0
  230. package/runtime/claude/egregore_runtime/threads.py +517 -0
  231. package/runtime/claude/egregore_runtime/todo_cli.py +142 -0
  232. package/runtime/claude/egregore_runtime/todos.py +244 -0
  233. package/runtime/claude/egregore_runtime/upgrade.py +770 -0
  234. package/runtime/claude/egregore_runtime/upgrade_worker.py +53 -0
  235. package/runtime/claude/egregore_runtime/writeback.py +391 -0
  236. package/runtime/claude/egregore_runtime/writeback_cli.py +114 -0
  237. package/runtime/claude/manifest.json +284 -0
  238. package/runtime/codex/.codex/hooks/search-hint.js +21 -52
  239. package/runtime/codex/.codex/hooks.json +3 -3
  240. package/runtime/codex/.codex/skills/activity/SKILL.md +23 -66
  241. package/runtime/codex/.codex/skills/announce/SKILL.md +27 -50
  242. package/runtime/codex/.codex/skills/archive/SKILL.md +21 -36
  243. package/runtime/codex/.codex/skills/checkup/SKILL.md +77 -36
  244. package/runtime/codex/.codex/skills/dark-mode/SKILL.md +1 -1
  245. package/runtime/codex/.codex/skills/dashboard/SKILL.md +17 -47
  246. package/runtime/codex/.codex/skills/handoff/SKILL.md +84 -133
  247. package/runtime/codex/.codex/skills/harvest/SKILL.md +32 -117
  248. package/runtime/codex/.codex/skills/ingest/SKILL.md +47 -25
  249. package/runtime/codex/.codex/skills/ingest-user-interview/SKILL.md +18 -36
  250. package/runtime/codex/.codex/skills/ingest-user-interview/references/analysis-contract.md +42 -0
  251. package/runtime/codex/.codex/skills/invite/SKILL.md +21 -35
  252. package/runtime/codex/.codex/skills/issue/SKILL.md +60 -41
  253. package/runtime/codex/.codex/skills/me/SKILL.md +1 -1
  254. package/runtime/codex/.codex/skills/meeting/SKILL.md +16 -36
  255. package/runtime/codex/.codex/skills/meeting/references/analysis-contract.md +48 -0
  256. package/runtime/codex/.codex/skills/note/SKILL.md +30 -25
  257. package/runtime/codex/.codex/skills/onboarding/SKILL.md +36 -41
  258. package/runtime/codex/.codex/skills/pull/SKILL.md +1 -1
  259. package/runtime/codex/.codex/skills/quest/SKILL.md +27 -66
  260. package/runtime/codex/.codex/skills/reflect/SKILL.md +22 -36
  261. package/runtime/codex/.codex/skills/save/SKILL.md +2 -2
  262. package/runtime/codex/.codex/skills/telemetry/SKILL.md +1 -1
  263. package/runtime/codex/.codex/skills/test/SKILL.md +1 -1
  264. package/runtime/codex/.codex/skills/tutorial/SKILL.md +40 -41
  265. package/runtime/codex/.codex/skills/view/SKILL.md +115 -111
  266. package/runtime/codex/.codex/skills/wrap/SKILL.md +45 -41
  267. package/runtime/codex/.codex/spec-manifest.json +9 -9
  268. package/runtime/codex/AGENTS.md +62 -58
  269. package/runtime/codex/bin/activity-action.sh +92 -0
  270. package/runtime/codex/bin/activity-data.sh +12 -233
  271. package/runtime/codex/bin/agent.sh +84 -100
  272. package/runtime/codex/bin/artifact-register.sh +164 -0
  273. package/runtime/codex/bin/artifact-writeback.sh +53 -0
  274. package/runtime/codex/bin/artifacts.sh +288 -0
  275. package/runtime/codex/bin/build-sealed-dataroom.mjs +722 -0
  276. package/runtime/codex/bin/capture-run.sh +18 -2
  277. package/runtime/codex/bin/codex-render-spec.mjs +41 -16
  278. package/runtime/codex/bin/codex-session-start.sh +14 -4
  279. package/runtime/codex/bin/codex-skill-render.mjs +9 -7
  280. package/runtime/codex/bin/corpus_map.py +806 -0
  281. package/runtime/codex/bin/corpus_survey.py +304 -0
  282. package/runtime/codex/bin/dashboard-data.sh +11 -171
  283. package/runtime/codex/bin/github-auth.sh +121 -0
  284. package/runtime/codex/bin/graph-batch.sh +7 -0
  285. package/runtime/codex/bin/graph-op.sh +4 -0
  286. package/runtime/codex/bin/graph-projection.sh +54 -0
  287. package/runtime/codex/bin/graph-wal.sh +13 -0
  288. package/runtime/codex/bin/graph.sh +44 -0
  289. package/runtime/codex/bin/handoff-lifecycle-job.sh +146 -0
  290. package/runtime/codex/bin/handoff-lifecycle.sh +280 -0
  291. package/runtime/codex/bin/handoff-preview.sh +169 -0
  292. package/runtime/codex/bin/handoff-run.sh +42 -26
  293. package/runtime/codex/bin/ingest-graph.sh +6 -0
  294. package/runtime/codex/bin/ingest-item.sh +10 -0
  295. package/runtime/codex/bin/ingest.sh +59 -30
  296. package/runtime/codex/bin/invite.sh +6 -0
  297. package/runtime/codex/bin/issue.sh +10 -0
  298. package/runtime/codex/bin/knowledge.sh +10 -0
  299. package/runtime/codex/bin/lib/config.sh +20 -0
  300. package/runtime/codex/bin/lib/context.sh +46 -25
  301. package/runtime/codex/bin/lib/git-sync.sh +70 -6
  302. package/runtime/codex/bin/lib/greeting.sh +34 -5
  303. package/runtime/codex/bin/lib/handoff-meta.sh +97 -0
  304. package/runtime/codex/bin/lib/worktree-links.sh +6 -0
  305. package/runtime/codex/bin/node-run.sh +42 -0
  306. package/runtime/codex/bin/notification.sh +6 -0
  307. package/runtime/codex/bin/observe-context.sh +14 -0
  308. package/runtime/codex/bin/onboarding.sh +6 -0
  309. package/runtime/codex/bin/person.py +4 -0
  310. package/runtime/codex/bin/person.sh +43 -10
  311. package/runtime/codex/bin/pi-render-spec.mjs +140 -0
  312. package/runtime/codex/bin/post-update.sh +37 -0
  313. package/runtime/codex/bin/prime-render-spec.mjs +147 -0
  314. package/runtime/codex/bin/publish-artifact.sh +55 -2
  315. package/runtime/codex/bin/quest.sh +9 -0
  316. package/runtime/codex/bin/question.sh +8 -0
  317. package/runtime/codex/bin/research-ingest.sh +7 -0
  318. package/runtime/codex/bin/restore-owned-skills.sh +67 -0
  319. package/runtime/codex/bin/retrieval_eval.py +385 -0
  320. package/runtime/codex/bin/runtime-identity.sh +70 -0
  321. package/runtime/codex/bin/runtime-upgrade.sh +43 -0
  322. package/runtime/codex/bin/scroll.sh +9 -0
  323. package/runtime/codex/bin/search.sh +231 -195
  324. package/runtime/codex/bin/settings.sh +174 -5
  325. package/runtime/codex/bin/startup-check.sh +136 -0
  326. package/runtime/codex/bin/telemetry.sh +522 -247
  327. package/runtime/codex/bin/test-changes.sh +344 -0
  328. package/runtime/codex/bin/thread.sh +9 -0
  329. package/runtime/codex/bin/todo.sh +9 -0
  330. package/runtime/codex/bin/view-render.sh +126 -0
  331. package/runtime/codex/bin/worktree-create.sh +19 -5
  332. package/runtime/codex/egregore_runtime/__init__.py +228 -0
  333. package/runtime/codex/egregore_runtime/adapters/__init__.py +5 -0
  334. package/runtime/codex/egregore_runtime/adapters/invitation.py +237 -0
  335. package/runtime/codex/egregore_runtime/adapters/notification.py +59 -0
  336. package/runtime/codex/egregore_runtime/adapters/qmd.py +1701 -0
  337. package/runtime/codex/egregore_runtime/adapters/qmd_cli.py +210 -0
  338. package/runtime/codex/egregore_runtime/adapters/qmd_embed_worker.py +59 -0
  339. package/runtime/codex/egregore_runtime/admin_gate.py +102 -0
  340. package/runtime/codex/egregore_runtime/artifacts.py +523 -0
  341. package/runtime/codex/egregore_runtime/contracts.py +499 -0
  342. package/runtime/codex/egregore_runtime/entitlements.py +85 -0
  343. package/runtime/codex/egregore_runtime/errors.py +10 -0
  344. package/runtime/codex/egregore_runtime/graph.py +356 -0
  345. package/runtime/codex/egregore_runtime/handoff_lookup.py +196 -0
  346. package/runtime/codex/egregore_runtime/harness_cli.py +1221 -0
  347. package/runtime/codex/egregore_runtime/identity.py +734 -0
  348. package/runtime/codex/egregore_runtime/identity_cli.py +91 -0
  349. package/runtime/codex/egregore_runtime/ingest.py +575 -0
  350. package/runtime/codex/egregore_runtime/ingest_cli.py +254 -0
  351. package/runtime/codex/egregore_runtime/ingest_index_cli.py +147 -0
  352. package/runtime/codex/egregore_runtime/invitation_cli.py +51 -0
  353. package/runtime/codex/egregore_runtime/invitations.py +116 -0
  354. package/runtime/codex/egregore_runtime/issue_cli.py +305 -0
  355. package/runtime/codex/egregore_runtime/issues.py +359 -0
  356. package/runtime/codex/egregore_runtime/knowledge.py +376 -0
  357. package/runtime/codex/egregore_runtime/knowledge_cli.py +173 -0
  358. package/runtime/codex/egregore_runtime/lifecycle.py +888 -0
  359. package/runtime/codex/egregore_runtime/lifecycle_cli.py +269 -0
  360. package/runtime/codex/egregore_runtime/notification_cli.py +125 -0
  361. package/runtime/codex/egregore_runtime/notifications.py +230 -0
  362. package/runtime/codex/egregore_runtime/observe.py +342 -0
  363. package/runtime/codex/egregore_runtime/onboarding.py +290 -0
  364. package/runtime/codex/egregore_runtime/onboarding_cli.py +110 -0
  365. package/runtime/codex/egregore_runtime/policy.py +144 -0
  366. package/runtime/codex/egregore_runtime/profile.py +193 -0
  367. package/runtime/codex/egregore_runtime/quest_cli.py +216 -0
  368. package/runtime/codex/egregore_runtime/question_cli.py +180 -0
  369. package/runtime/codex/egregore_runtime/questions.py +304 -0
  370. package/runtime/codex/egregore_runtime/quests.py +419 -0
  371. package/runtime/codex/egregore_runtime/readiness.py +379 -0
  372. package/runtime/codex/egregore_runtime/research_ingest.py +256 -0
  373. package/runtime/codex/egregore_runtime/research_ingest_cli.py +44 -0
  374. package/runtime/codex/egregore_runtime/runtime.py +464 -0
  375. package/runtime/codex/egregore_runtime/scroll_cli.py +185 -0
  376. package/runtime/codex/egregore_runtime/scrolls.py +726 -0
  377. package/runtime/codex/egregore_runtime/status.py +412 -0
  378. package/runtime/codex/egregore_runtime/status_cli.py +174 -0
  379. package/runtime/codex/egregore_runtime/sync.py +218 -0
  380. package/runtime/codex/egregore_runtime/teamsync.py +139 -0
  381. package/runtime/codex/egregore_runtime/telemetry.py +640 -0
  382. package/runtime/codex/egregore_runtime/thread_cli.py +173 -0
  383. package/runtime/codex/egregore_runtime/threads.py +517 -0
  384. package/runtime/codex/egregore_runtime/todo_cli.py +142 -0
  385. package/runtime/codex/egregore_runtime/todos.py +244 -0
  386. package/runtime/codex/egregore_runtime/upgrade.py +770 -0
  387. package/runtime/codex/egregore_runtime/upgrade_worker.py +53 -0
  388. package/runtime/codex/egregore_runtime/writeback.py +391 -0
  389. package/runtime/codex/egregore_runtime/writeback_cli.py +114 -0
  390. package/runtime/codex/manifest.json +98 -1
  391. package/runtime/pi/.codex/hooks/search-hint.js +21 -52
  392. package/runtime/pi/.codex/hooks.json +3 -3
  393. package/runtime/pi/.codex/skills/activity/SKILL.md +23 -66
  394. package/runtime/pi/.codex/skills/announce/SKILL.md +27 -50
  395. package/runtime/pi/.codex/skills/archive/SKILL.md +21 -36
  396. package/runtime/pi/.codex/skills/checkup/SKILL.md +77 -36
  397. package/runtime/pi/.codex/skills/dark-mode/SKILL.md +1 -1
  398. package/runtime/pi/.codex/skills/dashboard/SKILL.md +17 -47
  399. package/runtime/pi/.codex/skills/handoff/SKILL.md +84 -133
  400. package/runtime/pi/.codex/skills/harvest/SKILL.md +32 -117
  401. package/runtime/pi/.codex/skills/ingest/SKILL.md +47 -25
  402. package/runtime/pi/.codex/skills/ingest-user-interview/SKILL.md +18 -36
  403. package/runtime/pi/.codex/skills/ingest-user-interview/references/analysis-contract.md +42 -0
  404. package/runtime/pi/.codex/skills/invite/SKILL.md +21 -35
  405. package/runtime/pi/.codex/skills/issue/SKILL.md +60 -41
  406. package/runtime/pi/.codex/skills/me/SKILL.md +1 -1
  407. package/runtime/pi/.codex/skills/meeting/SKILL.md +16 -36
  408. package/runtime/pi/.codex/skills/meeting/references/analysis-contract.md +48 -0
  409. package/runtime/pi/.codex/skills/note/SKILL.md +30 -25
  410. package/runtime/pi/.codex/skills/onboarding/SKILL.md +36 -41
  411. package/runtime/pi/.codex/skills/pull/SKILL.md +1 -1
  412. package/runtime/pi/.codex/skills/quest/SKILL.md +27 -66
  413. package/runtime/pi/.codex/skills/reflect/SKILL.md +22 -36
  414. package/runtime/pi/.codex/skills/save/SKILL.md +2 -2
  415. package/runtime/pi/.codex/skills/telemetry/SKILL.md +1 -1
  416. package/runtime/pi/.codex/skills/test/SKILL.md +1 -1
  417. package/runtime/pi/.codex/skills/tutorial/SKILL.md +40 -41
  418. package/runtime/pi/.codex/skills/view/SKILL.md +115 -111
  419. package/runtime/pi/.codex/skills/wrap/SKILL.md +45 -41
  420. package/runtime/pi/.codex/spec-manifest.json +9 -9
  421. package/runtime/pi/.pi/APPEND_SYSTEM.md +57 -48
  422. package/runtime/pi/.pi/extensions/egregore.ts +7 -0
  423. package/runtime/pi/.pi/spec-manifest.json +2 -2
  424. package/runtime/pi/AGENTS.md +62 -58
  425. package/runtime/pi/bin/activity-action.sh +92 -0
  426. package/runtime/pi/bin/activity-data.sh +12 -233
  427. package/runtime/pi/bin/agent.sh +84 -100
  428. package/runtime/pi/bin/artifact-register.sh +164 -0
  429. package/runtime/pi/bin/artifact-writeback.sh +53 -0
  430. package/runtime/pi/bin/artifacts.sh +288 -0
  431. package/runtime/pi/bin/build-sealed-dataroom.mjs +722 -0
  432. package/runtime/pi/bin/capture-run.sh +18 -2
  433. package/runtime/pi/bin/codex-render-spec.mjs +41 -16
  434. package/runtime/pi/bin/codex-session-start.sh +14 -4
  435. package/runtime/pi/bin/codex-skill-render.mjs +9 -7
  436. package/runtime/pi/bin/corpus_map.py +806 -0
  437. package/runtime/pi/bin/corpus_survey.py +304 -0
  438. package/runtime/pi/bin/dashboard-data.sh +11 -171
  439. package/runtime/pi/bin/github-auth.sh +121 -0
  440. package/runtime/pi/bin/graph-batch.sh +7 -0
  441. package/runtime/pi/bin/graph-op.sh +4 -0
  442. package/runtime/pi/bin/graph-projection.sh +54 -0
  443. package/runtime/pi/bin/graph-wal.sh +13 -0
  444. package/runtime/pi/bin/graph.sh +44 -0
  445. package/runtime/pi/bin/handoff-lifecycle-job.sh +146 -0
  446. package/runtime/pi/bin/handoff-lifecycle.sh +280 -0
  447. package/runtime/pi/bin/handoff-preview.sh +169 -0
  448. package/runtime/pi/bin/handoff-run.sh +42 -26
  449. package/runtime/pi/bin/ingest-graph.sh +6 -0
  450. package/runtime/pi/bin/ingest-item.sh +10 -0
  451. package/runtime/pi/bin/ingest.sh +59 -30
  452. package/runtime/pi/bin/invite.sh +6 -0
  453. package/runtime/pi/bin/issue.sh +10 -0
  454. package/runtime/pi/bin/knowledge.sh +10 -0
  455. package/runtime/pi/bin/lib/config.sh +20 -0
  456. package/runtime/pi/bin/lib/context.sh +46 -25
  457. package/runtime/pi/bin/lib/git-sync.sh +70 -6
  458. package/runtime/pi/bin/lib/greeting.sh +34 -5
  459. package/runtime/pi/bin/lib/handoff-meta.sh +97 -0
  460. package/runtime/pi/bin/lib/worktree-links.sh +6 -0
  461. package/runtime/pi/bin/node-run.sh +42 -0
  462. package/runtime/pi/bin/notification.sh +6 -0
  463. package/runtime/pi/bin/observe-context.sh +14 -0
  464. package/runtime/pi/bin/onboarding.sh +6 -0
  465. package/runtime/pi/bin/person.py +4 -0
  466. package/runtime/pi/bin/person.sh +43 -10
  467. package/runtime/pi/bin/pi-observe-context.mjs +93 -0
  468. package/runtime/pi/bin/pi-product-workflows.mjs +1 -1
  469. package/runtime/pi/bin/pi-render-spec.mjs +1 -1
  470. package/runtime/pi/bin/post-update.sh +37 -0
  471. package/runtime/pi/bin/prime-render-spec.mjs +147 -0
  472. package/runtime/pi/bin/publish-artifact.sh +55 -2
  473. package/runtime/pi/bin/quest.sh +9 -0
  474. package/runtime/pi/bin/question.sh +8 -0
  475. package/runtime/pi/bin/research-ingest.sh +7 -0
  476. package/runtime/pi/bin/restore-owned-skills.sh +67 -0
  477. package/runtime/pi/bin/retrieval_eval.py +385 -0
  478. package/runtime/pi/bin/runtime-identity.sh +70 -0
  479. package/runtime/pi/bin/runtime-upgrade.sh +43 -0
  480. package/runtime/pi/bin/scroll.sh +9 -0
  481. package/runtime/pi/bin/search.sh +231 -195
  482. package/runtime/pi/bin/settings.sh +174 -5
  483. package/runtime/pi/bin/startup-check.sh +136 -0
  484. package/runtime/pi/bin/telemetry.sh +522 -247
  485. package/runtime/pi/bin/test-changes.sh +344 -0
  486. package/runtime/pi/bin/thread.sh +9 -0
  487. package/runtime/pi/bin/todo.sh +9 -0
  488. package/runtime/pi/bin/view-render.sh +126 -0
  489. package/runtime/pi/bin/worktree-create.sh +19 -5
  490. package/runtime/pi/egregore_runtime/__init__.py +228 -0
  491. package/runtime/pi/egregore_runtime/adapters/__init__.py +5 -0
  492. package/runtime/pi/egregore_runtime/adapters/invitation.py +237 -0
  493. package/runtime/pi/egregore_runtime/adapters/notification.py +59 -0
  494. package/runtime/pi/egregore_runtime/adapters/qmd.py +1701 -0
  495. package/runtime/pi/egregore_runtime/adapters/qmd_cli.py +210 -0
  496. package/runtime/pi/egregore_runtime/adapters/qmd_embed_worker.py +59 -0
  497. package/runtime/pi/egregore_runtime/admin_gate.py +102 -0
  498. package/runtime/pi/egregore_runtime/artifacts.py +523 -0
  499. package/runtime/pi/egregore_runtime/contracts.py +499 -0
  500. package/runtime/pi/egregore_runtime/entitlements.py +85 -0
  501. package/runtime/pi/egregore_runtime/errors.py +10 -0
  502. package/runtime/pi/egregore_runtime/graph.py +356 -0
  503. package/runtime/pi/egregore_runtime/handoff_lookup.py +196 -0
  504. package/runtime/pi/egregore_runtime/harness_cli.py +1221 -0
  505. package/runtime/pi/egregore_runtime/identity.py +734 -0
  506. package/runtime/pi/egregore_runtime/identity_cli.py +91 -0
  507. package/runtime/pi/egregore_runtime/ingest.py +575 -0
  508. package/runtime/pi/egregore_runtime/ingest_cli.py +254 -0
  509. package/runtime/pi/egregore_runtime/ingest_index_cli.py +147 -0
  510. package/runtime/pi/egregore_runtime/invitation_cli.py +51 -0
  511. package/runtime/pi/egregore_runtime/invitations.py +116 -0
  512. package/runtime/pi/egregore_runtime/issue_cli.py +305 -0
  513. package/runtime/pi/egregore_runtime/issues.py +359 -0
  514. package/runtime/pi/egregore_runtime/knowledge.py +376 -0
  515. package/runtime/pi/egregore_runtime/knowledge_cli.py +173 -0
  516. package/runtime/pi/egregore_runtime/lifecycle.py +888 -0
  517. package/runtime/pi/egregore_runtime/lifecycle_cli.py +269 -0
  518. package/runtime/pi/egregore_runtime/notification_cli.py +125 -0
  519. package/runtime/pi/egregore_runtime/notifications.py +230 -0
  520. package/runtime/pi/egregore_runtime/observe.py +342 -0
  521. package/runtime/pi/egregore_runtime/onboarding.py +290 -0
  522. package/runtime/pi/egregore_runtime/onboarding_cli.py +110 -0
  523. package/runtime/pi/egregore_runtime/policy.py +144 -0
  524. package/runtime/pi/egregore_runtime/profile.py +193 -0
  525. package/runtime/pi/egregore_runtime/quest_cli.py +216 -0
  526. package/runtime/pi/egregore_runtime/question_cli.py +180 -0
  527. package/runtime/pi/egregore_runtime/questions.py +304 -0
  528. package/runtime/pi/egregore_runtime/quests.py +419 -0
  529. package/runtime/pi/egregore_runtime/readiness.py +379 -0
  530. package/runtime/pi/egregore_runtime/research_ingest.py +256 -0
  531. package/runtime/pi/egregore_runtime/research_ingest_cli.py +44 -0
  532. package/runtime/pi/egregore_runtime/runtime.py +464 -0
  533. package/runtime/pi/egregore_runtime/scroll_cli.py +185 -0
  534. package/runtime/pi/egregore_runtime/scrolls.py +726 -0
  535. package/runtime/pi/egregore_runtime/status.py +412 -0
  536. package/runtime/pi/egregore_runtime/status_cli.py +174 -0
  537. package/runtime/pi/egregore_runtime/sync.py +218 -0
  538. package/runtime/pi/egregore_runtime/teamsync.py +139 -0
  539. package/runtime/pi/egregore_runtime/telemetry.py +640 -0
  540. package/runtime/pi/egregore_runtime/thread_cli.py +173 -0
  541. package/runtime/pi/egregore_runtime/threads.py +517 -0
  542. package/runtime/pi/egregore_runtime/todo_cli.py +142 -0
  543. package/runtime/pi/egregore_runtime/todos.py +244 -0
  544. package/runtime/pi/egregore_runtime/upgrade.py +770 -0
  545. package/runtime/pi/egregore_runtime/upgrade_worker.py +53 -0
  546. package/runtime/pi/egregore_runtime/writeback.py +391 -0
  547. package/runtime/pi/egregore_runtime/writeback_cli.py +114 -0
  548. package/runtime/pi/manifest.json +98 -1
  549. package/runtime/prime/.codex/hooks/search-hint.js +21 -52
  550. package/runtime/prime/.codex/hooks.json +3 -3
  551. package/runtime/prime/.codex/skills/activity/SKILL.md +23 -66
  552. package/runtime/prime/.codex/skills/announce/SKILL.md +27 -50
  553. package/runtime/prime/.codex/skills/archive/SKILL.md +21 -36
  554. package/runtime/prime/.codex/skills/checkup/SKILL.md +77 -36
  555. package/runtime/prime/.codex/skills/dark-mode/SKILL.md +1 -1
  556. package/runtime/prime/.codex/skills/dashboard/SKILL.md +17 -47
  557. package/runtime/prime/.codex/skills/handoff/SKILL.md +84 -133
  558. package/runtime/prime/.codex/skills/harvest/SKILL.md +32 -117
  559. package/runtime/prime/.codex/skills/ingest/SKILL.md +47 -25
  560. package/runtime/prime/.codex/skills/ingest-user-interview/SKILL.md +18 -36
  561. package/runtime/prime/.codex/skills/ingest-user-interview/references/analysis-contract.md +42 -0
  562. package/runtime/prime/.codex/skills/invite/SKILL.md +21 -35
  563. package/runtime/prime/.codex/skills/issue/SKILL.md +60 -41
  564. package/runtime/prime/.codex/skills/me/SKILL.md +1 -1
  565. package/runtime/prime/.codex/skills/meeting/SKILL.md +16 -36
  566. package/runtime/prime/.codex/skills/meeting/references/analysis-contract.md +48 -0
  567. package/runtime/prime/.codex/skills/note/SKILL.md +30 -25
  568. package/runtime/prime/.codex/skills/onboarding/SKILL.md +36 -41
  569. package/runtime/prime/.codex/skills/pull/SKILL.md +1 -1
  570. package/runtime/prime/.codex/skills/quest/SKILL.md +27 -66
  571. package/runtime/prime/.codex/skills/reflect/SKILL.md +22 -36
  572. package/runtime/prime/.codex/skills/save/SKILL.md +2 -2
  573. package/runtime/prime/.codex/skills/telemetry/SKILL.md +1 -1
  574. package/runtime/prime/.codex/skills/test/SKILL.md +1 -1
  575. package/runtime/prime/.codex/skills/tutorial/SKILL.md +40 -41
  576. package/runtime/prime/.codex/skills/view/SKILL.md +115 -111
  577. package/runtime/prime/.codex/skills/wrap/SKILL.md +45 -41
  578. package/runtime/prime/.codex/spec-manifest.json +9 -9
  579. package/runtime/prime/.prime/agent/APPEND_SYSTEM.md +57 -48
  580. package/runtime/prime/.prime/agent/extensions/egregore.ts +7 -0
  581. package/runtime/prime/.prime/agent/spec-manifest.json +2 -2
  582. package/runtime/prime/AGENTS.md +62 -58
  583. package/runtime/prime/bin/activity-action.sh +92 -0
  584. package/runtime/prime/bin/activity-data.sh +12 -233
  585. package/runtime/prime/bin/agent.sh +84 -100
  586. package/runtime/prime/bin/artifact-register.sh +164 -0
  587. package/runtime/prime/bin/artifact-writeback.sh +53 -0
  588. package/runtime/prime/bin/artifacts.sh +288 -0
  589. package/runtime/prime/bin/build-sealed-dataroom.mjs +722 -0
  590. package/runtime/prime/bin/capture-run.sh +18 -2
  591. package/runtime/prime/bin/codex-render-spec.mjs +41 -16
  592. package/runtime/prime/bin/codex-session-start.sh +14 -4
  593. package/runtime/prime/bin/codex-skill-render.mjs +9 -7
  594. package/runtime/prime/bin/corpus_map.py +806 -0
  595. package/runtime/prime/bin/corpus_survey.py +304 -0
  596. package/runtime/prime/bin/dashboard-data.sh +11 -171
  597. package/runtime/prime/bin/github-auth.sh +121 -0
  598. package/runtime/prime/bin/graph-batch.sh +7 -0
  599. package/runtime/prime/bin/graph-op.sh +4 -0
  600. package/runtime/prime/bin/graph-projection.sh +54 -0
  601. package/runtime/prime/bin/graph-wal.sh +13 -0
  602. package/runtime/prime/bin/graph.sh +44 -0
  603. package/runtime/prime/bin/handoff-lifecycle-job.sh +146 -0
  604. package/runtime/prime/bin/handoff-lifecycle.sh +280 -0
  605. package/runtime/prime/bin/handoff-preview.sh +169 -0
  606. package/runtime/prime/bin/handoff-run.sh +42 -26
  607. package/runtime/prime/bin/ingest-graph.sh +6 -0
  608. package/runtime/prime/bin/ingest-item.sh +10 -0
  609. package/runtime/prime/bin/ingest.sh +59 -30
  610. package/runtime/prime/bin/invite.sh +6 -0
  611. package/runtime/prime/bin/issue.sh +10 -0
  612. package/runtime/prime/bin/knowledge.sh +10 -0
  613. package/runtime/prime/bin/lib/config.sh +20 -0
  614. package/runtime/prime/bin/lib/context.sh +46 -25
  615. package/runtime/prime/bin/lib/git-sync.sh +70 -6
  616. package/runtime/prime/bin/lib/greeting.sh +34 -5
  617. package/runtime/prime/bin/lib/handoff-meta.sh +97 -0
  618. package/runtime/prime/bin/lib/worktree-links.sh +6 -0
  619. package/runtime/prime/bin/node-run.sh +42 -0
  620. package/runtime/prime/bin/notification.sh +6 -0
  621. package/runtime/prime/bin/observe-context.sh +14 -0
  622. package/runtime/prime/bin/onboarding.sh +6 -0
  623. package/runtime/prime/bin/person.py +4 -0
  624. package/runtime/prime/bin/person.sh +43 -10
  625. package/runtime/prime/bin/pi-observe-context.mjs +93 -0
  626. package/runtime/prime/bin/pi-product-workflows.mjs +1 -1
  627. package/runtime/prime/bin/pi-render-spec.mjs +140 -0
  628. package/runtime/prime/bin/post-update.sh +37 -0
  629. package/runtime/prime/bin/prime-render-spec.mjs +1 -1
  630. package/runtime/prime/bin/publish-artifact.sh +55 -2
  631. package/runtime/prime/bin/quest.sh +9 -0
  632. package/runtime/prime/bin/question.sh +8 -0
  633. package/runtime/prime/bin/research-ingest.sh +7 -0
  634. package/runtime/prime/bin/restore-owned-skills.sh +67 -0
  635. package/runtime/prime/bin/retrieval_eval.py +385 -0
  636. package/runtime/prime/bin/runtime-identity.sh +70 -0
  637. package/runtime/prime/bin/runtime-upgrade.sh +43 -0
  638. package/runtime/prime/bin/scroll.sh +9 -0
  639. package/runtime/prime/bin/search.sh +231 -195
  640. package/runtime/prime/bin/settings.sh +174 -5
  641. package/runtime/prime/bin/startup-check.sh +136 -0
  642. package/runtime/prime/bin/telemetry.sh +522 -247
  643. package/runtime/prime/bin/test-changes.sh +344 -0
  644. package/runtime/prime/bin/thread.sh +9 -0
  645. package/runtime/prime/bin/todo.sh +9 -0
  646. package/runtime/prime/bin/view-render.sh +126 -0
  647. package/runtime/prime/bin/worktree-create.sh +19 -5
  648. package/runtime/prime/egregore_runtime/__init__.py +228 -0
  649. package/runtime/prime/egregore_runtime/adapters/__init__.py +5 -0
  650. package/runtime/prime/egregore_runtime/adapters/invitation.py +237 -0
  651. package/runtime/prime/egregore_runtime/adapters/notification.py +59 -0
  652. package/runtime/prime/egregore_runtime/adapters/qmd.py +1701 -0
  653. package/runtime/prime/egregore_runtime/adapters/qmd_cli.py +210 -0
  654. package/runtime/prime/egregore_runtime/adapters/qmd_embed_worker.py +59 -0
  655. package/runtime/prime/egregore_runtime/admin_gate.py +102 -0
  656. package/runtime/prime/egregore_runtime/artifacts.py +523 -0
  657. package/runtime/prime/egregore_runtime/contracts.py +499 -0
  658. package/runtime/prime/egregore_runtime/entitlements.py +85 -0
  659. package/runtime/prime/egregore_runtime/errors.py +10 -0
  660. package/runtime/prime/egregore_runtime/graph.py +356 -0
  661. package/runtime/prime/egregore_runtime/handoff_lookup.py +196 -0
  662. package/runtime/prime/egregore_runtime/harness_cli.py +1221 -0
  663. package/runtime/prime/egregore_runtime/identity.py +734 -0
  664. package/runtime/prime/egregore_runtime/identity_cli.py +91 -0
  665. package/runtime/prime/egregore_runtime/ingest.py +575 -0
  666. package/runtime/prime/egregore_runtime/ingest_cli.py +254 -0
  667. package/runtime/prime/egregore_runtime/ingest_index_cli.py +147 -0
  668. package/runtime/prime/egregore_runtime/invitation_cli.py +51 -0
  669. package/runtime/prime/egregore_runtime/invitations.py +116 -0
  670. package/runtime/prime/egregore_runtime/issue_cli.py +305 -0
  671. package/runtime/prime/egregore_runtime/issues.py +359 -0
  672. package/runtime/prime/egregore_runtime/knowledge.py +376 -0
  673. package/runtime/prime/egregore_runtime/knowledge_cli.py +173 -0
  674. package/runtime/prime/egregore_runtime/lifecycle.py +888 -0
  675. package/runtime/prime/egregore_runtime/lifecycle_cli.py +269 -0
  676. package/runtime/prime/egregore_runtime/notification_cli.py +125 -0
  677. package/runtime/prime/egregore_runtime/notifications.py +230 -0
  678. package/runtime/prime/egregore_runtime/observe.py +342 -0
  679. package/runtime/prime/egregore_runtime/onboarding.py +290 -0
  680. package/runtime/prime/egregore_runtime/onboarding_cli.py +110 -0
  681. package/runtime/prime/egregore_runtime/policy.py +144 -0
  682. package/runtime/prime/egregore_runtime/profile.py +193 -0
  683. package/runtime/prime/egregore_runtime/quest_cli.py +216 -0
  684. package/runtime/prime/egregore_runtime/question_cli.py +180 -0
  685. package/runtime/prime/egregore_runtime/questions.py +304 -0
  686. package/runtime/prime/egregore_runtime/quests.py +419 -0
  687. package/runtime/prime/egregore_runtime/readiness.py +379 -0
  688. package/runtime/prime/egregore_runtime/research_ingest.py +256 -0
  689. package/runtime/prime/egregore_runtime/research_ingest_cli.py +44 -0
  690. package/runtime/prime/egregore_runtime/runtime.py +464 -0
  691. package/runtime/prime/egregore_runtime/scroll_cli.py +185 -0
  692. package/runtime/prime/egregore_runtime/scrolls.py +726 -0
  693. package/runtime/prime/egregore_runtime/status.py +412 -0
  694. package/runtime/prime/egregore_runtime/status_cli.py +174 -0
  695. package/runtime/prime/egregore_runtime/sync.py +218 -0
  696. package/runtime/prime/egregore_runtime/teamsync.py +139 -0
  697. package/runtime/prime/egregore_runtime/telemetry.py +640 -0
  698. package/runtime/prime/egregore_runtime/thread_cli.py +173 -0
  699. package/runtime/prime/egregore_runtime/threads.py +517 -0
  700. package/runtime/prime/egregore_runtime/todo_cli.py +142 -0
  701. package/runtime/prime/egregore_runtime/todos.py +244 -0
  702. package/runtime/prime/egregore_runtime/upgrade.py +770 -0
  703. package/runtime/prime/egregore_runtime/upgrade_worker.py +53 -0
  704. package/runtime/prime/egregore_runtime/writeback.py +391 -0
  705. package/runtime/prime/egregore_runtime/writeback_cli.py +114 -0
  706. package/runtime/prime/manifest.json +98 -1
@@ -0,0 +1,546 @@
1
+ # Harvest — Audit & Rebuild Spec
2
+
3
+ > Harvest is a general elicitation primitive. It helps an agent ask better
4
+ > situated questions and turn the answers into organizationally usable context.
5
+ > It is not a survey engine, not a Spiral subroutine, and not a fixed
6
+ > interview template.
7
+
8
+ This document is the persistent design contract for `/harvest`. It was
9
+ written as the input that drove the rebuild of `.claude/skills/harvest/SKILL.md`
10
+ and the authoring of the sibling docs `PROCESS.md` and `FORMAT.md` — and now
11
+ continues to serve as the spec they implement. §13 is the historical record
12
+ of the rollout that landed this layout; the rest of the document is current.
13
+
14
+ ---
15
+
16
+ ## 1. Status before the rebuild
17
+
18
+ (Snapshot of the pre-rebuild state, kept here as the audit findings this
19
+ document was written to address. The rebuild — split into PROCESS.md /
20
+ FORMAT.md / a thin SKILL.md — landed alongside this audit.)
21
+
22
+ **Pre-rebuild file**: `.claude/skills/harvest/SKILL.md` (145 lines).
23
+ - Procedural Steps 0–6 with graph plumbing
24
+ - Connected-mode ops wired: `create-harvest`, `create-harvest-session`,
25
+ `record-harvest-turn`, `complete-harvest` (all in `bin/graph-op.sh`)
26
+ - Step 4 said "Apply `skills/harvest/SKILL.md` from here" — but that path
27
+ resolved back to the same file. There was no separate cognitive layer; the
28
+ reference was recursive/self-referential. The file existed; the intended
29
+ layer did not. PROCESS.md / FORMAT.md now provide that layer.
30
+
31
+ **Reference material (not a port target)**:
32
+ The prior harvest spec drafted in the spiral-skill workspace (215 lines)
33
+ had drifted toward claim-stress-testing objectives that don't belong in
34
+ harvest. We do **not** port it wholesale. We extract only the six reusable
35
+ elicitation moves it documents well:
36
+
37
+ - seed context
38
+ - generate situated questions
39
+ - evaluate answers
40
+ - checkpoint
41
+ - cascade carefully
42
+ - synthesize with evidence
43
+
44
+ Everything else — including any framing about "taking a stance,"
45
+ "recommending a direction," or treating divergence as something to be
46
+ resolved — belongs to Spiral, not Harvest. `PROCESS.md` is authored fresh
47
+ from this `AUDIT.md`, with the old spec consulted only as a craft library
48
+ for the six moves above.
49
+
50
+ **Aspirational outputs (gold fixtures)**:
51
+ - `memory/knowledge/harvests/2026-03-23-olivier-harvest-analysis.md`
52
+ - `memory/knowledge/harvests/2026-03-23-egregore-collective-intelligence-uniqueness.md`
53
+ - `memory/handoffs/2026-05/06-cem-harvest-oz-canvas-tech-and-capabilities.md`
54
+
55
+ These already exemplify the layered output shape (quote ▸ context ▸ reflection
56
+ ▸ pattern ▸ action). The product knows what good looks like; the work is
57
+ making the command reliably reproduce it without the operator carrying the
58
+ form.
59
+
60
+ ---
61
+
62
+ ## 2. Primitive boundary
63
+
64
+ | Primitive | Core move | Input | Output |
65
+ |---|---|---|---|
66
+ | **Harvest** | Elicit latent human/agent context | task + roles + seed context | positions, preferences, tensions, quotes, decision surfaces |
67
+ | **Spiral** | Stress-test a claim | claim + context | refined claim, objections, surviving structure |
68
+
69
+ Spiral can consume harvest output or trigger a harvest. Harvest is broader:
70
+ context, preference, position, domain knowledge, alignment, stakeholder
71
+ needs, design taste, team memory. Spiral is pressure-testing claims. Harvest
72
+ is eliciting what people know, prefer, feel tension around, or are implicitly
73
+ carrying.
74
+
75
+ **Term hygiene.** Outside this section, `PROCESS.md`, `FORMAT.md`, and
76
+ `SKILL.md` should not use Spiral vocabulary — *claim*, *stress-test*,
77
+ *objection*, *survives critique*, *recommend a direction*, *take a stance*.
78
+ A short boundary section in `PROCESS.md` may name Spiral once to mark the
79
+ boundary; everywhere else, harvest stays in its own register: elicit,
80
+ preserve, situate, surface, interpret-with-evidence.
81
+
82
+ **What harvest is not**: a survey, a retrospective form, a performance
83
+ review, a structured-field data collector, a replacement for conversation,
84
+ a Spiral subroutine.
85
+
86
+ ---
87
+
88
+ ## 3. First-class design constraints
89
+
90
+ ### 3.1 Model-led, not flowchart-led
91
+
92
+ > The model owns the next question. The protocol only requires that it can
93
+ > explain why the question is being asked, preserve the answer, and update
94
+ > its interpretation.
95
+
96
+ The spec defines invariants, affordances, and failure modes — not a rigid
97
+ interview script. There is no fixed round count, no fixed question count
98
+ per round, no required dimensions to cover. The model reads the situation,
99
+ generates the next question with an articulable purpose, evaluates the
100
+ answer, and decides whether to deepen, pivot, checkpoint, cascade, or
101
+ synthesize.
102
+
103
+ ### 3.2 Primitive-level, not Spiral-specific
104
+
105
+ Harvest is the elicitation primitive. Anything that needs latent human or
106
+ agent context — onboarding, alignment, decision crystallization, knowledge
107
+ extraction, retrospective — can call harvest. Spiral, `/quest`, `/reflect`,
108
+ and `/onboarding` may consume harvest output. Harvest does not depend on any
109
+ of them.
110
+
111
+ ### 3.3 Invariants
112
+
113
+ Normative in `PROCESS.md` §2 (five invariants: no hidden role
114
+ stereotyping · no survey collapse · no unmarked cascade contamination ·
115
+ no synthesis without evidence · articulable `questionIntent` per
116
+ question). This document does not restate them; the original audit text
117
+ lives in git history.
118
+
119
+ ### 3.4 Anti-conflation test
120
+
121
+ Normative in `PROCESS.md` §8 (the four fixtures every protocol rule
122
+ must pass). Not restated here.
123
+
124
+ ### 3.5 Failure modes to design against
125
+
126
+ | Failure mode | What it looks like | Mitigation |
127
+ |---|---|---|
128
+ | **Survey collapse** | AUQ options bias answers; nuance flattens to picked labels | Options drawn from context; freeform escape hatch always; questions can be open-ended where AUQ would constrain |
129
+ | **Role calcification** | Inferred role becomes stereotype; respondent can't see or correct it | RoleSheet shows evidence + confidence; low-confidence inferences are surfaced into the question itself |
130
+ | **Cascade contamination** | Later respondents over-shaped by earlier ones | Disclosure mode (blind/disclosed/comparative) is chosen per harvest, recorded on the manifest, and visible to respondents |
131
+ | **Script drift** | Protocol becomes a flowchart the model rotely executes | Invariants over procedure; `questionIntent` is mandatory and reviewed; round count and shape are model decisions |
132
+
133
+ ---
134
+
135
+ ## 4. Architecture
136
+
137
+ Five artifacts under `.claude/skills/harvest/`:
138
+
139
+ 1. **`SKILL.md`** — entry point. Orchestration only: parse args, detect
140
+ mode, create IDs, load the sibling contracts, persist state, exit.
141
+ No cognitive logic.
142
+ 2. **`PROCESS.md`** — the cognitive protocol. Authored fresh from
143
+ `AUDIT.md`; consult the old harvest spec only for the six reusable
144
+ elicitation moves (seed, generate, evaluate, checkpoint, cascade,
145
+ synthesize). Covers role asymmetry, AUQ round protocol, async bridge,
146
+ and resume.
147
+ 3. **`QUESTION_PALETTE.md`** — the canonical intent → question move →
148
+ answer shape rubric, conversational-move definitions, and hard bans.
149
+ PROCESS, FORMAT, SKILL, and scroll point here instead of restating it.
150
+ 4. **`FORMAT.md`** — the synthesis grammar. Layered disclosure rules,
151
+ synthesis blocks, generative emission policy.
152
+ 5. **Memory contract** — documented markdown shape for manifest, session,
153
+ turn, async question, and synthesis files. Lives in this document
154
+ (§9–§10); not a separate doc.
155
+
156
+ The current SKILL.md's recursive self-reference ("intelligence lives in
157
+ skills/harvest/SKILL.md") is the first thing to remove.
158
+
159
+ ---
160
+
161
+ ## 5. Three-column model: Guidance · Tooling · Discretion
162
+
163
+ Frame the rebuild not as procedure but as the relationship between what the
164
+ spec *prescribes*, what the system *provides*, and what the model *decides*.
165
+
166
+ | Guidance (model reads, qualitative) | Tooling (system provides, concrete) | Discretion (model decides) |
167
+ |---|---|---|
168
+ | Role asymmetry — sender vs. receiver | RoleSheet schema and resolution helpers | How much context to include with each question |
169
+ | Anti-bias — when to disclose, when to withhold | AskUserQuestion (AUQ) rounds (1 call/round, headers ≤12 chars) | Round count; question count per round |
170
+ | Cascade disclosure choices | `questionIntent` + `evaluation` recorded per turn | Disclosure setting (`context_mode`: blind/disclosed/comparative) |
171
+ | Synthesis grammar (layers + blocks) | Async question metadata (`harvest_id`, `harvest_session_id`, `turn`, `context_mode`, `status`) | Which synthesis layers and blocks to emit |
172
+ | Failure mode awareness | Markdown/session state (local mode), graph nodes (connected mode) | When to checkpoint, deepen, pivot, synthesize |
173
+
174
+ ---
175
+
176
+ ## 6. RoleSheet — sender/receiver asymmetry
177
+
178
+ Question generation takes both sheets as input, not just the receiver's.
179
+ Self-harvest is the degenerate case where sender == receiver.
180
+
181
+ ```
182
+ RoleSheet {
183
+ handle: string # e.g. "renc"
184
+ explicit_role: string? # from memory/people/{handle}.md frontmatter
185
+ explicit_focus: string? # declared current focus / domain
186
+ recent_threads: [string] # last-N session topics, quest names
187
+ likely_lenses: [string] # inferred analytical orientations
188
+ evidence: [string] # paths/quotes that justify each inference
189
+ confidence: low|med|high # per implicit field
190
+ }
191
+ ```
192
+
193
+ **Resolution**:
194
+ - *Explicit*: read `memory/people/{handle}.md` frontmatter and prose.
195
+ - *Implicit*: read recent handoffs/sessions/quests where this person
196
+ appears. Local mode reads files; connected mode queries the graph.
197
+
198
+ **Surfacing into the interaction (anti-calcification)**:
199
+ - High confidence: the inference shapes the question silently.
200
+ - Low/medium confidence: surface the inference into the question itself —
201
+ *"I'm reading you as approaching this from the eng-lead lens — push back
202
+ if that's wrong."* Respondent can correct in one turn.
203
+
204
+ **Generation input** (per turn):
205
+ ```
206
+ generate_question({
207
+ sender: SenderSheet,
208
+ receiver: ReceiverSheet,
209
+ task: string,
210
+ intent: string,
211
+ seed: [Document],
212
+ prior_turns: [Turn],
213
+ open_threads: [string],
214
+ })
215
+ ```
216
+
217
+ The vector matters. `cem-asks-renc-about-pricing` ≠
218
+ `renc-asks-cem-about-pricing`. The asymmetry is what lets harvest produce
219
+ *situated* questions instead of generic ones.
220
+
221
+ ---
222
+
223
+ ## 7. AUQ round protocol
224
+
225
+ Normative in `PROCESS.md` §3.2 (round shape, forbidden-in-round-1,
226
+ always-permitted) and §3.3 (evaluation vocabulary). Not restated here.
227
+ The unique tooling fact this document owns: the graph supports
228
+ `questionIntent` and `evaluation` on `HarvestTurn` (the
229
+ `record-harvest-turn` op in `bin/graph-op.sh`). We use what's there.
230
+
231
+ ---
232
+
233
+ ## 8. Synthesis
234
+
235
+ > **A harvest maps the choices; it need not make them.**
236
+
237
+ Normative in `FORMAT.md`: the four layers (§2), the six synthesis
238
+ blocks (§3), generative emission (§4), and `/reflect`-able linkability
239
+ (§8). Not restated here.
240
+
241
+ ---
242
+
243
+ ## 9. Async bridge — extending `/ask` for harvest re-entry
244
+
245
+ Async harvest doesn't just "deliver via `/ask`." When a respondent isn't
246
+ present, harvest emits a question file using `/ask`'s existing markdown
247
+ shape, *plus* harvest metadata so the answer re-enters the right harvest:
248
+
249
+ ```yaml
250
+ ---
251
+ from: cem
252
+ to: renc
253
+ topic: pricing
254
+ status: pending # pending | answered | incorporated
255
+ date: 2026-05-07
256
+
257
+ harvest_id: harvest-2026-05-07-pricing
258
+ harvest_session_id: harvest-2026-05-07-pricing-renc
259
+ turn: 3
260
+ question_intent: "Renc's stance on free-tier ceiling vs. wedge"
261
+ context_mode: disclosed # blind | disclosed | comparative
262
+ ---
263
+
264
+ ## Questions
265
+
266
+ 1. [Wedge] {generated text}
267
+ 2. [Ceiling] {generated text}
268
+ ```
269
+
270
+ `bin/agent.sh ask` originally wrote only `from / to / topic / status /
271
+ created` (the `ask` writer in `bin/agent.sh`). It has been extended (or
272
+ `/harvest` writes harvest-flavored question files directly) so the async
273
+ bridge is re-entrant.
274
+
275
+ When the respondent answers via `/ask`, the answers append to the file and
276
+ status moves `pending → answered`. The next time `/harvest` runs and finds
277
+ its session has `answered` files, it incorporates them, sets status to
278
+ `incorporated`, and continues toward synthesis.
279
+
280
+ **Async initial state**: `create-harvest-session` (in `bin/graph-op.sh`)
281
+ accepts an optional 4th `[status]` argument validated against
282
+ `pending|active|answered|complete|incorporated` — **this five-value enum
283
+ is the canonical HarvestSession status set**; every other mention cites
284
+ it. (The question *file's* frontmatter `status` is a different, smaller
285
+ enum: `pending|answered|incorporated`.) Async respondents are created
286
+ with `pending` and transition to `active` when they engage; default
287
+ remains `active` for back-compat with synchronous callers.
288
+
289
+ ---
290
+
291
+ ## 10. Local-mode contract
292
+
293
+ Local mode never references graph failures. It writes durable markdown.
294
+
295
+ ```
296
+ memory/knowledge/harvests/{date}-{slug}/
297
+ manifest.md # harvest-level: id, topic, intent, initiator,
298
+ # respondents, disclosure_mode, status
299
+ sessions/
300
+ {handle}.md # per-respondent: turns inline, frontmatter status
301
+ synthesis.md # the layered output (L0..L3)
302
+ ```
303
+
304
+ For single-session harvests (the common case), the existing flat file at
305
+ `memory/knowledge/harvests/{date}-{slug}.md` remains valid — it collapses
306
+ manifest + session + synthesis into one. The directory shape is opt-in for
307
+ multi-respondent harvests.
308
+
309
+ `/ask`'s local-mode pattern (in `.claude/skills/ask/SKILL.md`) is the
310
+ model to follow: clear local/connected split, no graph-failure messaging
311
+ in local mode, durable markdown is the source of truth.
312
+
313
+ ---
314
+
315
+ ## 11. Resume protocol
316
+
317
+ Normative in `PROCESS.md` §7. Session status uses the §9 enum
318
+ (`pending | active | answered | complete | incorporated`). The harvest
319
+ is `complete` only when synthesis is written and linked.
320
+
321
+ ---
322
+
323
+ ## 12. Eval fixtures
324
+
325
+ Pin two harvests as gold:
326
+
327
+ 1. `memory/knowledge/harvests/2026-03-23-olivier-harvest-analysis.md`
328
+ 2. `memory/handoffs/2026-05/06-cem-harvest-oz-canvas-tech-and-capabilities.md`
329
+
330
+ Regeneration must reproduce, given the same intent + RoleSheets + seed:
331
+
332
+ - L0 portrait present, single sentence, names the sharpest finding
333
+ - ≥3 named patterns (knowledge / action / antipattern) where the source
334
+ fixture has them
335
+ - Direct quotes attributed by handle
336
+ - L1 surface populated when divergence or convergence existed; absent
337
+ cleanly when the harvest was pure preference / context
338
+ - No leading questions in round 1 (check `questionIntent` log)
339
+ - Every L2 assertion traces to a recorded turn or marked seed
340
+
341
+ These are not unit tests. They are reference outputs the rebuild is judged
342
+ against. If the regenerated artifact fails any of these, the rebuild isn't
343
+ done.
344
+
345
+ ---
346
+
347
+ ## 13. Rollout (historical record)
348
+
349
+ The order in which the rebuild landed. Steps 1–7 shipped together; step 8
350
+ remains as the empirical proof the rebuild reproduces the gold fixtures.
351
+
352
+ 1. ✓ Land this `AUDIT.md`.
353
+ 2. ✓ Rewrite `.claude/skills/harvest/SKILL.md` as a real entry point. Move
354
+ cognitive content out.
355
+ 3. ✓ **Author `PROCESS.md` fresh from this `AUDIT.md`.** Did not port the
356
+ prior spiral-context harvest spec wholesale. Used it only as a craft
357
+ library for the six reusable moves (seed, generate, evaluate,
358
+ checkpoint, cascade, synthesize). Every protocol rule was run through
359
+ the §3.4 anti-conflation test before keeping it. Spiral vocabulary
360
+ stripped except in a short boundary section.
361
+ 4. ✓ Write `FORMAT.md` from §8 using Olivier + Oz harvests as fixtures.
362
+ 5. ✓ Document the local-mode markdown contract (§10, this document —
363
+ `PROCESS.md` §9 points here).
364
+ 6. ✓ `bin/graph-op.sh create-harvest-session` accepts an optional
365
+ `[status]` argument with enum validation (§9).
366
+ 7. ✓ `bin/agent.sh ask` extended with harvest-flavored frontmatter
367
+ fields per §9 (`--harvest-id`, `--harvest-session-id`, `--turn`,
368
+ `--question-intent`, `--context-mode`).
369
+ 8. Run regeneration against fixtures (§12). Iterate until all pass.
370
+
371
+ The Olivier and Oz harvests are the bar. The product already knows what
372
+ good looks like; the rebuild is making the command reliably reproduce it
373
+ without the operator carrying the form.
374
+
375
+ ---
376
+
377
+ ## 14. Decision surface — rendered mode + round-trip
378
+
379
+ The `choice` block (`FORMAT.md` §3) gained a **rendered, fillable
380
+ form** — the *decision surface*. `/harvest` is the only command: when its findings are decision-shaped, it
381
+ renders them as a *decision surface* — the rendered format/artifact the respondent
382
+ decides on and pastes back. *Decision surface* names the **format**, not a command;
383
+ there is no `/decision-surface` command (everything merges into `/harvest` — one
384
+ verb, one grammar).
385
+
386
+ **Resolution** — matches the original directed-vs-self intent:
387
+ - Invoked on yourself (no `--to`) → **self-harvest**, rendered: surface your own
388
+ decisions, fill, paste back into the session.
389
+ - Sent to someone (`--to <name>`) → **directed harvest**: render + deliver; their
390
+ filled-in choices return as the answer.
391
+
392
+ ### Renderer
393
+
394
+ `decision-surface` is a first-class artifact type in `packages/egregore-artifacts`
395
+ (`lib/parsers/decision-surface.js`, `lib/templates/decision-surface.js`, registered
396
+ in `lib/index.js`; `decision-surface` added to `bin/cli.js` known types). It renders
397
+ the data model — `decisions[] → {id, title, context, mode, max, ends, section,
398
+ options[{key, label, visual, tradeoffs[{t,text}], recommended}]}` — as an
399
+ interactive surface: option cards, a structural visual per option, honest `+/−`
400
+ tradeoffs, at most one recommendation, selection state, a progress bar, and a
401
+ copy-back button.
402
+
403
+ **Answer modes (canonical):** `mode ∈ single | multi | rank | weight | spectrum`,
404
+ per card. Absent or unknown ⇒ `single` (backward compatibility only — new surfaces
405
+ declare a mode explicitly; see SKILL.md's mode table for selection guidance).
406
+ Mode-specific fields: `max` (multi — optional selection cap), `ends` (spectrum —
407
+ the two labeled poles, `["left","right"]`). **Grouping:** optional top-level
408
+ `sections: [{id, label, desc}]` plus `section: "<id>"` per decision renders a
409
+ category rail; additive — surfaces without it render flat, unchanged. Locked to the **meridian**
410
+ palette by the design-system route. Styled with **role tokens only** (`--t1` decided,
411
+ `--t2` plus, `--t3` minus, `--ink/--paper/--line/--card`) — dark-mode-safe, no
412
+ resolved hex. The output is fully self-contained (CSS + behavior inlined): fillable
413
+ from a file, a published URL, or embedded in an emissary, with **no egregore runtime
414
+ needed to fill it** — only to absorb.
415
+
416
+ ### Round-trip — the return contract
417
+
418
+ The paste-back block is the **transport-agnostic return contract**:
419
+
420
+ ```
421
+ #{slug}-decisions:v1
422
+ surface: {surface_id}
423
+ harvest: {harvest_id} # directed surfaces only — re-keys to the HarvestSession
424
+ source: {source}
425
+ date: {YYYY-MM-DD}
426
+
427
+ Q1 {decision-id}: {option-key} ("{label}")
428
+ note: {reasoning}
429
+ Q2 {decision-id}: UNDECIDED
430
+ Q3 {decision-id}: [{key-a}, {key-b}] ("{Label A}" + "{Label B}") # multi
431
+ Q4 {decision-id}: {key-a} > {key-c} > {key-b} # rank
432
+ Q5 {decision-id}: {position} ({left-pole}→{right-pole}) # spectrum
433
+ Q6 {decision-id}: {key-a}:60 {key-b}:40 # weight
434
+ ```
435
+
436
+ Each answer mode emits its own Q-line shape (above); `UNDECIDED` and the
437
+ indented `note:` are valid under every mode.
438
+
439
+ This is the same shape already in field use (`#…-decisions:v1`). It self-identifies
440
+ the surface/harvest it answers, so it re-keys deterministically over *any* channel.
441
+ On `--resume`: re-key, record each choice as a `HarvestTurn` answer (`note` = the
442
+ rationale), apply resolved decisions to `source`, log to
443
+ `memory/knowledge/decisions/` if others will build on them, synthesize. `UNDECIDED`
444
+ stays open — never forced.
445
+
446
+ ### Absorb & review (canonical)
447
+
448
+ This is the single canonical statement of the rendered-surface absorb
449
+ machine. `SKILL.md` points here; scrolls carry their own version of the
450
+ same machine in `.claude/skills/scroll/SKILL.md` §5–§6 (shared event
451
+ grammar, separate stores).
452
+
453
+ Rendered decision surfaces have the same durable review substrate as
454
+ scrolls. Store the surface's data model next to `source` with optional
455
+ `"author": "<person-slug>"` and `"trusted": ["<person-slug>", …]`;
456
+ legacy surfaces without `author` are backfilled from unambiguous
457
+ artifact/source authorship, otherwise ask once and write it — never
458
+ silently default open. Append events to
459
+ `memory/harvests/.events/<surface-slug>.jsonl` (the runtime events root,
460
+ sibling of scrolls' `memory/scrolls/.events/` — synthesis artifacts live
461
+ separately under `memory/knowledge/harvests/`) using the same event
462
+ grammar as scrolls: `turn-received`, `turn-reviewed`, and
463
+ surface-specific `turn-applied` (there is no `version-published` for
464
+ surfaces). A `turn-received` may carry optional
465
+ `submitted_by: <person-slug>` event-log metadata recorded only on that
466
+ event from the session person doing the paste; it is never projected
467
+ into the ledger or return block and is not part of the history
468
+ return-block grammar. Event ids are `turn.id`, `review|<turn.id>`, and
469
+ `applied|<turn.id>` respectively.
470
+
471
+ Re-key the pasted return block by `surface`/`harvest` and create its
472
+ `turn-received` event. Derive the paster from the session person doing
473
+ the paste, not the return block's self-declared `respondent:`
474
+ attribution. If the paster is the `author` or in `trusted`, continue the
475
+ existing apply flow. Otherwise append the pending turn, do **not** apply
476
+ decisions to `source` or log to `memory/knowledge/decisions/`, notify
477
+ the author via `bash bin/notify.sh` in connected mode or an addressed
478
+ handoff in local mode, and stop. The notification names the surface,
479
+ paster, digest, and the same accept / decline-with-required-reason /
480
+ synthesize dispositions; the contributor may also send the acknowledged
481
+ artifact link directly.
482
+
483
+ The author disposes in agent chat with the same protocol as scrolls:
484
+ accept, decline with a nonblank attributed note, per-answer overrides,
485
+ or synthesize all pending turns and approve the proposal. Append each
486
+ `turn-reviewed` before applying anything. The hybrid rule is identical:
487
+ top-level disposition defaults, `answers` overrides per fork, any
488
+ effective accepted answer is absorbable, a zero-answer turn takes the
489
+ top-level disposition as its effective disposition, zero is a plain
490
+ decline, and a note is required for every effective decline.
491
+ Accepted-but-unapplied turns remain pending and are retryable.
492
+
493
+ For every successful application — whether it follows an accepted review
494
+ or a direct author/trusted apply — apply resolved decisions to `source`,
495
+ log to `memory/knowledge/decisions/` if others will build on them, and
496
+ only **after both steps complete** append `turn-applied` with
497
+ `{ "id":"applied|<turn.id>", "type":"turn-applied", "turn":"<turn.id>",
498
+ "date":"…", "targets":["<paths written>"] }`. Before re-applying an
499
+ accepted turn, check the targets for its turn id (decision records name
500
+ the turn id) and skip targets already written for that id; this keeps
501
+ retries idempotent. The surface remains pending until `turn-applied`; a
502
+ declined review is the only review projection that clears it without
503
+ application. Then synthesize. `UNDECIDED` lines stay open — never force
504
+ a pick.
505
+
506
+ ### Two transports — one payload
507
+
508
+ | Transport | For | Status |
509
+ |---|---|---|
510
+ | **Copy-back → harvest channel** | egregore users, local-first | **Built.** Block returns via `/ask`→`/answer`→`/harvest --resume`. Works offline; no server. |
511
+ | **Emissary respond (`kind: decision`)** | people **without** egregore who want to pass surfaces back and forth | **Designed, not built.** Carries the *identical* paste-back payload as an emissary response (`packages/egregore-emissary` `respond`, threaded via `parents`). Because the surface and the return contract are transport-agnostic, this is a delivery/return swap — **no renderer rework**. |
512
+
513
+ **Invariant — transport-neutral:** the renderer and the return contract must stay
514
+ transport-neutral. A change that couples the surface or the paste-back block to the
515
+ harvest channel specifically (rather than to the abstract "selections + notes,
516
+ re-keyed by surface/harvest") breaks the deferred emissary path and must be rejected.
517
+
518
+ **Invariant — no author markup:** a directed surface is published and sent to other
519
+ people, so the renderer must never inject author-supplied HTML/SVG. Visuals use a
520
+ closed, structured schema (`mono` token spans, `badges`, `diagram` primitives)
521
+ rendered as escaped React elements with allowlisted tones — no `dangerouslySetInnerHTML`
522
+ for any data-derived content. The only `dangerouslySetInnerHTML` permitted is the
523
+ static CSS/behavior strings and the config object (`JSON.stringify`, with every
524
+ `<` escaped to its unicode form so a malicious value can't break out of the
525
+ `</script>` tag), whose values are only ever written back via `textContent`.
526
+ Re-introducing a raw-HTML/SVG visual path is a security regression and must be
527
+ rejected.
528
+
529
+ ### Rollout (this change)
530
+
531
+ 1. ✓ `decision-surface` renderer added to `packages/egregore-artifacts` (parser,
532
+ template, index + CLI registration), role-token / dark-mode-safe, meridian-locked.
533
+ 2. ✓ Verified end-to-end (object + JSON-file + markdown-embedded paths) and
534
+ screenshotted in light + dark.
535
+ 3. ✓ Rendered-surface mode folded into `/harvest` SKILL.md (the only command;
536
+ `decision surface` is the rendered format, not a command — no
537
+ `/decision-surface` command).
538
+ 4. ✓ `SKILL.md` + `FORMAT.md` updated: rendered mode, absorb-on-resume,
539
+ strategic surface-design guidance, `choice` block promoted to a
540
+ rendered form.
541
+ 5. ◻ **Deferred:** emissary `kind: decision` + `respond` extension for the
542
+ non-egregore transport.
543
+ 6. ◻ **Deferred:** publish `egregore-artifacts` with the new type so
544
+ `npx egregore-artifacts decision-surface` resolves (prototype renders via the
545
+ local package). This is a framework change — land it via `/contribute`, not a
546
+ local edit, before relying on the published path.