@automovie/evidence 0.0.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -9
- package/lib/IAutoMovieDevelopmentProps.d.ts +7 -6
- package/lib/IAutoMovieEvidenceConfigProps.d.ts +9 -8
- package/lib/IAutoMovieNarrativeProps.d.ts +0 -3
- package/lib/IAutoMovieNoNarrativeProps.d.ts +16 -0
- package/lib/{narrative/IProductionLayerStages.js → IAutoMovieNoNarrativeProps.js} +1 -1
- package/lib/IAutoMovieNoNarrativeProps.js.map +1 -0
- package/lib/createDevelopmentContractClaims.d.ts +21 -11
- package/lib/createDevelopmentContractClaims.js +30 -13
- package/lib/createDevelopmentContractClaims.js.map +1 -1
- package/lib/createEvidenceConfig.d.ts +3 -3
- package/lib/createEvidenceConfig.js +19 -12
- package/lib/createEvidenceConfig.js.map +1 -1
- package/lib/index.d.ts +7 -7
- package/lib/index.js +1 -7
- package/lib/index.js.map +1 -1
- package/lib/internal/index.d.ts +12 -0
- package/lib/internal/index.js +31 -0
- package/lib/internal/index.js.map +1 -0
- package/lib/internal/resolveSkillsDirectory.d.ts +8 -9
- package/lib/internal/resolveSkillsDirectory.js +9 -12
- package/lib/internal/resolveSkillsDirectory.js.map +1 -1
- package/lib/narrative/IPackageChecklistClaimProps.d.ts +5 -10
- package/lib/narrative/IPackageContractProps.d.ts +0 -8
- package/lib/narrative/IPackagePopulationContractProps.d.ts +1 -9
- package/lib/narrative/IProductionConfigProps.d.ts +1 -10
- package/lib/narrative/createBriefFiles.d.ts +2 -2
- package/lib/narrative/createBriefFiles.js +2 -2
- package/lib/narrative/createNarrativeUnitFiles.d.ts +19 -12
- package/lib/narrative/createNarrativeUnitFiles.js +22 -17
- package/lib/narrative/createNarrativeUnitFiles.js.map +1 -1
- package/lib/narrative/createPackageChecklistClaim.js +5 -10
- package/lib/narrative/createPackageChecklistClaim.js.map +1 -1
- package/lib/narrative/createPackageContract.d.ts +3 -3
- package/lib/narrative/createPackageContract.js +3 -8
- package/lib/narrative/createPackageContract.js.map +1 -1
- package/lib/narrative/createPackagePopulationContract.d.ts +7 -7
- package/lib/narrative/createPackagePopulationContract.js +10 -18
- package/lib/narrative/createPackagePopulationContract.js.map +1 -1
- package/lib/narrative/index.d.ts +11 -14
- package/lib/narrative/index.js +11 -14
- package/lib/narrative/index.js.map +1 -1
- package/lib/narrative/internal/REALIZED_LAYERS.d.ts +1 -1
- package/lib/narrative/internal/REALIZED_LAYERS.js +1 -1
- package/lib/narrative/internal/claims/createDiscoveryClaim.d.ts +11 -3
- package/lib/narrative/internal/claims/createDiscoveryClaim.js +17 -5
- package/lib/narrative/internal/claims/createDiscoveryClaim.js.map +1 -1
- package/lib/narrative/internal/claims/createExpressionObligationClaims.d.ts +9 -8
- package/lib/narrative/internal/claims/createExpressionObligationClaims.js +15 -22
- package/lib/narrative/internal/claims/createExpressionObligationClaims.js.map +1 -1
- package/lib/narrative/internal/claims/createInstructionCoverageClaim.d.ts +6 -4
- package/lib/narrative/internal/claims/createInstructionCoverageClaim.js +7 -5
- package/lib/narrative/internal/claims/createInstructionCoverageClaim.js.map +1 -1
- package/lib/narrative/internal/claims/createLayerClaims.d.ts +9 -9
- package/lib/narrative/internal/claims/createLayerClaims.js +45 -65
- package/lib/narrative/internal/claims/createLayerClaims.js.map +1 -1
- package/lib/narrative/internal/claims/createOutlineClaims.js +8 -8
- package/lib/narrative/internal/claims/createOutlineClaims.js.map +1 -1
- package/lib/narrative/internal/claims/createPopulationObligationClaims.d.ts +3 -3
- package/lib/narrative/internal/claims/createPopulationObligationClaims.js +5 -5
- package/lib/narrative/internal/claims/createPopulationObligationClaims.js.map +1 -1
- package/lib/narrative/internal/claims/createReviewClaims.d.ts +8 -8
- package/lib/narrative/internal/claims/createReviewClaims.js +64 -77
- 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 +6 -7
- package/lib/narrative/internal/claims/createSettingCoverageClaim.js.map +1 -1
- package/lib/narrative/internal/claims/index.d.ts +8 -0
- package/lib/narrative/internal/claims/index.js +25 -0
- package/lib/narrative/internal/claims/index.js.map +1 -0
- package/lib/narrative/internal/collectProductionClaims.js +5 -2
- package/lib/narrative/internal/collectProductionClaims.js.map +1 -1
- package/lib/narrative/internal/index.d.ts +16 -0
- package/lib/narrative/internal/index.js +33 -0
- package/lib/narrative/internal/index.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/index.d.ts +43 -0
- package/lib/narrative/internal/metadataRewrite/index.js +60 -0
- package/lib/narrative/internal/metadataRewrite/index.js.map +1 -0
- package/lib/narrative/internal/references/createCoverageReference.d.ts +1 -2
- package/lib/narrative/internal/references/createCoverageReference.js +2 -2
- package/lib/narrative/internal/references/createCoverageReference.js.map +1 -1
- package/lib/narrative/internal/references/createDiscoveryReferences.d.ts +2 -2
- package/lib/narrative/internal/references/createDiscoveryReferences.js +2 -2
- package/lib/narrative/internal/references/createLanguagePrincipleReferences.d.ts +7 -6
- package/lib/narrative/internal/references/createLanguagePrincipleReferences.js +7 -7
- package/lib/narrative/internal/references/createLanguagePrincipleReferences.js.map +1 -1
- package/lib/narrative/internal/references/createLineageReference.d.ts +7 -8
- package/lib/narrative/internal/references/createLineageReference.js +8 -8
- package/lib/narrative/internal/references/createLineageReference.js.map +1 -1
- package/lib/narrative/internal/references/createPrincipleReferences.d.ts +9 -8
- package/lib/narrative/internal/references/createPrincipleReferences.js +12 -12
- package/lib/narrative/internal/references/createPrincipleReferences.js.map +1 -1
- package/lib/narrative/internal/references/createSettingReferences.d.ts +3 -4
- package/lib/narrative/internal/references/createSettingReferences.js +6 -6
- package/lib/narrative/internal/references/createSettingReferences.js.map +1 -1
- package/lib/narrative/internal/references/index.d.ts +11 -0
- package/lib/narrative/internal/references/index.js +28 -0
- package/lib/narrative/internal/references/index.js.map +1 -0
- package/lib/narrative/internal/references/layerFiles.d.ts +5 -5
- package/lib/narrative/internal/references/layerFiles.js +5 -5
- package/lib/narrative/internal/topology/createTopologyFiles.d.ts +1 -1
- package/lib/narrative/internal/topology/createTopologyFiles.js +1 -1
- package/lib/narrative/internal/topology/index.d.ts +1 -0
- package/lib/narrative/internal/topology/index.js +18 -0
- package/lib/narrative/internal/topology/index.js.map +1 -0
- package/lib/narrative/internal/utilities/BODY_ROOT.d.ts +15 -0
- package/lib/narrative/internal/utilities/BODY_ROOT.js +20 -0
- package/lib/narrative/internal/utilities/BODY_ROOT.js.map +1 -0
- package/lib/narrative/internal/utilities/PACKAGE_DOCS_ROOT.d.ts +6 -6
- package/lib/narrative/internal/utilities/PACKAGE_DOCS_ROOT.js +6 -6
- package/lib/narrative/internal/utilities/assertProductionEvidenceSources.js +6 -19
- package/lib/narrative/internal/utilities/assertProductionEvidenceSources.js.map +1 -1
- package/lib/narrative/internal/utilities/createUnitFiles.d.ts +4 -6
- package/lib/narrative/internal/utilities/createUnitFiles.js +5 -7
- package/lib/narrative/internal/utilities/createUnitFiles.js.map +1 -1
- package/lib/narrative/internal/utilities/index.d.ts +8 -0
- package/lib/narrative/internal/utilities/index.js +25 -0
- package/lib/narrative/internal/utilities/index.js.map +1 -0
- package/lib/narrative/internal/utilities/referenceLocation.d.ts +6 -9
- package/lib/narrative/internal/utilities/referenceLocation.js +9 -14
- package/lib/narrative/internal/utilities/referenceLocation.js.map +1 -1
- package/package.json +8 -4
- package/src/IAutoMovieDevelopmentProps.ts +7 -6
- package/src/IAutoMovieEvidenceConfigProps.ts +9 -8
- package/src/IAutoMovieNarrativeProps.ts +0 -4
- package/src/IAutoMovieNoNarrativeProps.ts +18 -0
- package/src/createDevelopmentContractClaims.ts +38 -14
- package/src/createEvidenceConfig.ts +23 -13
- package/src/index.ts +8 -7
- package/src/internal/index.ts +14 -0
- package/src/internal/resolveSkillsDirectory.ts +9 -12
- package/src/narrative/IPackageChecklistClaimProps.ts +5 -11
- package/src/narrative/IPackageContractProps.ts +0 -9
- package/src/narrative/IPackagePopulationContractProps.ts +1 -10
- package/src/narrative/IProductionConfigProps.ts +1 -11
- package/src/narrative/createBriefFiles.ts +2 -2
- package/src/narrative/createNarrativeUnitFiles.ts +28 -20
- package/src/narrative/createPackageChecklistClaim.ts +5 -10
- package/src/narrative/createPackageContract.ts +3 -15
- package/src/narrative/createPackagePopulationContract.ts +11 -26
- package/src/narrative/index.ts +11 -14
- package/src/narrative/internal/REALIZED_LAYERS.ts +1 -1
- package/src/narrative/internal/claims/createDiscoveryClaim.ts +20 -6
- package/src/narrative/internal/claims/createExpressionObligationClaims.ts +15 -24
- package/src/narrative/internal/claims/createInstructionCoverageClaim.ts +8 -6
- package/src/narrative/internal/claims/createLayerClaims.ts +48 -78
- package/src/narrative/internal/claims/createOutlineClaims.ts +8 -8
- package/src/narrative/internal/claims/createPopulationObligationClaims.ts +5 -5
- package/src/narrative/internal/claims/createReviewClaims.ts +69 -91
- package/src/narrative/internal/claims/createSettingCoverageClaim.ts +5 -7
- package/src/narrative/internal/claims/index.ts +8 -0
- package/src/narrative/internal/collectProductionClaims.ts +7 -5
- package/src/narrative/internal/index.ts +16 -0
- package/src/narrative/internal/metadataRewrite/index.ts +43 -0
- package/src/narrative/internal/references/createCoverageReference.ts +1 -3
- package/src/narrative/internal/references/createDiscoveryReferences.ts +2 -2
- package/src/narrative/internal/references/createLanguagePrincipleReferences.ts +8 -9
- package/src/narrative/internal/references/createLineageReference.ts +7 -9
- package/src/narrative/internal/references/createPrincipleReferences.ts +13 -14
- package/src/narrative/internal/references/createSettingReferences.ts +5 -8
- package/src/narrative/internal/references/index.ts +11 -0
- package/src/narrative/internal/references/layerFiles.ts +5 -5
- package/src/narrative/internal/topology/createTopologyFiles.ts +1 -1
- package/src/narrative/internal/topology/index.ts +1 -0
- package/src/narrative/internal/utilities/BODY_ROOT.ts +17 -0
- package/src/narrative/internal/utilities/PACKAGE_DOCS_ROOT.ts +6 -6
- package/src/narrative/internal/utilities/assertProductionEvidenceSources.ts +6 -25
- package/src/narrative/internal/utilities/createUnitFiles.ts +5 -7
- package/src/narrative/internal/utilities/index.ts +8 -0
- package/src/narrative/internal/utilities/referenceLocation.ts +8 -18
- package/lib/narrative/AuthoredPass.d.ts +0 -16
- package/lib/narrative/AuthoredPass.js +0 -3
- package/lib/narrative/AuthoredPass.js.map +0 -1
- package/lib/narrative/IProductionLayerStages.d.ts +0 -15
- package/lib/narrative/IProductionLayerStages.js.map +0 -1
- package/lib/narrative/internal/hasNaturalness.d.ts +0 -14
- package/lib/narrative/internal/hasNaturalness.js +0 -19
- package/lib/narrative/internal/hasNaturalness.js.map +0 -1
- package/lib/narrative/internal/utilities/passRoot.d.ts +0 -16
- package/lib/narrative/internal/utilities/passRoot.js +0 -22
- package/lib/narrative/internal/utilities/passRoot.js.map +0 -1
- package/lib/narrative/stripNaturalnessComments.d.ts +0 -12
- package/lib/narrative/stripNaturalnessComments.js +0 -34
- package/lib/narrative/stripNaturalnessComments.js.map +0 -1
- package/src/narrative/AuthoredPass.ts +0 -16
- package/src/narrative/IProductionLayerStages.ts +0 -16
- package/src/narrative/internal/hasNaturalness.ts +0 -17
- package/src/narrative/internal/utilities/passRoot.ts +0 -20
- package/src/narrative/stripNaturalnessComments.ts +0 -31
|
@@ -13,29 +13,31 @@ import { SKILLS_ROOT } from "./internal/SKILLS_ROOT";
|
|
|
13
13
|
* Each enabled stage selects the exported declarations of its source folders
|
|
14
14
|
* and requires each to answer every item of
|
|
15
15
|
* `contracts/development/<stage>.md` in its doc comment, read from the skills
|
|
16
|
-
* tree at `
|
|
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
19
|
* interactions and consequences) also cite the research studies they follow,
|
|
20
20
|
* and every study in `docs/research/` apart from its index must be cited, so a
|
|
21
21
|
* behavior cannot be written without its study and no study goes unused.
|
|
22
|
-
* Scenes cite the screenplay
|
|
23
|
-
* and H3 beat must be realized; films cite
|
|
24
|
-
* and every
|
|
25
|
-
*
|
|
26
|
-
*
|
|
22
|
+
* Scenes cite the screenplay scene file, or the sections and beats of it they
|
|
23
|
+
* realize, and every H2 section and H3 beat must be realized; films cite each
|
|
24
|
+
* scene file they order, and every scene file must belong to a film. With
|
|
25
|
+
* `instructions`, the composition and entities must also realize every
|
|
26
|
+
* instruction section, which no narrative layer then cites, with no
|
|
27
|
+
* exclusion. Entities answer their checklist alone, because their settings
|
|
28
|
+
* citations are judged by review rather than required for every settings
|
|
29
|
+
* heading.
|
|
27
30
|
*
|
|
28
|
-
* @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 study-to-behavior, screenplay-to-scene and
|
|
29
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One table maps each population to its stage, folders, symbol kinds and cited population; disabled stages produce no claim, and the
|
|
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 study-to-behavior, screenplay-section-and-beat-to-scene and scene-file-to-film relations mechanical; `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.
|
|
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.
|
|
30
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.
|
|
31
|
-
* @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
|
|
32
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Builds at most
|
|
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.
|
|
35
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Builds at most five fixed-size claim trees in constant time; it performs no discovery or file I/O.
|
|
33
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.
|
|
34
37
|
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller owns the returned claims; nothing is retained.
|
|
35
38
|
*/
|
|
36
39
|
export function createDevelopmentContractClaims(
|
|
37
|
-
props: IAutoMovieDevelopmentProps
|
|
38
|
-
options: {
|
|
40
|
+
props: IAutoMovieDevelopmentProps & {
|
|
39
41
|
/**
|
|
40
42
|
* Reference root of the skills tree holding the stage checklists, relative
|
|
41
43
|
* to the directory of `evidence.config.ts` with `/` separators; `..`
|
|
@@ -44,6 +46,14 @@ export function createDevelopmentContractClaims(
|
|
|
44
46
|
* @default ".agents/skills"
|
|
45
47
|
*/
|
|
46
48
|
skills?: string;
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* Whether, with an enabled composition stage, the composition and entities
|
|
52
|
+
* must also realize every instruction section, as under narrative mode
|
|
53
|
+
* none, where no narrative layer cites them. The caller passes it only when
|
|
54
|
+
* `docs/instructions/` exists, because an empty reference fails the graph.
|
|
55
|
+
*/
|
|
56
|
+
instructions?: boolean;
|
|
47
57
|
} = {},
|
|
48
58
|
): IEvidenceClaim[] {
|
|
49
59
|
const screenplay: string[] = ["docs/body/screenplay/**/*.md"];
|
|
@@ -90,7 +100,7 @@ export function createDevelopmentContractClaims(
|
|
|
90
100
|
cited: { type: "markdown", files: screenplay, symbol: "file" },
|
|
91
101
|
},
|
|
92
102
|
];
|
|
93
|
-
|
|
103
|
+
const claims: IEvidenceClaim[] = populations
|
|
94
104
|
.filter((entry): boolean => props[entry.stage] === "evidence")
|
|
95
105
|
.map(
|
|
96
106
|
(entry): IEvidenceClaim => ({
|
|
@@ -101,7 +111,7 @@ export function createDevelopmentContractClaims(
|
|
|
101
111
|
reference: [
|
|
102
112
|
{
|
|
103
113
|
type: "markdown",
|
|
104
|
-
root:
|
|
114
|
+
root: props.skills ?? SKILLS_ROOT,
|
|
105
115
|
files: [`contracts/development/${entry.stage}.md`],
|
|
106
116
|
symbol: "h2",
|
|
107
117
|
checklist: true,
|
|
@@ -110,4 +120,18 @@ export function createDevelopmentContractClaims(
|
|
|
110
120
|
],
|
|
111
121
|
}),
|
|
112
122
|
);
|
|
123
|
+
if (props.instructions === true && props.composition === "evidence")
|
|
124
|
+
claims.push({
|
|
125
|
+
name: "the code realizes every instruction section",
|
|
126
|
+
type: "typescript",
|
|
127
|
+
files: ["src/composition/**/*.ts", "src/entities/**/*.ts"],
|
|
128
|
+
symbol: ["type", "function"],
|
|
129
|
+
reference: {
|
|
130
|
+
type: "markdown",
|
|
131
|
+
files: ["docs/instructions/*.md"],
|
|
132
|
+
symbol: "h2",
|
|
133
|
+
noEvidenceExclude: true,
|
|
134
|
+
},
|
|
135
|
+
});
|
|
136
|
+
return claims;
|
|
113
137
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { IEvidenceClaim, IEvidenceConfig } from "@wrtnlabs/evidence";
|
|
2
|
+
import fs from "node:fs";
|
|
2
3
|
import path from "node:path";
|
|
3
4
|
|
|
4
5
|
import type { IAutoMovieEvidenceConfigProps } from "./IAutoMovieEvidenceConfigProps";
|
|
@@ -17,12 +18,12 @@ import { createProductionConfig } from "./narrative/createProductionConfig";
|
|
|
17
18
|
* narrative factories, which keep production-owned work and language contracts
|
|
18
19
|
* under `<location>/docs/contracts`, and its root relative to `location` goes to the default
|
|
19
20
|
* engineering, development and research claims. Caller-supplied `claims` are
|
|
20
|
-
*
|
|
21
|
+
* added after the defaults as written, so they name their own root.
|
|
21
22
|
*
|
|
22
23
|
* @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.
|
|
23
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One options object selects engineering alone or delegates narrative claim composition to createProductionConfig; resolveSkillsDirectory and createReferenceRoot own the shared-tree default, validation and spelling.
|
|
24
|
+
* @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.
|
|
24
25
|
* @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.
|
|
25
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms Two legacy-layout existence probes precede work; engineering creation clones supplied claims
|
|
26
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Two legacy-layout existence probes precede work, and mode none adds one instruction-directory probe; engineering creation allocates fixed defaults and clones supplied claims after them; narrative creation additionally discovers current contract files and expands a fixed number of layer families.
|
|
26
27
|
* @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.
|
|
27
28
|
* @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.
|
|
28
29
|
* @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.
|
|
@@ -31,24 +32,37 @@ export function createEvidenceConfig(
|
|
|
31
32
|
props: IAutoMovieEvidenceConfigProps,
|
|
32
33
|
): IEvidenceConfig {
|
|
33
34
|
if (!path.isAbsolute(props.location))
|
|
34
|
-
throw new Error(
|
|
35
|
+
throw new Error(
|
|
36
|
+
"Evidence location must be an absolute project directory, such as import.meta.dirname.",
|
|
37
|
+
);
|
|
35
38
|
assertProductionContractLayout(props.location);
|
|
36
39
|
const skills: string = resolveSkillsDirectory(props);
|
|
37
40
|
const root: string = createReferenceRoot(props.location, skills);
|
|
38
41
|
|
|
39
|
-
const claims: IEvidenceClaim[] =
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
const claims: IEvidenceClaim[] = [
|
|
43
|
+
...createEngineeringClaims({ skills: root }),
|
|
44
|
+
...structuredClone(props.claims ?? []),
|
|
45
|
+
];
|
|
43
46
|
claims.push(
|
|
44
|
-
...createDevelopmentContractClaims(
|
|
47
|
+
...createDevelopmentContractClaims({
|
|
48
|
+
...props.development,
|
|
45
49
|
skills: root,
|
|
50
|
+
instructions:
|
|
51
|
+
props.narrative?.mode === "none" &&
|
|
52
|
+
fs.existsSync(path.join(props.location, "docs", "instructions")),
|
|
46
53
|
}),
|
|
47
54
|
);
|
|
48
55
|
if (props.research === "evidence")
|
|
49
56
|
claims.push(...createResearchClaims({ skills: root }));
|
|
50
57
|
if (props.narrative === undefined) return { severity: "error", claims };
|
|
51
58
|
|
|
59
|
+
// Mode none adds only the caller's narrative claims; there is no layer to build.
|
|
60
|
+
if (props.narrative.mode === "none")
|
|
61
|
+
return {
|
|
62
|
+
severity: "error",
|
|
63
|
+
claims: [...claims, ...structuredClone(props.narrative.claims ?? [])],
|
|
64
|
+
};
|
|
65
|
+
|
|
52
66
|
return createProductionConfig({
|
|
53
67
|
location: props.location,
|
|
54
68
|
skills,
|
|
@@ -63,10 +77,6 @@ export function createEvidenceConfig(
|
|
|
63
77
|
screenplay: "disabled",
|
|
64
78
|
...structuredClone(props.narrative.construction ?? {}),
|
|
65
79
|
},
|
|
66
|
-
naturalness: {
|
|
67
|
-
screenplay: "disabled",
|
|
68
|
-
...structuredClone(props.narrative.naturalness ?? {}),
|
|
69
|
-
},
|
|
70
80
|
supportClaims: claims,
|
|
71
81
|
claims: structuredClone(props.narrative.claims ?? []),
|
|
72
82
|
});
|
package/src/index.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
export * from "./IAutoMovieNarrativeProps";
|
|
3
|
-
export * from "./IAutoMovieDevelopmentProps";
|
|
1
|
+
// The one entry a production needs: `createEvidenceConfig` and the types of its props.
|
|
4
2
|
export * from "./createEvidenceConfig";
|
|
5
|
-
export * from "./
|
|
6
|
-
export * from "./
|
|
7
|
-
export * from "./
|
|
8
|
-
export * from "./
|
|
3
|
+
export type * from "./IAutoMovieDevelopmentProps";
|
|
4
|
+
export type * from "./IAutoMovieEvidenceConfigProps";
|
|
5
|
+
export type * from "./IAutoMovieNarrativeProps";
|
|
6
|
+
export type * from "./IAutoMovieNoNarrativeProps";
|
|
7
|
+
export type * from "./narrative/IProductionConstruction";
|
|
8
|
+
export type * from "./narrative/NarrativeScope";
|
|
9
|
+
export type * from "./narrative/ProductionStage";
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Internal API for this repository's tests and tools; productions import only
|
|
2
|
+
// the package root's `createEvidenceConfig`, and nothing here is stable.
|
|
3
|
+
export * from "./IContractLocation";
|
|
4
|
+
export * from "./PRODUCTION_CONTRACTS";
|
|
5
|
+
export * from "./SKILLS_ROOT";
|
|
6
|
+
export * from "./STORY_CONTRACTS";
|
|
7
|
+
export * from "./assertProductionContractLayout";
|
|
8
|
+
export * from "./createReferenceRoot";
|
|
9
|
+
export * from "./resolveSkillsDirectory";
|
|
10
|
+
export * from "../createDevelopmentContractClaims";
|
|
11
|
+
export * from "../createEngineeringClaims";
|
|
12
|
+
export * from "../createResearchClaims";
|
|
13
|
+
export * from "../narrative";
|
|
14
|
+
export * from "../narrative/internal";
|
|
@@ -7,26 +7,23 @@ import { SKILLS_ROOT } from "./SKILLS_ROOT";
|
|
|
7
7
|
* Resolves the absolute shared skills tree holding the bundled contracts.
|
|
8
8
|
*
|
|
9
9
|
* An omitted `skills` is the standalone layout, the production's own
|
|
10
|
-
* `.agents/skills`. A
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* `.agents/skills`. A relative one resolves against `location`, never against
|
|
11
|
+
* the working directory, so a workspace production can write
|
|
12
|
+
* `"../../../.agents/skills"` and get the same tree from any process.
|
|
13
13
|
*
|
|
14
14
|
* @param contracts The production location and optional shared tree; read, not retained.
|
|
15
15
|
* @returns The absolute shared skills directory.
|
|
16
|
-
* @throws Error when a supplied `skills` is not absolute.
|
|
17
16
|
*
|
|
18
|
-
* @evidence contracts/development/implementation.md#principled-implementation Node's `path.
|
|
19
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure One function owns both the default and the
|
|
20
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A relative value is
|
|
21
|
-
* @evidence contracts/development/implementation.md#efficient-algorithms One
|
|
17
|
+
* @evidence contracts/development/implementation.md#principled-implementation Node's `path.resolve` anchors a relative value at the absolute production location, and `path.join` builds the default from the scaffold's `.agents/skills` layout.
|
|
18
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One function owns both the default and the resolution rule, so the configuration entry, the narrative assertion and every shared contract lookup agree on the shared tree.
|
|
19
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A relative value is resolved against the production, never the working directory; no workspace layout is inferred from the filesystem.
|
|
20
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One path resolution or join, linear in the path length.
|
|
22
21
|
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure path computation coordinates no work across requests.
|
|
23
22
|
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Only the returned string outlives the call.
|
|
24
|
-
* @evidence contracts/development/common.md#meaningful-documentation States the standalone default,
|
|
23
|
+
* @evidence contracts/development/common.md#meaningful-documentation States the standalone default, how a relative value resolves, and the parameter and result.
|
|
25
24
|
*/
|
|
26
25
|
export function resolveSkillsDirectory(contracts: IContractLocation): string {
|
|
27
26
|
if (contracts.skills === undefined)
|
|
28
27
|
return path.join(contracts.location, ...SKILLS_ROOT.split("/"));
|
|
29
|
-
|
|
30
|
-
throw new Error("Evidence skills must be an absolute directory.");
|
|
31
|
-
return contracts.skills;
|
|
28
|
+
return path.resolve(contracts.location, contracts.skills);
|
|
32
29
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import type { EvidenceMarkdownSymbol } from "@wrtnlabs/evidence";
|
|
2
2
|
|
|
3
|
-
import type { AuthoredPass } from "./AuthoredPass";
|
|
4
3
|
import type { ProductionStage } from "./ProductionStage";
|
|
5
4
|
|
|
6
5
|
/**
|
|
@@ -11,10 +10,10 @@ import type { ProductionStage } from "./ProductionStage";
|
|
|
11
10
|
* its selected hosts answer item by item, and the wiring is the same every
|
|
12
11
|
* time — only the document, the hosts, and when the claim is off differ.
|
|
13
12
|
*
|
|
14
|
-
* @evidence contracts/development/design.md#principled-representation The object groups work-contract paths, addressed inside the production's `docs/contracts`, host selectors, explicit symbol granularity and activation flags for createPackageChecklistClaim;
|
|
13
|
+
* @evidence contracts/development/design.md#principled-representation The object groups work-contract paths, addressed inside the production's `docs/contracts`, host selectors, explicit symbol granularity and activation flags for createPackageChecklistClaim; the checklist default is documented on its member.
|
|
15
14
|
* @evidence contracts/development/design.md#minimal-and-owned-surface One object owns document selection, host granularity and activation so createPackageChecklistClaim validates the relationship together.
|
|
16
15
|
* @evidence contracts/development/design.md#prohibited-design-shortcuts Exact work paths and symbol validity are enforced by createPackageChecklistClaim rather than hidden type-level assumptions.
|
|
17
|
-
* @evidence contracts/development/common.md#meaningful-documentation Members explain document-relative addressing, required host granularity,
|
|
16
|
+
* @evidence contracts/development/common.md#meaningful-documentation Members explain document-relative addressing, body-relative hosts, required host granularity, the checklist default and optional deferral.
|
|
18
17
|
*/
|
|
19
18
|
export interface IPackageChecklistClaimProps {
|
|
20
19
|
/** Names the claim in diagnostics. State what the hosts must reach. */
|
|
@@ -30,17 +29,12 @@ export interface IPackageChecklistClaimProps {
|
|
|
30
29
|
*/
|
|
31
30
|
document: string | string[];
|
|
32
31
|
|
|
33
|
-
/** Selects the host files this checklist binds, relative to the selected pass root. */
|
|
34
|
-
files: string[];
|
|
35
|
-
|
|
36
32
|
/**
|
|
37
|
-
* Selects
|
|
38
|
-
* `final` for naturalness. Construction hosts body with detached evidence; naturalness
|
|
39
|
-
* hosts its working text with inline evidence.
|
|
33
|
+
* Selects the host files this checklist binds, relative to `docs/body`.
|
|
40
34
|
*
|
|
41
|
-
*
|
|
35
|
+
* The hosts answer in detached construction evidence.
|
|
42
36
|
*/
|
|
43
|
-
|
|
37
|
+
files: string[];
|
|
44
38
|
|
|
45
39
|
/** Sets the stage of the layer that owns the hosts. */
|
|
46
40
|
stage: ProductionStage;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { EvidenceMarkdownSymbol } from "@wrtnlabs/evidence";
|
|
2
2
|
|
|
3
3
|
import type { AuthoredLayer } from "./AuthoredLayer";
|
|
4
|
-
import type { AuthoredPass } from "./AuthoredPass";
|
|
5
4
|
import type { NarrativeScope } from "./NarrativeScope";
|
|
6
5
|
import type { ProductionStage } from "./ProductionStage";
|
|
7
6
|
|
|
@@ -30,14 +29,6 @@ export interface IPackageContractProps {
|
|
|
30
29
|
*/
|
|
31
30
|
layers: Partial<Record<AuthoredLayer, ProductionStage>>;
|
|
32
31
|
|
|
33
|
-
/**
|
|
34
|
-
* Selects which logical pass answers the rule. `draft` is construction,
|
|
35
|
-
* `final` is naturalness and hosts the working text; construction hosts body.
|
|
36
|
-
*
|
|
37
|
-
* @default "draft"
|
|
38
|
-
*/
|
|
39
|
-
pass?: AuthoredPass;
|
|
40
|
-
|
|
41
32
|
/** Selects the complete work or one pilot slice, for the narrative globs. */
|
|
42
33
|
narrativeScope: NarrativeScope;
|
|
43
34
|
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import type { AuthoredLayer } from "./AuthoredLayer";
|
|
2
|
-
import type { AuthoredPass } from "./AuthoredPass";
|
|
3
2
|
import type { NarrativeScope } from "./NarrativeScope";
|
|
4
3
|
import type { ProductionStage } from "./ProductionStage";
|
|
5
4
|
|
|
@@ -9,7 +8,7 @@ import type { ProductionStage } from "./ProductionStage";
|
|
|
9
8
|
* @evidence contracts/development/design.md#principled-representation The object represents one exact work obligation document and its owning populations, with pilot-only deferral separate from pass activation.
|
|
10
9
|
* @evidence contracts/development/design.md#minimal-and-owned-surface One duty document and layer-stage map express once-per-layer obligations separately from per-H2 checklists.
|
|
11
10
|
* @evidence contracts/development/design.md#prohibited-design-shortcuts createPackagePopulationContract enforces exact obligation paths and pilot-only deferral; the interface adds no bypass.
|
|
12
|
-
* @evidence contracts/development/common.md#meaningful-documentation Members state tracked obligation addressing, complete-population ownership
|
|
11
|
+
* @evidence contracts/development/common.md#meaningful-documentation Members state tracked obligation addressing, complete-population ownership and pilot-only deferral.
|
|
13
12
|
*/
|
|
14
13
|
export interface IPackagePopulationContractProps {
|
|
15
14
|
/** One tracked work-contract document containing population H2 duties. */
|
|
@@ -18,14 +17,6 @@ export interface IPackagePopulationContractProps {
|
|
|
18
17
|
/** Layers whose complete populations answer the document. */
|
|
19
18
|
layers: Partial<Record<AuthoredLayer, ProductionStage>>;
|
|
20
19
|
|
|
21
|
-
/**
|
|
22
|
-
* Selects which logical pass answers: `draft` for construction,
|
|
23
|
-
* `final` for naturalness. Construction selects body; naturalness selects the working text.
|
|
24
|
-
*
|
|
25
|
-
* @default "draft"
|
|
26
|
-
*/
|
|
27
|
-
pass?: AuthoredPass;
|
|
28
|
-
|
|
29
20
|
/**
|
|
30
21
|
* Selects the exact narrative population whose documents answer the duty.
|
|
31
22
|
*
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import type { IEvidenceClaim } from "@wrtnlabs/evidence";
|
|
2
2
|
|
|
3
3
|
import type { IProductionConstruction } from "./IProductionConstruction";
|
|
4
|
-
import type { IProductionLayerStages } from "./IProductionLayerStages";
|
|
5
4
|
import type { NarrativeScope } from "./NarrativeScope";
|
|
6
5
|
|
|
7
6
|
/**
|
|
8
7
|
* Selects narrative claim families, their stages and additional native claims.
|
|
9
8
|
*
|
|
10
|
-
* @evidence contracts/development/design.md#principled-representation The route, absolute location, optional absolute shared skills tree, authored scope and
|
|
9
|
+
* @evidence contracts/development/design.md#principled-representation The route, absolute location, optional absolute shared skills tree, authored scope and construction stages select native narrative respondents; extra claims and engineering support remain ordinary native claims.
|
|
11
10
|
* @evidence contracts/development/design.md#minimal-and-owned-surface One configuration object groups the options needed by the shared claim collector.
|
|
12
11
|
* @evidence contracts/development/design.md#prohibited-design-shortcuts Stages select structural evidence and never certify creative completion; native Evidence evaluates the resulting graph.
|
|
13
12
|
* @evidence contracts/development/common.md#meaningful-documentation Members explain route, location, the shared skills tree and its default, scope, stages and additive claims; the production owns independent creative review.
|
|
@@ -50,15 +49,6 @@ export interface IProductionConfigProps {
|
|
|
50
49
|
*/
|
|
51
50
|
construction: IProductionConstruction;
|
|
52
51
|
|
|
53
|
-
/**
|
|
54
|
-
* Sets the screenplay naturalness stage.
|
|
55
|
-
*
|
|
56
|
-
* Revision opens after screenplay construction approval. Scripts answer their
|
|
57
|
-
* expression questions inside construction; settings and treatments also
|
|
58
|
-
* finish within construction.
|
|
59
|
-
*/
|
|
60
|
-
naturalness: IProductionLayerStages;
|
|
61
|
-
|
|
62
52
|
/**
|
|
63
53
|
* Adds claims used only by this production.
|
|
64
54
|
*
|
|
@@ -4,8 +4,8 @@ import { SETTINGS_DOMAINS } from "./internal/SETTINGS_DOMAINS";
|
|
|
4
4
|
* Selects a short's brief canon: the scaffold's domain folders under `docs/body/brief`.
|
|
5
5
|
*
|
|
6
6
|
* The brief keeps the settings domain layout, `brief/<domain>/<subject>.md`,
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* so the same reader, which refuses mixed layouts, and the same citations
|
|
8
|
+
* serve both canon layers.
|
|
9
9
|
*
|
|
10
10
|
* @evidence contracts/development/implementation.md#principled-implementation One glob per scaffold domain admits the brief's canon, sharing SETTINGS_DOMAINS with the settings selector and reader so the layouts cannot drift; no top-level glob is admitted because the reader refuses a mixed layout.
|
|
11
11
|
* @evidence contracts/development/implementation.md#clear-and-simple-structure The selector only describes the brief population; the shared reader owns concrete ordering and layout checks.
|
|
@@ -6,27 +6,33 @@ import type { NarrativeScope } from "./NarrativeScope";
|
|
|
6
6
|
*
|
|
7
7
|
* `treatments` is flat and carries no release partition, so its population is
|
|
8
8
|
* every numbered event file it holds — during a pilot the layer contains only
|
|
9
|
-
* the pilot's events, so the same selector serves both modes. `scripts`
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
*
|
|
9
|
+
* the pilot's events, so the same selector serves both modes. `scripts` holds
|
|
10
|
+
* one file per episode in its part folders, `NNN-part/NNN-episode.md`.
|
|
11
|
+
* `screenplay` holds one file per scene in a film folder: a short's
|
|
12
|
+
* `<film>/NNN-scene.md`, or long work's `NNN-part/NNN-episode/NNN-scene.md`,
|
|
13
|
+
* whose episode folder takes the place of the script's episode file. A pilot
|
|
14
|
+
* narrows scripts and screenplay to the one part it authors. The layer's
|
|
15
|
+
* topology selector still reaches every other file under it, so the H2s of a
|
|
16
|
+
* misplaced scene file owe their answers instead of silently losing them.
|
|
14
17
|
*
|
|
15
|
-
* The selector is relative to the
|
|
16
|
-
* same relative file identity under `docs/revision`.
|
|
18
|
+
* The selector is relative to the body root.
|
|
17
19
|
*
|
|
18
|
-
* @evidence contracts/development/implementation.md#principled-implementation Layer-specific globs
|
|
19
|
-
* @evidence contracts/development/implementation.md#clear-and-simple-structure The selector owns only relative narrative population paths; callers
|
|
20
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts
|
|
21
|
-
* @evidence contracts/development/common.md#meaningful-documentation The prose states layer partition
|
|
20
|
+
* @evidence contracts/development/implementation.md#principled-implementation Layer-specific globs select flat numbered treatments, episode files of scripts, and screenplay scene files in a short's film folder or long work's episode folders, narrowing scripts and screenplay to an exact first part for a pilot.
|
|
21
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The selector owns only relative narrative population paths; callers add the body root.
|
|
22
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Short film folders and numbered long partitions are supported production layouts; no file or production name controls selection, and first-part pilots remain confined to their exact directory.
|
|
23
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose states each layer's partition, the scene-file screenplay layout, pilot behavior and root relativity.
|
|
22
24
|
* @evidence contracts/development/implementation.md#efficient-algorithms Complete-work returns one or two fixed-size globs; pilot validation and interpolation take time and output space proportional to the selected part string length.
|
|
23
25
|
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work This selector builds one result from supplied values and coordinates no cross-request work; independent arrays avoid shared mutable selector state.
|
|
24
26
|
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Only the returned small selector array survives the call; no descriptor, task or module cache is acquired.
|
|
25
27
|
*/
|
|
26
|
-
export function createNarrativeUnitFiles(
|
|
27
|
-
layer
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
export function createNarrativeUnitFiles(props: {
|
|
29
|
+
/** The narrative layer whose unit files are selected. */
|
|
30
|
+
layer: NarrativeLayer;
|
|
31
|
+
|
|
32
|
+
/** The complete work, or the exact first part a pilot authors. */
|
|
33
|
+
scope: NarrativeScope;
|
|
34
|
+
}): string[] {
|
|
35
|
+
const { layer, scope } = props;
|
|
30
36
|
if (
|
|
31
37
|
scope.mode !== "complete-work" &&
|
|
32
38
|
(scope.mode !== "first-part-pilot" ||
|
|
@@ -36,9 +42,11 @@ export function createNarrativeUnitFiles(
|
|
|
36
42
|
"A first-part pilot requires one exact 001-lower-kebab-case part directory.",
|
|
37
43
|
);
|
|
38
44
|
if (layer === "treatments") return [`${layer}/???-*.md`];
|
|
39
|
-
if (
|
|
40
|
-
return
|
|
41
|
-
? [`${layer}
|
|
42
|
-
: [`${layer}/*/???-*.md`];
|
|
43
|
-
return
|
|
45
|
+
if (layer === "screenplay")
|
|
46
|
+
return scope.mode === "complete-work"
|
|
47
|
+
? [`${layer}/*/???-*.md`, `${layer}/*/*/???-*.md`]
|
|
48
|
+
: [`${layer}/${scope.part}/*/???-*.md`];
|
|
49
|
+
return scope.mode === "complete-work"
|
|
50
|
+
? [`${layer}/*/???-*.md`]
|
|
51
|
+
: [`${layer}/${scope.part}/???-*.md`];
|
|
44
52
|
}
|
|
@@ -5,8 +5,8 @@ import type {
|
|
|
5
5
|
|
|
6
6
|
import { PRODUCTION_CONTRACTS } from "../internal/PRODUCTION_CONTRACTS";
|
|
7
7
|
import type { IPackageChecklistClaimProps } from "./IPackageChecklistClaimProps";
|
|
8
|
+
import { BODY_ROOT } from "./internal/utilities/BODY_ROOT";
|
|
8
9
|
import { createEvidenceFiles } from "./internal/utilities/createEvidenceFiles";
|
|
9
|
-
import { passRoot } from "./internal/utilities/passRoot";
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Creates one work-local contract claim.
|
|
@@ -81,14 +81,10 @@ export function createPackageChecklistClaim(
|
|
|
81
81
|
return {
|
|
82
82
|
name: props.name,
|
|
83
83
|
type: "markdown",
|
|
84
|
-
root:
|
|
84
|
+
root: BODY_ROOT,
|
|
85
85
|
files: props.files,
|
|
86
86
|
symbol: props.symbol,
|
|
87
|
-
|
|
88
|
-
? {}
|
|
89
|
-
: {
|
|
90
|
-
evidenceFiles: createEvidenceFiles(symbols[0], props.files),
|
|
91
|
-
}),
|
|
87
|
+
evidenceFiles: createEvidenceFiles(symbols[0], props.files),
|
|
92
88
|
disabled: props.stage === "disabled" || props.inapplicable === true,
|
|
93
89
|
reference: canonicalDocuments.map(
|
|
94
90
|
(
|
|
@@ -116,9 +112,8 @@ export function createPackageChecklistClaim(
|
|
|
116
112
|
* Keeps the package API on the tracked work-owned contract subtree.
|
|
117
113
|
*
|
|
118
114
|
* `naturalness` is admitted for the same reason the shared and language trees
|
|
119
|
-
* carry one: a work's own
|
|
120
|
-
* answers.
|
|
121
|
-
* select `pass: "draft"` and scripts construction explicitly. The document
|
|
115
|
+
* carry one: a work's own expression questions, which scripts construction
|
|
116
|
+
* answers. The caller selects the hosts and their stage; the document
|
|
122
117
|
* directory alone never chooses its host population.
|
|
123
118
|
*/
|
|
124
119
|
function isWorkDocument(document: string): boolean {
|
|
@@ -4,7 +4,6 @@ import type { AuthoredLayer } from "./AuthoredLayer";
|
|
|
4
4
|
import type { IPackageContractProps } from "./IPackageContractProps";
|
|
5
5
|
import type { ProductionStage } from "./ProductionStage";
|
|
6
6
|
import { createPackageChecklistClaim } from "./createPackageChecklistClaim";
|
|
7
|
-
import { hasNaturalness } from "./internal/hasNaturalness";
|
|
8
7
|
import { createUnitFiles } from "./internal/utilities/createUnitFiles";
|
|
9
8
|
|
|
10
9
|
/**
|
|
@@ -14,10 +13,10 @@ import { createUnitFiles } from "./internal/utilities/createUnitFiles";
|
|
|
14
13
|
* out is the same claim four times with only the layer's name, stage, and file
|
|
15
14
|
* glob changing. State the layers instead, and the wiring follows from them.
|
|
16
15
|
*
|
|
17
|
-
* @evidence contracts/development/implementation.md#principled-implementation Each declared layer stage becomes one checklist claim with that layer's exact narrative selector
|
|
16
|
+
* @evidence contracts/development/implementation.md#principled-implementation Each declared layer stage becomes one checklist claim with that layer's exact narrative selector, after an empty layer map is rejected.
|
|
18
17
|
* @evidence contracts/development/implementation.md#clear-and-simple-structure The wrapper keeps adopted rule identity and layer ownership together, delegating exact document/host checks to createPackageChecklistClaim.
|
|
19
|
-
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts
|
|
20
|
-
* @evidence contracts/development/common.md#meaningful-documentation The prose states that one adopted contract expands to its owning layers; props document
|
|
18
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Every authored layer is admitted on the same terms; no special claim name or fixture changes validation.
|
|
19
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose states that one adopted contract expands to its owning layers; props document granularity, activation and pilot scope.
|
|
21
20
|
* @evidence contracts/development/implementation.md#efficient-algorithms For l owning layers, d document-path characters and f selector output, expansion costs O(l*(d+f)) through delegated validation; l is at most the supported authored layer set for typed callers.
|
|
22
21
|
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each layer needs a distinct claim and diagnostic name; equivalent shared document paths are inputs, not cached effectful results, and no cross-request coordinator is created.
|
|
23
22
|
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The result owns l claim objects and their delegated arrays; local layer entries are discarded on completion or failure, with no handles or running tasks.
|
|
@@ -28,16 +27,6 @@ export function createPackageContract(
|
|
|
28
27
|
const layers: [string, ProductionStage][] = Object.entries(props.layers);
|
|
29
28
|
if (layers.length === 0)
|
|
30
29
|
throw new Error("A package contract requires at least one owning layer.");
|
|
31
|
-
if (
|
|
32
|
-
props.pass === "final" &&
|
|
33
|
-
layers.some(
|
|
34
|
-
([layer]: [string, ProductionStage]): boolean =>
|
|
35
|
-
!hasNaturalness(layer as AuthoredLayer),
|
|
36
|
-
)
|
|
37
|
-
)
|
|
38
|
-
throw new Error(
|
|
39
|
-
"Only screenplay has a naturalness pass; adopt scripts contracts in construction.",
|
|
40
|
-
);
|
|
41
30
|
|
|
42
31
|
return layers.map(
|
|
43
32
|
([layer, stage]: [string, ProductionStage]): IEvidenceClaim =>
|
|
@@ -46,7 +35,6 @@ export function createPackageContract(
|
|
|
46
35
|
document: props.document,
|
|
47
36
|
files: createUnitFiles(layer as AuthoredLayer, props.narrativeScope),
|
|
48
37
|
stage,
|
|
49
|
-
pass: props.pass,
|
|
50
38
|
symbol: props.symbol,
|
|
51
39
|
checklist: props.checklist,
|
|
52
40
|
inapplicable: props.inapplicable,
|