@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
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
4
|
+
import { hasMatchingFile } from "./hasMatchingFile";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Check the catalog inputs when a production submits a programmed film or
|
|
8
|
+
* scene to composition Evidence. A starter or an isolated catalog can be
|
|
9
|
+
* developed before any film exists. The director verifies registration,
|
|
10
|
+
* playback and the scope of each case at the handoff.
|
|
11
|
+
*
|
|
12
|
+
* @param location Absolute production directory.
|
|
13
|
+
* @throws Error listing every missing catalog input.
|
|
14
|
+
*
|
|
15
|
+
* @evidence contracts/development/implementation.md#principled-implementation Production films and scenes trigger the same layout that the scaffold specifies. A catalog case, the catalog film and its acceptance record serve different consumers and are checked together.
|
|
16
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure A source glob determines applicability, followed by one check for each fixed input and one for the case population.
|
|
17
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The generated starter, film registry, catalog and declaration files supply no production performance. File presence establishes only layout, and the director still has to replay the actual cases.
|
|
18
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Two scoped source searches and two fixed file probes run during configuration, outside film evaluation.
|
|
19
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each configuration observes current files, including newly added cases.
|
|
20
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The synchronous filesystem calls retain no handles or state.
|
|
21
|
+
* @evidence contracts/development/common.md#meaningful-documentation Names the submission that opens the check, the starter exception, the failure and the judgment retained by the director.
|
|
22
|
+
*/
|
|
23
|
+
export function assertFilmCatalogLayout(location: string): void {
|
|
24
|
+
const scenes: string = "src/composition/scenes";
|
|
25
|
+
const films: string = "src/composition/films";
|
|
26
|
+
const catalog: string = `${films}/catalog.ts`;
|
|
27
|
+
const cases: string = `${scenes}/catalog/**/*.ts`;
|
|
28
|
+
const declarations: string = "**/*.d.ts";
|
|
29
|
+
if (
|
|
30
|
+
!hasMatchingFile(
|
|
31
|
+
location,
|
|
32
|
+
[`${scenes}/**/*.ts`, `${films}/**/*.ts`],
|
|
33
|
+
[
|
|
34
|
+
`${scenes}/catalog/**`,
|
|
35
|
+
catalog,
|
|
36
|
+
`${films}/index.ts`,
|
|
37
|
+
`${films}/starter.ts`,
|
|
38
|
+
declarations,
|
|
39
|
+
],
|
|
40
|
+
)
|
|
41
|
+
)
|
|
42
|
+
return;
|
|
43
|
+
|
|
44
|
+
const missing: string[] = [catalog, "docs/acceptance/catalog.md"].filter(
|
|
45
|
+
(file: string): boolean =>
|
|
46
|
+
!fs
|
|
47
|
+
.statSync(path.join(location, file), { throwIfNoEntry: false })
|
|
48
|
+
?.isFile(),
|
|
49
|
+
);
|
|
50
|
+
if (!hasMatchingFile(location, cases, [declarations])) missing.push(cases);
|
|
51
|
+
if (missing.length)
|
|
52
|
+
throw new Error(
|
|
53
|
+
`Film composition requires its review catalog. Missing: ${missing.join(", ")}`,
|
|
54
|
+
);
|
|
55
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Returns whether a glob selects a regular file under the production root.
|
|
6
|
+
* A link to a file counts. A directory with a source extension does not.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/development/implementation.md#principled-implementation The glob resolves includes and exclusions against the same root used to stat its matches. Stat follows file links.
|
|
9
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One predicate serves case, film and study discovery.
|
|
10
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A matching path counts only when its current target is a file.
|
|
11
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Only matching paths are probed, stopping at the first file.
|
|
12
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each configuration needs the current source tree.
|
|
13
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The synchronous search keeps no handles or cached results.
|
|
14
|
+
* @evidence contracts/development/common.md#meaningful-documentation Specifies the root and how matching directories and links are treated.
|
|
15
|
+
*/
|
|
16
|
+
export function hasMatchingFile(
|
|
17
|
+
cwd: string,
|
|
18
|
+
patterns: string | string[],
|
|
19
|
+
exclude: string[],
|
|
20
|
+
): boolean {
|
|
21
|
+
return fs
|
|
22
|
+
.globSync(patterns, { cwd, exclude })
|
|
23
|
+
.some(
|
|
24
|
+
(file: string): boolean =>
|
|
25
|
+
fs
|
|
26
|
+
.statSync(path.join(cwd, file), { throwIfNoEntry: false })
|
|
27
|
+
?.isFile() === true,
|
|
28
|
+
);
|
|
29
|
+
}
|
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
*
|
|
4
4
|
* `treatments` fixes what happens as one flat ordered sequence of event units,
|
|
5
5
|
* grouped by nothing and partitioned for no reader. `scripts` designs
|
|
6
|
-
* the part and episode partition
|
|
7
|
-
* `screenplay`
|
|
6
|
+
* the part and episode partition, scene progression and draft exchanges.
|
|
7
|
+
* `screenplay` authors the final action, dialogue, sound and edit from those decisions.
|
|
8
8
|
*
|
|
9
9
|
* @evidence contracts/development/design.md#principled-representation The closed union names flat treatments, partitioned scripts and final screenplay, retaining their distinct authoring responsibilities.
|
|
10
10
|
* @evidence contracts/development/design.md#minimal-and-owned-surface Three literals keep treatments, scripts and final screenplay distinct without another runtime hierarchy.
|
|
@@ -111,10 +111,8 @@ export function createPackageChecklistClaim(
|
|
|
111
111
|
/**
|
|
112
112
|
* Keeps the package API on the tracked work-owned contract subtree.
|
|
113
113
|
*
|
|
114
|
-
* `naturalness`
|
|
115
|
-
*
|
|
116
|
-
* answers. The caller selects the hosts and their stage; the document
|
|
117
|
-
* directory alone never chooses its host population.
|
|
114
|
+
* Existing work-owned `naturalness` addresses remain valid. The caller selects
|
|
115
|
+
* the hosts and stage for a work-specific expression question.
|
|
118
116
|
*/
|
|
119
117
|
function isWorkDocument(document: string): boolean {
|
|
120
118
|
const normalized: string = document.replaceAll("\\", "/");
|
|
@@ -13,9 +13,9 @@ import { createUnitFiles } from "../utilities/createUnitFiles";
|
|
|
13
13
|
* Tracks instruction adoption in long work's settings, and realization in treatments or a short's screenplay.
|
|
14
14
|
* Each layer covers the targets independently through its own construction
|
|
15
15
|
* hosts and stage. Settings accounts for every adopted requirement; treatments
|
|
16
|
-
* can exclude requirements outside its selected narrative population.
|
|
17
|
-
* short
|
|
18
|
-
* instruction
|
|
16
|
+
* can exclude requirements outside its selected narrative population. On a
|
|
17
|
+
* short, the brief defines subjects and the screenplay accounts for every
|
|
18
|
+
* instruction.
|
|
19
19
|
* Instructions remain targets only. No instructions folder means no claim.
|
|
20
20
|
*
|
|
21
21
|
* @evidence contracts/development/implementation.md#principled-implementation When docs/instructions exists, selected body H2 hosts independently cover every instruction H2; treatments may exclude out-of-population requirements while settings or short screenplay may not.
|
|
@@ -32,13 +32,13 @@ import { createSettingCoverageClaim } from "./createSettingCoverageClaim";
|
|
|
32
32
|
* scene H2, so a script episode file becomes the screenplay episode folder of
|
|
33
33
|
* its scene files.
|
|
34
34
|
*
|
|
35
|
-
* Script
|
|
36
|
-
*
|
|
35
|
+
* Script scenes establish choices and draft exchanges. Final expression is
|
|
36
|
+
* assessed in the screenplay construction checklist.
|
|
37
37
|
*
|
|
38
|
-
* @evidence contracts/development/implementation.md#principled-implementation Construction H2 claims and file inheritance use native reference flags for per-unit checklists, treatment coverage and exact script-scene lineage, where each screenplay scene file cites the one script scene H2 it realizes;
|
|
38
|
+
* @evidence contracts/development/implementation.md#principled-implementation Construction H2 claims and file inheritance use native reference flags for per-unit checklists, treatment coverage and exact script-scene lineage, where each screenplay scene file cites the one script scene H2 it realizes; final expression belongs to the screenplay.
|
|
39
39
|
* @evidence contracts/development/implementation.md#clear-and-simple-structure One layer factory centralizes stage/root/parent choices, while population obligations, discovery and review remain separate factories with their distinct respondents.
|
|
40
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Short screenplay cites its actual brief without invented treatment or script parents; canon has no inherited file claim, and
|
|
41
|
-
* @evidence contracts/development/common.md#meaningful-documentation The prose distinguishes unit/population duties, layer-specific parents, the scene-file lineage and
|
|
40
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Short screenplay cites its actual brief without invented treatment or script parents; canon has no inherited file claim, and each layer selects its own principles.
|
|
41
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose distinguishes unit/population duties, layer-specific parents, the scene-file lineage and expression coverage; nearby comments explain topology capture.
|
|
42
42
|
* @evidence contracts/development/implementation.md#efficient-algorithms A fixed number of claims and reference families are constructed per layer; helper existence probes dominate most layers, while treatments and short screenplay also enumerate canon files for coverage, whose scans and sorting scale with the installed canon.
|
|
43
43
|
* @evidence contracts/development/implementation.md#reuse-equivalent-work Unit/topology selectors, parent-reference builders and scalar stages are reused within the construction; each build refreshes filesystem-dependent contract/canon observations instead of retaining stale config results.
|
|
44
44
|
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned native claims own their layer-family objects and any canon-derived references; synchronous discovery leaves no filesystem handle or background task open.
|
|
@@ -81,23 +81,6 @@ export function createLayerClaims(
|
|
|
81
81
|
: []),
|
|
82
82
|
];
|
|
83
83
|
|
|
84
|
-
// Script expression must remain repairable in the same construction body.
|
|
85
|
-
const expression: IEvidenceReference[] =
|
|
86
|
-
layer === "scripts"
|
|
87
|
-
? [
|
|
88
|
-
...createPrincipleReferences({
|
|
89
|
-
contracts: props,
|
|
90
|
-
layer,
|
|
91
|
-
family: "naturalness",
|
|
92
|
-
}),
|
|
93
|
-
...createLanguagePrincipleReferences({
|
|
94
|
-
location: props.location,
|
|
95
|
-
layer,
|
|
96
|
-
family: "naturalness",
|
|
97
|
-
}),
|
|
98
|
-
]
|
|
99
|
-
: [];
|
|
100
|
-
|
|
101
84
|
const inherits: string = isCanonLayer(layer)
|
|
102
85
|
? ""
|
|
103
86
|
: ", and account for the layers they inherit";
|
|
@@ -112,15 +95,12 @@ export function createLayerClaims(
|
|
|
112
95
|
...createPrincipleReferences({
|
|
113
96
|
contracts: props,
|
|
114
97
|
layer,
|
|
115
|
-
family: "principles",
|
|
116
98
|
}),
|
|
117
99
|
...createLanguagePrincipleReferences({
|
|
118
100
|
location: props.location,
|
|
119
101
|
layer,
|
|
120
|
-
family: "principles",
|
|
121
102
|
}),
|
|
122
103
|
...(isCanonLayer(layer) ? [] : [createUpstreamReference(props, layer)]),
|
|
123
|
-
...expression,
|
|
124
104
|
...parents("h2"),
|
|
125
105
|
],
|
|
126
106
|
};
|
|
@@ -5,8 +5,8 @@ import path from "node:path";
|
|
|
5
5
|
import type { IProductionConfigProps } from "../../IProductionConfigProps";
|
|
6
6
|
import { createSharedReference } from "../references/createSharedReference";
|
|
7
7
|
import { BODY_ROOT } from "../utilities/BODY_ROOT";
|
|
8
|
-
import { createContractDirectory } from "../utilities/createContractDirectory";
|
|
9
8
|
import { createUnitFiles } from "../utilities/createUnitFiles";
|
|
9
|
+
import { hasStoryContract } from "../utilities/hasStoryContract";
|
|
10
10
|
import { validateSettingsOutline } from "../validateSettingsOutline";
|
|
11
11
|
|
|
12
12
|
/**
|
|
@@ -42,17 +42,8 @@ export function createOutlineClaims(
|
|
|
42
42
|
completeSubmission: boolean = false,
|
|
43
43
|
): IEvidenceClaim[] {
|
|
44
44
|
const outline: string = "settings/outline/index.md";
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
path.join(
|
|
48
|
-
createContractDirectory(props, "shared"),
|
|
49
|
-
"shared",
|
|
50
|
-
family,
|
|
51
|
-
"index.md",
|
|
52
|
-
),
|
|
53
|
-
);
|
|
54
|
-
const principle: boolean = installed("principles");
|
|
55
|
-
if (principle !== installed("obligations"))
|
|
45
|
+
const principle: boolean = hasStoryContract(props, "principles/index.md");
|
|
46
|
+
if (principle !== hasStoryContract(props, "obligations/index.md"))
|
|
56
47
|
throw new Error("Settings outline contracts must be installed as a pair.");
|
|
57
48
|
|
|
58
49
|
if (principle === false) {
|
|
@@ -2,21 +2,16 @@ import type {
|
|
|
2
2
|
IEvidenceClaim,
|
|
3
3
|
IEvidenceMarkdownReference,
|
|
4
4
|
} from "@wrtnlabs/evidence";
|
|
5
|
-
import fs from "node:fs";
|
|
6
|
-
import path from "node:path";
|
|
7
5
|
|
|
8
|
-
import type { IContractLocation } from "../../../internal/IContractLocation";
|
|
9
6
|
import type { AuthoredLayer } from "../../AuthoredLayer";
|
|
10
7
|
import type { IProductionConfigProps } from "../../IProductionConfigProps";
|
|
11
|
-
import type { NarrativeScope } from "../../NarrativeScope";
|
|
12
|
-
import type { ProductionStage } from "../../ProductionStage";
|
|
13
8
|
import { constructionStage } from "../constructionStage";
|
|
14
9
|
import { createLocalContractReference } from "../references/createLocalContractReference";
|
|
15
10
|
import { createSharedReference } from "../references/createSharedReference";
|
|
16
11
|
import { layerFiles } from "../references/layerFiles";
|
|
17
12
|
import { BODY_ROOT } from "../utilities/BODY_ROOT";
|
|
18
|
-
import { createContractDirectory } from "../utilities/createContractDirectory";
|
|
19
13
|
import { createUnitFiles } from "../utilities/createUnitFiles";
|
|
14
|
+
import { hasStoryContract } from "../utilities/hasStoryContract";
|
|
20
15
|
|
|
21
16
|
/**
|
|
22
17
|
* Creates the population obligation claims for a complete layer.
|
|
@@ -28,43 +23,31 @@ import { createUnitFiles } from "../utilities/createUnitFiles";
|
|
|
28
23
|
* repeating a population question on every unit turns one comparison into a
|
|
29
24
|
* restatement per unit.
|
|
30
25
|
*
|
|
31
|
-
*
|
|
32
|
-
* separate expression obligation claims rather than repeating their question per unit.
|
|
26
|
+
* Screenplay expression is answered here alongside the other screenplay duties.
|
|
33
27
|
*
|
|
34
|
-
* @evidence contracts/development/implementation.md#principled-implementation
|
|
35
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure
|
|
36
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts
|
|
37
|
-
* @evidence contracts/development/common.md#meaningful-documentation The prose explains whole-layer respondents, unique evidence and
|
|
38
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms At most four candidates per scope are filtered and mapped, with a bounded number of synchronous existence probes and selector constructions; this factory never scans the manuscript population.
|
|
28
|
+
* @evidence contracts/development/implementation.md#principled-implementation Each enabled layer selects one file respondent per bundled or language population item. Bundled items come from the skills tree and language items from the production contracts.
|
|
29
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One factory selects shared and local obligations by layer, including screenplay expression. Each item has one respondent.
|
|
30
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Common, narrative and final screenplay obligations stay selected when missing so the compiler reports the broken tree. Other layer files and the realized supplement remain optional.
|
|
31
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose explains whole-layer respondents, unique evidence and screenplay coverage; the helper comment identifies optional-file compatibility.
|
|
32
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms At most four candidates per directory and scope are filtered and mapped, with a bounded number of synchronous existence probes and selector constructions; this factory never scans the manuscript population.
|
|
39
33
|
* @evidence contracts/development/implementation.md#reuse-equivalent-work Shared/language selection reuses layerFiles and reference builders; optional installed files are observed per config build, so changes in the contract tree invalidate naturally without a retained cache.
|
|
40
34
|
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Intermediate and returned arrays have a fixed family bound; returned claim/reference objects belong to the config owner and existence probes retain no exposed handles.
|
|
41
35
|
*/
|
|
42
36
|
export function createPopulationObligationClaims(
|
|
43
37
|
props: IProductionConfigProps,
|
|
44
38
|
layer: AuthoredLayer,
|
|
45
|
-
): IEvidenceClaim[] {
|
|
46
|
-
return family(props, layer, constructionStage(props, layer));
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
/** Creates the obligation claims for one layer's shared and language duties. */
|
|
50
|
-
function family(
|
|
51
|
-
props: IProductionConfigProps,
|
|
52
|
-
layer: AuthoredLayer,
|
|
53
|
-
stage: ProductionStage,
|
|
54
39
|
): IEvidenceClaim[] {
|
|
55
40
|
const directory: string = "obligations";
|
|
56
|
-
const disabled: boolean =
|
|
57
|
-
|
|
58
|
-
//
|
|
59
|
-
// selected for the compiler to say so. Only the optional documents are
|
|
60
|
-
// filtered: `realized.md`, which older trees predate, and the layer file,
|
|
61
|
-
// which exists only where that layer owes a duty of its own.
|
|
41
|
+
const disabled: boolean = constructionStage(props, layer) === "disabled";
|
|
42
|
+
|
|
43
|
+
// Older trees can omit supplements and earlier layers' own obligations.
|
|
62
44
|
const optional: (file: string) => boolean = (file: string): boolean =>
|
|
63
|
-
file === "realized.md" ||
|
|
45
|
+
file === "realized.md" ||
|
|
46
|
+
(layer !== "screenplay" && file === `${layer}.md`);
|
|
64
47
|
const shared: IEvidenceClaim[] = layerFiles(layer)
|
|
65
48
|
.filter(
|
|
66
49
|
(file: string): boolean =>
|
|
67
|
-
!optional(file) ||
|
|
50
|
+
!optional(file) || hasStoryContract(props, `${directory}/${file}`),
|
|
68
51
|
)
|
|
69
52
|
.map(
|
|
70
53
|
(file: string): IEvidenceClaim =>
|
|
@@ -105,7 +88,7 @@ function claim(props: {
|
|
|
105
88
|
disabled: boolean;
|
|
106
89
|
layer: AuthoredLayer;
|
|
107
90
|
reference: IEvidenceMarkdownReference;
|
|
108
|
-
scope:
|
|
91
|
+
scope: IProductionConfigProps["narrativeScope"];
|
|
109
92
|
}): IEvidenceClaim {
|
|
110
93
|
return {
|
|
111
94
|
name: `${props.layer} documents answer each ${props.reference.files[0]} item once`,
|
|
@@ -117,18 +100,3 @@ function claim(props: {
|
|
|
117
100
|
reference: { ...props.reference, uniqueEvidence: true },
|
|
118
101
|
};
|
|
119
102
|
}
|
|
120
|
-
|
|
121
|
-
/** Reports whether one optional contract-family document is installed. */
|
|
122
|
-
function exists(
|
|
123
|
-
contracts: IContractLocation,
|
|
124
|
-
scope: "shared" | "language",
|
|
125
|
-
file: string,
|
|
126
|
-
): boolean {
|
|
127
|
-
return fs.existsSync(
|
|
128
|
-
path.join(
|
|
129
|
-
createContractDirectory(contracts, scope),
|
|
130
|
-
scope,
|
|
131
|
-
...file.split("/"),
|
|
132
|
-
),
|
|
133
|
-
);
|
|
134
|
-
}
|
|
@@ -6,7 +6,6 @@ import {
|
|
|
6
6
|
import fs from "node:fs";
|
|
7
7
|
import path from "node:path";
|
|
8
8
|
|
|
9
|
-
import type { IContractLocation } from "../../../internal/IContractLocation";
|
|
10
9
|
import type { AuthoredLayer } from "../../AuthoredLayer";
|
|
11
10
|
import type { IProductionConfigProps } from "../../IProductionConfigProps";
|
|
12
11
|
import { constructionStage } from "../constructionStage";
|
|
@@ -14,8 +13,8 @@ import { createLineageReference } from "../references/createLineageReference";
|
|
|
14
13
|
import { createSharedReference } from "../references/createSharedReference";
|
|
15
14
|
import { BODY_ROOT } from "../utilities/BODY_ROOT";
|
|
16
15
|
import { PACKAGE_DOCS_ROOT } from "../utilities/PACKAGE_DOCS_ROOT";
|
|
17
|
-
import { createContractDirectory } from "../utilities/createContractDirectory";
|
|
18
16
|
import { createUnitFiles } from "../utilities/createUnitFiles";
|
|
17
|
+
import { hasStoryContract } from "../utilities/hasStoryContract";
|
|
19
18
|
|
|
20
19
|
/**
|
|
21
20
|
* Creates the claims that record the evidence-stage reviews in the graph.
|
|
@@ -51,8 +50,8 @@ export function createReviewClaims(
|
|
|
51
50
|
props: IProductionConfigProps,
|
|
52
51
|
layer: AuthoredLayer,
|
|
53
52
|
): IEvidenceClaim[] {
|
|
54
|
-
const principles: boolean =
|
|
55
|
-
const obligations: boolean =
|
|
53
|
+
const principles: boolean = hasStoryContract(props, "principles/review.md");
|
|
54
|
+
const obligations: boolean = hasStoryContract(props, "obligations/review.md");
|
|
56
55
|
if (!principles && !obligations) return [];
|
|
57
56
|
const files: string[] = createUnitFiles(layer, props.narrativeScope);
|
|
58
57
|
const inside: string[] = files.map((file: string): string =>
|
|
@@ -226,24 +225,3 @@ function hasCurrentReview(
|
|
|
226
225
|
}
|
|
227
226
|
return false;
|
|
228
227
|
}
|
|
229
|
-
|
|
230
|
-
/**
|
|
231
|
-
* Reports whether one review-family document is installed.
|
|
232
|
-
*
|
|
233
|
-
* Principled implementation: The shared story tree from createContractDirectory and the requested relative family path identify the installed optional review question document, wherever a workspace keeps the shared tree.
|
|
234
|
-
* Clear and simple design: This private predicate keeps optional-family discovery separate from review host selection and native evaluation.
|
|
235
|
-
* Prohibited implementation shortcuts: Existence only determines whether the optional family is installed; native extraction still owns readable valid contract content and cannot be replaced by this probe.
|
|
236
|
-
* Meaningful documentation: The comment identifies optional review-family document discovery; the caller supplies the two supported relative contract paths.
|
|
237
|
-
* Efficient algorithms: One path assembly and synchronous existence probe cost path-length work and constant-size metadata observation.
|
|
238
|
-
* Reuse equivalent work: Each factory build observes current installation instead of caching a mutable contract path's existence.
|
|
239
|
-
* Bound retention and release resources: The temporary path and synchronous probe retain no cache, open handle or task.
|
|
240
|
-
*/
|
|
241
|
-
function installed(contracts: IContractLocation, file: string): boolean {
|
|
242
|
-
return fs.existsSync(
|
|
243
|
-
path.join(
|
|
244
|
-
createContractDirectory(contracts, "shared"),
|
|
245
|
-
"shared",
|
|
246
|
-
...file.split("/"),
|
|
247
|
-
),
|
|
248
|
-
);
|
|
249
|
-
}
|
|
@@ -8,7 +8,7 @@ import { createSettingReferences } from "../references/createSettingReferences";
|
|
|
8
8
|
import { BODY_ROOT } from "../utilities/BODY_ROOT";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
11
|
+
* Connects treatment H2s to settings, or short screenplay H2s to the brief.
|
|
12
12
|
*
|
|
13
13
|
* Edges stay on the concrete consumers: a narrative H2 cites the canon H2 it
|
|
14
14
|
* depends on, and a canon H2 no selected narrative H2 uses is answered by an
|
|
@@ -3,7 +3,6 @@ import type { IEvidenceClaim } from "@wrtnlabs/evidence";
|
|
|
3
3
|
import type { AuthoredLayer } from "../AuthoredLayer";
|
|
4
4
|
import type { IProductionConfigProps } from "../IProductionConfigProps";
|
|
5
5
|
import { createDiscoveryClaim } from "./claims/createDiscoveryClaim";
|
|
6
|
-
import { createExpressionObligationClaims } from "./claims/createExpressionObligationClaims";
|
|
7
6
|
import { createInstructionCoverageClaim } from "./claims/createInstructionCoverageClaim";
|
|
8
7
|
import { createLayerClaims } from "./claims/createLayerClaims";
|
|
9
8
|
import { createOutlineClaims } from "./claims/createOutlineClaims";
|
|
@@ -30,8 +29,7 @@ export function collectProductionClaims(
|
|
|
30
29
|
): IEvidenceClaim[] {
|
|
31
30
|
assertProductionEvidenceSources(props);
|
|
32
31
|
|
|
33
|
-
//
|
|
34
|
-
// screenplay alone realizes the instructions.
|
|
32
|
+
// The short screenplay realizes the commission using the brief's subject facts.
|
|
35
33
|
const instructions: IEvidenceClaim[] = (
|
|
36
34
|
props.mode === "long"
|
|
37
35
|
? (["settings", "treatments"] as const)
|
|
@@ -54,7 +52,6 @@ export function collectProductionClaims(
|
|
|
54
52
|
.flatMap((layer: AuthoredLayer): IEvidenceClaim[] => [
|
|
55
53
|
...createLayerClaims(props, layer),
|
|
56
54
|
...createPopulationObligationClaims(props, layer),
|
|
57
|
-
...createExpressionObligationClaims(props, layer),
|
|
58
55
|
createDiscoveryClaim(props, layer),
|
|
59
56
|
])
|
|
60
57
|
.filter((claim: IEvidenceClaim): boolean =>
|
|
@@ -8,16 +8,14 @@ import { createLocalContractReference } from "./createLocalContractReference";
|
|
|
8
8
|
import { layerFiles } from "./layerFiles";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Selects the installed language's
|
|
11
|
+
* Selects the installed language's construction principles for one layer.
|
|
12
12
|
*
|
|
13
|
-
*
|
|
14
|
-
* `naturalness/` questions apply to scripts construction, the one layer that
|
|
15
|
-
* selects the expression family.
|
|
13
|
+
* Language-specific screenplay questions follow the same unit scope as the shared ones.
|
|
16
14
|
*
|
|
17
|
-
* @evidence contracts/development/implementation.md#principled-implementation Layer-specific candidate files are selected from the installed language principles
|
|
15
|
+
* @evidence contracts/development/implementation.md#principled-implementation Layer-specific candidate files are selected from the installed language principles, with every present file forming a per-unit H2 checklist and exclusions forbidden.
|
|
18
16
|
* @evidence contracts/development/implementation.md#clear-and-simple-structure Family selection is localized here while local-file admission and contract-relative addresses belong to createLocalContractReference.
|
|
19
17
|
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Missing optional language files are omitted according to the sparse installed module; no default language or synthetic question is substituted.
|
|
20
|
-
* @evidence contracts/development/common.md#meaningful-documentation The prose states per-unit ownership,
|
|
18
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose states per-unit ownership, optional language principles and their respondents.
|
|
21
19
|
* @evidence contracts/development/implementation.md#efficient-algorithms At most four candidate files each require one synchronous existence probe; mapping/filtering and allocated references have a fixed family bound with path-length-dependent string work.
|
|
22
20
|
* @evidence contracts/development/implementation.md#reuse-equivalent-work layerFiles and the local-reference builder centralize equivalent scope/address rules; installation state is observed for each build, not cached across edits.
|
|
23
21
|
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Only the bounded returned references remain with the claim owner; intermediate optional arrays and paths expire after the call with no open handles or tasks.
|
|
@@ -25,14 +23,13 @@ import { layerFiles } from "./layerFiles";
|
|
|
25
23
|
export function createLanguagePrincipleReferences(props: {
|
|
26
24
|
location: string;
|
|
27
25
|
layer: AuthoredLayer;
|
|
28
|
-
family: "principles" | "naturalness";
|
|
29
26
|
}): IEvidenceReference[] {
|
|
30
27
|
return layerFiles(props.layer)
|
|
31
28
|
.map((file: string): IEvidenceMarkdownReference | undefined =>
|
|
32
29
|
createLocalContractReference({
|
|
33
30
|
location: props.location,
|
|
34
31
|
scope: "language",
|
|
35
|
-
file:
|
|
32
|
+
file: `principles/${file}`,
|
|
36
33
|
checklist: true,
|
|
37
34
|
exclusion: false,
|
|
38
35
|
}),
|
|
@@ -2,35 +2,23 @@ import type {
|
|
|
2
2
|
IEvidenceMarkdownReference,
|
|
3
3
|
IEvidenceReference,
|
|
4
4
|
} from "@wrtnlabs/evidence";
|
|
5
|
-
import fs from "node:fs";
|
|
6
|
-
import path from "node:path";
|
|
7
5
|
|
|
8
6
|
import type { IContractLocation } from "../../../internal/IContractLocation";
|
|
9
7
|
import type { AuthoredLayer } from "../../AuthoredLayer";
|
|
10
|
-
import {
|
|
8
|
+
import { hasStoryContract } from "../utilities/hasStoryContract";
|
|
11
9
|
import { createSharedReference } from "./createSharedReference";
|
|
12
10
|
import { layerFiles } from "./layerFiles";
|
|
13
11
|
|
|
14
12
|
/**
|
|
15
13
|
* Creates the principle checklists every unit of one layer answers for itself.
|
|
16
14
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
* unit and stages no turn. A script or screenplay unit additionally answers the
|
|
20
|
-
* realized checklist, whose questions need literal text to be asked of: a
|
|
21
|
-
* treatment fixes which exchange happens, and only a layer that writes the
|
|
22
|
-
* words can be asked whether this speaker could have said them. No item may be
|
|
23
|
-
* excluded, because each binds wherever its condition applies.
|
|
15
|
+
* Each unit answers its layer's principles. Only the screenplay selects an
|
|
16
|
+
* installed realized-text supplement. Every selected H2 answers its items.
|
|
24
17
|
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* @evidence contracts/development/implementation.md#principled-implementation Common, inherited narrative, realized-text and layer-specific files become non-excludable per-unit H2 checklists in the selected principles or expression family; only declared optional family files are filtered by installation, probed in the shared skills tree that createContractDirectory resolves, where createSharedReference also roots the references.
|
|
31
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One layer axis is reused for both families, while family admission remains distinct from language modules and population obligations; the owning tree is decided by createContractDirectory, not rebuilt here.
|
|
32
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Required construction files stay selected when missing so native compilation diagnoses the broken tree; sparse expression files and older realized contracts are the explicit compatibility cases.
|
|
33
|
-
* @evidence contracts/development/common.md#meaningful-documentation The prose explains who can answer each scope, why literal-text questions apply only to realized layers, and which construction selects the expression family.
|
|
18
|
+
* @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.
|
|
19
|
+
* @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.
|
|
20
|
+
* @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.
|
|
21
|
+
* @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.
|
|
34
22
|
* @evidence contracts/development/implementation.md#efficient-algorithms At most four layer-file candidates require a bounded number of optional-file probes and fixed-size reference constructions; no manuscript traversal occurs.
|
|
35
23
|
* @evidence contracts/development/implementation.md#reuse-equivalent-work layerFiles and createSharedReference centralize scope and address semantics; optional-file existence refreshes per configuration build rather than persisting an old contract population.
|
|
36
24
|
* @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.
|
|
@@ -38,31 +26,18 @@ import { layerFiles } from "./layerFiles";
|
|
|
38
26
|
export function createPrincipleReferences(props: {
|
|
39
27
|
contracts: IContractLocation;
|
|
40
28
|
layer: AuthoredLayer;
|
|
41
|
-
family: "principles" | "naturalness";
|
|
42
29
|
}): IEvidenceReference[] {
|
|
43
|
-
const installed: (file: string) => boolean = (file: string): boolean =>
|
|
44
|
-
fs.existsSync(
|
|
45
|
-
path.join(
|
|
46
|
-
createContractDirectory(props.contracts, "shared"),
|
|
47
|
-
"shared",
|
|
48
|
-
props.family,
|
|
49
|
-
file,
|
|
50
|
-
),
|
|
51
|
-
);
|
|
52
|
-
// The construction family ships one document per layer scope, so a missing
|
|
53
|
-
// one is a broken tree rather than an absent option and must still be
|
|
54
|
-
// selected for the compiler to say so. Only the genuinely optional documents
|
|
55
|
-
// are filtered: `realized.md`, which older trees predate, and the whole
|
|
56
|
-
// expression subtree, which is sparse by design.
|
|
57
|
-
const optional: (file: string) => boolean = (file: string): boolean =>
|
|
58
|
-
props.family === "naturalness" || file === "realized.md";
|
|
59
30
|
return layerFiles(props.layer)
|
|
60
|
-
.filter(
|
|
31
|
+
.filter(
|
|
32
|
+
(file: string): boolean =>
|
|
33
|
+
file !== "realized.md" ||
|
|
34
|
+
hasStoryContract(props.contracts, `principles/${file}`),
|
|
35
|
+
)
|
|
61
36
|
.map(
|
|
62
37
|
(file: string): IEvidenceMarkdownReference =>
|
|
63
38
|
createSharedReference({
|
|
64
39
|
contracts: props.contracts,
|
|
65
|
-
file:
|
|
40
|
+
file: `principles/${file}`,
|
|
66
41
|
checklist: true,
|
|
67
42
|
exclusion: false,
|
|
68
43
|
}),
|
|
@@ -7,13 +7,12 @@ import { createContractRoot } from "../utilities/createContractRoot";
|
|
|
7
7
|
* Creates one reference against a shared contract document.
|
|
8
8
|
*
|
|
9
9
|
* Every shared family is the same relation — anchored H2 items of a document
|
|
10
|
-
* in the effective `contracts/story
|
|
10
|
+
* in the effective `contracts/story` tree, answered by the selected H2
|
|
11
11
|
* hosts of one layer — and differs only in two flags, so it is declared once
|
|
12
12
|
* rather than assembled separately. The shared tree is the bundled one, which
|
|
13
13
|
* a workspace keeps at its root and a standalone production under its own
|
|
14
|
-
* `.agents/skills`. A host cites the
|
|
15
|
-
*
|
|
16
|
-
* of the same name.
|
|
14
|
+
* `.agents/skills`. A host cites the file relative to `contracts/story`.
|
|
15
|
+
* Production-owned contracts retain their `work/` or `language/` prefix.
|
|
17
16
|
*
|
|
18
17
|
* `checklist` decides who answers. A checklist is answered by every selected
|
|
19
18
|
* host for itself, so a strong sibling never answers for a weak one. Ordinary
|
|
@@ -42,7 +41,7 @@ export function createSharedReference(props: {
|
|
|
42
41
|
return {
|
|
43
42
|
type: "markdown",
|
|
44
43
|
root: createContractRoot(props.contracts, "shared"),
|
|
45
|
-
files: [
|
|
44
|
+
files: [props.file],
|
|
46
45
|
symbol: "h2",
|
|
47
46
|
...(props.checklist ? { checklist: true } : {}),
|
|
48
47
|
...(props.exclusion ? {} : { noEvidenceExclude: true }),
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AuthoredLayer } from "../../AuthoredLayer";
|
|
2
|
-
import { REALIZED_LAYERS } from "../REALIZED_LAYERS";
|
|
3
2
|
import { isCanonLayer } from "../isCanonLayer";
|
|
4
3
|
|
|
5
4
|
/**
|
|
@@ -7,23 +6,22 @@ import { isCanonLayer } from "../isCanonLayer";
|
|
|
7
6
|
*
|
|
8
7
|
* Placement is decided by who can truthfully answer an item, so the axis is
|
|
9
8
|
* the same wherever it appears: everyone, then the layers that inherit a unit,
|
|
10
|
-
* then the
|
|
11
|
-
*
|
|
12
|
-
* can answer does not depend on which family asks it.
|
|
9
|
+
* then the screenplay for realized text, then the exact layer. Shared and
|
|
10
|
+
* local contracts use the same respondent scope.
|
|
13
11
|
*
|
|
14
12
|
* @evidence contracts/development/implementation.md#principled-implementation The fixed candidate order is common, optional inherited-narrative, optional literal-text and exact layer, matching the respondent populations declared by the four-layer pipeline.
|
|
15
13
|
* @evidence contracts/development/implementation.md#clear-and-simple-structure One shared axis serves discovery/principle/obligation selection without duplicating layer eligibility decisions across families or language scopes.
|
|
16
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Canon layers omit inherited narrative duties and only
|
|
14
|
+
* @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.
|
|
17
15
|
* @evidence contracts/development/common.md#meaningful-documentation The prose explains narrowest-last order and why eligibility depends on the respondent rather than the asking family.
|
|
18
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms
|
|
19
|
-
* @evidence contracts/development/implementation.md#reuse-equivalent-work
|
|
16
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms A fixed number of layer comparisons produces at most four filenames, independent of manuscript length.
|
|
17
|
+
* @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.
|
|
20
18
|
* @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.
|
|
21
19
|
*/
|
|
22
20
|
export function layerFiles(layer: AuthoredLayer): string[] {
|
|
23
21
|
return [
|
|
24
22
|
"common.md",
|
|
25
23
|
...(isCanonLayer(layer) ? [] : ["narratives.md"]),
|
|
26
|
-
...(
|
|
24
|
+
...(layer === "screenplay" ? ["realized.md"] : []),
|
|
27
25
|
`${layer}.md`,
|
|
28
26
|
];
|
|
29
27
|
}
|