@automovie/template 0.3.3 → 0.4.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 (303) hide show
  1. package/README.md +8 -22
  2. package/generated/pnpm-workspace.json +5 -5
  3. package/generated/skills/3d-modeling/conditioning.md +3 -1
  4. package/generated/skills/3d-modeling/crafting/construction.md +29 -1
  5. package/generated/skills/3d-modeling/environments.md +47 -0
  6. package/generated/skills/3d-modeling/inspection.md +7 -4
  7. package/generated/skills/contracts/development/common.md +4 -6
  8. package/generated/skills/contracts/development/design.md +7 -17
  9. package/generated/skills/contracts/development/implementation.md +8 -36
  10. package/generated/skills/development/repair.md +2 -0
  11. package/generated/skills/documentation/SKILL.md +5 -5
  12. package/generated/skills/documentation/writing.md +2 -2
  13. package/generated/skills/motion/laws/authoring.md +2 -2
  14. package/generated/skills/motion/laws/contacts.md +6 -2
  15. package/generated/skills/motion/laws/transitions.md +14 -4
  16. package/generated/skills/motion/laws/variation.md +2 -2
  17. package/generated/skills/motion/laws/verification.md +7 -5
  18. package/generated/skills/multi-agent/continuing.md +5 -0
  19. package/generated/skills/prompting/SKILL.md +8 -22
  20. package/generated/skills/visual-debugging/capture.md +1 -1
  21. package/generated/skills/visual-debugging/correction-rounds.md +4 -0
  22. package/lib/IAutoMovieScaffoldProps.d.ts +12 -12
  23. package/lib/assertScaffoldProjectName.d.ts +8 -10
  24. package/lib/assertScaffoldProjectName.js +8 -10
  25. package/lib/assertScaffoldProjectName.js.map +1 -1
  26. package/lib/createAutoMovieScaffold.d.ts +24 -14
  27. package/lib/createAutoMovieScaffold.js +43 -18
  28. package/lib/createAutoMovieScaffold.js.map +1 -1
  29. package/lib/listAutoMovieScaffoldFiles.d.ts +8 -10
  30. package/lib/listAutoMovieScaffoldFiles.js +16 -12
  31. package/lib/listAutoMovieScaffoldFiles.js.map +1 -1
  32. package/lib/renderAutoMovieWorkspace.d.ts +8 -12
  33. package/lib/renderAutoMovieWorkspace.js +16 -14
  34. package/lib/renderAutoMovieWorkspace.js.map +1 -1
  35. package/lib/scaffoldSharedSkillPath.d.ts +13 -12
  36. package/lib/scaffoldSharedSkillPath.js +13 -12
  37. package/lib/scaffoldSharedSkillPath.js.map +1 -1
  38. package/package.json +6 -6
  39. package/scaffold/instructions/.agents/skills/3d-modeling/SKILL.md +2 -0
  40. package/scaffold/instructions/.agents/skills/3d-modeling/coarse-forms.md +3 -1
  41. package/scaffold/instructions/.agents/skills/3d-modeling/materials.md +11 -0
  42. package/scaffold/instructions/.agents/skills/audio/SKILL.md +1 -1
  43. package/scaffold/instructions/.agents/skills/audio/acquisition.md +5 -1
  44. package/scaffold/instructions/.agents/skills/audio/film-sound.md +5 -1
  45. package/scaffold/instructions/.agents/skills/audio/listening.md +2 -0
  46. package/scaffold/instructions/.agents/skills/audio/soundtrack.md +14 -0
  47. package/scaffold/instructions/.agents/skills/contracts/SKILL.md +1 -1
  48. package/scaffold/instructions/.agents/skills/contracts/development/SKILL.md +5 -5
  49. package/scaffold/instructions/.agents/skills/contracts/development/behaviors.md +14 -6
  50. package/scaffold/instructions/.agents/skills/contracts/development/catalog.md +21 -0
  51. package/scaffold/instructions/.agents/skills/contracts/development/composition.md +44 -18
  52. package/scaffold/instructions/.agents/skills/contracts/development/entities.md +24 -8
  53. package/scaffold/instructions/.agents/skills/contracts/development/films.md +39 -0
  54. package/scaffold/instructions/.agents/skills/contracts/development/testing.md +21 -0
  55. package/scaffold/instructions/.agents/skills/contracts/items.md +7 -12
  56. package/scaffold/instructions/.agents/skills/contracts/story/SKILL.md +18 -22
  57. package/scaffold/instructions/.agents/skills/contracts/story/discovery/brief.md +11 -0
  58. package/scaffold/instructions/.agents/skills/contracts/story/discovery/common.md +27 -0
  59. package/scaffold/instructions/.agents/skills/contracts/story/{shared/discovery → discovery}/narratives.md +2 -2
  60. package/scaffold/instructions/.agents/skills/contracts/story/{shared/discovery → discovery}/screenplay.md +2 -2
  61. package/scaffold/instructions/.agents/skills/contracts/story/discovery/scripts.md +9 -0
  62. package/scaffold/instructions/.agents/skills/contracts/story/discovery/settings.md +13 -0
  63. package/scaffold/instructions/.agents/skills/contracts/story/{shared/discovery → discovery}/treatments.md +2 -2
  64. package/scaffold/instructions/.agents/skills/contracts/story/obligations/brief.md +11 -0
  65. package/scaffold/instructions/.agents/skills/contracts/story/obligations/common.md +26 -0
  66. package/scaffold/instructions/.agents/skills/contracts/story/obligations/index.md +11 -0
  67. package/scaffold/instructions/.agents/skills/contracts/story/obligations/narratives.md +25 -0
  68. package/scaffold/instructions/.agents/skills/contracts/story/obligations/review.md +21 -0
  69. package/scaffold/instructions/.agents/skills/contracts/story/obligations/screenplay.md +39 -0
  70. package/scaffold/instructions/.agents/skills/contracts/story/obligations/scripts.md +17 -0
  71. package/scaffold/instructions/.agents/skills/contracts/story/obligations/settings.md +31 -0
  72. package/scaffold/instructions/.agents/skills/contracts/story/obligations/treatments.md +19 -0
  73. package/scaffold/instructions/.agents/skills/contracts/story/principles/brief.md +11 -0
  74. package/scaffold/instructions/.agents/skills/contracts/story/{shared/principles → principles}/common.md +2 -2
  75. package/scaffold/instructions/.agents/skills/contracts/story/principles/index.md +11 -0
  76. package/scaffold/instructions/.agents/skills/contracts/story/principles/narratives.md +25 -0
  77. package/scaffold/instructions/.agents/skills/contracts/story/principles/research.md +21 -0
  78. package/scaffold/instructions/.agents/skills/contracts/story/principles/review.md +21 -0
  79. package/scaffold/instructions/.agents/skills/contracts/story/principles/screenplay.md +89 -0
  80. package/scaffold/instructions/.agents/skills/contracts/story/principles/scripts.md +9 -0
  81. package/scaffold/instructions/.agents/skills/contracts/story/principles/settings.md +13 -0
  82. package/scaffold/instructions/.agents/skills/contracts/story/principles/treatments.md +19 -0
  83. package/scaffold/instructions/.agents/skills/contracts/story/upstream/screenplay.md +11 -0
  84. package/scaffold/instructions/.agents/skills/contracts/story/upstream/scripts.md +9 -0
  85. package/scaffold/instructions/.agents/skills/contracts/story/{shared/upstream → upstream}/treatments.md +2 -2
  86. package/scaffold/instructions/.agents/skills/development/SKILL.md +2 -4
  87. package/scaffold/instructions/.agents/skills/development/entities.md +14 -2
  88. package/scaffold/instructions/.agents/skills/development/modules.md +16 -6
  89. package/scaffold/instructions/.agents/skills/development/source-layout.md +6 -6
  90. package/scaffold/instructions/.agents/skills/development/testing.md +2 -2
  91. package/scaffold/instructions/.agents/skills/evidence/adoption.md +2 -2
  92. package/scaffold/instructions/.agents/skills/evidence/answering.md +7 -1
  93. package/scaffold/instructions/.agents/skills/evidence/configuration.md +4 -4
  94. package/scaffold/instructions/.agents/skills/image/canon-references.md +5 -3
  95. package/scaffold/instructions/.agents/skills/image/diffusion/editing.md +2 -0
  96. package/scaffold/instructions/.agents/skills/motion/SKILL.md +5 -5
  97. package/scaffold/instructions/.agents/skills/motion/catalog-cases.md +10 -16
  98. package/scaffold/instructions/.agents/skills/motion/compose/composition.md +42 -19
  99. package/scaffold/instructions/.agents/skills/motion/compose/refusals.md +2 -2
  100. package/scaffold/instructions/.agents/skills/motion/control-channels.md +8 -4
  101. package/scaffold/instructions/.agents/skills/motion/diffusion/SKILL.md +2 -2
  102. package/scaffold/instructions/.agents/skills/motion/frame-evaluation.md +2 -0
  103. package/scaffold/instructions/.agents/skills/motion/judgment.md +16 -12
  104. package/scaffold/instructions/.agents/skills/motion/laws/SKILL.md +2 -3
  105. package/scaffold/instructions/.agents/skills/motion/laws/method-references.md +4 -2
  106. package/scaffold/instructions/.agents/skills/motion/performance.md +4 -4
  107. package/scaffold/instructions/.agents/skills/motion/physical-feedback.md +6 -4
  108. package/scaffold/instructions/.agents/skills/motion/retargeting.md +1 -1
  109. package/scaffold/instructions/.agents/skills/motion/segment-review.md +3 -9
  110. package/scaffold/instructions/.agents/skills/motion/staging.md +16 -10
  111. package/scaffold/instructions/.agents/skills/multi-agent/$continuing.md +0 -0
  112. package/scaffold/instructions/.agents/skills/multi-agent/SKILL.md +8 -0
  113. package/scaffold/instructions/.agents/skills/production/SKILL.md +1 -2
  114. package/scaffold/instructions/.agents/skills/production/assembly.md +14 -21
  115. package/scaffold/instructions/.agents/skills/production/captions.md +2 -0
  116. package/scaffold/instructions/.agents/skills/production/director.md +11 -5
  117. package/scaffold/instructions/.agents/skills/production/media-records.md +18 -1
  118. package/scaffold/instructions/.agents/skills/production/project-context.md +10 -12
  119. package/scaffold/instructions/.agents/skills/production/sustained-runs.md +3 -3
  120. package/scaffold/instructions/.agents/skills/production/workflow.md +2 -2
  121. package/scaffold/instructions/.agents/skills/review/delivery-review.md +27 -46
  122. package/scaffold/instructions/.agents/skills/review/estimation.md +1 -1
  123. package/scaffold/instructions/.agents/skills/review/independent-reading.md +4 -4
  124. package/scaffold/instructions/.agents/skills/review/narrative-rounds.md +4 -8
  125. package/scaffold/instructions/.agents/skills/review/source-review.md +6 -4
  126. package/scaffold/instructions/.agents/skills/story/answers.md +5 -5
  127. package/scaffold/instructions/.agents/skills/story/correction/inspection.md +6 -6
  128. package/scaffold/instructions/.agents/skills/story/correction/repair.md +8 -6
  129. package/scaffold/instructions/.agents/skills/story/document-layout.md +12 -5
  130. package/scaffold/instructions/.agents/skills/story/layers/SKILL.md +2 -2
  131. package/scaffold/instructions/.agents/skills/story/layers/brief.md +4 -4
  132. package/scaffold/instructions/.agents/skills/story/layers/notation.md +8 -4
  133. package/scaffold/instructions/.agents/skills/story/layers/screenplay.md +6 -20
  134. package/scaffold/instructions/.agents/skills/story/layers/scripts.md +3 -7
  135. package/scaffold/instructions/.agents/skills/story/layers/settings.md +2 -2
  136. package/scaffold/instructions/.agents/skills/story/layers/shots.md +6 -10
  137. package/scaffold/instructions/.agents/skills/story/layers/treatments.md +4 -2
  138. package/scaffold/instructions/.agents/skills/story/planning/direction.md +2 -0
  139. package/scaffold/instructions/.agents/skills/story/planning/discovery.md +2 -2
  140. package/scaffold/instructions/.agents/skills/story/planning/research.md +7 -15
  141. package/scaffold/instructions/.agents/skills/story/workflow/routes.md +2 -2
  142. package/scaffold/instructions/.agents/skills/story/workflow/short.md +4 -8
  143. package/scaffold/instructions/.agents/skills/video/SKILL.md +1 -1
  144. package/scaffold/instructions/.agents/skills/video/diffusion/continuity.md +2 -0
  145. package/scaffold/instructions/.agents/skills/video/diffusion/hints.md +1 -1
  146. package/scaffold/instructions/.agents/skills/video/diffusion/models.md +2 -0
  147. package/scaffold/instructions/.agents/skills/video/diffusion/prompts.md +1 -1
  148. package/scaffold/instructions/.agents/skills/video/direct-film.md +45 -10
  149. package/scaffold/instructions/.agents/skills/video/finishing.md +11 -3
  150. package/scaffold/instructions/.agents/skills/video/generated-film.md +1 -0
  151. package/scaffold/instructions/.agents/skills/video/generation.md +4 -0
  152. package/scaffold/instructions/.agents/skills/video/requests.md +8 -2
  153. package/scaffold/instructions/.agents/skills/visual-debugging/SKILL.md +1 -1
  154. package/scaffold/instructions/AGENTS.md +21 -48
  155. package/scaffold/production/README.md +18 -99
  156. package/scaffold/production/package.json +3 -2
  157. package/scaffold/production/src/IFilm.ts +1 -6
  158. package/scaffold/production/src/IFilmProduction.ts +255 -31
  159. package/scaffold/production/src/clampProductionSeconds.ts +5 -8
  160. package/scaffold/production/src/composition/films/starter.ts +2 -7
  161. package/scaffold/production/src/executable/motionTake/IMotionTakeSource.ts +1 -2
  162. package/scaffold/production/src/executable/motionTake/assertMotionTakeBindings.ts +3 -10
  163. package/scaffold/production/src/executable/motionTake/collectMotionTakeFiles.ts +2 -6
  164. package/scaffold/production/src/executable/motionTake/hashMotionTakeFile.ts +2 -6
  165. package/scaffold/production/src/executable/motionTake/openMotionTake.ts +2 -6
  166. package/scaffold/production/src/executable/motionTake/readMotionTakeArtifact.ts +2 -6
  167. package/scaffold/production/src/executable/motionTake/readMotionTakeInstalledLock.ts +2 -6
  168. package/scaffold/production/src/executable/motionTake/readMotionTakePackageVersion.ts +2 -6
  169. package/scaffold/production/src/executable/motionTake/readMotionTakeSource.ts +2 -6
  170. package/scaffold/production/src/executable/motionTake/replayMotionTake.ts +2 -6
  171. package/scaffold/production/src/executable/motionTake/resolveMotionTakePath.ts +5 -12
  172. package/scaffold/production/src/executable/motionTake/verifyMotionTakeEditPrefix.ts +2 -6
  173. package/scaffold/production/src/executable/motionTake/writeMotionTakeArtifact.ts +2 -6
  174. package/scaffold/production/src/executable/recovery/node/artifact/archiveAutoMovieRecoveryModel.ts +12 -19
  175. package/scaffold/production/src/executable/recovery/node/artifact/createAutoMovieRecoveryArtifact.ts +13 -26
  176. package/scaffold/production/src/executable/recovery/node/artifact/writeAutoMovieRecoveryArtifact.ts +16 -22
  177. package/scaffold/production/src/executable/recovery/node/internal/IAutoMovieRecoveryMemoryUsage.ts +1 -2
  178. package/scaffold/production/src/executable/recovery/node/internal/RecoveryFileVectorTable.ts +11 -32
  179. package/scaffold/production/src/executable/recovery/node/internal/RecoveryFileVectorTableInput.ts +5 -14
  180. package/scaffold/production/src/executable/recovery/node/internal/createRecoveryFileVectorTable.ts +6 -13
  181. package/scaffold/production/src/executable/recovery/node/internal/observeRecoveryAtlas.ts +16 -24
  182. package/scaffold/production/src/executable/recovery/node/internal/readAutoMovieRecoveryBoundedFile.ts +9 -17
  183. package/scaffold/production/src/executable/recovery/node/internal/readRecoveryCameraImages.ts +2 -6
  184. package/scaffold/production/src/executable/recovery/node/internal/readRecoveryFixedReference.ts +2 -6
  185. package/scaffold/production/src/executable/recovery/node/internal/recovery.ts +12 -17
  186. package/scaffold/production/src/executable/recovery/node/internal/recoveryAtlas.ts +2 -6
  187. package/scaffold/production/src/executable/recovery/node/internal/recoveryCameraMap.ts +6 -12
  188. package/scaffold/production/src/executable/recovery/node/internal/recoveryCameraScene.ts +2 -10
  189. package/scaffold/production/src/executable/recovery/node/internal/recoveryCameras.ts +2 -9
  190. package/scaffold/production/src/executable/recovery/node/internal/recoveryContourPath.ts +7 -11
  191. package/scaffold/production/src/executable/recovery/node/internal/recoveryImages.ts +6 -14
  192. package/scaffold/production/src/executable/recovery/node/mesh/createAutoMovieRecoveryContourFileMesh.ts +10 -25
  193. package/scaffold/production/src/executable/recovery/node/mesh/createAutoMovieRecoveryMeshSpool.ts +9 -15
  194. package/scaffold/production/src/executable/recovery/node/mesh/readAutoMovieRecoveryMeshFrontier.ts +10 -13
  195. package/scaffold/production/src/executable/recovery/node/publishAutoMovieRecoveryArtifact.ts +2 -6
  196. package/scaffold/production/src/executable/recovery/node/reconstruction/reconstructAutoMovieRecoveryLocal.ts +13 -19
  197. package/scaffold/production/src/executable/recovery/node/runAutoMovieRecoveryCommand.ts +4 -19
  198. package/scaffold/production/src/executable/verify.ts +11 -0
  199. package/scaffold/production/src/inspectFilmProduction.ts +252 -0
  200. package/scaffold/production/src/main.ts +1 -0
  201. package/scaffold/production/src/markFilmProduction.ts +31 -19
  202. package/scaffold/production/src/readFilmVerdicts.ts +43 -0
  203. package/scaffold/production/src/selectFilm.ts +2 -6
  204. package/scaffold/production/src/subjectOfFilm.ts +158 -0
  205. package/scaffold/production/src/subjects.ts +13 -61
  206. package/scaffold/production/test/features/test_clamp_production_seconds.ts +2 -4
  207. package/scaffold/production/test/features/test_inspect_film_production.ts +325 -0
  208. package/scaffold/production/test/features/test_recovery_publication_cancellation.ts +2 -4
  209. package/scaffold/production/test/features/test_select_film.ts +2 -4
  210. package/scaffold/production/test/features/test_subject_of_film.ts +95 -0
  211. package/scaffold/production/test/features/testing/test_test_execution.ts +2 -4
  212. package/scaffold/production/test/features/testing/test_test_selection.ts +2 -4
  213. package/scaffold/production/test/helpers/assessTestExecution.ts +4 -7
  214. package/scaffold/production/test/helpers/overlappingPerformance.ts +199 -0
  215. package/scaffold/production/test/tsconfig.json +4 -1
  216. package/scaffold/production/tsconfig.json +2 -6
  217. package/scaffold/production/vite.config.ts +25 -2
  218. package/scaffold/workspace/README.md +9 -28
  219. package/scaffold/workspace/package.json +1 -1
  220. package/src/IAutoMovieScaffoldProps.ts +12 -12
  221. package/src/assertScaffoldProjectName.ts +8 -10
  222. package/src/createAutoMovieScaffold.ts +49 -19
  223. package/src/listAutoMovieScaffoldFiles.ts +16 -12
  224. package/src/renderAutoMovieWorkspace.ts +20 -15
  225. package/src/scaffoldSharedSkillPath.ts +13 -12
  226. package/generated/skills/contracts/development/testing.md +0 -27
  227. package/scaffold/instructions/.agents/skills/automovie/SKILL.md +0 -32
  228. package/scaffold/instructions/.agents/skills/contracts/development/statements/behaviors.md +0 -40
  229. package/scaffold/instructions/.agents/skills/contracts/development/statements/composition.md +0 -32
  230. package/scaffold/instructions/.agents/skills/contracts/development/statements/entities.md +0 -34
  231. package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/brief.md +0 -9
  232. package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/common.md +0 -9
  233. package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/scripts.md +0 -9
  234. package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/settings.md +0 -9
  235. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/common.md +0 -17
  236. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/common.md +0 -9
  237. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/realized.md +0 -9
  238. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/scripts.md +0 -9
  239. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/realized.md +0 -9
  240. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/scripts.md +0 -9
  241. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/brief.md +0 -9
  242. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/common.md +0 -9
  243. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/index.md +0 -9
  244. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/narratives.md +0 -13
  245. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/review.md +0 -13
  246. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/screenplay.md +0 -13
  247. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/scripts.md +0 -13
  248. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/settings.md +0 -9
  249. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/treatments.md +0 -13
  250. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/brief.md +0 -9
  251. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/index.md +0 -9
  252. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/narratives.md +0 -13
  253. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/realized.md +0 -9
  254. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/research.md +0 -13
  255. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/review.md +0 -13
  256. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/screenplay.md +0 -13
  257. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/scripts.md +0 -9
  258. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/settings.md +0 -9
  259. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/treatments.md +0 -13
  260. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/brief.md +0 -16
  261. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/common.md +0 -40
  262. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/narratives.md +0 -6
  263. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/screenplay.md +0 -12
  264. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/scripts.md +0 -9
  265. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/settings.md +0 -21
  266. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/treatments.md +0 -7
  267. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/common.md +0 -84
  268. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/common.md +0 -17
  269. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/realized.md +0 -13
  270. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/scripts.md +0 -12
  271. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/realized.md +0 -18
  272. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/scripts.md +0 -16
  273. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/brief.md +0 -17
  274. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/common.md +0 -29
  275. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/index.md +0 -15
  276. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/narratives.md +0 -41
  277. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/review.md +0 -31
  278. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/screenplay.md +0 -21
  279. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/scripts.md +0 -23
  280. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/settings.md +0 -43
  281. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/treatments.md +0 -27
  282. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/brief.md +0 -11
  283. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/common.md +0 -10
  284. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/index.md +0 -16
  285. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/narratives.md +0 -43
  286. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/realized.md +0 -16
  287. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/research.md +0 -32
  288. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/review.md +0 -23
  289. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/screenplay.md +0 -75
  290. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/scripts.md +0 -43
  291. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/settings.md +0 -16
  292. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/treatments.md +0 -20
  293. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/screenplay.md +0 -11
  294. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/scripts.md +0 -9
  295. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/treatments.md +0 -7
  296. package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/screenplay.md +0 -9
  297. package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/scripts.md +0 -9
  298. package/scaffold/instructions/.agents/skills/motion/laws/extension.md +0 -39
  299. package/scaffold/instructions/.agents/skills/production/stage-caches.md +0 -26
  300. package/scaffold/production/src/executable/recovery/node/internal/recoveryLocal.ts +0 -153
  301. package/scaffold/production/src/executable/recovery/node/internal/recoveryOpen.ts +0 -237
  302. package/scaffold/production/tsconfig.test.json +0 -9
  303. /package/scaffold/instructions/.agents/skills/{contracts/development/$testing.md → 3d-modeling/$environments.md} +0 -0
@@ -1,27 +1,20 @@
1
- import { isPortableMotionTakePath } from "@automovie/engine";
2
1
  import { realpath } from "node:fs/promises";
3
2
  import path from "node:path";
4
3
 
5
4
  /**
6
- * Resolve a production-relative source, data or artifact path under a canonical production root.
7
- * Creation resolves the existing parent without following an already-present destination.
5
+ * Resolve a production-relative source, data or artifact path under a canonical
6
+ * production root. Creation resolves the existing parent without following an
7
+ * already-present destination.
8
8
  *
9
9
  * @evidence contracts/development/common.md#meaningful-documentation States the path scope and the distinct creation resolution.
10
- * @evidence contracts/development/implementation.md#principled-implementation Validates the portable reference, resolves filesystem aliases and checks confinement on the resolved path.
11
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Validation, filesystem resolution and containment are successive steps.
12
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Does not accept an absolute path, traverse a parent segment or waive the canonical root check on Windows.
13
- * @evidence contracts/development/implementation.md#efficient-algorithms Checks each segment once and performs one filesystem resolution.
14
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Current filesystem resolution cannot reuse a prior result after aliases change.
15
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Retains only a returned path string and opens no file handle.
10
+ * @evidence contracts/development/implementation.md#principled-implementation Resolves filesystem aliases of the typed production-relative reference and checks confinement on the resolved path. Does not waive the canonical root check on Windows.
11
+ * @evidence contracts/development/implementation.md#efficient-algorithms Filesystem resolution and containment are successive steps. Performs one filesystem resolution. Current filesystem resolution cannot reuse a prior result after aliases change. Retains only a returned path string and opens no file handle.
16
12
  */
17
13
  export async function resolveMotionTakePath(
18
14
  root: string,
19
15
  reference: string,
20
16
  mode: "read" | "create",
21
17
  ): Promise<string> {
22
- if (!isPortableMotionTakePath(reference))
23
- throw new Error(`Expected a production-relative path: ${reference}`);
24
-
25
18
  const absolute: string = path.join(root, ...reference.split("/"));
26
19
  const check: string = mode === "read" ? absolute : path.dirname(absolute);
27
20
  const canonical: string = await realpath(check).catch((cause: unknown) => {
@@ -12,12 +12,8 @@ import { isDeepStrictEqual } from "node:util";
12
12
  * Refuse a branch that changes the original editorial view through the Human join.
13
13
  *
14
14
  * @evidence contracts/development/common.md#meaningful-documentation States the boundary whose placement and cues must remain fixed.
15
- * @evidence contracts/development/implementation.md#principled-implementation Compares the admitted affine placement, visible bounds, prior shots and projected event ownership on the original output clock.
16
- * @evidence contracts/development/implementation.md#clear-and-simple-structure First verifies frame placement and then compares the engine's projected event ledgers.
17
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A matching snapshot alone cannot admit an edit that changes a prior rate, trim, transition or event.
18
- * @evidence contracts/development/implementation.md#efficient-algorithms Walks the visible prefix once and obtains ordered cues from the existing projector.
19
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Reads the prepared layouts already used to resolve the saved anchors.
20
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Borrows both editable sources and keeps neither after the check.
15
+ * @evidence contracts/development/implementation.md#principled-implementation Compares the admitted affine placement, visible bounds, prior shots and projected event ownership on the original output clock. A matching snapshot alone cannot admit an edit that changes a prior rate, trim, transition or event.
16
+ * @evidence contracts/development/implementation.md#efficient-algorithms Uses the prepared layouts from anchor resolution to locate the join and compare the visible placements. Projects each full edit with the engine event reader, which builds its own playback layout, then compares only cues through the join. The input layouts and temporary event lists stay local to the check.
21
17
  */
22
18
  export function verifyMotionTakeEditPrefix(
23
19
  original: {
@@ -5,12 +5,8 @@ import path from "node:path";
5
5
  * Publish one admitted artifact as complete JSON at an unused destination.
6
6
  *
7
7
  * @evidence contracts/development/common.md#meaningful-documentation States what is committed and that the destination must be unused.
8
- * @evidence contracts/development/implementation.md#principled-implementation Stages the serialized artifact on the destination volume and links it in one exclusive operation after sync and close.
9
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Serialization, temporary write and publication have distinct steps with local cleanup.
10
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Never truncates an existing take and does not fall back to a partial direct write.
11
- * @evidence contracts/development/implementation.md#efficient-algorithms Serializes and writes the artifact once without copying it again during publication.
12
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each call must commit the given artifact to a distinct destination.
13
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Closes the write handle and cleans up the file and directory owned by this invocation.
8
+ * @evidence contracts/development/implementation.md#principled-implementation Stages the serialized artifact on the destination volume and links it in one exclusive operation after sync and close. Never truncates an existing take and does not fall back to a partial direct write.
9
+ * @evidence contracts/development/implementation.md#efficient-algorithms Serialization, temporary write and publication have distinct steps with local cleanup. Serializes and writes the artifact once without copying it again during publication. Each call must commit the given artifact to a distinct destination. Closes the write handle and cleans up the file and directory owned by this invocation.
14
10
  */
15
11
  export async function writeMotionTakeArtifact(
16
12
  destination: string,
@@ -10,22 +10,19 @@ import { pipeline } from "node:stream/promises";
10
10
  import { createGunzip, createGzip } from "node:zlib";
11
11
 
12
12
  /**
13
- * Store one run-owned final model as verified, lossless gzip bytes.
14
- * The input path must resolve to output/model.json and its exact published byte
15
- * count and SHA-256 must be supplied. The archive is published without replacing
16
- * an existing file after a complete reverse decode verifies the logical bytes.
17
- * A receipt precedes retirement of this model and its recognized array spool.
18
- * Failure preserves the raw publication; an already published archive or receipt
19
- * may remain when a later filesystem operation fails. Process termination may
20
- * leave an unpublished temporary archive. The caller owns exclusive output access.
13
+ * Store one run-owned final model as verified, lossless gzip bytes. The input
14
+ * path must resolve to output/model.json and its exact published byte count and
15
+ * SHA-256 must be supplied. The archive is published without replacing an
16
+ * existing file after a complete reverse decode verifies the logical bytes. A
17
+ * receipt precedes retirement of this model and its recognized array spool.
18
+ * Failure preserves the raw publication; an already published archive or
19
+ * receipt may remain when a later filesystem operation fails. Process
20
+ * termination may leave an unpublished temporary archive. The caller owns
21
+ * exclusive output access.
21
22
  *
22
- * @evidence contracts/development/implementation.md#principled-implementation Streaming gzip preserves the complete UTF-8 publication, whose supplied hash is checked during encoding and independently checked after full reverse decoding before hard-link publication and raw retirement.
23
- * @evidence contracts/development/implementation.md#clear-and-simple-structure This storage owner handles compression, byte identity, publication and the same run's served spool. Numerical reconstruction retains every geometry and completion decision.
24
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No parsing, coefficient change, mesh filtering, source fallback or existing-output replacement occurs. Only model.json directly within the resolved output and recognized plain spool files are eligible for retirement.
23
+ * @evidence contracts/development/implementation.md#principled-implementation Streaming gzip preserves the complete UTF-8 publication, whose supplied hash is checked during encoding and independently checked after full reverse decoding before hard-link publication and raw retirement. No parsing, coefficient change, mesh filtering, source fallback or existing-output replacement occurs. Only model.json directly within the resolved output and recognized plain spool files are eligible for retirement.
24
+ * @evidence contracts/development/implementation.md#efficient-algorithms This storage owner handles compression, byte identity, publication and the same run's served spool. Encoding and full reverse verification cost O(N + M) for N logical bytes and M compressed bytes. Encoding supplies both hashes, and the returned archive record is written into the storage receipt. Stream backpressure bounds codec staging and spool metadata scales with the number of served files. Pipelines close their streams and the final cleanup attempts to remove this call's temporary archive. After the receipt, spool entries retire individually before the raw model. A later failure can leave an archive, a receipt or a partially retired spool.
25
25
  * @evidence contracts/development/common.md#meaningful-documentation States exclusive output ownership, exact input binding, immutable publication, reverse verification, retirement order and failure effects.
26
- * @evidence contracts/development/implementation.md#efficient-algorithms Encoding scans N logical bytes once and reverse verification scans M compressed bytes once, with O(N + M) codec work and O(F) spool metadata for F served files. Full decoding is required to verify the stored logical publication.
27
- * @evidence contracts/development/implementation.md#reuse-equivalent-work The encoding pass computes both logical and compressed hashes. The returned archive record is the same record written to the storage receipt and supports later verified streaming transport.
28
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Node stream backpressure bounds codec staging independently of model size; spool paths retain O(F) metadata. Pipeline closes streams on completion or failure, and finally removes only this call's unpublished temporary archive. No source input or prior publication is retired.
29
26
  */
30
27
  export async function archiveAutoMovieRecoveryModel(
31
28
  input: IAutoMovieRecoveryArchiveInput,
@@ -34,11 +31,7 @@ export async function archiveAutoMovieRecoveryModel(
34
31
  const model: string = fs.realpathSync(input.path);
35
32
  if (path.dirname(model) !== root || path.basename(model) !== "model.json")
36
33
  throw new Error("Only this run-owned final model can be archived");
37
- if (
38
- !Number.isSafeInteger(input.bytes) ||
39
- input.bytes < 0 ||
40
- !/^[a-f0-9]{64}$/i.test(input.sha256)
41
- )
34
+ if (input.bytes < 0 || !/^[a-f0-9]{64}$/i.test(input.sha256))
42
35
  throw new Error("A final model requires its exact byte count and SHA-256");
43
36
  const destination: string = model + ".gz";
44
37
  const temporary: string = destination + ".tmp";
@@ -1,12 +1,10 @@
1
1
  import type {
2
+ IAutoMovieRecoveryAnalyticDomain,
2
3
  IAutoMovieRecoveryArtifact,
3
4
  IAutoMovieRecoveryArtifactInput,
4
5
  IAutoMovieRecoveryOpenContinuation,
5
6
  } from "@automovie/interface";
6
- import {
7
- describeRecoveryNamedDomains,
8
- readRecoveryMetadata as read,
9
- } from "@automovie/recovery";
7
+ import { describeRecoveryNamedDomains } from "@automovie/recovery";
10
8
  import path from "node:path";
11
9
 
12
10
  /**
@@ -14,13 +12,9 @@ import path from "node:path";
14
12
  * Tensor, contour and open completion remain separate; construction and ownership
15
13
  * come from the same engine outputs. This operation changes no geometry or report.
16
14
  *
17
- * @evidence contracts/development/implementation.md#principled-implementation Saved input hashes, actual engine reports and current publication counters expose the same generated artifact and partial status without inferring source fidelity.
18
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Artifact shape and provenance have one owner; source observation, generation and disk-spool writing remain separate.
19
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No copied source geometry, quality promotion, geometry filtering or missing-region substitution enters metadata assembly.
15
+ * @evidence contracts/development/implementation.md#principled-implementation Saved input hashes, actual engine reports and current publication counters expose the same generated artifact and partial status without inferring source fidelity. No copied source geometry, quality promotion, geometry filtering or missing-region substitution enters metadata assembly.
16
+ * @evidence contracts/development/implementation.md#efficient-algorithms Artifact shape and provenance have one owner; source observation, generation and disk-spool writing remain separate. Assembly visits interval diagnostics and tensor reports in linear passes; exact declared and reported family-ID binding uses O(F) transient storage. Bulk geometry and report arrays are referenced rather than copied. The publication writer owns serialization costs. The existing model, spool construction and ownership arrays feed checkpoints and final publication without regeneration. One returned plain record belongs to the publication invocation. This helper owns no handles, cache or retained geometry beyond its caller's arrays.
20
17
  * @evidence contracts/development/common.md#meaningful-documentation States current-report ownership and the separate tensor, open, source and geometry qualifications.
21
- * @evidence contracts/development/implementation.md#efficient-algorithms Assembly visits interval diagnostics and tensor reports in linear passes; exact declared and reported family-ID binding uses O(F) transient storage. Bulk geometry and report arrays are referenced rather than copied. The publication writer owns serialization costs.
22
- * @evidence contracts/development/implementation.md#reuse-equivalent-work The existing model, spool construction and ownership arrays feed checkpoints and final publication without regeneration.
23
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources One returned plain record belongs to the publication invocation. This helper owns no handles, cache or retained geometry beyond its caller's arrays.
24
18
  */
25
19
  export function createAutoMovieRecoveryArtifact(
26
20
  input: IAutoMovieRecoveryArtifactInput,
@@ -71,12 +65,8 @@ export function createAutoMovieRecoveryArtifact(
71
65
  report.observationComplete &&
72
66
  report.unrepresentedDomains.length === 0,
73
67
  );
74
- const declaredAnalytic: unknown = read(bundle, ["analyticDomains"]);
75
- const analyticDeclarations: readonly unknown[] = Array.isArray(
76
- declaredAnalytic,
77
- )
78
- ? declaredAnalytic
79
- : [];
68
+ const analyticDeclarations: readonly IAutoMovieRecoveryAnalyticDomain[] =
69
+ bundle.analyticDomains ?? [];
80
70
  const retainedDomainComplete: boolean =
81
71
  analyticComplete &&
82
72
  complete &&
@@ -110,18 +100,16 @@ export function createAutoMovieRecoveryArtifact(
110
100
  analyticReports: base.analyticReports,
111
101
  analyticOwnership: analyticMembers.map(
112
102
  (member: (typeof named.members)[number], ordinal: number): object => {
113
- const domain: unknown = analyticDeclarations[ordinal];
114
- const id: unknown = read(domain, ["id"]);
115
- const closedGroups: unknown = read(domain, ["closedGroups"]);
116
- const openPairs: unknown = read(domain, ["openPairs"]);
117
- const openUnresolved: unknown = read(domain, ["openUnresolved"]);
103
+ const domain: IAutoMovieRecoveryAnalyticDomain | undefined =
104
+ analyticDeclarations[ordinal];
105
+ const id: string | undefined = domain?.id;
118
106
  return {
119
- id: typeof id === "string" && id.length > 0 ? id : null,
107
+ id: id === undefined || id.length === 0 ? null : id,
120
108
  occurrence: member.id,
121
109
  admitted: member.admitted,
122
- closedGroups: Array.isArray(closedGroups) ? closedGroups : null,
123
- openPairs: Array.isArray(openPairs) ? openPairs : null,
124
- openUnresolved: Array.isArray(openUnresolved) ? openUnresolved : null,
110
+ closedGroups: domain?.closedGroups ?? null,
111
+ openPairs: domain?.openPairs ?? null,
112
+ openUnresolved: domain?.openUnresolved ?? null,
125
113
  diagnostics: member.diagnostics,
126
114
  polygonalBoundaryConformityQualified: false,
127
115
  };
@@ -219,7 +207,6 @@ export function createAutoMovieRecoveryArtifact(
219
207
  "tessellateAutoMovieLocalHermite64",
220
208
  ],
221
209
  callPath: [
222
- "recoveryLocal",
223
210
  "reconstructAutoMovieRecoveryLocal",
224
211
  "IAutoMovieCurve64.Cubic + source-free ordinary continuation",
225
212
  "AutoMovieLocalHermiteField64.prepare",
@@ -7,25 +7,23 @@ import fs from "node:fs";
7
7
  import path from "node:path";
8
8
 
9
9
  /**
10
- * Atomically publish a plain JSON artifact without one complete serialized string.
11
- * Arrays, data-only plain records and JSON primitive values retain JSON.stringify ordering and
12
- * encoding. Nonplain objects are outside this publication contract. Input geometry
13
- * remains caller-owned; bounded staging does not bound the generating model's memory.
14
- * Process termination can leave a private temporary file but cannot publish its partial bytes.
15
- * A failed encode/read/write/publication preserves its original thrown value even
16
- * if descriptor or temporary-file cleanup also fails. Cleanup failure after an
17
- * otherwise successful publication remains a failure, rather than a success digest.
18
- * Optional array sources bind engine-generated plain-array spool files to placeholder array
19
- * identities. Their complete SHA-256 and bracket bytes are checked while copying only their
20
- * interiors. Item populations are producer metadata, not a second JSON parsing certificate.
10
+ * Atomically publish a plain JSON artifact without one complete serialized
11
+ * string. Arrays, data-only plain records and JSON primitive values retain
12
+ * JSON.stringify ordering and encoding. Nonplain objects are outside this
13
+ * publication contract. Input geometry remains caller-owned; bounded staging
14
+ * does not bound the generating model's memory. Process termination can leave a
15
+ * private temporary file but cannot publish its partial bytes. A failed
16
+ * encode/read/write/publication preserves its original thrown value even if
17
+ * descriptor or temporary-file cleanup also fails. Cleanup failure after an
18
+ * otherwise successful publication remains a failure, rather than a success
19
+ * digest. Optional array sources bind engine-generated plain-array spool files
20
+ * to placeholder array identities. Their complete SHA-256 and bracket bytes are
21
+ * checked while copying only their interiors. Item populations are producer
22
+ * metadata, not a second JSON parsing certificate.
21
23
  *
22
- * @evidence contracts/development/implementation.md#principled-implementation Recursive JSON token emission and bounded shallow-array chunks preserve the generating records and numeric values. A same-directory temporary file is closed before a nonoverwriting hard-link publication, and the returned hash covers the written UTF-8 bytes.
23
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One publication helper owns encoding, incremental hashing and atomic filesystem transfer; numerical producers and consumers retain all geometry decisions.
24
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No geometry filtering, numeric rounding, field sampling, compression, source fallback or existing-output replacement occurs. Cycles and nonplain objects fail explicitly.
24
+ * @evidence contracts/development/implementation.md#principled-implementation Recursive JSON token emission and bounded shallow-array chunks preserve the generating records and numeric values. A same-directory temporary file is closed before a nonoverwriting hard-link publication, and the returned hash covers the written UTF-8 bytes. No geometry filtering, numeric rounding, field sampling, compression, source fallback or existing-output replacement occurs. Cycles and nonplain objects fail explicitly.
25
+ * @evidence contracts/development/implementation.md#efficient-algorithms One helper owns JSON encoding, incremental hashing and nonoverwriting publication. Work scales with visited keys and values, verified spool bytes and emitted UTF-8. Shallow arrays use fixed-size chunks, with at most sixteen primitives per nested bulk entry. Emitted chunks feed both the file and hash, and each standalone publication verifies the source bytes it copies. Staging includes the output buffer, largest encoded primitive and active records' key lists. The ancestor set scales with nesting depth. Guarded cleanup preserves a primary failure, and cleanup errors after publication propagate. Process termination can leave an unpublished temporary file.
25
26
  * @evidence contracts/development/common.md#meaningful-documentation States supported plain JSON values, encoding authority, immutable publication and the limited staging-memory guarantee.
26
- * @evidence contracts/development/implementation.md#efficient-algorithms Traversal and UTF-8 writing cost O(N) for the artifact size. Shallow arrays use fixed-size JSON chunks rather than one full serialized array or one filesystem write per number.
27
- * @evidence contracts/development/implementation.md#reuse-equivalent-work The same emitted chunks supply both the file and its incremental hash; the output needs no reread. Generating array sources are hash-verified during their required copy into each standalone publication.
28
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Staging depends on fixed-size shallow-array chunks and the largest primitive string rather than the complete serialized artifact; nested bulk chunks accept at most sixteen primitives per child. The ancestor set is O(depth), and the caller still owns the complete input object. Independent guarded cleanup preserves a primary failure; normal cleanup errors propagate. Process termination can leave an unpublished temporary file.
29
27
  */
30
28
  export function writeAutoMovieRecoveryArtifact(
31
29
  output: string,
@@ -138,11 +136,7 @@ export function writeAutoMovieRecoveryArtifact(
138
136
  flush();
139
137
  let written: boolean = false;
140
138
  for (const source of sources) {
141
- if (
142
- !Number.isSafeInteger(source.items) ||
143
- source.items < 0 ||
144
- !/^[0-9a-f]{64}$/i.test(source.sha256)
145
- )
139
+ if (source.items < 0 || !/^[0-9a-f]{64}$/i.test(source.sha256))
146
140
  throw new Error("Invalid generating spool binding");
147
141
  const handle: number = fs.openSync(source.path, "r");
148
142
  try {
@@ -2,9 +2,8 @@
2
2
  * Host-reported byte populations, independent of Node's ambient type declarations.
3
3
  * Values describe a sampled process rather than a package-wide resource bound.
4
4
  *
5
- * @evidence contracts/development/design.md#principled-representation Byte counters retain the existing host memory observation without exposing a runtime or ambient Node dependency through public declarations.
5
+ * @evidence contracts/development/design.md#principled-representation Byte counters retain the existing host memory observation without exposing a runtime or ambient Node dependency through public declarations. No memory sample is substituted for a peak, enforced cap or geometry qualification.
6
6
  * @evidence contracts/development/design.md#minimal-and-owned-surface A structural host record gives publication metadata one type owner.
7
- * @evidence contracts/development/design.md#prohibited-design-shortcuts No memory sample is substituted for a peak, enforced cap or geometry qualification.
8
7
  * @evidence contracts/development/common.md#meaningful-documentation States sampled bytes and the distinct counter meanings.
9
8
  */
10
9
  export interface IAutoMovieRecoveryMemoryUsage {
@@ -4,74 +4,53 @@
4
4
  * Finish completes backing bytes but does not close the caller's descriptor.
5
5
  * The first failed value remains terminal, including null or undefined.
6
6
  *
7
- * @evidence contracts/development/design.md#principled-representation Distinct append/read/update/finish methods preserve logical row admission, complete binary64 values and first-failure identity.
7
+ * @evidence contracts/development/design.md#principled-representation Append, read, update and finish express logical binary64 rows and first-failure identity. The caller supplies integer row addresses and finite triples. The implementation checks address range and triple length and leaves those other premises to the caller.
8
8
  * @evidence contracts/development/design.md#minimal-and-owned-surface This erased result names the table's lifecycle seam without exposing pages or transferring descriptor ownership.
9
- * @evidence contracts/development/design.md#prohibited-design-shortcuts No cache buffer escapes, no nonexistent row is fabricated and completion is not canonical model or process-memory qualification.
10
9
  * @evidence contracts/development/common.md#meaningful-documentation States copied values, delayed flushes, terminal errors, idempotent successful finish and independent descriptor close.
11
10
  */
12
11
  export interface RecoveryFileVectorTable {
13
12
  /**
14
13
  * Append one finite triple at the next logical row; failures terminally latch.
15
14
  *
16
- * @evidence contracts/development/implementation.md#principled-implementation All three scalars are copied and admitted before mutation; the logical count advances only after storage succeeds.
17
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Append alone creates rows and enforces the declared population ceiling.
18
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No skipped row, fabricated padding or partially admitted vector becomes data.
15
+ * @evidence contracts/development/implementation.md#principled-implementation The table checks triple length and copies the elements before storage. The logical count advances after the next row is written. The caller supplies finite numbers, since binary64 encoding also accepts nonfinite values.
16
+ * @evidence contracts/development/implementation.md#efficient-algorithms Append alone creates rows and enforces the declared population ceiling. Three encodings follow bounded page lookup. A miss can flush one dirty victim and read one existing valid prefix; short I/O can require multiple callbacks per transfer. Sequential appends reuse the current dirty page. The input is borrowed only during the call; the table retains at most three private pages.
19
17
  * @evidence contracts/development/common.md#meaningful-documentation States finite-triple admission, next-row addressing and terminal failure.
20
- * @evidence contracts/development/implementation.md#efficient-algorithms Three encodings follow bounded page lookup. A miss can flush one dirty victim and read one existing valid prefix; short I/O can require multiple callbacks per transfer.
21
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Sequential appends reuse the current dirty page.
22
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The input is borrowed only during the call; the table retains at most three private pages.
23
18
  */
24
19
  append: (value: readonly number[]) => void;
25
20
 
26
21
  /**
27
22
  * Copy an existing logical triple, including its current dirty values.
28
23
  *
29
- * @evidence contracts/development/implementation.md#principled-implementation Row admission precedes lookup and little-endian decoding preserves binary64 values.
30
- * @evidence contracts/development/implementation.md#clear-and-simple-structure The copied result grants no access to private cache storage.
31
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts File padding and nonexistent rows cannot supply values.
24
+ * @evidence contracts/development/implementation.md#principled-implementation The table checks the address range before little-endian decoding. An integer address selects one existing row. Fractional indices inside that range can address between binary64 fields.
25
+ * @evidence contracts/development/implementation.md#efficient-algorithms The copied result grants no access to private cache storage. Three decodings follow bounded page lookup. A miss can flush one dirty victim and read one valid prefix; short I/O can require multiple callbacks per transfer. A resident page supplies its latest values without another read. One three-scalar result transfers to the caller and no cache buffer escapes.
32
26
  * @evidence contracts/development/common.md#meaningful-documentation States existing-row, copied-result and dirty-value semantics.
33
- * @evidence contracts/development/implementation.md#efficient-algorithms Three decodings follow bounded page lookup. A miss can flush one dirty victim and read one valid prefix; short I/O can require multiple callbacks per transfer.
34
- * @evidence contracts/development/implementation.md#reuse-equivalent-work A resident page supplies its latest values without another read.
35
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources One three-scalar result transfers to the caller and no cache buffer escapes.
36
27
  */
37
28
  read: (index: number) => [number, number, number];
38
29
 
39
30
  /**
40
31
  * Replace an existing row after all three finite values have been admitted.
41
32
  *
42
- * @evidence contracts/development/implementation.md#principled-implementation Whole-triple admission precedes mutation and ordered subsequent reads see the replacement.
43
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Update cannot change logical population or create an address.
44
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No grouped reduction or scalar conversion changes caller arithmetic.
33
+ * @evidence contracts/development/implementation.md#principled-implementation Address-range and triple-length checks precede mutation. Ordered reads at the caller's integer address see the written binary64 values. The caller supplies finite numbers.
34
+ * @evidence contracts/development/implementation.md#efficient-algorithms Update cannot change logical population or create an address. Three encodings follow bounded page lookup. A miss can flush one dirty victim and read one valid prefix; short I/O can require multiple callbacks per transfer. The owned dirty page retains the latest replacement until flush. A transient copied triple and at most three cache pages are retained.
45
35
  * @evidence contracts/development/common.md#meaningful-documentation States whole-triple mutation and existing-row restriction.
46
- * @evidence contracts/development/implementation.md#efficient-algorithms Three encodings follow bounded page lookup. A miss can flush one dirty victim and read one valid prefix; short I/O can require multiple callbacks per transfer.
47
- * @evidence contracts/development/implementation.md#reuse-equivalent-work The owned dirty page retains the latest replacement until flush.
48
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources A transient copied triple and at most three cache pages are retained.
49
36
  */
50
37
  update: (index: number, value: readonly number[]) => void;
51
38
 
52
39
  /**
53
40
  * Flush valid dirty prefixes, then forbid row access; successful calls repeat safely.
54
41
  *
55
- * @evidence contracts/development/implementation.md#principled-implementation Success follows every required flush; the first failed value, including undefined, remains terminal.
56
- * @evidence contracts/development/implementation.md#clear-and-simple-structure This method completes backing bytes while the caller separately owns descriptor close.
57
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Neither finish failure nor unfinished backing grants output qualification.
42
+ * @evidence contracts/development/implementation.md#principled-implementation Success follows every required flush; the first failed value, including undefined, remains terminal. Neither finish failure nor unfinished backing grants output qualification.
43
+ * @evidence contracts/development/implementation.md#efficient-algorithms At most three dirty valid page prefixes are traversed. Clean pages and repeated successful finish perform no transfer. The table retains its pages until the caller releases the table. The caller closes the descriptor separately.
58
44
  * @evidence contracts/development/common.md#meaningful-documentation States flush-before-success, idempotence, terminal row access and separate close ownership.
59
- * @evidence contracts/development/implementation.md#efficient-algorithms At most three dirty valid page prefixes are traversed.
60
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Already clean pages and repeated successful finish perform no transfer.
61
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Buffers expire with the table owner after this call or failure; no descriptor is acquired or closed here.
62
45
  */
63
46
  finish: () => void;
64
47
 
65
48
  /**
66
49
  * Copy call-local logical population, allocated bytes, transfer counts and state.
67
50
  *
68
- * @evidence contracts/development/implementation.md#principled-implementation Counters describe actual attempted transfers and logical rows, not uncommitted file length.
69
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Observation returns immutable-by-copy scalar metadata without exposing pages.
70
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Statistics do not certify model completion, peak process memory or speedup.
51
+ * @evidence contracts/development/implementation.md#principled-implementation Counters describe actual attempted transfers and logical rows, not uncommitted file length. Statistics do not certify model completion, peak process memory or speedup.
52
+ * @evidence contracts/development/implementation.md#efficient-algorithms Observation returns immutable-by-copy scalar metadata without exposing pages. Copies six scalar fields in constant work. Existing counters are observed without rereading or flushing backing. One small result transfers to the caller without retaining cache references.
71
53
  * @evidence contracts/development/common.md#meaningful-documentation States local counter meanings and absence of buffer ownership transfer.
72
- * @evidence contracts/development/implementation.md#efficient-algorithms Copies six scalar fields in constant work.
73
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Existing counters are observed without rereading or flushing backing.
74
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources One small result transfers to the caller without retaining cache references.
75
54
  */
76
55
  statistics: () => {
77
56
  /** Admitted logical rows, independently of current backing-file length. */
@@ -3,9 +3,8 @@
3
3
  * The caller owns the descriptor and closes it after finish or failure. Callback
4
4
  * buffers are borrowed only during a call; byte counts report actual progress.
5
5
  *
6
- * @evidence contracts/development/design.md#principled-representation Safe logical row ceilings and actual positional byte transfers preserve complete binary64 rows, partial I/O and EOF semantics.
6
+ * @evidence contracts/development/design.md#principled-representation The row ceiling counts binary64 triples. Callback addresses and progress count bytes. The contour sink supplies the ceiling and uses fs.readSync and fs.writeSync on its descriptors. Integer limits, integer progress and borrowed-buffer lifetime are caller obligations beyond the table's comparisons.
7
7
  * @evidence contracts/development/design.md#minimal-and-owned-surface This erased input separates caller descriptor ownership from the table's private pages and logical state.
8
- * @evidence contracts/development/design.md#prohibited-design-shortcuts Callbacks cannot retain borrowed pages, fabricate unread bytes or substitute another table; no geometry or arithmetic policy is added.
9
8
  * @evidence contracts/development/common.md#meaningful-documentation States row-count admission, absolute byte addressing, progress and borrowed-buffer/descriptor lifetimes.
10
9
  */
11
10
  export interface RecoveryFileVectorTableInput {
@@ -15,13 +14,9 @@ export interface RecoveryFileVectorTableInput {
15
14
  /**
16
15
  * Read existing exclusive backing bytes into a borrowed page; return progress.
17
16
  *
18
- * @evidence contracts/development/implementation.md#principled-implementation Explicit absolute byte addresses and actual byte counts preserve partial-read and EOF semantics.
19
- * @evidence contracts/development/implementation.md#clear-and-simple-structure The caller owns the descriptor; the table owns progress and row validity.
20
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The callback cannot retain or replace the borrowed page or fabricate unread bytes.
17
+ * @evidence contracts/development/implementation.md#principled-implementation The contour sink delegates to fs.readSync with an absolute position and a borrowed page. Native integer progress drives the table's partial-read loop and a zero return fails while bytes remain.
18
+ * @evidence contracts/development/implementation.md#efficient-algorithms The caller owns the descriptor; the table owns progress and row validity. Each callback reads at most the remainder of one valid page prefix. Resident dirty and clean pages skip this callback until eviction. The callback borrows one of the table's three existing buffers only during the call; the caller closes its descriptor independently.
21
19
  * @evidence contracts/development/common.md#meaningful-documentation States borrowed buffer ownership, existing-byte reads and returned progress.
22
- * @evidence contracts/development/implementation.md#efficient-algorithms Each callback reads at most the remainder of one valid page prefix.
23
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Resident dirty and clean pages skip this callback until eviction.
24
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The callback borrows one of the table's three existing buffers only during the call; the caller closes its descriptor independently.
25
20
  */
26
21
  read: (
27
22
  target: Buffer,
@@ -33,13 +28,9 @@ export interface RecoveryFileVectorTableInput {
33
28
  /**
34
29
  * Write borrowed valid page bytes at an absolute address; return actual progress.
35
30
  *
36
- * @evidence contracts/development/implementation.md#principled-implementation Complete-progress loops persist the valid prefix before a dirty page can be reused.
37
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Descriptor ownership stays with the caller while dirty state stays with the table.
38
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Failure cannot become a successful flush or let another page overwrite the buffer.
31
+ * @evidence contracts/development/implementation.md#principled-implementation The contour sink delegates to fs.writeSync. Given its integer progress, the table completes the valid prefix before a dirty page can be reused. A thrown write error or detected progress failure remains terminal.
32
+ * @evidence contracts/development/implementation.md#efficient-algorithms Descriptor ownership stays with the caller while dirty state stays with the table. A callback writes at most the remainder of one valid page prefix. Repeated updates accumulate in one owned page before the required eviction or finish flush. The callback retains neither the page nor another buffer; the caller owns independent descriptor closure.
39
33
  * @evidence contracts/development/common.md#meaningful-documentation States borrowed bytes, absolute addresses and actual progress rather than requested length.
40
- * @evidence contracts/development/implementation.md#efficient-algorithms A callback writes at most the remainder of one valid page prefix.
41
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Repeated updates accumulate in one owned page before the required eviction or finish flush.
42
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The callback retains neither the page nor another buffer; the caller owns independent descriptor closure.
43
34
  */
44
35
  write: (
45
36
  source: Buffer,
@@ -2,26 +2,21 @@ import type { RecoveryFileVectorTable } from "./RecoveryFileVectorTable";
2
2
  import type { RecoveryFileVectorTableInput } from "./RecoveryFileVectorTableInput";
3
3
 
4
4
  /**
5
- * Keep a private binary64 vector table behind at most three reusable pages.
6
- * The caller owns its exclusive file and descriptor. Reads return copied triples;
5
+ * Keep a private binary64 vector table behind at most three reusable pages. The
6
+ * caller owns its exclusive file and descriptor. Reads return copied triples;
7
7
  * writes retain their logical order while private disk flushes may be delayed.
8
8
  * Final bytes are meaningful only after finish and successful descriptor close.
9
9
  * Failed operations latch their original thrown value and cannot be reused.
10
10
  *
11
- * @evidence contracts/development/implementation.md#principled-implementation Complete three-double rows use the original little-endian binary64 encoding. Logical row admission and full-progress transfers distinguish real values from page padding or truncated input.
12
- * @evidence contracts/development/implementation.md#clear-and-simple-structure A bounded LRU owns storage while the contour sink keeps numerical order and descriptor/publication ownership. Append, read, update and finish have distinct lifetime states.
13
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No arithmetic reduction, scalar conversion, new geometry, fabricated row or global cache replaces original logical values. A failed flush cannot recycle its buffer or become a later success.
11
+ * @evidence contracts/development/implementation.md#principled-implementation Complete three-double rows use little-endian binary64. The contour sink supplies integer row addresses from kernel emission and progress from native fs calls. The table checks address range, vector length and progress bounds. It leaves integer address and count checks and finite scalar admission to callers. A detected transfer failure prevents a later successful flush.
12
+ * @evidence contracts/development/implementation.md#efficient-algorithms The contour sink owns descriptor and publication lifetime. Each table holds at most three LRU pages of 2730 vectors and 65520 bytes each, derived from the 8192-scalar publication quantum. Reads change LRU order and can flush a dirty victim before reading one valid prefix on a miss. A hit uses that page's current values. Each row encodes or decodes three scalars. The sink closes the descriptors and releases both tables after completion or failure.
14
13
  * @evidence contracts/development/common.md#meaningful-documentation States exclusive backing, delayed physical writes, copied triples, terminal failures, idempotent finish and caller close obligations.
15
- * @evidence contracts/development/implementation.md#efficient-algorithms Each row operation performs constant bounded registry work and three scalar encodings/decodings. A miss transfers at most one complete valid page for reading and one dirty victim for writing; nonlocal workloads can retain worst-case page traffic.
16
- * @evidence contracts/development/implementation.md#reuse-equivalent-work At most three recent pages reuse their same buffers and headers; repeated logical accesses observe current dirty values without another file transfer. No state escapes into another table or operation.
17
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The existing 8192-scalar publication quantum yields 2730 vectors and 65520 bytes per page. At most three buffers plus three headers/registry entries and one copied triple are retained; eviction flushes before buffer reuse, and the sink releases the owner after finish/failure and independent descriptor close.
18
14
  */
19
15
  export function createRecoveryFileVectorTable(
20
16
  input: RecoveryFileVectorTableInput,
21
17
  ): RecoveryFileVectorTable {
22
18
  if (
23
19
  !input ||
24
- !Number.isSafeInteger(input.maxRows) ||
25
20
  input.maxRows < 1 ||
26
21
  input.maxRows > Math.floor(Number.MAX_SAFE_INTEGER / 24) ||
27
22
  typeof input.read !== "function" ||
@@ -72,7 +67,7 @@ export function createRecoveryFileVectorTable(
72
67
  const count: number = writing
73
68
  ? input.write(page.buffer, done, length - done, page.base * 24 + done)
74
69
  : input.read(page.buffer, done, length - done, page.base * 24 + done);
75
- if (!Number.isSafeInteger(count) || count <= 0 || count > length - done)
70
+ if (count <= 0 || count > length - done)
76
71
  throw new Error("Vector table transfer made invalid or zero progress");
77
72
  done += count;
78
73
  }
@@ -115,8 +110,6 @@ export function createRecoveryFileVectorTable(
115
110
  if (!Array.isArray(value) || value.length !== 3)
116
111
  throw new Error("A complete three-scalar vector is required");
117
112
  const copy: [number, number, number] = [value[0]!, value[1]!, value[2]!];
118
- if (!copy.every(Number.isFinite))
119
- throw new Error("Generated contour table value is not finite");
120
113
  return copy;
121
114
  };
122
115
  const store: (index: number, value: readonly number[]) => void = (
@@ -132,7 +125,7 @@ export function createRecoveryFileVectorTable(
132
125
  page.dirty = true;
133
126
  };
134
127
  const existing: (index: number) => void = (index: number): void => {
135
- if (!Number.isSafeInteger(index) || index < 0 || index >= rows)
128
+ if (index < 0 || index >= rows)
136
129
  throw new Error("Vector table address is outside its logical rows");
137
130
  };
138
131
  return {
@@ -7,24 +7,21 @@ import { writeAutoMovieRecoveryArtifact } from "../artifact/writeAutoMovieRecove
7
7
  import { readRecoveryFixedReference as read } from "./readRecoveryFixedReference";
8
8
 
9
9
  /**
10
- * Publish fitted atlas coefficients and a separate private source-ownership ledger.
11
- * The observation specification references a fixed registered mesh specification,
12
- * a fixed curve bundle supplying only automatic station levels, and optionally its
13
- * fixed open-continuation graph for deterministic unsupported-open-first work order.
14
- * Every referenced byte hash is verified before observation. This stage refits raw
15
- * observations in a joint chart; it is not a same-coefficient operator comparison.
16
- * An explicit stationSpacingMm selects a greedy increasing subsequence of saved
17
- * levels with the final endpoint retained, and reclassifies every coalesced slab.
18
- * scalarWindowMm restricts work to complete slabs with positive window overlap;
19
- * declared bounds and the conservative whole-slab extent are published separately.
10
+ * Publish fitted atlas coefficients and a separate private source-ownership
11
+ * ledger. The observation specification references a fixed registered mesh
12
+ * specification, a fixed curve bundle supplying only automatic station levels,
13
+ * and optionally its fixed open-continuation graph for deterministic
14
+ * unsupported-open-first work order. Every referenced byte hash is verified
15
+ * before observation. This stage refits raw observations in a joint chart; it
16
+ * is not a same-coefficient operator comparison. An explicit stationSpacingMm
17
+ * selects a greedy increasing subsequence of saved levels with the final
18
+ * endpoint retained, and reclassifies every coalesced slab. scalarWindowMm
19
+ * restricts work to complete slabs with positive window overlap; declared
20
+ * bounds and the conservative whole-slab extent are published separately.
20
21
  *
21
- * @evidence contracts/development/implementation.md#principled-implementation Hash-admitted observations are clipped at saved automatic levels or an explicitly declared physical-spacing subsequence. Private topology, harmonic mapping and constrained joint Bernstein fitting publish independent coefficients.
22
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Fixed input admission, private ownership publication and public coefficient publication remain separate from engine realization, which opens only atlas.json.
23
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Source arrays and incidence remain in this process and the private ledger; neither source triangle arrays, normals nor mesh references enter the public geometry contract.
22
+ * @evidence contracts/development/implementation.md#principled-implementation Hash-admitted observations are clipped at saved automatic levels or an explicitly declared physical-spacing subsequence. Private topology, harmonic mapping and constrained joint Bernstein fitting publish independent coefficients. Source arrays and incidence remain in this process and the private ledger; neither source triangle arrays, normals nor mesh references enter the public geometry contract.
23
+ * @evidence contracts/development/implementation.md#efficient-algorithms Fixed input admission, private ownership publication and public coefficient publication remain separate from engine realization, which opens only atlas.json. Each fixed file is read and hashed once; source assembly is linear in bytes and faces. Observation helpers own indexed clipping and bounded chart solves, while publication streams JSON without a whole serialized string. Saved station levels and open-event addresses define one work order; admitted source arrays serve topology and fitting without another extraction or hidden geometry fallback. Source and curve publications remain live for one observation command and are released on return; explicit interval/chart/patch/iteration budgets bound retained fitted output and immutable files belong to the caller.
24
24
  * @evidence contracts/development/common.md#meaningful-documentation States fixed-byte admission, new-fit comparison scope, deterministic work priority, incomplete chart coverage and explicit C0/external-jet limitations.
25
- * @evidence contracts/development/implementation.md#efficient-algorithms Each fixed file is read and hashed once; source assembly is linear in bytes and faces. Observation helpers own indexed clipping and bounded chart solves, while publication streams JSON without a whole serialized string.
26
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Saved station levels and open-event addresses define one work order; admitted source arrays serve topology and fitting without another extraction or hidden geometry fallback.
27
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Source and curve publications remain live for one observation command and are released on return; explicit interval/chart/patch/iteration budgets bound retained fitted output and immutable files belong to the caller.
28
25
  */
29
26
  export function observeRecoveryAtlas(
30
27
  inputFile: string,
@@ -136,10 +133,7 @@ export function observeRecoveryAtlas(
136
133
  (section: { coordinateMm: number }): number => section.coordinateMm,
137
134
  ),
138
135
  levelsMm: number[] = [];
139
- if (
140
- input.stationSpacingMm !== undefined &&
141
- !(input.stationSpacingMm > 0 && Number.isFinite(input.stationSpacingMm))
142
- )
136
+ if (input.stationSpacingMm !== undefined && !(input.stationSpacingMm > 0))
143
137
  throw new Error(
144
138
  "An explicit positive physical station-coalescing distance is required",
145
139
  );
@@ -172,14 +166,12 @@ export function observeRecoveryAtlas(
172
166
  }[] = [];
173
167
  for (const query of input.privateWitnessQueries ?? []) {
174
168
  if (
175
- !Number.isSafeInteger(query.face) ||
176
169
  query.face < 0 ||
177
170
  query.face >= triangles.length ||
178
171
  !Array.isArray(query.barycentric) ||
179
172
  query.barycentric.length !== 3 ||
180
173
  query.barycentric.some(
181
- (value: number): boolean =>
182
- !Number.isFinite(value) || value < 0 || value > 1,
174
+ (value: number): boolean => value < 0 || value > 1,
183
175
  ) ||
184
176
  Math.abs(
185
177
  query.barycentric.reduce(
@@ -224,7 +216,7 @@ export function observeRecoveryAtlas(
224
216
  });
225
217
  }
226
218
  for (const face of witnessFaces) {
227
- if (!Number.isSafeInteger(face) || face < 0 || face >= triangles.length)
219
+ if (face < 0 || face >= triangles.length)
228
220
  throw new Error(
229
221
  "Private diagnostic witness face addresses are outside the fixed source",
230
222
  );