rvlib-shipkit 2.13.0 → 2.14.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 (268) hide show
  1. package/CHANGELOG.md +32 -13
  2. package/package.json +1 -1
  3. package/src/assets/run-assets.ts +2 -2
  4. package/src/assets/server/studio-server.ts +27 -23
  5. package/src/check.ts +3 -3
  6. package/src/checks/SK001-package-json-shape.check.ts +4 -4
  7. package/src/checks/SK002-contracts-fulfillness.check.ts +2 -2
  8. package/src/checks/SK003-claude-md-shape.check.ts +19 -12
  9. package/src/checks/SK004-gitignore-policy.check.ts +18 -4
  10. package/src/checks/SK005-rvlib-versions.check.ts +1 -1
  11. package/src/checks/SK006-npm-publish-safety.check.ts +3 -3
  12. package/src/checks/SK007-github-visibility.check.ts +2 -2
  13. package/src/checks/SK008-reviewer-agent.check.ts +1 -1
  14. package/src/checks/SK010-undeclared-unit.check.ts +2 -2
  15. package/src/checks/SK011-sibling-unit-ranges.check.ts +2 -2
  16. package/src/checks/SK012-config-barrel-import.check.ts +1 -1
  17. package/src/checks/SK013-one-way-in-policy.check.ts +2 -2
  18. package/src/checks/SK015-nested-repo.check.ts +2 -2
  19. package/src/checks/SK016-legacy-check-shapes.check.ts +2 -2
  20. package/src/checks/SK017-vscode-hub-task.check.ts +2 -2
  21. package/src/checks/SK018-test-files-run.check.ts +2 -2
  22. package/src/checks/SK019-tests-run-in-units.check.ts +2 -2
  23. package/src/checks/SK020-self-spawning-check.check.ts +2 -2
  24. package/src/checks/SK022-machine-runs-the-pin.check.ts +2 -2
  25. package/src/checks/SK024-identity-colors.check.ts +1 -1
  26. package/src/checks/SK025-release-drift.check.ts +2 -2
  27. package/src/checks/SK026-asks-autoclose.check.ts +2 -2
  28. package/src/checks/SK027-agent-wiki-links.check.ts +8 -2
  29. package/src/checks/SK028-readme.check.ts +2 -2
  30. package/src/checks/SK029-explicit-check-files.check.ts +3 -3
  31. package/src/checks/SK030-cache-audit.check.ts +7 -5
  32. package/src/checks/SK031-trace-audit.check.ts +7 -7
  33. package/src/checks/SK032-ignored-inputs.check.ts +3 -3
  34. package/src/checks/SK033-global-contribution.check.ts +11 -4
  35. package/src/checks/SK034-commit-gates-armed.check.ts +2 -2
  36. package/src/checks/SK035-public-clean.check.ts +4 -4
  37. package/src/checks/SK036-draft-media-size.check.ts +2 -2
  38. package/src/checks/SK037-keyword-additions.check.ts +43 -0
  39. package/src/cli/cmd_Backup.ts +2 -2
  40. package/src/cli/cmd_Commands.ts +4 -4
  41. package/src/cli/cmd_ConfigKeys.ts +2 -2
  42. package/src/cli/cmd_Drill.ts +1 -1
  43. package/src/cli/cmd_Home.ts +1 -1
  44. package/src/cli/cmd_Init.ts +1 -1
  45. package/src/cli/cmd_Media.ts +4 -4
  46. package/src/cli/cmd_Mv.ts +14 -7
  47. package/src/cli/cmd_Review.ts +2 -2
  48. package/src/cli/cmd_Smoke.ts +1 -1
  49. package/src/cli/cmd_Social.ts +3 -3
  50. package/src/cli/cmd_Sound.ts +1 -1
  51. package/src/cli/cmd_TraceAudit.ts +6 -6
  52. package/src/cli/cmd_Trailer.ts +2 -2
  53. package/src/cli/cmd_Veille.ts +2 -2
  54. package/src/cli/cmd_When.ts +2 -2
  55. package/src/cli/family-pages.ts +19 -19
  56. package/src/collections/collection-types.ts +2 -2
  57. package/src/collections/review.ts +1 -1
  58. package/src/comfy/comfy-panel.ts +2 -2
  59. package/src/contracts/manifests/discord.contract.ts +1 -1
  60. package/src/contracts/manifests/identity.contract.ts +1 -1
  61. package/src/contracts/manifests/itch.contract.ts +1 -1
  62. package/src/contracts/manifests/steam.contract.ts +1 -1
  63. package/src/core/agent-dir-at.ts +12 -0
  64. package/src/core/agent-dir.ts +16 -0
  65. package/src/core/budget.ts +1 -1
  66. package/src/core/canonical-scripts.ts +2 -2
  67. package/src/core/discover-checks.ts +1 -1
  68. package/src/core/global-contribution.ts +4 -1
  69. package/src/core/ignored-block.ts +1 -1
  70. package/src/core/ignored-inputs.ts +3 -2
  71. package/src/core/layout.ts +3 -3
  72. package/src/core/loop-watch.ts +1 -1
  73. package/src/core/motherhome.ts +2 -2
  74. package/src/core/one-way-in-policy.ts +8 -8
  75. package/src/core/run-ci.ts +3 -3
  76. package/src/core/runs-matrix.ts +1 -1
  77. package/src/core/slots.ts +14 -5
  78. package/src/core/trace-audit.ts +50 -9
  79. package/src/core/tree-rev.ts +1 -1
  80. package/src/drill/run.ts +1 -1
  81. package/src/home/daemon-jobs.ts +1 -1
  82. package/src/home/global-context.ts +11 -8
  83. package/src/home/gui-app/ShipkitGui.swift +91 -2
  84. package/src/home/inbox-shape.ts +1 -1
  85. package/src/home/inbox.ts +1 -1
  86. package/src/home/pm-config.ts +4 -1
  87. package/src/home/pm-inputs.ts +2 -0
  88. package/src/home/resources.ts +7 -2
  89. package/src/home/run-pm.ts +1 -1
  90. package/src/home/serve-web.ts +2 -2
  91. package/src/hooks/commit-message.ts +1 -1
  92. package/src/hooks/hook-gates.ts +1 -1
  93. package/src/hooks/leak-guard.ts +61 -8
  94. package/src/hooks/run-hooks.ts +18 -18
  95. package/src/identities/identities.ts +1 -1
  96. package/src/identities/machine-route.ts +1 -1
  97. package/src/identities/machine.ts +1 -1
  98. package/src/init-repo.ts +2 -2
  99. package/src/ledger/gate-checks.ts +1 -1
  100. package/src/ledger/record-kept.ts +1 -1
  101. package/src/media-kinds.ts +1 -1
  102. package/src/media-store/backup/daemon.ts +1 -1
  103. package/src/media-store/backup/keys.ts +1 -1
  104. package/src/media-store/backup/manifest.ts +1 -1
  105. package/src/media-store/backup/restore.ts +1 -1
  106. package/src/media-store/backup/run.ts +1 -1
  107. package/src/media-store/backup/secret.ts +1 -1
  108. package/src/media-store/backup/snapshot.ts +1 -1
  109. package/src/media-store/backup/sources.ts +1 -1
  110. package/src/media-store/content.ts +1 -1
  111. package/src/media-store/daemon.ts +1 -1
  112. package/src/media-store/db.ts +1 -1
  113. package/src/media-store/fact.ts +1 -1
  114. package/src/media-store/hand.ts +1 -1
  115. package/src/media-store/kind.ts +1 -1
  116. package/src/media-store/purge.ts +1 -1
  117. package/src/media-store/put.ts +1 -1
  118. package/src/media-store/remote.ts +1 -1
  119. package/src/media-store/space.ts +1 -1
  120. package/src/mv/mv-md.ts +63 -22
  121. package/src/pages/forward.ts +1 -1
  122. package/src/pages/frame-client.ts +1 -1
  123. package/src/pages/routes.ts +1 -1
  124. package/src/pages/unit.ts +1 -1
  125. package/src/plan/planner.ts +1 -1
  126. package/src/plan/repo-source.ts +1 -1
  127. package/src/release/public-clean.ts +25 -7
  128. package/src/release/run-bump.ts +1 -1
  129. package/src/release/run-release.ts +3 -3
  130. package/src/repo-config.ts +23 -16
  131. package/src/review/anim.ts +1 -1
  132. package/src/review/auto.ts +1 -1
  133. package/src/review/cells.ts +15 -1
  134. package/src/review/format.ts +2 -2
  135. package/src/review/marks.ts +1 -1
  136. package/src/review/media-kind.ts +1 -1
  137. package/src/review/media-read.ts +1 -1
  138. package/src/review/model.ts +14 -4
  139. package/src/review/notes.ts +52 -4
  140. package/src/review/previews.ts +1 -1
  141. package/src/review/project.ts +1 -1
  142. package/src/review/role.ts +1 -1
  143. package/src/review/routes.ts +14 -2
  144. package/src/review/store.ts +2 -2
  145. package/src/review/threads.ts +1 -1
  146. package/src/review/trailer-desk.ts +3 -3
  147. package/src/review/trailer-media.ts +1 -1
  148. package/src/review/trailer-model.ts +1 -1
  149. package/src/review/trailer-routes.ts +1 -1
  150. package/src/review/trailer-shots.ts +1 -1
  151. package/src/review/unit.ts +1 -1
  152. package/src/scaffold/files/tsconfig.json +1 -1
  153. package/src/scaffold/project-scaffold.ts +1 -1
  154. package/src/serve/embed.ts +1 -1
  155. package/src/serve/hub-app/check-words.ts +1 -1
  156. package/src/serve/hub-app/frames-st.ts +1 -1
  157. package/src/serve/hub-app/hash-route.ts +1 -1
  158. package/src/serve/hub-app/home-st.ts +1 -1
  159. package/src/serve/hub-app/home-strip.css +1 -1
  160. package/src/serve/hub-app/hub-app.tsx +2 -2
  161. package/src/serve/hub-app/identities-st.ts +1 -1
  162. package/src/serve/hub-app/identities-view.tsx +5 -4
  163. package/src/serve/hub-app/identity-address.ts +1 -1
  164. package/src/serve/hub-app/inbox-st.ts +1 -1
  165. package/src/serve/hub-app/inbox-view.tsx +1 -1
  166. package/src/serve/hub-app/kept-cols.tsx +30 -0
  167. package/src/serve/hub-app/keys.ts +1 -1
  168. package/src/serve/hub-app/media-svc.ts +1 -1
  169. package/src/serve/hub-app/pages-frames.tsx +1 -1
  170. package/src/serve/hub-app/pages-svc.ts +1 -1
  171. package/src/serve/hub-app/projects-svc.ts +1 -1
  172. package/src/serve/hub-app/repo-st.ts +1 -1
  173. package/src/serve/hub-app/review/review-board.tsx +1 -1
  174. package/src/serve/hub-app/review/review-cells.tsx +3 -2
  175. package/src/serve/hub-app/review/review-page.tsx +5 -4
  176. package/src/serve/hub-app/review/review-st.ts +15 -7
  177. package/src/serve/hub-app/review/review-thread.tsx +52 -5
  178. package/src/serve/hub-app/review/review-views.tsx +50 -33
  179. package/src/serve/hub-app/review/thread-st.ts +79 -27
  180. package/src/serve/hub-app/review/trailer-page.tsx +5 -4
  181. package/src/serve/hub-app/review/trailer-st.ts +1 -1
  182. package/src/serve/hub-app/review.css +9 -1
  183. package/src/serve/hub-app/site/site-part.tsx +1 -1
  184. package/src/serve/hub-app/site/site-st.ts +1 -1
  185. package/src/serve/hub-app/social/calendar.tsx +1 -1
  186. package/src/serve/hub-app/social/comms-page.tsx +29 -5
  187. package/src/serve/hub-app/social/kit.tsx +1 -1
  188. package/src/serve/hub-app/social/post-card.tsx +1 -1
  189. package/src/serve/hub-app/social/social-model.ts +1 -1
  190. package/src/serve/hub-app/social/social-page.tsx +12 -5
  191. package/src/serve/hub-app/social/social-st.ts +31 -3
  192. package/src/serve/hub-app/social.css +1 -1
  193. package/src/serve/hub-app/stores/stores-page.tsx +5 -4
  194. package/src/serve/hub-app/stores/stores-st.ts +1 -1
  195. package/src/serve/hub-app/stores.css +1 -1
  196. package/src/serve/hub-app/tree-row.tsx +1 -1
  197. package/src/serve/hub-app/veille/veille-page.tsx +5 -4
  198. package/src/serve/hub-app/veille/veille-st.ts +1 -1
  199. package/src/serve/hub-app/veille.css +1 -1
  200. package/src/serve/hub-runtime.ts +6 -2
  201. package/src/serve/project-gutter-route.ts +1 -1
  202. package/src/shot/box.ts +5 -7
  203. package/src/shot/browser-slot.ts +18 -6
  204. package/src/shot/client.ts +1 -2
  205. package/src/shot/clip-encoder.ts +16 -13
  206. package/src/shot/film-box.ts +132 -28
  207. package/src/shot/shooter.ts +21 -2
  208. package/src/shot/stepped-clip.ts +1 -1
  209. package/src/site/desk.ts +2 -2
  210. package/src/site/routes.ts +1 -1
  211. package/src/site/unit.ts +1 -1
  212. package/src/social/card-drafts.ts +24 -0
  213. package/src/social/compose.ts +2 -2
  214. package/src/social/desk-index.ts +1 -1
  215. package/src/social/desk-wire.ts +1 -1
  216. package/src/social/drafts.ts +3 -3
  217. package/src/social/load.ts +14 -1
  218. package/src/social/media-facts.ts +1 -1
  219. package/src/social/media-kind.ts +1 -1
  220. package/src/social/media-limit.ts +1 -1
  221. package/src/social/media-of.ts +1 -1
  222. package/src/social/migrate.ts +1 -1
  223. package/src/social/post-url.ts +1 -1
  224. package/src/social/presence.ts +2 -2
  225. package/src/social/public-read.ts +1 -1
  226. package/src/social/publish/bluesky.ts +1 -1
  227. package/src/social/publish/discord.ts +1 -1
  228. package/src/social/push.ts +10 -4
  229. package/src/social/richtext.ts +1 -1
  230. package/src/social/routes.ts +10 -4
  231. package/src/social/stats.ts +1 -1
  232. package/src/social/text.ts +1 -1
  233. package/src/social/tracker-route.ts +1 -1
  234. package/src/social/tracker.ts +1 -1
  235. package/src/social/unit.ts +1 -1
  236. package/src/social/writes.ts +1 -1
  237. package/src/stores/collection.ts +1 -1
  238. package/src/stores/desk.ts +1 -1
  239. package/src/stores/model.ts +1 -1
  240. package/src/stores/routes.ts +1 -1
  241. package/src/stores/unit.ts +1 -1
  242. package/src/suite/judge-suites.ts +1 -1
  243. package/src/trace/tracer.ts +12 -5
  244. package/src/trailer/adapter.ts +1 -1
  245. package/src/trailer/build.ts +6 -4
  246. package/src/trailer/holes.ts +1 -1
  247. package/src/trailer/passage.ts +1 -1
  248. package/src/trailer/prune.ts +1 -1
  249. package/src/trailer/states.ts +1 -1
  250. package/src/trailer/versions.ts +1 -1
  251. package/src/trailer/words.ts +1 -1
  252. package/src/tui/run-tui.ts +1 -1
  253. package/src/tui/tui-store.ts +1 -1
  254. package/src/veille/asks.ts +1 -1
  255. package/src/veille/auto.ts +1 -1
  256. package/src/veille/batch.ts +1 -1
  257. package/src/veille/chrome.ts +1 -1
  258. package/src/veille/collection.ts +1 -1
  259. package/src/veille/desk.ts +1 -1
  260. package/src/veille/identity.ts +1 -1
  261. package/src/veille/import.ts +1 -1
  262. package/src/veille/log.ts +1 -1
  263. package/src/veille/platforms.ts +1 -1
  264. package/src/veille/reads.ts +1 -1
  265. package/src/veille/replied.ts +1 -1
  266. package/src/veille/routes.ts +2 -2
  267. package/src/veille/watch.ts +1 -1
  268. package/src/veille/worth.ts +2 -2
@@ -21,7 +21,7 @@ import { nestedIn, nestedRefusal } from '../core/nesting.ts'
21
21
  import { declaredTestUnits, testCheckId } from '../suite/test-units.ts'
22
22
 
23
23
  // adding a FOURTH knob here is the signal that this shape wants rethinking
24
- // rather than another key (meta/gaps.md, release-path config keys accreting)
24
+ // rather than another key (meta/gaps/index.md, release-path config keys accreting)
25
25
  export type ReleaseConfig = {
26
26
  /** releases ship from this branch only (default 'main') */
27
27
  branch?: string
@@ -33,7 +33,7 @@ export type ReleaseConfig = {
33
33
  * package.json is not private refuses to release until this says true or
34
34
  * false. A private package NEVER publishes, whatever this says. True makes
35
35
  * the root package.json a public contract. What each check does with it:
36
- * wiki/build/shipkit/built-in-checks.md */
36
+ * wiki/tools/shipkit/built-in-checks.md */
37
37
  npm?: boolean
38
38
  /** argv printing an npm auth token on stdout, as in a secret-manager read.
39
39
  * Absent = rely on ambient npm auth. Never put a token in config.
@@ -55,7 +55,7 @@ export type ReleaseConfig = {
55
55
  tsconfig?: string
56
56
  /** check ids the release gate skips: a repo-wide task (a full matrix
57
57
  * build) that is about the REPO rather than the release. Which unit test
58
- * checks a release runs is not this key's: → build/shipkit/units.md */
58
+ * checks a release runs is not this key's: → tools/shipkit/units.md */
59
59
  skipTasks?: string[]
60
60
  /** `shipkit bump` run from a feature branch merges it into the release
61
61
  * branch first, with a merge commit. Default true. A branch is a GATE, so
@@ -41,7 +41,7 @@ export type ServeConfig = {
41
41
  port?: number
42
42
  /** the comfy-ts panel the comfy section embeds runs as its own process on
43
43
  * its own port — house range 5800+, default = the hub port plus 1000
44
- * (build/comfyui.md owns that surface) */
44
+ * (tools/comfyui/index.md owns that surface) */
45
45
  comfyPort?: number
46
46
  /** false hides the asset kit from the hub page (no asset rows, an empty
47
47
  * studio) and from `shipkit needs`, for a repo whose own tool mounts
@@ -106,9 +106,9 @@ export type RepoConfig = {
106
106
  social?: string[]
107
107
  /** the identity that speaks for this repo in public, an id of the house repo's `.shipkit/identities/` (`sk
108
108
  * identities`); unset, the one marked `default: true` speaks. A draft may name another (wiki
109
- * build/shipkit/social.md) */
109
+ * tools/shipkit/social.md) */
110
110
  speaksAs?: string
111
- /** machine-only state of this repo the backup keeps beyond its own rule (wiki build/shipkit/media-store.md,
111
+ /** machine-only state of this repo the backup keeps beyond its own rule (wiki tools/shipkit/media-store.md,
112
112
  * Backup, What a repo adds). Paths are repo relative; what git tracks never goes; a secret is refused as always */
113
113
  backup?: RepoBackup
114
114
  /** prefix for contract fix: pointers (docs checkout or URL) — written by init, never baked in */
@@ -182,12 +182,13 @@ export type RepoConfig = {
182
182
  /** repo-contributed .gitignore lines, rendered INSIDE rule SK004's managed
183
183
  * block — for ecosystem-specific names the published lib may not carry */
184
184
  gitignore?: string[]
185
- /** gitignored paths a task READS, by task id (`'*'` for every task),
186
- * repo-relative: a path joins that task's key by content (generated
187
- * types, a local fixture), and `dir/**` by the names under the dir (an
188
- * output folder a suite lists). A task keyed on the whole work tree sees
189
- * no gitignored file, and a declared list names none either, so both
190
- * carry these. The traced audit (SK031) finds the missing ones and the
185
+ /** paths a task READS outside its key, by task id (`'*'` for every
186
+ * task), repo-relative: a path joins that task's key by content
187
+ * (generated types, a local fixture, a doc a unit's test reads outside
188
+ * its dir), and `dir/**` by the names under the dir (an output folder a
189
+ * suite lists). A task keyed on the whole work tree sees no gitignored
190
+ * file, and a declared list (a unit's `test:<unit>`) sees nothing outside
191
+ * it, so both carry these. The traced audit (SK031) finds the missing ones and the
191
192
  * fix pass writes them into their own managed block; an entry written
192
193
  * outside it stops that repair */
193
194
  ignoredInputs?: Record<string, string[]>
@@ -203,7 +204,7 @@ export type RepoConfig = {
203
204
  nested?: boolean
204
205
  /** THE CHECKS THIS REPO TURNS OFF, check id → why, for a whole check it
205
206
  * does not own (one false finding is waived at its site instead): where
206
- * a check runs is its own declaration (build/shipkit/runs.md), and an
207
+ * a check runs is its own declaration (tools/shipkit/runs.md), and an
207
208
  * off check runs in no context. `defineRepo` throws on a blank reason and on a rule id no
208
209
  * check carries. The hub writes this map through the managed block in
209
210
  * this file (core/when-block.ts). */
@@ -233,7 +234,7 @@ export type RepoConfig = {
233
234
  archived?: boolean
234
235
  /** declared github visibility INTENT (absent = 'private'): public means
235
236
  * strangers read the tracked tree. What each check does with it:
236
- * wiki/build/shipkit/built-in-checks.md */
237
+ * wiki/tools/shipkit/built-in-checks.md */
237
238
  visibility?: 'private' | 'public'
238
239
  /** the reviewer agent type this repo declares: `.claude/agents/<name>.md`,
239
240
  * whose system prompt points at `brief` (an md file holding the standing
@@ -249,7 +250,7 @@ export type RepoConfig = {
249
250
  /** widens the read-only tool allowlist SK008 enforces (default Read, Grep, Glob, Bash) */
250
251
  tools?: string[]
251
252
  }
252
- /** ONE WAY IN escape hatch (build/shipkit/one-way-in.md): governed script names this
253
+ /** ONE WAY IN escape hatch (tools/shipkit/one-way-in.md): governed script names this
253
254
  * repo keeps as a direct tool call. Declared per NAME, never as a list of
254
255
  * banned binaries: the invariant is about which VERBS an agent reaches
255
256
  * for, and a binary blocklist goes stale the day a repo changes runner.
@@ -324,9 +325,15 @@ export type RepoConfig = {
324
325
  browsers?: {
325
326
  /** how many at once, a whole number of 1 or more. Default 2 */
326
327
  max?: number
327
- /** the ssh host whose browser films for this repo, like 'wm': on a Mac no browser of the repo starts, every
328
- * browserSlot there refuses but the box route's own */
329
- box?: string
328
+ /** the box that films for this repo from a Mac, like { host: 'wm', max: 5 }: there every browser start goes to
329
+ * that ssh host's warm browser (shot/box.ts), at most `max` at once (default 2, a pool apart from `max`), and
330
+ * browserSlot refuses any other start. SK_FILM_HERE=1 films on the Mac for one run, under `max` */
331
+ box?: {
332
+ /** the ssh host, as ~/.ssh/config names it */
333
+ host: string
334
+ /** how many at once there, a whole number of 1 or more. Default 2 */
335
+ max?: number
336
+ }
330
337
  }
331
338
  /** the suite budget for a plain `bun test` floor: per suite time limit, the
332
339
  * slow suites the quick tier leaves out, and the suites that cannot run in
@@ -455,7 +462,7 @@ export function defineRepo(c: RepoConfig): RepoConfig {
455
462
  const w = parseWhen(raw)
456
463
  if (typeof w === 'string') throw new Error(`defineRepo: when.${id} ${w}`)
457
464
  if (w.at !== 'off')
458
- throw new Error(`defineRepo: when.${id} '${raw}' no longer places a check: every check declares where it runs (build/shipkit/runs.md). A repo can only turn one off: off: { ${id}: '<why>' }`)
465
+ throw new Error(`defineRepo: when.${id} '${raw}' no longer places a check: every check declares where it runs (tools/shipkit/runs.md). A repo can only turn one off: off: { ${id}: '<why>' }`)
459
466
  }
460
467
  // a budget turns a slow pass yellow, so a value it cannot compare with dies here
461
468
  for (const [id, v] of Object.entries(c.budgets ?? {})) {
@@ -1,4 +1,4 @@
1
- // a card's before and after as a looping animation to send (wiki build/shipkit/review.md, Verbs on the store): the one
1
+ // a card's before and after as a looping animation to send (wiki tools/shipkit/review.md, Verbs on the store): the one
2
2
  // function behind the hub's « animation » and `sk review anim`. One cycle is drawn by ffmpeg's own filters (no per pixel
3
3
  // expression: a card renders in a few seconds), an mp4 then repeats it with no second encode
4
4
  import { createCanvas, GlobalFonts } from '@napi-rs/canvas'
@@ -1,4 +1,4 @@
1
- // auto rules (wiki build/shipkit/review.md, A project's parts): a rule of the repo's review unit answers on a clock, and
1
+ // auto rules (wiki tools/shipkit/review.md, A project's parts): a rule of the repo's review unit answers on a clock, and
2
2
  // its answer is raised as an item to a lane, open from the start. One open item a rule and key. The hub's daemon runs
3
3
  // them (startAuto), `sk review auto` reads their logs and runs one now
4
4
  import { mkdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs'
@@ -1,4 +1,4 @@
1
- // a thread read as one conversation (wiki build/shipkit/review.md, The thread): every version of a card, every verdict,
1
+ // a thread read as one conversation (wiki tools/shipkit/review.md, The thread): every version of a card, every verdict,
2
2
  // reply, note and state change is one cell, in time order, built at read time from the store's files (a supersedes chain
3
3
  // folds into one thread, nothing is rewritten). The paged list's rows and its query. Pure and browser safe: the routes
4
4
  // send these shapes, the hub page draws them
@@ -10,6 +10,7 @@ import {
10
10
  moveOf,
11
11
  partyOf,
12
12
  reworkOf,
13
+ isPostSubject,
13
14
  stateOf,
14
15
  STATUS_LABEL,
15
16
  thumbFileOf,
@@ -138,6 +139,10 @@ export interface ThreadView {
138
139
  /** the media files a view names that the store no longer holds, `<item id>/<name>`: the page says so in place of a
139
140
  * broken player (the routes fill it, the model never reads the disk) */
140
141
  missing: string[]
142
+ /** the posts he asked from this card (« 📣 post »), oldest first, each with where it stands */
143
+ posts: { id: string; state: ItemState }[]
144
+ /** the social drafts naming this card in their `review:`, oldest first (the routes fill it, the model never reads the disk) */
145
+ drafts: { slug: string; title: string }[]
141
146
  cells: Cell[]
142
147
  }
143
148
 
@@ -300,6 +305,13 @@ export function threadOfId(id: string, threads: readonly Thread[]): Thread | nul
300
305
  return holding.sort((a, b) => b.head.item.created.localeCompare(a.head.item.created))[0] ?? null
301
306
  }
302
307
 
308
+ /** the post requests naming one of these items as their card */
309
+ const postsOf = (ids: ReadonlySet<string>, items: readonly ReviewItem[], followed: ReadonlySet<string>): ThreadView['posts'] =>
310
+ items
311
+ .filter((x) => isPostSubject(x.item.subject) && ids.has(x.item.subject.card))
312
+ .sort((a, b) => a.item.created.localeCompare(b.item.created))
313
+ .map((x) => ({ id: x.item.id, state: stateOf(x, followed.has(x.item.id)) }))
314
+
303
315
  /** one thread for the per card api; `asked` the id the caller named (an old version opens at its cell) */
304
316
  export function threadView(t: Thread, items: readonly ReviewItem[], threads: readonly Thread[], asked: string, now = new Date()): ThreadView {
305
317
  const h = t.head
@@ -330,6 +342,8 @@ export function threadView(t: Thread, items: readonly ReviewItem[], threads: rea
330
342
  .filter((x) => unreadBy(x, 'owner').length > 0)
331
343
  .map((x) => x.item.id),
332
344
  missing: [],
345
+ posts: postsOf(new Set(idsOf(t)), items, followed),
346
+ drafts: [],
333
347
  cells: cellsOf(t, items),
334
348
  }
335
349
  }
@@ -1,4 +1,4 @@
1
- // what `sk review inbox`, `show`, `watch`, `next` and `board` print of an item and its answer (wiki build/shipkit/review.md):
1
+ // what `sk review inbox`, `show`, `watch`, `next` and `board` print of an item and its answer (wiki tools/shipkit/review.md):
2
2
  // one record per thread, rectangles normalized and in pixels, a frame note's cut, shot and time into it, and the lines the
3
3
  // repo's unit adds (a kind's facts, a source's), handed in as `more` so this module stays pure
4
4
  import { aboutText, isFrame, isGallery, isPair, NO_SPEC, placeText, stateOf, unreadBy, verdictOf, type Message, type Rect, type ReviewItem, type Spec, type Subject } from './model.ts'
@@ -130,7 +130,7 @@ export function detail(x: ReviewItem, dir: string, full = false, followed = fals
130
130
  `${r.id} ${st.state.toUpperCase()}${st.why ? ` (${st.why})` : ''} raised by ${raisedBy(r.origin)} ${r.created}${r.commit ? ` at ${r.commit}` : ''}`,
131
131
  head,
132
132
  ...sub,
133
- ...(r.origin.by === 'auto' && r.what ? r.what.split('\n').map((l) => ` ${l}`) : []),
133
+ ...(r.what ? r.what.split('\n').map((l) => ` ${l}`) : []),
134
134
  ...(st.topic ? [` topic ${st.topic}${st.worker ? `, claimed by ${st.worker}` : ''}${r.origin.by === 'owner' && r.origin.kind ? `, ${r.origin.kind}` : ''}`] : []),
135
135
  ...words.map((m) => ` ${m.who} ${m.at}${m.op ? ` ${m.op}${m.topic ? ` ${m.topic}` : ''}` : ''}: ${m.text ?? m.note ?? ''}${m.fix ? ` (${m.fix.commit})` : ''}`),
136
136
  ...(pins ? drawnText(pins) : []),
@@ -1,4 +1,4 @@
1
- // the owner's marks kept in the store (wiki build/shipkit/review.md, Verbs on the store): a mark is a `rate` message of his
1
+ // the owner's marks kept in the store (wiki tools/shipkit/review.md, Verbs on the store): a mark is a `rate` message of his
2
2
  // on a subject (stars, a mark word, a part's stars, a note); the latest is the mark, the older ones its history. Pure
3
3
  import { partyOf, subjectKey, type Message, type ReviewItem, type Spec } from './model.ts'
4
4
 
@@ -1,4 +1,4 @@
1
- // the review store as a kind of the media store (wiki build/shipkit/review.md, Media in the Space): each file a card's
1
+ // the review store as a kind of the media store (wiki tools/shipkit/review.md, Media in the Space): each file a card's
2
2
  // views name, by the facts its item.json keeps; kept on the disk while its thread is active or spoke in the window; an
3
3
  // image's previews sent up before it goes
4
4
  import { existsSync, statSync } from 'node:fs'
@@ -1,4 +1,4 @@
1
- // the reads a route or a tool makes of a card's file (wiki build/shipkit/review.md, Media in the Space): its key in the
1
+ // the reads a route or a tool makes of a card's file (wiki tools/shipkit/review.md, Media in the Space): its key in the
2
2
  // Space by the facts its item.json keeps, a URL signed for a file the disk let go, the file fetched back for its bytes
3
3
  import { existsSync, readFileSync } from 'node:fs'
4
4
  import { join } from 'node:path'
@@ -1,4 +1,4 @@
1
- // the one feedback store's model (wiki build/shipkit/review.md): every record the owner, a player or an agent raises
1
+ // the one feedback store's model (wiki tools/shipkit/review.md): every record the owner, a player or an agent raises
2
2
  // is an ITEM, a head (`item.json`: a typed subject, who raised it, the views) and an append only thread of messages
3
3
  // (verdicts, replies, ratings, state changes, read marks). The state is derived from the thread, never stored, so the
4
4
  // hub and every CLI write at once with no lost update. Pure and browser safe: the store, the routes and the hub page
@@ -28,7 +28,7 @@ export interface FrameSubject extends Subject {
28
28
 
29
29
  export const isFrame = (s: Subject): s is FrameSubject => s.kind === 'frame'
30
30
 
31
- /** a thing of a store page (wiki build/shipkit/stores.md): a picture by its repo path, or a field as `field:<heading>` */
31
+ /** a thing of a store page (wiki tools/shipkit/stores.md): a picture by its repo path, or a field as `field:<heading>` */
32
32
  export interface StoreSubject extends Subject {
33
33
  kind: 'store'
34
34
  store: string
@@ -37,6 +37,14 @@ export interface StoreSubject extends Subject {
37
37
 
38
38
  export const isStoreSubject = (s: Subject): s is StoreSubject => s.kind === 'store' && typeof s.store === 'string' && typeof s.asset === 'string'
39
39
 
40
+ /** a public post he asked for from a card: `card` the card's first version, so every later version asks the same */
41
+ export interface PostSubject extends Subject {
42
+ kind: 'post'
43
+ card: string
44
+ }
45
+
46
+ export const isPostSubject = (s: Subject): s is PostSubject => s.kind === 'post' && typeof s.card === 'string' && s.card !== ''
47
+
40
48
  /** what a repo's `review({...})` unit says of one subject kind that the pure model reads (review/unit.ts holds the rest):
41
49
  * its words, and on the server its key, its near rule and its problems. The hub gets the words alone */
42
50
  export interface SpecKind {
@@ -66,7 +74,7 @@ export interface Spec {
66
74
  }
67
75
 
68
76
  /** the kinds every repo has, whatever its unit declares */
69
- export const BUILTIN_KINDS: Record<string, SpecKind> = { shot: { label: 'images' }, screen: { label: 'screens' }, frame: { label: 'trailer frames' }, store: { label: 'store pages', icon: '🏪' } }
77
+ export const BUILTIN_KINDS: Record<string, SpecKind> = { shot: { label: 'images' }, screen: { label: 'screens' }, frame: { label: 'trailer frames' }, store: { label: 'store pages', icon: '🏪' }, post: { label: 'post requests', icon: '📣' } }
70
78
 
71
79
  export const NO_SPEC: Spec = { kinds: {}, topics: {}, dispatcher: false }
72
80
 
@@ -90,6 +98,7 @@ export function subjectKey(s: Subject, spec: Spec = NO_SPEC): string | null {
90
98
  if (isFrame(s)) return `frame:${s.trailer}/${s.cut}/${s.shot}`
91
99
  const kind = spec.kinds[s.kind]
92
100
  if (!kind && isStoreSubject(s)) return `store:${s.store}/${s.asset}`
101
+ if (!kind && isPostSubject(s)) return `post:${s.card}`
93
102
  if (kind) {
94
103
  const k = kind.key?.(s)
95
104
  return k ? `${s.kind}:${k}` : null
@@ -446,7 +455,7 @@ export const STATUS_LABEL: Record<ShownStatus, string> = {
446
455
  rated: 'rated',
447
456
  }
448
457
 
449
- /** the lifecycle (wiki build/shipkit/review.md, The lifecycle) */
458
+ /** the lifecycle (wiki tools/shipkit/review.md, The lifecycle) */
450
459
  export type State = 'draft' | 'new' | 'question' | 'open' | 'claimed' | 'blocked' | 'asks' | 'closed'
451
460
  type ClosedWhy = ReviewStatus | 'fixed' | 'wontfix' | 'dropped' | 'superseded' | 'withdrawn' | 'rated'
452
461
 
@@ -723,6 +732,7 @@ function subjectProblems(s: unknown, spec: Spec): string[] {
723
732
  if (!kind && !BUILTIN_KINDS[s.kind] && declared.length > 0) return [`subject: kind « ${s.kind} » is none of ${[...declared, ...Object.keys(BUILTIN_KINDS)].join(', ')}`]
724
733
  if (kind?.problems) return kind.problems(s as Subject).map((p) => `subject: ${p}`)
725
734
  if (s.kind === 'store' && !kind) return isStoreSubject(s as Subject) && s.store !== '' && s.asset !== '' ? [] : ['subject: a store thing has its store and asset']
735
+ if (s.kind === 'post' && !kind) return isPostSubject(s as Subject) ? [] : ['subject: a post request names its card']
726
736
  if (s.kind !== 'frame') return []
727
737
  const str = (k: string): boolean => typeof s[k] === 'string' && s[k] !== ''
728
738
  const num = (k: string): boolean => typeof s[k] === 'number' && Number.isFinite(s[k])
@@ -1,9 +1,10 @@
1
1
  // his notes on one thing a desk shows (a store page's picture or field, a draft): the first an item of the one store,
2
2
  // its subject the thing, so the review page and `sk review inbox` hold it; the next ones, while that thread is open,
3
- // his replies on it, never a second item. The one path for a note on a thing (wiki build/shipkit/stores.md)
4
- import { stateOf, subjectKey, type Origin, type ReviewItem, type Subject } from './model.ts'
3
+ // his replies on it, never a second item. The one path for a note on a thing (wiki tools/shipkit/stores.md)
4
+ import { threadOfId } from './cells.ts'
5
+ import { isPostSubject, stateOf, subjectKey, type Origin, type PostSubject, type ReviewItem, type Subject } from './model.ts'
5
6
  import { addMessage, raiseItem, readAll, specOf } from './store.ts'
6
- import { membersOf, threadsOf, type Thread } from './threads.ts'
7
+ import { followedIds, membersOf, threadsOf, type Thread } from './threads.ts'
7
8
 
8
9
  /** one note as a desk shows it: the owner's words, where it stands, the agent's last word once answered */
9
10
  export type SubjectNote = { id: string; at: string; text: string; state: string; answer?: string }
@@ -49,7 +50,7 @@ export function notesBy(dir: string, items: readonly ReviewItem[]): (subject: Su
49
50
  /** his note on the thing: a reply on its thread still open, else a new item titled `<name> : <first line>` */
50
51
  export async function noteOn(
51
52
  dir: string,
52
- o: { subject: Subject; origin: Extract<Origin, { by: 'owner' }>; name: string; text: string; topic?: string; image?: string },
53
+ o: { subject: Subject; origin: Extract<Origin, { by: 'owner' }>; name: string; text: string; topic?: string; image?: string; what?: string },
53
54
  ): Promise<{ id: string }> {
54
55
  const key = keyIn(dir)
55
56
  const k = key(o.subject)
@@ -72,6 +73,53 @@ export async function noteOn(
72
73
  title: head.length > 80 ? `${head.slice(0, 79).trimEnd()}…` : head,
73
74
  text,
74
75
  ...(o.image ? { image: o.image } : {}),
76
+ ...(o.what ? { what: o.what } : {}),
75
77
  })
76
78
  return { id: x.item.id }
77
79
  }
80
+
81
+ /** a post the owner asked from a card and no draft answers yet: what Communications lists on top of its drafts */
82
+ export type AskedPost = { id: string; at: string; card: string; title: string; text: string; state: string }
83
+
84
+ /** every post request not closed, oldest first: the card's title as it is now, the owner's words joined */
85
+ export function askedPosts(items: readonly ReviewItem[]): AskedPost[] {
86
+ const threads = threadsOf(items)
87
+ const followed = followedIds(items)
88
+ return items
89
+ .filter((x) => isPostSubject(x.item.subject))
90
+ .map((x) => ({ x, st: stateOf(x, followed.has(x.item.id)) }))
91
+ .filter(({ st }) => st.state !== 'closed')
92
+ .sort((a, b) => a.x.item.created.localeCompare(b.x.item.created))
93
+ .map(({ x, st }) => {
94
+ const card = (x.item.subject as PostSubject).card
95
+ const t = threadOfId(card, threads)
96
+ const words = x.thread.filter((m) => m.who === 'owner' && m.op === undefined && m.verdict === undefined && m.text !== undefined).map((m) => m.text as string)
97
+ return { id: x.item.id, at: x.item.created, card: t?.head.item.id ?? card, title: t?.head.item.title ?? card, text: words.join('\n'), state: st.state }
98
+ })
99
+ }
100
+
101
+ /** « 📣 post » on a card: a request for its own public post, keyed on the card's first version so every version asks
102
+ * the same one; `topic` the social unit's notes topic, left out where the store's topics lack it */
103
+ export async function askPost(dir: string, o: { card: string; text?: string; topic?: string }): Promise<{ id: string }> {
104
+ const t = threadOfId(o.card, threadsOf(readAll(dir).items))
105
+ if (!t) throw new Error(`post: no card ${o.card}`)
106
+ const head = t.head.item
107
+ if (isPostSubject(head.subject)) throw new Error('post: this card is itself a post request')
108
+ const first = t.versions.at(-1)?.item.id ?? head.id
109
+ const spec = specOf(dir)
110
+ const topic = o.topic !== undefined && (Object.keys(spec.topics).length === 0 || spec.topics[o.topic]) ? o.topic : undefined
111
+ const subject: PostSubject = { kind: 'post', card: first }
112
+ return noteOn(dir, {
113
+ subject,
114
+ origin: { by: 'owner', from: 'review' },
115
+ name: `post « ${head.title} »`,
116
+ text: o.text?.trim() || 'this card deserves its own post',
117
+ ...(topic ? { topic } : {}),
118
+ what: [
119
+ `A public post from the card « ${head.title} » (${head.id}).`,
120
+ `- read the card: \`sk review show ${head.id}\`; its views are the post's media`,
121
+ `- write the draft: \`.shipkit/social/drafts/<YYYYMMDD-HHMMSS>-<topic>/draft.md\`, \`review: ${head.id}\` in its front matter, the media in its \`media/\` (wiki tools/shipkit/social.md)`,
122
+ '- close this request: `sk review fixed <this id> --note "draft <slug>"`',
123
+ ].join('\n'),
124
+ })
125
+ }
@@ -1,4 +1,4 @@
1
- // a view's image at the size the page draws it (wiki build/shipkit/review.md, Previews): a webp made once per media
1
+ // a view's image at the size the page draws it (wiki tools/shipkit/review.md, Previews): a webp made once per media
2
2
  // file, kept in the repo's cache (`.shipkit/cache/review-previews/<id>/<name>.<size>.webp`, local, never in the store),
3
3
  // made again only when its source is newer. The full file is fetched only on zoom
4
4
  import { existsSync, mkdirSync, readdirSync, readFileSync, renameSync, rmSync, statSync } from 'node:fs'
@@ -1,4 +1,4 @@
1
- // a repo's review unit at work (wiki build/shipkit/review.md, A project's parts): its file found by a walk cached on the
1
+ // a repo's review unit at work (wiki tools/shipkit/review.md, A project's parts): its file found by a walk cached on the
2
2
  // walked dirs' times and its text, imported, its spec bound to the store; its sources pulled, its kinds' facts and data
3
3
  // view computed on the server, so the hub never bundles project code
4
4
  import { existsSync } from 'node:fs'
@@ -1,4 +1,4 @@
1
- // the dispatcher role (wiki build/shipkit/review.md, Raised items): one session routes what the owner, the players and
1
+ // the dispatcher role (wiki tools/shipkit/review.md, Raised items): one session routes what the owner, the players and
2
2
  // the rules raise. Its file sits beside the store, out of the store's watch
3
3
  import { mkdirSync, readFileSync, renameSync, writeFileSync } from 'node:fs'
4
4
  import { join } from 'node:path'
@@ -1,4 +1,4 @@
1
- // the hub's review routes (wiki build/shipkit/review.md, The hub): the store's list, an item's images and clips, the
1
+ // the hub's review routes (wiki tools/shipkit/review.md, The hub): the store's list, an item's images and clips, the
2
2
  // owner's verdicts, replies and read marks appended to its thread. The trailer view's routes: trailer-routes.ts. Paths are
3
3
  // relative to the repo hub's base. null: not a path of these
4
4
  import { existsSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs'
@@ -8,6 +8,7 @@ import { isAnimFormat, isAnimLabels, isAnimMode, pairAnimation } from './anim.ts
8
8
  import { startAuto } from './auto.ts'
9
9
  import { bad, KEEP, NO_STORE, ranged, tagged, TYPES } from './http.ts'
10
10
  import { viewFilesOf, type Rect, type ReviewItem, type Subject } from './model.ts'
11
+ import { askPost } from './notes.ts'
11
12
  import { pasteHosts } from './paste.ts'
12
13
  import { openReview, partFile, viewOfItem } from './project.ts'
13
14
  import { isPreviewSize, previewOrRemote, warmPreviews } from './previews.ts'
@@ -21,6 +22,8 @@ import { trailerRoutes } from './trailer-routes.ts'
21
22
  import { specData, type ReviewUnit } from './unit.ts'
22
23
  import { liveWatchers } from './watchers.ts'
23
24
  import { autoRulesOf } from '../veille/auto.ts'
25
+ import { loadSocialUnit } from '../social/unit.ts'
26
+ import { draftsOfCard } from '../social/card-drafts.ts'
24
27
 
25
28
  // ── each repo's review unit, read again at most every 5 s; its auto rules scheduled in this server while it serves ──
26
29
 
@@ -142,7 +145,10 @@ async function reviewRoute(req: Request, path: string, dir: string, unit: Review
142
145
  }
143
146
  const t = threadOfId(id, x.threads)
144
147
  if (!t) return bad(`no item ${ref}`, 404)
145
- return tagged(req, x.tag, () => ({ ...threadView(t, readAllCached(dir).items, x.threads, id), missing: missingOf(dir, membersOf(t)) }))
148
+ return tagged(req, x.tag, () => {
149
+ const members = membersOf(t)
150
+ return { ...threadView(t, readAllCached(dir).items, x.threads, id), missing: missingOf(dir, members), drafts: draftsOfCard(dirname(dirname(dir)), new Set(members.map((m) => m.item.id))) }
151
+ })
146
152
  }
147
153
  if (path === '/api/review/board' && req.method === 'GET') {
148
154
  const x = indexOf(dir)
@@ -224,6 +230,12 @@ async function reviewRoute(req: Request, path: string, dir: string, unit: Review
224
230
  const r = writeVerdict(dir, id, await req.json())
225
231
  return r.ok ? Response.json(r.message, { headers: NO_STORE }) : Response.json({ error: r.errors.join('\n'), errors: r.errors }, { status: 400, headers: NO_STORE })
226
232
  }
233
+ if (name === 'post') {
234
+ const b = (await req.json().catch(() => ({}))) as { text?: unknown }
235
+ const social = await loadSocialUnit(dirname(dirname(dir)))
236
+ const text = typeof b.text === 'string' ? b.text : undefined
237
+ return Response.json(await askPost(dir, { card: id, topic: social?.notes ?? 'social', ...(text ? { text } : {}) }), { headers: NO_STORE })
238
+ }
227
239
  if (name === 'reply') return Response.json(addMessage(dir, id, 'owner', ((await req.json()) as { text?: unknown }).text), { headers: NO_STORE })
228
240
  if (name === 'read') {
229
241
  // the page names the words it drew: a word that came after them stays unread
@@ -1,4 +1,4 @@
1
- // the one feedback store on disk (wiki build/shipkit/review.md): `.shipkit/review/<id>/`, gitignored: `item.json`, the
1
+ // the one feedback store on disk (wiki tools/shipkit/review.md): `.shipkit/review/<id>/`, gitignored: `item.json`, the
2
2
  // media, and `thread/`, one file per message, never rewritten. An item is built in a dot folder and renamed, every file
3
3
  // written beside its place and renamed, so no reader sees half of one. The format is a project's own store's, verbatim. A folder of
4
4
  // the old shape (request.json, feedback.json, a message with `seen`) fails loud
@@ -606,7 +606,7 @@ function readRaws(dir: string): ReadAll {
606
606
  }
607
607
 
608
608
  /** the same read, the loop given back every READ_STEP items: a cold store of thousands of items is seconds of parsing
609
- * (wiki build/shipkit/home.md, Nothing heavy on the daemon's loop) */
609
+ * (wiki tools/shipkit/home.md, Nothing heavy on the daemon's loop) */
610
610
  async function readRawsAsync(dir: string): Promise<ReadAll> {
611
611
  const steps = readRawsSteps(dir)
612
612
  for (;;) {
@@ -1,4 +1,4 @@
1
- // the threads of the store (wiki build/shipkit/review.md): a card's versions, each superseding the last, and the raised
1
+ // the threads of the store (wiki tools/shipkit/review.md): a card's versions, each superseding the last, and the raised
2
2
  // items (a report, his note) the card answers, read as one thread per bug; their status, conversation and order, and
3
3
  // the active thread a new card already covers. Pure, over the items of review/model.ts
4
4
  import {
@@ -1,4 +1,4 @@
1
- // the trailer view's cuts, renders and timelines (wiki build/trailer.md, Frame notes), and the still a note on a frame
1
+ // the trailer view's cuts, renders and timelines (wiki tools/trailer/index.md, Frame notes), and the still a note on a frame
2
2
  // is raised with: the note itself is an item of the one store, its subject the frame, anchored on its shot's name, so it
3
3
  // survives a new render of the cut. A cut is a `trailer/<id>/<cut>.trailer` and its render `out/<name>.mp4` (`<name>`
4
4
  // its `trailer` line), or a render with no file beside it. The trailer core (src/trailer/) is read, never changed
@@ -83,7 +83,7 @@ const versionFile = (dir: string, v: string, end: string): string | null => {
83
83
  return f ? join(d, f) : null
84
84
  }
85
85
 
86
- /** a trailer's kept versions (wiki build/trailer.md, Versions): each `versions/<v>.trailer`, its render in its folder
86
+ /** a trailer's kept versions (wiki tools/trailer/index.md, Versions): each `versions/<v>.trailer`, its render in its folder
87
87
  * when the machine still holds it */
88
88
  function versionsOf(dir: string): CutFiles[] {
89
89
  const vd = join(dir, 'versions')
@@ -147,7 +147,7 @@ const SETTLE_MS = 2500
147
147
  const settled = (mtime: number, now: number): boolean => now - mtime > SETTLE_MS
148
148
 
149
149
  /** where each finished render is recorded as the page plays it: its json, and an APFS clone of its video and strip
150
- * (free, untouched by the next render) until the media store holds them (wiki build/trailer.md, Frame notes) */
150
+ * (free, untouched by the next render) until the media store holds them (wiki tools/trailer/index.md, Frame notes) */
151
151
  export const viewDir = (root: string): string => join(root, LAYOUT.cache, 'trailer-view')
152
152
 
153
153
  /** a render's files by their content, filled by the media store's scan (src/review/trailer-media.ts) */
@@ -1,4 +1,4 @@
1
- // the trailer renders as a kind of the media store (wiki build/trailer.md, Renders in the media store): each settled
1
+ // the trailer renders as a kind of the media store (wiki tools/trailer/index.md, Renders in the media store): each settled
2
2
  // render's clone in the view folder and a kept version's own files, by the facts its view record keeps, and the shots
3
3
  // folders (trailer-shots.ts). Kept on the
4
4
  // disk: the newest render of each live cut, the render an open frame note was written on, and any render seen in the
@@ -1,4 +1,4 @@
1
- // the trailer view's shapes (wiki build/trailer.md, Frame notes): what the hub answers about a repo's cuts, and a frame
1
+ // the trailer view's shapes (wiki tools/trailer/index.md, Frame notes): what the hub answers about a repo's cuts, and a frame
2
2
  // note as the view shows it, read from its item of the one store. Pure: the routes and the page share them
3
3
  import { isFrame, isReply, partyOf, stateOf, type ReviewItem } from './model.ts'
4
4
 
@@ -1,4 +1,4 @@
1
- // the hub's trailer routes (wiki build/trailer.md, Frame notes): a repo's cuts with their timelines and notes, a kept
1
+ // the hub's trailer routes (wiki tools/trailer/index.md, Frame notes): a repo's cuts with their timelines and notes, a kept
2
2
  // render with byte ranges, and the owner's frame notes, each an item of the one review store. Paths are relative to the
3
3
  // repo hub's base. null: not a path of these
4
4
  import { existsSync, mkdtempSync, rmSync } from 'node:fs'
@@ -1,4 +1,4 @@
1
- // the shots folders of the trailer kind (wiki build/trailer.md, Renders in the media store): each build's shelf
1
+ // the shots folders of the trailer kind (wiki tools/trailer/index.md, Renders in the media store): each build's shelf
2
2
  // `out/<cut>-shots/` and each kept version's `versions/<v>/shots/`. Their facts sit in the folder's own `.media.json`,
3
3
  // which a build's new shelf drops with the old files. The shelf of each trailer's newest build stays on the disk. A
4
4
  // trailer's `voice/` folder is its source clips (paid, never rebuilt): up the same way, never purged
@@ -1,4 +1,4 @@
1
- // a repo's parts of the one store (wiki build/shipkit/review.md, A project's parts): its subject kinds, topics, sources,
1
+ // a repo's parts of the one store (wiki tools/shipkit/review.md, A project's parts): its subject kinds, topics, sources,
2
2
  // auto rules and the dispatcher switch, declared once in a `review({...})` unit of any `<name>.shipkit.ts`. Every unit
3
3
  // file imports this module, so it stays light: the store reads the pure part through specOf(dir), project.ts finds,
4
4
  // imports and serves the rest
@@ -29,7 +29,7 @@
29
29
  // every file is a module even with no import/export (standalone scripts)
30
30
  "moduleDetection": "force",
31
31
 
32
- // the house TS standard is all five, always on (meta/rv-conventions):
32
+ // the house TS standard is all five, always on (patterns/rv-conventions):
33
33
  // strict alone leaves dead locals and fallthrough bugs in the codebase
34
34
  "strict": true,
35
35
  "noUncheckedIndexedAccess": true,
@@ -249,7 +249,7 @@ export function adoptCli(root: string, opts: { name: string; print?: (line: stri
249
249
  const pkg = readPackage(root)
250
250
  if (pkg == null) { p(`FAIL: no readable package.json in ${root} — the project CLI needs one`); return null }
251
251
  const found = existingCli(pkg, cliFiles(root))
252
- if (found != null) { p(`skip: ${opts.name} already has a CLI (${found}) — extend it; a project CLI beside a product's bin is wired by hand (build/cli-tool.md)`); return null }
252
+ if (found != null) { p(`skip: ${opts.name} already has a CLI (${found}) — extend it; a project CLI beside a product's bin is wired by hand (guides/cli-tool/index.md)`); return null }
253
253
  const lib = installedLib(root)
254
254
  if (kitInstalled(lib) === false) { p(`skip: the installed rvlib-shipkit ${lib?.version ?? ''} predates the CLI kit — bun add -d rvlib-shipkit@latest once a release carries it, then re-run`); return null }
255
255
  const written: string[] = []
@@ -1,4 +1,4 @@
1
- // a repo's review or trailer page alone, for another tool to frame (wiki build/shipkit/review.md, The review page):
1
+ // a repo's review or trailer page alone, for another tool to frame (wiki tools/shipkit/review.md, The review page):
2
2
  // `<base>/embed/?page=review` serves the same app bundled with RELATIVE asset paths, so the page and every request it
3
3
  // makes work under any prefix a proxy puts in front of the hub (a project's admin frames it under its own origin). The
4
4
  // bundle is made once a process, in memory
@@ -106,7 +106,7 @@ export function repoPath(p: string, root: string): ShortPath {
106
106
  }
107
107
 
108
108
  /** a docs page: repo relative when it is in the repo, else relative to the
109
- * wiki it belongs to (`meta/rv-conventions/package-json.md`) */
109
+ * wiki it belongs to (`patterns/rv-conventions/package-json.md`) */
110
110
  export function docPath(p: string, root: string): ShortPath {
111
111
  const outside = p.startsWith('/') || p.startsWith('~/')
112
112
  const r = root.replace(/\/+$/, '')
@@ -1,4 +1,4 @@
1
- // the repo pages' frames kept alive (wiki build/shipkit/project-pages.md, Kept frames): the last few opened, across
1
+ // the repo pages' frames kept alive (wiki tools/shipkit/project-pages.md, Kept frames): the last few opened, across
2
2
  // repos, newest first. A switch back to one is a show, never a load; one past the cap unloads the oldest, and of the
3
3
  // hidden ones one 3D page at most: its scene holds gigabytes while hidden. A node of the home (home-st.ts)
4
4
  import { makeAutoObservable } from 'mobx'
@@ -49,7 +49,7 @@ export type HashSel =
49
49
  | { t: 'comms'; draft: string | null; part?: string | null; q?: string }
50
50
  /** Social: an identity, null for the repo's; its company (`@legal`) or an account, null for its card; a place */
51
51
  | { t: 'social'; identity: string | null; account?: string | null; place?: string | null }
52
- /** a repo's own page (wiki build/shipkit/project-pages.md): the repo, the page, the page's own keys as a query */
52
+ /** a repo's own page (wiki tools/shipkit/project-pages.md): the repo, the page, the page's own keys as a query */
53
53
  | { t: 'page'; repo: string; id: string; q?: string }
54
54
 
55
55
  /** whose a gate check is */
@@ -1,4 +1,4 @@
1
- // HomeSt: THE root of the page (build/app-state-tree), exposed as window.app.
1
+ // HomeSt: THE root of the page (patterns/app-state-tree), exposed as window.app.
2
2
  // One tree for every page the home serves, '/', '/planned', '/activity' and
3
3
  // '/r/<repo>/': the machine, the project list, the plan, the activity, and one RepoSt per repo visited, built on
4
4
  // the first visit and kept for the life of the page (same name, same
@@ -159,7 +159,7 @@
159
159
  .pdetail>.cstitle{margin:var(--s3) 0 var(--s1)}
160
160
  .pdetail>.cstitle:first-child{margin-top:0}
161
161
  .pdetail .hlog{margin-top:0}
162
- /* the identities after the places (wiki build/shipkit/social.md, Identities): one round avatar each, its initial on
162
+ /* the identities after the places (wiki tools/shipkit/social.md, Identities): one round avatar each, its initial on
163
163
  its colour without one, ringed in its colour while its view shows */
164
164
  .hids{flex:none;display:inline-flex;align-items:center;gap:var(--s1);margin-right:var(--s2);padding-right:var(--s2);border-right:1px solid var(--line)}
165
165
  .hid{display:grid;place-items:center;flex:none;width:32px;height:32px;padding:0;border:0;border-radius:50%;background:none;--idr:transparent}