@hassangameryt/freeflow 0.7.3 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (426) hide show
  1. package/.agents/plugins/marketplace.json +2 -2
  2. package/.claude-plugin/marketplace.json +1 -1
  3. package/.claude-plugin/plugin.json +2 -2
  4. package/.codex-plugin/plugin.json +3 -3
  5. package/.cursor-plugin/plugin.json +1 -1
  6. package/NOTICE +14 -0
  7. package/README.md +101 -159
  8. package/capabilities/cognitive-routing/SKILL.md +47 -210
  9. package/capabilities/cognitive-routing/references/coordinator.md +163 -0
  10. package/capabilities/cognitive-routing/references/worker.md +38 -0
  11. package/capabilities/compaction/SKILL.md +49 -0
  12. package/capabilities/compaction/references/summary-format.md +250 -0
  13. package/capabilities/messaging/SKILL.md +49 -0
  14. package/capabilities/task-memory/SKILL.md +87 -0
  15. package/command-surface.json +8 -52
  16. package/gemini-extension.json +1 -1
  17. package/hooks/claude/hooks.json +13 -3
  18. package/hooks/codex/hooks.json +2 -1
  19. package/hooks/shared/runtime-context.mjs +73 -83
  20. package/licenses/Apache-2.0.txt +55 -0
  21. package/package.json +42 -12
  22. package/pi-extension/README.md +41 -0
  23. package/pi-extension/dist/ask-user/ask.js +108 -0
  24. package/pi-extension/dist/ask-user/form.js +250 -0
  25. package/pi-extension/dist/ask-user/questions.js +66 -0
  26. package/pi-extension/dist/ask-user/tool.js +124 -0
  27. package/pi-extension/dist/cognitive-routing/assembler.js +417 -0
  28. package/pi-extension/dist/cognitive-routing/bootstrap.js +90 -0
  29. package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/config.js +8 -6
  30. package/pi-extension/dist/cognitive-routing/economics.js +45 -0
  31. package/pi-extension/dist/cognitive-routing/event-schema.js +388 -0
  32. package/pi-extension/dist/{session-sources/events.js → cognitive-routing/event-store.js} +107 -41
  33. package/pi-extension/dist/cognitive-routing/gate.js +256 -0
  34. package/pi-extension/dist/cognitive-routing/handlers.js +901 -0
  35. package/pi-extension/dist/cognitive-routing/handoffs.js +350 -0
  36. package/pi-extension/dist/cognitive-routing/model-control.js +476 -0
  37. package/pi-extension/dist/cognitive-routing/projection.js +520 -0
  38. package/pi-extension/dist/cognitive-routing/provenance.js +83 -0
  39. package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/render.js +15 -15
  40. package/pi-extension/dist/cognitive-routing/runtime.js +398 -0
  41. package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/schemas.js +47 -11
  42. package/pi-extension/dist/cognitive-routing/session.js +223 -0
  43. package/pi-extension/dist/{session-sources → cognitive-routing}/sources.js +126 -87
  44. package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/state.js +55 -386
  45. package/pi-extension/dist/cognitive-routing/status.js +81 -0
  46. package/pi-extension/dist/cognitive-routing/tools.js +74 -0
  47. package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/types.js +14 -11
  48. package/pi-extension/dist/compaction/carry.js +205 -0
  49. package/pi-extension/dist/compaction/config.js +24 -0
  50. package/pi-extension/dist/compaction/controller.js +494 -0
  51. package/pi-extension/dist/compaction/harness.js +93 -0
  52. package/pi-extension/dist/compaction/results.js +159 -0
  53. package/pi-extension/dist/compaction/thresholds.js +35 -0
  54. package/pi-extension/dist/compaction/tool.js +57 -0
  55. package/pi-extension/dist/host/branch.js +13 -0
  56. package/pi-extension/dist/host/canonical.js +12 -0
  57. package/pi-extension/dist/host/catalog.js +62 -0
  58. package/pi-extension/dist/host/config-validation.js +233 -0
  59. package/pi-extension/dist/host/config.js +361 -0
  60. package/pi-extension/dist/host/inbound.js +142 -0
  61. package/pi-extension/dist/host/projection-tags.js +60 -0
  62. package/pi-extension/dist/host/prompts.js +93 -0
  63. package/pi-extension/dist/{session-sources → host}/read-only-session.js +117 -1
  64. package/pi-extension/dist/{runtime → host}/request-history.js +125 -39
  65. package/pi-extension/dist/host/rows.js +25 -0
  66. package/pi-extension/dist/host/runtime-state.js +204 -0
  67. package/pi-extension/dist/host/section-keeper.js +85 -0
  68. package/pi-extension/dist/host/settings/freeflow-command.js +2323 -0
  69. package/pi-extension/dist/{settings/settings-tui.js → host/settings/settings-view.js} +205 -73
  70. package/pi-extension/dist/host/staging.js +28 -0
  71. package/pi-extension/dist/host/status.js +115 -0
  72. package/pi-extension/dist/index.js +1004 -188
  73. package/pi-extension/dist/messaging/config.js +27 -0
  74. package/pi-extension/dist/messaging/messaging.js +398 -0
  75. package/pi-extension/dist/messaging/registry.js +57 -0
  76. package/pi-extension/dist/messaging/render.js +90 -0
  77. package/pi-extension/dist/messaging/tools.js +109 -0
  78. package/pi-extension/dist/messaging/transport.js +101 -0
  79. package/pi-extension/dist/provider-support/cache/anchor.js +21 -0
  80. package/pi-extension/dist/provider-support/cache/anthropic.js +102 -0
  81. package/pi-extension/dist/provider-support/cache/health.js +73 -0
  82. package/pi-extension/dist/provider-support/cache/index.js +58 -0
  83. package/pi-extension/dist/provider-support/cache/keepalive.js +222 -0
  84. package/pi-extension/dist/provider-support/cache/monitor.js +17 -0
  85. package/pi-extension/dist/provider-support/cache/openai-responses.js +48 -0
  86. package/pi-extension/dist/provider-support/effort.js +13 -0
  87. package/pi-extension/dist/provider-support/index.js +44 -3
  88. package/pi-extension/dist/provider-support/{astra → openai}/adapter.js +46 -29
  89. package/pi-extension/dist/provider-support/{astra → openai}/history.js +10 -8
  90. package/pi-extension/dist/provider-support/{astra → openai}/index.js +8 -4
  91. package/pi-extension/dist/provider-support/{astra → openai}/session-state.js +29 -38
  92. package/pi-extension/dist/provider-support/routes.js +17 -0
  93. package/pi-extension/dist/task-memory/config.js +49 -0
  94. package/pi-extension/dist/task-memory/registry.js +119 -0
  95. package/pi-extension/dist/task-memory/render.js +107 -0
  96. package/pi-extension/dist/task-memory/runtime.js +994 -0
  97. package/pi-extension/dist/task-memory/tool.js +233 -0
  98. package/pi-extension/dist/tool-execution/apply-patch/grammar.js +23 -0
  99. package/pi-extension/dist/tool-execution/apply-patch/match.js +38 -0
  100. package/pi-extension/dist/tool-execution/apply-patch/parser.js +177 -0
  101. package/pi-extension/dist/tool-execution/apply-patch/plan.js +201 -0
  102. package/pi-extension/dist/tool-execution/apply-patch/tool.js +84 -0
  103. package/pi-extension/dist/tool-execution/background.js +430 -0
  104. package/pi-extension/dist/tool-execution/bash-guard.js +23 -0
  105. package/pi-extension/dist/tool-execution/config.js +33 -0
  106. package/pi-extension/dist/tool-execution/edit-messages.js +120 -0
  107. package/pi-extension/dist/tool-execution/file-state.js +138 -0
  108. package/pi-extension/dist/tool-execution/file-tracking.js +163 -0
  109. package/pi-extension/dist/tool-execution/guidance-notices.js +124 -0
  110. package/pi-extension/dist/tool-execution/prompt.js +54 -0
  111. package/pi-extension/dist/tool-execution/skill-reads.js +143 -0
  112. package/pi-extension/dist/tool-execution/tools.js +16 -0
  113. package/pi-extension/freeflow/README.md +9 -0
  114. package/runtime/prompts/cognitive-routing.md +4 -4
  115. package/runtime/prompts/core.md +29 -72
  116. package/runtime/prompts/interaction-contract.md +18 -8
  117. package/runtime/prompts/tool-execution.md +25 -0
  118. package/runtime/prompts/working-method.md +25 -0
  119. package/skills/deliver-work/SKILL.md +76 -0
  120. package/skills/deliver-work/references/branch-closeout.md +134 -0
  121. package/skills/deliver-work/references/commit.md +83 -0
  122. package/skills/deliver-work/references/launch.md +94 -0
  123. package/skills/deliver-work/references/release.md +85 -0
  124. package/skills/deliver-work/scripts/commit-state.mjs +139 -0
  125. package/skills/deliver-work/scripts/delivery-state.mjs +107 -0
  126. package/skills/deliver-work/scripts/lib/git-state.mjs +178 -0
  127. package/skills/deliver-work/scripts/push-route.mjs +122 -0
  128. package/skills/deliver-work/scripts/release-preflight.mjs +177 -0
  129. package/skills/discuss-work/SKILL.md +148 -0
  130. package/skills/{discuss → discuss-work}/references/discussion-continuity.md +13 -50
  131. package/skills/discuss-work/references/learning-action.md +36 -0
  132. package/skills/discuss-work/scripts/choices.mjs +101 -0
  133. package/skills/discuss-work/scripts/lib/choices.mjs +159 -0
  134. package/skills/evaluate-behavior/SKILL.md +107 -0
  135. package/skills/evaluate-behavior/references/authoring.md +381 -0
  136. package/skills/evaluate-behavior/references/coding-tasks.md +145 -0
  137. package/skills/evaluate-behavior/references/conversations-pipelines-judges.md +177 -0
  138. package/skills/evaluate-behavior/references/design-and-measurement.md +273 -0
  139. package/skills/evaluate-behavior/references/running-and-evidence.md +245 -0
  140. package/skills/evaluate-behavior/scripts/claude-guard.mjs +76 -0
  141. package/skills/evaluate-behavior/scripts/guard-rules.mjs +309 -0
  142. package/skills/evaluate-behavior/scripts/lib/agreement.mjs +90 -0
  143. package/skills/evaluate-behavior/scripts/lib/arms.mjs +55 -0
  144. package/skills/evaluate-behavior/scripts/lib/budget.mjs +87 -0
  145. package/skills/evaluate-behavior/scripts/lib/build-source.mjs +287 -0
  146. package/skills/evaluate-behavior/scripts/lib/clear.mjs +74 -0
  147. package/skills/evaluate-behavior/scripts/lib/container.mjs +395 -0
  148. package/skills/evaluate-behavior/scripts/lib/decision.mjs +418 -0
  149. package/skills/evaluate-behavior/scripts/lib/definitions.mjs +1072 -0
  150. package/skills/evaluate-behavior/scripts/lib/freeflow.mjs +103 -0
  151. package/skills/evaluate-behavior/scripts/lib/grade-command.mjs +591 -0
  152. package/skills/evaluate-behavior/scripts/lib/grade-comparison.mjs +90 -0
  153. package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/grade-interaction.mjs +19 -18
  154. package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/grade-support.mjs +32 -5
  155. package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/grade-workspace.mjs +28 -12
  156. package/skills/evaluate-behavior/scripts/lib/grade.mjs +101 -0
  157. package/skills/evaluate-behavior/scripts/lib/hooks.mjs +98 -0
  158. package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/confinement.mjs +196 -0
  159. package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/constraints.mjs +111 -0
  160. package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/index.mjs +48 -0
  161. package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/isolation.mjs +74 -0
  162. package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/launch.mjs +123 -0
  163. package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/model-call.mjs +73 -0
  164. package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/recorder.mjs +178 -0
  165. package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/session.mjs +494 -0
  166. package/skills/evaluate-behavior/scripts/lib/hosts/claude-code/skills.mjs +81 -0
  167. package/skills/evaluate-behavior/scripts/lib/hosts/index.mjs +31 -0
  168. package/skills/evaluate-behavior/scripts/lib/hosts/names.mjs +3 -0
  169. package/skills/evaluate-behavior/scripts/lib/hosts/pi/confinement.mjs +173 -0
  170. package/skills/evaluate-behavior/scripts/lib/hosts/pi/host.mjs +148 -0
  171. package/skills/evaluate-behavior/scripts/lib/hosts/pi/index.mjs +70 -0
  172. package/skills/evaluate-behavior/scripts/lib/hosts/pi/isolation.mjs +81 -0
  173. package/skills/evaluate-behavior/scripts/lib/hosts/pi/model-call.mjs +79 -0
  174. package/skills/evaluate-behavior/scripts/lib/hosts/pi/process.mjs +241 -0
  175. package/skills/{evaluate-skill/scripts/lib → evaluate-behavior/scripts/lib/hosts/pi}/rpc.mjs +144 -26
  176. package/skills/evaluate-behavior/scripts/lib/identity.mjs +82 -0
  177. package/skills/evaluate-behavior/scripts/lib/judge.mjs +688 -0
  178. package/skills/evaluate-behavior/scripts/lib/metrics.mjs +332 -0
  179. package/skills/evaluate-behavior/scripts/lib/model-call.mjs +17 -0
  180. package/skills/evaluate-behavior/scripts/lib/participants.mjs +616 -0
  181. package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/process.mjs +22 -0
  182. package/skills/evaluate-behavior/scripts/lib/queue.mjs +54 -0
  183. package/skills/evaluate-behavior/scripts/lib/reference.mjs +343 -0
  184. package/skills/evaluate-behavior/scripts/lib/reuse.mjs +277 -0
  185. package/skills/evaluate-behavior/scripts/lib/review.mjs +933 -0
  186. package/skills/evaluate-behavior/scripts/lib/runner.mjs +732 -0
  187. package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/sandbox.mjs +121 -14
  188. package/skills/evaluate-behavior/scripts/lib/scan-shell.mjs +457 -0
  189. package/skills/evaluate-behavior/scripts/lib/scan.mjs +479 -0
  190. package/skills/evaluate-behavior/scripts/lib/seal.mjs +91 -0
  191. package/skills/evaluate-behavior/scripts/lib/shell.mjs +560 -0
  192. package/skills/evaluate-behavior/scripts/lib/source-override.mjs +64 -0
  193. package/skills/evaluate-behavior/scripts/lib/subject-file.mjs +88 -0
  194. package/skills/{evaluate-skill/scripts/lib/pi.mjs → evaluate-behavior/scripts/lib/subject.mjs} +239 -262
  195. package/skills/evaluate-behavior/scripts/lib/task-copy.mjs +124 -0
  196. package/skills/evaluate-behavior/scripts/lib/trials.mjs +524 -0
  197. package/skills/evaluate-behavior/scripts/lib/validity.mjs +68 -0
  198. package/skills/evaluate-behavior/scripts/lib/view-html.mjs +454 -0
  199. package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/view.mjs +218 -11
  200. package/skills/evaluate-behavior/scripts/pi-command-tool.mjs +159 -0
  201. package/skills/evaluate-behavior/scripts/pi-container-route.mjs +23 -0
  202. package/skills/evaluate-behavior/scripts/pi-guard.mjs +77 -0
  203. package/skills/evaluate-behavior/scripts/pi-login-refresh.mjs +31 -0
  204. package/skills/evaluate-behavior/scripts/skill-eval.mjs +586 -0
  205. package/skills/execute-work/SKILL.md +96 -72
  206. package/skills/execute-work/references/code-practices.md +27 -49
  207. package/skills/execute-work/references/design.md +271 -0
  208. package/skills/execute-work/references/diagnose.md +117 -0
  209. package/skills/execute-work/references/migration.md +108 -0
  210. package/skills/execute-work/references/simplify.md +65 -0
  211. package/skills/execute-work/scripts/self-review.mjs +422 -0
  212. package/skills/execute-work/scripts/touch-map.mjs +290 -0
  213. package/skills/review-work/SKILL.md +94 -64
  214. package/skills/review-work/references/adjudication.md +94 -0
  215. package/skills/review-work/references/artifact.md +198 -0
  216. package/skills/review-work/references/evals-and-judges.md +66 -0
  217. package/skills/review-work/references/work.md +177 -0
  218. package/skills/review-work/scripts/check-brief.mjs +128 -0
  219. package/skills/review-work/scripts/review-packet.mjs +233 -0
  220. package/skills/setup-freeflow/SKILL.md +69 -16
  221. package/skills/track-work/SKILL.md +135 -151
  222. package/skills/track-work/references/handoff.md +190 -0
  223. package/skills/track-work/references/projects.md +51 -0
  224. package/skills/track-work/references/working-record-format.md +201 -344
  225. package/skills/track-work/scripts/lib/document.mjs +79 -19
  226. package/skills/track-work/scripts/lib/format.mjs +18 -1
  227. package/skills/track-work/scripts/lib/recover.mjs +254 -0
  228. package/skills/track-work/scripts/lib/registry.mjs +656 -0
  229. package/skills/track-work/scripts/lib/search.mjs +40 -0
  230. package/skills/track-work/scripts/lib/store.mjs +53 -21
  231. package/skills/track-work/scripts/lib/transitions.mjs +79 -4
  232. package/skills/track-work/scripts/lib/views.mjs +50 -1
  233. package/skills/track-work/scripts/working-record.mjs +263 -22
  234. package/skills/verify-work/SKILL.md +64 -47
  235. package/skills/verify-work/references/feature-map.md +120 -0
  236. package/skills/verify-work/references/runtime-evidence.md +203 -0
  237. package/skills/verify-work/references/test-design.md +27 -6
  238. package/skills/verify-work/scripts/test-changes.mjs +246 -0
  239. package/skills/write-docs/SKILL.md +171 -0
  240. package/skills/write-docs/references/documentation-shapes.md +184 -0
  241. package/skills/write-docs/references/spec-and-plan-shapes.md +308 -0
  242. package/skills/write-docs/scripts/artifact-check.mjs +148 -0
  243. package/skills/write-docs/scripts/docs-check.mjs +229 -0
  244. package/skills/write-docs/scripts/plan-lint.mjs +123 -0
  245. package/skills/write-skill/SKILL.md +165 -165
  246. package/skills/write-skill/references/activation-and-wording.md +143 -0
  247. package/skills/write-skill/references/placement-and-dependencies.md +154 -0
  248. package/skills/write-skill/scripts/lib/compare.mjs +701 -0
  249. package/skills/write-skill/scripts/lib/similarity.mjs +56 -0
  250. package/skills/write-skill/scripts/lib/skill-author.mjs +197 -3
  251. package/skills/write-skill/scripts/skill-author.mjs +67 -8
  252. package/capabilities/context-virtualization/SKILL.md +0 -103
  253. package/capabilities/conversation-history/SKILL.md +0 -53
  254. package/hooks/tests/check-host-adapters.test.mjs +0 -82
  255. package/hooks/tests/check-runtime-context-hook.sh +0 -212
  256. package/pi-extension/dist/cognitive-routing-v2/projection.js +0 -330
  257. package/pi-extension/dist/cognitive-routing-v2/runtime.js +0 -2181
  258. package/pi-extension/dist/cognitive-routing-v2/tools.js +0 -60
  259. package/pi-extension/dist/context-virtualization/commands.js +0 -89
  260. package/pi-extension/dist/context-virtualization/projector.js +0 -42
  261. package/pi-extension/dist/context-virtualization/runtime.js +0 -378
  262. package/pi-extension/dist/context-virtualization/state.js +0 -57
  263. package/pi-extension/dist/context-virtualization/types.js +0 -10
  264. package/pi-extension/dist/conversation-history/passages.js +0 -66
  265. package/pi-extension/dist/conversation-history/ranking.js +0 -105
  266. package/pi-extension/dist/conversation-history/runtime.js +0 -226
  267. package/pi-extension/dist/conversation-history/search.js +0 -56
  268. package/pi-extension/dist/conversation-history/types.js +0 -1
  269. package/pi-extension/dist/freeflow-context/resolver.js +0 -120
  270. package/pi-extension/dist/freeflow-context/runtime.js +0 -80
  271. package/pi-extension/dist/freeflow-context/source-projector.js +0 -95
  272. package/pi-extension/dist/freeflow-context/tool.js +0 -314
  273. package/pi-extension/dist/freeflow-context/types.js +0 -12
  274. package/pi-extension/dist/freeflow-context/visibility.js +0 -28
  275. package/pi-extension/dist/integrations/mcp-config.js +0 -29
  276. package/pi-extension/dist/runtime/runtime-context.js +0 -754
  277. package/pi-extension/dist/runtime/runtime-identity.js +0 -5
  278. package/pi-extension/dist/session-sources/provenance.js +0 -32
  279. package/pi-extension/dist/settings/settings-ui.js +0 -1360
  280. package/pi-extension/dist/ui/text-component.js +0 -57
  281. package/pi-extension/src/cognitive-routing-v2/budget.ts +0 -42
  282. package/pi-extension/src/cognitive-routing-v2/config.ts +0 -173
  283. package/pi-extension/src/cognitive-routing-v2/projection.ts +0 -375
  284. package/pi-extension/src/cognitive-routing-v2/render.ts +0 -277
  285. package/pi-extension/src/cognitive-routing-v2/runtime.ts +0 -2241
  286. package/pi-extension/src/cognitive-routing-v2/schemas.ts +0 -180
  287. package/pi-extension/src/cognitive-routing-v2/state.ts +0 -839
  288. package/pi-extension/src/cognitive-routing-v2/tools.ts +0 -62
  289. package/pi-extension/src/cognitive-routing-v2/types.ts +0 -254
  290. package/pi-extension/src/context-virtualization/commands.ts +0 -111
  291. package/pi-extension/src/context-virtualization/projector.ts +0 -62
  292. package/pi-extension/src/context-virtualization/runtime.ts +0 -428
  293. package/pi-extension/src/context-virtualization/state.ts +0 -79
  294. package/pi-extension/src/context-virtualization/types.ts +0 -92
  295. package/pi-extension/src/conversation-history/passages.ts +0 -81
  296. package/pi-extension/src/conversation-history/ranking.ts +0 -155
  297. package/pi-extension/src/conversation-history/runtime.ts +0 -250
  298. package/pi-extension/src/conversation-history/search.ts +0 -79
  299. package/pi-extension/src/conversation-history/types.ts +0 -31
  300. package/pi-extension/src/freeflow-context/resolver.ts +0 -139
  301. package/pi-extension/src/freeflow-context/runtime.ts +0 -100
  302. package/pi-extension/src/freeflow-context/source-projector.ts +0 -106
  303. package/pi-extension/src/freeflow-context/tool.ts +0 -366
  304. package/pi-extension/src/freeflow-context/types.ts +0 -70
  305. package/pi-extension/src/freeflow-context/visibility.ts +0 -53
  306. package/pi-extension/src/index.ts +0 -390
  307. package/pi-extension/src/integrations/mcp-config.ts +0 -32
  308. package/pi-extension/src/provider-support/astra/adapter.ts +0 -108
  309. package/pi-extension/src/provider-support/astra/history.ts +0 -145
  310. package/pi-extension/src/provider-support/astra/index.ts +0 -12
  311. package/pi-extension/src/provider-support/astra/session-state.ts +0 -113
  312. package/pi-extension/src/provider-support/index.ts +0 -5
  313. package/pi-extension/src/runtime/request-history.ts +0 -243
  314. package/pi-extension/src/runtime/runtime-context.ts +0 -860
  315. package/pi-extension/src/runtime/runtime-identity.ts +0 -8
  316. package/pi-extension/src/session-sources/events.ts +0 -230
  317. package/pi-extension/src/session-sources/provenance.ts +0 -39
  318. package/pi-extension/src/session-sources/read-only-session.ts +0 -170
  319. package/pi-extension/src/session-sources/sources.ts +0 -334
  320. package/pi-extension/src/settings/settings-tui.ts +0 -501
  321. package/pi-extension/src/settings/settings-ui.ts +0 -1652
  322. package/pi-extension/src/ui/text-component.ts +0 -66
  323. package/pi-extension/tests/cache-reuse/history.test.js +0 -117
  324. package/pi-extension/tests/cache-reuse/native.test.js +0 -91
  325. package/pi-extension/tests/cache-reuse/settings.test.js +0 -211
  326. package/pi-extension/tests/cognitive-routing-v2/communication.test.js +0 -577
  327. package/pi-extension/tests/cognitive-routing-v2/compaction-input.test.js +0 -183
  328. package/pi-extension/tests/cognitive-routing-v2/delegation.test.js +0 -557
  329. package/pi-extension/tests/cognitive-routing-v2/native.test.js +0 -474
  330. package/pi-extension/tests/cognitive-routing-v2/performance.test.js +0 -87
  331. package/pi-extension/tests/cognitive-routing-v2/persistence.test.js +0 -300
  332. package/pi-extension/tests/cognitive-routing-v2/projection.test.js +0 -241
  333. package/pi-extension/tests/cognitive-routing-v2/recovery.test.js +0 -1034
  334. package/pi-extension/tests/cognitive-routing-v2/render.test.js +0 -244
  335. package/pi-extension/tests/cognitive-routing-v2/runtime.test.js +0 -423
  336. package/pi-extension/tests/cognitive-routing-v2/stabilization.test.js +0 -521
  337. package/pi-extension/tests/cognitive-routing-v2/state.test.js +0 -586
  338. package/pi-extension/tests/context-virtualization/extension.test.js +0 -775
  339. package/pi-extension/tests/context-virtualization/projector.test.js +0 -110
  340. package/pi-extension/tests/context-virtualization/runtime.test.js +0 -230
  341. package/pi-extension/tests/conversation-history/runtime.test.js +0 -98
  342. package/pi-extension/tests/conversation-history/search.test.js +0 -97
  343. package/pi-extension/tests/fixtures/pi-host.js +0 -4
  344. package/pi-extension/tests/fixtures/routing-native.js +0 -191
  345. package/pi-extension/tests/integration/mode-free-core.test.js +0 -220
  346. package/pi-extension/tests/integration/pi-extension.test.js +0 -1447
  347. package/pi-extension/tests/integration/prompt-architecture.test.js +0 -447
  348. package/pi-extension/tests/integration/unaffected-regressions.test.js +0 -478
  349. package/pi-extension/tests/provider-support/astra-boundaries.test.js +0 -75
  350. package/pi-extension/tests/provider-support/astra.test.js +0 -306
  351. package/pi-extension/tests/provider-support/cli.test.js +0 -92
  352. package/pi-extension/tests/provider-support/native.test.js +0 -183
  353. package/pi-extension/tests/settings/settings-tui.test.js +0 -243
  354. package/pi-extension/tsconfig.json +0 -16
  355. package/plugin.json +0 -33
  356. package/runtime/prompts/context-virtualization.md +0 -3
  357. package/runtime/prompts/conversation-history.md +0 -3
  358. package/skills/action-selection/SKILL.md +0 -100
  359. package/skills/action-selection/references/trajectory-stalls.md +0 -71
  360. package/skills/bypass/SKILL.md +0 -153
  361. package/skills/commit-work/SKILL.md +0 -145
  362. package/skills/commit-work/references/git-state-edges.md +0 -94
  363. package/skills/commit-work/references/simple-push.md +0 -92
  364. package/skills/commit-work/references/staging-decisions.md +0 -106
  365. package/skills/decision-gate/SKILL.md +0 -106
  366. package/skills/design-for-depth/SKILL.md +0 -117
  367. package/skills/design-for-depth/references/design-pressure-signals.md +0 -182
  368. package/skills/design-for-depth/references/implementation-decisions.md +0 -76
  369. package/skills/design-for-depth/references/interface-design-loop.md +0 -136
  370. package/skills/design-for-depth/references/module-and-dependency-design.md +0 -147
  371. package/skills/design-for-depth/references/software-design-philosophy.md +0 -202
  372. package/skills/design-for-depth/references/state-and-failure-boundaries.md +0 -136
  373. package/skills/diagnose-failure/SKILL.md +0 -125
  374. package/skills/diagnose-failure/references/diagnostic-loop-catalog.md +0 -48
  375. package/skills/diagnose-failure/references/flaky-and-performance-diagnosis.md +0 -51
  376. package/skills/discuss/SKILL.md +0 -116
  377. package/skills/evaluate-skill/SKILL.md +0 -219
  378. package/skills/evaluate-skill/references/evaluation-definition-schema.md +0 -385
  379. package/skills/evaluate-skill/references/evaluation-design.md +0 -112
  380. package/skills/evaluate-skill/references/execution-and-evidence.md +0 -90
  381. package/skills/evaluate-skill/references/review-and-revision.md +0 -92
  382. package/skills/evaluate-skill/scripts/lib/definitions.mjs +0 -407
  383. package/skills/evaluate-skill/scripts/lib/grade-comparison.mjs +0 -60
  384. package/skills/evaluate-skill/scripts/lib/grade.mjs +0 -64
  385. package/skills/evaluate-skill/scripts/lib/runner.mjs +0 -368
  386. package/skills/evaluate-skill/scripts/pi-guard.mjs +0 -164
  387. package/skills/evaluate-skill/scripts/skill-eval.mjs +0 -102
  388. package/skills/execute-work/references/execute-work-edges.md +0 -68
  389. package/skills/finish-branch/SKILL.md +0 -117
  390. package/skills/finish-branch/references/integration-options.md +0 -80
  391. package/skills/handoff/SKILL.md +0 -82
  392. package/skills/handoff/references/handoff-templates.md +0 -150
  393. package/skills/launch-work/SKILL.md +0 -116
  394. package/skills/launch-work/references/launch-readiness.md +0 -85
  395. package/skills/migration-work/SKILL.md +0 -115
  396. package/skills/migration-work/references/migration-lifecycle.md +0 -82
  397. package/skills/release-work/SKILL.md +0 -118
  398. package/skills/release-work/references/release-evidence.md +0 -78
  399. package/skills/review-artifact/SKILL.md +0 -142
  400. package/skills/review-artifact/references/adjudicate-artifact-review.md +0 -101
  401. package/skills/review-artifact/references/independent-artifact-reviewer-contract.md +0 -159
  402. package/skills/review-work/references/adjudicate-work-review.md +0 -97
  403. package/skills/review-work/references/independent-work-reviewer-contract.md +0 -139
  404. package/skills/review-work/references/security-risk-lens.md +0 -69
  405. package/skills/setup-freeflow/references/activation-contract.md +0 -109
  406. package/skills/setup-freeflow/references/host-setup.md +0 -67
  407. package/skills/simplify-code/SKILL.md +0 -85
  408. package/skills/simplify-code/references/simplification-patterns.md +0 -70
  409. package/skills/verify-work/references/browser-runtime-evidence.md +0 -55
  410. package/skills/verify-work/references/integration-evidence.md +0 -47
  411. package/skills/verify-work/references/performance-evidence.md +0 -57
  412. package/skills/workflow/SKILL.md +0 -127
  413. package/skills/workflow/references/domain-skill-composition.md +0 -43
  414. package/skills/write-plan/SKILL.md +0 -92
  415. package/skills/write-plan/references/plan-shapes.md +0 -156
  416. package/skills/write-skill/references/activation-boundaries.md +0 -104
  417. package/skills/write-skill/references/agent-first-instructions.md +0 -121
  418. package/skills/write-skill/references/progressive-disclosure.md +0 -127
  419. package/skills/write-skill/references/skill-dependency-graphs.md +0 -190
  420. package/skills/write-spec/SKILL.md +0 -92
  421. package/skills/write-spec/references/artifact-standards.md +0 -86
  422. package/skills/write-spec/references/decision-records.md +0 -78
  423. package/skills/write-spec/references/spec-shapes.md +0 -143
  424. /package/pi-extension/dist/{cognitive-routing-v2 → cognitive-routing}/budget.js +0 -0
  425. /package/skills/{evaluate-skill → evaluate-behavior}/scripts/lib/evidence.mjs +0 -0
  426. /package/skills/{evaluate-skill → evaluate-behavior}/scripts/pi-observer.mjs +0 -0
@@ -0,0 +1,134 @@
1
+ # Branch Closeout
2
+
3
+ This reference covers a simple push, first, and then closing a branch or isolated checkout. The closeout part is judgment; its confirmation, ownership and conflict stops are binding. A verified branch does not authorize a merge or push, and a chosen integration route does not authorize branch deletion, worktree removal, release or deployment.
4
+
5
+ ## Simple Push
6
+
7
+ Its stops and prohibitions are binding; the inspection commands are judgment.
8
+
9
+ This route is a **simple push**: inspected local commits from the current named branch to one explicit or established remote branch, with no force, deletion, tag publication, integration, pull request, release or deployment. When the request needs any of those, or a choice of how to integrate, share, preserve, rewrite or clean up branch state, use the branch routes below or [release](release.md) instead.
10
+
11
+ ### Confirm What The Yes Covers
12
+
13
+ Confirm which commits are intended, the local branch, the destination remote and branch, and whether setting a new upstream is included. Do not infer a remote, destination branch, pull-request target or shared-branch policy when the wrong choice could affect collaborators.
14
+
15
+ ### Inspect The Route
16
+
17
+ [push-route](../scripts/push-route.mjs) (`node <deliver-work-directory>/scripts/push-route.mjs [--remote <name>]`) reports the branch, upstream or destination, the commits it would send and the stop conditions below that local state shows, and prints the push command without running it. By hand:
18
+
19
+ ```bash
20
+ git branch --show-current
21
+ git status --short --branch
22
+ git branch -vv
23
+ git remote -v
24
+ git log -1 --oneline --decorate
25
+ ```
26
+
27
+ When an upstream exists, also:
28
+
29
+ ```bash
30
+ git rev-parse --abbrev-ref --symbolic-full-name @{upstream}
31
+ git rev-list --left-right --count @{upstream}...HEAD
32
+ ```
33
+
34
+ Ahead and behind counts are only as fresh as the local remote-tracking reference; do not claim current remote state unless you observed it freshly.
35
+
36
+ Stop before pushing when:
37
+
38
+ - `HEAD` is detached;
39
+ - the destination or upstream is unclear;
40
+ - unexpected commits or dirty state change the route;
41
+ - protected or shared-branch policy disallows the push or leaves it unclear;
42
+ - local and observed upstream history diverge;
43
+ - the push would need force, deletion, tag publication or another separately controlled action.
44
+
45
+ ### Push The Exact Branch
46
+
47
+ Use the established upstream when it clearly matches the approved route. Set a new upstream only when the remote and branch are explicit and the configuration change is part of the approved route. Push no other branches or tags. A force push is not a simple push: take an explicitly requested history rewrite to the branch routes below.
48
+
49
+ ### Handle Rejection Without Escalation
50
+
51
+ If the push is rejected or fails, keep the complete result and check whether any remote update happened. Do not automatically pull, merge, rebase, force, change remotes or change destination; return authentication, divergence, policy or destination decisions to the user or to the branch routes below. A failed push does not invalidate the local commit.
52
+
53
+ ### Check The Result
54
+
55
+ After a successful push, inspect `git status --short --branch` and `git branch -vv`, and report whether an upstream was set or changed. A push proves transfer to the observed destination, not a pull request, merge, release, deployment or passing remote CI.
56
+
57
+ ## Inspect The Exact State
58
+
59
+ Before offering or executing a route, inspect:
60
+
61
+ - current branch, detached state, repository root and worktree ownership;
62
+ - the base branch or merge base that repository evidence supports;
63
+ - commits and diff relative to the base;
64
+ - staged, unstaged and untracked work;
65
+ - upstream, remote, and ahead or behind state;
66
+ - fresh verification, self-review and any selected independent review;
67
+ - CI, policy or repository gates for the intended route.
68
+
69
+ Do not infer the base, remote destination, pull-request target or workspace owner when the wrong choice could lose work or affect collaborators.
70
+
71
+ ## Offer Only Supported Routes
72
+
73
+ The user decides whether to integrate locally and by which method, push or open a normal or draft pull request, keep the branch, worktree or dirty state, discard commits or uncommitted work, delete local or remote branches, rewrite or force-push history, and clean up a checkout or worktree.
74
+
75
+ Present only the routes the observed state supports; drop a route that is impossible, unsafe or irrelevant rather than forcing a fixed menu. Ask as [Discuss Work](../../discuss-work/SKILL.md)'s "Ask One Question" describes, with the supported routes as the options. Approval of one route covers only the scope shown and accepted. When a route needs a local commit, use the trunk's Commit steps; do not commit merely to make the branch look finished.
76
+
77
+ ## State Readiness Honestly
78
+
79
+ Call a branch ready for its integration boundary only when the agreed outcome is clear, intended commits and remaining dirty state are known, fresh direct evidence supports the branch claim, self-review left no unresolved material issue, any selected independent review is resolved for the unchanged state, and no source conflict, owner decision, evidence gap or repository gate blocks the route. A feature-branch pass does not prove the integrated result.
80
+
81
+ Unverified or failing work may still be kept, handed off, or shared through an explicitly approved draft route: state the gaps, and do not call it ready to integrate.
82
+
83
+ ## Hand Over For Acceptance
84
+
85
+ Goal: the user can accept or refuse the change from the hand-over alone, without rereading the conversation.
86
+
87
+ The pull-request description, or the final report when there is no pull request, carries:
88
+
89
+ - what done looks like, from the work agreement, against what was done, naming anything left out or changed on the way;
90
+ - choices the user has not seen, from Discuss Work's decision list: its `new`, `changed` and `default` items, each with where it shows;
91
+ - the evidence: each check run on the final state and its result;
92
+ - the review outcome: self-review only, or each independent review's judgment with every Rejected finding and why.
93
+
94
+ Build it from the Working Record ([Track Work](../../track-work/SKILL.md)) when one exists, not from memory. When the repository has a pull-request template or convention, fit these into it. Otherwise write a short briefing from which a reviewer who has the diff can accept or reject the change: why it exists; what changed; its scope, including what it deliberately leaves out; what else it could affect and how risky that is; and the hand-over above.
95
+
96
+ ## Execute Only The Chosen Route
97
+
98
+ ### Local Integration
99
+
100
+ 1. Keep or resolve dirty state deliberately.
101
+ 2. Refresh base evidence without overwriting local work.
102
+ 3. Integrate with the repository's merge or rebase policy, without rewriting unrelated history.
103
+ 4. Run the checks that prove the combined result on the resulting base.
104
+ 5. Inspect the final log and status.
105
+ 6. Remove branch or worktree state only when cleanup was part of the approved route and integration verification succeeded.
106
+
107
+ ### Pull Request
108
+
109
+ Fits when review, CI, collaboration, protected branches or remote integration owns the next gate.
110
+
111
+ - Inspect remote and upstream state, then push only the intended commits to the accepted destination, as [Simple Push](#simple-push) checks them.
112
+ - Capture the target branch, commit range, residual risks, migrations, rollout or compatibility notes, and the reviewers or checks repository policy requires.
113
+ - Create or update the pull request by repository convention, with the hand-over as its description; mark incomplete or failing work as draft when that is the approved route.
114
+ - Keep the worktree when iteration or feedback may continue.
115
+
116
+ A pull-request URL proves creation, not readiness or merge.
117
+
118
+ ### Keep For Later
119
+
120
+ Fits when the work is valid but integration is deferred, feedback is expected, or environment ownership prevents cleanup. Report the trunk's lines plus why the branch is kept and what would end the wait. Read Track Work's [handoff](../../track-work/references/handoff.md) only when continuing needs durable transfer context.
121
+
122
+ ### Discard
123
+
124
+ Classify what is recoverable before deleting anything: uncommitted changes may be unrecoverable; local commits may be recoverable through the reflog for a limited time; pushed commits may affect collaborators; worktrees may be owned by a harness; deleting a remote branch reaches further than local cleanup. State exactly which commits, paths, branches, worktrees and remote state would be lost and what stays recoverable, and require explicit confirmation of that concrete scope. "Finish", "clean up", a menu number or approval of integration is not confirmation of broader destruction.
125
+
126
+ ## Protect Workspace Ownership
127
+
128
+ Do not remove a worktree, checkout, session or harness state you did not create or are not authorized to manage; if ownership is unclear, keep it and report the uncertainty. Do not assume a detached checkout is disposable: an IDE, CI system, coding harness or worktree manager may own it, so offer only routes that environment supports, such as creating a named branch, keeping the checkout, exporting a patch, or asking the harness to close it.
129
+
130
+ ## Return Conflicts And Failures
131
+
132
+ Deliver Work's Stop list says when a conflict stops the route. Stop and report it with its evidence also when resolving it would make a user-owned choice (Discuss Work), or choose between changed tests and changed implementation, incompatible migrations or data ownership, or two architecture directions; the next route may be Discuss Work, review, diagnosis, or a Spec or Plan revision.
133
+
134
+ Use Execute Work's [diagnose](../../execute-work/references/diagnose.md) when integrated checks fail without a supported cause. Take mixed or unrelated branch contents back to the [commit](commit.md) staging decisions. Keep branch state before handing to another activity.
@@ -0,0 +1,83 @@
1
+ # Commit: Staging Decisions And Git State
2
+
3
+ This reference is judgment about what enters a commit and how to handle unusual Git state; each "do not" and each stop is binding. It grants no commit authority and no permission to alter work that is not yours.
4
+
5
+ ## Classify The Changed Units
6
+
7
+ Classify at the path level only when the whole path has one role; otherwise classify hunks.
8
+
9
+ - **Commit content:** implements or proves the commit's claim.
10
+ - **Required companion:** tests, documentation, schema, metadata or generated output the same claim needs.
11
+ - **Related but separable:** useful, but not needed in this commit.
12
+ - **Unrelated or not yours:** outside the agreed outcome, or ownership not established.
13
+ - **Sensitive or unsafe:** secrets, credentials, personal data, environment files, debug output, destructive state or unexplained artifacts.
14
+ - **Unclear:** purpose, generator, ownership or evidence relationship not yet supported.
15
+
16
+ Only commit content and required companions belong. "Commit everything" may authorize broad inclusion; it does not remove the need to inspect unsafe, unclear or unexpectedly unrelated content.
17
+
18
+ ## Protect Existing Staged State
19
+
20
+ Staged changes may belong to another workflow. Inspect them, but do not treat them as intended because they are staged. [commit-state](../scripts/commit-state.mjs) tells them from yours when its `snapshot` ran before your first edit. Do not silently absorb them, unstage or reset them, amend them into another commit, move them through a stash or temporary commit, or replace the index to get around the ambiguity.
21
+
22
+ When your changes and pre-existing staged work cannot be separated without touching ambiguous state, present the smallest safe options and ask which commit the user wants.
23
+
24
+ ## Stage Partial Files Carefully
25
+
26
+ Stage only the intended hunks of a mixed file when their behavior and evidence hold on their own. Stop when:
27
+
28
+ - included and excluded hunks depend on each other;
29
+ - partial staging would leave an invalid intermediate state;
30
+ - checks ran against the combined working tree and excluded changes may have affected the result;
31
+ - the staged version differs materially from what was reviewed or verified.
32
+
33
+ A combined dirty worktree passing does not show that the staged subset is supported.
34
+
35
+ ## Include Generated And Durable Files Deliberately
36
+
37
+ Include generated files, snapshots, lockfiles, formatter output or build artifacts only when repository convention or the agreed outcome requires them. Establish which command produced them, whether their change follows from the source change, whether they can be reviewed, and whether hand edits are prohibited. Do not include generated output merely because it changed, and do not hand-edit it unless the repository expects that.
38
+
39
+ A Spec, Plan, ADR, policy, public documentation file or release artifact has its own authority and maintenance rules. Include it only when its change is covered, belongs to the same commit, describes the same agreed behavior, and its own policy permits the update. Do not edit a durable artifact to make the implementation look coherent; settle contradictions through [Discuss Work](../../discuss-work/SKILL.md).
40
+
41
+ ## Reject Sensitive Or Suspicious Content
42
+
43
+ Besides the trunk's never-stage list, stop before staging databases, dumps, recordings, personal data, unexplained binaries or archives, logs, traces, screenshots or debug output not explicitly required, and files whose inclusion could expose or lose user data. Do not delete or discard suspicious files to tidy up: preserve them and report their exact paths.
44
+
45
+ ## Verify The Candidate
46
+
47
+ After staging, compare `git diff --cached`, `git diff` and `git status --short --branch`. The commit is narrow only when the index holds exactly the intended change, excluded work is untouched, remaining dirty state is understood, checks still support the staged version rather than only the combined worktree, and the report can name everything left behind.
48
+
49
+ ## In-Progress Operations
50
+
51
+ A commit during a merge, rebase, cherry-pick or revert may complete or advance that operation instead of creating an ordinary commit. Establish which operation is active, whether this commit is meant to conclude it, whether every conflict and behavior decision is settled, who should continue it, and what must be verified on the result. Do not finish an operation merely because Git permits `commit`. Unmerged paths always stop an ordinary commit.
52
+
53
+ ## Detached HEAD
54
+
55
+ A detached-`HEAD` commit can be hard to recover or push. Before committing, require an explicit way the commit will stay reachable; when a branch, integration or checkout ownership must be decided, use [branch closeout](branch-closeout.md). Do not silently create or switch branches.
56
+
57
+ ## Amend And Empty Commits
58
+
59
+ Amend only when the user asked for it and the target commit, included changes, authorship effects and remote-history state are known. If the target may already be shared or pushed, ask before rewriting it. An empty commit needs an explicit request with a named purpose; an accidentally empty index is not one.
60
+
61
+ ## Hooks
62
+
63
+ When a hook fails:
64
+
65
+ 1. keep its complete output;
66
+ 2. inspect `HEAD`, the index and the working tree;
67
+ 3. check whether a commit was created despite the failure;
68
+ 4. check whether the hook changed files or staged content;
69
+ 5. send implementation, verification, policy or environment failures to their owner.
70
+
71
+ When a hook changes content, the state being committed is no longer the one that was checked: reinspect the whole diff and rerun the affected checks before retrying. Skip hooks with `--no-verify` only when the user asked for that exact bypass and repository policy permits it, and report which checks were skipped and which claims that leaves unsupported.
72
+
73
+ ## Failed Commit Commands
74
+
75
+ After a failed or interrupted commit, inspect `git status`, `git diff`, `git diff --cached` and `git log -1 --oneline --decorate`; do not assume no commit was created or nothing changed. For identity, signing, credential-helper, editor, lock, filesystem or permission failures, do not change global or repository Git configuration without authority, do not delete lock files while their owner is unclear, do not retry through a materially different command without a supported cause, and report the exact blocker and the preserved state. Use Execute Work's [diagnose](../../execute-work/references/diagnose.md) when the cause stays unclear or a retry repeats the failure.
76
+
77
+ ## Submodules
78
+
79
+ A parent commit records a submodule pointer, not the submodule's uncommitted contents. Inspect the pointer change, whether the nested worktree is dirty, whether this commit should include the pointer update, and whether nested changes have their own way to be preserved. Do not claim nested changes are preserved by committing only the parent.
80
+
81
+ ## Return
82
+
83
+ Go back to the trunk's Commit steps only when the repository has one supported, recoverable candidate. Otherwise preserve the exact Git state and hand over to branch closeout, Execute Work's diagnose, or the activity whose responsibility changed.
@@ -0,0 +1,94 @@
1
+ # Launch
2
+
3
+ This reference is judgment about changing production deliberately and keeping a safe recovery path; its "do not" lines are binding. Deployment changes what runs; rollout changes who or what is exposed. A build, merge, release or staging pass does not prove production behavior.
4
+
5
+ ## Establish The Boundary
6
+
7
+ Carry out only the stages explicitly requested or approved through an inspected launch contract or accepted operational policy. Take deployment, exposure, rollback, destructive migration, the launch window, acceptable degradation, user communication and recovery direction to [Discuss Work](../../discuss-work/SKILL.md) while they remain the user's choice.
8
+
9
+ Publish a versioned artifact first through [release](release.md) when one is needed. Use Execute Work's [migration](../../execute-work/references/migration.md) as well when the launch moves data, traffic, consumers, configuration or compatibility contracts from an old path to a replacement.
10
+
11
+ ## Define The Launch Contract
12
+
13
+ Before changing production, establish:
14
+
15
+ ```text
16
+ Outcome and affected users / systems:
17
+ Artifact / commit / configuration identity:
18
+ Target environment and owner:
19
+ Deployment versus exposure stages:
20
+ Dependencies and migration ordering:
21
+ Expected technical, user, business, and data signals:
22
+ Advance / hold / abort criteria:
23
+ Rollback or forward-recovery path:
24
+ Observation and post-launch verification:
25
+ Communication and escalation:
26
+ Approved stages and scope:
27
+ ```
28
+
29
+ After each stage the next step is one of three, by criteria agreed before it began:
30
+
31
+ - **Advance** when required behavior and signals stay within bounds. The next stage still needs its yes unless the approved launch contract covers it.
32
+ - **Hold** when evidence is incomplete or a difference unexplained. Elapsed time is no reason to advance while a required signal is missing.
33
+ - **Abort** when a safety, data, security, compatibility or agreed service criterion fails: roll back, or recover forward where rollback is unsafe, without widening scope.
34
+
35
+ Take thresholds and observation periods from SLOs, baselines, policy or the owner's decision, never from universal percentages or windows; the owner decides consequential thresholds and acceptable degradation.
36
+
37
+ Feature flags, canaries, blue/green, shadow traffic and phased regions are options, not defaults; choose only what the platform and the accepted failure contract support, and do not adopt "every feature needs a flag" as a rule.
38
+
39
+ ## Establish Readiness
40
+
41
+ Use only the lenses whose risk applies to this change; this is not a universal checklist. A required lens with missing evidence is not green.
42
+
43
+ - **Identity and ownership:** exact artifact, commit, image, configuration, migration and target are known; deployment, rollout, rollback, incident and communication owners are known where risk requires; production credentials come through approved channels, never prompts, logs or source.
44
+ - **Behavior and compatibility:** accepted requirements and critical user paths have fresh evidence; public APIs, clients, schemas, feature states and supported versions stay compatible or have an approved migration; failure, retry, idempotency, duplicate, ordering and recovery behavior are settled for consequential operations.
45
+ - **Data:** the authoritative source and migration ordering are explicit; backups, reconciliation, partial failure, restart, rollback and forward recovery are proved to the required level; privacy, retention, deletion, audit and permission obligations still hold.
46
+ - **Security and access:** threat-relevant changes received the required specialist or policy review; authentication, authorization, secret handling, untrusted input, dependency, network and privilege boundaries are verified where affected; telemetry and support tooling expose no secrets or unnecessary personal data. When a security-focused review is selected, read the [security risk lens](../../review-work/references/work.md#security-risk-lens).
47
+ - **Performance and capacity:** representative baseline and expected load are known where capacity can change; latency, throughput, saturation, queue, storage and dependency limits have evidence. Read [performance evidence](../../verify-work/references/runtime-evidence.md#performance) for readiness and improvement claims, and Execute Work's [diagnose](../../execute-work/references/diagnose.md#flaky-and-performance-failures) only when a regression lacks a supported cause.
48
+ - **Accessibility and user experience:** when interfaces change, verify the affected critical paths with the repository's design and accessibility authority and tooling: keyboard, focus, semantics, assistive technology, responsive, loading, empty, error and degraded states, where relevant.
49
+ - **Observability:** start from what operators must answer: is the new path used, succeeding, within latency and capacity bounds; why is a given request, job or migration failing; are data, queues, retries and dependencies healthy; can one operation be traced across components. Use structured logs for event detail, metrics for aggregate rate, error, duration or saturation, and traces for cross-component paths; keep metric dimensions bounded, and do not log secrets, tokens, full sensitive payloads or unrestricted personal identifiers. Verify telemetry itself by inducing or observing a safe known event and finding its signal, fields and alert routing.
50
+ - **CI/CD and environment:** the pipeline and target run the checks this change needs; artifacts are promoted, not rebuilt differently without approval; environment drift, secrets, migrations and deployment ordering are inspected; a failed or ambiguous pipeline step has a known retry or reconciliation contract. Provider-specific workflow syntax belongs to the repository or platform skill.
51
+
52
+ Confirm the artifact and configuration identity, required pre-production checks, recovery path, operational signals and any selected review before starting an approved stage. Do not deploy to obtain evidence that should exist safely before production. When only production can answer a question, first define an approved bounded learning rollout with its observation, hold, abort and recovery conditions.
53
+
54
+ ## Deploy And Expose In Approved Stages
55
+
56
+ Separate operations when the platform permits: deploy inert code, configuration or infrastructure; verify health and compatibility; expose a bounded cohort, tenant, region or traffic segment; compare required signals with the accepted baseline; then advance, hold or abort.
57
+
58
+ For each stage, define:
59
+
60
+ ```text
61
+ Stage / cohort:
62
+ Action:
63
+ Expected signals:
64
+ Advance if:
65
+ Hold if:
66
+ Abort (roll back or recover forward) if:
67
+ Verification:
68
+ Owner:
69
+ ```
70
+
71
+ Then:
72
+
73
+ 1. confirm artifact, configuration, target and current production state;
74
+ 2. execute the bounded action once;
75
+ 3. verify technical and user-visible behavior;
76
+ 4. inspect telemetry, data integrity and unexpected side effects;
77
+ 5. preserve anomalies and choose the next step before expanding exposure.
78
+
79
+ ## Handle Failure And Recovery
80
+
81
+ Before rolling back, determine whether code, schema, data, messages, caches, clients or external effects make rollback unsafe or incomplete, and test or rehearse the recovery path to the level the risk warrants. Do not repeat migrations, jobs, publishes, configuration changes or exposure operations blindly. Preserve incident evidence. Do not weaken alerts, checks, thresholds or accepted behavior to declare the launch healthy.
82
+
83
+ ## Verify The Production Outcome
84
+
85
+ Observe from the production boundary, as applicable:
86
+
87
+ - the intended artifact and configuration are active;
88
+ - critical user and failure paths behave as accepted;
89
+ - data, compatibility, privacy and permission invariants hold;
90
+ - telemetry is present, queryable, bounded and free of unexpected sensitive data;
91
+ - alerts, escalation and recovery routes work where required;
92
+ - temporary flags, adapters, dual writes, dashboards, elevated logging, permissions or support procedures have owners and cleanup conditions; route compatibility removal through Execute Work's migration.
93
+
94
+ A quiet dashboard is not evidence when telemetry is absent or broken. A launch is complete when the accepted exposure and observation contract is satisfied, not when a deployment command succeeds, and it does not authorize later migration removal, release publication or cleanup outside the approved scope.
@@ -0,0 +1,85 @@
1
+ # Release
2
+
3
+ This reference is judgment about preparing and publishing a versioned artifact whose source, version, contents and destination agree; its "do not" lines are binding. A commit is not a release, a tag does not prove which artifact was built, a local build does not prove registry contents, and a published artifact is not deployed.
4
+
5
+ ## Establish The Stage And Source
6
+
7
+ Carry out only the release stages explicitly requested or approved: preparing, tagging, publishing, deprecating, yanking or replacing are separate. Before editing, read the repository's release policy, versioning scheme, package metadata, changelog convention, release automation, supported branches, signing or provenance requirements, and the latest published versions.
8
+
9
+ Take these to [Discuss Work](../../discuss-work/SKILL.md) when policy and evidence do not settle them:
10
+
11
+ - whether to release, and which channel or audience receives it;
12
+ - compatibility or breaking-change classification;
13
+ - the version;
14
+ - credentials, registry, signing, provenance or remote-tag behavior;
15
+ - yanking, deprecating, replacing or republishing an artifact;
16
+ - release branches, history rewriting, or recovery from partial publication.
17
+
18
+ ## Define The Release Contract
19
+
20
+ Before changing release state, establish:
21
+
22
+ ```text
23
+ Release target and audience:
24
+ Source commit / branch:
25
+ Version and compatibility basis:
26
+ Artifacts and supported platforms:
27
+ Release notes / migration guidance:
28
+ Required checks and selected reviews:
29
+ Signing / provenance / checksums:
30
+ Publication destination and channel:
31
+ Failure and recovery behavior:
32
+ Post-publication verification:
33
+ Approved preparation and publication stages:
34
+ ```
35
+
36
+ Use the repository's declared versioning scheme; do not impose semantic versioning on a project that uses dates, trains, build numbers or another scheme. Classify by what consumers can observe, not by diff size: a small change can be breaking, and a large internal refactor may be compatible. When compatibility is uncertain, inspect the supported consumers and ask rather than choosing the smallest bump.
37
+
38
+ When consumers must move before a contract can be removed, use Execute Work's [migration](../../execute-work/references/migration.md). An additive replacement release may come before the migration; a release that removes a contract waits for the accepted migration and its removal proof.
39
+
40
+ ## Prepare The Release
41
+
42
+ For approved preparation:
43
+
44
+ - confirm the source is a coherent, freshly verified commit and any selected review is resolved;
45
+ - reconcile version declarations, lockfiles, generated metadata and release notes through the repository's tooling, without hand-editing generated artifacts or duplicating version truth that a generator owns;
46
+ - write release notes for consumers, not a commit dump: added or changed behavior, fixed user-visible defects, deprecated and removed contracts, security impact without unsafe disclosure, migration and compatibility requirements, known limitations and unsupported targets;
47
+ - run the canonical build or package process from the intended source;
48
+ - inspect the exact artifacts that would be published;
49
+ - keep credentials and signing material out of prompts, logs, diffs and artifacts.
50
+
51
+ Propose branch, commit, public-documentation or migration work the release needs through Discuss Work unless the approved release scope includes it.
52
+
53
+ ## Preflight The Exact Release
54
+
55
+ Before any irreversible remote action, verify the following. [release-preflight](../scripts/release-preflight.mjs) (`node <deliver-work-directory>/scripts/release-preflight.mjs [--version <x.y.z>]`) checks the local part: the version is valid and not older than the latest tag, its tag does not already exist elsewhere, the changelog has its entries, the tree is clean, and for an npm package what `npm pack --dry-run` would publish; the registry and remote it reports unavailable.
56
+
57
+ - source commit, branch and working-tree expectations;
58
+ - the version is valid, unused and consistent with policy;
59
+ - required tests, builds, package or install checks and compatibility checks;
60
+ - artifact contents: included and excluded files, entry points and permissions, generated code and source maps, dependency and lockfile state, licenses and notices, platform variants, and no debug, test, local configuration, credential or private files; use the package manager's dry-run or list command when available;
61
+ - names, sizes, checksums, signatures and provenance;
62
+ - release notes and migration guidance match the consumer impact;
63
+ - tag, registry, channel and destination identity;
64
+ - credentials and permissions work without exposing secrets.
65
+
66
+ Know the publication failure contract before publishing: which step first creates irreversible remote state, whether a version or tag can be retried safely, how to detect a publish that committed without acknowledgement, whether repair, deprecation, yank or replacement is supported, and who tells consumers. A dry run proves only the boundaries it exercises; name signing, registry, propagation or publication behavior that remains unverified.
67
+
68
+ ## Publish Only The Approved Stage
69
+
70
+ Follow the repository's canonical order, and stop when source, version, tag, artifact, signing mode, channel or destination diverges. Do not publish from a dirty or different source state, or substitute a registry, channel, artifact or signing mode. When publication partly fails, identify which external effects committed before choosing to retry, repair, deprecate, replace or stop.
71
+
72
+ A trustworthy release connects each link: source commit, freshly verified state, version metadata, build invocation and environment, artifact digest, signature or provenance, immutable tag or release record, registry entry, and consumer-side install evidence. Name the links you could not establish instead of implying reproducibility.
73
+
74
+ ## Verify From The Consumer Boundary
75
+
76
+ When publication is in scope, verify the actual public artifact by version or digest, from a clean environment that does not reuse the local checkout or cache:
77
+
78
+ - the tag resolves to the intended commit;
79
+ - version, channel and destinations are correct;
80
+ - checksums, signatures, provenance and contents match the inspected artifact;
81
+ - a clean install, download or launch works on supported targets;
82
+ - release notes and migration links resolve;
83
+ - no unexpected artifact, credential, local configuration or private file was published.
84
+
85
+ Do not call the release complete because the publish command exited successfully; unavailable propagation or consumer evidence leaves that claim unverified. Production deployment is the separate [launch](launch.md) route.
@@ -0,0 +1,139 @@
1
+ #!/usr/bin/env node
2
+ // What a commit would hold, and whose it is, before touching the index: every staged, unstaged and untracked path,
3
+ // marked yours, pre-existing or unknown; staged changes that were already staged before your work (never absorb or
4
+ // unstage them); files with both staged and unstaged changes; sensitive-looking paths and Working Records; and what
5
+ // `git diff --cached --check` finds. Read-only apart from its own snapshot file.
6
+ // Usage: commit-state.mjs snapshot [--root <repository>] [--scratch <dir>]
7
+ // commit-state.mjs [--mine <path>]... [--root <repository>] [--scratch <dir>] [--json]
8
+ // `snapshot`, taken before your first edit, records the dirty and staged state that is not yours. Without one, --mine
9
+ // names the paths you changed; a path neither names is "unknown". --scratch defaults to a folder under the system
10
+ // temporary directory. Exit code 0 when it reports, 2 on a usage error or outside a Git repository.
11
+ import { spawnSync } from "node:child_process";
12
+ import { createHash } from "node:crypto";
13
+ import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
14
+ import { tmpdir } from "node:os";
15
+ import { basename, join, relative, resolve } from "node:path";
16
+ import { parseArgs } from "node:util";
17
+ import { git, repositoryRoot, workingState } from "./lib/git-state.mjs";
18
+
19
+ const USAGE = [
20
+ "Usage: commit-state.mjs snapshot [--root <repository>] [--scratch <dir>]",
21
+ " commit-state.mjs [--mine <path>]... [--root <repository>] [--scratch <dir>] [--json]",
22
+ ].join("\n");
23
+ let parsed;
24
+ try {
25
+ parsed = parseArgs({
26
+ allowPositionals: true,
27
+ options: {
28
+ root: { type: "string" },
29
+ scratch: { type: "string" },
30
+ mine: { type: "string", multiple: true, default: [] },
31
+ json: { type: "boolean", default: false },
32
+ },
33
+ });
34
+ } catch (error) {
35
+ console.error(`${error.message}\n${USAGE}`);
36
+ process.exit(2);
37
+ }
38
+ const { values, positionals } = parsed;
39
+ if (positionals.length > 1 || (positionals.length && positionals[0] !== "snapshot")) {
40
+ console.error(USAGE);
41
+ process.exit(2);
42
+ }
43
+ const root = repositoryRoot(values.root ?? ".");
44
+ if (!root) {
45
+ console.error("not inside a Git repository");
46
+ process.exit(2);
47
+ }
48
+ const scratch = resolve(
49
+ values.scratch ??
50
+ join(
51
+ tmpdir(),
52
+ "freeflow-commit-state",
53
+ `${basename(root)}-${createHash("sha256").update(root).digest("hex").slice(0, 8)}`,
54
+ ),
55
+ );
56
+ const snapshotPath = join(scratch, "commit-state-snapshot.json");
57
+
58
+ // A path's identity in the index and in the working tree, so a later change to either shows.
59
+ const identity = (path) => ({
60
+ index: git(root, ["ls-files", "-s", "--", path])?.split(/\s+/)[1] ?? null,
61
+ tree: existsSync(join(root, path)) ? git(root, ["hash-object", "--", path]) : null,
62
+ });
63
+ const working = workingState(root);
64
+
65
+ if (positionals[0] === "snapshot") {
66
+ mkdirSync(scratch, { recursive: true });
67
+ const paths = Object.fromEntries(working.entries.map((entry) => [entry.path, { ...entry, ...identity(entry.path) }]));
68
+ writeFileSync(
69
+ snapshotPath,
70
+ `${JSON.stringify({ root, head: git(root, ["rev-parse", "HEAD"]), at: new Date().toISOString(), paths }, null, 2)}\n`,
71
+ );
72
+ console.log(`Snapshot of ${working.entries.length} pre-existing changed path(s): ${snapshotPath}`);
73
+ process.exit(0);
74
+ }
75
+
76
+ const snapshot = existsSync(snapshotPath) ? JSON.parse(readFileSync(snapshotPath, "utf8")) : null;
77
+ const mine = new Set(values.mine.map((path) => relative(root, resolve(path)).split("\\").join("/")));
78
+ function owner(entry) {
79
+ if (snapshot) {
80
+ const before = snapshot.paths[entry.path];
81
+ if (!before) return "yours";
82
+ const now = identity(entry.path);
83
+ return now.index === before.index && now.tree === before.tree ? "pre-existing" : "mixed: pre-existing plus yours";
84
+ }
85
+ // A --mine path names a file, or a folder holding it.
86
+ if ([...mine].some((path) => entry.path === path || entry.path.startsWith(`${path}/`))) return "yours";
87
+ return "unknown";
88
+ }
89
+ const SENSITIVE =
90
+ /(^|\/)(\.env(\..*)?|\.npmrc|\.pypirc|id_(rsa|ed25519|ecdsa)(\.pub)?|.*\.(pem|key|p12|pfx|keystore)|credentials?(\.json)?|secrets?(\.[a-z]+)?|.*\.tfstate)$/i;
91
+ const flags = (entry) => [
92
+ ...(/^\.freeflow\/(tasks\/.*)?$/.test(entry.path) ? ["Working Record: never stage"] : []),
93
+ ...(SENSITIVE.test(entry.path) ? ["sensitive-looking: inspect before staging"] : []),
94
+ ];
95
+ const describe = (entry) => ({
96
+ path: entry.path,
97
+ ...(entry.from ? { from: entry.from } : {}),
98
+ index: entry.x,
99
+ tree: entry.y,
100
+ owner: owner(entry),
101
+ partial: entry.x !== " " && entry.x !== "?" && entry.y !== " " && entry.y !== "?",
102
+ flags: flags(entry),
103
+ });
104
+ const staged = working.staged.map(describe);
105
+ const unstaged = working.unstaged.filter((entry) => entry.x === " ").map(describe);
106
+ const untracked = working.untracked.map(describe);
107
+ const conflicted = working.conflicted.map(describe);
108
+ // Conflict markers and whitespace damage in what is staged; Git exits nonzero when it finds any.
109
+ const cached = spawnSync("git", ["diff", "--cached", "--check"], { cwd: root, encoding: "utf8" });
110
+ const check =
111
+ cached.status === 0 ? "clean" : (cached.stdout || cached.stderr).trim().split("\n").slice(0, 20).join("\n");
112
+ const report = {
113
+ command: "commit-state",
114
+ root,
115
+ ownership: snapshot ? `snapshot of ${snapshot.at}` : mine.size ? "--mine paths" : "unknown: no snapshot or --mine",
116
+ staged,
117
+ stagedNotYours: staged.filter((each) => each.owner !== "yours").map((each) => each.path),
118
+ unstaged,
119
+ untracked,
120
+ conflicted,
121
+ cachedCheck: check,
122
+ };
123
+
124
+ if (values.json) console.log(JSON.stringify(report, null, 2));
125
+ else {
126
+ const line = (each) =>
127
+ ` ${each.index}${each.tree} ${each.from ? `${each.from} -> ` : ""}${each.path} [${each.owner}]${each.partial ? " (staged and unstaged changes)" : ""}${each.flags.length ? ` ! ${each.flags.join("; ")}` : ""}`;
128
+ const out = [`Ownership from: ${report.ownership}`];
129
+ out.push(`Staged (${staged.length}):`, ...(staged.length ? staged.map(line) : [" none"]));
130
+ if (report.stagedNotYours.length)
131
+ out.push(
132
+ ` Not yours, or not known to be: ${report.stagedNotYours.join(", ")}. Do not absorb or unstage them; ask which commit the user wants.`,
133
+ );
134
+ out.push(`Unstaged only (${unstaged.length}):`, ...(unstaged.length ? unstaged.map(line) : [" none"]));
135
+ out.push(`Untracked (${untracked.length}):`, ...(untracked.length ? untracked.map(line) : [" none"]));
136
+ if (conflicted.length) out.push(`Conflicted (${conflicted.length}):`, ...conflicted.map(line));
137
+ out.push(`git diff --cached --check: ${check}`);
138
+ console.log(out.join("\n"));
139
+ }
@@ -0,0 +1,107 @@
1
+ #!/usr/bin/env node
2
+ // The delivery state in one read-only call, before any commit, push, merge, cleanup or release: branch or detached
3
+ // HEAD, upstream and ahead/behind from local refs, staged, unstaged, untracked and conflicted counts, a Git operation
4
+ // left in progress, every worktree with the one holding this session's working directory flagged, the latest tag, the
5
+ // declared version and the changelog's Unreleased section. Anything that needs the network is reported unavailable.
6
+ // Usage: delivery-state.mjs [--root <repository>] [--cwd <session directory>] [--json]
7
+ // --cwd defaults to the current directory. Exit code 0 when it reports, 2 outside a Git repository.
8
+ import { parseArgs } from "node:util";
9
+ import {
10
+ branchState,
11
+ changelog,
12
+ inProgress,
13
+ latestTag,
14
+ projectVersion,
15
+ repositoryRoot,
16
+ workingState,
17
+ worktrees,
18
+ } from "./lib/git-state.mjs";
19
+
20
+ const USAGE = "Usage: delivery-state.mjs [--root <repository>] [--cwd <session directory>] [--json]";
21
+ let values;
22
+ try {
23
+ ({ values } = parseArgs({
24
+ options: { root: { type: "string" }, cwd: { type: "string" }, json: { type: "boolean", default: false } },
25
+ }));
26
+ } catch (error) {
27
+ console.error(`${error.message}\n${USAGE}`);
28
+ process.exit(2);
29
+ }
30
+ const cwd = values.cwd ?? process.cwd();
31
+ const root = repositoryRoot(values.root ?? cwd);
32
+ if (!root) {
33
+ console.error("not inside a Git repository");
34
+ process.exit(2);
35
+ }
36
+
37
+ const branch = branchState(root);
38
+ const working = workingState(root);
39
+ const operations = inProgress(root);
40
+ const trees = worktrees(root, cwd);
41
+ const tag = latestTag(root);
42
+ const version = projectVersion(root);
43
+ const notes = changelog(root);
44
+ const state = {
45
+ command: "delivery-state",
46
+ root,
47
+ branch,
48
+ working: {
49
+ staged: working.staged.length,
50
+ unstaged: working.unstaged.length,
51
+ untracked: working.untracked.length,
52
+ conflicted: working.conflicted.length,
53
+ },
54
+ inProgress: operations,
55
+ worktrees: trees,
56
+ latestTag: tag,
57
+ version,
58
+ versionTagged:
59
+ version?.version && tag ? [tag.tag, `v${version.version}`].includes(tag.tag) || tag.tag === version.version : false,
60
+ changelog: notes,
61
+ unavailable: [
62
+ "the remote's current state: ahead/behind uses local remote-tracking refs (fetch to refresh them, when that is covered)",
63
+ "pull requests, CI results, registry versions and deployments",
64
+ ],
65
+ };
66
+
67
+ if (values.json) console.log(JSON.stringify(state, null, 2));
68
+ else {
69
+ const out = [];
70
+ out.push(
71
+ branch.branch
72
+ ? `Branch: ${branch.branch}${branch.upstream ? `, upstream ${branch.upstream} (ahead ${branch.ahead}, behind ${branch.behind}, from local refs)` : ", no upstream"}`
73
+ : branch.detached
74
+ ? `Detached HEAD at ${branch.head.slice(0, 12)}`
75
+ : "No commits yet",
76
+ );
77
+ if (branch.head) out.push(`HEAD: ${branch.head.slice(0, 12)} ${branch.subject}`);
78
+ out.push(
79
+ `Working tree: ${state.working.staged} staged, ${state.working.unstaged} unstaged, ${state.working.untracked} untracked, ${state.working.conflicted} conflicted`,
80
+ );
81
+ out.push(`In progress: ${operations.length ? operations.join(", ") : "no Git operation"}`);
82
+ out.push(`Worktrees (${trees.length}):`);
83
+ for (const tree of trees)
84
+ out.push(
85
+ ` ${tree.path} ${tree.branch ?? (tree.detached ? "(detached)" : "")} ${tree.head ?? ""}${tree.sessionCwd ? " <- this session's cwd is inside" : ""}${tree.locked ? " [locked]" : ""}${tree.prunable ? " [prunable]" : ""}`,
86
+ );
87
+ out.push(
88
+ `Latest tag: ${tag ? `${tag.tag} at ${tag.commit}, ${tag.commitsSince} commit(s) since` : "none"}; version: ${version ? `${version.version ?? "unreadable"} (${version.source})` : "none declared"}`,
89
+ );
90
+ if (notes)
91
+ out.push(
92
+ `Changelog ${notes.file}: ${
93
+ notes.unreleased
94
+ ? `Unreleased has ${notes.unreleased.entries} entr${notes.unreleased.entries === 1 ? "y" : "ies"}${
95
+ Object.keys(notes.unreleased.categories).length
96
+ ? ` (${Object.entries(notes.unreleased.categories)
97
+ .map(([name, count]) => `${name} ${count}`)
98
+ .join(", ")})`
99
+ : ""
100
+ }`
101
+ : "no Unreleased section"
102
+ }`,
103
+ );
104
+ else out.push("Changelog: none found");
105
+ out.push(`Unavailable without the network: ${state.unavailable.join("; ")}.`);
106
+ console.log(out.join("\n"));
107
+ }