@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.
- package/README.md +12 -2
- package/lib/IAutoMovieDevelopmentProps.d.ts +7 -4
- package/lib/IAutoMovieEvidenceConfigProps.d.ts +2 -2
- package/lib/createDevelopmentContractClaims.d.ts +8 -10
- package/lib/createDevelopmentContractClaims.js +31 -13
- package/lib/createDevelopmentContractClaims.js.map +1 -1
- package/lib/createEvidenceConfig.d.ts +5 -2
- package/lib/createEvidenceConfig.js +29 -3
- package/lib/createEvidenceConfig.js.map +1 -1
- package/lib/createResearchClaims.d.ts +2 -2
- package/lib/createResearchClaims.js +3 -3
- package/lib/createResearchClaims.js.map +1 -1
- package/lib/internal/STORY_CONTRACTS.d.ts +1 -1
- package/lib/internal/STORY_CONTRACTS.js +1 -1
- package/lib/internal/assertFilmCatalogLayout.d.ts +18 -0
- package/lib/internal/assertFilmCatalogLayout.js +49 -0
- package/lib/internal/assertFilmCatalogLayout.js.map +1 -0
- package/lib/internal/hasMatchingFile.d.ts +13 -0
- package/lib/internal/hasMatchingFile.js +28 -0
- package/lib/internal/hasMatchingFile.js.map +1 -0
- package/lib/narrative/NarrativeLayer.d.ts +2 -2
- package/lib/narrative/createPackageChecklistClaim.js +2 -4
- package/lib/narrative/createPackageChecklistClaim.js.map +1 -1
- package/lib/narrative/internal/claims/createInstructionCoverageClaim.d.ts +3 -3
- package/lib/narrative/internal/claims/createInstructionCoverageClaim.js +3 -3
- package/lib/narrative/internal/claims/createLayerClaims.d.ts +5 -5
- package/lib/narrative/internal/claims/createLayerClaims.js +5 -23
- package/lib/narrative/internal/claims/createLayerClaims.js.map +1 -1
- package/lib/narrative/internal/claims/createOutlineClaims.js +3 -4
- package/lib/narrative/internal/claims/createOutlineClaims.js.map +1 -1
- package/lib/narrative/internal/claims/createPopulationObligationClaims.d.ts +6 -7
- package/lib/narrative/internal/claims/createPopulationObligationClaims.js +12 -29
- package/lib/narrative/internal/claims/createPopulationObligationClaims.js.map +1 -1
- package/lib/narrative/internal/claims/createReviewClaims.js +3 -17
- package/lib/narrative/internal/claims/createReviewClaims.js.map +1 -1
- package/lib/narrative/internal/claims/createSettingCoverageClaim.d.ts +1 -1
- package/lib/narrative/internal/claims/createSettingCoverageClaim.js +1 -1
- package/lib/narrative/internal/claims/index.d.ts +0 -1
- package/lib/narrative/internal/claims/index.js +0 -1
- package/lib/narrative/internal/claims/index.js.map +1 -1
- package/lib/narrative/internal/collectProductionClaims.js +1 -4
- package/lib/narrative/internal/collectProductionClaims.js.map +1 -1
- package/lib/narrative/internal/index.d.ts +0 -1
- package/lib/narrative/internal/index.js +0 -1
- package/lib/narrative/internal/index.js.map +1 -1
- package/lib/narrative/internal/references/createLanguagePrincipleReferences.d.ts +4 -7
- package/lib/narrative/internal/references/createLanguagePrincipleReferences.js +5 -7
- package/lib/narrative/internal/references/createLanguagePrincipleReferences.js.map +1 -1
- package/lib/narrative/internal/references/createPrincipleReferences.d.ts +6 -17
- package/lib/narrative/internal/references/createPrincipleReferences.js +10 -31
- package/lib/narrative/internal/references/createPrincipleReferences.js.map +1 -1
- package/lib/narrative/internal/references/createSharedReference.d.ts +3 -4
- package/lib/narrative/internal/references/createSharedReference.js +4 -5
- package/lib/narrative/internal/references/createSharedReference.js.map +1 -1
- package/lib/narrative/internal/references/layerFiles.d.ts +5 -6
- package/lib/narrative/internal/references/layerFiles.js +6 -8
- package/lib/narrative/internal/references/layerFiles.js.map +1 -1
- package/lib/narrative/internal/utilities/createContractRoot.d.ts +6 -10
- package/lib/narrative/internal/utilities/createContractRoot.js +6 -10
- package/lib/narrative/internal/utilities/createContractRoot.js.map +1 -1
- package/lib/narrative/internal/utilities/hasStoryContract.d.ts +17 -0
- package/lib/narrative/internal/utilities/hasStoryContract.js +28 -0
- package/lib/narrative/internal/utilities/hasStoryContract.js.map +1 -0
- package/package.json +1 -1
- package/src/IAutoMovieDevelopmentProps.ts +7 -4
- package/src/IAutoMovieEvidenceConfigProps.ts +2 -2
- package/src/createDevelopmentContractClaims.ts +31 -13
- package/src/createEvidenceConfig.ts +36 -3
- package/src/createResearchClaims.ts +3 -3
- package/src/internal/STORY_CONTRACTS.ts +1 -1
- package/src/internal/assertFilmCatalogLayout.ts +55 -0
- package/src/internal/hasMatchingFile.ts +29 -0
- package/src/narrative/NarrativeLayer.ts +2 -2
- package/src/narrative/createPackageChecklistClaim.ts +2 -4
- package/src/narrative/internal/claims/createInstructionCoverageClaim.ts +3 -3
- package/src/narrative/internal/claims/createLayerClaims.ts +5 -25
- package/src/narrative/internal/claims/createOutlineClaims.ts +3 -12
- package/src/narrative/internal/claims/createPopulationObligationClaims.ts +14 -46
- package/src/narrative/internal/claims/createReviewClaims.ts +3 -25
- package/src/narrative/internal/claims/createSettingCoverageClaim.ts +1 -1
- package/src/narrative/internal/claims/index.ts +0 -1
- package/src/narrative/internal/collectProductionClaims.ts +1 -4
- package/src/narrative/internal/index.ts +0 -1
- package/src/narrative/internal/references/createLanguagePrincipleReferences.ts +5 -8
- package/src/narrative/internal/references/createPrincipleReferences.ts +13 -38
- package/src/narrative/internal/references/createSharedReference.ts +4 -5
- package/src/narrative/internal/references/layerFiles.ts +6 -8
- package/src/narrative/internal/utilities/createContractRoot.ts +6 -10
- package/src/narrative/internal/utilities/hasStoryContract.ts +29 -0
- package/lib/narrative/internal/REALIZED_LAYERS.d.ts +0 -16
- package/lib/narrative/internal/REALIZED_LAYERS.js +0 -19
- package/lib/narrative/internal/REALIZED_LAYERS.js.map +0 -1
- package/lib/narrative/internal/claims/createExpressionObligationClaims.d.ts +0 -26
- package/lib/narrative/internal/claims/createExpressionObligationClaims.js +0 -93
- package/lib/narrative/internal/claims/createExpressionObligationClaims.js.map +0 -1
- package/src/narrative/internal/REALIZED_LAYERS.ts +0 -18
- 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
|
|
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
|
-
*
|
|
16
|
-
*
|
|
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
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
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) =>
|
|
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:
|
|
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":"
|
|
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
|
|
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
|
|
12
|
-
*
|
|
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
|
|
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
|
|
14
|
-
*
|
|
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: [
|
|
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
|
|
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
|
|
8
|
-
*
|
|
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
|
|
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
|
|
16
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work
|
|
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
|
|
12
|
-
*
|
|
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
|
|
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
|
|
20
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work
|
|
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
|
-
...(
|
|
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,
|
|
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
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
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
|
|
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
|
|
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
|
-
*
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
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
|
|
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
|
|
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
|
|
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
|
@@ -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`.
|
|
29
|
-
*
|
|
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
|
|
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
|
-
/**
|
|
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
|
|
20
|
-
*
|
|
21
|
-
*
|
|
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.
|
|
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.
|
|
30
|
-
*
|
|
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
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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
|
|
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 (
|
|
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/
|
|
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, `
|
|
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: ["
|
|
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
|
|
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
|
*
|