@automovie/evidence 0.0.0-stage → 0.0.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/LICENSE +21 -0
- package/README.md +95 -2
- package/lib/IAutoMovieDevelopmentProps.d.ts +38 -0
- package/lib/IAutoMovieDevelopmentProps.js +3 -0
- package/lib/IAutoMovieDevelopmentProps.js.map +1 -0
- package/lib/IAutoMovieEvidenceConfigProps.d.ts +38 -0
- package/lib/IAutoMovieEvidenceConfigProps.js +3 -0
- package/lib/IAutoMovieEvidenceConfigProps.js.map +1 -0
- package/lib/IAutoMovieNarrativeProps.d.ts +24 -0
- package/lib/IAutoMovieNarrativeProps.js +3 -0
- package/lib/IAutoMovieNarrativeProps.js.map +1 -0
- package/lib/createDevelopmentContractClaims.d.ts +38 -0
- package/lib/createDevelopmentContractClaims.js +89 -0
- package/lib/createDevelopmentContractClaims.js.map +1 -0
- package/lib/createEngineeringClaims.d.ts +55 -0
- package/lib/createEngineeringClaims.js +96 -0
- package/lib/createEngineeringClaims.js.map +1 -0
- package/lib/createEvidenceConfig.d.ts +20 -0
- package/lib/createEvidenceConfig.js +68 -0
- package/lib/createEvidenceConfig.js.map +1 -0
- package/lib/createResearchClaims.d.ts +31 -0
- package/lib/createResearchClaims.js +44 -0
- package/lib/createResearchClaims.js.map +1 -0
- package/lib/index.d.ts +8 -0
- package/lib/index.js +25 -0
- package/lib/index.js.map +1 -0
- package/lib/internal/IContractLocation.d.ts +24 -0
- package/lib/internal/IContractLocation.js +3 -0
- package/lib/internal/IContractLocation.js.map +1 -0
- package/lib/internal/PRODUCTION_CONTRACTS.d.ts +19 -0
- package/lib/internal/PRODUCTION_CONTRACTS.js +23 -0
- package/lib/internal/PRODUCTION_CONTRACTS.js.map +1 -0
- package/lib/internal/SKILLS_ROOT.d.ts +19 -0
- package/lib/internal/SKILLS_ROOT.js +23 -0
- package/lib/internal/SKILLS_ROOT.js.map +1 -0
- package/lib/internal/STORY_CONTRACTS.d.ts +16 -0
- package/lib/internal/STORY_CONTRACTS.js +20 -0
- package/lib/internal/STORY_CONTRACTS.js.map +1 -0
- package/lib/internal/assertProductionContractLayout.d.ts +23 -0
- package/lib/internal/assertProductionContractLayout.js +41 -0
- package/lib/internal/assertProductionContractLayout.js.map +1 -0
- package/lib/internal/createReferenceRoot.d.ts +22 -0
- package/lib/internal/createReferenceRoot.js +35 -0
- package/lib/internal/createReferenceRoot.js.map +1 -0
- package/lib/internal/resolveSkillsDirectory.d.ts +22 -0
- package/lib/internal/resolveSkillsDirectory.js +36 -0
- package/lib/internal/resolveSkillsDirectory.js.map +1 -0
- package/lib/narrative/AuthoredLayer.d.ts +13 -0
- package/lib/narrative/AuthoredLayer.js +3 -0
- package/lib/narrative/AuthoredLayer.js.map +1 -0
- package/lib/narrative/AuthoredPass.d.ts +16 -0
- package/lib/narrative/AuthoredPass.js +3 -0
- package/lib/narrative/AuthoredPass.js.map +1 -0
- package/lib/narrative/EvidenceMetadataRewriteOwnership.d.ts +16 -0
- package/lib/narrative/EvidenceMetadataRewriteOwnership.js +3 -0
- package/lib/narrative/EvidenceMetadataRewriteOwnership.js.map +1 -0
- package/lib/narrative/IEvidenceMetadataRenderedSample.d.ts +20 -0
- package/lib/narrative/IEvidenceMetadataRenderedSample.js +3 -0
- package/lib/narrative/IEvidenceMetadataRenderedSample.js.map +1 -0
- package/lib/narrative/IEvidenceMetadataRewriteFile.d.ts +16 -0
- package/lib/narrative/IEvidenceMetadataRewriteFile.js +3 -0
- package/lib/narrative/IEvidenceMetadataRewriteFile.js.map +1 -0
- package/lib/narrative/IEvidenceMetadataRewriteProps.d.ts +28 -0
- package/lib/narrative/IEvidenceMetadataRewriteProps.js +3 -0
- package/lib/narrative/IEvidenceMetadataRewriteProps.js.map +1 -0
- package/lib/narrative/IEvidenceMetadataRewriteReport.d.ts +21 -0
- package/lib/narrative/IEvidenceMetadataRewriteReport.js +3 -0
- package/lib/narrative/IEvidenceMetadataRewriteReport.js.map +1 -0
- package/lib/narrative/IPackageChecklistClaimProps.d.ts +71 -0
- package/lib/narrative/IPackageChecklistClaimProps.js +3 -0
- package/lib/narrative/IPackageChecklistClaimProps.js.map +1 -0
- package/lib/narrative/IPackageContractProps.d.ts +67 -0
- package/lib/narrative/IPackageContractProps.js +3 -0
- package/lib/narrative/IPackageContractProps.js.map +1 -0
- package/lib/narrative/IPackagePopulationContractProps.d.ts +35 -0
- package/lib/narrative/IPackagePopulationContractProps.js +3 -0
- package/lib/narrative/IPackagePopulationContractProps.js.map +1 -0
- package/lib/narrative/IProductionConfigProps.d.ts +59 -0
- package/lib/narrative/IProductionConfigProps.js +3 -0
- package/lib/narrative/IProductionConfigProps.js.map +1 -0
- package/lib/narrative/IProductionConstruction.d.ts +49 -0
- package/lib/narrative/IProductionConstruction.js +3 -0
- package/lib/narrative/IProductionConstruction.js.map +1 -0
- package/lib/narrative/IProductionLayerStages.d.ts +15 -0
- package/lib/narrative/IProductionLayerStages.js +3 -0
- package/lib/narrative/IProductionLayerStages.js.map +1 -0
- package/lib/narrative/NarrativeLayer.d.ts +14 -0
- package/lib/narrative/NarrativeLayer.js +3 -0
- package/lib/narrative/NarrativeLayer.js.map +1 -0
- package/lib/narrative/NarrativeScope.d.ts +24 -0
- package/lib/narrative/NarrativeScope.js +3 -0
- package/lib/narrative/NarrativeScope.js.map +1 -0
- package/lib/narrative/ProductionStage.d.ts +9 -0
- package/lib/narrative/ProductionStage.js +3 -0
- package/lib/narrative/ProductionStage.js.map +1 -0
- package/lib/narrative/createBriefFiles.d.ts +16 -0
- package/lib/narrative/createBriefFiles.js +23 -0
- package/lib/narrative/createBriefFiles.js.map +1 -0
- package/lib/narrative/createNarrativeUnitFiles.d.ts +25 -0
- package/lib/narrative/createNarrativeUnitFiles.js +39 -0
- package/lib/narrative/createNarrativeUnitFiles.js.map +1 -0
- package/lib/narrative/createPackageChecklistClaim.d.ts +22 -0
- package/lib/narrative/createPackageChecklistClaim.js +100 -0
- package/lib/narrative/createPackageChecklistClaim.js.map +1 -0
- package/lib/narrative/createPackageContract.d.ts +18 -0
- package/lib/narrative/createPackageContract.js +40 -0
- package/lib/narrative/createPackageContract.js.map +1 -0
- package/lib/narrative/createPackagePopulationContract.d.ts +19 -0
- package/lib/narrative/createPackagePopulationContract.js +70 -0
- package/lib/narrative/createPackagePopulationContract.js.map +1 -0
- package/lib/narrative/createProductionClaims.d.ts +17 -0
- package/lib/narrative/createProductionClaims.js +22 -0
- package/lib/narrative/createProductionClaims.js.map +1 -0
- package/lib/narrative/createProductionConfig.d.ts +14 -0
- package/lib/narrative/createProductionConfig.js +19 -0
- package/lib/narrative/createProductionConfig.js.map +1 -0
- package/lib/narrative/createSettingsFiles.d.ts +14 -0
- package/lib/narrative/createSettingsFiles.js +25 -0
- package/lib/narrative/createSettingsFiles.js.map +1 -0
- package/lib/narrative/index.d.ts +27 -0
- package/lib/narrative/index.js +44 -0
- package/lib/narrative/index.js.map +1 -0
- package/lib/narrative/internal/AUTHORED_LAYERS.d.ts +13 -0
- package/lib/narrative/internal/AUTHORED_LAYERS.js +22 -0
- package/lib/narrative/internal/AUTHORED_LAYERS.js.map +1 -0
- package/lib/narrative/internal/REALIZED_LAYERS.d.ts +16 -0
- package/lib/narrative/internal/REALIZED_LAYERS.js +19 -0
- package/lib/narrative/internal/REALIZED_LAYERS.js.map +1 -0
- package/lib/narrative/internal/SETTINGS_DOMAINS.d.ts +8 -0
- package/lib/narrative/internal/SETTINGS_DOMAINS.js +20 -0
- package/lib/narrative/internal/SETTINGS_DOMAINS.js.map +1 -0
- package/lib/narrative/internal/claims/createDiscoveryClaim.d.ts +32 -0
- package/lib/narrative/internal/claims/createDiscoveryClaim.js +48 -0
- package/lib/narrative/internal/claims/createDiscoveryClaim.js.map +1 -0
- package/lib/narrative/internal/claims/createExpressionObligationClaims.d.ts +25 -0
- package/lib/narrative/internal/claims/createExpressionObligationClaims.js +100 -0
- package/lib/narrative/internal/claims/createExpressionObligationClaims.js.map +1 -0
- package/lib/narrative/internal/claims/createInstructionCoverageClaim.d.ts +18 -0
- package/lib/narrative/internal/claims/createInstructionCoverageClaim.js +49 -0
- package/lib/narrative/internal/claims/createInstructionCoverageClaim.js.map +1 -0
- package/lib/narrative/internal/claims/createLayerClaims.d.ts +31 -0
- package/lib/narrative/internal/claims/createLayerClaims.js +153 -0
- package/lib/narrative/internal/claims/createLayerClaims.js.map +1 -0
- package/lib/narrative/internal/claims/createOutlineClaims.d.ts +31 -0
- package/lib/narrative/internal/claims/createOutlineClaims.js +127 -0
- package/lib/narrative/internal/claims/createOutlineClaims.js.map +1 -0
- package/lib/narrative/internal/claims/createPopulationObligationClaims.d.ts +25 -0
- package/lib/narrative/internal/claims/createPopulationObligationClaims.js +93 -0
- package/lib/narrative/internal/claims/createPopulationObligationClaims.js.map +1 -0
- package/lib/narrative/internal/claims/createReviewClaims.d.ts +34 -0
- package/lib/narrative/internal/claims/createReviewClaims.js +224 -0
- package/lib/narrative/internal/claims/createReviewClaims.js.map +1 -0
- package/lib/narrative/internal/claims/createSettingCoverageClaim.d.ts +18 -0
- package/lib/narrative/internal/claims/createSettingCoverageClaim.js +40 -0
- package/lib/narrative/internal/claims/createSettingCoverageClaim.js.map +1 -0
- package/lib/narrative/internal/collectProductionClaims.d.ts +14 -0
- package/lib/narrative/internal/collectProductionClaims.js +59 -0
- package/lib/narrative/internal/collectProductionClaims.js.map +1 -0
- package/lib/narrative/internal/constructionStage.d.ts +15 -0
- package/lib/narrative/internal/constructionStage.js +18 -0
- package/lib/narrative/internal/constructionStage.js.map +1 -0
- package/lib/narrative/internal/createGraphConfig.d.ts +23 -0
- package/lib/narrative/internal/createGraphConfig.js +31 -0
- package/lib/narrative/internal/createGraphConfig.js.map +1 -0
- package/lib/narrative/internal/hasNaturalness.d.ts +14 -0
- package/lib/narrative/internal/hasNaturalness.js +19 -0
- package/lib/narrative/internal/hasNaturalness.js.map +1 -0
- package/lib/narrative/internal/isCanonLayer.d.ts +13 -0
- package/lib/narrative/internal/isCanonLayer.js +18 -0
- package/lib/narrative/internal/isCanonLayer.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/ACKNOWLEDGEMENT.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/ACKNOWLEDGEMENT.js +16 -0
- package/lib/narrative/internal/metadataRewrite/ACKNOWLEDGEMENT.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/EvidenceDeclarationKind.d.ts +9 -0
- package/lib/narrative/internal/metadataRewrite/EvidenceDeclarationKind.js +3 -0
- package/lib/narrative/internal/metadataRewrite/EvidenceDeclarationKind.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/HEADING_ACKNOWLEDGEMENT.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/HEADING_ACKNOWLEDGEMENT.js +16 -0
- package/lib/narrative/internal/metadataRewrite/HEADING_ACKNOWLEDGEMENT.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/HEADING_REVIEW.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/HEADING_REVIEW.js +16 -0
- package/lib/narrative/internal/metadataRewrite/HEADING_REVIEW.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/IEvidenceHeading.d.ts +19 -0
- package/lib/narrative/internal/metadataRewrite/IEvidenceHeading.js +3 -0
- package/lib/narrative/internal/metadataRewrite/IEvidenceHeading.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/IEvidenceSection.d.ts +19 -0
- package/lib/narrative/internal/metadataRewrite/IEvidenceSection.js +3 -0
- package/lib/narrative/internal/metadataRewrite/IEvidenceSection.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/IMetadataFragment.d.ts +14 -0
- package/lib/narrative/internal/metadataRewrite/IMetadataFragment.js +3 -0
- package/lib/narrative/internal/metadataRewrite/IMetadataFragment.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/IProjectionSegment.d.ts +16 -0
- package/lib/narrative/internal/metadataRewrite/IProjectionSegment.js +3 -0
- package/lib/narrative/internal/metadataRewrite/IProjectionSegment.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/IProtectedProjection.d.ts +22 -0
- package/lib/narrative/internal/metadataRewrite/IProtectedProjection.js +3 -0
- package/lib/narrative/internal/metadataRewrite/IProtectedProjection.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/REVIEW.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/REVIEW.js +16 -0
- package/lib/narrative/internal/metadataRewrite/REVIEW.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/SUSPICIOUS.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/SUSPICIOUS.js +23 -0
- package/lib/narrative/internal/metadataRewrite/SUSPICIOUS.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/UTF8.d.ts +13 -0
- package/lib/narrative/internal/metadataRewrite/UTF8.js +20 -0
- package/lib/narrative/internal/metadataRewrite/UTF8.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/between.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/between.js +18 -0
- package/lib/narrative/internal/metadataRewrite/between.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/continuation.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/continuation.js +19 -0
- package/lib/narrative/internal/metadataRewrite/continuation.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/declarationKind.d.ts +13 -0
- package/lib/narrative/internal/metadataRewrite/declarationKind.js +26 -0
- package/lib/narrative/internal/metadataRewrite/declarationKind.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/decode.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/decode.js +26 -0
- package/lib/narrative/internal/metadataRewrite/decode.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/directory.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/directory.js +26 -0
- package/lib/narrative/internal/metadataRewrite/directory.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/errorMessage.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/errorMessage.js +18 -0
- package/lib/narrative/internal/metadataRewrite/errorMessage.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/evidenceHeading.d.ts +13 -0
- package/lib/narrative/internal/metadataRewrite/evidenceHeading.js +35 -0
- package/lib/narrative/internal/metadataRewrite/evidenceHeading.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/evidenceSections.d.ts +13 -0
- package/lib/narrative/internal/metadataRewrite/evidenceSections.js +106 -0
- package/lib/narrative/internal/metadataRewrite/evidenceSections.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/findClose.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/findClose.js +21 -0
- package/lib/narrative/internal/metadataRewrite/findClose.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/firstDifference.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/firstDifference.js +22 -0
- package/lib/narrative/internal/metadataRewrite/firstDifference.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/flatFingerprintStart.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/flatFingerprintStart.js +20 -0
- package/lib/narrative/internal/metadataRewrite/flatFingerprintStart.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/invalidUtf8Offset.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/invalidUtf8Offset.js +78 -0
- package/lib/narrative/internal/metadataRewrite/invalidUtf8Offset.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/isDeclaration.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/isDeclaration.js +19 -0
- package/lib/narrative/internal/metadataRewrite/isDeclaration.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/isNodeError.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/isNodeError.js +18 -0
- package/lib/narrative/internal/metadataRewrite/isNodeError.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/lineEnding.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/lineEnding.js +19 -0
- package/lib/narrative/internal/metadataRewrite/lineEnding.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/locate.d.ts +15 -0
- package/lib/narrative/internal/metadataRewrite/locate.js +20 -0
- package/lib/narrative/internal/metadataRewrite/locate.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/markdownFiles.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/markdownFiles.js +33 -0
- package/lib/narrative/internal/metadataRewrite/markdownFiles.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/metadataOwnership.d.ts +13 -0
- package/lib/narrative/internal/metadataRewrite/metadataOwnership.js +23 -0
- package/lib/narrative/internal/metadataRewrite/metadataOwnership.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/normalizeFile.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/normalizeFile.js +33 -0
- package/lib/narrative/internal/metadataRewrite/normalizeFile.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/occurrenceOffsets.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/occurrenceOffsets.js +25 -0
- package/lib/narrative/internal/metadataRewrite/occurrenceOffsets.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/occurrences.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/occurrences.js +19 -0
- package/lib/narrative/internal/metadataRewrite/occurrences.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/originalOffset.d.ts +13 -0
- package/lib/narrative/internal/metadataRewrite/originalOffset.js +24 -0
- package/lib/narrative/internal/metadataRewrite/originalOffset.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/project.d.ts +14 -0
- package/lib/narrative/internal/metadataRewrite/project.js +175 -0
- package/lib/narrative/internal/metadataRewrite/project.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/protectedFileKind.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/protectedFileKind.js +43 -0
- package/lib/narrative/internal/metadataRewrite/protectedFileKind.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/replacementSafety.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/replacementSafety.js +36 -0
- package/lib/narrative/internal/metadataRewrite/replacementSafety.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/sameMetadata.d.ts +13 -0
- package/lib/narrative/internal/metadataRewrite/sameMetadata.js +20 -0
- package/lib/narrative/internal/metadataRewrite/sameMetadata.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/selectFiles.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/selectFiles.js +28 -0
- package/lib/narrative/internal/metadataRewrite/selectFiles.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/singleLineDeclaration.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/singleLineDeclaration.js +22 -0
- package/lib/narrative/internal/metadataRewrite/singleLineDeclaration.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/textLocation.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/textLocation.js +21 -0
- package/lib/narrative/internal/metadataRewrite/textLocation.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/validateRenderedSample.d.ts +17 -0
- package/lib/narrative/internal/metadataRewrite/validateRenderedSample.js +48 -0
- package/lib/narrative/internal/metadataRewrite/validateRenderedSample.js.map +1 -0
- package/lib/narrative/internal/metadataRewrite/withoutEnding.d.ts +12 -0
- package/lib/narrative/internal/metadataRewrite/withoutEnding.js +18 -0
- package/lib/narrative/internal/metadataRewrite/withoutEnding.js.map +1 -0
- package/lib/narrative/internal/productionLayers.d.ts +14 -0
- package/lib/narrative/internal/productionLayers.js +22 -0
- package/lib/narrative/internal/productionLayers.js.map +1 -0
- package/lib/narrative/internal/readSettingsFiles.d.ts +19 -0
- package/lib/narrative/internal/readSettingsFiles.js +101 -0
- package/lib/narrative/internal/readSettingsFiles.js.map +1 -0
- package/lib/narrative/internal/references/createCoverageReference.d.ts +29 -0
- package/lib/narrative/internal/references/createCoverageReference.js +39 -0
- package/lib/narrative/internal/references/createCoverageReference.js.map +1 -0
- package/lib/narrative/internal/references/createDiscoveryReferences.d.ts +26 -0
- package/lib/narrative/internal/references/createDiscoveryReferences.js +44 -0
- package/lib/narrative/internal/references/createDiscoveryReferences.js.map +1 -0
- package/lib/narrative/internal/references/createLanguageDiscoveryReferences.d.ts +13 -0
- package/lib/narrative/internal/references/createLanguageDiscoveryReferences.js +26 -0
- package/lib/narrative/internal/references/createLanguageDiscoveryReferences.js.map +1 -0
- package/lib/narrative/internal/references/createLanguagePrincipleReferences.d.ts +21 -0
- package/lib/narrative/internal/references/createLanguagePrincipleReferences.js +32 -0
- package/lib/narrative/internal/references/createLanguagePrincipleReferences.js.map +1 -0
- package/lib/narrative/internal/references/createLineageReference.d.ts +23 -0
- package/lib/narrative/internal/references/createLineageReference.js +36 -0
- package/lib/narrative/internal/references/createLineageReference.js.map +1 -0
- package/lib/narrative/internal/references/createLocalContractReference.d.ts +24 -0
- package/lib/narrative/internal/references/createLocalContractReference.js +40 -0
- package/lib/narrative/internal/references/createLocalContractReference.js.map +1 -0
- package/lib/narrative/internal/references/createPrincipleReferences.d.ts +31 -0
- package/lib/narrative/internal/references/createPrincipleReferences.js +53 -0
- package/lib/narrative/internal/references/createPrincipleReferences.js.map +1 -0
- package/lib/narrative/internal/references/createSettingReferences.d.ts +15 -0
- package/lib/narrative/internal/references/createSettingReferences.js +36 -0
- package/lib/narrative/internal/references/createSettingReferences.js.map +1 -0
- package/lib/narrative/internal/references/createSharedReference.d.ts +38 -0
- package/lib/narrative/internal/references/createSharedReference.js +45 -0
- package/lib/narrative/internal/references/createSharedReference.js.map +1 -0
- package/lib/narrative/internal/references/createUpstreamReference.d.ts +22 -0
- package/lib/narrative/internal/references/createUpstreamReference.js +31 -0
- package/lib/narrative/internal/references/createUpstreamReference.js.map +1 -0
- package/lib/narrative/internal/references/layerFiles.d.ts +19 -0
- package/lib/narrative/internal/references/layerFiles.js +31 -0
- package/lib/narrative/internal/references/layerFiles.js.map +1 -0
- package/lib/narrative/internal/settingsEntryAnchor.d.ts +12 -0
- package/lib/narrative/internal/settingsEntryAnchor.js +18 -0
- package/lib/narrative/internal/settingsEntryAnchor.js.map +1 -0
- package/lib/narrative/internal/topology/createTopologyFiles.d.ts +14 -0
- package/lib/narrative/internal/topology/createTopologyFiles.js +20 -0
- package/lib/narrative/internal/topology/createTopologyFiles.js.map +1 -0
- package/lib/narrative/internal/utilities/PACKAGE_DOCS_ROOT.d.ts +16 -0
- package/lib/narrative/internal/utilities/PACKAGE_DOCS_ROOT.js +20 -0
- package/lib/narrative/internal/utilities/PACKAGE_DOCS_ROOT.js.map +1 -0
- package/lib/narrative/internal/utilities/assertProductionEvidenceSources.d.ts +13 -0
- package/lib/narrative/internal/utilities/assertProductionEvidenceSources.js +61 -0
- package/lib/narrative/internal/utilities/assertProductionEvidenceSources.js.map +1 -0
- package/lib/narrative/internal/utilities/createContractDirectory.d.ts +24 -0
- package/lib/narrative/internal/utilities/createContractDirectory.js +38 -0
- package/lib/narrative/internal/utilities/createContractDirectory.js.map +1 -0
- package/lib/narrative/internal/utilities/createContractRoot.d.ts +29 -0
- package/lib/narrative/internal/utilities/createContractRoot.js +36 -0
- package/lib/narrative/internal/utilities/createContractRoot.js.map +1 -0
- package/lib/narrative/internal/utilities/createEvidenceFiles.d.ts +12 -0
- package/lib/narrative/internal/utilities/createEvidenceFiles.js +24 -0
- package/lib/narrative/internal/utilities/createEvidenceFiles.js.map +1 -0
- package/lib/narrative/internal/utilities/createUnitFiles.d.ts +21 -0
- package/lib/narrative/internal/utilities/createUnitFiles.js +32 -0
- package/lib/narrative/internal/utilities/createUnitFiles.js.map +1 -0
- package/lib/narrative/internal/utilities/passRoot.d.ts +16 -0
- package/lib/narrative/internal/utilities/passRoot.js +22 -0
- package/lib/narrative/internal/utilities/passRoot.js.map +1 -0
- package/lib/narrative/internal/utilities/referenceLocation.d.ts +28 -0
- package/lib/narrative/internal/utilities/referenceLocation.js +39 -0
- package/lib/narrative/internal/utilities/referenceLocation.js.map +1 -0
- package/lib/narrative/internal/validateSettingsOutline.d.ts +16 -0
- package/lib/narrative/internal/validateSettingsOutline.js +135 -0
- package/lib/narrative/internal/validateSettingsOutline.js.map +1 -0
- package/lib/narrative/isFirstPartPilot.d.ts +13 -0
- package/lib/narrative/isFirstPartPilot.js +18 -0
- package/lib/narrative/isFirstPartPilot.js.map +1 -0
- package/lib/narrative/stripNaturalnessComments.d.ts +12 -0
- package/lib/narrative/stripNaturalnessComments.js +34 -0
- package/lib/narrative/stripNaturalnessComments.js.map +1 -0
- package/lib/narrative/verifyEvidenceMetadataRewrite.d.ts +20 -0
- package/lib/narrative/verifyEvidenceMetadataRewrite.js +115 -0
- package/lib/narrative/verifyEvidenceMetadataRewrite.js.map +1 -0
- package/package.json +49 -3
- package/src/IAutoMovieDevelopmentProps.ts +40 -0
- package/src/IAutoMovieEvidenceConfigProps.ts +45 -0
- package/src/IAutoMovieNarrativeProps.ts +30 -0
- package/src/createDevelopmentContractClaims.ts +113 -0
- package/src/createEngineeringClaims.ts +126 -0
- package/src/createEvidenceConfig.ts +73 -0
- package/src/createResearchClaims.ts +54 -0
- package/src/index.ts +8 -0
- package/src/internal/IContractLocation.ts +25 -0
- package/src/internal/PRODUCTION_CONTRACTS.ts +19 -0
- package/src/internal/SKILLS_ROOT.ts +19 -0
- package/src/internal/STORY_CONTRACTS.ts +16 -0
- package/src/internal/assertProductionContractLayout.ts +50 -0
- package/src/internal/createReferenceRoot.ts +32 -0
- package/src/internal/resolveSkillsDirectory.ts +32 -0
- package/src/narrative/AuthoredLayer.ts +14 -0
- package/src/narrative/AuthoredPass.ts +16 -0
- package/src/narrative/EvidenceMetadataRewriteOwnership.ts +20 -0
- package/src/narrative/IEvidenceMetadataRenderedSample.ts +24 -0
- package/src/narrative/IEvidenceMetadataRewriteFile.ts +18 -0
- package/src/narrative/IEvidenceMetadataRewriteProps.ts +34 -0
- package/src/narrative/IEvidenceMetadataRewriteReport.ts +25 -0
- package/src/narrative/IPackageChecklistClaimProps.ts +80 -0
- package/src/narrative/IPackageContractProps.ts +76 -0
- package/src/narrative/IPackagePopulationContractProps.ts +41 -0
- package/src/narrative/IProductionConfigProps.ts +68 -0
- package/src/narrative/IProductionConstruction.ts +55 -0
- package/src/narrative/IProductionLayerStages.ts +16 -0
- package/src/narrative/NarrativeLayer.ts +14 -0
- package/src/narrative/NarrativeScope.ts +27 -0
- package/src/narrative/ProductionStage.ts +9 -0
- package/src/narrative/createBriefFiles.ts +22 -0
- package/src/narrative/createNarrativeUnitFiles.ts +44 -0
- package/src/narrative/createPackageChecklistClaim.ts +144 -0
- package/src/narrative/createPackageContract.ts +55 -0
- package/src/narrative/createPackagePopulationContract.ts +112 -0
- package/src/narrative/createProductionClaims.ts +24 -0
- package/src/narrative/createProductionConfig.ts +21 -0
- package/src/narrative/createSettingsFiles.ts +24 -0
- package/src/narrative/index.ts +27 -0
- package/src/narrative/internal/AUTHORED_LAYERS.ts +20 -0
- package/src/narrative/internal/REALIZED_LAYERS.ts +18 -0
- package/src/narrative/internal/SETTINGS_DOMAINS.ts +16 -0
- package/src/narrative/internal/claims/createDiscoveryClaim.ts +53 -0
- package/src/narrative/internal/claims/createExpressionObligationClaims.ts +134 -0
- package/src/narrative/internal/claims/createInstructionCoverageClaim.ts +53 -0
- package/src/narrative/internal/claims/createLayerClaims.ts +178 -0
- package/src/narrative/internal/claims/createOutlineClaims.ts +138 -0
- package/src/narrative/internal/claims/createPopulationObligationClaims.ts +134 -0
- package/src/narrative/internal/claims/createReviewClaims.ts +271 -0
- package/src/narrative/internal/claims/createSettingCoverageClaim.ts +48 -0
- package/src/narrative/internal/collectProductionClaims.ts +79 -0
- package/src/narrative/internal/constructionStage.ts +21 -0
- package/src/narrative/internal/createGraphConfig.ts +34 -0
- package/src/narrative/internal/hasNaturalness.ts +17 -0
- package/src/narrative/internal/isCanonLayer.ts +18 -0
- package/src/narrative/internal/metadataRewrite/ACKNOWLEDGEMENT.ts +13 -0
- package/src/narrative/internal/metadataRewrite/EvidenceDeclarationKind.ts +9 -0
- package/src/narrative/internal/metadataRewrite/HEADING_ACKNOWLEDGEMENT.ts +13 -0
- package/src/narrative/internal/metadataRewrite/HEADING_REVIEW.ts +13 -0
- package/src/narrative/internal/metadataRewrite/IEvidenceHeading.ts +23 -0
- package/src/narrative/internal/metadataRewrite/IEvidenceSection.ts +23 -0
- package/src/narrative/internal/metadataRewrite/IMetadataFragment.ts +15 -0
- package/src/narrative/internal/metadataRewrite/IProjectionSegment.ts +18 -0
- package/src/narrative/internal/metadataRewrite/IProtectedProjection.ts +27 -0
- package/src/narrative/internal/metadataRewrite/REVIEW.ts +13 -0
- package/src/narrative/internal/metadataRewrite/SUSPICIOUS.ts +19 -0
- package/src/narrative/internal/metadataRewrite/UTF8.ts +17 -0
- package/src/narrative/internal/metadataRewrite/between.ts +18 -0
- package/src/narrative/internal/metadataRewrite/continuation.ts +16 -0
- package/src/narrative/internal/metadataRewrite/declarationKind.ts +28 -0
- package/src/narrative/internal/metadataRewrite/decode.ts +25 -0
- package/src/narrative/internal/metadataRewrite/directory.ts +22 -0
- package/src/narrative/internal/metadataRewrite/errorMessage.ts +14 -0
- package/src/narrative/internal/metadataRewrite/evidenceHeading.ts +33 -0
- package/src/narrative/internal/metadataRewrite/evidenceSections.ts +112 -0
- package/src/narrative/internal/metadataRewrite/findClose.ts +16 -0
- package/src/narrative/internal/metadataRewrite/firstDifference.ts +17 -0
- package/src/narrative/internal/metadataRewrite/flatFingerprintStart.ts +17 -0
- package/src/narrative/internal/metadataRewrite/invalidUtf8Offset.ts +84 -0
- package/src/narrative/internal/metadataRewrite/isDeclaration.ts +16 -0
- package/src/narrative/internal/metadataRewrite/isNodeError.ts +14 -0
- package/src/narrative/internal/metadataRewrite/lineEnding.ts +16 -0
- package/src/narrative/internal/metadataRewrite/locate.ts +19 -0
- package/src/narrative/internal/metadataRewrite/markdownFiles.ts +31 -0
- package/src/narrative/internal/metadataRewrite/metadataOwnership.ts +27 -0
- package/src/narrative/internal/metadataRewrite/normalizeFile.ts +29 -0
- package/src/narrative/internal/metadataRewrite/occurrenceOffsets.ts +20 -0
- package/src/narrative/internal/metadataRewrite/occurrences.ts +16 -0
- package/src/narrative/internal/metadataRewrite/originalOffset.ts +28 -0
- package/src/narrative/internal/metadataRewrite/project.ts +219 -0
- package/src/narrative/internal/metadataRewrite/protectedFileKind.ts +34 -0
- package/src/narrative/internal/metadataRewrite/replacementSafety.ts +42 -0
- package/src/narrative/internal/metadataRewrite/sameMetadata.ts +26 -0
- package/src/narrative/internal/metadataRewrite/selectFiles.ts +32 -0
- package/src/narrative/internal/metadataRewrite/singleLineDeclaration.ts +18 -0
- package/src/narrative/internal/metadataRewrite/textLocation.ts +21 -0
- package/src/narrative/internal/metadataRewrite/validateRenderedSample.ts +65 -0
- package/src/narrative/internal/metadataRewrite/withoutEnding.ts +14 -0
- package/src/narrative/internal/productionLayers.ts +23 -0
- package/src/narrative/internal/readSettingsFiles.ts +115 -0
- package/src/narrative/internal/references/createCoverageReference.ts +43 -0
- package/src/narrative/internal/references/createDiscoveryReferences.ts +54 -0
- package/src/narrative/internal/references/createLanguageDiscoveryReferences.ts +31 -0
- package/src/narrative/internal/references/createLanguagePrincipleReferences.ts +46 -0
- package/src/narrative/internal/references/createLineageReference.ts +41 -0
- package/src/narrative/internal/references/createLocalContractReference.ts +42 -0
- package/src/narrative/internal/references/createPrincipleReferences.ts +71 -0
- package/src/narrative/internal/references/createSettingReferences.ts +47 -0
- package/src/narrative/internal/references/createSharedReference.ts +50 -0
- package/src/narrative/internal/references/createUpstreamReference.ts +35 -0
- package/src/narrative/internal/references/layerFiles.ts +29 -0
- package/src/narrative/internal/settingsEntryAnchor.ts +14 -0
- package/src/narrative/internal/topology/createTopologyFiles.ts +22 -0
- package/src/narrative/internal/utilities/PACKAGE_DOCS_ROOT.ts +16 -0
- package/src/narrative/internal/utilities/assertProductionEvidenceSources.ts +75 -0
- package/src/narrative/internal/utilities/createContractDirectory.ts +40 -0
- package/src/narrative/internal/utilities/createContractRoot.ts +40 -0
- package/src/narrative/internal/utilities/createEvidenceFiles.ts +23 -0
- package/src/narrative/internal/utilities/createUnitFiles.ts +32 -0
- package/src/narrative/internal/utilities/passRoot.ts +20 -0
- package/src/narrative/internal/utilities/referenceLocation.ts +47 -0
- package/src/narrative/internal/validateSettingsOutline.ts +156 -0
- package/src/narrative/isFirstPartPilot.ts +16 -0
- package/src/narrative/stripNaturalnessComments.ts +31 -0
- package/src/narrative/verifyEvidenceMetadataRewrite.ts +169 -0
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
4
|
+
import { SETTINGS_DOMAINS } from "./SETTINGS_DOMAINS";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Lists canon paths in reading order: the scaffold's domain folders, numbered
|
|
8
|
+
* subject folders, or legacy flat settings retained without rewriting them.
|
|
9
|
+
*
|
|
10
|
+
* The scaffold's layout is `docs/body/settings/<domain>/<subject>.md` with the
|
|
11
|
+
* domains `world`, `cast`, `crowds`, `props`, `sets`, `cinematography` and
|
|
12
|
+
* `sound`, read in that order and alphabetically within a domain. Numbered
|
|
13
|
+
* `NNN-subject/NNN-entry.md` folders read in number order. One settings root
|
|
14
|
+
* uses one layout; `outline` is navigation, not canon.
|
|
15
|
+
*
|
|
16
|
+
* @evidence contracts/development/implementation.md#principled-implementation Concrete directory entries select legacy flat Markdown, the scaffold's closed domain folders or numbered subject folders, forbid mixed/nested/symlinked layouts, enforce unique three-digit order keys for numbered folders and return deterministic relative reading order.
|
|
17
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The filesystem reader owns canon layout validation; callers build outline and evidence relationships from the returned order without rewriting existing files.
|
|
18
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Legacy flat settings and numbered folders stay supported; absent settings return empty, while unknown domains, malformed names, mixed layouts, duplicate order keys and symlinks fail for every production.
|
|
19
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the scaffold domain layout and its reading order, numbered and legacy retention, and that outline is navigation; errors identify mixed layouts, naming, empty folders, nesting and duplicate order numbers.
|
|
20
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms For e root/subject entries, directory enumeration and name validation scan entry text; sorting folders and entries costs O(e log e) comparisons in the worst distribution, with O(e) output/sets and directory arrays. No canon bytes are read.
|
|
21
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Each directory is listed once per call and duplicate-number sets avoid repeated pairwise comparisons; later calls rerun because current settings topology can change.
|
|
22
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Listings and relative file arrays live for one call or in its returned result; synchronous filesystem operations leave no retained handles/tasks and no fixed count bound is imposed.
|
|
23
|
+
*/
|
|
24
|
+
export function readSettingsFiles(root: string): string[] {
|
|
25
|
+
if (!fs.existsSync(root)) return [];
|
|
26
|
+
const files: string[] = [];
|
|
27
|
+
const numbered: string[] = [];
|
|
28
|
+
const domains: string[] = [];
|
|
29
|
+
for (const entry of fs.readdirSync(root, { withFileTypes: true })) {
|
|
30
|
+
if (entry.isFile() && entry.name.endsWith(".md")) files.push(entry.name);
|
|
31
|
+
else if (entry.isDirectory() && entry.name !== "outline") {
|
|
32
|
+
if (SETTINGS_DOMAINS.includes(entry.name)) domains.push(entry.name);
|
|
33
|
+
else if (NUMBERED.test(entry.name)) numbered.push(entry.name);
|
|
34
|
+
else
|
|
35
|
+
throw new Error(
|
|
36
|
+
`${path.join(root, entry.name)}: settings folders are the domains ${SETTINGS_DOMAINS.join(", ")}, or NNN-lower-kebab-case subject folders.`,
|
|
37
|
+
);
|
|
38
|
+
} else if (entry.isSymbolicLink())
|
|
39
|
+
throw new Error(
|
|
40
|
+
`${path.join(root, entry.name)}: settings does not follow symbolic links.`,
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
if (
|
|
44
|
+
[files.length, numbered.length, domains.length].filter(Boolean).length > 1
|
|
45
|
+
)
|
|
46
|
+
throw new Error(
|
|
47
|
+
`${root}: flat, domain and numbered settings layouts cannot be mixed.`,
|
|
48
|
+
);
|
|
49
|
+
|
|
50
|
+
// Domain folders read in the scaffold's domain order, files alphabetically.
|
|
51
|
+
if (domains.length) {
|
|
52
|
+
const classified: string[] = [];
|
|
53
|
+
for (const domain of SETTINGS_DOMAINS.filter((d: string): boolean =>
|
|
54
|
+
domains.includes(d),
|
|
55
|
+
)) {
|
|
56
|
+
const entries: string[] = list(root, domain, KEBAB_FILE);
|
|
57
|
+
for (const entry of entries) classified.push(`${domain}/${entry}`);
|
|
58
|
+
}
|
|
59
|
+
return classified;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
// Numbered folders read in number order, with distinct order keys.
|
|
63
|
+
const keys: Set<string> = new Set<string>();
|
|
64
|
+
const classified: string[] = [];
|
|
65
|
+
for (const folder of numbered.sort(compare)) {
|
|
66
|
+
if (keys.has(folder.slice(0, 3)))
|
|
67
|
+
throw new Error(
|
|
68
|
+
`${root}: settings subject folders must have distinct order numbers.`,
|
|
69
|
+
);
|
|
70
|
+
keys.add(folder.slice(0, 3));
|
|
71
|
+
const used: Set<string> = new Set<string>();
|
|
72
|
+
for (const entry of list(root, folder, NUMBERED_FILE)) {
|
|
73
|
+
if (used.has(entry.slice(0, 3)))
|
|
74
|
+
throw new Error(
|
|
75
|
+
`${path.join(root, folder)}: settings files must have distinct order numbers within their folder.`,
|
|
76
|
+
);
|
|
77
|
+
used.add(entry.slice(0, 3));
|
|
78
|
+
classified.push(`${folder}/${entry}`);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return numbered.length ? classified : files.sort(compare);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
/** A numbered subject folder name. */
|
|
85
|
+
const NUMBERED: RegExp = /^[0-9]{3}-[a-z0-9]+(?:-[a-z0-9]+)*$/u;
|
|
86
|
+
|
|
87
|
+
/** A numbered canon file name. */
|
|
88
|
+
const NUMBERED_FILE: RegExp = /^[0-9]{3}-[a-z0-9]+(?:-[a-z0-9]+)*\.md$/u;
|
|
89
|
+
|
|
90
|
+
/** A lower-kebab-case canon file name. */
|
|
91
|
+
const KEBAB_FILE: RegExp = /^[a-z0-9]+(?:-[a-z0-9]+)*\.md$/u;
|
|
92
|
+
|
|
93
|
+
/** Code-unit order, independent of locale. */
|
|
94
|
+
function compare(left: string, right: string): 1 | -1 | 0 {
|
|
95
|
+
return left < right ? -1 : left > right ? 1 : 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** The sorted Markdown files of one settings folder, refusing nesting, bad names and emptiness. */
|
|
99
|
+
function list(root: string, folder: string, pattern: RegExp): string[] {
|
|
100
|
+
const names: string[] = [];
|
|
101
|
+
for (const entry of fs.readdirSync(path.join(root, folder), {
|
|
102
|
+
withFileTypes: true,
|
|
103
|
+
})) {
|
|
104
|
+
if (!entry.isFile() || !pattern.test(entry.name))
|
|
105
|
+
throw new Error(
|
|
106
|
+
`${path.join(root, folder, entry.name)}: settings folders hold ${pattern === NUMBERED_FILE ? "numbered" : "lower-kebab-case"} Markdown files only, without nesting.`,
|
|
107
|
+
);
|
|
108
|
+
names.push(entry.name);
|
|
109
|
+
}
|
|
110
|
+
if (!names.length)
|
|
111
|
+
throw new Error(
|
|
112
|
+
`${path.join(root, folder)}: an empty settings folder has no canon.`,
|
|
113
|
+
);
|
|
114
|
+
return names.sort(compare);
|
|
115
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { IEvidenceReference } from "@wrtnlabs/evidence";
|
|
2
|
+
|
|
3
|
+
import type { AuthoredPass } from "../../AuthoredPass";
|
|
4
|
+
import { referenceLocation } from "../utilities/referenceLocation";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Creates a reference to the treatment units a partitioned layer realizes.
|
|
8
|
+
*
|
|
9
|
+
* Event units and release units are different axes: one event may run across
|
|
10
|
+
* several episodes, and one episode may braid several events. The relation is
|
|
11
|
+
* therefore many-to-many, and neither direction may be constrained to one.
|
|
12
|
+
*
|
|
13
|
+
* `noEvidenceExclude` keeps every treatment unit cited, so a dropped event
|
|
14
|
+
* fails the build. That is what the bijection was really protecting, and this
|
|
15
|
+
* relation proves it directly: nothing was lost, rather than the structures
|
|
16
|
+
* match.
|
|
17
|
+
*
|
|
18
|
+
* It proves only that. Ordinary coverage cannot require a host to cite
|
|
19
|
+
* anything, and the one per-host count the engine offers is exactly one, which
|
|
20
|
+
* a unit realizing two events would fail. Attribution is therefore a contract
|
|
21
|
+
* duty rather than a cardinality: a unit with no parent cannot answer
|
|
22
|
+
* its selected parent-realization principle truthfully.
|
|
23
|
+
*
|
|
24
|
+
* @evidence contracts/development/implementation.md#principled-implementation Treatment file/H2 references prohibit exclusions but permit many-to-many coverage, matching independent event and release partitions; host attribution remains a semantic contract because native cardinality cannot require an arbitrary positive count.
|
|
25
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure This helper isolates coverage from strict lineage, preventing the one-parent rule from being reused for differently partitioned populations.
|
|
26
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts NoEvidenceExclude enforces retained treatment targets without a fixture-specific bijection; the documented native limitation is not hidden by a fabricated host count.
|
|
27
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose explains partition independence, the exact guarantee and the remaining per-host attribution responsibility.
|
|
28
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms The reference object is fixed size; referenceLocation copies/maps n selected paths for file references and reuses the supplied path array for H2 references, so work is O(n) path text or constant respectively.
|
|
29
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Address formation is shared with lineage references; H2 selectors retain the provided array while file selectors allocate qualified addresses, and no cross-call cache claims mutable selector equivalence.
|
|
30
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned reference is caller-owned and may retain the input selector array; file-qualified strings scale with selector text, with no open handles or persistent registry.
|
|
31
|
+
*/
|
|
32
|
+
export function createCoverageReference(
|
|
33
|
+
files: string[],
|
|
34
|
+
symbol: "file" | "h2",
|
|
35
|
+
pass: AuthoredPass = "draft",
|
|
36
|
+
): IEvidenceReference {
|
|
37
|
+
return {
|
|
38
|
+
type: "markdown",
|
|
39
|
+
...referenceLocation(files, pass, symbol),
|
|
40
|
+
symbol,
|
|
41
|
+
noEvidenceExclude: true,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IEvidenceMarkdownReference,
|
|
3
|
+
IEvidenceReference,
|
|
4
|
+
} from "@wrtnlabs/evidence";
|
|
5
|
+
|
|
6
|
+
import type { IContractLocation } from "../../../internal/IContractLocation";
|
|
7
|
+
import type { AuthoredLayer } from "../../AuthoredLayer";
|
|
8
|
+
import { isCanonLayer } from "../isCanonLayer";
|
|
9
|
+
import { createLanguageDiscoveryReferences } from "./createLanguageDiscoveryReferences";
|
|
10
|
+
import { createSharedReference } from "./createSharedReference";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Creates the open-world discovery duties one layer's population covers.
|
|
14
|
+
*
|
|
15
|
+
* Canon, settings or a short's brief, searches its own directives, promise, and subject, and backcasts the
|
|
16
|
+
* planned narrative to find what those layers would otherwise have to invent.
|
|
17
|
+
* That backcast is how settings anticipates the cross-layer narrative contract,
|
|
18
|
+
* so `discovery/narratives.md` is not selected here: it is the duty each
|
|
19
|
+
* narrative layer answers when it rechecks that contract against what it
|
|
20
|
+
* actually authored.
|
|
21
|
+
*
|
|
22
|
+
* Exclusion is permitted throughout the family. A duty that requires a search
|
|
23
|
+
* must be able to record that the search found nothing, which is what makes
|
|
24
|
+
* requiring it honest.
|
|
25
|
+
*
|
|
26
|
+
* @evidence contracts/development/implementation.md#principled-implementation A fixed shared discovery family selects common and layer duties, adds narrative duties only for inheriting layers, and appends installed language calibration; shared duties resolve in the shared skills tree and language calibration in the production's own `docs/contracts`, each through its own reference root, and discovery permits exclusions for truthful negative searches.
|
|
27
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The relation builder centralizes discovery target selection independently of the work-contract hosts created by createDiscoveryClaim.
|
|
28
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Canon layers omit narrative discovery because their backcast owns anticipation rather than rechecking authored inherited units; this is the declared layer responsibility.
|
|
29
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose explains settings backcast, narrative-layer recheck and why negative search findings remain admissible.
|
|
30
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Two or three shared references and at most one language reference are built; the optional language-file existence probe and fixed-count path operations dominate independent of manuscript size.
|
|
31
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work createSharedReference and the language-discovery selector share address/flag rules; optional language installation is checked each build rather than memoized across changed contract trees.
|
|
32
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The bounded reference array is returned to the claim owner; only temporary path strings are discarded and no filesystem handles or tasks remain retained.
|
|
33
|
+
*/
|
|
34
|
+
export function createDiscoveryReferences(
|
|
35
|
+
contracts: IContractLocation,
|
|
36
|
+
layer: AuthoredLayer,
|
|
37
|
+
): IEvidenceReference[] {
|
|
38
|
+
return [
|
|
39
|
+
...[
|
|
40
|
+
"common.md",
|
|
41
|
+
...(isCanonLayer(layer) ? [] : ["narratives.md"]),
|
|
42
|
+
`${layer}.md`,
|
|
43
|
+
].map(
|
|
44
|
+
(file: string): IEvidenceMarkdownReference =>
|
|
45
|
+
createSharedReference({
|
|
46
|
+
contracts,
|
|
47
|
+
file: `discovery/${file}`,
|
|
48
|
+
checklist: false,
|
|
49
|
+
exclusion: true,
|
|
50
|
+
}),
|
|
51
|
+
),
|
|
52
|
+
...createLanguageDiscoveryReferences(contracts.location),
|
|
53
|
+
];
|
|
54
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IEvidenceMarkdownReference,
|
|
3
|
+
IEvidenceReference,
|
|
4
|
+
} from "@wrtnlabs/evidence";
|
|
5
|
+
|
|
6
|
+
import { createLocalContractReference } from "./createLocalContractReference";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Selects the installed language's active open-world calibration questions.
|
|
10
|
+
*
|
|
11
|
+
* @evidence contracts/development/implementation.md#principled-implementation An installed language discovery/questions.md becomes an ordinary H2 coverage target with truthful exclusions; absence produces an empty reference list.
|
|
12
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The helper gives language calibration its own optional target while delegating local contract-root addressing to one shared builder.
|
|
13
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Optional language selection reflects installed project contracts and does not force a language or fabricate replacement questions.
|
|
14
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment identifies active installed-language calibration questions; the optional local-reference result determines whether any claim target exists.
|
|
15
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One synchronous existence probe and fixed-size object/array construction are independent of manuscript length; path work scales with location text.
|
|
16
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work createLocalContractReference supplies shared local-root and option semantics, and its existence observation refreshes every config build.
|
|
17
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The zero-or-one reference array is caller-owned; there is no persistent language state, open descriptor or background task.
|
|
18
|
+
*/
|
|
19
|
+
export function createLanguageDiscoveryReferences(
|
|
20
|
+
location: string,
|
|
21
|
+
): IEvidenceReference[] {
|
|
22
|
+
const reference: IEvidenceMarkdownReference | undefined =
|
|
23
|
+
createLocalContractReference({
|
|
24
|
+
location,
|
|
25
|
+
scope: "language",
|
|
26
|
+
file: "discovery/questions.md",
|
|
27
|
+
checklist: false,
|
|
28
|
+
exclusion: true,
|
|
29
|
+
});
|
|
30
|
+
return reference === undefined ? [] : [reference];
|
|
31
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IEvidenceMarkdownReference,
|
|
3
|
+
IEvidenceReference,
|
|
4
|
+
} from "@wrtnlabs/evidence";
|
|
5
|
+
|
|
6
|
+
import type { AuthoredLayer } from "../../AuthoredLayer";
|
|
7
|
+
import { createLocalContractReference } from "./createLocalContractReference";
|
|
8
|
+
import { layerFiles } from "./layerFiles";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Selects the installed language's per-unit questions for one gate.
|
|
12
|
+
*
|
|
13
|
+
* Supported language modules place per-unit questions in naturalness, so their
|
|
14
|
+
* construction selection is empty for those modules.
|
|
15
|
+
*
|
|
16
|
+
* @evidence contracts/development/implementation.md#principled-implementation Layer-specific candidate files are selected from the installed language principles or naturalness family, with every present file forming a per-unit H2 checklist and exclusions forbidden.
|
|
17
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Family selection is localized here while local-file admission and contract-relative addresses belong to createLocalContractReference.
|
|
18
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Missing optional language files are omitted according to the sparse installed module; no default language or synthetic question is substituted.
|
|
19
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose states per-unit ownership, gate selection and the supported modules that put their questions in naturalness.
|
|
20
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms At most four candidate files each require one synchronous existence probe; mapping/filtering and allocated references have a fixed family bound with path-length-dependent string work.
|
|
21
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work layerFiles and the local-reference builder centralize equivalent scope/address rules; installation state is observed for each build, not cached across edits.
|
|
22
|
+
* @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.
|
|
23
|
+
*/
|
|
24
|
+
export function createLanguagePrincipleReferences(props: {
|
|
25
|
+
location: string;
|
|
26
|
+
layer: AuthoredLayer;
|
|
27
|
+
gate: "layer" | "naturalness";
|
|
28
|
+
}): IEvidenceReference[] {
|
|
29
|
+
const family: string =
|
|
30
|
+
props.gate === "naturalness" ? "naturalness" : "principles";
|
|
31
|
+
return layerFiles(props.layer)
|
|
32
|
+
.map((file: string): IEvidenceMarkdownReference | undefined =>
|
|
33
|
+
createLocalContractReference({
|
|
34
|
+
location: props.location,
|
|
35
|
+
scope: "language",
|
|
36
|
+
file: `${family}/${file}`,
|
|
37
|
+
checklist: true,
|
|
38
|
+
exclusion: false,
|
|
39
|
+
}),
|
|
40
|
+
)
|
|
41
|
+
.filter(
|
|
42
|
+
(
|
|
43
|
+
reference: IEvidenceMarkdownReference | undefined,
|
|
44
|
+
): reference is IEvidenceMarkdownReference => reference !== undefined,
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { IEvidenceReference } from "@wrtnlabs/evidence";
|
|
2
|
+
|
|
3
|
+
import type { AuthoredPass } from "../../AuthoredPass";
|
|
4
|
+
import { referenceLocation } from "../utilities/referenceLocation";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Creates a reference to one parent story unit on a shared topology.
|
|
8
|
+
*
|
|
9
|
+
* Each child has one parent, each parent has one child, and neither may
|
|
10
|
+
* exclude. This binds screenplay to scripts and the promoted manuscript to its
|
|
11
|
+
* frozen pre-revision snapshot.
|
|
12
|
+
* Use {@link createCoverageReference} for differently partitioned layers.
|
|
13
|
+
*
|
|
14
|
+
* `review` additionally demands a current review of the cited unit. The
|
|
15
|
+
* review binds a review document to the exact unit it read: a change to that
|
|
16
|
+
* unit expires the review, and the graph names the one unit to read again.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/development/implementation.md#principled-implementation UniqueEvidence, singleEvidencePerSymbol and noEvidenceExclude together form a one-to-one non-excludable relation; optional requireReview binds a reviewer to the exact cited unit version through native review semantics.
|
|
19
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The strict-lineage helper stays separate from many-to-many coverage and delegates body/revision/global address rules to referenceLocation.
|
|
20
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Review is an explicit supported relation variant rather than a bypass for stale text, and no expected parent is inferred from a consumer label.
|
|
21
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose states one-parent/one-child ownership, revision lineage and invalidation of a review when its cited unit changes.
|
|
22
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Fixed flag assembly is constant-sized; address qualification costs O(n) selector text for file hosts and retains the original selector array for H2 hosts.
|
|
23
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The same address builder serves lineage and coverage; references are freshly built and optional review metadata applies only to this requested relation, with no cross-analysis cache.
|
|
24
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned object and any qualified selector strings belong to the caller; H2 mode can retain the supplied array, and no handle, task or module-level collection is owned.
|
|
25
|
+
*/
|
|
26
|
+
export function createLineageReference(
|
|
27
|
+
files: string[],
|
|
28
|
+
symbol: "file" | "h2",
|
|
29
|
+
pass: AuthoredPass | "revision" = "draft",
|
|
30
|
+
review: boolean = false,
|
|
31
|
+
): IEvidenceReference {
|
|
32
|
+
return {
|
|
33
|
+
type: "markdown",
|
|
34
|
+
...referenceLocation(files, pass, symbol),
|
|
35
|
+
symbol,
|
|
36
|
+
noEvidenceExclude: true,
|
|
37
|
+
uniqueEvidence: true,
|
|
38
|
+
singleEvidencePerSymbol: true,
|
|
39
|
+
...(review ? { requireReview: true } : {}),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import type { IEvidenceMarkdownReference } from "@wrtnlabs/evidence";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
|
|
5
|
+
import { createContractDirectory } from "../utilities/createContractDirectory";
|
|
6
|
+
import { createContractRoot } from "../utilities/createContractRoot";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Creates a reference only when the production's own contract file exists.
|
|
10
|
+
*
|
|
11
|
+
* Language and work contracts are adopted by the production, so they always
|
|
12
|
+
* resolve under its own `docs/contracts`, even when a workspace keeps the
|
|
13
|
+
* shared contracts elsewhere. The root stops above the family folder, so the
|
|
14
|
+
* family owning the item stays in the citation address a host writes.
|
|
15
|
+
*
|
|
16
|
+
* @evidence contracts/development/implementation.md#principled-implementation One exact production-owned language/work file must exist before an H2 reference is returned; createContractDirectory and createContractRoot place both the probe and the root in the production's `docs/contracts`, and checklist/exclusion flags preserve requested semantics.
|
|
17
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure This builder owns optional local-contract admission and addresses for discovery, principle and obligation consumers; the owning tree is decided by createContractDirectory.
|
|
18
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts File absence returns undefined rather than selecting a substitute from the shared tree or the retired `.agents/skills` location, which assertProductionContractLayout refuses before any factory runs.
|
|
19
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One synchronous existence probe plus a fixed number of path/string operations costs O(p) text work for combined location/scope/file length, with no document-content read.
|
|
20
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work All local contract consumers reuse the same addressing and flags; the existence probe is intentionally repeated per config build so installation edits remain visible.
|
|
21
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The optional returned reference contains one selector; call-local paths expire at return and fs.existsSync leaves no owned open descriptor, task or retained cache.
|
|
22
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose identifies the production's `docs/contracts` as owner, existence as the admission rule, and why the citation address retains its family.
|
|
23
|
+
*/
|
|
24
|
+
export function createLocalContractReference(props: {
|
|
25
|
+
location: string;
|
|
26
|
+
scope: "language" | "work";
|
|
27
|
+
file: string;
|
|
28
|
+
checklist: boolean;
|
|
29
|
+
exclusion: boolean;
|
|
30
|
+
}): IEvidenceMarkdownReference | undefined {
|
|
31
|
+
const directory: string = createContractDirectory(props, props.scope);
|
|
32
|
+
if (!fs.existsSync(path.join(directory, props.scope, props.file)))
|
|
33
|
+
return undefined;
|
|
34
|
+
return {
|
|
35
|
+
type: "markdown",
|
|
36
|
+
root: createContractRoot(props, props.scope),
|
|
37
|
+
files: [`${props.scope}/${props.file}`],
|
|
38
|
+
symbol: "h2",
|
|
39
|
+
...(props.checklist ? { checklist: true } : {}),
|
|
40
|
+
...(props.exclusion ? {} : { noEvidenceExclude: true }),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
IEvidenceMarkdownReference,
|
|
3
|
+
IEvidenceReference,
|
|
4
|
+
} from "@wrtnlabs/evidence";
|
|
5
|
+
import fs from "node:fs";
|
|
6
|
+
import path from "node:path";
|
|
7
|
+
|
|
8
|
+
import type { IContractLocation } from "../../../internal/IContractLocation";
|
|
9
|
+
import type { AuthoredLayer } from "../../AuthoredLayer";
|
|
10
|
+
import { createContractDirectory } from "../utilities/createContractDirectory";
|
|
11
|
+
import { createSharedReference } from "./createSharedReference";
|
|
12
|
+
import { layerFiles } from "./layerFiles";
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Creates the principle checklists every unit of one layer answers for itself.
|
|
16
|
+
*
|
|
17
|
+
* A settings H2 answers the common and settings checklists; a narrative unit
|
|
18
|
+
* also answers the narrative checklist, which settings cannot: it inherits no
|
|
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.
|
|
24
|
+
*
|
|
25
|
+
* The same layer axis runs under `naturalness/`, where the naturalness gate owns
|
|
26
|
+
* the questions a layer can be content-complete while still failing.
|
|
27
|
+
* Both gates ask a unit about its own body; they differ in when.
|
|
28
|
+
*
|
|
29
|
+
* @evidence contracts/development/implementation.md#principled-implementation Common, inherited narrative, realized-text and layer-specific files become non-excludable per-unit H2 checklists in the selected construction/naturalness family; only declared optional family files are filtered by installation, probed in the shared skills tree that createContractDirectory resolves, where createSharedReference also roots the references.
|
|
30
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One layer axis is reused for both gates, while family admission remains distinct from language modules and population obligations; the owning tree is decided by createContractDirectory, not rebuilt here.
|
|
31
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Required construction files stay selected when missing so native compilation diagnoses the broken tree; sparse naturalness files and older realized contracts are the explicit compatibility cases.
|
|
32
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose explains who can answer each scope, why literal-text questions apply only to realized layers, and the two gate timings.
|
|
33
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms At most four layer-file candidates require a bounded number of optional-file probes and fixed-size reference constructions; no manuscript traversal occurs.
|
|
34
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work layerFiles and createSharedReference centralize scope and address semantics; optional-file existence refreshes per configuration build rather than persisting an old contract population.
|
|
35
|
+
* @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.
|
|
36
|
+
*/
|
|
37
|
+
export function createPrincipleReferences(props: {
|
|
38
|
+
contracts: IContractLocation;
|
|
39
|
+
layer: AuthoredLayer;
|
|
40
|
+
gate: "layer" | "naturalness";
|
|
41
|
+
}): IEvidenceReference[] {
|
|
42
|
+
const family: string =
|
|
43
|
+
props.gate === "naturalness" ? "naturalness" : "principles";
|
|
44
|
+
const installed: (file: string) => boolean = (file: string): boolean =>
|
|
45
|
+
fs.existsSync(
|
|
46
|
+
path.join(
|
|
47
|
+
createContractDirectory(props.contracts, "shared"),
|
|
48
|
+
"shared",
|
|
49
|
+
...family.split("/"),
|
|
50
|
+
file,
|
|
51
|
+
),
|
|
52
|
+
);
|
|
53
|
+
// The construction family ships one document per layer scope, so a missing
|
|
54
|
+
// one is a broken tree rather than an absent option and must still be
|
|
55
|
+
// selected for the compiler to say so. Only the genuinely optional documents
|
|
56
|
+
// are filtered: `realized.md`, which older trees predate, and the whole
|
|
57
|
+
// naturalness subtree, which is sparse by design.
|
|
58
|
+
const optional: (file: string) => boolean = (file: string): boolean =>
|
|
59
|
+
props.gate === "naturalness" || file === "realized.md";
|
|
60
|
+
return layerFiles(props.layer)
|
|
61
|
+
.filter((file: string): boolean => !optional(file) || installed(file))
|
|
62
|
+
.map(
|
|
63
|
+
(file: string): IEvidenceMarkdownReference =>
|
|
64
|
+
createSharedReference({
|
|
65
|
+
contracts: props.contracts,
|
|
66
|
+
file: `${family}/${file}`,
|
|
67
|
+
checklist: true,
|
|
68
|
+
exclusion: false,
|
|
69
|
+
}),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { IEvidenceReference } from "@wrtnlabs/evidence";
|
|
2
|
+
import fs from "node:fs";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
|
|
5
|
+
import type { AuthoredPass } from "../../AuthoredPass";
|
|
6
|
+
import { readSettingsFiles } from "../readSettingsFiles";
|
|
7
|
+
import { PACKAGE_DOCS_ROOT } from "../utilities/PACKAGE_DOCS_ROOT";
|
|
8
|
+
import { referenceLocation } from "../utilities/referenceLocation";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Creates one H2 reference per canon file of settings, in any supported layout, or of a short's brief.
|
|
12
|
+
* The outline is not canon and is never an inherited settings dependency.
|
|
13
|
+
*
|
|
14
|
+
* @evidence contracts/development/implementation.md#principled-implementation The promoted body settings or brief directory, chosen by `canon`, is enumerated under readSettingsFiles layout validation, yielding one H2 reference per actual canon file; outline navigation is excluded from canon inheritance.
|
|
15
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Filesystem layout discovery stays in readSettingsFiles while this helper adds layer-qualified native-reference addresses.
|
|
16
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Both flat legacy canon and numbered subject folders are real supported layouts; symbolic or invalid classified entries fail in the shared enumerator rather than being silently substituted.
|
|
17
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose states per-file settings targets, two layouts and the outline exclusion; the default pass uses promoted draft addressing.
|
|
18
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms For e directory entries and f canon files, enumeration and sorting dominate O(e log e) comparisons with O(e + f) path storage; two mapping passes allocate one reference per file without reading document contents.
|
|
19
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The shared enumerator and address builder own reusable layout/address rules, but filesystem enumeration repeats each build because installed canon membership may change.
|
|
20
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned f references belong to the config owner; directory arrays and path lists are transient, and synchronous enumeration leaves no owned descriptor or background task.
|
|
21
|
+
*/
|
|
22
|
+
export function createSettingReferences(
|
|
23
|
+
location: string,
|
|
24
|
+
pass: AuthoredPass = "draft",
|
|
25
|
+
canon: "settings" | "brief" = "settings",
|
|
26
|
+
): IEvidenceReference[] {
|
|
27
|
+
const settingsRoot: string = path.join(
|
|
28
|
+
location,
|
|
29
|
+
PACKAGE_DOCS_ROOT,
|
|
30
|
+
"body",
|
|
31
|
+
canon,
|
|
32
|
+
);
|
|
33
|
+
if (!fs.existsSync(settingsRoot)) return [];
|
|
34
|
+
|
|
35
|
+
return readSettingsFiles(settingsRoot)
|
|
36
|
+
.map((file: string): string => `${canon}/${file}`)
|
|
37
|
+
.map(
|
|
38
|
+
(
|
|
39
|
+
file: string,
|
|
40
|
+
): { symbol: "h2"; root: string; files: string[]; type: "markdown" } =>
|
|
41
|
+
({
|
|
42
|
+
type: "markdown",
|
|
43
|
+
...referenceLocation([file], pass),
|
|
44
|
+
symbol: "h2",
|
|
45
|
+
}) satisfies IEvidenceReference,
|
|
46
|
+
);
|
|
47
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { IEvidenceMarkdownReference } from "@wrtnlabs/evidence";
|
|
2
|
+
|
|
3
|
+
import type { IContractLocation } from "../../../internal/IContractLocation";
|
|
4
|
+
import { createContractRoot } from "../utilities/createContractRoot";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Creates one reference against a shared contract document.
|
|
8
|
+
*
|
|
9
|
+
* Every shared family is the same relation — anchored H2 items of a document
|
|
10
|
+
* in the effective `contracts/story/shared` tree, answered by the selected H2
|
|
11
|
+
* hosts of one layer — and differs only in two flags, so it is declared once
|
|
12
|
+
* rather than assembled separately. The shared tree is the bundled one, which
|
|
13
|
+
* a workspace keeps at its root and a standalone production under its own
|
|
14
|
+
* `.agents/skills`. A host cites the document under the family that owns it,
|
|
15
|
+
* `shared/...`, because the production's `docs/contracts/language` holds files
|
|
16
|
+
* of the same name.
|
|
17
|
+
*
|
|
18
|
+
* `checklist` decides who answers. A checklist is answered by every selected
|
|
19
|
+
* host for itself, so a strong sibling never answers for a weak one. Ordinary
|
|
20
|
+
* coverage is answered by the population between them, which is right for a
|
|
21
|
+
* role distributed among as many owners as the work happens to need.
|
|
22
|
+
*
|
|
23
|
+
* `exclusion` decides whether a truthful negative exists. A duty that requires
|
|
24
|
+
* a search must be able to record that the search found nothing, or every unit
|
|
25
|
+
* would claim a result it never had; a duty that states what every work owes
|
|
26
|
+
* has no such negative, and a host that cannot assert it is defective.
|
|
27
|
+
*
|
|
28
|
+
* @evidence contracts/development/implementation.md#principled-implementation Shared family documents are anchored H2 targets under the shared tree's story root from createContractRoot; checklist selects per-host duty and exclusion determines whether a truthful negative is permitted.
|
|
29
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One builder expresses the shared address and two orthogonal relation flags used throughout the claim factories; the owning tree is decided by createContractRoot rather than here.
|
|
30
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No shared file is conditionally replaced or given a fixture allowance; family-qualified addresses keep equally named language/work documents distinct.
|
|
31
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms A fixed-size object and one selector are constructed with path work proportional to location, skills and file text; no filesystem contents or populations are traversed.
|
|
32
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work createContractRoot is reused for all shared references, while each caller receives an independent relation object so differing checklist/exclusion flags cannot contaminate another claim.
|
|
33
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The function acquires no handle or task; only the returned one-selector object, owned by the caller, outlives the call.
|
|
34
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose explains which tree holds shared documents, address ownership, per-host versus population coverage and the semantic basis for allowing exclusions.
|
|
35
|
+
*/
|
|
36
|
+
export function createSharedReference(props: {
|
|
37
|
+
contracts: IContractLocation;
|
|
38
|
+
file: string;
|
|
39
|
+
checklist: boolean;
|
|
40
|
+
exclusion: boolean;
|
|
41
|
+
}): IEvidenceMarkdownReference {
|
|
42
|
+
return {
|
|
43
|
+
type: "markdown",
|
|
44
|
+
root: createContractRoot(props.contracts, "shared"),
|
|
45
|
+
files: [`shared/${props.file}`],
|
|
46
|
+
symbol: "h2",
|
|
47
|
+
...(props.checklist ? { checklist: true } : {}),
|
|
48
|
+
...(props.exclusion ? {} : { noEvidenceExclude: true }),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import type { IEvidenceReference } from "@wrtnlabs/evidence";
|
|
2
|
+
|
|
3
|
+
import type { IContractLocation } from "../../../internal/IContractLocation";
|
|
4
|
+
import type { NarrativeLayer } from "../../NarrativeLayer";
|
|
5
|
+
import { createSharedReference } from "./createSharedReference";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Creates the upstream-revision duty every unit of one narrative layer answers.
|
|
9
|
+
*
|
|
10
|
+
* Settings has no layer above it and never selects this family. It is a
|
|
11
|
+
* checklist because whether writing this unit exposed an upstream defect is a
|
|
12
|
+
* question about that unit, and ordinary coverage would let one unit answer for
|
|
13
|
+
* every other. Exclusion is permitted, and the pairing is the point: a unit
|
|
14
|
+
* whose parents answered every question it asked records what it tested, while
|
|
15
|
+
* refusing the negative would make every unit claim a repair it never made.
|
|
16
|
+
*
|
|
17
|
+
* @evidence contracts/development/implementation.md#principled-implementation Every narrative unit answers its own upstream-revision checklist, with exclusions permitted when the tested parents need no repair; settings is excluded by the typed narrative-layer input, and the shared upstream document resolves in the shared skills tree through createSharedReference.
|
|
18
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure This helper owns the upstream-family relation and reuses the shared builder for citation addressing and flag assembly.
|
|
19
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The exclusion represents a supported negative search finding rather than excusing an unexamined upstream defect; no consumer or expected answer changes the relation.
|
|
20
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose explains per-unit rather than population ownership, the settings boundary and what a truthful no-repair result means.
|
|
21
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One fixed-size shared reference is constructed; path/string work scales with location, skills and layer text and does not scan manuscript units.
|
|
22
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The shared reference builder centralizes root/checklist/exclusion semantics; fresh result objects prevent a caller from altering another upstream relation.
|
|
23
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned reference belongs to the claim owner with one selector; no filesystem handle, background task or persistent registry is acquired.
|
|
24
|
+
*/
|
|
25
|
+
export function createUpstreamReference(
|
|
26
|
+
contracts: IContractLocation,
|
|
27
|
+
layer: NarrativeLayer,
|
|
28
|
+
): IEvidenceReference {
|
|
29
|
+
return createSharedReference({
|
|
30
|
+
contracts,
|
|
31
|
+
file: `upstream/${layer}.md`,
|
|
32
|
+
checklist: true,
|
|
33
|
+
exclusion: true,
|
|
34
|
+
});
|
|
35
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { AuthoredLayer } from "../../AuthoredLayer";
|
|
2
|
+
import { REALIZED_LAYERS } from "../REALIZED_LAYERS";
|
|
3
|
+
import { isCanonLayer } from "../isCanonLayer";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Names the layer-scoped documents one layer answers, narrowest last.
|
|
7
|
+
*
|
|
8
|
+
* Placement is decided by who can truthfully answer an item, so the axis is
|
|
9
|
+
* the same wherever it appears: everyone, then the layers that inherit a unit,
|
|
10
|
+
* then the layers holding literal text, then one layer. Both gates and both
|
|
11
|
+
* scopes reuse it, because the question of who can answer does not change with
|
|
12
|
+
* when the answer is owed.
|
|
13
|
+
*
|
|
14
|
+
* @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
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One shared axis serves discovery/principle/obligation selection without duplicating layer eligibility decisions across gates or language scopes.
|
|
16
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Canon layers omit inherited narrative duties and only REALIZED_LAYERS receives literal-text duties, both explicit semantic differences of the supported pipeline.
|
|
17
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose explains narrowest-last order and why eligibility depends on the respondent rather than gate timing.
|
|
18
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms At most four filenames and one constant-time Set membership check are produced, giving constant work and space independent of manuscript length.
|
|
19
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work REALIZED_LAYERS is the shared eligibility set, while the returned array is fresh so filtering or mutation by one family cannot alter another family selection.
|
|
20
|
+
* @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
|
+
*/
|
|
22
|
+
export function layerFiles(layer: AuthoredLayer): string[] {
|
|
23
|
+
return [
|
|
24
|
+
"common.md",
|
|
25
|
+
...(isCanonLayer(layer) ? [] : ["narratives.md"]),
|
|
26
|
+
...(REALIZED_LAYERS.has(layer) ? ["realized.md"] : []),
|
|
27
|
+
`${layer}.md`,
|
|
28
|
+
];
|
|
29
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Encodes a relative canon path as a stable outline H3 anchor without losing folder identity.
|
|
3
|
+
*
|
|
4
|
+
* @evidence contracts/development/implementation.md#principled-implementation Removing the terminal Markdown extension and encoding folder separators as double hyphens retains classified path identity in an explicit outline anchor; numbered lower-kebab source paths supply the supported alphabet.
|
|
5
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The encoder isolates file-to-outline identity spelling used by outline creation and validation.
|
|
6
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The separator encoding follows the supported settings layout and does not inspect consumer names or file contents.
|
|
7
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment identifies a stable relative-path-derived H3 anchor and explains why folder identity is kept.
|
|
8
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms The suffix replacement and separator replacement scan the file path with linear string allocation.
|
|
9
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work This scalar encoder coordinates no reusable requests or effectful work.
|
|
10
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Only the returned anchor string escapes; no map, descriptor or task is retained.
|
|
11
|
+
*/
|
|
12
|
+
export function settingsEntryAnchor(file: string): string {
|
|
13
|
+
return file.replace(/\.md$/u, "").replaceAll("/", "--");
|
|
14
|
+
}
|