@automovie/evidence 0.0.0-stage → 0.1.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 +9 -0
- package/lib/index.js +26 -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/index.d.ts +7 -0
- package/lib/internal/index.js +24 -0
- package/lib/internal/index.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 +28 -0
- package/lib/narrative/index.js +45 -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/claims/index.d.ts +8 -0
- package/lib/narrative/internal/claims/index.js +25 -0
- package/lib/narrative/internal/claims/index.js.map +1 -0
- package/lib/narrative/internal/collectProductionClaims.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/index.d.ts +17 -0
- package/lib/narrative/internal/index.js +34 -0
- package/lib/narrative/internal/index.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/index.d.ts +43 -0
- package/lib/narrative/internal/metadataRewrite/index.js +60 -0
- package/lib/narrative/internal/metadataRewrite/index.js.map +1 -0
- package/lib/narrative/internal/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/index.d.ts +11 -0
- package/lib/narrative/internal/references/index.js +28 -0
- package/lib/narrative/internal/references/index.js.map +1 -0
- package/lib/narrative/internal/references/layerFiles.d.ts +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/topology/index.d.ts +1 -0
- package/lib/narrative/internal/topology/index.js +18 -0
- package/lib/narrative/internal/topology/index.js.map +1 -0
- package/lib/narrative/internal/utilities/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/index.d.ts +8 -0
- package/lib/narrative/internal/utilities/index.js +25 -0
- package/lib/narrative/internal/utilities/index.js.map +1 -0
- package/lib/narrative/internal/utilities/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 +9 -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/index.ts +7 -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 +28 -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/claims/index.ts +8 -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/index.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/index.ts +43 -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/index.ts +11 -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/topology/index.ts +1 -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/index.ts +8 -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,11 @@
|
|
|
1
|
+
export * from "./createCoverageReference";
|
|
2
|
+
export * from "./createDiscoveryReferences";
|
|
3
|
+
export * from "./createLanguageDiscoveryReferences";
|
|
4
|
+
export * from "./createLanguagePrincipleReferences";
|
|
5
|
+
export * from "./createLineageReference";
|
|
6
|
+
export * from "./createLocalContractReference";
|
|
7
|
+
export * from "./createPrincipleReferences";
|
|
8
|
+
export * from "./createSettingReferences";
|
|
9
|
+
export * from "./createSharedReference";
|
|
10
|
+
export * from "./createUpstreamReference";
|
|
11
|
+
export * from "./layerFiles";
|
|
@@ -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
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { NarrativeLayer } from "../../NarrativeLayer";
|
|
2
|
+
import type { NarrativeScope } from "../../NarrativeScope";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Captures indexes and misplaced files without widening an exact pilot slice.
|
|
6
|
+
*
|
|
7
|
+
* @evidence contracts/development/implementation.md#principled-implementation Topology captures all descendants of a layer so indexes and malformed paths remain visible, narrowing scripts/screenplay only to the exact declared pilot part; treatments stay flat at validation time.
|
|
8
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One selector helper separates broad topology capture from the partitioned/flat-short authored-unit selector used by ordinary evidence.
|
|
9
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The first-part pilot is a declared production scope, so the selector retains that exact slice instead of widening to other parts.
|
|
10
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment explains why indexes and misplaced files are included while an exact pilot slice stays narrow.
|
|
11
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One conditional constructs one glob string; work and returned storage scale only with layer and optional part text lengths.
|
|
12
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The selector is derived from the current scope each call, while downstream native inventory capture supplies reuse across topology inspections.
|
|
13
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The one-element returned array and string belong to the caller; no filesystem traversal, handle or retained cache is created.
|
|
14
|
+
*/
|
|
15
|
+
export function createTopologyFiles(
|
|
16
|
+
layer: NarrativeLayer,
|
|
17
|
+
scope: NarrativeScope,
|
|
18
|
+
): string[] {
|
|
19
|
+
return layer !== "treatments" && scope.mode === "first-part-pilot"
|
|
20
|
+
? [`${layer}/${scope.part}/**/*`]
|
|
21
|
+
: [`${layer}/**/*`];
|
|
22
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./createTopologyFiles";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Names the package's docs folder.
|
|
3
|
+
*
|
|
4
|
+
* Authored claims select body or the naturalness working tree through `passRoot`.
|
|
5
|
+
* Only the instruction coverage reference uses this constant directly,
|
|
6
|
+
* because `docs/instructions` is input that belongs to neither pass.
|
|
7
|
+
*
|
|
8
|
+
* Principled implementation: The literal docs string is the package-relative document directory shared by pass roots and instruction references, rather than a resolved filesystem identity.
|
|
9
|
+
* Clear and simple design: One constant supplies the common directory spelling while passRoot owns the distinction between current body and naturalness working text.
|
|
10
|
+
* Prohibited implementation shortcuts: The docs directory is a declared production layout value; it is not selected from fixture names, measured output or host-specific paths.
|
|
11
|
+
* Meaningful documentation: The prose identifies which consumers use the constant directly and which select an authored pass through passRoot.
|
|
12
|
+
* Efficient algorithms: The string initializer is constant-sized and performs no filesystem or population traversal.
|
|
13
|
+
* Reuse equivalent work: Consumers reuse the same immutable string, so no equivalent derivation or invalidation mechanism is needed unless the source layout contract changes.
|
|
14
|
+
* Bound retention and release resources: One fixed string is retained for module lifetime; it has no dynamic population, file handle or task to release.
|
|
15
|
+
*/
|
|
16
|
+
export const PACKAGE_DOCS_ROOT: string = "docs";
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { assertProductionContractLayout } from "../../../internal/assertProductionContractLayout";
|
|
2
|
+
import { resolveSkillsDirectory } from "../../../internal/resolveSkillsDirectory";
|
|
3
|
+
import type { AuthoredLayer } from "../../AuthoredLayer";
|
|
4
|
+
import type { IProductionConfigProps } from "../../IProductionConfigProps";
|
|
5
|
+
import { AUTHORED_LAYERS } from "../AUTHORED_LAYERS";
|
|
6
|
+
import { constructionStage } from "../constructionStage";
|
|
7
|
+
import { hasNaturalness } from "../hasNaturalness";
|
|
8
|
+
import { productionLayers } from "../productionLayers";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Checks supported narrative routes and stage option shapes before graph creation.
|
|
12
|
+
*
|
|
13
|
+
* @evidence contracts/development/implementation.md#principled-implementation Routes admit only their authored layers, long work alone admits an outline, each supported stage is disabled or evidence, resolveSkillsDirectory refuses a relative shared skills tree, and assertProductionContractLayout refuses production-owned contracts left in the retired skills location, both before any contract is probed.
|
|
14
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure A single shape check precedes graph expansion; native Evidence owns claim and reference evaluation.
|
|
15
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The same route and stage vocabulary applies to every production; it does not inspect graph results or confer approval.
|
|
16
|
+
* @evidence contracts/development/common.md#meaningful-documentation Errors identify unsupported routes, layers, outline choices, stage values, a relative skills tree and each legacy contract directory with its new home.
|
|
17
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms The closed five-layer vocabulary bounds validation to constant time and storage, plus two directory existence probes.
|
|
18
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The fixed vocabularies are reused within one call; there is no expensive computation or cross-call cache.
|
|
19
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources Only local scalar values and the route array are allocated; the synchronous probes acquire no retained file handle or task.
|
|
20
|
+
*/
|
|
21
|
+
export function assertProductionEvidenceSources(
|
|
22
|
+
props: IProductionConfigProps,
|
|
23
|
+
): void {
|
|
24
|
+
if (!["long", "short", "asset"].includes(props.mode))
|
|
25
|
+
throw new Error("Unknown production route.");
|
|
26
|
+
|
|
27
|
+
// A relative shared tree or a production still keeping its own contracts
|
|
28
|
+
// in the retired skills location is refused before any contract is probed.
|
|
29
|
+
resolveSkillsDirectory(props);
|
|
30
|
+
assertProductionContractLayout(props.location);
|
|
31
|
+
|
|
32
|
+
const routed: readonly AuthoredLayer[] = productionLayers(props);
|
|
33
|
+
for (const layer of AUTHORED_LAYERS) {
|
|
34
|
+
if (routed.includes(layer)) continue;
|
|
35
|
+
if (
|
|
36
|
+
constructionStage(props, layer) !== "disabled" ||
|
|
37
|
+
(hasNaturalness(layer) && props.naturalness.screenplay !== "disabled")
|
|
38
|
+
)
|
|
39
|
+
throw new Error(
|
|
40
|
+
"Layers outside the production route must stay disabled.",
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
if (props.mode !== "long" && props.construction.index === "evidence")
|
|
44
|
+
throw new Error("Only long productions author a settings outline.");
|
|
45
|
+
if (props.mode === "asset" && (props.claims?.length ?? 0) > 0)
|
|
46
|
+
throw new Error(
|
|
47
|
+
"Asset productions use supportClaims rather than narrative claims.",
|
|
48
|
+
);
|
|
49
|
+
if (
|
|
50
|
+
props.construction.index !== undefined &&
|
|
51
|
+
props.construction.index !== "disabled" &&
|
|
52
|
+
props.construction.index !== "evidence"
|
|
53
|
+
)
|
|
54
|
+
throw new Error("Unknown outline stage.");
|
|
55
|
+
for (const layer of AUTHORED_LAYERS)
|
|
56
|
+
for (const pass of ["construction", "naturalness"] as const) {
|
|
57
|
+
if (pass === "naturalness" && !hasNaturalness(layer)) continue;
|
|
58
|
+
const stage: unknown =
|
|
59
|
+
pass === "construction"
|
|
60
|
+
? constructionStage(props, layer)
|
|
61
|
+
: props.naturalness.screenplay;
|
|
62
|
+
if (stage !== "disabled" && stage !== "evidence")
|
|
63
|
+
throw new Error("Unknown stage: a layer is disabled or evidence.");
|
|
64
|
+
}
|
|
65
|
+
if ("scripts" in props.naturalness)
|
|
66
|
+
throw new Error(
|
|
67
|
+
"Scripts finish in construction; remove naturalness.scripts.",
|
|
68
|
+
);
|
|
69
|
+
if (
|
|
70
|
+
"settings" in props.naturalness ||
|
|
71
|
+
"brief" in props.naturalness ||
|
|
72
|
+
"treatments" in props.naturalness
|
|
73
|
+
)
|
|
74
|
+
throw new Error("Settings, brief and treatments finish in construction.");
|
|
75
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
|
|
3
|
+
import type { IContractLocation } from "../../../internal/IContractLocation";
|
|
4
|
+
import { PRODUCTION_CONTRACTS } from "../../../internal/PRODUCTION_CONTRACTS";
|
|
5
|
+
import { STORY_CONTRACTS } from "../../../internal/STORY_CONTRACTS";
|
|
6
|
+
import { resolveSkillsDirectory } from "../../../internal/resolveSkillsDirectory";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Resolves the absolute contract tree that owns one contract family.
|
|
10
|
+
*
|
|
11
|
+
* Ownership decides the tree. The `shared` family ships with the bundled
|
|
12
|
+
* skills, so it resolves under the shared skills tree's `contracts/story`,
|
|
13
|
+
* which a workspace places at its root and a standalone production under its
|
|
14
|
+
* own `.agents/skills`. The `work` and `language` families are contracts the
|
|
15
|
+
* production itself adopts, so they always resolve under its own
|
|
16
|
+
* `docs/contracts`, whichever tree holds the shared ones.
|
|
17
|
+
*
|
|
18
|
+
* @param contracts The production location and optional shared tree; read, not retained.
|
|
19
|
+
* @param scope The contract family whose owner is wanted.
|
|
20
|
+
* @returns The absolute tree holding that family's folder; the family folder is not appended.
|
|
21
|
+
*
|
|
22
|
+
* @evidence contracts/development/implementation.md#principled-implementation The scaffold's ownership rule, bundled shared contracts in the skills tree's `contracts/story` and adopted work/language contracts in the production's `docs/contracts`, maps each family to one tree, joined from the layout constants by `path.join`.
|
|
23
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One function owns the family-to-owner decision for every existence probe and, through createContractRoot, every contract reference root, so no caller rebuilds either tree from the location.
|
|
24
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No family falls back to another tree when a file is missing, and the retired `.agents/skills/contracts/story/{work,language}` location is never consulted; a missing contract stays missing where its owner keeps it.
|
|
25
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One branch and one path join, linear in the path length.
|
|
26
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure path computation coordinates no work across requests.
|
|
27
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Only the returned string outlives the call.
|
|
28
|
+
* @evidence contracts/development/common.md#meaningful-documentation States which tree owns each family in workspace and standalone layouts, and that the result stops above the family folder.
|
|
29
|
+
*/
|
|
30
|
+
export function createContractDirectory(
|
|
31
|
+
contracts: IContractLocation,
|
|
32
|
+
scope: "shared" | "language" | "work",
|
|
33
|
+
): string {
|
|
34
|
+
return scope === "shared"
|
|
35
|
+
? path.join(
|
|
36
|
+
resolveSkillsDirectory(contracts),
|
|
37
|
+
...STORY_CONTRACTS.split("/"),
|
|
38
|
+
)
|
|
39
|
+
: path.join(contracts.location, ...PRODUCTION_CONTRACTS.split("/"));
|
|
40
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { IContractLocation } from "../../../internal/IContractLocation";
|
|
2
|
+
import { createReferenceRoot } from "../../../internal/createReferenceRoot";
|
|
3
|
+
import { createContractDirectory } from "./createContractDirectory";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Resolves the reference root of the contract tree owning one family.
|
|
7
|
+
*
|
|
8
|
+
* The root stops above the family folder rather than descending into it, so a
|
|
9
|
+
* citation address carries the family that owns it: `shared/principles/...`,
|
|
10
|
+
* `language/naturalness/...`, and `work/...` are told apart by the address a
|
|
11
|
+
* host writes, instead of colliding on the same relative file name. Only the
|
|
12
|
+
* root differs between owners: the shared tree's `contracts/story`, reached
|
|
13
|
+
* through `..` segments in a workspace, or the production's own
|
|
14
|
+
* `docs/contracts`, so every citation address is the same in a workspace and
|
|
15
|
+
* in a standalone production.
|
|
16
|
+
*
|
|
17
|
+
* The same local Markdown bytes are both pre-draft instructions and later
|
|
18
|
+
* evidence targets. Config constructs the graph but owns no document mirror.
|
|
19
|
+
*
|
|
20
|
+
* @param contracts The production location and optional shared tree; read, not retained.
|
|
21
|
+
* @param scope The contract family the reference addresses.
|
|
22
|
+
* @returns The `/`-separated root relative to the production's configuration directory.
|
|
23
|
+
*
|
|
24
|
+
* @evidence contracts/development/implementation.md#principled-implementation createContractDirectory picks the owning tree for the family and createReferenceRoot expresses it relative to the production location, the directory native Evidence resolves reference roots against; family-qualified file addresses keep shared/language/work identity in every citation.
|
|
25
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure Ownership and relative-root spelling each live with their own owner; this function only composes them for the shared, language and work reference factories.
|
|
26
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The installed shared and production trees are the layout contracts; no fallback remote root, retired location, fixture path or copied contract bytes are introduced.
|
|
27
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms A fixed number of path operations, linear in the location and skills path lengths, without reading directories or file bytes.
|
|
28
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure path computation coordinates no work across requests.
|
|
29
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Only the returned string outlives the call.
|
|
30
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose explains family-qualified addresses, the two owning roots, why only the root differs between owners, local Markdown ownership and the absence of a document mirror.
|
|
31
|
+
*/
|
|
32
|
+
export function createContractRoot(
|
|
33
|
+
contracts: IContractLocation,
|
|
34
|
+
scope: "shared" | "language" | "work",
|
|
35
|
+
): string {
|
|
36
|
+
return createReferenceRoot(
|
|
37
|
+
contracts.location,
|
|
38
|
+
createContractDirectory(contracts, scope),
|
|
39
|
+
);
|
|
40
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Mirrors selected manuscript files under detached construction evidence.
|
|
3
|
+
*
|
|
4
|
+
* @evidence contracts/development/implementation.md#principled-implementation Each body-relative selector is placed under detached construction files or units according to its host symbol, preserving a leading exclusion marker around the qualified selector.
|
|
5
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One selector transform serves the native graph collector and package claim builders, so detached file/H2 evidence use the same carrier layout.
|
|
6
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Files and units are explicit native host distinctions; negative selectors keep their original exclusion semantics instead of widening coverage.
|
|
7
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the detached construction mirror, and the typed symbol input selects the documented file-versus-unit carrier.
|
|
8
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms For n selectors with total text length p, one mapping pass costs O(n + p) text work and allocates n qualified strings; manuscript contents are not read.
|
|
9
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Carrier selection is computed once for the map and the transformation is shared by all claim builders; fresh arrays prevent callers from mutating another claim selection.
|
|
10
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The mapped array is returned to its config owner and scales with selector text; no filesystem handle, task or process-wide selector cache is retained.
|
|
11
|
+
*/
|
|
12
|
+
export function createEvidenceFiles(
|
|
13
|
+
symbol: "file" | "h2",
|
|
14
|
+
files: string[],
|
|
15
|
+
): string[] {
|
|
16
|
+
const carrier: "files" | "units" = symbol === "file" ? "files" : "units";
|
|
17
|
+
return files.map((file: string): string => {
|
|
18
|
+
const excluded: boolean = file.startsWith("!");
|
|
19
|
+
const relative: string = excluded ? file.slice(1) : file;
|
|
20
|
+
const selected: string = `docs/evidence/construction/${carrier}/${relative}`;
|
|
21
|
+
return excluded ? `!${selected}` : selected;
|
|
22
|
+
});
|
|
23
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import type { AuthoredLayer } from "../../AuthoredLayer";
|
|
2
|
+
import type { NarrativeScope } from "../../NarrativeScope";
|
|
3
|
+
import { createBriefFiles } from "../../createBriefFiles";
|
|
4
|
+
import { createNarrativeUnitFiles } from "../../createNarrativeUnitFiles";
|
|
5
|
+
import { createSettingsFiles } from "../../createSettingsFiles";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Selects authored unit files relative to body, revision, or the naturalness working tree.
|
|
9
|
+
*
|
|
10
|
+
* Settings accepts the legacy flat layout, numbered subject folders or the
|
|
11
|
+
* scaffold's domain folders, and a short's brief the domain folders. The
|
|
12
|
+
* settings outline remains outside canon selectors. Narrative layers retain
|
|
13
|
+
* their release partition or flat short screenplay and delegate to their own selector.
|
|
14
|
+
* `referenceLocation` qualifies lineage targets against the revision snapshot;
|
|
15
|
+
* both logical passes host the same current manuscript paths.
|
|
16
|
+
*
|
|
17
|
+
* @evidence contracts/development/implementation.md#principled-implementation Settings and brief use their dedicated canon selectors excluding outline navigation, while narrative layers delegate to the scope-validating partition/flat-short selector; all outputs remain relative to the selected pass root.
|
|
18
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure This dispatcher owns the authored-layer distinction and delegates narrative pilot/complete-work rules rather than repeating their validation.
|
|
19
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Legacy flat settings and exact first-part pilots are supported layouts/scopes; invalid narrative scope is rejected by the shared selector rather than widened to a matching fixture.
|
|
20
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose names supported settings layouts, outline exclusion, partitioned or flat-short narrative selection and revision-reference qualification.
|
|
21
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Each branch returns at most two selectors; narrative branches also validate scope text, so cost/storage are bounded by the selected scope/path text and independent of manuscript size.
|
|
22
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The same settings/narrative selector helpers serve hosts and references; fresh returned selector arrays keep config mutations local and no filesystem membership is cached.
|
|
23
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller owns the one- or two-string result; this dispatcher opens no handle, starts no task and retains no population state.
|
|
24
|
+
*/
|
|
25
|
+
export function createUnitFiles(
|
|
26
|
+
layer: AuthoredLayer,
|
|
27
|
+
scope: NarrativeScope,
|
|
28
|
+
): string[] {
|
|
29
|
+
if (layer === "settings") return createSettingsFiles();
|
|
30
|
+
if (layer === "brief") return createBriefFiles();
|
|
31
|
+
return createNarrativeUnitFiles(layer, scope);
|
|
32
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./PACKAGE_DOCS_ROOT";
|
|
2
|
+
export * from "./assertProductionEvidenceSources";
|
|
3
|
+
export * from "./createContractDirectory";
|
|
4
|
+
export * from "./createContractRoot";
|
|
5
|
+
export * from "./createEvidenceFiles";
|
|
6
|
+
export * from "./createUnitFiles";
|
|
7
|
+
export * from "./passRoot";
|
|
8
|
+
export * from "./referenceLocation";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { AuthoredPass } from "../../AuthoredPass";
|
|
2
|
+
import { PACKAGE_DOCS_ROOT } from "./PACKAGE_DOCS_ROOT";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Names the docs subtree one pass writes into.
|
|
6
|
+
*
|
|
7
|
+
* Construction reads the current manuscript. Naturalness is written, evidenced,
|
|
8
|
+
* and reviewed in its working tree before comment-free promotion to body.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/development/implementation.md#principled-implementation The draft edition addresses the current body tree and the final edition addresses the naturalness working tree; frozen revision references are deliberately handled by referenceLocation instead.
|
|
11
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One two-way pass-root rule is shared by authored claim factories, while upstream/frozen reference addressing stays with the relation owner.
|
|
12
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The final-to-naturalness mapping is the declared review-before-promotion lifecycle and does not redirect a consumer to fabricated final output.
|
|
13
|
+
* @evidence contracts/development/common.md#meaningful-documentation The prose explains current manuscript ownership and that naturalness is authored, evidenced and reviewed before comment-free promotion.
|
|
14
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One branch and string interpolation allocate a fixed-size relative path, independent of file population or document size.
|
|
15
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work PACKAGE_DOCS_ROOT shares the directory spelling across callers; this pure fixed mapping has no effectful work or cross-request result cache.
|
|
16
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The returned path is caller-owned and constant-sized; there are no open handles, retained tasks or growing module collections.
|
|
17
|
+
*/
|
|
18
|
+
export function passRoot(pass: AuthoredPass): string {
|
|
19
|
+
return `${PACKAGE_DOCS_ROOT}/${pass === "final" ? "naturalness" : "body"}`;
|
|
20
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { AuthoredPass } from "../../AuthoredPass";
|
|
2
|
+
import { PACKAGE_DOCS_ROOT } from "./PACKAGE_DOCS_ROOT";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Gives reference targets an explicit address in the graph's global space.
|
|
6
|
+
*
|
|
7
|
+
* Upstream references select the promoted manuscript for either pass. This is
|
|
8
|
+
* distinct from a naturalness claim's working host; revision references select
|
|
9
|
+
* its frozen pre-revision snapshot.
|
|
10
|
+
*
|
|
11
|
+
* File references use package-relative addresses. A claim that selects file
|
|
12
|
+
* hosts and a claim that selects section hosts read the same documents, and the
|
|
13
|
+
* engine offers every annotation in a claim's files to every reference of that
|
|
14
|
+
* claim. A file address that is also an ancestor address of a section reference
|
|
15
|
+
* would reach that reference as an aggregate target and be refused for lacking
|
|
16
|
+
* a section host. A distinct address space keeps each annotation with the
|
|
17
|
+
* reference it answers.
|
|
18
|
+
*
|
|
19
|
+
* @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.
|
|
20
|
+
* @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.
|
|
21
|
+
* @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.
|
|
22
|
+
* @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.
|
|
23
|
+
* @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.
|
|
24
|
+
* @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.
|
|
25
|
+
* @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.
|
|
26
|
+
*/
|
|
27
|
+
export function referenceLocation(
|
|
28
|
+
files: string[],
|
|
29
|
+
pass: AuthoredPass | "revision",
|
|
30
|
+
symbol: "file" | "h2" = "h2",
|
|
31
|
+
): {
|
|
32
|
+
root: string;
|
|
33
|
+
files: string[];
|
|
34
|
+
} {
|
|
35
|
+
if (symbol === "file")
|
|
36
|
+
return {
|
|
37
|
+
root: ".",
|
|
38
|
+
files: files.map(
|
|
39
|
+
(file: string): string =>
|
|
40
|
+
`${PACKAGE_DOCS_ROOT}/${pass === "revision" ? "revision" : "body"}/${file}`,
|
|
41
|
+
),
|
|
42
|
+
};
|
|
43
|
+
return {
|
|
44
|
+
root: `${PACKAGE_DOCS_ROOT}/${pass === "revision" ? "revision" : "body"}`,
|
|
45
|
+
files,
|
|
46
|
+
};
|
|
47
|
+
}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
4
|
+
import { readSettingsFiles } from "./readSettingsFiles";
|
|
5
|
+
import { settingsEntryAnchor } from "./settingsEntryAnchor";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Checks that the outline describes the classified canon, in domain or numbered folders, in its actual order.
|
|
9
|
+
*
|
|
10
|
+
* Entry anchors encode the relative file path and entry labels equal the H1. This checks
|
|
11
|
+
* the authored layout, not evidence rows: the graph owns citation cardinality
|
|
12
|
+
* and the semantic reviewer owns whether grouping and explanations work.
|
|
13
|
+
*
|
|
14
|
+
* @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.
|
|
15
|
+
* @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.
|
|
16
|
+
* @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.
|
|
17
|
+
* @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.
|
|
18
|
+
* @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.
|
|
19
|
+
* @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.
|
|
20
|
+
* @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.
|
|
21
|
+
*/
|
|
22
|
+
export function validateSettingsOutline(location: string): void {
|
|
23
|
+
const root: string = path.join(location, "docs/body/settings");
|
|
24
|
+
const target: string = path.join(root, "outline/index.md");
|
|
25
|
+
if (!fs.existsSync(target))
|
|
26
|
+
throw new Error(`${target}: settings outline is required.`);
|
|
27
|
+
// Classified canon (domain or numbered folders) needs outline entries; legacy flat files do not.
|
|
28
|
+
const files: string[] = readSettingsFiles(root).filter(
|
|
29
|
+
(file: string): boolean =>
|
|
30
|
+
file.includes("/") ||
|
|
31
|
+
/^[0-9]{3}-[a-z0-9]+(?:-[a-z0-9]+)*\.md$/u.test(file),
|
|
32
|
+
);
|
|
33
|
+
const outline: RegExpExecArray[] = headings(fs.readFileSync(target, "utf8"));
|
|
34
|
+
if (
|
|
35
|
+
outline[0]?.[1] !== "#" ||
|
|
36
|
+
outline.filter((item: RegExpExecArray): boolean => item[1] === "#")
|
|
37
|
+
.length !== 1
|
|
38
|
+
)
|
|
39
|
+
throw new Error(`${target}: the outline must start with one H1.`);
|
|
40
|
+
let part: boolean = false;
|
|
41
|
+
let entries: number = 0;
|
|
42
|
+
let cursor: number = 0;
|
|
43
|
+
for (const heading of outline.slice(1)) {
|
|
44
|
+
if (heading[1] === "##") {
|
|
45
|
+
if (part && entries === 0)
|
|
46
|
+
throw new Error(`${target}: an outline part is empty.`);
|
|
47
|
+
part = true;
|
|
48
|
+
entries = 0;
|
|
49
|
+
} else if (heading[1] === "###") {
|
|
50
|
+
if (!part)
|
|
51
|
+
throw new Error(`${target}: an outline entry needs an H2 part.`);
|
|
52
|
+
const match: RegExpExecArray | null = /^(.*?)\s+\{#([a-z0-9-]+)\}$/u.exec(
|
|
53
|
+
heading[2],
|
|
54
|
+
);
|
|
55
|
+
const file: string = files[cursor];
|
|
56
|
+
if (
|
|
57
|
+
!match ||
|
|
58
|
+
file === undefined ||
|
|
59
|
+
settingsEntryAnchor(file) !== match[2]
|
|
60
|
+
)
|
|
61
|
+
throw new Error(
|
|
62
|
+
`${target}: outline entries must match every numbered file once, in file order.`,
|
|
63
|
+
);
|
|
64
|
+
const canon: RegExpExecArray[] = headings(
|
|
65
|
+
fs.readFileSync(path.join(root, file), "utf8"),
|
|
66
|
+
);
|
|
67
|
+
const title: string = canon[0]?.[2].replace(
|
|
68
|
+
/\s+\{#[A-Za-z0-9_-]+\}$/u,
|
|
69
|
+
"",
|
|
70
|
+
);
|
|
71
|
+
if (
|
|
72
|
+
canon[0]?.[1] !== "#" ||
|
|
73
|
+
canon.filter((item: RegExpExecArray): boolean => item[1] === "#")
|
|
74
|
+
.length !== 1 ||
|
|
75
|
+
title !== match[1]
|
|
76
|
+
)
|
|
77
|
+
throw new Error(
|
|
78
|
+
`${target}: ${file} entry title must equal its single H1.`,
|
|
79
|
+
);
|
|
80
|
+
++cursor;
|
|
81
|
+
++entries;
|
|
82
|
+
} else
|
|
83
|
+
throw new Error(
|
|
84
|
+
`${target}: outline structure uses H2 parts and H3 file entries.`,
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
if (!part || entries === 0)
|
|
88
|
+
throw new Error(`${target}: an outline part is empty.`);
|
|
89
|
+
if (cursor !== files.length)
|
|
90
|
+
throw new Error(
|
|
91
|
+
`${target}: outline entries must match every numbered file once, in file order.`,
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Reads structural ATX headings while keeping comments and fenced examples inert.
|
|
97
|
+
*
|
|
98
|
+
* A leading byte order mark is dropped first, as the binder does when it trims
|
|
99
|
+
* a file, so both readers accept the same authored bytes.
|
|
100
|
+
*
|
|
101
|
+
* 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.
|
|
102
|
+
* Clear and simple design: The local parser exists for outline structure only, returning heading captures without rewriting the source or replacing graph evidence extraction.
|
|
103
|
+
* Prohibited implementation shortcuts: BOM and fenced/comment examples follow supported Markdown input rules for every document; no title or expected outline entry is injected.
|
|
104
|
+
* 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.
|
|
105
|
+
* 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.
|
|
106
|
+
* Reuse equivalent work: One pass handles comments and fences together for a document; the pure parser coordinates no cross-request work or filesystem effects.
|
|
107
|
+
* 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.
|
|
108
|
+
*/
|
|
109
|
+
function headings(markdown: string): RegExpExecArray[] {
|
|
110
|
+
let comment: boolean = false;
|
|
111
|
+
let fence: string = "";
|
|
112
|
+
let fenceLength: number = 0;
|
|
113
|
+
const result: RegExpExecArray[] = [];
|
|
114
|
+
for (const line of markdown.replace(/^\uFEFF/u, "").split(/\r?\n/u)) {
|
|
115
|
+
if (fence !== "") {
|
|
116
|
+
const close: RegExpExecArray | null = /^ {0,3}(`{3,}|~{3,})\s*$/u.exec(
|
|
117
|
+
line,
|
|
118
|
+
);
|
|
119
|
+
if (close && close[1][0] === fence && close[1].length >= fenceLength)
|
|
120
|
+
fence = "";
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
let visible: string = "";
|
|
124
|
+
for (let index: number = 0; index < line.length; ) {
|
|
125
|
+
if (comment) {
|
|
126
|
+
const end: number = line.indexOf("-->", index);
|
|
127
|
+
if (end < 0) break;
|
|
128
|
+
visible += " ".repeat(end + 3 - index);
|
|
129
|
+
index = end + 3;
|
|
130
|
+
comment = false;
|
|
131
|
+
} else {
|
|
132
|
+
const start: number = line.indexOf("<!--", index);
|
|
133
|
+
if (start < 0) {
|
|
134
|
+
visible += line.slice(index);
|
|
135
|
+
break;
|
|
136
|
+
}
|
|
137
|
+
visible += line.slice(index, start) + " ";
|
|
138
|
+
index = start + 4;
|
|
139
|
+
comment = true;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
const open: RegExpExecArray | null = /^ {0,3}(`{3,}|~{3,})(.*)$/u.exec(
|
|
143
|
+
visible,
|
|
144
|
+
);
|
|
145
|
+
if (open && !(open[1][0] === "`" && open[2].includes("`"))) {
|
|
146
|
+
fence = open[1][0];
|
|
147
|
+
fenceLength = open[1].length;
|
|
148
|
+
continue;
|
|
149
|
+
}
|
|
150
|
+
const heading: RegExpExecArray | null = /^(#{1,6}) (.+?)\s*$/u.exec(
|
|
151
|
+
visible,
|
|
152
|
+
);
|
|
153
|
+
if (heading) result.push(heading);
|
|
154
|
+
}
|
|
155
|
+
return result;
|
|
156
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { NarrativeScope } from "./NarrativeScope";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Returns whether the selected narrative population is one pilot slice.
|
|
5
|
+
*
|
|
6
|
+
* @evidence contracts/development/implementation.md#principled-implementation The discriminant comparison recognizes the pilot arm of NarrativeScope without consulting filenames or enabling stages.
|
|
7
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure This predicate only answers scope selection; file-name validation remains with the narrative selector.
|
|
8
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Both admitted scope modes use their literal contract spelling, without a special consumer or fallback mode.
|
|
9
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment identifies the result as pilot population selection; it makes no approval or layout validity claim.
|
|
10
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One literal comparison takes constant time and allocates no collection.
|
|
11
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work This pure predicate coordinates no reusable requests, phases or effectful work.
|
|
12
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources The predicate retains no object, handle or task beyond its call.
|
|
13
|
+
*/
|
|
14
|
+
export function isFirstPartPilot(scope: NarrativeScope): boolean {
|
|
15
|
+
return scope.mode === "first-part-pilot";
|
|
16
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { TextDecoder } from "node:util";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Removes complete HTML comments without changing any surrounding UTF-8 bytes.
|
|
5
|
+
*
|
|
6
|
+
* @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.
|
|
7
|
+
* @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.
|
|
8
|
+
* @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.
|
|
9
|
+
* @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.
|
|
10
|
+
* @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.
|
|
11
|
+
* @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.
|
|
12
|
+
* @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.
|
|
13
|
+
*/
|
|
14
|
+
export function stripNaturalnessComments(bytes: Buffer): Buffer {
|
|
15
|
+
new TextDecoder("utf-8", { fatal: true }).decode(bytes);
|
|
16
|
+
const chunks: Buffer[] = [];
|
|
17
|
+
let offset: number = 0;
|
|
18
|
+
while (true) {
|
|
19
|
+
const opening: number = bytes.indexOf("<!--", offset);
|
|
20
|
+
if (opening === -1) {
|
|
21
|
+
chunks.push(bytes.subarray(offset));
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
const closing: number = bytes.indexOf("-->", opening + 4);
|
|
25
|
+
if (closing === -1)
|
|
26
|
+
throw new Error("Naturalness working file has an unclosed HTML comment.");
|
|
27
|
+
chunks.push(bytes.subarray(offset, opening));
|
|
28
|
+
offset = closing + 3;
|
|
29
|
+
}
|
|
30
|
+
return Buffer.concat(chunks);
|
|
31
|
+
}
|