@automovie/template 0.0.0 → 0.2.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 (741) hide show
  1. package/README.md +14 -18
  2. package/generated/pnpm-workspace.json +54 -0
  3. package/{lib → generated}/skills/3d-modeling/conditioning.md +24 -27
  4. package/generated/skills/3d-modeling/crafting/SKILL.md +16 -0
  5. package/generated/skills/3d-modeling/crafting/construction.md +70 -0
  6. package/generated/skills/3d-modeling/crafting/lofting.md +73 -0
  7. package/generated/skills/3d-modeling/crafting/recovery.md +25 -0
  8. package/generated/skills/3d-modeling/diffusion/image-hints.md +30 -0
  9. package/generated/skills/3d-modeling/diffusion/models.md +27 -0
  10. package/generated/skills/3d-modeling/diffusion/prompts.md +9 -0
  11. package/generated/skills/3d-modeling/diffusion/request.md +16 -0
  12. package/generated/skills/3d-modeling/diffusion/shape-hints.md +31 -0
  13. package/generated/skills/3d-modeling/inspection.md +55 -0
  14. package/generated/skills/3d-modeling/modularization.md +25 -0
  15. package/{lib → generated}/skills/3d-modeling/rigging.md +21 -27
  16. package/{lib → generated}/skills/3d-modeling/sources.md +6 -6
  17. package/{lib → generated}/skills/contracts/development/design.md +2 -3
  18. package/{lib → generated}/skills/contracts/development/implementation.md +4 -4
  19. package/{lib → generated}/skills/contracts/development/testing.md +1 -1
  20. package/generated/skills/development/repair.md +13 -0
  21. package/{lib → generated}/skills/documentation/SKILL.md +2 -8
  22. package/generated/skills/documentation/writing.md +63 -0
  23. package/{lib/skills/motion → generated/skills/motion/laws}/authoring.md +13 -9
  24. package/{lib/skills/motion → generated/skills/motion/laws}/contacts.md +3 -1
  25. package/{lib/skills/motion/laws.md → generated/skills/motion/laws/declaration.md} +8 -8
  26. package/generated/skills/motion/laws/transitions.md +37 -0
  27. package/{lib/skills/motion → generated/skills/motion/laws}/variation.md +5 -5
  28. package/{lib/skills/motion → generated/skills/motion/laws}/verification.md +7 -13
  29. package/generated/skills/prompting/SKILL.md +82 -0
  30. package/{lib → generated}/skills/visual-debugging/capture.md +13 -11
  31. package/{lib → generated}/skills/visual-debugging/comparison.md +7 -9
  32. package/{lib → generated}/skills/visual-debugging/correction-rounds.md +13 -13
  33. package/{lib → generated}/skills/visual-debugging/passes.md +9 -9
  34. package/lib/IAutoMovieScaffoldProps.d.ts +14 -6
  35. package/lib/assertScaffoldProjectName.d.ts +1 -1
  36. package/lib/assertScaffoldProjectName.js +1 -1
  37. package/lib/createAutoMovieScaffold.d.ts +27 -0
  38. package/lib/createAutoMovieScaffold.js +145 -0
  39. package/lib/createAutoMovieScaffold.js.map +1 -0
  40. package/lib/index.d.ts +1 -45
  41. package/lib/index.js +1 -45
  42. package/lib/index.js.map +1 -1
  43. package/lib/listAutoMovieScaffoldFiles.d.ts +2 -2
  44. package/lib/listAutoMovieScaffoldFiles.js +2 -2
  45. package/package.json +9 -12
  46. package/scaffold/instructions/.agents/skills/3d-modeling/SKILL.md +14 -11
  47. package/scaffold/instructions/.agents/skills/3d-modeling/coarse-forms.md +7 -9
  48. package/scaffold/instructions/.agents/skills/3d-modeling/diffusion/SKILL.md +20 -0
  49. package/scaffold/instructions/.agents/skills/audio/SKILL.md +10 -21
  50. package/scaffold/instructions/.agents/skills/audio/acquisition.md +24 -12
  51. package/scaffold/instructions/.agents/skills/audio/film-sound.md +25 -0
  52. package/scaffold/instructions/.agents/skills/audio/generated-sound.md +15 -0
  53. package/scaffold/instructions/.agents/skills/audio/sound-effects.md +11 -17
  54. package/scaffold/instructions/.agents/skills/audio/soundtrack.md +5 -0
  55. package/scaffold/instructions/.agents/skills/contracts/SKILL.md +10 -16
  56. package/scaffold/instructions/.agents/skills/contracts/development/SKILL.md +5 -5
  57. package/scaffold/instructions/.agents/skills/contracts/development/behaviors.md +5 -7
  58. package/scaffold/instructions/.agents/skills/contracts/development/composition.md +12 -8
  59. package/scaffold/instructions/.agents/skills/contracts/development/entities.md +7 -6
  60. package/scaffold/instructions/.agents/skills/contracts/development/statements/behaviors.md +20 -20
  61. package/scaffold/instructions/.agents/skills/contracts/development/statements/composition.md +18 -16
  62. package/scaffold/instructions/.agents/skills/contracts/development/statements/entities.md +13 -12
  63. package/scaffold/instructions/.agents/skills/contracts/story/SKILL.md +13 -15
  64. package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/brief.md +3 -3
  65. package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/common.md +2 -2
  66. package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/narratives.md +1 -1
  67. package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/screenplay.md +1 -1
  68. package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/scripts.md +2 -2
  69. package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/settings.md +1 -1
  70. package/scaffold/instructions/.agents/skills/contracts/story/shared/discovery/treatments.md +1 -1
  71. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/common.md +6 -6
  72. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/common.md +3 -3
  73. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/realized.md +4 -4
  74. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/scripts.md +2 -2
  75. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/realized.md +4 -4
  76. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/scripts.md +3 -3
  77. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/brief.md +3 -3
  78. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/common.md +3 -7
  79. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/index.md +3 -7
  80. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/narratives.md +5 -5
  81. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/review.md +3 -3
  82. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/screenplay.md +4 -4
  83. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/scripts.md +4 -4
  84. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/settings.md +3 -7
  85. package/scaffold/instructions/.agents/skills/contracts/story/shared/obligations/treatments.md +4 -4
  86. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/brief.md +2 -6
  87. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/common.md +2 -6
  88. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/index.md +2 -6
  89. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/narratives.md +5 -5
  90. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/realized.md +2 -6
  91. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/research.md +4 -4
  92. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/review.md +5 -5
  93. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/screenplay.md +5 -9
  94. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/scripts.md +3 -7
  95. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/settings.md +2 -6
  96. package/scaffold/instructions/.agents/skills/contracts/story/shared/principles/treatments.md +3 -3
  97. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/brief.md +4 -7
  98. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/common.md +7 -7
  99. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/narratives.md +2 -2
  100. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/screenplay.md +3 -4
  101. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/scripts.md +4 -4
  102. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/settings.md +5 -7
  103. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/discovery/treatments.md +2 -2
  104. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/common.md +37 -44
  105. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/common.md +7 -8
  106. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/realized.md +4 -4
  107. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/scripts.md +5 -8
  108. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/realized.md +12 -11
  109. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/scripts.md +3 -3
  110. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/brief.md +12 -12
  111. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/common.md +16 -16
  112. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/index.md +7 -5
  113. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/narratives.md +14 -14
  114. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/review.md +16 -20
  115. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/screenplay.md +7 -10
  116. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/scripts.md +5 -6
  117. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/settings.md +29 -22
  118. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/obligations/treatments.md +13 -15
  119. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/brief.md +9 -17
  120. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/common.md +4 -7
  121. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/index.md +8 -7
  122. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/narratives.md +29 -25
  123. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/realized.md +11 -10
  124. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/research.md +18 -18
  125. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/review.md +13 -25
  126. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/screenplay.md +41 -45
  127. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/scripts.md +16 -16
  128. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/settings.md +8 -24
  129. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/principles/treatments.md +12 -17
  130. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/screenplay.md +7 -8
  131. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/scripts.md +4 -5
  132. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/upstream/treatments.md +3 -4
  133. package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/screenplay.md +3 -3
  134. package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/scripts.md +3 -3
  135. package/scaffold/instructions/.agents/skills/contracts/story/shared/upstream/treatments.md +3 -3
  136. package/scaffold/instructions/.agents/skills/development/SKILL.md +5 -7
  137. package/scaffold/instructions/.agents/skills/development/entities.md +20 -20
  138. package/scaffold/instructions/.agents/skills/development/reuse.md +19 -18
  139. package/scaffold/instructions/.agents/skills/development/source-layout.md +32 -24
  140. package/scaffold/instructions/.agents/skills/development/testing.md +13 -10
  141. package/scaffold/instructions/.agents/skills/direct-film/SKILL.md +51 -0
  142. package/scaffold/instructions/.agents/skills/evidence/SKILL.md +1 -1
  143. package/scaffold/instructions/.agents/skills/evidence/adoption.md +4 -4
  144. package/scaffold/instructions/.agents/skills/evidence/answering.md +2 -4
  145. package/scaffold/instructions/.agents/skills/evidence/configuration.md +8 -8
  146. package/scaffold/instructions/.agents/skills/image/SKILL.md +16 -58
  147. package/scaffold/instructions/.agents/skills/image/canon-references.md +27 -0
  148. package/scaffold/instructions/.agents/skills/image/conditioning.md +27 -0
  149. package/scaffold/instructions/.agents/skills/image/consistency.md +23 -0
  150. package/scaffold/instructions/.agents/skills/image/editing.md +15 -0
  151. package/scaffold/instructions/.agents/skills/image/finishing.md +11 -0
  152. package/scaffold/instructions/.agents/skills/image/models.md +18 -0
  153. package/scaffold/instructions/.agents/skills/image/prompting.md +25 -0
  154. package/scaffold/instructions/.agents/skills/image/turnaround-views.md +13 -0
  155. package/scaffold/instructions/.agents/skills/motion/SKILL.md +31 -47
  156. package/scaffold/instructions/.agents/skills/motion/catalog-cases.md +24 -4
  157. package/scaffold/instructions/.agents/skills/motion/compose/composition.md +58 -0
  158. package/scaffold/instructions/.agents/skills/motion/compose/refusals.md +15 -0
  159. package/scaffold/instructions/.agents/skills/motion/control-channels.md +20 -8
  160. package/scaffold/instructions/.agents/skills/motion/diffusion/SKILL.md +24 -0
  161. package/scaffold/instructions/.agents/skills/motion/diffusion/clips.md +17 -0
  162. package/scaffold/instructions/.agents/skills/motion/diffusion/hints.md +37 -0
  163. package/scaffold/instructions/.agents/skills/motion/diffusion/models.md +24 -0
  164. package/scaffold/instructions/.agents/skills/motion/diffusion/tracing.md +53 -0
  165. package/scaffold/instructions/.agents/skills/motion/frame-evaluation.md +8 -12
  166. package/scaffold/instructions/.agents/skills/motion/laws/$verification.md +0 -0
  167. package/scaffold/instructions/.agents/skills/motion/laws/SKILL.md +19 -0
  168. package/scaffold/instructions/.agents/skills/motion/laws/extension.md +35 -0
  169. package/scaffold/instructions/.agents/skills/motion/laws/method-references.md +21 -0
  170. package/scaffold/instructions/.agents/skills/motion/physical-feedback.md +16 -16
  171. package/scaffold/instructions/.agents/skills/motion/retargeting.md +8 -10
  172. package/scaffold/instructions/.agents/skills/motion/segment-review.md +4 -6
  173. package/scaffold/instructions/.agents/skills/motion/staging.md +21 -13
  174. package/scaffold/instructions/.agents/skills/production/SKILL.md +19 -19
  175. package/scaffold/instructions/.agents/skills/production/assembly.md +14 -12
  176. package/scaffold/instructions/.agents/skills/production/captions.md +15 -0
  177. package/scaffold/instructions/.agents/skills/production/media-records.md +13 -12
  178. package/scaffold/instructions/.agents/skills/production/project-context.md +33 -12
  179. package/scaffold/instructions/.agents/skills/production/reorganization.md +13 -0
  180. package/scaffold/instructions/.agents/skills/production/stage-caches.md +11 -11
  181. package/scaffold/instructions/.agents/skills/production/sustained-runs.md +9 -9
  182. package/scaffold/instructions/.agents/skills/review/SKILL.md +3 -5
  183. package/scaffold/instructions/.agents/skills/review/delivery-review.md +25 -29
  184. package/scaffold/instructions/.agents/skills/review/estimation.md +10 -10
  185. package/scaffold/instructions/.agents/skills/review/independent-reading.md +10 -18
  186. package/scaffold/instructions/.agents/skills/review/narrative-rounds.md +10 -36
  187. package/scaffold/instructions/.agents/skills/review/source-review.md +6 -18
  188. package/scaffold/instructions/.agents/skills/story/SKILL.md +11 -11
  189. package/scaffold/instructions/.agents/skills/story/answers.md +27 -0
  190. package/scaffold/instructions/.agents/skills/story/correction/inspection.md +8 -12
  191. package/scaffold/instructions/.agents/skills/story/correction/repair.md +8 -12
  192. package/scaffold/instructions/.agents/skills/story/document-layout.md +9 -12
  193. package/scaffold/instructions/.agents/skills/story/layers/SKILL.md +10 -9
  194. package/scaffold/instructions/.agents/skills/story/layers/brief.md +7 -19
  195. package/scaffold/instructions/.agents/skills/story/layers/notation.md +25 -16
  196. package/scaffold/instructions/.agents/skills/story/layers/screenplay.md +23 -7
  197. package/scaffold/instructions/.agents/skills/story/layers/scripts.md +4 -4
  198. package/scaffold/instructions/.agents/skills/story/layers/settings.md +10 -16
  199. package/scaffold/instructions/.agents/skills/story/layers/shots.md +27 -0
  200. package/scaffold/instructions/.agents/skills/story/layers/treatments.md +4 -4
  201. package/scaffold/instructions/.agents/skills/story/planning/SKILL.md +4 -4
  202. package/scaffold/instructions/.agents/skills/story/planning/direction.md +4 -4
  203. package/scaffold/instructions/.agents/skills/story/planning/discovery.md +8 -7
  204. package/scaffold/instructions/.agents/skills/story/planning/requirements.md +11 -11
  205. package/scaffold/instructions/.agents/skills/story/planning/research.md +24 -11
  206. package/scaffold/instructions/.agents/skills/story/workflow/SKILL.md +14 -0
  207. package/scaffold/instructions/.agents/skills/story/workflow/long.md +38 -0
  208. package/scaffold/instructions/.agents/skills/story/workflow/routes.md +40 -0
  209. package/scaffold/instructions/.agents/skills/story/workflow/short.md +33 -0
  210. package/scaffold/instructions/.agents/skills/video/SKILL.md +12 -21
  211. package/scaffold/instructions/.agents/skills/video/diffusion/SKILL.md +21 -0
  212. package/scaffold/instructions/.agents/skills/video/diffusion/continuity.md +21 -0
  213. package/scaffold/instructions/.agents/skills/video/diffusion/hints.md +14 -0
  214. package/scaffold/instructions/.agents/skills/video/diffusion/models.md +26 -0
  215. package/scaffold/instructions/.agents/skills/video/diffusion/prompts.md +45 -0
  216. package/scaffold/instructions/.agents/skills/video/finishing.md +44 -0
  217. package/scaffold/instructions/.agents/skills/video/generation.md +24 -13
  218. package/scaffold/instructions/.agents/skills/video/requests.md +46 -0
  219. package/scaffold/instructions/.agents/skills/visual-debugging/SKILL.md +5 -6
  220. package/scaffold/instructions/AGENTS.md +30 -56
  221. package/scaffold/production/PROJECT.md +1 -1
  222. package/scaffold/production/README.md +50 -96
  223. package/scaffold/production/_gitignore +1 -2
  224. package/scaffold/production/index.html +4 -8
  225. package/scaffold/production/lint.config.ts +1 -1
  226. package/scaffold/production/package.json +31 -31
  227. package/scaffold/production/src/IFilm.ts +3 -3
  228. package/scaffold/production/src/IFilmProduction.ts +16 -5
  229. package/scaffold/production/src/composition/films/index.ts +3 -2
  230. package/scaffold/production/src/composition/films/starter.ts +2 -2
  231. package/scaffold/production/src/main.ts +9 -195
  232. package/scaffold/production/src/markFilmProduction.ts +43 -0
  233. package/scaffold/production/src/selectFilm.ts +3 -5
  234. package/scaffold/production/src/subjects.ts +59 -0
  235. package/scaffold/production/vite.config.ts +4 -2
  236. package/scaffold/workspace/README.md +5 -7
  237. package/scaffold/workspace/package.json +1 -1
  238. package/src/IAutoMovieScaffoldProps.ts +15 -6
  239. package/src/assertScaffoldProjectName.ts +1 -1
  240. package/src/createAutoMovieScaffold.ts +152 -0
  241. package/src/index.ts +1 -46
  242. package/src/listAutoMovieScaffoldFiles.ts +2 -2
  243. package/build/resolveTemplateVersions.ts +0 -92
  244. package/build/syncScaffoldInstructions.ts +0 -28
  245. package/lib/AUTOMOVIE_TEMPLATE_CATALOGS.d.ts +0 -14
  246. package/lib/AUTOMOVIE_TEMPLATE_CATALOGS.js +0 -52
  247. package/lib/AUTOMOVIE_TEMPLATE_CATALOGS.js.map +0 -1
  248. package/lib/AUTOMOVIE_TEMPLATE_VERSIONS.d.ts +0 -2
  249. package/lib/AUTOMOVIE_TEMPLATE_VERSIONS.js +0 -42
  250. package/lib/AUTOMOVIE_TEMPLATE_VERSIONS.js.map +0 -1
  251. package/lib/AutoMovieScaffoldLayer.d.ts +0 -15
  252. package/lib/AutoMovieScaffoldLayer.js +0 -3
  253. package/lib/AutoMovieScaffoldLayer.js.map +0 -1
  254. package/lib/FILE_ATTRIBUTE_DIRECTORY.d.ts +0 -2
  255. package/lib/FILE_ATTRIBUTE_DIRECTORY.js +0 -6
  256. package/lib/FILE_ATTRIBUTE_DIRECTORY.js.map +0 -1
  257. package/lib/IAutoMovieCatalogVersionProps.d.ts +0 -16
  258. package/lib/IAutoMovieCatalogVersionProps.js +0 -3
  259. package/lib/IAutoMovieCatalogVersionProps.js.map +0 -1
  260. package/lib/IAutoMovieScaffoldSourceEntry.d.ts +0 -18
  261. package/lib/IAutoMovieScaffoldSourceEntry.js +0 -3
  262. package/lib/IAutoMovieScaffoldSourceEntry.js.map +0 -1
  263. package/lib/IAutoMovieTemplateDependencyVersionsProps.d.ts +0 -17
  264. package/lib/IAutoMovieTemplateDependencyVersionsProps.js +0 -3
  265. package/lib/IAutoMovieTemplateDependencyVersionsProps.js.map +0 -1
  266. package/lib/IAutoMovieWorkspacePackageVersions.d.ts +0 -34
  267. package/lib/IAutoMovieWorkspacePackageVersions.js +0 -3
  268. package/lib/IAutoMovieWorkspacePackageVersions.js.map +0 -1
  269. package/lib/IBoundChild.d.ts +0 -71
  270. package/lib/IBoundChild.js +0 -3
  271. package/lib/IBoundChild.js.map +0 -1
  272. package/lib/IBoundChildStatus.d.ts +0 -20
  273. package/lib/IBoundChildStatus.js +0 -3
  274. package/lib/IBoundChildStatus.js.map +0 -1
  275. package/lib/IBoundParent.d.ts +0 -61
  276. package/lib/IBoundParent.js +0 -3
  277. package/lib/IBoundParent.js.map +0 -1
  278. package/lib/IBoundParentStatus.d.ts +0 -14
  279. package/lib/IBoundParentStatus.js +0 -3
  280. package/lib/IBoundParentStatus.js.map +0 -1
  281. package/lib/ICreateResult.d.ts +0 -27
  282. package/lib/ICreateResult.js +0 -3
  283. package/lib/ICreateResult.js.map +0 -1
  284. package/lib/IScaffoldCompletedFilePublicationOutcome.d.ts +0 -16
  285. package/lib/IScaffoldCompletedFilePublicationOutcome.js +0 -3
  286. package/lib/IScaffoldCompletedFilePublicationOutcome.js.map +0 -1
  287. package/lib/IScaffoldCompletedPublication.d.ts +0 -15
  288. package/lib/IScaffoldCompletedPublication.js +0 -3
  289. package/lib/IScaffoldCompletedPublication.js.map +0 -1
  290. package/lib/IScaffoldFileSnapshot.d.ts +0 -24
  291. package/lib/IScaffoldFileSnapshot.js +0 -3
  292. package/lib/IScaffoldFileSnapshot.js.map +0 -1
  293. package/lib/IScaffoldParentPublicationRequest.d.ts +0 -26
  294. package/lib/IScaffoldParentPublicationRequest.js +0 -3
  295. package/lib/IScaffoldParentPublicationRequest.js.map +0 -1
  296. package/lib/IScaffoldPartialFilePublicationOutcome.d.ts +0 -22
  297. package/lib/IScaffoldPartialFilePublicationOutcome.js +0 -3
  298. package/lib/IScaffoldPartialFilePublicationOutcome.js.map +0 -1
  299. package/lib/IScaffoldPhysicalDirectory.d.ts +0 -20
  300. package/lib/IScaffoldPhysicalDirectory.js +0 -3
  301. package/lib/IScaffoldPhysicalDirectory.js.map +0 -1
  302. package/lib/IScaffoldPosixConstants.d.ts +0 -24
  303. package/lib/IScaffoldPosixConstants.js +0 -3
  304. package/lib/IScaffoldPosixConstants.js.map +0 -1
  305. package/lib/IScaffoldPublicationEntry.d.ts +0 -20
  306. package/lib/IScaffoldPublicationEntry.js +0 -3
  307. package/lib/IScaffoldPublicationEntry.js.map +0 -1
  308. package/lib/IScaffoldPublicationFailure.d.ts +0 -18
  309. package/lib/IScaffoldPublicationFailure.js +0 -3
  310. package/lib/IScaffoldPublicationFailure.js.map +0 -1
  311. package/lib/IScaffoldPublicationOptions.d.ts +0 -17
  312. package/lib/IScaffoldPublicationOptions.js +0 -3
  313. package/lib/IScaffoldPublicationOptions.js.map +0 -1
  314. package/lib/IScaffoldPublicationReceipt.d.ts +0 -25
  315. package/lib/IScaffoldPublicationReceipt.js +0 -3
  316. package/lib/IScaffoldPublicationReceipt.js.map +0 -1
  317. package/lib/IScaffoldRefusedFilePublicationOutcome.d.ts +0 -18
  318. package/lib/IScaffoldRefusedFilePublicationOutcome.js +0 -3
  319. package/lib/IScaffoldRefusedFilePublicationOutcome.js.map +0 -1
  320. package/lib/IScaffoldSyncPlan.d.ts +0 -25
  321. package/lib/IScaffoldSyncPlan.js +0 -3
  322. package/lib/IScaffoldSyncPlan.js.map +0 -1
  323. package/lib/IScaffoldSyncProps.d.ts +0 -16
  324. package/lib/IScaffoldSyncProps.js +0 -3
  325. package/lib/IScaffoldSyncProps.js.map +0 -1
  326. package/lib/IWindowsFileInformation.d.ts +0 -20
  327. package/lib/IWindowsFileInformation.js +0 -3
  328. package/lib/IWindowsFileInformation.js.map +0 -1
  329. package/lib/IWindowsLibrary.d.ts +0 -127
  330. package/lib/IWindowsLibrary.js +0 -3
  331. package/lib/IWindowsLibrary.js.map +0 -1
  332. package/lib/SCAFFOLD_SYNC_STATE_FILE.d.ts +0 -4
  333. package/lib/SCAFFOLD_SYNC_STATE_FILE.js +0 -8
  334. package/lib/SCAFFOLD_SYNC_STATE_FILE.js.map +0 -1
  335. package/lib/ScaffoldFilePublicationOutcome.d.ts +0 -14
  336. package/lib/ScaffoldFilePublicationOutcome.js +0 -3
  337. package/lib/ScaffoldFilePublicationOutcome.js.map +0 -1
  338. package/lib/ScaffoldParentChangedError.d.ts +0 -11
  339. package/lib/ScaffoldParentChangedError.js +0 -19
  340. package/lib/ScaffoldParentChangedError.js.map +0 -1
  341. package/lib/ScaffoldPublicationError.d.ts +0 -17
  342. package/lib/ScaffoldPublicationError.js +0 -46
  343. package/lib/ScaffoldPublicationError.js.map +0 -1
  344. package/lib/assertOrdinaryFile.d.ts +0 -13
  345. package/lib/assertOrdinaryFile.js +0 -20
  346. package/lib/assertOrdinaryFile.js.map +0 -1
  347. package/lib/assertOrdinarySingleLinkFile.d.ts +0 -13
  348. package/lib/assertOrdinarySingleLinkFile.js +0 -22
  349. package/lib/assertOrdinarySingleLinkFile.js.map +0 -1
  350. package/lib/assertScaffoldOwnership.d.ts +0 -13
  351. package/lib/assertScaffoldOwnership.js +0 -24
  352. package/lib/assertScaffoldOwnership.js.map +0 -1
  353. package/lib/assertScaffoldPhysicalDirectory.d.ts +0 -16
  354. package/lib/assertScaffoldPhysicalDirectory.js +0 -26
  355. package/lib/assertScaffoldPhysicalDirectory.js.map +0 -1
  356. package/lib/attachScaffoldSyncState.d.ts +0 -18
  357. package/lib/attachScaffoldSyncState.js +0 -30
  358. package/lib/attachScaffoldSyncState.js.map +0 -1
  359. package/lib/captureEmptyScaffoldPhysicalDirectory.d.ts +0 -13
  360. package/lib/captureEmptyScaffoldPhysicalDirectory.js +0 -69
  361. package/lib/captureEmptyScaffoldPhysicalDirectory.js.map +0 -1
  362. package/lib/captureScaffoldFile.d.ts +0 -13
  363. package/lib/captureScaffoldFile.js +0 -67
  364. package/lib/captureScaffoldFile.js.map +0 -1
  365. package/lib/captureScaffoldPhysicalDirectory.d.ts +0 -13
  366. package/lib/captureScaffoldPhysicalDirectory.js +0 -63
  367. package/lib/captureScaffoldPhysicalDirectory.js.map +0 -1
  368. package/lib/combineScaffoldFailures.d.ts +0 -19
  369. package/lib/combineScaffoldFailures.js +0 -32
  370. package/lib/combineScaffoldFailures.js.map +0 -1
  371. package/lib/createAutoMovieCatalogVersionResolver.d.ts +0 -17
  372. package/lib/createAutoMovieCatalogVersionResolver.js +0 -64
  373. package/lib/createAutoMovieCatalogVersionResolver.js.map +0 -1
  374. package/lib/createScaffoldSyncState.d.ts +0 -12
  375. package/lib/createScaffoldSyncState.js +0 -26
  376. package/lib/createScaffoldSyncState.js.map +0 -1
  377. package/lib/createScaffoldVariables.d.ts +0 -25
  378. package/lib/createScaffoldVariables.js +0 -41
  379. package/lib/createScaffoldVariables.js.map +0 -1
  380. package/lib/ensureScaffoldBaseDirectory.d.ts +0 -19
  381. package/lib/ensureScaffoldBaseDirectory.js +0 -89
  382. package/lib/ensureScaffoldBaseDirectory.js.map +0 -1
  383. package/lib/ensureScaffoldFileDirectory.d.ts +0 -25
  384. package/lib/ensureScaffoldFileDirectory.js +0 -103
  385. package/lib/ensureScaffoldFileDirectory.js.map +0 -1
  386. package/lib/inside.d.ts +0 -12
  387. package/lib/inside.js +0 -57
  388. package/lib/inside.js.map +0 -1
  389. package/lib/isScaffoldInstruction.d.ts +0 -12
  390. package/lib/isScaffoldInstruction.js +0 -29
  391. package/lib/isScaffoldInstruction.js.map +0 -1
  392. package/lib/loadWindowsLibrary.d.ts +0 -13
  393. package/lib/loadWindowsLibrary.js +0 -180
  394. package/lib/loadWindowsLibrary.js.map +0 -1
  395. package/lib/mergeScaffoldFiles.d.ts +0 -18
  396. package/lib/mergeScaffoldFiles.js +0 -37
  397. package/lib/mergeScaffoldFiles.js.map +0 -1
  398. package/lib/missingPath.d.ts +0 -12
  399. package/lib/missingPath.js +0 -18
  400. package/lib/missingPath.js.map +0 -1
  401. package/lib/nativeError.d.ts +0 -12
  402. package/lib/nativeError.js +0 -17
  403. package/lib/nativeError.js.map +0 -1
  404. package/lib/openPosixParent.d.ts +0 -13
  405. package/lib/openPosixParent.js +0 -135
  406. package/lib/openPosixParent.js.map +0 -1
  407. package/lib/openWindowsParent.d.ts +0 -13
  408. package/lib/openWindowsParent.js +0 -224
  409. package/lib/openWindowsParent.js.map +0 -1
  410. package/lib/overwriteScaffoldFile.d.ts +0 -22
  411. package/lib/overwriteScaffoldFile.js +0 -214
  412. package/lib/overwriteScaffoldFile.js.map +0 -1
  413. package/lib/physicalDirectoryIdentity.d.ts +0 -15
  414. package/lib/physicalDirectoryIdentity.js +0 -65
  415. package/lib/physicalDirectoryIdentity.js.map +0 -1
  416. package/lib/physicalVersion.d.ts +0 -13
  417. package/lib/physicalVersion.js +0 -18
  418. package/lib/physicalVersion.js.map +0 -1
  419. package/lib/planScaffoldPublication.d.ts +0 -22
  420. package/lib/planScaffoldPublication.js +0 -100
  421. package/lib/planScaffoldPublication.js.map +0 -1
  422. package/lib/planScaffoldSync.d.ts +0 -14
  423. package/lib/planScaffoldSync.js +0 -102
  424. package/lib/planScaffoldSync.js.map +0 -1
  425. package/lib/publishFiles.d.ts +0 -23
  426. package/lib/publishFiles.js +0 -124
  427. package/lib/publishFiles.js.map +0 -1
  428. package/lib/publishNativeScaffoldFile.d.ts +0 -21
  429. package/lib/publishNativeScaffoldFile.js +0 -211
  430. package/lib/publishNativeScaffoldFile.js.map +0 -1
  431. package/lib/publishScaffoldCandidate.d.ts +0 -24
  432. package/lib/publishScaffoldCandidate.js +0 -70
  433. package/lib/publishScaffoldCandidate.js.map +0 -1
  434. package/lib/readAutoMovieScaffoldSources.d.ts +0 -20
  435. package/lib/readAutoMovieScaffoldSources.js +0 -103
  436. package/lib/readAutoMovieScaffoldSources.js.map +0 -1
  437. package/lib/readScaffoldSyncFile.d.ts +0 -16
  438. package/lib/readScaffoldSyncFile.js +0 -64
  439. package/lib/readScaffoldSyncFile.js.map +0 -1
  440. package/lib/renderScaffold.d.ts +0 -19
  441. package/lib/renderScaffold.js +0 -33
  442. package/lib/renderScaffold.js.map +0 -1
  443. package/lib/renderScaffoldEntries.d.ts +0 -20
  444. package/lib/renderScaffoldEntries.js +0 -106
  445. package/lib/renderScaffoldEntries.js.map +0 -1
  446. package/lib/renderScaffoldInstructions.d.ts +0 -17
  447. package/lib/renderScaffoldInstructions.js +0 -23
  448. package/lib/renderScaffoldInstructions.js.map +0 -1
  449. package/lib/renderScaffoldLayer.d.ts +0 -20
  450. package/lib/renderScaffoldLayer.js +0 -28
  451. package/lib/renderScaffoldLayer.js.map +0 -1
  452. package/lib/renderTemplate.d.ts +0 -19
  453. package/lib/renderTemplate.js +0 -56
  454. package/lib/renderTemplate.js.map +0 -1
  455. package/lib/renderWorkspaceProductionScaffold.d.ts +0 -19
  456. package/lib/renderWorkspaceProductionScaffold.js +0 -30
  457. package/lib/renderWorkspaceProductionScaffold.js.map +0 -1
  458. package/lib/renderWorkspaceScaffold.d.ts +0 -19
  459. package/lib/renderWorkspaceScaffold.js +0 -33
  460. package/lib/renderWorkspaceScaffold.js.map +0 -1
  461. package/lib/replaceSharedScaffoldFile.d.ts +0 -30
  462. package/lib/replaceSharedScaffoldFile.js +0 -106
  463. package/lib/replaceSharedScaffoldFile.js.map +0 -1
  464. package/lib/resolveAutoMovieCatalogVersion.d.ts +0 -19
  465. package/lib/resolveAutoMovieCatalogVersion.js +0 -24
  466. package/lib/resolveAutoMovieCatalogVersion.js.map +0 -1
  467. package/lib/resolveAutoMovieTemplateDependencyVersions.d.ts +0 -19
  468. package/lib/resolveAutoMovieTemplateDependencyVersions.js +0 -62
  469. package/lib/resolveAutoMovieTemplateDependencyVersions.js.map +0 -1
  470. package/lib/resolveScaffoldPosixConstants.d.ts +0 -13
  471. package/lib/resolveScaffoldPosixConstants.js +0 -44
  472. package/lib/resolveScaffoldPosixConstants.js.map +0 -1
  473. package/lib/scaffoldAssetDirectory.d.ts +0 -19
  474. package/lib/scaffoldAssetDirectory.js +0 -63
  475. package/lib/scaffoldAssetDirectory.js.map +0 -1
  476. package/lib/scaffoldPhysicalIdentity.d.ts +0 -18
  477. package/lib/scaffoldPhysicalIdentity.js +0 -22
  478. package/lib/scaffoldPhysicalIdentity.js.map +0 -1
  479. package/lib/scaffoldSharedSkillDirectory.d.ts +0 -17
  480. package/lib/scaffoldSharedSkillDirectory.js +0 -62
  481. package/lib/scaffoldSharedSkillDirectory.js.map +0 -1
  482. package/lib/skills/3d-modeling/crafting.md +0 -82
  483. package/lib/skills/3d-modeling/diffusion.md +0 -34
  484. package/lib/skills/3d-modeling/inspection.md +0 -54
  485. package/lib/skills/3d-modeling/lofting.md +0 -43
  486. package/lib/skills/3d-modeling/modularization.md +0 -31
  487. package/lib/skills/3d-modeling/recovery.md +0 -29
  488. package/lib/skills/development/repair.md +0 -13
  489. package/lib/skills/documentation/writing.md +0 -51
  490. package/lib/skills/motion/layers.md +0 -7
  491. package/lib/skills/motion/transitions.md +0 -27
  492. package/lib/skills/prompting/SKILL.md +0 -80
  493. package/lib/syncScaffold.d.ts +0 -19
  494. package/lib/syncScaffold.js +0 -28
  495. package/lib/syncScaffold.js.map +0 -1
  496. package/lib/writeFiles.d.ts +0 -20
  497. package/lib/writeFiles.js +0 -33
  498. package/lib/writeFiles.js.map +0 -1
  499. package/lib/writeScaffoldFile.d.ts +0 -35
  500. package/lib/writeScaffoldFile.js +0 -107
  501. package/lib/writeScaffoldFile.js.map +0 -1
  502. package/lib/writtenVersion.d.ts +0 -13
  503. package/lib/writtenVersion.js +0 -18
  504. package/lib/writtenVersion.js.map +0 -1
  505. package/scaffold/instructions/.agents/skills/audio/local-speech.md +0 -11
  506. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/obligations/screenplay.md +0 -9
  507. package/scaffold/instructions/.agents/skills/contracts/story/shared/naturalness/screenplay.md +0 -13
  508. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/obligations/screenplay.md +0 -11
  509. package/scaffold/instructions/.agents/skills/contracts/story/shared/statements/naturalness/screenplay.md +0 -25
  510. package/scaffold/instructions/.agents/skills/motion/method-references.md +0 -23
  511. package/scaffold/instructions/.agents/skills/production/sync-and-reorganization.md +0 -21
  512. package/scaffold/instructions/.agents/skills/story/correction/SKILL.md +0 -13
  513. package/scaffold/instructions/.agents/skills/story/evidence/SKILL.md +0 -13
  514. package/scaffold/instructions/.agents/skills/story/evidence/answer-placement.md +0 -13
  515. package/scaffold/instructions/.agents/skills/story/evidence/answer-writing.md +0 -23
  516. package/scaffold/instructions/.agents/skills/story/naturalness/SKILL.md +0 -13
  517. package/scaffold/instructions/.agents/skills/story/naturalness/rewriting.md +0 -17
  518. package/scaffold/instructions/.agents/skills/story/naturalness/transfer.md +0 -11
  519. package/scaffold/instructions/.agents/skills/story/workflow.md +0 -61
  520. package/scaffold/instructions/.agents/skills/video/diffusion.md +0 -33
  521. package/scaffold/instructions/.agents/skills/video/prompts.md +0 -51
  522. package/scaffold/production/evidence.config.ts +0 -12
  523. package/scaffold/production/src/executable/capture.ts +0 -487
  524. package/scaffold/production/src/executable/planCaptureStills.ts +0 -65
  525. package/scaffold/production/src/executable/render/headlessCapture/AutoMovieHeadlessCaptureError.ts +0 -1
  526. package/scaffold/production/src/executable/render/headlessCapture/AutoMovieHeadlessCaptureErrorCode.ts +0 -1
  527. package/scaffold/production/src/executable/render/headlessCapture/AutoMovieHeadlessWaitUntil.ts +0 -1
  528. package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessCaptureOptions.ts +0 -79
  529. package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessCaptureSession.ts +0 -39
  530. package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessFrameWriter.ts +0 -20
  531. package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessLocator.ts +0 -1
  532. package/scaffold/production/src/executable/render/headlessCapture/IAutoMovieHeadlessPage.ts +0 -1
  533. package/scaffold/production/src/executable/render/headlessCapture/createHeadlessCaptureAdapter.ts +0 -92
  534. package/scaffold/production/src/executable/render/headlessCapture/index.ts +0 -9
  535. package/scaffold/production/src/executable/render/node/IAutoMovieViewerVideoOptions.ts +0 -128
  536. package/scaffold/production/src/executable/render/node/IAutoMovieViewerVideoResult.ts +0 -43
  537. package/scaffold/production/src/executable/render/node/IProductionRenditionClip.ts +0 -44
  538. package/scaffold/production/src/executable/render/node/acquireViewerBrowser.ts +0 -24
  539. package/scaffold/production/src/executable/render/node/addProductionMp4Sample.ts +0 -89
  540. package/scaffold/production/src/executable/render/node/appendLosslessVideoClip.ts +0 -62
  541. package/scaffold/production/src/executable/render/node/assembleProductionChunkVideoMp4.ts +0 -167
  542. package/scaffold/production/src/executable/render/node/assertProductionFeatureUsesRenditionClips.ts +0 -184
  543. package/scaffold/production/src/executable/render/node/assertProductionFeatureUsesRenditionVideo.ts +0 -127
  544. package/scaffold/production/src/executable/render/node/assertProductionRenditionClipDelivery.ts +0 -102
  545. package/scaffold/production/src/executable/render/node/cache/IAutoMovieDirectoryArtifactStore.ts +0 -59
  546. package/scaffold/production/src/executable/render/node/cache/IAutoMovieViewerFrameCacheReport.ts +0 -30
  547. package/scaffold/production/src/executable/render/node/cache/cacheViewerCaptureSession.ts +0 -187
  548. package/scaffold/production/src/executable/render/node/cache/composeViewerFrameKeys.ts +0 -55
  549. package/scaffold/production/src/executable/render/node/cache/createAutoMovieArtifactMiddleware.ts +0 -107
  550. package/scaffold/production/src/executable/render/node/cache/createAutoMovieDirectoryArtifactStore.ts +0 -203
  551. package/scaffold/production/src/executable/render/node/cache/digestAutoMovieSourceTree.ts +0 -66
  552. package/scaffold/production/src/executable/render/node/cache/readViewerFrameStates.ts +0 -95
  553. package/scaffold/production/src/executable/render/node/capture/DEFAULT_CHROME_EXECUTABLE.ts +0 -11
  554. package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageOperationFailure.ts +0 -13
  555. package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageRenderAndSeeArtifact.ts +0 -30
  556. package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageRenderAndSeeOptions.ts +0 -51
  557. package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageSequenceMetadata.ts +0 -27
  558. package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageSequenceRenderArtifact.ts +0 -44
  559. package/scaffold/production/src/executable/render/node/capture/IAutoMoviePageSequenceRenderOptions.ts +0 -43
  560. package/scaffold/production/src/executable/render/node/capture/IAutoMovieSequenceDissolvePixelCheck.ts +0 -39
  561. package/scaffold/production/src/executable/render/node/capture/captureRenderAndSee.ts +0 -233
  562. package/scaffold/production/src/executable/render/node/capture/captureSequenceRenderAndSee.ts +0 -377
  563. package/scaffold/production/src/executable/render/node/capture/index.ts +0 -14
  564. package/scaffold/production/src/executable/render/node/capture/preserveCleanupFailure.ts +0 -34
  565. package/scaffold/production/src/executable/render/node/capture/renderAndSeeCommand.ts +0 -169
  566. package/scaffold/production/src/executable/render/node/capture/renderSequenceAndSeeCommand.ts +0 -165
  567. package/scaffold/production/src/executable/render/node/capture/verifySequenceDissolvePixels.ts +0 -179
  568. package/scaffold/production/src/executable/render/node/conformProductionRenditionVideoMp4.ts +0 -86
  569. package/scaffold/production/src/executable/render/node/conformProductionVisualDeliveryVideoMp4.ts +0 -230
  570. package/scaffold/production/src/executable/render/node/decodeAutoMovieDelivery.ts +0 -253
  571. package/scaffold/production/src/executable/render/node/equalRational.ts +0 -36
  572. package/scaffold/production/src/executable/render/node/exactProductionClockProduct.ts +0 -26
  573. package/scaffold/production/src/executable/render/node/exportModelToGLB.ts +0 -267
  574. package/scaffold/production/src/executable/render/node/index.ts +0 -27
  575. package/scaffold/production/src/executable/render/node/loadModelGltfCore.ts +0 -18
  576. package/scaffold/production/src/executable/render/node/mixAutoMovieAudioCues.ts +0 -74
  577. package/scaffold/production/src/executable/render/node/muxProductionFeatureMp4.ts +0 -170
  578. package/scaffold/production/src/executable/render/node/neutralTrackPresentation.ts +0 -59
  579. package/scaffold/production/src/executable/render/node/normalizeProductionH264Mp4.ts +0 -110
  580. package/scaffold/production/src/executable/render/node/openLosslessVideoTrack.ts +0 -81
  581. package/scaffold/production/src/executable/render/node/parseMp4.ts +0 -46
  582. package/scaffold/production/src/executable/render/node/parseProductionMp4Output.ts +0 -70
  583. package/scaffold/production/src/executable/render/node/parseProductionRenditionClip.ts +0 -92
  584. package/scaffold/production/src/executable/render/node/planViewerVideo.ts +0 -140
  585. package/scaffold/production/src/executable/render/node/probeParsedProductionVideoMp4.ts +0 -48
  586. package/scaffold/production/src/executable/render/node/probeProductionPngPicture.ts +0 -223
  587. package/scaffold/production/src/executable/render/node/probeProductionRenderedMedia.ts +0 -355
  588. package/scaffold/production/src/executable/render/node/probeProductionVideoMp4.ts +0 -27
  589. package/scaffold/production/src/executable/render/node/probeVideoTrack.ts +0 -220
  590. package/scaffold/production/src/executable/render/node/productionRenditionVideoPlan.ts +0 -149
  591. package/scaffold/production/src/executable/render/node/recordViewerPlayback.ts +0 -137
  592. package/scaffold/production/src/executable/render/node/renderViewerFrames.ts +0 -139
  593. package/scaffold/production/src/executable/render/node/renderViewerVideo.ts +0 -301
  594. package/scaffold/production/src/executable/render/node/renderViewerVideoSession.ts +0 -75
  595. package/scaffold/production/src/executable/render/node/residentMp4Box.ts +0 -36
  596. package/scaffold/production/src/executable/render/node/residentPngJs.ts +0 -26
  597. package/scaffold/production/src/executable/render/node/runViewerVideoEncoder.ts +0 -58
  598. package/scaffold/production/src/executable/render/node/sameSampleDescription.ts +0 -43
  599. package/scaffold/production/src/executable/render/node/sameSampleFlags.ts +0 -28
  600. package/scaffold/production/src/executable/render/node/sampleBytes.ts +0 -46
  601. package/scaffold/production/src/executable/render/node/sampleDescription.ts +0 -40
  602. package/scaffold/production/src/executable/render/node/sampleOptions.ts +0 -37
  603. package/scaffold/production/src/executable/render/node/serializeDescriptionBox.ts +0 -29
  604. package/scaffold/production/src/executable/render/node/trimProductionAudioPresentation.ts +0 -115
  605. package/scaffold/production/src/executable/render/node/verifySampleStorage.ts +0 -86
  606. package/scaffold/production/src/executable/render/node/writeViewerFrameSheet.ts +0 -101
  607. package/scaffold/production/src/executable/render.ts +0 -92
  608. package/scaffold/production/src/executable/review.ts +0 -54
  609. package/scaffold/production/src/executable/viewer/inspection/createViewerDiskSource.ts +0 -119
  610. package/scaffold/production/src/executable/viewer/inspection/readViewerMaintainedSourceFiles.ts +0 -64
  611. package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessCaptureError.ts +0 -41
  612. package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessCaptureErrorCode.ts +0 -22
  613. package/scaffold/production/src/executable/viewer/node/capture/AutoMovieHeadlessWaitUntil.ts +0 -18
  614. package/scaffold/production/src/executable/viewer/node/capture/IAutoMovieHeadlessLocator.ts +0 -32
  615. package/scaffold/production/src/executable/viewer/node/capture/IAutoMovieHeadlessPage.ts +0 -130
  616. package/scaffold/production/src/executable/viewer/node/capture/IViewerCaptureOptions.ts +0 -38
  617. package/scaffold/production/src/executable/viewer/node/capture/IViewerCaptureSession.ts +0 -41
  618. package/scaffold/production/src/executable/viewer/node/capture/createViewerCaptureSession.ts +0 -154
  619. package/scaffold/production/src/executable/viewer/node/capture/index.ts +0 -8
  620. package/scaffold/production/src/executable/viewer/node/index.ts +0 -2
  621. package/scaffold/production/src/executable/viewer/node/raster/AutoMovieRasterLighting.ts +0 -221
  622. package/scaffold/production/src/executable/viewer/node/raster/AutoMovieRasterSheet.ts +0 -175
  623. package/scaffold/production/src/executable/viewer/node/raster/AutoMovieRasterTarget.ts +0 -282
  624. package/scaffold/production/src/executable/viewer/node/raster/IAutoMovieSceneRaster.ts +0 -62
  625. package/scaffold/production/src/executable/viewer/node/raster/IRasterizeAutoMovieSceneProps.ts +0 -34
  626. package/scaffold/production/src/executable/viewer/node/raster/encodeAutoMovieRasterPng.ts +0 -77
  627. package/scaffold/production/src/executable/viewer/node/raster/index.ts +0 -8
  628. package/scaffold/production/src/executable/viewer/node/raster/rasterizeAutoMovieScene.ts +0 -594
  629. package/scaffold/production/src/executable/viewer/node/raster/stampAutoMovieRasterLabel.ts +0 -120
  630. package/scaffold/production/src/executable/viewer/process/ProcessOwnership.ts +0 -102
  631. package/scaffold/production/src/executable/viewer/process/internal/IProcessChildObservation.ts +0 -18
  632. package/scaffold/production/src/executable/viewer/process/internal/IProcessOwnershipHost.ts +0 -70
  633. package/scaffold/production/src/executable/viewer/process/internal/ProcessOwnershipController.ts +0 -125
  634. package/scaffold/production/src/executable/viewer/process/internal/WindowsProcessOwnershipPrograms.ts +0 -52
  635. package/scaffold/production/src/executable/viewer/process/internal/createNodeProcessOwnershipHost.ts +0 -41
  636. package/scaffold/production/src/executable/viewer/process/internal/decodeLinuxProcessIdentity.ts +0 -22
  637. package/scaffold/production/src/executable/viewer/process/internal/decodePosixProcessIdentity.ts +0 -24
  638. package/scaffold/production/src/executable/viewer/process/internal/decodeWindowsProcessResult.ts +0 -24
  639. package/scaffold/production/src/executable/viewer/process/internal/readNativeProcessIdentity.ts +0 -45
  640. package/scaffold/production/src/executable/viewer/process/internal/requireProcessId.ts +0 -15
  641. package/scaffold/production/src/executable/viewer/process/internal/resolveProcessIdentityReadError.ts +0 -15
  642. package/scaffold/production/src/executable/viewer/process/internal/runWindowsProcessOperation.ts +0 -41
  643. package/scaffold/production/src/executable/viewer/process/internal/selectProcessOwnershipTree.ts +0 -68
  644. package/scaffold/production/test/features/executable/test_plan_capture_stills.ts +0 -75
  645. package/scaffold/workspace/pnpm-workspace.yaml +0 -46
  646. package/src/AUTOMOVIE_TEMPLATE_CATALOGS.ts +0 -48
  647. package/src/AUTOMOVIE_TEMPLATE_VERSIONS.ts +0 -39
  648. package/src/AutoMovieScaffoldLayer.ts +0 -18
  649. package/src/FILE_ATTRIBUTE_DIRECTORY.ts +0 -2
  650. package/src/IAutoMovieCatalogVersionProps.ts +0 -18
  651. package/src/IAutoMovieScaffoldSourceEntry.ts +0 -19
  652. package/src/IAutoMovieTemplateDependencyVersionsProps.ts +0 -19
  653. package/src/IAutoMovieWorkspacePackageVersions.ts +0 -44
  654. package/src/IBoundChild.ts +0 -86
  655. package/src/IBoundChildStatus.ts +0 -24
  656. package/src/IBoundParent.ts +0 -65
  657. package/src/IBoundParentStatus.ts +0 -15
  658. package/src/ICreateResult.ts +0 -35
  659. package/src/IScaffoldCompletedFilePublicationOutcome.ts +0 -17
  660. package/src/IScaffoldCompletedPublication.ts +0 -17
  661. package/src/IScaffoldFileSnapshot.ts +0 -28
  662. package/src/IScaffoldParentPublicationRequest.ts +0 -29
  663. package/src/IScaffoldPartialFilePublicationOutcome.ts +0 -25
  664. package/src/IScaffoldPhysicalDirectory.ts +0 -22
  665. package/src/IScaffoldPosixConstants.ts +0 -30
  666. package/src/IScaffoldPublicationEntry.ts +0 -22
  667. package/src/IScaffoldPublicationFailure.ts +0 -18
  668. package/src/IScaffoldPublicationOptions.ts +0 -19
  669. package/src/IScaffoldPublicationReceipt.ts +0 -29
  670. package/src/IScaffoldRefusedFilePublicationOutcome.ts +0 -20
  671. package/src/IScaffoldSyncPlan.ts +0 -26
  672. package/src/IScaffoldSyncProps.ts +0 -16
  673. package/src/IWindowsFileInformation.ts +0 -24
  674. package/src/IWindowsLibrary.ts +0 -148
  675. package/src/SCAFFOLD_SYNC_STATE_FILE.ts +0 -5
  676. package/src/ScaffoldFilePublicationOutcome.ts +0 -18
  677. package/src/ScaffoldParentChangedError.ts +0 -14
  678. package/src/ScaffoldPublicationError.ts +0 -58
  679. package/src/assertOrdinaryFile.ts +0 -20
  680. package/src/assertOrdinarySingleLinkFile.ts +0 -26
  681. package/src/assertScaffoldOwnership.ts +0 -29
  682. package/src/assertScaffoldPhysicalDirectory.ts +0 -29
  683. package/src/attachScaffoldSyncState.ts +0 -30
  684. package/src/captureEmptyScaffoldPhysicalDirectory.ts +0 -45
  685. package/src/captureScaffoldFile.ts +0 -34
  686. package/src/captureScaffoldPhysicalDirectory.ts +0 -34
  687. package/src/combineScaffoldFailures.ts +0 -35
  688. package/src/createAutoMovieCatalogVersionResolver.ts +0 -117
  689. package/src/createScaffoldSyncState.ts +0 -33
  690. package/src/createScaffoldVariables.ts +0 -50
  691. package/src/ensureScaffoldBaseDirectory.ts +0 -55
  692. package/src/ensureScaffoldFileDirectory.ts +0 -75
  693. package/src/inside.ts +0 -25
  694. package/src/isScaffoldInstruction.ts +0 -29
  695. package/src/loadWindowsLibrary.ts +0 -277
  696. package/src/mergeScaffoldFiles.ts +0 -39
  697. package/src/missingPath.ts +0 -16
  698. package/src/nativeError.ts +0 -15
  699. package/src/openPosixParent.ts +0 -155
  700. package/src/openWindowsParent.ts +0 -305
  701. package/src/overwriteScaffoldFile.ts +0 -262
  702. package/src/physicalDirectoryIdentity.ts +0 -33
  703. package/src/physicalVersion.ts +0 -18
  704. package/src/planScaffoldPublication.ts +0 -100
  705. package/src/planScaffoldSync.ts +0 -122
  706. package/src/publishFiles.ts +0 -120
  707. package/src/publishNativeScaffoldFile.ts +0 -287
  708. package/src/publishScaffoldCandidate.ts +0 -94
  709. package/src/readAutoMovieScaffoldSources.ts +0 -82
  710. package/src/readScaffoldSyncFile.ts +0 -66
  711. package/src/renderScaffold.ts +0 -43
  712. package/src/renderScaffoldEntries.ts +0 -110
  713. package/src/renderScaffoldInstructions.ts +0 -22
  714. package/src/renderScaffoldLayer.ts +0 -38
  715. package/src/renderTemplate.ts +0 -62
  716. package/src/renderWorkspaceProductionScaffold.ts +0 -35
  717. package/src/renderWorkspaceScaffold.ts +0 -43
  718. package/src/replaceSharedScaffoldFile.ts +0 -88
  719. package/src/resolveAutoMovieCatalogVersion.ts +0 -27
  720. package/src/resolveAutoMovieTemplateDependencyVersions.ts +0 -70
  721. package/src/resolveScaffoldPosixConstants.ts +0 -50
  722. package/src/scaffoldAssetDirectory.ts +0 -30
  723. package/src/scaffoldPhysicalIdentity.ts +0 -21
  724. package/src/scaffoldSharedSkillDirectory.ts +0 -25
  725. package/src/syncScaffold.ts +0 -38
  726. package/src/writeFiles.ts +0 -48
  727. package/src/writeScaffoldFile.ts +0 -88
  728. package/src/writtenVersion.ts +0 -19
  729. /package/{lib → generated}/skills/contracts/development/common.md +0 -0
  730. /package/{lib → generated}/skills/visual-debugging/rendering-cost.md +0 -0
  731. /package/scaffold/instructions/.agents/skills/3d-modeling/{$crafting.md → $crafting} +0 -0
  732. /package/scaffold/instructions/.agents/skills/3d-modeling/{$diffusion.md → diffusion/$image-hints.md} +0 -0
  733. /package/scaffold/instructions/.agents/skills/3d-modeling/{$lofting.md → diffusion/$models.md} +0 -0
  734. /package/scaffold/instructions/.agents/skills/3d-modeling/{$recovery.md → diffusion/$prompts.md} +0 -0
  735. /package/scaffold/instructions/.agents/skills/{motion/$authoring.md → 3d-modeling/diffusion/$request.md} +0 -0
  736. /package/scaffold/instructions/.agents/skills/{motion/$contacts.md → 3d-modeling/diffusion/$shape-hints.md} +0 -0
  737. /package/scaffold/instructions/.agents/skills/motion/{$laws.md → laws/$authoring.md} +0 -0
  738. /package/scaffold/instructions/.agents/skills/motion/{$layers.md → laws/$contacts.md} +0 -0
  739. /package/scaffold/instructions/.agents/skills/motion/{$transitions.md → laws/$declaration.md} +0 -0
  740. /package/scaffold/instructions/.agents/skills/motion/{$variation.md → laws/$transitions.md} +0 -0
  741. /package/scaffold/instructions/.agents/skills/motion/{$verification.md → laws/$variation.md} +0 -0
@@ -1,262 +0,0 @@
1
- import * as fs from "node:fs";
2
-
3
- import { type IScaffoldFileSnapshot } from "./IScaffoldFileSnapshot";
4
- import { type IScaffoldPhysicalDirectory } from "./IScaffoldPhysicalDirectory";
5
- import { type ScaffoldFilePublicationOutcome } from "./ScaffoldFilePublicationOutcome";
6
- import { assertOrdinarySingleLinkFile } from "./assertOrdinarySingleLinkFile";
7
- import { assertScaffoldOwnership } from "./assertScaffoldOwnership";
8
- import { captureScaffoldFile } from "./captureScaffoldFile";
9
- import { combineScaffoldFailures } from "./combineScaffoldFailures";
10
- import { writtenVersion } from "./writtenVersion";
11
-
12
- /**
13
- * Replace one existing ordinary single-link scaffold file in place.
14
- *
15
- * The link count is read from the descriptor this operation writes through rather than from a pathname stat, so the decision and the write look at the same file. Rewriting the inode is admissible only while exactly one entry names it, because every other name would observe the write.
16
- *
17
- * @evidence contracts/development/implementation.md#principled-implementation One ordinary single-link file descriptor is verified against pathname generations before truncation, after write/readback and after close.
18
- * @evidence contracts/development/implementation.md#clear-and-simple-structure The replacement owner groups positioned writing and resident verification while shared ownership and snapshot helpers define identity.
19
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No retry or deletion hides a failed replacement; pre-truncation failures refuse and post-truncation failures retain partial bytes. A concurrent new hard link after the link-count check remains the documented limitation.
20
- * @evidence contracts/development/common.md#meaningful-documentation The comment states in-place semantics, descriptor-based link admission and effects on other names of the inode.
21
- * @evidence contracts/development/implementation.md#efficient-algorithms One full write and readback are linear in bytes, with a fixed number of stat and resident-open operations.
22
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Replacement is an effect that repeats per request; snapshots are fresh observations and no previous successful write is reused.
23
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The owner attempts writer and temporary resident descriptor close on every exit, combining close failures with earlier failures; failed close leaves actual release unproven. Readback storage is bounded by file bytes and released with the call.
24
- */
25
- export const overwriteScaffoldFile: (props: {
26
- base: IScaffoldPhysicalDirectory;
27
- bytes: Uint8Array;
28
- existing: IScaffoldFileSnapshot;
29
- parent: IScaffoldPhysicalDirectory;
30
- }) => ScaffoldFilePublicationOutcome = (props: {
31
- base: IScaffoldPhysicalDirectory;
32
- bytes: Uint8Array;
33
- existing: IScaffoldFileSnapshot;
34
- parent: IScaffoldPhysicalDirectory;
35
- }): ScaffoldFilePublicationOutcome => {
36
- const target: string = props.existing.path;
37
- let descriptor: number;
38
- try {
39
- descriptor = fs.openSync(target, "r+");
40
- } catch (error) {
41
- return Object.freeze({
42
- error,
43
- reason: "create-failed" as const,
44
- status: "refused" as const,
45
- });
46
- }
47
- const progress: { bytesWritten: number } = { bytesWritten: 0 };
48
- let failure: unknown = undefined;
49
- let mutated: boolean = false;
50
- let completedSnapshot: IScaffoldFileSnapshot | undefined;
51
- try {
52
- const opened: fs.BigIntStats = fs.fstatSync(descriptor, { bigint: true });
53
- assertOrdinarySingleLinkFile(opened, target);
54
- assertScaffoldFileDescriptor(
55
- props.existing,
56
- descriptor,
57
- writtenVersion(opened),
58
- );
59
- assertScaffoldOwnership(props.base, props.parent);
60
- fs.ftruncateSync(descriptor, 0);
61
- mutated = true;
62
- writeScaffoldDescriptor(descriptor, target, props.bytes, progress);
63
- const completed: fs.BigIntStats = fs.fstatSync(descriptor, {
64
- bigint: true,
65
- });
66
- if (completed.size !== BigInt(props.bytes.byteLength))
67
- throw new Error(`scaffold file changed final size: ${target}`);
68
- assertScaffoldFileDescriptor(
69
- captureScaffoldFile(target),
70
- descriptor,
71
- writtenVersion(completed),
72
- );
73
- assertScaffoldDescriptorBytes(descriptor, target, props.bytes);
74
- const finalStatus: fs.BigIntStats = fs.fstatSync(descriptor, {
75
- bigint: true,
76
- });
77
- if (writtenVersion(finalStatus) !== writtenVersion(completed))
78
- throw new Error(`scaffold file changed after final readback: ${target}`);
79
- const resident: IScaffoldFileSnapshot = captureScaffoldFile(target);
80
- assertScaffoldFileDescriptor(
81
- resident,
82
- descriptor,
83
- writtenVersion(finalStatus),
84
- );
85
- completedSnapshot = assertOpenedScaffoldFileSnapshot(resident);
86
- assertScaffoldOwnership(props.base, props.parent);
87
- } catch (error) {
88
- failure = error;
89
- }
90
- try {
91
- fs.closeSync(descriptor);
92
- } catch (closeError) {
93
- failure = combineScaffoldFailures(
94
- failure,
95
- closeError,
96
- "overwritten scaffold file close",
97
- );
98
- }
99
- if (failure === undefined)
100
- try {
101
- assertScaffoldFileSnapshot(completedSnapshot!);
102
- assertScaffoldOwnership(props.base, props.parent);
103
- } catch (error) {
104
- failure = error;
105
- }
106
- if (failure !== undefined && mutated === false)
107
- return Object.freeze({
108
- error: failure,
109
- reason: "create-failed" as const,
110
- status: "refused" as const,
111
- });
112
- return failure === undefined
113
- ? Object.freeze({
114
- parentIdentity: props.parent.identity,
115
- status: "completed" as const,
116
- })
117
- : Object.freeze({
118
- bytesWritten: progress.bytesWritten,
119
- error: failure,
120
- parentIdentity: props.parent.identity,
121
- status: "partial" as const,
122
- });
123
- };
124
-
125
- /**
126
- * Verify a held descriptor against its captured pathname generation: the pathname still names the snapshot's file, the descriptor still shows `expectedWritten`, and a fresh pathname open shows the same written state.
127
- */
128
- const assertScaffoldFileDescriptor: (
129
- snapshot: IScaffoldFileSnapshot,
130
- descriptor: number,
131
- expectedWritten: string,
132
- ) => void = (
133
- snapshot: IScaffoldFileSnapshot,
134
- descriptor: number,
135
- expectedWritten: string,
136
- ): void => {
137
- assertOpenedScaffoldFileSnapshot(snapshot);
138
- const opened: fs.BigIntStats = fs.fstatSync(descriptor, { bigint: true });
139
- assertOrdinarySingleLinkFile(opened, snapshot.path);
140
- if (writtenVersion(opened) !== expectedWritten)
141
- throw new Error(
142
- `scaffold file descriptor changed generation: ${snapshot.path}`,
143
- );
144
- const residentDescriptor: number = fs.openSync(snapshot.path, "r");
145
- let failure: unknown = undefined;
146
- try {
147
- const resident: fs.BigIntStats = fs.fstatSync(residentDescriptor, {
148
- bigint: true,
149
- });
150
- assertOrdinarySingleLinkFile(resident, snapshot.path);
151
- if (writtenVersion(resident) !== writtenVersion(opened))
152
- throw new Error(
153
- `scaffold file descriptor changed resident generation: ${snapshot.path}`,
154
- );
155
- assertOpenedScaffoldFileSnapshot(snapshot);
156
- } catch (error) {
157
- failure = error;
158
- }
159
- try {
160
- fs.closeSync(residentDescriptor);
161
- } catch (closeError) {
162
- failure = combineScaffoldFailures(
163
- failure,
164
- closeError,
165
- "resident scaffold file close",
166
- );
167
- }
168
- if (failure !== undefined)
169
- throw failure instanceof Error
170
- ? failure
171
- : new Error(`scaffold file verification failed: ${snapshot.path}`, {
172
- cause: failure,
173
- });
174
- };
175
-
176
- /**
177
- * Recapture a snapshot's pathname while this operation holds descriptors on it and require the same file and written state. The change time is left out: Windows advances it whenever any handle opens the path, including this module's own verification opens, while identity, size, and modification time still move only on a real change.
178
- */
179
- const assertOpenedScaffoldFileSnapshot: (
180
- snapshot: IScaffoldFileSnapshot,
181
- ) => IScaffoldFileSnapshot = (
182
- snapshot: IScaffoldFileSnapshot,
183
- ): IScaffoldFileSnapshot => {
184
- const current: IScaffoldFileSnapshot = captureScaffoldFile(snapshot.path);
185
- if (
186
- current.identity !== snapshot.identity ||
187
- current.written !== snapshot.written
188
- )
189
- throw new Error(
190
- `scaffold file changed while its descriptor was open: ${snapshot.path}`,
191
- );
192
- return current;
193
- };
194
-
195
- /**
196
- * Require the exact captured generation, change time included, after every descriptor of this operation has closed.
197
- */
198
- const assertScaffoldFileSnapshot: (snapshot: IScaffoldFileSnapshot) => void = (
199
- snapshot: IScaffoldFileSnapshot,
200
- ): void => {
201
- const current: IScaffoldFileSnapshot = captureScaffoldFile(snapshot.path);
202
- if (
203
- current.identity !== snapshot.identity ||
204
- current.version !== snapshot.version
205
- )
206
- throw new Error(
207
- `scaffold file changed after descriptor close: ${snapshot.path}`,
208
- );
209
- };
210
-
211
- /** Write `bytes` from offset 0 through `descriptor`, then flush it. */
212
- const writeScaffoldDescriptor: (
213
- descriptor: number,
214
- target: string,
215
- bytes: Uint8Array,
216
- progress: { bytesWritten: number },
217
- ) => void = (
218
- descriptor: number,
219
- target: string,
220
- bytes: Uint8Array,
221
- progress: { bytesWritten: number },
222
- ): void => {
223
- let offset: number = 0;
224
- while (offset < bytes.byteLength) {
225
- const written: number = fs.writeSync(
226
- descriptor,
227
- bytes,
228
- offset,
229
- bytes.byteLength - offset,
230
- offset,
231
- );
232
- if (written === 0)
233
- throw new Error(`scaffold file stopped while written: ${target}`);
234
- offset += written;
235
- progress.bytesWritten = offset;
236
- }
237
- fs.fsyncSync(descriptor);
238
- };
239
-
240
- /** Read the whole file back through `descriptor` and require `bytes` exactly. */
241
- const assertScaffoldDescriptorBytes: (
242
- descriptor: number,
243
- target: string,
244
- bytes: Uint8Array,
245
- ) => void = (descriptor: number, target: string, bytes: Uint8Array): void => {
246
- const readback: Buffer = Buffer.alloc(bytes.byteLength);
247
- let offset: number = 0;
248
- while (offset < readback.length) {
249
- const read: number = fs.readSync(
250
- descriptor,
251
- readback,
252
- offset,
253
- readback.length - offset,
254
- offset,
255
- );
256
- if (read === 0)
257
- throw new Error(`scaffold file stopped during readback: ${target}`);
258
- offset += read;
259
- }
260
- if (readback.equals(bytes) === false)
261
- throw new Error(`scaffold file changed during readback: ${target}`);
262
- };
@@ -1,33 +0,0 @@
1
- import * as fs from "node:fs";
2
-
3
- import { scaffoldPhysicalIdentity } from "./scaffoldPhysicalIdentity";
4
-
5
- /**
6
- * Derive a directory's physical identity from an opened descriptor.
7
- *
8
- * A path-based stat is not a reliable device source everywhere: Node on Windows can report device 0 for a directory reached by path while `fstat` on the opened directory reports the volume serial, which is also what the native parent handle reports at publication. The inode equality check pins the descriptor to the directory the caller just inspected.
9
- *
10
- * @evidence contracts/development/implementation.md#principled-implementation A directory opened for reading is fstat'ed and its inode is compared with the earlier lstat before device-and-inode formatting.
11
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Descriptor identity extraction has one owner shared by ordinary capture and new-empty-directory qualification.
12
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The opened descriptor supplies the actual Windows volume identity instead of trusting a pathname stat's possibly zero device number.
13
- * @evidence contracts/development/common.md#meaningful-documentation The comment states the descriptor-versus-path distinction and the inode pin that connects both observations.
14
- * @evidence contracts/development/implementation.md#efficient-algorithms One open, one fstat and one close plus two bigint conversions are fixed per directory and independent of its entry count.
15
- * @evidence contracts/development/implementation.md#reuse-equivalent-work A descriptor observation cannot be substituted by cached pathname identity when verifying a current capture.
16
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources One descriptor receives a close attempt in finally before return; successful return proves close completed, while a close error leaves release unproven and currently supersedes an earlier inspection error. No descriptor reference is cached.
17
- */
18
- export const physicalDirectoryIdentity: (
19
- absolute: string,
20
- status: fs.BigIntStats,
21
- ) => string = (absolute: string, status: fs.BigIntStats): string => {
22
- const descriptor: number = fs.openSync(absolute, fs.constants.O_RDONLY);
23
- try {
24
- const opened: fs.BigIntStats = fs.fstatSync(descriptor, { bigint: true });
25
- if (opened.isDirectory() === false || opened.ino !== status.ino)
26
- throw new Error(
27
- `scaffold directory changed while its identity was captured: ${absolute}`,
28
- );
29
- return scaffoldPhysicalIdentity(opened);
30
- } finally {
31
- fs.closeSync(descriptor);
32
- }
33
- };
@@ -1,18 +0,0 @@
1
- import * as fs from "node:fs";
2
-
3
- import { writtenVersion } from "./writtenVersion";
4
-
5
- /**
6
- * `writtenVersion` plus the change time, which a rename also moves.
7
- *
8
- * @evidence contracts/development/implementation.md#principled-implementation The full file generation extends the shared written-state key with change-time nanoseconds, which can reveal a rename.
9
- * @evidence contracts/development/implementation.md#clear-and-simple-structure This formatter adds only the change-time component to the single written-state definition.
10
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts It preserves the actual stat values without inventing a revision or suppressing a change-time difference.
11
- * @evidence contracts/development/common.md#meaningful-documentation The comment distinguishes the full generation from content-oriented written state.
12
- * @evidence contracts/development/implementation.md#efficient-algorithms A fixed number of bigint encodings costs their digit count, independent of file bytes or directory contents.
13
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Each input stat is an independent observation; formatting shares the written-key implementation but caches no observation.
14
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned generation string belongs to the snapshot owner and no descriptor or task is acquired.
15
- */
16
- export const physicalVersion: (status: fs.BigIntStats) => string = (
17
- status: fs.BigIntStats,
18
- ): string => `${writtenVersion(status)}:${status.ctimeNs}`;
@@ -1,100 +0,0 @@
1
- import * as path from "node:path";
2
-
3
- import { type IScaffoldPublicationEntry } from "./IScaffoldPublicationEntry";
4
-
5
- /**
6
- * Validate a rendered file map and freeze it as a publication candidate, before any directory or file is touched.
7
- *
8
- * Throws when a value is not a string, a key contains NUL, a target resolves to the root or outside it, or two targets collide. Targets are compared after lower-casing, so `A.txt` and `a.txt` collide on every platform, and a file also collides with any file below it, such as `a` and `a/b`. Lower-casing approximates the case folding of Windows and macOS file systems and does not apply Unicode normalization.
9
- *
10
- * @param props.files UTF-8 text keyed by paths resolved against `root`; absolute keys are admitted when their targets remain below it.
11
- * @param props.root Directory the candidate is published under.
12
- * @returns Frozen entries in the map's insertion order.
13
- *
14
- * @evidence contracts/development/implementation.md#principled-implementation Containment and the ancestor walk's root boundary both use `path.relative`, preserving Windows case-equivalent root spellings instead of looping at the drive root; empty, parent and absolute remainders refuse. Lower-cased target keys detect exact and file-ancestor collisions, approximating case-insensitive file systems without Unicode normalization.
15
- * @evidence contracts/development/implementation.md#clear-and-simple-structure This owner validates and encodes with one private collision walk; publishFiles coordinates mutation, ensureScaffoldFileDirectory captures descendant directories, and writeScaffoldFile owns target admission.
16
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No path or file name is special-cased; case-only collisions are refused consistently on every platform without claiming complete filesystem-name validation. The runtime string check rejects non-text input from untyped callers rather than selecting a fixture.
17
- * @evidence contracts/development/common.md#meaningful-documentation The comment lists every refusal, the case-folding rule and its limits, the parameters' meaning, and that entries keep insertion order.
18
- * @evidence contracts/development/implementation.md#efficient-algorithms Encoding visits total content bytes; collision checks use one map lookup per file and per ancestor below the root, with path-relative, dirname, lower-casing and string-key costs driven by the visited path lengths. The local map holds one entry per file, and there is no pairwise file scan.
19
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work The planner runs once per call over its own input and has no completed or in-flight work from another caller that could stand in for it.
20
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned candidate retains each file's bytes as a frozen array owned by the caller; the collision map is local and released on return, and no handle is opened.
21
- */
22
- export const planScaffoldPublication: (props: {
23
- files: Readonly<Record<string, string>>;
24
- root: string;
25
- }) => readonly IScaffoldPublicationEntry[] = (props: {
26
- files: Readonly<Record<string, string>>;
27
- root: string;
28
- }): readonly IScaffoldPublicationEntry[] => {
29
- const root: string = path.resolve(props.root);
30
- const entries: IScaffoldPublicationEntry[] = Object.entries(props.files).map(
31
- ([relative, content]: [string, string]): IScaffoldPublicationEntry => {
32
- if (typeof content !== "string")
33
- throw new Error(`scaffold content is not text: ${relative}`);
34
- if (relative.includes("\0"))
35
- throw new Error(`refusing invalid scaffold path: ${relative}`);
36
- const target: string = path.resolve(root, relative);
37
- const inside: string = path.relative(root, target);
38
- if (
39
- inside.length === 0 ||
40
- inside === ".." ||
41
- inside.startsWith(`..${path.sep}`) ||
42
- path.isAbsolute(inside)
43
- )
44
- throw new Error(`refusing to write outside "${root}": ${relative}`);
45
- return Object.freeze({
46
- bytes: Object.freeze(Array.from(Buffer.from(content, "utf8"))),
47
- relative,
48
- target,
49
- });
50
- },
51
- );
52
- assertDistinctScaffoldTargets(root, entries);
53
- return Object.freeze(entries);
54
- };
55
-
56
- /**
57
- * Throw when two entries name the same target, ignoring case, or when one entry's target is an ancestor directory of another's.
58
- */
59
- const assertDistinctScaffoldTargets: (
60
- root: string,
61
- entries: readonly IScaffoldPublicationEntry[],
62
- ) => void = (
63
- root: string,
64
- entries: readonly IScaffoldPublicationEntry[],
65
- ): void => {
66
- const owners: Map<string, IScaffoldPublicationEntry> = new Map<
67
- string,
68
- IScaffoldPublicationEntry
69
- >();
70
- for (const entry of entries) {
71
- const key: string = canonicalScaffoldPath(entry.target);
72
- const previous: IScaffoldPublicationEntry | undefined = owners.get(key);
73
- if (previous !== undefined) throw scaffoldPathCollision(previous, entry);
74
- owners.set(key, entry);
75
- }
76
- for (const entry of entries)
77
- for (
78
- let directory: string = path.dirname(entry.target);
79
- path.relative(root, directory).length !== 0;
80
- directory = path.dirname(directory)
81
- ) {
82
- const ancestor: IScaffoldPublicationEntry | undefined = owners.get(
83
- canonicalScaffoldPath(directory),
84
- );
85
- if (ancestor !== undefined) throw scaffoldPathCollision(ancestor, entry);
86
- }
87
- };
88
-
89
- const scaffoldPathCollision: (
90
- first: IScaffoldPublicationEntry,
91
- second: IScaffoldPublicationEntry,
92
- ) => Error = (
93
- first: IScaffoldPublicationEntry,
94
- second: IScaffoldPublicationEntry,
95
- ): Error =>
96
- new Error(`scaffold paths collide: ${first.relative}, ${second.relative}`);
97
-
98
- const canonicalScaffoldPath: (value: string) => string = (
99
- value: string,
100
- ): string => value.toLowerCase();
@@ -1,122 +0,0 @@
1
- import { createHash } from "node:crypto";
2
- import path from "node:path";
3
-
4
- import type { IScaffoldSyncPlan } from "./IScaffoldSyncPlan";
5
- import type { IScaffoldSyncProps } from "./IScaffoldSyncProps";
6
- import { SCAFFOLD_SYNC_STATE_FILE } from "./SCAFFOLD_SYNC_STATE_FILE";
7
- import { isScaffoldInstruction } from "./isScaffoldInstruction";
8
- import { readScaffoldSyncFile } from "./readScaffoldSyncFile";
9
- import { renderScaffoldInstructions } from "./renderScaffoldInstructions";
10
-
11
- /**
12
- * Plans a complete instruction sync without changing the production.
13
- *
14
- * @evidence contracts/development/implementation.md#principled-implementation Current LF digests are compared with desired content and the prior baseline: an explicit baseline root's copy governs, else the stored digest; all conflicts are collected before publication.
15
- * @evidence contracts/development/implementation.md#clear-and-simple-structure The planner owns three-way comparison while rendering owns bundled inputs and publication owns writes.
16
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No contracts, canon, reviews, project/configuration files or custom skills absent from the bundle are overwritten. Unknown legacy differences conflict instead of becoming guessed generated bytes.
17
- * @evidence contracts/development/common.md#meaningful-documentation The plan records changed/unchanged/conflicting/retired paths, exact write preconditions and a state file placed last.
18
- * @evidence contracts/development/implementation.md#efficient-algorithms Rendering and per-file reads/hash scans scale with bundle and existing instruction bytes, plus deterministic path ordering; no whole production body is scanned.
19
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Each file observation and digest is reused inside the plan; returned plans are not accepted as later filesystem proof by a separate apply API.
20
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The plan owns candidate text and snapshots; input reads close synchronously, and no background work or cross-call cache is retained.
21
- */
22
- export function planScaffoldSync(props: IScaffoldSyncProps): IScaffoldSyncPlan {
23
- const location: string = path.resolve(props.location);
24
- const bundle: Record<string, string> = renderScaffoldInstructions();
25
- const state: ReturnType<typeof readScaffoldSyncFile> = readScaffoldSyncFile(
26
- location,
27
- SCAFFOLD_SYNC_STATE_FILE,
28
- );
29
- const previous: Record<string, string> =
30
- state === undefined ? {} : parseState(state.text);
31
- const plan: IScaffoldSyncPlan = {
32
- location,
33
- files: {},
34
- expected: {},
35
- changed: [],
36
- unchanged: [],
37
- conflicts: [],
38
- retired: [],
39
- };
40
- const desired: Record<string, string> = {};
41
- for (const [relative, content] of Object.entries(bundle)) {
42
- if (!isScaffoldInstruction(relative)) continue;
43
- desired[relative] = digest(content);
44
- const current: ReturnType<typeof readScaffoldSyncFile> =
45
- readScaffoldSyncFile(location, relative);
46
- if (current !== undefined && digest(current.text) === desired[relative]) {
47
- plan.unchanged.push(relative);
48
- continue;
49
- }
50
-
51
- // An explicit baseline is the caller's assertion of the edition each supplied file came from, so it governs over the stored record; the record still covers every file the baseline lacks.
52
- const baseline: string | undefined =
53
- (props.baseline === undefined
54
- ? undefined
55
- : priorDigest(props.baseline, relative)) ?? previous[relative];
56
- if (current !== undefined && digest(current.text) !== baseline) {
57
- plan.conflicts.push(relative);
58
- continue;
59
- }
60
- plan.changed.push(relative);
61
- plan.files[relative] = content;
62
- plan.expected[relative] = current?.snapshot ?? null;
63
- }
64
- plan.retired = Object.keys(previous).filter(
65
- (relative: string): boolean => !(relative in desired),
66
- );
67
- const next: string =
68
- JSON.stringify(
69
- { version: 1, files: { ...previous, ...desired } },
70
- null,
71
- 2,
72
- ) + "\n";
73
- // State is last: a stopped content publication must not advance its baseline.
74
- if (state?.text !== next) {
75
- plan.files[SCAFFOLD_SYNC_STATE_FILE] = next;
76
- plan.expected[SCAFFOLD_SYNC_STATE_FILE] = state?.snapshot ?? null;
77
- }
78
- return plan;
79
- }
80
-
81
- /** Canonical line endings avoid treating checkout conversion as a local edit. */
82
- function digest(text: string): string {
83
- return createHash("sha256")
84
- .update(text.replaceAll("\r\n", "\n"))
85
- .digest("hex");
86
- }
87
-
88
- /** Read the caller's explicit prior adopted instruction file without changing it. */
89
- function priorDigest(root: string, relative: string): string | undefined {
90
- const source: ReturnType<typeof readScaffoldSyncFile> = readScaffoldSyncFile(
91
- root,
92
- relative,
93
- );
94
- return source === undefined ? undefined : digest(source.text);
95
- }
96
-
97
- /** Refuse malformed state and any path outside the generated instruction surface. */
98
- function parseState(text: string): Record<string, string> {
99
- const state: unknown = JSON.parse(text);
100
- if (
101
- typeof state !== "object" ||
102
- state === null ||
103
- !("version" in state) ||
104
- state.version !== 1 ||
105
- !("files" in state) ||
106
- typeof state.files !== "object" ||
107
- state.files === null ||
108
- Array.isArray(state.files)
109
- )
110
- throw new Error("Invalid scaffold sync state.");
111
- const files: Record<string, string> = {};
112
- for (const [relative, value] of Object.entries(state.files)) {
113
- if (
114
- !isScaffoldInstruction(relative) ||
115
- typeof value !== "string" ||
116
- !/^[0-9a-f]{64}$/u.test(value)
117
- )
118
- throw new Error("Invalid scaffold sync baseline: " + relative);
119
- files[relative] = value;
120
- }
121
- return files;
122
- }
@@ -1,120 +0,0 @@
1
- import * as fs from "node:fs";
2
- import * as path from "node:path";
3
-
4
- import { type IScaffoldPhysicalDirectory } from "./IScaffoldPhysicalDirectory";
5
- import { type IScaffoldPublicationEntry } from "./IScaffoldPublicationEntry";
6
- import { type IScaffoldPublicationOptions } from "./IScaffoldPublicationOptions";
7
- import { type IScaffoldPublicationReceipt } from "./IScaffoldPublicationReceipt";
8
- import { type ScaffoldFilePublicationOutcome } from "./ScaffoldFilePublicationOutcome";
9
- import { assertScaffoldPhysicalDirectory } from "./assertScaffoldPhysicalDirectory";
10
- import { ensureScaffoldBaseDirectory } from "./ensureScaffoldBaseDirectory";
11
- import { ensureScaffoldFileDirectory } from "./ensureScaffoldFileDirectory";
12
- import { planScaffoldPublication } from "./planScaffoldPublication";
13
- import { publishScaffoldCandidate } from "./publishScaffoldCandidate";
14
- import { writeScaffoldFile } from "./writeScaffoldFile";
15
-
16
- /**
17
- * Write a path-to-text map under `location` and return a receipt naming every completed file and the first entry that did not complete.
18
- *
19
- * The whole map is validated by {@link planScaffoldPublication} before the directory is created. Without `force`, a directory that already has an entry refuses the first file, so nothing is written. New files are created exclusively relative to captured parent directory handles, refusing linked parent directories; with `force`, existing ordinary single-link files are rewritten in place through verified descriptors. Optional expected generations bind each candidate to its inspected ordinary-file identity and written state, or require absence. Publication stops at the first refusal or partial slot, and nothing is deleted. Directories created while preparing a failed entry can remain even when the receipt is refused.
20
- *
21
- * Every error thrown while preparing directories or before a file is written becomes a `create-failed` refusal for that file. Invalid input and an outcome that breaks the publication contract still throw.
22
- *
23
- * @param location Target directory, resolved against the working directory.
24
- * @param files UTF-8 text keyed by paths resolved against `location`; absolute keys are admitted when their targets remain below it.
25
- * @param options `force` admits a populated directory and in-place replacement.
26
- * @returns Frozen receipt of the attempt.
27
- *
28
- * @evidence contracts/development/implementation.md#principled-implementation Physical directory captures authorize new handle-relative file creation and forced descriptor-based replacement through writeScaffoldFile; the no-force emptiness probe reads one entry and revalidates the captured root, while prepared directories can remain after a later refusal.
29
- * @evidence contracts/development/implementation.md#clear-and-simple-structure This function owns the root, emptiness and directory cache; publishScaffoldCandidate owns order and receipt status, ensureScaffoldFileDirectory owns descendant captures, and writeScaffoldFile dispatches create or replacement.
30
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The catch maps any thrown error to a `create-failed` refusal, which is truthful because directory preparation creates no file, `writeScaffoldFile` documents that it throws only before any write, and `publishNativeScaffoldFile` returns its failures; no error is retried or hidden.
31
- * @evidence contracts/development/common.md#meaningful-documentation The comment states validation before mutation, the non-empty refusal, parent-handle creation, the stop rule, the no-delete rule, how thrown errors are reported, and each parameter.
32
- * @evidence contracts/development/implementation.md#efficient-algorithms Planning encodes all content and checks each target and ancestor key with costs driven by bytes, path lengths and depths. Publishing performs a constant number of directory captures per traversed segment and writes and reads back each attempted file once; the no-force emptiness probe reads one entry rather than listing the root.
33
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Directory captures are cached per absolute path for this call only, and a cached directory is revalidated by identity before each use, so a replaced directory is refused rather than reused; captures are never shared across calls.
34
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The call-local cache contains one capture per candidate directory; the emptiness probe attempts close in finally, while file adapters attempt every acquired handle's release and report failures. No close-error outcome proves release, and the receipt retains candidate bytes for its caller.
35
- */
36
- export const publishFiles: (
37
- location: string,
38
- files: Record<string, string>,
39
- options?: IScaffoldPublicationOptions,
40
- ) => IScaffoldPublicationReceipt = (
41
- location: string,
42
- files: Record<string, string>,
43
- options?: IScaffoldPublicationOptions,
44
- ): IScaffoldPublicationReceipt => {
45
- const root: string = path.resolve(location);
46
- const candidate: readonly IScaffoldPublicationEntry[] =
47
- planScaffoldPublication({ files, root });
48
- const force: boolean = options?.force === true;
49
- let session: IScaffoldPublicationSession | undefined;
50
- return publishScaffoldCandidate({
51
- candidate,
52
- publish: (
53
- entry: IScaffoldPublicationEntry,
54
- ): ScaffoldFilePublicationOutcome => {
55
- try {
56
- session ??= openScaffoldPublicationSession(root, force);
57
- const parent: IScaffoldPhysicalDirectory = ensureScaffoldFileDirectory({
58
- base: session.base,
59
- cache: session.directories,
60
- directory: path.dirname(entry.target),
61
- });
62
- return writeScaffoldFile({
63
- base: session.base,
64
- bytes: Uint8Array.from(entry.bytes),
65
- force,
66
- expected: options?.expected?.[entry.relative],
67
- parent,
68
- target: entry.target,
69
- });
70
- } catch (error) {
71
- return Object.freeze({
72
- error,
73
- reason: "create-failed" as const,
74
- status: "refused" as const,
75
- });
76
- }
77
- },
78
- });
79
- };
80
-
81
- /** Captured root and descendant directories for one `publishFiles` call. */
82
- interface IScaffoldPublicationSession {
83
- base: IScaffoldPhysicalDirectory;
84
- directories: Map<string, IScaffoldPhysicalDirectory>;
85
- }
86
-
87
- /**
88
- * Create or capture the root and, without `force`, refuse one that already has an entry. Runs on the first file so an empty candidate touches nothing.
89
- */
90
- const openScaffoldPublicationSession: (
91
- root: string,
92
- force: boolean,
93
- ) => IScaffoldPublicationSession = (
94
- root: string,
95
- force: boolean,
96
- ): IScaffoldPublicationSession => {
97
- const base: IScaffoldPhysicalDirectory = ensureScaffoldBaseDirectory(root);
98
- if (force === false) {
99
- if (hasDirectoryEntry(base.path))
100
- throw new Error(
101
- `target directory is not empty: ${base.path}; pass --force to scaffold into it anyway`,
102
- );
103
- assertScaffoldPhysicalDirectory(base);
104
- }
105
- return {
106
- base,
107
- directories: new Map<string, IScaffoldPhysicalDirectory>(),
108
- };
109
- };
110
-
111
- const hasDirectoryEntry: (directory: string) => boolean = (
112
- directory: string,
113
- ): boolean => {
114
- const listing: fs.Dir = fs.opendirSync(directory);
115
- try {
116
- return listing.readSync() !== null;
117
- } finally {
118
- listing.closeSync();
119
- }
120
- };