@automovie/evidence 0.3.3 → 0.3.4

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 (97) hide show
  1. package/README.md +12 -2
  2. package/lib/IAutoMovieDevelopmentProps.d.ts +7 -4
  3. package/lib/IAutoMovieEvidenceConfigProps.d.ts +2 -2
  4. package/lib/createDevelopmentContractClaims.d.ts +8 -10
  5. package/lib/createDevelopmentContractClaims.js +31 -13
  6. package/lib/createDevelopmentContractClaims.js.map +1 -1
  7. package/lib/createEvidenceConfig.d.ts +5 -2
  8. package/lib/createEvidenceConfig.js +29 -3
  9. package/lib/createEvidenceConfig.js.map +1 -1
  10. package/lib/createResearchClaims.d.ts +2 -2
  11. package/lib/createResearchClaims.js +3 -3
  12. package/lib/createResearchClaims.js.map +1 -1
  13. package/lib/internal/STORY_CONTRACTS.d.ts +1 -1
  14. package/lib/internal/STORY_CONTRACTS.js +1 -1
  15. package/lib/internal/assertFilmCatalogLayout.d.ts +18 -0
  16. package/lib/internal/assertFilmCatalogLayout.js +49 -0
  17. package/lib/internal/assertFilmCatalogLayout.js.map +1 -0
  18. package/lib/internal/hasMatchingFile.d.ts +13 -0
  19. package/lib/internal/hasMatchingFile.js +28 -0
  20. package/lib/internal/hasMatchingFile.js.map +1 -0
  21. package/lib/narrative/NarrativeLayer.d.ts +2 -2
  22. package/lib/narrative/createPackageChecklistClaim.js +2 -4
  23. package/lib/narrative/createPackageChecklistClaim.js.map +1 -1
  24. package/lib/narrative/internal/claims/createInstructionCoverageClaim.d.ts +3 -3
  25. package/lib/narrative/internal/claims/createInstructionCoverageClaim.js +3 -3
  26. package/lib/narrative/internal/claims/createLayerClaims.d.ts +5 -5
  27. package/lib/narrative/internal/claims/createLayerClaims.js +5 -23
  28. package/lib/narrative/internal/claims/createLayerClaims.js.map +1 -1
  29. package/lib/narrative/internal/claims/createOutlineClaims.js +3 -4
  30. package/lib/narrative/internal/claims/createOutlineClaims.js.map +1 -1
  31. package/lib/narrative/internal/claims/createPopulationObligationClaims.d.ts +6 -7
  32. package/lib/narrative/internal/claims/createPopulationObligationClaims.js +12 -29
  33. package/lib/narrative/internal/claims/createPopulationObligationClaims.js.map +1 -1
  34. package/lib/narrative/internal/claims/createReviewClaims.js +3 -17
  35. package/lib/narrative/internal/claims/createReviewClaims.js.map +1 -1
  36. package/lib/narrative/internal/claims/createSettingCoverageClaim.d.ts +1 -1
  37. package/lib/narrative/internal/claims/createSettingCoverageClaim.js +1 -1
  38. package/lib/narrative/internal/claims/index.d.ts +0 -1
  39. package/lib/narrative/internal/claims/index.js +0 -1
  40. package/lib/narrative/internal/claims/index.js.map +1 -1
  41. package/lib/narrative/internal/collectProductionClaims.js +1 -4
  42. package/lib/narrative/internal/collectProductionClaims.js.map +1 -1
  43. package/lib/narrative/internal/index.d.ts +0 -1
  44. package/lib/narrative/internal/index.js +0 -1
  45. package/lib/narrative/internal/index.js.map +1 -1
  46. package/lib/narrative/internal/references/createLanguagePrincipleReferences.d.ts +4 -7
  47. package/lib/narrative/internal/references/createLanguagePrincipleReferences.js +5 -7
  48. package/lib/narrative/internal/references/createLanguagePrincipleReferences.js.map +1 -1
  49. package/lib/narrative/internal/references/createPrincipleReferences.d.ts +6 -17
  50. package/lib/narrative/internal/references/createPrincipleReferences.js +10 -31
  51. package/lib/narrative/internal/references/createPrincipleReferences.js.map +1 -1
  52. package/lib/narrative/internal/references/createSharedReference.d.ts +3 -4
  53. package/lib/narrative/internal/references/createSharedReference.js +4 -5
  54. package/lib/narrative/internal/references/createSharedReference.js.map +1 -1
  55. package/lib/narrative/internal/references/layerFiles.d.ts +5 -6
  56. package/lib/narrative/internal/references/layerFiles.js +6 -8
  57. package/lib/narrative/internal/references/layerFiles.js.map +1 -1
  58. package/lib/narrative/internal/utilities/createContractRoot.d.ts +6 -10
  59. package/lib/narrative/internal/utilities/createContractRoot.js +6 -10
  60. package/lib/narrative/internal/utilities/createContractRoot.js.map +1 -1
  61. package/lib/narrative/internal/utilities/hasStoryContract.d.ts +17 -0
  62. package/lib/narrative/internal/utilities/hasStoryContract.js +28 -0
  63. package/lib/narrative/internal/utilities/hasStoryContract.js.map +1 -0
  64. package/package.json +1 -1
  65. package/src/IAutoMovieDevelopmentProps.ts +7 -4
  66. package/src/IAutoMovieEvidenceConfigProps.ts +2 -2
  67. package/src/createDevelopmentContractClaims.ts +31 -13
  68. package/src/createEvidenceConfig.ts +36 -3
  69. package/src/createResearchClaims.ts +3 -3
  70. package/src/internal/STORY_CONTRACTS.ts +1 -1
  71. package/src/internal/assertFilmCatalogLayout.ts +55 -0
  72. package/src/internal/hasMatchingFile.ts +29 -0
  73. package/src/narrative/NarrativeLayer.ts +2 -2
  74. package/src/narrative/createPackageChecklistClaim.ts +2 -4
  75. package/src/narrative/internal/claims/createInstructionCoverageClaim.ts +3 -3
  76. package/src/narrative/internal/claims/createLayerClaims.ts +5 -25
  77. package/src/narrative/internal/claims/createOutlineClaims.ts +3 -12
  78. package/src/narrative/internal/claims/createPopulationObligationClaims.ts +14 -46
  79. package/src/narrative/internal/claims/createReviewClaims.ts +3 -25
  80. package/src/narrative/internal/claims/createSettingCoverageClaim.ts +1 -1
  81. package/src/narrative/internal/claims/index.ts +0 -1
  82. package/src/narrative/internal/collectProductionClaims.ts +1 -4
  83. package/src/narrative/internal/index.ts +0 -1
  84. package/src/narrative/internal/references/createLanguagePrincipleReferences.ts +5 -8
  85. package/src/narrative/internal/references/createPrincipleReferences.ts +13 -38
  86. package/src/narrative/internal/references/createSharedReference.ts +4 -5
  87. package/src/narrative/internal/references/layerFiles.ts +6 -8
  88. package/src/narrative/internal/utilities/createContractRoot.ts +6 -10
  89. package/src/narrative/internal/utilities/hasStoryContract.ts +29 -0
  90. package/lib/narrative/internal/REALIZED_LAYERS.d.ts +0 -16
  91. package/lib/narrative/internal/REALIZED_LAYERS.js +0 -19
  92. package/lib/narrative/internal/REALIZED_LAYERS.js.map +0 -1
  93. package/lib/narrative/internal/claims/createExpressionObligationClaims.d.ts +0 -26
  94. package/lib/narrative/internal/claims/createExpressionObligationClaims.js +0 -93
  95. package/lib/narrative/internal/claims/createExpressionObligationClaims.js.map +0 -1
  96. package/src/narrative/internal/REALIZED_LAYERS.ts +0 -18
  97. package/src/narrative/internal/claims/createExpressionObligationClaims.ts +0 -125
@@ -1,51 +1,30 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.createPrincipleReferences = createPrincipleReferences;
7
- const node_fs_1 = __importDefault(require("node:fs"));
8
- const node_path_1 = __importDefault(require("node:path"));
9
- const createContractDirectory_1 = require("../utilities/createContractDirectory");
4
+ const hasStoryContract_1 = require("../utilities/hasStoryContract");
10
5
  const createSharedReference_1 = require("./createSharedReference");
11
6
  const layerFiles_1 = require("./layerFiles");
12
7
  /**
13
8
  * Creates the principle checklists every unit of one layer answers for itself.
14
9
  *
15
- * A settings H2 answers the common and settings checklists; a narrative unit
16
- * also answers the narrative checklist, which settings cannot: it inherits no
17
- * unit and stages no turn. A script or screenplay unit additionally answers the
18
- * realized checklist, whose questions need literal text to be asked of: a
19
- * treatment fixes which exchange happens, and only a layer that writes the
20
- * words can be asked whether this speaker could have said them. No item may be
21
- * excluded, because each binds wherever its condition applies.
10
+ * Each unit answers its layer's principles. Only the screenplay selects an
11
+ * installed realized-text supplement. Every selected H2 answers its items.
22
12
  *
23
- * The same layer axis runs under `naturalness/`, the expression questions a
24
- * script can fail while being content-complete. Scripts construction
25
- * selects them beside its principles, so both families ask a unit about its
26
- * own body in the same pass.
27
- *
28
- * @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.
29
- * @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.
30
- * @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.
31
- * @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.
13
+ * @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 directory; only declared optional family files are filtered by installation, probed in the shared skills tree that createContractDirectory resolves, where createSharedReference also roots the references.
14
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure One layer axis is reused across construction stages, while family admission remains distinct from language modules and population obligations; the owning tree is decided by createContractDirectory, not rebuilt here.
15
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Required construction files stay selected when missing so native compilation diagnoses the broken tree; realized supplements are optional.
16
+ * @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 layer selects realized text.
32
17
  * @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.
33
18
  * @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.
34
19
  * @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.
35
20
  */
36
21
  function createPrincipleReferences(props) {
37
- const installed = (file) => node_fs_1.default.existsSync(node_path_1.default.join((0, createContractDirectory_1.createContractDirectory)(props.contracts, "shared"), "shared", props.family, file));
38
- // The construction family ships one document per layer scope, so a missing
39
- // one is a broken tree rather than an absent option and must still be
40
- // selected for the compiler to say so. Only the genuinely optional documents
41
- // are filtered: `realized.md`, which older trees predate, and the whole
42
- // expression subtree, which is sparse by design.
43
- const optional = (file) => props.family === "naturalness" || file === "realized.md";
44
22
  return (0, layerFiles_1.layerFiles)(props.layer)
45
- .filter((file) => !optional(file) || installed(file))
23
+ .filter((file) => file !== "realized.md" ||
24
+ (0, hasStoryContract_1.hasStoryContract)(props.contracts, `principles/${file}`))
46
25
  .map((file) => (0, createSharedReference_1.createSharedReference)({
47
26
  contracts: props.contracts,
48
- file: `${props.family}/${file}`,
27
+ file: `principles/${file}`,
49
28
  checklist: true,
50
29
  exclusion: false,
51
30
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"createPrincipleReferences.js","sourceRoot":"","sources":["../../../../src/narrative/internal/references/createPrincipleReferences.ts"],"names":[],"mappings":";;;;;;AAIA,sDAAyB;AACzB,0DAA6B;AAI7B,kFAA+E;AAC/E,mEAAgE;AAChE,6CAA0C;AAE1C;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,mCAA0C,KAIzC;IACC,MAAM,SAAS,GAA8B,CAAC,IAAY,EAAW,EAAE,CACrE,iBAAE,CAAC,UAAU,CACX,mBAAI,CAAC,IAAI,CACP,IAAA,iDAAuB,EAAC,KAAK,CAAC,SAAS,EAAE,QAAQ,CAAC,EAClD,QAAQ,EACR,KAAK,CAAC,MAAM,EACZ,IAAI,CACL,CACF,CAAC;IACJ,2EAA2E;IAC3E,sEAAsE;IACtE,6EAA6E;IAC7E,wEAAwE;IACxE,iDAAiD;IACjD,MAAM,QAAQ,GAA8B,CAAC,IAAY,EAAW,EAAE,CACpE,KAAK,CAAC,MAAM,KAAK,aAAa,IAAI,IAAI,KAAK,aAAa,CAAC;IAC3D,OAAO,IAAA,uBAAU,EAAC,KAAK,CAAC,KAAK,CAAC;SAC3B,MAAM,CAAC,CAAC,IAAY,EAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC;SACrE,GAAG,CACF,CAAC,IAAY,EAA8B,EAAE,CAC3C,IAAA,6CAAqB,EAAC;QACpB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,IAAI,EAAE,GAAG,KAAK,CAAC,MAAM,IAAI,IAAI,EAAE;QAC/B,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,KAAK;KACjB,CAAC,CACL,CAAC;AACN,CAAC"}
1
+ {"version":3,"file":"createPrincipleReferences.js","sourceRoot":"","sources":["../../../../src/narrative/internal/references/createPrincipleReferences.ts"],"names":[],"mappings":";;;AAOA,oEAAiE;AACjE,mEAAgE;AAChE,6CAA0C;AAE1C;;;;;;;;;;;;;GAaG;AACH,mCAA0C,KAGzC;IACC,OAAO,IAAA,uBAAU,EAAC,KAAK,CAAC,KAAK,CAAC;SAC3B,MAAM,CACL,CAAC,IAAY,EAAW,EAAE,CACxB,IAAI,KAAK,aAAa;QACtB,IAAA,mCAAgB,EAAC,KAAK,CAAC,SAAS,EAAE,cAAc,IAAI,EAAE,CAAC,CAC1D;SACA,GAAG,CACF,CAAC,IAAY,EAA8B,EAAE,CAC3C,IAAA,6CAAqB,EAAC;QACpB,SAAS,EAAE,KAAK,CAAC,SAAS;QAC1B,IAAI,EAAE,cAAc,IAAI,EAAE;QAC1B,SAAS,EAAE,IAAI;QACf,SAAS,EAAE,KAAK;KACjB,CAAC,CACL,CAAC;AACN,CAAC"}
@@ -4,13 +4,12 @@ import type { IContractLocation } from "../../../internal/IContractLocation";
4
4
  * Creates one reference against a shared contract document.
5
5
  *
6
6
  * Every shared family is the same relation — anchored H2 items of a document
7
- * in the effective `contracts/story/shared` tree, answered by the selected H2
7
+ * in the effective `contracts/story` tree, answered by the selected H2
8
8
  * hosts of one layer — and differs only in two flags, so it is declared once
9
9
  * rather than assembled separately. The shared tree is the bundled one, which
10
10
  * a workspace keeps at its root and a standalone production under its own
11
- * `.agents/skills`. A host cites the document under the family that owns it,
12
- * `shared/...`, because the production's `docs/contracts/language` holds files
13
- * of the same name.
11
+ * `.agents/skills`. A host cites the file relative to `contracts/story`.
12
+ * Production-owned contracts retain their `work/` or `language/` prefix.
14
13
  *
15
14
  * `checklist` decides who answers. A checklist is answered by every selected
16
15
  * host for itself, so a strong sibling never answers for a weak one. Ordinary
@@ -6,13 +6,12 @@ const createContractRoot_1 = require("../utilities/createContractRoot");
6
6
  * Creates one reference against a shared contract document.
7
7
  *
8
8
  * Every shared family is the same relation — anchored H2 items of a document
9
- * in the effective `contracts/story/shared` tree, answered by the selected H2
9
+ * in the effective `contracts/story` tree, answered by the selected H2
10
10
  * hosts of one layer — and differs only in two flags, so it is declared once
11
11
  * rather than assembled separately. The shared tree is the bundled one, which
12
12
  * a workspace keeps at its root and a standalone production under its own
13
- * `.agents/skills`. A host cites the document under the family that owns it,
14
- * `shared/...`, because the production's `docs/contracts/language` holds files
15
- * of the same name.
13
+ * `.agents/skills`. A host cites the file relative to `contracts/story`.
14
+ * Production-owned contracts retain their `work/` or `language/` prefix.
16
15
  *
17
16
  * `checklist` decides who answers. A checklist is answered by every selected
18
17
  * host for itself, so a strong sibling never answers for a weak one. Ordinary
@@ -36,7 +35,7 @@ function createSharedReference(props) {
36
35
  return {
37
36
  type: "markdown",
38
37
  root: (0, createContractRoot_1.createContractRoot)(props.contracts, "shared"),
39
- files: [`shared/${props.file}`],
38
+ files: [props.file],
40
39
  symbol: "h2",
41
40
  ...(props.checklist ? { checklist: true } : {}),
42
41
  ...(props.exclusion ? {} : { noEvidenceExclude: true }),
@@ -1 +1 @@
1
- {"version":3,"file":"createSharedReference.js","sourceRoot":"","sources":["../../../../src/narrative/internal/references/createSharedReference.ts"],"names":[],"mappings":";;;AAGA,wEAAqE;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,+BAAsC,KAKrC;IACC,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,IAAA,uCAAkB,EAAC,KAAK,CAAC,SAAS,EAAE,QAAQ,CAAC;QACnD,KAAK,EAAE,CAAC,UAAU,KAAK,CAAC,IAAI,EAAE,CAAC;QAC/B,MAAM,EAAE,IAAI;QACZ,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/C,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;KACxD,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"createSharedReference.js","sourceRoot":"","sources":["../../../../src/narrative/internal/references/createSharedReference.ts"],"names":[],"mappings":";;;AAGA,wEAAqE;AAErE;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,+BAAsC,KAKrC;IACC,OAAO;QACL,IAAI,EAAE,UAAU;QAChB,IAAI,EAAE,IAAA,uCAAkB,EAAC,KAAK,CAAC,SAAS,EAAE,QAAQ,CAAC;QACnD,KAAK,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC;QACnB,MAAM,EAAE,IAAI;QACZ,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC/C,GAAG,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,IAAI,EAAE,CAAC;KACxD,CAAC;AACJ,CAAC"}
@@ -4,16 +4,15 @@ import type { AuthoredLayer } from "../../AuthoredLayer";
4
4
  *
5
5
  * Placement is decided by who can truthfully answer an item, so the axis is
6
6
  * the same wherever it appears: everyone, then the layers that inherit a unit,
7
- * then the layers holding literal text, then one layer. The principles and
8
- * expression families and both scopes reuse it, because the question of who
9
- * can answer does not depend on which family asks it.
7
+ * then the screenplay for realized text, then the exact layer. Shared and
8
+ * local contracts use the same respondent scope.
10
9
  *
11
10
  * @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.
12
11
  * @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.
13
- * @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.
12
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Canon layers omit inherited narrative duties and only the final screenplay receives realized-text duties, both explicit semantic differences of the supported pipeline.
14
13
  * @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.
15
- * @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.
16
- * @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.
14
+ * @evidence contracts/development/implementation.md#efficient-algorithms A fixed number of layer comparisons produces at most four filenames, independent of manuscript length.
15
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work All families reuse this layer selection. Each call owns its array, so filtering for one family preserves the others.
17
16
  * @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.
18
17
  */
19
18
  export declare function layerFiles(layer: AuthoredLayer): string[];
@@ -1,30 +1,28 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.layerFiles = layerFiles;
4
- const REALIZED_LAYERS_1 = require("../REALIZED_LAYERS");
5
4
  const isCanonLayer_1 = require("../isCanonLayer");
6
5
  /**
7
6
  * Names the layer-scoped documents one layer answers, narrowest last.
8
7
  *
9
8
  * Placement is decided by who can truthfully answer an item, so the axis is
10
9
  * the same wherever it appears: everyone, then the layers that inherit a unit,
11
- * then the layers holding literal text, then one layer. The principles and
12
- * expression families and both scopes reuse it, because the question of who
13
- * can answer does not depend on which family asks it.
10
+ * then the screenplay for realized text, then the exact layer. Shared and
11
+ * local contracts use the same respondent scope.
14
12
  *
15
13
  * @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.
16
14
  * @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.
17
- * @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.
15
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Canon layers omit inherited narrative duties and only the final screenplay receives realized-text duties, both explicit semantic differences of the supported pipeline.
18
16
  * @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.
19
- * @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.
20
- * @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.
17
+ * @evidence contracts/development/implementation.md#efficient-algorithms A fixed number of layer comparisons produces at most four filenames, independent of manuscript length.
18
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work All families reuse this layer selection. Each call owns its array, so filtering for one family preserves the others.
21
19
  * @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.
22
20
  */
23
21
  function layerFiles(layer) {
24
22
  return [
25
23
  "common.md",
26
24
  ...((0, isCanonLayer_1.isCanonLayer)(layer) ? [] : ["narratives.md"]),
27
- ...(REALIZED_LAYERS_1.REALIZED_LAYERS.has(layer) ? ["realized.md"] : []),
25
+ ...(layer === "screenplay" ? ["realized.md"] : []),
28
26
  `${layer}.md`,
29
27
  ];
30
28
  }
@@ -1 +1 @@
1
- {"version":3,"file":"layerFiles.js","sourceRoot":"","sources":["../../../../src/narrative/internal/references/layerFiles.ts"],"names":[],"mappings":";;;AACA,wDAAqD;AACrD,kDAA+C;AAE/C;;;;;;;;;;;;;;;;GAgBG;AACH,oBAA2B,KAAoB;IAC7C,OAAO;QACL,WAAW;QACX,GAAG,CAAC,IAAA,2BAAY,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QACjD,GAAG,CAAC,iCAAe,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACtD,GAAG,KAAK,KAAK;KACd,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"layerFiles.js","sourceRoot":"","sources":["../../../../src/narrative/internal/references/layerFiles.ts"],"names":[],"mappings":";;;AACA,kDAA+C;AAE/C;;;;;;;;;;;;;;;GAeG;AACH,oBAA2B,KAAoB;IAC7C,OAAO;QACL,WAAW;QACX,GAAG,CAAC,IAAA,2BAAY,EAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,eAAe,CAAC,CAAC;QACjD,GAAG,CAAC,KAAK,KAAK,YAAY,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QAClD,GAAG,KAAK,KAAK;KACd,CAAC;AACJ,CAAC"}
@@ -2,14 +2,10 @@ import type { IContractLocation } from "../../../internal/IContractLocation";
2
2
  /**
3
3
  * Resolves the reference root of the contract tree owning one family.
4
4
  *
5
- * The root stops above the family folder rather than descending into it, so a
6
- * citation address carries the family that owns it: `shared/principles/...`,
7
- * `language/naturalness/...`, and `work/...` are told apart by the address a
8
- * host writes, instead of colliding on the same relative file name. Only the
9
- * root differs between owners: the shared tree's `contracts/story`, reached
10
- * through `..` segments in a workspace, or the production's own
11
- * `docs/contracts`, so every citation address is the same in a workspace and
12
- * in a standalone production.
5
+ * Bundled references such as `principles/screenplay.md` start at the skills
6
+ * tree's `contracts/story`. Production-owned `language/...` and `work/...`
7
+ * references start at `docs/contracts`. Each citation works the same way in
8
+ * a workspace and in a standalone production.
13
9
  *
14
10
  * The same local Markdown bytes are both pre-draft instructions and later
15
11
  * evidence targets. Config constructs the graph but owns no document mirror.
@@ -18,12 +14,12 @@ import type { IContractLocation } from "../../../internal/IContractLocation";
18
14
  * @param scope The contract family the reference addresses.
19
15
  * @returns The `/`-separated root relative to the production's configuration directory.
20
16
  *
21
- * @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.
17
+ * @evidence contracts/development/implementation.md#principled-implementation createContractDirectory selects the bundled or production-owned tree and createReferenceRoot expresses it relative to the production location where native Evidence resolves the reference.
22
18
  * @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.
23
19
  * @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.
24
20
  * @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.
25
21
  * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure path computation coordinates no work across requests.
26
22
  * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Only the returned string outlives the call.
27
- * @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.
23
+ * @evidence contracts/development/common.md#meaningful-documentation Gives bundled and local citation examples with their owning roots and explains which Markdown supplies the checklist.
28
24
  */
29
25
  export declare function createContractRoot(contracts: IContractLocation, scope: "shared" | "language" | "work"): string;
@@ -6,14 +6,10 @@ const createContractDirectory_1 = require("./createContractDirectory");
6
6
  /**
7
7
  * Resolves the reference root of the contract tree owning one family.
8
8
  *
9
- * The root stops above the family folder rather than descending into it, so a
10
- * citation address carries the family that owns it: `shared/principles/...`,
11
- * `language/naturalness/...`, and `work/...` are told apart by the address a
12
- * host writes, instead of colliding on the same relative file name. Only the
13
- * root differs between owners: the shared tree's `contracts/story`, reached
14
- * through `..` segments in a workspace, or the production's own
15
- * `docs/contracts`, so every citation address is the same in a workspace and
16
- * in a standalone production.
9
+ * Bundled references such as `principles/screenplay.md` start at the skills
10
+ * tree's `contracts/story`. Production-owned `language/...` and `work/...`
11
+ * references start at `docs/contracts`. Each citation works the same way in
12
+ * a workspace and in a standalone production.
17
13
  *
18
14
  * The same local Markdown bytes are both pre-draft instructions and later
19
15
  * evidence targets. Config constructs the graph but owns no document mirror.
@@ -22,13 +18,13 @@ const createContractDirectory_1 = require("./createContractDirectory");
22
18
  * @param scope The contract family the reference addresses.
23
19
  * @returns The `/`-separated root relative to the production's configuration directory.
24
20
  *
25
- * @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.
21
+ * @evidence contracts/development/implementation.md#principled-implementation createContractDirectory selects the bundled or production-owned tree and createReferenceRoot expresses it relative to the production location where native Evidence resolves the reference.
26
22
  * @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.
27
23
  * @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.
28
24
  * @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.
29
25
  * @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure path computation coordinates no work across requests.
30
26
  * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Only the returned string outlives the call.
31
- * @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.
27
+ * @evidence contracts/development/common.md#meaningful-documentation Gives bundled and local citation examples with their owning roots and explains which Markdown supplies the checklist.
32
28
  */
33
29
  function createContractRoot(contracts, scope) {
34
30
  return (0, createReferenceRoot_1.createReferenceRoot)(contracts.location, (0, createContractDirectory_1.createContractDirectory)(contracts, scope));
@@ -1 +1 @@
1
- {"version":3,"file":"createContractRoot.js","sourceRoot":"","sources":["../../../../src/narrative/internal/utilities/createContractRoot.ts"],"names":[],"mappings":";;;AACA,+EAA4E;AAC5E,uEAAoE;AAEpE;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,4BACE,SAA4B,EAC5B,KAAqC;IAErC,OAAO,IAAA,yCAAmB,EACxB,SAAS,CAAC,QAAQ,EAClB,IAAA,iDAAuB,EAAC,SAAS,EAAE,KAAK,CAAC,CAC1C,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"createContractRoot.js","sourceRoot":"","sources":["../../../../src/narrative/internal/utilities/createContractRoot.ts"],"names":[],"mappings":";;;AACA,+EAA4E;AAC5E,uEAAoE;AAEpE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,4BACE,SAA4B,EAC5B,KAAqC;IAErC,OAAO,IAAA,yCAAmB,EACxB,SAAS,CAAC,QAAQ,EAClB,IAAA,iDAAuB,EAAC,SAAS,EAAE,KAAK,CAAC,CAC1C,CAAC;AACJ,CAAC"}
@@ -0,0 +1,17 @@
1
+ import type { IContractLocation } from "../../../internal/IContractLocation";
2
+ /**
3
+ * Checks whether an optional bundled checklist exists at its citation address.
4
+ *
5
+ * @param contracts The production and its configured skills tree.
6
+ * @param file A checklist path relative to `contracts/story`.
7
+ * @returns Whether the current installation supplies the checklist.
8
+ *
9
+ * @evidence contracts/development/implementation.md#principled-implementation Probes the file relative to the same bundled contract directory used by Markdown references.
10
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure Joins the address to the directory and performs one existence check.
11
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Reads the configured tree directly so a similarly named local checklist cannot activate a bundled duty.
12
+ * @evidence contracts/development/implementation.md#efficient-algorithms Performs one filesystem probe with path-length work.
13
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work All optional bundled families share this probe and the existing owner-directory resolver.
14
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources A synchronous existence check keeps no handle or cached installation state.
15
+ * @evidence contracts/development/common.md#meaningful-documentation Documents the path base, optionality and result.
16
+ */
17
+ export declare function hasStoryContract(contracts: IContractLocation, file: string): boolean;
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.hasStoryContract = hasStoryContract;
7
+ const node_fs_1 = __importDefault(require("node:fs"));
8
+ const node_path_1 = __importDefault(require("node:path"));
9
+ const createContractDirectory_1 = require("./createContractDirectory");
10
+ /**
11
+ * Checks whether an optional bundled checklist exists at its citation address.
12
+ *
13
+ * @param contracts The production and its configured skills tree.
14
+ * @param file A checklist path relative to `contracts/story`.
15
+ * @returns Whether the current installation supplies the checklist.
16
+ *
17
+ * @evidence contracts/development/implementation.md#principled-implementation Probes the file relative to the same bundled contract directory used by Markdown references.
18
+ * @evidence contracts/development/implementation.md#clear-and-simple-structure Joins the address to the directory and performs one existence check.
19
+ * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Reads the configured tree directly so a similarly named local checklist cannot activate a bundled duty.
20
+ * @evidence contracts/development/implementation.md#efficient-algorithms Performs one filesystem probe with path-length work.
21
+ * @evidence contracts/development/implementation.md#reuse-equivalent-work All optional bundled families share this probe and the existing owner-directory resolver.
22
+ * @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources A synchronous existence check keeps no handle or cached installation state.
23
+ * @evidence contracts/development/common.md#meaningful-documentation Documents the path base, optionality and result.
24
+ */
25
+ function hasStoryContract(contracts, file) {
26
+ return node_fs_1.default.existsSync(node_path_1.default.join((0, createContractDirectory_1.createContractDirectory)(contracts, "shared"), file));
27
+ }
28
+ //# sourceMappingURL=hasStoryContract.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hasStoryContract.js","sourceRoot":"","sources":["../../../../src/narrative/internal/utilities/hasStoryContract.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAG7B,uEAAoE;AAEpE;;;;;;;;;;;;;;GAcG;AACH,0BACE,SAA4B,EAC5B,IAAY;IAEZ,OAAO,iBAAE,CAAC,UAAU,CAClB,mBAAI,CAAC,IAAI,CAAC,IAAA,iDAAuB,EAAC,SAAS,EAAE,QAAQ,CAAC,EAAE,IAAI,CAAC,CAC9D,CAAC;AACJ,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@automovie/evidence",
3
- "version": "0.3.3",
3
+ "version": "0.3.4",
4
4
  "description": "Evidence configuration and optional narrative lifecycle validation for AutoMovie productions",
5
5
  "engines": {
6
6
  "node": ">=22.23.2"
@@ -19,14 +19,15 @@
19
19
  export interface IAutoMovieDevelopmentProps {
20
20
  /**
21
21
  * Types, classes, functions and methods under `src/entities/` answer
22
- * `contracts/development/entities.md`.
22
+ * `contracts/development/entities.md`. Submitting entities or composition
23
+ * on a narrative route also connects entity types to its subject records.
23
24
  */
24
25
  entities?: "disabled" | "evidence";
25
26
 
26
27
  /**
27
28
  * Functions and methods under `src/laws/`, `src/interactions/` and
28
- * `src/consequences/` answer `contracts/development/behaviors.md`. A law
29
- * names the study it follows in its answer; no study citation is required.
29
+ * `src/consequences/` answer `contracts/development/behaviors.md`. Cite a
30
+ * skilled behavior's study passage in its studied laws answer.
30
31
  */
31
32
  behaviors?: "disabled" | "evidence";
32
33
 
@@ -35,7 +36,9 @@ export interface IAutoMovieDevelopmentProps {
35
36
  * `contracts/development/composition.md` and cite a screenplay scene file
36
37
  * or its sections and beats, every section and beat of which must be cited;
37
38
  * those under `src/composition/films/` answer it and cite the scene files
38
- * they order, every one of which must belong to a film.
39
+ * they order, every one of which must belong to a film. Catalog sources
40
+ * answer the composition checklist alone. Submitting programmed film or
41
+ * scene sources requires the catalog film, case sources and acceptance record.
39
42
  */
40
43
  composition?: "disabled" | "evidence";
41
44
  }
@@ -21,7 +21,7 @@ export interface IAutoMovieEvidenceConfigProps {
21
21
  * contracts, absolute or relative to `location`.
22
22
  *
23
23
  * The engineering and development checklists (`contracts/development/**`)
24
- * and the shared story contracts (`contracts/story/shared/**`) resolve here.
24
+ * and the shared story contracts (`contracts/story/**`) resolve here.
25
25
  * The production's own `work/**` and `language/**` contracts always resolve
26
26
  * under `<location>/docs/contracts`, never here. A workspace
27
27
  * production passes the workspace root's tree; a standalone production omits
@@ -41,6 +41,6 @@ export interface IAutoMovieEvidenceConfigProps {
41
41
  /** Entity, behavior and composition development contracts; omitted stages stay disabled. */
42
42
  development?: IAutoMovieDevelopmentProps;
43
43
 
44
- /** Research studies answer the story research principles when `"evidence"`; disabled by default. */
44
+ /** Overrides research selection. By default a short selects all studies once one exists beyond the index. Other routes leave research disabled. */
45
45
  research?: "disabled" | "evidence";
46
46
  }
@@ -16,25 +16,23 @@ import { SKILLS_ROOT } from "./internal/SKILLS_ROOT";
16
16
  * tree at `props.skills`, by default the production's own `.agents/skills`.
17
17
  * Entities answer with their types, classes, functions and methods, because an
18
18
  * entity is a class whose methods are its capabilities. Behaviors (laws,
19
- * interactions and consequences) answer their checklist alone: most only
20
- * compose installed actions and follow no study, and a study can serve the
21
- * screenplay without any code, so neither direction of a study relation
22
- * holds for every production. A law names the study it follows in its
23
- * answer, which review judges.
19
+ * interactions and consequences) answer the behaviors checklist. For skilled
20
+ * practice, the studied laws answer cites the observations used to coordinate
21
+ * even installed actions. A study can also serve the screenplay alone.
24
22
  * Scenes cite the screenplay scene file, or the sections and beats of it they
25
23
  * realize, and every H2 section and H3 beat must be realized; films cite each
26
- * scene file they order, and every scene file must belong to a film. With
24
+ * scene file they order, and every scene file must belong to a film. Catalog
25
+ * scenes and the catalog film answer the composition checklist alone. With
27
26
  * `instructions`, the composition and entities must also realize every
28
27
  * instruction section, which no narrative layer then cites, with no
29
- * exclusion. Entities answer their checklist alone too, because their
30
- * settings citations are judged by review rather than required for every
31
- * settings heading.
28
+ * exclusion. The public configuration adds coverage of the route's subject
29
+ * records when entities or composition are submitted.
32
30
  *
33
31
  * @evidence contracts/development/implementation.md#principled-implementation Native TypeScript claims carry the checklist, and a second Markdown reference uses native target coverage to make the screenplay-section-and-beat-to-scene and scene-file-to-film relations mechanical, while entities and behaviors carry the checklist alone; `instructions` adds the instruction-to-code relation with the same coverage, no checklist and no exclusion, because a user requirement cannot be waived by its realizer.
34
32
  * @evidence contracts/development/implementation.md#clear-and-simple-structure One table maps each checklist population to its stage, folders, symbol kinds and cited population, and the one instruction relation, which has no checklist, follows it; disabled stages produce no claim, and the one props object carries the stages, the instruction switch and where the checklists are read.
35
33
  * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Source folders are the scaffold layout's documented locations, not fixture paths; nothing is inferred from file presence.
36
34
  * @evidence contracts/development/common.md#meaningful-documentation The comment states each stage's respondents, the relation it enforces and which skills tree holds the checklists; the `skills` member states its form and default, and `instructions` when the code must realize every instruction section.
37
- * @evidence contracts/development/implementation.md#efficient-algorithms Builds at most five fixed-size claim trees in constant time; it performs no discovery or file I/O.
35
+ * @evidence contracts/development/implementation.md#efficient-algorithms Builds at most six fixed-size claim trees in constant time without file I/O.
38
36
  * @evidence contracts/development/implementation.md#reuse-equivalent-work Fresh objects are returned so one configuration's edits cannot reach another; there is no expensive shared work.
39
37
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller owns the returned claims; nothing is retained.
40
38
  */
@@ -85,17 +83,32 @@ export function createDevelopmentContractClaims(
85
83
  {
86
84
  stage: "composition",
87
85
  name: "scenes",
88
- files: ["src/composition/scenes/**/*.ts"],
86
+ files: [
87
+ "src/composition/scenes/**/*.ts",
88
+ "!src/composition/scenes/catalog/**",
89
+ ],
89
90
  symbol: ["function"],
90
91
  cited: { type: "markdown", files: screenplay, symbol: ["h2", "h3"] },
91
92
  },
92
93
  {
93
94
  stage: "composition",
94
95
  name: "films",
95
- files: ["src/composition/films/**/*.ts"],
96
+ files: [
97
+ "src/composition/films/**/*.ts",
98
+ "!src/composition/films/catalog.ts",
99
+ ],
96
100
  symbol: ["function"],
97
101
  cited: { type: "markdown", files: screenplay, symbol: "file" },
98
102
  },
103
+ {
104
+ stage: "composition",
105
+ name: "review catalog",
106
+ files: [
107
+ "src/composition/scenes/catalog/**/*.ts",
108
+ "src/composition/films/catalog.ts",
109
+ ],
110
+ symbol: ["function"],
111
+ },
99
112
  ];
100
113
  const claims: IEvidenceClaim[] = populations
101
114
  .filter((entry): boolean => props[entry.stage] === "evidence")
@@ -121,7 +134,12 @@ export function createDevelopmentContractClaims(
121
134
  claims.push({
122
135
  name: "the code realizes every instruction section",
123
136
  type: "typescript",
124
- files: ["src/composition/**/*.ts", "src/entities/**/*.ts"],
137
+ files: [
138
+ "src/composition/**/*.ts",
139
+ "!src/composition/scenes/catalog/**",
140
+ "!src/composition/films/catalog.ts",
141
+ "src/entities/**/*.ts",
142
+ ],
125
143
  symbol: ["type", "function"],
126
144
  reference: {
127
145
  type: "markdown",
@@ -6,8 +6,10 @@ import type { IAutoMovieEvidenceConfigProps } from "./IAutoMovieEvidenceConfigPr
6
6
  import { createDevelopmentContractClaims } from "./createDevelopmentContractClaims";
7
7
  import { createEngineeringClaims } from "./createEngineeringClaims";
8
8
  import { createResearchClaims } from "./createResearchClaims";
9
+ import { assertFilmCatalogLayout } from "./internal/assertFilmCatalogLayout";
9
10
  import { assertProductionContractLayout } from "./internal/assertProductionContractLayout";
10
11
  import { createReferenceRoot } from "./internal/createReferenceRoot";
12
+ import { hasMatchingFile } from "./internal/hasMatchingFile";
11
13
  import { resolveSkillsDirectory } from "./internal/resolveSkillsDirectory";
12
14
  import { createProductionConfig } from "./narrative/createProductionConfig";
13
15
 
@@ -18,12 +20,15 @@ import { createProductionConfig } from "./narrative/createProductionConfig";
18
20
  * narrative factories, which keep production-owned work and language contracts
19
21
  * under `<location>/docs/contracts`, and its root relative to `location` goes to the default
20
22
  * engineering, development and research claims. Caller-supplied `claims` are
21
- * added after the defaults as written, so they name their own root.
23
+ * added after the defaults as written, so they name their own root. A short
24
+ * narrative includes its studies by default once one exists.
25
+ * Film composition validates its catalog inputs before building claims.
26
+ * On a story route the production's entity types cite their subject records.
22
27
  *
23
28
  * @evidence contracts/development/implementation.md#principled-implementation An absolute project location and a resolved absolute shared skills tree anchor the native engineering defaults and optional narrative selectors; native Evidence resolves the relative root against the configuration directory, the location, and caller-supplied claims are cloned before composition.
24
29
  * @evidence contracts/development/implementation.md#clear-and-simple-structure One options object selects engineering alone, engineering whose code realizes every instruction section when narrative mode is none and `docs/instructions` exists, or delegates narrative claim composition to createProductionConfig; resolveSkillsDirectory and createReferenceRoot own the shared-tree default, validation and spelling.
25
30
  * @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The returned object is an ordinary native configuration; this function neither evaluates diagnostics nor grants creative approval, an omitted skills tree yields exactly the standalone roots, and assertProductionContractLayout refuses a production still keeping its own contracts in the retired skills location rather than letting their duties vanish.
26
- * @evidence contracts/development/implementation.md#efficient-algorithms Two legacy-layout existence probes precede work, and mode none adds one instruction-directory probe; engineering creation allocates fixed defaults and clones supplied claims after them; narrative creation additionally discovers current contract files and expands a fixed number of layer families.
31
+ * @evidence contracts/development/implementation.md#efficient-algorithms Only submitted entities or composition on a story route probe for subject files. Only an omitted research option on the short route probes for studies. Enabled composition checks catalog inputs and mode none probes for instructions.
27
32
  * @evidence contracts/development/implementation.md#reuse-equivalent-work The shared tree is resolved once per call and reused by every factory; the layout guard repeats its two probes inside a narrative build so createProductionConfig called directly stays guarded; each call owns fresh option and claim copies, and filesystem-dependent narrative composition is not cached across calls.
28
33
  * @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller owns the returned configuration; this function retains no registry, native process or open resource.
29
34
  * @evidence contracts/development/common.md#meaningful-documentation The comment states how the shared tree reaches each factory and that supplied claims keep their own root; the input types explain routes, disabled stage defaults and additional native claims.
@@ -36,6 +41,8 @@ export function createEvidenceConfig(
36
41
  "Evidence location must be an absolute project directory, such as import.meta.dirname.",
37
42
  );
38
43
  assertProductionContractLayout(props.location);
44
+ if (props.development?.composition === "evidence")
45
+ assertFilmCatalogLayout(props.location);
39
46
  const skills: string = resolveSkillsDirectory(props);
40
47
  const root: string = createReferenceRoot(props.location, skills);
41
48
 
@@ -52,7 +59,33 @@ export function createEvidenceConfig(
52
59
  fs.existsSync(path.join(props.location, "docs", "instructions")),
53
60
  }),
54
61
  );
55
- if (props.research === "evidence")
62
+ if (
63
+ (props.development?.entities === "evidence" ||
64
+ props.development?.composition === "evidence") &&
65
+ (props.narrative?.mode === "short" || props.narrative?.mode === "long")
66
+ ) {
67
+ const layer: string =
68
+ props.narrative.mode === "short" ? "brief" : "settings";
69
+ const subjects: string[] = ["cast", "crowds", "props", "sets"].map(
70
+ (domain: string): string => `docs/body/${layer}/${domain}/*.md`,
71
+ );
72
+ if (hasMatchingFile(props.location, subjects, []))
73
+ claims.push({
74
+ name: `production entities cite ${layer} subjects`,
75
+ type: "typescript",
76
+ files: ["src/entities/**/*.ts"],
77
+ symbol: "type",
78
+ reference: { type: "markdown", files: subjects, symbol: "file" },
79
+ });
80
+ }
81
+ if (
82
+ props.research === "evidence" ||
83
+ (props.research === undefined &&
84
+ props.narrative?.mode === "short" &&
85
+ hasMatchingFile(props.location, "docs/research/**/*.md", [
86
+ "docs/research/index.md",
87
+ ]))
88
+ )
56
89
  claims.push(...createResearchClaims({ skills: root }));
57
90
  if (props.narrative === undefined) return { severity: "error", claims };
58
91
 
@@ -8,9 +8,9 @@ import { STORY_CONTRACTS } from "./internal/STORY_CONTRACTS";
8
8
  * principles.
9
9
  *
10
10
  * Each study in `docs/research/`, apart from its index, answers every item of
11
- * `contracts/story/shared/principles/research.md`, read from the skills tree at
11
+ * `contracts/story/principles/research.md`, read from the skills tree at
12
12
  * `skills`, by default the production's own `.agents/skills`. The citation
13
- * address, `shared/principles/research.md`, is the same wherever that tree
13
+ * address, `principles/research.md`, is the same wherever that tree
14
14
  * lives. Like the other story layers, the answers live apart from the study,
15
15
  * in `docs/evidence/construction/files/research/`, under an H1 naming the
16
16
  * study's path, so the study stays a plain synthesis its readers use.
@@ -45,7 +45,7 @@ export function createResearchClaims(
45
45
  reference: {
46
46
  type: "markdown",
47
47
  root: `${props.skills ?? SKILLS_ROOT}/${STORY_CONTRACTS}`,
48
- files: ["shared/principles/research.md"],
48
+ files: ["principles/research.md"],
49
49
  symbol: "h2",
50
50
  checklist: true,
51
51
  },
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Names the story contract tree inside a skills tree.
3
3
  *
4
- * Its `shared/` family ships with the scaffold's bundled skills. The `work/`
4
+ * Its checklist families ship directly in this directory. The `work/`
5
5
  * and `language/` families a production adopts live in its `docs/contracts`
6
6
  * instead; under a production's own skills tree they mark the retired layout.
7
7
  *