@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,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.referenceLocation = referenceLocation;
|
|
4
|
+
const PACKAGE_DOCS_ROOT_1 = require("./PACKAGE_DOCS_ROOT");
|
|
5
|
+
/**
|
|
6
|
+
* Gives reference targets an explicit address in the graph's global space.
|
|
7
|
+
*
|
|
8
|
+
* Upstream references select the promoted manuscript for either pass. This is
|
|
9
|
+
* distinct from a naturalness claim's working host; revision references select
|
|
10
|
+
* its frozen pre-revision snapshot.
|
|
11
|
+
*
|
|
12
|
+
* File references use package-relative addresses. A claim that selects file
|
|
13
|
+
* hosts and a claim that selects section hosts read the same documents, and the
|
|
14
|
+
* engine offers every annotation in a claim's files to every reference of that
|
|
15
|
+
* claim. A file address that is also an ancestor address of a section reference
|
|
16
|
+
* would reach that reference as an aggregate target and be refused for lacking
|
|
17
|
+
* a section host. A distinct address space keeps each annotation with the
|
|
18
|
+
* reference it answers.
|
|
19
|
+
*
|
|
20
|
+
* @evidence contracts/development/implementation.md#principled-implementation Upstream draft/final references always target promoted body bytes, revision references target frozen bytes, and file references use package-global addresses distinct from H2-root addresses to avoid aggregate-target collisions.
|
|
21
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Address qualification is centralized for coverage, lineage and settings references, keeping native binder address-space rules out of their semantic flag builders.
|
|
22
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The file/H2 address distinction follows native aggregate binding semantics; no citation is rewritten to match an expected answer or silently redirected to a working edition.
|
|
23
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose explains promoted versus working ownership, frozen revision targets and why file references need a separate global address space.
|
|
24
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms File mode maps n selectors and their total text length p into qualified paths in O(n + p) work/storage; H2 mode constructs only its root and reuses the supplied files array.
|
|
25
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Coverage and lineage share this address rule, and H2 mode reuses the input selector array; there is no cache that could incorrectly equate mutable files arrays or different passes.
|
|
26
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller owns the returned root/files record; file mode owns n new strings while H2 mode retains the caller array reference, with no filesystem handle or running task.
|
|
27
|
+
*/
|
|
28
|
+
function referenceLocation(files, pass, symbol = "h2") {
|
|
29
|
+
if (symbol === "file")
|
|
30
|
+
return {
|
|
31
|
+
root: ".",
|
|
32
|
+
files: files.map((file) => `${PACKAGE_DOCS_ROOT_1.PACKAGE_DOCS_ROOT}/${pass === "revision" ? "revision" : "body"}/${file}`),
|
|
33
|
+
};
|
|
34
|
+
return {
|
|
35
|
+
root: `${PACKAGE_DOCS_ROOT_1.PACKAGE_DOCS_ROOT}/${pass === "revision" ? "revision" : "body"}`,
|
|
36
|
+
files,
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=referenceLocation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"referenceLocation.js","sourceRoot":"","sources":["../../../../src/narrative/internal/utilities/referenceLocation.ts"],"names":[],"mappings":";;;AACA,2DAAwD;AAExD;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,2BACE,KAAe,EACf,IAA+B,EAC/B,MAAM,GAAkB,IAAI;IAK5B,IAAI,MAAM,KAAK,MAAM;QACnB,OAAO;YACL,IAAI,EAAE,GAAG;YACT,KAAK,EAAE,KAAK,CAAC,GAAG,CACd,CAAC,IAAY,EAAU,EAAE,CACvB,GAAG,qCAAiB,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,IAAI,IAAI,EAAE,CAC9E;SACF,CAAC;IACJ,OAAO;QACL,IAAI,EAAE,GAAG,qCAAiB,IAAI,IAAI,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,EAAE;QACzE,KAAK;KACN,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Checks that the outline describes the classified canon, in domain or numbered folders, in its actual order.
|
|
3
|
+
*
|
|
4
|
+
* Entry anchors encode the relative file path and entry labels equal the H1. This checks
|
|
5
|
+
* the authored layout, not evidence rows: the graph owns citation cardinality
|
|
6
|
+
* and the semantic reviewer owns whether grouping and explanations work.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/development/implementation.md#principled-implementation The outline's structural headings are matched sequentially against numbered canon paths and each file's single H1; path-encoded anchors and exact titles enforce one ordered entry per canon file without judging semantic grouping.
|
|
9
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The validator owns settings index topology, leaving citation cardinality to the graph and grouping quality to independent review.
|
|
10
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Empty outline parts, missing/extra/reordered entries and title/anchor differences fail directly; comments and fenced examples are inert structural material for every input.
|
|
11
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose states path-derived anchors, H1 label equality, actual order and boundaries between topology, graph evidence and semantic review.
|
|
12
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Canon enumeration sorts entries, then the outline and each referenced file are read/parsed once; cost grows with entry sorting and total Markdown characters. Arrays retain parsed headings and paths, and the active document bytes are bounded by each read rather than an external fixed cap.
|
|
13
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The ordered canon list is reused for all outline entries, while each matched file is read once; no cross-call cache is safe because canon bytes and topology are mutable.
|
|
14
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources All strings, heading arrays and path collections are local and released on completion/failure; synchronous readFileSync calls own no retained descriptor or asynchronous task.
|
|
15
|
+
*/
|
|
16
|
+
export declare function validateSettingsOutline(location: string): void;
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.validateSettingsOutline = validateSettingsOutline;
|
|
7
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
8
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
9
|
+
const readSettingsFiles_1 = require("./readSettingsFiles");
|
|
10
|
+
const settingsEntryAnchor_1 = require("./settingsEntryAnchor");
|
|
11
|
+
/**
|
|
12
|
+
* Checks that the outline describes the classified canon, in domain or numbered folders, in its actual order.
|
|
13
|
+
*
|
|
14
|
+
* Entry anchors encode the relative file path and entry labels equal the H1. This checks
|
|
15
|
+
* the authored layout, not evidence rows: the graph owns citation cardinality
|
|
16
|
+
* and the semantic reviewer owns whether grouping and explanations work.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/development/implementation.md#principled-implementation The outline's structural headings are matched sequentially against numbered canon paths and each file's single H1; path-encoded anchors and exact titles enforce one ordered entry per canon file without judging semantic grouping.
|
|
19
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The validator owns settings index topology, leaving citation cardinality to the graph and grouping quality to independent review.
|
|
20
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Empty outline parts, missing/extra/reordered entries and title/anchor differences fail directly; comments and fenced examples are inert structural material for every input.
|
|
21
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose states path-derived anchors, H1 label equality, actual order and boundaries between topology, graph evidence and semantic review.
|
|
22
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Canon enumeration sorts entries, then the outline and each referenced file are read/parsed once; cost grows with entry sorting and total Markdown characters. Arrays retain parsed headings and paths, and the active document bytes are bounded by each read rather than an external fixed cap.
|
|
23
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The ordered canon list is reused for all outline entries, while each matched file is read once; no cross-call cache is safe because canon bytes and topology are mutable.
|
|
24
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources All strings, heading arrays and path collections are local and released on completion/failure; synchronous readFileSync calls own no retained descriptor or asynchronous task.
|
|
25
|
+
*/
|
|
26
|
+
function validateSettingsOutline(location) {
|
|
27
|
+
const root = node_path_1.default.join(location, "docs/body/settings");
|
|
28
|
+
const target = node_path_1.default.join(root, "outline/index.md");
|
|
29
|
+
if (!node_fs_1.default.existsSync(target))
|
|
30
|
+
throw new Error(`${target}: settings outline is required.`);
|
|
31
|
+
// Classified canon (domain or numbered folders) needs outline entries; legacy flat files do not.
|
|
32
|
+
const files = (0, readSettingsFiles_1.readSettingsFiles)(root).filter((file) => file.includes("/") ||
|
|
33
|
+
/^[0-9]{3}-[a-z0-9]+(?:-[a-z0-9]+)*\.md$/u.test(file));
|
|
34
|
+
const outline = headings(node_fs_1.default.readFileSync(target, "utf8"));
|
|
35
|
+
if (outline[0]?.[1] !== "#" ||
|
|
36
|
+
outline.filter((item) => item[1] === "#")
|
|
37
|
+
.length !== 1)
|
|
38
|
+
throw new Error(`${target}: the outline must start with one H1.`);
|
|
39
|
+
let part = false;
|
|
40
|
+
let entries = 0;
|
|
41
|
+
let cursor = 0;
|
|
42
|
+
for (const heading of outline.slice(1)) {
|
|
43
|
+
if (heading[1] === "##") {
|
|
44
|
+
if (part && entries === 0)
|
|
45
|
+
throw new Error(`${target}: an outline part is empty.`);
|
|
46
|
+
part = true;
|
|
47
|
+
entries = 0;
|
|
48
|
+
}
|
|
49
|
+
else if (heading[1] === "###") {
|
|
50
|
+
if (!part)
|
|
51
|
+
throw new Error(`${target}: an outline entry needs an H2 part.`);
|
|
52
|
+
const match = /^(.*?)\s+\{#([a-z0-9-]+)\}$/u.exec(heading[2]);
|
|
53
|
+
const file = files[cursor];
|
|
54
|
+
if (!match ||
|
|
55
|
+
file === undefined ||
|
|
56
|
+
(0, settingsEntryAnchor_1.settingsEntryAnchor)(file) !== match[2])
|
|
57
|
+
throw new Error(`${target}: outline entries must match every numbered file once, in file order.`);
|
|
58
|
+
const canon = headings(node_fs_1.default.readFileSync(node_path_1.default.join(root, file), "utf8"));
|
|
59
|
+
const title = canon[0]?.[2].replace(/\s+\{#[A-Za-z0-9_-]+\}$/u, "");
|
|
60
|
+
if (canon[0]?.[1] !== "#" ||
|
|
61
|
+
canon.filter((item) => item[1] === "#")
|
|
62
|
+
.length !== 1 ||
|
|
63
|
+
title !== match[1])
|
|
64
|
+
throw new Error(`${target}: ${file} entry title must equal its single H1.`);
|
|
65
|
+
++cursor;
|
|
66
|
+
++entries;
|
|
67
|
+
}
|
|
68
|
+
else
|
|
69
|
+
throw new Error(`${target}: outline structure uses H2 parts and H3 file entries.`);
|
|
70
|
+
}
|
|
71
|
+
if (!part || entries === 0)
|
|
72
|
+
throw new Error(`${target}: an outline part is empty.`);
|
|
73
|
+
if (cursor !== files.length)
|
|
74
|
+
throw new Error(`${target}: outline entries must match every numbered file once, in file order.`);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Reads structural ATX headings while keeping comments and fenced examples inert.
|
|
78
|
+
*
|
|
79
|
+
* A leading byte order mark is dropped first, as the binder does when it trims
|
|
80
|
+
* a file, so both readers accept the same authored bytes.
|
|
81
|
+
*
|
|
82
|
+
* Principled implementation: A line-state parser masks HTML comments and compatible fences before recognizing ATX headings; stripping an initial BOM keeps its first-heading interpretation aligned with authored binder trimming.
|
|
83
|
+
* Clear and simple design: The local parser exists for outline structure only, returning heading captures without rewriting the source or replacing graph evidence extraction.
|
|
84
|
+
* Prohibited implementation shortcuts: BOM and fenced/comment examples follow supported Markdown input rules for every document; no title or expected outline entry is injected.
|
|
85
|
+
* Meaningful documentation: The prose explains example/comment inertness and the leading BOM premise; returned regexp groups retain heading depth and raw title for the validator.
|
|
86
|
+
* Efficient algorithms: Line splitting and forward state scans visit Markdown text; accumulated visible fragments and regexp captures consume space proportional to input/headings. Repeated string concatenation relies on runtime string handling and claims no measured linear speedup.
|
|
87
|
+
* Reuse equivalent work: One pass handles comments and fences together for a document; the pure parser coordinates no cross-request work or filesystem effects.
|
|
88
|
+
* Bound retention and release resources: Line, visible-text and capture arrays are local or caller-owned at return; no persistent state, descriptor or task is retained.
|
|
89
|
+
*/
|
|
90
|
+
function headings(markdown) {
|
|
91
|
+
let comment = false;
|
|
92
|
+
let fence = "";
|
|
93
|
+
let fenceLength = 0;
|
|
94
|
+
const result = [];
|
|
95
|
+
for (const line of markdown.replace(/^\uFEFF/u, "").split(/\r?\n/u)) {
|
|
96
|
+
if (fence !== "") {
|
|
97
|
+
const close = /^ {0,3}(`{3,}|~{3,})\s*$/u.exec(line);
|
|
98
|
+
if (close && close[1][0] === fence && close[1].length >= fenceLength)
|
|
99
|
+
fence = "";
|
|
100
|
+
continue;
|
|
101
|
+
}
|
|
102
|
+
let visible = "";
|
|
103
|
+
for (let index = 0; index < line.length;) {
|
|
104
|
+
if (comment) {
|
|
105
|
+
const end = line.indexOf("-->", index);
|
|
106
|
+
if (end < 0)
|
|
107
|
+
break;
|
|
108
|
+
visible += " ".repeat(end + 3 - index);
|
|
109
|
+
index = end + 3;
|
|
110
|
+
comment = false;
|
|
111
|
+
}
|
|
112
|
+
else {
|
|
113
|
+
const start = line.indexOf("<!--", index);
|
|
114
|
+
if (start < 0) {
|
|
115
|
+
visible += line.slice(index);
|
|
116
|
+
break;
|
|
117
|
+
}
|
|
118
|
+
visible += line.slice(index, start) + " ";
|
|
119
|
+
index = start + 4;
|
|
120
|
+
comment = true;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
const open = /^ {0,3}(`{3,}|~{3,})(.*)$/u.exec(visible);
|
|
124
|
+
if (open && !(open[1][0] === "`" && open[2].includes("`"))) {
|
|
125
|
+
fence = open[1][0];
|
|
126
|
+
fenceLength = open[1].length;
|
|
127
|
+
continue;
|
|
128
|
+
}
|
|
129
|
+
const heading = /^(#{1,6}) (.+?)\s*$/u.exec(visible);
|
|
130
|
+
if (heading)
|
|
131
|
+
result.push(heading);
|
|
132
|
+
}
|
|
133
|
+
return result;
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=validateSettingsOutline.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validateSettingsOutline.js","sourceRoot":"","sources":["../../../src/narrative/internal/validateSettingsOutline.ts"],"names":[],"mappings":";;;;;;AAAA,sDAAyB;AACzB,0DAA6B;AAE7B,2DAAwD;AACxD,+DAA4D;AAE5D;;;;;;;;;;;;;;GAcG;AACH,iCAAwC,QAAgB;IACtD,MAAM,IAAI,GAAW,mBAAI,CAAC,IAAI,CAAC,QAAQ,EAAE,oBAAoB,CAAC,CAAC;IAC/D,MAAM,MAAM,GAAW,mBAAI,CAAC,IAAI,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;IAC3D,IAAI,CAAC,iBAAE,CAAC,UAAU,CAAC,MAAM,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,GAAG,MAAM,iCAAiC,CAAC,CAAC;IAC9D,iGAAiG;IACjG,MAAM,KAAK,GAAa,IAAA,qCAAiB,EAAC,IAAI,CAAC,CAAC,MAAM,CACpD,CAAC,IAAY,EAAW,EAAE,CACxB,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC;QAClB,0CAA0C,CAAC,IAAI,CAAC,IAAI,CAAC,CACxD,CAAC;IACF,MAAM,OAAO,GAAsB,QAAQ,CAAC,iBAAE,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC7E,IACE,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,GAAG;QACvB,OAAO,CAAC,MAAM,CAAC,CAAC,IAAqB,EAAW,EAAE,CAAC,IAAI,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CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACnB,WAAW,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;YAC7B,SAAS;QACX,CAAC;QACD,MAAM,OAAO,GAA2B,sBAAsB,CAAC,IAAI,CACjE,OAAO,CACR,CAAC;QACF,IAAI,OAAO;YAAE,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { NarrativeScope } from "./NarrativeScope";
|
|
2
|
+
/**
|
|
3
|
+
* Returns whether the selected narrative population is one pilot slice.
|
|
4
|
+
*
|
|
5
|
+
* @evidence contracts/development/implementation.md#principled-implementation The discriminant comparison recognizes the pilot arm of NarrativeScope without consulting filenames or enabling stages.
|
|
6
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure This predicate only answers scope selection; file-name validation remains with the narrative selector.
|
|
7
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Both admitted scope modes use their literal contract spelling, without a special consumer or fallback mode.
|
|
8
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment identifies the result as pilot population selection; it makes no approval or layout validity claim.
|
|
9
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One literal comparison takes constant time and allocates no collection.
|
|
10
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work This pure predicate coordinates no reusable requests, phases or effectful work.
|
|
11
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The predicate retains no object, handle or task beyond its call.
|
|
12
|
+
*/
|
|
13
|
+
export declare function isFirstPartPilot(scope: NarrativeScope): boolean;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isFirstPartPilot = isFirstPartPilot;
|
|
4
|
+
/**
|
|
5
|
+
* Returns whether the selected narrative population is one pilot slice.
|
|
6
|
+
*
|
|
7
|
+
* @evidence contracts/development/implementation.md#principled-implementation The discriminant comparison recognizes the pilot arm of NarrativeScope without consulting filenames or enabling stages.
|
|
8
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure This predicate only answers scope selection; file-name validation remains with the narrative selector.
|
|
9
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Both admitted scope modes use their literal contract spelling, without a special consumer or fallback mode.
|
|
10
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment identifies the result as pilot population selection; it makes no approval or layout validity claim.
|
|
11
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One literal comparison takes constant time and allocates no collection.
|
|
12
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work This pure predicate coordinates no reusable requests, phases or effectful work.
|
|
13
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The predicate retains no object, handle or task beyond its call.
|
|
14
|
+
*/
|
|
15
|
+
function isFirstPartPilot(scope) {
|
|
16
|
+
return scope.mode === "first-part-pilot";
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=isFirstPartPilot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"isFirstPartPilot.js","sourceRoot":"","sources":["../../src/narrative/isFirstPartPilot.ts"],"names":[],"mappings":";;;AAEA;;;;;;;;;;GAUG;AACH,0BAAiC,KAAqB;IACpD,OAAO,KAAK,CAAC,IAAI,KAAK,kBAAkB,CAAC;AAC3C,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Removes complete HTML comments without changing any surrounding UTF-8 bytes.
|
|
3
|
+
*
|
|
4
|
+
* @evidence contracts/development/implementation.md#principled-implementation Fatal UTF-8 decoding validates bytes before delimiter-based removal of every complete HTML comment; retained subarrays are concatenated without decoding/re-encoding them, preserving exact surrounding bytes.
|
|
5
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The helper owns only byte-preserving comment removal; topology and evidence metadata policy remain with their callers.
|
|
6
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Unclosed comments and invalid UTF-8 throw rather than being silently repaired; all HTML comments are removed regardless of evidence content.
|
|
7
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment promises complete-comment removal and exact surrounding UTF-8 preservation; the thrown error names an unterminated working comment.
|
|
8
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Decoding, forward delimiter searches and final concatenation take linear work in byte count; temporary decoded text, slice descriptors and returned bytes require linear memory.
|
|
9
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each buffer is processed independently because its bytes are the complete input and callers may mutate buffers; there is no coordinated request cache.
|
|
10
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Subarray views retain input storage only until concatenation and return; the result owns its output bytes, and the function opens no handle or task.
|
|
11
|
+
*/
|
|
12
|
+
export declare function stripNaturalnessComments(bytes: Buffer): Buffer;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.stripNaturalnessComments = stripNaturalnessComments;
|
|
4
|
+
const node_util_1 = require("node:util");
|
|
5
|
+
/**
|
|
6
|
+
* Removes complete HTML comments without changing any surrounding UTF-8 bytes.
|
|
7
|
+
*
|
|
8
|
+
* @evidence contracts/development/implementation.md#principled-implementation Fatal UTF-8 decoding validates bytes before delimiter-based removal of every complete HTML comment; retained subarrays are concatenated without decoding/re-encoding them, preserving exact surrounding bytes.
|
|
9
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure The helper owns only byte-preserving comment removal; topology and evidence metadata policy remain with their callers.
|
|
10
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Unclosed comments and invalid UTF-8 throw rather than being silently repaired; all HTML comments are removed regardless of evidence content.
|
|
11
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment promises complete-comment removal and exact surrounding UTF-8 preservation; the thrown error names an unterminated working comment.
|
|
12
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Decoding, forward delimiter searches and final concatenation take linear work in byte count; temporary decoded text, slice descriptors and returned bytes require linear memory.
|
|
13
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each buffer is processed independently because its bytes are the complete input and callers may mutate buffers; there is no coordinated request cache.
|
|
14
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Subarray views retain input storage only until concatenation and return; the result owns its output bytes, and the function opens no handle or task.
|
|
15
|
+
*/
|
|
16
|
+
function stripNaturalnessComments(bytes) {
|
|
17
|
+
new node_util_1.TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
18
|
+
const chunks = [];
|
|
19
|
+
let offset = 0;
|
|
20
|
+
while (true) {
|
|
21
|
+
const opening = bytes.indexOf("<!--", offset);
|
|
22
|
+
if (opening === -1) {
|
|
23
|
+
chunks.push(bytes.subarray(offset));
|
|
24
|
+
break;
|
|
25
|
+
}
|
|
26
|
+
const closing = bytes.indexOf("-->", opening + 4);
|
|
27
|
+
if (closing === -1)
|
|
28
|
+
throw new Error("Naturalness working file has an unclosed HTML comment.");
|
|
29
|
+
chunks.push(bytes.subarray(offset, opening));
|
|
30
|
+
offset = closing + 3;
|
|
31
|
+
}
|
|
32
|
+
return Buffer.concat(chunks);
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=stripNaturalnessComments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"stripNaturalnessComments.js","sourceRoot":"","sources":["../../src/narrative/stripNaturalnessComments.ts"],"names":[],"mappings":";;;AAAA,yCAAwC;AAExC;;;;;;;;;;GAUG;AACH,kCAAyC,KAAa;IACpD,IAAI,uBAAW,CAAC,OAAO,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACxD,MAAM,MAAM,GAAa,EAAE,CAAC;IAC5B,IAAI,MAAM,GAAW,CAAC,CAAC;IACvB,OAAO,IAAI,EAAE,CAAC;QACZ,MAAM,OAAO,GAAW,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QACtD,IAAI,OAAO,KAAK,CAAC,CAAC,EAAE,CAAC;YACnB,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC;YACpC,MAAM;QACR,CAAC;QACD,MAAM,OAAO,GAAW,KAAK,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,CAAC,CAAC,CAAC;QAC1D,IAAI,OAAO,KAAK,CAAC,CAAC;YAChB,MAAM,IAAI,KAAK,CAAC,wDAAwD,CAAC,CAAC;QAC5E,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC;QAC7C,MAAM,GAAG,OAAO,GAAG,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { IEvidenceMetadataRewriteProps } from "./IEvidenceMetadataRewriteProps";
|
|
2
|
+
import type { IEvidenceMetadataRewriteReport } from "./IEvidenceMetadataRewriteReport";
|
|
3
|
+
/**
|
|
4
|
+
* Proves that a metadata-only rewrite changed only structural evidence rows.
|
|
5
|
+
*
|
|
6
|
+
* The canonical projection removes only the metadata region explicitly owned
|
|
7
|
+
* by the operation. Complete comment ownership stops at the delimiters, while
|
|
8
|
+
* acknowledgement, review, and fingerprint ownership leaves the surrounding
|
|
9
|
+
* evidence structure protected. Every other byte remains protected, including
|
|
10
|
+
* Markdown body, sources, punctuation, BOM choice, and non-owned line endings.
|
|
11
|
+
*
|
|
12
|
+
* @evidence contracts/development/implementation.md#principled-implementation Validate physical file safety and strict UTF-8, compare ownership-specific byte projections, check corruption signals and bind bulk samples to changed metadata.
|
|
13
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One synchronous coordinator aggregates diagnostics while grammar, byte mapping and sample checks have separate helpers.
|
|
14
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts BOM, authored text and unowned endings stay protected; added, removed or symlinked selected paths fail rather than becoming metadata edits.
|
|
15
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment defines ownership boundaries and byte preservation; failure throws aggregated diagnostics and success returns hashes and sample data.
|
|
16
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Across F files and B bytes, reads, validation, projection, hashing and token scans dominate; malformed-block lookahead may rescan, sorting is O(F log F), and retained projections scale with total bytes.
|
|
17
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Each projection serves equality, source diagnostics, metadata comparison, hashing and sample checks within this invocation; filesystem results are not cached across operations.
|
|
18
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The call owns synchronous reads, diagnostics, reports and its projection Map until return or throw; no handles stay open and memory has no fixed cap beyond selected inputs.
|
|
19
|
+
*/
|
|
20
|
+
export declare function verifyEvidenceMetadataRewrite(props: IEvidenceMetadataRewriteProps): IEvidenceMetadataRewriteReport;
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.verifyEvidenceMetadataRewrite = verifyEvidenceMetadataRewrite;
|
|
7
|
+
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
8
|
+
const node_fs_1 = __importDefault(require("node:fs"));
|
|
9
|
+
const node_path_1 = __importDefault(require("node:path"));
|
|
10
|
+
const decode_1 = require("./internal/metadataRewrite/decode");
|
|
11
|
+
const directory_1 = require("./internal/metadataRewrite/directory");
|
|
12
|
+
const errorMessage_1 = require("./internal/metadataRewrite/errorMessage");
|
|
13
|
+
const firstDifference_1 = require("./internal/metadataRewrite/firstDifference");
|
|
14
|
+
const locate_1 = require("./internal/metadataRewrite/locate");
|
|
15
|
+
const metadataOwnership_1 = require("./internal/metadataRewrite/metadataOwnership");
|
|
16
|
+
const originalOffset_1 = require("./internal/metadataRewrite/originalOffset");
|
|
17
|
+
const project_1 = require("./internal/metadataRewrite/project");
|
|
18
|
+
const protectedFileKind_1 = require("./internal/metadataRewrite/protectedFileKind");
|
|
19
|
+
const replacementSafety_1 = require("./internal/metadataRewrite/replacementSafety");
|
|
20
|
+
const sameMetadata_1 = require("./internal/metadataRewrite/sameMetadata");
|
|
21
|
+
const selectFiles_1 = require("./internal/metadataRewrite/selectFiles");
|
|
22
|
+
const validateRenderedSample_1 = require("./internal/metadataRewrite/validateRenderedSample");
|
|
23
|
+
/**
|
|
24
|
+
* Proves that a metadata-only rewrite changed only structural evidence rows.
|
|
25
|
+
*
|
|
26
|
+
* The canonical projection removes only the metadata region explicitly owned
|
|
27
|
+
* by the operation. Complete comment ownership stops at the delimiters, while
|
|
28
|
+
* acknowledgement, review, and fingerprint ownership leaves the surrounding
|
|
29
|
+
* evidence structure protected. Every other byte remains protected, including
|
|
30
|
+
* Markdown body, sources, punctuation, BOM choice, and non-owned line endings.
|
|
31
|
+
*
|
|
32
|
+
* @evidence contracts/development/implementation.md#principled-implementation Validate physical file safety and strict UTF-8, compare ownership-specific byte projections, check corruption signals and bind bulk samples to changed metadata.
|
|
33
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One synchronous coordinator aggregates diagnostics while grammar, byte mapping and sample checks have separate helpers.
|
|
34
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts BOM, authored text and unowned endings stay protected; added, removed or symlinked selected paths fail rather than becoming metadata edits.
|
|
35
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment defines ownership boundaries and byte preservation; failure throws aggregated diagnostics and success returns hashes and sample data.
|
|
36
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Across F files and B bytes, reads, validation, projection, hashing and token scans dominate; malformed-block lookahead may rescan, sorting is O(F log F), and retained projections scale with total bytes.
|
|
37
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Each projection serves equality, source diagnostics, metadata comparison, hashing and sample checks within this invocation; filesystem results are not cached across operations.
|
|
38
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The call owns synchronous reads, diagnostics, reports and its projection Map until return or throw; no handles stay open and memory has no fixed cap beyond selected inputs.
|
|
39
|
+
*/
|
|
40
|
+
function verifyEvidenceMetadataRewrite(props) {
|
|
41
|
+
const beforeRoot = (0, directory_1.directory)(props.beforeRoot, "beforeRoot");
|
|
42
|
+
const afterRoot = (0, directory_1.directory)(props.afterRoot, "afterRoot");
|
|
43
|
+
const ownership = (0, metadataOwnership_1.metadataOwnership)(props.ownership);
|
|
44
|
+
const files = (0, selectFiles_1.selectFiles)(beforeRoot, afterRoot, props.files);
|
|
45
|
+
const diagnostics = [];
|
|
46
|
+
const projections = new Map();
|
|
47
|
+
const report = [];
|
|
48
|
+
for (const file of files) {
|
|
49
|
+
const beforePath = node_path_1.default.join(beforeRoot, ...file.split("/"));
|
|
50
|
+
const afterPath = node_path_1.default.join(afterRoot, ...file.split("/"));
|
|
51
|
+
const beforeKind = (0, protectedFileKind_1.protectedFileKind)(beforeRoot, file);
|
|
52
|
+
const afterKind = (0, protectedFileKind_1.protectedFileKind)(afterRoot, file);
|
|
53
|
+
if (beforeKind !== "file" || afterKind !== "file") {
|
|
54
|
+
diagnostics.push(`${file}: metadata-only rewrite cannot add, remove, or follow a non-file protected path (ancestor=${beforeKind}, candidate=${afterKind}).`);
|
|
55
|
+
continue;
|
|
56
|
+
}
|
|
57
|
+
const beforeBytes = node_fs_1.default.readFileSync(beforePath);
|
|
58
|
+
const afterBytes = node_fs_1.default.readFileSync(afterPath);
|
|
59
|
+
let beforeText;
|
|
60
|
+
let afterText;
|
|
61
|
+
try {
|
|
62
|
+
beforeText = (0, decode_1.decode)(beforeBytes, file, "ancestor");
|
|
63
|
+
}
|
|
64
|
+
catch (error) {
|
|
65
|
+
diagnostics.push((0, errorMessage_1.errorMessage)(error));
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
try {
|
|
69
|
+
afterText = (0, decode_1.decode)(afterBytes, file, "candidate");
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
diagnostics.push((0, errorMessage_1.errorMessage)(error));
|
|
73
|
+
continue;
|
|
74
|
+
}
|
|
75
|
+
diagnostics.push(...(0, replacementSafety_1.replacementSafety)(file, "ancestor", beforeText, beforeText), ...(0, replacementSafety_1.replacementSafety)(file, "candidate", beforeText, afterText));
|
|
76
|
+
const beforeProjection = (0, project_1.project)(beforeText, beforeBytes, ownership);
|
|
77
|
+
const afterProjection = (0, project_1.project)(afterText, afterBytes, ownership);
|
|
78
|
+
projections.set(file, {
|
|
79
|
+
before: beforeProjection,
|
|
80
|
+
after: afterProjection,
|
|
81
|
+
});
|
|
82
|
+
if (!beforeProjection.bytes.equals(afterProjection.bytes)) {
|
|
83
|
+
const offset = (0, firstDifference_1.firstDifference)(beforeProjection.bytes, afterProjection.bytes);
|
|
84
|
+
const beforeOffset = (0, originalOffset_1.originalOffset)(beforeProjection, offset);
|
|
85
|
+
const afterOffset = (0, originalOffset_1.originalOffset)(afterProjection, offset);
|
|
86
|
+
const beforeLocation = (0, locate_1.locate)(beforeBytes, beforeOffset);
|
|
87
|
+
const afterLocation = (0, locate_1.locate)(afterBytes, afterOffset);
|
|
88
|
+
diagnostics.push(`${file}: protected authored bytes changed at ancestor ${beforeLocation.line}:${beforeLocation.column} (byte ${beforeOffset}) and candidate ${afterLocation.line}:${afterLocation.column} (byte ${afterOffset}); use the clean ancestor and an ordinary authored change for body revisions.`);
|
|
89
|
+
}
|
|
90
|
+
report.push({
|
|
91
|
+
file,
|
|
92
|
+
metadataChanged: !(0, sameMetadata_1.sameMetadata)(beforeProjection.metadata, afterProjection.metadata),
|
|
93
|
+
projectionSha256: node_crypto_1.default
|
|
94
|
+
.createHash("sha256")
|
|
95
|
+
.update(beforeProjection.bytes)
|
|
96
|
+
.digest("hex"),
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
const changedFiles = report
|
|
100
|
+
.filter((entry) => entry.metadataChanged)
|
|
101
|
+
.map((entry) => entry.file);
|
|
102
|
+
const bulk = props.bulk === true || changedFiles.length > 1;
|
|
103
|
+
const renderedSample = (0, validateRenderedSample_1.validateRenderedSample)(props.renderedSample, bulk, changedFiles, projections, diagnostics);
|
|
104
|
+
if (diagnostics.length !== 0)
|
|
105
|
+
throw new Error(`Evidence metadata rewrite verification failed:\n${diagnostics
|
|
106
|
+
.map((diagnostic) => `- ${diagnostic}`)
|
|
107
|
+
.join("\n")}`);
|
|
108
|
+
return {
|
|
109
|
+
ownership,
|
|
110
|
+
bulk,
|
|
111
|
+
files: report,
|
|
112
|
+
...(renderedSample === undefined ? {} : { renderedSample }),
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
//# sourceMappingURL=verifyEvidenceMetadataRewrite.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verifyEvidenceMetadataRewrite.js","sourceRoot":"","sources":["../../src/narrative/verifyEvidenceMetadataRewrite.ts"],"names":[],"mappings":";;;;;;AAAA,8DAAiC;AACjC,sDAAyB;AACzB,0DAA6B;AAQ7B,8DAA2D;AAC3D,oEAAiE;AACjE,0EAAuE;AACvE,gFAA6E;AAC7E,8DAA2D;AAC3D,oFAAiF;AACjF,8EAA2E;AAC3E,gEAA6D;AAC7D,oFAAiF;AACjF,oFAAiF;AACjF,0EAAuE;AACvE,wEAAqE;AACrE,8FAA2F;AAE3F;;;;;;;;;;;;;;;;GAgBG;AACH,uCACE,KAAoC;IAEpC,MAAM,UAAU,GAAW,IAAA,qBAAS,EAAC,KAAK,CAAC,UAAU,EAAE,YAAY,CAAC,CAAC;IACrE,MAAM,SAAS,GAAW,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AAS;QACT,IAAI;QACJ,KAAK,EAAE,MAAM;QACb,GAAG,CAAC,cAAc,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,cAAc,EAAE,CAAC;KAC5D,CAAC;AACJ,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@automovie/evidence",
|
|
3
|
-
"version": "0.0.0
|
|
4
|
-
"
|
|
5
|
-
"
|
|
3
|
+
"version": "0.0.0",
|
|
4
|
+
"description": "Evidence configuration and optional narrative lifecycle validation for AutoMovie productions",
|
|
5
|
+
"engines": {
|
|
6
|
+
"node": ">=22.23.2"
|
|
7
|
+
},
|
|
8
|
+
"main": "lib/index.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./lib/index.d.ts",
|
|
12
|
+
"default": "./lib/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"automovie",
|
|
18
|
+
"evidence"
|
|
19
|
+
],
|
|
20
|
+
"author": "Samchon",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"repository": {
|
|
23
|
+
"type": "git",
|
|
24
|
+
"url": "https://github.com/samchon/automovie"
|
|
25
|
+
},
|
|
26
|
+
"files": [
|
|
27
|
+
"lib",
|
|
28
|
+
"src",
|
|
29
|
+
"package.json",
|
|
30
|
+
"LICENSE",
|
|
31
|
+
"README.md"
|
|
32
|
+
],
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@wrtnlabs/evidence": "^0.8.2"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@ttsc/evidence": "^0.36.3",
|
|
41
|
+
"@ttsc/lint": "^0.36.3",
|
|
42
|
+
"@types/node": "^22.19.17",
|
|
43
|
+
"rimraf": "^6.0.1",
|
|
44
|
+
"ttsc": "^0.36.3",
|
|
45
|
+
"typescript": "^7.0.2"
|
|
46
|
+
},
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "rimraf lib && ttsc",
|
|
49
|
+
"evidence": "evidence"
|
|
50
|
+
},
|
|
51
|
+
"types": "lib/index.d.ts"
|
|
6
52
|
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Production-specific development contracts a commissioned film turns on.
|
|
3
|
+
*
|
|
4
|
+
* Each stage selects the exported declarations of its source folders against
|
|
5
|
+
* one checklist under `contracts/development/` of the shared skills tree, answered in
|
|
6
|
+
* their doc comments: entities in `src/entities/` answer `entities.md`, laws,
|
|
7
|
+
* interactions and consequences in `src/laws/`, `src/interactions/` and
|
|
8
|
+
* `src/consequences/` answer `behaviors.md` and cite the research they follow,
|
|
9
|
+
* and scenes and films in `src/composition/` answer `composition.md` and cite
|
|
10
|
+
* the screenplay scenes, beats and files they realize. An omitted stage stays
|
|
11
|
+
* `"disabled"`, so ordinary coding and narrative-only work owe none of them.
|
|
12
|
+
*
|
|
13
|
+
* @evidence contracts/development/design.md#principled-representation One stage per contract mirrors the scaffold's development contracts, so a commission enables exactly the duties its code can establish.
|
|
14
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface Three optional fields with the narrative stage vocabulary; folders, populations and references belong to the claim factory.
|
|
15
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts No stage is implied by file presence; an absent field is disabled.
|
|
16
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment names each stage's respondents, their citations and the disabled default.
|
|
17
|
+
*/
|
|
18
|
+
export interface IAutoMovieDevelopmentProps {
|
|
19
|
+
/**
|
|
20
|
+
* Types, classes, functions and methods under `src/entities/` answer
|
|
21
|
+
* `contracts/development/entities.md`.
|
|
22
|
+
*/
|
|
23
|
+
entities?: "disabled" | "evidence";
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Functions and methods under `src/laws/`, `src/interactions/` and
|
|
27
|
+
* `src/consequences/` answer `contracts/development/behaviors.md` and cite
|
|
28
|
+
* studies in `docs/research/`; every study must be cited by some declaration.
|
|
29
|
+
*/
|
|
30
|
+
behaviors?: "disabled" | "evidence";
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Functions and methods under `src/composition/scenes/` answer
|
|
34
|
+
* `contracts/development/composition.md` and cite screenplay scenes and
|
|
35
|
+
* beats, every one of which must be cited; those under
|
|
36
|
+
* `src/composition/films/` answer it and cite the screenplay file they
|
|
37
|
+
* deliver, every one of which must be cited.
|
|
38
|
+
*/
|
|
39
|
+
composition?: "disabled" | "evidence";
|
|
40
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { IEvidenceClaim } from "@wrtnlabs/evidence";
|
|
2
|
+
|
|
3
|
+
import type { IAutoMovieDevelopmentProps } from "./IAutoMovieDevelopmentProps";
|
|
4
|
+
import type { IAutoMovieNarrativeProps } from "./IAutoMovieNarrativeProps";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Configures a project's engineering evidence and optional narrative workflow.
|
|
8
|
+
*
|
|
9
|
+
* @evidence contracts/development/design.md#principled-representation The absolute project location anchors the production's own contracts and an optional absolute skills directory anchors the bundled shared ones; native claims configure engineering while an explicit narrative option adds creative relationships and independent-review structure.
|
|
10
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface One object contains the two contract locations, native engineering claims and optional narrative choices with disabled stage defaults.
|
|
11
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts No narrative mode is inferred from existing files or imposed on ordinary coding and standalone assets, and no workspace is inferred from the filesystem: a shared tree elsewhere is named explicitly.
|
|
12
|
+
* @evidence contracts/development/common.md#meaningful-documentation Members state path ownership, the shared tree's default, replacement semantics for engineering claims, and narrative opt-in behavior.
|
|
13
|
+
*/
|
|
14
|
+
export interface IAutoMovieEvidenceConfigProps {
|
|
15
|
+
/** Absolute project directory containing the production-owned contracts. */
|
|
16
|
+
location: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Absolute directory of the shared `.agents/skills` tree holding the bundled
|
|
20
|
+
* contracts.
|
|
21
|
+
*
|
|
22
|
+
* The engineering and development checklists (`contracts/development/**`)
|
|
23
|
+
* and the shared story contracts (`contracts/story/shared/**`) resolve here.
|
|
24
|
+
* The production's own `work/**` and `language/**` contracts always resolve
|
|
25
|
+
* under `<location>/docs/contracts`, never here. A workspace
|
|
26
|
+
* production passes the workspace root's tree; a standalone production omits
|
|
27
|
+
* it. Citation addresses are the same either way; only reference roots
|
|
28
|
+
* change.
|
|
29
|
+
*
|
|
30
|
+
* @default path.join(location, ".agents", "skills")
|
|
31
|
+
*/
|
|
32
|
+
skills?: string;
|
|
33
|
+
|
|
34
|
+
/** Replaces the default source/test engineering claims when supplied. */
|
|
35
|
+
claims?: IEvidenceClaim[];
|
|
36
|
+
|
|
37
|
+
/** Omit for ordinary coding and standalone assets; provide for video writing. */
|
|
38
|
+
narrative?: IAutoMovieNarrativeProps;
|
|
39
|
+
|
|
40
|
+
/** Entity, behavior and composition development contracts; omitted stages stay disabled. */
|
|
41
|
+
development?: IAutoMovieDevelopmentProps;
|
|
42
|
+
|
|
43
|
+
/** Research studies answer the story research principles when `"evidence"`; disabled by default. */
|
|
44
|
+
research?: "disabled" | "evidence";
|
|
45
|
+
}
|