@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,30 @@
|
|
|
1
|
+
import type { IEvidenceClaim } from "@wrtnlabs/evidence";
|
|
2
|
+
|
|
3
|
+
import type { IProductionConstruction } from "./narrative/IProductionConstruction";
|
|
4
|
+
import type { IProductionLayerStages } from "./narrative/IProductionLayerStages";
|
|
5
|
+
import type { NarrativeScope } from "./narrative/NarrativeScope";
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Opts into narrative evidence using native claims and selected authored stages.
|
|
9
|
+
*
|
|
10
|
+
* @evidence contracts/development/design.md#principled-representation Mode chooses the actual layers; omitted stages remain disabled drafts, and omitted scope selects the complete work.
|
|
11
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface Narrative options extend the engineering configuration without a parallel claim-owner representation.
|
|
12
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts Additional claims use the native Evidence shape and preserve their own selectors, references and review settings.
|
|
13
|
+
* @evidence contracts/development/common.md#meaningful-documentation Fields define the route, stage defaults, authored scope and ordinary additional claims.
|
|
14
|
+
*/
|
|
15
|
+
export interface IAutoMovieNarrativeProps {
|
|
16
|
+
/** Long retains four layers; short writes its brief canon, then the screenplay, with no treatments, scripts or outline. */
|
|
17
|
+
mode: "long" | "short";
|
|
18
|
+
|
|
19
|
+
/** Unspecified layers are disabled drafts; an omitted outline follows settings. */
|
|
20
|
+
construction?: Partial<IProductionConstruction>;
|
|
21
|
+
|
|
22
|
+
/** An unspecified screenplay expression stage is disabled for drafting. */
|
|
23
|
+
naturalness?: Partial<IProductionLayerStages>;
|
|
24
|
+
|
|
25
|
+
/** Defaults to the complete work; a pilot must identify its exact first part. */
|
|
26
|
+
scope?: NarrativeScope;
|
|
27
|
+
|
|
28
|
+
/** Additional native claims for the production's actual respondents. */
|
|
29
|
+
claims?: IEvidenceClaim[];
|
|
30
|
+
}
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
EvidenceProgrammingSymbol,
|
|
3
|
+
IEvidenceClaim,
|
|
4
|
+
IEvidenceMarkdownReference,
|
|
5
|
+
} from "@wrtnlabs/evidence";
|
|
6
|
+
|
|
7
|
+
import type { IAutoMovieDevelopmentProps } from "./IAutoMovieDevelopmentProps";
|
|
8
|
+
import { SKILLS_ROOT } from "./internal/SKILLS_ROOT";
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Creates the claims of the enabled production-specific development contracts.
|
|
12
|
+
*
|
|
13
|
+
* Each enabled stage selects the exported declarations of its source folders
|
|
14
|
+
* and requires each to answer every item of
|
|
15
|
+
* `contracts/development/<stage>.md` in its doc comment, read from the skills
|
|
16
|
+
* tree at `options.skills`, by default the production's own `.agents/skills`.
|
|
17
|
+
* Entities answer with their types, classes, functions and methods, because an
|
|
18
|
+
* entity is a class whose methods are its capabilities. Behaviors (laws,
|
|
19
|
+
* interactions and consequences) also cite the research studies they follow,
|
|
20
|
+
* and every study in `docs/research/` apart from its index must be cited, so a
|
|
21
|
+
* behavior cannot be written without its study and no study goes unused.
|
|
22
|
+
* Scenes cite the screenplay scenes and beats they realize, and every H2 scene
|
|
23
|
+
* and H3 beat must be realized; films cite the screenplay file they deliver,
|
|
24
|
+
* and every screenplay file must become a film. Entities answer their
|
|
25
|
+
* checklist alone, because their settings citations are judged by review
|
|
26
|
+
* rather than required for every settings heading.
|
|
27
|
+
*
|
|
28
|
+
* @evidence contracts/development/implementation.md#principled-implementation Native TypeScript claims carry the checklist, and a second Markdown reference uses native target coverage to make the study-to-behavior, screenplay-to-scene and screenplay-to-film relations mechanical.
|
|
29
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One table maps each population to its stage, folders, symbol kinds and cited population; disabled stages produce no claim, and the options carry only where the checklists are read.
|
|
30
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts Source folders are the scaffold layout's documented locations, not fixture paths; nothing is inferred from file presence.
|
|
31
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states each stage's respondents, the relation it enforces and which skills tree holds the checklists; the option states its form and default.
|
|
32
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Builds at most four fixed-size claim trees in constant time; it performs no discovery or file I/O.
|
|
33
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Fresh objects are returned so one configuration's edits cannot reach another; there is no expensive shared work.
|
|
34
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller owns the returned claims; nothing is retained.
|
|
35
|
+
*/
|
|
36
|
+
export function createDevelopmentContractClaims(
|
|
37
|
+
props: IAutoMovieDevelopmentProps,
|
|
38
|
+
options: {
|
|
39
|
+
/**
|
|
40
|
+
* Reference root of the skills tree holding the stage checklists, relative
|
|
41
|
+
* to the directory of `evidence.config.ts` with `/` separators; `..`
|
|
42
|
+
* segments reach a workspace's shared tree.
|
|
43
|
+
*
|
|
44
|
+
* @default ".agents/skills"
|
|
45
|
+
*/
|
|
46
|
+
skills?: string;
|
|
47
|
+
} = {},
|
|
48
|
+
): IEvidenceClaim[] {
|
|
49
|
+
const screenplay: string[] = ["docs/body/screenplay/**/*.md"];
|
|
50
|
+
const populations: {
|
|
51
|
+
stage: keyof IAutoMovieDevelopmentProps;
|
|
52
|
+
name: string;
|
|
53
|
+
files: string[];
|
|
54
|
+
symbol: EvidenceProgrammingSymbol[];
|
|
55
|
+
cited?: IEvidenceMarkdownReference;
|
|
56
|
+
}[] = [
|
|
57
|
+
{
|
|
58
|
+
stage: "entities",
|
|
59
|
+
name: "entities",
|
|
60
|
+
files: ["src/entities/**/*.ts"],
|
|
61
|
+
symbol: ["type", "function"],
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
stage: "behaviors",
|
|
65
|
+
name: "behaviors",
|
|
66
|
+
files: [
|
|
67
|
+
"src/laws/**/*.ts",
|
|
68
|
+
"src/interactions/**/*.ts",
|
|
69
|
+
"src/consequences/**/*.ts",
|
|
70
|
+
],
|
|
71
|
+
symbol: ["function"],
|
|
72
|
+
cited: {
|
|
73
|
+
type: "markdown",
|
|
74
|
+
files: ["docs/research/**/*.md", "!docs/research/index.md"],
|
|
75
|
+
symbol: "file",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
stage: "composition",
|
|
80
|
+
name: "scenes",
|
|
81
|
+
files: ["src/composition/scenes/**/*.ts"],
|
|
82
|
+
symbol: ["function"],
|
|
83
|
+
cited: { type: "markdown", files: screenplay, symbol: ["h2", "h3"] },
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
stage: "composition",
|
|
87
|
+
name: "films",
|
|
88
|
+
files: ["src/composition/films/**/*.ts"],
|
|
89
|
+
symbol: ["function"],
|
|
90
|
+
cited: { type: "markdown", files: screenplay, symbol: "file" },
|
|
91
|
+
},
|
|
92
|
+
];
|
|
93
|
+
return populations
|
|
94
|
+
.filter((entry): boolean => props[entry.stage] === "evidence")
|
|
95
|
+
.map(
|
|
96
|
+
(entry): IEvidenceClaim => ({
|
|
97
|
+
name: entry.name,
|
|
98
|
+
type: "typescript",
|
|
99
|
+
files: [...entry.files],
|
|
100
|
+
symbol: [...entry.symbol],
|
|
101
|
+
reference: [
|
|
102
|
+
{
|
|
103
|
+
type: "markdown",
|
|
104
|
+
root: options.skills ?? SKILLS_ROOT,
|
|
105
|
+
files: [`contracts/development/${entry.stage}.md`],
|
|
106
|
+
symbol: "h2",
|
|
107
|
+
checklist: true,
|
|
108
|
+
},
|
|
109
|
+
...(entry.cited === undefined ? [] : [structuredClone(entry.cited)]),
|
|
110
|
+
],
|
|
111
|
+
}),
|
|
112
|
+
);
|
|
113
|
+
}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import type { IEvidenceClaim } from "@wrtnlabs/evidence";
|
|
2
|
+
|
|
3
|
+
import { SKILLS_ROOT } from "./internal/SKILLS_ROOT";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Creates fresh source/test claims against the project's own checklists.
|
|
7
|
+
*
|
|
8
|
+
* Use the result when extending, rather than replacing, the default engineering
|
|
9
|
+
* population. Every exported source declaration and test answers the common
|
|
10
|
+
* checklist; exported types, interfaces and classes also answer the design
|
|
11
|
+
* checklist, exported functions and class methods the implementation checklist,
|
|
12
|
+
* and exported test functions the testing checklist. The paths are read from
|
|
13
|
+
* the skills tree at `skills`, by default the production's own
|
|
14
|
+
* `.agents/skills`; a workspace production names the shared tree at the
|
|
15
|
+
* workspace root instead, such as `../../../.agents/skills`. By default the
|
|
16
|
+
* paths are the scaffold's
|
|
17
|
+
* `contracts/development/{common,design,implementation,testing}.md`.
|
|
18
|
+
*
|
|
19
|
+
* Each claim selects exactly the declarations that owe its checklists, so tests
|
|
20
|
+
* answer common and testing in one claim, while source types and functions,
|
|
21
|
+
* which owe different checklists, share common through a separate claim; a
|
|
22
|
+
* claim reports an answer on a declaration outside its population as unhosted. A production created before that layout passes its
|
|
23
|
+
* own paths instead, such as `common: null` with one `contracts/common.md` for
|
|
24
|
+
* both design and implementation, which then selects types and functions in a
|
|
25
|
+
* single claim as before.
|
|
26
|
+
*
|
|
27
|
+
* @evidence contracts/development/implementation.md#principled-implementation Native TypeScript symbol kinds separate declarations that describe a shape (type) from those that compute (function); one claim per population keeps every acknowledgement on a host its claim selects, and equal design and implementation paths collapse into one claim for the same reason.
|
|
28
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure This factory owns only the default engineering population, independent of narrative graph construction; the optional paths and skills root name the checklists without changing which declarations owe them.
|
|
29
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The documented src/test conventions are production defaults, not fixture paths or tailored expected answers; a supplied path replaces only its checklist file, a supplied skills root moves only where they are read, and a null common path removes only the shared claim.
|
|
30
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment explains which declarations answer which checklist, how claims follow their populations, fresh ownership, extension, the workspace skills root and the legacy form; each option states its role.
|
|
31
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Allocates at most four fixed-size claim trees in constant time and space; it performs no discovery or file I/O.
|
|
32
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work Fresh objects are intentional so editing one configuration cannot contaminate another; there is no expensive shared work to cache.
|
|
33
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller owns the returned claim trees; this function retains no references, handles, or tasks.
|
|
34
|
+
*/
|
|
35
|
+
export function createEngineeringClaims(
|
|
36
|
+
props: {
|
|
37
|
+
/**
|
|
38
|
+
* Shared documentation checklist path from `skills`, answered by every
|
|
39
|
+
* selected source declaration and test; `null` selects none.
|
|
40
|
+
*/
|
|
41
|
+
common?: string | null;
|
|
42
|
+
|
|
43
|
+
/** Design checklist path from `skills`, answered by source types. */
|
|
44
|
+
design?: string;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Implementation checklist path from `skills`, answered by source
|
|
48
|
+
* functions.
|
|
49
|
+
*/
|
|
50
|
+
implementation?: string;
|
|
51
|
+
|
|
52
|
+
/** Testing checklist path from `skills`, answered by tests. */
|
|
53
|
+
tests?: string;
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* Reference root of the skills tree holding the checklists, relative to
|
|
57
|
+
* the directory of `evidence.config.ts` with `/` separators; `..` segments
|
|
58
|
+
* reach a workspace's shared tree.
|
|
59
|
+
*
|
|
60
|
+
* @default ".agents/skills"
|
|
61
|
+
*/
|
|
62
|
+
skills?: string;
|
|
63
|
+
} = {},
|
|
64
|
+
): IEvidenceClaim[] {
|
|
65
|
+
const common: string | null =
|
|
66
|
+
props.common === undefined
|
|
67
|
+
? "contracts/development/common.md"
|
|
68
|
+
: props.common;
|
|
69
|
+
const design: string = props.design ?? "contracts/development/design.md";
|
|
70
|
+
const implementation: string =
|
|
71
|
+
props.implementation ?? "contracts/development/implementation.md";
|
|
72
|
+
const checklist = (...files: string[]): IEvidenceClaim["reference"] => ({
|
|
73
|
+
type: "markdown",
|
|
74
|
+
root: props.skills ?? SKILLS_ROOT,
|
|
75
|
+
files,
|
|
76
|
+
symbol: "h2",
|
|
77
|
+
checklist: true,
|
|
78
|
+
});
|
|
79
|
+
const tests: string = props.tests ?? "contracts/development/testing.md";
|
|
80
|
+
return [
|
|
81
|
+
...(design === implementation
|
|
82
|
+
? [
|
|
83
|
+
{
|
|
84
|
+
name: "production source",
|
|
85
|
+
type: "typescript",
|
|
86
|
+
files: ["src/**/*.ts"],
|
|
87
|
+
symbol: ["type", "function"],
|
|
88
|
+
reference: checklist(design),
|
|
89
|
+
} satisfies IEvidenceClaim,
|
|
90
|
+
]
|
|
91
|
+
: [
|
|
92
|
+
{
|
|
93
|
+
name: "production types",
|
|
94
|
+
type: "typescript",
|
|
95
|
+
files: ["src/**/*.ts"],
|
|
96
|
+
symbol: "type",
|
|
97
|
+
reference: checklist(design),
|
|
98
|
+
} satisfies IEvidenceClaim,
|
|
99
|
+
{
|
|
100
|
+
name: "production functions",
|
|
101
|
+
type: "typescript",
|
|
102
|
+
files: ["src/**/*.ts"],
|
|
103
|
+
symbol: "function",
|
|
104
|
+
reference: checklist(implementation),
|
|
105
|
+
} satisfies IEvidenceClaim,
|
|
106
|
+
]),
|
|
107
|
+
{
|
|
108
|
+
name: "production tests",
|
|
109
|
+
type: "typescript",
|
|
110
|
+
files: ["test/**/test_*.ts"],
|
|
111
|
+
symbol: "function",
|
|
112
|
+
reference: common === null ? checklist(tests) : checklist(common, tests),
|
|
113
|
+
},
|
|
114
|
+
...(common === null
|
|
115
|
+
? []
|
|
116
|
+
: [
|
|
117
|
+
{
|
|
118
|
+
name: "production documentation",
|
|
119
|
+
type: "typescript",
|
|
120
|
+
files: ["src/**/*.ts"],
|
|
121
|
+
symbol: ["type", "function"],
|
|
122
|
+
reference: checklist(common),
|
|
123
|
+
} satisfies IEvidenceClaim,
|
|
124
|
+
]),
|
|
125
|
+
];
|
|
126
|
+
}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import type { IEvidenceClaim, IEvidenceConfig } from "@wrtnlabs/evidence";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
4
|
+
import type { IAutoMovieEvidenceConfigProps } from "./IAutoMovieEvidenceConfigProps";
|
|
5
|
+
import { createDevelopmentContractClaims } from "./createDevelopmentContractClaims";
|
|
6
|
+
import { createEngineeringClaims } from "./createEngineeringClaims";
|
|
7
|
+
import { createResearchClaims } from "./createResearchClaims";
|
|
8
|
+
import { assertProductionContractLayout } from "./internal/assertProductionContractLayout";
|
|
9
|
+
import { createReferenceRoot } from "./internal/createReferenceRoot";
|
|
10
|
+
import { resolveSkillsDirectory } from "./internal/resolveSkillsDirectory";
|
|
11
|
+
import { createProductionConfig } from "./narrative/createProductionConfig";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Creates a native Evidence configuration with optional narrative claims.
|
|
15
|
+
*
|
|
16
|
+
* The shared skills tree is resolved once: its absolute directory goes to the
|
|
17
|
+
* narrative factories, which keep production-owned work and language contracts
|
|
18
|
+
* under `<location>/docs/contracts`, and its root relative to `location` goes to the default
|
|
19
|
+
* engineering, development and research claims. Caller-supplied `claims` are
|
|
20
|
+
* kept as written, so they name their own root.
|
|
21
|
+
*
|
|
22
|
+
* @evidence contracts/development/implementation.md#principled-implementation An absolute project location and a resolved absolute shared skills tree anchor the native engineering defaults and optional narrative selectors; native Evidence resolves the relative root against the configuration directory, the location, and caller-supplied claims are cloned before composition.
|
|
23
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One options object selects engineering alone or delegates narrative claim composition to createProductionConfig; resolveSkillsDirectory and createReferenceRoot own the shared-tree default, validation and spelling.
|
|
24
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The returned object is an ordinary native configuration; this function neither evaluates diagnostics nor grants creative approval, an omitted skills tree yields exactly the standalone roots, and assertProductionContractLayout refuses a production still keeping its own contracts in the retired skills location rather than letting their duties vanish.
|
|
25
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Two legacy-layout existence probes precede work; engineering creation clones supplied claims or allocates fixed defaults; narrative creation additionally discovers current contract files and expands a fixed number of layer families.
|
|
26
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work The shared tree is resolved once per call and reused by every factory; the layout guard repeats its two probes inside a narrative build so createProductionConfig called directly stays guarded; each call owns fresh option and claim copies, and filesystem-dependent narrative composition is not cached across calls.
|
|
27
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller owns the returned configuration; this function retains no registry, native process or open resource.
|
|
28
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states how the shared tree reaches each factory and that supplied claims keep their own root; the input types explain routes, disabled stage defaults and additional native claims.
|
|
29
|
+
*/
|
|
30
|
+
export function createEvidenceConfig(
|
|
31
|
+
props: IAutoMovieEvidenceConfigProps,
|
|
32
|
+
): IEvidenceConfig {
|
|
33
|
+
if (!path.isAbsolute(props.location))
|
|
34
|
+
throw new Error("Evidence location must be an absolute project directory.");
|
|
35
|
+
assertProductionContractLayout(props.location);
|
|
36
|
+
const skills: string = resolveSkillsDirectory(props);
|
|
37
|
+
const root: string = createReferenceRoot(props.location, skills);
|
|
38
|
+
|
|
39
|
+
const claims: IEvidenceClaim[] =
|
|
40
|
+
props.claims === undefined
|
|
41
|
+
? createEngineeringClaims({ skills: root })
|
|
42
|
+
: structuredClone(props.claims);
|
|
43
|
+
claims.push(
|
|
44
|
+
...createDevelopmentContractClaims(props.development ?? {}, {
|
|
45
|
+
skills: root,
|
|
46
|
+
}),
|
|
47
|
+
);
|
|
48
|
+
if (props.research === "evidence")
|
|
49
|
+
claims.push(...createResearchClaims({ skills: root }));
|
|
50
|
+
if (props.narrative === undefined) return { severity: "error", claims };
|
|
51
|
+
|
|
52
|
+
return createProductionConfig({
|
|
53
|
+
location: props.location,
|
|
54
|
+
skills,
|
|
55
|
+
mode: props.narrative.mode,
|
|
56
|
+
narrativeScope: structuredClone(
|
|
57
|
+
props.narrative.scope ?? { mode: "complete-work" },
|
|
58
|
+
),
|
|
59
|
+
construction: {
|
|
60
|
+
settings: "disabled",
|
|
61
|
+
treatments: "disabled",
|
|
62
|
+
scripts: "disabled",
|
|
63
|
+
screenplay: "disabled",
|
|
64
|
+
...structuredClone(props.narrative.construction ?? {}),
|
|
65
|
+
},
|
|
66
|
+
naturalness: {
|
|
67
|
+
screenplay: "disabled",
|
|
68
|
+
...structuredClone(props.narrative.naturalness ?? {}),
|
|
69
|
+
},
|
|
70
|
+
supportClaims: claims,
|
|
71
|
+
claims: structuredClone(props.narrative.claims ?? []),
|
|
72
|
+
});
|
|
73
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { IEvidenceClaim } from "@wrtnlabs/evidence";
|
|
2
|
+
|
|
3
|
+
import { SKILLS_ROOT } from "./internal/SKILLS_ROOT";
|
|
4
|
+
import { STORY_CONTRACTS } from "./internal/STORY_CONTRACTS";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Creates the claim that holds research studies to the story research
|
|
8
|
+
* principles.
|
|
9
|
+
*
|
|
10
|
+
* Each study in `docs/research/`, apart from its index, answers every item of
|
|
11
|
+
* `contracts/story/shared/principles/research.md`, read from the skills tree at
|
|
12
|
+
* `skills`, by default the production's own `.agents/skills`. The citation
|
|
13
|
+
* address, `shared/principles/research.md`, is the same wherever that tree
|
|
14
|
+
* lives. Like the other story layers, the answers live apart from the study,
|
|
15
|
+
* in `docs/evidence/construction/files/research/`, under an H1 naming the
|
|
16
|
+
* study's path, so the study stays a plain synthesis its readers use.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/development/implementation.md#principled-implementation A native Markdown file claim with detached evidence files keeps the study's text free of answers while each study still owes every research item; the reference root joins the given skills root with the installed `contracts/story` layout, which native Evidence resolves against the configuration directory.
|
|
19
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One claim with fixed study and answer locations; the caller decides whether to enable it and where the shared skills tree is.
|
|
20
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The study, index and answer paths are the scaffold layout's documented locations, not fixture paths; the default root is the standalone layout.
|
|
21
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Builds one fixed-size claim tree in constant time; it performs no discovery or file I/O.
|
|
22
|
+
* @evidence contracts/development/implementation.md#reuse-equivalent-work A fresh object is returned so one configuration's edits cannot reach another.
|
|
23
|
+
* @evidence contracts/development/implementation.md#bound-retention-and-release-resources The caller owns the returned claim; nothing is retained.
|
|
24
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states the respondents, the contract, which tree it is read from and where the answers live; the option states its form and default.
|
|
25
|
+
*/
|
|
26
|
+
export function createResearchClaims(
|
|
27
|
+
props: {
|
|
28
|
+
/**
|
|
29
|
+
* Reference root of the skills tree holding the story contracts, relative
|
|
30
|
+
* to the directory of `evidence.config.ts` with `/` separators; `..`
|
|
31
|
+
* segments reach a workspace's shared tree.
|
|
32
|
+
*
|
|
33
|
+
* @default ".agents/skills"
|
|
34
|
+
*/
|
|
35
|
+
skills?: string;
|
|
36
|
+
} = {},
|
|
37
|
+
): IEvidenceClaim[] {
|
|
38
|
+
return [
|
|
39
|
+
{
|
|
40
|
+
name: "research studies",
|
|
41
|
+
type: "markdown",
|
|
42
|
+
files: ["docs/research/**/*.md", "!docs/research/index.md"],
|
|
43
|
+
evidenceFiles: ["docs/evidence/construction/files/research/**/*.md"],
|
|
44
|
+
symbol: "file",
|
|
45
|
+
reference: {
|
|
46
|
+
type: "markdown",
|
|
47
|
+
root: `${props.skills ?? SKILLS_ROOT}/${STORY_CONTRACTS}`,
|
|
48
|
+
files: ["shared/principles/research.md"],
|
|
49
|
+
symbol: "h2",
|
|
50
|
+
checklist: true,
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
];
|
|
54
|
+
}
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from "./IAutoMovieEvidenceConfigProps";
|
|
2
|
+
export * from "./IAutoMovieNarrativeProps";
|
|
3
|
+
export * from "./IAutoMovieDevelopmentProps";
|
|
4
|
+
export * from "./createEvidenceConfig";
|
|
5
|
+
export * from "./createEngineeringClaims";
|
|
6
|
+
export * from "./createDevelopmentContractClaims";
|
|
7
|
+
export * from "./createResearchClaims";
|
|
8
|
+
export * from "./narrative";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Locates the two contract owners one production's contracts come from: the production itself and the shared skills tree.
|
|
3
|
+
*
|
|
4
|
+
* The production's own `work` and `language` contracts always live under
|
|
5
|
+
* `<location>/docs/contracts`. The bundled shared contracts live under
|
|
6
|
+
* `skills`, which a workspace points at its one shared tree; a standalone
|
|
7
|
+
* production omits it and keeps them under its own `.agents/skills`.
|
|
8
|
+
*
|
|
9
|
+
* @evidence contracts/development/design.md#principled-representation Two absolute directories represent the two owners a contract can have, the production and the shared bundle; the optional member encodes the standalone layout, where the shared bundle sits under the production's own `.agents/skills`.
|
|
10
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface Only the two directories that decide where a contract resolves; route, stages and claims stay with the configuration types that carry this shape.
|
|
11
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts No flag says "workspace": the owner is the directory itself, and an omitted `skills` is the standalone default rather than a guessed location.
|
|
12
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment states which families each directory owns and the omitted default; the members state they are absolute.
|
|
13
|
+
*/
|
|
14
|
+
export interface IContractLocation {
|
|
15
|
+
/** Absolute production directory whose `docs/contracts` holds its `work` and `language` contracts. */
|
|
16
|
+
location: string;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Absolute directory of the shared `.agents/skills` tree holding the bundled
|
|
20
|
+
* contracts.
|
|
21
|
+
*
|
|
22
|
+
* @default path.join(location, ".agents", "skills")
|
|
23
|
+
*/
|
|
24
|
+
skills?: string;
|
|
25
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Names the tree of a production's own contracts, relative to its directory.
|
|
3
|
+
*
|
|
4
|
+
* The `work` and `language` families a production adopts live here directly,
|
|
5
|
+
* with no `story` level, so `work/discovery/results.md` is the file
|
|
6
|
+
* `docs/contracts/work/discovery/results.md` and is cited by that same
|
|
7
|
+
* family-qualified address. They sit beside the production's other documents
|
|
8
|
+
* rather than in a skills tree, so a workspace's shared `.agents/skills` holds
|
|
9
|
+
* only bundled contracts.
|
|
10
|
+
*
|
|
11
|
+
* Principled implementation: The scaffold places production-owned contracts under `docs/contracts`; the portable spelling is used both as a reference root and, split on `/`, as a filesystem path under the production location.
|
|
12
|
+
* Clear and simple design: One constant supplies every production-owned root: local language references, the discovery claim over `work/**`, and the work-local package claims.
|
|
13
|
+
* Prohibited implementation shortcuts: The value is the installed layout, not a fixture path; no fallback to the retired `.agents/skills/contracts/story` location exists, which assertProductionContractLayout refuses instead.
|
|
14
|
+
* Meaningful documentation: The prose states which families live here, the address-to-file mapping and why they are outside the skills tree.
|
|
15
|
+
* Efficient algorithms: A constant string with no computation.
|
|
16
|
+
* Reuse equivalent work: Every consumer reads the same immutable string.
|
|
17
|
+
* Bound retention and release resources: One fixed string for the module lifetime.
|
|
18
|
+
*/
|
|
19
|
+
export const PRODUCTION_CONTRACTS: string = "docs/contracts";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Names a production's skills tree relative to its own directory.
|
|
3
|
+
*
|
|
4
|
+
* A standalone production holds its bundled contracts here; a workspace
|
|
5
|
+
* production holds them in the tree the configuration's `skills` option points
|
|
6
|
+
* at. Either way the production's own `work` and `language` contracts live in
|
|
7
|
+
* its `docs/contracts`, never in a skills tree; this tree's
|
|
8
|
+
* `contracts/story/{work,language}` is the retired location
|
|
9
|
+
* assertProductionContractLayout refuses.
|
|
10
|
+
*
|
|
11
|
+
* Principled implementation: The scaffold installs `.agents/skills` at a production's root; this spelling is that layout contract, written with portable separators because Evidence reference roots are portable relative paths.
|
|
12
|
+
* Clear and simple design: One constant supplies the default shared tree, the default engineering, development and research reference roots, and the retired location the layout guard probes.
|
|
13
|
+
* Prohibited implementation shortcuts: The value is the installed layout, not a fixture or host path; a workspace overrides the shared tree through `skills`.
|
|
14
|
+
* Meaningful documentation: The prose states which contracts live here in standalone and workspace productions.
|
|
15
|
+
* Efficient algorithms: A constant string with no computation.
|
|
16
|
+
* Reuse equivalent work: Every consumer reads the same immutable string.
|
|
17
|
+
* Bound retention and release resources: One fixed string for the module lifetime.
|
|
18
|
+
*/
|
|
19
|
+
export const SKILLS_ROOT: string = ".agents/skills";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Names the story contract tree inside a skills tree.
|
|
3
|
+
*
|
|
4
|
+
* Its `shared/` family ships with the scaffold's bundled skills. The `work/`
|
|
5
|
+
* and `language/` families a production adopts live in its `docs/contracts`
|
|
6
|
+
* instead; under a production's own skills tree they mark the retired layout.
|
|
7
|
+
*
|
|
8
|
+
* Principled implementation: The scaffold installs story contracts at `contracts/story` under a skills tree; the portable spelling joins the shared skills tree for shared contracts and the research root, and the production's own skills tree only for the retired-layout guard.
|
|
9
|
+
* Clear and simple design: One constant serves every shared story root and the legacy guard.
|
|
10
|
+
* Prohibited implementation shortcuts: The value is the installed layout, not a fixture path.
|
|
11
|
+
* Meaningful documentation: The prose names the families and which tree owns each.
|
|
12
|
+
* Efficient algorithms: A constant string with no computation.
|
|
13
|
+
* Reuse equivalent work: Every consumer reads the same immutable string.
|
|
14
|
+
* Bound retention and release resources: One fixed string for the module lifetime.
|
|
15
|
+
*/
|
|
16
|
+
export const STORY_CONTRACTS: string = "contracts/story";
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import fs from "node:fs";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
|
|
4
|
+
import { PRODUCTION_CONTRACTS } from "./PRODUCTION_CONTRACTS";
|
|
5
|
+
import { SKILLS_ROOT } from "./SKILLS_ROOT";
|
|
6
|
+
import { STORY_CONTRACTS } from "./STORY_CONTRACTS";
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Refuses a production that still keeps its own contracts in the retired tree.
|
|
10
|
+
*
|
|
11
|
+
* A production's `work` and `language` contracts moved from
|
|
12
|
+
* `.agents/skills/contracts/story/{work,language}` to
|
|
13
|
+
* `docs/contracts/{work,language}`. Their duties are admitted only when their
|
|
14
|
+
* files exist where they now belong, so a production left in the old layout
|
|
15
|
+
* would silently lose every language and work duty instead of failing. Either
|
|
16
|
+
* legacy directory therefore stops configuration, and the error names each
|
|
17
|
+
* one with its new home. Nothing is read from the old location.
|
|
18
|
+
*
|
|
19
|
+
* @param location Absolute production directory; read, not retained.
|
|
20
|
+
* @throws Error naming every legacy directory found and where it moves.
|
|
21
|
+
*
|
|
22
|
+
* @evidence contracts/development/implementation.md#principled-implementation Directory existence under the production location is the exact signal of the retired layout, because the old tree held only production-owned families; `fs.existsSync` follows the installed filesystem, and the message is built from the same layout constants the factories use.
|
|
23
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One guard owns the migration refusal, called by createEvidenceConfig and by the narrative source assertion, so neither the configuration entry nor any contract factory carries legacy knowledge.
|
|
24
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts The guard refuses rather than falls back: no reference, probe or root reads the old location, and every legacy family found is reported in one error instead of the first alone.
|
|
25
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms Two existence probes and a message linear in the found directories.
|
|
26
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work Each configuration build observes the filesystem anew; caching would hide a migration made between builds.
|
|
27
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Synchronous probes leave no handle, task or retained state.
|
|
28
|
+
* @evidence contracts/development/common.md#meaningful-documentation States the move, why a stale layout must fail loudly, that nothing is read from the old location, and the parameter and failure.
|
|
29
|
+
*/
|
|
30
|
+
export function assertProductionContractLayout(location: string): void {
|
|
31
|
+
const moves: string[] = (["work", "language"] as const)
|
|
32
|
+
.filter((family: "work" | "language"): boolean =>
|
|
33
|
+
fs.existsSync(
|
|
34
|
+
path.join(
|
|
35
|
+
location,
|
|
36
|
+
...SKILLS_ROOT.split("/"),
|
|
37
|
+
...STORY_CONTRACTS.split("/"),
|
|
38
|
+
family,
|
|
39
|
+
),
|
|
40
|
+
),
|
|
41
|
+
)
|
|
42
|
+
.map(
|
|
43
|
+
(family: "work" | "language"): string =>
|
|
44
|
+
`${SKILLS_ROOT}/${STORY_CONTRACTS}/${family} -> ${PRODUCTION_CONTRACTS}/${family}`,
|
|
45
|
+
);
|
|
46
|
+
if (moves.length !== 0)
|
|
47
|
+
throw new Error(
|
|
48
|
+
`Production-owned contracts moved to ${PRODUCTION_CONTRACTS}; move ${moves.join(", ")} under ${location}.`,
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Expresses a directory as an Evidence reference root of one production.
|
|
5
|
+
*
|
|
6
|
+
* Native Evidence resolves a Markdown reference root against the directory of
|
|
7
|
+
* the configuration file, which is the production location, and accepts `..`
|
|
8
|
+
* segments, so a shared tree outside the production is reached by a relative
|
|
9
|
+
* path such as `../../../.agents/skills`. Separators are portable so the same
|
|
10
|
+
* configuration reads alike on every platform.
|
|
11
|
+
*
|
|
12
|
+
* @param location Absolute production directory holding `evidence.config.ts`.
|
|
13
|
+
* @param directory Absolute directory the root must reach.
|
|
14
|
+
* @returns The `/`-separated relative root, or `.` for the production itself.
|
|
15
|
+
*
|
|
16
|
+
* @evidence contracts/development/implementation.md#principled-implementation `path.relative` between two absolute directories gives the path native Evidence resolves back against the configuration directory; replacing `\` with `/` keeps Windows output portable. Directories on different Windows drives have no relative path, and Node then returns the absolute target, which passes through unchanged.
|
|
17
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One function owns the location-to-root rule for the engineering defaults and both story contract owners, instead of repeating the relative-and-normalize steps at each reference.
|
|
18
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts No root is special-cased; an empty relative path becomes `.` because an empty root names no directory.
|
|
19
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One relative-path computation and one replacement, linear in the path lengths.
|
|
20
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure path computation coordinates no work across requests.
|
|
21
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Only the returned string outlives the call.
|
|
22
|
+
* @evidence contracts/development/common.md#meaningful-documentation States how native Evidence resolves the result, the portable separators, the parameters and the `.` result.
|
|
23
|
+
*/
|
|
24
|
+
export function createReferenceRoot(
|
|
25
|
+
location: string,
|
|
26
|
+
directory: string,
|
|
27
|
+
): string {
|
|
28
|
+
const relative: string = path
|
|
29
|
+
.relative(location, directory)
|
|
30
|
+
.replaceAll("\\", "/");
|
|
31
|
+
return relative === "" ? "." : relative;
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import path from "node:path";
|
|
2
|
+
|
|
3
|
+
import type { IContractLocation } from "./IContractLocation";
|
|
4
|
+
import { SKILLS_ROOT } from "./SKILLS_ROOT";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Resolves the absolute shared skills tree holding the bundled contracts.
|
|
8
|
+
*
|
|
9
|
+
* An omitted `skills` is the standalone layout, the production's own
|
|
10
|
+
* `.agents/skills`. A supplied one must be absolute like `location`, because a
|
|
11
|
+
* relative directory would resolve against whichever process reads the
|
|
12
|
+
* configuration rather than against the production.
|
|
13
|
+
*
|
|
14
|
+
* @param contracts The production location and optional shared tree; read, not retained.
|
|
15
|
+
* @returns The absolute shared skills directory.
|
|
16
|
+
* @throws Error when a supplied `skills` is not absolute.
|
|
17
|
+
*
|
|
18
|
+
* @evidence contracts/development/implementation.md#principled-implementation Node's `path.isAbsolute` decides absoluteness for the host platform, and `path.join` builds the default from the scaffold's `.agents/skills` layout under the absolute production location.
|
|
19
|
+
* @evidence contracts/development/implementation.md#clear-and-simple-structure One function owns both the default and the absolute-path rule, so the configuration entry, the narrative assertion and every shared contract lookup agree on the shared tree.
|
|
20
|
+
* @evidence contracts/development/implementation.md#prohibited-implementation-shortcuts A relative value is refused rather than resolved against the working directory; no workspace layout is inferred from the filesystem.
|
|
21
|
+
* @evidence contracts/development/implementation.md#efficient-algorithms One absoluteness test or one path join, linear in the path length.
|
|
22
|
+
* @evidenceExclude contracts/development/implementation.md#reuse-equivalent-work A pure path computation coordinates no work across requests.
|
|
23
|
+
* @evidenceExclude contracts/development/implementation.md#bound-retention-and-release-resources Only the returned string outlives the call.
|
|
24
|
+
* @evidence contracts/development/common.md#meaningful-documentation States the standalone default, why a relative value is refused, and the parameter, result and failure.
|
|
25
|
+
*/
|
|
26
|
+
export function resolveSkillsDirectory(contracts: IContractLocation): string {
|
|
27
|
+
if (contracts.skills === undefined)
|
|
28
|
+
return path.join(contracts.location, ...SKILLS_ROOT.split("/"));
|
|
29
|
+
if (!path.isAbsolute(contracts.skills))
|
|
30
|
+
throw new Error("Evidence skills must be an absolute directory.");
|
|
31
|
+
return contracts.skills;
|
|
32
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { NarrativeLayer } from "./NarrativeLayer";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Names every authored layer: the canon the narrative layers inherit and the narrative layers themselves.
|
|
5
|
+
*
|
|
6
|
+
* Settings is the long route's canon and brief the short route's; each is a
|
|
7
|
+
* source layer with no parent of its own.
|
|
8
|
+
*
|
|
9
|
+
* @evidence contracts/development/design.md#principled-representation The union adds the two canon layers, long-route settings and short-route brief, to the three narrative layers, so dependency keys identify both the documentary parent and its adaptations.
|
|
10
|
+
* @evidence contracts/development/design.md#minimal-and-owned-surface Extending NarrativeLayer with the canon literals lets common dependency keys include canon without a separate parallel key type.
|
|
11
|
+
* @evidence contracts/development/design.md#prohibited-design-shortcuts Only the five supported layer literals are admitted; this alias supplies no runtime branch or ownership inference.
|
|
12
|
+
* @evidence contracts/development/common.md#meaningful-documentation The comment distinguishes the two canon layers, their routes and the inherited narrative layers.
|
|
13
|
+
*/
|
|
14
|
+
export type AuthoredLayer = "settings" | "brief" | NarrativeLayer;
|