@automovie/evidence 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 (453) hide show
  1. package/README.md +7 -92
  2. package/lib/IAutoMovieDevelopmentProps.d.ts +26 -20
  3. package/lib/IAutoMovieEvidenceConfigProps.d.ts +19 -18
  4. package/lib/IAutoMovieNarrativeProps.d.ts +10 -8
  5. package/lib/IAutoMovieNoNarrativeProps.d.ts +4 -6
  6. package/lib/createDevelopmentContractClaims.d.ts +16 -26
  7. package/lib/createDevelopmentContractClaims.js +45 -30
  8. package/lib/createDevelopmentContractClaims.js.map +1 -1
  9. package/lib/createEngineeringClaims.d.ts +16 -21
  10. package/lib/createEngineeringClaims.js +15 -20
  11. package/lib/createEngineeringClaims.js.map +1 -1
  12. package/lib/createEvidenceConfig.d.ts +7 -11
  13. package/lib/createEvidenceConfig.js +34 -12
  14. package/lib/createEvidenceConfig.js.map +1 -1
  15. package/lib/createResearchClaims.d.ts +5 -13
  16. package/lib/createResearchClaims.js +6 -14
  17. package/lib/createResearchClaims.js.map +1 -1
  18. package/lib/internal/IContractLocation.d.ts +6 -7
  19. package/lib/internal/PRODUCTION_CONTRACTS.d.ts +14 -7
  20. package/lib/internal/PRODUCTION_CONTRACTS.js +14 -7
  21. package/lib/internal/PRODUCTION_CONTRACTS.js.map +1 -1
  22. package/lib/internal/SKILLS_ROOT.d.ts +13 -7
  23. package/lib/internal/SKILLS_ROOT.js +13 -7
  24. package/lib/internal/SKILLS_ROOT.js.map +1 -1
  25. package/lib/internal/STORY_CONTRACTS.d.ts +12 -9
  26. package/lib/internal/STORY_CONTRACTS.js +12 -9
  27. package/lib/internal/STORY_CONTRACTS.js.map +1 -1
  28. package/lib/internal/assertFilmCatalogLayout.d.ts +12 -0
  29. package/lib/internal/assertFilmCatalogLayout.js +144 -0
  30. package/lib/internal/assertFilmCatalogLayout.js.map +1 -0
  31. package/lib/internal/assertProductionContractLayout.d.ts +2 -10
  32. package/lib/internal/assertProductionContractLayout.js +2 -10
  33. package/lib/internal/assertProductionContractLayout.js.map +1 -1
  34. package/lib/internal/createReferenceRoot.d.ts +0 -8
  35. package/lib/internal/createReferenceRoot.js +0 -8
  36. package/lib/internal/createReferenceRoot.js.map +1 -1
  37. package/lib/internal/hasMatchingFile.d.ts +5 -0
  38. package/lib/internal/hasMatchingFile.js +20 -0
  39. package/lib/internal/hasMatchingFile.js.map +1 -0
  40. package/lib/internal/resolveSkillsDirectory.d.ts +2 -9
  41. package/lib/internal/resolveSkillsDirectory.js +2 -9
  42. package/lib/internal/resolveSkillsDirectory.js.map +1 -1
  43. package/lib/narrative/AuthoredLayer.d.ts +2 -6
  44. package/lib/narrative/EvidenceMetadataRewriteOwnership.d.ts +0 -5
  45. package/lib/narrative/IEvidenceMetadataRenderedSample.d.ts +1 -8
  46. package/lib/narrative/IEvidenceMetadataRewriteFile.d.ts +1 -8
  47. package/lib/narrative/IEvidenceMetadataRewriteProps.d.ts +1 -8
  48. package/lib/narrative/IEvidenceMetadataRewriteReport.d.ts +1 -8
  49. package/lib/narrative/IPackageChecklistClaimProps.d.ts +2 -7
  50. package/lib/narrative/IPackageContractProps.d.ts +4 -11
  51. package/lib/narrative/IPackagePopulationContractProps.d.ts +1 -8
  52. package/lib/narrative/IProductionConfigProps.d.ts +7 -11
  53. package/lib/narrative/IProductionConstruction.d.ts +3 -10
  54. package/lib/narrative/NarrativeLayer.d.ts +3 -8
  55. package/lib/narrative/NarrativeScope.d.ts +2 -7
  56. package/lib/narrative/ProductionStage.d.ts +2 -6
  57. package/lib/narrative/createBriefFiles.d.ts +5 -12
  58. package/lib/narrative/createBriefFiles.js +5 -12
  59. package/lib/narrative/createBriefFiles.js.map +1 -1
  60. package/lib/narrative/createNarrativeUnitFiles.d.ts +0 -8
  61. package/lib/narrative/createNarrativeUnitFiles.js +0 -8
  62. package/lib/narrative/createNarrativeUnitFiles.js.map +1 -1
  63. package/lib/narrative/createPackageChecklistClaim.d.ts +3 -11
  64. package/lib/narrative/createPackageChecklistClaim.js +5 -15
  65. package/lib/narrative/createPackageChecklistClaim.js.map +1 -1
  66. package/lib/narrative/createPackageContract.d.ts +0 -8
  67. package/lib/narrative/createPackageContract.js +0 -8
  68. package/lib/narrative/createPackageContract.js.map +1 -1
  69. package/lib/narrative/createPackagePopulationContract.d.ts +3 -11
  70. package/lib/narrative/createPackagePopulationContract.js +3 -11
  71. package/lib/narrative/createPackagePopulationContract.js.map +1 -1
  72. package/lib/narrative/createProductionClaims.d.ts +0 -8
  73. package/lib/narrative/createProductionClaims.js +0 -8
  74. package/lib/narrative/createProductionClaims.js.map +1 -1
  75. package/lib/narrative/createProductionConfig.d.ts +1 -11
  76. package/lib/narrative/createProductionConfig.js +1 -11
  77. package/lib/narrative/createProductionConfig.js.map +1 -1
  78. package/lib/narrative/createSettingsFiles.d.ts +0 -8
  79. package/lib/narrative/createSettingsFiles.js +0 -8
  80. package/lib/narrative/createSettingsFiles.js.map +1 -1
  81. package/lib/narrative/internal/AUTHORED_LAYERS.d.ts +14 -7
  82. package/lib/narrative/internal/AUTHORED_LAYERS.js +14 -7
  83. package/lib/narrative/internal/AUTHORED_LAYERS.js.map +1 -1
  84. package/lib/narrative/internal/claims/createDiscoveryClaim.d.ts +17 -22
  85. package/lib/narrative/internal/claims/createDiscoveryClaim.js +17 -22
  86. package/lib/narrative/internal/claims/createDiscoveryClaim.js.map +1 -1
  87. package/lib/narrative/internal/claims/createInstructionCoverageClaim.d.ts +7 -15
  88. package/lib/narrative/internal/claims/createInstructionCoverageClaim.js +7 -15
  89. package/lib/narrative/internal/claims/createInstructionCoverageClaim.js.map +1 -1
  90. package/lib/narrative/internal/claims/createLayerClaims.d.ts +2 -10
  91. package/lib/narrative/internal/claims/createLayerClaims.js +2 -28
  92. package/lib/narrative/internal/claims/createLayerClaims.js.map +1 -1
  93. package/lib/narrative/internal/claims/createOutlineClaims.d.ts +6 -14
  94. package/lib/narrative/internal/claims/createOutlineClaims.js +9 -18
  95. package/lib/narrative/internal/claims/createOutlineClaims.js.map +1 -1
  96. package/lib/narrative/internal/claims/createPopulationObligationClaims.d.ts +4 -14
  97. package/lib/narrative/internal/claims/createPopulationObligationClaims.js +10 -36
  98. package/lib/narrative/internal/claims/createPopulationObligationClaims.js.map +1 -1
  99. package/lib/narrative/internal/claims/createReviewClaims.d.ts +11 -19
  100. package/lib/narrative/internal/claims/createReviewClaims.js +57 -56
  101. package/lib/narrative/internal/claims/createReviewClaims.js.map +1 -1
  102. package/lib/narrative/internal/claims/createSettingCoverageClaim.d.ts +1 -9
  103. package/lib/narrative/internal/claims/createSettingCoverageClaim.js +1 -9
  104. package/lib/narrative/internal/claims/createSettingCoverageClaim.js.map +1 -1
  105. package/lib/narrative/internal/claims/index.d.ts +0 -1
  106. package/lib/narrative/internal/claims/index.js +0 -1
  107. package/lib/narrative/internal/claims/index.js.map +1 -1
  108. package/lib/narrative/internal/collectProductionClaims.d.ts +1 -11
  109. package/lib/narrative/internal/collectProductionClaims.js +2 -15
  110. package/lib/narrative/internal/collectProductionClaims.js.map +1 -1
  111. package/lib/narrative/internal/constructionStage.d.ts +2 -9
  112. package/lib/narrative/internal/constructionStage.js +2 -9
  113. package/lib/narrative/internal/constructionStage.js.map +1 -1
  114. package/lib/narrative/internal/createGraphConfig.d.ts +4 -12
  115. package/lib/narrative/internal/createGraphConfig.js +4 -12
  116. package/lib/narrative/internal/createGraphConfig.js.map +1 -1
  117. package/lib/narrative/internal/index.d.ts +0 -1
  118. package/lib/narrative/internal/index.js +0 -1
  119. package/lib/narrative/internal/index.js.map +1 -1
  120. package/lib/narrative/internal/isCanonLayer.d.ts +2 -9
  121. package/lib/narrative/internal/isCanonLayer.js +2 -9
  122. package/lib/narrative/internal/isCanonLayer.js.map +1 -1
  123. package/lib/narrative/internal/metadataRewrite/ACKNOWLEDGEMENT.d.ts +10 -7
  124. package/lib/narrative/internal/metadataRewrite/ACKNOWLEDGEMENT.js +10 -7
  125. package/lib/narrative/internal/metadataRewrite/ACKNOWLEDGEMENT.js.map +1 -1
  126. package/lib/narrative/internal/metadataRewrite/EvidenceDeclarationKind.d.ts +1 -8
  127. package/lib/narrative/internal/metadataRewrite/HEADING_ACKNOWLEDGEMENT.d.ts +10 -7
  128. package/lib/narrative/internal/metadataRewrite/HEADING_ACKNOWLEDGEMENT.js +10 -7
  129. package/lib/narrative/internal/metadataRewrite/HEADING_ACKNOWLEDGEMENT.js.map +1 -1
  130. package/lib/narrative/internal/metadataRewrite/HEADING_REVIEW.d.ts +10 -7
  131. package/lib/narrative/internal/metadataRewrite/HEADING_REVIEW.js +10 -7
  132. package/lib/narrative/internal/metadataRewrite/HEADING_REVIEW.js.map +1 -1
  133. package/lib/narrative/internal/metadataRewrite/IEvidenceHeading.d.ts +1 -8
  134. package/lib/narrative/internal/metadataRewrite/IEvidenceSection.d.ts +1 -8
  135. package/lib/narrative/internal/metadataRewrite/IMetadataFragment.d.ts +1 -8
  136. package/lib/narrative/internal/metadataRewrite/IProjectionSegment.d.ts +1 -8
  137. package/lib/narrative/internal/metadataRewrite/IProtectedProjection.d.ts +1 -8
  138. package/lib/narrative/internal/metadataRewrite/REVIEW.d.ts +11 -7
  139. package/lib/narrative/internal/metadataRewrite/REVIEW.js +11 -7
  140. package/lib/narrative/internal/metadataRewrite/REVIEW.js.map +1 -1
  141. package/lib/narrative/internal/metadataRewrite/SUSPICIOUS.d.ts +13 -8
  142. package/lib/narrative/internal/metadataRewrite/SUSPICIOUS.js +13 -8
  143. package/lib/narrative/internal/metadataRewrite/SUSPICIOUS.js.map +1 -1
  144. package/lib/narrative/internal/metadataRewrite/UTF8.d.ts +10 -7
  145. package/lib/narrative/internal/metadataRewrite/UTF8.js +10 -7
  146. package/lib/narrative/internal/metadataRewrite/UTF8.js.map +1 -1
  147. package/lib/narrative/internal/metadataRewrite/between.d.ts +1 -11
  148. package/lib/narrative/internal/metadataRewrite/between.js +1 -11
  149. package/lib/narrative/internal/metadataRewrite/between.js.map +1 -1
  150. package/lib/narrative/internal/metadataRewrite/continuation.d.ts +1 -11
  151. package/lib/narrative/internal/metadataRewrite/continuation.js +1 -11
  152. package/lib/narrative/internal/metadataRewrite/continuation.js.map +1 -1
  153. package/lib/narrative/internal/metadataRewrite/declarationKind.d.ts +1 -11
  154. package/lib/narrative/internal/metadataRewrite/declarationKind.js +1 -11
  155. package/lib/narrative/internal/metadataRewrite/declarationKind.js.map +1 -1
  156. package/lib/narrative/internal/metadataRewrite/decode.d.ts +1 -11
  157. package/lib/narrative/internal/metadataRewrite/decode.js +1 -11
  158. package/lib/narrative/internal/metadataRewrite/decode.js.map +1 -1
  159. package/lib/narrative/internal/metadataRewrite/directory.d.ts +1 -11
  160. package/lib/narrative/internal/metadataRewrite/directory.js +1 -11
  161. package/lib/narrative/internal/metadataRewrite/directory.js.map +1 -1
  162. package/lib/narrative/internal/metadataRewrite/errorMessage.d.ts +1 -11
  163. package/lib/narrative/internal/metadataRewrite/errorMessage.js +1 -11
  164. package/lib/narrative/internal/metadataRewrite/errorMessage.js.map +1 -1
  165. package/lib/narrative/internal/metadataRewrite/evidenceHeading.d.ts +1 -11
  166. package/lib/narrative/internal/metadataRewrite/evidenceHeading.js +1 -11
  167. package/lib/narrative/internal/metadataRewrite/evidenceHeading.js.map +1 -1
  168. package/lib/narrative/internal/metadataRewrite/evidenceSections.d.ts +1 -11
  169. package/lib/narrative/internal/metadataRewrite/evidenceSections.js +1 -11
  170. package/lib/narrative/internal/metadataRewrite/evidenceSections.js.map +1 -1
  171. package/lib/narrative/internal/metadataRewrite/findClose.d.ts +1 -11
  172. package/lib/narrative/internal/metadataRewrite/findClose.js +1 -11
  173. package/lib/narrative/internal/metadataRewrite/findClose.js.map +1 -1
  174. package/lib/narrative/internal/metadataRewrite/firstDifference.d.ts +1 -11
  175. package/lib/narrative/internal/metadataRewrite/firstDifference.js +1 -11
  176. package/lib/narrative/internal/metadataRewrite/firstDifference.js.map +1 -1
  177. package/lib/narrative/internal/metadataRewrite/flatFingerprintStart.d.ts +2 -9
  178. package/lib/narrative/internal/metadataRewrite/flatFingerprintStart.js +2 -9
  179. package/lib/narrative/internal/metadataRewrite/flatFingerprintStart.js.map +1 -1
  180. package/lib/narrative/internal/metadataRewrite/invalidUtf8Offset.d.ts +1 -11
  181. package/lib/narrative/internal/metadataRewrite/invalidUtf8Offset.js +1 -11
  182. package/lib/narrative/internal/metadataRewrite/invalidUtf8Offset.js.map +1 -1
  183. package/lib/narrative/internal/metadataRewrite/isDeclaration.d.ts +1 -11
  184. package/lib/narrative/internal/metadataRewrite/isDeclaration.js +1 -11
  185. package/lib/narrative/internal/metadataRewrite/isDeclaration.js.map +1 -1
  186. package/lib/narrative/internal/metadataRewrite/isNodeError.d.ts +1 -11
  187. package/lib/narrative/internal/metadataRewrite/isNodeError.js +1 -11
  188. package/lib/narrative/internal/metadataRewrite/isNodeError.js.map +1 -1
  189. package/lib/narrative/internal/metadataRewrite/lineEnding.d.ts +1 -11
  190. package/lib/narrative/internal/metadataRewrite/lineEnding.js +1 -11
  191. package/lib/narrative/internal/metadataRewrite/lineEnding.js.map +1 -1
  192. package/lib/narrative/internal/metadataRewrite/locate.d.ts +1 -11
  193. package/lib/narrative/internal/metadataRewrite/locate.js +1 -11
  194. package/lib/narrative/internal/metadataRewrite/locate.js.map +1 -1
  195. package/lib/narrative/internal/metadataRewrite/markdownFiles.d.ts +1 -11
  196. package/lib/narrative/internal/metadataRewrite/markdownFiles.js +1 -11
  197. package/lib/narrative/internal/metadataRewrite/markdownFiles.js.map +1 -1
  198. package/lib/narrative/internal/metadataRewrite/metadataOwnership.d.ts +1 -11
  199. package/lib/narrative/internal/metadataRewrite/metadataOwnership.js +1 -11
  200. package/lib/narrative/internal/metadataRewrite/metadataOwnership.js.map +1 -1
  201. package/lib/narrative/internal/metadataRewrite/normalizeFile.d.ts +1 -11
  202. package/lib/narrative/internal/metadataRewrite/normalizeFile.js +1 -11
  203. package/lib/narrative/internal/metadataRewrite/normalizeFile.js.map +1 -1
  204. package/lib/narrative/internal/metadataRewrite/occurrenceOffsets.d.ts +1 -11
  205. package/lib/narrative/internal/metadataRewrite/occurrenceOffsets.js +1 -11
  206. package/lib/narrative/internal/metadataRewrite/occurrenceOffsets.js.map +1 -1
  207. package/lib/narrative/internal/metadataRewrite/occurrences.d.ts +1 -11
  208. package/lib/narrative/internal/metadataRewrite/occurrences.js +1 -11
  209. package/lib/narrative/internal/metadataRewrite/occurrences.js.map +1 -1
  210. package/lib/narrative/internal/metadataRewrite/originalOffset.d.ts +1 -11
  211. package/lib/narrative/internal/metadataRewrite/originalOffset.js +1 -11
  212. package/lib/narrative/internal/metadataRewrite/originalOffset.js.map +1 -1
  213. package/lib/narrative/internal/metadataRewrite/project.d.ts +1 -11
  214. package/lib/narrative/internal/metadataRewrite/project.js +1 -11
  215. package/lib/narrative/internal/metadataRewrite/project.js.map +1 -1
  216. package/lib/narrative/internal/metadataRewrite/protectedFileKind.d.ts +1 -11
  217. package/lib/narrative/internal/metadataRewrite/protectedFileKind.js +1 -11
  218. package/lib/narrative/internal/metadataRewrite/protectedFileKind.js.map +1 -1
  219. package/lib/narrative/internal/metadataRewrite/replacementSafety.d.ts +1 -11
  220. package/lib/narrative/internal/metadataRewrite/replacementSafety.js +1 -11
  221. package/lib/narrative/internal/metadataRewrite/replacementSafety.js.map +1 -1
  222. package/lib/narrative/internal/metadataRewrite/sameMetadata.d.ts +1 -11
  223. package/lib/narrative/internal/metadataRewrite/sameMetadata.js +1 -11
  224. package/lib/narrative/internal/metadataRewrite/sameMetadata.js.map +1 -1
  225. package/lib/narrative/internal/metadataRewrite/selectFiles.d.ts +1 -11
  226. package/lib/narrative/internal/metadataRewrite/selectFiles.js +1 -11
  227. package/lib/narrative/internal/metadataRewrite/selectFiles.js.map +1 -1
  228. package/lib/narrative/internal/metadataRewrite/singleLineDeclaration.d.ts +1 -11
  229. package/lib/narrative/internal/metadataRewrite/singleLineDeclaration.js +1 -11
  230. package/lib/narrative/internal/metadataRewrite/singleLineDeclaration.js.map +1 -1
  231. package/lib/narrative/internal/metadataRewrite/textLocation.d.ts +1 -11
  232. package/lib/narrative/internal/metadataRewrite/textLocation.js +1 -11
  233. package/lib/narrative/internal/metadataRewrite/textLocation.js.map +1 -1
  234. package/lib/narrative/internal/metadataRewrite/validateRenderedSample.d.ts +1 -11
  235. package/lib/narrative/internal/metadataRewrite/validateRenderedSample.js +1 -11
  236. package/lib/narrative/internal/metadataRewrite/validateRenderedSample.js.map +1 -1
  237. package/lib/narrative/internal/metadataRewrite/withoutEnding.d.ts +1 -11
  238. package/lib/narrative/internal/metadataRewrite/withoutEnding.js +1 -11
  239. package/lib/narrative/internal/metadataRewrite/withoutEnding.js.map +1 -1
  240. package/lib/narrative/internal/productionLayers.d.ts +1 -11
  241. package/lib/narrative/internal/productionLayers.js +1 -11
  242. package/lib/narrative/internal/productionLayers.js.map +1 -1
  243. package/lib/narrative/internal/readSettingsFiles.d.ts +4 -12
  244. package/lib/narrative/internal/readSettingsFiles.js +8 -13
  245. package/lib/narrative/internal/readSettingsFiles.js.map +1 -1
  246. package/lib/narrative/internal/references/createCoverageReference.d.ts +2 -10
  247. package/lib/narrative/internal/references/createCoverageReference.js +2 -10
  248. package/lib/narrative/internal/references/createCoverageReference.js.map +1 -1
  249. package/lib/narrative/internal/references/createDiscoveryReferences.d.ts +5 -13
  250. package/lib/narrative/internal/references/createDiscoveryReferences.js +5 -13
  251. package/lib/narrative/internal/references/createDiscoveryReferences.js.map +1 -1
  252. package/lib/narrative/internal/references/createLanguageDiscoveryReferences.d.ts +1 -11
  253. package/lib/narrative/internal/references/createLanguageDiscoveryReferences.js +1 -11
  254. package/lib/narrative/internal/references/createLanguageDiscoveryReferences.js.map +1 -1
  255. package/lib/narrative/internal/references/createLanguagePrincipleReferences.d.ts +3 -13
  256. package/lib/narrative/internal/references/createLanguagePrincipleReferences.js +4 -13
  257. package/lib/narrative/internal/references/createLanguagePrincipleReferences.js.map +1 -1
  258. package/lib/narrative/internal/references/createLineageReference.d.ts +6 -14
  259. package/lib/narrative/internal/references/createLineageReference.js +6 -14
  260. package/lib/narrative/internal/references/createLineageReference.js.map +1 -1
  261. package/lib/narrative/internal/references/createLocalContractReference.d.ts +0 -8
  262. package/lib/narrative/internal/references/createLocalContractReference.js +0 -8
  263. package/lib/narrative/internal/references/createLocalContractReference.js.map +1 -1
  264. package/lib/narrative/internal/references/createPrincipleReferences.d.ts +2 -21
  265. package/lib/narrative/internal/references/createPrincipleReferences.js +6 -35
  266. package/lib/narrative/internal/references/createPrincipleReferences.js.map +1 -1
  267. package/lib/narrative/internal/references/createSettingReferences.d.ts +3 -10
  268. package/lib/narrative/internal/references/createSettingReferences.js +3 -10
  269. package/lib/narrative/internal/references/createSettingReferences.js.map +1 -1
  270. package/lib/narrative/internal/references/createSharedReference.d.ts +7 -16
  271. package/lib/narrative/internal/references/createSharedReference.js +8 -17
  272. package/lib/narrative/internal/references/createSharedReference.js.map +1 -1
  273. package/lib/narrative/internal/references/createUpstreamReference.d.ts +0 -8
  274. package/lib/narrative/internal/references/createUpstreamReference.js +0 -8
  275. package/lib/narrative/internal/references/createUpstreamReference.js.map +1 -1
  276. package/lib/narrative/internal/references/layerFiles.d.ts +4 -13
  277. package/lib/narrative/internal/references/layerFiles.js +5 -15
  278. package/lib/narrative/internal/references/layerFiles.js.map +1 -1
  279. package/lib/narrative/internal/settingsEntryAnchor.d.ts +2 -9
  280. package/lib/narrative/internal/settingsEntryAnchor.js +2 -9
  281. package/lib/narrative/internal/settingsEntryAnchor.js.map +1 -1
  282. package/lib/narrative/internal/topology/createTopologyFiles.d.ts +1 -11
  283. package/lib/narrative/internal/topology/createTopologyFiles.js +1 -11
  284. package/lib/narrative/internal/topology/createTopologyFiles.js.map +1 -1
  285. package/lib/narrative/internal/utilities/BODY_ROOT.d.ts +14 -7
  286. package/lib/narrative/internal/utilities/BODY_ROOT.js +14 -7
  287. package/lib/narrative/internal/utilities/BODY_ROOT.js.map +1 -1
  288. package/lib/narrative/internal/utilities/PACKAGE_DOCS_ROOT.d.ts +15 -7
  289. package/lib/narrative/internal/utilities/PACKAGE_DOCS_ROOT.js +15 -7
  290. package/lib/narrative/internal/utilities/PACKAGE_DOCS_ROOT.js.map +1 -1
  291. package/lib/narrative/internal/utilities/assertProductionEvidenceSources.d.ts +2 -9
  292. package/lib/narrative/internal/utilities/assertProductionEvidenceSources.js +2 -9
  293. package/lib/narrative/internal/utilities/assertProductionEvidenceSources.js.map +1 -1
  294. package/lib/narrative/internal/utilities/createContractDirectory.d.ts +4 -10
  295. package/lib/narrative/internal/utilities/createContractDirectory.js +4 -10
  296. package/lib/narrative/internal/utilities/createContractDirectory.js.map +1 -1
  297. package/lib/narrative/internal/utilities/createContractRoot.d.ts +8 -18
  298. package/lib/narrative/internal/utilities/createContractRoot.js +8 -18
  299. package/lib/narrative/internal/utilities/createContractRoot.js.map +1 -1
  300. package/lib/narrative/internal/utilities/createEvidenceFiles.d.ts +1 -11
  301. package/lib/narrative/internal/utilities/createEvidenceFiles.js +1 -11
  302. package/lib/narrative/internal/utilities/createEvidenceFiles.js.map +1 -1
  303. package/lib/narrative/internal/utilities/createUnitFiles.d.ts +0 -8
  304. package/lib/narrative/internal/utilities/createUnitFiles.js +0 -8
  305. package/lib/narrative/internal/utilities/createUnitFiles.js.map +1 -1
  306. package/lib/narrative/internal/utilities/hasStoryContract.d.ts +9 -0
  307. package/lib/narrative/internal/utilities/hasStoryContract.js +20 -0
  308. package/lib/narrative/internal/utilities/hasStoryContract.js.map +1 -0
  309. package/lib/narrative/internal/utilities/referenceLocation.d.ts +2 -9
  310. package/lib/narrative/internal/utilities/referenceLocation.js +2 -9
  311. package/lib/narrative/internal/utilities/referenceLocation.js.map +1 -1
  312. package/lib/narrative/internal/validateSettingsOutline.d.ts +6 -12
  313. package/lib/narrative/internal/validateSettingsOutline.js +27 -20
  314. package/lib/narrative/internal/validateSettingsOutline.js.map +1 -1
  315. package/lib/narrative/isFirstPartPilot.d.ts +1 -11
  316. package/lib/narrative/isFirstPartPilot.js +1 -11
  317. package/lib/narrative/isFirstPartPilot.js.map +1 -1
  318. package/lib/narrative/verifyEvidenceMetadataRewrite.d.ts +2 -10
  319. package/lib/narrative/verifyEvidenceMetadataRewrite.js +2 -10
  320. package/lib/narrative/verifyEvidenceMetadataRewrite.js.map +1 -1
  321. package/package.json +6 -5
  322. package/src/IAutoMovieDevelopmentProps.ts +27 -20
  323. package/src/IAutoMovieEvidenceConfigProps.ts +19 -18
  324. package/src/IAutoMovieNarrativeProps.ts +10 -8
  325. package/src/IAutoMovieNoNarrativeProps.ts +4 -6
  326. package/src/createDevelopmentContractClaims.ts +46 -30
  327. package/src/createEngineeringClaims.ts +17 -22
  328. package/src/createEvidenceConfig.ts +45 -12
  329. package/src/createResearchClaims.ts +6 -14
  330. package/src/internal/IContractLocation.ts +6 -7
  331. package/src/internal/PRODUCTION_CONTRACTS.ts +14 -7
  332. package/src/internal/SKILLS_ROOT.ts +13 -7
  333. package/src/internal/STORY_CONTRACTS.ts +12 -9
  334. package/src/internal/assertFilmCatalogLayout.ts +173 -0
  335. package/src/internal/assertProductionContractLayout.ts +2 -10
  336. package/src/internal/createReferenceRoot.ts +0 -8
  337. package/src/internal/hasMatchingFile.ts +21 -0
  338. package/src/internal/index.ts +1 -1
  339. package/src/internal/resolveSkillsDirectory.ts +2 -9
  340. package/src/narrative/AuthoredLayer.ts +2 -6
  341. package/src/narrative/EvidenceMetadataRewriteOwnership.ts +0 -5
  342. package/src/narrative/IEvidenceMetadataRenderedSample.ts +1 -8
  343. package/src/narrative/IEvidenceMetadataRewriteFile.ts +1 -8
  344. package/src/narrative/IEvidenceMetadataRewriteProps.ts +1 -8
  345. package/src/narrative/IEvidenceMetadataRewriteReport.ts +1 -8
  346. package/src/narrative/IPackageChecklistClaimProps.ts +2 -7
  347. package/src/narrative/IPackageContractProps.ts +4 -11
  348. package/src/narrative/IPackagePopulationContractProps.ts +1 -8
  349. package/src/narrative/IProductionConfigProps.ts +7 -11
  350. package/src/narrative/IProductionConstruction.ts +3 -10
  351. package/src/narrative/NarrativeLayer.ts +3 -8
  352. package/src/narrative/NarrativeScope.ts +2 -7
  353. package/src/narrative/ProductionStage.ts +2 -6
  354. package/src/narrative/createBriefFiles.ts +5 -12
  355. package/src/narrative/createNarrativeUnitFiles.ts +0 -8
  356. package/src/narrative/createPackageChecklistClaim.ts +5 -15
  357. package/src/narrative/createPackageContract.ts +0 -8
  358. package/src/narrative/createPackagePopulationContract.ts +3 -11
  359. package/src/narrative/createProductionClaims.ts +0 -8
  360. package/src/narrative/createProductionConfig.ts +1 -11
  361. package/src/narrative/createSettingsFiles.ts +0 -8
  362. package/src/narrative/internal/AUTHORED_LAYERS.ts +14 -7
  363. package/src/narrative/internal/claims/createDiscoveryClaim.ts +17 -22
  364. package/src/narrative/internal/claims/createInstructionCoverageClaim.ts +7 -15
  365. package/src/narrative/internal/claims/createLayerClaims.ts +2 -30
  366. package/src/narrative/internal/claims/createOutlineClaims.ts +9 -26
  367. package/src/narrative/internal/claims/createPopulationObligationClaims.ts +12 -53
  368. package/src/narrative/internal/claims/createReviewClaims.ts +57 -64
  369. package/src/narrative/internal/claims/createSettingCoverageClaim.ts +1 -9
  370. package/src/narrative/internal/claims/index.ts +0 -1
  371. package/src/narrative/internal/collectProductionClaims.ts +2 -15
  372. package/src/narrative/internal/constructionStage.ts +2 -9
  373. package/src/narrative/internal/createGraphConfig.ts +4 -12
  374. package/src/narrative/internal/index.ts +0 -1
  375. package/src/narrative/internal/isCanonLayer.ts +2 -9
  376. package/src/narrative/internal/metadataRewrite/ACKNOWLEDGEMENT.ts +10 -7
  377. package/src/narrative/internal/metadataRewrite/EvidenceDeclarationKind.ts +1 -8
  378. package/src/narrative/internal/metadataRewrite/HEADING_ACKNOWLEDGEMENT.ts +10 -7
  379. package/src/narrative/internal/metadataRewrite/HEADING_REVIEW.ts +10 -7
  380. package/src/narrative/internal/metadataRewrite/IEvidenceHeading.ts +1 -8
  381. package/src/narrative/internal/metadataRewrite/IEvidenceSection.ts +1 -8
  382. package/src/narrative/internal/metadataRewrite/IMetadataFragment.ts +1 -8
  383. package/src/narrative/internal/metadataRewrite/IProjectionSegment.ts +1 -8
  384. package/src/narrative/internal/metadataRewrite/IProtectedProjection.ts +1 -8
  385. package/src/narrative/internal/metadataRewrite/REVIEW.ts +11 -7
  386. package/src/narrative/internal/metadataRewrite/SUSPICIOUS.ts +13 -8
  387. package/src/narrative/internal/metadataRewrite/UTF8.ts +10 -7
  388. package/src/narrative/internal/metadataRewrite/between.ts +1 -11
  389. package/src/narrative/internal/metadataRewrite/continuation.ts +1 -11
  390. package/src/narrative/internal/metadataRewrite/declarationKind.ts +1 -11
  391. package/src/narrative/internal/metadataRewrite/decode.ts +1 -11
  392. package/src/narrative/internal/metadataRewrite/directory.ts +1 -11
  393. package/src/narrative/internal/metadataRewrite/errorMessage.ts +1 -11
  394. package/src/narrative/internal/metadataRewrite/evidenceHeading.ts +1 -11
  395. package/src/narrative/internal/metadataRewrite/evidenceSections.ts +1 -11
  396. package/src/narrative/internal/metadataRewrite/findClose.ts +1 -11
  397. package/src/narrative/internal/metadataRewrite/firstDifference.ts +1 -11
  398. package/src/narrative/internal/metadataRewrite/flatFingerprintStart.ts +2 -9
  399. package/src/narrative/internal/metadataRewrite/invalidUtf8Offset.ts +1 -11
  400. package/src/narrative/internal/metadataRewrite/isDeclaration.ts +1 -11
  401. package/src/narrative/internal/metadataRewrite/isNodeError.ts +1 -11
  402. package/src/narrative/internal/metadataRewrite/lineEnding.ts +1 -11
  403. package/src/narrative/internal/metadataRewrite/locate.ts +1 -11
  404. package/src/narrative/internal/metadataRewrite/markdownFiles.ts +1 -11
  405. package/src/narrative/internal/metadataRewrite/metadataOwnership.ts +1 -11
  406. package/src/narrative/internal/metadataRewrite/normalizeFile.ts +1 -11
  407. package/src/narrative/internal/metadataRewrite/occurrenceOffsets.ts +1 -11
  408. package/src/narrative/internal/metadataRewrite/occurrences.ts +1 -11
  409. package/src/narrative/internal/metadataRewrite/originalOffset.ts +1 -11
  410. package/src/narrative/internal/metadataRewrite/project.ts +1 -11
  411. package/src/narrative/internal/metadataRewrite/protectedFileKind.ts +1 -11
  412. package/src/narrative/internal/metadataRewrite/replacementSafety.ts +1 -11
  413. package/src/narrative/internal/metadataRewrite/sameMetadata.ts +1 -11
  414. package/src/narrative/internal/metadataRewrite/selectFiles.ts +1 -11
  415. package/src/narrative/internal/metadataRewrite/singleLineDeclaration.ts +1 -11
  416. package/src/narrative/internal/metadataRewrite/textLocation.ts +1 -11
  417. package/src/narrative/internal/metadataRewrite/validateRenderedSample.ts +1 -11
  418. package/src/narrative/internal/metadataRewrite/withoutEnding.ts +1 -11
  419. package/src/narrative/internal/productionLayers.ts +1 -11
  420. package/src/narrative/internal/readSettingsFiles.ts +8 -13
  421. package/src/narrative/internal/references/createCoverageReference.ts +2 -10
  422. package/src/narrative/internal/references/createDiscoveryReferences.ts +5 -13
  423. package/src/narrative/internal/references/createLanguageDiscoveryReferences.ts +1 -11
  424. package/src/narrative/internal/references/createLanguagePrincipleReferences.ts +4 -14
  425. package/src/narrative/internal/references/createLineageReference.ts +6 -14
  426. package/src/narrative/internal/references/createLocalContractReference.ts +0 -8
  427. package/src/narrative/internal/references/createPrincipleReferences.ts +9 -42
  428. package/src/narrative/internal/references/createSettingReferences.ts +3 -10
  429. package/src/narrative/internal/references/createSharedReference.ts +8 -17
  430. package/src/narrative/internal/references/createUpstreamReference.ts +0 -8
  431. package/src/narrative/internal/references/layerFiles.ts +5 -15
  432. package/src/narrative/internal/settingsEntryAnchor.ts +2 -9
  433. package/src/narrative/internal/topology/createTopologyFiles.ts +1 -11
  434. package/src/narrative/internal/utilities/BODY_ROOT.ts +14 -7
  435. package/src/narrative/internal/utilities/PACKAGE_DOCS_ROOT.ts +15 -7
  436. package/src/narrative/internal/utilities/assertProductionEvidenceSources.ts +2 -9
  437. package/src/narrative/internal/utilities/createContractDirectory.ts +4 -10
  438. package/src/narrative/internal/utilities/createContractRoot.ts +8 -18
  439. package/src/narrative/internal/utilities/createEvidenceFiles.ts +1 -11
  440. package/src/narrative/internal/utilities/createUnitFiles.ts +0 -8
  441. package/src/narrative/internal/utilities/hasStoryContract.ts +21 -0
  442. package/src/narrative/internal/utilities/referenceLocation.ts +2 -9
  443. package/src/narrative/internal/validateSettingsOutline.ts +27 -20
  444. package/src/narrative/isFirstPartPilot.ts +1 -11
  445. package/src/narrative/verifyEvidenceMetadataRewrite.ts +2 -10
  446. package/lib/narrative/internal/REALIZED_LAYERS.d.ts +0 -16
  447. package/lib/narrative/internal/REALIZED_LAYERS.js +0 -19
  448. package/lib/narrative/internal/REALIZED_LAYERS.js.map +0 -1
  449. package/lib/narrative/internal/claims/createExpressionObligationClaims.d.ts +0 -26
  450. package/lib/narrative/internal/claims/createExpressionObligationClaims.js +0 -93
  451. package/lib/narrative/internal/claims/createExpressionObligationClaims.js.map +0 -1
  452. package/src/narrative/internal/REALIZED_LAYERS.ts +0 -18
  453. package/src/narrative/internal/claims/createExpressionObligationClaims.ts +0 -125
@@ -2,67 +2,34 @@ import type {
2
2
  IEvidenceMarkdownReference,
3
3
  IEvidenceReference,
4
4
  } from "@wrtnlabs/evidence";
5
- import fs from "node:fs";
6
- import path from "node:path";
7
5
 
8
6
  import type { IContractLocation } from "../../../internal/IContractLocation";
9
7
  import type { AuthoredLayer } from "../../AuthoredLayer";
10
- import { createContractDirectory } from "../utilities/createContractDirectory";
8
+ import { hasStoryContract } from "../utilities/hasStoryContract";
11
9
  import { createSharedReference } from "./createSharedReference";
12
10
  import { layerFiles } from "./layerFiles";
13
11
 
14
12
  /**
15
13
  * Creates the principle checklists every unit of one layer answers for itself.
16
14
  *
17
- * A settings H2 answers the common and settings checklists; a narrative unit
18
- * also answers the narrative checklist, which settings cannot: it inherits no
19
- * unit and stages no turn. A script or screenplay unit additionally answers the
20
- * realized checklist, whose questions need literal text to be asked of: a
21
- * treatment fixes which exchange happens, and only a layer that writes the
22
- * words can be asked whether this speaker could have said them. No item may be
23
- * excluded, because each binds wherever its condition applies.
24
- *
25
- * The same layer axis runs under `naturalness/`, the expression questions a
26
- * script can fail while being content-complete. Scripts construction
27
- * selects them beside its principles, so both families ask a unit about its
28
- * own body in the same pass.
29
- *
30
- * @evidence contracts/development/implementation.md#principled-implementation Common, inherited narrative, realized-text and layer-specific files become non-excludable per-unit H2 checklists in the selected principles or expression family; only declared optional family files are filtered by installation, probed in the shared skills tree that createContractDirectory resolves, where createSharedReference also roots the references.
31
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One layer axis is reused for both families, while family admission remains distinct from language modules and population obligations; the owning tree is decided by createContractDirectory, not rebuilt here.
32
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Required construction files stay selected when missing so native compilation diagnoses the broken tree; sparse expression files and older realized contracts are the explicit compatibility cases.
33
- * @evidence contracts/development/common.md#meaningful-documentation The prose explains who can answer each scope, why literal-text questions apply only to realized layers, and which construction selects the expression family.
34
- * @evidence contracts/development/implementation.md#efficient-algorithms At most four layer-file candidates require a bounded number of optional-file probes and fixed-size reference constructions; no manuscript traversal occurs.
35
- * @evidence contracts/development/implementation.md#reuse-equivalent-work layerFiles and createSharedReference centralize scope and address semantics; optional-file existence refreshes per configuration build rather than persisting an old contract population.
36
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Intermediate file lists and returned references have a fixed family bound; config owns the result and synchronous existence checks retain no handle or running task.
15
+ * Each unit answers its layer's principles. Only the screenplay selects an
16
+ * installed realized-text supplement. Every selected H2 answers its items.
37
17
  */
38
18
  export function createPrincipleReferences(props: {
39
19
  contracts: IContractLocation;
40
20
  layer: AuthoredLayer;
41
- family: "principles" | "naturalness";
42
21
  }): IEvidenceReference[] {
43
- const installed: (file: string) => boolean = (file: string): boolean =>
44
- fs.existsSync(
45
- path.join(
46
- createContractDirectory(props.contracts, "shared"),
47
- "shared",
48
- props.family,
49
- file,
50
- ),
51
- );
52
- // The construction family ships one document per layer scope, so a missing
53
- // one is a broken tree rather than an absent option and must still be
54
- // selected for the compiler to say so. Only the genuinely optional documents
55
- // are filtered: `realized.md`, which older trees predate, and the whole
56
- // expression subtree, which is sparse by design.
57
- const optional: (file: string) => boolean = (file: string): boolean =>
58
- props.family === "naturalness" || file === "realized.md";
59
22
  return layerFiles(props.layer)
60
- .filter((file: string): boolean => !optional(file) || installed(file))
23
+ .filter(
24
+ (file: string): boolean =>
25
+ file !== "realized.md" ||
26
+ hasStoryContract(props.contracts, `principles/${file}`),
27
+ )
61
28
  .map(
62
29
  (file: string): IEvidenceMarkdownReference =>
63
30
  createSharedReference({
64
31
  contracts: props.contracts,
65
- file: `${props.family}/${file}`,
32
+ file: `principles/${file}`,
66
33
  checklist: true,
67
34
  exclusion: false,
68
35
  }),
@@ -7,16 +7,9 @@ import { BODY_ROOT } from "../utilities/BODY_ROOT";
7
7
  import { referenceLocation } from "../utilities/referenceLocation";
8
8
 
9
9
  /**
10
- * Creates one H2 reference per canon file of settings, in any supported layout, or of a short's brief.
11
- * The outline is not canon and is never an inherited settings dependency.
12
- *
13
- * @evidence contracts/development/implementation.md#principled-implementation The body settings or brief directory, chosen by `canon`, is enumerated under readSettingsFiles layout validation, yielding one H2 reference per actual canon file; outline navigation is excluded from canon inheritance.
14
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Filesystem layout discovery stays in readSettingsFiles while this helper adds layer-qualified native-reference addresses.
15
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Both flat legacy canon and numbered subject folders are real supported layouts; symbolic or invalid classified entries fail in the shared enumerator rather than being silently substituted.
16
- * @evidence contracts/development/common.md#meaningful-documentation The prose states per-file settings targets, two layouts and the outline exclusion; the default canon is settings.
17
- * @evidence contracts/development/implementation.md#efficient-algorithms For e directory entries and f canon files, enumeration and sorting dominate O(e log e) comparisons with O(e + f) path storage; two mapping passes allocate one reference per file without reading document contents.
18
- * @evidence contracts/development/implementation.md#reuse-equivalent-work The shared enumerator and address builder own reusable layout/address rules, but filesystem enumeration repeats each build because installed canon membership may change.
19
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned f references belong to the config owner; directory arrays and path lists are transient, and synchronous enumeration leaves no owned descriptor or background task.
10
+ * Creates one H2 reference per canon file of settings, in any supported layout,
11
+ * or of a short's brief. The outline is not canon and is never an inherited
12
+ * settings dependency.
20
13
  */
21
14
  export function createSettingReferences(
22
15
  location: string,
@@ -6,14 +6,13 @@ import { createContractRoot } from "../utilities/createContractRoot";
6
6
  /**
7
7
  * Creates one reference against a shared contract document.
8
8
  *
9
- * Every shared family is the same relation — anchored H2 items of a document
10
- * in the effective `contracts/story/shared` tree, answered by the selected H2
11
- * hosts of one layer — and differs only in two flags, so it is declared once
12
- * rather than assembled separately. The shared tree is the bundled one, which
13
- * a workspace keeps at its root and a standalone production under its own
14
- * `.agents/skills`. A host cites the document under the family that owns it,
15
- * `shared/...`, because the production's `docs/contracts/language` holds files
16
- * of the same name.
9
+ * Every shared family is the same relation — anchored H2 items of a document in
10
+ * the effective `contracts/story` tree, answered by the selected H2 hosts of
11
+ * one layer — and differs only in two flags, so it is declared once rather than
12
+ * assembled separately. The shared tree is the bundled one, which a workspace
13
+ * keeps at its root and a standalone production under its own `.agents/skills`.
14
+ * A host cites the file relative to `contracts/story`. Production-owned
15
+ * contracts retain their `work/` or `language/` prefix.
17
16
  *
18
17
  * `checklist` decides who answers. A checklist is answered by every selected
19
18
  * host for itself, so a strong sibling never answers for a weak one. Ordinary
@@ -24,14 +23,6 @@ import { createContractRoot } from "../utilities/createContractRoot";
24
23
  * a search must be able to record that the search found nothing, or every unit
25
24
  * would claim a result it never had; a duty that states what every work owes
26
25
  * has no such negative, and a host that cannot assert it is defective.
27
- *
28
- * @evidence contracts/development/implementation.md#principled-implementation Shared family documents are anchored H2 targets under the shared tree's story root from createContractRoot; checklist selects per-host duty and exclusion determines whether a truthful negative is permitted.
29
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One builder expresses the shared address and two orthogonal relation flags used throughout the claim factories; the owning tree is decided by createContractRoot rather than here.
30
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No shared file is conditionally replaced or given a fixture allowance; family-qualified addresses keep equally named language/work documents distinct.
31
- * @evidence contracts/development/implementation.md#efficient-algorithms A fixed-size object and one selector are constructed with path work proportional to location, skills and file text; no filesystem contents or populations are traversed.
32
- * @evidence contracts/development/implementation.md#reuse-equivalent-work createContractRoot is reused for all shared references, while each caller receives an independent relation object so differing checklist/exclusion flags cannot contaminate another claim.
33
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle or task; only the returned one-selector object, owned by the caller, outlives the call.
34
- * @evidence contracts/development/common.md#meaningful-documentation The prose explains which tree holds shared documents, address ownership, per-host versus population coverage and the semantic basis for allowing exclusions.
35
26
  */
36
27
  export function createSharedReference(props: {
37
28
  contracts: IContractLocation;
@@ -42,7 +33,7 @@ export function createSharedReference(props: {
42
33
  return {
43
34
  type: "markdown",
44
35
  root: createContractRoot(props.contracts, "shared"),
45
- files: [`shared/${props.file}`],
36
+ files: [props.file],
46
37
  symbol: "h2",
47
38
  ...(props.checklist ? { checklist: true } : {}),
48
39
  ...(props.exclusion ? {} : { noEvidenceExclude: true }),
@@ -13,14 +13,6 @@ import { createSharedReference } from "./createSharedReference";
13
13
  * every other. Exclusion is permitted, and the pairing is the point: a unit
14
14
  * whose parents answered every question it asked records what it tested, while
15
15
  * refusing the negative would make every unit claim a repair it never made.
16
- *
17
- * @evidence contracts/development/implementation.md#principled-implementation Every narrative unit answers its own upstream-revision checklist, with exclusions permitted when the tested parents need no repair; settings is excluded by the typed narrative-layer input, and the shared upstream document resolves in the shared skills tree through createSharedReference.
18
- * @evidence contracts/development/implementation.md#clear-and-simple-structure This helper owns the upstream-family relation and reuses the shared builder for citation addressing and flag assembly.
19
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The exclusion represents a supported negative search finding rather than excusing an unexamined upstream defect; no consumer or expected answer changes the relation.
20
- * @evidence contracts/development/common.md#meaningful-documentation The prose explains per-unit rather than population ownership, the settings boundary and what a truthful no-repair result means.
21
- * @evidence contracts/development/implementation.md#efficient-algorithms One fixed-size shared reference is constructed; path/string work scales with location, skills and layer text and does not scan manuscript units.
22
- * @evidence contracts/development/implementation.md#reuse-equivalent-work The shared reference builder centralizes root/checklist/exclusion semantics; fresh result objects prevent a caller from altering another upstream relation.
23
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned reference belongs to the claim owner with one selector; no filesystem handle, background task or persistent registry is acquired.
24
16
  */
25
17
  export function createUpstreamReference(
26
18
  contracts: IContractLocation,
@@ -1,29 +1,19 @@
1
1
  import type { AuthoredLayer } from "../../AuthoredLayer";
2
- import { REALIZED_LAYERS } from "../REALIZED_LAYERS";
3
2
  import { isCanonLayer } from "../isCanonLayer";
4
3
 
5
4
  /**
6
5
  * Names the layer-scoped documents one layer answers, narrowest last.
7
6
  *
8
- * Placement is decided by who can truthfully answer an item, so the axis is
9
- * the same wherever it appears: everyone, then the layers that inherit a unit,
10
- * then the layers holding literal text, then one layer. The principles and
11
- * expression families and both scopes reuse it, because the question of who
12
- * can answer does not depend on which family asks it.
13
- *
14
- * @evidence contracts/development/implementation.md#principled-implementation The fixed candidate order is common, optional inherited-narrative, optional literal-text and exact layer, matching the respondent populations declared by the four-layer pipeline.
15
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One shared axis serves discovery/principle/obligation selection without duplicating layer eligibility decisions across families or language scopes.
16
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Canon layers omit inherited narrative duties and only REALIZED_LAYERS receives literal-text duties, both explicit semantic differences of the supported pipeline.
17
- * @evidence contracts/development/common.md#meaningful-documentation The prose explains narrowest-last order and why eligibility depends on the respondent rather than the asking family.
18
- * @evidence contracts/development/implementation.md#efficient-algorithms At most four filenames and one constant-time Set membership check are produced, giving constant work and space independent of manuscript length.
19
- * @evidence contracts/development/implementation.md#reuse-equivalent-work REALIZED_LAYERS is the shared eligibility set, while the returned array is fresh so filtering or mutation by one family cannot alter another family selection.
20
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The at-most-four-element result is caller-owned and no cache or resource handle is retained.
7
+ * Placement is decided by who can truthfully answer an item, so the axis is the
8
+ * same wherever it appears: everyone, then the layers that inherit a unit, then
9
+ * the screenplay for realized text, then the exact layer. Shared and local
10
+ * contracts use the same respondent scope.
21
11
  */
22
12
  export function layerFiles(layer: AuthoredLayer): string[] {
23
13
  return [
24
14
  "common.md",
25
15
  ...(isCanonLayer(layer) ? [] : ["narratives.md"]),
26
- ...(REALIZED_LAYERS.has(layer) ? ["realized.md"] : []),
16
+ ...(layer === "screenplay" ? ["realized.md"] : []),
27
17
  `${layer}.md`,
28
18
  ];
29
19
  }
@@ -1,13 +1,6 @@
1
1
  /**
2
- * Encodes a relative canon path as a stable outline H3 anchor without losing folder identity.
3
- *
4
- * @evidence contracts/development/implementation.md#principled-implementation Removing the terminal Markdown extension and encoding folder separators as double hyphens retains classified path identity in an explicit outline anchor; numbered lower-kebab source paths supply the supported alphabet.
5
- * @evidence contracts/development/implementation.md#clear-and-simple-structure The encoder isolates file-to-outline identity spelling used by outline creation and validation.
6
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The separator encoding follows the supported settings layout and does not inspect consumer names or file contents.
7
- * @evidence contracts/development/common.md#meaningful-documentation The comment identifies a stable relative-path-derived H3 anchor and explains why folder identity is kept.
8
- * @evidence contracts/development/implementation.md#efficient-algorithms The suffix replacement and separator replacement scan the file path with linear string allocation.
9
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work This scalar encoder coordinates no reusable requests or effectful work.
10
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Only the returned anchor string escapes; no map, descriptor or task is retained.
2
+ * Encodes a relative canon path as a stable outline H3 anchor without losing
3
+ * folder identity.
11
4
  */
12
5
  export function settingsEntryAnchor(file: string): string {
13
6
  return file.replace(/\.md$/u, "").replaceAll("/", "--");
@@ -1,17 +1,7 @@
1
1
  import type { NarrativeLayer } from "../../NarrativeLayer";
2
2
  import type { NarrativeScope } from "../../NarrativeScope";
3
3
 
4
- /**
5
- * Captures indexes and misplaced files without widening an exact pilot slice.
6
- *
7
- * @evidence contracts/development/implementation.md#principled-implementation Topology captures all descendants of a layer so indexes and malformed paths remain visible, narrowing scripts/screenplay only to the exact declared pilot part; treatments stay flat at validation time.
8
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One selector helper separates broad topology capture from the partition and film-folder authored-unit selector used by ordinary evidence.
9
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The first-part pilot is a declared production scope, so the selector retains that exact slice instead of widening to other parts.
10
- * @evidence contracts/development/common.md#meaningful-documentation The comment explains why indexes and misplaced files are included while an exact pilot slice stays narrow.
11
- * @evidence contracts/development/implementation.md#efficient-algorithms One conditional constructs one glob string; work and returned storage scale only with layer and optional part text lengths.
12
- * @evidence contracts/development/implementation.md#reuse-equivalent-work The selector is derived from the current scope each call, while downstream native inventory capture supplies reuse across topology inspections.
13
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The one-element returned array and string belong to the caller; no filesystem traversal, handle or retained cache is created.
14
- */
4
+ /** Captures indexes and misplaced files without widening an exact pilot slice. */
15
5
  export function createTopologyFiles(
16
6
  layer: NarrativeLayer,
17
7
  scope: NarrativeScope,
@@ -6,12 +6,19 @@ import { PACKAGE_DOCS_ROOT } from "./PACKAGE_DOCS_ROOT";
6
6
  * Every authored claim hosts this tree, and every inherited reference selects
7
7
  * it, because each layer's authored text lives only in the body.
8
8
  *
9
- * Principled implementation: The value joins PACKAGE_DOCS_ROOT with `body`, the one location the document layout gives authored layers.
10
- * Clear and simple design: One constant supplies the body spelling to every claim factory and reference builder, derived from the docs folder so the two cannot drift.
11
- * Prohibited implementation shortcuts: The body directory is a declared production layout value; it is not selected from fixture names, measured output or host-specific paths.
12
- * Meaningful documentation: The prose states that the body is the single authored tree hosts and references share.
13
- * Efficient algorithms: The string initializer is constant-sized and performs no filesystem or population traversal.
14
- * Reuse equivalent work: Consumers reuse the same immutable string, so no equivalent derivation or invalidation mechanism is needed unless the source layout contract changes.
15
- * Bound retention and release resources: One fixed string is retained for module lifetime; it has no dynamic population, file handle or task to release.
9
+ * Principled implementation: The value joins PACKAGE_DOCS_ROOT with `body`, the
10
+ * one location the document layout gives authored layers. Clear and simple
11
+ * design: One constant supplies the body spelling to every claim factory and
12
+ * reference builder, derived from the docs folder so the two cannot drift.
13
+ * Prohibited implementation shortcuts: The body directory is a declared
14
+ * production layout value; it is not selected from fixture names, measured
15
+ * output or host-specific paths. Meaningful documentation: The prose states
16
+ * that the body is the single authored tree hosts and references share.
17
+ * Efficient algorithms: The string initializer is constant-sized and performs
18
+ * no filesystem or population traversal. Reuse equivalent work: Consumers reuse
19
+ * the same immutable string, so no equivalent derivation or invalidation
20
+ * mechanism is needed unless the source layout contract changes. Bound
21
+ * retention and release resources: One fixed string is retained for module
22
+ * lifetime; it has no dynamic population, file handle or task to release.
16
23
  */
17
24
  export const BODY_ROOT: string = `${PACKAGE_DOCS_ROOT}/body`;
@@ -5,12 +5,20 @@
5
5
  * review relations use this constant directly, because their documents sit
6
6
  * beside the body rather than in it.
7
7
  *
8
- * Principled implementation: The literal docs string is the package-relative document directory shared by the body root and the instruction and review locations, rather than a resolved filesystem identity.
9
- * Clear and simple design: One constant supplies the common directory spelling while BODY_ROOT names the authored body inside it.
10
- * Prohibited implementation shortcuts: The docs directory is a declared production layout value; it is not selected from fixture names, measured output or host-specific paths.
11
- * Meaningful documentation: The prose identifies which consumers use the constant directly and which select the body through BODY_ROOT.
12
- * Efficient algorithms: The string initializer is constant-sized and performs no filesystem or population traversal.
13
- * Reuse equivalent work: Consumers reuse the same immutable string, so no equivalent derivation or invalidation mechanism is needed unless the source layout contract changes.
14
- * Bound retention and release resources: One fixed string is retained for module lifetime; it has no dynamic population, file handle or task to release.
8
+ * Principled implementation: The literal docs string is the package-relative
9
+ * document directory shared by the body root and the instruction and review
10
+ * locations, rather than a resolved filesystem identity. Clear and simple
11
+ * design: One constant supplies the common directory spelling while BODY_ROOT
12
+ * names the authored body inside it. Prohibited implementation shortcuts: The
13
+ * docs directory is a declared production layout value; it is not selected from
14
+ * fixture names, measured output or host-specific paths. Meaningful
15
+ * documentation: The prose identifies which consumers use the constant directly
16
+ * and which select the body through BODY_ROOT. Efficient algorithms: The string
17
+ * initializer is constant-sized and performs no filesystem or population
18
+ * traversal. Reuse equivalent work: Consumers reuse the same immutable string,
19
+ * so no equivalent derivation or invalidation mechanism is needed unless the
20
+ * source layout contract changes. Bound retention and release resources: One
21
+ * fixed string is retained for module lifetime; it has no dynamic population,
22
+ * file handle or task to release.
15
23
  */
16
24
  export const PACKAGE_DOCS_ROOT: string = "docs";
@@ -7,15 +7,8 @@ import { constructionStage } from "../constructionStage";
7
7
  import { productionLayers } from "../productionLayers";
8
8
 
9
9
  /**
10
- * Checks supported narrative routes and stage option shapes before graph creation.
11
- *
12
- * @evidence contracts/development/implementation.md#principled-implementation Routes admit only their authored layers, long work alone admits an outline, each supported stage is disabled or evidence, resolveSkillsDirectory refuses a relative shared skills tree, and assertProductionContractLayout refuses production-owned contracts left in the retired skills location, both before any contract is probed.
13
- * @evidence contracts/development/implementation.md#clear-and-simple-structure A single shape check precedes graph expansion; native Evidence owns claim and reference evaluation.
14
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The same route and stage vocabulary applies to every production; it does not inspect graph results or confer approval.
15
- * @evidence contracts/development/common.md#meaningful-documentation Errors identify unsupported routes, layers, outline choices, stage values, a relative skills tree and each legacy contract directory with its new home.
16
- * @evidence contracts/development/implementation.md#efficient-algorithms The closed five-layer vocabulary bounds validation to constant time and storage, plus two directory existence probes.
17
- * @evidence contracts/development/implementation.md#reuse-equivalent-work The fixed vocabularies are reused within one call; there is no expensive computation or cross-call cache.
18
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Only local scalar values and the route array are allocated; the synchronous probes acquire no retained file handle or task.
10
+ * Checks supported narrative routes and stage option shapes before graph
11
+ * creation.
19
12
  */
20
13
  export function assertProductionEvidenceSources(
21
14
  props: IProductionConfigProps,
@@ -15,17 +15,11 @@ import { resolveSkillsDirectory } from "../../../internal/resolveSkillsDirectory
15
15
  * production itself adopts, so they always resolve under its own
16
16
  * `docs/contracts`, whichever tree holds the shared ones.
17
17
  *
18
- * @param contracts The production location and optional shared tree; read, not retained.
18
+ * @param contracts The production location and optional shared tree; read, not
19
+ * retained.
19
20
  * @param scope The contract family whose owner is wanted.
20
- * @returns The absolute tree holding that family's folder; the family folder is not appended.
21
- *
22
- * @evidence contracts/development/implementation.md#principled-implementation The scaffold's ownership rule, bundled shared contracts in the skills tree's `contracts/story` and adopted work/language contracts in the production's `docs/contracts`, maps each family to one tree, joined from the layout constants by `path.join`.
23
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One function owns the family-to-owner decision for every existence probe and, through createContractRoot, every contract reference root, so no caller rebuilds either tree from the location.
24
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No family falls back to another tree when a file is missing, and the retired `.agents/skills/contracts/story/{work,language}` location is never consulted; a missing contract stays missing where its owner keeps it.
25
- * @evidence contracts/development/implementation.md#efficient-algorithms One branch and one path join, linear in the path length.
26
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure path computation coordinates no work across requests.
27
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Only the returned string outlives the call.
28
- * @evidence contracts/development/common.md#meaningful-documentation States which tree owns each family in workspace and standalone layouts, and that the result stops above the family folder.
21
+ * @returns The absolute tree holding that family's folder; the family folder is
22
+ * not appended.
29
23
  */
30
24
  export function createContractDirectory(
31
25
  contracts: IContractLocation,
@@ -5,29 +5,19 @@ import { createContractDirectory } from "./createContractDirectory";
5
5
  /**
6
6
  * Resolves the reference root of the contract tree owning one family.
7
7
  *
8
- * The root stops above the family folder rather than descending into it, so a
9
- * citation address carries the family that owns it: `shared/principles/...`,
10
- * `language/naturalness/...`, and `work/...` are told apart by the address a
11
- * host writes, instead of colliding on the same relative file name. Only the
12
- * root differs between owners: the shared tree's `contracts/story`, reached
13
- * through `..` segments in a workspace, or the production's own
14
- * `docs/contracts`, so every citation address is the same in a workspace and
15
- * in a standalone production.
8
+ * Bundled references such as `principles/screenplay.md` start at the skills
9
+ * tree's `contracts/story`. Production-owned `language/...` and `work/...`
10
+ * references start at `docs/contracts`. Each citation works the same way in a
11
+ * workspace and in a standalone production.
16
12
  *
17
13
  * The same local Markdown bytes are both pre-draft instructions and later
18
14
  * evidence targets. Config constructs the graph but owns no document mirror.
19
15
  *
20
- * @param contracts The production location and optional shared tree; read, not retained.
16
+ * @param contracts The production location and optional shared tree; read, not
17
+ * retained.
21
18
  * @param scope The contract family the reference addresses.
22
- * @returns The `/`-separated root relative to the production's configuration directory.
23
- *
24
- * @evidence contracts/development/implementation.md#principled-implementation createContractDirectory picks the owning tree for the family and createReferenceRoot expresses it relative to the production location, the directory native Evidence resolves reference roots against; family-qualified file addresses keep shared/language/work identity in every citation.
25
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Ownership and relative-root spelling each live with their own owner; this function only composes them for the shared, language and work reference factories.
26
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The installed shared and production trees are the layout contracts; no fallback remote root, retired location, fixture path or copied contract bytes are introduced.
27
- * @evidence contracts/development/implementation.md#efficient-algorithms A fixed number of path operations, linear in the location and skills path lengths, without reading directories or file bytes.
28
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure path computation coordinates no work across requests.
29
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Only the returned string outlives the call.
30
- * @evidence contracts/development/common.md#meaningful-documentation The prose explains family-qualified addresses, the two owning roots, why only the root differs between owners, local Markdown ownership and the absence of a document mirror.
19
+ * @returns The `/`-separated root relative to the production's configuration
20
+ * directory.
31
21
  */
32
22
  export function createContractRoot(
33
23
  contracts: IContractLocation,
@@ -1,14 +1,4 @@
1
- /**
2
- * Mirrors selected manuscript files under detached construction evidence.
3
- *
4
- * @evidence contracts/development/implementation.md#principled-implementation Each body-relative selector is placed under detached construction files or units according to its host symbol, preserving a leading exclusion marker around the qualified selector.
5
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One selector transform serves the native graph collector and package claim builders, so detached file/H2 evidence use the same carrier layout.
6
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Files and units are explicit native host distinctions; negative selectors keep their original exclusion semantics instead of widening coverage.
7
- * @evidence contracts/development/common.md#meaningful-documentation The comment states the detached construction mirror, and the typed symbol input selects the documented file-versus-unit carrier.
8
- * @evidence contracts/development/implementation.md#efficient-algorithms For n selectors with total text length p, one mapping pass costs O(n + p) text work and allocates n qualified strings; manuscript contents are not read.
9
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Carrier selection is computed once for the map and the transformation is shared by all claim builders; fresh arrays prevent callers from mutating another claim selection.
10
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The mapped array is returned to its config owner and scales with selector text; no filesystem handle, task or process-wide selector cache is retained.
11
- */
1
+ /** Mirrors selected manuscript files under detached construction evidence. */
12
2
  export function createEvidenceFiles(
13
3
  symbol: "file" | "h2",
14
4
  files: string[],
@@ -11,14 +11,6 @@ import { createSettingsFiles } from "../../createSettingsFiles";
11
11
  * scaffold's domain folders, and a short's brief the domain folders. The
12
12
  * settings outline remains outside canon selectors. Narrative layers retain
13
13
  * their release partition or film folders and delegate to their own selector.
14
- *
15
- * @evidence contracts/development/implementation.md#principled-implementation Settings and brief use their dedicated canon selectors excluding outline navigation, while narrative layers delegate to the scope-validating partition and film-folder selector; all outputs remain relative to the body root.
16
- * @evidence contracts/development/implementation.md#clear-and-simple-structure This dispatcher owns the authored-layer distinction and delegates narrative pilot/complete-work rules rather than repeating their validation.
17
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Legacy flat settings and exact first-part pilots are supported layouts/scopes; invalid narrative scope is rejected by the shared selector rather than widened to a matching fixture.
18
- * @evidence contracts/development/common.md#meaningful-documentation The prose names supported settings layouts, outline exclusion and partitioned or film-folder narrative selection relative to the body root.
19
- * @evidence contracts/development/implementation.md#efficient-algorithms Each branch returns at most two selectors; narrative branches also validate scope text, so cost/storage are bounded by the selected scope/path text and independent of manuscript size.
20
- * @evidence contracts/development/implementation.md#reuse-equivalent-work The same settings/narrative selector helpers serve hosts and references; fresh returned selector arrays keep config mutations local and no filesystem membership is cached.
21
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller owns the one- or two-string result; this dispatcher opens no handle, starts no task and retains no population state.
22
14
  */
23
15
  export function createUnitFiles(
24
16
  layer: AuthoredLayer,
@@ -0,0 +1,21 @@
1
+ import fs from "node:fs";
2
+ import path from "node:path";
3
+
4
+ import type { IContractLocation } from "../../../internal/IContractLocation";
5
+ import { createContractDirectory } from "./createContractDirectory";
6
+
7
+ /**
8
+ * Checks whether an optional bundled checklist exists at its citation address.
9
+ *
10
+ * @param contracts The production and its configured skills tree.
11
+ * @param file A checklist path relative to `contracts/story`.
12
+ * @returns Whether the current installation supplies the checklist.
13
+ */
14
+ export function hasStoryContract(
15
+ contracts: IContractLocation,
16
+ file: string,
17
+ ): boolean {
18
+ return fs.existsSync(
19
+ path.join(createContractDirectory(contracts, "shared"), file),
20
+ );
21
+ }
@@ -3,7 +3,8 @@ import { BODY_ROOT } from "./BODY_ROOT";
3
3
  /**
4
4
  * Gives reference targets an explicit address in the graph's global space.
5
5
  *
6
- * Every inherited reference selects the body, where each layer's authored text lives.
6
+ * Every inherited reference selects the body, where each layer's authored text
7
+ * lives.
7
8
  *
8
9
  * File references use package-relative addresses. A claim that selects file
9
10
  * hosts and a claim that selects section hosts read the same documents, and the
@@ -12,14 +13,6 @@ import { BODY_ROOT } from "./BODY_ROOT";
12
13
  * would reach that reference as an aggregate target and be refused for lacking
13
14
  * a section host. A distinct address space keeps each annotation with the
14
15
  * reference it answers.
15
- *
16
- * @evidence contracts/development/implementation.md#principled-implementation References always target the body, and file references use package-global addresses distinct from H2-root addresses to avoid aggregate-target collisions.
17
- * @evidence contracts/development/implementation.md#clear-and-simple-structure Address qualification is centralized for coverage, lineage and settings references, keeping native binder address-space rules out of their semantic flag builders.
18
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The file/H2 address distinction follows native aggregate binding semantics; no citation is rewritten to match an expected answer.
19
- * @evidence contracts/development/common.md#meaningful-documentation The prose explains body targeting and why file references need a separate global address space.
20
- * @evidence contracts/development/implementation.md#efficient-algorithms File mode maps n selectors and their total text length p into qualified paths in O(n + p) work/storage; H2 mode constructs only its root and reuses the supplied files array.
21
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Coverage and lineage share this address rule, and H2 mode reuses the input selector array; there is no cache that could incorrectly equate mutable files arrays.
22
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller owns the returned root/files record; file mode owns n new strings while H2 mode retains the caller array reference, with no filesystem handle or running task.
23
16
  */
24
17
  export function referenceLocation(
25
18
  files: string[],
@@ -5,19 +5,13 @@ import { readSettingsFiles } from "./readSettingsFiles";
5
5
  import { settingsEntryAnchor } from "./settingsEntryAnchor";
6
6
 
7
7
  /**
8
- * Checks that the outline describes the classified canon, in domain or numbered folders, in its actual order.
8
+ * Checks that the outline describes the classified canon, in domain or numbered
9
+ * folders, in its actual order.
9
10
  *
10
- * Entry anchors encode the relative file path and entry labels equal the H1. This checks
11
- * the authored layout, not evidence rows: the graph owns citation cardinality
12
- * and the semantic reviewer owns whether grouping and explanations work.
13
- *
14
- * @evidence contracts/development/implementation.md#principled-implementation The outline's structural headings are matched sequentially against numbered canon paths and each file's single H1; path-encoded anchors and exact titles enforce one ordered entry per canon file without judging semantic grouping.
15
- * @evidence contracts/development/implementation.md#clear-and-simple-structure The validator owns settings index topology, leaving citation cardinality to the graph and grouping quality to independent review.
16
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Empty outline parts, missing/extra/reordered entries and title/anchor differences fail directly; comments and fenced examples are inert structural material for every input.
17
- * @evidence contracts/development/common.md#meaningful-documentation The prose states path-derived anchors, H1 label equality, actual order and boundaries between topology, graph evidence and semantic review.
18
- * @evidence contracts/development/implementation.md#efficient-algorithms Canon enumeration sorts entries, then the outline and each referenced file are read/parsed once; cost grows with entry sorting and total Markdown characters. Arrays retain parsed headings and paths, and the active document bytes are bounded by each read rather than an external fixed cap.
19
- * @evidence contracts/development/implementation.md#reuse-equivalent-work The ordered canon list is reused for all outline entries, while each matched file is read once; no cross-call cache is safe because canon bytes and topology are mutable.
20
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources All strings, heading arrays and path collections are local and released on completion/failure; synchronous readFileSync calls own no retained descriptor or asynchronous task.
11
+ * Entry anchors encode the relative file path and entry labels equal the H1.
12
+ * This checks the authored layout, not evidence rows: the graph owns citation
13
+ * cardinality and the semantic reviewer owns whether grouping and explanations
14
+ * work.
21
15
  */
22
16
  export function validateSettingsOutline(location: string): void {
23
17
  const root: string = path.join(location, "docs/body/settings");
@@ -93,18 +87,31 @@ export function validateSettingsOutline(location: string): void {
93
87
  }
94
88
 
95
89
  /**
96
- * Reads structural ATX headings while keeping comments and fenced examples inert.
90
+ * Reads structural ATX headings while keeping comments and fenced examples
91
+ * inert.
97
92
  *
98
93
  * A leading byte order mark is dropped first, as the binder does when it trims
99
94
  * a file, so both readers accept the same authored bytes.
100
95
  *
101
- * Principled implementation: A line-state parser masks HTML comments and compatible fences before recognizing ATX headings; stripping an initial BOM keeps its first-heading interpretation aligned with authored binder trimming.
102
- * Clear and simple design: The local parser exists for outline structure only, returning heading captures without rewriting the source or replacing graph evidence extraction.
103
- * Prohibited implementation shortcuts: BOM and fenced/comment examples follow supported Markdown input rules for every document; no title or expected outline entry is injected.
104
- * Meaningful documentation: The prose explains example/comment inertness and the leading BOM premise; returned regexp groups retain heading depth and raw title for the validator.
105
- * Efficient algorithms: Line splitting and forward state scans visit Markdown text; accumulated visible fragments and regexp captures consume space proportional to input/headings. Repeated string concatenation relies on runtime string handling and claims no measured linear speedup.
106
- * Reuse equivalent work: One pass handles comments and fences together for a document; the pure parser coordinates no cross-request work or filesystem effects.
107
- * Bound retention and release resources: Line, visible-text and capture arrays are local or caller-owned at return; no persistent state, descriptor or task is retained.
96
+ * Principled implementation: A line-state parser masks HTML comments and
97
+ * compatible fences before recognizing ATX headings; stripping an initial BOM
98
+ * keeps its first-heading interpretation aligned with authored binder trimming.
99
+ * Clear and simple design: The local parser exists for outline structure only,
100
+ * returning heading captures without rewriting the source or replacing graph
101
+ * evidence extraction. Prohibited implementation shortcuts: BOM and
102
+ * fenced/comment examples follow supported Markdown input rules for every
103
+ * document; no title or expected outline entry is injected. Meaningful
104
+ * documentation: The prose explains example/comment inertness and the leading
105
+ * BOM premise; returned regexp groups retain heading depth and raw title for
106
+ * the validator. Efficient algorithms: Line splitting and forward state scans
107
+ * visit Markdown text; accumulated visible fragments and regexp captures
108
+ * consume space proportional to input/headings. Repeated string concatenation
109
+ * relies on runtime string handling and claims no measured linear speedup.
110
+ * Reuse equivalent work: One pass handles comments and fences together for a
111
+ * document; the pure parser coordinates no cross-request work or filesystem
112
+ * effects. Bound retention and release resources: Line, visible-text and
113
+ * capture arrays are local or caller-owned at return; no persistent state,
114
+ * descriptor or task is retained.
108
115
  */
109
116
  function headings(markdown: string): RegExpExecArray[] {
110
117
  let comment: boolean = false;
@@ -1,16 +1,6 @@
1
1
  import type { NarrativeScope } from "./NarrativeScope";
2
2
 
3
- /**
4
- * Returns whether the selected narrative population is one pilot slice.
5
- *
6
- * @evidence contracts/development/implementation.md#principled-implementation The discriminant comparison recognizes the pilot arm of NarrativeScope without consulting filenames or enabling stages.
7
- * @evidence contracts/development/implementation.md#clear-and-simple-structure This predicate only answers scope selection; file-name validation remains with the narrative selector.
8
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Both admitted scope modes use their literal contract spelling, without a special consumer or fallback mode.
9
- * @evidence contracts/development/common.md#meaningful-documentation The comment identifies the result as pilot population selection; it makes no approval or layout validity claim.
10
- * @evidence contracts/development/implementation.md#efficient-algorithms One literal comparison takes constant time and allocates no collection.
11
- * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work This pure predicate coordinates no reusable requests, phases or effectful work.
12
- * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The predicate retains no object, handle or task beyond its call.
13
- */
3
+ /** Returns whether the selected narrative population is one pilot slice. */
14
4
  export function isFirstPartPilot(scope: NarrativeScope): boolean {
15
5
  return scope.mode === "first-part-pilot";
16
6
  }
@@ -25,19 +25,11 @@ import { validateRenderedSample } from "./internal/metadataRewrite/validateRende
25
25
  /**
26
26
  * Proves that a metadata-only rewrite changed only structural evidence rows.
27
27
  *
28
- * The canonical projection removes only the metadata region explicitly owned
29
- * by the operation. Complete comment ownership stops at the delimiters, while
28
+ * The canonical projection removes only the metadata region explicitly owned by
29
+ * the operation. Complete comment ownership stops at the delimiters, while
30
30
  * acknowledgement, review, and fingerprint ownership leaves the surrounding
31
31
  * evidence structure protected. Every other byte remains protected, including
32
32
  * Markdown body, sources, punctuation, BOM choice, and non-owned line endings.
33
- *
34
- * @evidence contracts/development/implementation.md#principled-implementation Validate physical file safety and strict UTF-8, compare ownership-specific byte projections, check corruption signals and bind bulk samples to changed metadata.
35
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One synchronous coordinator aggregates diagnostics while grammar, byte mapping and sample checks have separate helpers.
36
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts BOM, authored text and unowned endings stay protected; added, removed or symlinked selected paths fail rather than becoming metadata edits.
37
- * @evidence contracts/development/common.md#meaningful-documentation The comment defines ownership boundaries and byte preservation; failure throws aggregated diagnostics and success returns hashes and sample data.
38
- * @evidence contracts/development/implementation.md#efficient-algorithms Across F files and B bytes, reads, validation, projection, hashing and token scans dominate; malformed-block lookahead may rescan, sorting is O(F log F), and retained projections scale with total bytes.
39
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Each projection serves equality, source diagnostics, metadata comparison, hashing and sample checks within this invocation; filesystem results are not cached across operations.
40
- * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The call owns synchronous reads, diagnostics, reports and its projection Map until return or throw; no handles stay open and memory has no fixed cap beyond selected inputs.
41
33
  */
42
34
  export function verifyEvidenceMetadataRewrite(
43
35
  props: IEvidenceMetadataRewriteProps,