@automovie/evidence 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 (189) hide show
  1. package/README.md +13 -9
  2. package/lib/IAutoMovieDevelopmentProps.d.ts +7 -6
  3. package/lib/IAutoMovieEvidenceConfigProps.d.ts +9 -8
  4. package/lib/IAutoMovieNarrativeProps.d.ts +0 -3
  5. package/lib/IAutoMovieNoNarrativeProps.d.ts +16 -0
  6. package/lib/{narrative/IProductionLayerStages.js → IAutoMovieNoNarrativeProps.js} +1 -1
  7. package/lib/IAutoMovieNoNarrativeProps.js.map +1 -0
  8. package/lib/createDevelopmentContractClaims.d.ts +21 -11
  9. package/lib/createDevelopmentContractClaims.js +30 -13
  10. package/lib/createDevelopmentContractClaims.js.map +1 -1
  11. package/lib/createEvidenceConfig.d.ts +3 -3
  12. package/lib/createEvidenceConfig.js +19 -12
  13. package/lib/createEvidenceConfig.js.map +1 -1
  14. package/lib/index.d.ts +7 -7
  15. package/lib/index.js +1 -7
  16. package/lib/index.js.map +1 -1
  17. package/lib/internal/index.d.ts +12 -0
  18. package/lib/internal/index.js +31 -0
  19. package/lib/internal/index.js.map +1 -0
  20. package/lib/internal/resolveSkillsDirectory.d.ts +8 -9
  21. package/lib/internal/resolveSkillsDirectory.js +9 -12
  22. package/lib/internal/resolveSkillsDirectory.js.map +1 -1
  23. package/lib/narrative/IPackageChecklistClaimProps.d.ts +5 -10
  24. package/lib/narrative/IPackageContractProps.d.ts +0 -8
  25. package/lib/narrative/IPackagePopulationContractProps.d.ts +1 -9
  26. package/lib/narrative/IProductionConfigProps.d.ts +1 -10
  27. package/lib/narrative/createBriefFiles.d.ts +2 -2
  28. package/lib/narrative/createBriefFiles.js +2 -2
  29. package/lib/narrative/createNarrativeUnitFiles.d.ts +19 -12
  30. package/lib/narrative/createNarrativeUnitFiles.js +22 -17
  31. package/lib/narrative/createNarrativeUnitFiles.js.map +1 -1
  32. package/lib/narrative/createPackageChecklistClaim.js +5 -10
  33. package/lib/narrative/createPackageChecklistClaim.js.map +1 -1
  34. package/lib/narrative/createPackageContract.d.ts +3 -3
  35. package/lib/narrative/createPackageContract.js +3 -8
  36. package/lib/narrative/createPackageContract.js.map +1 -1
  37. package/lib/narrative/createPackagePopulationContract.d.ts +7 -7
  38. package/lib/narrative/createPackagePopulationContract.js +10 -18
  39. package/lib/narrative/createPackagePopulationContract.js.map +1 -1
  40. package/lib/narrative/index.d.ts +11 -14
  41. package/lib/narrative/index.js +11 -14
  42. package/lib/narrative/index.js.map +1 -1
  43. package/lib/narrative/internal/REALIZED_LAYERS.d.ts +1 -1
  44. package/lib/narrative/internal/REALIZED_LAYERS.js +1 -1
  45. package/lib/narrative/internal/claims/createDiscoveryClaim.d.ts +11 -3
  46. package/lib/narrative/internal/claims/createDiscoveryClaim.js +17 -5
  47. package/lib/narrative/internal/claims/createDiscoveryClaim.js.map +1 -1
  48. package/lib/narrative/internal/claims/createExpressionObligationClaims.d.ts +9 -8
  49. package/lib/narrative/internal/claims/createExpressionObligationClaims.js +15 -22
  50. package/lib/narrative/internal/claims/createExpressionObligationClaims.js.map +1 -1
  51. package/lib/narrative/internal/claims/createInstructionCoverageClaim.d.ts +6 -4
  52. package/lib/narrative/internal/claims/createInstructionCoverageClaim.js +7 -5
  53. package/lib/narrative/internal/claims/createInstructionCoverageClaim.js.map +1 -1
  54. package/lib/narrative/internal/claims/createLayerClaims.d.ts +9 -9
  55. package/lib/narrative/internal/claims/createLayerClaims.js +45 -65
  56. package/lib/narrative/internal/claims/createLayerClaims.js.map +1 -1
  57. package/lib/narrative/internal/claims/createOutlineClaims.js +8 -8
  58. package/lib/narrative/internal/claims/createOutlineClaims.js.map +1 -1
  59. package/lib/narrative/internal/claims/createPopulationObligationClaims.d.ts +3 -3
  60. package/lib/narrative/internal/claims/createPopulationObligationClaims.js +5 -5
  61. package/lib/narrative/internal/claims/createPopulationObligationClaims.js.map +1 -1
  62. package/lib/narrative/internal/claims/createReviewClaims.d.ts +8 -8
  63. package/lib/narrative/internal/claims/createReviewClaims.js +64 -77
  64. package/lib/narrative/internal/claims/createReviewClaims.js.map +1 -1
  65. package/lib/narrative/internal/claims/createSettingCoverageClaim.d.ts +1 -1
  66. package/lib/narrative/internal/claims/createSettingCoverageClaim.js +6 -7
  67. package/lib/narrative/internal/claims/createSettingCoverageClaim.js.map +1 -1
  68. package/lib/narrative/internal/claims/index.d.ts +8 -0
  69. package/lib/narrative/internal/claims/index.js +25 -0
  70. package/lib/narrative/internal/claims/index.js.map +1 -0
  71. package/lib/narrative/internal/collectProductionClaims.js +5 -2
  72. package/lib/narrative/internal/collectProductionClaims.js.map +1 -1
  73. package/lib/narrative/internal/index.d.ts +16 -0
  74. package/lib/narrative/internal/index.js +33 -0
  75. package/lib/narrative/internal/index.js.map +1 -0
  76. package/lib/narrative/internal/metadataRewrite/index.d.ts +43 -0
  77. package/lib/narrative/internal/metadataRewrite/index.js +60 -0
  78. package/lib/narrative/internal/metadataRewrite/index.js.map +1 -0
  79. package/lib/narrative/internal/references/createCoverageReference.d.ts +1 -2
  80. package/lib/narrative/internal/references/createCoverageReference.js +2 -2
  81. package/lib/narrative/internal/references/createCoverageReference.js.map +1 -1
  82. package/lib/narrative/internal/references/createDiscoveryReferences.d.ts +2 -2
  83. package/lib/narrative/internal/references/createDiscoveryReferences.js +2 -2
  84. package/lib/narrative/internal/references/createLanguagePrincipleReferences.d.ts +7 -6
  85. package/lib/narrative/internal/references/createLanguagePrincipleReferences.js +7 -7
  86. package/lib/narrative/internal/references/createLanguagePrincipleReferences.js.map +1 -1
  87. package/lib/narrative/internal/references/createLineageReference.d.ts +7 -8
  88. package/lib/narrative/internal/references/createLineageReference.js +8 -8
  89. package/lib/narrative/internal/references/createLineageReference.js.map +1 -1
  90. package/lib/narrative/internal/references/createPrincipleReferences.d.ts +9 -8
  91. package/lib/narrative/internal/references/createPrincipleReferences.js +12 -12
  92. package/lib/narrative/internal/references/createPrincipleReferences.js.map +1 -1
  93. package/lib/narrative/internal/references/createSettingReferences.d.ts +3 -4
  94. package/lib/narrative/internal/references/createSettingReferences.js +6 -6
  95. package/lib/narrative/internal/references/createSettingReferences.js.map +1 -1
  96. package/lib/narrative/internal/references/index.d.ts +11 -0
  97. package/lib/narrative/internal/references/index.js +28 -0
  98. package/lib/narrative/internal/references/index.js.map +1 -0
  99. package/lib/narrative/internal/references/layerFiles.d.ts +5 -5
  100. package/lib/narrative/internal/references/layerFiles.js +5 -5
  101. package/lib/narrative/internal/topology/createTopologyFiles.d.ts +1 -1
  102. package/lib/narrative/internal/topology/createTopologyFiles.js +1 -1
  103. package/lib/narrative/internal/topology/index.d.ts +1 -0
  104. package/lib/narrative/internal/topology/index.js +18 -0
  105. package/lib/narrative/internal/topology/index.js.map +1 -0
  106. package/lib/narrative/internal/utilities/BODY_ROOT.d.ts +15 -0
  107. package/lib/narrative/internal/utilities/BODY_ROOT.js +20 -0
  108. package/lib/narrative/internal/utilities/BODY_ROOT.js.map +1 -0
  109. package/lib/narrative/internal/utilities/PACKAGE_DOCS_ROOT.d.ts +6 -6
  110. package/lib/narrative/internal/utilities/PACKAGE_DOCS_ROOT.js +6 -6
  111. package/lib/narrative/internal/utilities/assertProductionEvidenceSources.js +6 -19
  112. package/lib/narrative/internal/utilities/assertProductionEvidenceSources.js.map +1 -1
  113. package/lib/narrative/internal/utilities/createUnitFiles.d.ts +4 -6
  114. package/lib/narrative/internal/utilities/createUnitFiles.js +5 -7
  115. package/lib/narrative/internal/utilities/createUnitFiles.js.map +1 -1
  116. package/lib/narrative/internal/utilities/index.d.ts +8 -0
  117. package/lib/narrative/internal/utilities/index.js +25 -0
  118. package/lib/narrative/internal/utilities/index.js.map +1 -0
  119. package/lib/narrative/internal/utilities/referenceLocation.d.ts +6 -9
  120. package/lib/narrative/internal/utilities/referenceLocation.js +9 -14
  121. package/lib/narrative/internal/utilities/referenceLocation.js.map +1 -1
  122. package/package.json +8 -4
  123. package/src/IAutoMovieDevelopmentProps.ts +7 -6
  124. package/src/IAutoMovieEvidenceConfigProps.ts +9 -8
  125. package/src/IAutoMovieNarrativeProps.ts +0 -4
  126. package/src/IAutoMovieNoNarrativeProps.ts +18 -0
  127. package/src/createDevelopmentContractClaims.ts +38 -14
  128. package/src/createEvidenceConfig.ts +23 -13
  129. package/src/index.ts +8 -7
  130. package/src/internal/index.ts +14 -0
  131. package/src/internal/resolveSkillsDirectory.ts +9 -12
  132. package/src/narrative/IPackageChecklistClaimProps.ts +5 -11
  133. package/src/narrative/IPackageContractProps.ts +0 -9
  134. package/src/narrative/IPackagePopulationContractProps.ts +1 -10
  135. package/src/narrative/IProductionConfigProps.ts +1 -11
  136. package/src/narrative/createBriefFiles.ts +2 -2
  137. package/src/narrative/createNarrativeUnitFiles.ts +28 -20
  138. package/src/narrative/createPackageChecklistClaim.ts +5 -10
  139. package/src/narrative/createPackageContract.ts +3 -15
  140. package/src/narrative/createPackagePopulationContract.ts +11 -26
  141. package/src/narrative/index.ts +11 -14
  142. package/src/narrative/internal/REALIZED_LAYERS.ts +1 -1
  143. package/src/narrative/internal/claims/createDiscoveryClaim.ts +20 -6
  144. package/src/narrative/internal/claims/createExpressionObligationClaims.ts +15 -24
  145. package/src/narrative/internal/claims/createInstructionCoverageClaim.ts +8 -6
  146. package/src/narrative/internal/claims/createLayerClaims.ts +48 -78
  147. package/src/narrative/internal/claims/createOutlineClaims.ts +8 -8
  148. package/src/narrative/internal/claims/createPopulationObligationClaims.ts +5 -5
  149. package/src/narrative/internal/claims/createReviewClaims.ts +69 -91
  150. package/src/narrative/internal/claims/createSettingCoverageClaim.ts +5 -7
  151. package/src/narrative/internal/claims/index.ts +8 -0
  152. package/src/narrative/internal/collectProductionClaims.ts +7 -5
  153. package/src/narrative/internal/index.ts +16 -0
  154. package/src/narrative/internal/metadataRewrite/index.ts +43 -0
  155. package/src/narrative/internal/references/createCoverageReference.ts +1 -3
  156. package/src/narrative/internal/references/createDiscoveryReferences.ts +2 -2
  157. package/src/narrative/internal/references/createLanguagePrincipleReferences.ts +8 -9
  158. package/src/narrative/internal/references/createLineageReference.ts +7 -9
  159. package/src/narrative/internal/references/createPrincipleReferences.ts +13 -14
  160. package/src/narrative/internal/references/createSettingReferences.ts +5 -8
  161. package/src/narrative/internal/references/index.ts +11 -0
  162. package/src/narrative/internal/references/layerFiles.ts +5 -5
  163. package/src/narrative/internal/topology/createTopologyFiles.ts +1 -1
  164. package/src/narrative/internal/topology/index.ts +1 -0
  165. package/src/narrative/internal/utilities/BODY_ROOT.ts +17 -0
  166. package/src/narrative/internal/utilities/PACKAGE_DOCS_ROOT.ts +6 -6
  167. package/src/narrative/internal/utilities/assertProductionEvidenceSources.ts +6 -25
  168. package/src/narrative/internal/utilities/createUnitFiles.ts +5 -7
  169. package/src/narrative/internal/utilities/index.ts +8 -0
  170. package/src/narrative/internal/utilities/referenceLocation.ts +8 -18
  171. package/lib/narrative/AuthoredPass.d.ts +0 -16
  172. package/lib/narrative/AuthoredPass.js +0 -3
  173. package/lib/narrative/AuthoredPass.js.map +0 -1
  174. package/lib/narrative/IProductionLayerStages.d.ts +0 -15
  175. package/lib/narrative/IProductionLayerStages.js.map +0 -1
  176. package/lib/narrative/internal/hasNaturalness.d.ts +0 -14
  177. package/lib/narrative/internal/hasNaturalness.js +0 -19
  178. package/lib/narrative/internal/hasNaturalness.js.map +0 -1
  179. package/lib/narrative/internal/utilities/passRoot.d.ts +0 -16
  180. package/lib/narrative/internal/utilities/passRoot.js +0 -22
  181. package/lib/narrative/internal/utilities/passRoot.js.map +0 -1
  182. package/lib/narrative/stripNaturalnessComments.d.ts +0 -12
  183. package/lib/narrative/stripNaturalnessComments.js +0 -34
  184. package/lib/narrative/stripNaturalnessComments.js.map +0 -1
  185. package/src/narrative/AuthoredPass.ts +0 -16
  186. package/src/narrative/IProductionLayerStages.ts +0 -16
  187. package/src/narrative/internal/hasNaturalness.ts +0 -17
  188. package/src/narrative/internal/utilities/passRoot.ts +0 -20
  189. package/src/narrative/stripNaturalnessComments.ts +0 -31
@@ -14,9 +14,9 @@ import { constructionStage } from "../constructionStage";
14
14
  import { createLocalContractReference } from "../references/createLocalContractReference";
15
15
  import { createSharedReference } from "../references/createSharedReference";
16
16
  import { layerFiles } from "../references/layerFiles";
17
+ import { BODY_ROOT } from "../utilities/BODY_ROOT";
17
18
  import { createContractDirectory } from "../utilities/createContractDirectory";
18
19
  import { createUnitFiles } from "../utilities/createUnitFiles";
19
- import { passRoot } from "../utilities/passRoot";
20
20
 
21
21
  /**
22
22
  * Creates the population obligation claims for a complete layer.
@@ -28,13 +28,13 @@ import { passRoot } from "../utilities/passRoot";
28
28
  * repeating a population question on every unit turns one comparison into a
29
29
  * restatement per unit.
30
30
  *
31
- * Unit duties use checklists. Naturalness population comparisons have separate
32
- * expression obligation claims rather than repeating their question per unit.
31
+ * Unit duties use checklists. Script expression population comparisons have
32
+ * separate expression obligation claims rather than repeating their question per unit.
33
33
  *
34
34
  * @evidence contracts/development/implementation.md#principled-implementation Construction stage controls whole-layer file-level obligation coverage, with one answering document per shared/language population item and no per-H2 repetition of the same comparison; createContractDirectory probes shared documents in the shared skills tree and language documents in the production's own `docs/contracts`.
35
35
  * @evidence contracts/development/implementation.md#clear-and-simple-structure The exported factory delegates one family build while keeping population scope distinct from principle checklists and expression obligations.
36
36
  * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Required shared common/narrative files stay selected even when missing so the compiler reports a broken tree; only realized and layer-specific optional documents are conditionally selected.
37
- * @evidence contracts/development/common.md#meaningful-documentation The prose explains whole-layer respondents, unique evidence and the boundary with per-unit and naturalness families; the helper comment identifies optional-file compatibility.
37
+ * @evidence contracts/development/common.md#meaningful-documentation The prose explains whole-layer respondents, unique evidence and the boundary with per-unit and script expression families; the helper comment identifies optional-file compatibility.
38
38
  * @evidence contracts/development/implementation.md#efficient-algorithms At most four candidates per scope are filtered and mapped, with a bounded number of synchronous existence probes and selector constructions; this factory never scans the manuscript population.
39
39
  * @evidence contracts/development/implementation.md#reuse-equivalent-work Shared/language selection reuses layerFiles and reference builders; optional installed files are observed per config build, so changes in the contract tree invalidate naturally without a retained cache.
40
40
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Intermediate and returned arrays have a fixed family bound; returned claim/reference objects belong to the config owner and existence probes retain no exposed handles.
@@ -110,7 +110,7 @@ function claim(props: {
110
110
  return {
111
111
  name: `${props.layer} documents answer each ${props.reference.files[0]} item once`,
112
112
  type: "markdown",
113
- root: passRoot("draft"),
113
+ root: BODY_ROOT,
114
114
  files: createUnitFiles(props.layer, props.scope),
115
115
  symbol: "file",
116
116
  disabled: props.disabled,
@@ -8,23 +8,20 @@ import path from "node:path";
8
8
 
9
9
  import type { IContractLocation } from "../../../internal/IContractLocation";
10
10
  import type { AuthoredLayer } from "../../AuthoredLayer";
11
- import type { AuthoredPass } from "../../AuthoredPass";
12
11
  import type { IProductionConfigProps } from "../../IProductionConfigProps";
13
- import type { ProductionStage } from "../../ProductionStage";
14
12
  import { constructionStage } from "../constructionStage";
15
- import { hasNaturalness } from "../hasNaturalness";
16
13
  import { createLineageReference } from "../references/createLineageReference";
17
14
  import { createSharedReference } from "../references/createSharedReference";
15
+ import { BODY_ROOT } from "../utilities/BODY_ROOT";
18
16
  import { PACKAGE_DOCS_ROOT } from "../utilities/PACKAGE_DOCS_ROOT";
19
17
  import { createContractDirectory } from "../utilities/createContractDirectory";
20
18
  import { createUnitFiles } from "../utilities/createUnitFiles";
21
- import { passRoot } from "../utilities/passRoot";
22
19
 
23
20
  /**
24
21
  * Creates the claims that record the evidence-stage reviews in the graph.
25
22
  *
26
23
  * A reviewer writes one review file per authored file and one review H2 per
27
- * authored H2, directly under `docs/review/<pass>/<layer>` in a tree that
24
+ * authored H2, directly under `docs/review/draft/<layer>` in a tree that
28
25
  * mirrors the authored layer. A selected review file or `verdict/index.md`
29
26
  * starts this current population; missing counterparts never come from a
30
27
  * legacy round. Without current files, the highest numbered legacy round
@@ -37,110 +34,91 @@ import { passRoot } from "../utilities/passRoot";
37
34
  * No claim binds the review files to the authored files one to one, because
38
35
  * the H2 bijection already leaves no authored H2 without a review.
39
36
  *
40
- * Review claims are active only while the reviewed pass is in `evidence`.
41
- * A package whose installed contract predates the review family, or whose
42
- * reviewer has not yet written current files or a legacy round under
43
- * `docs/review/<pass>/<layer>`, has no review claims for that pass.
37
+ * Review claims are active only while the layer's construction stage is
38
+ * `evidence`. A package whose installed contract predates the review family,
39
+ * or whose reviewer has not yet written current files or a legacy round under
40
+ * `docs/review/draft/<layer>`, has no review claims for that layer.
44
41
  *
45
- * @evidence contracts/development/implementation.md#principled-implementation Actual in-scope direct review files or a verdict select the canonical population exclusively; otherwise the highest numeric legacy round supplies exact current-review lineage and a separate file-level verdict obligation, with stages preserved.
42
+ * @evidence contracts/development/implementation.md#principled-implementation Actual in-scope direct review files or a verdict select the canonical population exclusively; otherwise the highest numeric legacy round supplies exact current-review lineage and a separate file-level verdict obligation, both following the construction stage.
46
43
  * @evidence contracts/development/implementation.md#clear-and-simple-structure One root selector keeps current-versus-legacy admission separate from the unchanged unit bijection, freshness and whole-population verdict claims.
47
44
  * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Older contract families, probed in the shared skills tree that also roots their references, and not-yet-created review roots yield no claims; native inactive populations do not establish that independent review occurred.
48
45
  * @evidence contracts/development/common.md#meaningful-documentation The prose states canonical admission, exclusive legacy fallback, current-review invalidation, H2 bijection, verdict ownership and optional roots/contracts.
49
- * @evidence contracts/development/implementation.md#efficient-algorithms Up to two editions scan entries only as deep as their actual selectors; directory entries and native glob matching dominate, with a linear root scan for legacy selection when no canonical file exists.
50
- * @evidence contracts/development/implementation.md#reuse-equivalent-work Each edition reuses its resolved files, selected root and lineage for both claims; filesystem observation repeats per config build so new current files replace legacy selection.
46
+ * @evidence contracts/development/implementation.md#efficient-algorithms One review root scans entries only as deep as its actual selectors; directory entries and native glob matching dominate, with a linear root scan for legacy selection when no canonical file exists.
47
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work The resolved files, selected root and lineage serve both claims; filesystem observation repeats per config build so new current files replace legacy selection.
51
48
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Directory arrays are transient and bounded by visited entries; returned claims belong to the config, and synchronous scans retain no history, handle or task.
52
49
  */
53
50
  export function createReviewClaims(
54
51
  props: IProductionConfigProps,
55
52
  layer: AuthoredLayer,
56
53
  ): IEvidenceClaim[] {
57
- const passes: [AuthoredPass, ProductionStage][] = [
58
- ["draft", constructionStage(props, layer)],
59
- ...(hasNaturalness(layer)
60
- ? [
61
- ["final", props.naturalness.screenplay] as [
62
- AuthoredPass,
63
- ProductionStage,
64
- ],
65
- ]
66
- : []),
67
- ];
68
54
  const principles: boolean = installed(props, "principles/review.md");
69
55
  const obligations: boolean = installed(props, "obligations/review.md");
70
56
  if (!principles && !obligations) return [];
71
57
  const files: string[] = createUnitFiles(layer, props.narrativeScope);
72
-
73
- return passes.flatMap(
74
- ([pass, stage]: [AuthoredPass, ProductionStage]): IEvidenceClaim[] => {
75
- // Naturalness approval stays with the working text, even after promotion.
76
- const inside: string[] = files.map((file: string): string =>
77
- file.slice(layer.length + 1),
78
- );
79
- const base: string = `${PACKAGE_DOCS_ROOT}/review/${pass}/${layer}`;
80
- const selected: { root: string; files: string[] } | null =
81
- selectReviewRoot(path.join(props.location, base), inside);
82
- if (selected === null) return [];
83
- const disabled: boolean = stage === "disabled";
84
- const root: string =
85
- selected.root === "" ? base : `${base}/${selected.root}`;
86
- const lineage: IEvidenceMarkdownReference = {
87
- ...(createLineageReference(
88
- files,
89
- "h2",
90
- pass,
91
- true,
92
- ) as IEvidenceMarkdownReference),
93
- root: `${passRoot(pass)}/${layer}`,
94
- files: inside,
95
- };
96
- const where: "construction" | "naturalness" =
97
- pass === "draft" ? "construction" : "naturalness";
98
- return [
99
- {
100
- name: `${layer} ${where} review H2 units keep a current review of their ${pass} H2`,
101
- type: "markdown",
102
- root,
103
- files: selected.files,
104
- symbol: "h2",
105
- disabled,
106
- reference: [
107
- lineage,
108
- ...(principles
109
- ? [
110
- createSharedReference({
111
- contracts: props,
112
- file: "principles/review.md",
113
- checklist: true,
114
- exclusion: false,
115
- }),
116
- ]
117
- : []),
118
- ],
119
- },
120
- ...(obligations
58
+ const inside: string[] = files.map((file: string): string =>
59
+ file.slice(layer.length + 1),
60
+ );
61
+ const base: string = `${PACKAGE_DOCS_ROOT}/review/draft/${layer}`;
62
+ const selected: { root: string; files: string[] } | null = selectReviewRoot(
63
+ path.join(props.location, base),
64
+ inside,
65
+ );
66
+ if (selected === null) return [];
67
+ const disabled: boolean = constructionStage(props, layer) === "disabled";
68
+ const root: string = selected.root === "" ? base : `${base}/${selected.root}`;
69
+ const lineage: IEvidenceMarkdownReference = {
70
+ ...(createLineageReference(
71
+ files,
72
+ "h2",
73
+ true,
74
+ ) as IEvidenceMarkdownReference),
75
+ root: `${BODY_ROOT}/${layer}`,
76
+ files: inside,
77
+ };
78
+ return [
79
+ {
80
+ name: `${layer} construction review H2 units keep a current review of their body H2`,
81
+ type: "markdown",
82
+ root,
83
+ files: selected.files,
84
+ symbol: "h2",
85
+ disabled,
86
+ reference: [
87
+ lineage,
88
+ ...(principles
121
89
  ? [
122
- {
123
- name: `${layer} ${where} verdict answers each review obligation once`,
124
- type: "markdown",
125
- root,
126
- files: ["verdict/index.md"],
127
- symbol: "file",
128
- disabled,
129
- reference: {
130
- ...createSharedReference({
131
- contracts: props,
132
- file: "obligations/review.md",
133
- checklist: false,
134
- exclusion: false,
135
- }),
136
- uniqueEvidence: true,
137
- },
138
- } satisfies IEvidenceClaim,
90
+ createSharedReference({
91
+ contracts: props,
92
+ file: "principles/review.md",
93
+ checklist: true,
94
+ exclusion: false,
95
+ }),
139
96
  ]
140
97
  : []),
141
- ];
98
+ ],
142
99
  },
143
- );
100
+ ...(obligations
101
+ ? [
102
+ {
103
+ name: `${layer} construction verdict answers each review obligation once`,
104
+ type: "markdown",
105
+ root,
106
+ files: ["verdict/index.md"],
107
+ symbol: "file",
108
+ disabled,
109
+ reference: {
110
+ ...createSharedReference({
111
+ contracts: props,
112
+ file: "obligations/review.md",
113
+ checklist: false,
114
+ exclusion: false,
115
+ }),
116
+ uniqueEvidence: true,
117
+ },
118
+ } satisfies IEvidenceClaim,
119
+ ]
120
+ : []),
121
+ ];
144
122
  }
145
123
 
146
124
  /**
@@ -5,7 +5,7 @@ import type { ProductionStage } from "../../ProductionStage";
5
5
  import { createNarrativeUnitFiles } from "../../createNarrativeUnitFiles";
6
6
  import { constructionStage } from "../constructionStage";
7
7
  import { createSettingReferences } from "../references/createSettingReferences";
8
- import { passRoot } from "../utilities/passRoot";
8
+ import { BODY_ROOT } from "../utilities/BODY_ROOT";
9
9
 
10
10
  /**
11
11
  * Creates canon dependencies on treatments or short screenplay H2s: settings for treatments and compact shorts, the brief for shorts.
@@ -14,7 +14,7 @@ import { passRoot } from "../utilities/passRoot";
14
14
  * depends on, and a canon H2 no selected narrative H2 uses is answered by an
15
15
  * exclusion on the narrative H2 whose scope makes it absent.
16
16
  *
17
- * @evidence contracts/development/implementation.md#principled-implementation Actual treatment or short-screenplay H2 consumers cover H2s of every enumerated promoted canon file, settings or brief as `canon` names, selecting its body edition while the scalar construction stage controls the consumer stage; an empty canon returns undefined.
17
+ * @evidence contracts/development/implementation.md#principled-implementation Actual treatment or short-screenplay H2 consumers cover H2s of every enumerated canon body file, settings or brief as `canon` names, while the scalar construction stage controls the consumer stage; an empty canon returns undefined.
18
18
  * @evidence contracts/development/implementation.md#clear-and-simple-structure Canon coverage lives on the concrete event or short-scene consumers, separate from structural prerequisite readiness and inherited script/screenplay relations.
19
19
  * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Empty reference populations are omitted because there is no canon dependency to cite; pass readiness remains a separate required check rather than being excused by this omission.
20
20
  * @evidence contracts/development/common.md#meaningful-documentation The prose states which canon each consumer cites, dependency hosts and truthful scope exclusions, and the nearby comment distinguishes empty coverage from readiness.
@@ -30,17 +30,15 @@ export function createSettingCoverageClaim(
30
30
  const stage: ProductionStage = constructionStage(props, layer);
31
31
  const reference: IEvidenceReference[] = createSettingReferences(
32
32
  props.location,
33
- "draft",
34
33
  canon,
35
34
  );
36
- // An empty canon has no dependency to cite. Structural prerequisite readiness is
37
- // checked separately by pass validation; canon is always read in body.
35
+ // An empty canon has no dependency to cite.
38
36
  if (reference.length === 0) return undefined;
39
37
  return {
40
38
  name: `${layer} H2 consumers cite their ${canon} dependencies`,
41
39
  type: "markdown",
42
- root: passRoot("draft"),
43
- files: createNarrativeUnitFiles(layer, props.narrativeScope),
40
+ root: BODY_ROOT,
41
+ files: createNarrativeUnitFiles({ layer, scope: props.narrativeScope }),
44
42
  symbol: "h2",
45
43
  disabled: stage === "disabled",
46
44
  reference,
@@ -0,0 +1,8 @@
1
+ export * from "./createDiscoveryClaim";
2
+ export * from "./createExpressionObligationClaims";
3
+ export * from "./createInstructionCoverageClaim";
4
+ export * from "./createLayerClaims";
5
+ export * from "./createOutlineClaims";
6
+ export * from "./createPopulationObligationClaims";
7
+ export * from "./createReviewClaims";
8
+ export * from "./createSettingCoverageClaim";
@@ -10,6 +10,7 @@ import { createOutlineClaims } from "./claims/createOutlineClaims";
10
10
  import { createPopulationObligationClaims } from "./claims/createPopulationObligationClaims";
11
11
  import { createReviewClaims } from "./claims/createReviewClaims";
12
12
  import { productionLayers } from "./productionLayers";
13
+ import { BODY_ROOT } from "./utilities/BODY_ROOT";
13
14
  import { assertProductionEvidenceSources } from "./utilities/assertProductionEvidenceSources";
14
15
  import { createEvidenceFiles } from "./utilities/createEvidenceFiles";
15
16
 
@@ -28,16 +29,17 @@ export function collectProductionClaims(
28
29
  props: IProductionConfigProps,
29
30
  ): IEvidenceClaim[] {
30
31
  assertProductionEvidenceSources(props);
32
+
33
+ // A short's brief holds only what the commission does not fix, so its
34
+ // screenplay alone realizes the instructions.
31
35
  const instructions: IEvidenceClaim[] = (
32
36
  props.mode === "long"
33
37
  ? (["settings", "treatments"] as const)
34
38
  : props.mode === "short"
35
- ? (["brief", "screenplay"] as const)
39
+ ? (["screenplay"] as const)
36
40
  : []
37
41
  ).flatMap(
38
- (
39
- layer: "settings" | "brief" | "treatments" | "screenplay",
40
- ): IEvidenceClaim[] => {
42
+ (layer: "settings" | "treatments" | "screenplay"): IEvidenceClaim[] => {
41
43
  const claim: IEvidenceClaim | undefined = createInstructionCoverageClaim(
42
44
  props,
43
45
  layer,
@@ -69,7 +71,7 @@ export function collectProductionClaims(
69
71
  for (const claim of claims) {
70
72
  if (
71
73
  claim.type === "markdown" &&
72
- claim.root === "docs/body" &&
74
+ claim.root === BODY_ROOT &&
73
75
  claim.evidenceFiles === undefined &&
74
76
  (claim.symbol === "file" || claim.symbol === "h2")
75
77
  )
@@ -0,0 +1,16 @@
1
+ export * from "./AUTHORED_LAYERS";
2
+ export * from "./REALIZED_LAYERS";
3
+ export * from "./SETTINGS_DOMAINS";
4
+ export * from "./claims";
5
+ export * from "./collectProductionClaims";
6
+ export * from "./constructionStage";
7
+ export * from "./createGraphConfig";
8
+ export * from "./isCanonLayer";
9
+ export * from "./metadataRewrite";
10
+ export * from "./productionLayers";
11
+ export * from "./readSettingsFiles";
12
+ export * from "./references";
13
+ export * from "./settingsEntryAnchor";
14
+ export * from "./topology";
15
+ export * from "./utilities";
16
+ export * from "./validateSettingsOutline";
@@ -0,0 +1,43 @@
1
+ export * from "./ACKNOWLEDGEMENT";
2
+ export * from "./EvidenceDeclarationKind";
3
+ export * from "./HEADING_ACKNOWLEDGEMENT";
4
+ export * from "./HEADING_REVIEW";
5
+ export * from "./IEvidenceHeading";
6
+ export * from "./IEvidenceSection";
7
+ export * from "./IMetadataFragment";
8
+ export * from "./IProjectionSegment";
9
+ export * from "./IProtectedProjection";
10
+ export * from "./REVIEW";
11
+ export * from "./SUSPICIOUS";
12
+ export * from "./UTF8";
13
+ export * from "./between";
14
+ export * from "./continuation";
15
+ export * from "./declarationKind";
16
+ export * from "./decode";
17
+ export * from "./directory";
18
+ export * from "./errorMessage";
19
+ export * from "./evidenceHeading";
20
+ export * from "./evidenceSections";
21
+ export * from "./findClose";
22
+ export * from "./firstDifference";
23
+ export * from "./flatFingerprintStart";
24
+ export * from "./invalidUtf8Offset";
25
+ export * from "./isDeclaration";
26
+ export * from "./isNodeError";
27
+ export * from "./lineEnding";
28
+ export * from "./locate";
29
+ export * from "./markdownFiles";
30
+ export * from "./metadataOwnership";
31
+ export * from "./normalizeFile";
32
+ export * from "./occurrenceOffsets";
33
+ export * from "./occurrences";
34
+ export * from "./originalOffset";
35
+ export * from "./project";
36
+ export * from "./protectedFileKind";
37
+ export * from "./replacementSafety";
38
+ export * from "./sameMetadata";
39
+ export * from "./selectFiles";
40
+ export * from "./singleLineDeclaration";
41
+ export * from "./textLocation";
42
+ export * from "./validateRenderedSample";
43
+ export * from "./withoutEnding";
@@ -1,6 +1,5 @@
1
1
  import type { IEvidenceReference } from "@wrtnlabs/evidence";
2
2
 
3
- import type { AuthoredPass } from "../../AuthoredPass";
4
3
  import { referenceLocation } from "../utilities/referenceLocation";
5
4
 
6
5
  /**
@@ -32,11 +31,10 @@ import { referenceLocation } from "../utilities/referenceLocation";
32
31
  export function createCoverageReference(
33
32
  files: string[],
34
33
  symbol: "file" | "h2",
35
- pass: AuthoredPass = "draft",
36
34
  ): IEvidenceReference {
37
35
  return {
38
36
  type: "markdown",
39
- ...referenceLocation(files, pass, symbol),
37
+ ...referenceLocation(files, symbol),
40
38
  symbol,
41
39
  noEvidenceExclude: true,
42
40
  };
@@ -12,8 +12,8 @@ import { createSharedReference } from "./createSharedReference";
12
12
  /**
13
13
  * Creates the open-world discovery duties one layer's population covers.
14
14
  *
15
- * Canon, settings or a short's brief, searches its own directives, promise, and subject, and backcasts the
16
- * planned narrative to find what those layers would otherwise have to invent.
15
+ * Canon, settings or a short's brief, searches its own directives and subject,
16
+ * and backcasts the planned narrative to find what those layers would otherwise have to invent.
17
17
  * That backcast is how settings anticipates the cross-layer narrative contract,
18
18
  * so `discovery/narratives.md` is not selected here: it is the duty each
19
19
  * narrative layer answers when it rechecks that contract against what it
@@ -8,15 +8,16 @@ import { createLocalContractReference } from "./createLocalContractReference";
8
8
  import { layerFiles } from "./layerFiles";
9
9
 
10
10
  /**
11
- * Selects the installed language's per-unit questions for one gate.
11
+ * Selects the installed language's per-unit questions for one family.
12
12
  *
13
- * Supported language modules place per-unit questions in naturalness, so their
14
- * construction selection is empty for those modules.
13
+ * A language module's principles apply to every construction; its
14
+ * `naturalness/` questions apply to scripts construction, the one layer that
15
+ * selects the expression family.
15
16
  *
16
- * @evidence contracts/development/implementation.md#principled-implementation Layer-specific candidate files are selected from the installed language principles or naturalness family, with every present file forming a per-unit H2 checklist and exclusions forbidden.
17
+ * @evidence contracts/development/implementation.md#principled-implementation Layer-specific candidate files are selected from the installed language principles or expression family, with every present file forming a per-unit H2 checklist and exclusions forbidden.
17
18
  * @evidence contracts/development/implementation.md#clear-and-simple-structure Family selection is localized here while local-file admission and contract-relative addresses belong to createLocalContractReference.
18
19
  * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Missing optional language files are omitted according to the sparse installed module; no default language or synthetic question is substituted.
19
- * @evidence contracts/development/common.md#meaningful-documentation The prose states per-unit ownership, gate selection and the supported modules that put their questions in naturalness.
20
+ * @evidence contracts/development/common.md#meaningful-documentation The prose states per-unit ownership, family selection and which construction answers the expression family.
20
21
  * @evidence contracts/development/implementation.md#efficient-algorithms At most four candidate files each require one synchronous existence probe; mapping/filtering and allocated references have a fixed family bound with path-length-dependent string work.
21
22
  * @evidence contracts/development/implementation.md#reuse-equivalent-work layerFiles and the local-reference builder centralize equivalent scope/address rules; installation state is observed for each build, not cached across edits.
22
23
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources Only the bounded returned references remain with the claim owner; intermediate optional arrays and paths expire after the call with no open handles or tasks.
@@ -24,16 +25,14 @@ import { layerFiles } from "./layerFiles";
24
25
  export function createLanguagePrincipleReferences(props: {
25
26
  location: string;
26
27
  layer: AuthoredLayer;
27
- gate: "layer" | "naturalness";
28
+ family: "principles" | "naturalness";
28
29
  }): IEvidenceReference[] {
29
- const family: string =
30
- props.gate === "naturalness" ? "naturalness" : "principles";
31
30
  return layerFiles(props.layer)
32
31
  .map((file: string): IEvidenceMarkdownReference | undefined =>
33
32
  createLocalContractReference({
34
33
  location: props.location,
35
34
  scope: "language",
36
- file: `${family}/${file}`,
35
+ file: `${props.family}/${file}`,
37
36
  checklist: true,
38
37
  exclusion: false,
39
38
  }),
@@ -1,14 +1,13 @@
1
1
  import type { IEvidenceReference } from "@wrtnlabs/evidence";
2
2
 
3
- import type { AuthoredPass } from "../../AuthoredPass";
4
3
  import { referenceLocation } from "../utilities/referenceLocation";
5
4
 
6
5
  /**
7
- * Creates a reference to one parent story unit on a shared topology.
6
+ * Creates a reference to one parent story unit.
8
7
  *
9
- * Each child has one parent, each parent has one child, and neither may
10
- * exclude. This binds screenplay to scripts and the promoted manuscript to its
11
- * frozen pre-revision snapshot.
8
+ * Each child host cites one parent, each parent has one child, and neither may
9
+ * exclude. This binds each long screenplay scene file to the script scene H2
10
+ * it realizes, and each review H2 to the authored H2 it read.
12
11
  * Use {@link createCoverageReference} for differently partitioned layers.
13
12
  *
14
13
  * `review` additionally demands a current review of the cited unit. The
@@ -16,9 +15,9 @@ import { referenceLocation } from "../utilities/referenceLocation";
16
15
  * unit expires the review, and the graph names the one unit to read again.
17
16
  *
18
17
  * @evidence contracts/development/implementation.md#principled-implementation UniqueEvidence, singleEvidencePerSymbol and noEvidenceExclude together form a one-to-one non-excludable relation; optional requireReview binds a reviewer to the exact cited unit version through native review semantics.
19
- * @evidence contracts/development/implementation.md#clear-and-simple-structure The strict-lineage helper stays separate from many-to-many coverage and delegates body/revision/global address rules to referenceLocation.
18
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure The strict-lineage helper stays separate from many-to-many coverage and delegates body/global address rules to referenceLocation.
20
19
  * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Review is an explicit supported relation variant rather than a bypass for stale text, and no expected parent is inferred from a consumer label.
21
- * @evidence contracts/development/common.md#meaningful-documentation The prose states one-parent/one-child ownership, revision lineage and invalidation of a review when its cited unit changes.
20
+ * @evidence contracts/development/common.md#meaningful-documentation The prose states one-parent/one-child ownership, its screenplay and review uses and invalidation of a review when its cited unit changes.
22
21
  * @evidence contracts/development/implementation.md#efficient-algorithms Fixed flag assembly is constant-sized; address qualification costs O(n) selector text for file hosts and retains the original selector array for H2 hosts.
23
22
  * @evidence contracts/development/implementation.md#reuse-equivalent-work The same address builder serves lineage and coverage; references are freshly built and optional review metadata applies only to this requested relation, with no cross-analysis cache.
24
23
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned object and any qualified selector strings belong to the caller; H2 mode can retain the supplied array, and no handle, task or module-level collection is owned.
@@ -26,12 +25,11 @@ import { referenceLocation } from "../utilities/referenceLocation";
26
25
  export function createLineageReference(
27
26
  files: string[],
28
27
  symbol: "file" | "h2",
29
- pass: AuthoredPass | "revision" = "draft",
30
28
  review: boolean = false,
31
29
  ): IEvidenceReference {
32
30
  return {
33
31
  type: "markdown",
34
- ...referenceLocation(files, pass, symbol),
32
+ ...referenceLocation(files, symbol),
35
33
  symbol,
36
34
  noEvidenceExclude: true,
37
35
  uniqueEvidence: true,
@@ -22,14 +22,15 @@ import { layerFiles } from "./layerFiles";
22
22
  * words can be asked whether this speaker could have said them. No item may be
23
23
  * excluded, because each binds wherever its condition applies.
24
24
  *
25
- * The same layer axis runs under `naturalness/`, where the naturalness gate owns
26
- * the questions a layer can be content-complete while still failing.
27
- * Both gates ask a unit about its own body; they differ in when.
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.
28
29
  *
29
- * @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 construction/naturalness 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.
30
- * @evidence contracts/development/implementation.md#clear-and-simple-structure One layer axis is reused for both gates, while family admission remains distinct from language modules and population obligations; the owning tree is decided by createContractDirectory, not rebuilt here.
31
- * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Required construction files stay selected when missing so native compilation diagnoses the broken tree; sparse naturalness files and older realized contracts are the explicit compatibility cases.
32
- * @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 the two gate timings.
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.
33
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.
34
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.
35
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.
@@ -37,16 +38,14 @@ import { layerFiles } from "./layerFiles";
37
38
  export function createPrincipleReferences(props: {
38
39
  contracts: IContractLocation;
39
40
  layer: AuthoredLayer;
40
- gate: "layer" | "naturalness";
41
+ family: "principles" | "naturalness";
41
42
  }): IEvidenceReference[] {
42
- const family: string =
43
- props.gate === "naturalness" ? "naturalness" : "principles";
44
43
  const installed: (file: string) => boolean = (file: string): boolean =>
45
44
  fs.existsSync(
46
45
  path.join(
47
46
  createContractDirectory(props.contracts, "shared"),
48
47
  "shared",
49
- ...family.split("/"),
48
+ props.family,
50
49
  file,
51
50
  ),
52
51
  );
@@ -54,16 +53,16 @@ export function createPrincipleReferences(props: {
54
53
  // one is a broken tree rather than an absent option and must still be
55
54
  // selected for the compiler to say so. Only the genuinely optional documents
56
55
  // are filtered: `realized.md`, which older trees predate, and the whole
57
- // naturalness subtree, which is sparse by design.
56
+ // expression subtree, which is sparse by design.
58
57
  const optional: (file: string) => boolean = (file: string): boolean =>
59
- props.gate === "naturalness" || file === "realized.md";
58
+ props.family === "naturalness" || file === "realized.md";
60
59
  return layerFiles(props.layer)
61
60
  .filter((file: string): boolean => !optional(file) || installed(file))
62
61
  .map(
63
62
  (file: string): IEvidenceMarkdownReference =>
64
63
  createSharedReference({
65
64
  contracts: props.contracts,
66
- file: `${family}/${file}`,
65
+ file: `${props.family}/${file}`,
67
66
  checklist: true,
68
67
  exclusion: false,
69
68
  }),
@@ -2,32 +2,29 @@ import type { IEvidenceReference } from "@wrtnlabs/evidence";
2
2
  import fs from "node:fs";
3
3
  import path from "node:path";
4
4
 
5
- import type { AuthoredPass } from "../../AuthoredPass";
6
5
  import { readSettingsFiles } from "../readSettingsFiles";
7
- import { PACKAGE_DOCS_ROOT } from "../utilities/PACKAGE_DOCS_ROOT";
6
+ import { BODY_ROOT } from "../utilities/BODY_ROOT";
8
7
  import { referenceLocation } from "../utilities/referenceLocation";
9
8
 
10
9
  /**
11
10
  * Creates one H2 reference per canon file of settings, in any supported layout, or of a short's brief.
12
11
  * The outline is not canon and is never an inherited settings dependency.
13
12
  *
14
- * @evidence contracts/development/implementation.md#principled-implementation The promoted 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.
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.
15
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.
16
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.
17
- * @evidence contracts/development/common.md#meaningful-documentation The prose states per-file settings targets, two layouts and the outline exclusion; the default pass uses promoted draft addressing.
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.
18
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.
19
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.
20
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.
21
20
  */
22
21
  export function createSettingReferences(
23
22
  location: string,
24
- pass: AuthoredPass = "draft",
25
23
  canon: "settings" | "brief" = "settings",
26
24
  ): IEvidenceReference[] {
27
25
  const settingsRoot: string = path.join(
28
26
  location,
29
- PACKAGE_DOCS_ROOT,
30
- "body",
27
+ ...BODY_ROOT.split("/"),
31
28
  canon,
32
29
  );
33
30
  if (!fs.existsSync(settingsRoot)) return [];
@@ -40,7 +37,7 @@ export function createSettingReferences(
40
37
  ): { symbol: "h2"; root: string; files: string[]; type: "markdown" } =>
41
38
  ({
42
39
  type: "markdown",
43
- ...referenceLocation([file], pass),
40
+ ...referenceLocation([file]),
44
41
  symbol: "h2",
45
42
  }) satisfies IEvidenceReference,
46
43
  );