@wildo-ai/dev-companion 1.1.15 → 1.1.16
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/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +165 -5
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +239 -8
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +2 -1
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -1
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +2 -1
- package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
- package/dist/esm/claude-cli/models/isolated-recheck-interference.models.d.ts +68 -0
- package/dist/esm/claude-cli/models/isolated-recheck-interference.models.d.ts.map +1 -0
- package/dist/esm/claude-cli/models/isolated-recheck-interference.models.js +198 -0
- package/dist/esm/claude-cli/models/isolated-recheck-interference.models.js.map +1 -0
- package/dist/esm/claude-cli/models/workspace-path-claims.models.d.ts +138 -0
- package/dist/esm/claude-cli/models/workspace-path-claims.models.d.ts.map +1 -0
- package/dist/esm/claude-cli/models/workspace-path-claims.models.js +204 -0
- package/dist/esm/claude-cli/models/workspace-path-claims.models.js.map +1 -0
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +20 -0
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +27 -12
- package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +155 -3
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +791 -151
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +7 -1
- package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.js +1 -1
- package/dist/esm/core/introspection/resources/creation-home-projection.companion.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts +13 -0
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js +98 -16
- package/dist/esm/core/introspection/subprocess/app-shell-placement-content.behavior.js.map +1 -1
- package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts +21 -1
- package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts.map +1 -1
- package/dist/esm/expert-personas/services/expert-persona.companion.service.js +35 -3
- package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.d.ts +62 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.js +62 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.en.js.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.d.ts +62 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.d.ts.map +1 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.js +62 -0
- package/dist/esm/i18n/components/APP_LAYOUTS_AGENT_ACTIVITY_SETTINGS.fr.js.map +1 -0
- package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +1 -1
- package/dist/esm/i18n/system_enums/workbench-build.en.js +1 -1
- package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -1
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts +23 -0
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.js +14 -0
- package/dist/esm/meta-workflows/models/carried-verification-failure.models.js.map +1 -1
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts +12 -1
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js +99 -1
- package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts +5 -0
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js +22 -1
- package/dist/esm/meta-workflows/services/application-assembly-checks.companion.utils.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +67 -20
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +344 -76
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js +9 -0
- package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +47 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js +98 -9
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +38 -2
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +176 -22
- package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts +45 -0
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js +74 -0
- package/dist/esm/meta-workflows/services/application-build-website-context.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +9 -1
- package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +64 -5
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +139 -14
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/website-demo-facts.models.d.ts +19 -1
- package/dist/esm/meta-workflows/services/website-demo-facts.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/website-demo-facts.models.js +7 -5
- package/dist/esm/meta-workflows/services/website-demo-facts.models.js.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts +2 -0
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js +3 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js.map +1 -1
- package/package.json +17 -17
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playbook-run.companion.service.js","sourceRoot":"","sources":["../../../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jD,2CAA2C;QACtE,6BAA6B;QACZ,sCAAsC;QAC9D,mCAAmC,YAIlC,kCAAkC,YAIzC,uBAAuB;GA3BxF,2BAA2B,CAqtQvC","sourcesContent":["\nimport { withApplicationDeclaredAnswers } from './declared-interview-answers.companion';\nimport { declaredLandingScopeOf, generateChoreographyStepValue } from './choreography-step-generation.companion';\nimport { composeExternalAuthenticationBrief } from './external-authentication-brief.companion.utils';\nimport { collectKnownProviderRefs, engineProviderOffers, isRegistryProviderInstalled, listRegistryProviderModules, renderProviderRegistryBrief } from './provider-registry-brief.companion.utils';\nimport { z } from 'zod';\nimport { ResearchAgentDispatchCompanionService } from '../../claude-cli/services/research-agent-dispatch.companion.service';\nimport { diffResearchEvidence, resolveResearchEvidenceDirectory, snapshotResearchEvidence } from '../../claude-cli/services/research-evidence-store.companion';\nimport * as ApplicationCreationSpecs from '@wildo-ai/saas-specifications/application-creation';\nimport { PLAYBOOK_STEP_SCHEMA_NAMESPACES } from '../models/playbook-step-schema-namespaces.models';\nimport { inject, injectable, optional } from 'inversify';\nimport {\n AI_ENGINE_CAPABILITIES,\n AI_ENGINE_CAPABILITIES_IN_THE_CONTRACTED_SERVICE,\n RecipientCategoriesNotDerivableReason,\n ENGINE_CLIENT_STORAGE_ENTRIES,\n DataRetentionClass,\n ErasureRetentionMode,\n SubjectErasureDisposition,\n SubjectErasureSeveredReferenceTreatment,\n type SubjectErasureExecutedTreatment,\n ResourceRetentionBindingSchema,\n ResourceRowLifetime,\n StatutoryRetentionGroundSchema,\n AgentWriteOversight,\n AiUseDeclarationSource,\n AiUseRiskTier,\n deriveAgentWriteOversight,\n deriveAiRegulationRegimes,\n deriveApplicationAiUses,\n enabledEngineCapabilityNames,\n ApplicationAiUsePostureSchema,\n CoreAuditableEventType,\n type AgentAiUseDeclaration,\n type AiUsePosture,\n type AiUseRiskReading,\n type ApplicationAiUse,\n type ApplicationAiUses,\n undeclaredRetentionClasses,\n vendorHostedProviderRefs,\n uninventoriedClientStorageSurfaces,\n type ApplicationAiUsePosture,\n type ApplicationClientStorageInventory,\n BillingConfigurationSchema,\n OperatorComplianceIdentityPart,\n outstandingOperatorComplianceIdentityParts,\n type ApplicationOperatingJurisdictions,\n ApplicationOperatorComplianceIdentitySchema,\n type ApplicationOperatorComplianceIdentity,\n type ServiceConsentRequirement,\n ApplicationProviderComplianceChoicesSchema,\n ApplicationRetentionScheduleSchema,\n ApplicationOperatingJurisdictionsSchema,\n type ApplicationProviderComplianceChoices,\n appAssertedProcessingRegions,\n establishedProviderComplianceProfile,\n type EstablishedProviderComplianceProfile,\n PersonalDataCategory,\n PersonalDataCondition,\n ProviderComplianceChoiceAssessment,\n ProviderProcessingRegionReachKind,\n processingRegionHoldingOf,\n type ProviderComplianceProfile,\n ProviderDeploymentModel,\n type ApplicationRetentionSchedule,\n type ClientStorageEntry,\n EngineCapability,\n deriveNextReviewOn,\n ReviewCadence,\n parseRetentionEnforcementEvidenceJson,\n type RetentionEnforcementEvidence,\n SystemOfRecordSubjectRightsPosture,\n type AuthMethodsMap,\n} from '@wildo-ai/saas-models';\nimport {\n ApplicationAuthoredDocumentFactSpecificationSchema,\n ApplicationDocumentFactSpecificationSchema,\n ApplicationProcessorRegisterSchema,\n computeApplicationDocumentFacts,\n complianceFactStaleness,\n ComplianceFactCurrency,\n processorAgreementStanding,\n computeRecipientPopulation,\n joinRecipientPopulationToRegister,\n APPLICATION_PROVIDER_PACKAGE_MANIFEST_PATHSPEC,\n applicationProviderPackagesFromManifests,\n ProviderScopeKey,\n RecipientPopulationClass,\n RecipientPopulationMemberKind,\n SystemOfRecordDataFlowKind,\n type ConditionallyHeldCategories,\n type SystemOfRecordDataFlow,\n type RecipientDisclosure,\n deriveRecipientDisclosures,\n systemOfRecordPersonalDataOriginsOf,\n systemOfRecordVendorsOf,\n typedClientSearchNeedles,\n typedClientSitesFromGrepLines,\n type ProviderTypedClientSite,\n type RecipientPopulation,\n overlayComputedDocumentFacts,\n parseAiContentGuardrailEvidence,\n type AiContentGuardrailAuditEventType,\n type AiContentGuardrailEvidence,\n type ApplicationAiUseInventoryInput,\n ProcessorRegisterEntryKind,\n processorProcessingRegions,\n registerEstablishesNoProcessorRecipients,\n type ApplicationProcessorRegister,\n type ComputedDocumentFactAnswer,\n type ResourceErasureTreatment,\n type ResourceRetentionBindingFact,\n MetaWorkflow_ContextSource,\n ApplicationCodeSurface,\n collectComplianceDocumentFactAvailability,\n deriveComplianceRegimes,\n type ComplianceDocumentFactAvailability,\n type RequiredDocumentSetInput,\n resolveApplicationOrganizationStructure,\n type ApplicationOrganizationStructure,\n ApplicationLineDeclarationState,\n type ApplicationLineDeclaration,\n} from '@wildo-ai/saas-specifications/application-creation';\n\nimport {\n AssuranceEvidenceJudgementVerdict,\n AssuranceEvidenceRunKind,\n AssuranceEvidenceRunSchema,\n deriveBrandNameTrademarkSignal,\n deriveCapabilitySignal,\n deriveChatCommandExposureSignal,\n deriveMcpExposureSignal,\n derivePersonalDataSignals,\n deriveProviderHostingSignal,\n deriveRetentionSignal,\n type AssuranceEvidenceRun,\n type DerivedRiskSignal,\n} from '@wildo-ai/saas-specifications/assurance';\nimport { existsSync, readdirSync, readFileSync } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { importLandedTypeScriptModule } from './landed-module-import.companion';\nimport * as path from 'node:path';\nimport { join } from 'node:path';\n\nimport { loadDraftFamilyValues } from '../../core/context/draft-family-values.companion';\nimport { InFlightWorkHeartbeat } from '../../core/runtime/in-flight-work-heartbeat.companion';\nimport { companionRestartDrain } from '../../core/runtime/restart-drain.companion';\nimport { gitReadBroker } from '../../core/utils/git-read-broker.companion';\nimport { getFrameworkKnowledgePlaybook, listFrameworkKnowledgePlaybooks, listFrameworkKnowledgeSkillSummaries, readCompiledResearchInformedContent, readFrameworkKnowledgeSkillBody } from '@wildo-ai/framework-knowledge';\nimport {\n MetaWorkflow_EvaluationTreatmentDefinitionSchema,\n MetaWorkflow_EvaluationVerdict,\n MetaWorkflow_Executor,\n MetaWorkflow_ClarificationAction,\n} from '@wildo-ai/saas-models/meta-workflows';\nimport {\n APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS,\n composeElicitationSection,\n dispatchOutcomeStepRef,\n BUILD_DECOMPOSE_INPUT_FAMILIES,\n STANDARD_APPLICATION_SPECIFICATION_SEMANTIC_AUTHORITY,\n evaluatePlaybookCatalogEligibility,\n buildApplicationCoherenceReport,\n collectHeldDraftUndeclaredFactCitations,\n composeAssuranceDocumentBlueprintBrief,\n composeAssuranceDocumentFactObligationsBrief,\n renderAssuranceDocumentClaimGuardsForJudge,\n composeAssuranceEvidenceBrief,\n composeAuthoredDocumentFactsBrief,\n composeAssuranceProgramAuthorityBrief,\n composeApplicationRoleGraphBrief,\n deriveOneFamilyFreshness,\n resolveStepOutputSchema,\n runPlaybookChoreography,\n countCheckpointedRounds,\n type PlaybookChoreographyCheckpoint,\n PlaybookChoreographyStopReason,\n describeStaleOutput,\n describePlaybookRerun,\n measureChangedAspects,\n type PlaybookChoreographySelectionPort,\n PlaybookLaneBoundaryDecision,\n collectPlaybookLaneBoundaries,\n isJudgeVerdictStepRef,\n type PlaybookChoreographyChildResult,\n type PlaybookChoreographyResult,\n type PlaybookFamilyGitFreshness,\n type PlaybookLandingHistory,\n buildPlaybookReviewGuide,\n evaluatePlaybookEligibility,\n applicationLineRefusalOf,\n getFamilyPackageRelativePath,\n resolvePlaybookOutputLandingTarget,\n resolveDeclaredSetMembers,\n getLandableArtifactFamilies,\n isPlaybookGenerationSuspension,\n renderApplicationCoherenceReport,\n renderDeclaredInputFamily,\n composeDeclaredInputWithheldAspects,\n composeMarketFitScoresSection,\n composeRiskSignalsSection,\n widenDeclaredInputAspects,\n ARTIFACT_PRESENT_WITHOUT_VALUE,\n collectConvenedExpertRoles,\n committedCharterRoleRefs,\n partitionUnstaffedExpertRoles,\n rederivableExpertRoleRefs,\n type DeclaredInputFamilyRendering,\n type DeclaredInputWithheldAspects,\n renderPlaybookReviewGuide,\n runPlaybookGeneration,\n readPlaybookOutputLandingBaselines,\n PlaybookOutputLandingConflictError,\n PlaybookOutputLandingHeldError,\n SpecificationWriteRefusedError,\n writeSpecificationFileAtomicallySync,\n type SpecificationWriteBasis,\n DEFAULT_MAXIMUM_CLARIFICATION_ROUNDS,\n accumulateClarificationRequests,\n validateClarificationAnswers,\n composeClarificationAnswersSection,\n type ApplicationCoherenceHostFacts,\n type ApplicationCoherenceOrganizationConfiguration,\n type ApplicationCoherenceReport,\n type PlaybookClarificationAnswer,\n type PlaybookClarificationRequest,\n type PlaybookGenerationSuspension,\n runPlaybookJudge,\n runPlaybookLoop,\n type PlaybookElicitationAnswer,\n type PlaybookLoopResult,\n type PlaybookArtifactState,\n type PlaybookEligibility,\n type PlaybookGenerationRequest,\n PlaybookGenerationPurpose,\n type PlaybookStructuredGenerationPort,\n type PlaybookJudgeResult,\n type PlaybookJudgeSubject,\n type PlaybookExportWiringRecord,\n type PlaybookOutputLandingRecord,\n type RunPlaybookGenerationResult,\n composeBillingCommercialModelBrief,\n composeOperatingJurisdictionCoverageBrief,\n composeOperatingJurisdictionsSection,\n composeCreatorStatedFactsSection,\n type ApplicationBillingDeclaration,\n projectPlaybookElicitationAsDecision,\n answersNoLongerOffered,\n materializeElicitationOptions,\n readAnswersForPlaybookQuestions,\n readNonAnswersForPlaybookQuestions,\n resolveElicitationAnswers,\n resolveElicitationNonAnswers,\n buildCreatorInputLatestReadAnswerByPlaybook,\n type PlaybookLatestReadAnswer,\n resolveApplicationLineScope,\n collectFamiliesDeactivatedByDecisions,\n isFamilyNotApplicable,\n type PlaybookApplicationLineScope,\n type PlaybookDeactivatedFamily,\n describeApplicationActiveSet,\n type ApplicationActiveSet,\n narrowRefinementRound,\n refinementDependencyMaps,\n LANDED_SPECIFICATION_CONSTANT_PREFIX,\n findReadersDatedByWaitingInterviews,\n selectInterviewsWaitingOnThePerson,\n readInterviewDepthFromState,\n PlaybookRerunKind,\n type PlaybookDatedByWaitingInterview,\n} from '@wildo-ai/application-creation-runtime';\n// The provider REGISTRY, not the engine map: importing the package root runs its bootstrap, which\n// registers the engine specifications, and an application's own registered provider specifications\n// join the same registry — so one accessor covers both authorities.\nimport {\n listRegisteredProviderSpecifications,\n SpecificationUnavailableError,\n unprovenAbsences,\n} from '@wildo-ai/saas-specifications';\nimport type { ActorExecutionOpenRequest, ActorExecutionRunOptions, ActorExecutionSuspensionRequest, ActorsSystemBackendService, AgentsBackendService, AppConfigurationService, ContentSafetyBackendService, LoggerService } from '@wildo-ai/saas-backend-lib';\nimport {\n companionScreeningVerdicts,\n screenResearchInformedRenderings,\n screenResearchInformedFamilyValues,\n screenResearchInformedInputSections,\n screenResearchInformedJudgeSubjects,\n screenResearchStepValue,\n type RenderedInputFamilySection,\n type ResearchInformedFamilyScreeningHost,\n type ScreenedResearchStepValue,\n} from './build-brief-third-party-screening.companion';\nimport { researchInformedFamilies } from '../models/build-brief-content-trust.models';\nimport { actorExecutionSuspensionRef, isActorExecutionNotSuspendedError, isActorExecutionSubjectBusyError, describeCaughtError } from '@wildo-ai/saas-backend-lib';\nimport { EXPERT_STAFFING_PLAYBOOK_REF } from '../../deliberations/models/stale-expert-seats-refusal.models';\nimport { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';\nimport { getCompanionServedLanguages } from '../../core/config/primary-language.companion.utils';\nimport type { AgentTraceContext, FlowsActors_Agent_Invocation, HumanDecision_Request, ModelProviderAccountRefusal } from '@wildo-ai/saas-models';\nimport {\n partitionCapabilitiesByContractedService,\n secondaryLineDefinitionOfEntry,\n type ApplicationPlaybookActivation,\n ApplicationSpecificationFamily,\n JourneyArtifactValidationState,\n MetaWorkflowPlaybookSchema,\n playbookInstanceId,\n type ApplicationCreatorInputs,\n type MetaWorkflow_Phase,\n type MetaWorkflowPlaybook,\n} from '@wildo-ai/saas-specifications/application-creation';\nimport {\n LLMProvider_GenerateStructuredInputSchema,\n LLMProvider_GenerateStructuredOutputSchema,\n describeStructuredValidationIssue,\n readCodingModelDestinations,\n readStructuredGenerationFailure,\n} from '@wildo-ai/external-connectors-models';\n\nimport { discoverSaasProviderCompanionContributions, loadSaasConfig, readBuildParallelism, resolveProviderComplianceProfiles } from '@wildo-ai/platform-config-lib';\nimport { StructuredDeliberationCompanionService } from '../../deliberations/services/structured-deliberation.companion.service';\nimport {\n PlacementPlanSchema,\n collectRevertedPlacementRevisions,\n deriveDomainPlanSystemOfRecordPartitionFields,\n type DomainPlanSystemOfRecordPartitionFields,\n} from '@wildo-ai/saas-specifications/application-creation';\nimport { loadEffectiveSystemOfRecordFacets, rereadDeclaredSystemOfRecordInstances, systemOfRecordFacetPartitionsByVendor, type SystemOfRecordInstanceFacetRequest } from './system-of-record-facet-library.companion.utils';\nimport {\n ApplicationSchemaPlanObligation,\n assessApplicationSchemaPlanObligation,\n} from '../../core/config/application-schema-plan-obligation.companion.utils';\nimport { composeEngineSettingsDestinationLines } from './engine-settings-destination-catalog.companion';\nimport { renderOrganizationConfigurationBrief, type OrganizationConfigurationBriefInput } from './organization-configuration-brief.companion.utils';\nimport { renderOrganizationIdentityBrief, type OrganizationIdentityBriefSource } from './organization-identity-brief.companion.utils';\nimport type { OrganizationIdentityDeclarationReading } from '../../core/introspection/subprocess/organization-identity-declaration.behavior';\nimport { composeEnabledApplicationSurfaceLines } from './application-enabled-surface-brief.companion.utils';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport { holdsWrittenBytes, PlaybookRunWriteRegisterCompanionService, type PlaybookRunLandingWindow } from './playbook-run-write-register.companion.service';\nimport {\n ApplicationBuildDispatchCompanionService,\n ApplicationBuildWaveInFlightError,\n describeBuildWaveHoldsForSelector,\n type BuildStopReleaseDoor,\n type ApplicationBuildDispatchResult,\n type ApplicationBuildWaveResult,\n} from './application-build-dispatch.companion.service';\nimport { resolveApplicationAssemblyCheckRefs } from './application-assembly-checks.companion.utils';\nimport type { ApplicationCodingTaskSettledOutcome } from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport { GitChangeSetCompanionService } from '../../claude-cli/services/git-change-set.companion.service';\nimport { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport { FoundationExecutorCompanionService, type FoundationExecutionResult } from './foundation-executor.companion.service';\nimport {\n CAPABILITY_COMPOSITION_PLAYBOOK_REF,\n CapabilityCompositionExecutorCompanionService,\n type CapabilityCompositionExecutionResult,\n} from './capability-composition-executor.companion.service';\nimport {\n APPLICATION_MATURITY_PLAYBOOK_REF,\n ApplicationMaturityExecutorCompanionService,\n type ApplicationMaturityExecutionResult,\n} from './application-maturity-executor.companion.service';\nimport { ExpertPersonaCompanionService } from '../../expert-personas/services/expert-persona.companion.service';\nimport { renderBrandDerivedLookForJudge } from '../../brand/services/brand-design.companion.utils';\nimport { LOGO_PANEL_ROLE_REFS } from '../../brand/services/logo-deliberation.companion.service';\nimport { readCompiledApplicationLineCatalog } from '../models/application-line-catalog.models';\nimport { CodingAgentDispatchCompanionService } from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport {\n PlaybookChoreographyCheckpointContextSchema,\n PlaybookRunCheckpointKind,\n PlaybookRunSuspensionCheckpointSchema,\n SuspendedPlaybookRunNotFoundError,\n SupersededPlaybookRunQuestionError,\n projectPlaybookClarificationAsDecision,\n APPLICATION_CREATION_AUTONOMY_POSTURE,\n LaneBoundaryTreatment,\n laneBoundaryTreatmentFor,\n projectLaneBoundaryAsDecision,\n type PlaybookChoreographyCheckpointContext,\n type PlaybookChoreographyProgressContext,\n type PlaybookRunSuspensionCheckpoint,\n type SuspendedPlaybookRunSummary,\n} from '../models/playbook-run-checkpoint.models';\nimport { humanDecisionSettler } from '../models/human-decision-settler.models';\nimport {\n CompositeRoundRelaunchDecision,\n compositeRoundMayRelaunch,\n compositeRoundRelaunchReadsBuildProgress,\n decideCompositeRoundRelaunch,\n} from '../models/composite-round-relaunch.models';\nimport { BuildResumeTargetKind, deriveBuildResumeTarget, mergeBuildResumeTargets, type BuildResumeTarget } from '../models/build-resume-target.models';\nimport { awaitModelProviderRecovery, isEnvironmentalPlaybookFailure, readPlaybookFailureProviderAccountRefusal } from '../models/playbook-loop-environment.models';\nimport { findOverlappingRootRuns, projectLastPlaybookLoop, projectPlaybookRunRecords, readPlaybookRunMeasurement, type PlaybookLoopRunRecord, summarizePlaybookLoopResult, summarizePlaybookRunResult, type PlaybookRunMeasurement, type PlaybookRunOverlap, type PlaybookSettledRunRecord } from '../models/playbook-run-record.models';\n// The playbook a build WAVE runs as (#2208): any CODING_AGENT-tier playbook runs a wave, and this is the one the build console starts.\nimport { BUILD_WAVE_PLAYBOOK_REF, PLAYBOOK_SPEND_NOT_OBSERVED, mergePlaybookSpend, type PlaybookChoreographyReopenedChild } from '@wildo-ai/application-creation-runtime';\n// The maturity reading, derived live for the drive's requirements standing (#3701), from the inputs its executor lands.\nimport { deriveApplicationMaturity, type ApplicationMaturityConfigurationFacts, type ApplicationMaturityInputs } from '@wildo-ai/application-creation-runtime';\nimport { listRequirementOpenItems } from '@wildo-ai/saas-specifications/application-creation';\nimport { PlaybookSpendMeterCompanionService } from './playbook-spend-meter.companion.service';\nimport { DossierCompanionService } from './dossier.companion.service';\nimport { proposeInterviewAnswers, type InterviewAnswerProposalPorts } from './interview-answer-proposal.companion';\nimport {\n INTERVIEW_ANSWER_PROPOSER_REF,\n type InterviewAnswerAssumptionOutcome,\n type InterviewAnswerAssumptionRequest,\n} from '@wildo-ai/application-creation-runtime';\nimport { CompanionExecutionsListQuerySchema } from '../../companion-api/companion-api.schemas';\nimport { CompanionTraceabilityLevel, type CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';\nimport { CompanionTraceabilityService } from '../../core/traceability/companion-traceability.service';\nimport { createPlaybookExecutionTrace } from './playbook-execution-trace.companion.service';\nimport type { CompanionContext } from '../../core/context/companion-context';\n// The backend's data slots come from an introspection worker (#3268): a playbook run after a sibling rebuild no longer\n// re-imports the backend's companion graph into this process.\nimport { loadBackendCompanionData } from '../../core/context/companion-package-loaders.companion';\nimport { loadSpecificationFamilyData, readSpecificationFamiliesWholeValueBasis } from '../../core/context/specification-family-data.companion';\nimport {\n choreographyEndedByEnvironment,\n isApplicationPackageNotCompiledFailure,\n isEnvironmentalChoreographyChildFailure,\n isInfrastructureShapedAgentFailure,\n waitForApplicationPackagesPublished,\n waitForDevCompileQuiet,\n} from '../../core/runtime/dev-compile-quiet.companion';\nimport { META_WORKFLOWS_CORRELATION_DOMAIN, MetaWorkflowsExclusiveSubject, compositeExclusiveSubject, isCompositeExclusiveSubject, META_WORKFLOWS_PLAYBOOK_LOOP_ACTOR_REF, META_WORKFLOWS_PLAYBOOK_RUN_ACTOR_REF, META_WORKFLOWS_STRUCTURED_ARTIFACT_GENERATOR_AGENT_REF, META_WORKFLOWS_SYSTEM_REF, META_WORKFLOW_TRACE_STEP_KIND, PLAYBOOK_RUN_PHASE_TRACE_STEP_KIND } from '../models/meta-workflows-lane.models';\nimport { Actor_Task_Topics, AppFrontendType, FlowsActors_Status, HumanDecision_RequesterKind, HumanDecision_RouteKind } from '@wildo-ai/saas-models';\nimport { WorkbenchTaskCorrelationRef, Workbench_PlaybookRunOutcomeStatus, type CreationDrive_RequirementsStanding } from '@wildo-ai/platform-core-shared';\nimport { CompanionExecutionsCompanionService } from '../../executions/services/companion-executions.companion.service';\nimport { BRIEF_ADEQUACY_JUDGE_AGENT_REF, BriefAdequacyVerdict, BriefAdequacyVerdictOutputSchema } from '../models/brief-adequacy.actors-system.definitions';\n\n/** How much of a FAILED verification check's output a run result carries: the end, where compilers and crashes report. */\nconst VERIFICATION_CHECK_OUTPUT_TAIL_CHARS = 4000;\n\n/**\n * The runtime's checkpoint ↔ the row's context, RECURSIVELY (#1497).\n *\n * A lane in flight checkpoints through its parent, so a parent's snapshot carries the lane's under\n * `nested`. Two converters rather than two inline spreads, because the shape is the same at every\n * level and a mapping written once per level drops the level it forgot — the outer run resumes, the\n * lane inside it starts over, and nothing says so.\n */\nfunction choreographyProgressToContext(snapshot: PlaybookChoreographyCheckpoint): PlaybookChoreographyProgressContext {\n return {\n playbookRef: snapshot.playbookRef,\n goal: snapshot.goal,\n completedIterations: snapshot.completedIterations,\n stepResults: snapshot.stepResults.map(([ref, value]) => ({ ref, value })),\n delivered: [...snapshot.delivered],\n ...(snapshot.reopened && snapshot.reopened.length > 0 ? { reopened: [...snapshot.reopened] } : {}),\n ...(snapshot.nested && snapshot.nested.length > 0 ? { nested: snapshot.nested.map(choreographyProgressToContext) } : {}),\n };\n}\nfunction choreographyProgressFromContext(context: PlaybookChoreographyProgressContext): PlaybookChoreographyCheckpoint {\n return {\n playbookRef: context.playbookRef,\n goal: context.goal,\n completedIterations: context.completedIterations,\n stepResults: context.stepResults.map((entry) => [entry.ref, entry.value] as const),\n delivered: context.delivered,\n ...(context.reopened && context.reopened.length > 0 ? { reopened: context.reopened } : {}),\n ...(context.nested && context.nested.length > 0 ? { nested: context.nested.map(choreographyProgressFromContext) } : {}),\n };\n}\n\n/**\n * Run one compiled playbook: brief the model against the family's own schema, then land the answer as\n * specification FILES in the application's specifications package.\n *\n * ## What this host owns, and what it deliberately does not\n *\n * It owns the three things only a host can answer — WHICH playbook (the compiled Framework Knowledge\n * catalog), WHERE the specifications package is (the companion context), and HOW a model call is made\n * (the engine's agent runtime, which resolves the provider, its key, its rate limiter and its trace sink).\n *\n * Everything else — resolving each family's validator, constraining the output to its schema, retrying a\n * rejection with the validator's own findings, refusing before spending, and the generate-all-then-land\n * ordering — belongs to `runPlaybookGeneration` in `@wildo-ai/application-creation-runtime`, so it is\n * testable with a literal value and no provider at all.\n *\n * ## Nothing here accepts anything\n *\n * Files appear in the working tree, and the run itself accepts none of them. Acceptance is a commit\n * (`.claude/rules/one-source-of-truth.md`, rules 2 and 3): made by a person, or under the autonomy posture\n * by the companion before the next build baseline, authored as itself (#1534). There is no receipt, no manifest entry and no\n * acceptance ceremony, and a run that is thrown away costs a re-run and no fact about the application.\n */\n/**\n * Families read as FILE PRESENCE when the app's companion exports carry no value for them.\n *\n * Both now HAVE a companion-exports slot (`domainPlanSpecification`, `buildPlanSpecification`), but an\n * application that landed the file without wiring the export yet — the state right after a playbook run,\n * before the human's commit-and-wire pass — still deserves a truthful `artifact_exists`. Listing them\n * explicitly, rather than scanning the directory, keeps \"which families exist\" a stated fact instead of a\n * property of whatever happens to be on disk.\n */\nconst FILE_ONLY_ARTIFACT_FAMILIES: readonly string[] = Object.freeze(['domain-plan', 'build-plan']);\n\n/**\n * What the CODING_AGENT tier hands its judge as the judged subject.\n *\n * NOT an artifact family: a coding dispatch lands nothing into the specifications package, so there is no\n * family to name. `runPlaybookJudge` types its subjects' `family` as a free string and renders it as the\n * evidence heading, and this is that heading — declared once, so the one place it is written is the one\n * place its meaning can be explained.\n */\nconst SETTLED_CODING_RUN_JUDGE_SUBJECT = 'settled-coding-run';\n\n/**\n * Where this process says \"a playbook run is still working\", app-root-relative.\n *\n * The dev supervisor holds a restart while a coding run holds the workspace-mutation lock. That lock\n * belongs to the AGENT and is released the moment its turn ends — while the run itself keeps going:\n * it awaits the settlement, asks the evaluation treatment's judge for a verdict (a model call), and\n * writes the outcome. Measured twice on 2026-09-16, the supervisor logged\n * `Releasing held restart after 21s (NO_LOCK)` at exactly that moment and killed the companion inside\n * the tail, leaving the agent's files on disk with no recorded outcome and no verdict — the work kept,\n * the evidence lost.\n *\n * So the run carries its own liveness signal, refreshed while any playbook run is in flight —\n * detached OR not (the second only since 2026-09-27; see `playbookExecutionsInFlight`) — and\n * removed when none is. A COPY of `PLAYBOOK_RUN_HEARTBEAT_RELATIVE_PATH` in\n * `scripts/dev-orchestrator/runtime-supervisor-lifecycle.mjs`, which cannot import this source.\n *\n * The coding agents a run dispatches carry a signal of their own (`CODING_RUN_HEARTBEAT_RELATIVE_PATH`\n * in the coding-agent dispatch service), because a CONCURRENT coding run holds no lock at all.\n */\nconst PLAYBOOK_RUN_HEARTBEAT_RELATIVE_PATH = '.wildo-saas/state/playbook-run.heartbeat';\n\n/**\n * How often that file's mtime is refreshed. The supervisor judges it stale at three times this\n * (`PLAYBOOK_RUN_HEARTBEAT_STALE_MS`), so a companion that dies stops holding anything within a few\n * seconds rather than forever.\n */\nconst PLAYBOOK_RUN_HEARTBEAT_INTERVAL_MS = 5_000;\n\n/** One detached (async-submitted) run's outcome — the poll answer for #265's envelope fix. */\nexport interface PlaybookDetachedRunRecord {\n /**\n * WHICH submission this is. Minted per submission and returned by it, because the records are kept\n * one per playbook instance: without an identity, \"the run I submitted has finished\" and \"the PREVIOUS\n * run's record is still sitting here\" are the same bytes, and a caller that polls `lastCompleted`\n * for a ref reads the wrong outcome as its own. Measured 2026-09-16: a poller submitted a run and\n * two seconds later read the previous run's record — startedAt three minutes earlier — as the\n * answer, while its own run was still executing and visible in `runningDetached`.\n */\n readonly runId: string;\n readonly playbookRef: string;\n /** The playbook INSTANCE (#1609); absent for the default instance. The records are kept one per instance. */\n readonly instanceKey?: string;\n readonly startedAt: string;\n readonly finishedAt: string;\n /**\n * A composite only: which ROUND of its chain this run was, and what ended or continued the chain\n * after it (#1542). `relaunch` means the next round was submitted; anything else is why it stopped.\n */\n readonly chain?: { readonly round: number; readonly decision: CompositeRoundRelaunchDecision };\n /** The trace session the run recorded under, when the request carried one — the explicit join a reader needs (#1358). */\n readonly traceSessionId?: string;\n readonly ok: boolean;\n /** Present when ok — the same envelope the synchronous route would have returned. */\n readonly result?: unknown;\n /** Present when not ok — the failure, named (never \"[object Object]\"; see the ACP rejection fix). */\n readonly error?: string;\n /**\n * Present when the run SUSPENDED to ask the creator rather than finishing.\n *\n * **`ok` is TRUE for such a run, and that is not a bug — it is why this field has to exist.** `ok`\n * records whether the run threw, and a suspension does not throw: nothing failed, nothing was\n * generated, and nothing was written. But `lastCompleted` with `ok: true` is read by every caller\n * as \"it finished\", so a run waiting on a person was reported as a green completed run — the single\n * most misleading state the poll could produce, because the operator's correct next action (answer\n * it) looks like no action at all.\n *\n * Flipping `ok` to false was the obvious alternative and is worse: it would make every\n * failure-detecting reader report a FAILURE for a run that is merely waiting, trading a false\n * success for a false alarm. The honest shape is a third state, and a reader that has not been\n * taught about it still sees a truthful `ok`.\n */\n readonly awaitingCreatorInput?: {\n /** The suspended-run handle the resume route takes — NOT this record's `runId`, which is the submission's. */\n readonly runId: string;\n readonly family: string;\n readonly round: number;\n };\n}\n\n/**\n * Does this playbook DECLARE the given derived context section?\n *\n * Replaces four frozen `readonly string[]` constants that named which playbook refs got which brief\n * section (and which could suspend to ask the creator). Each was a capability reachable only by\n * editing this service — the shape the composite work exists to end. Their rationale did not\n * disappear with them: it moved onto the playbook that now declares the section, which is where a\n * reader looking at that playbook will find it.\n *\n * The brief already composed its `inputs` and `elicitation` sections from declarations, so three of\n * its five sections were declared and three were hardcoded. Now all five are.\n */\nfunction playbookDeclaresContextSource(\n playbook: MetaWorkflowPlaybook | undefined,\n source: MetaWorkflow_ContextSource,\n): boolean {\n return (playbook?.method?.contextSources ?? []).includes(source);\n}\n\n/**\n * The application-wide verification a `DETERMINISTIC_CLI` playbook runs, per playbook ref.\n *\n * The HOST owns the mapping, not the playbook, and that is the same rule\n * `APPLICATION_CODING_TASK_VERIFICATION_CATALOG` already states for coding tasks: *\"a task contract\n * names semantic check references, not commands. Translating a new ref into executable process\n * arguments is application-host work that must be reviewed here.\"* A playbook naming its own\n * commands would be an authored surface that can spawn a process, which is a much larger admission\n * than this tier needs.\n *\n * An unmapped ref is REFUSED rather than defaulted. A default check set would make a new\n * `DETERMINISTIC_CLI` playbook silently verify something nobody chose — which is the exact shape of\n * the defect #119 closed, where an unhonoured tier fell through and produced a result the\n * declaration never asked for.\n *\n * Why these checks: topic 7 asks whether the built application ASSEMBLES, so the unit is EVERY workspace\n * package the application has, not the one package a coding task happened to touch. The\n * dispatch lane already typechecks the mutated package per task; this is the whole-app question that\n * no per-task check can answer, which is why it is not a duplicate of a live check.\n *\n * `check:schema-plan-in-sync` joined them on 2026-09-07 because \"it compiles\" and \"it can start\" are\n * different questions and only the first was being asked. On a PostgreSQL-backed application a table\n * is built by a MIGRATION and by nothing else, so a resource whose migration was never generated\n * typechecks green in every package and then refuses to boot with\n * `postgresql_table_schema_mismatch`. A typecheck structurally cannot see it: there is no type in\n * the program that knows whether a table exists. It is deliberately LAST — a drift report is most\n * readable once the compile questions are settled — and it is safe on every application, MongoDB\n * included, because its three-way outcome is resolved in the check itself rather than by an exit\n * code (see `runSchemaPlanDriftVerification`).\n *\n * `check:resources-registry-init` (#2404) asks the other start-time question offline on every database: does every\n * resource configuration build, as the backend's startup builds them. The schema-plan gate builds the same registry,\n * but only on an application that owes migrations, so a MongoDB application's refused configuration went unasked.\n *\n * `check:specification-exports` (#3210, #3211) asks whether the specifications package still EVALUATES as the\n * companion evaluates it: a task that typechecked can leave a specification its factory refuses, and a later task can\n * make an earlier one untrue (an enum member it names, removed). A typecheck cannot see a factory's refusal, and the\n * companion drops a refused specification and keeps serving, so without this check nothing at the end of a build would\n * say one is missing. It runs before the registry construction, as `deriveApplicationAssemblyCheckRefs` orders it.\n *\n * `check:website-demo-facts` (#2784) asks whether the website's drawn demos are still true of the application: a website\n * task checked its own when it landed, and a later resource change can make one untrue with no website task to notice.\n */\nconst DETERMINISTIC_CLI_VERIFICATION_CHECKS: Readonly<Record<string, (saasRoot: string | undefined) => readonly string[]>> = {\n /*\n * DERIVED from the application's packages (#2222). This was a list of the four packages every application has,\n * and it went stale the day `website` and `technical-doc` packages became composable (#1490): the question\n * \"does the application assemble\" skipped a website that did not compile (`app-creation-test-004`).\n */\n 'bottom_up.assemble-verify': resolveApplicationAssemblyCheckRefs,\n};\n\n/** A refusal on a failing module as the landing's own refusal, so a lane reads it as held rather than on its merits (#3258). */\nfunction heldOnAFault(playbookRef: string, error: unknown): unknown {\n if (!(error instanceof SpecificationWriteRefusedError) || error.unevaluatedModules.length === 0) return error;\n return new PlaybookOutputLandingHeldError(playbookRef, error.unevaluatedModules, error.message);\n}\n\n/** Where every landing refreshes the cross-family coherence report, in the specifications package. */\nconst COHERENCE_REPORT_PACKAGE_RELATIVE_PATH = 'src/COHERENCE.md';\n\n/** The zero-output playbook the composite foundation executor owns (J-2 item 2). */\nconst FOUNDATION_PLAYBOOK_REF = 'bottom_up.foundation';\n\n/**\n * The playbook that STAFFS the expert panels (#572). Runner-owned like foundation: the run short-circuits into the\n * companion's expert-persona derive → accept flow before any brief is composed. Since 0.2.0 it declares the family it\n * lands (`expert-personas`, #2421), which only this flow writes: the runtime's `HOST_WRITTEN_ARTIFACT_FAMILY_WRITERS`\n * names this step as its writer, so the readiness check admits it.\n */\nconst EXPERT_PERSONAS_PLAYBOOK_REF = 'top_down.expert-personas';\n\n/**\n * The expert panels a COMPANION step convenes, beyond the catalog's declared ones: the logo step's (#572). It shapes\n * a mark from the brand, so a line where the brand does not apply convenes it never. Read by the staffing run and,\n * through the artifact state, by the board's staffing standing (#2462): one answer for both.\n */\nfunction hostExpertConveners(lineScope: PlaybookApplicationLineScope | undefined): ReadonlyArray<{ readonly label: string; readonly roleRefs: readonly string[] }> {\n return isFamilyNotApplicable(lineScope, ApplicationSpecificationFamily.BRAND_BRIEF) ? [] : [{ label: 'generation-step:logo', roleRefs: LOGO_PANEL_ROLE_REFS }];\n}\n\n\n/**\n * What a `top_down.expert-personas` run did — the panels' staffing, role by role.\n *\n * `landed` carries the specifications-package paths the accept step wrote (charter modules, the\n * aggregator, the wired `companion-exports.ts`), so the loop's landed projection and the write records\n * see the same files a generation landing would report.\n */\nexport interface ExpertPersonasExecutionResult {\n readonly playbookRef: typeof EXPERT_PERSONAS_PLAYBOOK_REF;\n readonly staffed: true;\n readonly dryRun?: true;\n /** Every role the catalog convenes, with who convenes it. */\n readonly roster: ReadonlyArray<{ readonly roleRef: string; readonly convenedBy: readonly string[] }>;\n /** Roles whose charter is committed and current — left alone. */\n readonly alreadyCommitted: readonly string[];\n /**\n * Committed roles this run derived again because a shaping input changed after their charter (#2819), each with the\n * inputs that moved. A drifted role that is still waiting, or was refused, is reported there instead.\n */\n readonly rederived?: ReadonlyArray<{ readonly roleRef: string; readonly changedInputs: readonly string[] }>;\n /**\n * Drifted charters a person edited (#2819): left alone, because the accept step never overwrites a human edit, and\n * named so the person can merge the moved inputs by hand.\n */\n readonly driftedEdited?: ReadonlyArray<{ readonly roleRef: string; readonly changedInputs: readonly string[] }>;\n /** Roles derived and accepted by THIS run, with the critique protocol's pass count. */\n readonly derived: ReadonlyArray<{ readonly roleRef: string; readonly charterModulePath: string; readonly passes: number; readonly critiqueVerdict: string }>;\n /** Roles this run could not derive yet, and the families they wait on. Re-run when they land. */\n readonly waiting: ReadonlyArray<{ readonly roleRef: string; readonly missingFamilies: readonly string[] }>;\n /**\n * Roles whose derive or accept refused (a human-edited charter, an invalid set), with the reason; the other roles are\n * still staffed. Two refusals end the run instead (#3204): an environmental fault (a provider account's refusal, a\n * lost network) is rethrown at the role that met it, and a run that staffed none of the roles it attempted throws\n * {@link ExpertPersonasStaffingRefusedError}, which carries these entries.\n */\n readonly refused: ReadonlyArray<{ readonly roleRef: string; readonly reason: string }>;\n readonly landed: readonly string[];\n /**\n * The run's handle in the write register, present when this run landed a charter and its writes were recorded\n * (#2421 #2422 #2419): `wildo creation accept <runId>` commits them, `revert` undoes them, and the recorded\n * landing is what dates the step for the rerun verdict. Absent on a dry run and on a run that landed nothing.\n */\n readonly runId?: string;\n readonly accepted: false;\n}\n\n/**\n * A staffing run that attempted roles and staffed none of them (#3204): every role it set out to derive was refused.\n *\n * One role's refusal still costs no other its charter, and a run that staffed any role completes. But a run that staffed\n * NONE did not do what it was offered for, and settling it `ok` with nothing landed made the lane offer it again over the\n * same state until its ceiling: reference run 42120979649 ran it twelve times in a row. As a failure, the lane's repeat\n * rule applies (two identical failures over the same reads, then withheld), and the reasons reach the run's record.\n */\nexport class ExpertPersonasStaffingRefusedError extends Error {\n public readonly refused: ExpertPersonasExecutionResult['refused'];\n\n public constructor(refused: ExpertPersonasExecutionResult['refused']) {\n super(`${EXPERT_PERSONAS_PLAYBOOK_REF} staffed none of the ${refused.length} role(s) it attempted: `\n + refused.map((entry) => `${entry.roleRef}: ${entry.reason}`).join('; '));\n this.name = 'ExpertPersonasStaffingRefusedError';\n this.refused = refused;\n }\n}\n\n/**\n * The prefix every landed constant is named with — `applicationVisionSnapshot`, and the rest.\n *\n * Named once because two sites must agree: the generation run that WRITES a landed module, and the\n * reader that imports one back to find out what the application already holds. They resolve the same\n * landing target, so a divergence would look for a constant nothing writes.\n *\n * It is deliberately NOT derived from the application's name (`wonder-todos` → `wonderTodos`), which\n * would bake app identity into exported identifiers — app identity lives in VALUES, never in the\n * names of landed exports.\n */\nconst LANDED_CONSTANT_PREFIX = LANDED_SPECIFICATION_CONSTANT_PREFIX;\n\n/** Marker for \"the file is there, its value is not readable from here\". Never confused with real content. */\n/**\n * The governed documents the FACT producer is briefed on — the only document set this runtime still\n * names, and a different question from which documents a lane may draft.\n *\n * Drafting moved to `method.draftableDocumentDefinitionRefs` on the playbook (#1453): a lane is\n * defined by its documents, so the declaration belongs with the methodology and not here, and a\n * second drafting lane could not exist while this constant was the only answer.\n *\n * This one stays, because it answers something else. Declaring a fact and drafting a document are\n * different acts with different costs: the FACT brief ships names and authority kinds, a few lines\n * each, so it can afford a wider set than any single drafting lane carries.\n */\nconst FACT_OBLIGATION_PUBLIC_DOCUMENT_DEFINITION_REFS: readonly string[] = Object.freeze([\n 'document-definition:public.privacy-notice',\n 'document-definition:public.service-terms',\n]);\n\n/**\n * The documents whose FACTS the producer is briefed on — a wider set than the ones the lane may draft.\n *\n * Declaring a fact and drafting a document are different acts with different costs. The drafting brief ships a document's sections, clauses and inclusion kinds; adding\n * the four governance documents there would be ~42KB of obligations for documents this lane does not produce, and a prompt section that gets skimmed is\n * indistinguishable from an absent one. The FACT brief ships names and authority kinds, which is a few lines each.\n *\n * TWO of the four governance documents are included, and only those two: `scope-system-description` and `program-handbook` are the ones carrying\n * `APPLICATION_SPECIFICATION` facts — `governance-system-boundaries`, `governance-entities-products-environments`, `governance-dependencies-responsibilities` and\n * `governance-scope-boundaries`. `roles-responsibilities` and `document-record-control` carry none: every one of their ten facts needs a creator decision or a\n * qualified review, so briefing them would add ten \"do not declare\" lines about documents with nothing to declare.\n *\n * Withholding the two meant the only facts a governance document could ever have were the sixteen a human must write, so it could not be partially answered at all\n * (#186).\n *\n * The other sixteen are rendered in the same brief as facts the producer must NOT declare, with the authority each needs. That is the whole reason it is safe to widen\n * this list: the brief now distinguishes the two halves rather than asking for everything (#217).\n */\nconst FACT_OBLIGATION_DOCUMENT_DEFINITION_REFS: readonly string[] = Object.freeze([\n ...FACT_OBLIGATION_PUBLIC_DOCUMENT_DEFINITION_REFS,\n 'document-definition:governance.scope-system-description',\n 'document-definition:governance.program-handbook',\n]);\n\n/**\n * The governed documents a run DRAFTED, from the values it produced.\n *\n * Pure and module-level so the judge's claim guards can be derived from the run itself rather than from\n * whatever the application happens to hold on disk (#1452, corrected on the first live governance run).\n * Reads only `compliance-document-candidate` entries, tolerates a value of any shape, and de-duplicates:\n * a run that drafted one document must not ship that document's guards twice.\n */\nfunction draftedCandidateDocumentRefs(values: readonly { readonly family: string; readonly value: unknown }[] | undefined): readonly string[] {\n if (!values) return [];\n const refs = values\n .filter((entry) => entry.family === 'compliance-document-candidate')\n .map((entry) => (entry.value as { documentRef?: unknown } | null | undefined)?.documentRef)\n .filter((ref): ref is string => typeof ref === 'string' && ref !== '');\n return [...new Set(refs)];\n}\n\n/**\n * Where this application's own assurance repository lives, and where its judged runs sit inside it.\n *\n * Named here because the companion is the FIRST reader outside `scripts/assurance/`, which owns the\n * writer's copy of the same two strings. They are duplicated across a package boundary deliberately:\n * the scripts are a standalone offline toolchain with no dependency on the companion, and importing\n * either way round would couple a dev-loop service to an auditor's tool. What keeps them honest is that\n * a wrong path here degrades to a legible \"no assurance repository\" section rather than a silent empty\n * one — the reason every absence in this section says which absence it is.\n */\nconst ASSURANCE_REPOSITORY_RELATIVE_PATH = '.wildo-saas/state/assurance';\nconst ASSURANCE_JUDGED_RUNS_DIRECTORY = 'judged-runs';\n/**\n * Where the assurance collector commits the retention-enforcement evidence (#1636): the engine-store measurement\n * of `evidence-requirement:retention-window-declaration` C3. The writer's copy is `engineStoreMeasurementPath`\n * in `scripts/assurance/collect-engine-store-evidence.mjs` — the WRITER's path is pinned by that script's\n * self-test; this copy is not pinned by anything, and agreement is checked by eye. The same\n * deliberate duplication as the two strings above, and a wrong path degrades the same way — the\n * `retention-enforcement` fact stays absent and its clause is marked owed.\n */\nconst ASSURANCE_RETENTION_ENFORCEMENT_MEASUREMENT_PATH = ['engine-store-measurements', 'WILDO.PRIVACY.STORAGE_LIMITATION', 'retention-window-declaration', 'C3.json'] as const;\n/**\n * Where the collectors commit what the `ai-content-guardrails` fact reads (#2847). Same deliberate duplication as above,\n * and the same degradation: a wrong path leaves the fact absent and its clause marked owed. The writers' copies:\n * - the agent-operation evidence (#2841), the engine-store measurement of `evidence-requirement:agent-operation-record` C1,\n * `engineStoreMeasurementPath` in `scripts/assurance/collect-engine-store-evidence.mjs` (pinned by its self-test);\n * - the guardrail audit events (#2292), one EMITTED measurement per event type of the screening and moderation demands'\n * C3, at `<objective>/<demand>/<clause>/<event type>.json` in `scripts/assurance/collect-emitted-evidence.mjs`.\n */\nconst ASSURANCE_AGENT_OPERATION_MEASUREMENT_PATH = ['engine-store-measurements', 'WILDO.AI.OPERATION_RECORD', 'agent-operation-record', 'C1.json'] as const;\n// Keyed on the engine's own tuple, so a fifth guardrail event type is a compile error here rather than silently \"not collected\".\nconst ASSURANCE_GUARDRAIL_AUDIT_EVENT_MEASUREMENT_DIRECTORIES: Readonly<Record<AiContentGuardrailAuditEventType, readonly string[]>> = {\n [CoreAuditableEventType.AGENT_CONTENT_QUARANTINED]: ['emitted-measurements', 'WILDO.AI.UNTRUSTED_CONTENT_SCREENING', 'agent-untrusted-content-screening-record', 'C3'],\n [CoreAuditableEventType.AGENT_CONTENT_SCREENING_FAILED]: ['emitted-measurements', 'WILDO.AI.UNTRUSTED_CONTENT_SCREENING', 'agent-untrusted-content-screening-record', 'C3'],\n [CoreAuditableEventType.AGENT_OUTPUT_WITHHELD]: ['emitted-measurements', 'WILDO.AI.OUTPUT_MODERATION', 'agent-output-moderation-record', 'C3'],\n [CoreAuditableEventType.AGENT_OUTPUT_MODERATION_FAILED]: ['emitted-measurements', 'WILDO.AI.OUTPUT_MODERATION', 'agent-output-moderation-record', 'C3'],\n};\n\n// One object with the runtime's board (#2462), so a file-only family reads as unreadable on both sides by identity.\nconst FILE_PRESENT_WITHOUT_VALUE = ARTIFACT_PRESENT_WITHOUT_VALUE;\n\n/**\n * The map the coherence report reads: accepted families PLUS landed drafts.\n *\n * The two channels are separate everywhere else on purpose — eligibility must not see a draft — and\n * this is the one place they are legitimately one population, because the report's question is\n * \"do the landed artifacts agree with each other\", and a landed draft is one of them.\n */\nfunction coherenceInputFor(state: PlaybookArtifactState): Map<string, unknown> {\n const composed = new Map(state.artifactsByFamily);\n for (const [family, value] of state.draftArtifactsByFamily ?? []) composed.set(family, value);\n return composed;\n}\n\n/**\n * The computed document facts, as a judge must read them (#964): not produced by the run, absent from its\n * file on purpose, and still binding — a landed fact that contradicts one is unsupported.\n */\nexport function renderComputedDocumentFactsForJudge(answers: readonly ComputedDocumentFactAnswer[] | undefined): string {\n if (answers === undefined || answers.length === 0) return '';\n return [\n '# Facts the runtime COMPUTED from the application\\'s declarations and its own records',\n 'Not produced by this run and not under judgment. They are absent from the landed file on purpose: never ask for',\n 'them to be declared. A landed fact that contradicts one of them is unsupported.',\n '',\n // A computed NOT_APPLICABLE is a recorded finding with its reason (#2847), stated as such rather than as `undefined`.\n ...answers.map((answer) => `- \\`${answer.fact}\\`: ${answer.notApplicableReason !== undefined ? `NOT APPLICABLE — ${answer.notApplicableReason}` : JSON.stringify(answer.value)}`),\n ].join('\\n');\n}\n\n/** The requested playbook ref is not in the compiled catalog. Named so the transport can answer 404 rather than 500. */\n\n/**\n * The application's declared `operatingJurisdictions` slugs, for the assurance applicability gate (#2852).\n *\n * Four inputs, three answers, kept three, because each one sends the gate somewhere different:\n * - no configuration at all → `undefined`, \"not asked\": the gate checks nothing;\n * - a configuration that declares no `operatingJurisdictions`, or declares an EMPTY list → `null`, \"declares none\": an\n * objective resting only on law is then UNDETERMINED (jurisdiction owed), never NOT_APPLICABLE. The empty list is\n * decided before parsing, because the schema refuses it, and a refused declaration would otherwise read as \"not\n * asked\" and switch the gate off;\n * - any other declaration the schema refuses → `undefined`: an unreadable declaration is not \"declares none\";\n * - a valid declaration → its slugs.\n *\n * Parsed with `ApplicationOperatingJurisdictionsSchema`, the same parse the coherence and brief readers use, so an\n * alias such as `uk` never reaches the gate as a slug no reach table knows. The brief and the normalizer read it\n * through the same method, so what the producer is told cannot apply here is exactly what the run refuses.\n */\nexport function readDeclaredOperatingJurisdictionSlugs(saasConfig: unknown): string[] | null | undefined {\n if (saasConfig === undefined || saasConfig === null) return undefined;\n const raw = (saasConfig as { operatingJurisdictions?: unknown }).operatingJurisdictions;\n if (raw === undefined) return null;\n const listed = (raw as { jurisdictions?: unknown } | null)?.jurisdictions;\n if (Array.isArray(listed) && listed.length === 0) return null;\n const declared = ApplicationOperatingJurisdictionsSchema.safeParse(raw);\n if (!declared.success) return undefined;\n return declared.data.jurisdictions.map((entry) => entry.jurisdictionSlug);\n}\n\nexport class UnknownPlaybookError extends Error {}\n\n/** A READINESS precondition fails. There is no way past this one: its inputs are absent or invalid. */\nexport class PlaybookNotReadyError extends Error {}\n\n/**\n * A run's output file changed after the run read it, so it landed nothing rather than replace that change\n * (#1614). Carries the runs whose landing is on disk now, when the write register knows them, so the\n * creator sees WHICH run overlapped this one. Named so the transport answers 409: the request was valid,\n * the working tree moved under it, and running the playbook again is the repair.\n */\nexport class PlaybookRunLandingConflictError extends Error {\n public constructor(\n public readonly conflicts: readonly { readonly family: string; readonly packageRelativePath: string }[],\n public readonly overlappingRuns: readonly { readonly runId: string; readonly playbookRef: string }[],\n runtimeMessage: string,\n ) {\n super(overlappingRuns.length === 0\n ? runtimeMessage\n : `${runtimeMessage} Landed meanwhile by: ${overlappingRuns.map((run) => `${run.playbookRef} (run ${run.runId})`).join(', ')}.`);\n }\n}\n\n/**\n * A second concurrent run of a kind this companion admits only ONE of, over one working tree.\n *\n * The base exists so a transport has ONE thing to catch. The two subclasses stay distinct because a\n * loop and a composite are distinct things with distinct remedies — merging them into one error would\n * put \"wait for the loop\" in front of somebody whose composite is the thing running, which is the\n * whole content of the message.\n */\nexport abstract class PlaybookRunAlreadyInFlightError extends Error {}\n\n/** A second concurrent loop was refused — one loop per companion (OC-1 design D4). Named so the transport answers 409. */\nexport class PlaybookLoopAlreadyRunningError extends PlaybookRunAlreadyInFlightError {}\n\n/**\n * A second concurrent run of the same composite INSTANCE was refused (#1610). Transport answers 409.\n *\n * Until #1610 this refused any second composite, one per application; a different composite, or another\n * instance of the same one, now runs beside it (see `MetaWorkflowsExclusiveSubject.COMPOSITE`). What stays\n * refused is the case below: a new run of an instance ADOPTS that instance's newest progress checkpoint\n * (`adoptChoreographyCheckpoint`, read off the execution rows since #1360), so a second run beside a live one\n * would take over its checkpoint mid-flight, both would then advance it, and whichever settled first would\n * consume the other's only resume point while it was still paying for iterations. (Before #1360 the same\n * collision was on a checkpoint FILE keyed by ref, whose store assumed a composite was single-flight per\n * application and nothing enforced it.) Two DIFFERENT composites never shared a checkpoint; they were\n * refused because two portfolios' writes met over one tree with nothing relating them, which since #1610 is\n * answered by detection (#1614) and each run's record of the runs it overlapped, not by refusal.\n *\n * Refused by the ENGINE since #1361: a composite's execution is opened with its instance's\n * single-flight subject, the driver refuses a second one from the running ROWS, and this error is\n * that refusal re-worded with the holder named. It was an in-memory marker before — invisible to a\n * second process, forgotten by a restart, and clearable by a nested run's `finally`.\n */\nexport class PlaybookChoreographyAlreadyRunningError extends PlaybookRunAlreadyInFlightError {}\n\n/**\n * The engine capabilities an application has actually TURNED ON.\n *\n * `EngineCapabilityActivations` is `Record<EngineCapability, { enabled: boolean }>` — an OBJECT per\n * capability, not a boolean. Reading it as a boolean map treats `{ enabled: false }` as enabled,\n * because an object is not `=== false`, and every declined capability reads as declared. wonder-crm\n * declines two (`BILLING`, `MULTI_LANGUAGE`), so that mistake would have made service terms REQUIRED\n * for an application that sells nothing, and put \"billing\" in a privacy notice's recipient list.\n *\n * Caught before it shipped, and only by looking at a real config: the first fixtures used booleans,\n * which is the pin-that-passes-for-the-wrong-reason shape — the code and the test agreed with each\n * other and neither agreed with production. The array form is tolerated because the same key is spelt\n * that way on provider records; there, membership IS the activation.\n */\n/**\n * The provider-scope key whose providers are reached by the tool that BUILDS the application rather\n * than by the application serving its users.\n *\n * Named here rather than inlined because it decides whether a provider enters a customer-facing\n * document as a data recipient. It mirrors the `providers.scopes.companion` key of\n * `wildo.saas.config.ts`, and derives from the provider-scope vocabulary `ProviderScopeKey` declared\n * beside the recipient population (#1707), so the brief and the population cannot name it differently.\n */\nconst AUTHORING_PROVIDER_SCOPE: string = ProviderScopeKey.COMPANION;\n\n/**\n * The provider packages this application owns (package name → ref), from `providers/<ref>/<facet>/package.json`\n * in the working tree, untracked included (#2018). `undefined` when they could not be listed, so the scan\n * reports itself UNSCANNED rather than reading \"no owned package\" as \"nothing imports a provider\".\n */\nasync function readApplicationProviderPackages(saasRoot: string): Promise<ReadonlyMap<string, string> | undefined> {\n try {\n // Through the git read helper and never synchronous (#3204): a sync spawn held the companion's event loop for the\n // whole git run, and a fork from its 2 GB process blocked it besides.\n const listed = (await gitReadBroker.execGit(['-C', saasRoot, 'ls-files', '--cached', '--others', '--exclude-standard', '--', APPLICATION_PROVIDER_PACKAGE_MANIFEST_PATHSPEC]))\n .stdout.split('\\n').filter(Boolean);\n return applicationProviderPackagesFromManifests(listed.map((manifestPath) => ({ path: manifestPath, content: readFileSync(join(saasRoot, manifestPath), 'utf8') })));\n } catch {\n return undefined;\n }\n}\n\n/**\n * Where this application's source imports a provider package the application owns (#2018) — the code half of\n * the recipient population's data-path axis (#1707).\n *\n * `git grep` over the WORKING TREE, untracked files included: the brief describes what is being built,\n * while the evidence collector greps the committed HEAD. That is the only difference between the readers\n * (this one, the CLI's `subject-data-recipients` generator, the collector); each hands its lines to\n * `typedClientSitesFromGrepLines` with the same owned-package map, so they cannot disagree about what a\n * line means. `undefined` when the scan could not run, which the population carries as an UNSCANNED code\n * path rather than as \"nothing imports it\".\n */\nexport async function scanTypedClientSites(saasRoot: string | undefined): Promise<readonly ProviderTypedClientSite[] | undefined> {\n if (saasRoot === undefined) return undefined;\n const applicationProviderPackages = await readApplicationProviderPackages(saasRoot);\n if (applicationProviderPackages === undefined) return undefined;\n const needles = typedClientSearchNeedles(applicationProviderPackages).flatMap((needle) => ['-e', needle]);\n // No owned provider package, nothing a typed client could be imported from: a scan that found none. Never run\n // `git grep` with no `-e`: it would read the pathspec `.` as the PATTERN and return every line holding a dot.\n if (needles.length === 0) return [];\n try {\n const { stdout } = await gitReadBroker.execGit(['-C', saasRoot, 'grep', '--untracked', '-n', '-F', ...needles, '--', '.'], {\n maxBuffer: 16 * 1024 * 1024,\n });\n return typedClientSitesFromGrepLines(stdout.split('\\n'), applicationProviderPackages);\n } catch (error) {\n // `git grep` exits 1 when nothing matches: a scan that found none, not one that failed. (`execFile` names the exit\n // status `code`; the sync form this replaced named it `status`.)\n if ((error as { code?: unknown }).code === 1) return [];\n return undefined;\n }\n}\n\n/**\n * WHO receives this application's personal data — the one population the brief, the computed\n * `recipients-and-processors` fact and the evidence collector all read (#1707).\n *\n * Replaces a local walk that read only `scopes.<key>.providers`, so every provider declared under\n * `frontendServices.<service>`, `minions.<minion>` or `workers.<worker>` was invisible here, and that never\n * saw a `systemsOfRecord` instance.\n */\nasync function recipientPopulationOf(\n saasConfig: unknown,\n saasRoot: string | undefined,\n providerComplianceProfiles?: Readonly<Record<string, ProviderComplianceProfile>>,\n): Promise<RecipientPopulation> {\n const config = (saasConfig ?? {}) as { providers?: unknown; systemsOfRecord?: unknown; providerComplianceChoices?: unknown };\n const choices = ApplicationProviderComplianceChoicesSchema.safeParse(config.providerComplianceChoices);\n return computeRecipientPopulation({\n providers: config.providers,\n systemsOfRecord: config.systemsOfRecord,\n providerComplianceChoices: choices.success ? choices.data : undefined,\n typedClientSites: await scanTypedClientSites(saasRoot),\n ...(providerComplianceProfiles === undefined ? {} : { providerComplianceProfiles }),\n });\n}\n\n/**\n * The engine providers' profiles as their SPECIFICATIONS mirror them — the fallback when discovery cannot be read.\n * A specification restates its module's profile and is reconciled against it, so for an ENGINE ref the two are\n * one authority; for a catalogue vendor the specification set says nothing, which is why this is only a fallback.\n */\nfunction engineSpecificationComplianceProfiles(): Record<string, ProviderComplianceProfile> {\n const profiles: Record<string, ProviderComplianceProfile> = {};\n for (const specification of listRegisteredProviderSpecifications()) profiles[specification.ref] = specification.complianceProfile;\n return profiles;\n}\n\n/**\n * What a person's erasure executes on one resource, as the compliance introspection reports it (#2960).\n *\n * Crossed a JSON boundary. Undefined unless BOTH lists are arrays of members of their vocabularies: a list holding an\n * unknown member (an introspection from a different engine) is not a shorter true list, and the fact then states the\n * declared mode alone rather than a partial account of what runs.\n */\nfunction parseSubjectErasureExecution(value: { erasedAsTheSubject?: unknown; dispositions?: unknown; severerTreatments?: unknown } | undefined): SubjectErasureExecutedTreatment | undefined {\n if (value === undefined || typeof value.erasedAsTheSubject !== 'boolean' || !Array.isArray(value.dispositions) || !Array.isArray(value.severerTreatments)) return undefined;\n const dispositions = new Set<string>(Object.values(SubjectErasureDisposition));\n const treatments = new Set<string>(Object.values(SubjectErasureSeveredReferenceTreatment));\n if (!value.dispositions.every((member) => typeof member === 'string' && dispositions.has(member))) return undefined;\n if (!value.severerTreatments.every((member) => typeof member === 'string' && treatments.has(member))) return undefined;\n return {\n erasedAsTheSubject: value.erasedAsTheSubject,\n dispositions: value.dispositions as SubjectErasureDisposition[],\n severerTreatments: value.severerTreatments as SubjectErasureSeveredReferenceTreatment[],\n };\n}\n\n/**\n * The system-of-record flows the `compliance-primary-facts` introspection reports per resource (#1709), or `undefined`\n * when they cannot be read faithfully — which every system-of-record recipient then reports as FLOWS_NOT_READ.\n *\n * Crossed a JSON boundary, and the only direction it may err in is \"not read\": ANY shape this companion does not\n * recognise — a resource with no `systemOfRecordFlows` key (an introspection older than #1709), a flow whose system,\n * kind, categories or uncategorized fields are not what the producer emits, a category outside this companion's\n * vocabulary (an application built against a different engine) — makes the whole answer undefined. Dropping the one\n * odd flow or field instead would present a shorter list as complete, which is the under-report this guards against.\n */\nfunction parseSystemOfRecordFlows(\n resources: ReadonlyArray<{ readonly resourceType: string; readonly systemOfRecordFlows?: ReadonlyArray<{ system?: unknown; kind?: unknown; categories?: unknown; unconditionalCategories?: unknown; conditionalCategories?: unknown; uncategorizedPersonalFields?: unknown; purposeRefs?: unknown; subjectRightsPosture?: unknown; followsSystemOfRecord?: unknown }> }>,\n): readonly SystemOfRecordDataFlow[] | undefined {\n const kinds = new Set<string>(Object.values(SystemOfRecordDataFlowKind));\n const categories = new Set<string>(Object.values(PersonalDataCategory));\n const conditions = new Set<string>(Object.values(PersonalDataCondition));\n const postures = new Set<string>(Object.values(SystemOfRecordSubjectRightsPosture));\n const flows: SystemOfRecordDataFlow[] = [];\n for (const resource of resources) {\n if (!Array.isArray(resource.systemOfRecordFlows)) return undefined;\n for (const flow of resource.systemOfRecordFlows) {\n if (typeof flow.system !== 'string' || typeof flow.kind !== 'string' || !kinds.has(flow.kind)) return undefined;\n if (!Array.isArray(flow.categories) || flow.categories.some((category) => typeof category !== 'string' || !categories.has(category))) return undefined;\n if (!Array.isArray(flow.uncategorizedPersonalFields) || flow.uncategorizedPersonalFields.some((field) => typeof field !== 'string')) return undefined;\n // #1745 — the purposes the binding links. Absent (an introspection older than #1745) reads as not read, like any\n // other unrecognised shape: an empty list would state \"no purpose linked\" about flows nobody read the links of.\n if (!Array.isArray(flow.purposeRefs) || flow.purposeRefs.some((purposeRef) => typeof purposeRef !== 'string')) return undefined;\n // #2119 — the categories held on every row, and per condition the rest. Absent (an introspection older than #2119)\n // reads as not read for the same reason: an empty conditional list would state every category unconditionally.\n const isCategoryList = (value: unknown): value is PersonalDataCategory[] =>\n Array.isArray(value) && value.every((category) => typeof category === 'string' && categories.has(category));\n if (!isCategoryList(flow.unconditionalCategories)) return undefined;\n if (!Array.isArray(flow.conditionalCategories) || flow.conditionalCategories.some((entry: { condition?: unknown; categories?: unknown } | null) =>\n entry === null || typeof entry.condition !== 'string' || !conditions.has(entry.condition) || !isCategoryList(entry.categories))) return undefined;\n // #2561 — where requests about the system's records are answered. Absent (an introspection older than #2561) or a\n // member this companion does not know reads as not read: defaulting it would state \"handled at the source\" about a\n // binding nobody read, which is the one sentence the notice must not guess.\n if (typeof flow.subjectRightsPosture !== 'string' || !postures.has(flow.subjectRightsPosture)) return undefined;\n // #2704 — whether the local rows follow the system. Absent (an introspection older than #2704) reads as not read:\n // defaulting it either way would word a two-way copy's sending half as something it is not.\n if (typeof flow.followsSystemOfRecord !== 'boolean') return undefined;\n flows.push({\n system: flow.system,\n resourceType: resource.resourceType,\n kind: flow.kind as SystemOfRecordDataFlowKind,\n categories: flow.categories as PersonalDataCategory[],\n unconditionalCategories: flow.unconditionalCategories,\n conditionalCategories: flow.conditionalCategories as ConditionallyHeldCategories[],\n uncategorizedPersonalFields: flow.uncategorizedPersonalFields as string[],\n purposeRefs: flow.purposeRefs as string[],\n subjectRightsPosture: flow.subjectRightsPosture as SystemOfRecordSubjectRightsPosture,\n followsSystemOfRecord: flow.followsSystemOfRecord,\n });\n }\n }\n return flows;\n}\n\n/** How each not-derivable reason reads in the brief. Total over the vocabulary, so a new reason cannot render blank. */\nconst NOT_DERIVABLE_EXPLANATIONS: Readonly<Record<RecipientCategoriesNotDerivableReason, string>> = {\n [RecipientCategoriesNotDerivableReason.FLOW_UNDECLARED]: 'some path declares no field map (a typed client, a browser operation or unscanned code), so what it sends is not established',\n [RecipientCategoriesNotDerivableReason.NO_RESOURCE_FLOW]: 'no resource binds or pipes this system of record, so nothing declares what reaches it',\n [RecipientCategoriesNotDerivableReason.FLOWS_NOT_READ]: \"the application's resource declarations could not be read, so what flows to it is not known\",\n [RecipientCategoriesNotDerivableReason.UNCATEGORIZED_PERSONAL_FIELDS]: 'some field that flows to it is personal by the application\\'s own declaration and names no category',\n};\n\n/**\n * What each `PersonalDataCondition` means, and how a statement words data held only under it (#2119). Total over the\n * vocabulary, so a condition added tomorrow is a compile error here rather than a line the drafter cannot interpret.\n */\nconst PERSONAL_DATA_CONDITION_EXPLANATIONS: Readonly<Record<PersonalDataCondition, string>> = {\n [PersonalDataCondition.DESCRIBED_PARTY_IS_A_NATURAL_PERSON]:\n 'the row describes a PARTY (the customer organization, an account, a supplier) and the field is that party\\'s name, '\n + 'number, address or similar. It is personal data exactly when that party is an individual (a sole trader, or a '\n + 'partnership of individuals), because GDPR Recital 14 excludes only legal persons. Word it as: \"where the customer '\n + 'is an individual (for example a sole trader), we also hold their business name, contact details and address\", '\n + 'naming the kinds of data, not the field names.',\n};\n\n/** `; only where <condition>: <categories>` per condition, or nothing — the recipient and source lines' conditional half. */\nfunction renderConditionalCategories(conditional: readonly ConditionallyHeldCategories[]): string {\n return conditional.map((entry) => `; of which only where \\`${entry.condition}\\`: ${entry.categories.join(', ')}`).join('');\n}\n\n/**\n * How a flow's subject-rights posture reads in the brief (#2561): where a request about the system of record's records is\n * answered. One sentence per posture: the same the blueprint and the sources partial use, consistent in meaning with the\n * receipt's wording, and worded by\n * DIRECTION the way the receipt words it: what an outbound pipeline sends becomes the system's once received, while the\n * application's own rows stay its own. The sending half of a two-way copy is worded by `localCopyFollowsSource` (#2704):\n * its local rows follow the system, so they are never \"erased as their resource declares\". Total over the vocabulary, so\n * a posture added tomorrow is a compile error here rather than a blank.\n */\nfunction subjectRightsPostureSentence(flowToken: string, posture: SystemOfRecordSubjectRightsPosture, localCopyFollowsSource: boolean): string {\n const outbound = flowToken.startsWith(`${SystemOfRecordDataFlowKind.OUTBOUND_PIPELINE}:`);\n const localRows = localCopyFollowsSource\n ? 'the local copy follows that system: a record it removes is removed or scrubbed here at its next complete pass, as the copy\\'s orphan policy declares, and an erasure here leaves the copy to it'\n : 'the application\\'s own rows are erased as their resource declares';\n switch (posture) {\n case SystemOfRecordSubjectRightsPosture.HANDLED_AT_SOURCE:\n return outbound\n ? `what the application sends becomes that system's once received, and requests about it are handled there; ${localRows}`\n : 'requests about these records are handled in the source system, which decides and answers for its own records';\n case SystemOfRecordSubjectRightsPosture.FORWARDED_TO_SOURCE:\n return outbound\n ? `what the application sends is handled in that system, and an erasure made here is also forwarded to it, best effort; ${localRows}`\n : 'requests are handled in the source system, and the application also forwards an erasure to it, best effort';\n case SystemOfRecordSubjectRightsPosture.NO_SUBJECT_DATA:\n return outbound ? 'what the application sends holds no data about a person' : 'the records hold no data about a person';\n case SystemOfRecordSubjectRightsPosture.OWNED_COPY:\n // INBOUND only (refused on an outbound or two-way pipeline at startup), so it has one wording.\n return 'the source system answers for its own records, and the application keeps its own copy and erases that copy itself';\n default: {\n const unhandled: never = posture;\n throw new Error(`Unhandled subject-rights posture ${String(unhandled)}`);\n }\n }\n}\n\n/**\n * WHAT each recipient receives and for which purpose (#1709) — which of the Art. 30(1)(c) categories reach which (d) recipient.\n *\n * A recipient whose flow declares no field map is rendered NOT DERIVABLE, never as receiving nothing: a typed client\n * or a browser operation sends whatever the application's code passes it, and no declaration says what that is.\n */\nfunction renderRecipientDisclosures(disclosures: readonly RecipientDisclosure[]): readonly string[] {\n if (disclosures.length === 0) return [];\n return [\n '',\n 'What each recipient RECEIVES, and for which purpose (derived from the flows the application declares):',\n ...disclosures.map((disclosure) => {\n const categories = disclosure.categories.length > 0 ? disclosure.categories.join(', ') : 'no declared category';\n const reasons = disclosure.categoriesNotDerivable.map((reason) => NOT_DERIVABLE_EXPLANATIONS[reason]);\n if (disclosure.categoriesAreAFloor) reasons.push('free text a person wrote rides the call, and it can carry any other category');\n const notDerivable = reasons.length === 0 ? '' : ` — and MORE MAY REACH IT: ${reasons.join('; ')}`;\n const purposes = disclosure.purposes.length > 0\n ? `; purpose: ${disclosure.purposes.map((purpose) => `${purpose.purpose} (${purpose.basis})`).join('; ')}`\n : '; purpose: NOT LINKED — its compliance choice names no `purposeRefs`';\n const broken = disclosure.purposeRefsNamingNoPurpose.length > 0\n ? `; purpose refs naming no declared lawful basis: ${disclosure.purposeRefsNamingNoPurpose.map((ref) => `\\`${ref}\\``).join(', ')}`\n : '';\n const postureEntries = Object.entries(disclosure.subjectRightsPostureByFlow ?? {});\n const postures = postureEntries.length === 0\n ? ''\n : `; data-subject requests: ${postureEntries.map(([flow, posture]) => `${flow} — ${subjectRightsPostureSentence(flow, posture, disclosure.localCopyFollowsSourceByFlow?.[flow] === true)}`).join('; ')}`;\n return ` - \\`${disclosure.ref}\\` — ${categories}${renderConditionalCategories(disclosure.conditionalCategories)}${notDerivable}${purposes}${broken}${postures}`;\n }),\n ' State only the categories listed. Where more may reach a recipient, say that what it receives is not fully',\n ' established — never list nothing, and never guess the rest. A category listed \"only where\" a condition reaches',\n ' the recipient only under it: state it with that condition (see the conditional categories above, #2119).',\n ' A system of record is the operator\\'s own system: say where requests about its records are answered, per flow',\n ' (`outbound-pipeline` flows are data the application SENDS to it, #2561).',\n ];\n}\n\n/**\n * The population rendered by class, so a drafter sees WHY a declared vendor is or is not a recipient.\n *\n * The two non-recipient classes are rendered because omitting them would read as \"not declared\": a tenant's\n * own vendor and a vendor nothing reaches are both true statements a notice may need, and neither may be\n * published as the operator's recipient.\n */\nfunction renderRecipientPopulation(population: RecipientPopulation): readonly string[] {\n if (population.members.length === 0) return [];\n const describe = (populationClass: RecipientPopulationClass): string[] => population.members\n .filter((member) => member.populationClass === populationClass)\n .map((member) => ` - \\`${member.ref}\\`${member.kind === RecipientPopulationMemberKind.SYSTEM_OF_RECORD ? ' (system of record)' : ''}`\n + (member.dataPaths.length > 0 ? ` — reached by ${member.dataPaths.map((dataPath) => dataPath.kind).join(', ')}` : ''));\n const block = (populationClass: RecipientPopulationClass, heading: string, guidance: readonly string[]): string[] => {\n const lines = describe(populationClass);\n return lines.length === 0 ? [] : [` ${heading} (${lines.length}):`, ...lines, ...guidance.map((line) => ` ${line}`)];\n };\n return [\n '',\n 'Who RECEIVES data, by whose account reaches them (computed from the configuration and the source):',\n ...block(RecipientPopulationClass.OPERATOR_SUB_PROCESSOR, \"OPERATOR SUB-PROCESSORS — reached with the application's own account\", [\n 'These are the operator\\'s recipients. Each belongs in the processor register.',\n ]),\n ...block(RecipientPopulationClass.TENANT_RECIPIENT, \"TENANT RECIPIENTS — reached only through a customer's or a person's own connected account\", [\n 'The customer\\'s own vendor, reached at the customer\\'s instruction. Do NOT name these as the operator\\'s',\n 'sub-processors; where it helps a reader, say that a customer may connect its own account with them.',\n ]),\n ...block(RecipientPopulationClass.OPERATOR_RUN, 'OPERATOR-RUN — declared self-hosted', []),\n ...block(RecipientPopulationClass.DECLARED_WITHOUT_DATA_PATH, 'DECLARED, NO DATA PATH — configured, and nothing in the application reaches them', [\n 'They receive nothing. Never name them as recipients.',\n ]),\n ];\n}\n\n/**\n * The next-review date an application's DECLARED `assuranceReviewCadence` schedules from this run's\n * observed instant, or `undefined` when it schedules none (#647 decision C).\n *\n * The companion is where the cadence is read because it holds the application's configuration; the\n * normalizer is pure and holds none. `undefined` is an ANSWER, not an error: no declaration and\n * `AS_NEEDED` both reach the normalizer as an absent date, and the programme is then produced with a\n * stamped limitation rather than refused.\n *\n * Takes the raw config value as `unknown` and checks it against the vocabulary rather than trusting a\n * cast. The config schema validates the enum at load, so an unrecognised value here means an\n * unvalidated config — and deriving a date from it would manufacture a commitment nobody made.\n */\nexport function resolveDeclaredAssuranceNextReviewOn(declaredCadence: unknown, recordedAt: string): string | undefined {\n if (!(Object.values(ReviewCadence) as unknown[]).includes(declaredCadence)) return undefined;\n return deriveNextReviewOn(recordedAt, declaredCadence as ReviewCadence);\n}\n\n/**\n * HOW LONG the application keeps each class of data — the half `retentionPolicy.mode` never said.\n *\n * A resource's mode says what erasure DOES to a row, and a confident paragraph about impersonalization\n * reads to a reader as an answer about retention. So a notice drafted from the modes alone leaves the\n * one number a reader wanted absent, while sounding complete (issue #89). This renders the declared\n * periods, and — the load-bearing half — names the classes the operator has NOT decided.\n *\n * An undeclared class is rendered as UNDECIDED, never omitted and never defaulted. \"We keep data as\n * long as necessary\" is the placeholder this whole declaration exists to make impossible, and an\n * absent line would invite exactly that sentence.\n */\nfunction renderRetentionSchedule(schedule: ApplicationRetentionSchedule | undefined): readonly string[] {\n const undeclared = undeclaredRetentionClasses(schedule);\n const declared = Object.values(DataRetentionClass).filter((dataClass) => schedule?.[dataClass] !== undefined);\n return [\n '## How long data is kept',\n 'Declared per data class by the operator. A class listed as UNDECIDED has no period — that is not',\n '\"kept indefinitely\" and not \"deleted immediately\", it is a decision nobody has taken. State it as',\n 'a gap an operator closes; never write a period the application has not declared.',\n '',\n ...(declared.length > 0\n ? declared.map((dataClass) => {\n const period = schedule![dataClass]!;\n return `- \\`${dataClass}\\` — ${period.retentionDays} day(s). Reason given: ${period.rationale}`;\n })\n : ['(no retention period is declared for any class)']),\n ...(undeclared.length > 0\n ? [`- UNDECIDED (${undeclared.length}): ${undeclared.map((dataClass) => `\\`${dataClass}\\``).join(', ')}`]\n : []),\n ];\n}\n\n/**\n * WHO the configured external providers actually are — and, per provider, whether anybody has said.\n *\n * A configured provider establishes THAT a third party is involved and what FUNCTION it performs. A\n * privacy notice's recipient statement needs three other things — the processor's legal identity, the\n * region it processes in, and its own subprocessors — and an international-transfer statement cannot\n * be made at all without the region (issue #88).\n *\n * The gap is rendered PER PROVIDER, which is the whole value of joining the register to the\n * composition: \"third-party identities are not established\" is a sentence an operator cannot act on,\n * while \"`anthropic` is configured and undeclared\" names one piece of work. A processor listed in the\n * register but no longer configured is reported too — a stale entry keeps a recipient in the notice\n * that receives nothing, which is the quieter of the two errors.\n */\nfunction renderProcessorRegister(\n population: RecipientPopulation,\n register: ApplicationProcessorRegister | undefined,\n): readonly string[] {\n /*\n * A provider the operator declared SELF_HOSTED is not a recipient, so it cannot be an outstanding\n * DISCLOSURE either (wildo-ai/wildo-ai#208: `email-preview` renders mail to a log and calls no API). A\n * provider with NO choice stays in scope, because absence means nobody has answered.\n *\n * The rule lives in `joinRecipientPopulationToRegister` over `computeRecipientPopulation` (#964, #1707),\n * because the computed `recipients-and-processors` fact and the evidence collector state the same\n * classification and a second copy could disagree.\n */\n const {\n undeclaredProviderRefs: undeclared,\n staleProviderRefs: stale,\n registeredTenantRecipientRefs: registeredTenantRecipients,\n } = joinRecipientPopulationToRegister(population, register);\n const declared = register?.processors ?? [];\n return [\n '## Who else processes personal data',\n 'The legal identity, processing region and subprocessors of each configured external provider, as',\n 'the operator has established them. A provider listed as UNDECLARED below is IN USE and its identity',\n 'has not been established — never read it as a provider that receives nothing. Name the function it',\n 'performs (the capability says that) and state plainly that its identity and location are outstanding.',\n '',\n ...(declared.length > 0\n ? declared.flatMap((processor) => [\n // The two arms are LABELLED differently on purpose. A configured-provider entry joins to the\n // application's composition and can be checked against it; an authored one joins to nothing,\n // because no configuration mentions the operator's hosting company. Rendering them\n // identically would give an unverifiable claim the same authority as a checkable one.\n processor.kind === ProcessorRegisterEntryKind.CONFIGURED_PROVIDER\n ? `- \\`${processor.providerRef}\\` (configured provider) — ${processor.legalEntityName}; processes in `\n + `${processor.processingRegions.join(', ')}`\n // #3921: where it keeps the data at rest, when the operator stated that it differs from where it processes.\n + (processor.storedAtRestIn === undefined ? '' : `; stores the data at rest in ${processor.storedAtRestIn.join(', ')}`)\n + (processor.purpose === undefined ? '' : `; purpose: ${processor.purpose}`)\n : `- \\`${processor.subprocessorRef}\\` (AUTHORED — nothing in the configuration mentions it, so it `\n + `cannot be verified against the composition) — ${processor.legalEntityName}; processes in `\n + `${processor.processingRegions.join(', ')}`\n + (processor.storedAtRestIn === undefined ? '' : `; stores the data at rest in ${processor.storedAtRestIn.join(', ')}`)\n + `; purpose: ${processor.purpose}`,\n processor.subprocessors.length > 0\n ? ` - subprocessors: ${processor.subprocessors.map((sub) => `${sub.name} (${sub.processingRegions.join(', ')})`).join('; ')}`\n : ' - subprocessors: none disclosed by this processor',\n ])\n : ['(no processor identity is established for any provider)']),\n ...(undeclared.length > 0\n ? ['', `UNDECLARED (${undeclared.length}): ${undeclared.map((ref) => `\\`${ref}\\``).join(', ')} — configured, identity not established.`,\n ...renderUndeclaredProcessorQuestions(population, undeclared)]\n : []),\n ...(stale.length > 0\n ? ['', `STALE (${stale.length}): ${stale.map((ref) => `\\`${ref}\\``).join(', ')} — declared in the register but no data path reaches them from this operator. Do not name these as recipients.`]\n : []),\n ...(registeredTenantRecipients.length > 0\n ? ['', `REGISTERED TENANT RECIPIENTS (${registeredTenantRecipients.length}): ${registeredTenantRecipients.map((ref) => `\\`${ref}\\``).join(', ')} — `\n + 'reached only through a customer\\'s own connected account, so NOT the operator\\'s sub-processor. Do not publish them as one.']\n : []),\n /*\n * WHERE personal data lands through processors — the derivable half of the transfer question\n * (issue #126).\n *\n * Both levels, because the chain is what makes a transfer statement hard: an operator in France\n * using a French vendor that runs on a US cloud has a transfer, and reading only the vendor's\n * region would miss it.\n *\n * The three states below are three DIFFERENT claims and the drafter must not round any of them\n * up. An empty register is a declaration that no processor receives anything. An absent one is\n * silence. A populated one establishes where data goes through processors and says nothing about\n * the operator's own processing.\n */\n '',\n ...(register === undefined\n ? [\n 'Transfer position: NOT ESTABLISHED. No processor register exists, so where personal data',\n 'lands is unknown. That is the OPPOSITE of knowing it stays put — never produce \"we do not',\n 'transfer data internationally\" from an absent register.',\n ]\n : registerEstablishesNoProcessorRecipients(register)\n ? [\n 'Transfer position (processor side): the register declares NO processor, so no personal data',\n 'reaches a third party and none is transferred THROUGH ONE. State exactly that, and state the',\n 'residual with it: this establishes nothing about the operator\\'s OWN processing — its',\n 'infrastructure, its staff, its own establishment. Do not round it up to \"no international',\n 'transfers\".',\n ]\n : [\n `Personal data reaches processors in: ${processorProcessingRegions(register).join(', ')}`\n + ' (the declared processors AND their own subprocessors).',\n 'That establishes WHERE it lands. It does NOT establish whether any of it is an international',\n 'transfer, which depends on the origin jurisdiction, nor under which mechanism one would be',\n 'lawful — both are legal determinations the framework deliberately does not model, because',\n 'adequacy decisions move by court ruling and a stale answer here would be a false statement.',\n ]),\n ];\n}\n\n/**\n * The processors section when the register could not be read (#3258). Never the UNDECLARED list: that says nobody has\n * established a provider, and a landed register may have.\n */\nfunction renderProcessorRegisterNotRead(reason: string): readonly string[] {\n return [\n '## Who else processes personal data',\n `The processor register could not be read, so what it says is unknown here: it may be landed. ${reason}`,\n 'Name the function each configured provider performs (the capability says that). Mark each provider\\'s identity and',\n 'location as not read for this draft. Do not say they are outstanding or that nobody has established them.',\n ];\n}\n\n/**\n * Where each of a vendor's regions keeps data at rest (#3921), and the account arrangement that holds on (#3920): the\n * suggestion for the register entry's `storedAtRestIn`, read from the profile and never stated as the operator's.\n */\nfunction storageSuggestionOf(established: EstablishedProviderComplianceProfile): string {\n const regions = Object.entries(established.storageRegionTerritories ?? {});\n if (regions.length === 0) return '';\n const each = regions.map(([region, places]) => {\n const condition = established.storageRegionConditions?.[region];\n return `\\`${region}\\` → ${places.join(', ')}${condition === undefined ? '' : ` (${condition})`}`;\n });\n return `; SUGGESTED storage at rest, by region: ${each.join('; ')}`;\n}\n\n/**\n * For each UNDECLARED processor, what its vendor OFFERS — the QUESTION the register entry answers (#1708, #1744).\n *\n * The provider's profile states possibilities (who can run it, where) and, where the catalogue researched them,\n * SUGGESTED legal facts, each read from a named page on a named day. They are rendered as what to verify and copy\n * into the operator's own register, never as the answer: the register header's rule is that the framework supplies\n * the question and a sourced suggestion, and only the operator's commit adopts a fact (Paul's decision, 2026-09-25).\n */\nfunction renderUndeclaredProcessorQuestions(population: RecipientPopulation, undeclared: readonly string[]): readonly string[] {\n if (!population.complianceProfilesRead) return [];\n const lines = undeclared.flatMap((ref) => {\n const profile = population.members.find((member) => member.ref === ref)?.complianceProfile ?? null;\n if (profile === null) return [` - \\`${ref}\\` — the provider declares no profile; research who runs it and where.`];\n const established = establishedProviderComplianceProfile(profile);\n if (established === null) return [` - \\`${ref}\\` — UNDETERMINED: nobody has researched who runs it or where it processes.`];\n const read = (established.evidence ?? []).map((entry) => `${entry.source} (read ${entry.verifiedAt})`);\n return [\n ` - \\`${ref}\\` — offers ${established.deploymentModels.join(' or ')}`\n + (established.processingRegions.length > 0 ? ` in ${established.processingRegions.map((region) => `\\`${region}\\``).join(', ')}` : '')\n + (established.vendorLegalEntityName === undefined ? '' : `; SUGGESTED legal entity: ${established.vendorLegalEntityName}`)\n // #3921: where each region keeps data at rest, and what that holds on (#3920), for the entry's `storedAtRestIn`.\n + storageSuggestionOf(established)\n + (established.subprocessorListUrl === undefined ? '' : `; sub-processors listed at ${established.subprocessorListUrl}`)\n + (established.dataProcessingAgreementUrl === undefined ? '' : `; data processing agreement offered at ${established.dataProcessingAgreementUrl}`)\n + (read.length > 0 ? `. Read from ${read.join(', ')}.` : ' (undated: the provider cites no source or date).'),\n ];\n });\n return [\n 'What each UNDECLARED vendor offers — the QUESTION its register entry answers. A suggested fact is what the',\n 'framework READ on the date shown; it is not this operator\\'s arrangement and must not be stated as one until the',\n 'operator verifies it and commits it to the processor register.',\n ...lines,\n ];\n}\n\n/**\n * Whether the AI this application's SERVICE uses DECIDES anything about a person, and what each agent's model is sent.\n *\n * A capability says AI is in use and for what function; it cannot say consequence, and the difference carries the\n * legal weight (issue #92). Rendered per AI capability that reaches the CONTRACTED SERVICE (an enabled capability that\n * serves only the build is named as outside it, never asked about) and, since #2838, per AGENT running on one: each\n * agent's declared use, its human review derived from its approval gates where every write is gated, the regulatory\n * reading of its domain where the EU AI Act applies, and (#2848) the content guardrails it declares. The agents come\n * from the `ai-use-declarations` introspection; when they cannot be read the section says NOT READ, never \"no agents\".\n *\n * A served capability with no posture, and no agent on it declaring its use, is reported OUTSTANDING and never assumed harmless. That\n * asymmetry is deliberate and is the one place in this section where silence is more dangerous than\n * elsewhere: a notice describing AI use without addressing consequence does not read as \"unknown\", it\n * reads as \"nothing significant happens here\" — which is the exemption, claimed for free.\n */\nfunction renderAiUsePosture(\n contractedServiceCapabilities: ReadonlySet<string>,\n outsideContractedServiceCapabilities: ReadonlySet<string>,\n posture: ApplicationAiUsePosture | undefined,\n agents: readonly AgentAiUseDeclaration[] | undefined,\n operatingJurisdictions: Parameters<typeof deriveAiRegulationRegimes>[0],\n): readonly string[] {\n /*\n * Scoped to the CONTRACTED SERVICE, because this section feeds a document about that service.\n *\n * `AI_ENGINE_CAPABILITIES` is the whole AI vocabulary and includes `AI_CODING_AGENT`, a build-time\n * tool that writes the application's source. Asking whether it \"DECIDES something about a person\"\n * is a question the running product does not raise, and answering it puts a development tool into\n * an Article 22 statement.\n */\n const enabledAi = AI_ENGINE_CAPABILITIES_IN_THE_CONTRACTED_SERVICE.filter((capability) => contractedServiceCapabilities.has(capability));\n const enabledAuthoringOnlyAi = AI_ENGINE_CAPABILITIES.filter((capability) => outsideContractedServiceCapabilities.has(capability));\n /*\n * The build-time half is NAMED rather than dropped. Silence would leave a drafter that can see the\n * capability elsewhere in this brief unable to tell whether the omission is a decision or a gap —\n * and the honest sentence, which is what Wonder CRM's own fact should have said, distinguishes the\n * SERVICE from the capability set rather than denying the capability exists.\n */\n const authoringOnlyAiNote = enabledAuthoringOnlyAi.length > 0\n ? [\n '',\n `Enabled but OUTSIDE the contracted service (${enabledAuthoringOnlyAi.length}): `\n + `${enabledAuthoringOnlyAi.map((capability) => `\\`${capability}\\``).join(', ')} — development tooling that`,\n 'operates on this application\\'s own source while it is built. It processes no user data and makes no',\n 'decision about any person, so it does NOT belong in this document. Do not deny it exists either:',\n 'the accurate statement is about the SERVICE, not about the capability set.',\n ]\n : [];\n if (enabledAi.length === 0) {\n return [\n '## Automated decisions and AI',\n 'No AI capability reaches this application\\'s CONTRACTED SERVICE. That is a positive, checkable',\n 'statement: the service performs no AI processing of personal data, automated or otherwise.',\n ...authoringOnlyAiNote,\n ];\n }\n const regimes = deriveAiRegulationRegimes(operatingJurisdictions);\n const derived = deriveApplicationAiUses({ contractedServiceCapabilities: enabledAi, capabilityPosture: posture, agents, regimes: regimes.regimes });\n const agentsByRef = new Map((agents ?? []).map((agent) => [agent.ref, agent] as const));\n const agentUses = derived.uses.filter((use) => use.source === AiUseDeclarationSource.AGENT);\n return [\n '## Automated decisions and AI',\n 'Per enabled AI capability, and per agent that runs on one: what it is used for, its use DOMAIN, whether it',\n 'DECIDES something about a person, and how human intervention is obtained where it does. A use listed',\n 'OUTSTANDING has no declared posture — do NOT read that as \"it decides nothing\". Saying nothing about',\n 'consequence is how a notice claims an exemption it has not earned; state the gap instead.',\n '',\n ...enabledAi.map((capability) => {\n const declared = posture?.[capability];\n if (declared !== undefined) return `- \\`${capability}\\` — ${describeAiUse(declared, derived.uses.find((use) => use.source === AiUseDeclarationSource.CAPABILITY && use.ref === capability)?.reading ?? null)}`;\n const onIt = agentUses.filter((use) => use.capability === capability);\n if (!derived.undeclaredCapabilities.includes(capability)) return `- \\`${capability}\\` — declared per agent (${onIt.length}), below.`;\n return `- \\`${capability}\\` — OUTSTANDING: enabled, consequence not declared.`;\n }),\n ...renderAgentAiUses(agents, agentUses, agentsByRef, derived.undeclaredAgentRefs),\n ...(derived.invalidDeclarations.length > 0\n ? [\n '',\n `INVALID agent declarations (${derived.invalidDeclarations.length}) — the posture schema refuses them; state the use as not yet established:`,\n ...derived.invalidDeclarations.map((invalid) => `- \\`${invalid.ref}\\`: ${invalid.issues.join('; ')}`),\n ]\n : []),\n '',\n ...renderAiRegulationReading(regimes.jurisdictionsDeclared, regimes.regimes.length > 0, derived),\n ...(derived.undeclaredCapabilities.length > 0\n ? ['', `OUTSTANDING (${derived.undeclaredCapabilities.length}): ${derived.undeclaredCapabilities.map((capability) => `\\`${capability}\\``).join(', ')} — an operator decides and states this.`]\n : []),\n ];\n}\n\n/** One declared use, in one line: consequence, purpose, domain and its reading, human intervention. */\nfunction describeAiUse(declared: AiUsePosture, reading: AiUseRiskReading | null, derivedReview?: string): string {\n const review = derivedReview ?? (declared.humanReviewArrangement === null ? undefined : declared.humanReviewArrangement);\n return `${declared.consequence}; used for: ${declared.purpose}`\n + (declared.domain === undefined ? '; domain: OWED' : `; domain: \\`${declared.domain}\\`${reading === null ? '' : ` → ${reading.tier}`}`)\n + (review === undefined ? '' : `; human intervention: ${review}`);\n}\n\n/**\n * The application's agents (#2838): each agent's declared use, and its human review DERIVED from its tools' approval\n * gates where every changing tool has one (`deriveAgentWriteOversight`). Agents that could not be read are said to be\n * unread, never listed as none.\n */\nfunction renderAgentAiUses(\n agents: readonly AgentAiUseDeclaration[] | undefined,\n agentUses: readonly ApplicationAiUse[],\n agentsByRef: ReadonlyMap<string, AgentAiUseDeclaration>,\n undeclaredAgentRefs: readonly string[] | null,\n): readonly string[] {\n if (agents === undefined) {\n return [\n '',\n 'Agents: NOT READ — the application\\'s agents could not be introspected, so an agent-level declaration counts',\n 'for nothing here. Do not describe what the agents do; state that their uses are not established.',\n ];\n }\n const lines = agentUses.map((use) => {\n const agent = agentsByRef.get(use.ref);\n const oversight = agent === undefined ? null : deriveAgentWriteOversight(agent);\n const derivedReview = oversight?.arrangementDerivedFromGates === true\n ? `every tool it can change something with waits for a person's approval (${agent!.gatedWriteToolRefs.map((ref) => `\\`${ref}\\``).join(', ')}) — derived from the approval gates`\n : undefined;\n const ungated = oversight?.oversight === AgentWriteOversight.UNGATED_WRITES\n ? `; changes something with NO approval: ${agent!.ungatedWriteToolRefs.map((ref) => `\\`${ref}\\``).join(', ')}`\n : '';\n const unread = (oversight?.unresolvedToolRefs.length ?? 0) > 0 ? ` (${oversight!.unresolvedToolRefs.length} tool(s) the application does not register were not read)` : '';\n return `- agent \\`${use.ref}\\` (\\`${use.capability}\\`) — ${describeAiUse(use.posture, use.reading, derivedReview)}${ungated}${unread}`;\n });\n return [\n ...(lines.length > 0 ? ['', `Agents declaring their use (${lines.length}):`, ...lines] : []),\n ...((undeclaredAgentRefs ?? []).length > 0\n ? ['', `OUTSTANDING agents (${undeclaredAgentRefs!.length}): ${undeclaredAgentRefs!.map((ref) => `\\`${ref}\\``).join(', ')} — run on an AI capability of the contracted service and declare no use.`]\n : []),\n ...renderAgentContentGuardrails(agents.filter((agent) => agentUses.some((use) => use.ref === agent.ref) || (undeclaredAgentRefs ?? []).includes(agent.ref))),\n ];\n}\n\n/**\n * What each agent of the contracted service DECLARES its model may be sent and may let out (#2848): its personal-data\n * treatment, whether it screens third-party content for prompt injection, and its output-moderation policy.\n *\n * A notice about AI says what a model provider receives, and these declarations are that answer. Stated as DECLARED:\n * an organization's agent policy can only tighten them at run time, which no declaration reading can see, so a\n * missing declaration is \"not declared by the agent\", never \"never applied\". A field the agent list does not carry\n * (an application whose engine predates it) is \"not read\", never \"not declared\".\n */\nfunction renderAgentContentGuardrails(agents: readonly AgentAiUseDeclaration[]): readonly string[] {\n if (agents.length === 0) return [];\n const read = <T>(agent: AgentAiUseDeclaration, field: 'personalDataTreatment' | 'promptInjectionScreening' | 'outputModeration'): T | null | undefined =>\n (agent as unknown as Record<string, T | null | undefined>)[field];\n const lines = agents.map((agent) => {\n const treatment = read<string>(agent, 'personalDataTreatment');\n const screening = read<string>(agent, 'promptInjectionScreening');\n const moderation = read<Record<string, string>>(agent, 'outputModeration');\n const personalData = treatment === undefined\n ? 'personal data: NOT READ'\n : treatment === null\n ? 'personal data: no treatment declared (its model receives personal values in clear unless an organization\\'s policy imposes one)'\n : `personal data: \\`${treatment}\\` before the model is sent it`;\n const injection = screening === undefined\n ? 'prompt-injection screening: NOT READ'\n : screening === null ? 'prompt-injection screening: not declared' : `prompt-injection screening: \\`${screening}\\``;\n const moderated = moderation === undefined\n ? 'output moderation: NOT READ'\n : moderation === null || Object.keys(moderation).length === 0\n ? 'output moderation: not declared'\n : `output moderation: withheld at or above ${Object.entries(moderation).map(([category, severity]) => `\\`${category}\\` ${severity}`).join(', ')}`;\n return `- agent \\`${agent.ref}\\` — ${personalData}; ${injection}; ${moderated}`;\n });\n return [\n '',\n `Content guardrails each agent DECLARES (${lines.length}) — state what the model provider receives from these, never more.`,\n 'An organization\\'s agent policy can only tighten them at run time (a treatment, screening or moderation categories); say a',\n 'stricter setting is possible, never that one is applied:',\n ...lines,\n ];\n}\n\n/**\n * The regulatory reading of the declared domains (#2838): computed only where the application operates under the EU AI\n * Act (#2852). A prohibited-practice candidate is marked CRITICAL and a high-risk candidate MAJOR; neither stops\n * anything (Paul, 2026-10-18).\n */\nfunction renderAiRegulationReading(jurisdictionsDeclared: boolean, euAiActApplies: boolean, derived: ApplicationAiUses): readonly string[] {\n if (!jurisdictionsDeclared) {\n return ['AI regulation: the application declares no operating jurisdiction, so the regulatory class of each use is OWED. State it as not yet assessed.'];\n }\n if (!euAiActApplies) {\n return ['AI regulation: no declared jurisdiction is one the EU AI Act reaches, so no use is classed under it. Do not describe any use in that Act\\'s terms.'];\n }\n const marks = derived.uses.flatMap((use) => {\n const reading = use.reading;\n if (reading === null) return [];\n const tierMarks = reading.tier === AiUseRiskTier.PROHIBITED_PRACTICE_CANDIDATE\n ? [`- CRITICAL — \\`${use.ref}\\` declares \\`${use.posture.domain}\\`, a practice Article 5(1)(${reading.article5Point}) of the EU AI Act prohibits${reading.appliesFrom === undefined ? '' : ` from ${reading.appliesFrom}`}. A CANDIDATE, marked and not refused: say plainly the use must not be offered where the Act applies until a person establishes it falls outside Article 5.`]\n : reading.tier === AiUseRiskTier.HIGH_RISK_CANDIDATE\n ? [`- MAJOR — \\`${use.ref}\\` declares \\`${use.posture.domain}\\`, Annex III area ${reading.annexIIIArea}: a high-risk CANDIDATE${reading.exemptionVoidedByProfiling ? ' (its declared exemption does not apply, because it profiles natural persons)' : ''}. Wildo does not yet support high-risk AI systems: state it as not supported, never as compliant.`]\n : reading.classificationOwed ? [`- \\`${use.ref}\\` declares domain \\`OTHER\\`: its classification is owed.`] : [];\n // Stated on EVERY tier, the prohibited one included (#2838 B2): an Article 6(3) exemption is meaningless on any domain\n // outside Annex III, and a CRITICAL mark is no reason to leave the author believing their exemption holds.\n const exemptionNote = reading.exemptionNotApplicable\n ? [`- \\`${use.ref}\\` declares a high-risk exemption on a domain outside Annex III, where it means nothing: correct the declaration.`]\n : [];\n return [...tierMarks, ...exemptionNote];\n });\n return [\n 'AI regulation: the EU AI Act applies to this application. Each declared domain is read against it; a reading is a',\n 'CANDIDATE a person confirms, never a legal conclusion.',\n ...marks,\n ...(derived.domainOwedRefs.length > 0\n ? [`Domain OWED (${derived.domainOwedRefs.length}): ${derived.domainOwedRefs.map((ref) => `\\`${ref}\\``).join(', ')} — declared without a use domain, so its class cannot be read. Do not infer it from the purpose.`]\n : []),\n ];\n}\n\n/**\n * What the application stores in a visitor's BROWSER — the itemised table a cookie notice is.\n *\n * Split by origin for the same reason the resource declarations are: every generated application sets\n * at least one cookie it never authored, because the framework sets it. Asking only the application\n * would produce a cookie table missing the session cookie, which is the one entry a visitor is most\n * certain to have (issue #91).\n *\n * A surface with no inventory is reported UNINVENTORIED and is never rendered as \"sets nothing\" — an\n * empty ARRAY is that answer, and the two must not collapse. A cookie table that silently omits a\n * surface tells a visitor they are tracked by less than they are.\n */\n/**\n * WHO is publishing this document, in what role, on what lawful basis (issue #131).\n *\n * Rendered ABSENT-as-absent, like every other declaration in this section: a document that cannot\n * name its operator must say so, and an omission here would let a drafter reach for a plausible\n * entity name — the one invention a privacy notice can least afford, since the identity is what a\n * subject uses to exercise a right.\n */\n/**\n * WHO RUNS each runtime-bound provider, and WHERE it processes (issue #130).\n *\n * This is what turns a recipients section from a negation into an ENUMERATION. Until it existed, a\n * notice could say \"no external provider is bound to a runtime\" and nothing else — true for an\n * application that binds none, and unable to describe one that does.\n *\n * The deployment model is the axis that decides whether a bound provider is a RECIPIENT at all. A\n * self-hosted one is not: the operator runs it, no third party receives anything, and naming it as a\n * recipient would be false in the direction that alarms a reader rather than the one they can check.\n * Rendered as its own sentence rather than omitted, because \"we run this ourselves\" is a positive\n * statement worth making.\n *\n * A bound provider with NO choice is reported as unanswered rather than assumed vendor-hosted.\n * Assuming would be safe for the notice and wrong for the operator — it would publish that data goes\n * to a third party when nobody said so.\n */\nfunction renderProviderComplianceChoices(\n runtimeScopedProviderRefs: readonly string[],\n choices: ApplicationProviderComplianceChoices | undefined,\n): readonly string[] {\n if (runtimeScopedProviderRefs.length === 0) return [];\n\n const declared = choices ?? {};\n const recipients: string[] = [];\n const operatorRun: string[] = [];\n const unanswered: string[] = [];\n\n for (const providerRef of runtimeScopedProviderRefs) {\n const choice = declared[providerRef];\n if (choice === undefined) {\n unanswered.push(providerRef);\n } else if (choice.deploymentModel === ProviderDeploymentModel.SELF_HOSTED) {\n operatorRun.push(providerRef);\n } else {\n recipients.push(`\\`${providerRef}\\` — processes in ${choice.processingRegion ?? 'an undeclared region'}`);\n }\n }\n\n return [\n '',\n 'Who RUNS each bound provider, and where it processes:',\n ...(recipients.length > 0\n ? [\n ` THIRD-PARTY RECIPIENTS (${recipients.length}) — vendor-hosted, so data reaches a third party:`,\n ...recipients.map((entry) => ` - ${entry}`),\n ]\n : [' Third-party recipients: NONE.']),\n ...(operatorRun.length > 0\n ? [\n ` OPERATOR-RUN (${operatorRun.length}) — self-hosted, so no third party receives anything:`,\n ...operatorRun.map((providerRef) => ` - \\`${providerRef}\\``),\n ' State these as processing under the operator\\'s own control. They are NOT recipients and must',\n ' not be enumerated as such.',\n ]\n : []),\n ...(unanswered.length > 0\n ? [\n ` UNANSWERED (${unanswered.length}): ${unanswered.map((providerRef) => `\\`${providerRef}\\``).join(', ')}.`,\n ' Bound to a runtime with no declared deployment model, so whether data reaches a third party is',\n ' not established. Do NOT assume vendor-hosted: that would publish that data goes to a third',\n ' party when nobody said so. Declare it in `wildo.saas.config.ts` under',\n ' `providerComplianceChoices`.',\n ]\n : []),\n ];\n}\n\n/**\n * Where an operator says a provider processes, that the PROVIDER does not offer (issue #308).\n *\n * `appAssertedProcessingRegions` has computed exactly this set since the compliance-choice schema\n * landed, and had NO CALLER — the schema's own field said so in a `⚠️` note. The reason was a data\n * path rather than a decision: the profile that lists a vendor's regions lives on the backend provider\n * MODULE, and this renderer can reach provider SPECIFICATIONS. Mirroring `complianceProfile` onto the\n * specification is what made the comparison possible here; this is the report it exists for.\n *\n * REPORTED, NEVER REFUSED, and the asymmetry is the whole design. A vendor opening a data centre must\n * not become an application build failure, and an operator who genuinely knows better than a framework\n * list shipped months ago should be able to say so. What the framework owes is that the divergence is\n * VISIBLE — the same trade the personal-data declaration report makes.\n *\n * Both readings are named because they are opposite work: a typo publishes a region the data never\n * reaches, and a genuine new region means the provider module is stale. A drafter must not silently\n * pick one.\n *\n * A provider with no registered specification contributes nothing here — the helper skips it, because\n * \"this provider declares no compliance profile at all\" is a different gap with a different owner, and\n * reporting it as an asserted REGION would misname it.\n */\nfunction renderAppAssertedProcessingRegions(\n choices: ApplicationProviderComplianceChoices | undefined,\n profilesByProviderRef: Readonly<Record<string, ProviderComplianceProfile>>,\n): readonly string[] {\n if (choices === undefined) return [];\n\n const asserted = appAssertedProcessingRegions({ choices, profilesByProviderRef });\n if (asserted.length === 0) return [];\n\n return [\n '',\n ` APP-ASSERTED REGIONS (${asserted.length}) — the operator names a region the provider does not offer:`,\n ...asserted.map(({ providerRef, region }) => {\n const offered = establishedProviderComplianceProfile(profilesByProviderRef[providerRef])?.processingRegions ?? [];\n return ` - \\`${providerRef}\\` — configured as \\`${region}\\`; the provider declares `\n + (offered.length > 0 ? offered.map((entry) => `\\`${entry}\\``).join(', ') : 'no region at all');\n }),\n ' This is NOT refused: a vendor opening a data centre must not break a build, and the operator may',\n ' know better than a framework list. It is reported because the two readings are opposite work — a',\n ' TYPO publishes a region the data never reaches, and a GENUINELY NEW region means the provider',\n ' module is stale. Establish which before stating the region in a notice.',\n ];\n}\n\n/**\n * What the providers' own compliance PROFILES say about the operator's choices, and what research is owed (#1708).\n *\n * The region divergence has its own block above; this renders the rest of the assessment, each as a DIFFERENT piece\n * of work: a deployment model the provider does not offer is a configuration error, an UNDETERMINED profile is a\n * vendor nobody has researched, and a provider with no profile at all is a module that states nothing. When the\n * profiles could not be read the section says so — \"no gap\" and \"not checked\" must not render identically.\n */\nexport function renderProviderComplianceProfileFindings(population: RecipientPopulation, unreadableReason: string | undefined): readonly string[] {\n if (!population.complianceProfilesRead) {\n return population.operatorSubProcessorRefs.length === 0 ? [] : [\n '',\n ` PROVIDER PROFILES NOT READ${unreadableReason === undefined ? '' : ` (${unreadableReason})`}: the operator's choices were checked only`,\n ' against the engine providers\\' own declarations, so a catalogue vendor\\'s possibilities were not compared.',\n ];\n }\n const modelNotOffered = population.complianceChoiceAssessments.filter((entry) => entry.assessment === ProviderComplianceChoiceAssessment.DEPLOYMENT_MODEL_NOT_OFFERED);\n // #3513: a region the product calls is a different statement from one the operator attests about its account, and a\n // region the provider says nothing about is neither. A document states each as what it is.\n const regioned = population.complianceChoiceAssessments.filter((entry) => entry.choice.processingRegion !== undefined);\n // The word (ENFORCED / ATTESTED / NEITHER) is `processingRegionHoldingOf`, the reading the computed\n // `recipients-and-processors` fact states too, so the brief and the published fact cannot name one region differently.\n const regionHolds = (reach: ProviderProcessingRegionReachKind | null): string => {\n const holding = processingRegionHoldingOf(reach).toUpperCase();\n if (reach === null) return `${holding} — the provider does not say how this region is reached, so state it as the operator's claim only`;\n switch (reach) {\n case ProviderProcessingRegionReachKind.ENDPOINT:\n return `${holding} — every call goes to that region's endpoint`;\n case ProviderProcessingRegionReachKind.REQUEST_PARAMETER:\n return `${holding} — every request names that region`;\n case ProviderProcessingRegionReachKind.ACCOUNT_RESIDENCY:\n return `${holding} — the operator's statement about its account at the vendor; no call selects it`;\n }\n };\n return [\n ...(regioned.length > 0\n ? [\n '',\n ` PROCESSING REGIONS (${regioned.length}) — how each chosen region holds:`,\n ...regioned.map((entry) => ` - \\`${entry.providerRef}\\` \\`${entry.choice.processingRegion}\\` — ${regionHolds(entry.regionReach)}`),\n ]\n : []),\n ...(modelNotOffered.length > 0\n ? [\n '',\n ` DEPLOYMENT MODEL NOT OFFERED (${modelNotOffered.length}) — the operator chose a model the provider does not declare:`,\n ...modelNotOffered.map((entry) => ` - \\`${entry.providerRef}\\` — configured \\`${entry.choice.deploymentModel}\\`; the provider offers `\n + (entry.offered?.deploymentModels.map((model) => `\\`${model}\\``).join(', ') ?? 'nothing'))\n ]\n : []),\n ...(population.operatorSubProcessorsWithUndeterminedProfile.length > 0\n ? [\n '',\n ` PROFILE UNDETERMINED (${population.operatorSubProcessorsWithUndeterminedProfile.length}): `\n + `${population.operatorSubProcessorsWithUndeterminedProfile.map((ref) => `\\`${ref}\\``).join(', ')}.`,\n ' In use, and nobody has researched who runs these vendors or where they process. Their region and',\n ' legal identity are outstanding — state that plainly; the operator establishes them on its register.',\n ]\n : []),\n ...(population.operatorSubProcessorsWithoutProfile.length > 0\n ? [\n '',\n ` NO PROFILE DECLARED (${population.operatorSubProcessorsWithoutProfile.length}): `\n + `${population.operatorSubProcessorsWithoutProfile.map((ref) => `\\`${ref}\\``).join(', ')}.`,\n ' The provider module states nothing about who runs it. Treat it exactly like UNDETERMINED above.',\n ]\n : []),\n ];\n}\n\n/**\n * Which compliance facts the operator relies on have outlived the interval its register declares (#1708).\n *\n * The register's own date is always stated, because \"checked on X\" is what a drafter needs whether or not it is\n * current. Vendor facts are named only when STALE or UNDATED — a line per current fact would train a drafter to skim —\n * and UNDATED ones are named, because a fact with no date must not read as a current one.\n */\nfunction renderComplianceFactStaleness(\n population: RecipientPopulation,\n register: ApplicationProcessorRegister | undefined,\n profilesByProviderRef: Readonly<Record<string, ProviderComplianceProfile>>,\n asOf: string,\n): readonly string[] {\n if (register === undefined) return [];\n const report = complianceFactStaleness({ register, profilesByProviderRef, providerRefs: population.operatorSubProcessorRefs, asOf });\n const staleProfiles = report.providerProfiles.filter((entry) => entry.currency === ComplianceFactCurrency.STALE);\n return [\n '',\n 'How current the vendor facts are:',\n report.register.currency === ComplianceFactCurrency.UNDATED\n ? ' The processor register carries no verification date, so nobody can say how old its vendor facts are.'\n : ` The processor register was last verified on ${report.register.verifiedAt} (${report.register.ageDays} day(s) ago)`\n + (report.reverificationIntervalDays === null\n ? '; it declares no re-verification interval, so nothing is called stale.'\n : `; the application re-verifies every ${report.reverificationIntervalDays} day(s), so it is ${report.register.currency}.`),\n ...(staleProfiles.length > 0\n ? [` STALE vendor facts (${staleProfiles.length}): ${staleProfiles.map((entry) => `\\`${entry.providerRef}\\` (read ${entry.verifiedAt})`).join(', ')} — re-check each against the vendor's own page before relying on it.`]\n : []),\n ...(report.undatedProviderRefs.length > 0\n ? [` UNDATED vendor facts (${report.undatedProviderRefs.length}): ${report.undatedProviderRefs.map((ref) => `\\`${ref}\\``).join(', ')} — the provider states them without saying when or where they were read, so their age is unknown.`]\n : []),\n ];\n}\n\n/**\n * Which processors a recorded data processing agreement governs, and which it does not (#1709).\n *\n * Only the operator knows whether it is bound by a DPA, so the brief states what the register records and names what\n * it does not. An entry recorded as NOT_IN_PLACE is named apart from an unrecorded one: the first is a stated gap,\n * the second an open question, and a notice must not present either as a governed processor. Nothing when there is\n * no register — its absence is already stated with the population join.\n */\nfunction renderProcessorAgreementStanding(register: ApplicationProcessorRegister | undefined): readonly string[] {\n if (register === undefined) return [];\n const standing = processorAgreementStanding(register);\n const recorded = standing.entries.filter((entry) => entry.dataProcessingAgreement !== null);\n return [\n '',\n 'Data processing agreements and vendor retention (the operator\\'s own record):',\n recorded.length > 0\n ? ` Recorded: ${recorded.map((entry) => `\\`${entry.ref}\\` ${entry.dataProcessingAgreement}${entry.vendorRetention === null ? '' : ` — retention: ${entry.vendorRetention}`}`).join('; ')}.`\n : ' No processor on the register records a DPA.',\n ...(standing.agreementNotInPlaceRefs.length > 0\n ? [` NO DPA IN PLACE (${standing.agreementNotInPlaceRefs.length}): ${standing.agreementNotInPlaceRefs.map((ref) => `\\`${ref}\\``).join(', ')} — the operator states none governs this processing; do not describe it as governed.`]\n : []),\n ...(standing.agreementUnrecordedRefs.length > 0\n ? [` DPA NOT RECORDED (${standing.agreementUnrecordedRefs.length}): ${standing.agreementUnrecordedRefs.map((ref) => `\\`${ref}\\``).join(', ')} — nobody has recorded whether a DPA governs it.`]\n : []),\n ...(standing.vendorRetentionUnrecordedRefs.length > 0\n ? [` Vendor retention not recorded: ${standing.vendorRetentionUnrecordedRefs.map((ref) => `\\`${ref}\\``).join(', ')}.`]\n : []),\n ];\n}\n\n/**\n * WHERE a coding run sends the application's SOURCE CODE, per model (issue #308, joins 2 and 3).\n *\n * The half of the recipient question no per-provider declaration can answer. A generalist coding agent\n * routes to several vendors, so the agent's publisher is not the recipient — OpenCode is a binary on\n * the operator's own host, and the same execution profile sends code to Anthropic or to OpenAI\n * depending on one model id. `providerComplianceChoices` has one entry per provider and structurally\n * cannot say that, which is why the declaration lives on the execution profile and is read back here\n * through `readCodingModelDestinations` rather than by parsing the opaque configuration bag.\n *\n * The GATEWAY is rendered as its own line, distinct from the vendor behind it, because it is its own\n * processor: a hosted proxy receives the code first. Naming only the vendor understates the chain by\n * one party, and naming only the gateway understates it by the other — and a processor register that\n * gets this wrong is wrong about who holds the customer's source.\n *\n * A profile that declares NO destination is named rather than skipped, and never assumed to be the\n * agent's own publisher. Reported, not refused: the framework does not know which vendor account an\n * operator authorised, and a stale framework list must not brick a build.\n *\n * Renders nothing at all when the application configures no coding agent — most do not, and a section\n * of caveats about a lane nobody runs is how a brief teaches a drafter to skim.\n */\nfunction renderCodingModelDestinations(\n providerConfigurations: Readonly<Record<string, unknown>> | undefined,\n): readonly string[] {\n if (providerConfigurations === undefined) return [];\n\n const { destinations, profilesWithoutDestinations } = readCodingModelDestinations(providerConfigurations);\n if (destinations.length === 0 && profilesWithoutDestinations.length === 0) return [];\n\n return [\n '',\n 'Where a CODING RUN sends this application\\'s source code:',\n 'An autonomous coding session sends the task prompt, retrieved context and — through the agent\\'s own',\n 'file reads — the application\\'s SOURCE CODE to the selected model vendor. That content can include the',\n 'domain model, schemas, seed-data shapes and business rules, so each destination below is a recipient a',\n 'notice must name.',\n ...(destinations.length > 0\n ? destinations.flatMap((entry) => [\n ` - \\`${entry.providerRef}\\` / \\`${entry.executionProfileRef}\\` / model \\`${entry.model}\\` → `\n + `${entry.destination.vendorLegalEntityName}; processes in ${entry.destination.processingRegions.join(', ')}`,\n ...(entry.destination.gateway === undefined\n ? []\n : [\n ` - reached THROUGH ${entry.destination.gateway.legalEntityName} `\n + `(${entry.destination.gateway.processingRegions.join(', ')}) — a gateway that receives the code `\n + 'BEFORE the vendor does, so it is its own sub-processor and must be named separately.',\n ]),\n ])\n : []),\n ...(profilesWithoutDestinations.length > 0\n ? [\n ` UNDECLARED DESTINATION (${profilesWithoutDestinations.length}): `\n + profilesWithoutDestinations.map((entry) => `\\`${entry.providerRef}\\`/\\`${entry.executionProfileRef}\\``).join(', ')\n + '.',\n ' A coding run through these sends source code somewhere the register cannot describe. Do NOT name',\n ' the agent\\'s own publisher as the recipient — a generalist agent runs on the operator\\'s host and',\n ' receives nothing itself. Declare `modelDestinations` on the execution profile.',\n ]\n : []),\n ];\n}\n\n/**\n * What a person must agree to in order to USE the service (issue #139).\n *\n * Three states and they are three different sentences, which is the whole reason this renders\n * separately from the identity that contains it:\n *\n * - ABSENT — nobody has been asked. Names the surface, and says plainly that this is NOT \"no consent\n * is required\", because rendering silence as an answer is the conflation the schema stays optional\n * to prevent.\n * - an EMPTY required set — a POSITIVE answer: the operator declared that nothing is gated on consent.\n * Usually the correct one, and the brief says why, because a drafter that reads it as \"no\n * information\" would throw away a declaration the operator deliberately made.\n * - required purposes — a gate, rendered with each purpose and what it gates, since the schema refuses\n * one without. Purposes are listed as a SET (#453): requiring marketing says nothing about analytics.\n * Since #453 this gate is also ENFORCED at runtime, so the brief says so: a notice may state it as a\n * fact about the running product, not merely a declaration.\n *\n * The last line is the one that matters most and is easiest to omit: a consent GATE is not a lawful\n * BASIS. For most B2B SaaS the basis for core processing is CONTRACT, and a notice that reads a gate\n * as a basis states that a person's data is processed on consent they could withdraw — which would\n * be wrong about the single most consequential thing in the document.\n */\nfunction renderServiceConsentRequirement(requirement: ServiceConsentRequirement | undefined): readonly string[] {\n if (requirement === undefined) {\n return [\n '',\n 'Service-wide consent requirement: NOT DECLARED. What a person must agree to in order to use the',\n 'service at all is not established. This is NOT the same as \"no consent is required\" — nobody has',\n 'answered. It is declared in `wildo.saas.config.ts` under',\n '`operatorComplianceIdentity.serviceConsentRequirement`.',\n ];\n }\n\n return [\n '',\n ...(requirement.requiredPurposes.length === 0\n ? [\n 'Service-wide consent requirement: NONE — the operator DECLARED that using the service is not',\n 'gated on consent. This is a positive answer, not an absence: state it as settled.',\n ]\n : [\n `Service-wide consent requirement: consent to ${requirement.requiredPurposes.join(' and ')}, gating: ${requirement.gatedProcessing}`,\n 'This gate is ENFORCED: a signed-in person cannot use the application until they grant every purpose',\n 'listed. Each purpose is granted independently — requiring one implies nothing about another.',\n ]),\n 'A consent GATE is not a lawful BASIS. What a person must agree to in order to proceed, and the',\n 'Art. 6(1) basis the processing rests on, are different questions — the basis is declared per',\n 'purpose in `lawfulBases`. Do not state that processing relies on consent because a gate exists.',\n ];\n}\n\nfunction renderOperatorComplianceIdentity(identity: ApplicationOperatorComplianceIdentity | undefined): readonly string[] {\n if (identity === undefined) {\n return [\n '',\n 'Operator compliance identity: NOT DECLARED. The legal entity, its registered address, the privacy',\n 'contact route, the operator\\'s role per population of data, the lawful basis per purpose, and where the',\n 'operator hosts the data are all absent from the application configuration. State them as outstanding',\n 'and name the surface: they are declared in `wildo.saas.config.ts` under `operatorComplianceIdentity`.',\n 'Do NOT invent an entity name, an address or a contact — those are what a subject uses to exercise a',\n 'right against a real company.',\n ];\n }\n\n /*\n * Every part is now independently declarable (#228), so this renders PART BY PART rather than\n * assuming a complete identity. An outstanding part is named, with the configuration key that closes\n * it — a drafter that cannot see what is missing has no way to mark the gap, and marking it is the\n * behaviour the whole lane depends on.\n */\n const outstanding = outstandingOperatorComplianceIdentityParts(identity);\n\n return [\n '',\n identity.legalEntityName === undefined\n ? 'Operator legal entity: OUTSTANDING — not declared in `operatorComplianceIdentity.legalEntityName`. Do NOT invent one.'\n : `Operator: ${identity.legalEntityName}.`,\n identity.registeredAddress === undefined\n ? 'Registered address: OUTSTANDING — `operatorComplianceIdentity.registeredAddress`. Do NOT invent one; it is what a subject uses to serve a request on a real company.'\n : `Registered at ${identity.registeredAddress}.`,\n identity.privacyContact === undefined\n ? 'Privacy contact route: OUTSTANDING — `operatorComplianceIdentity.privacyContact`. Do NOT invent one; a route that does not exist is worse than a stated gap.'\n : `Privacy contact: ${identity.privacyContact}.`,\n ...(identity.representative === undefined\n /*\n * The \"absent means not required\" reading holds only on a COMPLETE identity. On a partial one it\n * cannot be told apart from a part nobody reached yet, and asserting the stronger sentence there\n * would put an unsupported claim about Art. 27 into the drafter's context.\n */\n ? outstanding.length === 0\n ? ['No Art. 27 representative is declared, which means one is not required — not that the question was skipped.']\n : ['No Art. 27 representative is declared. On a partially declared identity that cannot be read as \"not required\" — it is simply unanswered.']\n : [`Art. 27 representative: ${identity.representative.name}, ${identity.representative.address}.`]),\n '',\n ...(identity.roleAllocations === undefined\n ? [\n 'Role per population of data: OUTSTANDING — `operatorComplianceIdentity.roleAllocations`. Do NOT assign the',\n 'operator a single role by default: controller and processor carry different obligations, and a product is',\n 'commonly both at once over different populations.',\n ]\n : [\n 'Role, per population of data — there may be SEVERAL, and a notice must not collapse them into one:',\n ...identity.roleAllocations.map((allocation) => ` - ${allocation.role} for ${allocation.dataScope}`),\n ]),\n '',\n ...(identity.lawfulBases === undefined\n ? [\n 'Lawful basis per purpose: OUTSTANDING — `operatorComplianceIdentity.lawfulBases`. This is a legal',\n 'determination, not a drafting choice. State it as unestablished; do NOT select a basis because one',\n 'sounds plausible, and in particular do not write CONSENT, which would tell a person their data is',\n 'processed on an agreement they could withdraw.',\n ]\n : [\n 'Lawful basis, per purpose:',\n ...identity.lawfulBases.map((entry) =>\n ` - ${entry.basis} for ${entry.purpose}`\n + (entry.assessmentNote === undefined ? '' : ` — assessment: ${entry.assessmentNote}`)),\n ]),\n '',\n identity.subjectRequestIdentityVerification === undefined\n ? 'Identity verification for rights requests: OUTSTANDING — `operatorComplianceIdentity.subjectRequestIdentityVerification`. '\n + 'Do NOT describe a verification step nobody has decided; a stated procedure is one a requester will rely on.'\n : `Identity verification for rights requests: ${identity.subjectRequestIdentityVerification}`,\n identity.hostingRegions === undefined\n ? 'Where the operator hosts the data: OUTSTANDING — `operatorComplianceIdentity.hostingRegions`. Do NOT name a region or a '\n + 'country nobody declared; an international-transfer statement starts from it.'\n : `The operator hosts the data in: ${identity.hostingRegions.join(', ')}.`,\n ...(outstanding.length === 0\n ? []\n : [\n '',\n `${outstanding.length} of ${Object.values(OperatorComplianceIdentityPart).length} identity part(s) outstanding: ${outstanding.join(', ')}. The identity is PARTIALLY`,\n 'declared — state each outstanding part as an open gap in the document rather than omitting it. A document',\n 'that silently leaves them out reads as though the operator answered.',\n ]),\n ];\n}\n\nfunction renderClientStorage(\n frontendSurfaceKeys: readonly string[],\n inventory: ApplicationClientStorageInventory | undefined,\n): readonly string[] {\n const renderEntry = (entry: ClientStorageEntry): string =>\n ` - \\`${entry.name}\\` (${entry.mechanism}) — ${entry.purpose} ${entry.necessity}; persists: ${entry.lifetime}`\n + (entry.setWhen === null ? '' : ` Set when: ${entry.setWhen}`);\n const uninventoried = uninventoriedClientStorageSurfaces(frontendSurfaceKeys, inventory);\n return [\n \"## What the application stores in a visitor's browser\",\n 'Cookies and client-side storage, split by who sets them. STRICTLY_NECESSARY entries carry a service',\n 'the visitor asked for; CONSENT_GATED entries may only be set after consent. A surface listed',\n 'UNINVENTORIED has not been catalogued — that is NOT \"it sets nothing\", and stating the second from',\n 'the first tells a visitor they are tracked by less than they are.',\n '',\n 'Set by the FRAMEWORK, in every application (nobody authored these; they are inherited):',\n ...ENGINE_CLIENT_STORAGE_ENTRIES.map(renderEntry),\n '',\n ...frontendSurfaceKeys.flatMap((surfaceKey) => {\n const entries = inventory?.[surfaceKey];\n if (entries === undefined) return [`- surface \\`${surfaceKey}\\` — UNINVENTORIED.`];\n if (entries.length === 0) return [`- surface \\`${surfaceKey}\\` — sets nothing of its own beyond the framework entries above.`];\n return [`- surface \\`${surfaceKey}\\`:`, ...entries.map(renderEntry)];\n }),\n ...(uninventoried.length > 0\n ? ['', `UNINVENTORIED (${uninventoried.length}): ${uninventoried.map((key) => `\\`${key}\\``).join(', ')} — an operator catalogues these.`]\n : []),\n ];\n}\n\n/** What {@link PlaybookRunCompanionService.submitBuildWaveDetached} answers when it started a wave. */\nexport interface BuildWaveSubmission {\n /** How many coding runs the wave may hold at once: the application's build parallelism. */\n readonly degree: number;\n /** The wave's playbook run; the feed reports how it settles and `lastCompleted` carries its result. */\n readonly runId: string;\n readonly playbookRef: string;\n /**\n * The task that was ready when the wave was submitted. The wave selects again as it fills, so this\n * says the wave had work to start, not which task it started first.\n */\n readonly nextReadyTask: { readonly taskRef: string; readonly objective: string };\n}\n\n/**\n * What a caller asks {@link PlaybookRunCompanionService.runPlaybook} for.\n *\n * Named rather than inline since 2026-09-19 because the method was split in two: a thin public\n * wrapper that owns the run's identity and its actor-plane rows, and the private\n * `executePlaybookRun` that does the work. Both need this type, and a 90-line inline object\n * repeated twice is a type that drifts.\n */\ntype PlaybookRunInput = {\n readonly playbookRef: string;\n /**\n * The signed-in person who started this run (#1751), when a person did: the workbench and the\n * creation conversation know one, the local console does not. A question the run then asks is ROUTED\n * to them (OWNER): only they settle it, and the engine checks and records who did. Absent, the\n * question stays unrouted and the door that answers it is its authority, as before. Carried in the\n * checkpoint, so a resumed run that asks again routes its next question to the same person.\n */\n readonly requestedByUserId?: string;\n /**\n * The playbook INSTANCE this run is (#1609); absent for the default instance. It must have been opened\n * (the dossier's activation record). It keys everything this run owns beyond its own run id: its\n * answers, its checkpoint, its research evidence, its row, and the instance its children inherit.\n */\n readonly instanceKey?: string;\n /**\n * Answers to a PREVIOUS suspension of this run, replayed into the brief. Set only by the resume\n * path; a first run never carries them.\n */\n readonly clarification?: {\n readonly requests: readonly PlaybookClarificationRequest[];\n readonly answers: readonly PlaybookClarificationAnswer[];\n readonly action: MetaWorkflow_ClarificationAction;\n readonly round: number;\n };\n /** Creator-supplied context for this run, appended to the playbook's own method guidance. */\n readonly creatorBrief?: string;\n /**\n * Why the JOURNEY LOOP chose this playbook, this iteration (#1423).\n *\n * Set by the loop, which composes a rationale per lane against what has already landed —\n * \"the market snapshot names three segments and no persona exists for any of them\" — and used to\n * drop it at the port, and by the choreography driver, whose selector writes each child's objective.\n * A run that was chosen for a reason can now state it.\n *\n * Kept apart from `creatorBrief` deliberately: one is what a HUMAN said this application is, the\n * other is what the SELECTOR said this round is for. Merging them would let a machine's reasoning\n * be read back as the creator's, and the brief renders them as two sections for the same reason.\n */\n readonly selectionRationale?: string;\n /** Answers to the questions this playbook DECLARES. Required in full when it declares any. */\n readonly elicitationAnswers?: readonly PlaybookElicitationAnswer[];\n /** Set by the choreography driver on a CHILD run: the parent composite's rendered elicitation. */\n readonly parentElicitationSection?: string;\n /**\n * Set by the choreography driver on a CHILD run: the ref of the composite already running in this\n * process. A child that is ITSELF a composite is admitted past the single-flight refusal on the\n * strength of this — see `runChoreography`.\n *\n * DRIVER-ONLY, like `parentElicitationSection` and `stepResults` beside it. Both HTTP entry points\n * (`POST /playbooks/:playbookRef/run` and the creation-plane dispatch) build this input from named\n * fields rather than spreading a request body, so it is unreachable from outside.\n */\n readonly nestedWithinChoreographyRef?: string;\n /**\n * Set by the choreography driver on a CHILD run: the id of the ROOT run whose tree this child belongs to\n * (#1610). Recorded on the child's row, so a root reading which runs overlapped it can leave out its own\n * children, which overlap it by construction. DRIVER-ONLY, like `nestedWithinChoreographyRef`.\n */\n readonly rootRunId?: string;\n /**\n * Set by the choreography driver on a CHILD of an instance composite: what the root INSTANCE was opened\n * for, as its activation records it (#1608). A child has no activation of its own, so this is how \"develop\n * the invoicing feature\" reaches the leaf that drafts it. DRIVER-ONLY, like `rootRunId`.\n */\n readonly instancePurpose?: string;\n /** The request's trace session, so this run's evidence lands beside the LLM call it explains. */\n readonly session?: CompanionExecutionSessionContext;\n /**\n * The creation CONVERSATION this run was started from, when it was (#1454, Step 4) — stamped\n * into the correlation envelope as `refs.conversationId`, so the conversation page lists the run\n * as a card of that thread. Absent for a run started from the board or the CLI.\n */\n readonly conversationId?: string;\n /** Full pipe — generation, validation, rendering, judge — with NO filesystem writes. For testing playbooks. */\n readonly dryRun?: boolean;\n /**\n * Step results of the CHOREOGRAPHY this run is a child of. Absent for a standalone run, which is\n * the honest value: a playbook run on its own has no siblings, so a `STEP_AVAILABLE` precondition\n * on it is unsatisfied rather than vacuously true.\n */\n readonly stepResults?: ReadonlyMap<string, unknown>;\n };\n\n/**\n * Every way a run can END, and there are six — a foundation result, an expert-personas staffing result, a\n * suspension, a choreography, an assessment, and a throw. That count is why the actor-plane settle lives in ONE\n * wrapper: a status threaded through each return by hand is a status that is wrong on at least one\n * of them, which is the \"control-plane row that looks like it tracks the run\" defect #1343 exists\n * to remove rather than to reproduce.\n */\ntype PlaybookRunOutcome =\n | FoundationExecutionResult\n | CapabilityCompositionExecutionResult\n | ApplicationMaturityExecutionResult\n | ExpertPersonasExecutionResult\n /**\n * The run SUSPENDED at an ambiguity and is waiting for the creator (LangGraph's interrupt, MCP's\n * elicitation). Not an error and not a failure: nothing was generated, nothing was written, and\n * the run continues through the resume route.\n */\n | {\n status: Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT;\n runId: string;\n playbookRef: string;\n family: string;\n round: number;\n requests: readonly PlaybookClarificationRequest[];\n }\n /**\n * A CHOREOGRAPHY run: the playbook declares children rather than outputs, so its deliverable is\n * what those children landed. No acceptance, exactly as an ordinary run reports none.\n */\n | {\n playbookRef: string;\n choreographed: true;\n stoppedBecause: PlaybookChoreographyStopReason;\n iterations: PlaybookChoreographyResult['iterations'];\n stepRefs: readonly string[];\n landed: readonly string[];\n /** What the ROOT composite leaves for a person to decide, from its own `approval` / `onFailure` (#111). */\n boundary: PlaybookChoreographyResult['boundary'];\n /**\n * One decision per boundary that OWED one — the root's and every nested lane's, outermost\n * first (#111 × #1497). A lane is where the question actually arises: inside one root run a\n * lane lands the domain plan and the next builds on it, so a single root decision would be\n * silence about every lane in between.\n */\n boundaryDecisions: readonly HumanDecision_Request[];\n /** The composite's wall-clock and every iteration's spend together (#1507). Per iteration and per child: on `iterations`. */\n durationMs: number;\n spend: PlaybookChoreographyResult['spend'];\n /** Rounds inherited from a checkpoint, across the resumed tree — see `PlaybookChoreographyResult.inheritedRounds`. */\n inheritedRounds: number;\n accepted: false;\n }\n /**\n * An ASSESSMENT run: the playbook declares no outputs, so its deliverable is the verdict over\n * the families it reads. Nothing generated, landed or wired.\n */\n | {\n playbookRef: string;\n assessed: true;\n subjects: readonly string[];\n reviewGuide: string;\n judge?: PlaybookJudgeResult;\n accepted: false;\n }\n /**\n * A VERIFICATION run: the playbook declares `executor: DETERMINISTIC_CLI`, so its deliverable is\n * the outcome of named checks run against the already-built application (issue #147).\n *\n * `passed` is the whole-run answer and is `null` under `dryRun`, where the checks were resolved\n * and deliberately not executed — a boolean there would have to be invented, and inventing it is\n * how a dry run comes to be read as a pass.\n *\n * `infrastructureError` is separate from a failing check on purpose: \"the application does not\n * typecheck\" and \"the typecheck could not be run\" send an operator to different places.\n */\n | {\n playbookRef: string;\n verified: true;\n dryRun?: true;\n checkRefs: readonly string[];\n /**\n * `output` is the tail of what a FAILED check printed. Without it a failure read only\n * \"Bounded subprocess failed\", the subprocess wrapper's message, while the cause\n * (a `TS2741`, an `ERR_MODULE_NOT_FOUND`) sat in the outcome's tails and was dropped here\n * (measured 2026-09-25, scratch-journey). Absent on a passing check.\n */\n checks: readonly { checkRef: string; success: boolean; message: string; output?: string }[];\n passed: boolean | null;\n infrastructureError?: string;\n accepted: false;\n }\n /**\n * A DISPATCH run: the playbook declares `executor: CODING_AGENT`, so its deliverable is a build\n * task actually run in the workspace rather than a file or a verdict.\n *\n * `taskRef` names exactly ONE task, and `remainingReadyTaskRefs` says what was left behind, on\n * purpose. This is the SINGLE-FLIGHT shape — the build parallelism is 1 — and reporting the one\n * task dispatched, beside the ones that were ready and were not, is what stops a run reading as a\n * wave it never performed. With a parallelism above one the tier runs a wave instead (#1528) and\n * answers with the WAVE member below; a bare \"dispatched\" would silently under-deliver either way.\n */\n | {\n playbookRef: string;\n dispatched: true;\n taskRef: string;\n targetKind: string;\n /** Ready when this run started, minus the one it took. Non-empty means MORE remain, not that a wave ran. */\n remainingReadyTaskRefs: readonly string[];\n landedTaskRefs: readonly string[];\n /**\n * The durable id of the coding run this dispatch admitted — absent for a generation step, whose\n * work was done before the dispatch resolved, and for a dry run, which dispatches nothing.\n */\n codingTaskId?: string;\n /**\n * What the coding run DID, read after its settlement. `dispatched` says an agent was STARTED;\n * this is the only field that says whether it finished, failed, or parked on a question.\n */\n codingRun?: ApplicationCodingTaskSettledOutcome;\n /** The run settled and its durable row could not be classified: unknown, which is not a failure. */\n codingRunOutcomeUnreadable?: true;\n /** The ADVISORY verdict over the settled run's evidence. Absent on a dry run and on a skip. */\n judge?: PlaybookJudgeResult;\n /** What this playbook says a good result is, paired with the judge's verdicts when it ran. */\n reviewGuide?: string;\n /** Present only on a dry run, which DESCRIBES the next task and dispatches nothing. */\n dryRun?: true;\n accepted: false;\n }\n /**\n * A WAVE run (#1528): the build parallelism is above one, so this tier ran a rolling pool of coding\n * runs in the shared worktree and returned once it drained. Every task it dispatched is named; each\n * run's outcome, and the end-of-wave reconciliation, are on `wave`.\n */\n | {\n playbookRef: string;\n dispatched: true;\n wave: ApplicationBuildWaveResult;\n taskRefs: readonly string[];\n accepted: false;\n }\n | (Omit<RunPlaybookGenerationResult, 'landed' | 'wired' | 'diagrams' | 'decisions'> & {\n /** Slim landing records: the pre-images and rendered bytes stay in the WRITE REGISTER, not in responses. */\n landed: ReadonlyArray<Pick<PlaybookOutputLandingRecord, 'family' | 'packageRelativePath' | 'exportedConstantName' | 'byteLength'>>;\n /** Slim wiring records — same custody split as `landed`. */\n wired: ReadonlyArray<Pick<PlaybookExportWiringRecord, 'packageRelativePath' | 'summary'>>;\n /** Slim diagram records — same custody split as `landed`. */\n diagrams: ReadonlyArray<{ family: string; packageRelativePath: string }>;\n /** What this playbook says a good result is, paired with the judge's verdicts when it ran. */\n reviewGuide: string;\n /** Slim decision records — same custody split as `landed`. Empty on a run that asked nothing. */\n decisions: ReadonlyArray<{ family: string; packageRelativePath: string }>;\n judge?: PlaybookJudgeResult;\n runId?: string;\n dryRun?: boolean;\n });\n\n/**\n * How the engine reads what a playbook run RETURNED — exported so the lane's tests wire the\n * production reading rather than a copy of it.\n *\n * - a SUSPENSION: a run that stopped to ask registered its request against the result object it is\n * about to return, and nothing else is one;\n * - a composite that ended by ENVIRONMENT returned, and is still one somebody should re-run: the\n * engine settles it COMPLETED and KEEPS its progress checkpoint instead of consuming it.\n */\n/**\n * Whether this run may start as the instance it names, and what that instance is for (#1609, #1608). Pure.\n *\n * - A ROOT run of an instance needs its activation, and reads its purpose from it. A child inherits its root's\n * key and has no activation of its own, so it is not asked, and its purpose arrives from its root: until\n * #1608 every child of an instance composite was refused here.\n * - A secondary line's entry composite IS the line, so it never runs as the default instance.\n */\nexport function resolveInstanceRunPurpose(input: {\n readonly playbookRef: string;\n readonly instanceKey?: string;\n readonly nestedWithinChoreographyRef?: string;\n readonly instancePurpose?: string;\n readonly creatorInputs: ApplicationCreatorInputs | undefined;\n}): string | undefined {\n if (input.nestedWithinChoreographyRef !== undefined) return input.instancePurpose;\n if (input.instanceKey === undefined) {\n const line = secondaryLineDefinitionOfEntry(input.playbookRef);\n if (line !== undefined) {\n throw new PlaybookNotReadyError(\n `\"${input.playbookRef}\" runs as a secondary line: open one with the purpose it serves (a key such as \"invoicing\" and what `\n + `it is for), then run that instance. The conversation tool ${line.namesRefinedFamilies ? 'creation_open_refinement_line' : 'creation_open_secondary_line'} opens one.`,\n );\n }\n return input.instancePurpose;\n }\n const instanceId = playbookInstanceId(input.playbookRef, input.instanceKey);\n const activation = input.creatorInputs?.activations?.[instanceId];\n if (activation?.closure !== undefined) {\n throw new PlaybookNotReadyError(\n `\"${instanceId}\" was ${activation.closure.kind}, so it runs no more. Open a new instance under another key to resume the work.`,\n );\n }\n if (activation === undefined) {\n throw new PlaybookNotReadyError(\n `\"${instanceId}\" is not an opened instance of \"${input.playbookRef}\". Open it first, with the purpose it serves `\n + '(the conversation tool creation_open_playbook_instance, or POST /api/companion/playbooks/:playbookRef/instances).',\n );\n }\n // A refinement line's targets travel with its purpose, so every child's brief says what is being refined (#1608).\n return activation.refinedFamilies ? `${activation.purpose} (it refines: ${activation.refinedFamilies.join(', ')})` : activation.purpose;\n}\n\n/**\n * What an INSTANCE was opened for, as a section of the creator's facts (#1608). Written in the creator's own\n * words from the activation; the run never paraphrases it.\n */\nexport function composeInstancePurposeSection(instanceId: string, purpose: string): string {\n return [`# What this run is for`, '', `This run is \"${instanceId}\", opened for: ${purpose}`, 'Work on that, and leave what it does not concern as it is.'].join('\\n');\n}\n\n/** The dispatching composite's section with the root instance's purpose after it, when there is one (#1608). */\nfunction withInstancePurposeSection(section: string | undefined, instanceKey: string | undefined, purpose: string | undefined): string | undefined {\n if (purpose === undefined) return section;\n const purposeSection = composeInstancePurposeSection(instanceKey ?? 'the application', purpose);\n return section ? `${section}\\n\\n${purposeSection}` : purposeSection;\n}\n\n/**\n * The SELECTOR's goal for a composite run (#1608): its intent, then what the instance is for and the creator's\n * brief when there are any. Until #1608 the goal was the intent alone, so a brief given to a composite was\n * dropped without trace and a feature line's selector did not know which feature it was developing.\n */\nexport function composeCompositeGoal(input: { readonly intent: string; readonly instancePurpose?: string; readonly creatorBrief?: string }): string {\n return [\n input.intent,\n ...(input.instancePurpose !== undefined ? ['', `This run is an instance opened for: ${input.instancePurpose}`] : []),\n ...(input.creatorBrief ? ['', `The creator's brief for this run: ${input.creatorBrief}`] : []),\n ].join('\\n');\n}\n\nexport function createPlaybookRunOptions<T>(\n suspensionRequests: WeakMap<object, ActorExecutionSuspensionRequest>,\n /**\n * What each returned result COST (#1507), registered against the result object by the executor that\n * measured it — keyed like the suspension requests and for the same reason: the result is the\n * identity both readings share, and copying it to add a field would lose the suspension.\n */\n runMeasurements?: WeakMap<object, PlaybookRunMeasurement>,\n /** The root runs each settled value's run overlapped (#1610), registered against it like its measurement. */\n runOverlaps?: WeakMap<object, readonly PlaybookRunOverlap[]>,\n): ActorExecutionRunOptions<T> {\n const measurementOf = (result: T): PlaybookRunMeasurement | undefined =>\n (typeof result === 'object' && result !== null ? runMeasurements?.get(result) : undefined);\n const overlapsOf = (settled: unknown): readonly PlaybookRunOverlap[] | undefined =>\n (typeof settled === 'object' && settled !== null ? runOverlaps?.get(settled) : undefined);\n return {\n suspendOn: (result) => {\n const request = typeof result === 'object' && result !== null ? suspensionRequests.get(result) ?? null : null;\n // The waiting task says what it is waiting FOR (#1362), so a reader that was not there — the\n // board after a restart — can tell a run that stopped to ask from one that finished.\n return request ? { ...request, taskOutput: summarizePlaybookRunResult(result, measurementOf(result), overlapsOf(result)) } : null;\n },\n // What the run DID, on its own row (#1362): accepted or not, and the judge's verdict. Until this\n // existed the row said only that the run ended, and the rest died with the process. And what it\n // took — its wall-clock and its spend (#1507).\n concludeAs: (result) => ({ status: FlowsActors_Status.COMPLETED, taskOutput: summarizePlaybookRunResult(result, measurementOf(result), overlapsOf(result)) }),\n retainCheckpointOn: (result) => typeof result === 'object' && result !== null\n && (result as { resumableFromCheckpoint?: unknown }).resumableFromCheckpoint === true,\n // A run that spent and then THREW keeps its duration and spend beside the engine's failure (#1507).\n recordBesideFailure: (error) => {\n const measurement = typeof error === 'object' && error !== null ? runMeasurements?.get(error) : undefined;\n const overlappedRuns = overlapsOf(error);\n const beside = { ...(measurement ? { measurement } : {}), ...(overlappedRuns && overlappedRuns.length > 0 ? { overlappedRuns } : {}) };\n return Object.keys(beside).length > 0 ? beside : null;\n },\n };\n}\n\n/**\n * One line for the selector: which children a verdict re-opened, and on what (#1499, #1627).\n * `top_down.phase-gate in top_down.definition: compliance-presence was GAP` names the lane the verdict\n * came through, because a sibling lane re-opened across lanes is otherwise told nothing about why.\n *\n * The judge's RATIONALE follows, because the criterion name alone does not say what to correct. The\n * selector writes the re-opened child's objective from this line, and that objective is all a nested\n * lane and its leaf receive — so without the rationale the conception lane was sent back to fix a\n * \"conception-buildable GAP\" with nothing naming the undeclared resource at fault (#1264).\n */\nexport function describeReopenedChildren(reopened: readonly PlaybookChoreographyReopenedChild[]): string {\n return reopened.map((entry) => {\n const source = entry.via === undefined ? entry.verdictOf : `${entry.verdictOf} in ${entry.via}`;\n const criterion = entry.criterionRef === undefined ? 'the overall verdict' : entry.criterionRef.replace(/^.*criterion\\//, '');\n const why = entry.rationale === undefined ? '' : ` — the judge: \"${entry.rationale}\"`;\n return `${entry.playbookRef} (${source}: ${criterion} was ${entry.verdict}${why})`;\n }).join('; ');\n}\n\n/** What an application's line no longer uses but its workspace still holds (#1604 review, finding 5). */\nexport interface ApplicationLineOrphans {\n /** Not-applicable families a file still exists for. Hidden from every reader; kept on disk. */\n readonly landedFamilies: readonly string[];\n /**\n * Keys of materialized public-website services while the website plan does not apply to the line, or\n * a decision has set it aside (#1606). Never removed here.\n */\n readonly websiteServiceKeys: readonly string[];\n /** Families a decision set aside (#1606): kept on disk, hidden from every reader, back if the decision flips. */\n readonly deactivatedFamilies: readonly PlaybookDeactivatedFamily[];\n}\n\n@injectable()\nexport class PlaybookRunCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n public constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.ResearchAgentDispatchService) private readonly researchDispatch: ResearchAgentDispatchCompanionService,\n @inject(SAAS_SERVICE_TYPES.AgentsBackendService) private readonly agents: AgentsBackendService,\n @inject(COMPANION_SERVICE_TYPES.TraceabilityService) private readonly traceability: CompanionTraceabilityService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService) private readonly writeRegister: PlaybookRunWriteRegisterCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService) private readonly buildDispatch: ApplicationBuildDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService) private readonly codingAgentDispatch: CodingAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.GitChangeSetService) private readonly git: GitChangeSetCompanionService,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService) private readonly introspection: CompanionIntrospectionService,\n @inject(COMPANION_SERVICE_TYPES.FoundationExecutorService) private readonly foundationExecutor: FoundationExecutorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.CapabilityCompositionExecutorService) private readonly capabilityCompositionExecutor: CapabilityCompositionExecutorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ApplicationMaturityExecutorService) private readonly applicationMaturityExecutor: ApplicationMaturityExecutorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExpertPersonaService) private readonly expertPersonas: ExpertPersonaCompanionService,\n @inject(COMPANION_SERVICE_TYPES.StructuredDeliberationService) private readonly structuredDeliberation: StructuredDeliberationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionsService) private readonly executions: CompanionExecutionsCompanionService,\n /** The engine's execution driver — every playbook run is an actor-system execution it opens and settles (#1358). */\n @inject(SAAS_SERVICE_TYPES.ActorsSystemBackendService) private readonly actorsSystem: ActorsSystemBackendService,\n /** What every run, composite iteration and child dispatch reported spending (#1507). */\n @inject(COMPANION_SERVICE_TYPES.PlaybookSpendMeter) private readonly spendMeter: PlaybookSpendMeterCompanionService,\n /** The application's configuration — read for the coherence report's host facts (the languages it serves). */\n @inject(SAAS_SERVICE_TYPES.AppConfigService) private readonly appConfigService: AppConfigurationService,\n /** The dossier the unattended runs record a quick interview's assumed answers in (#2129). */\n @inject(COMPANION_SERVICE_TYPES.DossierService) private readonly dossier: DossierCompanionService,\n /**\n * The classifier a research step's evidence is screened through before a sibling step reads it (#2938), the one the\n * coding brief screens through; also every research-informed family a generation step, a judge, the interview-answer\n * proposer or the creation assistant reads (`researchFamilyScreeningHost`). Optional: an absent service is \"no\n * classifier bound\", which marks rather than refuses.\n */\n @inject(SAAS_SERVICE_TYPES.ContentSafetyService) @optional() private readonly contentSafety?: ContentSafetyBackendService,\n ) {\n this.logDebug = this.logger.debugByType('PlaybookRunCompanionService');\n }\n\n /**\n * Everything an interview proposal reads and calls (#2129), bound in ONE place so the console, the workbench,\n * the conversation and the unattended runs cannot each assemble a different proposer — and so a port added\n * here (the landed families the asking playbook reads) reaches all of them at once.\n */\n public interviewAnswerProposalPorts(): InterviewAnswerProposalPorts {\n return {\n readAnswerablePlaybook: (playbookRef) => this.dossier.readAnswerablePlaybook(playbookRef),\n listInterviewPlaybooks: () => this.dossier.listInterviewPlaybooks(),\n readCreatorInputs: () => this.dossier.readCreatorInputs(),\n /*\n * The families the asking playbook reads, research-informed ones screened first (#2938): a proposal is recorded as\n * the application's ASSUMED decision, so it is never derived from an instruction a fetched page planted.\n */\n readArtifactsByFamily: async (families) => {\n const state = await this.readArtifactState();\n const read = new Map([...state.artifactsByFamily].filter(([family]) => families.includes(family)));\n return screenResearchInformedFamilyValues(read, this.researchInformedFamilyPredicate(state), this.researchFamilyScreeningHost('interview-answer-proposal'));\n },\n generate: (input) => this.generateStructured(input),\n };\n }\n\n /**\n * The unattended runs' interview step (#2129): propose the questions a quick interview leaves to the proposer,\n * and record each proposal as ASSUMED, authored by the proposer, with its rationale. Nobody reviewed them, which\n * is exactly what the standing says; the console lists them to revisit and the trace names each one.\n */\n private async assumeInterviewAnswers(request: InterviewAnswerAssumptionRequest): Promise<InterviewAnswerAssumptionOutcome> {\n const result = await proposeInterviewAnswers(this.interviewAnswerProposalPorts(), request);\n const assumed: string[] = [];\n const unproposed = [...result.unproposed];\n for (const proposal of result.proposals) {\n try {\n await this.dossier.recordAnswer({\n playbookRef: request.playbookRef,\n questionRef: proposal.questionRef,\n value: proposal.value,\n answeredByRef: INTERVIEW_ANSWER_PROPOSER_REF,\n standing: ApplicationCreationSpecs.ApplicationCreatorInputAnswerStanding.ASSUMED,\n assumptionRationale: proposal.rationale,\n });\n assumed.push(proposal.questionRef);\n } catch (error) {\n unproposed.push({ questionRef: proposal.questionRef, reason: describeCaughtError(error) });\n }\n }\n return { assumed, unproposed };\n }\n\n /**\n * The eligibility board: every compiled playbook, whether it can run RIGHT NOW, and why not.\n *\n * This is the deterministic half of the loop, and the half that must be CODE. A model may choose among\n * the eligible entries; it can never widen the set, because the gate is computed from the working tree\n * before the model is consulted at all\n * (`.claude/context/application-creation-rebuild-principles.md` XII.2).\n */\n /**\n * The interview a playbook DECLARES, as a decision a person can be shown — or `null` if it asks nothing.\n *\n * A separate route from the eligibility board on purpose. The board is a LIST and is polled; these\n * questions are bulky (one playbook alone declares fifteen) and are wanted only at the moment\n * somebody chooses to run that playbook, so putting them on every row would pay for all of them on\n * every poll to show none of them.\n *\n * Until this existed the questions were unreachable: the board carried\n * `PlaybookEligibility.requiresElicitation`, a boolean, and nothing anywhere served the text.\n */\n public async readPlaybookElicitationDecision(playbookRef: string): Promise<HumanDecision_Request | null> {\n const playbooks = await this.readParsedCatalog();\n const playbook = playbooks.find((candidate) => candidate.ref === playbookRef);\n if (!playbook) throw new UnknownPlaybookError(`No compiled playbook is registered under \"${playbookRef}\".`);\n /*\n * Only what the dossier does not answer yet (#1454 review): the run reads the dossier, so a gate\n * that re-asked every question blank posted the blanks as overrides of answers already given.\n * `null` then means \"nothing left to ask\" and the run proceeds on the dossier's answers.\n */\n const state = await this.readArtifactState();\n const creatorInputs = state.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined;\n // A computed CHOICE (the brand-name choice) shows the options computed from what has landed now.\n const materialized = materializeElicitationOptions(playbook, { readFamily: (family) => state.artifactsByFamily.get(family) }).playbook;\n const recorded = readAnswersForPlaybookQuestions(playbook, creatorInputs);\n // An answer no longer among the computed options would be refused by the run, so the gate asks it again.\n const noLongerOffered = answersNoLongerOffered(materialized, recorded);\n const answeredQuestionRefs = new Set([\n ...recorded.map((answer) => answer.questionRef).filter((ref) => !noLongerOffered.has(ref)),\n // Answered without an answer (#3437): the creator said why, so the gate does not ask it again.\n ...readNonAnswersForPlaybookQuestions(playbook, creatorInputs).map((entry) => entry.questionRef),\n ]);\n return projectPlaybookElicitationAsDecision({ playbook: materialized, requestedAt: new Date().toISOString(), answeredQuestionRefs });\n }\n\n public async listPlaybookEligibility(): Promise<{\n readonly playbooks: readonly PlaybookEligibility[];\n /** The application's main line as its dossier declares it (#1603), so every reader of the board names it. */\n readonly applicationLine: ApplicationLineDeclaration;\n /** What the line left behind (#1604 review, finding 5). Empty lists when nothing is orphaned. */\n readonly applicationLineOrphans: ApplicationLineOrphans;\n /**\n * The application's active set (#1607): every catalog playbook, whether its line runs it and why,\n * and the line's root with each composite's children, so a reader renders the tree instead of\n * re-deriving it. Absent only when the state carried no line scope.\n */\n readonly activeSet?: ApplicationActiveSet;\n /**\n * The steps an unattended round withholds because an interview still waiting on the person would date them (#3361),\n * each with what it waits on: the loop's own rule (`findReadersDatedByWaitingInterviews`), read over this board, so\n * Home asks exactly the questions the loop is holding work for.\n */\n readonly datedByWaitingInterviews: readonly PlaybookDatedByWaitingInterview[];\n }> {\n // A catalog entry that does not satisfy its own contract is omitted rather than fatal — one malformed\n // playbook must not hide the fifteen that are fine.\n const [state, playbooks] = await Promise.all([this.readArtifactState(), this.readParsedCatalog()]);\n const board = evaluatePlaybookCatalogEligibility({\n playbooks,\n state,\n landableFamilies: this.resolveLandableFamilies(),\n });\n /*\n * What the next unattended round could run: eligible, its own interview answered, and not CURRENT (the loop's offer,\n * less its run ceilings, which count runs of a loop not yet started). An interview waits on the person unless the next\n * round assumes it (a quick interview, #2129).\n */\n const datedByWaitingInterviews = findReadersDatedByWaitingInterviews({\n readers: board.playbooks.filter((entry) => entry.eligible && entry.unansweredQuestionRefs.length === 0 && entry.rerun.kind !== PlaybookRerunKind.CURRENT),\n waiting: selectInterviewsWaitingOnThePerson({\n candidates: board.playbooks.filter((entry) => entry.eligible),\n playbooksByRef: new Map(playbooks.map((playbook) => [playbook.ref, playbook])),\n interviewDepth: readInterviewDepthFromState(state),\n }),\n catalog: playbooks,\n });\n return {\n ...board,\n datedByWaitingInterviews,\n applicationLine: state.applicationLine?.declaration ?? { state: ApplicationLineDeclarationState.UNDECLARED },\n applicationLineOrphans: this.describeApplicationLineOrphans(state.applicationLine, state.deactivatedFamilies),\n ...(state.applicationLine\n ? {\n activeSet: describeApplicationActiveSet({\n catalog: readCompiledApplicationLineCatalog(),\n scope: state.applicationLine,\n creatorInputs: state.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined,\n }),\n }\n : {}),\n };\n }\n\n /**\n * What the application's line no longer uses but the workspace still holds (#1604 review, finding 5):\n * families a file exists for that the line declares not applicable, and a materialized public website\n * when the website plan does not apply. REPORTED so the creator sees what a line change left behind;\n * never removed here, because a removed package cannot be restored and a family file is read again if\n * the line switches back. Removing either is an explicit task.\n */\n private describeApplicationLineOrphans(\n scope: PlaybookApplicationLineScope | undefined,\n deactivatedFamilies: readonly PlaybookDeactivatedFamily[] = [],\n ): ApplicationLineOrphans {\n const websitePlanSetAside = isFamilyNotApplicable(scope, ApplicationSpecificationFamily.WEBSITE_PLAN)\n || deactivatedFamilies.some((entry) => entry.family === ApplicationSpecificationFamily.WEBSITE_PLAN);\n const websiteServiceKeys = websitePlanSetAside\n ? Object.entries(this.companionContext.servicesByKey ?? {})\n .filter(([, service]) => service.frontendType === AppFrontendType.STATIC_WEBSITE)\n .map(([key]) => key)\n .sort()\n : [];\n return { landedFamilies: scope?.ignoredLandedFamilies ?? [], websiteServiceKeys, deactivatedFamilies };\n }\n\n /**\n * What the application currently contains, read from the working tree — the only state there is.\n *\n * Two sources, because they answer different halves of the question:\n *\n * - **the app's companion exports** give the VALUE for every family the semantic authority can validate,\n * which is what `artifact_valid` needs. They are loaded from AUTHORED source, so a family a developer\n * is midway through editing is seen as it is now, not as it was last built;\n * - **file presence** covers families that have no companion-exports slot (the bottom-up ones). For those\n * the only honest answer is exists/absent, and `artifact_valid` on them fails closed by design.\n */\n /**\n * Drive a composite: run its children until one of the breakers fires.\n *\n * The runtime owns the mechanism (eligibility, selection bounds, failure isolation, the breakers);\n * this owns the two host halves it has no opinion about — how a child is actually run, and how the\n * model is asked to choose one and compose its objective.\n */\n private async runChoreography(input: {\n readonly playbook: MetaWorkflowPlaybook;\n /** The composite's starter (#1751) — each child that asks a question routes it to them. */\n readonly requestedByUserId?: string;\n /** The composite INSTANCE (#1609): its checkpoint, its research evidence, and the key its children inherit. */\n readonly instanceKey?: string;\n /** What the instance was opened for (#1608): it frames the selector's goal and reaches every child's brief. */\n readonly instancePurpose?: string;\n /**\n * The creator's brief for this run (#1608). A composite generates nothing, so the brief frames the SELECTOR's\n * goal. It is never handed to a child as a creator brief: a child reads the creator's facts through the\n * elicitation it inherits, and the selector's words for it arrive as `selectionRationale`.\n */\n readonly creatorBrief?: string;\n /** The composite's OWN rendered elicitation (questions + the creator's answers), forwarded to every child. */\n readonly parentElicitationSection?: string;\n /**\n * Set ONLY when this composite is itself a child of a composite already running in this process.\n * Threaded from `runChoreographyChild`; see the single-flight refusal below for why a nested run\n * must be admitted rather than refused.\n */\n readonly nestedWithinChoreographyRef?: string;\n readonly session?: CompanionExecutionSessionContext;\n /** The composite's OWN actor execution — where its progress checkpoint is written (#1360). */\n readonly runId: string;\n /** The ROOT run of this composite's tree (#1610): its own run id at the root, its root's when nested. Every child carries it. */\n readonly rootRunId: string;\n /**\n * The operator's `dryRun`, threaded into every CHILD that generates and lands (#1506).\n *\n * Until 2026-09-22 a composite accepted the flag at its HTTP door and dropped it here: each child ran\n * through `runPlaybook` with no `dryRun`, so \"the full pipe ran and NOTHING was written\" — the\n * documented meaning of the flag — was true of the parent and false of every file its children\n * landed. The lanes (definition, conception, compliance) are the first composites whose children\n * land a dozen families between them, which is what made the gap cost something. Research and\n * step-value children write nothing by construction and need no flag.\n */\n readonly dryRun?: boolean;\n }): Promise<{\n playbookRef: string;\n choreographed: true;\n stoppedBecause: PlaybookChoreographyStopReason;\n iterations: PlaybookChoreographyResult['iterations'];\n stepRefs: readonly string[];\n landed: readonly string[];\n /**\n * Per landing child: how many of the run's evidence URLs it carried into what it landed.\n *\n * Surfaced on the RESPONSE rather than kept in the trace, because the thing it guards against is\n * a run that looks successful. A `citedUrlCount: 0` beside a non-zero `evidenceUrlCount` is the\n * exact shape that once passed a schema validator, three green suites and an improving judge\n * verdict while the lane's central claim was false.\n */\n provenance: PlaybookChoreographyResult['provenance'];\n boundary: PlaybookChoreographyResult['boundary'];\n boundaryDecisions: readonly HumanDecision_Request[];\n /** The composite's wall-clock and every iteration's spend together (#1507). Per iteration and per child: on `iterations`. */\n durationMs: number;\n spend: PlaybookChoreographyResult['spend'];\n inheritedRounds: number;\n /**\n * Present ONLY when this run inherited a previous process's work.\n *\n * Declared rather than merely returned: a conditional spread satisfies the compiler without the\n * field appearing in the contract, which is how a value ends up present at runtime and invisible\n * to every consumer. A resumed run must be able to SAY it resumed — inheriting another process's\n * evidence silently would leave a run whose provenance nobody can explain, in the one lane that\n * counts its source URLs precisely because that mattered once.\n */\n resumedFrom?: { completedIterations: number; checkpointedAt: string };\n /**\n * Present ONLY when the run ended by ENVIRONMENT (every fatal child taken by infrastructure or\n * quota) and its checkpoint was therefore preserved: re-running the same composite ref resumes\n * the paid-for iterations instead of starting over.\n */\n resumableFromCheckpoint?: true;\n accepted: false;\n }> {\n /*\n * SINGLE-FLIGHT is the engine's, since #1361: this run's execution was opened with the\n * `COMPOSITE` subject (see `buildActorExecutionRequest`), and the driver refuses a second one\n * while it runs — from the ROWS, so a restart and a second companion process see it too. Until\n * then it was an in-memory marker set here and cleared in a `finally`; before THAT (2026-09-04)\n * it was nothing at all, and two composites shared a working tree and one checkpoint.\n *\n * A NESTED composite opens with no subject, which is the difference between a single-flight\n * guard and a self-deadlock: `runChoreographyChild` reaches `runPlaybook`, which routes a child\n * declaring `method.choreography` straight back here, and a blanket refusal would abort the\n * parent on its own child. Nesting is threaded EXPLICITLY (`nestedWithinChoreographyRef`) rather\n * than inferred — only the call path knows a child from a fresh operator request arriving\n * mid-run — and neither HTTP entry point spreads a request body into that input.\n */\n const playbooks = await this.traceRunPhase(input.session, 'catalog', () => this.readParsedCatalog());\n /*\n * THE MARKED GATE, refused BEFORE the run rather than after it (#111).\n *\n * Under GUIDED a lane boundary that owes an approve_result decision should HOLD the run, and\n * suspending at a boundary is not built. Which boundaries owe one is only knowable once the run\n * ends — so a refusal at that point would throw away a lane that had already landed its files\n * and spent its turns, and the engine retains a thrown run's checkpoint, so a resume could\n * re-land them. A posture the run cannot honour is a reason not to START it.\n *\n * Inert under the decided posture (YOLO, `one-source-of-truth.md` D5) and deliberately a refusal\n * rather than a silent downgrade: a GUIDED run that quietly behaved like a YOLO one would be a\n * safety claim standing on an unbuilt mechanism, which is the exact shape the approval policy's\n * own JSDoc had to be corrected for once already.\n */\n if (laneBoundaryTreatmentFor(APPLICATION_CREATION_AUTONOMY_POSTURE, PlaybookLaneBoundaryDecision.APPROVE_RESULT) === LaneBoundaryTreatment.SUSPEND) {\n throw new Error(\n `The ${APPLICATION_CREATION_AUTONOMY_POSTURE} autonomy posture asks a run to HOLD at a lane boundary that owes an approve_result `\n + 'decision, and suspending at a lane boundary is not built (#111; arming the marked gates is part of Gate 3). '\n + 'Run under a posture that notifies and proceeds, or build the hold.',\n );\n }\n /*\n * Resume what a previous process paid for.\n *\n * Re-running the composite IS the resume gesture: a composite is single-flight per application —\n * enforced above as of the refusal, not merely assumed — so its ref identifies \"the run in\n * progress\", and the person restarting is usually the one who just watched a companion restart\n * eat their run.\n */\n // Per INSTANCE (#1609): an instance adopts only its own interrupted progress, never another's of the same composite.\n const resumeFrom = await this.traceRunPhase(input.session, 'checkpoint-adoption', () => this.adoptChoreographyCheckpoint(input.playbook.ref, input.instanceKey, input.runId, input.session));\n /*\n * Every round this run INHERITED rather than ran — the root's and, recursively, each nested lane's in\n * flight (#1507). The meter only sees this process, so each is an unobserved part of the run's spend;\n * counted over the whole tree because the journey's real resume is mid-lane (root 0, lane N).\n */\n const inheritedRounds = resumeFrom ? countCheckpointedRounds(resumeFrom) : 0;\n if (inheritedRounds > 0) this.adoptedCheckpointIterations.set(input.runId, inheritedRounds);\n if (resumeFrom) {\n this.logDebug('Resuming a choreography from its checkpoint', {\n playbookRef: input.playbook.ref,\n completedIterations: resumeFrom.completedIterations,\n stepRefs: resumeFrom.stepResults.length,\n checkpointedAt: resumeFrom.checkpointedAt,\n });\n }\n const result = await runPlaybookChoreography({\n composite: input.playbook,\n checkpoint: (snapshot) => this.saveChoreographyCheckpoint(input.runId, snapshot, input.session, input.instanceKey),\n ...(resumeFrom ? { resumeFrom } : {}),\n goal: composeCompositeGoal({ intent: input.playbook.intent, instancePurpose: input.instancePurpose, creatorBrief: input.creatorBrief }),\n playbooks,\n landableFamilies: this.resolveLandableFamilies(),\n readArtifactState: () => this.traceRunPhase(input.session, 'choreography-artifact-state', () => this.readArtifactState()),\n // A quick interview's skipped questions are assumed rather than waited on (#2129), for every lane of the tree.\n assumeInterviewAnswers: (request) => this.assumeInterviewAnswers(request),\n // A round waits at its top while the dev supervisor holds a restart, so the restart kills nothing (#3204); waiting on\n // its children it is paused, and a nested lane is counted as a run of its own.\n awaitRestartWindow: () => this.awaitRestartWindow(),\n whilePaused: (work) => companionRestartDrain.whilePaused(work),\n whileWorking: (work) => this.whileDrainCounted(work),\n // Before the first tree read: a composite whose children its line runs none of stops here (#1639).\n readApplicationLineScope: () => this.traceRunPhase(input.session, 'application-line-scope', () => this.readApplicationLineScope()),\n // Every selection and child dispatch is measured, so the row records spend per iteration and per child (#1507).\n meter: this.spendMeter,\n /*\n * An explicit run of the COMPOSITE admits its children past SEQUENCING too. Asking for a\n * playbook by name is the acknowledgement, and it cannot stop at the parent: the first live run\n * gathered evidence, judged it adequate, and landed nothing because the producing child was\n * withheld on a phase gate its parent had already been admitted past.\n */\n proceedPastSequencing: true,\n /*\n * An opened INSTANCE (a refinement or feature-development line) is a request to re-do work on record,\n * so its own round offers children that are CURRENT (review N1). The default instance withholds them.\n */\n ...(input.instanceKey !== undefined ? { offersCurrentChildren: true } : {}),\n /*\n * A child taken by infrastructure or a provider quota never counts toward withholding it for\n * repeating a failure, because a retry once the environment recovers can succeed over identical\n * inputs. Nor does one that read an application package before its compiler published it\n * (#3212); see `isEnvironmentalChoreographyChildFailure` for what that costs a genuine import error.\n */\n isEnvironmentalFailure: isEnvironmentalChoreographyChildFailure,\n /*\n * Of those, a read of a package not yet published is environmental by TIMING (#3261): the runtime excuses it once\n * per child and read state, and counts the identical repeat over the same (now published) reads as the work\n * failing — the loader's other reading, an import from a door that does not publish the symbol.\n */\n isTimingEnvironmentalFailure: isApplicationPackageNotCompiledFailure,\n /*\n * A child a model provider ACCOUNT refused (#3204) stops the choreography at once, thrown, so the creation loop and\n * the drive stop on it and name the account. Excused as merely environmental, it was absorbed one lane down and\n * re-dispatched until the iteration ceiling (reference run 42120979649).\n */\n readProviderAccountRefusal: readPlaybookFailureProviderAccountRefusal,\n /*\n * One RUN for the restart drain (#3204 second review H1): the parent is PAUSED while its round's children run, so each\n * child is counted here, whole: its prelude, a research agent's screening and evidence records, a step output's model\n * call, and the compile wait after it. A child that IS a playbook run pauses this count while `runPlaybook` counts\n * itself (`runChoreographyChild`), so it is counted once.\n */\n runChild: (playbookRef, objective, stepResults, dispatchingCompositeRef) => this.whileDrainCounted(async () => {\n const parentElicitationSection = withInstancePurposeSection(await this.composeDispatchingElicitationSection({\n dispatchingCompositeRef,\n ownRef: input.playbook.ref,\n inherited: input.parentElicitationSection,\n playbooks,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n }), input.instanceKey, input.instancePurpose);\n /*\n * A child the dispatching composite declares ACTS ON THE APPLICATION (#1608) runs as the default\n * instance: it refreshes what the application holds once (the domain plan, the build), which an\n * instance may never replace. It still reads the instance's purpose, so it knows what it refreshes for.\n */\n const actsOnApplication = (playbooks.find((candidate) => candidate.ref === dispatchingCompositeRef)?.method?.choreography?.actsOnApplication ?? [])\n .includes(playbookRef);\n const childInstanceKey = actsOnApplication ? undefined : input.instanceKey;\n /*\n * After the child, and before the choreography reads the tree again (#3212): a child that wrote into one of the\n * application's COMPILED packages (the foundation scaffolding `shared-lib/src/…`) leaves that package's `dist`\n * behind its sources until the package's compiler publishes. The read that follows evaluates specifications\n * against that `dist`, and on `app-creation-test-007` it ran 2.4 s too early, threw \"has not been COMPILED\", and\n * stopped the whole creation loop. Bounded; a read that still meets an unpublished build is environmental.\n */\n try {\n return await this.runChoreographyChild({\n playbookRef,\n objective,\n stepResults,\n // The composite that DISPATCHED this child, which at depth 0 is this run's own and deeper is a\n // lane's. Only its non-undefined-ness matters to the single-flight bypass, so a lane's ref is\n // as good as the root's there — what it buys is the two lines below being the lane's (#1513).\n parentChoreographyRef: dispatchingCompositeRef,\n ...(parentElicitationSection ? { parentElicitationSection } : {}),\n // The COMPOSITE names the investigation: every research child of every run of that\n // composite consolidates into one evidence-store directory, which is what makes a\n // relaunch start from what earlier runs already established. The DISPATCHING one, so a\n // nested lane's evidence is found again by the next run of that lane whichever root invoked it.\n // Per INSTANCE (#1609): the default instance keeps the composite's ref as its scope, so evidence gathered\n // before instances existed is found where it always was; `<ref>@<key>` keeps a segment's evidence its own.\n evidenceScope: playbookInstanceId(dispatchingCompositeRef, childInstanceKey),\n // And READS the default instance's, explicitly: application-wide facts are pooled, an instance's findings are not.\n ...(childInstanceKey ? { sharedEvidenceScope: playbookInstanceId(dispatchingCompositeRef), instanceKey: childInstanceKey } : {}),\n ...(input.instancePurpose !== undefined ? { instancePurpose: input.instancePurpose } : {}),\n rootRunId: input.rootRunId,\n ...(input.requestedByUserId ? { requestedByUserId: input.requestedByUserId } : {}),\n ...(input.dryRun === true ? { dryRun: true } : {}),\n ...(input.session ? { session: input.session } : {}),\n });\n } finally {\n /*\n * After a failed child too: it may have written before it failed. Best effort: the wait and its trace event\n * never replace the child's own outcome or error.\n */\n await waitForApplicationPackagesPublished({\n saasRoot: this.companionContext.saasRoot,\n onWait: async (unpublished) => {\n const named = unpublished.map((entry) => `${entry.packageName} (${entry.reason})`).join(', ');\n this.logDebug('Waiting for application packages to compile before reading the tree', { afterChild: playbookRef, unpublished });\n if (input.session) {\n await this.traceability.traceEvent({\n session: input.session,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'application-package-publication-wait',\n summary: `waiting for ${named} to compile before reading the tree after ${playbookRef}`,\n payload: { afterChild: playbookRef, unpublished },\n });\n }\n },\n }).catch((error: unknown) => this.logDebug('Could not wait for the application packages to publish', { afterChild: playbookRef, error: describeCaughtError(error) }));\n }\n }),\n select: {\n /*\n * The DISPATCHING composite's round, not the root's (#1577): its declared inputs and its interview.\n * A lane is resolved from the same catalog the runtime resolved it from, so it is always there; a\n * ref that is not would be a runtime/host disagreement, and it is refused rather than quietly\n * answered with the root's facts — which is the defect this removes.\n *\n * The interview helper answers the same unknown ref by INHERITING, and the two differ on purpose:\n * an ancestor's interview answers are still true of the product and a lane that asks nothing\n * inherits them by design (#1513), while the root's declared INPUTS and INTENT are exactly the\n * wrong facts for a lane's selector. There is no honest fallback for those, so this refuses.\n */\n select: async (request) => {\n const dispatching = request.dispatchingCompositeRef === input.playbook.ref\n ? input.playbook\n : playbooks.find((candidate) => candidate.ref === request.dispatchingCompositeRef);\n if (!dispatching) {\n throw new UnknownPlaybookError(`The composite \"${request.dispatchingCompositeRef}\" selecting a round is not in the compiled catalog.`);\n }\n /*\n * A CLOSED instance stops at its next round (#1608). Nothing can stop a composite mid-round, and the\n * round boundary is where it decides what to do next anyway: the child already running finishes, and\n * nothing new starts. Asked of the root's activation only; a lane's instance has none of its own.\n */\n // The root instance's activation, read once per round: its closure, and a refinement's targets.\n const activation = input.instanceKey === undefined ? undefined : await this.readInstanceActivation(playbookInstanceId(input.playbook.ref, input.instanceKey));\n const closure = activation?.closure;\n if (closure !== undefined) {\n // A person closed it: never replaced by a forced build wave (#3447 review R1).\n return { children: [], stopRationale: `This instance was ${closure.kind}${closure.reason ? `: ${closure.reason}` : ''}. It stops here.`, stopIsNotTheModels: true };\n }\n /*\n * A REFINEMENT line's first move is fixed (#1608): while a family it names is not yet re-derived, its\n * own round offers only that family's producers. Asked of the line's own composite only; a lane it\n * dispatches (the build) chooses as it always does.\n */\n const eligible = request.dispatchingCompositeRef === input.playbook.ref && input.instanceKey !== undefined\n && secondaryLineDefinitionOfEntry(input.playbook.ref)?.namesRefinedFamilies === true\n ? narrowRefinementRound({\n eligible: request.eligible,\n history: request.history,\n targets: activation?.refinedFamilies ?? [],\n // Only the line's own children order its targets: a playbook it never runs must not (refinementDependencyMaps).\n ...refinementDependencyMaps(playbooks, input.playbook.ref),\n })\n : request.eligible;\n const parentElicitationSection = withInstancePurposeSection(await this.composeDispatchingElicitationSection({\n dispatchingCompositeRef: request.dispatchingCompositeRef,\n ownRef: input.playbook.ref,\n inherited: input.parentElicitationSection,\n playbooks,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n }), input.instanceKey, input.instancePurpose);\n return this.selectChoreographyChildren({\n ...request,\n eligible,\n composite: dispatching,\n ...(parentElicitationSection ? { parentElicitationSection } : {}),\n });\n },\n },\n ...(input.session ? { trace: this.buildTrace(input.session, 'playbook-choreography') } : {}),\n });\n /*\n * The run reached its OWN conclusion, however it concluded — so the checkpoint has done its job\n * and must go. Keeping it would make the next run of this composite resume a finished one, which\n * is the failure mode a resume cache has instead of the one it replaced.\n *\n * ONE exception, and it is measured rather than hypothetical: a conclusion the ENVIRONMENT\n * forced. When ALL_CHILDREN_FAILED and every fatal child was taken by infrastructure or quota\n * (a companion pause, a 529 storm outliving the retry, \"You've hit your session limit\"), the\n * children never met the work — that is the process-taken-away case the checkpoint exists for,\n * arriving as child failures instead of a SIGTERM. On 2026-09-03 the unconditional consume here\n * discarded a 56-minute compliance run's 10 iterations of accumulated evidence because its 11th\n * iteration hit the provider's 5-hour session limit. The checkpoint survives that shape now, and\n * re-running the composite resumes it — the same gesture as after a companion restart.\n *\n * Still unconditional for every SEMANTIC conclusion: an iteration ceiling, a chosen stop, or a\n * fatal iteration containing even one real (non-environmental) failure, because there the next\n * selection would see genuine information and must not inherit a finished run's state.\n */\n const endedByEnvironment = choreographyEndedByEnvironment(result);\n if (endedByEnvironment) {\n this.logDebug('Choreography ended by environment; preserving its checkpoint for relaunch', {\n playbookRef: input.playbook.ref,\n completedIterations: result.iterations.length,\n fatalFailures: result.iterations[result.iterations.length - 1]?.children.map((child) => child.failure?.slice(0, 160)),\n });\n }\n /*\n * THE LANE BOUNDARY (#111) — one `approve_result` decision on the HITL plane, the first reader of\n * the composite's `approval` and `onFailure`. The runtime derived the facts; this projects them\n * as the same `HumanDecision_Request` every other question on this plane uses, and the POSTURE\n * decides what the decision does. Under YOLO (the decided posture, `one-source-of-truth.md` D5)\n * the gate is MARKED: the decision is written on the run's row and in this response, the run\n * concludes, and a person acts on it through the run and revert doors. Under GUIDED the same\n * decision would hold the run — that arm is the gate armed, and it is not built: arming it is\n * part of Gate 3's membership test, so it refuses by name rather than proceeding silently.\n */\n const requestedAt = new Date().toISOString();\n /*\n * EVERY boundary the run produced, not just the root's: a lane's `approval` is where the question\n * genuinely arises, and `collectPlaybookLaneBoundaries` is the runtime's one derivation of which\n * boundaries exist (walking the iteration tree here would be a second).\n */\n const boundaries = collectPlaybookLaneBoundaries({ playbookRef: input.playbook.ref, boundary: result.boundary, iterations: result.iterations });\n const boundaryDecisions = boundaries\n .filter((entry) => entry.boundary.decision !== PlaybookLaneBoundaryDecision.NONE)\n .map((entry) => projectLaneBoundaryAsDecision({ runId: input.runId, playbookRef: entry.playbookRef, requestedAt, boundary: entry.boundary }));\n if (boundaryDecisions.length > 0) {\n this.logDebug('Lane boundary decisions recorded (notify-and-proceed)', {\n playbookRef: input.playbook.ref,\n decisions: boundaries.filter((entry) => entry.boundary.decision !== PlaybookLaneBoundaryDecision.NONE)\n .map((entry) => ({ lane: entry.playbookRef, decision: entry.boundary.decision, kept: entry.boundary.keptPaths.length })),\n });\n }\n // A SEMANTIC conclusion needs no consume call: the engine clears a run's checkpoint when it\n // settles it COMPLETED, and keeps it only when `retainCheckpointOn` reads this result as ended by\n // environment (`resumableFromCheckpoint` below) — or when the run throws.\n return {\n playbookRef: input.playbook.ref,\n choreographed: true,\n stoppedBecause: result.stoppedBecause,\n iterations: result.iterations,\n stepRefs: [...result.stepResults.keys()],\n landed: result.landed,\n provenance: result.provenance,\n boundary: result.boundary,\n boundaryDecisions,\n durationMs: result.durationMs,\n spend: result.spend,\n inheritedRounds: result.inheritedRounds,\n /*\n * WHY the lane had nothing to run, when that is why it ended (#1506). Empty on every other stop,\n * and omitted then, so its presence is itself the signal that the run is waiting on something.\n */\n ...(result.unoffered.length > 0 ? { unoffered: result.unoffered } : {}),\n /*\n * REPORTED, like every other run shape reports it — and for a lane it is the report that matters\n * most (#1506). `summarizePlaybookRunResult` reads `dryRun` off this envelope to build the durable\n * run record, so a composite that omitted it was recorded as `dryRun: false`: a dry lane run,\n * which writes nothing, filed as a real one, which lands a dozen families. Measured on the first\n * live dry run of `top_down.definition`, whose record claimed it was real.\n *\n * A caller cannot tell them apart by looking at the tree either — a real run may legitimately\n * land nothing — which is the same reasoning the dispatch path already states for its own flag.\n */\n ...(input.dryRun === true ? { dryRun: true as const } : {}),\n /*\n * Reported, never silent. A run that quietly inherited another process's evidence would be a\n * run whose provenance nobody could explain — and provenance is the whole reason this lane\n * counts its source URLs.\n */\n ...(resumeFrom\n ? { resumedFrom: { completedIterations: resumeFrom.completedIterations, checkpointedAt: resumeFrom.checkpointedAt } }\n : {}),\n /*\n * Reported so the caller can SAY \"re-run this ref to resume\" instead of reading a failed run\n * as a dead end — the whole point of preserving the checkpoint is that somebody relaunches.\n */\n ...(endedByEnvironment ? { resumableFromCheckpoint: true as const } : {}),\n // No acceptance, exactly as an ordinary run reports none: files landed as working edits, and\n // acceptance is a later commit — a person's, or the companion's under the posture (#1534).\n accepted: false,\n };\n }\n\n /**\n * Run one child of a choreography, and route by what the child DECLARES.\n *\n * Three shapes, and the split is the child's own declaration rather than a list here — the same\n * correction W3 made to the brief sections:\n *\n * - `RESEARCH_AGENT` — the read-only web lane. Its evidence text becomes the step value.\n * - any executor with `stepOutputs` — a structured generation against the step's own schema, so the\n * value a sibling's `requires` reads is schema-validated before it can satisfy a gate.\n * - everything else — an ordinary run, which generates and LANDS exactly as it would standalone.\n * Composition adds a return channel; it never intercepts the existing one.\n */\n private async runChoreographyChild(input: {\n readonly playbookRef: string;\n readonly objective: string;\n readonly stepResults: ReadonlyMap<string, unknown>;\n /** The composite this child belongs to — carried so a child that is ITSELF a composite is not refused as a second run. */\n readonly parentChoreographyRef: string;\n /** The parent composite's rendered elicitation — the creator's facts, identical for every child. */\n readonly parentElicitationSection?: string;\n /** The composite's ref — the evidence-store scope every research child of this run shares. */\n readonly evidenceScope?: string;\n /** The default instance's scope, read but never written by an instance's research (#1609). */\n readonly sharedEvidenceScope?: string;\n /**\n * The dispatching composite's INSTANCE (#1609), which the child inherits: a feature line's children are\n * that feature's, not the default instance's. A child landing a shared single-value family is refused\n * by the landing rather than by this inheritance.\n */\n readonly instanceKey?: string;\n /** The root run of the tree this child belongs to (#1610) — recorded on the child's row. */\n readonly rootRunId: string;\n /** What the root instance was opened for (#1608); a child has no activation of its own to read it from. */\n readonly instancePurpose?: string;\n /** The parent's `dryRun` — see `runChoreography`. Reaches only the child branch that lands. */\n readonly dryRun?: boolean;\n /** The root run's starter (#1751): a child's question is routed to the person who started the tree. */\n readonly requestedByUserId?: string;\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<PlaybookChoreographyChildResult> {\n const playbooks = await this.readParsedCatalog();\n const child = playbooks.find((entry) => entry.ref === input.playbookRef);\n if (!child) throw new UnknownPlaybookError(`Choreography child \"${input.playbookRef}\" is not in the compiled catalog.`);\n // Every child, before it starts: a research agent is dispatched here directly, never through a playbook\n // run, and it is the expensive kind of call the spend-rate breaker exists for.\n this.spendMeter.assertSpendRateBelowRunawayBreaker();\n\n if (child.executor === MetaWorkflow_Executor.RESEARCH_AGENT) {\n const stepOutput = child.stepOutputs?.[0];\n if (!stepOutput) {\n throw new Error(`Research child \"${child.ref}\" declares no stepOutput; its evidence would have nowhere to go.`);\n }\n const researchInputTruth = await this.composeChoreographyChildInputTruth(child);\n // The typed operating jurisdictions (#2335), when the research step declares them: config, never re-asked.\n const researchOperatingJurisdictions = this.composeOperatingJurisdictionsSection(child);\n const researchObjective = [\n child.method?.guidance ?? '',\n '',\n '# Your objective for THIS round',\n input.objective,\n // The creator's facts, verbatim: research that knows the real jurisdictions, data classes\n // and commitments verifies triggers against THIS product instead of surveying the field.\n ...(input.parentElicitationSection ? ['', input.parentElicitationSection] : []),\n // And what the application has ACCEPTED (#1431), after the creator's answers and before the\n // return contract — the same order the generation brief uses, for the same reason: the\n // creator's words frame the run, the accepted truth is what it must not contradict.\n ...(researchInputTruth ? ['', researchInputTruth] : []),\n ...(researchOperatingJurisdictions ? ['', researchOperatingJurisdictions] : []),\n '',\n '# What to return',\n stepOutput.condensation,\n ].join('\\n');\n /*\n * The churn gate + one classified retry (#265, smallest shape). A research turn is READ-ONLY\n * and its result is regenerable, which is what makes ONE retry safe here and why the coding\n * lane gets the gate but never the retry. Two measured failure families qualify — the exit-0\n * mid-turn kill under a companion pause, and the provider's transient overload — and nothing\n * else does: an agent's own outcome retried is spend, not resilience.\n */\n const frameworkRoot = this.companionContext.resolvedHomes.framework.repositoryRoot;\n const logGate = (message: string, context?: Record<string, unknown>) => this.logDebug(message, { playbookRef: child.ref, ...context });\n await waitForDevCompileQuiet({ frameworkRepositoryRoot: frameworkRoot, log: logGate });\n /*\n * The turn's evidence, recorded as a change of the ROOT run (#2419): a research child has no run of its own, and\n * the root run is the one a person started and accepts. Recorded whether the turn succeeds or not, because\n * evidence consolidated before a death is exactly what the store exists to keep. Accept-on-request-only.\n */\n // Best-effort on both sides: recording evidence must never be what fails a research turn.\n const evidenceTarget = ((): { readonly saasRoot: string; readonly directory: string; readonly before: Map<string, string> } | undefined => {\n if (input.dryRun === true) return undefined;\n try {\n const saasRoot = this.companionContext.saasRoot;\n const directory = resolveResearchEvidenceDirectory(saasRoot, input.evidenceScope ?? 'adhoc');\n return { saasRoot, directory, before: snapshotResearchEvidence(saasRoot, directory) };\n } catch (error) {\n this.logDebug('Research evidence snapshot unavailable; the turn runs unrecorded', { playbookRef: child.ref, error: describeCaughtError(error) });\n return undefined;\n }\n })();\n /*\n * The evidence is screened ONCE, here, where it is produced (#2938): every sibling (the selector, an assessor, the\n * producer that writes the market snapshot, the compliance posture or the brand-name screening) reads the value\n * stored under the step ref, and the checkpoint keeps it, so only the screened or marked value ever travels.\n */\n let screened: ScreenedResearchStepValue | undefined;\n const screen = async (evidence: string): Promise<PlaybookChoreographyChildResult> => {\n screened = await screenResearchStepValue(evidence, {\n contentSafety: this.contentSafety,\n logger: this.logger,\n verdicts: companionScreeningVerdicts(),\n playbookRef: child.ref,\n stepRef: stepOutput.ref,\n });\n return { stepResults: new Map([[stepOutput.ref, screened.value]]) };\n };\n try {\n try {\n const research = await this.researchDispatch.runResearchTask({\n objective: researchObjective,\n ...(input.evidenceScope ? { evidenceScope: input.evidenceScope } : {}),\n ...(input.sharedEvidenceScope ? { sharedEvidenceScope: input.sharedEvidenceScope } : {}),\n playbookRef: child.ref,\n });\n return await screen(research.evidence);\n } catch (error) {\n const message = describeCaughtError(error);\n if (!isInfrastructureShapedAgentFailure(message)) throw error;\n this.logger.warn('Research turn lost to infrastructure; retrying once', { playbookRef: child.ref, failure: message.slice(0, 200) });\n // Overload answers deserve real backoff; a churn kill only needs the tree quiet again.\n if (/529|429|Overloaded|overloaded_error|rate.?limit/i.test(message)) {\n await new Promise((resolve) => setTimeout(resolve, 60_000));\n }\n await waitForDevCompileQuiet({ frameworkRepositoryRoot: frameworkRoot, log: logGate });\n const research = await this.researchDispatch.runResearchTask({\n objective: researchObjective,\n ...(input.evidenceScope ? { evidenceScope: input.evidenceScope } : {}),\n ...(input.sharedEvidenceScope ? { sharedEvidenceScope: input.sharedEvidenceScope } : {}),\n playbookRef: child.ref,\n });\n return await screen(research.evidence);\n }\n } finally {\n if (evidenceTarget !== undefined) {\n try {\n await this.writeRegister.recordResearchEvidence({\n runId: input.rootRunId,\n playbookRef: input.parentChoreographyRef,\n files: diffResearchEvidence(evidenceTarget.before, snapshotResearchEvidence(evidenceTarget.saasRoot, evidenceTarget.directory)),\n });\n } catch (error) {\n this.logger.warn(`Research evidence for ${child.ref} was written but its write record failed; commit it by hand: ${describeCaughtError(error)}`);\n }\n }\n /*\n * What screening concluded, on the ROOT run beside the evidence it records, so the commit that accepts the run\n * names a value its siblings read withheld or unscreened (#2938). Best effort, like the evidence record: a\n * record that cannot be written never fails the research turn. A dry run, or a turn that wrote nothing, has no\n * record to carry it; the WARN above (on a withheld value) and the marked step value still say it.\n */\n if (screened !== undefined && input.dryRun !== true) {\n try {\n const recorded = await this.writeRegister.markResearchScreening(input.rootRunId, {\n playbookRef: child.ref,\n stepRef: stepOutput.ref,\n at: new Date().toISOString(),\n screening: screened.screening,\n });\n if (!recorded) this.logDebug('Research screening not recorded: the root run has no write record', { playbookRef: child.ref, outcome: screened.screening.outcome });\n } catch (error) {\n this.logger.warn(`The screening of ${child.ref}'s evidence could not be recorded on run ${input.rootRunId}: ${describeCaughtError(error)}`);\n }\n }\n }\n }\n\n /*\n * A CODING_AGENT child cannot ALSO produce a step value, and saying so beats routing it silently.\n *\n * The branch below reads \"any executor with `stepOutputs` → structured generation\", which is right\n * for every tier that produces a value and wrong for this one: a dispatch runs an agent in the\n * workspace and returns no schema-validated object, so such a child would generate prose instead of\n * dispatching — the inert declaration issue #119 exists to remove, reproduced one layer down.\n *\n * No playbook declares this shape today (`build-dispatch` and `build-scale` declare no stepOutputs,\n * so they fall through to the run below and reach the CODING_AGENT branch in `runPlaybook`). This\n * refuses the shape rather than waiting for the first author to discover it as silence.\n */\n if (child.executor === MetaWorkflow_Executor.CODING_AGENT && (child.stepOutputs?.length ?? 0) > 0) {\n throw new Error(\n `Choreography child \"${child.ref}\" declares executor CODING_AGENT and ${child.stepOutputs!.length} stepOutput(s). `\n + 'A dispatch runs a coding agent in the workspace and returns no step value, so a sibling gate reading one '\n + 'would never be satisfied. Declare the child without stepOutputs, or give it a producing executor.',\n );\n }\n\n if ((child.stepOutputs?.length ?? 0) > 0) {\n const stepOutput = child.stepOutputs![0]!;\n const inputTruthSection = await this.composeChoreographyChildInputTruth(child);\n const value = await this.generateChoreographyStepValue({\n child,\n stepOutput,\n objective: input.objective,\n stepResults: input.stepResults,\n ...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),\n ...(inputTruthSection ? { inputTruthSection } : {}),\n });\n return { stepResults: new Map([[stepOutput.ref, value]]) };\n }\n\n // `runPlaybook` counts itself for the restart drain, so the child's own count (`runChild`) pauses meanwhile (#3204).\n const run = await this.whileDrainPaused(() => this.runPlaybook({\n playbookRef: input.playbookRef,\n /*\n * The objective is the choreography SELECTOR's words for this child, never the creator's. It was\n * passed as `creatorBrief` until 2026-09-25, so it rendered under \"# What this application is\" and\n * reached the child's judge as creator input, the ground truth its groundedness criteria score\n * against: a machine's reasoning read back as a product decision (#1608 review).\n */\n selectionRationale: input.objective,\n stepResults: input.stepResults,\n // The ONE path by which a nested composite is admitted past the single-flight refusal. Set\n // unconditionally: it is inert for every child that is not itself a composite, and making it\n // conditional on the child's declaration would put the \"is this a composite?\" question in two\n // places, one of which cannot see the compiled catalog the other routes on.\n nestedWithinChoreographyRef: input.parentChoreographyRef,\n rootRunId: input.rootRunId,\n ...(input.requestedByUserId ? { requestedByUserId: input.requestedByUserId } : {}),\n ...(input.instancePurpose !== undefined ? { instancePurpose: input.instancePurpose } : {}),\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n ...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),\n ...(input.dryRun === true ? { dryRun: true } : {}),\n ...(input.session ? { session: input.session } : {}),\n }));\n /*\n * Narrowed on `landedValues`, not on `landed`. A nested CHOREOGRAPHY result also carries `landed`,\n * so the obvious discriminator admits a union member that has no values to hand back — caught by\n * the compiler rather than by a run that silently observed nothing.\n */\n if ('landedValues' in run) {\n return {\n landed: run.landed.map((entry) => entry.packageRelativePath),\n /*\n * The VALUES, not just the paths — the only way the choreography can ask what an artifact\n * actually cites. `landedValues` is already carried on the generation result for the advisory\n * judge; this hands the same objects to the deterministic provenance observation, so the two\n * read exactly what was landed rather than re-reading a file that a human may have edited\n * since.\n */\n landedValues: run.landedValues.map((entry) => entry.value),\n // The leaf's advisory verdict, forwarded so a lane author can ROUTE on it (#1498). Advisory\n // stays advisory here: the runtime stores it as a step value, and only a sibling's declared\n // precondition turns it into a route.\n ...(run.judge !== undefined ? { judge: run.judge } : {}),\n };\n }\n // A STAFFING leaf (`top_down.expert-personas`, #572) lands charter modules through the persona accept step;\n // it reports their paths itself, so a lane's landed set and its write records see them.\n if ('staffed' in run) return { landed: [...run.landed] };\n // An ASSESSING leaf (`top_down.phase-gate` shape) lands nothing; its verdict is its whole return.\n if ('assessed' in run && run.judge !== undefined) return { judge: run.judge };\n /*\n * A DISPATCHING leaf returns what it did, as a step value its lane's selector can read (#1501).\n *\n * It lands no FAMILY — its product is a working edit in the application workspace that a human\n * commit accepts — so before this it returned `{}` and the round history carried the objective and\n * nothing else. Measured on the build lane's first live run: over twenty rounds the model narrated\n * task names it could not have seen and finally instructed the child to \"inspect the recorded D4\n * outcome for the immediately preceding dispatch\", which is the composite being asked to look up\n * what it should have been told.\n *\n * A CONDENSATION, not the run: the task, what it was, whether its coding run settled, and how much\n * of the plan is left. That is what the next objective needs — \"after X landed, take the next ready\n * task\" — and nothing more would survive the selector's context anyway.\n *\n * The ref is DERIVED from the playbook ref, like the judge's and for the same reason: the leaf\n * declares no `stepOutputs` for it, because dispatching is a property of the run rather than an\n * output the playbook authors. Declaring one would be worse than redundant — `runChoreographyChild`\n * routes a child WITH `stepOutputs` into the structured-generation branch, so the declaration would\n * silently stop it dispatching at all.\n */\n if ('dispatched' in run && 'wave' in run) {\n // A parallel wave (#1528), condensed the same way: what ran, and how it came out.\n return {\n stepResults: new Map([[dispatchOutcomeStepRef(input.playbookRef), {\n wave: true,\n degree: run.wave.degree,\n taskRefs: run.taskRefs,\n outcomes: run.wave.outcomes.map((outcome) => (outcome ? { taskRef: outcome.taskRef, status: outcome.status } : 'unreadable')),\n stoppedFillingBecause: run.wave.stoppedFillingBecause,\n /*\n * #2405 review F10, #3214, #3206, #2388: why nothing more was dispatched — a backend that does not start (with each\n * failure's cause and remedy), a person's stop, a usage limit — so the selector does not re-run an empty wave.\n */\n ...describeBuildWaveHoldsForSelector(run.wave),\n // #2222: whether a finished plan's application assembles, so the selector never reads \"all landed\" as done.\n ...(run.wave.assembly ? { assembly: { passed: run.wave.assembly.passed, failedCheckRefs: run.wave.assembly.failed.map((entry) => entry.checkRef) } } : {}),\n }]]),\n };\n }\n if ('dispatched' in run) {\n return {\n stepResults: new Map([[dispatchOutcomeStepRef(input.playbookRef), {\n taskRef: run.taskRef,\n targetKind: run.targetKind,\n // What the agent's run came to, when it was readable. `undefined` is its own answer and is\n // not smoothed into a failure: an unreadable row must never tell the selector to re-dispatch\n // work that may well have landed.\n outcome: run.codingRun?.status ?? (run.codingRunOutcomeUnreadable === true ? 'unreadable' : undefined),\n remainingReadyTaskCount: run.remainingReadyTaskRefs.length,\n landedTaskCount: run.landedTaskRefs.length,\n ...(run.dryRun === true ? { dryRun: true } : {}),\n }]]),\n ...(run.judge !== undefined ? { judge: run.judge } : {}),\n };\n }\n return {};\n }\n\n /**\n * The rendered interview a child — and, since #1577, a round's SELECTOR — receives: the DISPATCHING\n * composite's, not the root's (#1513).\n *\n * One `runChild` is bound for a whole composite tree and `runNestedLane` hands it down unchanged, so\n * until the runtime named the dispatching composite every child at every depth received the section\n * composed for the OUTERMOST one. For a nested umbrella that asks the creator anything that is the\n * difference between deriving from stated facts and deriving from none:\n * `top_down.compliance-analysis` carries ten product-fact questions its three children need and\n * declare none of, so it could not be nested at all and `cross_cutting.compliance` had to copy them.\n *\n * Three answers, in order:\n * - the composite RUNNING this tree is dispatching → the section this run already composed, which may\n * carry a caller's per-question overrides and must not be recomposed without them;\n * - a LANE that declares an interview is dispatching → that lane's own, from the dossier;\n * - a lane that declares NONE → the INHERITED section, so an ancestor's answers keep reaching a lane\n * that asks nothing of its own. That is most composites in the catalog (`top_down.compliance-analysis`\n * and `top_down.brand-naming` are lanes that do ask), and it is why this is additive rather than a change\n * of behaviour. No count here on purpose: the catalog moves, and a number in prose is one to re-measure.\n *\n * Not memoized, deliberately: the read is one file and only a lane that DECLARES an interview reaches\n * it, of which the catalog has few. A cache here would be state to invalidate for a cost nothing has\n * measured.\n *\n * `composeElicitationSection` REFUSES a missing answer, and that refusal is unreachable from here\n * rather than tolerated: the eligibility filter withholds any child — composites included — whose\n * `unansweredQuestionRefs` is non-empty, so a lane with an unanswered interview is never dispatched.\n */\n private async composeDispatchingElicitationSection(input: {\n readonly dispatchingCompositeRef: string;\n readonly ownRef: string;\n readonly inherited: string | undefined;\n readonly playbooks: readonly MetaWorkflowPlaybook[];\n /** The instance the lane runs as (#1609): it reads that instance's answers, the default's for the rest. */\n readonly instanceKey?: string;\n }): Promise<string | undefined> {\n if (input.dispatchingCompositeRef === input.ownRef) return input.inherited;\n const lane = input.playbooks.find((candidate) => candidate.ref === input.dispatchingCompositeRef);\n if (!lane?.method?.elicitation) return input.inherited;\n const state = await this.readArtifactState();\n const laneAnswerInput = {\n playbookRef: lane.ref,\n playbook: lane,\n creatorInputs: state.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined,\n overrides: undefined,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n };\n const section = composeElicitationSection({\n playbookRef: lane.ref,\n elicitation: materializeElicitationOptions(lane, { readFamily: (family) => state.artifactsByFamily.get(family) }).playbook.method?.elicitation,\n answers: resolveElicitationAnswers(laneAnswerInput),\n // Questions answered without an answer (#3437) cover their question and are rendered as such.\n nonAnswers: resolveElicitationNonAnswers(laneAnswerInput),\n });\n return section === '' ? input.inherited : section;\n }\n\n /**\n * What ABANDONING an instance does to its runs (#1608): every run of it waiting on a person is WITHDRAWN, and\n * every interrupted progress checkpoint it left is consumed, so nothing resumes work nobody wants. A run in\n * flight is not stopped here; it stops at its next round, when its selector reads the closure.\n *\n * \"Its runs\" is the instance's key under the entry playbook or any playbook in the entry's tree: a composite's\n * children inherit its key and run under their own refs. Best-effort per run, and the answer says exactly\n * which runs were withdrawn and which checkpoints consumed.\n *\n * Withdrawn by the SYSTEM (`abortSuspendedActorExecution`), every one alike (#1751): the question outlived the\n * work an answer would continue. The person's decision is the closure itself, recorded with its actor in the\n * closure commit; the withdrawal follows from it. A CANCEL — \"this person chose not to continue this run\" —\n * would need a person, and a question ROUTED to its run's starter admits no one else: the cancel was refused,\n * recorded as a refused answer, and left the question waiting.\n */\n public async abandonInstanceRuns(input: {\n readonly playbookRef: string;\n readonly instanceKey: string;\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<{ readonly withdrawnRunIds: readonly string[]; readonly consumedCheckpointRunIds: readonly string[] }> {\n const catalog = await this.readParsedCatalog();\n const tree = new Set<string>();\n const pending = [input.playbookRef];\n while (pending.length > 0) {\n const ref = pending.pop()!;\n if (tree.has(ref)) continue;\n tree.add(ref);\n pending.push(...(catalog.find((entry) => entry.ref === ref)?.method?.choreography?.admits ?? []));\n }\n const ofTheInstance = (context: { readonly playbookRef: string; readonly instanceKey?: string }): boolean =>\n context.instanceKey === input.instanceKey && tree.has(context.playbookRef);\n\n const withdrawnRunIds: string[] = [];\n for (const row of await this.actorsSystem.listSuspendedActorExecutions(META_WORKFLOWS_SYSTEM_REF, input.session)) {\n const parsed = PlaybookRunSuspensionCheckpointSchema.safeParse(row.checkpoint?.context);\n if (!parsed.success || !ofTheInstance(parsed.data)) continue;\n try {\n await this.actorsSystem.abortSuspendedActorExecution(row._id, { failure: { message: 'The instance this run belonged to was closed; its question was withdrawn.' } }, input.session);\n withdrawnRunIds.push(row._id);\n } catch (error) {\n this.logDebug('An abandoned instance\\'s waiting run could not be withdrawn', { runId: row._id, error: describeCaughtError(error) });\n }\n }\n const consumedCheckpointRunIds: string[] = [];\n for (const entry of await this.readResumableChoreographies(input.session)) {\n if (!ofTheInstance(entry.context)) continue;\n try {\n await this.actorsSystem.consumeActorExecutionCheckpoint(entry.executionId, input.session);\n consumedCheckpointRunIds.push(entry.executionId);\n } catch (error) {\n this.logDebug('An abandoned instance\\'s checkpoint could not be consumed', { runId: entry.executionId, error: describeCaughtError(error) });\n }\n }\n return { withdrawnRunIds, consumedCheckpointRunIds };\n }\n\n /**\n * The families the application holds right now: those with content on record. A refinement line may only\n * name one of these (#1608), since it changes what exists.\n */\n public async readLandedFamilies(): Promise<ReadonlySet<string>> {\n return new Set((await this.readArtifactState()).artifactsByFamily.keys());\n }\n\n /** An instance's activation, read fresh from the committed dossier: a person may close it mid-run (#1608). */\n private async readInstanceActivation(instanceId: string): Promise<ApplicationPlaybookActivation | undefined> {\n const state = await this.readArtifactState();\n const creatorInputs = state.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined;\n return creatorInputs?.activations?.[instanceId];\n }\n\n /**\n * The declared inputs of a CHOREOGRAPHY CHILD, rendered (#1431).\n *\n * Two of the three child branches composed no input truth at all: a research child and a step-value\n * gate were given the method, the selector's objective, the parent elicitation and nothing the\n * application has accepted — while the third branch, an ordinary `runPlaybook`, composed the full\n * brief. So `inputs: [{ family: 'vision-brief' }]` was honoured for one shape of child and silently\n * dropped for the other two, and all four affected playbooks declare it.\n *\n * It matters most where the method is most specific: `compliance-evidence-adequacy` must treat a\n * jurisdiction the vision puts in scope with no evidence behind it as a gap, and it could not see\n * the vision. The jurisdiction reached it only if the selector happened to paraphrase it into a\n * free-text objective — which is a different thing from the application's accepted truth, and is\n * not one a gate may rest a gap verdict on.\n *\n * Rendered through the SAME `composeInputTruthSection` the producing branch uses, so a declaration\n * means one thing across all three branches — including its aspect narrowing (#1420), which is why\n * this is not \"hand the child the families\".\n *\n * BEST-EFFORT: an unreadable working tree costs the section, never the child. A gate with no input\n * truth answers from what it has, which is exactly what it did before this existed.\n */\n private async composeChoreographyChildInputTruth(child: MetaWorkflowPlaybook): Promise<string> {\n if ((child.inputs ?? []).length === 0) return '';\n try {\n return await this.composeInputTruthSection(child, await this.readArtifactState());\n } catch (error) {\n this.logDebug('Choreography child: declared inputs unreadable (section omitted)', { playbookRef: child.ref, error: String(error) });\n return '';\n }\n }\n\n /**\n * Generate one step VALUE — a child's return to its parent, validated against its declared schema.\n *\n * Schema-constrained on purpose: a sibling's `requires` reads a declared FIELD of this value, and a\n * gate comparing against a field the producer never guaranteed is a gate that passes or fails by\n * accident. Where a step declares no `schemaRef` the value is the model's prose, which is honest\n * for evidence and useless for a gate — which is why the adequacy step declares one.\n */\n private async generateChoreographyStepValue(input: {\n readonly child: MetaWorkflowPlaybook;\n readonly stepOutput: NonNullable<MetaWorkflowPlaybook['stepOutputs']>[number];\n readonly objective: string;\n readonly stepResults: ReadonlyMap<string, unknown>;\n readonly parentElicitationSection?: string;\n /** The child's DECLARED inputs, rendered (#1431). Empty when it declares none or the tree is unreadable. */\n readonly inputTruthSection?: string;\n }): Promise<unknown> {\n const prompt = [\n input.child.method?.guidance ?? '',\n '',\n '# Your objective for THIS round',\n input.objective,\n // The creator's facts, for the judge that needs them: adequacy against evidence WITHOUT the\n // product facts converges on honest-INSUFFICIENT forever (#284's deadlock, measured run 4).\n ...(input.parentElicitationSection ? ['', input.parentElicitationSection] : []),\n // BEFORE the evidence it weighs (#1431): a gate asked whether the evidence covers what the\n // vision puts in scope has to meet the scope first, or it grades the evidence against itself.\n ...(input.inputTruthSection ? ['', input.inputTruthSection] : []),\n '',\n '# What you are judging',\n /*\n * The siblings' returns, rendered in full. This is the ONE place a parent's accumulated scope\n * reaches a child, and it is why step outputs carry a condensation contract: an assessor handed\n * raw page text cannot judge sufficiency, it can only run out of context.\n */\n ...[...input.stepResults.entries()].map(([ref, value]) =>\n `## ${ref}\\n${typeof value === 'string' ? value : JSON.stringify(value, null, 1)}`),\n '',\n '# What to return',\n input.stepOutput.condensation,\n ].join('\\n');\n\n const schema = resolveStepOutputSchema(input.stepOutput.schemaRef, PLAYBOOK_STEP_SCHEMA_NAMESPACES);\n const label = `choreography-step:${input.child.ref}:${input.stepOutput.ref}`;\n if (!schema) {\n return (await this.buildGenerationPort().generate({ prompt, schema: z.object({ value: z.string().min(1) }), label })).output;\n }\n /*\n * REFUSED rather than returned once the attempts are spent: a step value that failed its own contract cannot\n * satisfy a sibling's `requires` honestly, and returning it anyway would let a malformed verdict either open a\n * gate it should not or close one it should not — both silently. Before that, each refusal goes back to the\n * model with its findings (#3385), as a family generation's does.\n */\n return generateChoreographyStepValue({\n generate: (request) => this.buildGenerationPort().generate(request),\n prompt,\n schema,\n label,\n describeStep: `Step \"${input.stepOutput.ref}\" of \"${input.child.ref}\" did not satisfy ${input.stepOutput.schemaRef}`,\n });\n }\n\n /**\n * Ask the model which children to run next, and what to ASK each of them.\n *\n * The same construction as the journey loop's selector, one level down: the eligible set is\n * computed in CODE and handed over as a closed enum, so the model chooses WITHIN it and can never\n * widen it. What is new — and what the whole composite design turns on — is the second field: the\n * OBJECTIVE is invented per dispatch, adapted to what earlier rounds returned. Code gates the KIND\n * of work and the bounds; it never gates the content.\n */\n private async selectChoreographyChildren(request: {\n readonly composite: MetaWorkflowPlaybook;\n readonly eligible: Parameters<PlaybookChoreographySelectionPort['select']>[0]['eligible'];\n readonly goal: string;\n readonly history: PlaybookChoreographyResult['iterations'];\n readonly stepResults: ReadonlyMap<string, unknown>;\n readonly maximumLanes: number;\n /** The children still running beside this selection (#3848); `maximumLanes` is then the FREE slots only. */\n readonly running?: readonly string[];\n /** The composite's rendered elicitation — the creator's product facts, so objectives are aimed at them. */\n readonly parentElicitationSection?: string;\n }): Promise<{\n children: readonly { playbookRef: string; objective: string; reads?: readonly string[] }[];\n stopRationale?: string;\n /** The selector broke its contract: a stop no forced build wave replaces (#3447 review R1). */\n stopIsNotTheModels?: true;\n }> {\n const STOP = 'stop';\n const choices: [string, ...string[]] = [\n request.eligible[0]!.playbookRef,\n ...request.eligible.slice(1).map((entry) => entry.playbookRef),\n STOP,\n ];\n /*\n * `reads` — which of the run's accumulated returns THIS child is handed (#1423).\n *\n * A CLOSED enum of refs the run has already produced, exactly like `choice` above: the selector\n * picks within a set computed in code and can never widen it. Offered only when there is\n * something to choose from; with an empty scope the field would be a schema with no valid value.\n *\n * It cannot starve a child either — `resolveChoreographyChildReads` pushes the floor its own\n * `STEP_AVAILABLE` declaration requires regardless of what is named here. So the model narrows\n * evidence, it does not decide readiness.\n */\n /*\n * A DERIVED judge verdict is not on the menu (#1498). It is a routing value — enum verdicts with\n * the rationales stripped — so a child handed it gains nothing it can cite, and the section that\n * would render it calls its contents \"what earlier steps actually found\". Only a declared\n * precondition reads a verdict, which is what this mechanism's own contract says; the floor in\n * `resolveChoreographyChildReads` still pushes it for a child that gates on it, so readiness is\n * untouched.\n */\n const availableStepRefs = [...request.stepResults.keys()].filter((ref) => !isJudgeVerdictStepRef(ref));\n const readsField = availableStepRefs.length > 0\n ? { reads: z.array(z.enum(availableStepRefs as [string, ...string[]])) }\n : {};\n const schema = z.object({\n children: z.array(z.object({\n choice: z.enum(choices),\n objective: z.string().min(1),\n ...readsField,\n })).min(1).max(request.maximumLanes),\n });\n /*\n * The composite's declared INPUTS, rendered — and the reason this exists is the composite's very\n * first live run (wonder-crm, 2026-08-29). The selector had the goal and the eligible refs and\n * nothing about the product, so it stopped on its first iteration with \"no product, category, or\n * market context is available to define a meaningful evidence-gathering objective.\"\n *\n * It was right to stop rather than invent one. But an objective composed for THIS round is the\n * whole point of the design, and it cannot be composed out of a playbook's own intent — the\n * composite declares `inputs[]` precisely so that what it reads is stated, and the selector was\n * the one consumer not reading them.\n */\n const inputTruth = await this.composeInputTruthSection(request.composite, await this.readArtifactState());\n\n /*\n * What the SELECTOR is shown, and what it is not (#1498).\n *\n * Derived judge verdicts are withheld. The mechanism's own contract is that only a lane AUTHOR's\n * precondition turns a verdict into a route, and a verdict rendered here would let the model\n * prefer a child on one — the same effect through a door nobody declared. Nothing is lost: the\n * verdict's effect is ALREADY in what this prompt offers, because eligibility is computed in code\n * and a child gated on the verdict is in \"what you may choose from\" precisely when it holds.\n */\n const returnedForSelection = [...request.stepResults.entries()].filter(([ref]) => !isJudgeVerdictStepRef(ref));\n\n /*\n * The composite's OWN intent, beside the goal it was dispatched with (#1577).\n *\n * At the root the goal IS the composite's intent, verbatim (`runChoreography` passes it), and that is\n * where lane authors put their stop rules (`app-creation-composite-choreography.md` §14 fact 3). A\n * NESTED lane runs with the goal its PARENT composed for it, so its own intent — \"STOP after the\n * phase gate\", the build lane's \"take the next ready task\" — never reached its selector. Rendered\n * whenever it differs from the goal, so the root's prompt is unchanged.\n */\n const ownIntent = request.composite.intent !== request.goal ? request.composite.intent : undefined;\n const prompt = [\n '# Decide what this composite does next',\n `Goal: ${request.goal}`,\n ...(ownIntent ? [\n '',\n `# What ${request.composite.ref} is for — its own intent, and its stop rules`,\n 'The goal above is what the composite that dispatched this one asked of it. This is what this composite',\n 'is FOR, as its author declared it: pursue the goal within it, and stop when it says to stop.',\n ownIntent,\n ] : []),\n ...(inputTruth ? ['', inputTruth] : []),\n // The creator's answers rank WITH the declared inputs: round-1 research aimed at the real\n // jurisdictions and telemetry beats a general survey the facts then invalidate (run 4's whole\n // first round was that survey).\n ...(request.parentElicitationSection ? ['', request.parentElicitationSection] : []),\n '',\n '# What you may choose from',\n 'These are the ONLY options, computed from what has already happened rather than proposed by you.',\n /*\n * What re-running each one means (#1523). Without it the selector refreshed blind: it could not tell\n * a settled family from one whose inputs had moved, nor which stale family was premature, and it\n * refreshed `risk-register` 98 seconds before `business-model` made it stale again.\n */\n 'A family marked STALE was derived before one of its inputs last changed, so re-running would produce',\n 'something different — a reason to re-derive, not an instruction to. A STALE family that WAITS on other',\n 'stale families is not next: refresh those first, or it is stale again the moment they are re-derived.',\n /*\n * Why each option is on the table (2026-10-01): a FIRST RUN, a REFRESH that names what moved, or a\n * child the question does not apply to. A CURRENT child (on record, nothing it reads changed) is withheld\n * by the runtime, except in an opened line instance, which exists to re-do that work.\n */\n 'A FIRST RUN adds what is missing. A REFRESH re-derives from the input named beside it. A CURRENT child is',\n 'on record with nothing it reads changed: it is offered only by a line opened to re-do that work.',\n ...request.eligible.map((entry) => {\n const rerun = describePlaybookRerun(entry.rerun);\n const notes = [\n ...(rerun !== undefined ? [rerun] : []),\n ...((entry.wouldReplace ?? []).length > 0 ? [`REPLACES existing ${entry.wouldReplace!.join(', ')}`] : []),\n ...(entry.staleOutputs ?? []).map((stale) => describeStaleOutput(stale)),\n ];\n return `- ${entry.playbookRef}: ${entry.intent}${notes.length > 0 ? ` [${notes.join('; ')}]` : ''}`;\n }),\n `- ${STOP}: nothing here advances the goal. Must be your only entry.`,\n '',\n '# The objective is YOURS to compose',\n 'For each child you select, write the objective for THIS round. It is not a fixed task: a first',\n 'round is broad, a later round should name what the previous round could not find. Repeating an',\n 'earlier objective returns the earlier answer, so make each one different and specific.',\n `You may select up to ${request.maximumLanes} children to run in parallel — do so when they can`,\n 'be asked genuinely different questions, not to pad the set.',\n /*\n * A refill beside running children (#3848): the slots offered are only the free ones, and what a running child\n * writes or will land is already off the list. Said so the selector can leave a slot free for what a running\n * child will unblock instead of filling it because it is there.\n */\n ...((request.running ?? []).length === 0 ? [] : [\n '',\n '# Already running',\n `These children are running now: ${request.running!.join(', ')}. They are not on offer, and neither is anything that`,\n 'would write what they write or read what they will land. Choose only what is worth starting beside them; leaving a',\n 'slot free for what they will unblock is a valid answer.',\n ]),\n ...(returnedForSelection.length === 0 ? [] : [\n '',\n '# What has been returned so far',\n ...returnedForSelection.map(([ref, value]) =>\n `## ${ref}\\n${typeof value === 'string' ? value : JSON.stringify(value)}`),\n '',\n '# What each child READS of the above',\n 'For each child, list in `reads` the returns it needs for ITS objective. A child asked a narrow',\n 'question does not need every sibling\\'s full text, and handing it everything is how an assessor',\n 'runs out of context instead of judging. List every ref when the child genuinely needs them all;',\n 'omit the field only if you cannot tell. Whatever you list, a child still receives anything its',\n 'own declaration requires — you are narrowing evidence, never deciding what it is allowed to run on.',\n ]),\n ...(request.history.length === 0 ? [] : [\n '',\n '# Rounds already run',\n ...request.history.flatMap((iteration) => iteration.children.map((child) =>\n `- ${child.playbookRef} — asked: \"${child.objective}\"`\n + (child.reads ? ` — read: ${child.reads.length === 0 ? 'nothing' : child.reads.join(', ')}` : '')\n + (child.failure ? ` — FAILED: ${child.failure}` : '')\n + (child.reopened && child.reopened.length > 0 ? ` — RE-OPENED ${describeReopenedChildren(child.reopened)}` : ''))),\n /*\n * A re-opened child is a LOOP-BACK, not churn (#1499, #1627): it landed earlier in this run and a\n * verdict sent the run back to it. The criterion is the reason, and it is the one thing the\n * re-offered child cannot see for itself, so the objective has to carry it.\n */\n ...(request.history.some((iteration) => iteration.children.some((child) => (child.reopened?.length ?? 0) > 0))\n ? ['', 'A child marked RE-OPENED was sent back by the verdict named beside it. If you run it again, make its objective what the judge says is wrong — name the element it names, and ask for that correction, not a redo. The objective is all that child will be told.']\n : []),\n ]),\n ].join('\\n');\n\n const generated = await this.buildGenerationPort().generate({ prompt, schema, label: 'choreography:select' });\n const parsed = schema.safeParse(generated.output);\n if (!parsed.success) {\n // The provider had a closed enum, so an unparseable answer means it broke its own contract.\n // Stopping is the only safe reading: a selection that cannot be parsed must never fall back.\n return { children: [], stopRationale: 'The selector returned an answer outside its own option set; stopping.', stopIsNotTheModels: true };\n }\n const stopped = parsed.data.children.find((child) => child.choice === STOP);\n if (stopped) return { children: [], stopRationale: stopped.objective };\n return {\n children: parsed.data.children.map((child) => {\n // `reads` exists on the parsed shape only when the round had something to read; narrowed\n // structurally rather than by re-testing `stepResults.size`, so the two cannot disagree.\n const selected = (child as { readonly reads?: readonly string[] }).reads;\n return {\n playbookRef: child.choice,\n objective: child.objective,\n ...(selected !== undefined ? { reads: selected } : {}),\n };\n }),\n };\n }\n\n /**\n * The cross-family coherence report for the CURRENT working tree.\n *\n * Reads the same artifact state the eligibility gate uses, so the report describes the tree the\n * creator is about to commit rather than the last build. Pure downstream of that read: it computes\n * and returns, and nothing branches on it.\n */\n /**\n * The facts the coherence report needs and no family declares. The served languages come from the\n * same reader the capability composition decides `add-locale` from (`getCompanionServedLanguages`), so\n * the report and the composition compare the market against one answer.\n *\n * TOLERANT on purpose: the report is advisory and \"must never be the thing that breaks\". A\n * configuration that is not readable yet (`AppConfigurationService.config` throws until it is\n * initialized) answers NO host facts, which removes only the language question — never a guessed\n * English, which `getCompanionServedLanguages` would return for a missing configuration and which\n * would invent a contradiction the application does not have.\n */\n private coherenceHostFacts(): ApplicationCoherenceHostFacts {\n /*\n * The DECLARED operating jurisdictions (#2335), from `wildo.saas.config.ts` — read on their own, so an\n * uninitialized runtime configuration removes only the language question. Undeclared or unparseable, the\n * fact is absent and the question is not asked, never answered with \"nowhere\".\n */\n const declared = ApplicationOperatingJurisdictionsSchema.safeParse(\n (this.companionContext?.saasConfig as { operatingJurisdictions?: unknown } | undefined)?.operatingJurisdictions,\n );\n /*\n * The organization model the configuration declares (#3041): a type or relationship kind already declared owes no build\n * task, and one declared otherwise than the domain plan decided is a contradiction. Read off the same loaded\n * `wildo.saas.config.ts` the companion loaded at start (a configuration declaring neither map declares none); absent only\n * when no configuration was loaded, so those two questions are then skipped rather than answered against \"nothing\n * declared\". A type a build task revised since is compared only when no task plans it, and that task is what lands it.\n */\n const saasConfig = this.companionContext?.saasConfig as ApplicationCoherenceOrganizationConfiguration | undefined;\n const organizationFacts: ApplicationCoherenceHostFacts = saasConfig === undefined\n ? {}\n : { organizationConfiguration: { organizationTypes: saasConfig.organizationTypes ?? {}, organizationRelationships: saasConfig.organizationRelationships ?? {} } };\n const jurisdictionFacts: ApplicationCoherenceHostFacts = {\n ...organizationFacts,\n ...(declared.success ? { operatingJurisdictionSlugs: declared.data.jurisdictions.map((entry) => entry.jurisdictionSlug) } : {}),\n };\n let config: unknown;\n try {\n config = this.appConfigService?.config;\n } catch {\n return jurisdictionFacts;\n }\n if (config === undefined || config === null) return jurisdictionFacts;\n return { ...jurisdictionFacts, servedLanguages: getCompanionServedLanguages(config as Parameters<typeof getCompanionServedLanguages>[0]) };\n }\n\n public async buildCoherenceReport(): Promise<{ report: ApplicationCoherenceReport; markdown: string }> {\n const state = await this.readArtifactState();\n const report = buildApplicationCoherenceReport(this.withComputedDocumentFacts(coherenceInputFor(state), state), this.coherenceHostFacts());\n return { report, markdown: renderApplicationCoherenceReport(report) };\n }\n\n /**\n * Run a playbook that assesses rather than produces.\n *\n * The judged subjects are the families it declares as INPUTS — for the phase gate, the top-down\n * definition set it exists to weigh. A declared family with no value is skipped rather than sent\n * as a hole: the judge would have nothing to reason about and would answer INDETERMINATE for a\n * reason that is about the workspace, not the artifact.\n */\n private async runAssessmentPlaybook(input: {\n readonly playbookRef: string;\n readonly playbook: MetaWorkflowPlaybook;\n /*\n * `| null` as well as optional, because that is what the producer actually hands over:\n * `FrameworkKnowledgePlaybook.evaluationTreatment` is `{ value, bytes } | null` — its own comment\n * says \"absent for contained JSON-v1 entries\" — and `null` is not `undefined` once\n * `strictNullChecks` is on (#352).\n *\n * Widened rather than cast at the call site: a parameter should describe what callers pass. No\n * runtime change either way — all three reads in the body are truthiness tests (`? :`,\n * `else if`, `?.`), so `null` and `undefined` already took the same branch.\n */\n readonly hydrated: { readonly evaluationTreatment?: { readonly value: unknown } | null };\n readonly artifactState: PlaybookArtifactState;\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<{\n playbookRef: string;\n assessed: true;\n subjects: readonly string[];\n reviewGuide: string;\n judge?: PlaybookJudgeResult;\n accepted: false;\n }> {\n /*\n * Each subject is RENDERED through the same function the generation brief uses (#1420). The judge\n * used to receive raw `JSON.stringify` of every family and ignore the declaration entirely, so a\n * playbook narrowed to two aspects was generated from two and judged against all of them.\n */\n const subjects: Array<{ family: string; value: unknown; rendered: string; follows: boolean }> = [];\n const valuesByFamily = this.decidedFamilyValues(input.artifactState);\n for (const declared of input.playbook.inputs ?? []) {\n const value = valuesByFamily[declared.family];\n if (value === undefined || value === null) continue;\n subjects.push({ family: declared.family, value, rendered: renderDeclaredInputFamily(declared, value, valuesByFamily), follows: declared.related !== undefined });\n }\n\n let judge: PlaybookJudgeResult | undefined;\n const treatment = input.hydrated.evaluationTreatment\n ? MetaWorkflow_EvaluationTreatmentDefinitionSchema.safeParse(input.hydrated.evaluationTreatment.value)\n : undefined;\n /*\n * The DECLARED derived sections, delivered to the path that actually runs this playbook.\n *\n * `composeCoherenceSection` gates on the playbook's `contextSources` declaration and was only ever\n * called from `composeBrief` — the GENERATION path. An assessing playbook (`outputs: []`) never\n * takes that path, so `top_down.phase-gate` — the sole declarer of `coherence_report`, the playbook\n * the section EXISTS for — judged six families with the arithmetic it declared composed one branch\n * over and delivered to nobody (the promise-vs-delivery class, #259; found by its own sweep,\n * 2026-09-02). Best-effort like the section itself: an unbuildable report must not cost the gate\n * its run.\n */\n const coherenceSection = this.composeCoherenceSection(input.playbook, input.artifactState);\n\n if (treatment?.success) {\n /*\n * Every research-informed subject is screened before the judge reads it (#2938), as a producer's input is (#2937):\n * an assessing playbook's verdict reopens a step and its rationale becomes that step's next instruction. A subject\n * that follows references (`related`) can carry another family's elements, so it is screened too.\n */\n const isResearchInformed = this.researchInformedFamilyPredicate(input.artifactState);\n const landed = await screenResearchInformedJudgeSubjects(\n subjects.map(({ follows, ...subject }) => ({ ...subject, researchInformed: isResearchInformed(subject.family) || follows })),\n this.researchFamilyScreeningHost(input.playbookRef),\n );\n judge = await runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed,\n // Criteria assessing only families this application's line declares not applicable are dropped (#1604).\n ...(input.artifactState.applicationLine ? { notApplicableFamilies: input.artifactState.applicationLine.notApplicableFamilies } : {}),\n ...(coherenceSection !== '' ? { derivedContext: [coherenceSection] } : {}),\n model: this.buildGenerationPort(),\n ...(input.session ? { trace: this.buildTrace(input.session, `playbook-assess-${input.playbookRef}`) } : {}),\n });\n } else if (input.hydrated.evaluationTreatment) {\n judge = { judged: false, skipped: `Compiled evaluation treatment does not satisfy its contract: ${treatment?.success === false ? treatment.error.issues[0]?.message ?? 'unknown issue' : 'unreadable'}` };\n }\n\n this.logDebug('Assessment playbook run', { playbookRef: input.playbookRef, subjects: subjects.length, judged: judge?.judged });\n return {\n playbookRef: input.playbookRef,\n assessed: true as const,\n subjects: subjects.map((subject) => subject.family),\n reviewGuide: renderPlaybookReviewGuide(buildPlaybookReviewGuide({\n treatment: input.hydrated.evaluationTreatment?.value,\n ...(judge !== undefined ? { judge } : {}),\n })),\n ...(judge !== undefined ? { judge } : {}),\n accepted: false as const,\n };\n }\n\n /**\n * The derived coherence report, for the playbook that assesses coherence.\n *\n * Composed only for the declared refs, and best-effort: a report that cannot be built must not\n * cost the gate its run — the model can still assess, just without the arithmetic done for it.\n */\n /**\n * The DETERMINISTIC per-ICP FIT matrix, for a method that consumes a fit signal (#1435).\n *\n * Three methods told their model to \"feed the snapshot to the scorer and read back the scores\",\n * and a structured generation has no tools — so the instruction named an act the model cannot\n * perform, and what it did instead was estimate. The arithmetic is done here and the judgement is\n * left where it belongs, which is exactly `COHERENCE_REPORT`'s trade one method above.\n *\n * Reads the market snapshot this run ALREADY loaded. Every playbook declaring this source also\n * declares `market-snapshot` as an input, so the section adds a computation over knowledge that\n * was already in the brief rather than new knowledge.\n */\n /**\n * The DERIVED risk signals, for a playbook that weighs risk (#1435).\n *\n * `top_down.risk-register`'s method has always said \"if signals were not supplied to this run…\"\n * and nothing had ever supplied them: the six derivations lived in an assurance script and were\n * reachable only there, so the register's derived half was permanently absent.\n *\n * FOUR of the six come from `wildo.saas.config.ts`, which this process already holds — putting\n * them behind a subprocess would spend a process to read a value in memory. The other two need\n * every resource materialized, which only the application's own module graph can do, so they come\n * through the `risk-signals` behavior.\n *\n * BEST-EFFORT on the subprocess half, and the asymmetry with `compliance-primary-facts` is\n * deliberate. That one FAILS CLOSED because a compliance document whose mechanism facts silently\n * came from prose is indistinguishable from a good one. This is the opposite case: the method\n * ALREADY has a marked branch for absent signals, and `application-creation-directive.md` is\n * explicit that a measurement may never become a precondition. Refusing here would make the\n * register unproducible whenever the subprocess is unavailable — a creation step gated on\n * evidence, which is the defect that rule exists to prevent. So the config half is delivered\n * regardless and the resource half is named as missing when it cannot be had.\n */\n private async composeRiskSignalsSection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.RISK_SIGNALS)) return '';\n try {\n const config = (this.companionContext?.saasConfig ?? {}) as {\n engineCapabilities?: Record<string, unknown> | readonly string[];\n dataRetention?: unknown;\n providerComplianceChoices?: Record<string, { deploymentModel?: string } | undefined>;\n providerConfigurations?: Record<string, unknown>;\n };\n\n const allCapabilityRefs = Object.values(EngineCapability).filter((value): value is EngineCapability => typeof value === 'string').sort();\n // The one reading of the declaration (#2848 review), shared with the CLI.\n const enabledRefs = enabledEngineCapabilityNames(config.engineCapabilities);\n\n /*\n * The engine's own predicate, TOTAL over `DataRetentionClass` by construction and already\n * correct for an absent schedule — re-deriving it here is how a signal comes to describe the\n * script rather than the application.\n */\n const allRetentionClasses = Object.values(DataRetentionClass).filter((value): value is DataRetentionClass => typeof value === 'string');\n const undeclaredRetention = undeclaredRetentionClasses(config.dataRetention as never);\n const declaredRetention = allRetentionClasses.filter((value) => !undeclaredRetention.includes(value));\n\n /*\n * The hosting choice is read from `providerComplianceChoices`, NOT from\n * `providerConfigurations` — the contract says so at its own site, because that second field is\n * an opaque bag for a provider's runtime profile and a compliance answer must not live\n * somewhere nothing can read it without knowing the provider. The CONFIGURED providers are\n * still the denominator: one configured with no choice is the UNDECLARED case, which is not the\n * same as self-hosted and must never be reported as a computed absence.\n */\n const choices = config.providerComplianceChoices ?? {};\n const vendorHosted = [...vendorHostedProviderRefs(choices as never)];\n const selfHosted = Object.entries(choices)\n .filter(([, choice]) => choice?.deploymentModel === ProviderDeploymentModel.SELF_HOSTED)\n .map(([ref]) => ref).sort();\n const undeclaredHosting = Object.keys(config.providerConfigurations ?? {}).filter((ref) => !(ref in choices)).sort();\n\n const signals = [\n deriveCapabilitySignal({ enabledRefs, allRefs: allCapabilityRefs }),\n deriveRetentionSignal({ declaredClasses: declaredRetention, undeclared: undeclaredRetention }),\n deriveProviderHostingSignal({ vendorHosted, selfHosted, undeclared: undeclaredHosting }),\n ...await this.deriveResourceBackedRiskSignals(playbook),\n await this.deriveBrandNameTrademarkRiskSignal(),\n ];\n return composeRiskSignalsSection(signals);\n } catch (error) {\n this.logDebug('Risk-signal section composition failed (non-fatal)', { playbookRef: playbook?.ref, error: String(error) });\n return '';\n }\n }\n\n /**\n * The brand name against its trademark screening, from the families this run reads — the engine derivation\n * parses the raw values itself, so this home and the assurance report cannot disagree about it.\n */\n private async deriveBrandNameTrademarkRiskSignal(): Promise<DerivedRiskSignal> {\n const state = await this.readArtifactState();\n return deriveBrandNameTrademarkSignal({\n brand: state.artifactsByFamily.get(ApplicationSpecificationFamily.BRAND_BRIEF),\n screening: state.artifactsByFamily.get(ApplicationSpecificationFamily.BRAND_NAME_SCREENING),\n market: state.artifactsByFamily.get(ApplicationSpecificationFamily.MARKET_SNAPSHOT),\n creatorInputs: state.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS),\n });\n }\n\n /**\n * The signals that need materialized resources (the personal-data pair, MCP and chat-command exposure), or NOTHING\n * when the subprocess cannot answer.\n *\n * Returning an empty list rather than throwing is the marked branch: the register's method already\n * handles an absent derived half, and a run that refused here would have made a measurement into a\n * precondition.\n */\n private async deriveResourceBackedRiskSignals(playbook: MetaWorkflowPlaybook | undefined): Promise<readonly DerivedRiskSignal[]> {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (!backendServiceKey) return [];\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'risk-signals' });\n if (!result.success) {\n this.logDebug('Risk signals: resource-backed half unavailable (the config half is still delivered)', {\n playbookRef: playbook?.ref,\n });\n return [];\n }\n const inputs = result.data as Parameters<typeof derivePersonalDataSignals>[0] & Parameters<typeof deriveMcpExposureSignal>[0]\n & Parameters<typeof deriveChatCommandExposureSignal>[0];\n return [...derivePersonalDataSignals(inputs), deriveMcpExposureSignal(inputs), deriveChatCommandExposureSignal(inputs)];\n }\n\n /**\n * The `operating_jurisdictions` section (#2335): the application's TYPED declaration of where it operates, read\n * from the configuration this companion holds. Empty unless the playbook declares the source; an undeclared or\n * unparseable declaration is said in words by the composer, never rendered as \"nowhere\".\n */\n private composeOperatingJurisdictionsSection(playbook: MetaWorkflowPlaybook | undefined): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.OPERATING_JURISDICTIONS)) return '';\n const declared = ApplicationOperatingJurisdictionsSchema.safeParse(\n (this.companionContext?.saasConfig as { operatingJurisdictions?: unknown } | undefined)?.operatingJurisdictions,\n );\n return composeOperatingJurisdictionsSection(declared.success ? declared.data : undefined);\n }\n\n /**\n * The `creator_stated_facts` section (#2498, #2499): the dossier's answers to every OTHER interview, for a step that must\n * honour facts it does not ask itself. Empty unless the playbook declares the source; never a gate.\n */\n private async composeCreatorStatedFactsSection(playbook: MetaWorkflowPlaybook | undefined, state: PlaybookArtifactState): Promise<string> {\n if (playbook === undefined || !playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.CREATOR_STATED_FACTS)) return '';\n return composeCreatorStatedFactsSection({\n reader: playbook,\n catalog: await this.readParsedCatalog(),\n creatorInputs: state.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined,\n });\n }\n\n /**\n * The FIT section, screened (#2938). The scores are computed, but every row names the ICP it scores (`icpName`) and\n * the feature, benefit and ICP refs, all written by the market snapshot, which research writes. The section is one\n * rendering of that family, screened as one text before the model reads it: withheld when a bound classifier flags any\n * of it (so one flagged ICP name withholds the whole table, the family granularity #2937 accepted), marked when nothing\n * screened it.\n */\n private async composeMarketFitScoresSection(playbook: MetaWorkflowPlaybook | undefined, state: PlaybookArtifactState): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.MARKET_FIT_SCORES)) return '';\n let section: string;\n try {\n section = composeMarketFitScoresSection(this.decidedFamilyValues(state)[ApplicationSpecificationFamily.MARKET_SNAPSHOT]);\n } catch (error) {\n this.logDebug('FIT-score section composition failed (non-fatal)', { playbookRef: playbook?.ref, error: String(error) });\n return '';\n }\n if (section === '') return '';\n const family = ApplicationSpecificationFamily.MARKET_SNAPSHOT;\n const [screened] = await screenResearchInformedRenderings(\n [{ family, text: section, researchInformed: this.researchInformedFamilyPredicate(state)(family) }],\n this.researchFamilyScreeningHost(`${playbook?.ref ?? 'playbook'}:${MetaWorkflow_ContextSource.MARKET_FIT_SCORES}`),\n );\n return screened!.text;\n }\n\n private composeCoherenceSection(playbook: MetaWorkflowPlaybook | undefined, state: PlaybookArtifactState): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.COHERENCE_REPORT)) return '';\n try {\n const report = buildApplicationCoherenceReport(this.withComputedDocumentFacts(coherenceInputFor(state), state), this.coherenceHostFacts());\n return [\n '# Cross-family coherence (COMPUTED, not your judgement)',\n 'The coverage and dangling-reference arithmetic below was computed exactly from the landed',\n 'families. Do NOT re-derive it and do not contradict it. Judge what it cannot: whether an',\n 'uncovered item is a deliberate deferral or an omission, and whether what remains is coherent',\n 'enough for the horizon.',\n '',\n renderApplicationCoherenceReport(report),\n ].join('\\n');\n } catch (error) {\n this.logDebug('Coherence section composition failed (non-fatal)', { playbookRef: playbook?.ref, error: String(error) });\n return '';\n }\n }\n\n /**\n * The declared document facts, as the generation lane's optional input.\n *\n * Read from the artifact state this run already loaded rather than re-reading companion exports —\n * one read, and the facts a draft is checked against are then exactly the facts every other part\n * of this run saw.\n *\n * Three states, and the middle one is why this is not a one-liner:\n *\n * - family ABSENT → `{}` (the key is omitted): the check skips. Correct for an application that\n * has not run `refinement.document-facts`.\n * - family present and VALID → the availability map, empty or not. An empty map is a real answer:\n * this application declares no facts, so every citation is undeclared.\n * - family present and INVALID → omitted, same as absent. \"Present but unreadable\" is not\n * \"declares nothing\" — refusing every draft on a malformed facts file would punish the drafts\n * for a defect the facts family's own validator already reports.\n */\n /**\n * WHICH governed documents this application needs — the optional input F-8 checks a draft against.\n *\n * Unwired until 2026-08-29, so `collectUnrequiredDocumentFindings` returned `[]` at both its call\n * sites and the check SKIPPED in production: the derivation, its validator, its eight pins and its\n * two dispositions were all real, and nothing supplied the one argument that makes them run. The\n * same shape `declaredDocumentFacts` had before it was wired, and the same tell — an optional input\n * whose absence is a legitimate state, so nothing anywhere reports that it is always absent.\n *\n * ## Every field comes from something the application DECLARED\n *\n * `regimes` is DERIVED from the application's typed `operatingJurisdictions` (#1161, below). It is\n * never read from the compliance posture: that family is prose (#3362), and scanning a sentence for\n * the token `GDPR` would manufacture a structured posture out of it. A jurisdiction no known regime\n * covers is logged rather than dropped. A privacy notice stays ADMISSIBLE on `holdsPersonalData`\n * alone either way, which is the point of B2's required-vs-admissible split.\n *\n * ## What the other three read\n *\n * | field | source |\n * |---|---|\n * | `holdsPersonalData` | any resource declaring `RETAIN_AND_IMPERSONALIZE` — the factory-enforced \"holds personal data of its own\" |\n * | `declaresCommercialModel` | a billing capability in the application's own composition |\n * | `runsGovernanceProgramme` | the `compliance-program` family has landed content |\n *\n * The last is a DECISION with no other home, and reading it off the landed family is the honest\n * proxy: an operator who has authored an assurance programme runs one, and one who has not has not.\n * It is also why this is derived per run rather than configured — the answer changes the moment that\n * family lands, with nothing to keep in sync.\n *\n * Returns the key OMITTED, never a half-answer, when the personal-data question cannot be answered:\n * absence skips the check, and a guessed `holdsPersonalData: false` would REFUSE a privacy notice\n * for an application that holds personal data — a refusal derived from a failure to look.\n */\n private async resolveRequiredDocumentSetInput(\n artifactState: PlaybookArtifactState,\n ): Promise<{ requiredDocumentSetInput?: RequiredDocumentSetInput }> {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (!backendServiceKey) return {};\n let holdsPersonalData: boolean;\n try {\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'compliance-primary-facts' });\n if (!result.success) return {};\n const resources = (result.data as { resources?: ReadonlyArray<{ erasureRetentionMode?: string }> }).resources ?? [];\n /*\n * Compared against the wire value rather than the enum member, and that is not laziness: this\n * subprocess result has crossed a JSON boundary, so it carries strings. The enum is imported for\n * the comparison so a rename in `saas-models` still breaks this build.\n */\n holdsPersonalData = resources.some((resource) => resource.erasureRetentionMode === ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE);\n } catch (error) {\n // Same disposition as a failed request: omit, so the check skips. This one is best-effort\n // because it decides whether an OPTIONAL guard runs, not whether the run may proceed.\n this.logDebug('Required-document-set derivation failed (check will skip)', { error: String(error) });\n return {};\n }\n\n const enabledCapabilities = enabledEngineCapabilityNames(\n (this.companionContext.saasConfig as { engineCapabilities?: Record<string, unknown> | readonly string[] }).engineCapabilities,\n );\n /*\n * `compliance-program` is the family that lands an `AssuranceProgramSpecification`. This read named\n * `assurance-program` — a family no binding defines — so `runsGovernanceProgramme` was false for every\n * application, including Wonder Todos, which has landed one; its governance documents were refused as\n * \"belonging to a programme this operator does not run\". The test agreed, keying its fixture the same way.\n */\n const assuranceProgram = artifactState.artifactsByFamily.get('compliance-program');\n\n /*\n * DERIVED from `operatingJurisdictions`, the application's own typed declaration of where it\n * operates (#229), never from prose and never asked of anybody (#1161).\n *\n * This was hard-coded `[]` with a comment explaining that the regimes the schema wants are free\n * prose on the vision, and that scanning a sentence for \"GDPR\" would manufacture a structured\n * posture. That refusal was right and the consequence was not: with nothing else filling the\n * field, EVERY application derived its privacy notice as merely admissible — including one whose\n * configuration says in typed form that it operates in the EU.\n *\n * A jurisdiction the vocabulary has no regime for (`gb`, whose UK GDPR this small enum does not\n * name) is reported by the derivation and logged here rather than dropped: the application really\n * does operate somewhere Wildo cannot yet speak for, and that is worth saying out loud.\n */\n const declaredJurisdictions = (this.companionContext.saasConfig as {\n operatingJurisdictions?: { jurisdictions?: readonly { jurisdictionSlug?: unknown }[] };\n }).operatingJurisdictions?.jurisdictions ?? [];\n const { regimes, jurisdictionsWithNoKnownRegime } = deriveComplianceRegimes(\n declaredJurisdictions\n .map((entry) => entry.jurisdictionSlug)\n .filter((slug): slug is string => typeof slug === 'string'),\n );\n if (jurisdictionsWithNoKnownRegime.length > 0) {\n this.logDebug('Declared jurisdictions no known privacy regime covers', { jurisdictionsWithNoKnownRegime });\n }\n\n const organizationStructure = this.resolveOrganizationStructure(artifactState);\n return {\n requiredDocumentSetInput: {\n // Copied because the input schema's field is a mutable array; the derivation answers readonly.\n regimes: [...regimes],\n holdsPersonalData,\n declaresCommercialModel: [...enabledCapabilities].some((capability) => capability.startsWith('BILLING')),\n runsGovernanceProgramme: assuranceProgram !== undefined && assuranceProgram !== FILE_PRESENT_WITHOUT_VALUE,\n // Who the privacy notice addresses (#1649): the programme derives each requirement's audience from it.\n ...(organizationStructure === undefined ? {} : { organizationStructure }),\n },\n };\n }\n\n /**\n * How this application's organizations are arranged, from the main line its dossier declares (#1649), or an\n * operator serving clients when a secondary line needs the firm's method (#2305); `undefined` while neither says.\n * Read from the artifact state the run already loaded, so the drafting briefs, the fact brief and the programme's\n * requirements all see the same arrangement.\n */\n private resolveOrganizationStructure(artifactState: PlaybookArtifactState): ApplicationOrganizationStructure | undefined {\n const creatorInputs = artifactState.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS);\n if (creatorInputs === undefined || creatorInputs === FILE_PRESENT_WITHOUT_VALUE) return undefined;\n return resolveApplicationOrganizationStructure(creatorInputs as ApplicationCreatorInputs);\n }\n\n /**\n * Every declared provider's compliance profile, through discovery (#1708) — the same door `wildo config sync` reads,\n * so the brief sees the catalogue vendors' profiles without loading a provider module. BEST-EFFORT: an application\n * whose packages cannot be walked right now gets `profiles: undefined`, which the population reports as NOT READ\n * rather than as \"no provider declares one\".\n */\n private async resolveDiscoveredProviderComplianceProfiles(\n saasConfig: unknown,\n ): Promise<{ profiles?: Record<string, ProviderComplianceProfile>; unreadableReason?: string }> {\n const saasRoot = this.companionContext?.saasRoot;\n if (saasRoot === undefined) return { unreadableReason: 'no application root is known' };\n try {\n const { profilesByProviderRef } = await resolveProviderComplianceProfiles({ saasRoot, saasConfig: (saasConfig ?? {}) as Parameters<typeof resolveProviderComplianceProfiles>[0]['saasConfig'] });\n return { profiles: profilesByProviderRef };\n } catch (error) {\n this.logDebug('Provider discovery unavailable — compliance profiles not read', { error: String(error) });\n return { unreadableReason: 'provider discovery could not be read' };\n }\n }\n\n /**\n * The application's accepted processor register, read from its specifications companion exports.\n *\n * Read from the EXPORTS rather than from the artifact state, unlike the document facts: this is not\n * a landed meta-workflow family, it is an application-authored specification surface — Paul's steer,\n * 2026-08-29, \"we should be able to carry them in the specifications\". Authoring is somebody else's\n * concern; reading it is this method's whole job.\n *\n * A malformed register is treated as ABSENT, exactly as a malformed facts file is: refusing every\n * draft over it would punish the document for a defect in a file the register's own validator\n * reports, and the derivation already has a truthful answer for absence — every configured provider\n * is reported UNDECLARED, which is what \"nobody has established this\" looks like.\n *\n * A register that could not be READ is a different answer (#3258): `notRead` says why, and the brief says that instead\n * of UNDECLARED, which would be a false statement about a register that may be landed. Refusing here would let an\n * unrelated specifications defect block a document designed to be producible with its gaps visible.\n */\n private async resolveProcessorRegister(): Promise<{ readonly register?: ApplicationProcessorRegister; readonly notRead?: string }> {\n let declared: unknown;\n try {\n const exports = await loadSpecificationFamilyData(this.companionContext) as { processorRegister?: unknown } | undefined;\n declared = exports?.processorRegister;\n const absence = exports === undefined ? undefined : unprovenAbsences(exports).get('processorRegister');\n if (absence !== undefined) return { notRead: absence };\n } catch (error) {\n if (error instanceof SpecificationUnavailableError || this.companionContext?.resolvedSpecifications != null) return { notRead: describeCaughtError(error) };\n // No specifications package: no register, and that is a legitimate state rather than a failure.\n this.logDebug('No specifications package, so no processor register', { error: String(error) });\n return {};\n }\n if (declared === undefined) return {};\n const parsed = ApplicationProcessorRegisterSchema.safeParse(declared);\n if (!parsed.success) {\n this.logDebug('Processor register present but unreadable — treated as absent', {\n issues: parsed.error.issues.slice(0, 5).map((issue) => issue.path.join('.')),\n });\n return {};\n }\n return { register: parsed.data };\n }\n\n /**\n * BOTH fact families (#192).\n *\n * A document asserts the FACT, not one family's declaration of it, so reading only the derived half\n * would refuse every clause resting on a fact a human established. Each half is optional and parsed\n * independently: one unreadable file must not erase the other's facts, because that would turn a\n * wiring failure into a content verdict\n * (`.claude/rules/negative-results-require-a-positive-probe.md`).\n *\n * Returns nothing when NEITHER is readable — an empty availability map means \"check against nothing\"\n * and refuses every citation, which is the wrong answer for an application that has simply not run\n * `refinement.document-facts`.\n */\n private resolveDeclaredDocumentFacts(\n artifactState: PlaybookArtifactState,\n ): { declaredDocumentFacts?: ReadonlyMap<string, ComplianceDocumentFactAvailability> } {\n const readFamily = <T>(family: string, schema: { safeParse: (value: unknown) => { success: boolean; data?: T } }): T | undefined => {\n const value = artifactState.artifactsByFamily.get(family);\n if (value === undefined || value === FILE_PRESENT_WITHOUT_VALUE) return undefined;\n const parsed = schema.safeParse(value);\n return parsed.success ? parsed.data : undefined;\n };\n const overlaidDerived = this.documentFactsWithComputedOverlay(artifactState);\n const derivedParse = overlaidDerived === undefined || overlaidDerived === null || overlaidDerived === FILE_PRESENT_WITHOUT_VALUE\n ? undefined\n : ApplicationDocumentFactSpecificationSchema.safeParse(overlaidDerived);\n const derived = derivedParse?.success ? derivedParse.data : undefined;\n const authored = readFamily('document-facts-authored', ApplicationAuthoredDocumentFactSpecificationSchema);\n if (derived === undefined && authored === undefined) return {};\n return { declaredDocumentFacts: collectComplianceDocumentFactAvailability(derived, authored) };\n }\n\n /**\n * Refresh `src/COHERENCE.md` from the tree this run produced.\n *\n * Best-effort: a rendering or write failure must never cost a landing that already happened. The\n * families are the outcome; this is the sheet a reviewer reads beside them.\n *\n * At the package ROOT rather than beside a family, because it belongs to none of them — it exists\n * precisely to answer the questions no single family can.\n */\n private writeCoherenceReport(\n specificationsPackageRoot: string,\n priorState: PlaybookArtifactState,\n landedValues: ReadonlyArray<{ readonly family: string; readonly value: unknown }>,\n ): { packageRelativePath: string; renderedSource: string; existedBefore: boolean; previousContent?: string } | undefined {\n try {\n const after = coherenceInputFor(priorState);\n for (const landed of landedValues) after.set(landed.family, landed.value);\n const rendered = renderApplicationCoherenceReport(buildApplicationCoherenceReport(this.withComputedDocumentFacts(after, priorState), this.coherenceHostFacts()));\n const packageRelativePath = COHERENCE_REPORT_PACKAGE_RELATIVE_PATH;\n const absolutePath = path.join(specificationsPackageRoot, packageRelativePath);\n const existedBefore = existsSync(absolutePath);\n const previousContent = existedBefore ? readFileSync(absolutePath, 'utf8') : undefined;\n writeSpecificationFileAtomicallySync(absolutePath, rendered);\n return { packageRelativePath, renderedSource: rendered, existedBefore, ...(previousContent !== undefined ? { previousContent } : {}) };\n } catch (error) {\n this.logDebug('Coherence report refresh failed (non-fatal)', { error: String(error) });\n return undefined;\n }\n }\n\n /**\n * The governed-document facts computed from the application's declarations (#964) — read, never stored.\n *\n * Takes the specifications exports `readArtifactState` already loaded, so the register is read once.\n * Every input is read tolerantly: an unreadable register, identity or choice map is ABSENT, and an absent\n * input computes no answer. The fact then stays absent and its clauses are marked owed, which is the\n * outcome this lane already gives a declaration nobody has made.\n */\n private async computeDocumentFactAnswers(exports: { processorRegister?: unknown } | undefined): Promise<readonly ComputedDocumentFactAnswer[]> {\n const saasConfig = (this.companionContext?.saasConfig ?? {}) as {\n providers?: { scopes?: Record<string, { providers?: Record<string, unknown> }> };\n operatorComplianceIdentity?: unknown;\n providerComplianceChoices?: unknown;\n dataRetention?: unknown;\n operatingJurisdictions?: unknown;\n systemsOfRecord?: unknown;\n engineCapabilities?: Record<string, unknown> | readonly string[];\n aiUsePosture?: unknown;\n };\n const register = ApplicationProcessorRegisterSchema.safeParse(exports?.processorRegister);\n const identity = ApplicationOperatorComplianceIdentitySchema.safeParse(saasConfig.operatorComplianceIdentity);\n const schedule = saasConfig.dataRetention === undefined ? undefined : ApplicationRetentionScheduleSchema.safeParse(saasConfig.dataRetention);\n const jurisdictions = ApplicationOperatingJurisdictionsSchema.safeParse(saasConfig.operatingJurisdictions);\n const choices = ApplicationProviderComplianceChoicesSchema.safeParse(saasConfig.providerComplianceChoices);\n const recipientPopulation = await recipientPopulationOf(saasConfig, this.companionContext?.saasRoot);\n // Only asked when an answer needs it: the retention facts (a schedule exists) or a system-of-record recipient,\n // whose received categories come from the resources bound or piped to it (#1709). ONE introspection call answers\n // every axis: what erasure does to each resource, which retention class binds it (#1613), and what flows where.\n const needsResourceDeclarations = schedule?.success === true\n || recipientPopulation.members.some((member) => member.kind === RecipientPopulationMemberKind.SYSTEM_OF_RECORD);\n const resourceDeclarations = needsResourceDeclarations ? await this.readResourceRetentionDeclarations() : undefined;\n return computeApplicationDocumentFacts({\n operatorComplianceIdentity: identity.success ? identity.data : undefined,\n processorRegister: register.success ? register.data : undefined,\n recipientPopulation,\n systemOfRecordFlows: resourceDeclarations?.systemOfRecordFlows,\n // #1745 — the vendor the source fact names beside each instance.\n systemOfRecordVendors: systemOfRecordVendorsOf(saasConfig.systemsOfRecord),\n // #1745 — the operator's statement of whether an instance's personal data can come from public sources.\n systemOfRecordPersonalDataOrigins: systemOfRecordPersonalDataOriginsOf(saasConfig.systemsOfRecord),\n providerComplianceChoices: choices.success ? choices.data : undefined,\n retentionSchedule: schedule?.success ? schedule.data : undefined,\n resourceErasureTreatments: schedule?.success ? resourceDeclarations?.resourceErasureTreatments : undefined,\n // Whenever the resources were read, not only under a schedule: the retention facts still need one (they answer\n // nothing without it), while the source fact (#1745) states whether a system-of-record copy is kept until erased\n // from the bindings alone.\n resourceRetentionBindings: resourceDeclarations?.resourceRetentionBindings,\n operatingJurisdictionSlugs: jurisdictions.success ? jurisdictions.data.jurisdictions.map((entry) => entry.jurisdictionSlug) : undefined,\n retentionEnforcementEvidence: this.readCommittedRetentionEnforcementEvidence(),\n // #2847 — the AI-use declarations and the guardrail evidence behind `ai-use-inventory` and `ai-content-guardrails`.\n aiUses: await this.readAiUseInventoryInput(saasConfig),\n aiContentGuardrailEvidence: this.readCommittedAiContentGuardrailEvidence(),\n });\n }\n\n /**\n * The application's AI-use declarations as the `ai-use-inventory` and `ai-content-guardrails` facts read them (#2847):\n * its declared capabilities split by the contracted-service rule (`partitionCapabilitiesByContractedService`, the one\n * the brief and the collector use), the capability-level `aiUsePosture`, and its agents through the same\n * `ai-use-declarations` door the brief reads (#2838's agent-population loader).\n *\n * `undefined` — both facts absent, never \"no AI\" — when the configuration declares no `engineCapabilities` (nobody has\n * said what the application enables) or carries a posture its schema refuses. Agents that could not be read stay\n * `undefined` inside the input, and the facts decide what that leaves them able to say.\n */\n private async readAiUseInventoryInput(saasConfig: {\n providers?: unknown;\n engineCapabilities?: Record<string, unknown> | readonly string[];\n aiUsePosture?: unknown;\n }): Promise<ApplicationAiUseInventoryInput | undefined> {\n if (saasConfig.engineCapabilities === undefined) return undefined;\n const posture = saasConfig.aiUsePosture === undefined ? undefined : ApplicationAiUsePostureSchema.safeParse(saasConfig.aiUsePosture);\n if (posture !== undefined && !posture.success) return undefined;\n const declared = [...enabledEngineCapabilityNames(saasConfig.engineCapabilities)];\n const partition = partitionCapabilitiesByContractedService({ declaredCapabilities: declared, providers: saasConfig.providers });\n const backendServiceKey = Object.entries(this.companionContext?.servicesByKey ?? {}).find(([, service]) => !service.frontendType)?.[0];\n return {\n contractedServiceCapabilities: partition.reachingContractedService,\n authoringOnlyCapabilities: partition.authoringOnly,\n capabilityPosture: posture?.data,\n agents: backendServiceKey === undefined ? undefined : await this.readAgentAiUseDeclarations(backendServiceKey, partition.reachingContractedService),\n };\n }\n\n /**\n * The evidence the `ai-content-guardrails` fact (RUNTIME_EVIDENCE) is computed from (#2847): the agent-operation\n * evidence and the guardrail audit-event counts the assurance collectors last committed.\n *\n * Read from the application's assurance repository, never from the running backend, for the reasons\n * {@link readCommittedRetentionEnforcementEvidence} gives. Absent or unparseable operation-record evidence (including an\n * answer recorded before the door counted per agent) answers `undefined`, so the fact is absent and its clause marked\n * owed. An audit-event count that is absent or unreadable is \"not collected\" inside the fact, never zero.\n */\n private readCommittedAiContentGuardrailEvidence(): AiContentGuardrailEvidence | undefined {\n const saasRoot = this.companionContext?.saasRoot;\n if (typeof saasRoot !== 'string' || saasRoot.length === 0) return undefined;\n const repositoryRoot = join(saasRoot, ASSURANCE_REPOSITORY_RELATIVE_PATH);\n const readJson = (file: string): unknown => {\n if (!existsSync(file)) return undefined;\n try {\n return JSON.parse(readFileSync(file, 'utf8')) as unknown;\n } catch (error) {\n this.logDebug('A committed AI guardrail measurement could not be read (ai-content-guardrails reads it as not collected)', { file, error: String(error) });\n return undefined;\n }\n };\n const operation = readJson(join(repositoryRoot, ...ASSURANCE_AGENT_OPERATION_MEASUREMENT_PATH)) as { evidence?: unknown } | undefined;\n if (operation === undefined) return undefined;\n const auditEventMeasurements = Object.fromEntries(\n Object.entries(ASSURANCE_GUARDRAIL_AUDIT_EVENT_MEASUREMENT_DIRECTORIES).map(([eventType, directory]) => [eventType, readJson(join(repositoryRoot, ...directory, `${eventType}.json`))]),\n );\n const evidence = parseAiContentGuardrailEvidence({ operationRecordsEvidence: operation?.evidence, auditEventMeasurements });\n if (evidence === undefined) this.logDebug('Agent-operation evidence was committed and does not parse, or predates the per-agent counts (ai-content-guardrails stays unanswered)');\n return evidence;\n }\n\n /**\n * The retention-enforcement records the assurance collector last committed (#1636) — what the\n * `retention-enforcement` fact, the first RUNTIME_EVIDENCE fact, is computed from.\n *\n * Read from the application's assurance repository, never from the running backend: generation must not\n * depend on a live stack or hold its credential, and the evidence plane stays an observer the creation lane\n * only reads (`.claude/rules/application-creation-directive.md`). Absent or unreadable answers `undefined`,\n * so the fact is absent and its clause is marked owed — never \"nothing enforced\".\n */\n private readCommittedRetentionEnforcementEvidence(): RetentionEnforcementEvidence | undefined {\n const saasRoot = this.companionContext?.saasRoot;\n // No application root (a host that constructed the service without one): nothing to read, so no evidence.\n if (typeof saasRoot !== 'string' || saasRoot.length === 0) return undefined;\n const measurementFile = join(saasRoot, ASSURANCE_REPOSITORY_RELATIVE_PATH, ...ASSURANCE_RETENTION_ENFORCEMENT_MEASUREMENT_PATH);\n if (!existsSync(measurementFile)) return undefined;\n try {\n const evidence = parseRetentionEnforcementEvidenceJson((JSON.parse(readFileSync(measurementFile, 'utf8')) as { evidence?: unknown }).evidence);\n if (evidence === undefined) this.logDebug('Retention-enforcement evidence was committed and does not parse (retention-enforcement stays unanswered)', { measurementFile });\n return evidence;\n } catch (error) {\n this.logDebug('Retention-enforcement evidence could not be read (retention-enforcement stays unanswered)', { error: String(error) });\n return undefined;\n }\n }\n\n /**\n * Each resource's declared erasure treatment AND retention-class binding, engine and application alike —\n * the two halves of the `retention-rules` fact: what erasure does (#454) and how long rows are kept (#1613).\n *\n * Both `undefined` when the resources cannot be read: no backend service, or a failed introspection. That\n * is not \"no resource declares anything\", and the fact then answers nothing rather than a period alone.\n * The introspection is cached against the source tree, so the repeated reads this path makes are hits.\n */\n private async readResourceRetentionDeclarations(): Promise<{\n readonly resourceErasureTreatments: readonly ResourceErasureTreatment[] | undefined;\n readonly resourceRetentionBindings?: readonly ResourceRetentionBindingFact[] | undefined;\n readonly systemOfRecordFlows?: readonly SystemOfRecordDataFlow[] | undefined;\n }> {\n const unreadable = { resourceErasureTreatments: undefined, resourceRetentionBindings: undefined, systemOfRecordFlows: undefined };\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (!backendServiceKey) return unreadable;\n try {\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'compliance-primary-facts' });\n if (!result.success) return unreadable;\n const resources = (result.data as {\n resources?: ReadonlyArray<{\n resourceType: string;\n erasureRetentionMode?: string;\n statutoryRetention?: { ground?: unknown; rationale?: unknown; staysInUseBecause?: unknown };\n retentionBinding?: unknown;\n declaresRowTtl?: boolean;\n rowLifetime?: unknown;\n erasureExecution?: { erasedAsTheSubject?: unknown; dispositions?: unknown; severerTreatments?: unknown };\n systemOfRecordFlows?: ReadonlyArray<{ system?: unknown; resourceType?: unknown; kind?: unknown; categories?: unknown; unconditionalCategories?: unknown; conditionalCategories?: unknown; uncategorizedPersonalFields?: unknown; purposeRefs?: unknown; subjectRightsPosture?: unknown }>;\n }>;\n }).resources;\n if (resources === undefined) return unreadable;\n const modes = new Set<string>(Object.values(ErasureRetentionMode));\n return {\n resourceErasureTreatments: resources.map((resource) => ({\n resourceType: resource.resourceType,\n // Crossed a JSON boundary, so it is a string; admitted only when it is a member of the vocabulary.\n ...(resource.erasureRetentionMode !== undefined && modes.has(resource.erasureRetentionMode)\n ? { erasureRetentionMode: resource.erasureRetentionMode as ErasureRetentionMode }\n : {}),\n // #2960 — what a person's erasure executes on the rows. Admitted only when both lists are arrays of vocabulary\n // members: a malformed answer is dropped whole, and the fact then states the declared mode alone.\n ...(() => {\n const execution = parseSubjectErasureExecution(resource.erasureExecution);\n return execution === undefined ? {} : { erasureExecution: execution };\n })(),\n // #1635 — the statute that keeps the rows through an erasure. Admitted only as a vocabulary member with a\n // non-empty rationale: a ground the notice cannot name the law for is not stated at all.\n ...(() => {\n const ground = StatutoryRetentionGroundSchema.safeParse(resource.statutoryRetention?.ground);\n const rationale = resource.statutoryRetention?.rationale;\n return ground.success && typeof rationale === 'string' && rationale.trim().length > 0\n ? { statutoryRetention: { ground: ground.data, rationale, ...(typeof resource.statutoryRetention?.staysInUseBecause === 'string' ? { staysInUseBecause: resource.statutoryRetention.staysInUseBecause } : {}) } }\n : {};\n })(),\n })),\n resourceRetentionBindings: resources.map((resource) => {\n // Crossed a JSON boundary too; admitted only when it parses as a binding.\n const binding = ResourceRetentionBindingSchema.safeParse(resource.retentionBinding);\n const rowLifetime = z.enum(ResourceRowLifetime).safeParse(resource.rowLifetime);\n return {\n resourceType: resource.resourceType,\n ...(binding.success ? { retentionBinding: binding.data } : {}),\n declaresRowTtl: resource.declaresRowTtl === true,\n ...(rowLifetime.success ? { rowLifetime: rowLifetime.data } : {}),\n };\n }),\n systemOfRecordFlows: parseSystemOfRecordFlows(resources),\n };\n } catch (error) {\n this.logDebug('Resource retention declarations could not be read (retention-rules stays unanswered)', { error: String(error) });\n return unreadable;\n }\n }\n\n /**\n * The `document-facts` a reader sees: the landed family with the computed facts laid over it (#964).\n *\n * Every reader of the application's facts goes through this — the drafter's input section, the fact\n * availability the landing checks, and an assessing playbook's subjects — so none of them can see a\n * stored copy where the others see the computed answer.\n *\n * An ABSENT or UNREADABLE family is returned as it is, never replaced by the computed facts alone. Absent\n * means the lane has not produced facts yet, which a binding check reads as \"skip\"; unreadable is a defect\n * the family's own validator reports. Either way, a reader shown two facts would take them for everything\n * the application declares and refuse every other citation.\n */\n private documentFactsWithComputedOverlay(state: PlaybookArtifactState): unknown {\n const value = state.artifactsByFamily.get('document-facts');\n const answers = state.computedDocumentFactAnswers ?? [];\n // Overlaid even with NO answer (#1636 review): the overlay also drops any stored copy of a computed fact,\n // and a copy left in the read view is a claim nothing computed — a typed \"ENFORCED\" among them.\n if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE) return value;\n const parsed = ApplicationDocumentFactSpecificationSchema.safeParse(value);\n return parsed.success ? overlayComputedDocumentFacts(parsed.data, answers) : value;\n }\n\n /**\n * The coherence report's input with the computed facts laid over `document-facts` (#964).\n *\n * Applied at the moment the report is BUILT, after any freshly landed family has been set: a run that\n * just regenerated `document-facts` must not have its report compare documents against a file that no\n * longer carries the computed facts, and read every citation of them as dangling.\n */\n private withComputedDocumentFacts(input: Map<string, unknown>, state: PlaybookArtifactState): Map<string, unknown> {\n const answers = state.computedDocumentFactAnswers ?? [];\n const overlaid = this.documentFactsWithComputedOverlay({ artifactsByFamily: input, computedDocumentFactAnswers: answers });\n if (overlaid !== undefined) input.set('document-facts', overlaid);\n return input;\n }\n\n /**\n * The governed-document drafts this application already holds, read from the FILE landing writes.\n *\n * It cannot come from `readArtifactState`, and that is not an oversight: a draft is not accepted\n * application truth, so its family has no companion-exports member, and that read records only a\n * file-presence marker for it. The value has to be imported from the landed module, exactly as\n * `wildo config document-releases` does when it composes a release from the same file.\n *\n * ABSENT IS NOT EMPTY. An empty array says this application holds no drafts, and the landing merges\n * normally; `undefined` says nobody looked, and the landing REFUSES rather than overwrite drafts it\n * cannot see (#895). So a read FAILURE throws rather than answering `[]` — reporting \"no drafts\" for\n * a file that exists but could not be parsed is precisely how the second draft would silently\n * discard the first.\n *\n * Before this was wired, every run was in the `undefined` case: Wonder Todos drafted its privacy\n * notice, and the service-terms run that followed died at the landing with that refusal (2026-09-16).\n */\n private async readLandedComplianceDocumentCandidates(): Promise<readonly ApplicationCreationSpecs.ComplianceDocumentCandidate[] | undefined> {\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (specificationsPackageRoot === undefined) return undefined;\n const target = resolvePlaybookOutputLandingTarget({\n family: 'compliance-document-candidate-set',\n schemaRef: ApplicationCreationSpecs.ApplicationSpecificationFamilySemanticSchemaRef.COMPLIANCE_DOCUMENT_CANDIDATE_SET,\n constantPrefix: LANDED_CONSTANT_PREFIX,\n });\n const modulePath = join(specificationsPackageRoot, target.packageRelativePath);\n if (!existsSync(modulePath)) return [];\n const loaded = await importLandedTypeScriptModule(modulePath, import.meta.url);\n const set = loaded[target.exportedConstantName] as ApplicationCreationSpecs.ApplicationComplianceDocumentCandidateSet | undefined;\n if (set === undefined) {\n throw new Error(\n `The landed draft set at ${modulePath} does not export ${target.exportedConstantName} — the constant landing writes — `\n + 'so which governed documents this application already drafted is unknown, and landing another would discard them.',\n );\n }\n return set.candidates;\n }\n\n /**\n * The application's line scope from the creator's answers ALONE (#1639) — what\n * {@link readArtifactState} derives, without the git freshness, build-plan and document-fact reads\n * that make a full state cost minutes. Same inputs, same resolver: the dossier as the specification\n * companion exports carry it (the load is cached by tree signature, so the full read that may follow\n * does not pay for it twice), and the whole compiled catalog.\n *\n * A read that FAILS answers no scope, and the choreography decides the slow way. This is an\n * optimisation and must never be a new way for a run to fail: the loop's first tree read performs the\n * same load, so a genuine failure still surfaces — there, with that read's own context.\n */\n private async readApplicationLineScope(): Promise<PlaybookApplicationLineScope | undefined> {\n try {\n const exports = (await loadSpecificationFamilyData(this.companionContext)) as unknown as Record<string, unknown>;\n const field = APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS\n .find((binding) => binding.family === ApplicationSpecificationFamily.CREATOR_INPUTS)?.companionExportsField;\n const creatorInputs = (field === undefined ? undefined : exports[field] ?? undefined) as ApplicationCreatorInputs | undefined;\n return resolveApplicationLineScope({ catalog: readCompiledApplicationLineCatalog(), creatorInputs });\n } catch (error) {\n this.logDebug('The application line could not be read before the tree; the choreography reads it the slow way', { error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n private async readArtifactState(): Promise<PlaybookArtifactState> {\n const artifactsByFamily = new Map<string, unknown>();\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n\n const exports = await loadSpecificationFamilyData(this.companionContext);\n const unavailableFamilies = new Map<string, string>();\n for (const binding of APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS) {\n // A family with no companion-exports member is not accepted truth (a draft). It has no value to\n // read here and falls through to the file-presence pass below, which is the honest answer for it.\n if (binding.companionExportsField === undefined) continue;\n try {\n const value = (exports as unknown as Record<string, unknown>)[binding.companionExportsField];\n if (value !== undefined && value !== null) {\n // The dossier is read WITH the answers the application's declarations give (#3438); never written back from here.\n artifactsByFamily.set(binding.family, binding.family === ApplicationSpecificationFamily.CREATOR_INPUTS\n ? withApplicationDeclaredAnswers(value as ApplicationCreatorInputs, this.companionContext.saasConfig)\n : value);\n }\n } catch (error) {\n if (!(error instanceof SpecificationUnavailableError)) throw error;\n // Its module failed: not absent, so no playbook is offered to produce it (#3258). See `unavailableFamilies`.\n unavailableFamilies.set(binding.family, error.message);\n if (binding.family !== ApplicationSpecificationFamily.CREATOR_INPUTS) artifactsByFamily.set(binding.family, FILE_PRESENT_WITHOUT_VALUE);\n }\n }\n // Absent beside a failed module, which may be what declares it (#3258): held rather than offered. See `unprovenAbsences`.\n const absences = unprovenAbsences(exports);\n for (const binding of APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS) {\n const absence = binding.companionExportsField === undefined ? undefined : absences.get(binding.companionExportsField);\n if (absence !== undefined) unavailableFamilies.set(binding.family, absence);\n }\n const failedSpecificationModules = (await readSpecificationFamiliesWholeValueBasis(this.companionContext)).unevaluatedModules;\n\n if (specificationsPackageRoot) {\n for (const family of FILE_ONLY_ARTIFACT_FAMILIES) {\n if (artifactsByFamily.has(family)) continue;\n const packageRelativePath = getFamilyPackageRelativePath(family);\n if (packageRelativePath && existsSync(join(specificationsPackageRoot, packageRelativePath))) {\n // Present, but unreadable as a value: recorded as an opaque marker so `artifact_exists` can be\n // answered truthfully while `artifact_valid` still fails closed for want of a validator.\n artifactsByFamily.set(family, FILE_PRESENT_WITHOUT_VALUE);\n }\n }\n }\n /*\n * Git freshness for the families that HAVE content, and only those.\n *\n * Absent families are skipped because absence is not a change — the derivation treats a family\n * with no entry as unmoved, which is pinned. That keeps this to two git reads per PRESENT family\n * (six on wonder-crm) rather than per known family, on a call the eligibility board makes every\n * time it is asked.\n */\n const draftArtifactsByFamily = await this.readLandedDraftArtifacts(specificationsPackageRoot);\n\n /*\n * The application's main line (#1603). Supplied on EVERY state this host builds, because this state\n * is where every door that starts a playbook meets the line: the run route, the workbench dispatch,\n * the conversation tool, resume, the loop and each nested choreography level all ask eligibility on it.\n */\n const creatorInputs = artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined;\n const catalog = await this.readParsedCatalog();\n // The line is walked over the WHOLE compiled catalog, structurally: a composite failing the full contract\n // must not take its subtree out of the line (see readCompiledApplicationLineCatalog).\n const applicationLine = resolveApplicationLineScope({ catalog: readCompiledApplicationLineCatalog(), creatorInputs });\n /*\n * A family the line declares not applicable is HIDDEN, even when a file for it exists (#1604): one left\n * by a previous line, or written by hand, is not truth about this application. Hidden here, BEFORE git\n * freshness and everything else is derived, so eligibility, briefs, staleness and the build all agree.\n * The file is never deleted: it records an earlier decision, and it comes back if the line switches back.\n */\n const ignoredLandedFamilies = [...applicationLine.notApplicableFamilies].filter((family) => artifactsByFamily.has(family)).sort();\n for (const family of applicationLine.notApplicableFamilies) artifactsByFamily.delete(family);\n /*\n * A family a DECISION has set aside (#1606): every playbook producing it is gated on a decision now\n * decided otherwise, e.g. a website plan whose composition since declined the website. Hidden like a\n * not-applicable family, for the same reason and before the same derivations; the file is kept, and is\n * visible again the moment the decision flips back.\n */\n const deactivatedFamilies = collectFamiliesDeactivatedByDecisions({ playbooks: catalog, artifactsByFamily });\n for (const entry of deactivatedFamilies) artifactsByFamily.delete(entry.family);\n\n const familyGitFreshness = await this.resolveFamilyGitFreshness([...artifactsByFamily.keys()]);\n const codeSurfaceCommittedAt = await this.resolveCodeSurfaceCommittedAt();\n const landingHistory = await this.resolveLandingHistory([...artifactsByFamily.keys()], specificationsPackageRoot);\n const buildPlanExecution = artifactsByFamily.has('build-plan')\n ? await this.resolveBuildPlanExecutionState(familyGitFreshness)\n : undefined;\n // A register a failed module holds cannot be read: the facts resting on it are not computed from nothing.\n const computedDocumentFactAnswers = unavailableFamilies.has(ApplicationSpecificationFamily.PROCESSOR_REGISTER)\n ? []\n : await this.computeDocumentFactAnswers(exports as unknown as { processorRegister?: unknown } | undefined);\n /*\n * Charters older than their shaping inputs (#2819), so the staffing step is offered again when the brand, the market\n * or the design system changed after a persona was shaped. Each file is dated by the run that last wrote it, else by\n * its last commit, through the same memoised register and git reads as above. Never throws: what it cannot date it\n * does not report.\n */\n const expertCharterDrift = await this.expertPersonas.assessCharterDrift(artifactsByFamily.get(ApplicationSpecificationFamily.EXPERT_PERSONAS));\n /*\n * The creator's answers as an IMPLICIT INPUT of the playbooks that READ them (#1454, Step 8): per\n * playbook, the latest `answeredAt` among the answers it reads. Per answer rather than per file —\n * the dossier is one family for every interview, so its commit time would make a vision answer\n * stale-flag the market snapshot. Per READING playbook rather than per recording one, through the\n * runtime's shared-decision resolution, so a decision answered once at its owner also dates the\n * step that asks it through `sameDecisionAs` (gap-4 review).\n */\n // Each instant's answer, from the same derivation, so a REFRESH it causes names the answer that moved (#3270).\n const creatorInputLatestAnswerByPlaybook = Array.isArray(creatorInputs?.answers) && creatorInputs.answers.length > 0\n ? buildCreatorInputLatestReadAnswerByPlaybook(catalog, creatorInputs)\n : new Map<string, PlaybookLatestReadAnswer>();\n const creatorInputAnsweredAtByPlaybook = new Map([...creatorInputLatestAnswerByPlaybook].map(([ref, answer]) => [ref, answer.at]));\n return {\n artifactsByFamily,\n ...(unavailableFamilies.size > 0 ? { unavailableFamilies } : {}),\n ...(failedSpecificationModules.length > 0 ? { failedSpecificationModules } : {}),\n applicationLine: ignoredLandedFamilies.length > 0 ? { ...applicationLine, ignoredLandedFamilies } : applicationLine,\n // The logo step's panel, so the board's staffing standing reads the whole roster (#2462).\n additionalExpertConveners: hostExpertConveners(applicationLine),\n ...(expertCharterDrift.length > 0 ? { expertCharterDrift } : {}),\n ...(deactivatedFamilies.length > 0 ? { deactivatedFamilies } : {}),\n familyGitFreshness,\n ...(codeSurfaceCommittedAt.size > 0 ? { codeSurfaceCommittedAt } : {}),\n ...(landingHistory ? { landingHistory } : {}),\n ...(creatorInputAnsweredAtByPlaybook.size > 0 ? { creatorInputAnsweredAtByPlaybook, creatorInputLatestAnswerByPlaybook } : {}),\n ...(draftArtifactsByFamily.size > 0 ? { draftArtifactsByFamily } : {}),\n ...(computedDocumentFactAnswers.length > 0 ? { computedDocumentFactAnswers } : {}),\n ...(buildPlanExecution ? { buildPlanExecution } : {}),\n };\n }\n\n /**\n * The landed DRAFT families, read as values for the coherence report, and as keys by the rerun verdict, which\n * must see a landed draft as on disk (#3454). Never by eligibility.\n *\n * A draft has no `companionExportsField` on purpose — it is not accepted truth, and `artifact_valid`\n * must keep failing closed for it. So its value cannot go into `artifactsByFamily`, which eligibility\n * reads. It travels on `draftArtifactsByFamily` instead; see that field's contract.\n *\n * The population is DERIVED — every binding with no companion-exports slot whose landing file exists\n * — rather than a second hand-maintained list beside the landing catalog. Today that resolves to\n * exactly one family, `compliance-document-candidate-set` (the singular producer lands INTO it and is\n * skipped), so nothing else changes; when a second draft\n * family lands it is covered without an edit here, which is the failure `COHERENCE_FAMILIES` already\n * warns about in its own docblock.\n *\n * Best-effort by construction: an unparseable or half-written draft must cost nobody their run. The\n * report then simply says less about that family, which is what it said before this existed.\n */\n private async readLandedDraftArtifacts(specificationsPackageRoot: string | undefined): Promise<Map<string, unknown>> {\n /*\n * One loader, shared with the decided-element doors (#1426): the draft population is derived by\n * `readableDraftFamilyLandings`, which also skips a family that lands INTO another — the\n * produced/landed pair shares one file, and handing the producer's schema the set made the coherence\n * report claim, permanently and falsely, that a valid compliance file failed its own schema (#1245).\n */\n return loadDraftFamilyValues(specificationsPackageRoot);\n }\n\n /**\n * When each playbook last landed and when each present family last changed, from the run-write\n * register — what lets an unattended selection withhold a playbook whose inputs have not moved\n * (`PlaybookEligibility.rerun`, 2026-10-01). Families are keyed by their landing file, app-root-relative,\n * which is how the register records a run's writes.\n */\n private async resolveLandingHistory(\n families: readonly string[],\n specificationsPackageRoot: string | undefined,\n ): Promise<PlaybookLandingHistory | undefined> {\n const familyFiles = new Map<string, string>();\n if (specificationsPackageRoot) {\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);\n for (const family of families) {\n const packageRelativePath = getFamilyPackageRelativePath(family);\n if (packageRelativePath) familyFiles.set(family, path.posix.join(specificationsRelativeRoot, packageRelativePath));\n }\n }\n return this.writeRegister.deriveLandingHistory(familyFiles);\n }\n\n /**\n * What git says about each family's path: does it carry working edits, and when was it last\n * committed. The two facts {@link deriveOneFamilyFreshness} interprets.\n *\n * The HOST half of the split, deliberately: reading git is this service's job, and deciding what a\n * commit time MEANS is the runtime's. That is what lets the whole staleness rule be tested against\n * a literal map with no repository.\n *\n * Reads are best-effort per family. A family whose path cannot be resolved contributes no entry,\n * which the derivation reads as \"absent\", not as \"changed\" — the conservative direction for an\n * ANNOTATION, whose cost of a false positive is a creator chasing a re-derivation that was not\n * needed.\n */\n private async resolveFamilyGitFreshness(\n families: readonly string[],\n ): Promise<Map<string, PlaybookFamilyGitFreshness>> {\n const freshness = new Map<string, PlaybookFamilyGitFreshness>();\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) return freshness;\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);\n\n const present = families.flatMap((family) => {\n const packageRelativePath = getFamilyPackageRelativePath(family);\n if (!packageRelativePath) return [];\n const familyPath = path.posix.join(specificationsRelativeRoot, packageRelativePath);\n if (!existsSync(join(this.companionContext.saasRoot, familyPath))) return [];\n return [{ family, familyPath }];\n });\n if (present.length === 0) return freshness;\n\n /*\n * ONE batched answer for \"is it committed\" across every present family, rather than the\n * `ls-files` + `status` PAIR of subprocesses each family used to cost on its own.\n *\n * This call is on the eligibility board's hot path — the board makes it every time it is asked —\n * so its cost is paid per poll, and a spawn storm starves the event loop the readiness endpoint\n * shares. Measured 2026-09-22 with an in-process counter at the spawn site: this method was the\n * single largest remaining source of git subprocesses in the companion.\n *\n * The commit TIMES go through `lastCommitUnixTimes`, which memoises them against the HEAD object\n * id. An earlier revision of this comment said they had \"no equivalent batched form that is\n * cheaper in the general case\", which is true of batching the WALK and beside the point: the\n * answer depends only on the commit graph, so it cannot change while HEAD is unmoved, and the\n * right saving is not to ask again rather than to ask more cleverly. Once the other two readers\n * were batched this was the largest per-path caller left.\n */\n const familyPaths = present.map((entry) => entry.familyPath);\n const [committedFamilyPaths, lastCommitTimes] = await Promise.all([\n this.git.selectCommittedPaths(familyPaths),\n this.git.lastCommitUnixTimes(familyPaths),\n ]);\n\n for (const { family, familyPath } of present) {\n try {\n const committed = committedFamilyPaths.has(familyPath);\n const lastCommitUnixTime = lastCommitTimes.get(familyPath);\n freshness.set(family, { committed, ...(lastCommitUnixTime !== undefined ? { lastCommitUnixTime } : {}) });\n } catch (error) {\n // A git read that throws leaves the family absent from the map, which reads as unmoved. An\n // annotation must never become an alarm because a subprocess failed.\n this.logDebug('Family git freshness read failed (non-fatal)', { family, error: String(error) });\n }\n }\n return freshness;\n }\n\n /**\n * When each application code surface was last committed (#2506): the implicit input of a playbook whose context\n * sources read the code, so document facts derived before the build declared billing and personal data go stale\n * once it has.\n *\n * Where each surface lives is this host's knowledge, kept here and nowhere else:\n * - the application configuration is `wildo.saas.config.ts`;\n * - the backend configuration is each backend service's `src/saas-config.backend.ts` (the skeleton's fixed file);\n * - the resource declarations are each library's `src`.\n *\n * A surface's instant is the latest of its paths. Committed history only: an uncommitted edit is a working edit, and\n * the companion commits a run's writes, so the next poll dates it. Same memoised git reads as the family freshness,\n * so a poll costs one `rev-parse` while HEAD is unmoved. Never throws: an unreadable surface dates nothing.\n */\n private async resolveCodeSurfaceCommittedAt(): Promise<Map<ApplicationCodeSurface, number>> {\n const committedAt = new Map<ApplicationCodeSurface, number>();\n try {\n const saasRoot = this.companionContext.saasRoot;\n const relativeToRoot = (absoluteOrRelative: string) => path.posix.normalize(path.relative(saasRoot, path.resolve(saasRoot, absoluteOrRelative)).split(path.sep).join('/'));\n const pathsBySurface: Record<ApplicationCodeSurface, string[]> = {\n [ApplicationCodeSurface.APPLICATION_CONFIGURATION]: ['wildo.saas.config.ts'],\n [ApplicationCodeSurface.BACKEND_CONFIGURATION]: Object.values(this.companionContext.servicesByKey ?? {})\n .filter((service) => !service.frontendType)\n .map((service) => path.posix.join(relativeToRoot(service.path), 'src', 'saas-config.backend.ts')),\n [ApplicationCodeSurface.RESOURCE_DECLARATIONS]: Object.values(this.companionContext.resolvedLibraries ?? {})\n .map((library) => path.posix.join(relativeToRoot(library.packageRoot), 'src')),\n };\n const present = Object.fromEntries(Object.entries(pathsBySurface)\n .map(([surface, paths]) => [surface, paths.filter((relativePath) => existsSync(join(saasRoot, relativePath)))])) as Record<ApplicationCodeSurface, string[]>;\n const times = await this.git.lastCommitUnixTimes(Object.values(present).flat());\n for (const surface of Object.values(ApplicationCodeSurface)) {\n const instants = present[surface].flatMap((relativePath) => (times.has(relativePath) ? [times.get(relativePath)!] : []));\n if (instants.length > 0) committedAt.set(surface, Math.max(...instants));\n }\n } catch (error) {\n this.logDebug('Code surface commit times could not be read (nothing is dated by them)', { error: String(error) });\n }\n return committedAt;\n }\n\n /**\n * The build plan's execution progress plus git-derived input freshness — the eligibility board's\n * evidence for \"the build has moved past decomposition\".\n *\n * Freshness fails OPEN on purpose: when the build plan has no commit yet, or a timestamp cannot be\n * read, `upstreamChangedSinceBuildPlanLanded` answers true and the completion gate stays open. The\n * gate may only close on POSITIVE evidence that everything is current — a gate that closes on an\n * unreadable answer is the phantom-incompatibility shape all over again.\n *\n * That fail-open is now `derivationPointUnknown` on the SHARED derivation rather than a second\n * copy of the comparison. This gate and the board's `staleOutputs` annotation ask the same question\n * about the same pair and read the answer differently — the gate ORs in the unknown case, the\n * annotation does not (an uncommitted output is a working edit, not a stale one). Two derivations\n * of one fact would be two things that can disagree, and the disagreement would be invisible\n * because each would have its own passing tests.\n */\n private resolveBuildPlanExecutionState(\n familyGitFreshness: ReadonlyMap<string, PlaybookFamilyGitFreshness>,\n ): Promise<PlaybookArtifactState['buildPlanExecution']> {\n return this.buildDispatch.resolveBuildExecutionProgress().then((progress) => {\n if (!progress) return undefined;\n const derived = deriveOneFamilyFreshness('build-plan', BUILD_DECOMPOSE_INPUT_FAMILIES, familyGitFreshness);\n return {\n ...progress,\n upstreamChangedSinceBuildPlanLanded: derived.derivationPointUnknown || derived.changedInputs.length > 0,\n };\n });\n }\n\n /**\n * Families this runtime can actually write a file for.\n *\n * Delegated, not computed here. The first version asked \"does the family have a directory?\", which is a\n * PLACEMENT question — `build-plan` has one and still cannot be rendered — so the live board offered\n * `bottom_up.build-decompose` as runnable and the loop's write refused. The runtime owns the join\n * between a family's validator and its render profile; a companion-side approximation of it is exactly\n * the restated list that drifts.\n */\n private resolveLandableFamilies(): ReadonlySet<string> {\n return getLandableArtifactFamilies();\n }\n\n /**\n * Chain playbooks unattended: gate → the model chooses → run → re-read the tree → repeat.\n *\n * The two halves are deliberately different in kind. The GATE is code and is recomputed from the working\n * tree at the top of every iteration; the CHOICE is the model's, constrained to a Zod enum built from\n * that iteration's eligible set, so it cannot widen its own options. A run that fails stops the loop,\n * because choosing again from unchanged state would spend without progressing.\n */\n public async runPlaybookLoop(input: {\n readonly goal: string;\n readonly maximumIterations: number;\n readonly maximumLanesPerIteration?: number;\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<PlaybookLoopResult> {\n // The loop's OWN steps — the gate and the model's choice between iterations — are work a restart\n // kills too, not only its lanes; counted for its whole life like any run.\n this.loopsInFlight = (this.loopsInFlight ?? 0) + 1;\n try {\n return await this.whileInFlight(() => this.runPlaybookLoopCounted(input));\n } finally {\n this.loopsInFlight = Math.max(0, (this.loopsInFlight ?? 1) - 1);\n }\n }\n\n /**\n * Loops running in this process (#2233). The pulse's `runsInFlight` counts detached submissions only, and a loop is\n * not one: it holds its request. The unattended driver must know a loop is still running after IT stopped waiting\n * for the request, so it never starts a second loop over the first (which the engine's LOOP lease would refuse).\n */\n private loopsInFlight = 0;\n\n /**\n * What the unattended creation driver (`wildo creation drive`, #2233) needs beyond the feed to decide its next step:\n * whether anything still runs in this process (a loop, a detached run such as a wave or a usage-limit resume, any other\n * playbook execution), a person's build stop read live, and the pending usage-limit resume. The other holds (usage\n * limit, connectivity, a backend that does not boot) and what waits on the creator are the feed's, read from the same\n * rows Home shows. Another PROCESS's loop is not seen here; the loop route refuses it (409), and the driver waits.\n */\n public readCreationDriveStatus(): {\n readonly loopsInFlight: number;\n readonly detachedRunsInFlight: number;\n readonly executionsInFlight: number;\n readonly buildStoppedSince?: string;\n readonly pendingBuildResume?: { readonly resumesAt: string };\n readonly codingAgentAccountRefusal?: ModelProviderAccountRefusal;\n } {\n const pendingBuildResume = this.readPendingBuildResume();\n // #3204: the live hold says whether the pending resume only re-asks a refused account, which a person must fix.\n const codingAgentAccountRefusal = this.buildDispatch.readCodingAgentUsageLimitHold()?.accountRefusal;\n const buildStoppedSince = this.buildDispatch.readBuildStopHold();\n return {\n loopsInFlight: this.loopsInFlight ?? 0,\n detachedRunsInFlight: this.runningDetachedRuns?.size ?? 0,\n // Every playbook execution in this process, a synchronous one included (review of 6fe527ed3).\n executionsInFlight: this.playbookExecutionsInFlight ?? 0,\n // Read live, not from a feed snapshot: a stop asked a moment ago holds now (review of 6fe527ed3).\n ...(buildStoppedSince === undefined ? {} : { buildStoppedSince }),\n ...(pendingBuildResume === undefined ? {} : { pendingBuildResume: { resumesAt: pendingBuildResume.resumesAt } }),\n ...(codingAgentAccountRefusal === undefined ? {} : { codingAgentAccountRefusal }),\n };\n }\n\n private async runPlaybookLoopCounted(input: {\n readonly goal: string;\n readonly maximumIterations: number;\n readonly maximumLanesPerIteration?: number;\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<PlaybookLoopResult> {\n let loopFailureMeasurement: PlaybookRunMeasurement | undefined;\n /** Rounds the loop's lanes inherited from checkpoints, fulfilled or failed — for the loop's own failure record (#1507). */\n const lanesInherited = { rounds: 0 };\n try {\n /*\n * THE LOOP IS AN EXECUTION (#1361). Its runs always were; the loop driving them was the one\n * long-running unit of this lane with no row at all, so a companion restart mid-loop left\n * nothing saying one had been going. Opened and settled by the engine's driver — COMPLETED with\n * why it stopped and how many steps it took, FAILED with the message when it throws — and swept\n * at startup with the rest of `meta-workflows.system`'s orphans.\n *\n * ONE loop per application, by the engine's lease on the `LOOP` subject: the in-memory flag\n * this replaced could not see a loop running in another process, and forgot one on restart.\n * Manual single-playbook runs are deliberately NOT blocked — the human is the authority, and\n * git + the write register show exactly what happened.\n */\n return await this.actorsSystem.runActorExecution(\n {\n systemRef: META_WORKFLOWS_SYSTEM_REF,\n actorRef: META_WORKFLOWS_PLAYBOOK_LOOP_ACTOR_REF,\n exclusiveSubject: MetaWorkflowsExclusiveSubject.LOOP,\n task: {\n title: 'Playbook loop',\n description: 'An unattended chain of playbook runs: gate, choose, run, re-read the tree, repeat.',\n topic: Actor_Task_Topics.PLANNING,\n input: { goal: input.goal, maximumIterations: input.maximumIterations, maximumLanesPerIteration: input.maximumLanesPerIteration ?? null },\n ...(input.session\n ? { correlation: { domain: META_WORKFLOWS_CORRELATION_DOMAIN, refs: { traceSessionId: input.session.sessionId } } }\n : {}),\n },\n ...(input.session ? { scope: input.session } : {}),\n },\n async () => {\n /*\n * Measured around the whole loop as well (#1507): its steps carry their own figures when it\n * returns, and a loop that THROWS (a selection or a tree read failing) still records what it\n * spent up to then, beside the engine's failure.\n */\n const startedAtMs = Date.now();\n const measured = await this.spendMeter.measure(() => this.executePlaybookLoop(input, lanesInherited));\n if (measured.settled.status === 'rejected') {\n loopFailureMeasurement = {\n durationMs: Date.now() - startedAtMs,\n // The meter saw this process's calls; rounds its lanes inherited were paid by an earlier one.\n spend: mergePlaybookSpend([measured.spend, ...Array.from({ length: lanesInherited.rounds }, () => PLAYBOOK_SPEND_NOT_OBSERVED)]),\n };\n throw measured.settled.reason;\n }\n return measured.settled.value;\n },\n {\n recordBesideFailure: () => (loopFailureMeasurement ? { measurement: loopFailureMeasurement } : null),\n concludeAs: (result) => ({\n status: FlowsActors_Status.COMPLETED,\n /*\n * What the loop took and spent, per step and per lane, and which steps began over an\n * unchanged tree (#1507). Each lane's own run is also measured on ITS row; this is the\n * loop's view, which adds the selection calls no run row carries.\n */\n taskOutput: summarizePlaybookLoopResult(result),\n }),\n },\n );\n } catch (error) {\n throw await this.nameTheRunHoldingTheSubject(error, MetaWorkflowsExclusiveSubject.LOOP, MetaWorkflowsExclusiveSubject.LOOP, input.session);\n }\n }\n\n private async executePlaybookLoop(input: {\n readonly goal: string;\n readonly maximumIterations: number;\n readonly maximumLanesPerIteration?: number;\n readonly session?: CompanionExecutionSessionContext;\n }, lanesInherited: { rounds: number } = { rounds: 0 }): Promise<PlaybookLoopResult> {\n const playbooks = await this.readParsedCatalog();\n this.logDebug('Starting playbook loop', {\n goal: input.goal,\n maximumIterations: input.maximumIterations,\n maximumLanesPerIteration: input.maximumLanesPerIteration,\n catalogSize: playbooks.length,\n });\n return await runPlaybookLoop({\n goal: input.goal,\n playbooks,\n landableFamilies: this.resolveLandableFamilies(),\n readArtifactState: () => this.readArtifactState(),\n // A quick interview's skipped questions are assumed rather than waited on (#2129).\n assumeInterviewAnswers: (request) => this.assumeInterviewAnswers(request),\n // An iteration waits at its top while the dev supervisor holds a restart, so the restart kills nothing (#3204); waiting\n // on its lanes, which are runs counted themselves, it is paused.\n awaitRestartWindow: () => this.awaitRestartWindow(),\n whilePaused: (work) => companionRestartDrain.whilePaused(work),\n // Lanes of one iteration call this CONCURRENTLY. Safe because admitted lanes are output-disjoint\n // by construction and the write register records per run — where \"output\" is a lane's TRANSITIVE\n // write scope (`resolvePlaybookWriteScope`), so a composite lane is judged by what its children\n // land rather than by its own empty `outputs[]`. This comment said \"each lands different family\n // files\" while a composite lands none of its own, which read as a proof and was the claim that\n // made the hole invisible.\n // A failed lane's inherited rounds, read from what it threw (#1507), and counted for the loop's own record.\n inheritedRoundsOfFailure: (reason) => {\n const rounds = typeof reason === 'object' && reason !== null ? this.inheritedRoundsByFailure.get(reason) : undefined;\n if (rounds !== undefined) lanesInherited.rounds += rounds;\n return rounds;\n },\n runPlaybook: async (lane) => {\n const result = await this.runPlaybook({\n playbookRef: lane.playbookRef,\n // #1423 — the selector's reason for THIS lane reaches the run it explains. It was written\n // per lane and read only by the returned step until now.\n selectionRationale: lane.rationale,\n ...(input.session ? { session: input.session } : {}),\n });\n // The composite foundation executor lands no family files; its deliverable is the\n // composed application. (The loop cannot select it today — it requires the tenancy\n // elicitation answer, which only an explicit run carries — but the type union reaches\n // here, and an empty landed set is its truthful projection.)\n // Neither the composite executor nor a suspension lands a family file. A suspension cannot\n // occur here today (the loop supplies no clarification answers, and an unanswerable question\n // would stall it), but the union reaches this point and an empty set is its truthful\n // projection — the loop's own eligibility gate decides what to do next either way.\n // An ASSESSMENT lands nothing either — its deliverable is the verdict, and the loop's\n // eligibility gate reads artifacts rather than verdicts, so an empty set is truthful.\n // A DISPATCH run lands application CODE in the workspace, never a family file — and unlike\n // the three cases above, the loop CAN reach it: `bottom_up.build-dispatch` becomes eligible\n // the moment a build-plan exists. An empty landed set is truthful here for a different\n // reason than theirs: not \"nothing happened\", but \"what happened is not a family landing\",\n // and the loop's eligibility gate reads families. Its progress is visible through\n // `resolveBuildExecutionProgress`, which counts landed TASKS.\n // `verified` joins them for the same reason: a DETERMINISTIC_CLI run answers a question about\n // the built application and lands no family, so an empty landed set is truthful.\n // A composite lane that resumed carries the rounds it inherited, so the loop step reads as a floor (#1507).\n if ('choreographed' in result) {\n lanesInherited.rounds += result.inheritedRounds;\n return { landed: [...result.landed], ...(result.inheritedRounds > 0 ? { inheritedRounds: result.inheritedRounds } : {}) };\n }\n if ('scenarios' in result || 'status' in result || 'assessed' in result || 'dispatched' in result\n || 'verified' in result) return { landed: [] };\n // A STAFFING run lands charter modules through the persona accept step; it reports their paths itself.\n if ('staffed' in result) return { landed: [...result.landed] };\n return { landed: result.landed.map((entry) => entry.packageRelativePath) };\n },\n model: this.buildGenerationPort(),\n /*\n * A lost network or a wake that aborted a model call is the ENVIRONMENT's, never the loop's (#3235): the loop\n * waits for its model provider to answer again and asks the same iteration once more, or stops INTERRUPTED (a\n * relaunch over the same tree resumes it). Before this, its own selection call settled the loop `failed`.\n */\n isEnvironmentalFailure: isEnvironmentalPlaybookFailure,\n // A playbook the running build wave alone holds back asks it to yield (#3884), instead of waiting for its cap.\n requestBuildWaveYield: (because) => this.buildDispatch.requestBuildWaveYield(because),\n awaitEnvironmentRecovery: (reason) => awaitModelProviderRecovery(reason, {\n log: (message, context) => this.logDebug(message, context),\n }),\n // A provider account with no credits, or at a limit (#3204): the loop stops at once and says which account, since\n // only a person brings the credits back and every later call would be refused identically.\n readProviderAccountRefusal: readPlaybookFailureProviderAccountRefusal,\n // The selection and every lane measured, so the loop's row records its spend per step (#1507).\n meter: this.spendMeter,\n maximumIterations: input.maximumIterations,\n ...(input.maximumLanesPerIteration !== undefined ? { maximumLanesPerIteration: input.maximumLanesPerIteration } : {}),\n ...(input.session ? { trace: this.buildTrace(input.session, 'playbook-loop') } : {}),\n });\n }\n\n /**\n * Judge SUPPLIED artifact values against a playbook's compiled evaluation treatment — the judge\n * value-eval door (OC-16, Gate-4-shaped). Nothing is generated and nothing lands: the caller hands\n * the artifact values (each schema-validated against its family first, so the eval measures the\n * JUDGE and never the schema), and gets the same advisory verdict envelope a run would. Testability\n * is part of the mechanism (Paul, 2026-08-24); this is the judge's dry bench.\n */\n public async judgeArtifacts(input: {\n readonly playbookRef: string;\n readonly artifacts: ReadonlyArray<{ readonly family: string; readonly value: unknown }>;\n readonly creatorBrief?: string;\n readonly elicitationAnswers?: readonly PlaybookElicitationAnswer[];\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<PlaybookJudgeResult & { readonly validation: ReadonlyArray<{ family: string; schemaValid: boolean; validatorFindings: readonly string[] }> }> {\n const hydrated = getFrameworkKnowledgePlaybook(input.playbookRef);\n if (!hydrated) throw new UnknownPlaybookError(`No compiled playbook is registered under \"${input.playbookRef}\".`);\n if (!hydrated.evaluationTreatment) {\n return { judged: false, skipped: 'This playbook carries no compiled evaluation treatment.', validation: [] };\n }\n const treatment = MetaWorkflow_EvaluationTreatmentDefinitionSchema.safeParse(hydrated.evaluationTreatment.value);\n if (!treatment.success) {\n return { judged: false, skipped: `Compiled evaluation treatment does not satisfy its contract: ${treatment.error.issues[0]?.message ?? 'unknown issue'}`, validation: [] };\n }\n\n // Deterministic baseline FIRST, per artifact: what schema + `_core` validation already answer. The\n // comparative framing (the judge must add value BEYOND this) is only measurable when both columns\n // come from the same call.\n const validation = input.artifacts.map((artifact) => {\n const binding = STANDARD_APPLICATION_SPECIFICATION_SEMANTIC_AUTHORITY.getByFamily(artifact.family);\n if (!binding) return { family: artifact.family, schemaValid: false, validatorFindings: [`no semantic binding owns family \"${artifact.family}\"`] };\n const verdict = binding.validate(artifact.value);\n return {\n family: artifact.family,\n schemaValid: verdict.validation === JourneyArtifactValidationState.VALID,\n validatorFindings: verdict.errorDetails.slice(0, 10),\n };\n });\n\n /*\n * The same evidence a run's judge reads (#964 step 2), from the application as it stands now. A bench\n * that judged without it would measure a blinder judge than the one that runs after landing, and a\n * grounding criterion would answer from the supplied artifact alone. Best-effort: a playbook or state\n * that cannot be read leaves the evidence out, and the verdict says what it could not decide.\n */\n let judgeEvidence: { acceptedInputs: readonly string[]; derivedContext: readonly string[] } | undefined;\n const parsedPlaybook = MetaWorkflowPlaybookSchema.safeParse(hydrated.playbook);\n if (parsedPlaybook.success) {\n try {\n judgeEvidence = await this.composeGenerationJudgeEvidence(\n parsedPlaybook.data,\n await this.readArtifactState(),\n input.artifacts.map((artifact) => artifact.family),\n // The bench judges SUPPLIED artifacts, so the supplied ones decide which documents' guards it\n // sees. Reading disk here judged whatever the application happened to hold instead.\n input.artifacts,\n );\n } catch (error) {\n this.logDebug('Judge bench: application evidence unavailable (judged without it)', { error: String(error) });\n }\n }\n\n // Screened as a run's judge screens what it reads (#2938), so the bench measures the judge that actually runs.\n const landed = await this.screenLandedValuesForJudge(input.playbookRef, await this.readArtifactState().catch(() => undefined), input.artifacts);\n const judge = await runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed,\n ...(judgeEvidence && judgeEvidence.acceptedInputs.length > 0 ? { acceptedInputs: judgeEvidence.acceptedInputs } : {}),\n ...(judgeEvidence && judgeEvidence.derivedContext.length > 0 ? { derivedContext: judgeEvidence.derivedContext } : {}),\n ...(input.creatorBrief || input.elicitationAnswers?.length\n ? {\n creatorInput: {\n ...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),\n ...(input.elicitationAnswers?.length ? { elicitationAnswers: input.elicitationAnswers } : {}),\n },\n }\n : {}),\n model: this.buildGenerationPort(),\n ...(input.session ? { trace: this.buildTrace(input.session, `playbook-judge-eval-${input.playbookRef}`) } : {}),\n });\n return { ...judge, validation };\n }\n\n /**\n * Derive and accept a charter for every convened role the application has not committed yet, and derive again every\n * committed charter older than one of its shaping inputs that a person has not edited (#2819).\n *\n * The roster is DERIVED: every `method.deliberation` in the compiled catalog, plus the logo step's own\n * panel (a generation step is not a playbook declaration, so the companion supplies it). A role's\n * derivability is decided from the families its template's shaping inputs read, through\n * `EXPERT_SHAPING_INPUT_FAMILY` (runtime, shared with the eligibility board since #2462), so the run never asks the derivation agent for a brief it cannot compose.\n * Roles run SEQUENTIALLY: each derivation is an agentic three-pass protocol (~200 s measured), and the\n * accept step serializes itself on the aggregator anyway.\n */\n private async staffExpertPanels(input: {\n readonly artifactState: PlaybookArtifactState;\n readonly dryRun?: true;\n /** The run this staffing belongs to, so its landed charters are recorded like any landing. */\n readonly run: {\n readonly runId: string;\n readonly startedAt: string;\n readonly playbookVersion: string;\n readonly traceSessionId?: string;\n };\n }): Promise<ExpertPersonasExecutionResult> {\n const catalog = await this.readParsedCatalog();\n /*\n * Only the panels this application's line convenes (#1605): an internal tool runs no brand identity,\n * so it seats no art director, brand strategist or copy chief, and staffing them would spend a\n * derivation on roles nothing will ever convene.\n */\n const lineScope = input.artifactState.applicationLine;\n const roster = collectConvenedExpertRoles({\n playbooks: lineScope ? catalog.filter((playbook) => lineScope.admittedPlaybookRefs.has(playbook.ref)) : catalog,\n additionalConveners: hostExpertConveners(lineScope),\n });\n const committed = new Set(committedCharterRoleRefs(input.artifactState.artifactsByFamily.get(ApplicationSpecificationFamily.EXPERT_PERSONAS)));\n /*\n * Charters older than an input are derived again (#2819); one a person edited is named and left alone. The drift is\n * the same assessment the board read, carried on the artifact state, so the run derives what the board offered.\n */\n const rosterRoles = new Set(roster.map((entry) => entry.roleRef));\n const drift = (input.artifactState.expertCharterDrift ?? []).filter((entry) => rosterRoles.has(entry.roleRef));\n const rederive = rederivableExpertRoleRefs(drift);\n const describeDrift = (entry: (typeof drift)[number]) => ({ roleRef: entry.roleRef, changedInputs: entry.changedInputs.map(({ kind }) => kind) });\n const driftedEdited = drift.filter((entry) => entry.authored).map(describeDrift);\n const editedDrifted = new Set(driftedEdited.map((entry) => entry.roleRef));\n // Committed AND current: a drifted role is reported as re-derived or as edited, never also here.\n const alreadyCommitted = roster.map((entry) => entry.roleRef).filter((roleRef) => committed.has(roleRef) && !rederive.has(roleRef) && !editedDrifted.has(roleRef));\n /*\n * The same partition the eligibility board uses for this step's standing (#2462), so the board never offers a run\n * that would derive nothing, nor withholds one that would. A family that does not apply to the line is not waited\n * for (#1604); a present-but-unreadable family counts as missing, because the derivation reads its VALUE.\n */\n const partition = partitionUnstaffedExpertRoles({\n roster,\n charters: input.artifactState.artifactsByFamily.get(ApplicationSpecificationFamily.EXPERT_PERSONAS),\n familyReadable: (family) => {\n const value = input.artifactState.artifactsByFamily.get(family);\n return value !== undefined && value !== null && value !== FILE_PRESENT_WITHOUT_VALUE;\n },\n familyNotApplicable: (family) => isFamilyNotApplicable(input.artifactState.applicationLine, family),\n rederive,\n });\n const waiting: ExpertPersonasExecutionResult['waiting'][number][] = partition.waiting.map((entry) => ({ roleRef: entry.roleRef, missingFamilies: [...entry.missingFamilies] }));\n const derivable: string[] = [...partition.staffable];\n const derived: ExpertPersonasExecutionResult['derived'][number][] = [];\n const refused: ExpertPersonasExecutionResult['refused'][number][] = [];\n const landed = new Set<string>();\n /*\n * What this run changed, per file, for the write register (#2421 #2422 #2419): each accept reports its exact\n * writes, and a file several roles touched (the aggregator, the wiring) keeps its FIRST pre-image and its LAST\n * written bytes, which is what the run as a whole changed.\n */\n const writesByPath = new Map<string, { previousContent?: string; writtenContent: string }>();\n let recorded = false;\n if (input.dryRun !== true) {\n /*\n * DERIVED together, ACCEPTED one at a time (#3204). A role's derivation reads the shaping families and writes only\n * its own staging file, never another role's charter, so the derivations (two or three model calls each) can run\n * together; each accept writes files every role shares (the aggregator, the wiring), so the accepts stay in roster\n * order. One after another, the derivations made this step 14 minutes of the reference run's planning.\n *\n * The FIRST role derives alone, and the others start only once it has answered with something other than a fault\n * of the application's own (an account refusal, a lost network, a held specification fault): that fault is thrown\n * at the first role below, and no other role is asked of the provider or paid for. Each outcome is held as a value,\n * so a refusal surfaces at its role's turn and none goes unhandled.\n */\n const settle = (roleRef: string) => this.expertPersonas.derive({ roleRef }).then((proposal) => ({ proposal }), (error: unknown) => ({ error }));\n const [firstRoleRef, ...laterRoleRefs] = derivable;\n const firstDerivation = firstRoleRef === undefined ? undefined : settle(firstRoleRef);\n const laterDerivations = (firstDerivation ?? Promise.resolve(undefined)).then((first) => {\n const stopsTheRun = first !== undefined && 'error' in first\n && (isEnvironmentalPlaybookFailure(first.error) || heldOnAFault(EXPERT_PERSONAS_PLAYBOOK_REF, first.error) !== first.error);\n return new Map(stopsTheRun ? [] : laterRoleRefs.map((roleRef) => [roleRef, settle(roleRef)] as const));\n });\n try {\n for (const roleRef of derivable) {\n /*\n * IN FLIGHT from the accept's first write until its writes are on record (#3221): the charters, the aggregator\n * and the wiring are written role by role with a model call between, so the run's record is written after EACH\n * accept rather than once at the end, and the window spans only the seconds of one accept, never a derivation.\n */\n let landingWindow: PlaybookRunLandingWindow | undefined;\n try {\n const derivation = roleRef === firstRoleRef ? await firstDerivation! : await (await laterDerivations).get(roleRef);\n // Not started only when the first role's fault stops the run, which is thrown at the first role.\n if (derivation === undefined) throw new Error(`The derivation of ${roleRef} was not started.`);\n if ('error' in derivation) throw derivation.error;\n const { proposal } = derivation;\n /*\n * Named BEFORE the accept writes (#3237 review F1, M3): the role's charter, the aggregator and both wiring\n * files, which are all an accept can write; the record follows each accept at once.\n */\n landingWindow = await this.openLandingInFlight(input.run.runId, EXPERT_PERSONAS_PLAYBOOK_REF, this.expertPersonas.describeAcceptWriteTargets(roleRef));\n const accepted = await this.expertPersonas.accept({ roleRef });\n derived.push({\n roleRef,\n charterModulePath: accepted.charterModulePath,\n passes: proposal.qualityReport.passes,\n critiqueVerdict: String(proposal.qualityReport.critique.verdict),\n });\n landed.add(accepted.charterModulePath);\n landed.add(accepted.aggregatorModulePath);\n for (const path of accepted.wiredPaths ?? []) landed.add(path);\n for (const write of accepted.writes ?? []) {\n const first = writesByPath.get(write.path);\n writesByPath.set(write.path, {\n ...(first ? (first.previousContent !== undefined ? { previousContent: first.previousContent } : {}) : (write.previousContent !== undefined ? { previousContent: write.previousContent } : {})),\n writtenContent: write.writtenContent,\n });\n }\n if (writesByPath.size > 0) recorded = await this.recordExpertPersonaLanding({ run: input.run, writes: writesByPath }) || recorded;\n } catch (error) {\n // One role's refusal must not cost the others their charter: record it, keep going (unless it is environmental, below).\n refused.push({ roleRef, reason: describeCaughtError(error) });\n this.logDebug('expert-persona staffing: role refused', { roleRef, reason: String(error) });\n // Every role would meet the same fault, and it is the application's state rather than this role's (#3258).\n const held = heldOnAFault(EXPERT_PERSONAS_PLAYBOOK_REF, error);\n if (held !== error) throw held;\n /*\n * An accept that threw AFTER writing (the charter written, then regenerating the aggregator from the personas\n * directory failed to read or write it) leaves files in the tree (#3237 review M3, F1). A wiring refusal is not\n * that case: the accept turns it into a warning and completes. What its named paths changed is recorded as a\n * FAILED landing of its own, under the run's id and the role, through the same guarded window record every\n * landing uses: a path a coding run has evidence of writing, or claims in flight, stays out, and the posture\n * never accepts a failed record, so a coding run's barrel edit in the same seconds is never committed under the\n * staffing run. The run's other accepts keep their completed record, and the next one adopts the charter this\n * left (review A). The role stays refused.\n */\n if (landingWindow !== undefined) {\n await this.writeRegister.recordWindowLanding({\n window: landingWindow,\n run: { startedAt: input.run.startedAt, playbookVersion: input.run.playbookVersion, ...(input.run.traceSessionId ? { traceSessionId: input.run.traceSessionId } : {}) },\n declaredWrites: landingWindow.declaredPaths(),\n landingFailed: true,\n recordRunId: `${input.run.runId}.${roleRef}`,\n }).catch((recordError: unknown) => this.logDebug('A failed staffing accept\\'s writes could not be recorded', { roleRef, error: String(recordError) }));\n }\n /*\n * An ENVIRONMENTAL fault is the application's state too (#3204): a model provider account out of credits or at\n * a limit, or a lost network. The next role's derivation calls the same provider, so it is thrown, after any\n * writes it left are recorded above: the run fails as interrupted, and the lane, the loop and the drive stop on\n * it. Charters accepted earlier in the run keep their record. Recorded as a refusal instead, it settled the run\n * `ok` with nothing landed: on reference run 42120979649 every derivation met \"Your credit balance is too low to\n * access the Anthropic API\" from 00:18 UTC, and `bottom_up.conception` re-ran the staffing twelve times over one\n * state while the placement plan waited on the charters it would have refreshed.\n */\n if (isEnvironmentalPlaybookFailure(error)) throw error;\n } finally {\n await landingWindow?.release();\n }\n }\n } finally {\n /*\n * Every derivation this run started has settled before the run ends, however it ends (#3204 review): one left\n * running after a later role's fault could write its staging file once the run has failed, and a re-run's accept\n * would then read that file instead of its own derivation. Each outcome is a value, so this never throws.\n */\n await Promise.all([firstDerivation, laterDerivations.then((later) => Promise.all(later.values()))]);\n }\n }\n // Attempted roles and staffed none: a failure, not a run that settled with nothing to show (#3204).\n if (input.dryRun !== true && derivable.length > 0 && derived.length === 0) throw new ExpertPersonasStaffingRefusedError(refused);\n /*\n * What was ACTUALLY derived again, not what drifted: a drifted role still waiting on a family, or refused, is\n * reported there, and only a derivation that landed is \"derived again\".\n */\n const derivedRoleRefs = new Set(derived.map((entry) => entry.roleRef));\n const rederived = drift.filter((entry) => rederive.has(entry.roleRef) && derivedRoleRefs.has(entry.roleRef)).map(describeDrift);\n return {\n playbookRef: EXPERT_PERSONAS_PLAYBOOK_REF,\n staffed: true,\n ...(input.dryRun === true ? { dryRun: true as const } : {}),\n roster,\n alreadyCommitted,\n ...(rederived.length > 0 ? { rederived } : {}),\n ...(driftedEdited.length > 0 ? { driftedEdited } : {}),\n derived,\n waiting,\n refused,\n landed: [...landed],\n ...(recorded ? { runId: input.run.runId } : {}),\n accepted: false,\n };\n }\n\n /**\n * The ONE door a deterministic executor run lands through (#3237): it opens the run's landing WINDOW before the\n * executor writes anything, and records what changed in the tree when it returns, so every executor branch, and\n * one added later, has a write record without assembling it by hand.\n *\n * Before this, `bottom_up.foundation`, `bottom_up.capability-composition` and the maturity reading returned straight\n * from their executors and nothing recorded them (app-creation-test-007, F8a/F24): `wildo creation diff` answered\n * `400 No write record`, their edits of `companion-exports.ts` and the barrels refused five later accepts as\n * `edited_since_the_run`, and with no landing on record the loop offered them as FIRST RUN every round, each\n * re-landing of the composition reopening the paid plans that read it.\n *\n * - The window marks the landing IN FLIGHT (#3221): a coding door asked while it writes withholds what it may have\n * written, and the record takes over once it exists.\n * - A run that changed nothing is dated by a no-change landing: landed for the board, and no input of anyone moved.\n * - The record holds what the executor DECLARES it wrote (#3237 review): what it reports on its result, and what it\n * named as it wrote (`noteWrite`), which is all a run that failed part-way can say. Every other change the window\n * sees, a coding agent's in the same seconds above all, is somebody else's and stays out.\n * - A run that FAILED after writing has its writes recorded with `landingFailed`, then the failure is rethrown. The\n * posture's automatic accept leaves such a record for a person.\n * - Best effort, like every register write: a window that cannot be opened or recorded costs the record, logged,\n * never the run. The files are on disk and git shows them.\n * - A dry run writes nothing and opens no window.\n */\n private async landDeterministicExecutorRun<T>(input: {\n readonly runId: string;\n readonly playbookRef: string;\n readonly startedAt: string;\n readonly playbookVersion: string;\n readonly traceSessionId?: string;\n readonly dryRun: boolean;\n /** The executor reads the application's code itself (the maturity reading): its landing is dated by the code (#3237 review H1). */\n readonly readsApplicationCode?: boolean;\n /**\n * The app-relative paths the executor reports it wrote, read off its result. Required (#3237 review): the window\n * sees a coding agent's write in the same seconds too, and only the executor can say which changes are its own.\n */\n readonly declaredWrites: (result: T) => readonly string[];\n /** Files and directories the executor still composes without rewriting them; see `recordWindowLanding`'s `composes`. */\n readonly composes?: (result: T) => readonly string[];\n /**\n * Runs the executor. `noteWrite` takes each path just before (or, for a configuration edit, as) it is written: it\n * marks the path in flight (#3237 review F1) and is all a FAILED run can declare. `noteMayWrite` takes a path a step\n * may write, before the step runs: it marks the path in flight and declares nothing for the record (review M3).\n */\n readonly execute: (\n noteWrite: (applicationRelativePath: string) => void,\n noteMayWrite: (applicationRelativePath: string) => void,\n ) => Promise<T>;\n }): Promise<T> {\n const noted = new Set<string>();\n let window: PlaybookRunLandingWindow | undefined;\n const noteWrite = (applicationRelativePath: string): void => {\n noted.add(applicationRelativePath);\n window?.declare([applicationRelativePath]);\n };\n const noteMayWrite = (applicationRelativePath: string): void => { window?.declare([applicationRelativePath]); };\n if (input.dryRun) return input.execute(noteWrite, noteMayWrite);\n try {\n window = await this.writeRegister.openLandingWindow({ runId: input.runId, playbookRef: input.playbookRef, keepContent: true });\n } catch (error) {\n this.logger.warn(`The landing window of ${input.playbookRef} (run ${input.runId}) could not be opened; its writes will have no record: ${describeCaughtError(error)}`);\n }\n const run = {\n startedAt: input.startedAt,\n playbookVersion: input.playbookVersion,\n ...(input.traceSessionId ? { traceSessionId: input.traceSessionId } : {}),\n ...(input.readsApplicationCode === true ? { readsApplicationCode: true } : {}),\n };\n let result: T;\n try {\n result = await input.execute(noteWrite, noteMayWrite);\n } catch (caught) {\n // A refusal on a failing module says the same thing here as at a landing, so the lane reads it the same way (#3258).\n const error = heldOnAFault(input.playbookRef, caught);\n if (window) {\n await this.writeRegister.recordWindowLanding({ window, run, declaredWrites: [...noted], landingFailed: true }).catch((recordError: unknown) => {\n this.logger.warn(`${input.playbookRef} (run ${input.runId}) failed after writing, and its writes could not be recorded: ${describeCaughtError(recordError)}`);\n });\n }\n throw error;\n }\n if (window) {\n const landedWindow = window;\n // Best effort to the end: a result that cannot say what it wrote costs the record, never the run.\n await Promise.resolve()\n .then(() => this.writeRegister.recordWindowLanding({\n window: landedWindow,\n run,\n declaredWrites: [...new Set([...noted, ...input.declaredWrites(result)])],\n ...(input.composes ? { composes: input.composes(result) } : {}),\n }))\n .catch(async (error: unknown) => {\n // `recordWindowLanding` releases its window itself; a throw before it was reached must release it here.\n await landedWindow.release();\n this.logger.warn(`${input.playbookRef} (run ${input.runId}) landed, but its write record failed; accept or commit its files by hand: ${describeCaughtError(error)}`);\n });\n }\n return result;\n }\n\n /**\n * Mark a landing that records its own files IN FLIGHT (#3221): a window holding the bytes of the specifications\n * package (review F5), opened just before the first write and released once the writes are on record. Best effort:\n * a mark that cannot be written costs the in-flight protection, logged, never the landing.\n */\n private async openLandingInFlight(runId: string, playbookRef: string, declaredPaths: readonly string[]): Promise<PlaybookRunLandingWindow | undefined> {\n try {\n /*\n * With the bytes (#3237 review M1, M3): a landing that throws after its first write (a validation refusal, a\n * diagram or decision write, a wiring refusal, a staffing accept) records what its declared paths changed, with\n * their pre-images, from this window, whatever threw.\n */\n // Bytes held only for the specifications package, the one tree a generation or staffing landing writes (review F5).\n const packageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n const specificationsRoot = packageRoot === undefined ? '' : path.relative(this.companionContext.saasRoot, packageRoot).split(path.sep).join('/');\n return await this.writeRegister.openLandingWindow({\n runId,\n playbookRef,\n keepContent: true,\n keepContentOf: (applicationRelativePath) => specificationsRoot === '' || applicationRelativePath.startsWith(`${specificationsRoot}/`),\n declaredPaths,\n });\n } catch (error) {\n this.logger.warn(`The landing of run ${runId} could not be marked in flight: ${describeCaughtError(error)}`);\n return undefined;\n }\n }\n\n /** Specifications-package-relative paths as the register keys them: application-root-relative, POSIX. */\n private toApplicationRelativeSpecificationPaths(packageRelativePaths: readonly string[]): readonly string[] {\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) return packageRelativePaths;\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot).split(path.sep).join('/');\n return packageRelativePaths.map((relative) => path.posix.join(specificationsRelativeRoot, relative));\n }\n\n /**\n * Record a staffing run's writes in the playbook-run write register, like any landing (#2421 #2422 #2419).\n *\n * Before this, staffing returned before the register's only write: its charters were in no run's record, so\n * `wildo creation accept` and the posture's automatic commit never carried them (they reached git by hand on\n * app-creation-test-005), and the board had no landing to date the step by, so it could neither report it on\n * record nor see that a family a waiting role needed had landed since. A record that fails to write costs the\n * handle, never the staffing: the charters are on disk and the run says what it did.\n */\n private async recordExpertPersonaLanding(input: {\n readonly run: { readonly runId: string; readonly startedAt: string; readonly playbookVersion: string; readonly traceSessionId?: string };\n readonly writes: ReadonlyMap<string, { readonly previousContent?: string; readonly writtenContent: string }>;\n }): Promise<boolean> {\n const files = [...input.writes]\n .filter(([, write]) => write.writtenContent.length > 0 && write.writtenContent !== write.previousContent)\n .sort(([left], [right]) => left.localeCompare(right))\n .map(([relativePath, write]) => ({\n path: relativePath,\n existedBefore: write.previousContent !== undefined,\n ...(write.previousContent !== undefined ? { previousContent: write.previousContent } : {}),\n writtenContent: write.writtenContent,\n }));\n if (files.length === 0) return false;\n try {\n /*\n * With adoption (#3237 review A): an earlier accept that threw after writing its charter left it in a failed\n * record, and this accept's aggregator, rebuilt from the personas directory, imports it. Adopting the failed\n * record's files under that directory (still holding their bytes) puts the charter in the same record as the\n * aggregator that imports it, so the posture never commits an import of an uncommitted file.\n */\n await this.writeRegister.recordAdoptingFailedLandings({\n runId: input.run.runId,\n playbookRef: EXPERT_PERSONAS_PLAYBOOK_REF,\n ...(input.run.traceSessionId ? { traceSessionId: input.run.traceSessionId } : {}),\n startedAt: input.run.startedAt,\n playbookVersion: input.run.playbookVersion,\n at: new Date().toISOString(),\n files,\n }, { composes: [this.expertPersonas.describePersonasDirectory()] });\n return true;\n } catch (error) {\n this.logger.warn(`Expert staffing landed ${files.length} file(s) but its write record failed; accept or commit them by hand: ${describeCaughtError(error)}`);\n return false;\n }\n }\n\n /** Every catalog entry that satisfies its own contract. A malformed one is skipped, never fatal. */\n private async readParsedCatalog(): Promise<MetaWorkflowPlaybook[]> {\n const playbooks: MetaWorkflowPlaybook[] = [];\n for (const entry of listFrameworkKnowledgePlaybooks()) {\n const hydrated = getFrameworkKnowledgePlaybook(entry.ref);\n if (!hydrated) continue;\n const parsed = MetaWorkflowPlaybookSchema.safeParse(hydrated.playbook);\n if (parsed.success) playbooks.push(parsed.data);\n else this.logDebug('Skipping playbook that fails its own contract', { ref: entry.ref });\n }\n return playbooks;\n }\n\n /**\n * Continue a run that suspended at a clarification, with the creator's decision.\n *\n * ## Why the checkpoint, and not a held-open request\n *\n * A suspension can outlive its HTTP request — a creator answers when they get to it, not inside a\n * socket timeout — so the run's inputs are saved as a checkpoint on its own execution row (the\n * engine's suspended actor execution, read back by `readSuspensionCheckpoint`) and the request\n * returns. This is the\n * shape LangGraph gives `interrupt()` (a checkpointer plus `Command(resume=…)`), Step Functions\n * gives `waitForTaskToken`, and Temporal gives signals: the wait is DURABLE state, never a blocked\n * thread.\n *\n * ## Why the whole run re-executes rather than resuming mid-flight\n *\n * Same reason LangGraph re-executes the interrupted node: there is no portable way to freeze a\n * function's stack. The precondition that makes re-execution safe is that the interrupt sits\n * BEFORE anything is produced — no model call was spent, no file was written — so replaying costs\n * a brief composition and nothing is done twice.\n *\n * ## The three actions, from MCP's elicitation vocabulary\n *\n * `ACCEPT` carries answers. `DECLINE` means \"decide it yourself and say what you assumed\" — the run\n * proceeds with no further questions. `CANCEL` abandons it: the engine moves the waiting execution\n * to `CANCELLED` (`cancelSuspendedActorExecution`), so nothing runs and the round can no longer be\n * answered. The three are distinct on purpose — a decline is a delegation, a cancel is a withdrawal,\n * and collapsing them would make \"I do not want to answer\" indistinguishable from \"stop\".\n */\n public async resumePlaybookRun(input: {\n readonly runId: string;\n /**\n * The ROUND the answer, decline or cancel was read against — required (#1584). A run asks again\n * after an answer under the same run id, so without it the call would act on whichever round waits\n * when it lands. Refused 409 when the run has moved on; the engine then holds the resume to the\n * suspension that was read, so a round asked in between is refused too.\n */\n readonly round: number;\n readonly action: MetaWorkflow_ClarificationAction;\n readonly answers?: readonly PlaybookClarificationAnswer[];\n /**\n * Who answers (#1658) — stamped on every answer in THIS round, and so into the committed\n * `DECISIONS.md` beside what the run lands. An answer that already carries its own author keeps it.\n */\n readonly answeredByRef?: string;\n /**\n * The signed-in person settling the question (#1751), when the door has one. Handed to the engine as\n * the decision's actor: a question routed to its run's starter is settled only by them, and refused\n * NOT_FOUND otherwise, before anything moves. The local console has no person, so it can settle only\n * an unrouted question — one whose run was started from the console too.\n */\n readonly actingUserId?: string;\n readonly session?: CompanionExecutionSessionContext;\n /** May turn a normal continuation into a preview; cannot promote a preview into writes. */\n readonly dryRun?: boolean;\n }): Promise<\n | { status: Workbench_PlaybookRunOutcomeStatus.CANCELLED; runId: string; playbookRef: string }\n | Awaited<ReturnType<PlaybookRunCompanionService['runPlaybook']>>\n > {\n /*\n * READ before anything moves (#1360): the wait is on the run's own execution row, and an answer\n * that does not satisfy the questions must leave it exactly as it was — still waiting, still\n * answerable. So the checkpoint is read and the answers validated first, and only then does the\n * engine move the rows and continue the run UNDER THE SAME ID.\n */\n const { checkpoint, suspensionRef } = await this.readSuspensionCheckpoint(input.runId, input.session);\n /*\n * WHO first, before anything that describes the question (#1751 review F4, N1). The round in a\n * superseded refusal and the refs and options in a validation refusal describe it, so the ENGINE is\n * asked first whether this person may settle it: the same authorization a settle runs, recording a\n * refused attempt, and refusing it as it refuses an unknown run. Such a person's REFUSAL therefore\n * says nothing about the question. (The listings still show a waiting question to every viewer of\n * the board; this governs refusals only.) The engine decides again when the rows move.\n */\n await this.actorsSystem.authorizeSuspendedActorDecision(\n input.runId,\n input.actingUserId ? { actor: humanDecisionSettler(input.actingUserId) } : undefined,\n input.session,\n ).catch(() => { throw new SuspendedPlaybookRunNotFoundError(input.runId); });\n if (checkpoint.round !== input.round) throw new SupersededPlaybookRunQuestionError(input.runId, input.round, checkpoint.round);\n if (input.action === MetaWorkflow_ClarificationAction.CANCEL) {\n // Held to the round that was read, like a resume: a round asked since is refused, never withdrawn (#1584).\n await this.actorsSystem.cancelSuspendedActorExecution(input.runId, input.session, {\n expectedSuspensionRef: suspensionRef,\n // Who withdraws it (#1751): the engine refuses a routed question's withdrawal by anybody else.\n ...(input.actingUserId ? { decision: { actor: humanDecisionSettler(input.actingUserId) } } : {}),\n })\n .catch(async (error: unknown) => { throw await this.explainLateDecision(error, input); });\n return { status: Workbench_PlaybookRunOutcomeStatus.CANCELLED as const, runId: input.runId, playbookRef: checkpoint.playbookRef };\n }\n /*\n * ACCEPT answers the whole round; DECLINE may carry the answers the creator DID give and delegates the\n * rest (#1658) — both validated by the same owner, so a partial decline cannot smuggle an answer the\n * round never asked or a choice outside its options.\n */\n const answers: readonly PlaybookClarificationAnswer[] = input.action === MetaWorkflow_ClarificationAction.ACCEPT\n || (input.action === MetaWorkflow_ClarificationAction.DECLINE && (input.answers?.length ?? 0) > 0)\n ? validateClarificationAnswers({\n requests: checkpoint.requests,\n priorAnswers: checkpoint.priorAnswers,\n answers: (input.answers ?? []).map((answer) => (input.answeredByRef && !answer.answeredByRef ? { ...answer, answeredByRef: input.answeredByRef } : answer)),\n requireEveryQuestion: input.action === MetaWorkflow_ClarificationAction.ACCEPT,\n })\n : checkpoint.priorAnswers;\n /*\n * The leg that ran BEFORE the question (#1507). The engine replaces the task output when the\n * continuation settles, so the run's record would otherwise report only the continuation's spend.\n * Read from the waiting row; a row without one (written before #1507, or unreadable) is an\n * unobserved leg, never a free one.\n */\n const waitingRow = await Promise.resolve()\n .then(() => this.executions.getActorExecution(input.runId, input.session) as Promise<{\n readonly standaloneTasks?: ReadonlyArray<{ readonly output?: unknown }>;\n readonly checkpoint?: { readonly interruptedContinuations?: unknown } | null;\n }>)\n .catch(() => undefined);\n const waitingOutput = waitingRow?.standaloneTasks?.[0]?.output;\n const recordedLeg = readPlaybookRunMeasurement(waitingOutput);\n /*\n * Continuations of this question that DIED WITH THEIR PROCESS (the engine counts them on the\n * checkpoint when its startup sweep puts the run back to waiting): whatever they spent is gone, so\n * each is an unobserved part of this run's spend, and the total reads as a floor.\n */\n const interrupted = typeof waitingRow?.checkpoint?.interruptedContinuations === 'number' ? waitingRow.checkpoint.interruptedContinuations : 0;\n const priorLeg: PlaybookRunMeasurement | undefined = interrupted > 0\n ? {\n durationMs: recordedLeg?.durationMs ?? 0,\n spend: mergePlaybookSpend([recordedLeg?.spend ?? PLAYBOOK_SPEND_NOT_OBSERVED, ...Array.from({ length: interrupted }, () => PLAYBOOK_SPEND_NOT_OBSERVED)]),\n }\n : recordedLeg;\n try {\n // Counted for the continuation's whole life, settle included: a resumed run is a run, and the\n // supervisor must hold a restart for it as for a fresh one.\n return await this.whileInFlight(() => this.actorsSystem.resumeActorExecution(\n input.runId,\n (opened) => this.executePlaybookRun({\n playbookRef: checkpoint.playbookRef,\n // The resume continues the SAME instance (#1609): its answers, its landing, its row.\n ...(checkpoint.instanceKey ? { instanceKey: checkpoint.instanceKey } : {}),\n clarification: {\n requests: checkpoint.requests,\n answers,\n action: input.action,\n round: checkpoint.round,\n },\n ...(checkpoint.creatorBrief ? { creatorBrief: checkpoint.creatorBrief } : {}),\n ...(checkpoint.selectionRationale ? { selectionRationale: checkpoint.selectionRationale } : {}),\n ...(checkpoint.elicitationAnswers.length > 0 ? { elicitationAnswers: checkpoint.elicitationAnswers } : {}),\n // The run's starter, so a question the continuation asks is routed to them again (#1751).\n ...(checkpoint.requestedByUserId ? { requestedByUserId: checkpoint.requestedByUserId } : {}),\n ...(input.session ? { session: input.session } : {}),\n dryRun: checkpoint.dryRun || input.dryRun === true,\n runId: opened.executionId,\n }, priorLeg ?? null),\n input.session,\n // A continuation that THROWS leaves the question standing, so the creator can answer again —\n // what consuming the checkpoint file only after a successful return used to guarantee. The row\n // that goes back to waiting carries what both legs spent (#1507), over the waiting record.\n {\n ...this.playbookRunOptions,\n // The suspension that was read: a round asked since then is refused before anything moves (#1584).\n expectedSuspensionRef: suspensionRef,\n /*\n * Who settles it and what they answered (#1751): checked against the question's route, and\n * recorded as the resolution on the status change whether the question was routed or not.\n */\n decision: {\n ...(input.actingUserId ? { actor: humanDecisionSettler(input.actingUserId) } : {}),\n answer: {\n decisionId: input.runId,\n optionRef: input.action,\n // This round's answers, as validated (a confirmation normalized), never an earlier round's.\n values: answers\n .filter((answer) => !checkpoint.priorAnswers.some((prior) => prior.ref === answer.ref))\n .map((answer) => ({ ref: answer.ref, value: answer.answer })),\n },\n },\n restoreSuspensionOnFailure: true,\n outputOnRestoredSuspension: (error) => {\n const measurement = this.measurementOfFailure(error, input.runId);\n if (!measurement) return null;\n // The waiting record, carried forward — rebuilt from the checkpoint when the row could not be\n // read, so the run still reads as waiting on its question AND carries what it spent. When the\n // row could not be read, its `interruptedContinuations` count was unknown here and is lost as\n // the engine clears it; the spend still reads PARTIAL for the leg that was not read.\n const waiting = typeof waitingOutput === 'object' && waitingOutput !== null\n ? waitingOutput\n : summarizePlaybookRunResult({ status: Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT, accepted: false, dryRun: checkpoint.dryRun, family: checkpoint.family, round: checkpoint.round });\n return { ...waiting, measurement };\n },\n },\n ));\n } catch (error) {\n throw await this.explainLateDecision(error, input);\n } finally {\n this.failedRunMeasurements.delete(input.runId);\n }\n }\n\n /**\n * The engine refuses a decision on a run that moved between this service's read and its own\n * (`ACTOR_EXECUTION_NOT_SUSPENDED`, #1584 review F5). Said in the terms every door already answers:\n * the run asked again (409, superseded) or is no longer waiting (404). Any other error passes unchanged.\n */\n private async explainLateDecision(error: unknown, input: { readonly runId: string; readonly round: number; readonly session?: CompanionExecutionSessionContext }): Promise<unknown> {\n if (!isActorExecutionNotSuspendedError(error)) return error;\n try {\n const { checkpoint } = await this.readSuspensionCheckpoint(input.runId, input.session);\n return checkpoint.round !== input.round\n ? new SupersededPlaybookRunQuestionError(input.runId, input.round, checkpoint.round)\n : new SuspendedPlaybookRunNotFoundError(input.runId);\n } catch {\n return new SuspendedPlaybookRunNotFoundError(input.runId);\n }\n }\n\n /**\n * The waiting run's resume inputs, parsed. \"Not waiting\" — no such row, a row that is not\n * suspended, or a checkpoint this version cannot read — is one answer to a resume, and it is 404.\n */\n private async readSuspensionCheckpoint(\n runId: string,\n session?: CompanionExecutionSessionContext,\n ): Promise<{ readonly checkpoint: PlaybookRunSuspensionCheckpoint; readonly suspensionRef: string }> {\n let waiting: Awaited<ReturnType<ActorsSystemBackendService['readSuspendedActorExecution']>>;\n try {\n waiting = await this.actorsSystem.readSuspendedActorExecution(runId, session);\n } catch {\n throw new SuspendedPlaybookRunNotFoundError(runId);\n }\n const parsed = PlaybookRunSuspensionCheckpointSchema.safeParse(waiting.row.checkpoint?.context);\n if (!parsed.success) throw new SuspendedPlaybookRunNotFoundError(runId);\n return { checkpoint: parsed.data, suspensionRef: actorExecutionSuspensionRef(waiting.suspension) };\n }\n\n /**\n * How the engine reads what a playbook run RETURNED: a run that stopped to ask registered its\n * suspension request against the result object it is about to return, and nothing else is a\n * suspension. A `WeakMap` keyed by that object rather than a field on it, because the request\n * carries the whole resume input set and the result is what the HTTP response serialises.\n */\n private readonly suspensionRequests = new WeakMap<object, ActorExecutionSuspensionRequest>();\n\n /** Each measured result's wall-clock and spend (#1507) — see `createPlaybookRunOptions`. */\n private readonly runMeasurements = new WeakMap<object, PlaybookRunMeasurement>();\n\n /** The root runs each ROOT run's settled value overlapped (#1610) — read into its row summary like its measurement. */\n private readonly runOverlaps = new WeakMap<object, readonly PlaybookRunOverlap[]>();\n\n /** A FAILED root run's overlaps by run id, for a thrown value no WeakMap can key. Cleared when the run settles. */\n private readonly failedRunOverlaps = new Map<string, readonly PlaybookRunOverlap[]>();\n\n /** A FAILED run's measurement by run id (#1507) — for a thrown value no WeakMap can key. Cleared when the run settles. */\n private readonly failedRunMeasurements = new Map<string, PlaybookRunMeasurement>();\n\n /** Iterations a composite adopted from a checkpoint, by run id (#1507) — read by `executePlaybookRun` whatever the outcome. */\n private readonly adoptedCheckpointIterations = new Map<string, number>();\n\n /**\n * The rounds a run that THREW had inherited from a checkpoint, keyed by what it threw (#1507) — so a\n * caller that sees only the rejection (the unattended loop) can still mark its figures as a floor.\n */\n private readonly inheritedRoundsByFailure = new WeakMap<object, number>();\n\n /** What a failed run spent: keyed by its thrown value when that is an object, else by its run id. */\n private measurementOfFailure(error: unknown, runId: string | undefined): PlaybookRunMeasurement | undefined {\n const byValue = typeof error === 'object' && error !== null ? this.runMeasurements.get(error) : undefined;\n return byValue ?? (runId !== undefined ? this.failedRunMeasurements.get(runId) : undefined);\n }\n\n /**\n * Build-plan runs whose read of the tasks already built FAILED (#3449, R10), by run id, with why: the re-decompose ran\n * unheld. Written onto the run's own row by {@link playbookRunOptionsFor} however the run ends, then forgotten.\n *\n * Created on first use rather than as a field initialiser: test harnesses build this service without running field\n * initialisers (the executions service lazily creates its maps for the same reason), and a field-initialised Map is\n * absent there, so the first `get` threw. A real companion constructs it normally either way.\n */\n private builtTasksUnreadByRun: Map<string, string> | undefined;\n private builtTasksUnreadRuns(): Map<string, string> {\n return (this.builtTasksUnreadByRun ??= new Map<string, string>());\n }\n\n /**\n * The run options for ONE run: the shared readings, plus a failure record that can find this run's spend by id, and the\n * marker of a re-decompose that could not read the tasks already built (`builtTasksUnread`), on every ending.\n */\n private playbookRunOptionsFor(runIdOf: () => string | undefined): ActorExecutionRunOptions<PlaybookRunOutcome> {\n const takeBuiltTasksUnread = (): { readonly builtTasksUnread: string } | undefined => {\n const runId = runIdOf();\n const reason = runId === undefined ? undefined : this.builtTasksUnreadRuns().get(runId);\n if (runId !== undefined) this.builtTasksUnreadRuns().delete(runId);\n return reason === undefined ? undefined : { builtTasksUnread: reason };\n };\n const shared = this.playbookRunOptions;\n return {\n ...shared,\n suspendOn: (result) => {\n const request = shared.suspendOn?.(result) ?? null;\n if (request === null) return null;\n const marker = takeBuiltTasksUnread();\n return marker === undefined ? request : { ...request, taskOutput: { ...(request.taskOutput as object | undefined), ...marker } };\n },\n concludeAs: (result) => {\n const conclusion = shared.concludeAs?.(result) ?? null;\n const marker = takeBuiltTasksUnread();\n return conclusion === null || marker === undefined ? conclusion : { ...conclusion, taskOutput: { ...(conclusion.taskOutput as object | undefined), ...marker } };\n },\n recordBesideFailure: (error) => {\n const runId = runIdOf();\n const measurement = this.measurementOfFailure(error, runId);\n const overlappedRuns = (typeof error === 'object' && error !== null ? this.runOverlaps.get(error) : undefined)\n ?? (runId !== undefined ? this.failedRunOverlaps.get(runId) : undefined);\n if (runId !== undefined) this.failedRunOverlaps.delete(runId);\n const beside = { ...(measurement ? { measurement } : {}), ...(overlappedRuns && overlappedRuns.length > 0 ? { overlappedRuns } : {}), ...takeBuiltTasksUnread() };\n return Object.keys(beside).length > 0 ? beside : null;\n },\n };\n }\n\n /**\n * The tasks already built, for a run producing the build plan (#3449), or `undefined` when there is nothing to keep or\n * they could not be read. When they could not be read and a plan exists, the re-decompose runs UNHELD (R10): it is not\n * stopped, because a plan that cannot be read is often what the re-decompose repairs, but it says so, as a warning\n * naming the run and as `builtTasksUnread` on the run's row. Until R10 this was a debug line, so a re-decompose that\n * rewrote built work left nothing to find.\n */\n private async readBuiltTasksForBuildPlanRun(input: { readonly runId: string; readonly playbookRef: string }): Promise<NonNullable<Awaited<ReturnType<ApplicationBuildDispatchCompanionService['resolveLandedTaskEvidence']>>>['landedTasks'] | undefined> {\n let reason: string;\n try {\n const evidence = await this.buildDispatch.resolveLandedTaskEvidence();\n if (evidence !== undefined) return evidence.landedTasks;\n // Absent is two things: no plan yet (nothing to keep), or a plan that exists and did not read.\n if (!(await this.buildDispatch.hasAuthoredBuildPlan())) return undefined;\n reason = 'the build plan exists but could not be read (its module failed or it does not satisfy its schema)';\n } catch (error) {\n reason = describeCaughtError(error);\n }\n this.builtTasksUnreadRuns().set(input.runId, reason);\n this.logger.warn(\n `${input.playbookRef} (run ${input.runId}) could not read the build tasks already built, so this re-decompose is NOT held to keep `\n + `their refs, targets and products: ${reason}. Recorded on the run's row as builtTasksUnread.`,\n { playbookRef: input.playbookRef, runId: input.runId },\n );\n return undefined;\n }\n\n private readonly playbookRunOptions: ActorExecutionRunOptions<PlaybookRunOutcome> = createPlaybookRunOptions(this.suspensionRequests, this.runMeasurements, this.runOverlaps);\n\n /**\n * Every choreography that ENDED without concluding and left its progress on its execution row —\n * an orphan settled `ABORTED` at startup, a run that threw, or one that stopped for its environment.\n * Newest first. The rows of the same system also carry CLARIFICATION checkpoints, which is what the\n * `kind` discriminator is for.\n */\n private async readResumableChoreographies(session?: CompanionExecutionSessionContext): Promise<readonly {\n readonly executionId: string;\n readonly checkpointedAt: string;\n readonly context: PlaybookChoreographyCheckpointContext;\n }[]> {\n const rows = await this.actorsSystem.listResumableActorExecutions(META_WORKFLOWS_SYSTEM_REF, session);\n const resumable: { executionId: string; checkpointedAt: string; context: PlaybookChoreographyCheckpointContext }[] = [];\n for (const row of rows) {\n const parsed = PlaybookChoreographyCheckpointContextSchema.safeParse(row.checkpoint?.context);\n if (parsed.success && row.checkpoint) resumable.push({ executionId: row._id, checkpointedAt: row.checkpoint.checkpointedAt, context: parsed.data });\n }\n return resumable.sort((left, right) => right.checkpointedAt.localeCompare(left.checkpointedAt));\n }\n\n private async listInterruptedChoreographies(): Promise<readonly { readonly playbookRef: string; readonly instanceKey?: string; readonly completedIterations: number; readonly stepRefs: readonly string[]; readonly checkpointedAt: string }[]> {\n try {\n // One per composite INSTANCE (#1609): re-running an instance adopts its NEWEST checkpoint, so that is the one to name.\n const newestByRef = new Map<string, { readonly playbookRef: string; readonly instanceKey?: string; readonly completedIterations: number; readonly stepRefs: readonly string[]; readonly checkpointedAt: string }>();\n for (const entry of await this.readResumableChoreographies()) {\n const instanceId = playbookInstanceId(entry.context.playbookRef, entry.context.instanceKey);\n if (newestByRef.has(instanceId)) continue;\n newestByRef.set(instanceId, {\n playbookRef: entry.context.playbookRef,\n ...(entry.context.instanceKey ? { instanceKey: entry.context.instanceKey } : {}),\n completedIterations: entry.context.completedIterations,\n stepRefs: entry.context.stepResults.map((step) => step.ref),\n checkpointedAt: entry.checkpointedAt,\n });\n }\n return [...newestByRef.values()];\n } catch (error) {\n // A status READ must not fail because the actor plane is unreachable; it answers \"none known\".\n this.logDebug('Interrupted choreographies could not be listed', { error: String(error) });\n return [];\n }\n }\n\n /**\n * Re-running a composite IS the resume gesture: adopt the newest progress an earlier run of the\n * same composite left, in the shape the runtime consumes, or `null` when there is none.\n *\n * ADOPTED, not merely read: the progress is written onto THIS run's row first and only then cleared\n * from the row it came from, so at every instant exactly one row carries it — a host that dies\n * between the two leaves it on both, which a later adoption resolves by taking the newest.\n */\n private async adoptChoreographyCheckpoint(\n playbookRef: string,\n instanceKey: string | undefined,\n runId: string,\n session?: CompanionExecutionSessionContext,\n ): Promise<(PlaybookChoreographyCheckpoint & { readonly checkpointedAt: string }) | null> {\n let source: Awaited<ReturnType<PlaybookRunCompanionService['readResumableChoreographies']>>[number] | undefined;\n try {\n source = (await this.readResumableChoreographies(session)).find((entry) => entry.context.playbookRef === playbookRef\n && entry.context.instanceKey === instanceKey && entry.executionId !== runId);\n if (!source) return null;\n await this.actorsSystem.saveActorExecutionCheckpoint(runId, source.context, session);\n await this.actorsSystem.consumeActorExecutionCheckpoint(source.executionId, session);\n } catch (error) {\n // Resuming is a convenience a run must not die for: start fresh rather than refuse to start.\n this.logDebug('A choreography checkpoint could not be adopted (run starts fresh)', { playbookRef, error: String(error) });\n return null;\n }\n return { ...choreographyProgressFromContext(source.context), checkpointedAt: source.checkpointedAt };\n }\n\n /**\n * Record an iteration's worth of progress on the composite's own execution row.\n *\n * Never throws to the runtime: checkpointing is best-effort by construction, and a run that died\n * because its progress note could not be written would be strictly worse than one that merely\n * cannot resume.\n */\n private async saveChoreographyCheckpoint(runId: string, snapshot: PlaybookChoreographyCheckpoint, session?: CompanionExecutionSessionContext, instanceKey?: string): Promise<void> {\n try {\n const context = PlaybookChoreographyCheckpointContextSchema.parse({\n kind: PlaybookRunCheckpointKind.CHOREOGRAPHY,\n ...choreographyProgressToContext(snapshot),\n // The INSTANCE whose progress this is (#1609), so only that instance adopts it.\n ...(instanceKey ? { instanceKey } : {}),\n });\n await this.actorsSystem.saveActorExecutionCheckpoint(runId, context, session);\n } catch (error) {\n this.logDebug('Choreography checkpoint could not be written (run continues)', { runId, error: String(error) });\n }\n }\n\n /**\n * Run a playbook AS an actor-system execution (#1358).\n *\n * The engine's `ActorsSystemBackendService.runActorExecution` owns the lifecycle: it opens the\n * execution and its task on the actor plane, hands the opened identities to the executor below, and\n * settles both rows on the outcome — task first, then execution, `COMPLETED` for every shape that\n * returns and `FAILED` with the error on the task for a throw. Until 2026-09-20 this method did all\n * of that itself, best-effort, under a per-playbook system ref the engine never registered (#1343);\n * the wrapper it was is now the engine's, and this is its first consumer.\n *\n * ## The run's ONE identity\n *\n * `runId` IS the execution's `_id`. The composed `<session>-<ref>-<ts>-<rand>` string this lane\n * minted until #1358 was a second identity for the same run — used in file names, routes and the\n * correlation envelope while the durable row carried another — and it is gone. Everything the run is\n * named by downstream (the write register, the trace, the resume route) uses the execution id.\n *\n * ## REQUIRED, not best-effort\n *\n * The previous wrapper caught every actor-plane failure and ran anyway, on the reasoning that the\n * companion \"routinely runs without a reachable platform\". The consequence was a run nobody could\n * find afterwards — including the loop guard that reads these rows to decide whether a task already\n * ran. The engine refuses to open an execution it cannot record, before any work, and names why\n * (`ACTOR_EXECUTION_PERSISTENCE_UNBOUND`, or the store's own error). A dev loop with no platform\n * learns that at the first run rather than at the first missing row.\n *\n * A SUSPENSION returns, and is NOT a completion (#1360): the run registers what it is waiting on\n * (`suspensionRequests`), the engine moves both rows to `AWAITING_APPROVAL` with the pending\n * decision and the resume inputs on the execution, and `resumePlaybookRun` continues it under the\n * SAME id. There is no checkpoint file and no second handle.\n */\n public async runPlaybook(input: PlaybookRunInput): Promise<PlaybookRunOutcome> {\n // In flight for its whole life, settle included, so the dev supervisor holds a restart for it\n // exactly as for a detached run.\n return this.whileInFlight(() => this.runPlaybookCounted(input));\n }\n\n private async runPlaybookCounted(input: PlaybookRunInput): Promise<PlaybookRunOutcome> {\n let runId: string | undefined;\n try {\n return await this.actorsSystem.runActorExecution(\n this.buildActorExecutionRequest(input),\n (opened) => {\n runId = opened.executionId;\n return this.executePlaybookRun({ ...input, runId: opened.executionId });\n },\n this.playbookRunOptionsFor(() => runId),\n );\n } catch (error) {\n // Only a run that ASKED for a composite subject can have been refused it; anything else that\n // surfaces here came from inside the run and keeps its own name.\n const subject = this.resolveExclusiveSubject(input);\n if (subject === undefined) throw error;\n throw await this.nameTheRunHoldingTheSubject(error, MetaWorkflowsExclusiveSubject.COMPOSITE, subject, input.session);\n } finally {\n if (runId !== undefined) this.failedRunMeasurements.delete(runId);\n }\n }\n\n /**\n * Derive again the expert charters a build panel refused as stale, by running the staffing step itself (#3204).\n *\n * A build task can change an input a charter reads (the design-system task changes the design system the art director\n * and the design-system guardian read), and the next generation step that seats them is refused (#3244). The build\n * holds that step and goes on; this runs `top_down.expert-personas` once the wave has drained, as a child of the same\n * lane, so its landing is a run of its own, recorded and committed like any other (which is why the refusal itself does\n * not derive the charter inline). Then the held steps are offered again. On reference run 42218788356 the refusal ended\n * the build lane at 32 of 98 tasks, and the staffing step it named only ran 20 minutes later, in another lane.\n *\n * Nothing runs when nothing is held, or when every held seat was edited by a person: such a charter is never derived\n * again, and its remedy is the hand edit (the step stays held until that commit). A staffing run that fails is reported\n * and keeps the hold: the next round meets the same refusal and tries again.\n */\n private async repairStaleExpertCharters(input: PlaybookRunInput): Promise<{\n readonly heldTaskRefs: readonly string[];\n readonly ran: boolean;\n readonly detail: string;\n } | undefined> {\n const held = this.buildDispatch.readStaleExpertChartersHold();\n if (held.length === 0) return undefined;\n const heldTaskRefs = held.map((entry) => entry.taskRef);\n const derivable = [...new Set(held.flatMap((entry) => entry.staleSeats.filter((seat) => !seat.authored).map((seat) => seat.roleRef)))];\n if (derivable.length === 0) {\n return { heldTaskRefs, ran: false, detail: 'Every stale charter was edited by a person and is never derived again: update it by hand and commit it.' };\n }\n /*\n * Not while the dev supervisor holds a restart (#3204 review F5): it is a new run, which the restart would wait on or\n * kill. The hold stays, so the next round, in the restarted companion, meets it and derives the charters then.\n */\n const saasRoot = this.companionContext?.saasRoot;\n if (saasRoot !== undefined && companionRestartDrain.isRestartHeld(saasRoot)) {\n return { heldTaskRefs, ran: false, detail: `${EXPERT_STAFFING_PLAYBOOK_REF} not run: the dev supervisor is holding a restart; the next round runs it.` };\n }\n try {\n await this.runPlaybook({\n playbookRef: EXPERT_STAFFING_PLAYBOOK_REF,\n selectionRationale: `The build's panels refused ${derivable.join(', ')} as older than their inputs (${held.map((entry) => entry.taskRef).join(', ')}). `\n + 'Derive those charters again from what is on record now, so the held build steps can seat them.',\n ...(input.nestedWithinChoreographyRef !== undefined ? { nestedWithinChoreographyRef: input.nestedWithinChoreographyRef } : {}),\n ...(input.rootRunId !== undefined ? { rootRunId: input.rootRunId } : {}),\n ...(input.requestedByUserId ? { requestedByUserId: input.requestedByUserId } : {}),\n ...(input.session ? { session: input.session } : {}),\n });\n this.buildDispatch.releaseStaleExpertChartersHold(`${EXPERT_STAFFING_PLAYBOOK_REF} derived ${derivable.join(', ')} again`);\n return { heldTaskRefs, ran: true, detail: `${EXPERT_STAFFING_PLAYBOOK_REF} derived ${derivable.join(', ')} again; the held steps run in the next wave.` };\n } catch (error) {\n this.logger.warn(`The staffing repair for stale expert charters failed; the held steps stay held: ${describeCaughtError(error)}`);\n return { heldTaskRefs, ran: false, detail: `${EXPERT_STAFFING_PLAYBOOK_REF} failed: ${describeCaughtError(error)}` };\n }\n }\n\n /**\n * The single-flight subject this run holds, if any: its composite INSTANCE's (#1610), exactly when the\n * playbook DECLARES a choreography and the run is not nested inside another composite — see\n * `MetaWorkflowsExclusiveSubject.COMPOSITE`. Read off the compiled catalog without parsing it: an\n * unknown or malformed playbook holds nothing here and is refused by name inside the run.\n */\n private resolveExclusiveSubject(input: PlaybookRunInput): string | undefined {\n if (input.nestedWithinChoreographyRef !== undefined) return undefined;\n const compiled = getFrameworkKnowledgePlaybook(input.playbookRef)?.playbook as { method?: { choreography?: unknown } } | undefined;\n return compiled?.method?.choreography ? compositeExclusiveSubject(input.playbookRef, input.instanceKey) : undefined;\n }\n\n /**\n * Turn the engine's single-flight refusal into THIS lane's typed one, naming the run that holds the\n * subject — the engine says only that the subject is busy, and an operator needs to know by what.\n * Any other error is answered unchanged, so this is safe around a whole run.\n *\n * The transport maps both typed errors to 409. The holder is read from the rows, so the message is\n * as true after a restart or from a second process as it is inside the one that started the run.\n */\n private async nameTheRunHoldingTheSubject(\n error: unknown,\n kind: MetaWorkflowsExclusiveSubject,\n /** The leased string: the kind for the loop, `composite:<instance id>` for a composite (#1610). */\n subject: string,\n session?: CompanionExecutionSessionContext,\n ): Promise<unknown> {\n if (!isActorExecutionSubjectBusyError(error)) return error;\n let held = 'a run this process could not read';\n try {\n const holder = await this.actorsSystem.readExclusiveSubjectHolder(META_WORKFLOWS_SYSTEM_REF, subject, session);\n if (holder) {\n const row = await this.executions.getActorExecution(holder._id, session);\n const task = row.standaloneTasks[0];\n const playbookRef = task?.context?.correlation?.refs?.['playbookRef'];\n const goal = (task?.input as { goal?: unknown } | undefined)?.goal;\n held = kind === MetaWorkflowsExclusiveSubject.LOOP\n ? `goal \"${typeof goal === 'string' ? goal : 'unknown'}\", execution ${holder._id}, started ${row.createdAt.toISOString()}`\n : `playbook \"${typeof playbookRef === 'string' ? playbookRef : 'unknown'}\", execution ${holder._id}, started ${row.createdAt.toISOString()}`;\n }\n } catch {\n // Naming the holder is a courtesy; the refusal stands without it.\n }\n return kind === MetaWorkflowsExclusiveSubject.LOOP\n ? new PlaybookLoopAlreadyRunningError(\n `A playbook loop is already running (${held}). One loop per application: wait for it. A loop whose companion died is `\n + 'released when the companion next starts, which settles it ABORTED.',\n )\n : new PlaybookChoreographyAlreadyRunningError(\n `This composite instance is already running (${held}). One run per instance: a second would adopt the first one's `\n + 'progress checkpoint mid-flight and continue a run that is still going. Wait for it, or run it as another instance '\n + '(open one for its own purpose), or watch it with GET /api/companion/playbooks/runs. A composite whose companion died '\n + 'is released when the companion next starts, which settles it ABORTED and keeps its checkpoint.',\n );\n }\n\n /**\n * What the actor plane records about a playbook run: one task for the PROGRAMMATIC playbook-run\n * actor on one execution of the registered meta-workflows system, correlated back to the playbook\n * — and to the trace session, so a reader can join the run to its evidence without inferring one\n * identity from another.\n */\n private buildActorExecutionRequest(input: PlaybookRunInput): ActorExecutionOpenRequest<CompanionExecutionSessionContext> {\n const exclusiveSubject = this.resolveExclusiveSubject(input);\n return {\n systemRef: META_WORKFLOWS_SYSTEM_REF,\n actorRef: META_WORKFLOWS_PLAYBOOK_RUN_ACTOR_REF,\n ...(exclusiveSubject ? { exclusiveSubject } : {}),\n task: {\n title: `Playbook run ${playbookInstanceId(input.playbookRef, input.instanceKey)}`,\n description: `Meta-workflow playbook run of ${playbookInstanceId(input.playbookRef, input.instanceKey)}.`,\n topic: Actor_Task_Topics.METHOD_STEP,\n // The creator's brief is RECORDED (#1608): a composite once dropped it without trace, and a row that says what it was asked is how that shows.\n input: {\n playbookRef: input.playbookRef,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n ...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),\n dryRun: input.dryRun === true,\n },\n correlation: {\n domain: META_WORKFLOWS_CORRELATION_DOMAIN,\n refs: {\n playbookRef: input.playbookRef,\n // The INSTANCE on the durable row (#1609): every read built from the rows tells instances apart by it.\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n // A CHILD names its tree's root (#1610), so the root's overlap record can leave its own children out.\n ...(input.rootRunId ? { rootRunId: input.rootRunId } : {}),\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n ...(input.conversationId ? { [WorkbenchTaskCorrelationRef.CONVERSATION]: input.conversationId } : {}),\n },\n },\n },\n ...(input.session ? { scope: input.session } : {}),\n };\n }\n\n /** The measurement registered against what a detached run settled with, shaped for its in-process record (#1507). */\n private detachedRecordMeasurement(\n settledWith: unknown,\n shape: (measurement: PlaybookRunMeasurement) => PlaybookSettledRunRecord['measurement'],\n ): { measurement?: PlaybookSettledRunRecord['measurement'] } {\n // Guarded like every read of a report: shaping a measurement must never be why a run's record is lost.\n try {\n const measurement = typeof settledWith === 'object' && settledWith !== null ? this.runMeasurements.get(settledWith) : undefined;\n const shaped = measurement ? shape(measurement) : undefined;\n return shaped ? { measurement: shaped } : {};\n } catch {\n return {};\n }\n }\n\n /**\n * Run a playbook MEASURED (#1507): its wall-clock, and what every model call made inside it reported —\n * the generation, the judge, the selector, a child's coding or research agent. Every executor the\n * engine drives for this lane — a fresh run, a resumed one, a detached one — comes through here, so no\n * run reaches its row unmeasured.\n *\n * The measurement is registered against what the run SETTLED with — the result, which `concludeAs` /\n * `suspendOn` read back when they write the task summary, or the thrown error, which the engine's\n * `recordBesideFailure` reads so a failed run's row carries its spend beside `{ failure }`. A thrown\n * value that is not an object cannot be keyed and records the failure alone.\n */\n private async executePlaybookRun(\n input: PlaybookRunInput & { readonly runId: string },\n /**\n * A RESUMED run's earlier leg: its recorded measurement, or `null` when the waiting row carried\n * none — then that leg is an unobserved segment, so the total reads as a floor. Absent on a fresh run.\n */\n priorLeg?: PlaybookRunMeasurement | null,\n ): Promise<PlaybookRunOutcome> {\n // Counted here as well as at every entry, so a caller added later is covered while it executes.\n // Not drain-counted HERE: every path into it is counted once, at its entry, for the run's whole life (#3204).\n return this.whileInFlight(() => this.executePlaybookRunCounted(input, priorLeg), { drainCounted: false });\n }\n\n /**\n * Count `work` as one RUN for the restart drain (#3204): busy for its whole life unless paused (parked at the restart\n * window, or waiting on children counted themselves). Without an application root there is no supervisor to drain for.\n */\n private whileDrainCounted<T>(work: () => Promise<T>): Promise<T> {\n const saasRoot = this.companionContext?.saasRoot;\n return saasRoot === undefined ? work() : companionRestartDrain.whileWorking(saasRoot, work);\n }\n\n /** {@link whileDrainCounted}'s pause: the counted run calling it waits on work that counts itself. */\n private whileDrainPaused<T>(work: () => Promise<T>): Promise<T> {\n return this.companionContext?.saasRoot === undefined ? work() : companionRestartDrain.whilePaused(work);\n }\n\n /** {@link whileDrainCounted} for a run whose life spans a detached chain: counted until the release is called. */\n private beginDrainCounted(): () => void {\n const saasRoot = this.companionContext?.saasRoot;\n return saasRoot === undefined ? () => undefined : companionRestartDrain.begin(saasRoot);\n }\n\n /**\n * The restart window the creation loop and every choreography wait at before dispatching (#3204): returns at once\n * unless the dev supervisor is holding a restart, and otherwise parks this round until the restart comes. Said once per\n * park in the log, since a parked round is otherwise silent.\n */\n private async awaitRestartWindow(): Promise<void> {\n // No application root, no supervisor to wait for: a harness, or a companion not started from one.\n const saasRoot = this.companionContext?.saasRoot;\n if (saasRoot === undefined) return;\n return companionRestartDrain.awaitRestartWindow(saasRoot, (held) => {\n this.logger.info('A restart is held by the dev supervisor: this round waits at its boundary and starts nothing, so the restart '\n + 'finds nothing running; the run continues after the restart', { reason: held.reason, heldSince: held.since });\n }, (held) => {\n this.logger.warn('A restart has been held past the supervisor\\'s own ceiling and is still published: the round goes on rather '\n + 'than waiting for ever', { reason: held.reason, heldSince: held.since });\n });\n }\n\n private async executePlaybookRunCounted(\n input: PlaybookRunInput & { readonly runId: string },\n priorLeg?: PlaybookRunMeasurement | null,\n ): Promise<PlaybookRunOutcome> {\n const startedAtMs = Date.now();\n // Before any work: a loop spending at an enormous rate starts nothing new (a runaway breaker, not a budget).\n this.spendMeter.assertSpendRateBelowRunawayBreaker();\n const measured = await this.spendMeter.measure(() => this.executePlaybookRunUnmeasured(input));\n /*\n * A composite RESUMED from a checkpoint ran only its later iterations here; the earlier ones were paid\n * for by a process that died before recording them. One unobserved segment each, so the run's total\n * reads as a floor — the same marking the runtime gives the composite's own spend.\n */\n // Read from the ADOPTED checkpoint (root and nested lanes), not the result: a resumed composite that\n // throws has no result, and its failure row must read as a floor too.\n const resumedIterations = this.adoptedCheckpointIterations.get(input.runId) ?? 0;\n this.adoptedCheckpointIterations.delete(input.runId);\n const measurement: PlaybookRunMeasurement = {\n durationMs: Date.now() - startedAtMs + (priorLeg?.durationMs ?? 0),\n spend: mergePlaybookSpend([\n ...(priorLeg === undefined ? [] : [priorLeg?.spend ?? PLAYBOOK_SPEND_NOT_OBSERVED]),\n measured.spend,\n ...Array.from({ length: resumedIterations }, () => PLAYBOOK_SPEND_NOT_OBSERVED),\n ]),\n };\n const settledWith = measured.settled.status === 'rejected' ? measured.settled.reason : measured.settled.value;\n if (typeof settledWith === 'object' && settledWith !== null) this.runMeasurements.set(settledWith, measurement);\n // A ROOT run says which other root runs it shared the tree with (#1610); a child's root says it for the tree.\n if (input.rootRunId === undefined) {\n const overlaps = await this.readOverlappingRootRuns(input.runId, new Date(startedAtMs).toISOString(), input.session);\n if (overlaps.length > 0) {\n if (typeof settledWith === 'object' && settledWith !== null) this.runOverlaps.set(settledWith, overlaps);\n if (measured.settled.status === 'rejected') this.failedRunOverlaps.set(input.runId, overlaps);\n }\n }\n // By run id as well for a failure: a thrown value that is not an object cannot key the WeakMap, so the\n // run id is what carries its spend to the row (the call site clears the entry once the run has settled).\n if (measured.settled.status === 'rejected') {\n this.failedRunMeasurements.set(input.runId, measurement);\n const reason: unknown = measured.settled.reason;\n if (resumedIterations > 0 && typeof reason === 'object' && reason !== null) this.inheritedRoundsByFailure.set(reason, resumedIterations);\n throw reason;\n }\n return measured.settled.value;\n }\n\n /**\n * The other ROOT runs whose time on this application overlapped this one's (#1610), read from the rows\n * as it settles. Best-effort by design: it is a RECORD beside the run, and a plane that cannot be read\n * at that moment costs the record, never the run's own settle. A run RESUMED after a suspension reads\n * from its original row's creation, so its window covers both legs.\n */\n private async readOverlappingRootRuns(runId: string, fallbackStartedAt: string, session?: CompanionExecutionSessionContext): Promise<readonly PlaybookRunOverlap[]> {\n try {\n const executions = await this.executions.listActorExecutions(\n CompanionExecutionsListQuerySchema.parse({ systemRef: META_WORKFLOWS_SYSTEM_REF, limit: 200 }),\n session,\n );\n const startedAt = executions.find((execution) => execution._id === runId)?.createdAt.toISOString() ?? fallbackStartedAt;\n return findOverlappingRootRuns(executions, { runId, startedAt, endedAt: new Date().toISOString() });\n } catch (error) {\n this.logDebug('Could not read the runs this one overlapped; its row goes without the record', { runId, error: describeCaughtError(error) });\n return [];\n }\n }\n\n private async executePlaybookRunUnmeasured(input: PlaybookRunInput & { readonly runId: string }): Promise<PlaybookRunOutcome> {\n /*\n * THE RUN's identity — the actor execution's own id, opened by the engine before this method is\n * entered (#1358), so everything below, including the throws, happens inside a run that can be\n * named and found.\n */\n const runId = input.runId;\n // When the run began reading what it derives from — recorded with its writes, see the register's `startedAt`.\n const runStartedAt = new Date().toISOString();\n const hydrated = getFrameworkKnowledgePlaybook(input.playbookRef);\n if (!hydrated) {\n throw new UnknownPlaybookError(`No compiled playbook is registered under \"${input.playbookRef}\".`);\n }\n /*\n * The loader types `playbook` as `unknown` on purpose — `@wildo-ai/framework-knowledge` cannot depend\n * on `@wildo-ai/saas-specifications`, so it ships the compiled bytes and leaves the contract to the\n * consumer. Parsing here is therefore the FIRST place the playbook's shape is enforced at runtime, and\n * a malformed catalog entry fails by name instead of surfacing as `undefined.outputs` three frames on.\n */\n const parsedPlaybook = MetaWorkflowPlaybookSchema.safeParse(hydrated.playbook);\n if (!parsedPlaybook.success) {\n throw new Error(\n `Compiled playbook \"${input.playbookRef}\" does not satisfy the playbook contract: `\n + parsedPlaybook.error.issues.slice(0, 5).map((issue) => `${issue.path.join('.') || '<root>'}: ${issue.message}`).join('; '),\n );\n }\n const playbook = parsedPlaybook.data;\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) {\n throw new Error('No specifications package is declared in wildo.saas.config.ts; there is nowhere to land a playbook output.');\n }\n\n /*\n * The LINE first (#1639): a playbook the application's line does not run is refused by readiness\n * whatever the tree holds, so it is refused here from the creator's answers alone, before the\n * full-state read — measured at 66 s under load on another run — that such a playbook never needed.\n * The refusal names the line, the reason that decides, rather than every unmet gate the full board\n * would add. A line that cannot be read answers no scope, and the full check below decides as before.\n * Traced as 'own-line-check', apart from the choreography's per-lane 'application-line-scope'.\n */\n const lineScope = await this.traceRunPhase(input.session, 'own-line-check', () => this.readApplicationLineScope());\n const lineRefusal = lineScope === undefined\n ? undefined\n : applicationLineRefusalOf(evaluatePlaybookEligibility({\n playbook,\n state: { artifactsByFamily: new Map(), applicationLine: lineScope },\n landableFamilies: this.resolveLandableFamilies(),\n }));\n if (lineRefusal !== undefined) {\n throw new PlaybookNotReadyError(`\"${input.playbookRef}\" is not ready to run: ${lineRefusal.detail}`);\n }\n /*\n * The bytes each output file holds as this run READS (#1614), taken before the inputs so nothing that\n * lands while the model works can hide inside the window. The landing refuses to replace a file that\n * moved since, instead of silently discarding whoever moved it. Held in memory for this run only.\n */\n const readBaselines = await this.traceRunPhase(input.session, 'output-landing-baselines', () => readPlaybookOutputLandingBaselines({\n specificationsPackageRoot,\n constantPrefix: LANDED_CONSTANT_PREFIX,\n outputs: (playbook.outputs ?? []).map((output) => ({ family: output.family, schemaRef: output.schemaRef })),\n }));\n const artifactState = await this.traceRunPhase(input.session, 'artifact-state', () => this.readArtifactState());\n /*\n * An INSTANCE runs only once it was opened (#1609): the dossier's activation record is where its purpose\n * lives, and a run of an instance nobody opened would land work nobody could say what it is for.\n * Refused before any model is asked, by name, with the way to open it.\n */\n /*\n * Asked of the ROOT only: a composite's child inherits its root's instance key and has no activation of\n * its own, so asking it would refuse every child of an instance composite (it did, until #1608). The root\n * was asked, and its purpose travels down as `instancePurpose`.\n */\n const instancePurpose = resolveInstanceRunPurpose({\n ...input,\n creatorInputs: artifactState.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined,\n });\n /* What this instance is for, in the creator's words: rendered beside the interview's answers, which is where the creator's facts go. */\n const purposeSection = instancePurpose === undefined ? '' : composeInstancePurposeSection(playbookInstanceId(input.playbookRef, input.instanceKey), instancePurpose);\n /*\n * An explicit run answers only READINESS: a playbook whose inputs are absent or invalid would produce\n * content derived from nothing, so that still refuses. SEQUENCING is the methodology's ordering, and an\n * explicit run IGNORES it — the creator asked for this playbook by name, which is the acknowledgement\n * (`.claude/rules/application-creation-directive.md`). The loop keeps its full gate; the eligibility\n * board keeps reporting phase information.\n */\n const eligibility = evaluatePlaybookEligibility({\n playbook,\n state: { ...artifactState, ...(input.stepResults ? { stepResults: input.stepResults } : {}) },\n landableFamilies: this.resolveLandableFamilies(),\n });\n if (!eligibility.eligible && !eligibility.blockedOnlyBySequencing) {\n throw new PlaybookNotReadyError(\n `\"${input.playbookRef}\" is not ready to run: ${eligibility.unmet.join(\" \")}`,\n );\n }\n if (!eligibility.eligible) {\n this.logDebug('Running a playbook out of sequence', { playbookRef: input.playbookRef, unmet: eligibility.unmet });\n }\n\n /*\n * The interview's answers come from the DOSSIER by default (#1454, Step 5): the committed\n * `creator-inputs` family, which `readArtifactState` already carries. The request's answers\n * override per question, so re-answering one keeps the rest. What is still missing is refused\n * by name just below — a missing answer is a gap in the interview, never an implicit \"no\".\n */\n const elicitationAnswerInput = {\n playbookRef: input.playbookRef,\n playbook,\n creatorInputs: artifactState.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined,\n overrides: input.elicitationAnswers,\n // This run's INSTANCE answers first, the default instance's for the rest (#1609).\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n };\n const elicitationAnswers = resolveElicitationAnswers(elicitationAnswerInput);\n /*\n * The questions the creator answered WITHOUT a value (#3437): they cover their question, so the run proceeds,\n * and the brief and the judge both say what they are. Never in `elicitationAnswers`, so no reader of answers (the\n * foundation executor, a clarification checkpoint) can take a reason for an answer.\n */\n const elicitationNonAnswers = resolveElicitationNonAnswers(elicitationAnswerInput);\n // Refuses a missing, unknown, duplicated or out-of-vocabulary answer — see its own header.\n /*\n * Computed options resolved against the families this run reads, so a computed CHOICE answer (the brand\n * name) is re-checked against the screening as it stands NOW — a candidate re-screened into a conflict\n * since the answer was given is refused here rather than carried into the brief.\n */\n const materializedElicitation = materializeElicitationOptions(playbook, { readFamily: (family) => artifactState.artifactsByFamily.get(family) });\n const elicitationSection = composeElicitationSection({\n playbookRef: input.playbookRef,\n elicitation: materializedElicitation.playbook.method?.elicitation,\n answers: elicitationAnswers,\n nonAnswers: elicitationNonAnswers,\n unavailableOptions: materializedElicitation.unavailableOptions,\n });\n\n /*\n * The CHOREOGRAPHY branch — a composite runs its children instead of producing anything itself.\n *\n * Keyed on the DECLARATION (`method.choreography`), never on `executor: COMPOSITE`. The executor\n * value is descriptive and one playbook already uses it for a bespoke deterministic executor that\n * is not a choreography at all; branching on it would make two unrelated things one code path.\n */\n if (playbook.method?.choreography) {\n /*\n * The umbrella's rendered elicitation travels into the run (#284 shape (a)): the questions are\n * declared on the COMPOSITE (validated just above, so an unanswered launch was already refused),\n * and the answers are the product facts every child derives from. Rendered ONCE here — children\n * must not re-validate parent answers against their own (empty) vocabularies, so what travels is\n * the section, not the raw answers. Channel-agnostic on purpose: this is \"the run's elicitation\n * state\", so answers arriving through a future mid-run workbench resume ride the same path.\n */\n return this.runChoreography({\n playbook,\n ...(input.requestedByUserId ? { requestedByUserId: input.requestedByUserId } : {}),\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n ...(instancePurpose !== undefined ? { instancePurpose } : {}),\n ...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),\n ...(elicitationSection ? { parentElicitationSection: elicitationSection } : {}),\n ...(input.nestedWithinChoreographyRef ? { nestedWithinChoreographyRef: input.nestedWithinChoreographyRef } : {}),\n ...(input.session ? { session: input.session } : {}),\n ...(input.dryRun === true ? { dryRun: true } : {}),\n runId,\n rootRunId: input.rootRunId ?? runId,\n });\n }\n\n /*\n * An INSTANCE (#1609) runs as a composite (handled above) or through the generation path below, which\n * lands into keyed sets only. Every other executor acts on state the application holds ONCE: the coding\n * lane builds the application, a deterministic or human step answers for all of it, and the foundation,\n * capability composition, maturity reading and expert staffing each derive one application-wide\n * family. An instance of one of those would be the same work under a second name, so it is refused.\n */\n if (input.instanceKey !== undefined && (\n playbook.executor === MetaWorkflow_Executor.CODING_AGENT\n || playbook.executor === MetaWorkflow_Executor.DETERMINISTIC_CLI\n || playbook.executor === MetaWorkflow_Executor.HUMAN\n || [EXPERT_PERSONAS_PLAYBOOK_REF, CAPABILITY_COMPOSITION_PLAYBOOK_REF, APPLICATION_MATURITY_PLAYBOOK_REF, FOUNDATION_PLAYBOOK_REF].includes(input.playbookRef)\n )) {\n throw new PlaybookNotReadyError(\n `\"${input.playbookRef}\" acts on the application as a whole, so it has no instances; run it without an instance key.`,\n );\n }\n\n /*\n * The CODING_AGENT tier (issue #119).\n *\n * `MetaWorkflow_Executor` answers *which tier runs this playbook's step*, and until now the runtime\n * honoured ONE of its five members. `bottom_up.build-dispatch` and `bottom_up.build-scale` both\n * declare `CODING_AGENT`; both also declare `outputs: []`, so both fell through to the ASSESSMENT\n * path below and returned a JUDGE VERDICT over the build-plan — while their method describes\n * dispatching an agent into the workspace. The declaration was honest and inert.\n *\n * Keyed on the EXECUTOR, unlike the foundation branch below which is keyed on a playbook ref. That\n * is the difference between a TIER and a bespoke executor: any playbook declaring this tier is\n * asking for the same mechanism, so a second author needs no edit here. (The neighbouring warning\n * about not branching on `executor` was written for the retired `COMPOSITE`, whose value described\n * two unrelated things at once; `CODING_AGENT` describes exactly one.)\n *\n * Placed AFTER readiness so the playbook's own preconditions still gate it — `build-dispatch`\n * requires an `artifact_exists: build-plan`, and dispatching against a plan that does not exist\n * would be a coding run with nothing to build.\n *\n * No DI was needed: `ApplicationBuildDispatchService` was already injected here for the read at\n * `resolveBuildExecutionProgress`. The wiring really was a call site, as #119 predicted.\n */\n if (playbook.executor === MetaWorkflow_Executor.CODING_AGENT) {\n /*\n * A DRY RUN must not dispatch. `dryRun` is documented to the operator as \"the full pipe ran\n * and NOTHING was written\", and a coding run writes application code in the workspace — so\n * honouring the flag here is the difference between a promise and a lie. `describeNextBuildTask`\n * is the pure read the dispatch service exposes for exactly this: it locks nothing, creates\n * nothing and starts nothing, while answering the same question about the same next task.\n */\n /*\n * A PARALLEL BUILD (#1528): with a build parallelism above one, this tier runs a rolling wave of\n * coding runs in the shared worktree instead of one dispatch, and returns once it has drained.\n * The per-run advisory judge is not composed here — each run's own row carries its outcome,\n * `concurrency` and `interferenceSuspected`, and the wave's end-of-run repairs are on the result: the\n * reconciliation, and the single-flight re-runs of tasks a sibling overwrote (`interferenceRepairs`, #2210).\n * A dry run never takes this branch: it dispatches nothing, whatever the degree.\n */\n // No application root means nothing to parallelize: one dispatch, as a degree of 1 would.\n const saasRoot = this.companionContext?.saasRoot;\n /*\n * While the coding agent's usage limit holds (#2388), a single-flight build takes the wave path too: at a\n * degree of 1 the wave is one single-flight dispatch, and it is the path that refuses to start a turn into\n * the limit and schedules the resume. A direct dispatch here would start a refused turn every round of the\n * build lane (#2388 review F3).\n */\n if (input.dryRun !== true && saasRoot !== undefined\n && (readBuildParallelism(saasRoot) > 1 || this.buildDispatch.readCodingAgentUsageLimitHold() !== undefined)) {\n const wave = await this.buildDispatch.dispatchBuildWave(input.session);\n // A panel refused stale expert charters (#3204): derive them again now, so the next wave runs the held steps.\n const staffingRepair = await this.repairStaleExpertCharters(input);\n // The coding agent's account hit its usage limit: the build resumes on its own at the reset (#2388) — unless a\n // person's stop holds it (#3206), read at the wave's END so a stop asked while it drained counts too. The resume\n // relaunches what the limit stopped: this run's tree when it was a child of a composite, else a wave (#2463).\n if (this.buildDispatch.readBuildStopHold() !== undefined) this.cancelBuildWaveResume('a person stopped the build');\n else if (wave.usageLimit) this.scheduleBuildWaveResume(wave.usageLimit.resumesAt, this.deriveBuildResumeTargetOf(input, saasRoot));\n return {\n playbookRef: input.playbookRef,\n dispatched: true as const,\n wave,\n taskRefs: wave.dispatched.map((entry) => entry.plan.taskRef),\n ...(staffingRepair !== undefined ? { staffingRepair } : {}),\n accepted: false as const,\n };\n }\n const dispatch: ApplicationBuildDispatchResult = input.dryRun === true\n ? { plan: await this.buildDispatch.describeNextBuildTask() }\n : await this.buildDispatch.dispatchNextBuildTask(input.session);\n /*\n * WAIT for the work, then report what it did.\n *\n * A coding dispatch resolves at ADMISSION — lock held, durable row written, agent about to\n * start. Returning there made this run's `finishedAt` equal the coding run's `startedAt` to\n * the millisecond on its first live use, so `GET /playbooks/runs` showed a completed green run\n * for a task that was still executing, and any treatment composed over the result would have\n * been handed an outcome that did not exist yet.\n *\n * A GENERATION STEP has no admission and needs no wait: its dispatch already resolved because\n * the work was done. A DRY RUN dispatches nothing, so there is nothing to wait for — and\n * waiting on the PREVIOUS run's task would be the same lie in the other direction.\n *\n * The consequence for the caller is deliberate and stated in the async route's own note: a\n * coding run can outlive the 30-minute request ceiling, so the SYNCHRONOUS route may lose its\n * socket to a run that keeps going. That was already true of a choreography, and the answer is\n * the same — submit with `async: true` and poll. A short-lived truthful answer is worth more\n * than a durable false one.\n */\n const codingRun = dispatch.admission\n ? await this.buildDispatch.awaitCodingRunOutcome(dispatch.admission.taskId, input.session)\n : null;\n // The step's panel refused stale expert charters (#3204): repaired here at a build parallelism of 1 too.\n const staffingRepair = input.dryRun === true ? undefined : await this.repairStaleExpertCharters(input);\n // The single dispatch met the coding agent's usage limit: the build resumes on its own at the reset (#2388).\n const heldAfterRun = this.buildDispatch.readCodingAgentUsageLimitHold();\n // Not when a person stopped the build while the task ran (#3206 review R1): a stop holds it until they start it.\n if (this.buildDispatch.readBuildStopHold() !== undefined) this.cancelBuildWaveResume('a person stopped the build');\n else if (heldAfterRun) this.scheduleBuildWaveResume(heldAfterRun.resumesAt, this.deriveBuildResumeTargetOf(input, saasRoot));\n /*\n * The ADVISORY judge over the settled run — the first time `bottom_up.build-dispatch`'s own\n * compiled treatment has ever been read by anything.\n *\n * `dispatch-outcome-sound` was authored for exactly this evidence: the host's disposition, the\n * verification gate, the sealed change-set and the recorded out-of-scope paths. It could not run\n * while this branch returned at admission, because at that instant there was no outcome to judge —\n * so a treatment with two criteria and four verdict guides sat compiled and unreachable.\n *\n * Advisory, like every other judge in this lane: the verdict goes to the response and the trace,\n * and nothing refuses on it (`.claude/rules/application-creation-directive.md`).\n *\n * ONE condition, and the dry-run guard that read naturally beside it is deliberately absent: a dry\n * run dispatches nothing, so it has no admission, so it has no outcome — `codingRun` is already\n * null there, and a `dryRun` clause would have been unreachable. It was written, measured against\n * the pins (neutering it reddened nothing) and removed: an unreachable guard is not defence in\n * depth, it is an untested claim that reads like coverage. The same single condition also covers\n * the unreadable row, which must not be judged because the one thing these criteria may never do\n * is infer a result from an absent change-set.\n */\n const judge = codingRun\n ? await this.judgeSettledCodingRun({\n playbookRef: input.playbookRef,\n hydrated,\n plan: dispatch.plan,\n outcome: codingRun,\n ...(input.session ? { session: input.session } : {}),\n })\n : undefined;\n return {\n playbookRef: input.playbookRef,\n dispatched: true as const,\n taskRef: dispatch.plan.taskRef,\n targetKind: dispatch.plan.targetKind,\n // The run's own outcome, beside the plan's. `dispatched` says an agent was STARTED; only\n // this says whether it finished, failed, or parked on a question — and a failed coding run\n // is a normal, reportable result of a successful dispatch, never an error to throw.\n ...(dispatch.admission ? { codingTaskId: dispatch.admission.taskId } : {}),\n ...(codingRun ? { codingRun } : {}),\n // Unreadable is its own answer. Reporting an unreadable row as a failed run would tell an\n // operator to re-dispatch work that may well have landed.\n ...(dispatch.admission && !codingRun ? { codingRunOutcomeUnreadable: true as const } : {}),\n ...(dispatch.staleExpertCharters ? { staleExpertCharters: dispatch.staleExpertCharters } : {}),\n ...(staffingRepair !== undefined ? { staffingRepair } : {}),\n ...(judge ? { judge } : {}),\n // Composed from the TREATMENT, so \"what does done mean\" is present even when the judge stayed\n // silent — withholding the criteria exactly when the automated check did not arrive is the\n // opposite of useful. Same reasoning as the generation path's own review guide.\n reviewGuide: renderPlaybookReviewGuide(buildPlaybookReviewGuide({\n treatment: hydrated.evaluationTreatment?.value,\n ...(judge !== undefined ? { judge } : {}),\n })),\n // The board AS OF DISPATCH, and re-reading it after the wait would report the same thing:\n // landing probes COMMITTED bytes, and a coding run's product is a working edit until a human\n // commits it. So a task cannot land by running — only by being accepted.\n remainingReadyTaskRefs: dispatch.plan.readyTaskRefs.filter((taskRef) => taskRef !== dispatch.plan.taskRef),\n landedTaskRefs: dispatch.plan.landedTaskRefs,\n // Reported, never inferred from the absence of a change: a caller cannot tell a dry run from\n // a real one by looking at the workspace, because a real run may legitimately write nothing.\n ...(input.dryRun === true ? { dryRun: true as const } : {}),\n // No acceptance, as everywhere in this lane: the run leaves working edits, and acceptance is a\n // later commit — a person's, or the companion's under the posture (#1534).\n accepted: false as const,\n };\n }\n\n /*\n * The tiers the runtime does NOT honour REFUSE, rather than falling through (issue #119).\n *\n * This is the defect this issue is about, generalised. `CODING_AGENT` was declared by two\n * playbooks and silently took the ASSESSMENT path, so a run that should have dispatched an agent\n * returned a judge verdict and nobody could tell from the response. `HUMAN` and\n * `DETERMINISTIC_CLI` are in that same position today — zero authors and zero readers — and the\n * moment someone declares one they would inherit exactly the same silence.\n *\n * Refusing by name is deliberately NOT the same as deleting the members. #111 drew that line:\n * they are unbuilt DESIGNS (a step a person performs; a step that is a `wildo` command), not\n * duplications of something that already runs, so deleting them would discard the design rather\n * than the duplication. What is removed here is only the silence.\n *\n * Neither is wired speculatively. `HUMAN` needs a decided contract — what a human step RETURNS,\n * and how a resume supplies it; the existing suspension machinery is shaped around a GENERATION\n * being interrupted (a family, a round, clarification requests) and a human-performed step has\n * none of those. `DETERMINISTIC_CLI` needs a registry of runnable commands, which does not\n * exist. Both are decisions for whoever authors the first playbook that needs one.\n */\n /*\n * The DETERMINISTIC_CLI tier (issues #147, #119).\n *\n * Topic 7 — \"does the built application assemble and pass its own checks?\" — had no producer:\n * `bottom_up.assemble-verify` was deleted on 2026-08-25 with the digest demolition, and the\n * question it asked went with it even though the answer needs no digests. Verification also\n * cannot be a build-plan task: `BuildPlanTaskTargetKind` has no member for it, so the decomposer\n * is structurally right to emit none. It has to be a playbook that RUNS COMMANDS.\n *\n * Keyed on the EXECUTOR, like CODING_AGENT above: any playbook declaring this tier is asking for\n * the same mechanism. The CHECK SET is host-owned and per-ref (see the constant), because\n * translating a semantic check ref into argv is reviewed host work.\n *\n * A DRY RUN resolves the checks and runs NOTHING. Not because verification mutates the\n * application — it does not — but because `tsc` writes `.tsbuildinfo`, so a dry run that executed\n * it would write, and `dryRun` is documented to the operator as \"the full pipe ran and NOTHING\n * was written\". Reporting the resolved set keeps the flag honest and cheap.\n */\n if (playbook.executor === MetaWorkflow_Executor.DETERMINISTIC_CLI) {\n const checkRefs = DETERMINISTIC_CLI_VERIFICATION_CHECKS[input.playbookRef]?.(this.companionContext?.saasRoot);\n if (!checkRefs) {\n throw new PlaybookNotReadyError(\n `\"${input.playbookRef}\" declares executor ${MetaWorkflow_Executor.DETERMINISTIC_CLI} but no verification `\n + 'check set is registered for it. Translating a check ref into a runnable command is reviewed host '\n + 'work — add the ref to DETERMINISTIC_CLI_VERIFICATION_CHECKS rather than letting it verify a '\n + 'default nobody chose.',\n );\n }\n if (input.dryRun === true) {\n return {\n playbookRef: input.playbookRef,\n verified: true as const,\n dryRun: true as const,\n checkRefs: [...checkRefs],\n checks: [],\n passed: null,\n accepted: false as const,\n };\n }\n const { verification, infrastructureError } = await this.codingAgentDispatch\n .runApplicationVerificationChecks(checkRefs);\n /*\n * An infrastructure error is reported, never swallowed and never conflated with a failing\n * check: \"the application does not typecheck\" and \"we could not run the typecheck\" send an\n * operator to entirely different places, and only one of them is the application's fault.\n */\n return {\n playbookRef: input.playbookRef,\n verified: true as const,\n checkRefs: [...checkRefs],\n checks: verification.map(({ checkRef, outcome }) => {\n // stderr first: a compiler or a crashed node process reports its cause there; tsc prints to stdout.\n const output = [outcome.stderrTail, outcome.stdoutTail].map((tail) => tail.trim()).filter((tail) => tail.length > 0).join('\\n').slice(-VERIFICATION_CHECK_OUTPUT_TAIL_CHARS);\n return {\n checkRef,\n success: outcome.success,\n message: outcome.message,\n ...(!outcome.success && output.length > 0 ? { output } : {}),\n };\n }),\n passed: verification.every(({ outcome }) => outcome.success),\n ...(infrastructureError ? { infrastructureError: String(infrastructureError) } : {}),\n // No acceptance in the run itself: acceptance is a later commit, a person's or the posture's (#1534).\n accepted: false as const,\n };\n }\n\n if (playbook.executor === MetaWorkflow_Executor.HUMAN) {\n throw new PlaybookNotReadyError(\n `\"${input.playbookRef}\" declares executor ${playbook.executor}, which this runtime does not honour. `\n + 'It is a declared design with no implementation: HUMAN needs a decided contract for what a '\n + 'human-performed step returns and how a resume supplies it, and DETERMINISTIC_CLI needs a '\n + 'registry of runnable commands. Running it would take the default path and produce something '\n + 'the declaration did not ask for — see issue #119. Declare a tier the runtime honours '\n + `(${MetaWorkflow_Executor.COMPANION_AGENT}, ${MetaWorkflow_Executor.RESEARCH_AGENT}, ${MetaWorkflow_Executor.CODING_AGENT}), or build this one.`,\n );\n }\n\n /*\n * The foundation EXECUTOR branch (J-1 stall E: a zero-output playbook had no runnable door).\n * `bottom_up.foundation` lands no family — it composes the application itself from the approved\n * domain plan. READINESS was checked above like every run; the executor owns everything else\n * (the tenancy elicitation answer, the derivation, the compose engine, the capability flip).\n */\n /*\n * The EXPERT-PERSONAS branch (#572): staff every panel the catalog convenes.\n *\n * Before this, the panel's staffing was not a journey step at all — `bottom_up.placement-plan` and the\n * logo step failed closed at bind time on any application whose charters nobody had curled in, and the\n * eligibility board had said the playbook was eligible. The board now names the missing roles\n * (`PANEL_UNSTAFFED`) and this is the step that removes them. Runner-owned like foundation, because the\n * derive → accept flow already exists as companion services and composes no brief of its own.\n *\n * Idempotent by construction: a committed, current role is left alone, and one older than its inputs is derived\n * again (#2819); a role whose shaping inputs have not\n * landed is reported as WAITING (mark, never gate — `application-creation-directive.md`); a refusal on\n * one role (a human-edited charter, an invalid resulting set) is recorded and the others proceed. The run FAILS\n * when it staffed none of the roles it attempted, and at the first role an environmental fault reaches (#3204).\n */\n if (input.playbookRef === EXPERT_PERSONAS_PLAYBOOK_REF) {\n return this.staffExpertPanels({\n artifactState,\n ...(input.dryRun === true ? { dryRun: true } : {}),\n run: {\n runId,\n startedAt: runStartedAt,\n playbookVersion: playbook.version,\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n },\n });\n }\n\n /*\n * What every DETERMINISTIC executor branch below lands under (#3237): the run's identity, for the write record\n * {@link landDeterministicExecutorRun} computes from the run's landing window. Every branch that writes through a\n * runner-owned executor goes through that one door, so its output can be diffed, accepted and reverted like a\n * generation landing's, and the board dates it as landed instead of offering it as a FIRST RUN every round.\n */\n const deterministicLanding = {\n runId,\n playbookRef: input.playbookRef,\n startedAt: runStartedAt,\n playbookVersion: playbook.version,\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n dryRun: input.dryRun === true,\n };\n\n /*\n * The CAPABILITY-COMPOSITION executor branch (#1491): which optional packages (website, documentation\n * portal, workers, minions, locales) this application needs, DERIVED from the definition families and\n * landed as its own family — never generated. Keyed on the ref like the foundation branch, for the same\n * reason: a bespoke executor, not a tier. READINESS was checked above like every run.\n */\n if (input.playbookRef === CAPABILITY_COMPOSITION_PLAYBOOK_REF) {\n const valueOf = (family: string): unknown => {\n const value = artifactState.artifactsByFamily.get(family);\n return value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE ? undefined : value;\n };\n return this.landDeterministicExecutorRun<CapabilityCompositionExecutionResult>({\n ...deterministicLanding,\n // The executor reports what it wrote, relative to the specifications package: its family file and its wiring.\n declaredWrites: (result) => this.toApplicationRelativeSpecificationPaths(result.landed),\n execute: (noteWrite) => this.capabilityCompositionExecutor.execute({\n onWillWrite: (paths) => { for (const written of this.toApplicationRelativeSpecificationPaths(paths)) noteWrite(written); },\n inputs: {\n marketSnapshot: valueOf('market-snapshot'),\n brandBrief: valueOf('brand-brief'),\n businessModel: valueOf('business-model'),\n requirements: valueOf('requirements'),\n },\n ...(input.dryRun === true ? { dryRun: true } : {}),\n }),\n });\n }\n\n /*\n * The MATURITY-READING executor branch (#1496): where this application stands against its own\n * requirements, DERIVED from the requirements family, the decided-element graph and the build\n * plan's landing probe, and landed as its own family — never generated, for the composition's\n * reason and one stronger: a model asked where an application stands would answer, and nothing\n * could check the answer.\n *\n * It is a READING. Nothing downstream may gate on the stage it lands, because there is no \"done\"\n * for an application — the measurement moves, and the next requirement lowers it again.\n */\n if (input.playbookRef === APPLICATION_MATURITY_PLAYBOOK_REF) {\n // One composition of the reading's inputs, shared with the drive's requirements standing (#3701).\n const maturityInputs = await this.composeApplicationMaturityInputs(artifactState);\n return this.landDeterministicExecutorRun<ApplicationMaturityExecutionResult>({\n ...deterministicLanding,\n // A reading of the build's landed tasks, which are application code and no family: dated by the code (#3237 review H1).\n readsApplicationCode: true,\n // The executor reports what it wrote, relative to the specifications package: its family file and its wiring.\n declaredWrites: (result) => this.toApplicationRelativeSpecificationPaths(result.landed),\n execute: (noteWrite) => this.applicationMaturityExecutor.execute({\n onWillWrite: (paths) => { for (const written of this.toApplicationRelativeSpecificationPaths(paths)) noteWrite(written); },\n inputs: maturityInputs,\n ...(input.dryRun === true ? { dryRun: true } : {}),\n }),\n });\n }\n\n if (input.playbookRef === FOUNDATION_PLAYBOOK_REF) {\n const domainPlan = artifactState.artifactsByFamily.get('domain-plan');\n if (domainPlan === undefined || domainPlan === null || domainPlan === FILE_PRESENT_WITHOUT_VALUE) {\n throw new PlaybookNotReadyError(\n 'The foundation executor needs the domain-plan VALUE, and the specifications package does not expose it '\n + '(file-only presence). Wire `domainPlanSpecification` in companion-exports.ts — landings wire it '\n + 'automatically now; an older landed family needs the one-line wiring by hand — then restart the companion.',\n );\n }\n // The foundation names each file as it writes it, so a run refused part-way still records what it wrote.\n return this.landDeterministicExecutorRun<FoundationExecutionResult>({\n ...deterministicLanding,\n declaredWrites: (result) => result.writtenPaths,\n composes: (result) => result.stillComposedPaths,\n execute: (noteWrite, noteMayWrite) => this.foundationExecutor.execute({\n domainPlan,\n elicitationAnswers,\n ...(input.dryRun === true ? { dryRun: true } : {}),\n onWrite: noteWrite,\n onMayWrite: noteMayWrite,\n }),\n });\n }\n\n /*\n * Section composition as a function of an EFFECTIVE playbook, so the brief-adequacy repair arm\n * below can recompose ONCE with a widened `contextSources` declaration and nothing else. Every\n * composer already keys off `playbookDeclaresContextSource(effective, MEMBER)`, so widening the\n * declaration is the entire mechanism — no composer changes, and monotonicity is structural:\n * a union can only ADD sections, never remove or soften one (#254, design 2).\n */\n /*\n * Resolved ONCE, before the brief: the authority section lists the documentation requirements this input derives\n * (#707 stage 3), and the run hands the same input to the normalizers that key the programme and the release\n * policy to them. Resolving it twice could let the brief and the refusal disagree.\n */\n const requiredDocumentSet = await this.resolveRequiredDocumentSetInput(artifactState);\n /*\n * Also resolved ONCE, and for the same reason: the drafting brief tells the chooser which documents\n * the application already holds, and the landing merges the new draft into exactly that set. Two\n * reads could disagree — a brief saying \"not yet drafted\" about a document the landing then merges\n * over is the state this is here to prevent.\n */\n const existingComplianceDocumentCandidates = await this.readLandedComplianceDocumentCandidates();\n /** Who the privacy notice addresses, from the application's line (#1649); read once for both briefs below. */\n const organizationStructure = this.resolveOrganizationStructure(artifactState);\n /*\n * The build tasks already built (#3449), read once for a run producing the build plan: the brief names them so the\n * model keeps them, and the normalizer refuses an answer that drops or renames one, or changes its target or what it\n * produces (#3204). ONE read for both, so the two cannot disagree about what was built. Unreadable is absent, never\n * empty: \"not read\" is not \"nothing landed\", and it is loud (R10, `readBuiltTasksForBuildPlanRun`).\n */\n const producesBuildPlan = (playbook.outputs ?? []).some((output) => output.family === ApplicationSpecificationFamily.BUILD_PLAN);\n const landedBuildTasks = producesBuildPlan ? await this.readBuiltTasksForBuildPlanRun(input) : undefined;\n const landedBuildTasksSection = landedBuildTasks === undefined || landedBuildTasks.length === 0 ? '' : [\n '# Build tasks already built (keep every one, under its ref, with its target and products)',\n 'These tasks of the current build plan are built and committed. Your plan keeps each of them, under the same ref (author',\n 'its slug so it normalizes to that ref: the ref without its `build-task-` prefix), with its `target` and its `produces`',\n 'exactly as listed below: they are what proves the task built, so changing them makes built work read unbuilt. You may',\n 'refine what a built task\\'s objective says. Work a refresh adds goes in a NEW task. When an input of this plan REQUIRES',\n 'a built task\\'s target or products to change, declare it in `reshapedBuiltTasks` (its slug and the reason) and the task',\n 'is rebuilt. The reason is not the proof (#3491): a declared reshape is kept only when the task AS BUILT fails a check of',\n 'this plan against its inputs (the domain-plan coverage, the firm\\'s method, a reference that no longer resolves) and the',\n 'new shape repairs it. A plan that drops or renames a built task, changes one it does not declare, or declares a reshape',\n 'nothing requires, is refused.',\n ...[...landedBuildTasks].sort((left, right) => left.taskRef.localeCompare(right.taskRef)).map((task) =>\n `- \\`${task.taskRef}\\` — target ${JSON.stringify(task.target)}; produces ${JSON.stringify(task.produces)}${task.closed === true ? ' (closed by a person: never reshaped)' : ''}`),\n ].join('\\n');\n const composeGenerationOutputs = async (effective: typeof playbook): Promise<readonly PlaybookGenerationRequest[]> => {\n const workspaceTruthSection = await this.composeWorkspaceTruthSection(effective);\n const providerRegistrySection = await this.composeProviderRegistrySection(effective);\n const compliancePrimaryFactsSection = await this.composeCompliancePrimaryFactsSection(effective);\n const documentBlueprintSection = this.composeDocumentBlueprintSection(\n effective,\n existingComplianceDocumentCandidates,\n this.resolveDeclaredDocumentFacts(artifactState).declaredDocumentFacts,\n organizationStructure,\n );\n const documentFactObligationsSection = this.composeDocumentFactObligationsSection(effective, organizationStructure);\n const assuranceProgramAuthoritySection = this.composeAssuranceProgramAuthoritySection(effective, requiredDocumentSet.requiredDocumentSetInput);\n const applicationRoleGraphSection = await this.composeApplicationRoleGraphSection(effective);\n const assuranceEvidenceSection = await this.composeAssuranceEvidenceSection(effective);\n const riskSignalsSection = await this.composeRiskSignalsSection(effective);\n const authoredDocumentFactsSection = this.composeAuthoredDocumentFactsSection(effective, artifactState);\n const creatorStatedFactsSection = await this.composeCreatorStatedFactsSection(effective, artifactState);\n const applicationEnabledSurfaceSection = await this.composeApplicationEnabledSurfaceSection(effective);\n const inputTruthSection = await this.composeInputTruthSection(effective, artifactState);\n const marketFitScoresSection = await this.composeMarketFitScoresSection(effective, artifactState);\n return (playbook.outputs ?? []).map((output) => ({\n family: output.family,\n // A playbook output without a `schemaRef` has no family contract, so nothing could validate what the\n // model returned. Passing the empty string makes the runtime refuse it by name rather than here.\n schemaRef: output.schemaRef ?? '',\n ...declaredLandingScopeOf(output),\n brief: this.composeBrief({\n playbookRef: input.playbookRef,\n guidance: playbook.method?.guidance ?? '',\n family: output.family,\n creatorBrief: input.creatorBrief,\n selectionRationale: input.selectionRationale,\n elicitationSection: [elicitationSection, purposeSection].filter((part) => part !== '').join('\\n\\n'),\n inputTruthSection,\n workspaceTruthSection: output.family === ApplicationSpecificationFamily.BUILD_PLAN\n ? [workspaceTruthSection, landedBuildTasksSection].filter((section) => section !== '').join('\\n\\n')\n : workspaceTruthSection,\n providerRegistrySection,\n compliancePrimaryFactsSection,\n documentBlueprintSection,\n documentFactObligationsSection,\n assuranceProgramAuthoritySection,\n applicationRoleGraphSection,\n assuranceEvidenceSection,\n authoredDocumentFactsSection,\n skillCatalogSection: this.composeSkillCatalogSection(effective),\n skillBodiesSection: this.composeSkillBodiesSection(effective),\n coherenceSection: this.composeCoherenceSection(effective, artifactState),\n marketFitScoresSection,\n riskSignalsSection,\n operatingJurisdictionsSection: this.composeOperatingJurisdictionsSection(effective),\n creatorStatedFactsSection,\n applicationEnabledSurfaceSection,\n stepEvidenceSection: this.composeStepEvidenceSection(input.stepResults),\n parentElicitationSection: input.parentElicitationSection ?? '',\n clarificationAnswersSection: input.clarification\n ? composeClarificationAnswersSection(input.clarification.requests, input.clarification.answers, input.clarification.action)\n : '',\n }),\n }));\n };\n let outputs: readonly PlaybookGenerationRequest[] = await composeGenerationOutputs(playbook);\n let briefAdequacy: {\n verdict: BriefAdequacyVerdict;\n addedSources: readonly MetaWorkflow_ContextSource[];\n addedAspects: readonly string[];\n } | undefined;\n if (playbook.method?.briefAdequacyGate === true && outputs.length > 0) {\n const withheld = composeDeclaredInputWithheldAspects(playbook.inputs ?? [], this.decidedFamilyValues(artifactState));\n const judged = await this.judgeBriefAdequacy(playbook, outputs[0]!.brief, withheld);\n if (judged) {\n const declared = new Set(playbook.method?.contextSources ?? []);\n const excludedSources = new Set(playbook.method?.briefAdequacyExcludedSources ?? []);\n const addedSources = judged.missingSources.filter((source) => !declared.has(source) && !excludedSources.has(source));\n const addedAspects = judged.missingAspects;\n if (judged.verdict === BriefAdequacyVerdict.INSUFFICIENT && (addedSources.length > 0 || addedAspects.length > 0)) {\n const widened = {\n ...playbook,\n ...(addedAspects.length > 0 ? { inputs: widenDeclaredInputAspects(playbook.inputs ?? [], withheld, addedAspects) } : {}),\n method: { ...playbook.method, contextSources: [...declared, ...addedSources] },\n } as typeof playbook;\n outputs = await composeGenerationOutputs(widened);\n briefAdequacy = { verdict: BriefAdequacyVerdict.INSUFFICIENT, addedSources, addedAspects };\n this.logDebug('Brief-adequacy gate repaired the brief', { playbookRef: input.playbookRef, addedSources, addedAspects });\n } else {\n briefAdequacy = { verdict: judged.verdict, addedSources: [], addedAspects: [] };\n }\n }\n /*\n * ALWAYS logged, whatever the verdict — the first pilot run produced a state where \"ran and\n * judged sufficient\" and \"never ran at all\" were byte-identical to every observer (no log, no\n * trace, no result field), which is the silent-gate defect class this gate exists to remove.\n * A gate must SAY it gated.\n */\n this.logger.info('Brief-adequacy gate verdict', {\n playbookRef: input.playbookRef,\n verdict: briefAdequacy?.verdict ?? 'unavailable',\n addedSources: briefAdequacy?.addedSources ?? [],\n addedAspects: briefAdequacy?.addedAspects ?? [],\n });\n }\n\n /*\n * THE ASSESSMENT PATH — a playbook whose deliverable is a VERDICT, not a file.\n *\n * `runPlaybookGeneration` refuses `outputs: []` (\"declares no outputs to generate\"), which is\n * right for a producing playbook and wrong for an assessing one. `top_down.phase-gate` declares\n * five criteria and no outputs, so it has never been runnable: listed on the eligibility board\n * every time, 500 on every attempt, and the sanitized response said only \"internal\". That is the\n * lane's characteristic defect — a capability the catalog ADVERTISES and cannot deliver — for the\n * third time, and this instance was found by the first live run rather than by any test.\n *\n * An assessment run generates nothing, lands nothing and wires nothing. It judges the families\n * the playbook declares it reads, and returns the verdict with the review guide beside it. The\n * judge stays ADVISORY here as everywhere: it reports and nothing refuses on it.\n */\n if (outputs.length === 0) {\n return await this.runAssessmentPlaybook({ playbookRef: input.playbookRef, playbook, hydrated, artifactState, ...(input.session ? { session: input.session } : {}) });\n }\n\n this.logDebug('Running playbook', { playbookRef: input.playbookRef, outputCount: outputs.length });\n /*\n * ONE observed instant, used for both: the draft's `reviewedAt` and the date its cadence schedules\n * from. Two clock reads a millisecond apart could land either side of midnight and date the next\n * review from a different day than the review that scheduled it.\n */\n const recordedAt = new Date().toISOString();\n const nextReviewOn = resolveDeclaredAssuranceNextReviewOn(\n (this.companionContext.saasConfig as { assuranceReviewCadence?: unknown } | undefined)?.assuranceReviewCadence,\n recordedAt,\n );\n /*\n * What the compliance-programme normalizer refuses a NOT_APPLICABLE binding against — read by the\n * SAME method the authority brief reads, so what the producer was told cannot apply here is exactly\n * what is refused, and nothing else.\n */\n const enabledEngineCapabilities = this.readEnabledEngineCapabilities();\n const operatingJurisdictionSlugs = this.readOperatingJurisdictionSlugs();\n /*\n * #3045: what the system-of-record facets declare about splitting records by legal entity, for the domain-plan\n * normalizer to lay a record location's partition down from. Read only for a run producing the domain plan; a library\n * that cannot be read is left absent, and the normalizer records the split unconfirmed rather than guessing.\n */\n const systemOfRecordPartitionFields = await this.readSystemOfRecordPartitionFieldsFor(outputs);\n // #3995: what providers exist, so an integration plan binding nothing (or forking something) goes back to the model.\n const knownProviderRefs = await this.readKnownProviderRefsFor(outputs);\n /*\n * The landing IN FLIGHT (#3221): opened by the landing itself, just before its first write, with the paths it is\n * about to write, and told each later path before its write (#3237 review F1); released once the write record below\n * exists, or the landing fails (a `finally` below). Between the two, a coding door withholds exactly those paths\n * instead of committing them under a build task. The window holds the specifications package's bytes: a landing that\n * completes records its own files, and one that fails after its first write is recorded from the window (review M1).\n */\n let landingWindow: PlaybookRunLandingWindow | undefined;\n const result = await runPlaybookGeneration({\n readWriteBasis: () => this.readLandingWriteBasis(),\n onLandingWillWrite: async (packageRelativePaths) => {\n const paths = this.toApplicationRelativeSpecificationPaths(packageRelativePaths);\n if (landingWindow === undefined) landingWindow = await this.openLandingInFlight(runId, input.playbookRef, paths);\n else landingWindow.declare(paths);\n },\n playbookRef: input.playbookRef,\n // The INSTANCE (#1609): refused before generation, and at landing, unless every output is a keyed set.\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n // The members of each keyed set this playbook declares (#3896): it may land only those, which is what lets two\n // producers of one set run together.\n declaredSetMembers: new Map((playbook.outputs ?? []).flatMap((output) => {\n const members = resolveDeclaredSetMembers(playbook, output.family);\n return members === undefined ? [] : [[output.family, members] as const];\n })),\n outputs,\n specificationsPackageRoot,\n /*\n * The instant THIS HOST observed the run (#647). Supplied explicitly rather than letting the\n * runtime default it: the companion is the process a person is actually driving, so its clock is\n * the honest observer, and a caller that cares should say so rather than inherit one.\n *\n * It is not a review. The REVIEW is the commit — a landed programme is a working edit until a\n * human commits it — and this records when the draft was produced.\n */\n recordedAt,\n ...(nextReviewOn === undefined ? {} : { nextReviewOn }),\n ...(enabledEngineCapabilities === undefined ? {} : { enabledEngineCapabilities }),\n ...(operatingJurisdictionSlugs === undefined ? {} : { operatingJurisdictionSlugs }),\n ...(systemOfRecordPartitionFields === undefined ? {} : { systemOfRecordPartitionFields }),\n ...(knownProviderRefs === undefined ? {} : { knownProviderRefs }),\n ...(landedBuildTasks === undefined ? {} : { landedBuildTasks }),\n // NEUTRAL BY CONTRACT (issue #65): every landed specification constant carries the fixed\n // `application` prefix (`applicationVisionSnapshot`, `applicationBuildPlan`, …), never an\n // app-slug-derived one. The prefix used to be camelCased from the application's declared\n // name (`wonder-todos` → `wonderTodos`), which baked app identity into exported identifiers\n // — exactly what templates and companion introspection cannot rely on. App identity lives\n // in VALUES (`saasConfig.name`/`slug`), never in the names of landed exports.\n constantPrefix: LANDED_CONSTANT_PREFIX,\n model: this.buildArtifactGenerationPort(playbook),\n // The application's DECLARED document facts, so a compliance-document draft citing a fact\n // nobody declared is rejected into the retry rather than landed.\n //\n // The conditional spread is load-bearing and is the whole contract: ABSENT means \"not loaded,\n // skip the check\"; an EMPTY map means \"this application declares NO facts, so refuse every\n // citation\". Collapsing them would refuse every draft in every application that has not yet\n // run `refinement.document-facts`.\n ...this.resolveDeclaredDocumentFacts(artifactState),\n // The judged runs a citation may resolve against (#297), read from the SAME place the brief\n // renders its evidence section from. Absent stays absent for the reason above.\n ...this.resolveCommittedAssuranceRuns(),\n /*\n * The landed values, so the generation loop and the landing can refuse a citation of something\n * that does not exist — the coherence report's dangling class, moved from post-hoc page into\n * the findings-fed retry (2026-09-02). The same map eligibility and the input sections already\n * read; file-only sentinels ride along and are reported unreadable by the report, never thrown on.\n */\n landedFamilyValues: artifactState.artifactsByFamily,\n /*\n * The drafts already held. `undefined` only when this companion has no resolved specifications\n * package, where nothing could have been read and the landing's refusal is the honest outcome.\n */\n ...(existingComplianceDocumentCandidates === undefined ? {} : { existingComplianceDocumentCandidates }),\n /*\n * And re-read at LANDING (#1614): another drafter may land its document while this one is in its\n * model, and merging into the set read above would drop it. The start-of-run set stays the brief's.\n */\n reloadExistingComplianceDocumentCandidates: () => this.readLandedComplianceDocumentCandidates(),\n readBaselines,\n // WHICH documents this application needs, so a draft naming one it does not need is refused at\n // the landing and retried in the generation loop. Same absent-vs-empty contract as the facts\n // above: an omitted key skips the check rather than refusing everything.\n ...requiredDocumentSet,\n ...(input.dryRun === true ? { dryRun: true } : {}),\n ...(input.session ? { trace: this.buildTrace(input.session, `playbook-run-${input.playbookRef}`) } : {}),\n /*\n * The mid-run clarification channel. `mayAsk` is false once the round budget is spent, and\n * false for a CANCELLED or DECLINED resume — a creator who declined must not be asked the same\n * class of question again on the very next pass, which is how a conversation becomes a loop.\n */\n ...(playbook.method?.suspendsForClarification === true\n ? {\n clarification: {\n model: this.buildClarificationPort(),\n priorAnswers: input.clarification?.answers ?? [],\n // The questions and the response mode, so the landing can commit the DECISION RECORD\n // beside the artifact — an answer without its question reviews as nothing.\n ...(input.clarification ? { priorRequests: input.clarification.requests, priorAction: input.clarification.action } : {}),\n mayAsk: (input.clarification?.round ?? 0) < DEFAULT_MAXIMUM_CLARIFICATION_ROUNDS\n && input.clarification?.action !== MetaWorkflow_ClarificationAction.DECLINE,\n },\n }\n : {}),\n }).catch(async (error: unknown) => {\n try {\n /*\n * ANY failure after the landing's first write leaves what it had written in the tree (#3237 review F3, M1): a\n * conflict found at a later output's own write (#1614), a validation refusal, a diagram or decision write, a\n * wiring refusal. The window holds the bytes from before the first write, so what the declared paths changed is\n * recorded as this run's FAILED landing: owned and revertable, and the playbook not dated as landed by it.\n * `recordWindowLanding` releases the window; the `finally` below only covers a throw before it is reached.\n */\n if (landingWindow !== undefined && input.dryRun !== true) {\n // A conflict's own paths hold ANOTHER writer's bytes (that is the conflict), so they are never this run's (review F4).\n const conflicted = new Set(error instanceof PlaybookOutputLandingConflictError\n ? this.toApplicationRelativeSpecificationPaths(error.conflicts.map((conflict) => conflict.packageRelativePath))\n : []);\n await this.writeRegister.recordWindowLanding({\n window: landingWindow,\n run: { startedAt: runStartedAt, playbookVersion: playbook.version, ...(input.session ? { traceSessionId: input.session.sessionId } : {}) },\n declaredWrites: landingWindow.declaredPaths().filter((declared) => !conflicted.has(declared)),\n landingFailed: true,\n }).catch((recordError: unknown) => {\n this.logger.warn(`Run ${runId}'s landing failed after writing, and what it wrote could not be recorded: ${describeCaughtError(recordError)}`);\n });\n }\n } finally {\n await landingWindow?.release();\n }\n // A landing refused because its file moved since this run read it (#1614): name who moved it.\n if (error instanceof PlaybookOutputLandingConflictError) throw await this.describeLandingConflict(error, specificationsPackageRoot);\n throw error;\n });\n\n /*\n * Hoisted: read after the landing window is released, below. Everything from the landing's return to its record\n * runs inside a `try` whose `finally` releases the window (#3237 review F2), so a throw there (an aspect measure, a\n * placement parse) never leaves the marker withholding this run's paths for its whole bound.\n */\n let revertHandle: string | undefined;\n let revertedPlacementRevisions: ReturnType<typeof collectRevertedPlacementRevisions> = [];\n let landingRecorded = false;\n try {\n /*\n * THE INTERRUPT. The run produced nothing — the check runs before the artifact call — so there is\n * no partial work to reconcile: persist the checkpoint and hand the questions back. The creator\n * answers through the resume route and the run continues from here.\n */\n if (isPlaybookGenerationSuspension(result)) {\n const round = (input.clarification?.round ?? 0) + 1;\n const checkpoint: PlaybookRunSuspensionCheckpoint = {\n kind: PlaybookRunCheckpointKind.CLARIFICATION,\n playbookRef: input.playbookRef,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n family: result.family,\n round,\n dryRun: input.dryRun === true,\n ...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),\n ...(input.selectionRationale ? { selectionRationale: input.selectionRationale } : {}),\n ...(input.requestedByUserId ? { requestedByUserId: input.requestedByUserId } : {}),\n elicitationAnswers: elicitationAnswers.map((answer) => ({ ...answer })),\n // Cumulative: this round's answers join every earlier round's, so the next check never\n // re-asks anything the creator has already settled.\n priorAnswers: [...(input.clarification?.answers ?? [])],\n /*\n * CUMULATIVE, like the answers beside them — every round's questions, not just this one's.\n *\n * They were this round's alone until the first live multi-round conversation (2026-08-28),\n * which recorded round 2's two questions and silently lost round 1's three. The answers\n * carried forward and their QUESTIONS did not, so the committed decision record showed two\n * decisions out of five — and the three it dropped were the consequential ones (\"include\n * engagement tracking, defer invoicing\", \"an engagement may have multiple consultants\").\n *\n * A decision record that keeps the answers and loses the questions is worse than none: it\n * reads as a complete account of what was decided.\n *\n * Written field by field rather than spread, so a widened request cannot silently ride into\n * a persisted checkpoint without someone deciding it belongs there.\n */\n requests: accumulateClarificationRequests(input.clarification?.requests ?? [], result.requests).map((request) => ({\n ref: request.ref,\n question: request.question,\n why: request.why,\n kind: request.kind,\n ...(request.options ? { options: [...request.options] } : {}),\n })),\n };\n /*\n * The wait lives on the run's OWN execution row (#1360): the run id IS the handle the resume\n * route takes. The engine reads this registration when the run returns, moves both rows to\n * `AWAITING_APPROVAL`, and writes the decision and the checkpoint on the execution.\n */\n const suspended = {\n status: Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT as const,\n runId,\n playbookRef: input.playbookRef,\n family: result.family,\n round,\n requests: result.requests,\n };\n this.suspensionRequests.set(suspended, {\n decision: projectPlaybookClarificationAsDecision({ runId, requestedAt: new Date().toISOString(), checkpoint }),\n checkpointContext: checkpoint,\n /*\n * ROUTED to the person who started the run, when a person did (#1751): the engine then admits a\n * settle only from them and records who decided. A run with no signed-in starter stays unrouted.\n */\n ...(input.requestedByUserId\n ? { route: { kind: HumanDecision_RouteKind.OWNER }, requester: { kind: HumanDecision_RequesterKind.USER, ref: input.requestedByUserId } }\n : {}),\n });\n return suspended;\n }\n this.logDebug('Playbook run landed', {\n playbookRef: input.playbookRef,\n dryRun: input.dryRun === true,\n landed: result.landed.map((entry) => entry.packageRelativePath),\n });\n\n /*\n * WRITE REGISTER — every real run's files, with pre-images, so a mechanism-test run is revertible in\n * one call (`POST /runs/writes/:runId/revert`). Best-effort: the files are already on disk and git\n * already shows them, so a failed register write degrades the CONVENIENCE, never the run.\n */\n // The cross-family coherence report, refreshed from the tree this run just produced.\n //\n // Written on EVERY landing rather than by one playbook, because it is a pure function of the\n // landed families and any landing can change it — a coherence file that is only refreshed when\n // someone remembers is worse than none. `top_down.phase-gate` assesses exactly this and lands no\n // artifact, so its verdict lived only in whatever response the caller happened to keep.\n //\n // Composed from the PRE-run state overlaid with what just landed, not by re-reading: a second\n // introspection pass costs a subprocess import per run and would answer the same question.\n if (input.dryRun !== true) landingWindow?.declare(this.toApplicationRelativeSpecificationPaths([COHERENCE_REPORT_PACKAGE_RELATIVE_PATH]));\n const coherence = input.dryRun === true ? undefined : this.writeCoherenceReport(specificationsPackageRoot, artifactState, result.landedValues);\n\n /*\n * LOSE LOUDLY (issue #142). A panel re-run overwrites human placement revisions — that stays\n * true, and is the cheapest of the three options on the table — but it must not do it silently.\n *\n * `parsePlacementPlanGeneration` stamps every generated decision `DELIBERATED` and knows nothing\n * of a prior plan, and landing replaces the artifact wholesale. So a creator who moved Billing\n * and recorded WHY loses both the decision and the panel argument it superseded, with nothing in\n * the response saying so. Told, they re-apply it in one edit; untold, they find out when the rail\n * is wrong.\n *\n * Computed from the PRE-run artifact state and what just landed — the same two values the\n * coherence report above already uses, so no extra read.\n */\n const landedPlacementPlan = result.landedValues.find((entry) => entry.family === 'placement-plan');\n const incomingPlacementPlan = landedPlacementPlan === undefined\n ? undefined\n : PlacementPlanSchema.safeParse(landedPlacementPlan.value).data;\n revertedPlacementRevisions = incomingPlacementPlan === undefined\n ? []\n : collectRevertedPlacementRevisions(\n // `.data` is undefined when the application has no prior plan OR carries one this build\n // cannot parse. Both mean \"no prior revision I can vouch for\", and the collector's own\n // contract says an absent prior reverts nothing — a first run must not report reversions.\n PlacementPlanSchema.safeParse(artifactState.artifactsByFamily.get('placement-plan')).data,\n incomingPlacementPlan,\n );\n if (revertedPlacementRevisions.length > 0) {\n this.logger.warn(\n `Playbook '${input.playbookRef}' overwrote ${revertedPlacementRevisions.length} human placement revision(s): `\n + revertedPlacementRevisions\n .map((reverted) => `${reverted.subjectKey} (human: \"${reverted.revisedRationale}\"`\n + `${reverted.supersededRationale === undefined ? '' : `; panel had said: \"${reverted.supersededRationale}\"`})`)\n .join(' | ')\n + ' — re-apply the decision and set origin REVISED, or accept the panel\\'s.',\n );\n }\n\n /*\n * The REVERT handle, which is not the same statement as the run's identity even though it is the\n * same value. `runId` in the RESULT means \"this run is revertable through\n * `POST /runs/writes/:runId/revert`\", so it stays absent on a dry run and is cleared when the\n * register write fails — offering a handle to a record that does not exist would be worse than\n * offering none. The run still HAS an identity in both cases; it simply is not revertable.\n */\n if (input.dryRun !== true) {\n revertHandle = runId;\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);\n await this.writeRegister\n .record({\n runId,\n playbookRef: input.playbookRef,\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n startedAt: runStartedAt,\n playbookVersion: playbook.version,\n // What this landing measurably changed, per family (#2146): the rerun verdict reads it, not the declaration.\n ...(() => {\n // Every landed family is named: `null` records a change measured but not confinable to aspects (review R1).\n const aspectsChanged: Record<string, string[] | null> = {};\n for (const landed of result.landedValues) {\n const changed = measureChangedAspects(landed.family, artifactState.artifactsByFamily.get(landed.family), landed.value);\n aspectsChanged[landed.family] = changed === undefined ? null : [...changed];\n }\n return Object.keys(aspectsChanged).length > 0 ? { aspectsChanged } : {};\n })(),\n ...((briefAdequacy?.addedAspects.length ?? 0) > 0 ? { readAspectsAdded: [...briefAdequacy!.addedAspects] } : {}),\n at: new Date().toISOString(),\n files: [\n ...result.landed.map((entry) => ({\n path: path.posix.join(specificationsRelativeRoot, entry.packageRelativePath),\n existedBefore: entry.existedBefore,\n ...(entry.previousContent !== undefined ? { previousContent: entry.previousContent } : {}),\n writtenContent: entry.renderedSource,\n // Whether this landing replaced only what the run read, or merged over another writer (#1614).\n concurrency: entry.concurrency,\n })),\n // The export-wiring edits (companion-exports slot + barrel) travel in the SAME record, so\n // reverting a run also unwires it — a reverted family must not leave a dangling import.\n ...result.wired.map((entry) => ({\n path: path.posix.join(specificationsRelativeRoot, entry.packageRelativePath),\n existedBefore: true,\n previousContent: entry.previousContent,\n writtenContent: entry.renderedSource,\n })),\n // The coherence report rides the record too: it is derived from the families this run\n // changed, so reverting them must revert the report that describes them.\n ...(coherence ? [{\n path: path.posix.join(specificationsRelativeRoot, coherence.packageRelativePath),\n existedBefore: coherence.existedBefore,\n ...(coherence.previousContent !== undefined ? { previousContent: coherence.previousContent } : {}),\n writtenContent: coherence.renderedSource,\n }] : []),\n // Review diagrams ride the same record for the same reason: they are part of what the\n // creator commits, so a revert must take the picture with the plan it depicts.\n ...result.diagrams.map((entry) => ({\n path: path.posix.join(specificationsRelativeRoot, entry.packageRelativePath),\n existedBefore: entry.existedBefore,\n ...(entry.previousContent !== undefined ? { previousContent: entry.previousContent } : {}),\n writtenContent: entry.renderedSource,\n })),\n // And the decision records, for the same reason once more: a revert that left DECISIONS.md\n // behind would leave the questions standing beside an artifact that no longer exists.\n ...result.decisions.map((entry) => ({\n path: path.posix.join(specificationsRelativeRoot, entry.packageRelativePath),\n existedBefore: entry.existedBefore,\n ...(entry.previousContent !== undefined ? { previousContent: entry.previousContent } : {}),\n writtenContent: entry.renderedSource,\n })),\n ],\n })\n .catch((error: unknown) => {\n this.logDebug('Run write-register record failed (non-fatal)', { runId, error: String(error) });\n revertHandle = undefined;\n });\n landingRecorded = true;\n }\n } catch (error) {\n /*\n * A throw between the landing's return and its record (#3237 review F7): building the record's argument (an aspect\n * measure), the placement check, the coherence report. The files are on disk, so what the declared paths changed\n * is recorded as a FAILED landing from the window, as for a failure inside the landing; then the error goes on.\n */\n if (!landingRecorded && landingWindow !== undefined && input.dryRun !== true) {\n await this.writeRegister.recordWindowLanding({\n window: landingWindow,\n run: { startedAt: runStartedAt, playbookVersion: playbook.version, ...(input.session ? { traceSessionId: input.session.sessionId } : {}) },\n declaredWrites: landingWindow.declaredPaths(),\n landingFailed: true,\n }).catch((recordError: unknown) => this.logger.warn(`Run ${runId} landed, then failed before its record, and what it wrote could not be recorded: ${describeCaughtError(recordError)}`));\n }\n throw error;\n } finally {\n // The record exists (or never will): the landing is no longer in flight (#3221).\n await landingWindow?.release();\n }\n\n /*\n * The ADVISORY judge — the first live reader of the compiled evaluation treatments.\n *\n * It runs AFTER the files are landed, its verdicts go to the trace and the response, and nothing here\n * (or anywhere) refuses on them: promoting a verdict into a guard is a deliberate later decision\n * (`.claude/rules/application-creation-directive.md`). A malformed or absent treatment is a skip.\n */\n let judge: PlaybookJudgeResult | undefined;\n if (hydrated.evaluationTreatment) {\n const treatment = MetaWorkflow_EvaluationTreatmentDefinitionSchema.safeParse(hydrated.evaluationTreatment.value);\n const judgeEvidence = treatment.success\n ? await this.composeGenerationJudgeEvidence(playbook, artifactState, result.landedValues.map((entry) => entry.family), result.landedValues)\n : undefined;\n // The SAME composer the generation brief used, over the same step results — so the judge reads\n // the evidence in the shape the generator was given it, rather than a second rendering of it.\n const stepEvidenceForJudge = this.composeStepEvidenceSection(input.stepResults);\n /*\n * What this run landed, research-informed families screened before the judge reads them (#2938): a GAP's rationale\n * becomes this step's next instruction, so a family a research-fed step wrote is read withheld or marked here as\n * it is everywhere else it is read.\n */\n const judgedLanded = treatment.success ? await this.screenLandedValuesForJudge(input.playbookRef, artifactState, result.landedValues) : [];\n judge = treatment.success\n ? await runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed: judgedLanded,\n ...(artifactState.applicationLine ? { notApplicableFamilies: artifactState.applicationLine.notApplicableFamilies } : {}),\n ...(judgeEvidence && judgeEvidence.acceptedInputs.length > 0 ? { acceptedInputs: judgeEvidence.acceptedInputs } : {}),\n ...(judgeEvidence && judgeEvidence.derivedContext.length > 0 ? { derivedContext: judgeEvidence.derivedContext } : {}),\n /*\n * The evidence THIS RUN gathered (#1432). `top_down.market-snapshot-produce` judges whether\n * its snapshot is grounded in the sealed research evidence, and the judge was handed every\n * source except that one — the generator got it, the grader did not.\n */\n ...(stepEvidenceForJudge ? { stepEvidence: stepEvidenceForJudge } : {}),\n // The creator's own input is the ground truth several criteria judge groundedness against —\n // without it the vision criterion could only answer INDETERMINATE (the first live finding).\n ...(input.creatorBrief || elicitationAnswers.length || elicitationNonAnswers.length\n ? {\n creatorInput: {\n ...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),\n ...(elicitationAnswers.length ? { elicitationAnswers } : {}),\n ...(elicitationNonAnswers.length ? { elicitationNonAnswers } : {}),\n },\n }\n : {}),\n model: this.buildGenerationPort(),\n ...(input.session ? { trace: this.buildTrace(input.session, `playbook-judge-${input.playbookRef}`) } : {}),\n })\n : { judged: false, skipped: `Compiled evaluation treatment does not satisfy its contract: ${treatment.error.issues[0]?.message ?? 'unknown issue'}` };\n this.logDebug('Playbook judge answered', { playbookRef: input.playbookRef, judge });\n /*\n * A GAP verdict is recorded ON THE LANDING (#2142), so the next unattended round can tell a rejected,\n * unchanged playbook (stuck) from an accepted one (finished): both are CURRENT, and withheld alike.\n * Only when the writes were recorded (`revertHandle`); best-effort, like the record itself — a lost\n * stamp makes the playbook read as finished, which re-offers nothing.\n */\n if (revertHandle !== undefined && judge.judged && judge.overall === MetaWorkflow_EvaluationVerdict.GAP) {\n const criteria = judge.criteria\n .filter((criterion) => criterion.verdict === MetaWorkflow_EvaluationVerdict.GAP)\n .map((criterion) => ({ criterionRef: criterion.criterionRef, ...(criterion.rationale.length > 0 ? { rationale: criterion.rationale } : {}) }));\n await this.writeRegister.markJudgedGap(revertHandle, criteria).catch((error: unknown) => {\n this.logDebug('Run write-register GAP stamp failed (non-fatal)', { runId: revertHandle, error: String(error) });\n });\n }\n }\n /*\n * Items the landing DROPPED (#2556): an onboarding document whose host view no plan contains goes, and the rest of\n * the plan lands. Named in the log as well as on the response, because a choreography child's response reaches no\n * person: this is where an unattended run says what the reviewer of the commit should know is gone.\n */\n const droppedItems = result.landed.flatMap((record) => (record.droppedUnresolvableItems ?? []).map((item) => ({ family: record.family, ...item })));\n for (const record of result.landed) {\n if (record.droppedUnresolvableItems === undefined) continue;\n this.logger.warn(`Playbook \"${input.playbookRef}\" landed \"${record.family}\" without ${record.droppedUnresolvableItems.length} item(s) or entries whose refs resolve to nothing`, {\n family: record.family,\n dropped: record.droppedUnresolvableItems.map((item) => `${item.aspectKey} ${item.itemRef} (${item.scope}): ${item.field} → ${item.missingRefs.join(', ')}`),\n });\n }\n /*\n * Elements the generation's LAST attempt removed rather than refuse the output (#3995 review follow-up): a recorded need\n * naming a provider that exists, or a binding to a provider nothing provides. Said here for the same reason as the\n * dropped items above: an unattended run's response reaches no person.\n */\n for (const attempt of result.generation) {\n if (attempt.lastAttemptRemovals === undefined) continue;\n this.logger.warn(`Playbook \"${input.playbookRef}\" landed \"${attempt.family}\" after its last attempt removed ${attempt.lastAttemptRemovals.length} element(s) it could not correct`, {\n family: attempt.family,\n removed: attempt.lastAttemptRemovals,\n });\n }\n // On the run's write record too, so the commit that accepts it names what is missing (best-effort, like the record).\n if (revertHandle !== undefined && droppedItems.length > 0) {\n await this.writeRegister.markDroppedItems(revertHandle, droppedItems).catch((error: unknown) => {\n this.logDebug('Run write-register drop stamp failed (non-fatal)', { runId: revertHandle, error: String(error) });\n });\n }\n // The pre-images and rendered bytes stay in the register; the response and downstream readers get the\n // slim landing records they always had.\n const slim = {\n ...result,\n landed: result.landed.map(({ renderedSource: _renderedSource, previousContent: _previousContent, existedBefore: _existedBefore, ...entry }) => entry),\n wired: result.wired.map(({ renderedSource: _renderedSource, previousContent: _previousContent, ...entry }) => entry),\n diagrams: result.diagrams.map(({ renderedSource: _renderedSource, previousContent: _previousContent, existedBefore: _existedBefore, ...entry }) => entry),\n decisions: result.decisions.map(({ renderedSource: _renderedSource, previousContent: _previousContent, existedBefore: _existedBefore, ...entry }) => entry),\n };\n // WHAT TO CHECK — the playbook's own criteria, in the creator's terms rather than as refs.\n // Composed from the TREATMENT, so it is present on a dry run and on a run whose judge stayed\n // silent: withholding \"what does done mean\" exactly when the automated check did not arrive is\n // the opposite of useful.\n const reviewGuide = renderPlaybookReviewGuide(buildPlaybookReviewGuide({\n treatment: hydrated.evaluationTreatment?.value,\n ...(judge !== undefined ? { judge } : {}),\n }));\n\n /*\n * Does the application still LOAD, having been written to?\n *\n * A run verifies that it WROTE a file. It has never verified that the application survived — and on\n * 2026-09-16 two consecutive runs on Wonder Todos showed both halves of what that costs. One answered\n * 200 with the advisory judge passing and left the specifications package with 249 type errors; the\n * next answered 500 in a second, because a landed family no longer satisfied a hand-authored module\n * that throws at import, and `companion-exports` — which the config loader imports — could not be\n * evaluated at all. Every companion request failed for the rest of the session, INCLUDING the runs\n * that would have landed the correction. The remedy needed the mechanism the landing had taken down.\n *\n * `readArtifactState` is that load, and it genuinely re-reads what this run just wrote:\n * `loadSpecificationsCompanionData` asks again whenever the authored tree's signature moved, and the\n * worker that answers evaluates it with a fresh module cache, so a long-lived companion cannot answer\n * from an evaluation frozen before the landing (#170, #3205). Without that this check would pass on a\n * broken landing and be worse than nothing.\n *\n * It REPORTS rather than throws, and the asymmetry is the point. The files are already on disk and the\n * run genuinely produced them; converting that into a failed run would hide the artifacts an operator\n * now has to look at. What the operator needs is to be told, at the moment it happened, by the run that\n * caused it — with the revert door beside it, which the response note already names.\n *\n * NOT a typecheck. `bottom_up.assemble-verify` owns that question for the whole application and stays\n * where it is: a type error is visible, local, and leaves the companion running to fix it. A load\n * failure is the one that takes down the lane that would land the fix.\n */\n const landingLoadFailure = input.dryRun === true ? undefined : await this.describeLandingLoadFailure();\n\n return {\n ...slim,\n reviewGuide,\n // Present only when the landing broke the load — an absent field is the ordinary, healthy run.\n ...(landingLoadFailure === undefined ? {} : { landingLoadFailure }),\n // Reported even when empty is WRONG here — an empty array on every run of every playbook is\n // noise. Present means \"this run overwrote human decisions\"; absent means it did not.\n ...(revertedPlacementRevisions.length > 0 ? { revertedPlacementRevisions } : {}),\n ...(judge !== undefined ? { judge } : {}),\n ...(revertHandle !== undefined ? { runId: revertHandle } : {}),\n ...(input.dryRun === true ? { dryRun: true } : {}),\n };\n }\n\n /**\n * The application's config load, re-run against what this run just wrote, as a sentence or `undefined`.\n *\n * `undefined` means it loaded. Anything else is the message an operator must act on, and it names the\n * revert door because a landing that breaks the load is the case where that door exists.\n */\n private async describeLandingLoadFailure(): Promise<string | undefined> {\n try {\n await this.readArtifactState();\n return undefined;\n } catch (error) {\n const reason = describeCaughtError(error);\n this.logDebug('Landing broke the application config load', { reason });\n return `This run's files are on disk, and the application can no longer be loaded with them: ${reason}`\n + ' Nothing downstream will work until this is resolved — revert this run with `wildo creation revert <runId>` (the runId is in this response),'\n + ' or correct the family it names.';\n }\n }\n\n /**\n * The evidence a GENERATION-path judge reads the landed values against: what the run was given (#964 step 2).\n *\n * Until this existed the generation-path judge received the landed values and the creator's input, and\n * nothing else — so a criterion asking whether an artifact claims more than the application accepted\n * could only read the artifact. The run's brief carried the evidence; the judge never saw it.\n *\n * - `acceptedInputs`: the playbook's declared input families, the same section the generator read.\n * - `derivedContext`: the objectives a compliance programme may bind — each one's intent and its\n * applicability COMPUTED for this application — when the playbook declares that source; the\n * application's compliance-relevant declarations when it declares that one; and — when the run landed\n * `document-facts` — the facts the runtime computed, which the file omits on purpose and a judge must\n * neither ask for nor let a landed fact contradict; and — when the run landed a `brand-brief` — the theme point its\n * style words derive, computed with the build's own function (#2818).\n *\n * Best-effort, like the judge itself: a declarations read that fails leaves that section out rather\n * than failing a run whose files have already landed. The criterion then answers INDETERMINATE.\n */\n private async composeGenerationJudgeEvidence(\n playbook: MetaWorkflowPlaybook,\n state: PlaybookArtifactState,\n landedFamilies: readonly string[],\n /**\n * The values this run PRODUCED, when the caller holds them.\n *\n * Two entries are read: the compliance-document-candidate ones, to learn which documents the run drafted, and\n * the brand-brief one, whose style words the judge's derived look is computed from (#2818). Omitted means \"the caller does not know\", not \"the run produced\n * none\" — disk then answers,\n * which is the behaviour every caller had before.\n */\n draftedValues?: readonly { readonly family: string; readonly value: unknown }[],\n ): Promise<{ acceptedInputs: readonly string[]; derivedContext: readonly string[] }> {\n const inputTruthSection = await this.composeInputTruthSection(playbook, state);\n let compliancePrimaryFactsSection = '';\n try {\n compliancePrimaryFactsSection = await this.composeCompliancePrimaryFactsSection(playbook);\n } catch (error) {\n this.logDebug('Judge evidence: compliance declarations unavailable (section omitted)', { error: String(error) });\n }\n /*\n * Without this a judge asked whether a bound objective's intent is TRUE of this product sees the\n * objective's REF and nothing it demands — and cannot tell an APPLICABLE claim from one the\n * application's capabilities leave UNDETERMINED. Pure and synchronous, so it cannot fail the run.\n */\n const assuranceProgramAuthoritySection = this.composeAssuranceProgramAuthoritySection(playbook);\n const computedFactsSection = landedFamilies.includes('document-facts')\n ? renderComputedDocumentFactsForJudge(state.computedDocumentFactAnswers)\n : '';\n /*\n * The catalog's claim guards for the drafted documents (#1452) — the prohibitions the drafting brief keeps\n * out of the drafter's prompt on purpose, which therefore reached no reader at all until the judge got them.\n * Best-effort like every section here: an unreadable candidate set leaves it out, and a criterion that needs\n * it answers INDETERMINATE rather than passing on silence.\n */\n let claimGuardsSection = '';\n if (landedFamilies.includes('compliance-document-candidate')) {\n try {\n /*\n * The documents THIS RUN produced come first, and reading them off disk is the fallback.\n *\n * Disk alone was the whole answer until 2026-09-22, and it is right only when landing has already\n * happened — which is true of an ordinary run and false of the two paths that matter most for\n * catching a bad claim. Measured on the first live governance run: a DRY run drafted\n * `governance.scope-system-description`, wrote nothing by design, and the judge was handed the\n * guards of the two PUBLIC documents already on disk. It answered INDETERMINATE — correctly, and\n * about a document nobody had asked it to judge. The judge bench has the same shape for the same\n * reason, and a bench caller supplying a document the application has not landed is its normal use.\n *\n * So the run's own drafts decide, and disk answers only when the run produced none.\n */\n const draftedDocumentRefs = draftedCandidateDocumentRefs(draftedValues);\n const documentRefs = draftedDocumentRefs.length > 0\n ? draftedDocumentRefs\n : ((await this.readLandedComplianceDocumentCandidates()) ?? []).map((candidate) => String(candidate.documentRef));\n claimGuardsSection = renderAssuranceDocumentClaimGuardsForJudge(documentRefs);\n } catch (error) {\n this.logDebug('Judge evidence: drafted candidates unreadable, claim guards omitted', { error: String(error) });\n }\n }\n /*\n * The COHERENCE report, for a generation playbook that declares it (#1638). The assessing path hands\n * it to its judge (the 2026-09-02 fix above `runAssessmentPlaybook`); the generation path put it in\n * the brief and never in the judge's evidence, so a generator's judge asked whether the conception\n * it built on is sound could not see the arithmetic that answers it. Gated on the same declaration,\n * so nothing changes for a playbook that does not declare it.\n */\n const coherenceSection = this.composeCoherenceSection(playbook, state);\n /*\n * The look the drafted brand's style words derive (#2818), when the run landed a brand brief. The judge checks the\n * words honour the creator's visual direction, and words that read faithfully can derive the opposite look; the\n * point is computed with the build's own function, never asked of a model. The run's own draft decides, and the\n * application's brief answers only when the caller holds no draft, as for the claim guards above. Pure, so it\n * cannot fail the run.\n */\n const brandBrief = landedFamilies.includes('brand-brief')\n ? draftedValues?.find((entry) => entry.family === 'brand-brief')?.value ?? state.artifactsByFamily.get('brand-brief')\n : undefined;\n // A brief that is on disk but unreadable says nothing about its words, so it adds no section rather than one\n // claiming the brief states no visual tone.\n const brandDerivedLookSection = brandBrief === undefined || brandBrief === null || brandBrief === FILE_PRESENT_WITHOUT_VALUE\n ? ''\n : renderBrandDerivedLookForJudge(brandBrief);\n /*\n * What the creator stated in the other interviews (#2498, #2499 review F3), for a playbook that declares it. A\n * requirement drawn from a stated fact (VAT numbers on quotes, a named e-invoicing regime) read as untraced to a\n * judge that saw only the vision and the market, and a stated fact dropped without an exclusion was invisible to it.\n * Creator truth, so it is an accepted input beside the declared families.\n */\n let creatorStatedFactsSection = '';\n try {\n creatorStatedFactsSection = await this.composeCreatorStatedFactsSection(playbook, state);\n } catch (error) {\n // Best-effort like every section here (review N2): an advisory judge never fails the run it judges.\n this.logDebug('Judge evidence: creator stated facts unavailable (section omitted)', { error: String(error) });\n }\n const acceptedInputs = [inputTruthSection, creatorStatedFactsSection].filter((section) => section !== '');\n /*\n * The organization model the configuration already declares (#3035, #3039), for a playbook planning against the\n * workspace: the build plan's judge decides whether a type, kind or instance was duplicated or revised in place, and\n * cannot without it. Best effort inside the composer, which says when the configuration could not be read.\n */\n const organizationConfigurationSection = playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.WORKSPACE_TRUTH)\n ? (await this.composeOrganizationConfigurationLines()).join('\\n')\n : '';\n return {\n acceptedInputs,\n derivedContext: [\n assuranceProgramAuthoritySection, compliancePrimaryFactsSection, computedFactsSection, claimGuardsSection, coherenceSection, brandDerivedLookSection,\n organizationConfigurationSection,\n ].filter((section) => section !== ''),\n };\n }\n\n /**\n * Whether a FAMILY the run may have read cannot be read at this landing (#3258, #3451), asked now rather than at the\n * run's start. Only a family can have shortened what a run composed: a fault in a `modules/**` file is no longer one\n * of them, so it holds no family landing. The commonest family fault is a sibling package mid-rebuild under a family\n * that imports it, and a paid run must not lose its output to that: so it is asked about again once the watchers\n * settle, the same two bounded waits the lane takes around a child, and only a fault that outlives them holds the\n * landing. A fault that may be a build behind is never held by the door, so the second ask is a real one. Both waits\n * proceed on timeout, so a tree that never settles holds rather than hangs.\n *\n * LIMIT: this asks about the families now, not about what the run read. A family that failed after the run's read and\n * recovered before this one leaves a clean answer over a short input read. Narrow, and it can reach a write.\n */\n private async readLandingWriteBasis(): Promise<SpecificationWriteBasis> {\n const basis = await readSpecificationFamiliesWholeValueBasis(this.companionContext);\n if (basis.unevaluatedModules.length === 0) return basis;\n const log = (message: string, context?: Record<string, unknown>) => this.logDebug(message, { ...context, heldBy: basis.unevaluatedModules });\n await waitForDevCompileQuiet({ frameworkRepositoryRoot: this.companionContext.resolvedHomes.framework.repositoryRoot, log });\n await waitForApplicationPackagesPublished({ saasRoot: this.companionContext.saasRoot });\n return readSpecificationFamiliesWholeValueBasis(this.companionContext);\n }\n\n /**\n * The runs whose landing is on disk where this run was refused (#1614): for each conflicted file, the\n * recorded run whose written bytes the file holds NOW. Read from the write register, which already keeps\n * every run's exact bytes; a file no recorded run wrote (a person's edit) names nobody.\n */\n private async describeLandingConflict(error: PlaybookOutputLandingConflictError, specificationsPackageRoot: string): Promise<PlaybookRunLandingConflictError> {\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);\n let records: Awaited<ReturnType<PlaybookRunWriteRegisterCompanionService['list']>> = [];\n try {\n records = await this.writeRegister.list();\n } catch {\n // The register is a cache; without it the conflict is still refused, it just names nobody.\n }\n const overlapping = new Map<string, { runId: string; playbookRef: string }>();\n for (const conflict of error.conflicts) {\n const appRelativePath = path.posix.join(specificationsRelativeRoot, conflict.packageRelativePath);\n const current = await readFile(path.join(specificationsPackageRoot, conflict.packageRelativePath)).catch(() => undefined);\n const writer = records.find((record) => record.files.some((file) => file.path === appRelativePath && holdsWrittenBytes(file, current)));\n if (writer) overlapping.set(writer.runId, { runId: writer.runId, playbookRef: writer.playbookRef });\n }\n return new PlaybookRunLandingConflictError(error.conflicts, [...overlapping.values()], error.message);\n }\n\n /**\n * Run one PHASE of a playbook run under its own trace step, with a `started` and a `completed` (or\n * `failed`) event carrying its duration (#1639).\n *\n * The phases this wraps are the reads a run makes BEFORE it does anything a trace already shows: the\n * artifact state (the whole compiled specifications package, git freshness per family, the build\n * plan's execution state) and a composite's build-progress baseline. On a loaded machine they took a\n * market-analysis dry run thirty-eight minutes with nothing in its trace session after the opening\n * actor-plane reads, which read exactly like a hang. The STARTED event is the point: a phase that never\n * returns is then visibly the one it is stuck in. Best-effort, as every trace write is.\n */\n private async traceRunPhase<T>(session: CompanionExecutionSessionContext | undefined, label: string, work: () => Promise<T>): Promise<T> {\n if (!session) return work();\n const step = this.traceability.createStep(session, { kind: PLAYBOOK_RUN_PHASE_TRACE_STEP_KIND, label });\n const startedAt = Date.now();\n await this.traceability.traceEvent({ session, step, minimumLevel: CompanionTraceabilityLevel.DEBUG, type: 'playbook-run-phase-started', summary: `${label} started` });\n try {\n const result = await work();\n const durationMs = Date.now() - startedAt;\n await this.traceability.traceEvent({ session, step, minimumLevel: CompanionTraceabilityLevel.DEBUG, type: 'playbook-run-phase-completed', summary: `${label} took ${durationMs} ms`, payload: { label, durationMs } });\n return result;\n } catch (error) {\n const durationMs = Date.now() - startedAt;\n await this.traceability.traceEvent({ session, step, minimumLevel: CompanionTraceabilityLevel.DEBUG, type: 'playbook-run-phase-failed', summary: `${label} failed after ${durationMs} ms`, payload: { label, durationMs, error: describeCaughtError(error) } });\n throw error;\n }\n }\n\n /** One trace step per run, so a session with several runs keeps their artifacts apart. */\n private buildTrace(session: CompanionExecutionSessionContext, kind: string) {\n return createPlaybookExecutionTrace({\n traceability: this.traceability,\n session,\n step: this.traceability.createStep(session, { kind: META_WORKFLOW_TRACE_STEP_KIND, label: kind }),\n });\n }\n\n /**\n * Everything the model is allowed to know, in one string.\n *\n * The playbook's compiled `method.guidance` is the METHOD; the creator brief is the SUBJECT. They are\n * labelled separately so the model can tell \"how to do this\" from \"what this application is\", and the\n * target family is named explicitly because one playbook may declare several outputs and each call\n * produces exactly one of them.\n */\n /**\n * What sibling steps returned, rendered for the child that derives from them.\n *\n * ## Why this exists, and it is the defect the composite's own R14 comparison found\n *\n * The produce child was reached through `runPlaybook`, which used the run's step results ONLY for\n * its eligibility check — so the choreography gathered evidence, judged it adequate, opened the\n * gate, and then produced a market snapshot the evidence had never reached. Measured 2026-08-29:\n * the composite's snapshot carried ZERO source URLs, exactly like the single-call leaf it was built\n * to beat, because the producer had nothing to cite. The whole claim of the lane — that a snapshot\n * rests on pages someone read — was false at the last hop, and every earlier stage looked correct.\n *\n * Rendered verbatim rather than summarised: the condensation already happened at the step's own\n * contract, and condensing twice is how a source URL becomes \"several sources indicate\".\n */\n private composeStepEvidenceSection(stepResults: ReadonlyMap<string, unknown> | undefined): string {\n /*\n * DERIVED judge verdicts are excluded (#1498). This section tells its reader that what follows is\n * \"what earlier steps of this run actually found\" and asks it to record that provenance on what\n * it authors — true of research text and of an adequacy verdict a child produced, false of a\n * verdict the runtime derived ABOUT a child. Rendering one here would hand a generator a grade to\n * cite as a source, and hand the next JUDGE an earlier judge's answer framed as evidence, which\n * is the conformity failure `app-creation-judge-growth.md` warns a panel against.\n */\n // `new Map()` rather than `[]`: an empty ARRAY widens the entry key to `string | number` and the ref\n // no longer satisfies a `string` parameter. Same emptiness, and it keeps the map's own entry type.\n const evidence = [...(stepResults ?? new Map<string, unknown>()).entries()].filter(([ref]) => !isJudgeVerdictStepRef(ref));\n if (evidence.length === 0) return '';\n return [\n '# Evidence gathered for this run (from sibling steps)',\n 'This is what earlier steps of this run actually found. Derive from it rather than from recall,',\n 'and where a claim rests on one of these sources, RECORD that provenance on the entity you author',\n '— an unsourced claim and a sourced one must not be indistinguishable in what you land.',\n 'Where the evidence does not cover something, say so on the entity rather than inventing it.',\n '',\n ...evidence.map(([ref, value]) =>\n `## ${ref}\\n${typeof value === 'string' ? value : JSON.stringify(value, null, 1)}`),\n ].join('\\n');\n }\n\n /**\n * Judge ONE composed brief through the dedicated structured gate agent. FAIL-OPEN by returning\n * null on any fault — an auxiliary judgment must never withhold a generation (the turn\n * classifier's contract, for the same reason). The judge sees the closed list of UNDECLARED\n * sources only, so the repair arm can never be talked into removing anything.\n */\n private async judgeBriefAdequacy(\n playbook: MetaWorkflowPlaybook,\n brief: string,\n withheld: DeclaredInputWithheldAspects,\n ): Promise<{\n verdict: BriefAdequacyVerdict;\n missingSources: readonly MetaWorkflow_ContextSource[];\n missingAspects: readonly string[];\n } | null> {\n try {\n const declared = new Set(playbook.method?.contextSources ?? []);\n const excluded = new Set(playbook.method?.briefAdequacyExcludedSources ?? []);\n const undeclared = Object.values(MetaWorkflow_ContextSource).filter((source) => !declared.has(source) && !excluded.has(source));\n /*\n * Two repair vocabularies, and the gate runs when EITHER is non-empty (#1422). Before, a\n * playbook that declared every context source returned here — even with a narrowed input\n * family withholding most of what it reads, which is the case the aspect repair exists for.\n */\n if (undeclared.length === 0 && withheld.proposableAspectKeys.length === 0) return null;\n const prompt = [\n 'Judge whether the generation brief below is SUFFICIENT to produce its declared artifact.',\n ...(undeclared.length > 0\n ? [\n 'If it is not, name which of these UNDECLARED context sources would repair it (these are the only',\n `admissible source proposals): ${undeclared.join(', ')}`,\n ]\n : ['Every context source this runtime composes is already in the brief; propose none.']),\n '',\n ...(withheld.rendered === '' ? [] : [withheld.rendered, '']),\n '# The brief',\n brief,\n ].join('\\n');\n const invocation: FlowsActors_Agent_Invocation<any, any> = {\n agentRef: BRIEF_ADEQUACY_JUDGE_AGENT_REF,\n initiator: {},\n invocationContext: [],\n input: { prompt, schema: BriefAdequacyVerdictOutputSchema },\n output: { object: {} },\n executionContext: {},\n artifactBindings: [],\n };\n const response = await this.agents.invokeAgent(invocation);\n const parsed = BriefAdequacyVerdictOutputSchema.safeParse((response.output as { object?: unknown } | undefined)?.object);\n if (!parsed.success) return null;\n /*\n * The aspect bound is enforced HERE rather than in the schema, because aspect keys are\n * per-family and open where `MetaWorkflow_ContextSource` is closed. The admissible set is\n * exactly the map the judge was shown, so an invented key — or an aspect of a family this\n * playbook does not declare — is dropped rather than widening the playbook's family set.\n */\n const proposable = new Set(withheld.proposableAspectKeys);\n return {\n verdict: parsed.data.verdict,\n missingSources: parsed.data.missingSources,\n missingAspects: parsed.data.missingAspects.filter((aspectKey) => proposable.has(aspectKey)),\n };\n } catch (error) {\n this.logger.warn('Brief-adequacy gate failed; generating from the static brief (fail-open)', {\n playbookRef: playbook.ref,\n error: error instanceof Error ? error.message : (() => { try { return JSON.stringify(error)?.slice(0, 400) ?? String(error); } catch { return String(error); } })(),\n });\n return null;\n }\n }\n\n private composeBrief(input: {\n readonly playbookRef: string;\n readonly guidance: string;\n readonly family: string;\n readonly creatorBrief: string | undefined;\n /** Why the journey loop chose this playbook this round (#1423). Empty for any other caller. */\n readonly selectionRationale: string | undefined;\n readonly elicitationSection: string;\n readonly inputTruthSection: string;\n readonly workspaceTruthSection: string;\n /** The provider modules the registry offers. Empty unless the playbook declares the source. */\n readonly providerRegistrySection: string;\n readonly compliancePrimaryFactsSection: string;\n /** What the engine catalog OBLIGES the drafted document to contain. Empty unless the playbook declares it. */\n readonly documentBlueprintSection: string;\n /** The catalog's required fact NAMES. Empty unless the playbook declares it. */\n readonly documentFactObligationsSection: string;\n readonly assuranceProgramAuthoritySection: string;\n readonly applicationRoleGraphSection: string;\n /** This application's own committed judged runs. Empty unless the playbook declares the source. */\n readonly assuranceEvidenceSection: string;\n /** The document facts a PERSON established. Empty unless the playbook declares the source. */\n readonly authoredDocumentFactsSection: string;\n readonly skillCatalogSection: string;\n /** The FULL BODY of the skills the method declares it must follow. Empty unless it declares any. */\n readonly skillBodiesSection: string;\n readonly clarificationAnswersSection: string;\n readonly coherenceSection: string;\n /** The COMPUTED per-ICP FIT matrix. Empty unless the playbook declares the source. */\n readonly marketFitScoresSection: string;\n /** The DERIVED risk signals. Empty unless the playbook declares the source. */\n readonly riskSignalsSection: string;\n /**\n * The DECLARED operating jurisdictions (#2335). Empty unless the playbook declares the source. REQUIRED like its\n * siblings, so a caller that forgets to compose it is a compile error rather than a silently thinner brief.\n */\n readonly operatingJurisdictionsSection: string;\n /** What the creator answered in the other interviews (#2498, #2499). Empty unless the playbook declares the source. */\n readonly creatorStatedFactsSection: string;\n /** What the application has switched on (#2502). Empty unless the playbook declares the source. */\n readonly applicationEnabledSurfaceSection: string;\n /** The PARENT composite's rendered elicitation, on a choreography child. Empty otherwise. */\n readonly parentElicitationSection: string;\n /** What SIBLING steps returned in this choreography run. Empty for a standalone run. */\n readonly stepEvidenceSection: string;\n }): string {\n return [\n `# Playbook: ${input.playbookRef}`,\n `You are producing exactly ONE output for the \"${input.family}\" family, conforming to the schema you were given.`,\n '',\n // The single-response completeness contract. J-1 (wonder-crm, 2026-08-26) measured what happens\n // without it: methods narrate a slice-by-slice authoring WORKFLOW (they are also read by CLI\n // agents that iterate), and the one-shot structured call answered with the FIRST slice — a rich\n // `category` and nothing else — so every other collection failed the family schema. The method\n // teaches how to think; this paragraph states how to answer.\n 'This is a SINGLE-RESPONSE generation: there are no follow-up turns, no later passes, and no other',\n 'agent finishing the work. Where the method below describes step-by-step or slice-by-slice',\n 'authoring, perform ALL of those steps internally and return the COMPLETE object — every',\n 'collection the schema declares, fully populated and cross-referenced. An empty or omitted',\n 'collection is a schema violation, not a deferral.',\n // Second measured failure shape (same run, attempt 2): placeholder text in OPTIONAL\n // typed fields — a made-up string in a `z.url()` field fails the schema where omission\n // would have passed, and an invented extra key fails the strict object.\n 'For OPTIONAL fields, omit the field entirely when you have no true value — never write a',\n 'placeholder (an invalid URL, an empty string, \"TBD\"). Never add keys the schema does not',\n 'declare.',\n /*\n * The distinction the paragraph above does NOT make, and the third measured failure shape\n * (wonder-crm `document-facts`, 2026-08-29): a REQUIRED field typed `[\"string\", \"null\"]` was\n * OMITTED, three attempts running, on every declaration whose value was genuinely absent. The\n * rejection named `declarations.N.reason: invalid_type` each time and the model kept omitting,\n * because the instruction it had been given says to omit when there is no true value — and for a\n * required nullable that is precisely the wrong move.\n *\n * These contracts use required-and-nullable deliberately and pervasively: an omitted key and a\n * considered \"there is none\" are different answers, and a provider that may drop a key gives no\n * way to tell them apart. So the rule has to be STATED, because the two shapes are one word apart\n * in a JSON schema and the guidance above reads as covering both.\n *\n * This is prompt guidance, not a guard — a model may still get it wrong, and the findings-fed\n * retry is what catches that. What it removes is the case where the instruction itself was the\n * cause.\n */\n 'A field the schema declares REQUIRED but allows to be null is the OPPOSITE case: always write the',\n 'key, with the value `null`, when there is nothing true to put in it. Omitting it is a schema',\n 'violation. \"Absent\" and \"considered, and there is none\" are different answers and the contract',\n 'distinguishes them on purpose.',\n '',\n '# Method',\n input.guidance,\n ...(input.creatorBrief ? ['', '# What this application is', input.creatorBrief] : []),\n /*\n * AFTER what the application IS and BEFORE the declared inputs: the loop's reason is about THIS\n * round, so it frames how to read the artifacts that follow rather than competing with them.\n * Labelled as the selector's words, never the creator's — a run must not mistake a machine's\n * reasoning for a product decision somebody made.\n */\n ...(input.selectionRationale\n ? ['', '# Why this playbook was chosen for this round', 'Composed by the journey selector against what has already landed, not by the creator.', input.selectionRationale]\n : []),\n ...(input.inputTruthSection ? ['', input.inputTruthSection] : []),\n /*\n * AFTER the declared inputs and BEFORE the derived sections, because that is what it is: the\n * evidence this run gathered ranks with the artifacts the playbook declares it reads, not with\n * the computed hints below it.\n */\n ...(input.stepEvidenceSection ? ['', input.stepEvidenceSection] : []),\n ...(input.workspaceTruthSection ? ['', input.workspaceTruthSection] : []),\n // Right after the workspace: what could be added reads against what is already there.\n ...(input.providerRegistrySection ? ['', input.providerRegistrySection] : []),\n // BEFORE the facts: the obligation frames what the facts are for. A drafter that meets the\n // application's facts first writes about what it found; one that meets the required set first\n // writes about what is missing, which is the document this lane owes.\n ...(input.documentBlueprintSection ? ['', input.documentBlueprintSection] : []),\n ...(input.documentFactObligationsSection ? ['', input.documentFactObligationsSection] : []),\n ...(input.assuranceProgramAuthoritySection ? ['', input.assuranceProgramAuthoritySection] : []),\n ...(input.applicationRoleGraphSection ? ['', input.applicationRoleGraphSection] : []),\n /*\n * AFTER the obligations and the role graph, BEFORE the application's declarations: a drafter meets\n * what the document owes, then what its controls were MEASURED to do, then what it declares. The\n * order is the argument — evidence read before the obligation invites a document written around\n * whatever happened to be measured.\n */\n ...(input.assuranceEvidenceSection ? ['', input.assuranceEvidenceSection] : []),\n /*\n * IMMEDIATELY after the derived facts' obligations and before the application's declarations: a\n * person's decision outranks a derivation, and a drafter that meets it last has already written\n * the clause.\n */\n ...(input.authoredDocumentFactsSection ? ['', input.authoredDocumentFactsSection] : []),\n ...(input.compliancePrimaryFactsSection ? ['', input.compliancePrimaryFactsSection] : []),\n ...(input.skillCatalogSection ? ['', input.skillCatalogSection] : []),\n // AFTER the catalog, because the catalog says which skills exist and this says what the ones\n // the method chose actually require — the order a reader needs them in.\n ...(input.skillBodiesSection ? ['', input.skillBodiesSection] : []),\n ...(input.coherenceSection ? ['', input.coherenceSection] : []),\n // Beside the coherence report, because they are the same KIND of section: arithmetic the\n // framework did so the model does not estimate it. Both sit after the authored truth they are\n // computed FROM, so a reader meets the inputs before the derivation over them.\n ...(input.marketFitScoresSection ? ['', input.marketFitScoresSection] : []),\n // Beside the FIT matrix, because they are the same KIND of section: measured facts the\n // framework computed so the model does not estimate them, placed after the authored truth\n // they are derived FROM.\n ...(input.riskSignalsSection ? ['', input.riskSignalsSection] : []),\n // A typed config declaration, placed with the other config-derived facts (#2335).\n ...(input.operatingJurisdictionsSection ? ['', input.operatingJurisdictionsSection] : []),\n // What the configuration switches on (#2502): a config-derived fact, beside the jurisdictions.\n ...(input.applicationEnabledSurfaceSection ? ['', input.applicationEnabledSurfaceSection] : []),\n // The creator's statements from the OTHER interviews (#2498, #2499): creator truth, so after every derived fact and\n // before this run's own exchanges, which keep the last word.\n ...(input.creatorStatedFactsSection ? ['', input.creatorStatedFactsSection] : []),\n // LAST, after every other truth: an answer the creator gave DURING this run settles whatever\n // the sections above left ambiguous, and the closing word should be theirs.\n ...(input.clarificationAnswersSection ? ['', input.clarificationAnswersSection] : []),\n // The PARENT's creator answers, on a choreography child — the same last-word ranking as the\n // child's own elicitation, and BEFORE it, so a child that also interviews closes on its own\n // exchange while still seeing the composite's.\n ...(input.parentElicitationSection ? ['', input.parentElicitationSection] : []),\n ...(input.elicitationSection ? ['', input.elicitationSection] : []),\n ].join('\\n');\n }\n\n /**\n * The CURRENT WORKSPACE as ground truth, for playbooks that plan against real code (J-1 stalls\n * G + H). Build-decompose invented `moduleRef: \"module-crm\"` because nothing showed it the real\n * module ids, and emitted \"create the skeleton\" objectives for resources compose had already\n * scaffolded — so the dispatched coding run correctly changed nothing. This section states the\n * ids and each resource's PRESENT schema fields, read through the `resources-registry`\n * introspection behavior — a FRESH subprocess import of the app's shared-lib, never the\n * companion's boot-time cache, so a family landed or composed a minute ago is already visible.\n *\n * Fails CLOSED for the playbooks that declare it: decomposing without workspace truth is how\n * the invented-moduleRef plan gets written, and a broken plan costs more downstream than a\n * refused run costs here.\n */\n /**\n * How many engine resource names to print when the engine has declared nothing about them.\n *\n * Enough to make the population concrete — a reader (human or model) should see that these are\n * ordinary framework resources like `userCredentials` and `auditLogs`, not an exotic corner — and few\n * enough that the section does not become a list. The COUNT beside them is always exact and always\n * printed; it is the actionable half, and truncating it would be the under-reporting this whole\n * projection exists to prevent. Measured on wonder-crm (2026-08-29): 83 of 85.\n */\n private static readonly ENGINE_UNDECLARED_RESOURCE_NAMES_SHOWN = 12;\n\n /**\n * The application's compliance-relevant resource DECLARATIONS, split by origin.\n *\n * This is the consumer the `compliance-primary-facts` introspection behavior did not have. The\n * behavior reads each materialized resource configuration for the four declarations a governed\n * document may rest on — `retentionPolicy.mode`, `dataSubjectPolicy.kind`,\n * `systemAccessPolicy.exportSubject` and `seeRetained` — and reports engine-declared and\n * application-declared coverage separately. Until this method existed it answered only an operator\n * with `curl`, while `refinement.document-facts` told a model, in its intent and three times in its\n * method, that mechanism facts \"are read from the resource configurations\". They were not: the first\n * live run landed two facts, both paraphrased from vision prose, neither citing a declaration.\n *\n * ## What is rendered, and what is deliberately not\n *\n * The COUNTS per origin, the resources that declare something, and the undeclared list BY NAME.\n * Nothing is judged and nothing is inferred: a resource that declared nothing is reported as having\n * declared nothing, which is the honest input to a document that must state its own gaps. The\n * undeclared list is named rather than counted because the remedy is per resource — and because on\n * a real application it is most of the engine set (83 of 85 on wonder-crm, 2026-08-29), which is\n * itself the most load-bearing fact this section carries.\n *\n * ## Why the engine list is TRUNCATED and the application list is not\n *\n * The application's resources are the ones its own authors can fix and the ones a reader of its\n * privacy notice cares about; there are eight of them. The engine's undeclared set is ~83 names of\n * framework-owned resources, identical in every generated application, and printing them all would\n * spend most of this section on a list whose actionable content is its SIZE. The count is exact\n * either way — a truncation that hid the number would be the under-reporting this projection exists\n * to prevent.\n */\n /**\n * What the engine catalog says the document must contain, for a playbook that DRAFTS one.\n *\n * Pure and synchronous — the catalog is engine source, so there is nothing to fetch and nothing to\n * cache. No sealing, no snapshot, no pinning: which catalog you compiled against is a git revision.\n *\n * The refs come from the playbook's own declaration rather than from a parameter, because a drafting\n * playbook does not carry the document it is producing — the lane picks. Declaring the documents a\n * playbook may draft is the same act as declaring which families it reads.\n *\n * That sentence stood here from the beginning and described a frozen constant in this file until\n * 2026-09-22, which is why there could only ever be ONE drafting lane (#1453). It is now true:\n * `method.draftableDocumentDefinitionRefs`. A playbook declaring the context source and no refs\n * renders nothing — caught at authoring time by `playbook-catalog-document-declarations.test.ts`,\n * not here, because a run is the wrong place to discover that a lane declared no subject.\n */\n private composeDocumentBlueprintSection(\n playbook: MetaWorkflowPlaybook | undefined,\n /**\n * The drafts the application already holds, so the brief says which of the draftable documents\n * remain. `undefined` renders nothing about them — \"not read\" rather than \"holds none\".\n */\n existingCandidates?: readonly ApplicationCreationSpecs.ComplianceDocumentCandidate[],\n /**\n * The fact availability the landing checks against, from `resolveDeclaredDocumentFacts`. It lets the brief\n * say which held draft cites facts that no longer exist: the landing checks only the document a run\n * writes, so a draft left behind by a facts regeneration is otherwise corrected only by chance (#2019).\n */\n declaredDocumentFacts?: ReadonlyMap<string, ComplianceDocumentFactAvailability>,\n /** How the application's organizations are arranged, from its line: whom the privacy notice addresses (#1649). */\n organizationStructure?: ApplicationOrganizationStructure,\n ): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.DOCUMENT_BLUEPRINT)) return '';\n return composeAssuranceDocumentBlueprintBrief(\n playbook?.method.draftableDocumentDefinitionRefs ?? [],\n existingCandidates?.map((candidate) => candidate.documentRef),\n existingCandidates === undefined ? undefined : collectHeldDraftUndeclaredFactCitations(existingCandidates, declaredDocumentFacts),\n organizationStructure,\n );\n }\n\n /**\n * The document facts a PERSON established, for a playbook that DRAFTS a governed document.\n *\n * The derived facts reach a drafter as a declared input; these could not reach it at all, and the cost\n * was measured on the first live governance draft — a clause CITING an authored fact and paraphrasing\n * around a value it had never read. See `composeAuthoredDocumentFactsBrief` for the quotation.\n *\n * Read from the artifact state the run already loaded rather than from disk: the authored family is one\n * of the families `readArtifactState` collects, so a second read could disagree with the availability\n * map the landing will check the draft against.\n *\n * Three states, kept apart like every sibling section: a family that parsed, a family that is absent\n * (the application has authored none), and a family present but unreadable.\n */\n private composeAuthoredDocumentFactsSection(playbook: MetaWorkflowPlaybook | undefined, state: PlaybookArtifactState): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.AUTHORED_DOCUMENT_FACTS)) return '';\n const value = state.artifactsByFamily.get('document-facts-authored');\n if (value === undefined) return composeAuthoredDocumentFactsBrief(undefined);\n if (value === FILE_PRESENT_WITHOUT_VALUE) {\n return composeAuthoredDocumentFactsBrief(undefined, 'the family file is present but its value could not be read from here');\n }\n const parsed = ApplicationAuthoredDocumentFactSpecificationSchema.safeParse(value);\n return parsed.success\n ? composeAuthoredDocumentFactsBrief(parsed.data)\n : composeAuthoredDocumentFactsBrief(undefined, `the landed family does not satisfy its schema (${parsed.error.issues[0]?.message ?? 'unknown issue'})`);\n }\n\n /**\n * The application's OWN committed judged runs, for a playbook drafting an INTERNAL governance document.\n *\n * ## Every absence is a different sentence, and none of them fails the run\n *\n * Three states a caller must not merge, which is why this returns a SECTION rather than a list and why\n * the reasons are distinct: no repository at all, a repository holding no judged run, and a repository\n * that could not be read. The composer says which. Silence would collapse all three into \"there is\n * nothing to cite\", indistinguishable from \"nobody looked\"\n * (`negative-results-require-a-positive-probe.md`), and a drafter that reads the third as the first\n * writes a document whose marks are wrong.\n *\n * Nothing here can fail a run. An unreadable repository, an unparsable run file, a missing directory:\n * each degrades to a section that says so, because a compliance workflow may never stand in front of\n * the mechanism (`application-creation-directive.md`).\n *\n * ## It reads, and never writes\n *\n * The assurance plane's one-way street is what keeps this safe (#297, and the note on\n * `MetaWorkflow_ContextSource.ASSURANCE_EVIDENCE`): the collectors read the product and write only\n * into the assurance repository, and this carries committed runs OUT of it into a brief. No creation\n * step gates on a verdict, and nothing here can write a verdict back.\n *\n * A run file that does not satisfy `AssuranceEvidenceRunSchema` is DROPPED rather than refused: the\n * repository is written by a different tool on its own cadence, and one malformed file must not\n * withhold the rest. How many were dropped is logged, so a systematically unreadable repository is\n * visible rather than silently empty.\n */\n private async composeAssuranceEvidenceSection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.ASSURANCE_EVIDENCE)) return '';\n const read = this.readCommittedAssuranceRuns();\n return read.runs === undefined ? composeAssuranceEvidenceBrief(undefined, read.unreadableReason) : composeAssuranceEvidenceBrief(read.runs);\n }\n\n /**\n * Read this application's committed judged runs ONCE, for the two consumers that need them.\n *\n * The brief needs them RENDERED, so a drafter can choose one; the landing needs their REFS, so a\n * citation can be resolved. Two reads of the same directory could disagree — a run present in the\n * brief and absent from the refs is a citation the drafter was invited to make and the landing then\n * refuses — which is the shape `.claude/rules/invariant-call-site-enumeration.md` is about.\n *\n * `runs: undefined` carries the reason, and every caller must preserve the distinction: it means\n * nobody could look, never that the repository is empty.\n */\n private readCommittedAssuranceRuns(): { readonly runs?: readonly AssuranceEvidenceRun[]; readonly unreadableReason?: string } {\n const judgedRunsRoot = join(this.companionContext.saasRoot, ASSURANCE_REPOSITORY_RELATIVE_PATH, ASSURANCE_JUDGED_RUNS_DIRECTORY);\n if (!existsSync(judgedRunsRoot)) {\n return {\n unreadableReason: `this application has no assurance repository at ${ASSURANCE_REPOSITORY_RELATIVE_PATH}/${ASSURANCE_JUDGED_RUNS_DIRECTORY}, so no cycle has recorded a judged run here`,\n };\n }\n try {\n const runs: AssuranceEvidenceRun[] = [];\n let dropped = 0;\n // One level of objective directories, each holding one file per demand — the layout the recorder\n // writes. Walked rather than globbed so a stray file at either level is skipped, not parsed.\n for (const objectiveEntry of readdirSync(judgedRunsRoot, { withFileTypes: true })) {\n if (!objectiveEntry.isDirectory()) continue;\n const objectiveDirectory = join(judgedRunsRoot, objectiveEntry.name);\n for (const runEntry of readdirSync(objectiveDirectory, { withFileTypes: true })) {\n if (!runEntry.isFile() || !runEntry.name.endsWith('.json')) continue;\n const parsed = AssuranceEvidenceRunSchema.safeParse(JSON.parse(readFileSync(join(objectiveDirectory, runEntry.name), 'utf8')));\n if (parsed.success) runs.push(parsed.data);\n else dropped += 1;\n }\n }\n if (dropped > 0) this.logDebug('Assurance evidence: run file(s) did not satisfy the run schema and were dropped', { dropped, judgedRunsRoot });\n return { runs };\n } catch (error) {\n return { unreadableReason: `the assurance repository could not be read (${String(error)})` };\n }\n }\n\n /**\n * The runs a landing may resolve a citation against — the SAME read the brief renders from — each\n * carrying whether its judgement SETTLED the question it was run for.\n *\n * The second fact is what lets the landing refuse a citation of a run that exists and supports\n * nothing. It is decided HERE rather than in the validator because the verdict vocabulary lives in\n * this layer, and `_core` should not learn it to answer one boolean.\n *\n * CONFORMANT and OBSERVATION are the two verdicts that assert the evidence was sufficient to\n * conclude. INSUFFICIENT_EVIDENCE says the question was not settled, NONCONFORMITY that the control\n * fell short, and a DERIVED run's NOT_APPLICABLE_AS_CONFIGURED that nothing was measured at all —\n * none of the three can support a statement that a control operates, and all three RESOLVE, so the\n * landing must refuse them by verdict rather than by absence.\n *\n * Absent when the repository could not be read, which is what the landing needs to skip the\n * resolution rules rather than refuse every citation over a missing tool.\n */\n private resolveCommittedAssuranceRuns(): { committedAssuranceRuns?: ReadonlyMap<string, { readonly maySupportOperatingClaim: boolean }> } {\n const read = this.readCommittedAssuranceRuns();\n if (read.runs === undefined) return {};\n return {\n committedAssuranceRuns: new Map(read.runs.map((run) => [\n String(run.runRef),\n {\n maySupportOperatingClaim: run.kind === AssuranceEvidenceRunKind.JUDGED\n && (run.verdict === AssuranceEvidenceJudgementVerdict.CONFORMANT || run.verdict === AssuranceEvidenceJudgementVerdict.OBSERVATION),\n },\n ])),\n };\n }\n\n /**\n * The catalog's required fact NAMES, for the playbook that declares facts.\n *\n * Same source, different question, which is why it is a separate context source rather than a second\n * shape of the same one: a fact producer authors no sections and needs the closed name set, and\n * burying eight lines under section obligations is how a prompt section gets skimmed.\n */\n /**\n * The closed objective/source sets a compliance programme may draw on, NARROWED to this application.\n *\n * See {@link composeAssuranceProgramAuthorityBrief}. The capability set is what makes the brief say\n * whether each objective can apply HERE rather than only what the basis covers in general, before\n * anyone is asked anything. Today only `BILLING` decides any objective; until 2026-09-14 the audit\n * capability was wrongly gated on `COMPLIANCE_AUDIT_TRAIL`, and Wonder CRM read 16 `NOT_APPLICABLE`\n * and 9 `UNDETERMINED` from it (#302).\n *\n * `enabledEngineCapabilityNames` is reused rather than re-derived: it already knows that a\n * capability declared `{ enabled: false }` is NOT enabled (Wonder CRM declares `MULTI_LANGUAGE`\n * exactly that way), and a second reader that treated presence as enablement would over-report\n * applicability — the dangerous direction, since it invites binding an objective the normalizer then\n * refuses.\n */\n private composeAssuranceProgramAuthoritySection(\n playbook: MetaWorkflowPlaybook | undefined,\n requiredDocumentSetInput?: RequiredDocumentSetInput,\n ): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.ASSURANCE_PROGRAM_AUTHORITY)) return '';\n const enabledEngineCapabilities = this.readEnabledEngineCapabilities();\n const operatingJurisdictionSlugs = this.readOperatingJurisdictionSlugs();\n /*\n * Whether a review is SCHEDULED decides whether a gap can be recorded at all: a gap carries the date its review\n * falls due, and an application declaring no cadence gives the run no date to stamp. Resolved through the SAME\n * function that supplies the normalizer's `nextReviewOn`, so the brief cannot promise what the run then refuses.\n */\n const schedulesAssuranceReview =\n resolveDeclaredAssuranceNextReviewOn(\n (this.companionContext.saasConfig as { assuranceReviewCadence?: unknown } | undefined)?.assuranceReviewCadence,\n new Date().toISOString(),\n ) !== undefined;\n return composeAssuranceProgramAuthorityBrief({\n ...(enabledEngineCapabilities === undefined ? {} : { enabledEngineCapabilities }),\n ...(operatingJurisdictionSlugs === undefined ? {} : { operatingJurisdictionSlugs }),\n ...(requiredDocumentSetInput === undefined ? {} : { requiredDocumentSetInput }),\n schedulesAssuranceReview,\n });\n }\n\n /**\n * The provider refs that exist for this application (#3995), for a generation producing the integration plan; `undefined`\n * for any other generation, and when the registry cannot be read (an unknown provider is then not a wrong one). The\n * installed `providers/<ref>/` are read from disk now; the declared scopes come from the configuration the companion\n * holds, which a provider the integration plan itself declares has not reached yet, and does not need to.\n */\n private async readKnownProviderRefsFor(outputs: readonly { readonly family: string }[]): Promise<ReturnType<typeof collectKnownProviderRefs>> {\n if (!outputs.some((output) => output.family === ApplicationSpecificationFamily.INTEGRATION_PLAN)) return undefined;\n const listing = await listRegistryProviderModules({\n frameworkRoot: this.companionContext.resolvedHomes.framework.repositoryRoot ?? null,\n moduleRegistries: this.companionContext.saasConfig?.moduleRegistries,\n });\n const saasConfig = this.companionContext.saasConfig;\n // Discovery brings what the application authored or installed beside the engine's specifications; unreadable, no check.\n let discoveredContributions: Awaited<ReturnType<typeof discoverSaasProviderCompanionContributions>>['contributions'] | undefined;\n try {\n const discovery = saasConfig === undefined ? undefined : await discoverSaasProviderCompanionContributions({ saasRoot: this.companionContext.saasRoot, saasConfig });\n /*\n * A walk that could not read an owner is partial: a provider that owner authored would be refused against it (#3995\n * review R2), so partial is unknown and unknown skips the check. Since #3995 item 5 every scope is checked\n * (`PROVIDER_BINDING_SCOPES_CHECKED_FOR_EXISTENCE`), so an unreadable FRONTEND service counts too: it used to be\n * exempt only because frontend-scope bindings were not checked.\n */\n const ownerUnreadable = (discovery?.unreadableOwners.length ?? 0) > 0;\n discoveredContributions = discovery === undefined || ownerUnreadable ? undefined : discovery.contributions;\n } catch (error) {\n this.logDebug('Provider discovery unreadable; the integration plan\\'s provider check is skipped', { error: describeCaughtError(error) });\n discoveredContributions = undefined;\n }\n return collectKnownProviderRefs({\n listing,\n applicationRoot: this.companionContext.saasRoot,\n specifications: listRegisteredProviderSpecifications(),\n discoveredContributions,\n saasConfig,\n });\n }\n\n /**\n * The system-of-record facets' partition fields by kind (#3045), for a generation producing the domain plan, read from the\n * application's EFFECTIVE facets, as the backend resolves them at startup (`loadEffectiveSystemOfRecordFacets`, #3053);\n * `undefined`\n * for any other generation, and when the library cannot be read.\n */\n private async readSystemOfRecordPartitionFieldsFor(outputs: readonly { readonly family: string }[]): Promise<DomainPlanSystemOfRecordPartitionFields | undefined> {\n if (!outputs.some((output) => output.family === ApplicationSpecificationFamily.DOMAIN_PLAN)) return undefined;\n // The EFFECTIVE facets (#3053): a vendor an existing instance uses carries that instance's augmentations.\n const facets = await loadEffectiveSystemOfRecordFacets({\n applicationRoot: this.companionContext.saasRoot,\n frameworkRoot: this.companionContext.resolvedHomes?.framework?.repositoryRoot ?? undefined,\n // Re-read, not the configuration the companion loaded at start: an instance declared since then counts.\n systemsOfRecord: await rereadDeclaredSystemOfRecordInstances(\n this.companionContext.saasRoot,\n (this.companionContext.saasConfig as { systemsOfRecord?: Record<string, SystemOfRecordInstanceFacetRequest | undefined> } | undefined)?.systemsOfRecord,\n (error) => this.logDebug('wildo.saas.config.ts could not be re-read; judging the systems of record the companion started with', { error: describeCaughtError(error) }),\n ),\n onUnreadable: (specifier, error) => this.logDebug('A system-of-record facet module could not be imported', { specifier, error: describeCaughtError(error) }),\n });\n return facets === undefined ? undefined : deriveDomainPlanSystemOfRecordPartitionFields(systemOfRecordFacetPartitionsByVendor(facets));\n }\n\n /**\n * The application's enabled engine capabilities, or `undefined` when its configuration cannot be read.\n *\n * ONE reader for the two places that must agree: the authority brief that tells a producer which\n * objectives cannot apply here, and the compliance-programme normalizer that refuses a programme\n * binding one. Two readers would let the brief say APPLICABLE while the normalizer refuses.\n *\n * An UNREADABLE config yields `undefined`, never an empty set. \"We could not read the application\" and\n * \"the application enables nothing\" are different facts, and the second would render 16 confident\n * NOT_APPLICABLE verdicts — and refuse on them — from no evidence at all. A configuration that declares\n * no `engineCapabilities` key at all is read the same way: the blind brief and no refusal, which errs\n * toward refusing less rather than refusing on a capability set nobody declared.\n */\n /**\n * The maturity reading's inputs (#1496), composed ONCE for its two readers: the `bottom_up.maturity-reading` executor,\n * which lands the reading, and {@link readRequirementsStanding}, which the unattended drive reads before it may call the\n * goal reached (#3701). Two compositions would be two answers to \"where does the application stand\".\n *\n * - the landed family VALUES (a family present only as a file contributes nothing);\n * - the landing probe's own sets, read from the build dispatch rather than recomputed here: what LANDED is a question\n * the landing pass answers over the WORKING tree (#3204), and a second implementation of that question is how two\n * surfaces come to disagree about whether a task is done;\n * - the gaps coding runs reported and that are still open, which cap their requirement below VERIFIED (#2580);\n * - the CONFIGURATION a requirement's declared substance is measured against (#3702): the engine capabilities the\n * application enables and the languages it serves. Absent when either cannot be read, which the reading reports as\n * such on every requirement that declares a need, rather than as met.\n */\n private async composeApplicationMaturityInputs(artifactState: PlaybookArtifactState): Promise<ApplicationMaturityInputs> {\n const decidedFamilyValues: Record<string, unknown> = {};\n for (const [family, value] of artifactState.artifactsByFamily) {\n if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE) continue;\n decidedFamilyValues[family] = value;\n }\n const evidence = await this.buildDispatch.resolveLandedTaskEvidence();\n const applicationConfiguration = this.readMaturityConfigurationFacts();\n return {\n decidedFamilyValues,\n ...(evidence === undefined ? {} : { landedTaskRefs: evidence.landedTaskRefs, provenTaskRefs: evidence.provenTaskRefs }),\n ...(evidence?.openReportedGaps === undefined ? {} : { openReportedGaps: evidence.openReportedGaps }),\n ...(applicationConfiguration === undefined ? {} : { applicationConfiguration }),\n };\n }\n\n /**\n * What the application's configuration turns on (#3702), for the maturity reading: the enabled engine capabilities\n * (`wildo.saas.config.ts`; none declared is none enabled) and the languages served, through the one reader the i18n\n * step and the capability composition share. `undefined` when the configuration could not be read: an unknown, never\n * an empty configuration.\n */\n private readMaturityConfigurationFacts(): ApplicationMaturityConfigurationFacts | undefined {\n if (this.companionContext?.saasConfig === undefined) return undefined;\n let config: unknown;\n try {\n config = this.appConfigService?.config;\n } catch {\n return undefined;\n }\n if (config === undefined || config === null) return undefined;\n return {\n enabledEngineCapabilities: this.readEnabledEngineCapabilities() ?? [],\n servedLanguages: getCompanionServedLanguages(config as Parameters<typeof getCompanionServedLanguages>[0]),\n };\n }\n\n /**\n * Where the application stands against its own requirements NOW, for the unattended drive (#3701): the maturity reading\n * derived live from the same inputs the reading's executor lands, and every item still open on it. Derived rather than\n * read from the landed reading, which is only as current as the last time the reading's playbook ran: the reference run\n * stopped minutes after its last landing, and a stop rule must not judge the creation by a photograph.\n */\n public async readRequirementsStanding(): Promise<CreationDrive_RequirementsStanding> {\n const reading = deriveApplicationMaturity(await this.composeApplicationMaturityInputs(await this.readArtifactState()));\n return {\n measuredAt: new Date().toISOString(),\n stage: reading.stage,\n requirementCount: reading.requirements.length,\n openItems: listRequirementOpenItems(reading).map((item) => ({\n requirementRef: item.requirementRef,\n kind: item.kind,\n detail: item.detail,\n closedByTaskRef: item.closedByTaskRef ?? null,\n })),\n };\n }\n\n private readEnabledEngineCapabilities(): EngineCapability[] | undefined {\n const declared = (this.companionContext.saasConfig as { engineCapabilities?: Record<string, unknown> | readonly string[] } | undefined)?.engineCapabilities;\n if (declared === undefined) return undefined;\n return [...enabledEngineCapabilityNames(declared)] as EngineCapability[];\n }\n\n /**\n * The application's agents as the compliance lane reads them (#2838), through the `ai-use-declarations` behavior.\n * Asked only when an AI capability reaches the contracted service, since no other application raises the question.\n * `undefined` means NOT READ (the read failed, or answered no agent list), which the brief states rather than\n * rendering as \"no agents\"; best-effort because it informs a section and never decides whether the run proceeds.\n */\n private async readAgentAiUseDeclarations(backendServiceKey: string, declaredCapabilities: readonly string[]): Promise<AgentAiUseDeclaration[] | undefined> {\n const declared = new Set(declaredCapabilities);\n if (!AI_ENGINE_CAPABILITIES_IN_THE_CONTRACTED_SERVICE.some((capability) => declared.has(capability))) return undefined;\n try {\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'ai-use-declarations' });\n if (!result.success) return undefined;\n const agents = (result.data as { agents?: unknown } | undefined)?.agents;\n return Array.isArray(agents) ? (agents as AgentAiUseDeclaration[]) : undefined;\n } catch (error) {\n this.logDebug('Agent AI-use declarations could not be read (the brief says so)', { error: String(error) });\n return undefined;\n }\n }\n\n /** The application's declared jurisdictions for the assurance applicability gate (#2852); see {@link readDeclaredOperatingJurisdictionSlugs}. */\n private readOperatingJurisdictionSlugs(): string[] | null | undefined {\n return readDeclaredOperatingJurisdictionSlugs(this.companionContext?.saasConfig);\n }\n\n /**\n * The application's OWN role graph — the closed set an accountable role is SELECTED from (#636).\n *\n * Replaces two free-text elicitation questions on `top_down.compliance-conception` that asked a\n * person to type *\"the application's own role key (e.g. `APP_ADMIN_SUPER_ADMIN`)\"*. The vocabulary\n * is a closed enum and the grants are declared in the application's own backend config, so the ask\n * invited a retyped — and mistypeable — value in the one artifact whose purpose is to say who is\n * accountable.\n *\n * BEST-EFFORT, unlike `composeCompliancePrimaryFactsSection` which fails closed, and the asymmetry\n * is deliberate. Primary facts are the EVIDENCE a programme reasons from: without them a producer\n * invents, so refusing the run is cheaper than a confident wrong artifact. The role graph is a\n * SELECTION AID; a run that cannot read it should say the declaration was unreadable and record an\n * explicit gap, which the brief instructs. Failing the run here would make a config-read hiccup\n * more costly than the thing it protects.\n *\n * `undefined` is passed through rather than flattened to `{}` — the brief renders \"could not be\n * read\" and \"declares none\" differently, because the first must never let a producer conclude an\n * application has no roles.\n */\n private async composeApplicationRoleGraphSection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.APPLICATION_ROLE_GRAPH)) return '';\n try {\n const { configuration: backendConfig } = await loadBackendCompanionData(this.companionContext);\n const authored = backendConfig as {\n userTypes?: Record<string, { defaultAppRoles?: readonly string[] }>;\n organizationTypes?: Record<string, { userTypes?: readonly string[]; availableOrgRoles?: readonly string[]; defaultMemberRole?: string }>;\n };\n return composeApplicationRoleGraphBrief({\n ...(authored.userTypes === undefined ? {} : { userTypes: authored.userTypes }),\n ...(authored.organizationTypes === undefined ? {} : { organizationTypes: authored.organizationTypes }),\n });\n } catch {\n // Both absent => the brief says the configuration could not be read, which is the truthful shape.\n return composeApplicationRoleGraphBrief({});\n }\n }\n\n private composeDocumentFactObligationsSection(\n playbook: MetaWorkflowPlaybook | undefined,\n /** Whom the privacy notice addresses follows from this (#1649): the facts are worded for that reader. */\n organizationStructure?: ApplicationOrganizationStructure,\n ): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.DOCUMENT_FACT_OBLIGATIONS)) return '';\n return composeAssuranceDocumentFactObligationsBrief(FACT_OBLIGATION_DOCUMENT_DEFINITION_REFS, organizationStructure);\n }\n\n /**\n * The application's BILLING configuration, as the terms lane needs it (#227).\n *\n * Read from the backend companion exports rather than from `wildo.saas.config.ts`, because that is\n * where it lives: `billing` is declared in the application's `saas-config.backend.ts` and reaches the\n * runtime `AppConfiguration`, not the root config the companion already holds.\n *\n * THREE outcomes, never two. \"The configuration could not be read\" and \"the application declares no\n * billing\" are different facts with different consequences — the first means the question was not\n * asked, the second is a positive statement that nothing is sold through the framework — and a\n * drafter told the wrong one writes a confident clause about a product it never saw. Collapsing them\n * into `undefined` is the conflation this whole lane exists to refuse.\n *\n * Best-effort by design: this brief must not be the reason a run fails. An unreadable configuration\n * is rendered as unreadable and the drafter marks the gap.\n */\n private async resolveBillingDeclaration(): Promise<ApplicationBillingDeclaration> {\n try {\n const { configuration: backendConfig } = await loadBackendCompanionData(this.companionContext);\n const authored = (backendConfig as { billing?: unknown }).billing;\n if (authored === undefined || authored === null) return { kind: 'ABSENT' };\n\n const parsed = BillingConfigurationSchema.safeParse(authored);\n if (!parsed.success) {\n return { kind: 'UNREADABLE', reason: 'the declared billing configuration does not satisfy its own schema' };\n }\n return {\n kind: 'DECLARED',\n billing: parsed.data,\n // The AUTHORED object, before defaults — which is what separates \"the operator chose this\" from\n // \"the framework filled it in\". The parsed value cannot answer that: every key is present there.\n authoredKeys: Object.keys(authored as Record<string, unknown>),\n };\n } catch (error) {\n this.logDebug('Billing configuration read failed (brief will report it as unreadable)', { error: String(error) });\n return { kind: 'UNREADABLE', reason: 'the backend configuration could not be loaded' };\n }\n }\n\n private async composeExternalAuthenticationSection(): Promise<string[]> {\n try {\n const { configuration: backendConfig } = await loadBackendCompanionData(this.companionContext);\n return composeExternalAuthenticationBrief(backendConfig as Parameters<typeof composeExternalAuthenticationBrief>[0], listRegisteredProviderSpecifications());\n } catch {\n return composeExternalAuthenticationBrief(undefined, []);\n }\n }\n\n private async composeCompliancePrimaryFactsSection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.COMPLIANCE_PRIMARY_FACTS)) return '';\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (!backendServiceKey) {\n throw new PlaybookNotReadyError(\n `\"${playbook?.ref ?? '(unknown playbook)'}\" derives facts from the application's resource declarations, `\n + 'but no backend service is available to introspect it.',\n );\n }\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'compliance-primary-facts' });\n if (!result.success) {\n /*\n * FAIL, never degrade. A document whose mechanism facts silently came from prose instead of from\n * declarations is exactly the artifact this whole capability exists to prevent, and it would be\n * indistinguishable from a good one on the page. Refusing names the problem while a human is\n * present.\n */\n throw new PlaybookNotReadyError(\n `\"${playbook?.ref ?? '(unknown playbook)'}\" derives facts from the application's resource declarations, but the `\n + `compliance-primary-facts introspection failed: ${JSON.stringify(result)}`,\n );\n }\n const snapshot = result.data as {\n resources?: ReadonlyArray<{\n resourceType: string;\n origin: string;\n erasureRetentionMode?: string;\n dataSubjectKind?: string;\n declaresSubjectExport: boolean;\n declaresRetainedSeeThrough: boolean;\n personalDataCategories?: readonly string[];\n conditionalPersonalDataCategories?: ReadonlyArray<{ condition: string; categories: readonly string[]; fieldNames: readonly string[] }>;\n uncategorizedPersonalFields?: ReadonlyArray<{ fieldName: string; basis: string }>;\n }>;\n coverageByOrigin?: Record<string, {\n resourceCount: number;\n withErasureRetentionMode: number;\n withDataSubjectKind: number;\n withSubjectExport: number;\n declaringNoPersonalDataOfTheirOwn: number;\n declaringNoPersonalDataOfTheirOwnButNamingADescribedParty?: number;\n withPersonalDataCategories?: number;\n withUncategorizedPersonalFields?: number;\n }>;\n undeclaredResourceTypes?: readonly string[];\n personalDataCategories?: readonly string[];\n unconditionalPersonalDataCategories?: readonly string[];\n conditionalPersonalDataCategories?: ReadonlyArray<{\n condition: string;\n categories: readonly string[];\n resources: ReadonlyArray<{ resourceType: string; origin: string; fieldNames: readonly string[] }>;\n }>;\n uncategorizedPersonalFieldsByResource?: ReadonlyArray<{\n resourceType: string;\n origin: string;\n fields: ReadonlyArray<{ fieldName: string; basis: string }>;\n }>;\n };\n const resources = snapshot.resources ?? [];\n const undeclared = new Set(snapshot.undeclaredResourceTypes ?? []);\n\n const renderOrigin = (origin: string, heading: string, undeclaredLimit: number | null): string[] => {\n const coverage = snapshot.coverageByOrigin?.[origin];\n const owned = resources.filter((resource) => resource.origin === origin);\n const declaring = owned.filter((resource) => !undeclared.has(resource.resourceType));\n const silent = owned.filter((resource) => undeclared.has(resource.resourceType)).map((resource) => resource.resourceType);\n const shown = undeclaredLimit === null ? silent : silent.slice(0, undeclaredLimit);\n return [\n `## ${heading}`,\n coverage\n ? `${coverage.resourceCount} resource(s). Declaring an erasure retention mode: ${coverage.withErasureRetentionMode}. `\n + `Declaring a data-subject kind: ${coverage.withDataSubjectKind}. Declaring subject export: ${coverage.withSubjectExport}. `\n + `Declaring RETAIN_ONLY — the checked statement \"holds no personal data of its own\": ${coverage.declaringNoPersonalDataOfTheirOwn}`\n + ((coverage.declaringNoPersonalDataOfTheirOwnButNamingADescribedParty ?? 0) > 0\n ? ` (of which ${coverage.declaringNoPersonalDataOfTheirOwnButNamingADescribedParty} hold the name of the party they describe, personal data where that party is a natural person). `\n : '. ')\n + `Declaring at least one personal-data category: ${coverage.withPersonalDataCategories ?? 0}.`\n : '(no coverage reported)',\n '',\n ...(declaring.length > 0\n ? declaring.map((resource) =>\n `- \\`${resource.resourceType}\\` — erasure: ${resource.erasureRetentionMode ?? 'UNDECLARED'}; `\n + `data-subject kind: ${resource.dataSubjectKind ?? 'UNDECLARED'}; `\n + `subject export: ${resource.declaresSubjectExport ? 'declared' : 'not declared'}; `\n + `audited see-through over retained rows: ${resource.declaresRetainedSeeThrough ? 'declared' : 'not declared'}`\n + ((resource.personalDataCategories ?? []).length > 0\n ? `; personal-data categories: ${(resource.personalDataCategories ?? []).join(', ')}`\n : '')\n + (resource.conditionalPersonalDataCategories ?? [])\n .map((conditional) => `; held ONLY where \\`${conditional.condition}\\`: ${conditional.categories.join(', ')} (fields ${conditional.fieldNames.map((fieldName) => `\\`${fieldName}\\``).join(', ')})`)\n .join(''))\n : ['(no resource of this origin declares anything on these axes)']),\n ...(silent.length > 0\n ? [\n '',\n `Declaring NOTHING on either axis (${silent.length}): ${shown.map((resourceType) => `\\`${resourceType}\\``).join(', ')}`\n + (shown.length < silent.length ? `, and ${silent.length - shown.length} more.` : '.'),\n ]\n : []),\n ];\n };\n\n /*\n * The application's declared CAPABILITIES and configured PROVIDERS, beside the resource declarations.\n *\n * Without them a whole class of concern can only be marked incomplete, and marked WRONGLY. \"Which\n * external processors receive personal data\", \"does the application make automated decisions\",\n * \"what analytics run\" are all answerable from what the application composed itself out of — and the\n * answer for a small application is usually NONE, which is a positive, checkable statement rather\n * than a gap. Measured on wonder-crm's first produced notice (2026-08-29): recipients-and-processors,\n * international-transfers, automated-decisions-and-ai and analytics-and-tracking all came back\n * `NEEDS_CONFIGURATION` — four concerns the hand-written comparison derives — because the drafter\n * could see the resources and not the composition.\n *\n * An ABSENT capability is reported as absent rather than omitted, for the same reason the resource\n * projection names its undeclared set: \"the application does not enable this\" and \"nobody looked\"\n * must not render identically.\n */\n const saasConfig = this.companionContext.saasConfig as {\n /*\n * The application's own declared BOUNDARY — what the programme covers (#636).\n *\n * Added when `programme-scope` was removed from `top_down.compliance-conception`'s elicitation.\n * That question asked a person \"which product, environments and services? Name what is INSIDE\n * the boundary, and anything a reader might assume is included that is not\" — and this section\n * already answered the harder half of it (which capabilities and providers are the CONTRACTED\n * SERVICE versus build-time tooling that is deliberately outside it). What it did not render was\n * the easy half: the product's own name, the services it declares, and its domain modules. Those\n * are plain field reads on a config object this method already holds.\n */\n name?: string;\n displayName?: string;\n slug?: string;\n type?: string;\n services?: Record<string, { serviceName?: string; frontendType?: string; path?: string }>;\n modules?: Record<string, { services?: readonly string[] }>;\n engineCapabilities?: Record<string, unknown> | readonly string[];\n providers?: { scopes?: Record<string, { providers?: Record<string, unknown> }> };\n providerConfigurations?: Record<string, unknown>;\n dataRetention?: ApplicationRetentionSchedule;\n aiUsePosture?: ApplicationAiUsePosture;\n clientStorage?: ApplicationClientStorageInventory;\n operatingJurisdictions?: ApplicationOperatingJurisdictions;\n operatorComplianceIdentity?: ApplicationOperatorComplianceIdentity;\n providerComplianceChoices?: ApplicationProviderComplianceChoices;\n };\n /*\n * DECLARED capabilities, SPLIT BY THE SURFACE THAT REACHES THEM — and the split is the whole\n * difference between a true and a false sentence in a customer-facing document.\n *\n * `engineCapabilities` answers two questions at once: what the DEPLOYED application offers its\n * users, and what the DEVELOPMENT COMPANION reaches while building it. A privacy notice, a record\n * of processing and a set of service terms are about the first only — the engine's own question\n * for the AI fact says so in English, \"resolve the fact as not applicable when no AI feature\n * reaches THE CONTRACTED SERVICE\" — so handing a drafter one undifferentiated list invites it to\n * describe a build-time tool as a product feature.\n *\n * That is not hypothetical. Wonder CRM enables `AI_CODING_AGENT` and nothing else AI-shaped, and\n * declares `document-fact:ai-features-and-content-use` NOT_APPLICABLE because \"No AI capability is\n * enabled in the application\" — a sentence that is false as written precisely because the flat\n * list cannot distinguish the agent that WROTE the application from a feature the application\n * OFFERS.\n *\n * `ENGINE_CAPABILITY_SURFACES` is the declared authority (total over the enum, so a new capability\n * is a compile error until classified). Authoring-only membership is not a licence to omit: the\n * section reports both, LABELLED, because secure-development and supply-chain obligations are\n * about exactly the half a runtime document must exclude.\n */\n const allDeclaredCapabilities = [...enabledEngineCapabilityNames(saasConfig.engineCapabilities)];\n const configuredProviderScopes = Object.entries(saasConfig.providers?.scopes ?? {})\n .map(([scope, value]) => ({ scope, providerRefs: Object.keys(value?.providers ?? {}) }))\n .filter((entry) => entry.providerRefs.length > 0);\n /*\n * THE CAPABILITY SAYS WHAT IT *CAN* SERVE; THE SCOPE SAYS WHAT THIS APPLICATION *DOES* WITH IT.\n *\n * The surface axis alone is not enough, and `AI_LLM` is why. It is genuinely BOTH — an application\n * may offer LLM features to its users, and the companion reaches an LLM to build the application —\n * so the capability's declaration cannot decide which is true HERE. Only the scope can: a provider\n * offering it under `companion` serves the build; one under any runtime scope serves users.\n *\n * So a capability is treated as reaching the contracted service unless it is EITHER authoring-only\n * by declaration, OR both-capable and offered by no runtime-scoped provider. A capability with no\n * provider at all (`ORGANIZATIONS`, `MULTI_LANGUAGE`) is unaffected: nothing scopes it, and it is\n * an application feature by nature.\n *\n * The rule is the engine's `partitionCapabilitiesByContractedService` (#2838), the one the evidence collector, the\n * assurance extractors and the AI-use facts call too. It walks every runtime scope, `frontendServices.<service>`,\n * `minions.<minion>` and `workers.<worker>` included, so a capability a minion serves is never read as offered\n * only by the companion (#1707).\n */\n // Every declared provider's compliance profile, from discovery (#1708). Unreadable → the population says\n // NOT READ, and the region report falls back to the engine specifications it always read.\n const discoveredProfiles = await this.resolveDiscoveredProviderComplianceProfiles(saasConfig);\n const recipientPopulation = await recipientPopulationOf(saasConfig, this.companionContext?.saasRoot, discoveredProfiles.profiles);\n const complianceProfiles: Readonly<Record<string, ProviderComplianceProfile>> = { ...engineSpecificationComplianceProfiles(), ...(discoveredProfiles.profiles ?? {}) };\n const { register: processorRegister, notRead: processorRegisterNotRead } = await this.resolveProcessorRegister();\n const contractedService = new Set(\n partitionCapabilitiesByContractedService({ declaredCapabilities: allDeclaredCapabilities, providers: saasConfig.providers }).reachingContractedService,\n );\n const reachesContractedService = (capability: string): boolean => contractedService.has(capability);\n const declaredCapabilities = allDeclaredCapabilities.filter(reachesContractedService);\n const authoringOnlyCapabilities = allDeclaredCapabilities.filter((capability) => !reachesContractedService(capability));\n /*\n * RUNTIME-SCOPED and PROFILE-ONLY are different answers, and merging them over-reports a recipient.\n *\n * A provider bound to a runtime scope — backend, companion, workers, minions, a frontend service —\n * can process the application's data. A `providerConfigurations` entry is a configuration PROFILE:\n * it says how to reach a provider, not that any runtime sends it anything.\n *\n * These were unioned until 2026-08-29, and the first live run showed the cost. wonder-crm scopes NO\n * provider to any runtime and configures `anthropic` solely as the coding agent's ACP profile — a\n * BUILD-TIME developer tool operating on the workspace. The union reported it as a configured\n * external provider, and the drafted fact duly said it \"is configured as an external provider and is\n * in use\". For a notice about customer data that names a recipient which receives none.\n *\n * Worth naming the direction: every other guard in this lane defends against UNDER-reporting, and\n * this was the opposite. A notice that invents a recipient is as wrong as one that hides one, and it\n * is harder to notice because it reads as caution.\n */\n /*\n * THE COMPANION SCOPE IS NOT A RUNTIME, and this line is where that stopped being true.\n *\n * The paragraph above already reasons that Wonder CRM's `anthropic` is \"a BUILD-TIME developer\n * tool operating on the workspace\" and that reporting it as a configured external provider put a\n * recipient into a notice which receives nothing. That fix keyed on `providerConfigurations`\n * versus scopes, and it held only while CRM scoped anthropic to no scope at all. CRM now declares\n * it under `companion`, so the identical false sentence came back through the other door — the\n * union below listed it among providers that \"can process this application's data\".\n *\n * A provider in the `companion` scope is reached by the tool that BUILDS the application. It sees\n * source, specifications and generated artifacts; it is never in the path of a request from a\n * user. So it is reported, separately and by name, as an authoring-surface provider — never\n * omitted (a secure-development statement needs it) and never merged (a privacy statement must\n * not have it).\n */\n const authoringScopedProviderRefs = [...new Set(\n configuredProviderScopes.filter((entry) => entry.scope === AUTHORING_PROVIDER_SCOPE).flatMap((entry) => entry.providerRefs),\n )].sort();\n const runtimeScopedProviderRefs = recipientPopulation.members\n .filter((member) => member.kind === RecipientPopulationMemberKind.CONFIGURED_PROVIDER)\n .map((member) => member.ref);\n const profileOnlyProviderRefs = Object.keys(saasConfig.providerConfigurations ?? {})\n .filter((providerRef) => !runtimeScopedProviderRefs.includes(providerRef) && !authoringScopedProviderRefs.includes(providerRef))\n .sort();\n\n return [\n \"# The application's compliance-relevant resource declarations (read from its CODE)\",\n 'These are DECLARATIONS on the resource configurations, enforced at runtime — not prose about the',\n 'application. They are the strongest evidence a governed document can rest on, and a mechanism fact',\n '(what erasure does to a row, whether a subject export can answer for it) must come from here rather',\n 'than from a specification, which states purpose.',\n '',\n 'Read them exactly. `RETAIN_ONLY` is the factory-CHECKED declaration that a resource holds no personal',\n 'data ABOUT ITS OWN SUBJECT. It may still hold the name of the party it describes (a tenant billed, an',\n 'organization a record is about), declared personal only where that party is a natural person: state such a',\n 'resource as holding that party\\'s name under that condition, never as holding no personal data at all.',\n '`RETAIN_AND_IMPERSONALIZE` means at least one field would actually be scrubbed on',\n 'erasure. `dataSubjectKind` answers WHOSE LOGIN SESSION an erasure ends and nothing else — `NO_PRINCIPAL`',\n 'is equally true of an invoice and of a CRM contact who has no account, so never read it as \"not a person\".',\n '',\n 'An UNDECLARED resource has said nothing. That is not a statement that it holds no personal data, and a',\n 'fact asserting either way about it would be invention. Where it matters to a document, say that the',\n 'application has not yet declared it.',\n '',\n ...renderOrigin('ENGINE', 'Engine-declared (inherited by every generated application)', PlaybookRunCompanionService.ENGINE_UNDECLARED_RESOURCE_NAMES_SHOWN),\n '',\n ...renderOrigin('APPLICATION', \"Application-declared (this application's own domain data)\", null),\n /*\n * NOT BUILT is not NONE (#2506). app-creation-test-004 derived its facts before the build had produced a single\n * resource, and wrote \"the application declares zero application-origin domain resources\", which the build then\n * made false. An empty application origin means the question cannot be answered yet.\n */\n ...(resources.some((resource) => resource.origin === 'APPLICATION')\n ? []\n : [\n '',\n 'NOT BUILT YET: no resource of this application\\'s own has been materialized, so the build has not produced its',\n 'domain data. Nothing can be stated about that data, neither that it holds personal data nor that it holds none.',\n 'A fact about it says it is not yet established; these facts go stale, and are derived again, once the build declares it.',\n ]),\n '',\n '## Which CATEGORIES of personal data this application holds',\n 'Read off each field\\'s `.dataCategories()` declaration, plus the one category the framework DERIVES —',\n '`credentials`, from `.isPassword()` / `.isOtp()` / `.isWriteOnlySecret()`, which are markers the author',\n 'wrote. Nothing here is inferred from a field NAME: a category list assembled by pattern-matching',\n '`email`, `phone` or `dateOfBirth` is a guess, and whatever it misses is simply never disclosed.',\n '',\n 'A `special-category:*` value is GDPR Art. 9 data and needs a lawful basis of its own beyond Art. 6.',\n '`criminal-offence` is Art. 10, a different article with a different condition. Say which one applies —',\n '\"special category data\" alone is not a disclosure.',\n '',\n (snapshot.personalDataCategories ?? []).length > 0\n ? `Declared across the whole application: ${(snapshot.personalDataCategories ?? []).map((category) => `\\`${category}\\``).join(', ')}.`\n : 'NO resource declares any personal-data category. Do NOT read that as \"this application holds no '\n + 'personal data\" — it means the question has not been answered per field. State it as outstanding.',\n '',\n /*\n * CONDITIONAL categories (#2119). A tenant organization's name, number and address are an individual's personal\n * data when the tenant is a sole trader and a company's when it is not (GDPR Recital 14 excludes legal persons\n * only). The declaration says so, and the notice must too: stating the data unconditionally claims it about every\n * customer, and omitting it leaves the sole trader out. The brief therefore hands the drafter the split and the\n * sentence shape, rather than a flat union the drafter cannot tell apart.\n */\n ...((snapshot.conditionalPersonalDataCategories ?? []).length > 0\n ? [\n `Held about the people this application serves on EVERY row: ${(snapshot.unconditionalPersonalDataCategories ?? []).map((category) => `\\`${category}\\``).join(', ') || '(none)'}.`,\n '',\n 'Held ONLY UNDER A CONDITION — state each of these CONDITIONALLY, never as data held about everyone, and never',\n 'omit them:',\n '',\n ...(snapshot.conditionalPersonalDataCategories ?? []).map((conditional) =>\n `- \\`${conditional.condition}\\`: ${conditional.categories.map((category) => `\\`${category}\\``).join(', ')} — on `\n + conditional.resources.map((resource) => `\\`${resource.resourceType}\\` (${resource.fieldNames.map((fieldName) => `\\`${fieldName}\\``).join(', ')})`).join(', ')),\n '',\n ...(snapshot.conditionalPersonalDataCategories ?? []).map((conditional) =>\n `\\`${conditional.condition}\\` means: ${PERSONAL_DATA_CONDITION_EXPLANATIONS[conditional.condition as PersonalDataCondition] ?? 'a condition this companion does not know; state these categories as held under a condition it cannot name, and mark the sentence owed.'}`),\n ]\n : ['No field declares a condition: every category above is held unconditionally.']),\n '',\n ...((snapshot.uncategorizedPersonalFieldsByResource ?? []).length > 0\n ? [\n 'OUTSTANDING — fields this application has ALREADY declared to be personal (they carry an erasure scrub',\n 'treatment, a portability provenance, or a credential marker) and has NOT categorized. For these the',\n 'omission is provable: the application said the field holds personal data by another door. Name them;',\n 'never guess what they contain.',\n '',\n ...(snapshot.uncategorizedPersonalFieldsByResource ?? []).map((resource) =>\n `- \\`${resource.resourceType}\\` (${resource.origin.toLowerCase()}): `\n + resource.fields.map((field) => `\\`${field.fieldName}\\` (personal by: ${field.basis})`).join(', ')),\n ]\n : ['No field is personal-by-another-declaration and uncategorized. Nothing is outstanding on this axis.']),\n '',\n '## What this application IS, and what it is COMPOSED of',\n '',\n 'The declared boundary first — this is the programme\\'s scope, read from the application\\'s own',\n 'configuration rather than described by anyone. Name the product by its display name; name the',\n 'services individually. A service NOT listed here is not part of this application.',\n '',\n `- Product: \\`${saasConfig.name ?? 'UNDECLARED'}\\`${saasConfig.displayName ? ` — \"${saasConfig.displayName}\"` : ''}`\n + `${saasConfig.type ? `, declared type \\`${saasConfig.type}\\`` : ''}.`,\n ...(saasConfig.services === undefined\n ? ['- Services: _the configuration declares none, which for a running application means this could not be read rather than that none exist._']\n : [\n `- Services (${Object.keys(saasConfig.services).length}): `\n + Object.entries(saasConfig.services)\n .map(([key, service]) => `\\`${key}\\`${service?.serviceName ? ` (${service.serviceName}` : ''}${service?.frontendType ? `, ${service.frontendType}` : ''}${service?.serviceName ? ')' : ''}`)\n .join(', '),\n ]),\n ...(saasConfig.modules === undefined || Object.keys(saasConfig.modules).length === 0\n ? []\n : [\n `- Domain modules (${Object.keys(saasConfig.modules).length}): `\n + Object.keys(saasConfig.modules).map((moduleRef) => `\\`${moduleRef}\\``).join(', '),\n ]),\n '',\n 'Its declared engine capabilities and configured external providers, read from its own composition.',\n 'An entry that is ABSENT here is absent from the application: nothing enables it, nothing is',\n 'configured for it. That is a positive, checkable statement — not a gap, and not something to mark',\n 'as awaiting configuration. Say it plainly: \"no external analytics provider is configured\".',\n '',\n declaredCapabilities.length > 0\n ? `Declared engine capabilities REACHED BY THE RUNNING APPLICATION (${declaredCapabilities.length}): ${declaredCapabilities.map((capability) => `\\`${capability}\\``).join(', ')}`\n : 'Declared engine capabilities reached by the running application: NONE.',\n ...(authoringOnlyCapabilities.length > 0\n ? [\n `Declared engine capabilities reached ONLY WHILE THE APPLICATION IS BUILT (${authoringOnlyCapabilities.length}): `\n + `${authoringOnlyCapabilities.map((capability) => `\\`${capability}\\``).join(', ')}.`,\n 'These are development tooling. They operate on this application\\'s own source and specifications,',\n 'never on a user\\'s data, and they are NOT features of the contracted service — so a privacy notice,',\n 'a record of processing or a set of service terms must not describe them, and must not be marked',\n 'incomplete for failing to. State plainly that the service itself does not do this.',\n 'They ARE in scope for a statement about how the software is developed (secure development,',\n 'change management, supply chain); say so there rather than here.',\n ]\n : []),\n runtimeScopedProviderRefs.length > 0\n ? `External providers BOUND TO A RUNTIME (${runtimeScopedProviderRefs.length}): ${runtimeScopedProviderRefs.map((providerRef) => `\\`${providerRef}\\``).join(', ')} — these can process this application's data.`\n : 'External providers bound to a runtime: NONE — no third party receives application data through a configured provider.',\n ...(authoringScopedProviderRefs.length > 0\n ? [\n `External providers bound ONLY TO THE BUILD-TIME COMPANION (${authoringScopedProviderRefs.length}): `\n + `${authoringScopedProviderRefs.map((providerRef) => `\\`${providerRef}\\``).join(', ')}.`,\n 'The companion is the tool that builds this application. These providers receive its source and',\n 'specifications; they receive NO user data and are not recipients for a privacy notice.',\n ]\n : []),\n ...(configuredProviderScopes.length > 0\n ? configuredProviderScopes.map((entry) => `- scope \\`${entry.scope}\\`: ${entry.providerRefs.map((ref) => `\\`${ref}\\``).join(', ')}`)\n : []),\n ...(profileOnlyProviderRefs.length > 0\n ? [\n `Provider PROFILES with no runtime binding (${profileOnlyProviderRefs.length}): `\n + `${profileOnlyProviderRefs.map((providerRef) => `\\`${providerRef}\\``).join(', ')}.`,\n 'A profile says how to reach a provider; nothing here binds it to a runtime that handles this',\n \"application's data. Build-time tooling lives here — a coding agent operates on the workspace,\",\n 'not on customer records. Do NOT name these as recipients of personal data without evidence',\n 'that a runtime actually sends them some.',\n ]\n : []),\n ...renderRecipientPopulation(recipientPopulation),\n ...renderRecipientDisclosures(deriveRecipientDisclosures({\n population: recipientPopulation,\n // An unread snapshot is NOT an empty one: undefined makes a system-of-record recipient report FLOWS_NOT_READ.\n systemOfRecordFlows: snapshot.resources === undefined ? undefined : parseSystemOfRecordFlows(snapshot.resources as Parameters<typeof parseSystemOfRecordFlows>[0]),\n providerComplianceChoices: saasConfig.providerComplianceChoices,\n lawfulBases: ApplicationOperatorComplianceIdentitySchema.safeParse(saasConfig.operatorComplianceIdentity).data?.lawfulBases,\n })),\n // Who runs each member the OPERATOR answers for. A tenant's own vendor and a vendor nothing reaches\n // carry no operator deployment choice, so asking for one would be asking the wrong party.\n ...renderProviderComplianceChoices(\n [...recipientPopulation.operatorSubProcessorRefs, ...recipientPopulation.operatorRunRefs],\n saasConfig.providerComplianceChoices,\n ),\n ...renderAppAssertedProcessingRegions(saasConfig.providerComplianceChoices, complianceProfiles),\n ...renderProviderComplianceProfileFindings(recipientPopulation, discoveredProfiles.unreadableReason),\n ...renderCodingModelDestinations(saasConfig.providerConfigurations),\n '',\n ...renderRetentionSchedule(saasConfig.dataRetention),\n '',\n // Joined to the recipient population: a profile with no runtime binding is not a recipient, and neither is a\n // declared vendor no data path reaches.\n ...(processorRegisterNotRead !== undefined\n ? renderProcessorRegisterNotRead(processorRegisterNotRead)\n : [\n ...renderProcessorRegister(recipientPopulation, processorRegister),\n ...renderComplianceFactStaleness(recipientPopulation, processorRegister, complianceProfiles, new Date().toISOString().slice(0, 10)),\n ...renderProcessorAgreementStanding(processorRegister),\n ]),\n '',\n /*\n * The FULL declared set, not the runtime-filtered one. `renderAiUsePosture` performs its own\n * surface split — it must report the runtime AI capabilities as the service's, AND name the\n * build-time ones as deliberately outside it. Handing it the already-filtered list makes the\n * second half unreachable, so the section would silently DENY a capability the application\n * enables instead of placing it. Caught by the pin for exactly that sentence.\n */\n ...renderAiUsePosture(\n new Set(declaredCapabilities),\n new Set(authoringOnlyCapabilities),\n saasConfig.aiUsePosture,\n await this.readAgentAiUseDeclarations(backendServiceKey, declaredCapabilities),\n saasConfig.operatingJurisdictions,\n ),\n '',\n ...await this.composeExternalAuthenticationSection(),\n ...composeBillingCommercialModelBrief(await this.resolveBillingDeclaration()),\n ...composeOperatingJurisdictionCoverageBrief(saasConfig.operatingJurisdictions),\n ...renderOperatorComplianceIdentity(saasConfig.operatorComplianceIdentity),\n ...renderServiceConsentRequirement(saasConfig.operatorComplianceIdentity?.serviceConsentRequirement),\n ...renderClientStorage(\n Object.entries(this.companionContext.servicesByKey)\n .filter(([, service]) => Boolean(service.frontendType))\n .map(([serviceKey]) => serviceKey),\n saasConfig.clientStorage,\n ),\n ].join('\\n');\n }\n\n /**\n * The provider modules the registry offers (#2025), for a playbook that binds providers. Best-effort by construction:\n * an unreadable registry renders a section saying so (`provider-registry-brief.companion.utils.ts`), never a refusal.\n */\n private async composeProviderRegistrySection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.PROVIDER_REGISTRY)) return '';\n const saasRoot = this.companionContext.saasRoot;\n const listing = await listRegistryProviderModules({\n frameworkRoot: this.companionContext.resolvedHomes.framework.repositoryRoot ?? null,\n moduleRegistries: this.companionContext.saasConfig?.moduleRegistries,\n });\n // The engine's own providers beside the registry's (#3992): a planner sees everything the framework has before it\n // concludes a need is unprovided.\n return renderProviderRegistryBrief(listing, (providerRef) => isRegistryProviderInstalled(saasRoot, providerRef), engineProviderOffers(listRegisteredProviderSpecifications()));\n }\n\n private async composeWorkspaceTruthSection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.WORKSPACE_TRUTH)) return '';\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (!backendServiceKey) {\n throw new PlaybookNotReadyError(\n `\"${playbook?.ref ?? '(unknown playbook)'}\" plans against the current workspace, but no backend service is available to introspect it.`,\n );\n }\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'resources-registry' });\n if (!result.success) {\n throw new PlaybookNotReadyError(\n `\"${playbook?.ref ?? '(unknown playbook)'}\" plans against the current workspace, but the resources-registry introspection failed: `\n + JSON.stringify(result),\n );\n }\n const snapshot = result.data as {\n modules?: ReadonlyArray<{ moduleId: string; resourceTypes: readonly string[] }>;\n resourceSchemaFields?: Record<string, readonly string[]>;\n };\n const modules = snapshot.modules ?? [];\n const moduleLines = modules.map((sharedModule) => {\n const resourceLines = sharedModule.resourceTypes.map((resourceType) => {\n const fields = snapshot.resourceSchemaFields?.[resourceType] ?? [];\n /*\n * BOTH names, because they differ and a plan needs the SLUG. A registry resourceType is\n * camelCase (`workspaceMember`); a build-plan `resourceRef`/`moduleRef` is validated\n * against a kebab-case slug schema. The first version of this section listed only the\n * resourceType, the model copied it verbatim as instructed, and the provider rejected the\n * whole plan on 8 `resourceRef` format violations — twice (wonder-crm, 2026-08-27).\n */\n // The lane's one name → ref mapping (#3204), the same one the reference checks resolve with.\n const resourceRef = ApplicationCreationSpecs.domainPlanResourceSlugRef(resourceType);\n const both = resourceRef === resourceType\n ? `\\`${resourceType}\\``\n : `\\`${resourceType}\\` (its slug ref, for a task target: \\`${resourceRef}\\`)`;\n return ` - resource ${both} — current schema fields: ${fields.length > 0 ? fields.map((field) => `\\`${field}\\``).join(', ') : '(none readable)'}`;\n });\n return [`- module \\`${sharedModule.moduleId}\\``, ...resourceLines].join('\\n');\n });\n return [\n '# Current application workspace (ground truth)',\n 'This is the application\\'s REAL code state right now, read from its workspace. It is binding:',\n '- A task\\'s `moduleRef` MUST be one of the module ids listed below, EXACTLY. Never invent a module id.',\n '- A task\\'s `resourceRef` MUST be a resource\\'s SLUG ref (the kebab-case form shown in parentheses',\n ' where it differs from the resource type). Both names are given because they differ; refs are slugs.',\n '- Every resource listed below already EXISTS as a compose-born starter skeleton (registered, typechecking,',\n ' with the fields shown). Its stage tasks are ENRICHMENT: state WHAT domain content to add or change',\n ' (the fields, enums, operations, displays the domain plan declares). An objective that asks to',\n ' \"create\" or \"scaffold\" a resource shown here would correctly result in a no-op coding run.',\n '- A resource in the domain plan that is NOT listed below does not exist yet; its tasks are creation tasks.',\n '',\n ...(moduleLines.length > 0 ? moduleLines : ['(no application-authored modules exist yet — every module and resource task is a creation task)']),\n '',\n ...(await this.composeApplicationStoreLines()),\n '',\n ...(await this.composeOrganizationConfigurationLines()),\n '',\n ...composeEngineSettingsDestinationLines(),\n ].join('\\n');\n }\n\n /**\n * The organization model the configuration ALREADY declares (#3035, #3039): its organization types (the owner found\n * by `ownsApplication`), relationship kinds and system-of-record instances, for a playbook planning against the\n * workspace and for its judge. Read FRESH, because a build task may have just changed it. Best effort: an unreadable\n * configuration is said, never rendered as an empty one (`renderOrganizationConfigurationBrief`).\n */\n private async composeOrganizationConfigurationLines(): Promise<readonly string[]> {\n try {\n const config = await loadSaasConfig(path.join(this.companionContext.saasRoot, 'wildo.saas.config.ts'), { freshModuleCache: true });\n const briefInput = config === null || config === undefined ? undefined : config as OrganizationConfigurationBriefInput;\n // #3043: the owner organization's declared chart, beside the model, read where the backend declares it.\n const identityLines = await this.composeOrganizationIdentityLines(Object.entries(briefInput?.organizationTypes ?? {}).find(([, type]) => type?.ownsApplication === true)?.[0]);\n return [...renderOrganizationConfigurationBrief(briefInput), ...(identityLines.length === 0 ? [] : ['', ...identityLines])];\n } catch (error) {\n return renderOrganizationConfigurationBrief(undefined, describeCaughtError(error));\n }\n }\n\n /**\n * The organization chart the backend declares (#3043): `organizationIdentity`, read through the\n * `organization-identity-declaration` introspection behavior from the backend's own initialization configuration, its one\n * source. Only for an application whose configuration has an owner type, which the declaration describes. Best effort:\n * an unreadable declaration is said, never rendered as an absent one (`renderOrganizationIdentityBrief`).\n */\n private async composeOrganizationIdentityLines(ownerTypeRef: string | undefined): Promise<readonly string[]> {\n if (ownerTypeRef === undefined) return [];\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey ?? {}).find(([, service]) => !service.frontendType)?.[0];\n let source: OrganizationIdentityBriefSource;\n if (backendServiceKey === undefined) {\n source = { unreadable: 'no backend service is available to introspect' };\n } else {\n try {\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'organization-identity-declaration' });\n const reading = result.success ? result.data as Partial<OrganizationIdentityDeclarationReading> | undefined : undefined;\n source = typeof reading?.declared === 'boolean'\n ? { reading: reading as OrganizationIdentityDeclarationReading }\n : { unreadable: result.success ? 'the introspection answered no reading' : `the introspection failed: ${JSON.stringify(result)}` };\n } catch (error) {\n source = { unreadable: describeCaughtError(error) };\n }\n }\n return renderOrganizationIdentityBrief(source, ownerTypeRef, existsSync(path.join(this.companionContext.saasRoot, 'backend-api', 'src', 'organization-identity.ts')));\n }\n\n /**\n * The capabilities, billing and sign-in methods this application enables (#2502 review F2), for a playbook declaring\n * `APPLICATION_ENABLED_SURFACE`. Best effort: unreadable is said, never read as off.\n */\n private async composeApplicationEnabledSurfaceSection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.APPLICATION_ENABLED_SURFACE)) return '';\n return (await this.composeEnabledApplicationSurface()).join('\\n');\n }\n\n private async composeEnabledApplicationSurface(): Promise<readonly string[]> {\n const engineCapabilities = this.companionContext?.saasConfig === undefined\n ? undefined\n : enabledEngineCapabilityNames((this.companionContext.saasConfig as { engineCapabilities?: Record<string, unknown> | readonly string[] }).engineCapabilities);\n let userTypeAuthMethods: Record<string, AuthMethodsMap | undefined> | undefined;\n try {\n const { configuration: backendConfig } = await loadBackendCompanionData(this.companionContext);\n const userTypes = (backendConfig as { userTypes?: Record<string, { auth?: { authMethodsEnabled?: AuthMethodsMap } }> }).userTypes;\n userTypeAuthMethods = userTypes === undefined\n ? undefined\n : Object.fromEntries(Object.entries(userTypes).map(([userType, definition]) => [userType, definition.auth?.authMethodsEnabled]));\n } catch (error) {\n this.logDebug('Backend configuration read failed (the enabled sign-in methods will be reported as unreadable)', { error: String(error) });\n }\n return composeEnabledApplicationSurfaceLines({ engineCapabilities, billing: await this.resolveBillingDeclaration(), userTypeAuthMethods });\n }\n\n /**\n * WHICH STORE this application persists to, computed rather than looked up by the model (#1435).\n *\n * `bottom_up.build-decompose` needs it: on PostgreSQL a resource's table is built by a MIGRATION and\n * by nothing else, so a schema-stage task that stops at the Zod file produces a resource the\n * application cannot store. Its method therefore told the model to `rg -n \"applicationDatabase\"` —\n * in a STRUCTURED GENERATION, which has no shell. The instruction could never be followed, and what\n * happened instead is invisible: the model answered from the surrounding prose or from nothing.\n *\n * The companion already computes this exactly, for the generation-step lane\n * (`assessApplicationSchemaPlanObligation`, #1144), from the lockfile plus the authored\n * `applicationDatabase.engine`. So this is the epic's own thesis applied to one value: it was\n * derivable, it was already derived, and an agent was being asked to go and find it.\n *\n * UNDETERMINED is REPORTED, never resolved to a default. Guessing MongoDB leaves a PostgreSQL\n * application with unstorable resources; guessing PostgreSQL teaches a coding agent to carry an\n * obligation that does not apply. Neither is a reading of the evidence, and a plan that says it\n * could not tell is a plan someone can correct.\n */\n private async composeApplicationStoreLines(): Promise<readonly string[]> {\n const heading = '## Where this application STORES its data';\n /*\n * BEST-EFFORT, and the reason is what it sits inside: this is one section of a BRIEF, and a\n * throw here takes the whole composition down — the module and resource truth the planner cannot\n * work without goes with it. The assessment already HAS an honest answer for \"could not read\"\n * (`UNDETERMINED`), so a failure takes the same branch rather than inventing a different outcome.\n */\n let assessment: Awaited<ReturnType<typeof assessApplicationSchemaPlanObligation>>;\n try {\n assessment = await assessApplicationSchemaPlanObligation(this.companionContext.saasRoot);\n } catch (error) {\n assessment = {\n obligation: ApplicationSchemaPlanObligation.UNDETERMINED,\n reason: `the application store could not be assessed: ${describeCaughtError(error)}`,\n };\n }\n switch (assessment.obligation) {\n case ApplicationSchemaPlanObligation.ACCEPTED_PLAN:\n case ApplicationSchemaPlanObligation.BASELINE_OWED:\n return [\n heading,\n 'PostgreSQL. A resource\\'s table is created by a MIGRATION and by nothing else — there is no',\n 'implicit creation — so a schema stage that stops at the Zod file has produced a resource this',\n 'application cannot store. Bind `application-database-migrations` to EVERY schema-stage task,',\n 'and say in the objective that the stage is finished when `wildo db diff --check` is clean.',\n ...(assessment.obligation === ApplicationSchemaPlanObligation.BASELINE_OWED\n ? ['No schema plan has been accepted yet, so the FIRST migration is the baseline: it renders the whole model.']\n : []),\n ];\n case ApplicationSchemaPlanObligation.NOT_OWED:\n return [\n heading,\n 'MongoDB. A collection appears on first write, so do NOT bind `application-database-migrations`',\n 'and do not mention migrations in any objective — a task carrying an obligation that does not',\n 'apply teaches the coding agent to ignore obligations.',\n ];\n default:\n return [\n heading,\n `UNKNOWN — ${assessment.reason}.`,\n 'Do not guess. Say in the plan that the store could not be read, and leave the migration',\n 'obligation unbound: a wrong guess either way costs more than a stated gap.',\n ];\n }\n }\n\n /**\n * The application-knowledge skill catalog, as the brief's own section.\n *\n * A playbook METHOD names skills — `bottom_up.build-decompose` binds every task it emits to a\n * skill folder and instructs the model to \"route through the skills index; do not invent skill\n * names\". Measured 2026-08-27, the model had never been shown one: `skillRefs` reached the brief\n * zero times, so 54 tasks were bound from recall. A dangling ref is a task the dispatch playbook\n * cannot run, and the rendering that would have caught it (`wildo fwk audit` rule 13) only sees\n * AUTHORED playbooks, never a generated plan.\n *\n * Two shapes, because the two needs are different:\n * - a ROUTING playbook (one declaring `SKILL_CATALOG`) gets the whole catalog — it must choose\n * across the full set, so a partial list would silently bound what it can express;\n * - every other playbook gets exactly the skills its OWN method names, which its guidance\n * already mentions by name and which cost a few hundred bytes rather than 25KB.\n *\n * Purpose-only by construction (`listFrameworkKnowledgeSkillSummaries` drops the `Use when \"…\"`\n * trigger half): triggers exist to match a HUMAN's utterance to a skill, and a playbook is\n * matching a build TASK to one. Carrying them would roughly double the section for phrasing this\n * reader cannot use — and the compiled `INDEX.md` router itself (76KB) is larger than the entire\n * rest of a decompose brief, which is why it is deliberately NOT what gets injected.\n */\n /**\n * The FULL BODY of the skills this method declares it must follow (#1435).\n *\n * `composeSkillCatalogSection` below answers \"which skills exist and what does each do\" — the\n * question a model CHOOSING between them asks. This answers the other one: a method that has\n * already chosen, and says \"follow the `brand-logo-authoring` skill for the exact field\n * contracts\", needs the contract. Measured 2026-09-22, three methods said exactly that and only\n * the purpose line ever arrived, so the model followed a document it had never been shown.\n *\n * Bounded by DECLARATION, not by total. `top_down.market-snapshot-produce` names sixteen skills\n * and one of them is 133KB, so \"render every named skill's body\" is not a mechanism — it is a\n * brief nobody can afford. `skillBodyRefs` is the method naming the one or two it must follow.\n *\n * A declared ref that resolves to no skill folder is NAMED in the section rather than skipped: a\n * method instructing the model to follow a skill that is not there is a defect the model should\n * report, and a silent omission would leave it following its recollection instead.\n */\n private composeSkillBodiesSection(playbook: MetaWorkflowPlaybook): string {\n const refs = playbook.method?.skillBodyRefs ?? [];\n if (refs.length === 0) return '';\n const bodies: string[] = [];\n const unresolved: string[] = [];\n for (const ref of refs) {\n let body: string | null = null;\n try {\n body = readFrameworkKnowledgeSkillBody(ref);\n } catch (error) {\n this.logDebug('Skill body unavailable for the brief (continuing without it)', { playbookRef: playbook.ref, ref, error: String(error) });\n }\n if (body === null) {\n unresolved.push(ref);\n continue;\n }\n bodies.push([`## Skill: \\`${ref}\\``, body].join('\\n'));\n }\n if (bodies.length === 0 && unresolved.length === 0) return '';\n return [\n '# The skills this method tells you to FOLLOW',\n 'Your guidance names these by ref and instructs you to follow them. Their contracts are',\n 'authoritative for the fields they describe — follow them exactly rather than recalling a',\n 'similar shape. A skill body may point at `references/`, `examples/` or `scripts/` beside it;',\n 'you cannot open those, so where one is the only source for a detail, say so on what you author',\n 'rather than inventing the detail.',\n '',\n ...bodies,\n ...(unresolved.length === 0\n ? []\n : [\n '',\n `_Declared and NOT FOUND: ${unresolved.map((ref) => `\\`${ref}\\``).join(', ')}. The method told you to_`,\n '_follow these and the framework could not supply them — do not substitute a remembered contract;_',\n '_say on what you author that the contract was unavailable._',\n ]),\n ].join('\\n');\n }\n\n private composeSkillCatalogSection(playbook: MetaWorkflowPlaybook): string {\n const declaredSkillRefs = playbook.method?.skillRefs ?? [];\n const routesThroughCatalog = playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.SKILL_CATALOG);\n if (!routesThroughCatalog && declaredSkillRefs.length === 0) return '';\n\n let summaries: ReturnType<typeof listFrameworkKnowledgeSkillSummaries>;\n try {\n summaries = listFrameworkKnowledgeSkillSummaries();\n } catch (error) {\n // Best-effort BY DESIGN, and only here: the catalog SHARPENS a choice, it is not the\n // application's truth. An artifact that cannot be read must not fail a run that would\n // otherwise produce a valid artifact — the opposite posture to the workspace section, whose\n // absence would let a plan invent module ids.\n this.logDebug('Skill catalog unavailable for the brief (continuing without it)', { playbookRef: playbook.ref, error: String(error) });\n return '';\n }\n const summaryByName = new Map(summaries.map((summary) => [summary.name, summary]));\n const rendered = routesThroughCatalog\n ? summaries\n : declaredSkillRefs.map((ref) => summaryByName.get(ref)).filter((summary): summary is NonNullable<typeof summary> => summary !== undefined);\n if (rendered.length === 0) return '';\n\n const declared = new Set(declaredSkillRefs);\n const lines = rendered.map((summary) => {\n // A skill this playbook's own method names is marked, so \"the catalog\" and \"what my method\n // told me to use\" stay distinguishable inside one list.\n const mark = routesThroughCatalog && declared.has(summary.name) ? ' **(named by this playbook\\'s method)**' : '';\n return `- \\`${summary.name}\\`${mark} — ${summary.purpose}`;\n });\n return [\n '# Application-knowledge skills (the catalog)',\n routesThroughCatalog\n ? 'These are ALL the skills installed in the application. Where an output binds work to a skill, the'\n + ' name MUST be one of these, spelled EXACTLY as listed — a name that is not here addresses no'\n + ' skill folder and the work bound to it cannot be executed. Never invent or infer a skill name.'\n : 'The skills this playbook\\'s method names, and what each one does.',\n '',\n ...lines,\n ].join('\\n');\n }\n\n /**\n * Render the playbook's DECLARED input families into the brief — the derivation substrate.\n *\n * The catalog contract (`inputs: [{ family }]`) is what a playbook derives FROM: market derives from\n * the vision brief, requirements from vision + market, and so on. J-1 (2026-08-26, the first live\n * wonder-crm run) proved that composing the brief without them starves every post-elicitation\n * playbook of the product itself: `top_down.market-analysis` received the method and no vision, and\n * the model — correctly refusing to invent — returned empty collections that failed the family\n * schema, surfacing as an opaque \"no valid object\" three layers away. Eligibility already gates on\n * these same families being present and valid, so a family that reaches this point and still has no\n * VALUE (a file-only marker) is skipped rather than serialized as noise.\n *\n * Content comes from the SAME working-tree read the eligibility gate used (`readArtifactState()`),\n * so the two can never disagree about what the application currently contains.\n *\n * A family research wrote any of (the market snapshot, the compliance posture's constraints) is SCREENED before the model\n * reads it (#2937), through the seam the coding brief uses: withheld when flagged, marked when nothing screened it.\n * This is the one place a generating step reads its declared inputs, so what it writes into the application's trusted\n * specifications (requirements, plans, a build task's objective) is never derived from a flagged instruction. An input\n * that follows references (`related`) can pull in another family's elements, so it is screened too.\n */\n private async composeInputTruthSection(\n playbook: { readonly ref?: string; readonly inputs?: readonly DeclaredInputFamilyRendering[] },\n state: PlaybookArtifactState,\n ): Promise<string> {\n const rendered: RenderedInputFamilySection[] = [];\n const notApplicable: string[] = [];\n const absent: string[] = [];\n const valuesByFamily = this.decidedFamilyValues(state);\n // Read once, and only when a declared input has a value to render.\n let isResearchInformed: ((family: string) => boolean) | undefined;\n for (const declaredInput of playbook.inputs ?? []) {\n /*\n * Said, never merely omitted (#1604). An absent input reads as \"not written yet\", and a model given\n * a requirements brief with no market invents the market it thinks is missing. A family the line\n * declares not applicable is an answer: this application has none, and none is owed.\n */\n if (isFamilyNotApplicable(state.applicationLine, declaredInput.family)) {\n notApplicable.push(declaredInput.family);\n continue;\n }\n const value = valuesByFamily[declaredInput.family];\n if (value === undefined || value === null) {\n /*\n * ABSENT is stated, not dropped (#2235): a model — or the judge reading this same section as its evidence —\n * that meets no heading for a declared input cannot tell \"not written yet\" from \"not shown\". A file-only\n * marker is present, so it stays unstated, as before.\n */\n if (state.artifactsByFamily.get(declaredInput.family) !== FILE_PRESENT_WITHOUT_VALUE) absent.push(declaredInput.family);\n continue;\n }\n // The playbook's DECLARATION decides how much of the family it reads — its aspects, or its intent.\n // Absent = everything, which is what every playbook did before either existed.\n rendered.push({\n family: declaredInput.family,\n text: renderDeclaredInputFamily(declaredInput, value, valuesByFamily),\n researchInformed: (isResearchInformed ??= researchInformedFamilies(readCompiledResearchInformedContent(), valuesByFamily))(declaredInput.family)\n || declaredInput.related !== undefined,\n });\n }\n const screenedTexts = await screenResearchInformedInputSections(rendered, {\n contentSafety: this.contentSafety,\n logger: this.logger,\n verdicts: companionScreeningVerdicts(),\n playbookRef: playbook.ref ?? 'unknown',\n });\n const sections = rendered.map((section, index) => `## Input family: ${section.family}\\n${screenedTexts[index]}`);\n if (sections.length === 0 && notApplicable.length === 0 && absent.length === 0) return '';\n const line = state.applicationLine?.declaration;\n const lineName = line?.state === ApplicationLineDeclarationState.DECLARED ? line.line : 'declared';\n return [\n '# Accepted application truth (derivation inputs)',\n 'Derive the output FROM this content. It is the application\\'s current authored truth for the',\n 'declared input families — never contradict it, and never invent facts it does not support.',\n ...(notApplicable.length > 0\n ? ['', `These input families do NOT APPLY to this application, which is created on the ${lineName} line: ${notApplicable.map((family) => `\\`${family}\\``).join(', ')}.`,\n 'The application has none and none is owed. Do not infer, invent or ask for their content, and leave',\n 'every reference into them empty (for example, requirements name no ICP when the market does not apply).']\n : []),\n ...(absent.length > 0\n ? ['', `These declared input families have NO accepted content yet: ${absent.map((family) => `\\`${family}\\``).join(', ')}.`,\n 'They are absent, not unread. Do not infer or invent their content; where the method says what to do without one,',\n 'do exactly that.']\n : []),\n ...(sections.length > 0 ? ['', sections.join('\\n\\n')] : []),\n ].join('\\n');\n }\n\n /**\n * Every family value this run loaded, as the decided-aspect index reads it (#1420).\n *\n * One construction for the generation brief and the assessment judge, so the two resolve an input —\n * including `document-facts`, which carries the computed overlay — to the same value, and a RELATED\n * walk can reach any family the run read rather than only the declared ones. A file-only marker has\n * no value to index and is left out.\n */\n /**\n * Which families research wrote any of (#2937, #2938), joined over the values a reader is about to read: the tree's,\n * overlaid with `overlay` (what a run just landed, or what the judge bench was handed). `researchInformedFamilies`\n * fails toward over-marking, so an unreadable catalog or index marks every family.\n */\n private researchInformedFamilyPredicate(\n state: PlaybookArtifactState | undefined,\n overlay: ReadonlyArray<{ readonly family: string; readonly value: unknown }> = [],\n ): (family: string) => boolean {\n const values = { ...(state !== undefined ? this.decidedFamilyValues(state) : {}), ...Object.fromEntries(overlay.map((entry) => [entry.family, entry.value])) };\n return researchInformedFamilies(readCompiledResearchInformedContent(), values);\n }\n\n /**\n * Landed (or supplied) family values as a judge reads them (#2938): each research-informed one screened, withheld or\n * marked. The predicate is joined over the tree overlaid with these values, so a family a run just landed is judged by\n * what it now holds. Shared by the generation-path judge and the judge bench, so the bench measures the judge that runs.\n */\n private async screenLandedValuesForJudge(\n playbookRef: string,\n state: PlaybookArtifactState | undefined,\n landed: ReadonlyArray<{ readonly family: string; readonly value: unknown }>,\n ): Promise<PlaybookJudgeSubject[]> {\n const isResearchInformed = this.researchInformedFamilyPredicate(state, landed);\n return screenResearchInformedJudgeSubjects(\n landed.map((entry) => ({ family: entry.family, value: entry.value, researchInformed: isResearchInformed(entry.family) })),\n this.researchFamilyScreeningHost(playbookRef),\n );\n }\n\n /** Which families research wrote any of, in the current tree: for a reader outside a run (the creation assistant, #2938). */\n public async readResearchInformedFamilyPredicate(): Promise<(family: string) => boolean> {\n return this.researchInformedFamilyPredicate(await this.readArtifactState());\n }\n\n /**\n * What screening research-derived text needs here: the companion's classifier, the process's verdicts, a log naming\n * `readerRef`. Public because the creation assistant's tools screen through it too (#2938): this service holds the\n * companion's classifier, and a second injection of it would be a second place to keep it.\n */\n public researchFamilyScreeningHost(readerRef: string): ResearchInformedFamilyScreeningHost {\n return { contentSafety: this.contentSafety, logger: this.logger, verdicts: companionScreeningVerdicts(), readerRef };\n }\n\n private decidedFamilyValues(state: PlaybookArtifactState): Record<string, unknown> {\n const values: Record<string, unknown> = {};\n for (const [family, value] of state.artifactsByFamily) {\n if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE) continue;\n values[family] = value;\n }\n const documentFacts = this.documentFactsWithComputedOverlay(state);\n if (documentFacts !== undefined && documentFacts !== null && documentFacts !== FILE_PRESENT_WITHOUT_VALUE) {\n values['document-facts'] = documentFacts;\n }\n return values;\n }\n\n /**\n * The provider boundary.\n *\n * `invokeAgent` with `GENERATE_STRUCTURED` hands the family's Zod schema to the provider, which\n * CONSTRAINS the model to a conformant object (OpenAI `response_format: json_schema`). That replaced a\n * \"return raw JSON\" prompt hack whose first live run emitted valid-JSON-but-schema-divergent output the\n * `_core` validator rejected — the schema is a floor the prompt cannot talk its way past.\n *\n * Usage is NOT asserted here. An earlier adapter threw when the provider's token counts were incomplete,\n * which turned one unmeasurable call into a permanently failed run; a budget may refuse to SPEND, but it\n * may never invalidate work that already exists (`.claude/rules/one-source-of-truth.md`, rule 5).\n */\n /**\n * RUNAWAY CIRCUIT BREAKER over the playbook lane's model calls — emphatically NOT a budget.\n *\n * Spending here is NORMAL and wanted (Paul, 2026-08-24: \"we are here to spend, we do not make small\n * things\"): the lane exists to build full businesses from a prompt, and real budget limits belong at\n * the MODEL PROVIDER's account, where they cover every lane at once (this breaker warns once, at the\n * lane's first call, to say exactly that). The ONLY thing refused is ABNORMAL behavior — a circle\n * burning calls at machine speed.\n *\n * That is why it measures a RATE (calls per UTC hour), never a daily quota: a legitimate heavy day\n * accumulates calls slowly and can never trip it, while a tight loop trips within the hour it starts.\n * Every model call in this lane — loop chooser, structured generation, advisory judge — funnels\n * through `buildGenerationPort`, and one playbook run costs a handful of calls, so the default of\n * 1000 calls/hour is on the order of 200 runs per hour: nothing human-initiated approaches it. It\n * refuses BEFORE spending, and the refusal names its own doors: the\n * `WILDO_PLAYBOOK_MODEL_CALL_HOURLY_BREAKER` env override, and a companion restart (the counter is a\n * runtime cache — losing it costs nothing but the count).\n */\n /**\n * How many runs THIS process submitted and has not seen answer — the pulse's `runsInFlight` (#1657).\n * In-memory by design: the pulse must not read the actor plane, and a run another process holds is\n * the feed's to report.\n */\n public countRunsInFlightInProcess(): number {\n return this.runningDetachedRuns.size;\n }\n\n /** What is running in this process, and what died leaving a resumable checkpoint. */\n public async readRunsInFlight(): Promise<{\n /** Every root composite instance running now, each holding its own single-flight subject (#1610). Empty when none is. */\n running: readonly { readonly runId: string; readonly playbookRef: string; readonly instanceKey?: string; readonly startedAt: string }[];\n runningDetached: readonly { readonly runId: string; readonly playbookRef: string; readonly instanceKey?: string; readonly startedAt: string; readonly traceSessionId?: string; readonly conversationId?: string }[];\n interrupted: readonly { readonly playbookRef: string; readonly instanceKey?: string; readonly completedIterations: number; readonly stepRefs: readonly string[]; readonly checkpointedAt: string }[];\n lastCompleted: readonly PlaybookSettledRunRecord[];\n /** The newest unattended playbook LOOP and what it took and spent (#1507) — `null` when none ran or the plane is unreachable. */\n lastLoop: PlaybookLoopRunRecord | null;\n }> {\n /*\n * READ FROM THE ROWS (#1362). Every run is an execution of `meta-workflows.system`, so the runs\n * that are in flight and the last outcome per playbook are a projection of that table — and\n * survive the companion restart that emptied the two maps this used to answer from. The maps\n * remain as what they always honestly were: the full result envelope of a run THIS process ran,\n * handed back to a poller as an enrichment of its row.\n */\n const liveResults = new Map([...this.lastCompletedDetachedRuns.values()].map((record) => [record.runId, record.result] as const));\n let fromRows: ReturnType<typeof projectPlaybookRunRecords>;\n let lastLoop: PlaybookLoopRunRecord | null = null;\n try {\n const executions = await this.executions.listActorExecutions(\n CompanionExecutionsListQuerySchema.parse({ systemRef: META_WORKFLOWS_SYSTEM_REF, limit: 200 }),\n );\n fromRows = projectPlaybookRunRecords(executions, (runId) => liveResults.get(runId));\n lastLoop = projectLastPlaybookLoop(executions);\n } catch (error) {\n /*\n * A STATUS READ does not fail because the actor plane is unreachable — the posture\n * `listInterruptedChoreographies` already takes. It answers what THIS process knows, which is\n * exactly what the read answered before #1362, and says so in the log: a poller watching its\n * own submission still sees it, and nothing here claims to know about runs it cannot read.\n */\n this.logDebug('The actor plane could not be read; answering the runs this process knows', { error: describeCaughtError(error) });\n fromRows = { running: [...this.runningDetachedRuns.values()], settled: [...this.lastCompletedDetachedRuns.values()] };\n }\n /*\n * `running` is every COMPOSITE holding a single-flight subject, read from its row since #1361, where\n * it used to be an in-memory marker only the process driving the composite could see. A LIST since\n * #1610: a secondary line's composite runs beside the main line's, one subject per instance. It\n * answers a different question from `runningDetached` (\"what did I submit that has not answered\n * yet\"), so a composite is reported under it alone.\n */\n const composites = fromRows.running.filter((run) => isCompositeExclusiveSubject(run.exclusiveSubject));\n return {\n // With its run id and instance (#1609): \"a composite running\" names WHICH run, not only which playbook.\n running: composites.map((composite) => ({\n runId: composite.runId,\n playbookRef: composite.playbookRef,\n ...(composite.instanceKey ? { instanceKey: composite.instanceKey } : {}),\n startedAt: composite.startedAt,\n })),\n runningDetached: fromRows.running.filter((run) => !composites.includes(run)).map(({ exclusiveSubject: _subject, ...run }) => run),\n interrupted: await this.listInterruptedChoreographies(),\n lastCompleted: fromRows.settled,\n lastLoop,\n };\n }\n\n /**\n * The most recent DETACHED run outcome per playbook INSTANCE — the read side of async submission (#265).\n *\n * In memory deliberately (one-source-of-truth Rule 5: a per-run cache; a restart costs the summary\n * and no fact — the artifacts are in the tree and the details in the traces). Bounded to one entry\n * per instance id (`<ref>` or `<ref>@<key>`, #1609), because the question this answers is \"what happened\n * to the run I submitted\", not a history — the traces are the history. Keyed by ref alone, a second\n * instance settling replaced the first one's outcome.\n */\n private lastCompletedDetachedRuns = new Map<string, PlaybookDetachedRunRecord>();\n\n /**\n * The detached runs THIS PROCESS is executing right now, keyed by RUN ID (#1609).\n *\n * It was keyed by playbook ref, and two runs of one playbook already overlapped before instances\n * existed (an ordinary run holds no single-flight subject): the second hid the first, the first's\n * settle deleted the second's entry, and with the map empty the run-tail heartbeat was REMOVED while\n * the second run still ran, so the supervisor could restart the companion under it. A run id is the one\n * key two runs can never share.\n *\n * `running` beside it lists the composites holding a single-flight subject and answers a different\n * question — a composite is in it while it drives its children, and an ordinary detached run never is.\n * So for every non-composite playbook the submission note's promise (\"`running` while in flight\") was\n * false: a caller polling a `bottom_up.build-dispatch` run saw `running: null` and an empty\n * `lastCompleted`, which is exactly what a run that was never submitted looks like.\n *\n * That was nearly invisible while a build dispatch returned at ADMISSION and the whole run lasted 25\n * seconds. Now that the run waits for the coding agent, the window IS the run — minutes — and a\n * companion restart in that window leaves the operator polling two empty fields forever.\n *\n * In memory, deliberately, like its completed counterpart: this is a per-run cache, and a restart\n * costs the summary and no fact. What the restart must not cost is the ABILITY TO TELL, which is why\n * absence from both fields now has a stated meaning in the note rather than being ambiguous.\n */\n private runningDetachedRuns = new Map<string, { readonly runId: string; readonly playbookRef: string; readonly instanceKey?: string; readonly startedAt: string; readonly traceSessionId?: string; readonly conversationId?: string }>();\n\n /**\n * How many playbook executions are in flight in this process, OTHER than the detached submissions\n * {@link runningDetachedRuns} already names: a synchronous `runPlaybook`, a resumed run, a loop, and\n * — unbypassably — every `executePlaybookRun`, whoever called it. Maintained only through\n * {@link whileInFlight}.\n *\n * A count, not a map: nothing reads them back, and a composite's children run nested inside the same\n * process, so the same ref may be in flight at several depths. It exists only so the heartbeat below\n * covers them. Until 2026-09-27 the heartbeat covered detached runs alone, and a synchronous\n * `bottom_up.build-dispatch` (the shape #1576's execution block submits) was invisible to the dev\n * supervisor, which restarted the companion under it; a resumed run was invisible the same way.\n */\n private playbookExecutionsInFlight = 0;\n\n /**\n * Run `work` counted as in flight, so the dev supervisor holds a restart for its whole life.\n *\n * Used at the ENTRY points (whole life, including the settle that writes the run's record after the\n * work returns) AND inside `executePlaybookRun` itself, so a caller added later is covered while it\n * executes even if nobody remembers to wrap it. Nested counts are harmless: the file beats while the\n * count is above zero.\n */\n private async whileInFlight<T>(work: () => Promise<T>, options: { readonly drainCounted?: boolean } = {}): Promise<T> {\n this.playbookExecutionsInFlight = (this.playbookExecutionsInFlight ?? 0) + 1;\n this.syncPlaybookRunHeartbeat();\n try {\n /*\n * One RUN for the restart drain too (#3204), at the same entry points and for the same whole life, settle included.\n * The inner `executePlaybookRun` wrap passes `drainCounted: false`: counted twice, one paused run would still read\n * busy, and a held restart would never drain.\n */\n return await (options.drainCounted === false ? work() : this.whileDrainCounted(work));\n } finally {\n this.playbookExecutionsInFlight = Math.max(0, (this.playbookExecutionsInFlight ?? 1) - 1);\n this.syncPlaybookRunHeartbeat();\n }\n }\n\n /** The {@link PLAYBOOK_RUN_HEARTBEAT_RELATIVE_PATH} beat; built on first use (see {@link syncPlaybookRunHeartbeat}). */\n private playbookRunHeartbeat: InFlightWorkHeartbeat | undefined;\n\n /**\n * Start or stop the playbook-run heartbeat to match what is in flight: any detached submission, or\n * any execution counted by {@link whileInFlight}.\n *\n * Called on every change to either, so the file exists exactly while a run does. Best-effort\n * throughout — see {@link InFlightWorkHeartbeat}.\n *\n * The beat is built LAZILY rather than as a field initializer: a service built through\n * `Object.create(prototype)` — which the tests and several harnesses do — never runs initializers, so\n * an eagerly-built beat would read `undefined` and never start. Same reason `?? 0` and `?.size` below.\n */\n private syncPlaybookRunHeartbeat(): void {\n // No application root, nowhere to beat — a harness, never a running companion. Skipping keeps the\n // heartbeat what it must be: something that can fail without failing the run it describes.\n const saasRoot = this.companionContext?.saasRoot;\n if (typeof saasRoot !== 'string') return;\n this.playbookRunHeartbeat ??= new InFlightWorkHeartbeat(\n join(saasRoot, PLAYBOOK_RUN_HEARTBEAT_RELATIVE_PATH),\n PLAYBOOK_RUN_HEARTBEAT_INTERVAL_MS,\n (message, error) => this.logDebug(message, { error: String(error) }),\n );\n this.playbookRunHeartbeat.sync((this.runningDetachedRuns?.size ?? 0) > 0 || (this.playbookExecutionsInFlight ?? 0) > 0);\n }\n\n /**\n * Judge one SETTLED coding run against the dispatching playbook's own compiled treatment.\n *\n * The subject is not an artifact family — nothing was landed into the specifications package — it is\n * the run's sealed evidence, which is what every criterion of `dispatch-outcome-sound` actually names:\n * the host's disposition, the verification gate, the change-set summary and the recorded out-of-scope\n * paths. `runPlaybookJudge` takes its subjects as `{ family, value }` pairs and renders the family as a\n * heading, so the constant below is the SUBJECT'S NAME rather than a specification family, and it is\n * named once here instead of written as a literal at the call.\n *\n * The task's declared scope travels beside the outcome deliberately: the second criterion asks whether\n * the change stayed inside the task's module/resource/stage, and a judge shown only the outcome would\n * have to take the scope from the same evidence it is meant to check.\n *\n * Every refusal is a SKIP carrying its reason, never a throw: a playbook with no treatment, a treatment\n * that does not satisfy its contract, and a judge that cannot answer are all things an operator should\n * read in the response — and none of them is a reason to fail a dispatch that already did its work.\n */\n private async judgeSettledCodingRun(input: {\n readonly playbookRef: string;\n readonly hydrated: { readonly evaluationTreatment?: { readonly value: unknown } | null };\n readonly plan: {\n readonly taskRef: string;\n readonly objective: string;\n readonly targetKind: string;\n readonly produces?: readonly unknown[];\n readonly allowedPathPrefixes?: readonly string[];\n };\n readonly outcome: ApplicationCodingTaskSettledOutcome;\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<PlaybookJudgeResult> {\n if (!input.hydrated.evaluationTreatment) {\n return { judged: false, skipped: 'This playbook carries no compiled evaluation treatment.' };\n }\n const treatment = MetaWorkflow_EvaluationTreatmentDefinitionSchema.safeParse(input.hydrated.evaluationTreatment.value);\n if (!treatment.success) {\n return {\n judged: false,\n skipped: `Compiled evaluation treatment does not satisfy its contract: ${treatment.error.issues[0]?.message ?? 'unknown issue'}`,\n };\n }\n return runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed: [{\n family: SETTLED_CODING_RUN_JUDGE_SUBJECT,\n value: {\n ...input.outcome,\n /*\n * The ref the PLAN dispatched, kept beside the ref the durable ROW records. They should be the\n * same string; the treatment's INDETERMINATE guidance is for the case where the evidence \"does\n * not bind the dispatched task\", and a judge given only one of them could never see that.\n */\n dispatchedTaskRef: input.plan.taskRef,\n dispatchedTargetKind: input.plan.targetKind,\n /*\n * WHAT THE TASK ASKED FOR (#1432). The treatment asks whether the run implemented the\n * dispatched task's target and stage, and the subject carried the outcome, the ref, the\n * target kind and the mutation scope — everything about the dispatch except the work. A\n * judge given a ref and a settled status can only grade whether the agent exited cleanly.\n */\n dispatchedObjective: input.plan.objective,\n dispatchedProducts: input.plan.produces ?? [],\n declaredMutationScope: input.plan.allowedPathPrefixes ?? [],\n },\n }],\n model: this.buildGenerationPort(),\n ...(input.session ? { trace: this.buildTrace(input.session, `playbook-judge-${input.playbookRef}`) } : {}),\n });\n }\n\n /**\n * Submit a run and return IMMEDIATELY — the async half of #265's envelope fix.\n *\n * The synchronous route holds one HTTP request open for the run's whole life, and the server's\n * 30-minute request ceiling is SHORTER than a choreography's own duration bound — measured twice:\n * the connection dies at exactly 1800s, the run continues and even completes server-side, and the\n * caller gets HTTP 000 instead of a result. This path returns at submission; the caller polls\n * `readRunsInFlight`, whose `lastCompleted` carries the outcome (including a failure — an async\n * submission must never turn an error into silence).\n */\n\n public async submitPlaybookRunDetached(input: PlaybookRunInput): Promise<{\n readonly accepted: false;\n readonly async: true;\n readonly runId: string;\n readonly playbookRef: string;\n readonly note: string;\n }> {\n return this.submitPlaybookRoundDetached(input, 1);\n }\n\n /**\n * Start a parallel build WAVE detached, or answer `undefined` when this application builds one task\n * at a time (#2208). The build console's `wildo build run` asks this first, so the verb people and\n * agents reach for runs the lane in its normal mode: the build parallelism defaults to\n * `DEFAULT_BUILD_PARALLELISM` (5), and before this the console could only ever start one task.\n *\n * The wave is a run of {@link BUILD_WAVE_PLAYBOOK_REF}, the one door to `dispatchBuildWave` (the\n * CODING_AGENT tier of {@link runPlaybook}). A second door that called the wave directly was\n * rejected: it would leave no run record, so the feed and `lastCompleted` would never report it.\n *\n * The degree is read HERE, through the same `readBuildParallelism` the tier reads, so the console\n * keeps no copy of the setting. The tier reads it again when the run starts; a degree lowered to one\n * in between makes that run a single dispatch, which is still correct.\n *\n * It REFUSES BEFORE SUBMITTING. A detached run reports a refusal only later, in the feed, while the\n * one-task door refuses at once (no build plan, plan exhausted with its assembly verdict, every ready\n * task stuck). So the next task is described through the same qualifying read the one-task door uses,\n * which throws those same errors to the caller now.\n *\n * And it refuses a SECOND wave (#2208 review M1): one already running in `dispatchBuildWave`, or one\n * submitted and not yet there — a detached wave run is registered at submission, before its wave starts,\n * so two quick `wildo build run` calls would otherwise both pass the first check.\n */\n public async submitBuildWaveDetached(\n session?: CompanionExecutionSessionContext,\n /** The PERSON's door asking (#3206): it may start while a stop holds, and its admitted start ends the hold. */\n personDoor?: BuildStopReleaseDoor,\n ): Promise<BuildWaveSubmission | undefined> {\n const saasRoot = this.companionContext?.saasRoot;\n if (saasRoot === undefined) return undefined;\n const degree = readBuildParallelism(saasRoot);\n if (degree <= 1) return undefined;\n // Refused while a person's stop holds the build (#3206), unless a person's door asks.\n if (personDoor === undefined) this.buildDispatch.assertBuildNotHeldByStop();\n this.buildDispatch.assertNoBuildWaveInFlight();\n const submitted = [...this.runningDetachedRuns.values()]\n .find((run) => (getFrameworkKnowledgePlaybook(run.playbookRef)?.playbook as { executor?: MetaWorkflow_Executor } | undefined)?.executor\n === MetaWorkflow_Executor.CODING_AGENT);\n if (submitted !== undefined) throw new ApplicationBuildWaveInFlightError(submitted.startedAt);\n const nextReady = await this.buildDispatch.describeNextBuildTaskBeforeRunning();\n /*\n * Every refusal passed: only now does the person's start end the hold (#3206 review F2) — a refused `wildo build run`\n * (a wave still draining, nothing ready) keeps it. Ended BEFORE the submission, whose wave asks the hold, and put back\n * if the submission itself fails.\n */\n const released = personDoor === undefined ? undefined : this.buildDispatch.releaseBuildStopHold(personDoor);\n let submission: Awaited<ReturnType<typeof this.submitPlaybookRunDetached>>;\n try {\n submission = await this.submitPlaybookRunDetached({ playbookRef: BUILD_WAVE_PLAYBOOK_REF, ...(session ? { session } : {}) });\n } catch (error) {\n if (released !== undefined) this.buildDispatch.restoreBuildStopHold(released);\n throw error;\n }\n return {\n degree,\n runId: submission.runId,\n playbookRef: submission.playbookRef,\n nextReadyTask: { taskRef: nextReady.taskRef, objective: nextReady.objective },\n };\n }\n\n /** Drop a pending usage-limit resume (#3206): a stopped build is not restarted by a timer. */\n private cancelBuildWaveResume(why: string): void {\n const pending = this.buildWaveResume;\n if (pending === undefined) return;\n clearTimeout(pending.timer);\n this.buildWaveResume = undefined;\n this.logDebug('Cancelled the pending build resume', { resumesAt: pending.resumesAt, why });\n }\n\n /** What this companion will submit when the coding agent's usage limit ends (#2388), and what that is (#2463). */\n private buildWaveResume: { readonly resumesAt: string; readonly target: BuildResumeTarget; readonly timer: ReturnType<typeof setTimeout> } | undefined;\n\n /** What the CODING_AGENT tier run that met the usage limit stopped (#2463): see {@link deriveBuildResumeTarget}. */\n private deriveBuildResumeTargetOf(input: PlaybookRunInput, saasRoot: string | undefined): BuildResumeTarget {\n const root = input.rootRunId === undefined ? undefined : this.runningDetachedRuns.get(input.rootRunId);\n return deriveBuildResumeTarget({\n ...(input.nestedWithinChoreographyRef === undefined ? {} : { nestedWithinChoreographyRef: input.nestedWithinChoreographyRef }),\n ...(input.requestedByUserId === undefined ? {} : { requestedByUserId: input.requestedByUserId }),\n ...(root === undefined ? {} : { rootRun: { playbookRef: root.playbookRef, ...(root.instanceKey === undefined ? {} : { instanceKey: root.instanceKey }) } }),\n buildParallelism: saasRoot === undefined ? 1 : readBuildParallelism(saasRoot),\n });\n }\n\n /**\n * The pending usage-limit resume (#2388, #2463): when it fires and what it relaunches. Read by the unattended creation\n * driver (#2233), which waits for the build to resume rather than treating the paused build as nothing to do.\n */\n public readPendingBuildResume(): { readonly resumesAt: string; readonly target: BuildResumeTarget } | undefined {\n const pending = this.buildWaveResume;\n return pending === undefined ? undefined : { resumesAt: pending.resumesAt, target: pending.target };\n }\n\n /**\n * Relaunch what the usage limit paused once it has reset (#2388, #2463) — the \"resumes on its own\" half of the pause:\n * the paused tree, a wave, or one dispatch ({@link startBuildResume}). One pending resume at a time: a later reset\n * replaces an earlier one, an earlier one never shortens it, and the target that restarts more of the build is kept.\n *\n * In-process, like the hold it ends: a restart drops it, and the build then resumes the next time anyone or\n * anything starts a wave. The timer is `unref`'d so it never keeps the companion alive. If a wave is already\n * running when it fires, or the plan has nothing ready, the submission refuses and that refusal is the answer.\n */\n private scheduleBuildWaveResume(resumesAt: string, target: BuildResumeTarget): void {\n const pending = this.buildWaveResume;\n // The target that restarts MORE of the build wins, whichever reset is later (#2463): a lane paused, then a person's\n // single run paused too, must still relaunch the lane.\n const mergedTarget = mergeBuildResumeTargets(pending?.target, target);\n if (pending && Date.parse(pending.resumesAt) >= Date.parse(resumesAt)) {\n if (mergedTarget !== pending.target) this.buildWaveResume = { ...pending, target: mergedTarget };\n return;\n }\n if (pending) clearTimeout(pending.timer);\n // setTimeout overflows past 2^31 - 1 ms (~24.8 days); a reset is hours away, so the clamp only guards a bad parse.\n const delayMs = Math.min(Math.max(0, Date.parse(resumesAt) - Date.now()), 2_147_483_647);\n const timer = setTimeout(() => {\n // Read before it is cleared: a later pause may have widened the target in place (see the merge above).\n const target = this.buildWaveResume?.target ?? mergedTarget;\n this.buildWaveResume = undefined;\n /*\n * A person's stop holds the build (#3206): no resume while it does. Read as the hold's STATE when the timer fires,\n * not as a timestamp against when it was armed, so a person who stopped and then ran `wildo build run` again (which\n * releases the hold) is resumed by whichever timer is pending (#3206 review R1, R2). The submit below refuses too.\n */\n const heldSince = this.buildDispatch.readBuildStopHold();\n if (heldSince !== undefined) {\n this.logDebug('Did not resume the build after the usage limit reset: a person stopped it', { resumesAt, heldSince });\n return;\n }\n /*\n * No trace session: the one that stopped the wave has ended by now, and the resume is its own act. No creation\n * preflight either (#2229): it checks provider configuration, which the door that started the paused build\n * already checked, and a refusal here could only be logged.\n */\n this.startBuildResume(target)\n .then((runId) => this.logDebug('Resumed the build after the coding agent\\'s usage limit reset', { resumesAt, target, runId }))\n .catch((error: unknown) => this.logDebug('The build did not resume after the usage limit reset', { resumesAt, target, error: describeCaughtError(error) }));\n }, delayMs);\n timer.unref?.();\n this.buildWaveResume = { resumesAt, target: mergedTarget, timer };\n this.logDebug('The build resumes when the coding agent\\'s usage limit resets', { resumesAt, target: mergedTarget });\n }\n\n /**\n * Relaunch what the usage limit paused (#2463), once its reset has come and no person's stop holds the build. A LANE\n * target submits the paused tree again (its root, or the composite the dispatch ran under), which carries on building\n * task after task and runs the lane's later steps; a WAVE target submits the next wave; a single dispatch runs once.\n * Detached in every case, like the wave it replaces. Resolves the submitted run's id; a refusal rejects, and the\n * caller logs it, because a refusal (the root's instance still running, nothing ready) is the answer.\n */\n protected async startBuildResume(target: BuildResumeTarget): Promise<string> {\n switch (target.kind) {\n case BuildResumeTargetKind.LANE:\n return (await this.submitPlaybookRunDetached({\n playbookRef: target.playbookRef,\n ...(target.instanceKey === undefined ? {} : { instanceKey: target.instanceKey }),\n ...(target.requestedByUserId === undefined ? {} : { requestedByUserId: target.requestedByUserId }),\n })).runId;\n case BuildResumeTargetKind.WAVE:\n // At a parallelism of one by now (lowered while paused) there is no wave to submit: one dispatch runs (#2388 review F3).\n return (await this.submitBuildWaveDetached() ?? await this.submitPlaybookRunDetached({ playbookRef: BUILD_WAVE_PLAYBOOK_REF })).runId;\n case BuildResumeTargetKind.SINGLE_DISPATCH:\n return (await this.submitPlaybookRunDetached({ playbookRef: BUILD_WAVE_PLAYBOOK_REF })).runId;\n }\n }\n\n /**\n * One ROUND of a detached run. A composite that ends on its breaker is followed by the next round\n * when {@link decideCompositeRoundRelaunch} says so (#1542), which is why the round number travels.\n */\n private async submitPlaybookRoundDetached(input: PlaybookRunInput, round: number): Promise<{\n readonly accepted: false;\n readonly async: true;\n readonly runId: string;\n readonly playbookRef: string;\n readonly note: string;\n }> {\n const startedAt = new Date().toISOString();\n const isComposite = Boolean((getFrameworkKnowledgePlaybook(input.playbookRef)?.playbook as { method?: { choreography?: unknown } } | undefined)?.method?.choreography);\n let tasksLandedBefore: number | undefined;\n /*\n * OPENED before it is answered: the caller must name the run before awaiting it, and the run's\n * only name is the execution id the actor plane assigns (#1358). So the execution is opened here\n * — which is also where an unreachable store refuses, as a 4xx/5xx on THIS request rather than a\n * run that silently never happened — and the work is completed detached against the opened ids.\n * Until 2026-09-20 this minted its own id and handed it in; a submission and its row now share one.\n */\n // Counted for the restart drain from BEFORE the open (#3204 second review L1): no drained marker between the start and the chain.\n const releaseOpeningCount = this.beginDrainCounted();\n const opened = await this.actorsSystem.openActorExecution(this.buildActorExecutionRequest(input))\n .catch(async (error: unknown) => {\n releaseOpeningCount();\n const subject = this.resolveExclusiveSubject(input);\n throw subject === undefined ? error : await this.nameTheRunHoldingTheSubject(error, MetaWorkflowsExclusiveSubject.COMPOSITE, subject, input.session);\n });\n const runId = opened.executionId;\n try {\n // Registered BEFORE the run is started, so a caller that polls immediately cannot see a gap in\n // which its own submission is reported nowhere.\n this.runningDetachedRuns.set(runId, {\n runId,\n playbookRef: input.playbookRef,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n startedAt,\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n ...(input.conversationId ? { conversationId: input.conversationId } : {}),\n });\n this.syncPlaybookRunHeartbeat();\n } catch (error) {\n // Never leak the opening count (second review L4): a leaked count would keep the companion from ever draining.\n releaseOpeningCount();\n throw error;\n }\n // One RUN for the restart drain (#3204) from start to settle: the record and the chain's next round come after the work.\n // The chain's count starts before `work` is called, so releasing the opening count inside it leaves no gap.\n void this.whileDrainCounted(() => (releaseOpeningCount(), this.actorsSystem)\n .completeActorExecution(opened, async () => {\n // Where the build stood BEFORE the round, so its end can tell a round that moved from one that did not.\n // Only where a relaunch could read it (#1639): a dry run or a posture that never relaunches pays nothing here.\n if (isComposite && compositeRoundMayRelaunch({ posture: APPLICATION_CREATION_AUTONOMY_POSTURE, dryRun: input.dryRun === true })) {\n tasksLandedBefore = (await this.traceRunPhase(input.session, 'build-progress-baseline',\n () => this.buildDispatch.resolveBuildExecutionProgress().catch(() => undefined)))?.landedTasks;\n }\n return this.executePlaybookRun({ ...input, runId });\n }, input.session, this.playbookRunOptionsFor(() => runId))\n .then(async (result) => {\n this.runningDetachedRuns.delete(runId);\n this.syncPlaybookRunHeartbeat();\n /*\n * A SUSPENSION is not a completion. The run stopped to ask and is waiting for a person; the\n * resume route carries its own handle, which is not this submission's `runId`.\n */\n const suspended = typeof result === 'object' && result !== null\n && (result as { status?: unknown }).status === Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT\n ? (result as unknown as Record<string, unknown>)\n : undefined;\n this.lastCompletedDetachedRuns.set(playbookInstanceId(input.playbookRef, input.instanceKey), {\n runId,\n playbookRef: input.playbookRef,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n startedAt,\n finishedAt: new Date().toISOString(),\n ok: true,\n result,\n // The same measurement the row carries (#1507), so a read that falls back to this record when\n // the actor plane is unreachable does not report a measured run as unmeasured.\n ...this.detachedRecordMeasurement(result, (measurement) => readPlaybookRunMeasurement(summarizePlaybookRunResult(result, measurement))),\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n ...(input.conversationId ? { conversationId: input.conversationId } : {}),\n ...(suspended === undefined ? {} : {\n awaitingCreatorInput: {\n runId: String(suspended['runId']),\n family: String(suspended['family']),\n round: Number(suspended['round']),\n },\n }),\n });\n await this.continueCompositeChain(input, round, runId, tasksLandedBefore, result);\n })\n .catch((error: unknown) => {\n this.runningDetachedRuns.delete(runId);\n this.syncPlaybookRunHeartbeat();\n this.lastCompletedDetachedRuns.set(playbookInstanceId(input.playbookRef, input.instanceKey), {\n runId,\n playbookRef: input.playbookRef,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n startedAt,\n finishedAt: new Date().toISOString(),\n ok: false,\n /*\n * The run's recorded reason, read back by `wildo creation why`. `describeCaughtError` names an\n * engine error's target (`not_found (agentRef: …)`) where `.message` is undefined on that plain\n * object and a JSON dump carries its payload as well (#2350).\n */\n error: describeCaughtError(error),\n // The same reading as the row's (#3235): a run the environment took is interrupted, not failed.\n ...(isEnvironmentalPlaybookFailure(error) ? { interruptedByEnvironment: true as const } : {}),\n ...(() => {\n const measurement = this.measurementOfFailure(error, runId);\n this.failedRunMeasurements.delete(runId);\n return measurement ? { measurement } : {};\n })(),\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n ...(input.conversationId ? { conversationId: input.conversationId } : {}),\n });\n }));\n return {\n accepted: false,\n async: true,\n runId,\n playbookRef: input.playbookRef,\n note: `Submitted as runId ${runId} — the id of its execution on the actor plane. Poll GET /playbooks/runs `\n + 'and MATCH THAT ID: it is in `runningDetached` while the run executes, then in `lastCompleted` with the '\n + 'outcome. `lastCompleted` answers ONE record per playbook ref, the most recent, so an entry carrying a '\n + \"DIFFERENT runId is a previous run's outcome and says nothing about yours. Validation failures (an \"\n + 'unanswered elicitation, an ineligible playbook) surface there too, not as an HTTP error. Both fields are '\n + 'read from the actor plane, so they survive a companion restart: a run the restart interrupted is in '\n + '`lastCompleted` with `ok: false` and says the host stopped. After a restart `result` carries the '\n + \"run's summary (accepted, judge verdict) rather than the full envelope, which only the process that ran it holds. \"\n + '(`running` lists the composites holding a single-flight subject, one per instance, and never names an ordinary run.)',\n };\n }\n\n /**\n * After a detached COMPOSITE settles: start its next round, or record why the chain ends (#1542).\n *\n * Recorded either way on the run's settled record as `chain`, so \"why did the build stop here\" has an\n * answer on the same read that says it stopped. A relaunch is a new submission like any other — it\n * opens its own execution, appears in `runningDetached`, and is refused by its instance's single-flight\n * guard like a person's would be. Best-effort: nothing here may turn a settled run into a failed one.\n */\n private async continueCompositeChain(\n input: PlaybookRunInput,\n round: number,\n runId: string,\n tasksLandedBefore: number | undefined,\n result: unknown,\n ): Promise<void> {\n const composite = result as { choreographed?: unknown; stoppedBecause?: PlaybookChoreographyStopReason; landed?: readonly string[] } | null;\n if (composite?.choreographed !== true || composite.stoppedBecause === undefined) return;\n try {\n // Read only when the decision will: a round that concluded, chose to stop or found nothing eligible never looks (#1639).\n const readsProgress = compositeRoundRelaunchReadsBuildProgress({\n posture: APPLICATION_CREATION_AUTONOMY_POSTURE,\n dryRun: input.dryRun === true,\n stoppedBecause: composite.stoppedBecause,\n });\n const buildProgressAfter = readsProgress ? await this.buildDispatch.resolveBuildExecutionProgress().catch(() => undefined) : undefined;\n const decision = decideCompositeRoundRelaunch({\n posture: APPLICATION_CREATION_AUTONOMY_POSTURE,\n dryRun: input.dryRun === true,\n stoppedBecause: composite.stoppedBecause,\n round,\n familiesLanded: composite.landed?.length ?? 0,\n ...(tasksLandedBefore === undefined ? {} : { tasksLandedBefore }),\n ...(buildProgressAfter === undefined ? {} : { buildProgressAfter }),\n });\n const instanceId = playbookInstanceId(input.playbookRef, input.instanceKey);\n const record = this.lastCompletedDetachedRuns.get(instanceId);\n if (record?.runId === runId) this.lastCompletedDetachedRuns.set(instanceId, { ...record, chain: { round, decision } });\n this.logDebug('Composite round settled', { playbookRef: input.playbookRef, round, decision });\n if (decision !== CompositeRoundRelaunchDecision.RELAUNCH) return;\n /*\n * The subject is RELEASED between rounds and re-taken here, deliberately (#1610). Holding it across the\n * gap would need a lease with no run behind it, which a restart could strand. What can start in the gap\n * is only another run of the SAME instance (a different composite or instance never needed the lease):\n * that run is the same piece of work, so it continues the chain, and this relaunch is refused 409 and\n * logged below as the end of this chain. A person's run is never refused for a chain's sake.\n */\n await this.submitPlaybookRoundDetached(input, round + 1);\n } catch (error) {\n this.logDebug('Composite round relaunch failed (non-fatal)', { playbookRef: input.playbookRef, round, error: error instanceof Error ? error.message : JSON.stringify(error)?.slice(0, 500) });\n }\n }\n\n /**\n * Every run waiting for its creator to answer — a THIRD state, and neither of the two above.\n *\n * `readRunsInFlight` answers `{ running, interrupted }`: the in-process marker for a choreography\n * executing right now, and the checkpoints of one that stopped mid-way. A SUSPENDED run is neither.\n * It is healthy, it has written nothing — the clarification check runs before the artifact call —\n * and it is waiting on a decision only a person can make. It appeared in neither read, so nothing\n * could name it once its creator's client was gone.\n *\n * Kept as its own method rather than folded into `readRunsInFlight` for that reason: merging the\n * three would say a suspended run is a kind of in-flight one, and the difference is exactly what a\n * reader needs — one of the three is waiting for THEM.\n */\n public async readSuspendedRuns(session?: CompanionExecutionSessionContext): Promise<{\n readonly suspended: readonly SuspendedPlaybookRunSummary[];\n readonly unreadable: readonly string[];\n }> {\n // The executions of the meta-workflows system that are WAITING (#1360) — durable rows, so a\n // companion restart loses none of them, which the checkpoint directory also gave and the run\n // records beside it never did.\n const waiting = await this.actorsSystem.listSuspendedActorExecutions(META_WORKFLOWS_SYSTEM_REF, session);\n const suspended: SuspendedPlaybookRunSummary[] = [];\n const unreadable: string[] = [];\n for (const row of waiting) {\n const parsed = PlaybookRunSuspensionCheckpointSchema.safeParse(row.checkpoint?.context);\n if (!parsed.success || !row.suspension) {\n // REPORTED, not skipped: a waiting run nothing can resume is a fact a reader must be able to see.\n unreadable.push(row._id);\n continue;\n }\n const answered = new Set(parsed.data.priorAnswers.map((answer) => answer.ref));\n suspended.push({\n runId: row._id,\n playbookRef: parsed.data.playbookRef,\n family: parsed.data.family,\n suspendedAt: row.suspension.suspendedAt,\n round: parsed.data.round,\n dryRun: parsed.data.dryRun,\n // The checkpoint stays cumulative; an answer form needs only questions still outstanding.\n requests: parsed.data.requests.filter((request) => !answered.has(request.ref)),\n // Who alone may answer it (#1751), so a door with no person can say so instead of offering an answer.\n ...(row.suspension.route?.kind === HumanDecision_RouteKind.OWNER && row.suspension.requester?.kind === HumanDecision_RequesterKind.USER\n ? { routedToUserId: row.suspension.requester.ref }\n : {}),\n });\n }\n suspended.sort((left, right) => right.suspendedAt.localeCompare(left.suspendedAt));\n unreadable.sort();\n return { suspended, unreadable };\n }\n\n private modelCallBreaker = { hour: '', calls: 0, providerBudgetNoted: false };\n\n private assertPlaybookModelCallBreaker(): void {\n if (!this.modelCallBreaker.providerBudgetNoted) {\n this.modelCallBreaker.providerBudgetNoted = true;\n this.logger.warn(\n 'Playbook lane model calls have NO budget limit in the companion — only two runaway circuit '\n + 'breakers: 1000 calls/hour (WILDO_PLAYBOOK_MODEL_CALL_HOURLY_BREAKER) and 500 USD of reported spend '\n + 'per hour (WILDO_PLAYBOOK_SPEND_HOURLY_BREAKER_USD). Set real spend limits at the model provider account.',\n );\n }\n const hour = new Date().toISOString().slice(0, 13);\n if (this.modelCallBreaker.hour !== hour) this.modelCallBreaker = { ...this.modelCallBreaker, hour, calls: 0 };\n const configured = Number(process.env['WILDO_PLAYBOOK_MODEL_CALL_HOURLY_BREAKER']);\n const breaker = Number.isSafeInteger(configured) && configured > 0 ? configured : 1000;\n if (this.modelCallBreaker.calls >= breaker) {\n throw new Error(\n `Playbook-lane runaway breaker tripped: ${this.modelCallBreaker.calls} model call(s) within the current hour `\n + `(breaker ${breaker}). This detects an infinite loop, not a budget — if this volume is intended, raise `\n + 'WILDO_PLAYBOOK_MODEL_CALL_HOURLY_BREAKER or restart the companion to reset the in-memory counter.',\n );\n }\n this.modelCallBreaker.calls += 1;\n }\n\n /**\n * The clarification channel's model seam — the same agent and provider as the artifact pass, so a\n * question is asked by the thing that would have had to guess.\n */\n private buildClarificationPort(): { ask: PlaybookStructuredGenerationPort['generate'] } {\n const port = this.buildGenerationPort();\n return { ask: (request) => port.generate(request) };\n }\n\n /**\n * The generation port for THIS playbook's artifact — deliberated when it declares a\n * panel, ordinary otherwise.\n *\n * A SUBSTITUTION at the port, deliberately, rather than a new executor or a new run\n * shape. Everything downstream of `generate` — the `_core` validator, the\n * findings-fed retry, the renderer, the landing, the judge — is identical either\n * way, because what a panel changes is how the value was ARRIVED AT, not what it is.\n * `runPlaybook` never branches on `executor` (only choreography children do), so a\n * `DELIBERATION_PANEL` member would have named a capability nothing dispatches.\n *\n * Cost is real and proportional: `candidateCount` generations, then a rubric pass,\n * then reviewers × candidates per round, then synthesis. Every one of those calls\n * goes through `buildGenerationPort` or the deliberation agents, so the lane's\n * runaway breaker still counts them.\n */\n private buildArtifactGenerationPort(playbook: MetaWorkflowPlaybook): PlaybookStructuredGenerationPort {\n const panel = playbook.method?.deliberation;\n if (!panel) return this.buildGenerationPort();\n\n const base = this.buildGenerationPort();\n return {\n generate: async ({ prompt, schema, label, purpose }) => {\n /*\n * A CORRECTION is never deliberated (#2219 review): it is a short patch against an answer already\n * chosen, and N candidate patches each told to differ from the obvious reading would argue against\n * the correction itself, at N times the cost. Nor is one PART of an artifact written in parts (#3204):\n * a panel judges a whole artifact, not one of its sections apart from the rest.\n */\n if (purpose === PlaybookGenerationPurpose.CORRECTION || purpose === PlaybookGenerationPurpose.ARTIFACT_PART) {\n return base.generate({ prompt, schema, label, purpose });\n }\n /*\n * Candidates are generated through the SAME constrained port, so each is\n * already schema-valid before the panel sees it. The only variation is an\n * appended instruction to take a genuinely different position — a panel\n * handed N paraphrases of one answer has nothing to argue about, and would\n * burn the full cost to rediscover the first candidate.\n */\n const findings: string[] = [];\n const produce = async (index: number, total: number): Promise<unknown> => {\n const result = await base.generate({\n prompt: [\n prompt,\n '',\n `# You are producing candidate ${index + 1} of ${total}`,\n 'Other candidates are being produced independently against this same brief. Take a '\n + 'position that genuinely DIFFERS from the most obvious reading — a different '\n + 'trade-off, a different priority order — and commit to it fully. State what your '\n + 'choice makes worse. A candidate indistinguishable from the obvious answer wastes '\n + 'a seat at the table.',\n ].join('\\n'),\n schema,\n label: `${label}:candidate-${index + 1}`,\n });\n if (result.output === undefined) findings.push(...(result.generationFindings ?? []));\n return result.output;\n };\n\n /*\n * At once (#3204): each candidate is produced independently against the same brief (its own prompt says so), so\n * nothing one says can reach another. Produced one after another, the three candidates of the placement plan were\n * most of its 19 minutes on the reference run's critical path. Kept in index order, so the surviving candidates\n * take their seats in the order they were asked for, whichever answers first. One that throws rejects the batch at\n * once while its siblings finish (and are paid for): the run's ordinary retry handles it, as it did a throw in\n * the sequential loop.\n */\n const candidates = (await Promise.all(Array.from({ length: panel.candidateCount }, (_, index) => produce(index, panel.candidateCount))))\n .filter((value) => value !== undefined);\n\n /*\n * Fewer than two survivors is NOT quietly downgraded to a single generation.\n * The artifact would then carry a panel's authority over a decision no panel\n * ever saw — the worst outcome available here. Returning `undefined` with the\n * findings hands it to the run's ordinary retry, which is the mechanism that\n * already exists for \"the provider did not produce a usable answer\".\n */\n if (candidates.length < 2) {\n return {\n output: undefined,\n generationFindings: [\n `Deliberated generation needs at least 2 schema-valid candidates and produced `\n + `${candidates.length} of ${panel.candidateCount}. The panel was not convened.`,\n ...findings,\n ],\n };\n }\n\n let cursor = 0;\n const deliberated = await this.structuredDeliberation.run({\n /*\n * As many seats as candidates SURVIVED: the panel asks its producer for `candidateCount` initial candidates, so\n * a panel of three with one dropped would otherwise seat `undefined` as the third (#3204 review P1).\n */\n panel: { ...panel, candidateCount: candidates.length },\n briefContext: prompt,\n label,\n producer: {\n agentRef: META_WORKFLOWS_STRUCTURED_ARTIFACT_GENERATOR_AGENT_REF,\n produceInitial: async () => candidates[cursor++],\n produceRevision: async (parent, revisionPrompt) => {\n const revised = await base.generate({\n prompt: [prompt, '', '# Revise this candidate', JSON.stringify(parent, null, 2), '', revisionPrompt].join('\\n'),\n schema,\n label: `${label}:revision`,\n });\n // A failed revision must not collapse the round; keeping the parent means\n // the panel re-scores what it already had rather than losing a candidate.\n return revised.output ?? parent;\n },\n },\n });\n return { output: deliberated.winner };\n },\n };\n }\n\n /**\n * ONE schema-constrained model call outside any run — the interview-answer proposer (#2129). It is the lane's\n * own generation port, so the call reaches the same generator agent and is counted by the same runaway\n * breaker as every run's calls; a second door to the model would be a second, uncounted one.\n */\n public generateStructured(input: Parameters<PlaybookStructuredGenerationPort['generate']>[0]): ReturnType<PlaybookStructuredGenerationPort['generate']> {\n return this.buildGenerationPort().generate(input);\n }\n\n private buildGenerationPort(): PlaybookStructuredGenerationPort {\n return {\n generate: async ({ prompt, schema, label }) => {\n this.assertPlaybookModelCallBreaker();\n this.spendMeter.assertSpendRateBelowRunawayBreaker();\n const invocation: FlowsActors_Agent_Invocation<\n typeof LLMProvider_GenerateStructuredInputSchema,\n typeof LLMProvider_GenerateStructuredOutputSchema\n > = {\n agentRef: META_WORKFLOWS_STRUCTURED_ARTIFACT_GENERATOR_AGENT_REF,\n initiator: {},\n invocationContext: [],\n // `includeRejectedAnswer`: a rejected answer comes back as text, so the retry can correct it in place\n // instead of redrafting blind (#1143). It is a payload like any answer, never telemetry or a log line.\n input: { prompt, schema, includeRejectedAnswer: true },\n output: { object: undefined },\n executionContext: {},\n artifactBindings: [],\n };\n const traceContext: AgentTraceContext = { label, attributes: { label } };\n const response = await this.agents.invokeAgent(invocation, traceContext);\n /*\n * The provider validates the model's answer against the SAME family schema and discards the\n * whole object on any violation, so a near-miss arrives here as `object: undefined` with the\n * real reason parked in `structuredGenerationFailure`. Dropping it left the retry with nothing\n * but \"<root>: received undefined\" — measured live on wonder-crm's build-decompose: a complete\n * 27.7KB plan rejected for 8 mis-cased `resourceRef` values, then two blind retries. Project\n * the provider's own paths so the findings-fed retry works for provider-side rejections\n * exactly as it does for the runtime validator's.\n *\n * ⚠️ IT RIDES ON `executionContext`, NOT ON THE INVOCATION. `invokeAgent` REBUILDS its return\n * as `{ ...request, output, executionContext }` — the caller's own request plus its answer —\n * so a provider-learned fact reaches a caller only through that envelope, beside `usage` and\n * `transport`. The first version of this read cast `response` itself and was therefore INERT:\n * the key it named cannot exist on the returned shape, so `generationFindings` was always\n * empty and every provider-side rejection retried blind. It read as the fix, carried this\n * comment describing the defect it did not close, and was found on 2026-08-29 by a\n * `document-facts` run whose retry prompt still said \"<root>: expected object, received\n * undefined\" while the companion log printed the four exact paths the model had got wrong.\n *\n * READ AND RENDERED BY THE ENGINE'S OWN FUNCTIONS, never by a shape written out here. This site\n * held a hand-written cast and a hand-written hint list, and each field the engine added to an\n * issue afterwards reached the engine's renderer and not this copy — the paths in 2026-08-29,\n * `expected` in 2026-09-13, a `custom` refinement's message in 2026-09-16, every one of them\n * costing live runs while the two formatters sat forty lines apart in different packages.\n * `readStructuredGenerationFailure` parses against the schema and\n * `describeStructuredValidationIssue` is THE issue renderer, so a fourth field arrives here for\n * free.\n */\n const failure = readStructuredGenerationFailure(response.executionContext);\n /*\n * The suffix is this caller's framing rather than the issue's: these findings are fed BACK TO THE\n * MODEL as the retry's corrections, and a model that is told only \"sharedResponsibility: custom\n * (…)\" cannot tell our runtime validator's refusal from the provider's.\n */\n const generationFindings = (failure?.validationIssues ?? []).map(\n (issue) => `${describeStructuredValidationIssue(issue)} — rejected by the provider's schema validation`,\n );\n const rejectedAnswer = (response.output as { rejectedAnswer?: unknown } | undefined)?.rejectedAnswer;\n return {\n output: (response.output as { object?: unknown } | undefined)?.object,\n ...(typeof rejectedAnswer === 'string' ? { rejectedAnswer } : {}),\n ...(generationFindings.length > 0\n ? { generationFindings }\n : failure?.message\n ? { generationFindings: [`<root>: ${failure.message}`] }\n : {}),\n };\n },\n };\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"playbook-run.companion.service.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/playbook-run.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AACA,OAAO,EAAE,8BAA8B,EAAE,MAAM,wCAAwC,CAAC;AACxF,OAAO,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,MAAM,0CAA0C,CAAC;AACjH,OAAO,EAAE,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A,MAAM,CAAC,uBAAuB,CAAC,0BAA0B,CAAC,CAAA;IAC1D,WAAA,MAAM,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,CAAA;IACnD,WAAA,MAAM,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAA;IACpD,YAAA,MAAM,CAAC,uBAAuB,CAAC,yBAAyB,CAAC,CAAA;IACzD,YAAA,MAAM,CAAC,uBAAuB,CAAC,oCAAoC,CAAC,CAAA;IACpE,YAAA,MAAM,CAAC,uBAAuB,CAAC,kCAAkC,CAAC,CAAA;IAClE,YAAA,MAAM,CAAC,uBAAuB,CAAC,oBAAoB,CAAC,CAAA;IACpD,YAAA,MAAM,CAAC,uBAAuB,CAAC,6BAA6B,CAAC,CAAA;IAC7D,YAAA,MAAM,CAAC,uBAAuB,CAAC,iBAAiB,CAAC,CAAA;IAEjD,YAAA,MAAM,CAAC,kBAAkB,CAAC,0BAA0B,CAAC,CAAA;IAErD,YAAA,MAAM,CAAC,uBAAuB,CAAC,kBAAkB,CAAC,CAAA;IAElD,YAAA,MAAM,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,CAAA;IAE3C,YAAA,MAAM,CAAC,uBAAuB,CAAC,cAAc,CAAC,CAAA;IAO9C,YAAA,MAAM,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAA;IAAE,YAAA,QAAQ,EAAE,CAAA;uDA5BqC,qCAAqC,YAElD,4BAA4B;QACf,wCAAwC;QACxC,wCAAwC;QACvC,mCAAmC;QAC1D,4BAA4B;QACjB,6BAA6B;QACnB,kCAAkC;QACZ,6CAA6C;QACjD,2CAA2C;QACtE,6BAA6B;QACZ,sCAAsC;QAC9D,mCAAmC,YAIlC,kCAAkC,YAIzC,uBAAuB;GA3BxF,2BAA2B,CAi1QvC","sourcesContent":["\nimport { withApplicationDeclaredAnswers } from './declared-interview-answers.companion';\nimport { declaredLandingScopeOf, generateChoreographyStepValue } from './choreography-step-generation.companion';\nimport { composeExternalAuthenticationBrief } from './external-authentication-brief.companion.utils';\nimport { collectKnownProviderRefs, engineProviderOffers, isRegistryProviderInstalled, listRegistryProviderModules, renderProviderRegistryBrief } from './provider-registry-brief.companion.utils';\nimport { z } from 'zod';\nimport { ResearchAgentDispatchCompanionService } from '../../claude-cli/services/research-agent-dispatch.companion.service';\nimport { diffResearchEvidence, resolveResearchEvidenceDirectory, snapshotResearchEvidence } from '../../claude-cli/services/research-evidence-store.companion';\nimport * as ApplicationCreationSpecs from '@wildo-ai/saas-specifications/application-creation';\nimport { PLAYBOOK_STEP_SCHEMA_NAMESPACES } from '../models/playbook-step-schema-namespaces.models';\nimport { inject, injectable, optional } from 'inversify';\nimport {\n AI_ENGINE_CAPABILITIES,\n AI_ENGINE_CAPABILITIES_IN_THE_CONTRACTED_SERVICE,\n RecipientCategoriesNotDerivableReason,\n ENGINE_CLIENT_STORAGE_ENTRIES,\n DataRetentionClass,\n ErasureRetentionMode,\n SubjectErasureDisposition,\n SubjectErasureSeveredReferenceTreatment,\n type SubjectErasureExecutedTreatment,\n ResourceRetentionBindingSchema,\n ResourceRowLifetime,\n StatutoryRetentionGroundSchema,\n AgentWriteOversight,\n AiUseDeclarationSource,\n AiUseRiskTier,\n deriveAgentWriteOversight,\n deriveAiRegulationRegimes,\n deriveApplicationAiUses,\n enabledEngineCapabilityNames,\n ApplicationAiUsePostureSchema,\n CoreAuditableEventType,\n type AgentAiUseDeclaration,\n type AiUsePosture,\n type AiUseRiskReading,\n type ApplicationAiUse,\n type ApplicationAiUses,\n undeclaredRetentionClasses,\n vendorHostedProviderRefs,\n uninventoriedClientStorageSurfaces,\n type ApplicationAiUsePosture,\n type ApplicationClientStorageInventory,\n BillingConfigurationSchema,\n OperatorComplianceIdentityPart,\n outstandingOperatorComplianceIdentityParts,\n type ApplicationOperatingJurisdictions,\n ApplicationOperatorComplianceIdentitySchema,\n type ApplicationOperatorComplianceIdentity,\n type ServiceConsentRequirement,\n ApplicationProviderComplianceChoicesSchema,\n ApplicationRetentionScheduleSchema,\n ApplicationOperatingJurisdictionsSchema,\n type ApplicationProviderComplianceChoices,\n appAssertedProcessingRegions,\n establishedProviderComplianceProfile,\n type EstablishedProviderComplianceProfile,\n PersonalDataCategory,\n PersonalDataCondition,\n ProviderComplianceChoiceAssessment,\n ProviderProcessingRegionReachKind,\n processingRegionHoldingOf,\n type ProviderComplianceProfile,\n ProviderDeploymentModel,\n type ApplicationRetentionSchedule,\n type ClientStorageEntry,\n EngineCapability,\n deriveNextReviewOn,\n ReviewCadence,\n parseRetentionEnforcementEvidenceJson,\n type RetentionEnforcementEvidence,\n SystemOfRecordSubjectRightsPosture,\n type AuthMethodsMap,\n} from '@wildo-ai/saas-models';\nimport {\n ApplicationAuthoredDocumentFactSpecificationSchema,\n ApplicationDocumentFactSpecificationSchema,\n ApplicationProcessorRegisterSchema,\n computeApplicationDocumentFacts,\n complianceFactStaleness,\n ComplianceFactCurrency,\n processorAgreementStanding,\n computeRecipientPopulation,\n joinRecipientPopulationToRegister,\n APPLICATION_PROVIDER_PACKAGE_MANIFEST_PATHSPEC,\n applicationProviderPackagesFromManifests,\n ProviderScopeKey,\n RecipientPopulationClass,\n RecipientPopulationMemberKind,\n SystemOfRecordDataFlowKind,\n type ConditionallyHeldCategories,\n type SystemOfRecordDataFlow,\n type RecipientDisclosure,\n deriveRecipientDisclosures,\n systemOfRecordPersonalDataOriginsOf,\n systemOfRecordVendorsOf,\n typedClientSearchNeedles,\n typedClientSitesFromGrepLines,\n type ProviderTypedClientSite,\n type RecipientPopulation,\n overlayComputedDocumentFacts,\n parseAiContentGuardrailEvidence,\n type AiContentGuardrailAuditEventType,\n type AiContentGuardrailEvidence,\n type ApplicationAiUseInventoryInput,\n ProcessorRegisterEntryKind,\n processorProcessingRegions,\n registerEstablishesNoProcessorRecipients,\n type ApplicationProcessorRegister,\n type ComputedDocumentFactAnswer,\n type ResourceErasureTreatment,\n type ResourceRetentionBindingFact,\n MetaWorkflow_ContextSource,\n ApplicationCodeSurface,\n collectComplianceDocumentFactAvailability,\n deriveComplianceRegimes,\n type ComplianceDocumentFactAvailability,\n type RequiredDocumentSetInput,\n resolveApplicationOrganizationStructure,\n type ApplicationOrganizationStructure,\n ApplicationLineDeclarationState,\n type ApplicationLineDeclaration,\n} from '@wildo-ai/saas-specifications/application-creation';\n\nimport {\n AssuranceEvidenceJudgementVerdict,\n AssuranceEvidenceRunKind,\n AssuranceEvidenceRunSchema,\n deriveBrandNameTrademarkSignal,\n deriveCapabilitySignal,\n deriveChatCommandExposureSignal,\n deriveMcpExposureSignal,\n derivePersonalDataSignals,\n deriveProviderHostingSignal,\n deriveRetentionSignal,\n type AssuranceEvidenceRun,\n type DerivedRiskSignal,\n} from '@wildo-ai/saas-specifications/assurance';\nimport { existsSync, readdirSync, readFileSync } from 'node:fs';\nimport { readFile } from 'node:fs/promises';\nimport { importLandedTypeScriptModule } from './landed-module-import.companion';\nimport * as path from 'node:path';\nimport { join } from 'node:path';\n\nimport { loadDraftFamilyValues } from '../../core/context/draft-family-values.companion';\nimport { InFlightWorkHeartbeat } from '../../core/runtime/in-flight-work-heartbeat.companion';\nimport { companionRestartDrain } from '../../core/runtime/restart-drain.companion';\nimport { gitReadBroker } from '../../core/utils/git-read-broker.companion';\nimport { getFrameworkKnowledgePlaybook, listFrameworkKnowledgePlaybooks, listFrameworkKnowledgeSkillSummaries, readCompiledResearchInformedContent, readFrameworkKnowledgeSkillBody } from '@wildo-ai/framework-knowledge';\nimport {\n MetaWorkflow_EvaluationTreatmentDefinitionSchema,\n MetaWorkflow_EvaluationVerdict,\n MetaWorkflow_Executor,\n MetaWorkflow_ClarificationAction,\n} from '@wildo-ai/saas-models/meta-workflows';\nimport {\n APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS,\n composeElicitationSection,\n dispatchOutcomeStepRef,\n BUILD_DECOMPOSE_INPUT_FAMILIES,\n STANDARD_APPLICATION_SPECIFICATION_SEMANTIC_AUTHORITY,\n evaluatePlaybookCatalogEligibility,\n buildApplicationCoherenceReport,\n collectHeldDraftUndeclaredFactCitations,\n composeAssuranceDocumentBlueprintBrief,\n composeAssuranceDocumentFactObligationsBrief,\n renderAssuranceDocumentClaimGuardsForJudge,\n composeAssuranceEvidenceBrief,\n composeAuthoredDocumentFactsBrief,\n composeAssuranceProgramAuthorityBrief,\n composeApplicationRoleGraphBrief,\n deriveOneFamilyFreshness,\n resolveStepOutputSchema,\n runPlaybookChoreography,\n countCheckpointedRounds,\n type PlaybookChoreographyCheckpoint,\n PlaybookChoreographyStopReason,\n describeStaleOutput,\n describePlaybookRerun,\n measureChangedAspects,\n type PlaybookChoreographySelectionPort,\n PlaybookLaneBoundaryDecision,\n collectPlaybookLaneBoundaries,\n isJudgeVerdictStepRef,\n type PlaybookChoreographyChildResult,\n type PlaybookChoreographyResult,\n type PlaybookFamilyGitFreshness,\n type PlaybookLandingHistory,\n buildPlaybookReviewGuide,\n evaluatePlaybookEligibility,\n applicationLineRefusalOf,\n getFamilyPackageRelativePath,\n resolvePlaybookOutputLandingTarget,\n resolveDeclaredSetMembers,\n getLandableArtifactFamilies,\n isPlaybookGenerationSuspension,\n renderApplicationCoherenceReport,\n renderDeclaredInputFamily,\n composeDeclaredInputWithheldAspects,\n composeMarketFitScoresSection,\n composeRiskSignalsSection,\n widenDeclaredInputAspects,\n ARTIFACT_PRESENT_WITHOUT_VALUE,\n collectConvenedExpertRoles,\n committedCharterRoleRefs,\n partitionUnstaffedExpertRoles,\n rederivableExpertRoleRefs,\n type DeclaredInputFamilyRendering,\n type DeclaredInputWithheldAspects,\n renderPlaybookReviewGuide,\n runPlaybookGeneration,\n readPlaybookOutputLandingBaselines,\n PlaybookOutputLandingConflictError,\n PlaybookOutputLandingHeldError,\n SpecificationWriteRefusedError,\n writeSpecificationFileAtomicallySync,\n type SpecificationWriteBasis,\n DEFAULT_MAXIMUM_CLARIFICATION_ROUNDS,\n accumulateClarificationRequests,\n validateClarificationAnswers,\n composeClarificationAnswersSection,\n type ApplicationCoherenceHostFacts,\n type ApplicationCoherenceOrganizationConfiguration,\n type ApplicationCoherenceReport,\n type PlaybookClarificationAnswer,\n type PlaybookClarificationRequest,\n type PlaybookGenerationSuspension,\n runPlaybookJudge,\n runPlaybookLoop,\n type PlaybookElicitationAnswer,\n type PlaybookLoopResult,\n type PlaybookArtifactState,\n type PlaybookEligibility,\n type PlaybookGenerationRequest,\n PlaybookGenerationPurpose,\n type PlaybookStructuredGenerationPort,\n type PlaybookJudgeResult,\n type PlaybookJudgeSubject,\n type PlaybookExportWiringRecord,\n type PlaybookOutputLandingRecord,\n type RunPlaybookGenerationResult,\n composeBillingCommercialModelBrief,\n composeOperatingJurisdictionCoverageBrief,\n composeOperatingJurisdictionsSection,\n composeCreatorStatedFactsSection,\n type ApplicationBillingDeclaration,\n projectPlaybookElicitationAsDecision,\n answersNoLongerOffered,\n materializeElicitationOptions,\n readAnswersForPlaybookQuestions,\n readNonAnswersForPlaybookQuestions,\n resolveElicitationAnswers,\n resolveElicitationNonAnswers,\n buildCreatorInputLatestReadAnswerByPlaybook,\n type PlaybookLatestReadAnswer,\n resolveApplicationLineScope,\n collectFamiliesDeactivatedByDecisions,\n isFamilyNotApplicable,\n type PlaybookApplicationLineScope,\n type PlaybookDeactivatedFamily,\n describeApplicationActiveSet,\n type ApplicationActiveSet,\n narrowRefinementRound,\n refinementDependencyMaps,\n LANDED_SPECIFICATION_CONSTANT_PREFIX,\n findReadersDatedByWaitingInterviews,\n selectInterviewsWaitingOnThePerson,\n readInterviewDepthFromState,\n PlaybookRerunKind,\n type PlaybookDatedByWaitingInterview,\n isBuildUnfinished,\n playbookRunsBuildWave,\n} from '@wildo-ai/application-creation-runtime';\n// The provider REGISTRY, not the engine map: importing the package root runs its bootstrap, which\n// registers the engine specifications, and an application's own registered provider specifications\n// join the same registry — so one accessor covers both authorities.\nimport {\n listRegisteredProviderSpecifications,\n SpecificationUnavailableError,\n unprovenAbsences,\n} from '@wildo-ai/saas-specifications';\nimport type { ActorExecutionOpenRequest, ActorExecutionRunOptions, ActorExecutionSuspensionRequest, ActorsSystemBackendService, AgentsBackendService, AppConfigurationService, ContentSafetyBackendService, LoggerService } from '@wildo-ai/saas-backend-lib';\nimport {\n companionScreeningVerdicts,\n screenResearchInformedRenderings,\n screenResearchInformedFamilyValues,\n screenResearchInformedInputSections,\n screenResearchInformedJudgeSubjects,\n screenResearchStepValue,\n type RenderedInputFamilySection,\n type ResearchInformedFamilyScreeningHost,\n type ScreenedResearchStepValue,\n} from './build-brief-third-party-screening.companion';\nimport { researchInformedFamilies } from '../models/build-brief-content-trust.models';\nimport { actorExecutionSuspensionRef, isActorExecutionNotSuspendedError, isActorExecutionSubjectBusyError, describeCaughtError } from '@wildo-ai/saas-backend-lib';\nimport { EXPERT_STAFFING_PLAYBOOK_REF } from '../../deliberations/models/stale-expert-seats-refusal.models';\nimport { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';\nimport { getCompanionServedLanguages } from '../../core/config/primary-language.companion.utils';\nimport type { AgentTraceContext, FlowsActors_Agent_Invocation, HumanDecision_Request, ModelProviderAccountRefusal } from '@wildo-ai/saas-models';\nimport {\n partitionCapabilitiesByContractedService,\n secondaryLineDefinitionOfEntry,\n type ApplicationPlaybookActivation,\n ApplicationSpecificationFamily,\n JourneyArtifactValidationState,\n MetaWorkflowPlaybookSchema,\n playbookInstanceId,\n type ApplicationCreatorInputs,\n type MetaWorkflow_Phase,\n type MetaWorkflowPlaybook,\n} from '@wildo-ai/saas-specifications/application-creation';\nimport {\n LLMProvider_GenerateStructuredInputSchema,\n LLMProvider_GenerateStructuredOutputSchema,\n describeStructuredValidationIssue,\n readCodingModelDestinations,\n readStructuredGenerationFailure,\n} from '@wildo-ai/external-connectors-models';\n\nimport { discoverSaasProviderCompanionContributions, loadSaasConfig, readBuildParallelism, resolveProviderComplianceProfiles } from '@wildo-ai/platform-config-lib';\nimport { StructuredDeliberationCompanionService } from '../../deliberations/services/structured-deliberation.companion.service';\nimport {\n PlacementPlanSchema,\n collectRevertedPlacementRevisions,\n deriveDomainPlanSystemOfRecordPartitionFields,\n type DomainPlanSystemOfRecordPartitionFields,\n} from '@wildo-ai/saas-specifications/application-creation';\nimport { loadEffectiveSystemOfRecordFacets, rereadDeclaredSystemOfRecordInstances, systemOfRecordFacetPartitionsByVendor, type SystemOfRecordInstanceFacetRequest } from './system-of-record-facet-library.companion.utils';\nimport {\n ApplicationSchemaPlanObligation,\n assessApplicationSchemaPlanObligation,\n} from '../../core/config/application-schema-plan-obligation.companion.utils';\nimport { composeEngineSettingsDestinationLines } from './engine-settings-destination-catalog.companion';\nimport { renderOrganizationConfigurationBrief, type OrganizationConfigurationBriefInput } from './organization-configuration-brief.companion.utils';\nimport { renderOrganizationIdentityBrief, type OrganizationIdentityBriefSource } from './organization-identity-brief.companion.utils';\nimport type { OrganizationIdentityDeclarationReading } from '../../core/introspection/subprocess/organization-identity-declaration.behavior';\nimport { composeEnabledApplicationSurfaceLines } from './application-enabled-surface-brief.companion.utils';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport { holdsWrittenBytes, PlaybookRunWriteRegisterCompanionService, type PlaybookRunLandingWindow } from './playbook-run-write-register.companion.service';\nimport {\n ApplicationBuildDispatchCompanionService,\n ApplicationBuildWaveInFlightError,\n describeBuildWaveHoldsForSelector,\n type BuildStopReleaseDoor,\n type ApplicationBuildDispatchResult,\n type ApplicationBuildWaveResult,\n} from './application-build-dispatch.companion.service';\nimport { resolveApplicationAssemblyCheckRefs } from './application-assembly-checks.companion.utils';\nimport type { ApplicationCodingTaskSettledOutcome } from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport { GitChangeSetCompanionService } from '../../claude-cli/services/git-change-set.companion.service';\nimport { CompanionIntrospectionService } from '../../core/introspection/services/companion-introspection.companion.service';\nimport { FoundationExecutorCompanionService, type FoundationExecutionResult } from './foundation-executor.companion.service';\nimport {\n CAPABILITY_COMPOSITION_PLAYBOOK_REF,\n CapabilityCompositionExecutorCompanionService,\n type CapabilityCompositionExecutionResult,\n} from './capability-composition-executor.companion.service';\nimport {\n APPLICATION_MATURITY_PLAYBOOK_REF,\n ApplicationMaturityExecutorCompanionService,\n type ApplicationMaturityExecutionResult,\n} from './application-maturity-executor.companion.service';\nimport { ExpertPersonaCompanionService } from '../../expert-personas/services/expert-persona.companion.service';\nimport { renderBrandDerivedLookForJudge } from '../../brand/services/brand-design.companion.utils';\nimport { LOGO_PANEL_ROLE_REFS } from '../../brand/services/logo-deliberation.companion.service';\nimport { readCompiledApplicationLineCatalog } from '../models/application-line-catalog.models';\nimport { CodingAgentDispatchCompanionService } from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport {\n PlaybookChoreographyCheckpointContextSchema,\n PlaybookRunCheckpointKind,\n PlaybookRunSuspensionCheckpointSchema,\n SuspendedPlaybookRunNotFoundError,\n SupersededPlaybookRunQuestionError,\n projectPlaybookClarificationAsDecision,\n APPLICATION_CREATION_AUTONOMY_POSTURE,\n LaneBoundaryTreatment,\n laneBoundaryTreatmentFor,\n projectLaneBoundaryAsDecision,\n type PlaybookChoreographyCheckpointContext,\n type PlaybookChoreographyProgressContext,\n type PlaybookRunSuspensionCheckpoint,\n type SuspendedPlaybookRunSummary,\n} from '../models/playbook-run-checkpoint.models';\nimport { humanDecisionSettler } from '../models/human-decision-settler.models';\nimport {\n CompositeRoundRelaunchDecision,\n compositeRoundMayRelaunch,\n compositeRoundRelaunchReadsBuildProgress,\n decideCompositeRoundRelaunch,\n} from '../models/composite-round-relaunch.models';\nimport { BuildResumeTargetKind, deriveBuildResumeTarget, mergeBuildResumeTargets, type BuildResumeTarget } from '../models/build-resume-target.models';\nimport { awaitModelProviderRecovery, isEnvironmentalPlaybookFailure, readPlaybookFailureProviderAccountRefusal } from '../models/playbook-loop-environment.models';\nimport { findOverlappingRootRuns, projectLastPlaybookLoop, projectPlaybookRunRecords, readPlaybookRunMeasurement, type PlaybookLoopRunRecord, summarizePlaybookLoopResult, summarizePlaybookRunResult, type PlaybookRunMeasurement, type PlaybookRunOverlap, type PlaybookSettledRunRecord } from '../models/playbook-run-record.models';\n// The playbook a build WAVE runs as (#2208): any CODING_AGENT-tier playbook runs a wave, and this is the one the build console starts.\nimport { BUILD_WAVE_PLAYBOOK_REF, PLAYBOOK_SPEND_NOT_OBSERVED, mergePlaybookSpend, type PlaybookChoreographyReopenedChild } from '@wildo-ai/application-creation-runtime';\n// The maturity reading, derived live for the drive's requirements standing (#3701), from the inputs its executor lands.\nimport { deriveApplicationMaturity, type ApplicationMaturityConfigurationFacts, type ApplicationMaturityInputs } from '@wildo-ai/application-creation-runtime';\nimport { listRequirementOpenItems } from '@wildo-ai/saas-specifications/application-creation';\nimport { PlaybookSpendMeterCompanionService } from './playbook-spend-meter.companion.service';\nimport { DossierCompanionService } from './dossier.companion.service';\nimport { proposeInterviewAnswers, type InterviewAnswerProposalPorts } from './interview-answer-proposal.companion';\nimport {\n INTERVIEW_ANSWER_PROPOSER_REF,\n type InterviewAnswerAssumptionOutcome,\n type InterviewAnswerAssumptionRequest,\n} from '@wildo-ai/application-creation-runtime';\nimport { CompanionExecutionsListQuerySchema } from '../../companion-api/companion-api.schemas';\nimport { CompanionTraceabilityLevel, type CompanionExecutionSessionContext } from '../../core/traceability/companion-traceability.models';\nimport { CompanionTraceabilityService } from '../../core/traceability/companion-traceability.service';\nimport { createPlaybookExecutionTrace } from './playbook-execution-trace.companion.service';\nimport type { CompanionContext } from '../../core/context/companion-context';\n// The backend's data slots come from an introspection worker (#3268): a playbook run after a sibling rebuild no longer\n// re-imports the backend's companion graph into this process.\nimport { loadBackendCompanionData } from '../../core/context/companion-package-loaders.companion';\nimport { loadSpecificationFamilyData, readSpecificationFamiliesWholeValueBasis } from '../../core/context/specification-family-data.companion';\nimport {\n choreographyEndedByEnvironment,\n isApplicationPackageNotCompiledFailure,\n isEnvironmentalChoreographyChildFailure,\n isInfrastructureShapedAgentFailure,\n waitForApplicationPackagesPublished,\n waitForDevCompileQuiet,\n} from '../../core/runtime/dev-compile-quiet.companion';\nimport { META_WORKFLOWS_CORRELATION_DOMAIN, MetaWorkflowsExclusiveSubject, compositeExclusiveSubject, isCompositeExclusiveSubject, META_WORKFLOWS_PLAYBOOK_LOOP_ACTOR_REF, META_WORKFLOWS_PLAYBOOK_RUN_ACTOR_REF, META_WORKFLOWS_STRUCTURED_ARTIFACT_GENERATOR_AGENT_REF, META_WORKFLOWS_SYSTEM_REF, META_WORKFLOW_TRACE_STEP_KIND, PLAYBOOK_RUN_PHASE_TRACE_STEP_KIND } from '../models/meta-workflows-lane.models';\nimport { Actor_Task_Topics, AppFrontendType, FlowsActors_Status, HumanDecision_RequesterKind, HumanDecision_RouteKind } from '@wildo-ai/saas-models';\nimport { WorkbenchTaskCorrelationRef, Workbench_PlaybookRunOutcomeStatus, type CreationDrive_RequirementsStanding } from '@wildo-ai/platform-core-shared';\nimport { CompanionExecutionsCompanionService } from '../../executions/services/companion-executions.companion.service';\nimport { BRIEF_ADEQUACY_JUDGE_AGENT_REF, BriefAdequacyVerdict, BriefAdequacyVerdictOutputSchema } from '../models/brief-adequacy.actors-system.definitions';\n\n/** How much of a FAILED verification check's output a run result carries: the end, where compilers and crashes report. */\nconst VERIFICATION_CHECK_OUTPUT_TAIL_CHARS = 4000;\n\n/**\n * The runtime's checkpoint ↔ the row's context, RECURSIVELY (#1497).\n *\n * A lane in flight checkpoints through its parent, so a parent's snapshot carries the lane's under\n * `nested`. Two converters rather than two inline spreads, because the shape is the same at every\n * level and a mapping written once per level drops the level it forgot — the outer run resumes, the\n * lane inside it starts over, and nothing says so.\n */\nfunction choreographyProgressToContext(snapshot: PlaybookChoreographyCheckpoint): PlaybookChoreographyProgressContext {\n return {\n playbookRef: snapshot.playbookRef,\n goal: snapshot.goal,\n completedIterations: snapshot.completedIterations,\n stepResults: snapshot.stepResults.map(([ref, value]) => ({ ref, value })),\n delivered: [...snapshot.delivered],\n ...(snapshot.reopened && snapshot.reopened.length > 0 ? { reopened: [...snapshot.reopened] } : {}),\n ...(snapshot.nested && snapshot.nested.length > 0 ? { nested: snapshot.nested.map(choreographyProgressToContext) } : {}),\n };\n}\nfunction choreographyProgressFromContext(context: PlaybookChoreographyProgressContext): PlaybookChoreographyCheckpoint {\n return {\n playbookRef: context.playbookRef,\n goal: context.goal,\n completedIterations: context.completedIterations,\n stepResults: context.stepResults.map((entry) => [entry.ref, entry.value] as const),\n delivered: context.delivered,\n ...(context.reopened && context.reopened.length > 0 ? { reopened: context.reopened } : {}),\n ...(context.nested && context.nested.length > 0 ? { nested: context.nested.map(choreographyProgressFromContext) } : {}),\n };\n}\n\n/**\n * Run one compiled playbook: brief the model against the family's own schema, then land the answer as\n * specification FILES in the application's specifications package.\n *\n * ## What this host owns, and what it deliberately does not\n *\n * It owns the three things only a host can answer — WHICH playbook (the compiled Framework Knowledge\n * catalog), WHERE the specifications package is (the companion context), and HOW a model call is made\n * (the engine's agent runtime, which resolves the provider, its key, its rate limiter and its trace sink).\n *\n * Everything else — resolving each family's validator, constraining the output to its schema, retrying a\n * rejection with the validator's own findings, refusing before spending, and the generate-all-then-land\n * ordering — belongs to `runPlaybookGeneration` in `@wildo-ai/application-creation-runtime`, so it is\n * testable with a literal value and no provider at all.\n *\n * ## Nothing here accepts anything\n *\n * Files appear in the working tree, and the run itself accepts none of them. Acceptance is a commit\n * (`.claude/rules/one-source-of-truth.md`, rules 2 and 3): made by a person, or under the autonomy posture\n * by the companion before the next build baseline, authored as itself (#1534). There is no receipt, no manifest entry and no\n * acceptance ceremony, and a run that is thrown away costs a re-run and no fact about the application.\n */\n/**\n * Families read as FILE PRESENCE when the app's companion exports carry no value for them.\n *\n * Both now HAVE a companion-exports slot (`domainPlanSpecification`, `buildPlanSpecification`), but an\n * application that landed the file without wiring the export yet — the state right after a playbook run,\n * before the human's commit-and-wire pass — still deserves a truthful `artifact_exists`. Listing them\n * explicitly, rather than scanning the directory, keeps \"which families exist\" a stated fact instead of a\n * property of whatever happens to be on disk.\n */\nconst FILE_ONLY_ARTIFACT_FAMILIES: readonly string[] = Object.freeze(['domain-plan', 'build-plan']);\n\n/**\n * What the CODING_AGENT tier hands its judge as the judged subject.\n *\n * NOT an artifact family: a coding dispatch lands nothing into the specifications package, so there is no\n * family to name. `runPlaybookJudge` types its subjects' `family` as a free string and renders it as the\n * evidence heading, and this is that heading — declared once, so the one place it is written is the one\n * place its meaning can be explained.\n */\nconst SETTLED_CODING_RUN_JUDGE_SUBJECT = 'settled-coding-run';\n\n/**\n * Where this process says \"a playbook run is still working\", app-root-relative.\n *\n * The dev supervisor holds a restart while a coding run holds the workspace-mutation lock. That lock\n * belongs to the AGENT and is released the moment its turn ends — while the run itself keeps going:\n * it awaits the settlement, asks the evaluation treatment's judge for a verdict (a model call), and\n * writes the outcome. Measured twice on 2026-09-16, the supervisor logged\n * `Releasing held restart after 21s (NO_LOCK)` at exactly that moment and killed the companion inside\n * the tail, leaving the agent's files on disk with no recorded outcome and no verdict — the work kept,\n * the evidence lost.\n *\n * So the run carries its own liveness signal, refreshed while any playbook run is in flight —\n * detached OR not (the second only since 2026-09-27; see `playbookExecutionsInFlight`) — and\n * removed when none is. A COPY of `PLAYBOOK_RUN_HEARTBEAT_RELATIVE_PATH` in\n * `scripts/dev-orchestrator/runtime-supervisor-lifecycle.mjs`, which cannot import this source.\n *\n * The coding agents a run dispatches carry a signal of their own (`CODING_RUN_HEARTBEAT_RELATIVE_PATH`\n * in the coding-agent dispatch service), because a CONCURRENT coding run holds no lock at all.\n */\nconst PLAYBOOK_RUN_HEARTBEAT_RELATIVE_PATH = '.wildo-saas/state/playbook-run.heartbeat';\n\n/**\n * How often that file's mtime is refreshed. The supervisor judges it stale at three times this\n * (`PLAYBOOK_RUN_HEARTBEAT_STALE_MS`), so a companion that dies stops holding anything within a few\n * seconds rather than forever.\n */\nconst PLAYBOOK_RUN_HEARTBEAT_INTERVAL_MS = 5_000;\n\n/** One detached (async-submitted) run's outcome — the poll answer for #265's envelope fix. */\nexport interface PlaybookDetachedRunRecord {\n /**\n * WHICH submission this is. Minted per submission and returned by it, because the records are kept\n * one per playbook instance: without an identity, \"the run I submitted has finished\" and \"the PREVIOUS\n * run's record is still sitting here\" are the same bytes, and a caller that polls `lastCompleted`\n * for a ref reads the wrong outcome as its own. Measured 2026-09-16: a poller submitted a run and\n * two seconds later read the previous run's record — startedAt three minutes earlier — as the\n * answer, while its own run was still executing and visible in `runningDetached`.\n */\n readonly runId: string;\n readonly playbookRef: string;\n /** The playbook INSTANCE (#1609); absent for the default instance. The records are kept one per instance. */\n readonly instanceKey?: string;\n readonly startedAt: string;\n readonly finishedAt: string;\n /**\n * A composite only: which ROUND of its chain this run was, and what ended or continued the chain\n * after it (#1542). `relaunch` means the next round was submitted; anything else is why it stopped.\n */\n readonly chain?: { readonly round: number; readonly decision: CompositeRoundRelaunchDecision };\n /** The trace session the run recorded under, when the request carried one — the explicit join a reader needs (#1358). */\n readonly traceSessionId?: string;\n readonly ok: boolean;\n /** Present when ok — the same envelope the synchronous route would have returned. */\n readonly result?: unknown;\n /** Present when not ok — the failure, named (never \"[object Object]\"; see the ACP rejection fix). */\n readonly error?: string;\n /**\n * Present when the run SUSPENDED to ask the creator rather than finishing.\n *\n * **`ok` is TRUE for such a run, and that is not a bug — it is why this field has to exist.** `ok`\n * records whether the run threw, and a suspension does not throw: nothing failed, nothing was\n * generated, and nothing was written. But `lastCompleted` with `ok: true` is read by every caller\n * as \"it finished\", so a run waiting on a person was reported as a green completed run — the single\n * most misleading state the poll could produce, because the operator's correct next action (answer\n * it) looks like no action at all.\n *\n * Flipping `ok` to false was the obvious alternative and is worse: it would make every\n * failure-detecting reader report a FAILURE for a run that is merely waiting, trading a false\n * success for a false alarm. The honest shape is a third state, and a reader that has not been\n * taught about it still sees a truthful `ok`.\n */\n readonly awaitingCreatorInput?: {\n /** The suspended-run handle the resume route takes — NOT this record's `runId`, which is the submission's. */\n readonly runId: string;\n readonly family: string;\n readonly round: number;\n };\n}\n\n/**\n * Does this playbook DECLARE the given derived context section?\n *\n * Replaces four frozen `readonly string[]` constants that named which playbook refs got which brief\n * section (and which could suspend to ask the creator). Each was a capability reachable only by\n * editing this service — the shape the composite work exists to end. Their rationale did not\n * disappear with them: it moved onto the playbook that now declares the section, which is where a\n * reader looking at that playbook will find it.\n *\n * The brief already composed its `inputs` and `elicitation` sections from declarations, so three of\n * its five sections were declared and three were hardcoded. Now all five are.\n */\nfunction playbookDeclaresContextSource(\n playbook: MetaWorkflowPlaybook | undefined,\n source: MetaWorkflow_ContextSource,\n): boolean {\n return (playbook?.method?.contextSources ?? []).includes(source);\n}\n\n/**\n * The application-wide verification a `DETERMINISTIC_CLI` playbook runs, per playbook ref.\n *\n * The HOST owns the mapping, not the playbook, and that is the same rule\n * `APPLICATION_CODING_TASK_VERIFICATION_CATALOG` already states for coding tasks: *\"a task contract\n * names semantic check references, not commands. Translating a new ref into executable process\n * arguments is application-host work that must be reviewed here.\"* A playbook naming its own\n * commands would be an authored surface that can spawn a process, which is a much larger admission\n * than this tier needs.\n *\n * An unmapped ref is REFUSED rather than defaulted. A default check set would make a new\n * `DETERMINISTIC_CLI` playbook silently verify something nobody chose — which is the exact shape of\n * the defect #119 closed, where an unhonoured tier fell through and produced a result the\n * declaration never asked for.\n *\n * Why these checks: topic 7 asks whether the built application ASSEMBLES, so the unit is EVERY workspace\n * package the application has, not the one package a coding task happened to touch. The\n * dispatch lane already typechecks the mutated package per task; this is the whole-app question that\n * no per-task check can answer, which is why it is not a duplicate of a live check.\n *\n * `check:schema-plan-in-sync` joined them on 2026-09-07 because \"it compiles\" and \"it can start\" are\n * different questions and only the first was being asked. On a PostgreSQL-backed application a table\n * is built by a MIGRATION and by nothing else, so a resource whose migration was never generated\n * typechecks green in every package and then refuses to boot with\n * `postgresql_table_schema_mismatch`. A typecheck structurally cannot see it: there is no type in\n * the program that knows whether a table exists. It is deliberately LAST — a drift report is most\n * readable once the compile questions are settled — and it is safe on every application, MongoDB\n * included, because its three-way outcome is resolved in the check itself rather than by an exit\n * code (see `runSchemaPlanDriftVerification`).\n *\n * `check:resources-registry-init` (#2404) asks the other start-time question offline on every database: does every\n * resource configuration build, as the backend's startup builds them. The schema-plan gate builds the same registry,\n * but only on an application that owes migrations, so a MongoDB application's refused configuration went unasked.\n *\n * `check:specification-exports` (#3210, #3211) asks whether the specifications package still EVALUATES as the\n * companion evaluates it: a task that typechecked can leave a specification its factory refuses, and a later task can\n * make an earlier one untrue (an enum member it names, removed). A typecheck cannot see a factory's refusal, and the\n * companion drops a refused specification and keeps serving, so without this check nothing at the end of a build would\n * say one is missing. It runs before the registry construction, as `deriveApplicationAssemblyCheckRefs` orders it.\n *\n * `check:website-demo-facts` (#2784) asks whether the website's drawn demos are still true of the application: a website\n * task checked its own when it landed, and a later resource change can make one untrue with no website task to notice.\n */\nconst DETERMINISTIC_CLI_VERIFICATION_CHECKS: Readonly<Record<string, (saasRoot: string | undefined) => readonly string[]>> = {\n /*\n * DERIVED from the application's packages (#2222). This was a list of the four packages every application has,\n * and it went stale the day `website` and `technical-doc` packages became composable (#1490): the question\n * \"does the application assemble\" skipped a website that did not compile (`app-creation-test-004`).\n */\n 'bottom_up.assemble-verify': resolveApplicationAssemblyCheckRefs,\n};\n\n/** A refusal on a failing module as the landing's own refusal, so a lane reads it as held rather than on its merits (#3258). */\nfunction heldOnAFault(playbookRef: string, error: unknown): unknown {\n if (!(error instanceof SpecificationWriteRefusedError) || error.unevaluatedModules.length === 0) return error;\n return new PlaybookOutputLandingHeldError(playbookRef, error.unevaluatedModules, error.message);\n}\n\n/** Where every landing refreshes the cross-family coherence report, in the specifications package. */\nconst COHERENCE_REPORT_PACKAGE_RELATIVE_PATH = 'src/COHERENCE.md';\n\n/** The zero-output playbook the composite foundation executor owns (J-2 item 2). */\nconst FOUNDATION_PLAYBOOK_REF = 'bottom_up.foundation';\n\n/**\n * The playbook that STAFFS the expert panels (#572). Runner-owned like foundation: the run short-circuits into the\n * companion's expert-persona derive → accept flow before any brief is composed. Since 0.2.0 it declares the family it\n * lands (`expert-personas`, #2421), which only this flow writes: the runtime's `HOST_WRITTEN_ARTIFACT_FAMILY_WRITERS`\n * names this step as its writer, so the readiness check admits it.\n */\nconst EXPERT_PERSONAS_PLAYBOOK_REF = 'top_down.expert-personas';\n\n/**\n * The expert panels a COMPANION step convenes, beyond the catalog's declared ones: the logo step's (#572). It shapes\n * a mark from the brand, so a line where the brand does not apply convenes it never. Read by the staffing run and,\n * through the artifact state, by the board's staffing standing (#2462): one answer for both.\n */\nfunction hostExpertConveners(lineScope: PlaybookApplicationLineScope | undefined): ReadonlyArray<{ readonly label: string; readonly roleRefs: readonly string[] }> {\n return isFamilyNotApplicable(lineScope, ApplicationSpecificationFamily.BRAND_BRIEF) ? [] : [{ label: 'generation-step:logo', roleRefs: LOGO_PANEL_ROLE_REFS }];\n}\n\n\n/**\n * What a `top_down.expert-personas` run did — the panels' staffing, role by role.\n *\n * `landed` carries the specifications-package paths the accept step wrote (charter modules, the\n * aggregator, the wired `companion-exports.ts`), so the loop's landed projection and the write records\n * see the same files a generation landing would report.\n */\nexport interface ExpertPersonasExecutionResult {\n readonly playbookRef: typeof EXPERT_PERSONAS_PLAYBOOK_REF;\n readonly staffed: true;\n readonly dryRun?: true;\n /** Every role the catalog convenes, with who convenes it. */\n readonly roster: ReadonlyArray<{ readonly roleRef: string; readonly convenedBy: readonly string[] }>;\n /** Roles whose charter is committed and current — left alone. */\n readonly alreadyCommitted: readonly string[];\n /**\n * Committed roles this run derived again because a shaping input changed after their charter (#2819), each with the\n * inputs that moved. A drifted role that is still waiting, or was refused, is reported there instead.\n */\n readonly rederived?: ReadonlyArray<{ readonly roleRef: string; readonly changedInputs: readonly string[] }>;\n /**\n * Drifted charters a person edited (#2819): left alone, because the accept step never overwrites a human edit, and\n * named so the person can merge the moved inputs by hand.\n */\n readonly driftedEdited?: ReadonlyArray<{ readonly roleRef: string; readonly changedInputs: readonly string[] }>;\n /** Roles derived and accepted by THIS run, with the critique protocol's pass count. */\n readonly derived: ReadonlyArray<{ readonly roleRef: string; readonly charterModulePath: string; readonly passes: number; readonly critiqueVerdict: string }>;\n /** Roles this run could not derive yet, and the families they wait on. Re-run when they land. */\n readonly waiting: ReadonlyArray<{ readonly roleRef: string; readonly missingFamilies: readonly string[] }>;\n /**\n * Roles whose derive or accept refused (a human-edited charter, an invalid set), with the reason; the other roles are\n * still staffed. Two refusals end the run instead (#3204): an environmental fault (a provider account's refusal, a\n * lost network) is rethrown at the role that met it, and a run that staffed none of the roles it attempted throws\n * {@link ExpertPersonasStaffingRefusedError}, which carries these entries.\n */\n readonly refused: ReadonlyArray<{ readonly roleRef: string; readonly reason: string }>;\n readonly landed: readonly string[];\n /**\n * The run's handle in the write register, present when this run landed a charter and its writes were recorded\n * (#2421 #2422 #2419): `wildo creation accept <runId>` commits them, `revert` undoes them, and the recorded\n * landing is what dates the step for the rerun verdict. Absent on a dry run and on a run that landed nothing.\n */\n readonly runId?: string;\n readonly accepted: false;\n}\n\n/** What the build-dispatch step reports of the staffing run repairing stale expert charters (#3204, #4022). */\nexport interface StaleExpertChartersRepair {\n readonly heldTaskRefs: readonly string[];\n /** The staffing step ran and landed, so the holds it read were released. */\n readonly ran: boolean;\n /**\n * The staffing run is still running beside the build (#4022): the step returned without waiting, because the wave could\n * start other work. It releases the held steps when it lands; the next wave runs them.\n */\n readonly inFlight?: true;\n readonly detail: string;\n}\n\n/**\n * A staffing run that attempted roles and staffed none of them (#3204): every role it set out to derive was refused.\n *\n * One role's refusal still costs no other its charter, and a run that staffed any role completes. But a run that staffed\n * NONE did not do what it was offered for, and settling it `ok` with nothing landed made the lane offer it again over the\n * same state until its ceiling: reference run 42120979649 ran it twelve times in a row. As a failure, the lane's repeat\n * rule applies (two identical failures over the same reads, then withheld), and the reasons reach the run's record.\n */\nexport class ExpertPersonasStaffingRefusedError extends Error {\n public readonly refused: ExpertPersonasExecutionResult['refused'];\n\n public constructor(refused: ExpertPersonasExecutionResult['refused']) {\n super(`${EXPERT_PERSONAS_PLAYBOOK_REF} staffed none of the ${refused.length} role(s) it attempted: `\n + refused.map((entry) => `${entry.roleRef}: ${entry.reason}`).join('; '));\n this.name = 'ExpertPersonasStaffingRefusedError';\n this.refused = refused;\n }\n}\n\n/**\n * The prefix every landed constant is named with — `applicationVisionSnapshot`, and the rest.\n *\n * Named once because two sites must agree: the generation run that WRITES a landed module, and the\n * reader that imports one back to find out what the application already holds. They resolve the same\n * landing target, so a divergence would look for a constant nothing writes.\n *\n * It is deliberately NOT derived from the application's name (`wonder-todos` → `wonderTodos`), which\n * would bake app identity into exported identifiers — app identity lives in VALUES, never in the\n * names of landed exports.\n */\nconst LANDED_CONSTANT_PREFIX = LANDED_SPECIFICATION_CONSTANT_PREFIX;\n\n/** Marker for \"the file is there, its value is not readable from here\". Never confused with real content. */\n/**\n * The governed documents the FACT producer is briefed on — the only document set this runtime still\n * names, and a different question from which documents a lane may draft.\n *\n * Drafting moved to `method.draftableDocumentDefinitionRefs` on the playbook (#1453): a lane is\n * defined by its documents, so the declaration belongs with the methodology and not here, and a\n * second drafting lane could not exist while this constant was the only answer.\n *\n * This one stays, because it answers something else. Declaring a fact and drafting a document are\n * different acts with different costs: the FACT brief ships names and authority kinds, a few lines\n * each, so it can afford a wider set than any single drafting lane carries.\n */\nconst FACT_OBLIGATION_PUBLIC_DOCUMENT_DEFINITION_REFS: readonly string[] = Object.freeze([\n 'document-definition:public.privacy-notice',\n 'document-definition:public.service-terms',\n]);\n\n/**\n * The documents whose FACTS the producer is briefed on — a wider set than the ones the lane may draft.\n *\n * Declaring a fact and drafting a document are different acts with different costs. The drafting brief ships a document's sections, clauses and inclusion kinds; adding\n * the four governance documents there would be ~42KB of obligations for documents this lane does not produce, and a prompt section that gets skimmed is\n * indistinguishable from an absent one. The FACT brief ships names and authority kinds, which is a few lines each.\n *\n * TWO of the four governance documents are included, and only those two: `scope-system-description` and `program-handbook` are the ones carrying\n * `APPLICATION_SPECIFICATION` facts — `governance-system-boundaries`, `governance-entities-products-environments`, `governance-dependencies-responsibilities` and\n * `governance-scope-boundaries`. `roles-responsibilities` and `document-record-control` carry none: every one of their ten facts needs a creator decision or a\n * qualified review, so briefing them would add ten \"do not declare\" lines about documents with nothing to declare.\n *\n * Withholding the two meant the only facts a governance document could ever have were the sixteen a human must write, so it could not be partially answered at all\n * (#186).\n *\n * The other sixteen are rendered in the same brief as facts the producer must NOT declare, with the authority each needs. That is the whole reason it is safe to widen\n * this list: the brief now distinguishes the two halves rather than asking for everything (#217).\n */\nconst FACT_OBLIGATION_DOCUMENT_DEFINITION_REFS: readonly string[] = Object.freeze([\n ...FACT_OBLIGATION_PUBLIC_DOCUMENT_DEFINITION_REFS,\n 'document-definition:governance.scope-system-description',\n 'document-definition:governance.program-handbook',\n]);\n\n/**\n * The governed documents a run DRAFTED, from the values it produced.\n *\n * Pure and module-level so the judge's claim guards can be derived from the run itself rather than from\n * whatever the application happens to hold on disk (#1452, corrected on the first live governance run).\n * Reads only `compliance-document-candidate` entries, tolerates a value of any shape, and de-duplicates:\n * a run that drafted one document must not ship that document's guards twice.\n */\nfunction draftedCandidateDocumentRefs(values: readonly { readonly family: string; readonly value: unknown }[] | undefined): readonly string[] {\n if (!values) return [];\n const refs = values\n .filter((entry) => entry.family === 'compliance-document-candidate')\n .map((entry) => (entry.value as { documentRef?: unknown } | null | undefined)?.documentRef)\n .filter((ref): ref is string => typeof ref === 'string' && ref !== '');\n return [...new Set(refs)];\n}\n\n/**\n * Where this application's own assurance repository lives, and where its judged runs sit inside it.\n *\n * Named here because the companion is the FIRST reader outside `scripts/assurance/`, which owns the\n * writer's copy of the same two strings. They are duplicated across a package boundary deliberately:\n * the scripts are a standalone offline toolchain with no dependency on the companion, and importing\n * either way round would couple a dev-loop service to an auditor's tool. What keeps them honest is that\n * a wrong path here degrades to a legible \"no assurance repository\" section rather than a silent empty\n * one — the reason every absence in this section says which absence it is.\n */\nconst ASSURANCE_REPOSITORY_RELATIVE_PATH = '.wildo-saas/state/assurance';\nconst ASSURANCE_JUDGED_RUNS_DIRECTORY = 'judged-runs';\n/**\n * Where the assurance collector commits the retention-enforcement evidence (#1636): the engine-store measurement\n * of `evidence-requirement:retention-window-declaration` C3. The writer's copy is `engineStoreMeasurementPath`\n * in `scripts/assurance/collect-engine-store-evidence.mjs` — the WRITER's path is pinned by that script's\n * self-test; this copy is not pinned by anything, and agreement is checked by eye. The same\n * deliberate duplication as the two strings above, and a wrong path degrades the same way — the\n * `retention-enforcement` fact stays absent and its clause is marked owed.\n */\nconst ASSURANCE_RETENTION_ENFORCEMENT_MEASUREMENT_PATH = ['engine-store-measurements', 'WILDO.PRIVACY.STORAGE_LIMITATION', 'retention-window-declaration', 'C3.json'] as const;\n/**\n * Where the collectors commit what the `ai-content-guardrails` fact reads (#2847). Same deliberate duplication as above,\n * and the same degradation: a wrong path leaves the fact absent and its clause marked owed. The writers' copies:\n * - the agent-operation evidence (#2841), the engine-store measurement of `evidence-requirement:agent-operation-record` C1,\n * `engineStoreMeasurementPath` in `scripts/assurance/collect-engine-store-evidence.mjs` (pinned by its self-test);\n * - the guardrail audit events (#2292), one EMITTED measurement per event type of the screening and moderation demands'\n * C3, at `<objective>/<demand>/<clause>/<event type>.json` in `scripts/assurance/collect-emitted-evidence.mjs`.\n */\nconst ASSURANCE_AGENT_OPERATION_MEASUREMENT_PATH = ['engine-store-measurements', 'WILDO.AI.OPERATION_RECORD', 'agent-operation-record', 'C1.json'] as const;\n// Keyed on the engine's own tuple, so a fifth guardrail event type is a compile error here rather than silently \"not collected\".\nconst ASSURANCE_GUARDRAIL_AUDIT_EVENT_MEASUREMENT_DIRECTORIES: Readonly<Record<AiContentGuardrailAuditEventType, readonly string[]>> = {\n [CoreAuditableEventType.AGENT_CONTENT_QUARANTINED]: ['emitted-measurements', 'WILDO.AI.UNTRUSTED_CONTENT_SCREENING', 'agent-untrusted-content-screening-record', 'C3'],\n [CoreAuditableEventType.AGENT_CONTENT_SCREENING_FAILED]: ['emitted-measurements', 'WILDO.AI.UNTRUSTED_CONTENT_SCREENING', 'agent-untrusted-content-screening-record', 'C3'],\n [CoreAuditableEventType.AGENT_OUTPUT_WITHHELD]: ['emitted-measurements', 'WILDO.AI.OUTPUT_MODERATION', 'agent-output-moderation-record', 'C3'],\n [CoreAuditableEventType.AGENT_OUTPUT_MODERATION_FAILED]: ['emitted-measurements', 'WILDO.AI.OUTPUT_MODERATION', 'agent-output-moderation-record', 'C3'],\n};\n\n// One object with the runtime's board (#2462), so a file-only family reads as unreadable on both sides by identity.\nconst FILE_PRESENT_WITHOUT_VALUE = ARTIFACT_PRESENT_WITHOUT_VALUE;\n\n/**\n * The map the coherence report reads: accepted families PLUS landed drafts.\n *\n * The two channels are separate everywhere else on purpose — eligibility must not see a draft — and\n * this is the one place they are legitimately one population, because the report's question is\n * \"do the landed artifacts agree with each other\", and a landed draft is one of them.\n */\nfunction coherenceInputFor(state: PlaybookArtifactState): Map<string, unknown> {\n const composed = new Map(state.artifactsByFamily);\n for (const [family, value] of state.draftArtifactsByFamily ?? []) composed.set(family, value);\n return composed;\n}\n\n/**\n * The computed document facts, as a judge must read them (#964): not produced by the run, absent from its\n * file on purpose, and still binding — a landed fact that contradicts one is unsupported.\n */\nexport function renderComputedDocumentFactsForJudge(answers: readonly ComputedDocumentFactAnswer[] | undefined): string {\n if (answers === undefined || answers.length === 0) return '';\n return [\n '# Facts the runtime COMPUTED from the application\\'s declarations and its own records',\n 'Not produced by this run and not under judgment. They are absent from the landed file on purpose: never ask for',\n 'them to be declared. A landed fact that contradicts one of them is unsupported.',\n '',\n // A computed NOT_APPLICABLE is a recorded finding with its reason (#2847), stated as such rather than as `undefined`.\n ...answers.map((answer) => `- \\`${answer.fact}\\`: ${answer.notApplicableReason !== undefined ? `NOT APPLICABLE — ${answer.notApplicableReason}` : JSON.stringify(answer.value)}`),\n ].join('\\n');\n}\n\n/** The requested playbook ref is not in the compiled catalog. Named so the transport can answer 404 rather than 500. */\n\n/**\n * The application's declared `operatingJurisdictions` slugs, for the assurance applicability gate (#2852).\n *\n * Four inputs, three answers, kept three, because each one sends the gate somewhere different:\n * - no configuration at all → `undefined`, \"not asked\": the gate checks nothing;\n * - a configuration that declares no `operatingJurisdictions`, or declares an EMPTY list → `null`, \"declares none\": an\n * objective resting only on law is then UNDETERMINED (jurisdiction owed), never NOT_APPLICABLE. The empty list is\n * decided before parsing, because the schema refuses it, and a refused declaration would otherwise read as \"not\n * asked\" and switch the gate off;\n * - any other declaration the schema refuses → `undefined`: an unreadable declaration is not \"declares none\";\n * - a valid declaration → its slugs.\n *\n * Parsed with `ApplicationOperatingJurisdictionsSchema`, the same parse the coherence and brief readers use, so an\n * alias such as `uk` never reaches the gate as a slug no reach table knows. The brief and the normalizer read it\n * through the same method, so what the producer is told cannot apply here is exactly what the run refuses.\n */\nexport function readDeclaredOperatingJurisdictionSlugs(saasConfig: unknown): string[] | null | undefined {\n if (saasConfig === undefined || saasConfig === null) return undefined;\n const raw = (saasConfig as { operatingJurisdictions?: unknown }).operatingJurisdictions;\n if (raw === undefined) return null;\n const listed = (raw as { jurisdictions?: unknown } | null)?.jurisdictions;\n if (Array.isArray(listed) && listed.length === 0) return null;\n const declared = ApplicationOperatingJurisdictionsSchema.safeParse(raw);\n if (!declared.success) return undefined;\n return declared.data.jurisdictions.map((entry) => entry.jurisdictionSlug);\n}\n\nexport class UnknownPlaybookError extends Error {}\n\n/** A READINESS precondition fails. There is no way past this one: its inputs are absent or invalid. */\nexport class PlaybookNotReadyError extends Error {}\n\n/**\n * A run's output file changed after the run read it, so it landed nothing rather than replace that change\n * (#1614). Carries the runs whose landing is on disk now, when the write register knows them, so the\n * creator sees WHICH run overlapped this one. Named so the transport answers 409: the request was valid,\n * the working tree moved under it, and running the playbook again is the repair.\n */\nexport class PlaybookRunLandingConflictError extends Error {\n public constructor(\n public readonly conflicts: readonly { readonly family: string; readonly packageRelativePath: string }[],\n public readonly overlappingRuns: readonly { readonly runId: string; readonly playbookRef: string }[],\n runtimeMessage: string,\n ) {\n super(overlappingRuns.length === 0\n ? runtimeMessage\n : `${runtimeMessage} Landed meanwhile by: ${overlappingRuns.map((run) => `${run.playbookRef} (run ${run.runId})`).join(', ')}.`);\n }\n}\n\n/**\n * A second concurrent run of a kind this companion admits only ONE of, over one working tree.\n *\n * The base exists so a transport has ONE thing to catch. The two subclasses stay distinct because a\n * loop and a composite are distinct things with distinct remedies — merging them into one error would\n * put \"wait for the loop\" in front of somebody whose composite is the thing running, which is the\n * whole content of the message.\n */\nexport abstract class PlaybookRunAlreadyInFlightError extends Error {}\n\n/** A second concurrent loop was refused — one loop per companion (OC-1 design D4). Named so the transport answers 409. */\nexport class PlaybookLoopAlreadyRunningError extends PlaybookRunAlreadyInFlightError {}\n\n/**\n * A second concurrent run of the same composite INSTANCE was refused (#1610). Transport answers 409.\n *\n * Until #1610 this refused any second composite, one per application; a different composite, or another\n * instance of the same one, now runs beside it (see `MetaWorkflowsExclusiveSubject.COMPOSITE`). What stays\n * refused is the case below: a new run of an instance ADOPTS that instance's newest progress checkpoint\n * (`adoptChoreographyCheckpoint`, read off the execution rows since #1360), so a second run beside a live one\n * would take over its checkpoint mid-flight, both would then advance it, and whichever settled first would\n * consume the other's only resume point while it was still paying for iterations. (Before #1360 the same\n * collision was on a checkpoint FILE keyed by ref, whose store assumed a composite was single-flight per\n * application and nothing enforced it.) Two DIFFERENT composites never shared a checkpoint; they were\n * refused because two portfolios' writes met over one tree with nothing relating them, which since #1610 is\n * answered by detection (#1614) and each run's record of the runs it overlapped, not by refusal.\n *\n * Refused by the ENGINE since #1361: a composite's execution is opened with its instance's\n * single-flight subject, the driver refuses a second one from the running ROWS, and this error is\n * that refusal re-worded with the holder named. It was an in-memory marker before — invisible to a\n * second process, forgotten by a restart, and clearable by a nested run's `finally`.\n */\nexport class PlaybookChoreographyAlreadyRunningError extends PlaybookRunAlreadyInFlightError {}\n\n/**\n * The engine capabilities an application has actually TURNED ON.\n *\n * `EngineCapabilityActivations` is `Record<EngineCapability, { enabled: boolean }>` — an OBJECT per\n * capability, not a boolean. Reading it as a boolean map treats `{ enabled: false }` as enabled,\n * because an object is not `=== false`, and every declined capability reads as declared. wonder-crm\n * declines two (`BILLING`, `MULTI_LANGUAGE`), so that mistake would have made service terms REQUIRED\n * for an application that sells nothing, and put \"billing\" in a privacy notice's recipient list.\n *\n * Caught before it shipped, and only by looking at a real config: the first fixtures used booleans,\n * which is the pin-that-passes-for-the-wrong-reason shape — the code and the test agreed with each\n * other and neither agreed with production. The array form is tolerated because the same key is spelt\n * that way on provider records; there, membership IS the activation.\n */\n/**\n * The provider-scope key whose providers are reached by the tool that BUILDS the application rather\n * than by the application serving its users.\n *\n * Named here rather than inlined because it decides whether a provider enters a customer-facing\n * document as a data recipient. It mirrors the `providers.scopes.companion` key of\n * `wildo.saas.config.ts`, and derives from the provider-scope vocabulary `ProviderScopeKey` declared\n * beside the recipient population (#1707), so the brief and the population cannot name it differently.\n */\nconst AUTHORING_PROVIDER_SCOPE: string = ProviderScopeKey.COMPANION;\n\n/**\n * The provider packages this application owns (package name → ref), from `providers/<ref>/<facet>/package.json`\n * in the working tree, untracked included (#2018). `undefined` when they could not be listed, so the scan\n * reports itself UNSCANNED rather than reading \"no owned package\" as \"nothing imports a provider\".\n */\nasync function readApplicationProviderPackages(saasRoot: string): Promise<ReadonlyMap<string, string> | undefined> {\n try {\n // Through the git read helper and never synchronous (#3204): a sync spawn held the companion's event loop for the\n // whole git run, and a fork from its 2 GB process blocked it besides.\n const listed = (await gitReadBroker.execGit(['-C', saasRoot, 'ls-files', '--cached', '--others', '--exclude-standard', '--', APPLICATION_PROVIDER_PACKAGE_MANIFEST_PATHSPEC]))\n .stdout.split('\\n').filter(Boolean);\n return applicationProviderPackagesFromManifests(listed.map((manifestPath) => ({ path: manifestPath, content: readFileSync(join(saasRoot, manifestPath), 'utf8') })));\n } catch {\n return undefined;\n }\n}\n\n/**\n * Where this application's source imports a provider package the application owns (#2018) — the code half of\n * the recipient population's data-path axis (#1707).\n *\n * `git grep` over the WORKING TREE, untracked files included: the brief describes what is being built,\n * while the evidence collector greps the committed HEAD. That is the only difference between the readers\n * (this one, the CLI's `subject-data-recipients` generator, the collector); each hands its lines to\n * `typedClientSitesFromGrepLines` with the same owned-package map, so they cannot disagree about what a\n * line means. `undefined` when the scan could not run, which the population carries as an UNSCANNED code\n * path rather than as \"nothing imports it\".\n */\nexport async function scanTypedClientSites(saasRoot: string | undefined): Promise<readonly ProviderTypedClientSite[] | undefined> {\n if (saasRoot === undefined) return undefined;\n const applicationProviderPackages = await readApplicationProviderPackages(saasRoot);\n if (applicationProviderPackages === undefined) return undefined;\n const needles = typedClientSearchNeedles(applicationProviderPackages).flatMap((needle) => ['-e', needle]);\n // No owned provider package, nothing a typed client could be imported from: a scan that found none. Never run\n // `git grep` with no `-e`: it would read the pathspec `.` as the PATTERN and return every line holding a dot.\n if (needles.length === 0) return [];\n try {\n const { stdout } = await gitReadBroker.execGit(['-C', saasRoot, 'grep', '--untracked', '-n', '-F', ...needles, '--', '.'], {\n maxBuffer: 16 * 1024 * 1024,\n });\n return typedClientSitesFromGrepLines(stdout.split('\\n'), applicationProviderPackages);\n } catch (error) {\n // `git grep` exits 1 when nothing matches: a scan that found none, not one that failed. (`execFile` names the exit\n // status `code`; the sync form this replaced named it `status`.)\n if ((error as { code?: unknown }).code === 1) return [];\n return undefined;\n }\n}\n\n/**\n * WHO receives this application's personal data — the one population the brief, the computed\n * `recipients-and-processors` fact and the evidence collector all read (#1707).\n *\n * Replaces a local walk that read only `scopes.<key>.providers`, so every provider declared under\n * `frontendServices.<service>`, `minions.<minion>` or `workers.<worker>` was invisible here, and that never\n * saw a `systemsOfRecord` instance.\n */\nasync function recipientPopulationOf(\n saasConfig: unknown,\n saasRoot: string | undefined,\n providerComplianceProfiles?: Readonly<Record<string, ProviderComplianceProfile>>,\n): Promise<RecipientPopulation> {\n const config = (saasConfig ?? {}) as { providers?: unknown; systemsOfRecord?: unknown; providerComplianceChoices?: unknown };\n const choices = ApplicationProviderComplianceChoicesSchema.safeParse(config.providerComplianceChoices);\n return computeRecipientPopulation({\n providers: config.providers,\n systemsOfRecord: config.systemsOfRecord,\n providerComplianceChoices: choices.success ? choices.data : undefined,\n typedClientSites: await scanTypedClientSites(saasRoot),\n ...(providerComplianceProfiles === undefined ? {} : { providerComplianceProfiles }),\n });\n}\n\n/**\n * The engine providers' profiles as their SPECIFICATIONS mirror them — the fallback when discovery cannot be read.\n * A specification restates its module's profile and is reconciled against it, so for an ENGINE ref the two are\n * one authority; for a catalogue vendor the specification set says nothing, which is why this is only a fallback.\n */\nfunction engineSpecificationComplianceProfiles(): Record<string, ProviderComplianceProfile> {\n const profiles: Record<string, ProviderComplianceProfile> = {};\n for (const specification of listRegisteredProviderSpecifications()) profiles[specification.ref] = specification.complianceProfile;\n return profiles;\n}\n\n/**\n * What a person's erasure executes on one resource, as the compliance introspection reports it (#2960).\n *\n * Crossed a JSON boundary. Undefined unless BOTH lists are arrays of members of their vocabularies: a list holding an\n * unknown member (an introspection from a different engine) is not a shorter true list, and the fact then states the\n * declared mode alone rather than a partial account of what runs.\n */\nfunction parseSubjectErasureExecution(value: { erasedAsTheSubject?: unknown; dispositions?: unknown; severerTreatments?: unknown } | undefined): SubjectErasureExecutedTreatment | undefined {\n if (value === undefined || typeof value.erasedAsTheSubject !== 'boolean' || !Array.isArray(value.dispositions) || !Array.isArray(value.severerTreatments)) return undefined;\n const dispositions = new Set<string>(Object.values(SubjectErasureDisposition));\n const treatments = new Set<string>(Object.values(SubjectErasureSeveredReferenceTreatment));\n if (!value.dispositions.every((member) => typeof member === 'string' && dispositions.has(member))) return undefined;\n if (!value.severerTreatments.every((member) => typeof member === 'string' && treatments.has(member))) return undefined;\n return {\n erasedAsTheSubject: value.erasedAsTheSubject,\n dispositions: value.dispositions as SubjectErasureDisposition[],\n severerTreatments: value.severerTreatments as SubjectErasureSeveredReferenceTreatment[],\n };\n}\n\n/**\n * The system-of-record flows the `compliance-primary-facts` introspection reports per resource (#1709), or `undefined`\n * when they cannot be read faithfully — which every system-of-record recipient then reports as FLOWS_NOT_READ.\n *\n * Crossed a JSON boundary, and the only direction it may err in is \"not read\": ANY shape this companion does not\n * recognise — a resource with no `systemOfRecordFlows` key (an introspection older than #1709), a flow whose system,\n * kind, categories or uncategorized fields are not what the producer emits, a category outside this companion's\n * vocabulary (an application built against a different engine) — makes the whole answer undefined. Dropping the one\n * odd flow or field instead would present a shorter list as complete, which is the under-report this guards against.\n */\nfunction parseSystemOfRecordFlows(\n resources: ReadonlyArray<{ readonly resourceType: string; readonly systemOfRecordFlows?: ReadonlyArray<{ system?: unknown; kind?: unknown; categories?: unknown; unconditionalCategories?: unknown; conditionalCategories?: unknown; uncategorizedPersonalFields?: unknown; purposeRefs?: unknown; subjectRightsPosture?: unknown; followsSystemOfRecord?: unknown }> }>,\n): readonly SystemOfRecordDataFlow[] | undefined {\n const kinds = new Set<string>(Object.values(SystemOfRecordDataFlowKind));\n const categories = new Set<string>(Object.values(PersonalDataCategory));\n const conditions = new Set<string>(Object.values(PersonalDataCondition));\n const postures = new Set<string>(Object.values(SystemOfRecordSubjectRightsPosture));\n const flows: SystemOfRecordDataFlow[] = [];\n for (const resource of resources) {\n if (!Array.isArray(resource.systemOfRecordFlows)) return undefined;\n for (const flow of resource.systemOfRecordFlows) {\n if (typeof flow.system !== 'string' || typeof flow.kind !== 'string' || !kinds.has(flow.kind)) return undefined;\n if (!Array.isArray(flow.categories) || flow.categories.some((category) => typeof category !== 'string' || !categories.has(category))) return undefined;\n if (!Array.isArray(flow.uncategorizedPersonalFields) || flow.uncategorizedPersonalFields.some((field) => typeof field !== 'string')) return undefined;\n // #1745 — the purposes the binding links. Absent (an introspection older than #1745) reads as not read, like any\n // other unrecognised shape: an empty list would state \"no purpose linked\" about flows nobody read the links of.\n if (!Array.isArray(flow.purposeRefs) || flow.purposeRefs.some((purposeRef) => typeof purposeRef !== 'string')) return undefined;\n // #2119 — the categories held on every row, and per condition the rest. Absent (an introspection older than #2119)\n // reads as not read for the same reason: an empty conditional list would state every category unconditionally.\n const isCategoryList = (value: unknown): value is PersonalDataCategory[] =>\n Array.isArray(value) && value.every((category) => typeof category === 'string' && categories.has(category));\n if (!isCategoryList(flow.unconditionalCategories)) return undefined;\n if (!Array.isArray(flow.conditionalCategories) || flow.conditionalCategories.some((entry: { condition?: unknown; categories?: unknown } | null) =>\n entry === null || typeof entry.condition !== 'string' || !conditions.has(entry.condition) || !isCategoryList(entry.categories))) return undefined;\n // #2561 — where requests about the system's records are answered. Absent (an introspection older than #2561) or a\n // member this companion does not know reads as not read: defaulting it would state \"handled at the source\" about a\n // binding nobody read, which is the one sentence the notice must not guess.\n if (typeof flow.subjectRightsPosture !== 'string' || !postures.has(flow.subjectRightsPosture)) return undefined;\n // #2704 — whether the local rows follow the system. Absent (an introspection older than #2704) reads as not read:\n // defaulting it either way would word a two-way copy's sending half as something it is not.\n if (typeof flow.followsSystemOfRecord !== 'boolean') return undefined;\n flows.push({\n system: flow.system,\n resourceType: resource.resourceType,\n kind: flow.kind as SystemOfRecordDataFlowKind,\n categories: flow.categories as PersonalDataCategory[],\n unconditionalCategories: flow.unconditionalCategories,\n conditionalCategories: flow.conditionalCategories as ConditionallyHeldCategories[],\n uncategorizedPersonalFields: flow.uncategorizedPersonalFields as string[],\n purposeRefs: flow.purposeRefs as string[],\n subjectRightsPosture: flow.subjectRightsPosture as SystemOfRecordSubjectRightsPosture,\n followsSystemOfRecord: flow.followsSystemOfRecord,\n });\n }\n }\n return flows;\n}\n\n/** How each not-derivable reason reads in the brief. Total over the vocabulary, so a new reason cannot render blank. */\nconst NOT_DERIVABLE_EXPLANATIONS: Readonly<Record<RecipientCategoriesNotDerivableReason, string>> = {\n [RecipientCategoriesNotDerivableReason.FLOW_UNDECLARED]: 'some path declares no field map (a typed client, a browser operation or unscanned code), so what it sends is not established',\n [RecipientCategoriesNotDerivableReason.NO_RESOURCE_FLOW]: 'no resource binds or pipes this system of record, so nothing declares what reaches it',\n [RecipientCategoriesNotDerivableReason.FLOWS_NOT_READ]: \"the application's resource declarations could not be read, so what flows to it is not known\",\n [RecipientCategoriesNotDerivableReason.UNCATEGORIZED_PERSONAL_FIELDS]: 'some field that flows to it is personal by the application\\'s own declaration and names no category',\n};\n\n/**\n * What each `PersonalDataCondition` means, and how a statement words data held only under it (#2119). Total over the\n * vocabulary, so a condition added tomorrow is a compile error here rather than a line the drafter cannot interpret.\n */\nconst PERSONAL_DATA_CONDITION_EXPLANATIONS: Readonly<Record<PersonalDataCondition, string>> = {\n [PersonalDataCondition.DESCRIBED_PARTY_IS_A_NATURAL_PERSON]:\n 'the row describes a PARTY (the customer organization, an account, a supplier) and the field is that party\\'s name, '\n + 'number, address or similar. It is personal data exactly when that party is an individual (a sole trader, or a '\n + 'partnership of individuals), because GDPR Recital 14 excludes only legal persons. Word it as: \"where the customer '\n + 'is an individual (for example a sole trader), we also hold their business name, contact details and address\", '\n + 'naming the kinds of data, not the field names.',\n};\n\n/** `; only where <condition>: <categories>` per condition, or nothing — the recipient and source lines' conditional half. */\nfunction renderConditionalCategories(conditional: readonly ConditionallyHeldCategories[]): string {\n return conditional.map((entry) => `; of which only where \\`${entry.condition}\\`: ${entry.categories.join(', ')}`).join('');\n}\n\n/**\n * How a flow's subject-rights posture reads in the brief (#2561): where a request about the system of record's records is\n * answered. One sentence per posture: the same the blueprint and the sources partial use, consistent in meaning with the\n * receipt's wording, and worded by\n * DIRECTION the way the receipt words it: what an outbound pipeline sends becomes the system's once received, while the\n * application's own rows stay its own. The sending half of a two-way copy is worded by `localCopyFollowsSource` (#2704):\n * its local rows follow the system, so they are never \"erased as their resource declares\". Total over the vocabulary, so\n * a posture added tomorrow is a compile error here rather than a blank.\n */\nfunction subjectRightsPostureSentence(flowToken: string, posture: SystemOfRecordSubjectRightsPosture, localCopyFollowsSource: boolean): string {\n const outbound = flowToken.startsWith(`${SystemOfRecordDataFlowKind.OUTBOUND_PIPELINE}:`);\n const localRows = localCopyFollowsSource\n ? 'the local copy follows that system: a record it removes is removed or scrubbed here at its next complete pass, as the copy\\'s orphan policy declares, and an erasure here leaves the copy to it'\n : 'the application\\'s own rows are erased as their resource declares';\n switch (posture) {\n case SystemOfRecordSubjectRightsPosture.HANDLED_AT_SOURCE:\n return outbound\n ? `what the application sends becomes that system's once received, and requests about it are handled there; ${localRows}`\n : 'requests about these records are handled in the source system, which decides and answers for its own records';\n case SystemOfRecordSubjectRightsPosture.FORWARDED_TO_SOURCE:\n return outbound\n ? `what the application sends is handled in that system, and an erasure made here is also forwarded to it, best effort; ${localRows}`\n : 'requests are handled in the source system, and the application also forwards an erasure to it, best effort';\n case SystemOfRecordSubjectRightsPosture.NO_SUBJECT_DATA:\n return outbound ? 'what the application sends holds no data about a person' : 'the records hold no data about a person';\n case SystemOfRecordSubjectRightsPosture.OWNED_COPY:\n // INBOUND only (refused on an outbound or two-way pipeline at startup), so it has one wording.\n return 'the source system answers for its own records, and the application keeps its own copy and erases that copy itself';\n default: {\n const unhandled: never = posture;\n throw new Error(`Unhandled subject-rights posture ${String(unhandled)}`);\n }\n }\n}\n\n/**\n * WHAT each recipient receives and for which purpose (#1709) — which of the Art. 30(1)(c) categories reach which (d) recipient.\n *\n * A recipient whose flow declares no field map is rendered NOT DERIVABLE, never as receiving nothing: a typed client\n * or a browser operation sends whatever the application's code passes it, and no declaration says what that is.\n */\nfunction renderRecipientDisclosures(disclosures: readonly RecipientDisclosure[]): readonly string[] {\n if (disclosures.length === 0) return [];\n return [\n '',\n 'What each recipient RECEIVES, and for which purpose (derived from the flows the application declares):',\n ...disclosures.map((disclosure) => {\n const categories = disclosure.categories.length > 0 ? disclosure.categories.join(', ') : 'no declared category';\n const reasons = disclosure.categoriesNotDerivable.map((reason) => NOT_DERIVABLE_EXPLANATIONS[reason]);\n if (disclosure.categoriesAreAFloor) reasons.push('free text a person wrote rides the call, and it can carry any other category');\n const notDerivable = reasons.length === 0 ? '' : ` — and MORE MAY REACH IT: ${reasons.join('; ')}`;\n const purposes = disclosure.purposes.length > 0\n ? `; purpose: ${disclosure.purposes.map((purpose) => `${purpose.purpose} (${purpose.basis})`).join('; ')}`\n : '; purpose: NOT LINKED — its compliance choice names no `purposeRefs`';\n const broken = disclosure.purposeRefsNamingNoPurpose.length > 0\n ? `; purpose refs naming no declared lawful basis: ${disclosure.purposeRefsNamingNoPurpose.map((ref) => `\\`${ref}\\``).join(', ')}`\n : '';\n const postureEntries = Object.entries(disclosure.subjectRightsPostureByFlow ?? {});\n const postures = postureEntries.length === 0\n ? ''\n : `; data-subject requests: ${postureEntries.map(([flow, posture]) => `${flow} — ${subjectRightsPostureSentence(flow, posture, disclosure.localCopyFollowsSourceByFlow?.[flow] === true)}`).join('; ')}`;\n return ` - \\`${disclosure.ref}\\` — ${categories}${renderConditionalCategories(disclosure.conditionalCategories)}${notDerivable}${purposes}${broken}${postures}`;\n }),\n ' State only the categories listed. Where more may reach a recipient, say that what it receives is not fully',\n ' established — never list nothing, and never guess the rest. A category listed \"only where\" a condition reaches',\n ' the recipient only under it: state it with that condition (see the conditional categories above, #2119).',\n ' A system of record is the operator\\'s own system: say where requests about its records are answered, per flow',\n ' (`outbound-pipeline` flows are data the application SENDS to it, #2561).',\n ];\n}\n\n/**\n * The population rendered by class, so a drafter sees WHY a declared vendor is or is not a recipient.\n *\n * The two non-recipient classes are rendered because omitting them would read as \"not declared\": a tenant's\n * own vendor and a vendor nothing reaches are both true statements a notice may need, and neither may be\n * published as the operator's recipient.\n */\nfunction renderRecipientPopulation(population: RecipientPopulation): readonly string[] {\n if (population.members.length === 0) return [];\n const describe = (populationClass: RecipientPopulationClass): string[] => population.members\n .filter((member) => member.populationClass === populationClass)\n .map((member) => ` - \\`${member.ref}\\`${member.kind === RecipientPopulationMemberKind.SYSTEM_OF_RECORD ? ' (system of record)' : ''}`\n + (member.dataPaths.length > 0 ? ` — reached by ${member.dataPaths.map((dataPath) => dataPath.kind).join(', ')}` : ''));\n const block = (populationClass: RecipientPopulationClass, heading: string, guidance: readonly string[]): string[] => {\n const lines = describe(populationClass);\n return lines.length === 0 ? [] : [` ${heading} (${lines.length}):`, ...lines, ...guidance.map((line) => ` ${line}`)];\n };\n return [\n '',\n 'Who RECEIVES data, by whose account reaches them (computed from the configuration and the source):',\n ...block(RecipientPopulationClass.OPERATOR_SUB_PROCESSOR, \"OPERATOR SUB-PROCESSORS — reached with the application's own account\", [\n 'These are the operator\\'s recipients. Each belongs in the processor register.',\n ]),\n ...block(RecipientPopulationClass.TENANT_RECIPIENT, \"TENANT RECIPIENTS — reached only through a customer's or a person's own connected account\", [\n 'The customer\\'s own vendor, reached at the customer\\'s instruction. Do NOT name these as the operator\\'s',\n 'sub-processors; where it helps a reader, say that a customer may connect its own account with them.',\n ]),\n ...block(RecipientPopulationClass.OPERATOR_RUN, 'OPERATOR-RUN — declared self-hosted', []),\n ...block(RecipientPopulationClass.DECLARED_WITHOUT_DATA_PATH, 'DECLARED, NO DATA PATH — configured, and nothing in the application reaches them', [\n 'They receive nothing. Never name them as recipients.',\n ]),\n ];\n}\n\n/**\n * The next-review date an application's DECLARED `assuranceReviewCadence` schedules from this run's\n * observed instant, or `undefined` when it schedules none (#647 decision C).\n *\n * The companion is where the cadence is read because it holds the application's configuration; the\n * normalizer is pure and holds none. `undefined` is an ANSWER, not an error: no declaration and\n * `AS_NEEDED` both reach the normalizer as an absent date, and the programme is then produced with a\n * stamped limitation rather than refused.\n *\n * Takes the raw config value as `unknown` and checks it against the vocabulary rather than trusting a\n * cast. The config schema validates the enum at load, so an unrecognised value here means an\n * unvalidated config — and deriving a date from it would manufacture a commitment nobody made.\n */\nexport function resolveDeclaredAssuranceNextReviewOn(declaredCadence: unknown, recordedAt: string): string | undefined {\n if (!(Object.values(ReviewCadence) as unknown[]).includes(declaredCadence)) return undefined;\n return deriveNextReviewOn(recordedAt, declaredCadence as ReviewCadence);\n}\n\n/**\n * HOW LONG the application keeps each class of data — the half `retentionPolicy.mode` never said.\n *\n * A resource's mode says what erasure DOES to a row, and a confident paragraph about impersonalization\n * reads to a reader as an answer about retention. So a notice drafted from the modes alone leaves the\n * one number a reader wanted absent, while sounding complete (issue #89). This renders the declared\n * periods, and — the load-bearing half — names the classes the operator has NOT decided.\n *\n * An undeclared class is rendered as UNDECIDED, never omitted and never defaulted. \"We keep data as\n * long as necessary\" is the placeholder this whole declaration exists to make impossible, and an\n * absent line would invite exactly that sentence.\n */\nfunction renderRetentionSchedule(schedule: ApplicationRetentionSchedule | undefined): readonly string[] {\n const undeclared = undeclaredRetentionClasses(schedule);\n const declared = Object.values(DataRetentionClass).filter((dataClass) => schedule?.[dataClass] !== undefined);\n return [\n '## How long data is kept',\n 'Declared per data class by the operator. A class listed as UNDECIDED has no period — that is not',\n '\"kept indefinitely\" and not \"deleted immediately\", it is a decision nobody has taken. State it as',\n 'a gap an operator closes; never write a period the application has not declared.',\n '',\n ...(declared.length > 0\n ? declared.map((dataClass) => {\n const period = schedule![dataClass]!;\n return `- \\`${dataClass}\\` — ${period.retentionDays} day(s). Reason given: ${period.rationale}`;\n })\n : ['(no retention period is declared for any class)']),\n ...(undeclared.length > 0\n ? [`- UNDECIDED (${undeclared.length}): ${undeclared.map((dataClass) => `\\`${dataClass}\\``).join(', ')}`]\n : []),\n ];\n}\n\n/**\n * WHO the configured external providers actually are — and, per provider, whether anybody has said.\n *\n * A configured provider establishes THAT a third party is involved and what FUNCTION it performs. A\n * privacy notice's recipient statement needs three other things — the processor's legal identity, the\n * region it processes in, and its own subprocessors — and an international-transfer statement cannot\n * be made at all without the region (issue #88).\n *\n * The gap is rendered PER PROVIDER, which is the whole value of joining the register to the\n * composition: \"third-party identities are not established\" is a sentence an operator cannot act on,\n * while \"`anthropic` is configured and undeclared\" names one piece of work. A processor listed in the\n * register but no longer configured is reported too — a stale entry keeps a recipient in the notice\n * that receives nothing, which is the quieter of the two errors.\n */\nfunction renderProcessorRegister(\n population: RecipientPopulation,\n register: ApplicationProcessorRegister | undefined,\n): readonly string[] {\n /*\n * A provider the operator declared SELF_HOSTED is not a recipient, so it cannot be an outstanding\n * DISCLOSURE either (wildo-ai/wildo-ai#208: `email-preview` renders mail to a log and calls no API). A\n * provider with NO choice stays in scope, because absence means nobody has answered.\n *\n * The rule lives in `joinRecipientPopulationToRegister` over `computeRecipientPopulation` (#964, #1707),\n * because the computed `recipients-and-processors` fact and the evidence collector state the same\n * classification and a second copy could disagree.\n */\n const {\n undeclaredProviderRefs: undeclared,\n staleProviderRefs: stale,\n registeredTenantRecipientRefs: registeredTenantRecipients,\n } = joinRecipientPopulationToRegister(population, register);\n const declared = register?.processors ?? [];\n return [\n '## Who else processes personal data',\n 'The legal identity, processing region and subprocessors of each configured external provider, as',\n 'the operator has established them. A provider listed as UNDECLARED below is IN USE and its identity',\n 'has not been established — never read it as a provider that receives nothing. Name the function it',\n 'performs (the capability says that) and state plainly that its identity and location are outstanding.',\n '',\n ...(declared.length > 0\n ? declared.flatMap((processor) => [\n // The two arms are LABELLED differently on purpose. A configured-provider entry joins to the\n // application's composition and can be checked against it; an authored one joins to nothing,\n // because no configuration mentions the operator's hosting company. Rendering them\n // identically would give an unverifiable claim the same authority as a checkable one.\n processor.kind === ProcessorRegisterEntryKind.CONFIGURED_PROVIDER\n ? `- \\`${processor.providerRef}\\` (configured provider) — ${processor.legalEntityName}; processes in `\n + `${processor.processingRegions.join(', ')}`\n // #3921: where it keeps the data at rest, when the operator stated that it differs from where it processes.\n + (processor.storedAtRestIn === undefined ? '' : `; stores the data at rest in ${processor.storedAtRestIn.join(', ')}`)\n + (processor.purpose === undefined ? '' : `; purpose: ${processor.purpose}`)\n : `- \\`${processor.subprocessorRef}\\` (AUTHORED — nothing in the configuration mentions it, so it `\n + `cannot be verified against the composition) — ${processor.legalEntityName}; processes in `\n + `${processor.processingRegions.join(', ')}`\n + (processor.storedAtRestIn === undefined ? '' : `; stores the data at rest in ${processor.storedAtRestIn.join(', ')}`)\n + `; purpose: ${processor.purpose}`,\n processor.subprocessors.length > 0\n ? ` - subprocessors: ${processor.subprocessors.map((sub) => `${sub.name} (${sub.processingRegions.join(', ')})`).join('; ')}`\n : ' - subprocessors: none disclosed by this processor',\n ])\n : ['(no processor identity is established for any provider)']),\n ...(undeclared.length > 0\n ? ['', `UNDECLARED (${undeclared.length}): ${undeclared.map((ref) => `\\`${ref}\\``).join(', ')} — configured, identity not established.`,\n ...renderUndeclaredProcessorQuestions(population, undeclared)]\n : []),\n ...(stale.length > 0\n ? ['', `STALE (${stale.length}): ${stale.map((ref) => `\\`${ref}\\``).join(', ')} — declared in the register but no data path reaches them from this operator. Do not name these as recipients.`]\n : []),\n ...(registeredTenantRecipients.length > 0\n ? ['', `REGISTERED TENANT RECIPIENTS (${registeredTenantRecipients.length}): ${registeredTenantRecipients.map((ref) => `\\`${ref}\\``).join(', ')} — `\n + 'reached only through a customer\\'s own connected account, so NOT the operator\\'s sub-processor. Do not publish them as one.']\n : []),\n /*\n * WHERE personal data lands through processors — the derivable half of the transfer question\n * (issue #126).\n *\n * Both levels, because the chain is what makes a transfer statement hard: an operator in France\n * using a French vendor that runs on a US cloud has a transfer, and reading only the vendor's\n * region would miss it.\n *\n * The three states below are three DIFFERENT claims and the drafter must not round any of them\n * up. An empty register is a declaration that no processor receives anything. An absent one is\n * silence. A populated one establishes where data goes through processors and says nothing about\n * the operator's own processing.\n */\n '',\n ...(register === undefined\n ? [\n 'Transfer position: NOT ESTABLISHED. No processor register exists, so where personal data',\n 'lands is unknown. That is the OPPOSITE of knowing it stays put — never produce \"we do not',\n 'transfer data internationally\" from an absent register.',\n ]\n : registerEstablishesNoProcessorRecipients(register)\n ? [\n 'Transfer position (processor side): the register declares NO processor, so no personal data',\n 'reaches a third party and none is transferred THROUGH ONE. State exactly that, and state the',\n 'residual with it: this establishes nothing about the operator\\'s OWN processing — its',\n 'infrastructure, its staff, its own establishment. Do not round it up to \"no international',\n 'transfers\".',\n ]\n : [\n `Personal data reaches processors in: ${processorProcessingRegions(register).join(', ')}`\n + ' (the declared processors AND their own subprocessors).',\n 'That establishes WHERE it lands. It does NOT establish whether any of it is an international',\n 'transfer, which depends on the origin jurisdiction, nor under which mechanism one would be',\n 'lawful — both are legal determinations the framework deliberately does not model, because',\n 'adequacy decisions move by court ruling and a stale answer here would be a false statement.',\n ]),\n ];\n}\n\n/**\n * The processors section when the register could not be read (#3258). Never the UNDECLARED list: that says nobody has\n * established a provider, and a landed register may have.\n */\nfunction renderProcessorRegisterNotRead(reason: string): readonly string[] {\n return [\n '## Who else processes personal data',\n `The processor register could not be read, so what it says is unknown here: it may be landed. ${reason}`,\n 'Name the function each configured provider performs (the capability says that). Mark each provider\\'s identity and',\n 'location as not read for this draft. Do not say they are outstanding or that nobody has established them.',\n ];\n}\n\n/**\n * Where each of a vendor's regions keeps data at rest (#3921), and the account arrangement that holds on (#3920): the\n * suggestion for the register entry's `storedAtRestIn`, read from the profile and never stated as the operator's.\n */\nfunction storageSuggestionOf(established: EstablishedProviderComplianceProfile): string {\n const regions = Object.entries(established.storageRegionTerritories ?? {});\n if (regions.length === 0) return '';\n const each = regions.map(([region, places]) => {\n const condition = established.storageRegionConditions?.[region];\n return `\\`${region}\\` → ${places.join(', ')}${condition === undefined ? '' : ` (${condition})`}`;\n });\n return `; SUGGESTED storage at rest, by region: ${each.join('; ')}`;\n}\n\n/**\n * For each UNDECLARED processor, what its vendor OFFERS — the QUESTION the register entry answers (#1708, #1744).\n *\n * The provider's profile states possibilities (who can run it, where) and, where the catalogue researched them,\n * SUGGESTED legal facts, each read from a named page on a named day. They are rendered as what to verify and copy\n * into the operator's own register, never as the answer: the register header's rule is that the framework supplies\n * the question and a sourced suggestion, and only the operator's commit adopts a fact (Paul's decision, 2026-09-25).\n */\nfunction renderUndeclaredProcessorQuestions(population: RecipientPopulation, undeclared: readonly string[]): readonly string[] {\n if (!population.complianceProfilesRead) return [];\n const lines = undeclared.flatMap((ref) => {\n const profile = population.members.find((member) => member.ref === ref)?.complianceProfile ?? null;\n if (profile === null) return [` - \\`${ref}\\` — the provider declares no profile; research who runs it and where.`];\n const established = establishedProviderComplianceProfile(profile);\n if (established === null) return [` - \\`${ref}\\` — UNDETERMINED: nobody has researched who runs it or where it processes.`];\n const read = (established.evidence ?? []).map((entry) => `${entry.source} (read ${entry.verifiedAt})`);\n return [\n ` - \\`${ref}\\` — offers ${established.deploymentModels.join(' or ')}`\n + (established.processingRegions.length > 0 ? ` in ${established.processingRegions.map((region) => `\\`${region}\\``).join(', ')}` : '')\n + (established.vendorLegalEntityName === undefined ? '' : `; SUGGESTED legal entity: ${established.vendorLegalEntityName}`)\n // #3921: where each region keeps data at rest, and what that holds on (#3920), for the entry's `storedAtRestIn`.\n + storageSuggestionOf(established)\n + (established.subprocessorListUrl === undefined ? '' : `; sub-processors listed at ${established.subprocessorListUrl}`)\n + (established.dataProcessingAgreementUrl === undefined ? '' : `; data processing agreement offered at ${established.dataProcessingAgreementUrl}`)\n + (read.length > 0 ? `. Read from ${read.join(', ')}.` : ' (undated: the provider cites no source or date).'),\n ];\n });\n return [\n 'What each UNDECLARED vendor offers — the QUESTION its register entry answers. A suggested fact is what the',\n 'framework READ on the date shown; it is not this operator\\'s arrangement and must not be stated as one until the',\n 'operator verifies it and commits it to the processor register.',\n ...lines,\n ];\n}\n\n/**\n * Whether the AI this application's SERVICE uses DECIDES anything about a person, and what each agent's model is sent.\n *\n * A capability says AI is in use and for what function; it cannot say consequence, and the difference carries the\n * legal weight (issue #92). Rendered per AI capability that reaches the CONTRACTED SERVICE (an enabled capability that\n * serves only the build is named as outside it, never asked about) and, since #2838, per AGENT running on one: each\n * agent's declared use, its human review derived from its approval gates where every write is gated, the regulatory\n * reading of its domain where the EU AI Act applies, and (#2848) the content guardrails it declares. The agents come\n * from the `ai-use-declarations` introspection; when they cannot be read the section says NOT READ, never \"no agents\".\n *\n * A served capability with no posture, and no agent on it declaring its use, is reported OUTSTANDING and never assumed harmless. That\n * asymmetry is deliberate and is the one place in this section where silence is more dangerous than\n * elsewhere: a notice describing AI use without addressing consequence does not read as \"unknown\", it\n * reads as \"nothing significant happens here\" — which is the exemption, claimed for free.\n */\nfunction renderAiUsePosture(\n contractedServiceCapabilities: ReadonlySet<string>,\n outsideContractedServiceCapabilities: ReadonlySet<string>,\n posture: ApplicationAiUsePosture | undefined,\n agents: readonly AgentAiUseDeclaration[] | undefined,\n operatingJurisdictions: Parameters<typeof deriveAiRegulationRegimes>[0],\n): readonly string[] {\n /*\n * Scoped to the CONTRACTED SERVICE, because this section feeds a document about that service.\n *\n * `AI_ENGINE_CAPABILITIES` is the whole AI vocabulary and includes `AI_CODING_AGENT`, a build-time\n * tool that writes the application's source. Asking whether it \"DECIDES something about a person\"\n * is a question the running product does not raise, and answering it puts a development tool into\n * an Article 22 statement.\n */\n const enabledAi = AI_ENGINE_CAPABILITIES_IN_THE_CONTRACTED_SERVICE.filter((capability) => contractedServiceCapabilities.has(capability));\n const enabledAuthoringOnlyAi = AI_ENGINE_CAPABILITIES.filter((capability) => outsideContractedServiceCapabilities.has(capability));\n /*\n * The build-time half is NAMED rather than dropped. Silence would leave a drafter that can see the\n * capability elsewhere in this brief unable to tell whether the omission is a decision or a gap —\n * and the honest sentence, which is what Wonder CRM's own fact should have said, distinguishes the\n * SERVICE from the capability set rather than denying the capability exists.\n */\n const authoringOnlyAiNote = enabledAuthoringOnlyAi.length > 0\n ? [\n '',\n `Enabled but OUTSIDE the contracted service (${enabledAuthoringOnlyAi.length}): `\n + `${enabledAuthoringOnlyAi.map((capability) => `\\`${capability}\\``).join(', ')} — development tooling that`,\n 'operates on this application\\'s own source while it is built. It processes no user data and makes no',\n 'decision about any person, so it does NOT belong in this document. Do not deny it exists either:',\n 'the accurate statement is about the SERVICE, not about the capability set.',\n ]\n : [];\n if (enabledAi.length === 0) {\n return [\n '## Automated decisions and AI',\n 'No AI capability reaches this application\\'s CONTRACTED SERVICE. That is a positive, checkable',\n 'statement: the service performs no AI processing of personal data, automated or otherwise.',\n ...authoringOnlyAiNote,\n ];\n }\n const regimes = deriveAiRegulationRegimes(operatingJurisdictions);\n const derived = deriveApplicationAiUses({ contractedServiceCapabilities: enabledAi, capabilityPosture: posture, agents, regimes: regimes.regimes });\n const agentsByRef = new Map((agents ?? []).map((agent) => [agent.ref, agent] as const));\n const agentUses = derived.uses.filter((use) => use.source === AiUseDeclarationSource.AGENT);\n return [\n '## Automated decisions and AI',\n 'Per enabled AI capability, and per agent that runs on one: what it is used for, its use DOMAIN, whether it',\n 'DECIDES something about a person, and how human intervention is obtained where it does. A use listed',\n 'OUTSTANDING has no declared posture — do NOT read that as \"it decides nothing\". Saying nothing about',\n 'consequence is how a notice claims an exemption it has not earned; state the gap instead.',\n '',\n ...enabledAi.map((capability) => {\n const declared = posture?.[capability];\n if (declared !== undefined) return `- \\`${capability}\\` — ${describeAiUse(declared, derived.uses.find((use) => use.source === AiUseDeclarationSource.CAPABILITY && use.ref === capability)?.reading ?? null)}`;\n const onIt = agentUses.filter((use) => use.capability === capability);\n if (!derived.undeclaredCapabilities.includes(capability)) return `- \\`${capability}\\` — declared per agent (${onIt.length}), below.`;\n return `- \\`${capability}\\` — OUTSTANDING: enabled, consequence not declared.`;\n }),\n ...renderAgentAiUses(agents, agentUses, agentsByRef, derived.undeclaredAgentRefs),\n ...(derived.invalidDeclarations.length > 0\n ? [\n '',\n `INVALID agent declarations (${derived.invalidDeclarations.length}) — the posture schema refuses them; state the use as not yet established:`,\n ...derived.invalidDeclarations.map((invalid) => `- \\`${invalid.ref}\\`: ${invalid.issues.join('; ')}`),\n ]\n : []),\n '',\n ...renderAiRegulationReading(regimes.jurisdictionsDeclared, regimes.regimes.length > 0, derived),\n ...(derived.undeclaredCapabilities.length > 0\n ? ['', `OUTSTANDING (${derived.undeclaredCapabilities.length}): ${derived.undeclaredCapabilities.map((capability) => `\\`${capability}\\``).join(', ')} — an operator decides and states this.`]\n : []),\n ];\n}\n\n/** One declared use, in one line: consequence, purpose, domain and its reading, human intervention. */\nfunction describeAiUse(declared: AiUsePosture, reading: AiUseRiskReading | null, derivedReview?: string): string {\n const review = derivedReview ?? (declared.humanReviewArrangement === null ? undefined : declared.humanReviewArrangement);\n return `${declared.consequence}; used for: ${declared.purpose}`\n + (declared.domain === undefined ? '; domain: OWED' : `; domain: \\`${declared.domain}\\`${reading === null ? '' : ` → ${reading.tier}`}`)\n + (review === undefined ? '' : `; human intervention: ${review}`);\n}\n\n/**\n * The application's agents (#2838): each agent's declared use, and its human review DERIVED from its tools' approval\n * gates where every changing tool has one (`deriveAgentWriteOversight`). Agents that could not be read are said to be\n * unread, never listed as none.\n */\nfunction renderAgentAiUses(\n agents: readonly AgentAiUseDeclaration[] | undefined,\n agentUses: readonly ApplicationAiUse[],\n agentsByRef: ReadonlyMap<string, AgentAiUseDeclaration>,\n undeclaredAgentRefs: readonly string[] | null,\n): readonly string[] {\n if (agents === undefined) {\n return [\n '',\n 'Agents: NOT READ — the application\\'s agents could not be introspected, so an agent-level declaration counts',\n 'for nothing here. Do not describe what the agents do; state that their uses are not established.',\n ];\n }\n const lines = agentUses.map((use) => {\n const agent = agentsByRef.get(use.ref);\n const oversight = agent === undefined ? null : deriveAgentWriteOversight(agent);\n const derivedReview = oversight?.arrangementDerivedFromGates === true\n ? `every tool it can change something with waits for a person's approval (${agent!.gatedWriteToolRefs.map((ref) => `\\`${ref}\\``).join(', ')}) — derived from the approval gates`\n : undefined;\n const ungated = oversight?.oversight === AgentWriteOversight.UNGATED_WRITES\n ? `; changes something with NO approval: ${agent!.ungatedWriteToolRefs.map((ref) => `\\`${ref}\\``).join(', ')}`\n : '';\n const unread = (oversight?.unresolvedToolRefs.length ?? 0) > 0 ? ` (${oversight!.unresolvedToolRefs.length} tool(s) the application does not register were not read)` : '';\n return `- agent \\`${use.ref}\\` (\\`${use.capability}\\`) — ${describeAiUse(use.posture, use.reading, derivedReview)}${ungated}${unread}`;\n });\n return [\n ...(lines.length > 0 ? ['', `Agents declaring their use (${lines.length}):`, ...lines] : []),\n ...((undeclaredAgentRefs ?? []).length > 0\n ? ['', `OUTSTANDING agents (${undeclaredAgentRefs!.length}): ${undeclaredAgentRefs!.map((ref) => `\\`${ref}\\``).join(', ')} — run on an AI capability of the contracted service and declare no use.`]\n : []),\n ...renderAgentContentGuardrails(agents.filter((agent) => agentUses.some((use) => use.ref === agent.ref) || (undeclaredAgentRefs ?? []).includes(agent.ref))),\n ];\n}\n\n/**\n * What each agent of the contracted service DECLARES its model may be sent and may let out (#2848): its personal-data\n * treatment, whether it screens third-party content for prompt injection, and its output-moderation policy.\n *\n * A notice about AI says what a model provider receives, and these declarations are that answer. Stated as DECLARED:\n * an organization's agent policy can only tighten them at run time, which no declaration reading can see, so a\n * missing declaration is \"not declared by the agent\", never \"never applied\". A field the agent list does not carry\n * (an application whose engine predates it) is \"not read\", never \"not declared\".\n */\nfunction renderAgentContentGuardrails(agents: readonly AgentAiUseDeclaration[]): readonly string[] {\n if (agents.length === 0) return [];\n const read = <T>(agent: AgentAiUseDeclaration, field: 'personalDataTreatment' | 'promptInjectionScreening' | 'outputModeration'): T | null | undefined =>\n (agent as unknown as Record<string, T | null | undefined>)[field];\n const lines = agents.map((agent) => {\n const treatment = read<string>(agent, 'personalDataTreatment');\n const screening = read<string>(agent, 'promptInjectionScreening');\n const moderation = read<Record<string, string>>(agent, 'outputModeration');\n const personalData = treatment === undefined\n ? 'personal data: NOT READ'\n : treatment === null\n ? 'personal data: no treatment declared (its model receives personal values in clear unless an organization\\'s policy imposes one)'\n : `personal data: \\`${treatment}\\` before the model is sent it`;\n const injection = screening === undefined\n ? 'prompt-injection screening: NOT READ'\n : screening === null ? 'prompt-injection screening: not declared' : `prompt-injection screening: \\`${screening}\\``;\n const moderated = moderation === undefined\n ? 'output moderation: NOT READ'\n : moderation === null || Object.keys(moderation).length === 0\n ? 'output moderation: not declared'\n : `output moderation: withheld at or above ${Object.entries(moderation).map(([category, severity]) => `\\`${category}\\` ${severity}`).join(', ')}`;\n return `- agent \\`${agent.ref}\\` — ${personalData}; ${injection}; ${moderated}`;\n });\n return [\n '',\n `Content guardrails each agent DECLARES (${lines.length}) — state what the model provider receives from these, never more.`,\n 'An organization\\'s agent policy can only tighten them at run time (a treatment, screening or moderation categories); say a',\n 'stricter setting is possible, never that one is applied:',\n ...lines,\n ];\n}\n\n/**\n * The regulatory reading of the declared domains (#2838): computed only where the application operates under the EU AI\n * Act (#2852). A prohibited-practice candidate is marked CRITICAL and a high-risk candidate MAJOR; neither stops\n * anything (Paul, 2026-10-18).\n */\nfunction renderAiRegulationReading(jurisdictionsDeclared: boolean, euAiActApplies: boolean, derived: ApplicationAiUses): readonly string[] {\n if (!jurisdictionsDeclared) {\n return ['AI regulation: the application declares no operating jurisdiction, so the regulatory class of each use is OWED. State it as not yet assessed.'];\n }\n if (!euAiActApplies) {\n return ['AI regulation: no declared jurisdiction is one the EU AI Act reaches, so no use is classed under it. Do not describe any use in that Act\\'s terms.'];\n }\n const marks = derived.uses.flatMap((use) => {\n const reading = use.reading;\n if (reading === null) return [];\n const tierMarks = reading.tier === AiUseRiskTier.PROHIBITED_PRACTICE_CANDIDATE\n ? [`- CRITICAL — \\`${use.ref}\\` declares \\`${use.posture.domain}\\`, a practice Article 5(1)(${reading.article5Point}) of the EU AI Act prohibits${reading.appliesFrom === undefined ? '' : ` from ${reading.appliesFrom}`}. A CANDIDATE, marked and not refused: say plainly the use must not be offered where the Act applies until a person establishes it falls outside Article 5.`]\n : reading.tier === AiUseRiskTier.HIGH_RISK_CANDIDATE\n ? [`- MAJOR — \\`${use.ref}\\` declares \\`${use.posture.domain}\\`, Annex III area ${reading.annexIIIArea}: a high-risk CANDIDATE${reading.exemptionVoidedByProfiling ? ' (its declared exemption does not apply, because it profiles natural persons)' : ''}. Wildo does not yet support high-risk AI systems: state it as not supported, never as compliant.`]\n : reading.classificationOwed ? [`- \\`${use.ref}\\` declares domain \\`OTHER\\`: its classification is owed.`] : [];\n // Stated on EVERY tier, the prohibited one included (#2838 B2): an Article 6(3) exemption is meaningless on any domain\n // outside Annex III, and a CRITICAL mark is no reason to leave the author believing their exemption holds.\n const exemptionNote = reading.exemptionNotApplicable\n ? [`- \\`${use.ref}\\` declares a high-risk exemption on a domain outside Annex III, where it means nothing: correct the declaration.`]\n : [];\n return [...tierMarks, ...exemptionNote];\n });\n return [\n 'AI regulation: the EU AI Act applies to this application. Each declared domain is read against it; a reading is a',\n 'CANDIDATE a person confirms, never a legal conclusion.',\n ...marks,\n ...(derived.domainOwedRefs.length > 0\n ? [`Domain OWED (${derived.domainOwedRefs.length}): ${derived.domainOwedRefs.map((ref) => `\\`${ref}\\``).join(', ')} — declared without a use domain, so its class cannot be read. Do not infer it from the purpose.`]\n : []),\n ];\n}\n\n/**\n * What the application stores in a visitor's BROWSER — the itemised table a cookie notice is.\n *\n * Split by origin for the same reason the resource declarations are: every generated application sets\n * at least one cookie it never authored, because the framework sets it. Asking only the application\n * would produce a cookie table missing the session cookie, which is the one entry a visitor is most\n * certain to have (issue #91).\n *\n * A surface with no inventory is reported UNINVENTORIED and is never rendered as \"sets nothing\" — an\n * empty ARRAY is that answer, and the two must not collapse. A cookie table that silently omits a\n * surface tells a visitor they are tracked by less than they are.\n */\n/**\n * WHO is publishing this document, in what role, on what lawful basis (issue #131).\n *\n * Rendered ABSENT-as-absent, like every other declaration in this section: a document that cannot\n * name its operator must say so, and an omission here would let a drafter reach for a plausible\n * entity name — the one invention a privacy notice can least afford, since the identity is what a\n * subject uses to exercise a right.\n */\n/**\n * WHO RUNS each runtime-bound provider, and WHERE it processes (issue #130).\n *\n * This is what turns a recipients section from a negation into an ENUMERATION. Until it existed, a\n * notice could say \"no external provider is bound to a runtime\" and nothing else — true for an\n * application that binds none, and unable to describe one that does.\n *\n * The deployment model is the axis that decides whether a bound provider is a RECIPIENT at all. A\n * self-hosted one is not: the operator runs it, no third party receives anything, and naming it as a\n * recipient would be false in the direction that alarms a reader rather than the one they can check.\n * Rendered as its own sentence rather than omitted, because \"we run this ourselves\" is a positive\n * statement worth making.\n *\n * A bound provider with NO choice is reported as unanswered rather than assumed vendor-hosted.\n * Assuming would be safe for the notice and wrong for the operator — it would publish that data goes\n * to a third party when nobody said so.\n */\nfunction renderProviderComplianceChoices(\n runtimeScopedProviderRefs: readonly string[],\n choices: ApplicationProviderComplianceChoices | undefined,\n): readonly string[] {\n if (runtimeScopedProviderRefs.length === 0) return [];\n\n const declared = choices ?? {};\n const recipients: string[] = [];\n const operatorRun: string[] = [];\n const unanswered: string[] = [];\n\n for (const providerRef of runtimeScopedProviderRefs) {\n const choice = declared[providerRef];\n if (choice === undefined) {\n unanswered.push(providerRef);\n } else if (choice.deploymentModel === ProviderDeploymentModel.SELF_HOSTED) {\n operatorRun.push(providerRef);\n } else {\n recipients.push(`\\`${providerRef}\\` — processes in ${choice.processingRegion ?? 'an undeclared region'}`);\n }\n }\n\n return [\n '',\n 'Who RUNS each bound provider, and where it processes:',\n ...(recipients.length > 0\n ? [\n ` THIRD-PARTY RECIPIENTS (${recipients.length}) — vendor-hosted, so data reaches a third party:`,\n ...recipients.map((entry) => ` - ${entry}`),\n ]\n : [' Third-party recipients: NONE.']),\n ...(operatorRun.length > 0\n ? [\n ` OPERATOR-RUN (${operatorRun.length}) — self-hosted, so no third party receives anything:`,\n ...operatorRun.map((providerRef) => ` - \\`${providerRef}\\``),\n ' State these as processing under the operator\\'s own control. They are NOT recipients and must',\n ' not be enumerated as such.',\n ]\n : []),\n ...(unanswered.length > 0\n ? [\n ` UNANSWERED (${unanswered.length}): ${unanswered.map((providerRef) => `\\`${providerRef}\\``).join(', ')}.`,\n ' Bound to a runtime with no declared deployment model, so whether data reaches a third party is',\n ' not established. Do NOT assume vendor-hosted: that would publish that data goes to a third',\n ' party when nobody said so. Declare it in `wildo.saas.config.ts` under',\n ' `providerComplianceChoices`.',\n ]\n : []),\n ];\n}\n\n/**\n * Where an operator says a provider processes, that the PROVIDER does not offer (issue #308).\n *\n * `appAssertedProcessingRegions` has computed exactly this set since the compliance-choice schema\n * landed, and had NO CALLER — the schema's own field said so in a `⚠️` note. The reason was a data\n * path rather than a decision: the profile that lists a vendor's regions lives on the backend provider\n * MODULE, and this renderer can reach provider SPECIFICATIONS. Mirroring `complianceProfile` onto the\n * specification is what made the comparison possible here; this is the report it exists for.\n *\n * REPORTED, NEVER REFUSED, and the asymmetry is the whole design. A vendor opening a data centre must\n * not become an application build failure, and an operator who genuinely knows better than a framework\n * list shipped months ago should be able to say so. What the framework owes is that the divergence is\n * VISIBLE — the same trade the personal-data declaration report makes.\n *\n * Both readings are named because they are opposite work: a typo publishes a region the data never\n * reaches, and a genuine new region means the provider module is stale. A drafter must not silently\n * pick one.\n *\n * A provider with no registered specification contributes nothing here — the helper skips it, because\n * \"this provider declares no compliance profile at all\" is a different gap with a different owner, and\n * reporting it as an asserted REGION would misname it.\n */\nfunction renderAppAssertedProcessingRegions(\n choices: ApplicationProviderComplianceChoices | undefined,\n profilesByProviderRef: Readonly<Record<string, ProviderComplianceProfile>>,\n): readonly string[] {\n if (choices === undefined) return [];\n\n const asserted = appAssertedProcessingRegions({ choices, profilesByProviderRef });\n if (asserted.length === 0) return [];\n\n return [\n '',\n ` APP-ASSERTED REGIONS (${asserted.length}) — the operator names a region the provider does not offer:`,\n ...asserted.map(({ providerRef, region }) => {\n const offered = establishedProviderComplianceProfile(profilesByProviderRef[providerRef])?.processingRegions ?? [];\n return ` - \\`${providerRef}\\` — configured as \\`${region}\\`; the provider declares `\n + (offered.length > 0 ? offered.map((entry) => `\\`${entry}\\``).join(', ') : 'no region at all');\n }),\n ' This is NOT refused: a vendor opening a data centre must not break a build, and the operator may',\n ' know better than a framework list. It is reported because the two readings are opposite work — a',\n ' TYPO publishes a region the data never reaches, and a GENUINELY NEW region means the provider',\n ' module is stale. Establish which before stating the region in a notice.',\n ];\n}\n\n/**\n * What the providers' own compliance PROFILES say about the operator's choices, and what research is owed (#1708).\n *\n * The region divergence has its own block above; this renders the rest of the assessment, each as a DIFFERENT piece\n * of work: a deployment model the provider does not offer is a configuration error, an UNDETERMINED profile is a\n * vendor nobody has researched, and a provider with no profile at all is a module that states nothing. When the\n * profiles could not be read the section says so — \"no gap\" and \"not checked\" must not render identically.\n */\nexport function renderProviderComplianceProfileFindings(population: RecipientPopulation, unreadableReason: string | undefined): readonly string[] {\n if (!population.complianceProfilesRead) {\n return population.operatorSubProcessorRefs.length === 0 ? [] : [\n '',\n ` PROVIDER PROFILES NOT READ${unreadableReason === undefined ? '' : ` (${unreadableReason})`}: the operator's choices were checked only`,\n ' against the engine providers\\' own declarations, so a catalogue vendor\\'s possibilities were not compared.',\n ];\n }\n const modelNotOffered = population.complianceChoiceAssessments.filter((entry) => entry.assessment === ProviderComplianceChoiceAssessment.DEPLOYMENT_MODEL_NOT_OFFERED);\n // #3513: a region the product calls is a different statement from one the operator attests about its account, and a\n // region the provider says nothing about is neither. A document states each as what it is.\n const regioned = population.complianceChoiceAssessments.filter((entry) => entry.choice.processingRegion !== undefined);\n // The word (ENFORCED / ATTESTED / NEITHER) is `processingRegionHoldingOf`, the reading the computed\n // `recipients-and-processors` fact states too, so the brief and the published fact cannot name one region differently.\n const regionHolds = (reach: ProviderProcessingRegionReachKind | null): string => {\n const holding = processingRegionHoldingOf(reach).toUpperCase();\n if (reach === null) return `${holding} — the provider does not say how this region is reached, so state it as the operator's claim only`;\n switch (reach) {\n case ProviderProcessingRegionReachKind.ENDPOINT:\n return `${holding} — every call goes to that region's endpoint`;\n case ProviderProcessingRegionReachKind.REQUEST_PARAMETER:\n return `${holding} — every request names that region`;\n case ProviderProcessingRegionReachKind.ACCOUNT_RESIDENCY:\n return `${holding} — the operator's statement about its account at the vendor; no call selects it`;\n }\n };\n return [\n ...(regioned.length > 0\n ? [\n '',\n ` PROCESSING REGIONS (${regioned.length}) — how each chosen region holds:`,\n ...regioned.map((entry) => ` - \\`${entry.providerRef}\\` \\`${entry.choice.processingRegion}\\` — ${regionHolds(entry.regionReach)}`),\n ]\n : []),\n ...(modelNotOffered.length > 0\n ? [\n '',\n ` DEPLOYMENT MODEL NOT OFFERED (${modelNotOffered.length}) — the operator chose a model the provider does not declare:`,\n ...modelNotOffered.map((entry) => ` - \\`${entry.providerRef}\\` — configured \\`${entry.choice.deploymentModel}\\`; the provider offers `\n + (entry.offered?.deploymentModels.map((model) => `\\`${model}\\``).join(', ') ?? 'nothing'))\n ]\n : []),\n ...(population.operatorSubProcessorsWithUndeterminedProfile.length > 0\n ? [\n '',\n ` PROFILE UNDETERMINED (${population.operatorSubProcessorsWithUndeterminedProfile.length}): `\n + `${population.operatorSubProcessorsWithUndeterminedProfile.map((ref) => `\\`${ref}\\``).join(', ')}.`,\n ' In use, and nobody has researched who runs these vendors or where they process. Their region and',\n ' legal identity are outstanding — state that plainly; the operator establishes them on its register.',\n ]\n : []),\n ...(population.operatorSubProcessorsWithoutProfile.length > 0\n ? [\n '',\n ` NO PROFILE DECLARED (${population.operatorSubProcessorsWithoutProfile.length}): `\n + `${population.operatorSubProcessorsWithoutProfile.map((ref) => `\\`${ref}\\``).join(', ')}.`,\n ' The provider module states nothing about who runs it. Treat it exactly like UNDETERMINED above.',\n ]\n : []),\n ];\n}\n\n/**\n * Which compliance facts the operator relies on have outlived the interval its register declares (#1708).\n *\n * The register's own date is always stated, because \"checked on X\" is what a drafter needs whether or not it is\n * current. Vendor facts are named only when STALE or UNDATED — a line per current fact would train a drafter to skim —\n * and UNDATED ones are named, because a fact with no date must not read as a current one.\n */\nfunction renderComplianceFactStaleness(\n population: RecipientPopulation,\n register: ApplicationProcessorRegister | undefined,\n profilesByProviderRef: Readonly<Record<string, ProviderComplianceProfile>>,\n asOf: string,\n): readonly string[] {\n if (register === undefined) return [];\n const report = complianceFactStaleness({ register, profilesByProviderRef, providerRefs: population.operatorSubProcessorRefs, asOf });\n const staleProfiles = report.providerProfiles.filter((entry) => entry.currency === ComplianceFactCurrency.STALE);\n return [\n '',\n 'How current the vendor facts are:',\n report.register.currency === ComplianceFactCurrency.UNDATED\n ? ' The processor register carries no verification date, so nobody can say how old its vendor facts are.'\n : ` The processor register was last verified on ${report.register.verifiedAt} (${report.register.ageDays} day(s) ago)`\n + (report.reverificationIntervalDays === null\n ? '; it declares no re-verification interval, so nothing is called stale.'\n : `; the application re-verifies every ${report.reverificationIntervalDays} day(s), so it is ${report.register.currency}.`),\n ...(staleProfiles.length > 0\n ? [` STALE vendor facts (${staleProfiles.length}): ${staleProfiles.map((entry) => `\\`${entry.providerRef}\\` (read ${entry.verifiedAt})`).join(', ')} — re-check each against the vendor's own page before relying on it.`]\n : []),\n ...(report.undatedProviderRefs.length > 0\n ? [` UNDATED vendor facts (${report.undatedProviderRefs.length}): ${report.undatedProviderRefs.map((ref) => `\\`${ref}\\``).join(', ')} — the provider states them without saying when or where they were read, so their age is unknown.`]\n : []),\n ];\n}\n\n/**\n * Which processors a recorded data processing agreement governs, and which it does not (#1709).\n *\n * Only the operator knows whether it is bound by a DPA, so the brief states what the register records and names what\n * it does not. An entry recorded as NOT_IN_PLACE is named apart from an unrecorded one: the first is a stated gap,\n * the second an open question, and a notice must not present either as a governed processor. Nothing when there is\n * no register — its absence is already stated with the population join.\n */\nfunction renderProcessorAgreementStanding(register: ApplicationProcessorRegister | undefined): readonly string[] {\n if (register === undefined) return [];\n const standing = processorAgreementStanding(register);\n const recorded = standing.entries.filter((entry) => entry.dataProcessingAgreement !== null);\n return [\n '',\n 'Data processing agreements and vendor retention (the operator\\'s own record):',\n recorded.length > 0\n ? ` Recorded: ${recorded.map((entry) => `\\`${entry.ref}\\` ${entry.dataProcessingAgreement}${entry.vendorRetention === null ? '' : ` — retention: ${entry.vendorRetention}`}`).join('; ')}.`\n : ' No processor on the register records a DPA.',\n ...(standing.agreementNotInPlaceRefs.length > 0\n ? [` NO DPA IN PLACE (${standing.agreementNotInPlaceRefs.length}): ${standing.agreementNotInPlaceRefs.map((ref) => `\\`${ref}\\``).join(', ')} — the operator states none governs this processing; do not describe it as governed.`]\n : []),\n ...(standing.agreementUnrecordedRefs.length > 0\n ? [` DPA NOT RECORDED (${standing.agreementUnrecordedRefs.length}): ${standing.agreementUnrecordedRefs.map((ref) => `\\`${ref}\\``).join(', ')} — nobody has recorded whether a DPA governs it.`]\n : []),\n ...(standing.vendorRetentionUnrecordedRefs.length > 0\n ? [` Vendor retention not recorded: ${standing.vendorRetentionUnrecordedRefs.map((ref) => `\\`${ref}\\``).join(', ')}.`]\n : []),\n ];\n}\n\n/**\n * WHERE a coding run sends the application's SOURCE CODE, per model (issue #308, joins 2 and 3).\n *\n * The half of the recipient question no per-provider declaration can answer. A generalist coding agent\n * routes to several vendors, so the agent's publisher is not the recipient — OpenCode is a binary on\n * the operator's own host, and the same execution profile sends code to Anthropic or to OpenAI\n * depending on one model id. `providerComplianceChoices` has one entry per provider and structurally\n * cannot say that, which is why the declaration lives on the execution profile and is read back here\n * through `readCodingModelDestinations` rather than by parsing the opaque configuration bag.\n *\n * The GATEWAY is rendered as its own line, distinct from the vendor behind it, because it is its own\n * processor: a hosted proxy receives the code first. Naming only the vendor understates the chain by\n * one party, and naming only the gateway understates it by the other — and a processor register that\n * gets this wrong is wrong about who holds the customer's source.\n *\n * A profile that declares NO destination is named rather than skipped, and never assumed to be the\n * agent's own publisher. Reported, not refused: the framework does not know which vendor account an\n * operator authorised, and a stale framework list must not brick a build.\n *\n * Renders nothing at all when the application configures no coding agent — most do not, and a section\n * of caveats about a lane nobody runs is how a brief teaches a drafter to skim.\n */\nfunction renderCodingModelDestinations(\n providerConfigurations: Readonly<Record<string, unknown>> | undefined,\n): readonly string[] {\n if (providerConfigurations === undefined) return [];\n\n const { destinations, profilesWithoutDestinations } = readCodingModelDestinations(providerConfigurations);\n if (destinations.length === 0 && profilesWithoutDestinations.length === 0) return [];\n\n return [\n '',\n 'Where a CODING RUN sends this application\\'s source code:',\n 'An autonomous coding session sends the task prompt, retrieved context and — through the agent\\'s own',\n 'file reads — the application\\'s SOURCE CODE to the selected model vendor. That content can include the',\n 'domain model, schemas, seed-data shapes and business rules, so each destination below is a recipient a',\n 'notice must name.',\n ...(destinations.length > 0\n ? destinations.flatMap((entry) => [\n ` - \\`${entry.providerRef}\\` / \\`${entry.executionProfileRef}\\` / model \\`${entry.model}\\` → `\n + `${entry.destination.vendorLegalEntityName}; processes in ${entry.destination.processingRegions.join(', ')}`,\n ...(entry.destination.gateway === undefined\n ? []\n : [\n ` - reached THROUGH ${entry.destination.gateway.legalEntityName} `\n + `(${entry.destination.gateway.processingRegions.join(', ')}) — a gateway that receives the code `\n + 'BEFORE the vendor does, so it is its own sub-processor and must be named separately.',\n ]),\n ])\n : []),\n ...(profilesWithoutDestinations.length > 0\n ? [\n ` UNDECLARED DESTINATION (${profilesWithoutDestinations.length}): `\n + profilesWithoutDestinations.map((entry) => `\\`${entry.providerRef}\\`/\\`${entry.executionProfileRef}\\``).join(', ')\n + '.',\n ' A coding run through these sends source code somewhere the register cannot describe. Do NOT name',\n ' the agent\\'s own publisher as the recipient — a generalist agent runs on the operator\\'s host and',\n ' receives nothing itself. Declare `modelDestinations` on the execution profile.',\n ]\n : []),\n ];\n}\n\n/**\n * What a person must agree to in order to USE the service (issue #139).\n *\n * Three states and they are three different sentences, which is the whole reason this renders\n * separately from the identity that contains it:\n *\n * - ABSENT — nobody has been asked. Names the surface, and says plainly that this is NOT \"no consent\n * is required\", because rendering silence as an answer is the conflation the schema stays optional\n * to prevent.\n * - an EMPTY required set — a POSITIVE answer: the operator declared that nothing is gated on consent.\n * Usually the correct one, and the brief says why, because a drafter that reads it as \"no\n * information\" would throw away a declaration the operator deliberately made.\n * - required purposes — a gate, rendered with each purpose and what it gates, since the schema refuses\n * one without. Purposes are listed as a SET (#453): requiring marketing says nothing about analytics.\n * Since #453 this gate is also ENFORCED at runtime, so the brief says so: a notice may state it as a\n * fact about the running product, not merely a declaration.\n *\n * The last line is the one that matters most and is easiest to omit: a consent GATE is not a lawful\n * BASIS. For most B2B SaaS the basis for core processing is CONTRACT, and a notice that reads a gate\n * as a basis states that a person's data is processed on consent they could withdraw — which would\n * be wrong about the single most consequential thing in the document.\n */\nfunction renderServiceConsentRequirement(requirement: ServiceConsentRequirement | undefined): readonly string[] {\n if (requirement === undefined) {\n return [\n '',\n 'Service-wide consent requirement: NOT DECLARED. What a person must agree to in order to use the',\n 'service at all is not established. This is NOT the same as \"no consent is required\" — nobody has',\n 'answered. It is declared in `wildo.saas.config.ts` under',\n '`operatorComplianceIdentity.serviceConsentRequirement`.',\n ];\n }\n\n return [\n '',\n ...(requirement.requiredPurposes.length === 0\n ? [\n 'Service-wide consent requirement: NONE — the operator DECLARED that using the service is not',\n 'gated on consent. This is a positive answer, not an absence: state it as settled.',\n ]\n : [\n `Service-wide consent requirement: consent to ${requirement.requiredPurposes.join(' and ')}, gating: ${requirement.gatedProcessing}`,\n 'This gate is ENFORCED: a signed-in person cannot use the application until they grant every purpose',\n 'listed. Each purpose is granted independently — requiring one implies nothing about another.',\n ]),\n 'A consent GATE is not a lawful BASIS. What a person must agree to in order to proceed, and the',\n 'Art. 6(1) basis the processing rests on, are different questions — the basis is declared per',\n 'purpose in `lawfulBases`. Do not state that processing relies on consent because a gate exists.',\n ];\n}\n\nfunction renderOperatorComplianceIdentity(identity: ApplicationOperatorComplianceIdentity | undefined): readonly string[] {\n if (identity === undefined) {\n return [\n '',\n 'Operator compliance identity: NOT DECLARED. The legal entity, its registered address, the privacy',\n 'contact route, the operator\\'s role per population of data, the lawful basis per purpose, and where the',\n 'operator hosts the data are all absent from the application configuration. State them as outstanding',\n 'and name the surface: they are declared in `wildo.saas.config.ts` under `operatorComplianceIdentity`.',\n 'Do NOT invent an entity name, an address or a contact — those are what a subject uses to exercise a',\n 'right against a real company.',\n ];\n }\n\n /*\n * Every part is now independently declarable (#228), so this renders PART BY PART rather than\n * assuming a complete identity. An outstanding part is named, with the configuration key that closes\n * it — a drafter that cannot see what is missing has no way to mark the gap, and marking it is the\n * behaviour the whole lane depends on.\n */\n const outstanding = outstandingOperatorComplianceIdentityParts(identity);\n\n return [\n '',\n identity.legalEntityName === undefined\n ? 'Operator legal entity: OUTSTANDING — not declared in `operatorComplianceIdentity.legalEntityName`. Do NOT invent one.'\n : `Operator: ${identity.legalEntityName}.`,\n identity.registeredAddress === undefined\n ? 'Registered address: OUTSTANDING — `operatorComplianceIdentity.registeredAddress`. Do NOT invent one; it is what a subject uses to serve a request on a real company.'\n : `Registered at ${identity.registeredAddress}.`,\n identity.privacyContact === undefined\n ? 'Privacy contact route: OUTSTANDING — `operatorComplianceIdentity.privacyContact`. Do NOT invent one; a route that does not exist is worse than a stated gap.'\n : `Privacy contact: ${identity.privacyContact}.`,\n ...(identity.representative === undefined\n /*\n * The \"absent means not required\" reading holds only on a COMPLETE identity. On a partial one it\n * cannot be told apart from a part nobody reached yet, and asserting the stronger sentence there\n * would put an unsupported claim about Art. 27 into the drafter's context.\n */\n ? outstanding.length === 0\n ? ['No Art. 27 representative is declared, which means one is not required — not that the question was skipped.']\n : ['No Art. 27 representative is declared. On a partially declared identity that cannot be read as \"not required\" — it is simply unanswered.']\n : [`Art. 27 representative: ${identity.representative.name}, ${identity.representative.address}.`]),\n '',\n ...(identity.roleAllocations === undefined\n ? [\n 'Role per population of data: OUTSTANDING — `operatorComplianceIdentity.roleAllocations`. Do NOT assign the',\n 'operator a single role by default: controller and processor carry different obligations, and a product is',\n 'commonly both at once over different populations.',\n ]\n : [\n 'Role, per population of data — there may be SEVERAL, and a notice must not collapse them into one:',\n ...identity.roleAllocations.map((allocation) => ` - ${allocation.role} for ${allocation.dataScope}`),\n ]),\n '',\n ...(identity.lawfulBases === undefined\n ? [\n 'Lawful basis per purpose: OUTSTANDING — `operatorComplianceIdentity.lawfulBases`. This is a legal',\n 'determination, not a drafting choice. State it as unestablished; do NOT select a basis because one',\n 'sounds plausible, and in particular do not write CONSENT, which would tell a person their data is',\n 'processed on an agreement they could withdraw.',\n ]\n : [\n 'Lawful basis, per purpose:',\n ...identity.lawfulBases.map((entry) =>\n ` - ${entry.basis} for ${entry.purpose}`\n + (entry.assessmentNote === undefined ? '' : ` — assessment: ${entry.assessmentNote}`)),\n ]),\n '',\n identity.subjectRequestIdentityVerification === undefined\n ? 'Identity verification for rights requests: OUTSTANDING — `operatorComplianceIdentity.subjectRequestIdentityVerification`. '\n + 'Do NOT describe a verification step nobody has decided; a stated procedure is one a requester will rely on.'\n : `Identity verification for rights requests: ${identity.subjectRequestIdentityVerification}`,\n identity.hostingRegions === undefined\n ? 'Where the operator hosts the data: OUTSTANDING — `operatorComplianceIdentity.hostingRegions`. Do NOT name a region or a '\n + 'country nobody declared; an international-transfer statement starts from it.'\n : `The operator hosts the data in: ${identity.hostingRegions.join(', ')}.`,\n ...(outstanding.length === 0\n ? []\n : [\n '',\n `${outstanding.length} of ${Object.values(OperatorComplianceIdentityPart).length} identity part(s) outstanding: ${outstanding.join(', ')}. The identity is PARTIALLY`,\n 'declared — state each outstanding part as an open gap in the document rather than omitting it. A document',\n 'that silently leaves them out reads as though the operator answered.',\n ]),\n ];\n}\n\nfunction renderClientStorage(\n frontendSurfaceKeys: readonly string[],\n inventory: ApplicationClientStorageInventory | undefined,\n): readonly string[] {\n const renderEntry = (entry: ClientStorageEntry): string =>\n ` - \\`${entry.name}\\` (${entry.mechanism}) — ${entry.purpose} ${entry.necessity}; persists: ${entry.lifetime}`\n + (entry.setWhen === null ? '' : ` Set when: ${entry.setWhen}`);\n const uninventoried = uninventoriedClientStorageSurfaces(frontendSurfaceKeys, inventory);\n return [\n \"## What the application stores in a visitor's browser\",\n 'Cookies and client-side storage, split by who sets them. STRICTLY_NECESSARY entries carry a service',\n 'the visitor asked for; CONSENT_GATED entries may only be set after consent. A surface listed',\n 'UNINVENTORIED has not been catalogued — that is NOT \"it sets nothing\", and stating the second from',\n 'the first tells a visitor they are tracked by less than they are.',\n '',\n 'Set by the FRAMEWORK, in every application (nobody authored these; they are inherited):',\n ...ENGINE_CLIENT_STORAGE_ENTRIES.map(renderEntry),\n '',\n ...frontendSurfaceKeys.flatMap((surfaceKey) => {\n const entries = inventory?.[surfaceKey];\n if (entries === undefined) return [`- surface \\`${surfaceKey}\\` — UNINVENTORIED.`];\n if (entries.length === 0) return [`- surface \\`${surfaceKey}\\` — sets nothing of its own beyond the framework entries above.`];\n return [`- surface \\`${surfaceKey}\\`:`, ...entries.map(renderEntry)];\n }),\n ...(uninventoried.length > 0\n ? ['', `UNINVENTORIED (${uninventoried.length}): ${uninventoried.map((key) => `\\`${key}\\``).join(', ')} — an operator catalogues these.`]\n : []),\n ];\n}\n\n/** What {@link PlaybookRunCompanionService.submitBuildWaveDetached} answers when it started a wave. */\nexport interface BuildWaveSubmission {\n /** How many coding runs the wave may hold at once: the application's build parallelism. */\n readonly degree: number;\n /** The wave's playbook run; the feed reports how it settles and `lastCompleted` carries its result. */\n readonly runId: string;\n readonly playbookRef: string;\n /**\n * The task that was ready when the wave was submitted. The wave selects again as it fills, so this\n * says the wave had work to start, not which task it started first.\n */\n readonly nextReadyTask: { readonly taskRef: string; readonly objective: string };\n}\n\n/**\n * What a caller asks {@link PlaybookRunCompanionService.runPlaybook} for.\n *\n * Named rather than inline since 2026-09-19 because the method was split in two: a thin public\n * wrapper that owns the run's identity and its actor-plane rows, and the private\n * `executePlaybookRun` that does the work. Both need this type, and a 90-line inline object\n * repeated twice is a type that drifts.\n */\ntype PlaybookRunInput = {\n readonly playbookRef: string;\n /**\n * The signed-in person who started this run (#1751), when a person did: the workbench and the\n * creation conversation know one, the local console does not. A question the run then asks is ROUTED\n * to them (OWNER): only they settle it, and the engine checks and records who did. Absent, the\n * question stays unrouted and the door that answers it is its authority, as before. Carried in the\n * checkpoint, so a resumed run that asks again routes its next question to the same person.\n */\n readonly requestedByUserId?: string;\n /**\n * The playbook INSTANCE this run is (#1609); absent for the default instance. It must have been opened\n * (the dossier's activation record). It keys everything this run owns beyond its own run id: its\n * answers, its checkpoint, its research evidence, its row, and the instance its children inherit.\n */\n readonly instanceKey?: string;\n /**\n * Answers to a PREVIOUS suspension of this run, replayed into the brief. Set only by the resume\n * path; a first run never carries them.\n */\n readonly clarification?: {\n readonly requests: readonly PlaybookClarificationRequest[];\n readonly answers: readonly PlaybookClarificationAnswer[];\n readonly action: MetaWorkflow_ClarificationAction;\n readonly round: number;\n };\n /** Creator-supplied context for this run, appended to the playbook's own method guidance. */\n readonly creatorBrief?: string;\n /**\n * Why the JOURNEY LOOP chose this playbook, this iteration (#1423).\n *\n * Set by the loop, which composes a rationale per lane against what has already landed —\n * \"the market snapshot names three segments and no persona exists for any of them\" — and used to\n * drop it at the port, and by the choreography driver, whose selector writes each child's objective.\n * A run that was chosen for a reason can now state it.\n *\n * Kept apart from `creatorBrief` deliberately: one is what a HUMAN said this application is, the\n * other is what the SELECTOR said this round is for. Merging them would let a machine's reasoning\n * be read back as the creator's, and the brief renders them as two sections for the same reason.\n */\n readonly selectionRationale?: string;\n /** Answers to the questions this playbook DECLARES. Required in full when it declares any. */\n readonly elicitationAnswers?: readonly PlaybookElicitationAnswer[];\n /** Set by the choreography driver on a CHILD run: the parent composite's rendered elicitation. */\n readonly parentElicitationSection?: string;\n /**\n * Set by the choreography driver on a CHILD run: the ref of the composite already running in this\n * process. A child that is ITSELF a composite is admitted past the single-flight refusal on the\n * strength of this — see `runChoreography`.\n *\n * DRIVER-ONLY, like `parentElicitationSection` and `stepResults` beside it. Both HTTP entry points\n * (`POST /playbooks/:playbookRef/run` and the creation-plane dispatch) build this input from named\n * fields rather than spreading a request body, so it is unreachable from outside.\n */\n readonly nestedWithinChoreographyRef?: string;\n /**\n * Set by the choreography driver on a CHILD run: the id of the ROOT run whose tree this child belongs to\n * (#1610). Recorded on the child's row, so a root reading which runs overlapped it can leave out its own\n * children, which overlap it by construction. DRIVER-ONLY, like `nestedWithinChoreographyRef`.\n */\n readonly rootRunId?: string;\n /**\n * Set by the choreography driver on a CHILD of an instance composite: what the root INSTANCE was opened\n * for, as its activation records it (#1608). A child has no activation of its own, so this is how \"develop\n * the invoicing feature\" reaches the leaf that drafts it. DRIVER-ONLY, like `rootRunId`.\n */\n readonly instancePurpose?: string;\n /** The request's trace session, so this run's evidence lands beside the LLM call it explains. */\n readonly session?: CompanionExecutionSessionContext;\n /**\n * The creation CONVERSATION this run was started from, when it was (#1454, Step 4) — stamped\n * into the correlation envelope as `refs.conversationId`, so the conversation page lists the run\n * as a card of that thread. Absent for a run started from the board or the CLI.\n */\n readonly conversationId?: string;\n /** Full pipe — generation, validation, rendering, judge — with NO filesystem writes. For testing playbooks. */\n readonly dryRun?: boolean;\n /**\n * Step results of the CHOREOGRAPHY this run is a child of. Absent for a standalone run, which is\n * the honest value: a playbook run on its own has no siblings, so a `STEP_AVAILABLE` precondition\n * on it is unsatisfied rather than vacuously true.\n */\n readonly stepResults?: ReadonlyMap<string, unknown>;\n };\n\n/**\n * Every way a run can END, and there are six — a foundation result, an expert-personas staffing result, a\n * suspension, a choreography, an assessment, and a throw. That count is why the actor-plane settle lives in ONE\n * wrapper: a status threaded through each return by hand is a status that is wrong on at least one\n * of them, which is the \"control-plane row that looks like it tracks the run\" defect #1343 exists\n * to remove rather than to reproduce.\n */\ntype PlaybookRunOutcome =\n | FoundationExecutionResult\n | CapabilityCompositionExecutionResult\n | ApplicationMaturityExecutionResult\n | ExpertPersonasExecutionResult\n /**\n * The run SUSPENDED at an ambiguity and is waiting for the creator (LangGraph's interrupt, MCP's\n * elicitation). Not an error and not a failure: nothing was generated, nothing was written, and\n * the run continues through the resume route.\n */\n | {\n status: Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT;\n runId: string;\n playbookRef: string;\n family: string;\n round: number;\n requests: readonly PlaybookClarificationRequest[];\n }\n /**\n * A CHOREOGRAPHY run: the playbook declares children rather than outputs, so its deliverable is\n * what those children landed. No acceptance, exactly as an ordinary run reports none.\n */\n | {\n playbookRef: string;\n choreographed: true;\n stoppedBecause: PlaybookChoreographyStopReason;\n iterations: PlaybookChoreographyResult['iterations'];\n stepRefs: readonly string[];\n landed: readonly string[];\n /** What the ROOT composite leaves for a person to decide, from its own `approval` / `onFailure` (#111). */\n boundary: PlaybookChoreographyResult['boundary'];\n /**\n * One decision per boundary that OWED one — the root's and every nested lane's, outermost\n * first (#111 × #1497). A lane is where the question actually arises: inside one root run a\n * lane lands the domain plan and the next builds on it, so a single root decision would be\n * silence about every lane in between.\n */\n boundaryDecisions: readonly HumanDecision_Request[];\n /** The composite's wall-clock and every iteration's spend together (#1507). Per iteration and per child: on `iterations`. */\n durationMs: number;\n spend: PlaybookChoreographyResult['spend'];\n /** Rounds inherited from a checkpoint, across the resumed tree — see `PlaybookChoreographyResult.inheritedRounds`. */\n inheritedRounds: number;\n accepted: false;\n }\n /**\n * An ASSESSMENT run: the playbook declares no outputs, so its deliverable is the verdict over\n * the families it reads. Nothing generated, landed or wired.\n */\n | {\n playbookRef: string;\n assessed: true;\n subjects: readonly string[];\n reviewGuide: string;\n judge?: PlaybookJudgeResult;\n accepted: false;\n }\n /**\n * A VERIFICATION run: the playbook declares `executor: DETERMINISTIC_CLI`, so its deliverable is\n * the outcome of named checks run against the already-built application (issue #147).\n *\n * `passed` is the whole-run answer and is `null` under `dryRun`, where the checks were resolved\n * and deliberately not executed — a boolean there would have to be invented, and inventing it is\n * how a dry run comes to be read as a pass.\n *\n * `infrastructureError` is separate from a failing check on purpose: \"the application does not\n * typecheck\" and \"the typecheck could not be run\" send an operator to different places.\n */\n | {\n playbookRef: string;\n verified: true;\n dryRun?: true;\n checkRefs: readonly string[];\n /**\n * `output` is the tail of what a FAILED check printed. Without it a failure read only\n * \"Bounded subprocess failed\", the subprocess wrapper's message, while the cause\n * (a `TS2741`, an `ERR_MODULE_NOT_FOUND`) sat in the outcome's tails and was dropped here\n * (measured 2026-09-25, scratch-journey). Absent on a passing check.\n */\n checks: readonly { checkRef: string; success: boolean; message: string; output?: string }[];\n passed: boolean | null;\n infrastructureError?: string;\n accepted: false;\n }\n /**\n * A DISPATCH run: the playbook declares `executor: CODING_AGENT`, so its deliverable is a build\n * task actually run in the workspace rather than a file or a verdict.\n *\n * `taskRef` names exactly ONE task, and `remainingReadyTaskRefs` says what was left behind, on\n * purpose. This is the SINGLE-FLIGHT shape — the build parallelism is 1 — and reporting the one\n * task dispatched, beside the ones that were ready and were not, is what stops a run reading as a\n * wave it never performed. With a parallelism above one the tier runs a wave instead (#1528) and\n * answers with the WAVE member below; a bare \"dispatched\" would silently under-deliver either way.\n */\n | {\n playbookRef: string;\n dispatched: true;\n taskRef: string;\n targetKind: string;\n /** Ready when this run started, minus the one it took. Non-empty means MORE remain, not that a wave ran. */\n remainingReadyTaskRefs: readonly string[];\n landedTaskRefs: readonly string[];\n /**\n * The durable id of the coding run this dispatch admitted — absent for a generation step, whose\n * work was done before the dispatch resolved, and for a dry run, which dispatches nothing.\n */\n codingTaskId?: string;\n /**\n * What the coding run DID, read after its settlement. `dispatched` says an agent was STARTED;\n * this is the only field that says whether it finished, failed, or parked on a question.\n */\n codingRun?: ApplicationCodingTaskSettledOutcome;\n /** The run settled and its durable row could not be classified: unknown, which is not a failure. */\n codingRunOutcomeUnreadable?: true;\n /** The ADVISORY verdict over the settled run's evidence. Absent on a dry run and on a skip. */\n judge?: PlaybookJudgeResult;\n /** What this playbook says a good result is, paired with the judge's verdicts when it ran. */\n reviewGuide?: string;\n /** Present only on a dry run, which DESCRIBES the next task and dispatches nothing. */\n dryRun?: true;\n accepted: false;\n }\n /**\n * A WAVE run (#1528): the build parallelism is above one, so this tier ran a rolling pool of coding\n * runs in the shared worktree and returned once it drained. Every task it dispatched is named; each\n * run's outcome, and the end-of-wave reconciliation, are on `wave`.\n */\n | {\n playbookRef: string;\n dispatched: true;\n wave: ApplicationBuildWaveResult;\n taskRefs: readonly string[];\n accepted: false;\n }\n | (Omit<RunPlaybookGenerationResult, 'landed' | 'wired' | 'diagrams' | 'decisions'> & {\n /** Slim landing records: the pre-images and rendered bytes stay in the WRITE REGISTER, not in responses. */\n landed: ReadonlyArray<Pick<PlaybookOutputLandingRecord, 'family' | 'packageRelativePath' | 'exportedConstantName' | 'byteLength'>>;\n /** Slim wiring records — same custody split as `landed`. */\n wired: ReadonlyArray<Pick<PlaybookExportWiringRecord, 'packageRelativePath' | 'summary'>>;\n /** Slim diagram records — same custody split as `landed`. */\n diagrams: ReadonlyArray<{ family: string; packageRelativePath: string }>;\n /** What this playbook says a good result is, paired with the judge's verdicts when it ran. */\n reviewGuide: string;\n /** Slim decision records — same custody split as `landed`. Empty on a run that asked nothing. */\n decisions: ReadonlyArray<{ family: string; packageRelativePath: string }>;\n judge?: PlaybookJudgeResult;\n runId?: string;\n dryRun?: boolean;\n });\n\n/**\n * How the engine reads what a playbook run RETURNED — exported so the lane's tests wire the\n * production reading rather than a copy of it.\n *\n * - a SUSPENSION: a run that stopped to ask registered its request against the result object it is\n * about to return, and nothing else is one;\n * - a composite that ended by ENVIRONMENT returned, and is still one somebody should re-run: the\n * engine settles it COMPLETED and KEEPS its progress checkpoint instead of consuming it.\n */\n/**\n * Whether this run may start as the instance it names, and what that instance is for (#1609, #1608). Pure.\n *\n * - A ROOT run of an instance needs its activation, and reads its purpose from it. A child inherits its root's\n * key and has no activation of its own, so it is not asked, and its purpose arrives from its root: until\n * #1608 every child of an instance composite was refused here.\n * - A secondary line's entry composite IS the line, so it never runs as the default instance.\n */\nexport function resolveInstanceRunPurpose(input: {\n readonly playbookRef: string;\n readonly instanceKey?: string;\n readonly nestedWithinChoreographyRef?: string;\n readonly instancePurpose?: string;\n readonly creatorInputs: ApplicationCreatorInputs | undefined;\n}): string | undefined {\n if (input.nestedWithinChoreographyRef !== undefined) return input.instancePurpose;\n if (input.instanceKey === undefined) {\n const line = secondaryLineDefinitionOfEntry(input.playbookRef);\n if (line !== undefined) {\n throw new PlaybookNotReadyError(\n `\"${input.playbookRef}\" runs as a secondary line: open one with the purpose it serves (a key such as \"invoicing\" and what `\n + `it is for), then run that instance. The conversation tool ${line.namesRefinedFamilies ? 'creation_open_refinement_line' : 'creation_open_secondary_line'} opens one.`,\n );\n }\n return input.instancePurpose;\n }\n const instanceId = playbookInstanceId(input.playbookRef, input.instanceKey);\n const activation = input.creatorInputs?.activations?.[instanceId];\n if (activation?.closure !== undefined) {\n throw new PlaybookNotReadyError(\n `\"${instanceId}\" was ${activation.closure.kind}, so it runs no more. Open a new instance under another key to resume the work.`,\n );\n }\n if (activation === undefined) {\n throw new PlaybookNotReadyError(\n `\"${instanceId}\" is not an opened instance of \"${input.playbookRef}\". Open it first, with the purpose it serves `\n + '(the conversation tool creation_open_playbook_instance, or POST /api/companion/playbooks/:playbookRef/instances).',\n );\n }\n // A refinement line's targets travel with its purpose, so every child's brief says what is being refined (#1608).\n return activation.refinedFamilies ? `${activation.purpose} (it refines: ${activation.refinedFamilies.join(', ')})` : activation.purpose;\n}\n\n/**\n * What an INSTANCE was opened for, as a section of the creator's facts (#1608). Written in the creator's own\n * words from the activation; the run never paraphrases it.\n */\nexport function composeInstancePurposeSection(instanceId: string, purpose: string): string {\n return [`# What this run is for`, '', `This run is \"${instanceId}\", opened for: ${purpose}`, 'Work on that, and leave what it does not concern as it is.'].join('\\n');\n}\n\n/** The dispatching composite's section with the root instance's purpose after it, when there is one (#1608). */\nfunction withInstancePurposeSection(section: string | undefined, instanceKey: string | undefined, purpose: string | undefined): string | undefined {\n if (purpose === undefined) return section;\n const purposeSection = composeInstancePurposeSection(instanceKey ?? 'the application', purpose);\n return section ? `${section}\\n\\n${purposeSection}` : purposeSection;\n}\n\n/**\n * The SELECTOR's goal for a composite run (#1608): its intent, then what the instance is for and the creator's\n * brief when there are any. Until #1608 the goal was the intent alone, so a brief given to a composite was\n * dropped without trace and a feature line's selector did not know which feature it was developing.\n */\nexport function composeCompositeGoal(input: { readonly intent: string; readonly instancePurpose?: string; readonly creatorBrief?: string }): string {\n return [\n input.intent,\n ...(input.instancePurpose !== undefined ? ['', `This run is an instance opened for: ${input.instancePurpose}`] : []),\n ...(input.creatorBrief ? ['', `The creator's brief for this run: ${input.creatorBrief}`] : []),\n ].join('\\n');\n}\n\nexport function createPlaybookRunOptions<T>(\n suspensionRequests: WeakMap<object, ActorExecutionSuspensionRequest>,\n /**\n * What each returned result COST (#1507), registered against the result object by the executor that\n * measured it — keyed like the suspension requests and for the same reason: the result is the\n * identity both readings share, and copying it to add a field would lose the suspension.\n */\n runMeasurements?: WeakMap<object, PlaybookRunMeasurement>,\n /** The root runs each settled value's run overlapped (#1610), registered against it like its measurement. */\n runOverlaps?: WeakMap<object, readonly PlaybookRunOverlap[]>,\n): ActorExecutionRunOptions<T> {\n const measurementOf = (result: T): PlaybookRunMeasurement | undefined =>\n (typeof result === 'object' && result !== null ? runMeasurements?.get(result) : undefined);\n const overlapsOf = (settled: unknown): readonly PlaybookRunOverlap[] | undefined =>\n (typeof settled === 'object' && settled !== null ? runOverlaps?.get(settled) : undefined);\n return {\n suspendOn: (result) => {\n const request = typeof result === 'object' && result !== null ? suspensionRequests.get(result) ?? null : null;\n // The waiting task says what it is waiting FOR (#1362), so a reader that was not there — the\n // board after a restart — can tell a run that stopped to ask from one that finished.\n return request ? { ...request, taskOutput: summarizePlaybookRunResult(result, measurementOf(result), overlapsOf(result)) } : null;\n },\n // What the run DID, on its own row (#1362): accepted or not, and the judge's verdict. Until this\n // existed the row said only that the run ended, and the rest died with the process. And what it\n // took — its wall-clock and its spend (#1507).\n concludeAs: (result) => ({ status: FlowsActors_Status.COMPLETED, taskOutput: summarizePlaybookRunResult(result, measurementOf(result), overlapsOf(result)) }),\n retainCheckpointOn: (result) => typeof result === 'object' && result !== null\n && (result as { resumableFromCheckpoint?: unknown }).resumableFromCheckpoint === true,\n // A run that spent and then THREW keeps its duration and spend beside the engine's failure (#1507).\n recordBesideFailure: (error) => {\n const measurement = typeof error === 'object' && error !== null ? runMeasurements?.get(error) : undefined;\n const overlappedRuns = overlapsOf(error);\n const beside = { ...(measurement ? { measurement } : {}), ...(overlappedRuns && overlappedRuns.length > 0 ? { overlappedRuns } : {}) };\n return Object.keys(beside).length > 0 ? beside : null;\n },\n };\n}\n\n/**\n * One line for the selector: which children a verdict re-opened, and on what (#1499, #1627).\n * `top_down.phase-gate in top_down.definition: compliance-presence was GAP` names the lane the verdict\n * came through, because a sibling lane re-opened across lanes is otherwise told nothing about why.\n *\n * The judge's RATIONALE follows, because the criterion name alone does not say what to correct. The\n * selector writes the re-opened child's objective from this line, and that objective is all a nested\n * lane and its leaf receive — so without the rationale the conception lane was sent back to fix a\n * \"conception-buildable GAP\" with nothing naming the undeclared resource at fault (#1264).\n */\nexport function describeReopenedChildren(reopened: readonly PlaybookChoreographyReopenedChild[]): string {\n return reopened.map((entry) => {\n const source = entry.via === undefined ? entry.verdictOf : `${entry.verdictOf} in ${entry.via}`;\n const criterion = entry.criterionRef === undefined ? 'the overall verdict' : entry.criterionRef.replace(/^.*criterion\\//, '');\n const why = entry.rationale === undefined ? '' : ` — the judge: \"${entry.rationale}\"`;\n return `${entry.playbookRef} (${source}: ${criterion} was ${entry.verdict}${why})`;\n }).join('; ');\n}\n\n/** What an application's line no longer uses but its workspace still holds (#1604 review, finding 5). */\nexport interface ApplicationLineOrphans {\n /** Not-applicable families a file still exists for. Hidden from every reader; kept on disk. */\n readonly landedFamilies: readonly string[];\n /**\n * Keys of materialized public-website services while the website plan does not apply to the line, or\n * a decision has set it aside (#1606). Never removed here.\n */\n readonly websiteServiceKeys: readonly string[];\n /** Families a decision set aside (#1606): kept on disk, hidden from every reader, back if the decision flips. */\n readonly deactivatedFamilies: readonly PlaybookDeactivatedFamily[];\n}\n\n@injectable()\nexport class PlaybookRunCompanionService {\n private readonly logDebug: (message: string, context?: Record<string, unknown>) => void;\n\n public constructor(\n @inject(SAAS_SERVICE_TYPES.Logger) private readonly logger: LoggerService,\n @inject(COMPANION_SERVICE_TYPES.CompanionContext) private readonly companionContext: CompanionContext,\n @inject(COMPANION_SERVICE_TYPES.ResearchAgentDispatchService) private readonly researchDispatch: ResearchAgentDispatchCompanionService,\n @inject(SAAS_SERVICE_TYPES.AgentsBackendService) private readonly agents: AgentsBackendService,\n @inject(COMPANION_SERVICE_TYPES.TraceabilityService) private readonly traceability: CompanionTraceabilityService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookRunWriteRegisterService) private readonly writeRegister: PlaybookRunWriteRegisterCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ApplicationBuildDispatchService) private readonly buildDispatch: ApplicationBuildDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.CodingAgentDispatchService) private readonly codingAgentDispatch: CodingAgentDispatchCompanionService,\n @inject(COMPANION_SERVICE_TYPES.GitChangeSetService) private readonly git: GitChangeSetCompanionService,\n @inject(COMPANION_SERVICE_TYPES.IntrospectionService) private readonly introspection: CompanionIntrospectionService,\n @inject(COMPANION_SERVICE_TYPES.FoundationExecutorService) private readonly foundationExecutor: FoundationExecutorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.CapabilityCompositionExecutorService) private readonly capabilityCompositionExecutor: CapabilityCompositionExecutorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ApplicationMaturityExecutorService) private readonly applicationMaturityExecutor: ApplicationMaturityExecutorCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExpertPersonaService) private readonly expertPersonas: ExpertPersonaCompanionService,\n @inject(COMPANION_SERVICE_TYPES.StructuredDeliberationService) private readonly structuredDeliberation: StructuredDeliberationCompanionService,\n @inject(COMPANION_SERVICE_TYPES.ExecutionsService) private readonly executions: CompanionExecutionsCompanionService,\n /** The engine's execution driver — every playbook run is an actor-system execution it opens and settles (#1358). */\n @inject(SAAS_SERVICE_TYPES.ActorsSystemBackendService) private readonly actorsSystem: ActorsSystemBackendService,\n /** What every run, composite iteration and child dispatch reported spending (#1507). */\n @inject(COMPANION_SERVICE_TYPES.PlaybookSpendMeter) private readonly spendMeter: PlaybookSpendMeterCompanionService,\n /** The application's configuration — read for the coherence report's host facts (the languages it serves). */\n @inject(SAAS_SERVICE_TYPES.AppConfigService) private readonly appConfigService: AppConfigurationService,\n /** The dossier the unattended runs record a quick interview's assumed answers in (#2129). */\n @inject(COMPANION_SERVICE_TYPES.DossierService) private readonly dossier: DossierCompanionService,\n /**\n * The classifier a research step's evidence is screened through before a sibling step reads it (#2938), the one the\n * coding brief screens through; also every research-informed family a generation step, a judge, the interview-answer\n * proposer or the creation assistant reads (`researchFamilyScreeningHost`). Optional: an absent service is \"no\n * classifier bound\", which marks rather than refuses.\n */\n @inject(SAAS_SERVICE_TYPES.ContentSafetyService) @optional() private readonly contentSafety?: ContentSafetyBackendService,\n ) {\n this.logDebug = this.logger.debugByType('PlaybookRunCompanionService');\n /*\n * A deliberation refusing stale seats reads the charters' drift without this service's state, so it asks whether the\n * build is unfinished through this probe (#4022): the same predicate on the same build-plan progress the board's\n * `buildPlanExecution` carries, so the board and the refusal agree on which inputs age a charter.\n */\n this.expertPersonas.registerBuildUnfinishedProbe(async () =>\n isBuildUnfinished({ buildPlanExecution: await this.buildDispatch.resolveBuildExecutionProgress() }));\n }\n\n /**\n * Everything an interview proposal reads and calls (#2129), bound in ONE place so the console, the workbench,\n * the conversation and the unattended runs cannot each assemble a different proposer — and so a port added\n * here (the landed families the asking playbook reads) reaches all of them at once.\n */\n public interviewAnswerProposalPorts(): InterviewAnswerProposalPorts {\n return {\n readAnswerablePlaybook: (playbookRef) => this.dossier.readAnswerablePlaybook(playbookRef),\n listInterviewPlaybooks: () => this.dossier.listInterviewPlaybooks(),\n readCreatorInputs: () => this.dossier.readCreatorInputs(),\n /*\n * The families the asking playbook reads, research-informed ones screened first (#2938): a proposal is recorded as\n * the application's ASSUMED decision, so it is never derived from an instruction a fetched page planted.\n */\n readArtifactsByFamily: async (families) => {\n const state = await this.readArtifactState();\n const read = new Map([...state.artifactsByFamily].filter(([family]) => families.includes(family)));\n return screenResearchInformedFamilyValues(read, this.researchInformedFamilyPredicate(state), this.researchFamilyScreeningHost('interview-answer-proposal'));\n },\n generate: (input) => this.generateStructured(input),\n };\n }\n\n /**\n * The unattended runs' interview step (#2129): propose the questions a quick interview leaves to the proposer,\n * and record each proposal as ASSUMED, authored by the proposer, with its rationale. Nobody reviewed them, which\n * is exactly what the standing says; the console lists them to revisit and the trace names each one.\n */\n private async assumeInterviewAnswers(request: InterviewAnswerAssumptionRequest): Promise<InterviewAnswerAssumptionOutcome> {\n const result = await proposeInterviewAnswers(this.interviewAnswerProposalPorts(), request);\n const assumed: string[] = [];\n const unproposed = [...result.unproposed];\n for (const proposal of result.proposals) {\n try {\n await this.dossier.recordAnswer({\n playbookRef: request.playbookRef,\n questionRef: proposal.questionRef,\n value: proposal.value,\n answeredByRef: INTERVIEW_ANSWER_PROPOSER_REF,\n standing: ApplicationCreationSpecs.ApplicationCreatorInputAnswerStanding.ASSUMED,\n assumptionRationale: proposal.rationale,\n });\n assumed.push(proposal.questionRef);\n } catch (error) {\n unproposed.push({ questionRef: proposal.questionRef, reason: describeCaughtError(error) });\n }\n }\n return { assumed, unproposed };\n }\n\n /**\n * The eligibility board: every compiled playbook, whether it can run RIGHT NOW, and why not.\n *\n * This is the deterministic half of the loop, and the half that must be CODE. A model may choose among\n * the eligible entries; it can never widen the set, because the gate is computed from the working tree\n * before the model is consulted at all\n * (`.claude/context/application-creation-rebuild-principles.md` XII.2).\n */\n /**\n * The interview a playbook DECLARES, as a decision a person can be shown — or `null` if it asks nothing.\n *\n * A separate route from the eligibility board on purpose. The board is a LIST and is polled; these\n * questions are bulky (one playbook alone declares fifteen) and are wanted only at the moment\n * somebody chooses to run that playbook, so putting them on every row would pay for all of them on\n * every poll to show none of them.\n *\n * Until this existed the questions were unreachable: the board carried\n * `PlaybookEligibility.requiresElicitation`, a boolean, and nothing anywhere served the text.\n */\n public async readPlaybookElicitationDecision(playbookRef: string): Promise<HumanDecision_Request | null> {\n const playbooks = await this.readParsedCatalog();\n const playbook = playbooks.find((candidate) => candidate.ref === playbookRef);\n if (!playbook) throw new UnknownPlaybookError(`No compiled playbook is registered under \"${playbookRef}\".`);\n /*\n * Only what the dossier does not answer yet (#1454 review): the run reads the dossier, so a gate\n * that re-asked every question blank posted the blanks as overrides of answers already given.\n * `null` then means \"nothing left to ask\" and the run proceeds on the dossier's answers.\n */\n const state = await this.readArtifactState();\n const creatorInputs = state.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined;\n // A computed CHOICE (the brand-name choice) shows the options computed from what has landed now.\n const materialized = materializeElicitationOptions(playbook, { readFamily: (family) => state.artifactsByFamily.get(family) }).playbook;\n const recorded = readAnswersForPlaybookQuestions(playbook, creatorInputs);\n // An answer no longer among the computed options would be refused by the run, so the gate asks it again.\n const noLongerOffered = answersNoLongerOffered(materialized, recorded);\n const answeredQuestionRefs = new Set([\n ...recorded.map((answer) => answer.questionRef).filter((ref) => !noLongerOffered.has(ref)),\n // Answered without an answer (#3437): the creator said why, so the gate does not ask it again.\n ...readNonAnswersForPlaybookQuestions(playbook, creatorInputs).map((entry) => entry.questionRef),\n ]);\n return projectPlaybookElicitationAsDecision({ playbook: materialized, requestedAt: new Date().toISOString(), answeredQuestionRefs });\n }\n\n public async listPlaybookEligibility(): Promise<{\n readonly playbooks: readonly PlaybookEligibility[];\n /** The application's main line as its dossier declares it (#1603), so every reader of the board names it. */\n readonly applicationLine: ApplicationLineDeclaration;\n /** What the line left behind (#1604 review, finding 5). Empty lists when nothing is orphaned. */\n readonly applicationLineOrphans: ApplicationLineOrphans;\n /**\n * The application's active set (#1607): every catalog playbook, whether its line runs it and why,\n * and the line's root with each composite's children, so a reader renders the tree instead of\n * re-deriving it. Absent only when the state carried no line scope.\n */\n readonly activeSet?: ApplicationActiveSet;\n /**\n * The steps an unattended round withholds because an interview still waiting on the person would date them (#3361),\n * each with what it waits on: the loop's own rule (`findReadersDatedByWaitingInterviews`), read over this board, so\n * Home asks exactly the questions the loop is holding work for.\n */\n readonly datedByWaitingInterviews: readonly PlaybookDatedByWaitingInterview[];\n }> {\n // A catalog entry that does not satisfy its own contract is omitted rather than fatal — one malformed\n // playbook must not hide the fifteen that are fine.\n const [state, playbooks] = await Promise.all([this.readArtifactState(), this.readParsedCatalog()]);\n const board = evaluatePlaybookCatalogEligibility({\n playbooks,\n state,\n landableFamilies: this.resolveLandableFamilies(),\n });\n /*\n * What the next unattended round could run: eligible, its own interview answered, and not CURRENT (the loop's offer,\n * less its run ceilings, which count runs of a loop not yet started). An interview waits on the person unless the next\n * round assumes it (a quick interview, #2129).\n */\n const datedByWaitingInterviews = findReadersDatedByWaitingInterviews({\n readers: board.playbooks.filter((entry) => entry.eligible && entry.unansweredQuestionRefs.length === 0 && entry.rerun.kind !== PlaybookRerunKind.CURRENT),\n waiting: selectInterviewsWaitingOnThePerson({\n candidates: board.playbooks.filter((entry) => entry.eligible),\n playbooksByRef: new Map(playbooks.map((playbook) => [playbook.ref, playbook])),\n interviewDepth: readInterviewDepthFromState(state),\n }),\n catalog: playbooks,\n });\n return {\n ...board,\n datedByWaitingInterviews,\n applicationLine: state.applicationLine?.declaration ?? { state: ApplicationLineDeclarationState.UNDECLARED },\n applicationLineOrphans: this.describeApplicationLineOrphans(state.applicationLine, state.deactivatedFamilies),\n ...(state.applicationLine\n ? {\n activeSet: describeApplicationActiveSet({\n catalog: readCompiledApplicationLineCatalog(),\n scope: state.applicationLine,\n creatorInputs: state.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined,\n }),\n }\n : {}),\n };\n }\n\n /**\n * What the application's line no longer uses but the workspace still holds (#1604 review, finding 5):\n * families a file exists for that the line declares not applicable, and a materialized public website\n * when the website plan does not apply. REPORTED so the creator sees what a line change left behind;\n * never removed here, because a removed package cannot be restored and a family file is read again if\n * the line switches back. Removing either is an explicit task.\n */\n private describeApplicationLineOrphans(\n scope: PlaybookApplicationLineScope | undefined,\n deactivatedFamilies: readonly PlaybookDeactivatedFamily[] = [],\n ): ApplicationLineOrphans {\n const websitePlanSetAside = isFamilyNotApplicable(scope, ApplicationSpecificationFamily.WEBSITE_PLAN)\n || deactivatedFamilies.some((entry) => entry.family === ApplicationSpecificationFamily.WEBSITE_PLAN);\n const websiteServiceKeys = websitePlanSetAside\n ? Object.entries(this.companionContext.servicesByKey ?? {})\n .filter(([, service]) => service.frontendType === AppFrontendType.STATIC_WEBSITE)\n .map(([key]) => key)\n .sort()\n : [];\n return { landedFamilies: scope?.ignoredLandedFamilies ?? [], websiteServiceKeys, deactivatedFamilies };\n }\n\n /**\n * What the application currently contains, read from the working tree — the only state there is.\n *\n * Two sources, because they answer different halves of the question:\n *\n * - **the app's companion exports** give the VALUE for every family the semantic authority can validate,\n * which is what `artifact_valid` needs. They are loaded from AUTHORED source, so a family a developer\n * is midway through editing is seen as it is now, not as it was last built;\n * - **file presence** covers families that have no companion-exports slot (the bottom-up ones). For those\n * the only honest answer is exists/absent, and `artifact_valid` on them fails closed by design.\n */\n /**\n * Drive a composite: run its children until one of the breakers fires.\n *\n * The runtime owns the mechanism (eligibility, selection bounds, failure isolation, the breakers);\n * this owns the two host halves it has no opinion about — how a child is actually run, and how the\n * model is asked to choose one and compose its objective.\n */\n private async runChoreography(input: {\n readonly playbook: MetaWorkflowPlaybook;\n /** The composite's starter (#1751) — each child that asks a question routes it to them. */\n readonly requestedByUserId?: string;\n /** The composite INSTANCE (#1609): its checkpoint, its research evidence, and the key its children inherit. */\n readonly instanceKey?: string;\n /** What the instance was opened for (#1608): it frames the selector's goal and reaches every child's brief. */\n readonly instancePurpose?: string;\n /**\n * The creator's brief for this run (#1608). A composite generates nothing, so the brief frames the SELECTOR's\n * goal. It is never handed to a child as a creator brief: a child reads the creator's facts through the\n * elicitation it inherits, and the selector's words for it arrive as `selectionRationale`.\n */\n readonly creatorBrief?: string;\n /** The composite's OWN rendered elicitation (questions + the creator's answers), forwarded to every child. */\n readonly parentElicitationSection?: string;\n /**\n * Set ONLY when this composite is itself a child of a composite already running in this process.\n * Threaded from `runChoreographyChild`; see the single-flight refusal below for why a nested run\n * must be admitted rather than refused.\n */\n readonly nestedWithinChoreographyRef?: string;\n readonly session?: CompanionExecutionSessionContext;\n /** The composite's OWN actor execution — where its progress checkpoint is written (#1360). */\n readonly runId: string;\n /** The ROOT run of this composite's tree (#1610): its own run id at the root, its root's when nested. Every child carries it. */\n readonly rootRunId: string;\n /**\n * The operator's `dryRun`, threaded into every CHILD that generates and lands (#1506).\n *\n * Until 2026-09-22 a composite accepted the flag at its HTTP door and dropped it here: each child ran\n * through `runPlaybook` with no `dryRun`, so \"the full pipe ran and NOTHING was written\" — the\n * documented meaning of the flag — was true of the parent and false of every file its children\n * landed. The lanes (definition, conception, compliance) are the first composites whose children\n * land a dozen families between them, which is what made the gap cost something. Research and\n * step-value children write nothing by construction and need no flag.\n */\n readonly dryRun?: boolean;\n }): Promise<{\n playbookRef: string;\n choreographed: true;\n stoppedBecause: PlaybookChoreographyStopReason;\n iterations: PlaybookChoreographyResult['iterations'];\n stepRefs: readonly string[];\n landed: readonly string[];\n /**\n * Per landing child: how many of the run's evidence URLs it carried into what it landed.\n *\n * Surfaced on the RESPONSE rather than kept in the trace, because the thing it guards against is\n * a run that looks successful. A `citedUrlCount: 0` beside a non-zero `evidenceUrlCount` is the\n * exact shape that once passed a schema validator, three green suites and an improving judge\n * verdict while the lane's central claim was false.\n */\n provenance: PlaybookChoreographyResult['provenance'];\n boundary: PlaybookChoreographyResult['boundary'];\n boundaryDecisions: readonly HumanDecision_Request[];\n /** The composite's wall-clock and every iteration's spend together (#1507). Per iteration and per child: on `iterations`. */\n durationMs: number;\n spend: PlaybookChoreographyResult['spend'];\n inheritedRounds: number;\n /**\n * Present ONLY when this run inherited a previous process's work.\n *\n * Declared rather than merely returned: a conditional spread satisfies the compiler without the\n * field appearing in the contract, which is how a value ends up present at runtime and invisible\n * to every consumer. A resumed run must be able to SAY it resumed — inheriting another process's\n * evidence silently would leave a run whose provenance nobody can explain, in the one lane that\n * counts its source URLs precisely because that mattered once.\n */\n resumedFrom?: { completedIterations: number; checkpointedAt: string };\n /**\n * Present ONLY when the run ended by ENVIRONMENT (every fatal child taken by infrastructure or\n * quota) and its checkpoint was therefore preserved: re-running the same composite ref resumes\n * the paid-for iterations instead of starting over.\n */\n resumableFromCheckpoint?: true;\n accepted: false;\n }> {\n /*\n * SINGLE-FLIGHT is the engine's, since #1361: this run's execution was opened with the\n * `COMPOSITE` subject (see `buildActorExecutionRequest`), and the driver refuses a second one\n * while it runs — from the ROWS, so a restart and a second companion process see it too. Until\n * then it was an in-memory marker set here and cleared in a `finally`; before THAT (2026-09-04)\n * it was nothing at all, and two composites shared a working tree and one checkpoint.\n *\n * A NESTED composite opens with no subject, which is the difference between a single-flight\n * guard and a self-deadlock: `runChoreographyChild` reaches `runPlaybook`, which routes a child\n * declaring `method.choreography` straight back here, and a blanket refusal would abort the\n * parent on its own child. Nesting is threaded EXPLICITLY (`nestedWithinChoreographyRef`) rather\n * than inferred — only the call path knows a child from a fresh operator request arriving\n * mid-run — and neither HTTP entry point spreads a request body into that input.\n */\n const playbooks = await this.traceRunPhase(input.session, 'catalog', () => this.readParsedCatalog());\n /*\n * THE MARKED GATE, refused BEFORE the run rather than after it (#111).\n *\n * Under GUIDED a lane boundary that owes an approve_result decision should HOLD the run, and\n * suspending at a boundary is not built. Which boundaries owe one is only knowable once the run\n * ends — so a refusal at that point would throw away a lane that had already landed its files\n * and spent its turns, and the engine retains a thrown run's checkpoint, so a resume could\n * re-land them. A posture the run cannot honour is a reason not to START it.\n *\n * Inert under the decided posture (YOLO, `one-source-of-truth.md` D5) and deliberately a refusal\n * rather than a silent downgrade: a GUIDED run that quietly behaved like a YOLO one would be a\n * safety claim standing on an unbuilt mechanism, which is the exact shape the approval policy's\n * own JSDoc had to be corrected for once already.\n */\n if (laneBoundaryTreatmentFor(APPLICATION_CREATION_AUTONOMY_POSTURE, PlaybookLaneBoundaryDecision.APPROVE_RESULT) === LaneBoundaryTreatment.SUSPEND) {\n throw new Error(\n `The ${APPLICATION_CREATION_AUTONOMY_POSTURE} autonomy posture asks a run to HOLD at a lane boundary that owes an approve_result `\n + 'decision, and suspending at a lane boundary is not built (#111; arming the marked gates is part of Gate 3). '\n + 'Run under a posture that notifies and proceeds, or build the hold.',\n );\n }\n /*\n * Resume what a previous process paid for.\n *\n * Re-running the composite IS the resume gesture: a composite is single-flight per application —\n * enforced above as of the refusal, not merely assumed — so its ref identifies \"the run in\n * progress\", and the person restarting is usually the one who just watched a companion restart\n * eat their run.\n */\n // Per INSTANCE (#1609): an instance adopts only its own interrupted progress, never another's of the same composite.\n const resumeFrom = await this.traceRunPhase(input.session, 'checkpoint-adoption', () => this.adoptChoreographyCheckpoint(input.playbook.ref, input.instanceKey, input.runId, input.session));\n /*\n * Every round this run INHERITED rather than ran — the root's and, recursively, each nested lane's in\n * flight (#1507). The meter only sees this process, so each is an unobserved part of the run's spend;\n * counted over the whole tree because the journey's real resume is mid-lane (root 0, lane N).\n */\n const inheritedRounds = resumeFrom ? countCheckpointedRounds(resumeFrom) : 0;\n if (inheritedRounds > 0) this.adoptedCheckpointIterations.set(input.runId, inheritedRounds);\n if (resumeFrom) {\n this.logDebug('Resuming a choreography from its checkpoint', {\n playbookRef: input.playbook.ref,\n completedIterations: resumeFrom.completedIterations,\n stepRefs: resumeFrom.stepResults.length,\n checkpointedAt: resumeFrom.checkpointedAt,\n });\n }\n const result = await runPlaybookChoreography({\n composite: input.playbook,\n checkpoint: (snapshot) => this.saveChoreographyCheckpoint(input.runId, snapshot, input.session, input.instanceKey),\n ...(resumeFrom ? { resumeFrom } : {}),\n goal: composeCompositeGoal({ intent: input.playbook.intent, instancePurpose: input.instancePurpose, creatorBrief: input.creatorBrief }),\n playbooks,\n landableFamilies: this.resolveLandableFamilies(),\n readArtifactState: () => this.traceRunPhase(input.session, 'choreography-artifact-state', () => this.readArtifactState()),\n // A quick interview's skipped questions are assumed rather than waited on (#2129), for every lane of the tree.\n assumeInterviewAnswers: (request) => this.assumeInterviewAnswers(request),\n // A round waits at its top while the dev supervisor holds a restart, so the restart kills nothing (#3204); waiting on\n // its children it is paused, and a nested lane is counted as a run of its own.\n awaitRestartWindow: () => this.awaitRestartWindow(),\n whilePaused: (work) => companionRestartDrain.whilePaused(work),\n whileWorking: (work) => this.whileDrainCounted(work),\n // Before the first tree read: a composite whose children its line runs none of stops here (#1639).\n readApplicationLineScope: () => this.traceRunPhase(input.session, 'application-line-scope', () => this.readApplicationLineScope()),\n // Every selection and child dispatch is measured, so the row records spend per iteration and per child (#1507).\n meter: this.spendMeter,\n /*\n * An explicit run of the COMPOSITE admits its children past SEQUENCING too. Asking for a\n * playbook by name is the acknowledgement, and it cannot stop at the parent: the first live run\n * gathered evidence, judged it adequate, and landed nothing because the producing child was\n * withheld on a phase gate its parent had already been admitted past.\n */\n proceedPastSequencing: true,\n /*\n * An opened INSTANCE (a refinement or feature-development line) is a request to re-do work on record,\n * so its own round offers children that are CURRENT (review N1). The default instance withholds them.\n */\n ...(input.instanceKey !== undefined ? { offersCurrentChildren: true } : {}),\n /*\n * A child taken by infrastructure or a provider quota never counts toward withholding it for\n * repeating a failure, because a retry once the environment recovers can succeed over identical\n * inputs. Nor does one that read an application package before its compiler published it\n * (#3212); see `isEnvironmentalChoreographyChildFailure` for what that costs a genuine import error.\n */\n isEnvironmentalFailure: isEnvironmentalChoreographyChildFailure,\n /*\n * Of those, a read of a package not yet published is environmental by TIMING (#3261): the runtime excuses it once\n * per child and read state, and counts the identical repeat over the same (now published) reads as the work\n * failing — the loader's other reading, an import from a door that does not publish the symbol.\n */\n isTimingEnvironmentalFailure: isApplicationPackageNotCompiledFailure,\n /*\n * A child a model provider ACCOUNT refused (#3204) stops the choreography at once, thrown, so the creation loop and\n * the drive stop on it and name the account. Excused as merely environmental, it was absorbed one lane down and\n * re-dispatched until the iteration ceiling (reference run 42120979649).\n */\n readProviderAccountRefusal: readPlaybookFailureProviderAccountRefusal,\n /*\n * One RUN for the restart drain (#3204 second review H1): the parent is PAUSED while its round's children run, so each\n * child is counted here, whole: its prelude, a research agent's screening and evidence records, a step output's model\n * call, and the compile wait after it. A child that IS a playbook run pauses this count while `runPlaybook` counts\n * itself (`runChoreographyChild`), so it is counted once.\n */\n runChild: (playbookRef, objective, stepResults, dispatchingCompositeRef) => this.whileDrainCounted(async () => {\n const parentElicitationSection = withInstancePurposeSection(await this.composeDispatchingElicitationSection({\n dispatchingCompositeRef,\n ownRef: input.playbook.ref,\n inherited: input.parentElicitationSection,\n playbooks,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n }), input.instanceKey, input.instancePurpose);\n /*\n * A child the dispatching composite declares ACTS ON THE APPLICATION (#1608) runs as the default\n * instance: it refreshes what the application holds once (the domain plan, the build), which an\n * instance may never replace. It still reads the instance's purpose, so it knows what it refreshes for.\n */\n const actsOnApplication = (playbooks.find((candidate) => candidate.ref === dispatchingCompositeRef)?.method?.choreography?.actsOnApplication ?? [])\n .includes(playbookRef);\n const childInstanceKey = actsOnApplication ? undefined : input.instanceKey;\n /*\n * After the child, and before the choreography reads the tree again (#3212): a child that wrote into one of the\n * application's COMPILED packages (the foundation scaffolding `shared-lib/src/…`) leaves that package's `dist`\n * behind its sources until the package's compiler publishes. The read that follows evaluates specifications\n * against that `dist`, and on `app-creation-test-007` it ran 2.4 s too early, threw \"has not been COMPILED\", and\n * stopped the whole creation loop. Bounded; a read that still meets an unpublished build is environmental.\n */\n try {\n return await this.runChoreographyChild({\n playbookRef,\n objective,\n stepResults,\n // The composite that DISPATCHED this child, which at depth 0 is this run's own and deeper is a\n // lane's. Only its non-undefined-ness matters to the single-flight bypass, so a lane's ref is\n // as good as the root's there — what it buys is the two lines below being the lane's (#1513).\n parentChoreographyRef: dispatchingCompositeRef,\n ...(parentElicitationSection ? { parentElicitationSection } : {}),\n // The COMPOSITE names the investigation: every research child of every run of that\n // composite consolidates into one evidence-store directory, which is what makes a\n // relaunch start from what earlier runs already established. The DISPATCHING one, so a\n // nested lane's evidence is found again by the next run of that lane whichever root invoked it.\n // Per INSTANCE (#1609): the default instance keeps the composite's ref as its scope, so evidence gathered\n // before instances existed is found where it always was; `<ref>@<key>` keeps a segment's evidence its own.\n evidenceScope: playbookInstanceId(dispatchingCompositeRef, childInstanceKey),\n // And READS the default instance's, explicitly: application-wide facts are pooled, an instance's findings are not.\n ...(childInstanceKey ? { sharedEvidenceScope: playbookInstanceId(dispatchingCompositeRef), instanceKey: childInstanceKey } : {}),\n ...(input.instancePurpose !== undefined ? { instancePurpose: input.instancePurpose } : {}),\n rootRunId: input.rootRunId,\n ...(input.requestedByUserId ? { requestedByUserId: input.requestedByUserId } : {}),\n ...(input.dryRun === true ? { dryRun: true } : {}),\n ...(input.session ? { session: input.session } : {}),\n });\n } finally {\n /*\n * After a failed child too: it may have written before it failed. Best effort: the wait and its trace event\n * never replace the child's own outcome or error.\n */\n await waitForApplicationPackagesPublished({\n saasRoot: this.companionContext.saasRoot,\n onWait: async (unpublished) => {\n const named = unpublished.map((entry) => `${entry.packageName} (${entry.reason})`).join(', ');\n this.logDebug('Waiting for application packages to compile before reading the tree', { afterChild: playbookRef, unpublished });\n if (input.session) {\n await this.traceability.traceEvent({\n session: input.session,\n minimumLevel: CompanionTraceabilityLevel.DEBUG,\n type: 'application-package-publication-wait',\n summary: `waiting for ${named} to compile before reading the tree after ${playbookRef}`,\n payload: { afterChild: playbookRef, unpublished },\n });\n }\n },\n }).catch((error: unknown) => this.logDebug('Could not wait for the application packages to publish', { afterChild: playbookRef, error: describeCaughtError(error) }));\n }\n }),\n select: {\n /*\n * The DISPATCHING composite's round, not the root's (#1577): its declared inputs and its interview.\n * A lane is resolved from the same catalog the runtime resolved it from, so it is always there; a\n * ref that is not would be a runtime/host disagreement, and it is refused rather than quietly\n * answered with the root's facts — which is the defect this removes.\n *\n * The interview helper answers the same unknown ref by INHERITING, and the two differ on purpose:\n * an ancestor's interview answers are still true of the product and a lane that asks nothing\n * inherits them by design (#1513), while the root's declared INPUTS and INTENT are exactly the\n * wrong facts for a lane's selector. There is no honest fallback for those, so this refuses.\n */\n select: async (request) => {\n const dispatching = request.dispatchingCompositeRef === input.playbook.ref\n ? input.playbook\n : playbooks.find((candidate) => candidate.ref === request.dispatchingCompositeRef);\n if (!dispatching) {\n throw new UnknownPlaybookError(`The composite \"${request.dispatchingCompositeRef}\" selecting a round is not in the compiled catalog.`);\n }\n /*\n * A CLOSED instance stops at its next round (#1608). Nothing can stop a composite mid-round, and the\n * round boundary is where it decides what to do next anyway: the child already running finishes, and\n * nothing new starts. Asked of the root's activation only; a lane's instance has none of its own.\n */\n // The root instance's activation, read once per round: its closure, and a refinement's targets.\n const activation = input.instanceKey === undefined ? undefined : await this.readInstanceActivation(playbookInstanceId(input.playbook.ref, input.instanceKey));\n const closure = activation?.closure;\n if (closure !== undefined) {\n // A person closed it: never replaced by a forced build wave (#3447 review R1).\n return { children: [], stopRationale: `This instance was ${closure.kind}${closure.reason ? `: ${closure.reason}` : ''}. It stops here.`, stopIsNotTheModels: true };\n }\n /*\n * A REFINEMENT line's first move is fixed (#1608): while a family it names is not yet re-derived, its\n * own round offers only that family's producers. Asked of the line's own composite only; a lane it\n * dispatches (the build) chooses as it always does.\n */\n const eligible = request.dispatchingCompositeRef === input.playbook.ref && input.instanceKey !== undefined\n && secondaryLineDefinitionOfEntry(input.playbook.ref)?.namesRefinedFamilies === true\n ? narrowRefinementRound({\n eligible: request.eligible,\n history: request.history,\n targets: activation?.refinedFamilies ?? [],\n // Only the line's own children order its targets: a playbook it never runs must not (refinementDependencyMaps).\n ...refinementDependencyMaps(playbooks, input.playbook.ref),\n })\n : request.eligible;\n const parentElicitationSection = withInstancePurposeSection(await this.composeDispatchingElicitationSection({\n dispatchingCompositeRef: request.dispatchingCompositeRef,\n ownRef: input.playbook.ref,\n inherited: input.parentElicitationSection,\n playbooks,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n }), input.instanceKey, input.instancePurpose);\n return this.selectChoreographyChildren({\n ...request,\n eligible,\n composite: dispatching,\n ...(parentElicitationSection ? { parentElicitationSection } : {}),\n });\n },\n },\n ...(input.session ? { trace: this.buildTrace(input.session, 'playbook-choreography') } : {}),\n }).finally(async () => {\n /*\n * A composite that runs the build wave does not settle while the staffing repair its dispatch step started is still\n * running (#4022), however the choreography ended (a throw included): the repair runs beside the wave, and the\n * lane's write scope (which admits the staffing step) is what keeps another lane's staffing from deriving the same\n * charters. Ended on its iteration ceiling, a stop or its closing move, the lane would otherwise release that claim\n * with the repair still writing.\n */\n if (this.staleExpertChartersRepairInFlight !== undefined && playbookRunsBuildWave(input.playbook.ref, new Map(playbooks.map((playbook) => [playbook.ref, playbook])))) {\n await this.staleExpertChartersRepairInFlight;\n }\n });\n /*\n * The run reached its OWN conclusion, however it concluded — so the checkpoint has done its job\n * and must go. Keeping it would make the next run of this composite resume a finished one, which\n * is the failure mode a resume cache has instead of the one it replaced.\n *\n * ONE exception, and it is measured rather than hypothetical: a conclusion the ENVIRONMENT\n * forced. When ALL_CHILDREN_FAILED and every fatal child was taken by infrastructure or quota\n * (a companion pause, a 529 storm outliving the retry, \"You've hit your session limit\"), the\n * children never met the work — that is the process-taken-away case the checkpoint exists for,\n * arriving as child failures instead of a SIGTERM. On 2026-09-03 the unconditional consume here\n * discarded a 56-minute compliance run's 10 iterations of accumulated evidence because its 11th\n * iteration hit the provider's 5-hour session limit. The checkpoint survives that shape now, and\n * re-running the composite resumes it — the same gesture as after a companion restart.\n *\n * Still unconditional for every SEMANTIC conclusion: an iteration ceiling, a chosen stop, or a\n * fatal iteration containing even one real (non-environmental) failure, because there the next\n * selection would see genuine information and must not inherit a finished run's state.\n */\n const endedByEnvironment = choreographyEndedByEnvironment(result);\n if (endedByEnvironment) {\n this.logDebug('Choreography ended by environment; preserving its checkpoint for relaunch', {\n playbookRef: input.playbook.ref,\n completedIterations: result.iterations.length,\n fatalFailures: result.iterations[result.iterations.length - 1]?.children.map((child) => child.failure?.slice(0, 160)),\n });\n }\n /*\n * THE LANE BOUNDARY (#111) — one `approve_result` decision on the HITL plane, the first reader of\n * the composite's `approval` and `onFailure`. The runtime derived the facts; this projects them\n * as the same `HumanDecision_Request` every other question on this plane uses, and the POSTURE\n * decides what the decision does. Under YOLO (the decided posture, `one-source-of-truth.md` D5)\n * the gate is MARKED: the decision is written on the run's row and in this response, the run\n * concludes, and a person acts on it through the run and revert doors. Under GUIDED the same\n * decision would hold the run — that arm is the gate armed, and it is not built: arming it is\n * part of Gate 3's membership test, so it refuses by name rather than proceeding silently.\n */\n const requestedAt = new Date().toISOString();\n /*\n * EVERY boundary the run produced, not just the root's: a lane's `approval` is where the question\n * genuinely arises, and `collectPlaybookLaneBoundaries` is the runtime's one derivation of which\n * boundaries exist (walking the iteration tree here would be a second).\n */\n const boundaries = collectPlaybookLaneBoundaries({ playbookRef: input.playbook.ref, boundary: result.boundary, iterations: result.iterations });\n const boundaryDecisions = boundaries\n .filter((entry) => entry.boundary.decision !== PlaybookLaneBoundaryDecision.NONE)\n .map((entry) => projectLaneBoundaryAsDecision({ runId: input.runId, playbookRef: entry.playbookRef, requestedAt, boundary: entry.boundary }));\n if (boundaryDecisions.length > 0) {\n this.logDebug('Lane boundary decisions recorded (notify-and-proceed)', {\n playbookRef: input.playbook.ref,\n decisions: boundaries.filter((entry) => entry.boundary.decision !== PlaybookLaneBoundaryDecision.NONE)\n .map((entry) => ({ lane: entry.playbookRef, decision: entry.boundary.decision, kept: entry.boundary.keptPaths.length })),\n });\n }\n // A SEMANTIC conclusion needs no consume call: the engine clears a run's checkpoint when it\n // settles it COMPLETED, and keeps it only when `retainCheckpointOn` reads this result as ended by\n // environment (`resumableFromCheckpoint` below) — or when the run throws.\n return {\n playbookRef: input.playbook.ref,\n choreographed: true,\n stoppedBecause: result.stoppedBecause,\n iterations: result.iterations,\n stepRefs: [...result.stepResults.keys()],\n landed: result.landed,\n provenance: result.provenance,\n boundary: result.boundary,\n boundaryDecisions,\n durationMs: result.durationMs,\n spend: result.spend,\n inheritedRounds: result.inheritedRounds,\n /*\n * WHY the lane had nothing to run, when that is why it ended (#1506). Empty on every other stop,\n * and omitted then, so its presence is itself the signal that the run is waiting on something.\n */\n ...(result.unoffered.length > 0 ? { unoffered: result.unoffered } : {}),\n /*\n * REPORTED, like every other run shape reports it — and for a lane it is the report that matters\n * most (#1506). `summarizePlaybookRunResult` reads `dryRun` off this envelope to build the durable\n * run record, so a composite that omitted it was recorded as `dryRun: false`: a dry lane run,\n * which writes nothing, filed as a real one, which lands a dozen families. Measured on the first\n * live dry run of `top_down.definition`, whose record claimed it was real.\n *\n * A caller cannot tell them apart by looking at the tree either — a real run may legitimately\n * land nothing — which is the same reasoning the dispatch path already states for its own flag.\n */\n ...(input.dryRun === true ? { dryRun: true as const } : {}),\n /*\n * Reported, never silent. A run that quietly inherited another process's evidence would be a\n * run whose provenance nobody could explain — and provenance is the whole reason this lane\n * counts its source URLs.\n */\n ...(resumeFrom\n ? { resumedFrom: { completedIterations: resumeFrom.completedIterations, checkpointedAt: resumeFrom.checkpointedAt } }\n : {}),\n /*\n * Reported so the caller can SAY \"re-run this ref to resume\" instead of reading a failed run\n * as a dead end — the whole point of preserving the checkpoint is that somebody relaunches.\n */\n ...(endedByEnvironment ? { resumableFromCheckpoint: true as const } : {}),\n // No acceptance, exactly as an ordinary run reports none: files landed as working edits, and\n // acceptance is a later commit — a person's, or the companion's under the posture (#1534).\n accepted: false,\n };\n }\n\n /**\n * Run one child of a choreography, and route by what the child DECLARES.\n *\n * Three shapes, and the split is the child's own declaration rather than a list here — the same\n * correction W3 made to the brief sections:\n *\n * - `RESEARCH_AGENT` — the read-only web lane. Its evidence text becomes the step value.\n * - any executor with `stepOutputs` — a structured generation against the step's own schema, so the\n * value a sibling's `requires` reads is schema-validated before it can satisfy a gate.\n * - everything else — an ordinary run, which generates and LANDS exactly as it would standalone.\n * Composition adds a return channel; it never intercepts the existing one.\n */\n private async runChoreographyChild(input: {\n readonly playbookRef: string;\n readonly objective: string;\n readonly stepResults: ReadonlyMap<string, unknown>;\n /** The composite this child belongs to — carried so a child that is ITSELF a composite is not refused as a second run. */\n readonly parentChoreographyRef: string;\n /** The parent composite's rendered elicitation — the creator's facts, identical for every child. */\n readonly parentElicitationSection?: string;\n /** The composite's ref — the evidence-store scope every research child of this run shares. */\n readonly evidenceScope?: string;\n /** The default instance's scope, read but never written by an instance's research (#1609). */\n readonly sharedEvidenceScope?: string;\n /**\n * The dispatching composite's INSTANCE (#1609), which the child inherits: a feature line's children are\n * that feature's, not the default instance's. A child landing a shared single-value family is refused\n * by the landing rather than by this inheritance.\n */\n readonly instanceKey?: string;\n /** The root run of the tree this child belongs to (#1610) — recorded on the child's row. */\n readonly rootRunId: string;\n /** What the root instance was opened for (#1608); a child has no activation of its own to read it from. */\n readonly instancePurpose?: string;\n /** The parent's `dryRun` — see `runChoreography`. Reaches only the child branch that lands. */\n readonly dryRun?: boolean;\n /** The root run's starter (#1751): a child's question is routed to the person who started the tree. */\n readonly requestedByUserId?: string;\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<PlaybookChoreographyChildResult> {\n const playbooks = await this.readParsedCatalog();\n const child = playbooks.find((entry) => entry.ref === input.playbookRef);\n if (!child) throw new UnknownPlaybookError(`Choreography child \"${input.playbookRef}\" is not in the compiled catalog.`);\n // Every child, before it starts: a research agent is dispatched here directly, never through a playbook\n // run, and it is the expensive kind of call the spend-rate breaker exists for.\n this.spendMeter.assertSpendRateBelowRunawayBreaker();\n\n if (child.executor === MetaWorkflow_Executor.RESEARCH_AGENT) {\n const stepOutput = child.stepOutputs?.[0];\n if (!stepOutput) {\n throw new Error(`Research child \"${child.ref}\" declares no stepOutput; its evidence would have nowhere to go.`);\n }\n const researchInputTruth = await this.composeChoreographyChildInputTruth(child);\n // The typed operating jurisdictions (#2335), when the research step declares them: config, never re-asked.\n const researchOperatingJurisdictions = this.composeOperatingJurisdictionsSection(child);\n const researchObjective = [\n child.method?.guidance ?? '',\n '',\n '# Your objective for THIS round',\n input.objective,\n // The creator's facts, verbatim: research that knows the real jurisdictions, data classes\n // and commitments verifies triggers against THIS product instead of surveying the field.\n ...(input.parentElicitationSection ? ['', input.parentElicitationSection] : []),\n // And what the application has ACCEPTED (#1431), after the creator's answers and before the\n // return contract — the same order the generation brief uses, for the same reason: the\n // creator's words frame the run, the accepted truth is what it must not contradict.\n ...(researchInputTruth ? ['', researchInputTruth] : []),\n ...(researchOperatingJurisdictions ? ['', researchOperatingJurisdictions] : []),\n '',\n '# What to return',\n stepOutput.condensation,\n ].join('\\n');\n /*\n * The churn gate + one classified retry (#265, smallest shape). A research turn is READ-ONLY\n * and its result is regenerable, which is what makes ONE retry safe here and why the coding\n * lane gets the gate but never the retry. Two measured failure families qualify — the exit-0\n * mid-turn kill under a companion pause, and the provider's transient overload — and nothing\n * else does: an agent's own outcome retried is spend, not resilience.\n */\n const frameworkRoot = this.companionContext.resolvedHomes.framework.repositoryRoot;\n const logGate = (message: string, context?: Record<string, unknown>) => this.logDebug(message, { playbookRef: child.ref, ...context });\n await waitForDevCompileQuiet({ frameworkRepositoryRoot: frameworkRoot, log: logGate });\n /*\n * The turn's evidence, recorded as a change of the ROOT run (#2419): a research child has no run of its own, and\n * the root run is the one a person started and accepts. Recorded whether the turn succeeds or not, because\n * evidence consolidated before a death is exactly what the store exists to keep. Accept-on-request-only.\n */\n // Best-effort on both sides: recording evidence must never be what fails a research turn.\n const evidenceTarget = ((): { readonly saasRoot: string; readonly directory: string; readonly before: Map<string, string> } | undefined => {\n if (input.dryRun === true) return undefined;\n try {\n const saasRoot = this.companionContext.saasRoot;\n const directory = resolveResearchEvidenceDirectory(saasRoot, input.evidenceScope ?? 'adhoc');\n return { saasRoot, directory, before: snapshotResearchEvidence(saasRoot, directory) };\n } catch (error) {\n this.logDebug('Research evidence snapshot unavailable; the turn runs unrecorded', { playbookRef: child.ref, error: describeCaughtError(error) });\n return undefined;\n }\n })();\n /*\n * The evidence is screened ONCE, here, where it is produced (#2938): every sibling (the selector, an assessor, the\n * producer that writes the market snapshot, the compliance posture or the brand-name screening) reads the value\n * stored under the step ref, and the checkpoint keeps it, so only the screened or marked value ever travels.\n */\n let screened: ScreenedResearchStepValue | undefined;\n const screen = async (evidence: string): Promise<PlaybookChoreographyChildResult> => {\n screened = await screenResearchStepValue(evidence, {\n contentSafety: this.contentSafety,\n logger: this.logger,\n verdicts: companionScreeningVerdicts(),\n playbookRef: child.ref,\n stepRef: stepOutput.ref,\n });\n return { stepResults: new Map([[stepOutput.ref, screened.value]]) };\n };\n try {\n try {\n const research = await this.researchDispatch.runResearchTask({\n objective: researchObjective,\n ...(input.evidenceScope ? { evidenceScope: input.evidenceScope } : {}),\n ...(input.sharedEvidenceScope ? { sharedEvidenceScope: input.sharedEvidenceScope } : {}),\n playbookRef: child.ref,\n });\n return await screen(research.evidence);\n } catch (error) {\n const message = describeCaughtError(error);\n if (!isInfrastructureShapedAgentFailure(message)) throw error;\n this.logger.warn('Research turn lost to infrastructure; retrying once', { playbookRef: child.ref, failure: message.slice(0, 200) });\n // Overload answers deserve real backoff; a churn kill only needs the tree quiet again.\n if (/529|429|Overloaded|overloaded_error|rate.?limit/i.test(message)) {\n await new Promise((resolve) => setTimeout(resolve, 60_000));\n }\n await waitForDevCompileQuiet({ frameworkRepositoryRoot: frameworkRoot, log: logGate });\n const research = await this.researchDispatch.runResearchTask({\n objective: researchObjective,\n ...(input.evidenceScope ? { evidenceScope: input.evidenceScope } : {}),\n ...(input.sharedEvidenceScope ? { sharedEvidenceScope: input.sharedEvidenceScope } : {}),\n playbookRef: child.ref,\n });\n return await screen(research.evidence);\n }\n } finally {\n if (evidenceTarget !== undefined) {\n try {\n await this.writeRegister.recordResearchEvidence({\n runId: input.rootRunId,\n playbookRef: input.parentChoreographyRef,\n files: diffResearchEvidence(evidenceTarget.before, snapshotResearchEvidence(evidenceTarget.saasRoot, evidenceTarget.directory)),\n });\n } catch (error) {\n this.logger.warn(`Research evidence for ${child.ref} was written but its write record failed; commit it by hand: ${describeCaughtError(error)}`);\n }\n }\n /*\n * What screening concluded, on the ROOT run beside the evidence it records, so the commit that accepts the run\n * names a value its siblings read withheld or unscreened (#2938). Best effort, like the evidence record: a\n * record that cannot be written never fails the research turn. A dry run, or a turn that wrote nothing, has no\n * record to carry it; the WARN above (on a withheld value) and the marked step value still say it.\n */\n if (screened !== undefined && input.dryRun !== true) {\n try {\n const recorded = await this.writeRegister.markResearchScreening(input.rootRunId, {\n playbookRef: child.ref,\n stepRef: stepOutput.ref,\n at: new Date().toISOString(),\n screening: screened.screening,\n });\n if (!recorded) this.logDebug('Research screening not recorded: the root run has no write record', { playbookRef: child.ref, outcome: screened.screening.outcome });\n } catch (error) {\n this.logger.warn(`The screening of ${child.ref}'s evidence could not be recorded on run ${input.rootRunId}: ${describeCaughtError(error)}`);\n }\n }\n }\n }\n\n /*\n * A CODING_AGENT child cannot ALSO produce a step value, and saying so beats routing it silently.\n *\n * The branch below reads \"any executor with `stepOutputs` → structured generation\", which is right\n * for every tier that produces a value and wrong for this one: a dispatch runs an agent in the\n * workspace and returns no schema-validated object, so such a child would generate prose instead of\n * dispatching — the inert declaration issue #119 exists to remove, reproduced one layer down.\n *\n * No playbook declares this shape today (`build-dispatch` and `build-scale` declare no stepOutputs,\n * so they fall through to the run below and reach the CODING_AGENT branch in `runPlaybook`). This\n * refuses the shape rather than waiting for the first author to discover it as silence.\n */\n if (child.executor === MetaWorkflow_Executor.CODING_AGENT && (child.stepOutputs?.length ?? 0) > 0) {\n throw new Error(\n `Choreography child \"${child.ref}\" declares executor CODING_AGENT and ${child.stepOutputs!.length} stepOutput(s). `\n + 'A dispatch runs a coding agent in the workspace and returns no step value, so a sibling gate reading one '\n + 'would never be satisfied. Declare the child without stepOutputs, or give it a producing executor.',\n );\n }\n\n if ((child.stepOutputs?.length ?? 0) > 0) {\n const stepOutput = child.stepOutputs![0]!;\n const inputTruthSection = await this.composeChoreographyChildInputTruth(child);\n const value = await this.generateChoreographyStepValue({\n child,\n stepOutput,\n objective: input.objective,\n stepResults: input.stepResults,\n ...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),\n ...(inputTruthSection ? { inputTruthSection } : {}),\n });\n return { stepResults: new Map([[stepOutput.ref, value]]) };\n }\n\n // `runPlaybook` counts itself for the restart drain, so the child's own count (`runChild`) pauses meanwhile (#3204).\n const run = await this.whileDrainPaused(() => this.runPlaybook({\n playbookRef: input.playbookRef,\n /*\n * The objective is the choreography SELECTOR's words for this child, never the creator's. It was\n * passed as `creatorBrief` until 2026-09-25, so it rendered under \"# What this application is\" and\n * reached the child's judge as creator input, the ground truth its groundedness criteria score\n * against: a machine's reasoning read back as a product decision (#1608 review).\n */\n selectionRationale: input.objective,\n stepResults: input.stepResults,\n // The ONE path by which a nested composite is admitted past the single-flight refusal. Set\n // unconditionally: it is inert for every child that is not itself a composite, and making it\n // conditional on the child's declaration would put the \"is this a composite?\" question in two\n // places, one of which cannot see the compiled catalog the other routes on.\n nestedWithinChoreographyRef: input.parentChoreographyRef,\n rootRunId: input.rootRunId,\n ...(input.requestedByUserId ? { requestedByUserId: input.requestedByUserId } : {}),\n ...(input.instancePurpose !== undefined ? { instancePurpose: input.instancePurpose } : {}),\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n ...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),\n ...(input.dryRun === true ? { dryRun: true } : {}),\n ...(input.session ? { session: input.session } : {}),\n }));\n /*\n * Narrowed on `landedValues`, not on `landed`. A nested CHOREOGRAPHY result also carries `landed`,\n * so the obvious discriminator admits a union member that has no values to hand back — caught by\n * the compiler rather than by a run that silently observed nothing.\n */\n if ('landedValues' in run) {\n return {\n landed: run.landed.map((entry) => entry.packageRelativePath),\n /*\n * The VALUES, not just the paths — the only way the choreography can ask what an artifact\n * actually cites. `landedValues` is already carried on the generation result for the advisory\n * judge; this hands the same objects to the deterministic provenance observation, so the two\n * read exactly what was landed rather than re-reading a file that a human may have edited\n * since.\n */\n landedValues: run.landedValues.map((entry) => entry.value),\n // The leaf's advisory verdict, forwarded so a lane author can ROUTE on it (#1498). Advisory\n // stays advisory here: the runtime stores it as a step value, and only a sibling's declared\n // precondition turns it into a route.\n ...(run.judge !== undefined ? { judge: run.judge } : {}),\n };\n }\n // A STAFFING leaf (`top_down.expert-personas`, #572) lands charter modules through the persona accept step;\n // it reports their paths itself, so a lane's landed set and its write records see them.\n if ('staffed' in run) return { landed: [...run.landed] };\n // An ASSESSING leaf (`top_down.phase-gate` shape) lands nothing; its verdict is its whole return.\n if ('assessed' in run && run.judge !== undefined) return { judge: run.judge };\n /*\n * A DISPATCHING leaf returns what it did, as a step value its lane's selector can read (#1501).\n *\n * It lands no FAMILY — its product is a working edit in the application workspace that a human\n * commit accepts — so before this it returned `{}` and the round history carried the objective and\n * nothing else. Measured on the build lane's first live run: over twenty rounds the model narrated\n * task names it could not have seen and finally instructed the child to \"inspect the recorded D4\n * outcome for the immediately preceding dispatch\", which is the composite being asked to look up\n * what it should have been told.\n *\n * A CONDENSATION, not the run: the task, what it was, whether its coding run settled, and how much\n * of the plan is left. That is what the next objective needs — \"after X landed, take the next ready\n * task\" — and nothing more would survive the selector's context anyway.\n *\n * The ref is DERIVED from the playbook ref, like the judge's and for the same reason: the leaf\n * declares no `stepOutputs` for it, because dispatching is a property of the run rather than an\n * output the playbook authors. Declaring one would be worse than redundant — `runChoreographyChild`\n * routes a child WITH `stepOutputs` into the structured-generation branch, so the declaration would\n * silently stop it dispatching at all.\n */\n if ('dispatched' in run && 'wave' in run) {\n // A parallel wave (#1528), condensed the same way: what ran, and how it came out.\n return {\n stepResults: new Map([[dispatchOutcomeStepRef(input.playbookRef), {\n wave: true,\n degree: run.wave.degree,\n taskRefs: run.taskRefs,\n outcomes: run.wave.outcomes.map((outcome) => (outcome ? { taskRef: outcome.taskRef, status: outcome.status } : 'unreadable')),\n stoppedFillingBecause: run.wave.stoppedFillingBecause,\n /*\n * #2405 review F10, #3214, #3206, #2388: why nothing more was dispatched — a backend that does not start (with each\n * failure's cause and remedy), a person's stop, a usage limit — so the selector does not re-run an empty wave.\n */\n ...describeBuildWaveHoldsForSelector(run.wave),\n // #2222: whether a finished plan's application assembles, so the selector never reads \"all landed\" as done.\n ...(run.wave.assembly ? { assembly: { passed: run.wave.assembly.passed, failedCheckRefs: run.wave.assembly.failed.map((entry) => entry.checkRef) } } : {}),\n }]]),\n };\n }\n if ('dispatched' in run) {\n return {\n stepResults: new Map([[dispatchOutcomeStepRef(input.playbookRef), {\n taskRef: run.taskRef,\n targetKind: run.targetKind,\n // What the agent's run came to, when it was readable. `undefined` is its own answer and is\n // not smoothed into a failure: an unreadable row must never tell the selector to re-dispatch\n // work that may well have landed.\n outcome: run.codingRun?.status ?? (run.codingRunOutcomeUnreadable === true ? 'unreadable' : undefined),\n remainingReadyTaskCount: run.remainingReadyTaskRefs.length,\n landedTaskCount: run.landedTaskRefs.length,\n ...(run.dryRun === true ? { dryRun: true } : {}),\n }]]),\n ...(run.judge !== undefined ? { judge: run.judge } : {}),\n };\n }\n return {};\n }\n\n /**\n * The rendered interview a child — and, since #1577, a round's SELECTOR — receives: the DISPATCHING\n * composite's, not the root's (#1513).\n *\n * One `runChild` is bound for a whole composite tree and `runNestedLane` hands it down unchanged, so\n * until the runtime named the dispatching composite every child at every depth received the section\n * composed for the OUTERMOST one. For a nested umbrella that asks the creator anything that is the\n * difference between deriving from stated facts and deriving from none:\n * `top_down.compliance-analysis` carries ten product-fact questions its three children need and\n * declare none of, so it could not be nested at all and `cross_cutting.compliance` had to copy them.\n *\n * Three answers, in order:\n * - the composite RUNNING this tree is dispatching → the section this run already composed, which may\n * carry a caller's per-question overrides and must not be recomposed without them;\n * - a LANE that declares an interview is dispatching → that lane's own, from the dossier;\n * - a lane that declares NONE → the INHERITED section, so an ancestor's answers keep reaching a lane\n * that asks nothing of its own. That is most composites in the catalog (`top_down.compliance-analysis`\n * and `top_down.brand-naming` are lanes that do ask), and it is why this is additive rather than a change\n * of behaviour. No count here on purpose: the catalog moves, and a number in prose is one to re-measure.\n *\n * Not memoized, deliberately: the read is one file and only a lane that DECLARES an interview reaches\n * it, of which the catalog has few. A cache here would be state to invalidate for a cost nothing has\n * measured.\n *\n * `composeElicitationSection` REFUSES a missing answer, and that refusal is unreachable from here\n * rather than tolerated: the eligibility filter withholds any child — composites included — whose\n * `unansweredQuestionRefs` is non-empty, so a lane with an unanswered interview is never dispatched.\n */\n private async composeDispatchingElicitationSection(input: {\n readonly dispatchingCompositeRef: string;\n readonly ownRef: string;\n readonly inherited: string | undefined;\n readonly playbooks: readonly MetaWorkflowPlaybook[];\n /** The instance the lane runs as (#1609): it reads that instance's answers, the default's for the rest. */\n readonly instanceKey?: string;\n }): Promise<string | undefined> {\n if (input.dispatchingCompositeRef === input.ownRef) return input.inherited;\n const lane = input.playbooks.find((candidate) => candidate.ref === input.dispatchingCompositeRef);\n if (!lane?.method?.elicitation) return input.inherited;\n const state = await this.readArtifactState();\n const laneAnswerInput = {\n playbookRef: lane.ref,\n playbook: lane,\n creatorInputs: state.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined,\n overrides: undefined,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n };\n const section = composeElicitationSection({\n playbookRef: lane.ref,\n elicitation: materializeElicitationOptions(lane, { readFamily: (family) => state.artifactsByFamily.get(family) }).playbook.method?.elicitation,\n answers: resolveElicitationAnswers(laneAnswerInput),\n // Questions answered without an answer (#3437) cover their question and are rendered as such.\n nonAnswers: resolveElicitationNonAnswers(laneAnswerInput),\n });\n return section === '' ? input.inherited : section;\n }\n\n /**\n * What ABANDONING an instance does to its runs (#1608): every run of it waiting on a person is WITHDRAWN, and\n * every interrupted progress checkpoint it left is consumed, so nothing resumes work nobody wants. A run in\n * flight is not stopped here; it stops at its next round, when its selector reads the closure.\n *\n * \"Its runs\" is the instance's key under the entry playbook or any playbook in the entry's tree: a composite's\n * children inherit its key and run under their own refs. Best-effort per run, and the answer says exactly\n * which runs were withdrawn and which checkpoints consumed.\n *\n * Withdrawn by the SYSTEM (`abortSuspendedActorExecution`), every one alike (#1751): the question outlived the\n * work an answer would continue. The person's decision is the closure itself, recorded with its actor in the\n * closure commit; the withdrawal follows from it. A CANCEL — \"this person chose not to continue this run\" —\n * would need a person, and a question ROUTED to its run's starter admits no one else: the cancel was refused,\n * recorded as a refused answer, and left the question waiting.\n */\n public async abandonInstanceRuns(input: {\n readonly playbookRef: string;\n readonly instanceKey: string;\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<{ readonly withdrawnRunIds: readonly string[]; readonly consumedCheckpointRunIds: readonly string[] }> {\n const catalog = await this.readParsedCatalog();\n const tree = new Set<string>();\n const pending = [input.playbookRef];\n while (pending.length > 0) {\n const ref = pending.pop()!;\n if (tree.has(ref)) continue;\n tree.add(ref);\n pending.push(...(catalog.find((entry) => entry.ref === ref)?.method?.choreography?.admits ?? []));\n }\n const ofTheInstance = (context: { readonly playbookRef: string; readonly instanceKey?: string }): boolean =>\n context.instanceKey === input.instanceKey && tree.has(context.playbookRef);\n\n const withdrawnRunIds: string[] = [];\n for (const row of await this.actorsSystem.listSuspendedActorExecutions(META_WORKFLOWS_SYSTEM_REF, input.session)) {\n const parsed = PlaybookRunSuspensionCheckpointSchema.safeParse(row.checkpoint?.context);\n if (!parsed.success || !ofTheInstance(parsed.data)) continue;\n try {\n await this.actorsSystem.abortSuspendedActorExecution(row._id, { failure: { message: 'The instance this run belonged to was closed; its question was withdrawn.' } }, input.session);\n withdrawnRunIds.push(row._id);\n } catch (error) {\n this.logDebug('An abandoned instance\\'s waiting run could not be withdrawn', { runId: row._id, error: describeCaughtError(error) });\n }\n }\n const consumedCheckpointRunIds: string[] = [];\n for (const entry of await this.readResumableChoreographies(input.session)) {\n if (!ofTheInstance(entry.context)) continue;\n try {\n await this.actorsSystem.consumeActorExecutionCheckpoint(entry.executionId, input.session);\n consumedCheckpointRunIds.push(entry.executionId);\n } catch (error) {\n this.logDebug('An abandoned instance\\'s checkpoint could not be consumed', { runId: entry.executionId, error: describeCaughtError(error) });\n }\n }\n return { withdrawnRunIds, consumedCheckpointRunIds };\n }\n\n /**\n * The families the application holds right now: those with content on record. A refinement line may only\n * name one of these (#1608), since it changes what exists.\n */\n public async readLandedFamilies(): Promise<ReadonlySet<string>> {\n return new Set((await this.readArtifactState()).artifactsByFamily.keys());\n }\n\n /** An instance's activation, read fresh from the committed dossier: a person may close it mid-run (#1608). */\n private async readInstanceActivation(instanceId: string): Promise<ApplicationPlaybookActivation | undefined> {\n const state = await this.readArtifactState();\n const creatorInputs = state.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined;\n return creatorInputs?.activations?.[instanceId];\n }\n\n /**\n * The declared inputs of a CHOREOGRAPHY CHILD, rendered (#1431).\n *\n * Two of the three child branches composed no input truth at all: a research child and a step-value\n * gate were given the method, the selector's objective, the parent elicitation and nothing the\n * application has accepted — while the third branch, an ordinary `runPlaybook`, composed the full\n * brief. So `inputs: [{ family: 'vision-brief' }]` was honoured for one shape of child and silently\n * dropped for the other two, and all four affected playbooks declare it.\n *\n * It matters most where the method is most specific: `compliance-evidence-adequacy` must treat a\n * jurisdiction the vision puts in scope with no evidence behind it as a gap, and it could not see\n * the vision. The jurisdiction reached it only if the selector happened to paraphrase it into a\n * free-text objective — which is a different thing from the application's accepted truth, and is\n * not one a gate may rest a gap verdict on.\n *\n * Rendered through the SAME `composeInputTruthSection` the producing branch uses, so a declaration\n * means one thing across all three branches — including its aspect narrowing (#1420), which is why\n * this is not \"hand the child the families\".\n *\n * BEST-EFFORT: an unreadable working tree costs the section, never the child. A gate with no input\n * truth answers from what it has, which is exactly what it did before this existed.\n */\n private async composeChoreographyChildInputTruth(child: MetaWorkflowPlaybook): Promise<string> {\n if ((child.inputs ?? []).length === 0) return '';\n try {\n return await this.composeInputTruthSection(child, await this.readArtifactState());\n } catch (error) {\n this.logDebug('Choreography child: declared inputs unreadable (section omitted)', { playbookRef: child.ref, error: String(error) });\n return '';\n }\n }\n\n /**\n * Generate one step VALUE — a child's return to its parent, validated against its declared schema.\n *\n * Schema-constrained on purpose: a sibling's `requires` reads a declared FIELD of this value, and a\n * gate comparing against a field the producer never guaranteed is a gate that passes or fails by\n * accident. Where a step declares no `schemaRef` the value is the model's prose, which is honest\n * for evidence and useless for a gate — which is why the adequacy step declares one.\n */\n private async generateChoreographyStepValue(input: {\n readonly child: MetaWorkflowPlaybook;\n readonly stepOutput: NonNullable<MetaWorkflowPlaybook['stepOutputs']>[number];\n readonly objective: string;\n readonly stepResults: ReadonlyMap<string, unknown>;\n readonly parentElicitationSection?: string;\n /** The child's DECLARED inputs, rendered (#1431). Empty when it declares none or the tree is unreadable. */\n readonly inputTruthSection?: string;\n }): Promise<unknown> {\n const prompt = [\n input.child.method?.guidance ?? '',\n '',\n '# Your objective for THIS round',\n input.objective,\n // The creator's facts, for the judge that needs them: adequacy against evidence WITHOUT the\n // product facts converges on honest-INSUFFICIENT forever (#284's deadlock, measured run 4).\n ...(input.parentElicitationSection ? ['', input.parentElicitationSection] : []),\n // BEFORE the evidence it weighs (#1431): a gate asked whether the evidence covers what the\n // vision puts in scope has to meet the scope first, or it grades the evidence against itself.\n ...(input.inputTruthSection ? ['', input.inputTruthSection] : []),\n '',\n '# What you are judging',\n /*\n * The siblings' returns, rendered in full. This is the ONE place a parent's accumulated scope\n * reaches a child, and it is why step outputs carry a condensation contract: an assessor handed\n * raw page text cannot judge sufficiency, it can only run out of context.\n */\n ...[...input.stepResults.entries()].map(([ref, value]) =>\n `## ${ref}\\n${typeof value === 'string' ? value : JSON.stringify(value, null, 1)}`),\n '',\n '# What to return',\n input.stepOutput.condensation,\n ].join('\\n');\n\n const schema = resolveStepOutputSchema(input.stepOutput.schemaRef, PLAYBOOK_STEP_SCHEMA_NAMESPACES);\n const label = `choreography-step:${input.child.ref}:${input.stepOutput.ref}`;\n if (!schema) {\n return (await this.buildGenerationPort().generate({ prompt, schema: z.object({ value: z.string().min(1) }), label })).output;\n }\n /*\n * REFUSED rather than returned once the attempts are spent: a step value that failed its own contract cannot\n * satisfy a sibling's `requires` honestly, and returning it anyway would let a malformed verdict either open a\n * gate it should not or close one it should not — both silently. Before that, each refusal goes back to the\n * model with its findings (#3385), as a family generation's does.\n */\n return generateChoreographyStepValue({\n generate: (request) => this.buildGenerationPort().generate(request),\n prompt,\n schema,\n label,\n describeStep: `Step \"${input.stepOutput.ref}\" of \"${input.child.ref}\" did not satisfy ${input.stepOutput.schemaRef}`,\n });\n }\n\n /**\n * Ask the model which children to run next, and what to ASK each of them.\n *\n * The same construction as the journey loop's selector, one level down: the eligible set is\n * computed in CODE and handed over as a closed enum, so the model chooses WITHIN it and can never\n * widen it. What is new — and what the whole composite design turns on — is the second field: the\n * OBJECTIVE is invented per dispatch, adapted to what earlier rounds returned. Code gates the KIND\n * of work and the bounds; it never gates the content.\n */\n private async selectChoreographyChildren(request: {\n readonly composite: MetaWorkflowPlaybook;\n readonly eligible: Parameters<PlaybookChoreographySelectionPort['select']>[0]['eligible'];\n readonly goal: string;\n readonly history: PlaybookChoreographyResult['iterations'];\n readonly stepResults: ReadonlyMap<string, unknown>;\n readonly maximumLanes: number;\n /** The children still running beside this selection (#3848); `maximumLanes` is then the FREE slots only. */\n readonly running?: readonly string[];\n /** The composite's rendered elicitation — the creator's product facts, so objectives are aimed at them. */\n readonly parentElicitationSection?: string;\n }): Promise<{\n children: readonly { playbookRef: string; objective: string; reads?: readonly string[] }[];\n stopRationale?: string;\n /** The selector broke its contract: a stop no forced build wave replaces (#3447 review R1). */\n stopIsNotTheModels?: true;\n }> {\n const STOP = 'stop';\n const choices: [string, ...string[]] = [\n request.eligible[0]!.playbookRef,\n ...request.eligible.slice(1).map((entry) => entry.playbookRef),\n STOP,\n ];\n /*\n * `reads` — which of the run's accumulated returns THIS child is handed (#1423).\n *\n * A CLOSED enum of refs the run has already produced, exactly like `choice` above: the selector\n * picks within a set computed in code and can never widen it. Offered only when there is\n * something to choose from; with an empty scope the field would be a schema with no valid value.\n *\n * It cannot starve a child either — `resolveChoreographyChildReads` pushes the floor its own\n * `STEP_AVAILABLE` declaration requires regardless of what is named here. So the model narrows\n * evidence, it does not decide readiness.\n */\n /*\n * A DERIVED judge verdict is not on the menu (#1498). It is a routing value — enum verdicts with\n * the rationales stripped — so a child handed it gains nothing it can cite, and the section that\n * would render it calls its contents \"what earlier steps actually found\". Only a declared\n * precondition reads a verdict, which is what this mechanism's own contract says; the floor in\n * `resolveChoreographyChildReads` still pushes it for a child that gates on it, so readiness is\n * untouched.\n */\n const availableStepRefs = [...request.stepResults.keys()].filter((ref) => !isJudgeVerdictStepRef(ref));\n const readsField = availableStepRefs.length > 0\n ? { reads: z.array(z.enum(availableStepRefs as [string, ...string[]])) }\n : {};\n const schema = z.object({\n children: z.array(z.object({\n choice: z.enum(choices),\n objective: z.string().min(1),\n ...readsField,\n })).min(1).max(request.maximumLanes),\n });\n /*\n * The composite's declared INPUTS, rendered — and the reason this exists is the composite's very\n * first live run (wonder-crm, 2026-08-29). The selector had the goal and the eligible refs and\n * nothing about the product, so it stopped on its first iteration with \"no product, category, or\n * market context is available to define a meaningful evidence-gathering objective.\"\n *\n * It was right to stop rather than invent one. But an objective composed for THIS round is the\n * whole point of the design, and it cannot be composed out of a playbook's own intent — the\n * composite declares `inputs[]` precisely so that what it reads is stated, and the selector was\n * the one consumer not reading them.\n */\n const inputTruth = await this.composeInputTruthSection(request.composite, await this.readArtifactState());\n\n /*\n * What the SELECTOR is shown, and what it is not (#1498).\n *\n * Derived judge verdicts are withheld. The mechanism's own contract is that only a lane AUTHOR's\n * precondition turns a verdict into a route, and a verdict rendered here would let the model\n * prefer a child on one — the same effect through a door nobody declared. Nothing is lost: the\n * verdict's effect is ALREADY in what this prompt offers, because eligibility is computed in code\n * and a child gated on the verdict is in \"what you may choose from\" precisely when it holds.\n */\n const returnedForSelection = [...request.stepResults.entries()].filter(([ref]) => !isJudgeVerdictStepRef(ref));\n\n /*\n * The composite's OWN intent, beside the goal it was dispatched with (#1577).\n *\n * At the root the goal IS the composite's intent, verbatim (`runChoreography` passes it), and that is\n * where lane authors put their stop rules (`app-creation-composite-choreography.md` §14 fact 3). A\n * NESTED lane runs with the goal its PARENT composed for it, so its own intent — \"STOP after the\n * phase gate\", the build lane's \"take the next ready task\" — never reached its selector. Rendered\n * whenever it differs from the goal, so the root's prompt is unchanged.\n */\n const ownIntent = request.composite.intent !== request.goal ? request.composite.intent : undefined;\n const prompt = [\n '# Decide what this composite does next',\n `Goal: ${request.goal}`,\n ...(ownIntent ? [\n '',\n `# What ${request.composite.ref} is for — its own intent, and its stop rules`,\n 'The goal above is what the composite that dispatched this one asked of it. This is what this composite',\n 'is FOR, as its author declared it: pursue the goal within it, and stop when it says to stop.',\n ownIntent,\n ] : []),\n ...(inputTruth ? ['', inputTruth] : []),\n // The creator's answers rank WITH the declared inputs: round-1 research aimed at the real\n // jurisdictions and telemetry beats a general survey the facts then invalidate (run 4's whole\n // first round was that survey).\n ...(request.parentElicitationSection ? ['', request.parentElicitationSection] : []),\n '',\n '# What you may choose from',\n 'These are the ONLY options, computed from what has already happened rather than proposed by you.',\n /*\n * What re-running each one means (#1523). Without it the selector refreshed blind: it could not tell\n * a settled family from one whose inputs had moved, nor which stale family was premature, and it\n * refreshed `risk-register` 98 seconds before `business-model` made it stale again.\n */\n 'A family marked STALE was derived before one of its inputs last changed, so re-running would produce',\n 'something different — a reason to re-derive, not an instruction to. A STALE family that WAITS on other',\n 'stale families is not next: refresh those first, or it is stale again the moment they are re-derived.',\n /*\n * Why each option is on the table (2026-10-01): a FIRST RUN, a REFRESH that names what moved, or a\n * child the question does not apply to. A CURRENT child (on record, nothing it reads changed) is withheld\n * by the runtime, except in an opened line instance, which exists to re-do that work.\n */\n 'A FIRST RUN adds what is missing. A REFRESH re-derives from the input named beside it. A CURRENT child is',\n 'on record with nothing it reads changed: it is offered only by a line opened to re-do that work.',\n ...request.eligible.map((entry) => {\n const rerun = describePlaybookRerun(entry.rerun);\n const notes = [\n ...(rerun !== undefined ? [rerun] : []),\n ...((entry.wouldReplace ?? []).length > 0 ? [`REPLACES existing ${entry.wouldReplace!.join(', ')}`] : []),\n ...(entry.staleOutputs ?? []).map((stale) => describeStaleOutput(stale)),\n ];\n return `- ${entry.playbookRef}: ${entry.intent}${notes.length > 0 ? ` [${notes.join('; ')}]` : ''}`;\n }),\n `- ${STOP}: nothing here advances the goal. Must be your only entry.`,\n '',\n '# The objective is YOURS to compose',\n 'For each child you select, write the objective for THIS round. It is not a fixed task: a first',\n 'round is broad, a later round should name what the previous round could not find. Repeating an',\n 'earlier objective returns the earlier answer, so make each one different and specific.',\n `You may select up to ${request.maximumLanes} children to run in parallel — do so when they can`,\n 'be asked genuinely different questions, not to pad the set.',\n /*\n * A refill beside running children (#3848): the slots offered are only the free ones, and what a running child\n * writes or will land is already off the list. Said so the selector can leave a slot free for what a running\n * child will unblock instead of filling it because it is there.\n */\n ...((request.running ?? []).length === 0 ? [] : [\n '',\n '# Already running',\n `These children are running now: ${request.running!.join(', ')}. They are not on offer, and neither is anything that`,\n 'would write what they write or read what they will land. Choose only what is worth starting beside them; leaving a',\n 'slot free for what they will unblock is a valid answer.',\n ]),\n ...(returnedForSelection.length === 0 ? [] : [\n '',\n '# What has been returned so far',\n ...returnedForSelection.map(([ref, value]) =>\n `## ${ref}\\n${typeof value === 'string' ? value : JSON.stringify(value)}`),\n '',\n '# What each child READS of the above',\n 'For each child, list in `reads` the returns it needs for ITS objective. A child asked a narrow',\n 'question does not need every sibling\\'s full text, and handing it everything is how an assessor',\n 'runs out of context instead of judging. List every ref when the child genuinely needs them all;',\n 'omit the field only if you cannot tell. Whatever you list, a child still receives anything its',\n 'own declaration requires — you are narrowing evidence, never deciding what it is allowed to run on.',\n ]),\n ...(request.history.length === 0 ? [] : [\n '',\n '# Rounds already run',\n ...request.history.flatMap((iteration) => iteration.children.map((child) =>\n `- ${child.playbookRef} — asked: \"${child.objective}\"`\n + (child.reads ? ` — read: ${child.reads.length === 0 ? 'nothing' : child.reads.join(', ')}` : '')\n + (child.failure ? ` — FAILED: ${child.failure}` : '')\n + (child.reopened && child.reopened.length > 0 ? ` — RE-OPENED ${describeReopenedChildren(child.reopened)}` : ''))),\n /*\n * A re-opened child is a LOOP-BACK, not churn (#1499, #1627): it landed earlier in this run and a\n * verdict sent the run back to it. The criterion is the reason, and it is the one thing the\n * re-offered child cannot see for itself, so the objective has to carry it.\n */\n ...(request.history.some((iteration) => iteration.children.some((child) => (child.reopened?.length ?? 0) > 0))\n ? ['', 'A child marked RE-OPENED was sent back by the verdict named beside it. If you run it again, make its objective what the judge says is wrong — name the element it names, and ask for that correction, not a redo. The objective is all that child will be told.']\n : []),\n ]),\n ].join('\\n');\n\n const generated = await this.buildGenerationPort().generate({ prompt, schema, label: 'choreography:select' });\n const parsed = schema.safeParse(generated.output);\n if (!parsed.success) {\n // The provider had a closed enum, so an unparseable answer means it broke its own contract.\n // Stopping is the only safe reading: a selection that cannot be parsed must never fall back.\n return { children: [], stopRationale: 'The selector returned an answer outside its own option set; stopping.', stopIsNotTheModels: true };\n }\n const stopped = parsed.data.children.find((child) => child.choice === STOP);\n if (stopped) return { children: [], stopRationale: stopped.objective };\n return {\n children: parsed.data.children.map((child) => {\n // `reads` exists on the parsed shape only when the round had something to read; narrowed\n // structurally rather than by re-testing `stepResults.size`, so the two cannot disagree.\n const selected = (child as { readonly reads?: readonly string[] }).reads;\n return {\n playbookRef: child.choice,\n objective: child.objective,\n ...(selected !== undefined ? { reads: selected } : {}),\n };\n }),\n };\n }\n\n /**\n * The cross-family coherence report for the CURRENT working tree.\n *\n * Reads the same artifact state the eligibility gate uses, so the report describes the tree the\n * creator is about to commit rather than the last build. Pure downstream of that read: it computes\n * and returns, and nothing branches on it.\n */\n /**\n * The facts the coherence report needs and no family declares. The served languages come from the\n * same reader the capability composition decides `add-locale` from (`getCompanionServedLanguages`), so\n * the report and the composition compare the market against one answer.\n *\n * TOLERANT on purpose: the report is advisory and \"must never be the thing that breaks\". A\n * configuration that is not readable yet (`AppConfigurationService.config` throws until it is\n * initialized) answers NO host facts, which removes only the language question — never a guessed\n * English, which `getCompanionServedLanguages` would return for a missing configuration and which\n * would invent a contradiction the application does not have.\n */\n private coherenceHostFacts(): ApplicationCoherenceHostFacts {\n /*\n * The DECLARED operating jurisdictions (#2335), from `wildo.saas.config.ts` — read on their own, so an\n * uninitialized runtime configuration removes only the language question. Undeclared or unparseable, the\n * fact is absent and the question is not asked, never answered with \"nowhere\".\n */\n const declared = ApplicationOperatingJurisdictionsSchema.safeParse(\n (this.companionContext?.saasConfig as { operatingJurisdictions?: unknown } | undefined)?.operatingJurisdictions,\n );\n /*\n * The organization model the configuration declares (#3041): a type or relationship kind already declared owes no build\n * task, and one declared otherwise than the domain plan decided is a contradiction. Read off the same loaded\n * `wildo.saas.config.ts` the companion loaded at start (a configuration declaring neither map declares none); absent only\n * when no configuration was loaded, so those two questions are then skipped rather than answered against \"nothing\n * declared\". A type a build task revised since is compared only when no task plans it, and that task is what lands it.\n */\n const saasConfig = this.companionContext?.saasConfig as ApplicationCoherenceOrganizationConfiguration | undefined;\n const organizationFacts: ApplicationCoherenceHostFacts = saasConfig === undefined\n ? {}\n : { organizationConfiguration: { organizationTypes: saasConfig.organizationTypes ?? {}, organizationRelationships: saasConfig.organizationRelationships ?? {} } };\n const jurisdictionFacts: ApplicationCoherenceHostFacts = {\n ...organizationFacts,\n ...(declared.success ? { operatingJurisdictionSlugs: declared.data.jurisdictions.map((entry) => entry.jurisdictionSlug) } : {}),\n };\n let config: unknown;\n try {\n config = this.appConfigService?.config;\n } catch {\n return jurisdictionFacts;\n }\n if (config === undefined || config === null) return jurisdictionFacts;\n return { ...jurisdictionFacts, servedLanguages: getCompanionServedLanguages(config as Parameters<typeof getCompanionServedLanguages>[0]) };\n }\n\n public async buildCoherenceReport(): Promise<{ report: ApplicationCoherenceReport; markdown: string }> {\n const state = await this.readArtifactState();\n const report = buildApplicationCoherenceReport(this.withComputedDocumentFacts(coherenceInputFor(state), state), this.coherenceHostFacts());\n return { report, markdown: renderApplicationCoherenceReport(report) };\n }\n\n /**\n * Run a playbook that assesses rather than produces.\n *\n * The judged subjects are the families it declares as INPUTS — for the phase gate, the top-down\n * definition set it exists to weigh. A declared family with no value is skipped rather than sent\n * as a hole: the judge would have nothing to reason about and would answer INDETERMINATE for a\n * reason that is about the workspace, not the artifact.\n */\n private async runAssessmentPlaybook(input: {\n readonly playbookRef: string;\n readonly playbook: MetaWorkflowPlaybook;\n /*\n * `| null` as well as optional, because that is what the producer actually hands over:\n * `FrameworkKnowledgePlaybook.evaluationTreatment` is `{ value, bytes } | null` — its own comment\n * says \"absent for contained JSON-v1 entries\" — and `null` is not `undefined` once\n * `strictNullChecks` is on (#352).\n *\n * Widened rather than cast at the call site: a parameter should describe what callers pass. No\n * runtime change either way — all three reads in the body are truthiness tests (`? :`,\n * `else if`, `?.`), so `null` and `undefined` already took the same branch.\n */\n readonly hydrated: { readonly evaluationTreatment?: { readonly value: unknown } | null };\n readonly artifactState: PlaybookArtifactState;\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<{\n playbookRef: string;\n assessed: true;\n subjects: readonly string[];\n reviewGuide: string;\n judge?: PlaybookJudgeResult;\n accepted: false;\n }> {\n /*\n * Each subject is RENDERED through the same function the generation brief uses (#1420). The judge\n * used to receive raw `JSON.stringify` of every family and ignore the declaration entirely, so a\n * playbook narrowed to two aspects was generated from two and judged against all of them.\n */\n const subjects: Array<{ family: string; value: unknown; rendered: string; follows: boolean }> = [];\n const valuesByFamily = this.decidedFamilyValues(input.artifactState);\n for (const declared of input.playbook.inputs ?? []) {\n const value = valuesByFamily[declared.family];\n if (value === undefined || value === null) continue;\n subjects.push({ family: declared.family, value, rendered: renderDeclaredInputFamily(declared, value, valuesByFamily), follows: declared.related !== undefined });\n }\n\n let judge: PlaybookJudgeResult | undefined;\n const treatment = input.hydrated.evaluationTreatment\n ? MetaWorkflow_EvaluationTreatmentDefinitionSchema.safeParse(input.hydrated.evaluationTreatment.value)\n : undefined;\n /*\n * The DECLARED derived sections, delivered to the path that actually runs this playbook.\n *\n * `composeCoherenceSection` gates on the playbook's `contextSources` declaration and was only ever\n * called from `composeBrief` — the GENERATION path. An assessing playbook (`outputs: []`) never\n * takes that path, so `top_down.phase-gate` — the sole declarer of `coherence_report`, the playbook\n * the section EXISTS for — judged six families with the arithmetic it declared composed one branch\n * over and delivered to nobody (the promise-vs-delivery class, #259; found by its own sweep,\n * 2026-09-02). Best-effort like the section itself: an unbuildable report must not cost the gate\n * its run.\n */\n const coherenceSection = this.composeCoherenceSection(input.playbook, input.artifactState);\n\n if (treatment?.success) {\n /*\n * Every research-informed subject is screened before the judge reads it (#2938), as a producer's input is (#2937):\n * an assessing playbook's verdict reopens a step and its rationale becomes that step's next instruction. A subject\n * that follows references (`related`) can carry another family's elements, so it is screened too.\n */\n const isResearchInformed = this.researchInformedFamilyPredicate(input.artifactState);\n const landed = await screenResearchInformedJudgeSubjects(\n subjects.map(({ follows, ...subject }) => ({ ...subject, researchInformed: isResearchInformed(subject.family) || follows })),\n this.researchFamilyScreeningHost(input.playbookRef),\n );\n judge = await runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed,\n // Criteria assessing only families this application's line declares not applicable are dropped (#1604).\n ...(input.artifactState.applicationLine ? { notApplicableFamilies: input.artifactState.applicationLine.notApplicableFamilies } : {}),\n ...(coherenceSection !== '' ? { derivedContext: [coherenceSection] } : {}),\n model: this.buildGenerationPort(),\n ...(input.session ? { trace: this.buildTrace(input.session, `playbook-assess-${input.playbookRef}`) } : {}),\n });\n } else if (input.hydrated.evaluationTreatment) {\n judge = { judged: false, skipped: `Compiled evaluation treatment does not satisfy its contract: ${treatment?.success === false ? treatment.error.issues[0]?.message ?? 'unknown issue' : 'unreadable'}` };\n }\n\n this.logDebug('Assessment playbook run', { playbookRef: input.playbookRef, subjects: subjects.length, judged: judge?.judged });\n return {\n playbookRef: input.playbookRef,\n assessed: true as const,\n subjects: subjects.map((subject) => subject.family),\n reviewGuide: renderPlaybookReviewGuide(buildPlaybookReviewGuide({\n treatment: input.hydrated.evaluationTreatment?.value,\n ...(judge !== undefined ? { judge } : {}),\n })),\n ...(judge !== undefined ? { judge } : {}),\n accepted: false as const,\n };\n }\n\n /**\n * The derived coherence report, for the playbook that assesses coherence.\n *\n * Composed only for the declared refs, and best-effort: a report that cannot be built must not\n * cost the gate its run — the model can still assess, just without the arithmetic done for it.\n */\n /**\n * The DETERMINISTIC per-ICP FIT matrix, for a method that consumes a fit signal (#1435).\n *\n * Three methods told their model to \"feed the snapshot to the scorer and read back the scores\",\n * and a structured generation has no tools — so the instruction named an act the model cannot\n * perform, and what it did instead was estimate. The arithmetic is done here and the judgement is\n * left where it belongs, which is exactly `COHERENCE_REPORT`'s trade one method above.\n *\n * Reads the market snapshot this run ALREADY loaded. Every playbook declaring this source also\n * declares `market-snapshot` as an input, so the section adds a computation over knowledge that\n * was already in the brief rather than new knowledge.\n */\n /**\n * The DERIVED risk signals, for a playbook that weighs risk (#1435).\n *\n * `top_down.risk-register`'s method has always said \"if signals were not supplied to this run…\"\n * and nothing had ever supplied them: the six derivations lived in an assurance script and were\n * reachable only there, so the register's derived half was permanently absent.\n *\n * FOUR of the six come from `wildo.saas.config.ts`, which this process already holds — putting\n * them behind a subprocess would spend a process to read a value in memory. The other two need\n * every resource materialized, which only the application's own module graph can do, so they come\n * through the `risk-signals` behavior.\n *\n * BEST-EFFORT on the subprocess half, and the asymmetry with `compliance-primary-facts` is\n * deliberate. That one FAILS CLOSED because a compliance document whose mechanism facts silently\n * came from prose is indistinguishable from a good one. This is the opposite case: the method\n * ALREADY has a marked branch for absent signals, and `application-creation-directive.md` is\n * explicit that a measurement may never become a precondition. Refusing here would make the\n * register unproducible whenever the subprocess is unavailable — a creation step gated on\n * evidence, which is the defect that rule exists to prevent. So the config half is delivered\n * regardless and the resource half is named as missing when it cannot be had.\n */\n private async composeRiskSignalsSection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.RISK_SIGNALS)) return '';\n try {\n const config = (this.companionContext?.saasConfig ?? {}) as {\n engineCapabilities?: Record<string, unknown> | readonly string[];\n dataRetention?: unknown;\n providerComplianceChoices?: Record<string, { deploymentModel?: string } | undefined>;\n providerConfigurations?: Record<string, unknown>;\n };\n\n const allCapabilityRefs = Object.values(EngineCapability).filter((value): value is EngineCapability => typeof value === 'string').sort();\n // The one reading of the declaration (#2848 review), shared with the CLI.\n const enabledRefs = enabledEngineCapabilityNames(config.engineCapabilities);\n\n /*\n * The engine's own predicate, TOTAL over `DataRetentionClass` by construction and already\n * correct for an absent schedule — re-deriving it here is how a signal comes to describe the\n * script rather than the application.\n */\n const allRetentionClasses = Object.values(DataRetentionClass).filter((value): value is DataRetentionClass => typeof value === 'string');\n const undeclaredRetention = undeclaredRetentionClasses(config.dataRetention as never);\n const declaredRetention = allRetentionClasses.filter((value) => !undeclaredRetention.includes(value));\n\n /*\n * The hosting choice is read from `providerComplianceChoices`, NOT from\n * `providerConfigurations` — the contract says so at its own site, because that second field is\n * an opaque bag for a provider's runtime profile and a compliance answer must not live\n * somewhere nothing can read it without knowing the provider. The CONFIGURED providers are\n * still the denominator: one configured with no choice is the UNDECLARED case, which is not the\n * same as self-hosted and must never be reported as a computed absence.\n */\n const choices = config.providerComplianceChoices ?? {};\n const vendorHosted = [...vendorHostedProviderRefs(choices as never)];\n const selfHosted = Object.entries(choices)\n .filter(([, choice]) => choice?.deploymentModel === ProviderDeploymentModel.SELF_HOSTED)\n .map(([ref]) => ref).sort();\n const undeclaredHosting = Object.keys(config.providerConfigurations ?? {}).filter((ref) => !(ref in choices)).sort();\n\n const signals = [\n deriveCapabilitySignal({ enabledRefs, allRefs: allCapabilityRefs }),\n deriveRetentionSignal({ declaredClasses: declaredRetention, undeclared: undeclaredRetention }),\n deriveProviderHostingSignal({ vendorHosted, selfHosted, undeclared: undeclaredHosting }),\n ...await this.deriveResourceBackedRiskSignals(playbook),\n await this.deriveBrandNameTrademarkRiskSignal(),\n ];\n return composeRiskSignalsSection(signals);\n } catch (error) {\n this.logDebug('Risk-signal section composition failed (non-fatal)', { playbookRef: playbook?.ref, error: String(error) });\n return '';\n }\n }\n\n /**\n * The brand name against its trademark screening, from the families this run reads — the engine derivation\n * parses the raw values itself, so this home and the assurance report cannot disagree about it.\n */\n private async deriveBrandNameTrademarkRiskSignal(): Promise<DerivedRiskSignal> {\n const state = await this.readArtifactState();\n return deriveBrandNameTrademarkSignal({\n brand: state.artifactsByFamily.get(ApplicationSpecificationFamily.BRAND_BRIEF),\n screening: state.artifactsByFamily.get(ApplicationSpecificationFamily.BRAND_NAME_SCREENING),\n market: state.artifactsByFamily.get(ApplicationSpecificationFamily.MARKET_SNAPSHOT),\n creatorInputs: state.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS),\n });\n }\n\n /**\n * The signals that need materialized resources (the personal-data pair, MCP and chat-command exposure), or NOTHING\n * when the subprocess cannot answer.\n *\n * Returning an empty list rather than throwing is the marked branch: the register's method already\n * handles an absent derived half, and a run that refused here would have made a measurement into a\n * precondition.\n */\n private async deriveResourceBackedRiskSignals(playbook: MetaWorkflowPlaybook | undefined): Promise<readonly DerivedRiskSignal[]> {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (!backendServiceKey) return [];\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'risk-signals' });\n if (!result.success) {\n this.logDebug('Risk signals: resource-backed half unavailable (the config half is still delivered)', {\n playbookRef: playbook?.ref,\n });\n return [];\n }\n const inputs = result.data as Parameters<typeof derivePersonalDataSignals>[0] & Parameters<typeof deriveMcpExposureSignal>[0]\n & Parameters<typeof deriveChatCommandExposureSignal>[0];\n return [...derivePersonalDataSignals(inputs), deriveMcpExposureSignal(inputs), deriveChatCommandExposureSignal(inputs)];\n }\n\n /**\n * The `operating_jurisdictions` section (#2335): the application's TYPED declaration of where it operates, read\n * from the configuration this companion holds. Empty unless the playbook declares the source; an undeclared or\n * unparseable declaration is said in words by the composer, never rendered as \"nowhere\".\n */\n private composeOperatingJurisdictionsSection(playbook: MetaWorkflowPlaybook | undefined): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.OPERATING_JURISDICTIONS)) return '';\n const declared = ApplicationOperatingJurisdictionsSchema.safeParse(\n (this.companionContext?.saasConfig as { operatingJurisdictions?: unknown } | undefined)?.operatingJurisdictions,\n );\n return composeOperatingJurisdictionsSection(declared.success ? declared.data : undefined);\n }\n\n /**\n * The `creator_stated_facts` section (#2498, #2499): the dossier's answers to every OTHER interview, for a step that must\n * honour facts it does not ask itself. Empty unless the playbook declares the source; never a gate.\n */\n private async composeCreatorStatedFactsSection(playbook: MetaWorkflowPlaybook | undefined, state: PlaybookArtifactState): Promise<string> {\n if (playbook === undefined || !playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.CREATOR_STATED_FACTS)) return '';\n return composeCreatorStatedFactsSection({\n reader: playbook,\n catalog: await this.readParsedCatalog(),\n creatorInputs: state.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined,\n });\n }\n\n /**\n * The FIT section, screened (#2938). The scores are computed, but every row names the ICP it scores (`icpName`) and\n * the feature, benefit and ICP refs, all written by the market snapshot, which research writes. The section is one\n * rendering of that family, screened as one text before the model reads it: withheld when a bound classifier flags any\n * of it (so one flagged ICP name withholds the whole table, the family granularity #2937 accepted), marked when nothing\n * screened it.\n */\n private async composeMarketFitScoresSection(playbook: MetaWorkflowPlaybook | undefined, state: PlaybookArtifactState): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.MARKET_FIT_SCORES)) return '';\n let section: string;\n try {\n section = composeMarketFitScoresSection(this.decidedFamilyValues(state)[ApplicationSpecificationFamily.MARKET_SNAPSHOT]);\n } catch (error) {\n this.logDebug('FIT-score section composition failed (non-fatal)', { playbookRef: playbook?.ref, error: String(error) });\n return '';\n }\n if (section === '') return '';\n const family = ApplicationSpecificationFamily.MARKET_SNAPSHOT;\n const [screened] = await screenResearchInformedRenderings(\n [{ family, text: section, researchInformed: this.researchInformedFamilyPredicate(state)(family) }],\n this.researchFamilyScreeningHost(`${playbook?.ref ?? 'playbook'}:${MetaWorkflow_ContextSource.MARKET_FIT_SCORES}`),\n );\n return screened!.text;\n }\n\n private composeCoherenceSection(playbook: MetaWorkflowPlaybook | undefined, state: PlaybookArtifactState): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.COHERENCE_REPORT)) return '';\n try {\n const report = buildApplicationCoherenceReport(this.withComputedDocumentFacts(coherenceInputFor(state), state), this.coherenceHostFacts());\n return [\n '# Cross-family coherence (COMPUTED, not your judgement)',\n 'The coverage and dangling-reference arithmetic below was computed exactly from the landed',\n 'families. Do NOT re-derive it and do not contradict it. Judge what it cannot: whether an',\n 'uncovered item is a deliberate deferral or an omission, and whether what remains is coherent',\n 'enough for the horizon.',\n '',\n renderApplicationCoherenceReport(report),\n ].join('\\n');\n } catch (error) {\n this.logDebug('Coherence section composition failed (non-fatal)', { playbookRef: playbook?.ref, error: String(error) });\n return '';\n }\n }\n\n /**\n * The declared document facts, as the generation lane's optional input.\n *\n * Read from the artifact state this run already loaded rather than re-reading companion exports —\n * one read, and the facts a draft is checked against are then exactly the facts every other part\n * of this run saw.\n *\n * Three states, and the middle one is why this is not a one-liner:\n *\n * - family ABSENT → `{}` (the key is omitted): the check skips. Correct for an application that\n * has not run `refinement.document-facts`.\n * - family present and VALID → the availability map, empty or not. An empty map is a real answer:\n * this application declares no facts, so every citation is undeclared.\n * - family present and INVALID → omitted, same as absent. \"Present but unreadable\" is not\n * \"declares nothing\" — refusing every draft on a malformed facts file would punish the drafts\n * for a defect the facts family's own validator already reports.\n */\n /**\n * WHICH governed documents this application needs — the optional input F-8 checks a draft against.\n *\n * Unwired until 2026-08-29, so `collectUnrequiredDocumentFindings` returned `[]` at both its call\n * sites and the check SKIPPED in production: the derivation, its validator, its eight pins and its\n * two dispositions were all real, and nothing supplied the one argument that makes them run. The\n * same shape `declaredDocumentFacts` had before it was wired, and the same tell — an optional input\n * whose absence is a legitimate state, so nothing anywhere reports that it is always absent.\n *\n * ## Every field comes from something the application DECLARED\n *\n * `regimes` is DERIVED from the application's typed `operatingJurisdictions` (#1161, below). It is\n * never read from the compliance posture: that family is prose (#3362), and scanning a sentence for\n * the token `GDPR` would manufacture a structured posture out of it. A jurisdiction no known regime\n * covers is logged rather than dropped. A privacy notice stays ADMISSIBLE on `holdsPersonalData`\n * alone either way, which is the point of B2's required-vs-admissible split.\n *\n * ## What the other three read\n *\n * | field | source |\n * |---|---|\n * | `holdsPersonalData` | any resource declaring `RETAIN_AND_IMPERSONALIZE` — the factory-enforced \"holds personal data of its own\" |\n * | `declaresCommercialModel` | a billing capability in the application's own composition |\n * | `runsGovernanceProgramme` | the `compliance-program` family has landed content |\n *\n * The last is a DECISION with no other home, and reading it off the landed family is the honest\n * proxy: an operator who has authored an assurance programme runs one, and one who has not has not.\n * It is also why this is derived per run rather than configured — the answer changes the moment that\n * family lands, with nothing to keep in sync.\n *\n * Returns the key OMITTED, never a half-answer, when the personal-data question cannot be answered:\n * absence skips the check, and a guessed `holdsPersonalData: false` would REFUSE a privacy notice\n * for an application that holds personal data — a refusal derived from a failure to look.\n */\n private async resolveRequiredDocumentSetInput(\n artifactState: PlaybookArtifactState,\n ): Promise<{ requiredDocumentSetInput?: RequiredDocumentSetInput }> {\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (!backendServiceKey) return {};\n let holdsPersonalData: boolean;\n try {\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'compliance-primary-facts' });\n if (!result.success) return {};\n const resources = (result.data as { resources?: ReadonlyArray<{ erasureRetentionMode?: string }> }).resources ?? [];\n /*\n * Compared against the wire value rather than the enum member, and that is not laziness: this\n * subprocess result has crossed a JSON boundary, so it carries strings. The enum is imported for\n * the comparison so a rename in `saas-models` still breaks this build.\n */\n holdsPersonalData = resources.some((resource) => resource.erasureRetentionMode === ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE);\n } catch (error) {\n // Same disposition as a failed request: omit, so the check skips. This one is best-effort\n // because it decides whether an OPTIONAL guard runs, not whether the run may proceed.\n this.logDebug('Required-document-set derivation failed (check will skip)', { error: String(error) });\n return {};\n }\n\n const enabledCapabilities = enabledEngineCapabilityNames(\n (this.companionContext.saasConfig as { engineCapabilities?: Record<string, unknown> | readonly string[] }).engineCapabilities,\n );\n /*\n * `compliance-program` is the family that lands an `AssuranceProgramSpecification`. This read named\n * `assurance-program` — a family no binding defines — so `runsGovernanceProgramme` was false for every\n * application, including Wonder Todos, which has landed one; its governance documents were refused as\n * \"belonging to a programme this operator does not run\". The test agreed, keying its fixture the same way.\n */\n const assuranceProgram = artifactState.artifactsByFamily.get('compliance-program');\n\n /*\n * DERIVED from `operatingJurisdictions`, the application's own typed declaration of where it\n * operates (#229), never from prose and never asked of anybody (#1161).\n *\n * This was hard-coded `[]` with a comment explaining that the regimes the schema wants are free\n * prose on the vision, and that scanning a sentence for \"GDPR\" would manufacture a structured\n * posture. That refusal was right and the consequence was not: with nothing else filling the\n * field, EVERY application derived its privacy notice as merely admissible — including one whose\n * configuration says in typed form that it operates in the EU.\n *\n * A jurisdiction the vocabulary has no regime for (`gb`, whose UK GDPR this small enum does not\n * name) is reported by the derivation and logged here rather than dropped: the application really\n * does operate somewhere Wildo cannot yet speak for, and that is worth saying out loud.\n */\n const declaredJurisdictions = (this.companionContext.saasConfig as {\n operatingJurisdictions?: { jurisdictions?: readonly { jurisdictionSlug?: unknown }[] };\n }).operatingJurisdictions?.jurisdictions ?? [];\n const { regimes, jurisdictionsWithNoKnownRegime } = deriveComplianceRegimes(\n declaredJurisdictions\n .map((entry) => entry.jurisdictionSlug)\n .filter((slug): slug is string => typeof slug === 'string'),\n );\n if (jurisdictionsWithNoKnownRegime.length > 0) {\n this.logDebug('Declared jurisdictions no known privacy regime covers', { jurisdictionsWithNoKnownRegime });\n }\n\n const organizationStructure = this.resolveOrganizationStructure(artifactState);\n return {\n requiredDocumentSetInput: {\n // Copied because the input schema's field is a mutable array; the derivation answers readonly.\n regimes: [...regimes],\n holdsPersonalData,\n declaresCommercialModel: [...enabledCapabilities].some((capability) => capability.startsWith('BILLING')),\n runsGovernanceProgramme: assuranceProgram !== undefined && assuranceProgram !== FILE_PRESENT_WITHOUT_VALUE,\n // Who the privacy notice addresses (#1649): the programme derives each requirement's audience from it.\n ...(organizationStructure === undefined ? {} : { organizationStructure }),\n },\n };\n }\n\n /**\n * How this application's organizations are arranged, from the main line its dossier declares (#1649), or an\n * operator serving clients when a secondary line needs the firm's method (#2305); `undefined` while neither says.\n * Read from the artifact state the run already loaded, so the drafting briefs, the fact brief and the programme's\n * requirements all see the same arrangement.\n */\n private resolveOrganizationStructure(artifactState: PlaybookArtifactState): ApplicationOrganizationStructure | undefined {\n const creatorInputs = artifactState.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS);\n if (creatorInputs === undefined || creatorInputs === FILE_PRESENT_WITHOUT_VALUE) return undefined;\n return resolveApplicationOrganizationStructure(creatorInputs as ApplicationCreatorInputs);\n }\n\n /**\n * Every declared provider's compliance profile, through discovery (#1708) — the same door `wildo config sync` reads,\n * so the brief sees the catalogue vendors' profiles without loading a provider module. BEST-EFFORT: an application\n * whose packages cannot be walked right now gets `profiles: undefined`, which the population reports as NOT READ\n * rather than as \"no provider declares one\".\n */\n private async resolveDiscoveredProviderComplianceProfiles(\n saasConfig: unknown,\n ): Promise<{ profiles?: Record<string, ProviderComplianceProfile>; unreadableReason?: string }> {\n const saasRoot = this.companionContext?.saasRoot;\n if (saasRoot === undefined) return { unreadableReason: 'no application root is known' };\n try {\n const { profilesByProviderRef } = await resolveProviderComplianceProfiles({ saasRoot, saasConfig: (saasConfig ?? {}) as Parameters<typeof resolveProviderComplianceProfiles>[0]['saasConfig'] });\n return { profiles: profilesByProviderRef };\n } catch (error) {\n this.logDebug('Provider discovery unavailable — compliance profiles not read', { error: String(error) });\n return { unreadableReason: 'provider discovery could not be read' };\n }\n }\n\n /**\n * The application's accepted processor register, read from its specifications companion exports.\n *\n * Read from the EXPORTS rather than from the artifact state, unlike the document facts: this is not\n * a landed meta-workflow family, it is an application-authored specification surface — Paul's steer,\n * 2026-08-29, \"we should be able to carry them in the specifications\". Authoring is somebody else's\n * concern; reading it is this method's whole job.\n *\n * A malformed register is treated as ABSENT, exactly as a malformed facts file is: refusing every\n * draft over it would punish the document for a defect in a file the register's own validator\n * reports, and the derivation already has a truthful answer for absence — every configured provider\n * is reported UNDECLARED, which is what \"nobody has established this\" looks like.\n *\n * A register that could not be READ is a different answer (#3258): `notRead` says why, and the brief says that instead\n * of UNDECLARED, which would be a false statement about a register that may be landed. Refusing here would let an\n * unrelated specifications defect block a document designed to be producible with its gaps visible.\n */\n private async resolveProcessorRegister(): Promise<{ readonly register?: ApplicationProcessorRegister; readonly notRead?: string }> {\n let declared: unknown;\n try {\n const exports = await loadSpecificationFamilyData(this.companionContext) as { processorRegister?: unknown } | undefined;\n declared = exports?.processorRegister;\n const absence = exports === undefined ? undefined : unprovenAbsences(exports).get('processorRegister');\n if (absence !== undefined) return { notRead: absence };\n } catch (error) {\n if (error instanceof SpecificationUnavailableError || this.companionContext?.resolvedSpecifications != null) return { notRead: describeCaughtError(error) };\n // No specifications package: no register, and that is a legitimate state rather than a failure.\n this.logDebug('No specifications package, so no processor register', { error: String(error) });\n return {};\n }\n if (declared === undefined) return {};\n const parsed = ApplicationProcessorRegisterSchema.safeParse(declared);\n if (!parsed.success) {\n this.logDebug('Processor register present but unreadable — treated as absent', {\n issues: parsed.error.issues.slice(0, 5).map((issue) => issue.path.join('.')),\n });\n return {};\n }\n return { register: parsed.data };\n }\n\n /**\n * BOTH fact families (#192).\n *\n * A document asserts the FACT, not one family's declaration of it, so reading only the derived half\n * would refuse every clause resting on a fact a human established. Each half is optional and parsed\n * independently: one unreadable file must not erase the other's facts, because that would turn a\n * wiring failure into a content verdict\n * (`.claude/rules/negative-results-require-a-positive-probe.md`).\n *\n * Returns nothing when NEITHER is readable — an empty availability map means \"check against nothing\"\n * and refuses every citation, which is the wrong answer for an application that has simply not run\n * `refinement.document-facts`.\n */\n private resolveDeclaredDocumentFacts(\n artifactState: PlaybookArtifactState,\n ): { declaredDocumentFacts?: ReadonlyMap<string, ComplianceDocumentFactAvailability> } {\n const readFamily = <T>(family: string, schema: { safeParse: (value: unknown) => { success: boolean; data?: T } }): T | undefined => {\n const value = artifactState.artifactsByFamily.get(family);\n if (value === undefined || value === FILE_PRESENT_WITHOUT_VALUE) return undefined;\n const parsed = schema.safeParse(value);\n return parsed.success ? parsed.data : undefined;\n };\n const overlaidDerived = this.documentFactsWithComputedOverlay(artifactState);\n const derivedParse = overlaidDerived === undefined || overlaidDerived === null || overlaidDerived === FILE_PRESENT_WITHOUT_VALUE\n ? undefined\n : ApplicationDocumentFactSpecificationSchema.safeParse(overlaidDerived);\n const derived = derivedParse?.success ? derivedParse.data : undefined;\n const authored = readFamily('document-facts-authored', ApplicationAuthoredDocumentFactSpecificationSchema);\n if (derived === undefined && authored === undefined) return {};\n return { declaredDocumentFacts: collectComplianceDocumentFactAvailability(derived, authored) };\n }\n\n /**\n * Refresh `src/COHERENCE.md` from the tree this run produced.\n *\n * Best-effort: a rendering or write failure must never cost a landing that already happened. The\n * families are the outcome; this is the sheet a reviewer reads beside them.\n *\n * At the package ROOT rather than beside a family, because it belongs to none of them — it exists\n * precisely to answer the questions no single family can.\n */\n private writeCoherenceReport(\n specificationsPackageRoot: string,\n priorState: PlaybookArtifactState,\n landedValues: ReadonlyArray<{ readonly family: string; readonly value: unknown }>,\n ): { packageRelativePath: string; renderedSource: string; existedBefore: boolean; previousContent?: string } | undefined {\n try {\n const after = coherenceInputFor(priorState);\n for (const landed of landedValues) after.set(landed.family, landed.value);\n const rendered = renderApplicationCoherenceReport(buildApplicationCoherenceReport(this.withComputedDocumentFacts(after, priorState), this.coherenceHostFacts()));\n const packageRelativePath = COHERENCE_REPORT_PACKAGE_RELATIVE_PATH;\n const absolutePath = path.join(specificationsPackageRoot, packageRelativePath);\n const existedBefore = existsSync(absolutePath);\n const previousContent = existedBefore ? readFileSync(absolutePath, 'utf8') : undefined;\n writeSpecificationFileAtomicallySync(absolutePath, rendered);\n return { packageRelativePath, renderedSource: rendered, existedBefore, ...(previousContent !== undefined ? { previousContent } : {}) };\n } catch (error) {\n this.logDebug('Coherence report refresh failed (non-fatal)', { error: String(error) });\n return undefined;\n }\n }\n\n /**\n * The governed-document facts computed from the application's declarations (#964) — read, never stored.\n *\n * Takes the specifications exports `readArtifactState` already loaded, so the register is read once.\n * Every input is read tolerantly: an unreadable register, identity or choice map is ABSENT, and an absent\n * input computes no answer. The fact then stays absent and its clauses are marked owed, which is the\n * outcome this lane already gives a declaration nobody has made.\n */\n private async computeDocumentFactAnswers(exports: { processorRegister?: unknown } | undefined): Promise<readonly ComputedDocumentFactAnswer[]> {\n const saasConfig = (this.companionContext?.saasConfig ?? {}) as {\n providers?: { scopes?: Record<string, { providers?: Record<string, unknown> }> };\n operatorComplianceIdentity?: unknown;\n providerComplianceChoices?: unknown;\n dataRetention?: unknown;\n operatingJurisdictions?: unknown;\n systemsOfRecord?: unknown;\n engineCapabilities?: Record<string, unknown> | readonly string[];\n aiUsePosture?: unknown;\n };\n const register = ApplicationProcessorRegisterSchema.safeParse(exports?.processorRegister);\n const identity = ApplicationOperatorComplianceIdentitySchema.safeParse(saasConfig.operatorComplianceIdentity);\n const schedule = saasConfig.dataRetention === undefined ? undefined : ApplicationRetentionScheduleSchema.safeParse(saasConfig.dataRetention);\n const jurisdictions = ApplicationOperatingJurisdictionsSchema.safeParse(saasConfig.operatingJurisdictions);\n const choices = ApplicationProviderComplianceChoicesSchema.safeParse(saasConfig.providerComplianceChoices);\n const recipientPopulation = await recipientPopulationOf(saasConfig, this.companionContext?.saasRoot);\n // Only asked when an answer needs it: the retention facts (a schedule exists) or a system-of-record recipient,\n // whose received categories come from the resources bound or piped to it (#1709). ONE introspection call answers\n // every axis: what erasure does to each resource, which retention class binds it (#1613), and what flows where.\n const needsResourceDeclarations = schedule?.success === true\n || recipientPopulation.members.some((member) => member.kind === RecipientPopulationMemberKind.SYSTEM_OF_RECORD);\n const resourceDeclarations = needsResourceDeclarations ? await this.readResourceRetentionDeclarations() : undefined;\n return computeApplicationDocumentFacts({\n operatorComplianceIdentity: identity.success ? identity.data : undefined,\n processorRegister: register.success ? register.data : undefined,\n recipientPopulation,\n systemOfRecordFlows: resourceDeclarations?.systemOfRecordFlows,\n // #1745 — the vendor the source fact names beside each instance.\n systemOfRecordVendors: systemOfRecordVendorsOf(saasConfig.systemsOfRecord),\n // #1745 — the operator's statement of whether an instance's personal data can come from public sources.\n systemOfRecordPersonalDataOrigins: systemOfRecordPersonalDataOriginsOf(saasConfig.systemsOfRecord),\n providerComplianceChoices: choices.success ? choices.data : undefined,\n retentionSchedule: schedule?.success ? schedule.data : undefined,\n resourceErasureTreatments: schedule?.success ? resourceDeclarations?.resourceErasureTreatments : undefined,\n // Whenever the resources were read, not only under a schedule: the retention facts still need one (they answer\n // nothing without it), while the source fact (#1745) states whether a system-of-record copy is kept until erased\n // from the bindings alone.\n resourceRetentionBindings: resourceDeclarations?.resourceRetentionBindings,\n operatingJurisdictionSlugs: jurisdictions.success ? jurisdictions.data.jurisdictions.map((entry) => entry.jurisdictionSlug) : undefined,\n retentionEnforcementEvidence: this.readCommittedRetentionEnforcementEvidence(),\n // #2847 — the AI-use declarations and the guardrail evidence behind `ai-use-inventory` and `ai-content-guardrails`.\n aiUses: await this.readAiUseInventoryInput(saasConfig),\n aiContentGuardrailEvidence: this.readCommittedAiContentGuardrailEvidence(),\n });\n }\n\n /**\n * The application's AI-use declarations as the `ai-use-inventory` and `ai-content-guardrails` facts read them (#2847):\n * its declared capabilities split by the contracted-service rule (`partitionCapabilitiesByContractedService`, the one\n * the brief and the collector use), the capability-level `aiUsePosture`, and its agents through the same\n * `ai-use-declarations` door the brief reads (#2838's agent-population loader).\n *\n * `undefined` — both facts absent, never \"no AI\" — when the configuration declares no `engineCapabilities` (nobody has\n * said what the application enables) or carries a posture its schema refuses. Agents that could not be read stay\n * `undefined` inside the input, and the facts decide what that leaves them able to say.\n */\n private async readAiUseInventoryInput(saasConfig: {\n providers?: unknown;\n engineCapabilities?: Record<string, unknown> | readonly string[];\n aiUsePosture?: unknown;\n }): Promise<ApplicationAiUseInventoryInput | undefined> {\n if (saasConfig.engineCapabilities === undefined) return undefined;\n const posture = saasConfig.aiUsePosture === undefined ? undefined : ApplicationAiUsePostureSchema.safeParse(saasConfig.aiUsePosture);\n if (posture !== undefined && !posture.success) return undefined;\n const declared = [...enabledEngineCapabilityNames(saasConfig.engineCapabilities)];\n const partition = partitionCapabilitiesByContractedService({ declaredCapabilities: declared, providers: saasConfig.providers });\n const backendServiceKey = Object.entries(this.companionContext?.servicesByKey ?? {}).find(([, service]) => !service.frontendType)?.[0];\n return {\n contractedServiceCapabilities: partition.reachingContractedService,\n authoringOnlyCapabilities: partition.authoringOnly,\n capabilityPosture: posture?.data,\n agents: backendServiceKey === undefined ? undefined : await this.readAgentAiUseDeclarations(backendServiceKey, partition.reachingContractedService),\n };\n }\n\n /**\n * The evidence the `ai-content-guardrails` fact (RUNTIME_EVIDENCE) is computed from (#2847): the agent-operation\n * evidence and the guardrail audit-event counts the assurance collectors last committed.\n *\n * Read from the application's assurance repository, never from the running backend, for the reasons\n * {@link readCommittedRetentionEnforcementEvidence} gives. Absent or unparseable operation-record evidence (including an\n * answer recorded before the door counted per agent) answers `undefined`, so the fact is absent and its clause marked\n * owed. An audit-event count that is absent or unreadable is \"not collected\" inside the fact, never zero.\n */\n private readCommittedAiContentGuardrailEvidence(): AiContentGuardrailEvidence | undefined {\n const saasRoot = this.companionContext?.saasRoot;\n if (typeof saasRoot !== 'string' || saasRoot.length === 0) return undefined;\n const repositoryRoot = join(saasRoot, ASSURANCE_REPOSITORY_RELATIVE_PATH);\n const readJson = (file: string): unknown => {\n if (!existsSync(file)) return undefined;\n try {\n return JSON.parse(readFileSync(file, 'utf8')) as unknown;\n } catch (error) {\n this.logDebug('A committed AI guardrail measurement could not be read (ai-content-guardrails reads it as not collected)', { file, error: String(error) });\n return undefined;\n }\n };\n const operation = readJson(join(repositoryRoot, ...ASSURANCE_AGENT_OPERATION_MEASUREMENT_PATH)) as { evidence?: unknown } | undefined;\n if (operation === undefined) return undefined;\n const auditEventMeasurements = Object.fromEntries(\n Object.entries(ASSURANCE_GUARDRAIL_AUDIT_EVENT_MEASUREMENT_DIRECTORIES).map(([eventType, directory]) => [eventType, readJson(join(repositoryRoot, ...directory, `${eventType}.json`))]),\n );\n const evidence = parseAiContentGuardrailEvidence({ operationRecordsEvidence: operation?.evidence, auditEventMeasurements });\n if (evidence === undefined) this.logDebug('Agent-operation evidence was committed and does not parse, or predates the per-agent counts (ai-content-guardrails stays unanswered)');\n return evidence;\n }\n\n /**\n * The retention-enforcement records the assurance collector last committed (#1636) — what the\n * `retention-enforcement` fact, the first RUNTIME_EVIDENCE fact, is computed from.\n *\n * Read from the application's assurance repository, never from the running backend: generation must not\n * depend on a live stack or hold its credential, and the evidence plane stays an observer the creation lane\n * only reads (`.claude/rules/application-creation-directive.md`). Absent or unreadable answers `undefined`,\n * so the fact is absent and its clause is marked owed — never \"nothing enforced\".\n */\n private readCommittedRetentionEnforcementEvidence(): RetentionEnforcementEvidence | undefined {\n const saasRoot = this.companionContext?.saasRoot;\n // No application root (a host that constructed the service without one): nothing to read, so no evidence.\n if (typeof saasRoot !== 'string' || saasRoot.length === 0) return undefined;\n const measurementFile = join(saasRoot, ASSURANCE_REPOSITORY_RELATIVE_PATH, ...ASSURANCE_RETENTION_ENFORCEMENT_MEASUREMENT_PATH);\n if (!existsSync(measurementFile)) return undefined;\n try {\n const evidence = parseRetentionEnforcementEvidenceJson((JSON.parse(readFileSync(measurementFile, 'utf8')) as { evidence?: unknown }).evidence);\n if (evidence === undefined) this.logDebug('Retention-enforcement evidence was committed and does not parse (retention-enforcement stays unanswered)', { measurementFile });\n return evidence;\n } catch (error) {\n this.logDebug('Retention-enforcement evidence could not be read (retention-enforcement stays unanswered)', { error: String(error) });\n return undefined;\n }\n }\n\n /**\n * Each resource's declared erasure treatment AND retention-class binding, engine and application alike —\n * the two halves of the `retention-rules` fact: what erasure does (#454) and how long rows are kept (#1613).\n *\n * Both `undefined` when the resources cannot be read: no backend service, or a failed introspection. That\n * is not \"no resource declares anything\", and the fact then answers nothing rather than a period alone.\n * The introspection is cached against the source tree, so the repeated reads this path makes are hits.\n */\n private async readResourceRetentionDeclarations(): Promise<{\n readonly resourceErasureTreatments: readonly ResourceErasureTreatment[] | undefined;\n readonly resourceRetentionBindings?: readonly ResourceRetentionBindingFact[] | undefined;\n readonly systemOfRecordFlows?: readonly SystemOfRecordDataFlow[] | undefined;\n }> {\n const unreadable = { resourceErasureTreatments: undefined, resourceRetentionBindings: undefined, systemOfRecordFlows: undefined };\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (!backendServiceKey) return unreadable;\n try {\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'compliance-primary-facts' });\n if (!result.success) return unreadable;\n const resources = (result.data as {\n resources?: ReadonlyArray<{\n resourceType: string;\n erasureRetentionMode?: string;\n statutoryRetention?: { ground?: unknown; rationale?: unknown; staysInUseBecause?: unknown };\n retentionBinding?: unknown;\n declaresRowTtl?: boolean;\n rowLifetime?: unknown;\n erasureExecution?: { erasedAsTheSubject?: unknown; dispositions?: unknown; severerTreatments?: unknown };\n systemOfRecordFlows?: ReadonlyArray<{ system?: unknown; resourceType?: unknown; kind?: unknown; categories?: unknown; unconditionalCategories?: unknown; conditionalCategories?: unknown; uncategorizedPersonalFields?: unknown; purposeRefs?: unknown; subjectRightsPosture?: unknown }>;\n }>;\n }).resources;\n if (resources === undefined) return unreadable;\n const modes = new Set<string>(Object.values(ErasureRetentionMode));\n return {\n resourceErasureTreatments: resources.map((resource) => ({\n resourceType: resource.resourceType,\n // Crossed a JSON boundary, so it is a string; admitted only when it is a member of the vocabulary.\n ...(resource.erasureRetentionMode !== undefined && modes.has(resource.erasureRetentionMode)\n ? { erasureRetentionMode: resource.erasureRetentionMode as ErasureRetentionMode }\n : {}),\n // #2960 — what a person's erasure executes on the rows. Admitted only when both lists are arrays of vocabulary\n // members: a malformed answer is dropped whole, and the fact then states the declared mode alone.\n ...(() => {\n const execution = parseSubjectErasureExecution(resource.erasureExecution);\n return execution === undefined ? {} : { erasureExecution: execution };\n })(),\n // #1635 — the statute that keeps the rows through an erasure. Admitted only as a vocabulary member with a\n // non-empty rationale: a ground the notice cannot name the law for is not stated at all.\n ...(() => {\n const ground = StatutoryRetentionGroundSchema.safeParse(resource.statutoryRetention?.ground);\n const rationale = resource.statutoryRetention?.rationale;\n return ground.success && typeof rationale === 'string' && rationale.trim().length > 0\n ? { statutoryRetention: { ground: ground.data, rationale, ...(typeof resource.statutoryRetention?.staysInUseBecause === 'string' ? { staysInUseBecause: resource.statutoryRetention.staysInUseBecause } : {}) } }\n : {};\n })(),\n })),\n resourceRetentionBindings: resources.map((resource) => {\n // Crossed a JSON boundary too; admitted only when it parses as a binding.\n const binding = ResourceRetentionBindingSchema.safeParse(resource.retentionBinding);\n const rowLifetime = z.enum(ResourceRowLifetime).safeParse(resource.rowLifetime);\n return {\n resourceType: resource.resourceType,\n ...(binding.success ? { retentionBinding: binding.data } : {}),\n declaresRowTtl: resource.declaresRowTtl === true,\n ...(rowLifetime.success ? { rowLifetime: rowLifetime.data } : {}),\n };\n }),\n systemOfRecordFlows: parseSystemOfRecordFlows(resources),\n };\n } catch (error) {\n this.logDebug('Resource retention declarations could not be read (retention-rules stays unanswered)', { error: String(error) });\n return unreadable;\n }\n }\n\n /**\n * The `document-facts` a reader sees: the landed family with the computed facts laid over it (#964).\n *\n * Every reader of the application's facts goes through this — the drafter's input section, the fact\n * availability the landing checks, and an assessing playbook's subjects — so none of them can see a\n * stored copy where the others see the computed answer.\n *\n * An ABSENT or UNREADABLE family is returned as it is, never replaced by the computed facts alone. Absent\n * means the lane has not produced facts yet, which a binding check reads as \"skip\"; unreadable is a defect\n * the family's own validator reports. Either way, a reader shown two facts would take them for everything\n * the application declares and refuse every other citation.\n */\n private documentFactsWithComputedOverlay(state: PlaybookArtifactState): unknown {\n const value = state.artifactsByFamily.get('document-facts');\n const answers = state.computedDocumentFactAnswers ?? [];\n // Overlaid even with NO answer (#1636 review): the overlay also drops any stored copy of a computed fact,\n // and a copy left in the read view is a claim nothing computed — a typed \"ENFORCED\" among them.\n if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE) return value;\n const parsed = ApplicationDocumentFactSpecificationSchema.safeParse(value);\n return parsed.success ? overlayComputedDocumentFacts(parsed.data, answers) : value;\n }\n\n /**\n * The coherence report's input with the computed facts laid over `document-facts` (#964).\n *\n * Applied at the moment the report is BUILT, after any freshly landed family has been set: a run that\n * just regenerated `document-facts` must not have its report compare documents against a file that no\n * longer carries the computed facts, and read every citation of them as dangling.\n */\n private withComputedDocumentFacts(input: Map<string, unknown>, state: PlaybookArtifactState): Map<string, unknown> {\n const answers = state.computedDocumentFactAnswers ?? [];\n const overlaid = this.documentFactsWithComputedOverlay({ artifactsByFamily: input, computedDocumentFactAnswers: answers });\n if (overlaid !== undefined) input.set('document-facts', overlaid);\n return input;\n }\n\n /**\n * The governed-document drafts this application already holds, read from the FILE landing writes.\n *\n * It cannot come from `readArtifactState`, and that is not an oversight: a draft is not accepted\n * application truth, so its family has no companion-exports member, and that read records only a\n * file-presence marker for it. The value has to be imported from the landed module, exactly as\n * `wildo config document-releases` does when it composes a release from the same file.\n *\n * ABSENT IS NOT EMPTY. An empty array says this application holds no drafts, and the landing merges\n * normally; `undefined` says nobody looked, and the landing REFUSES rather than overwrite drafts it\n * cannot see (#895). So a read FAILURE throws rather than answering `[]` — reporting \"no drafts\" for\n * a file that exists but could not be parsed is precisely how the second draft would silently\n * discard the first.\n *\n * Before this was wired, every run was in the `undefined` case: Wonder Todos drafted its privacy\n * notice, and the service-terms run that followed died at the landing with that refusal (2026-09-16).\n */\n private async readLandedComplianceDocumentCandidates(): Promise<readonly ApplicationCreationSpecs.ComplianceDocumentCandidate[] | undefined> {\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (specificationsPackageRoot === undefined) return undefined;\n const target = resolvePlaybookOutputLandingTarget({\n family: 'compliance-document-candidate-set',\n schemaRef: ApplicationCreationSpecs.ApplicationSpecificationFamilySemanticSchemaRef.COMPLIANCE_DOCUMENT_CANDIDATE_SET,\n constantPrefix: LANDED_CONSTANT_PREFIX,\n });\n const modulePath = join(specificationsPackageRoot, target.packageRelativePath);\n if (!existsSync(modulePath)) return [];\n const loaded = await importLandedTypeScriptModule(modulePath, import.meta.url);\n const set = loaded[target.exportedConstantName] as ApplicationCreationSpecs.ApplicationComplianceDocumentCandidateSet | undefined;\n if (set === undefined) {\n throw new Error(\n `The landed draft set at ${modulePath} does not export ${target.exportedConstantName} — the constant landing writes — `\n + 'so which governed documents this application already drafted is unknown, and landing another would discard them.',\n );\n }\n return set.candidates;\n }\n\n /**\n * The application's line scope from the creator's answers ALONE (#1639) — what\n * {@link readArtifactState} derives, without the git freshness, build-plan and document-fact reads\n * that make a full state cost minutes. Same inputs, same resolver: the dossier as the specification\n * companion exports carry it (the load is cached by tree signature, so the full read that may follow\n * does not pay for it twice), and the whole compiled catalog.\n *\n * A read that FAILS answers no scope, and the choreography decides the slow way. This is an\n * optimisation and must never be a new way for a run to fail: the loop's first tree read performs the\n * same load, so a genuine failure still surfaces — there, with that read's own context.\n */\n private async readApplicationLineScope(): Promise<PlaybookApplicationLineScope | undefined> {\n try {\n const exports = (await loadSpecificationFamilyData(this.companionContext)) as unknown as Record<string, unknown>;\n const field = APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS\n .find((binding) => binding.family === ApplicationSpecificationFamily.CREATOR_INPUTS)?.companionExportsField;\n const creatorInputs = (field === undefined ? undefined : exports[field] ?? undefined) as ApplicationCreatorInputs | undefined;\n return resolveApplicationLineScope({ catalog: readCompiledApplicationLineCatalog(), creatorInputs });\n } catch (error) {\n this.logDebug('The application line could not be read before the tree; the choreography reads it the slow way', { error: describeCaughtError(error) });\n return undefined;\n }\n }\n\n private async readArtifactState(): Promise<PlaybookArtifactState> {\n const artifactsByFamily = new Map<string, unknown>();\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n\n const exports = await loadSpecificationFamilyData(this.companionContext);\n const unavailableFamilies = new Map<string, string>();\n for (const binding of APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS) {\n // A family with no companion-exports member is not accepted truth (a draft). It has no value to\n // read here and falls through to the file-presence pass below, which is the honest answer for it.\n if (binding.companionExportsField === undefined) continue;\n try {\n const value = (exports as unknown as Record<string, unknown>)[binding.companionExportsField];\n if (value !== undefined && value !== null) {\n // The dossier is read WITH the answers the application's declarations give (#3438); never written back from here.\n artifactsByFamily.set(binding.family, binding.family === ApplicationSpecificationFamily.CREATOR_INPUTS\n ? withApplicationDeclaredAnswers(value as ApplicationCreatorInputs, this.companionContext.saasConfig)\n : value);\n }\n } catch (error) {\n if (!(error instanceof SpecificationUnavailableError)) throw error;\n // Its module failed: not absent, so no playbook is offered to produce it (#3258). See `unavailableFamilies`.\n unavailableFamilies.set(binding.family, error.message);\n if (binding.family !== ApplicationSpecificationFamily.CREATOR_INPUTS) artifactsByFamily.set(binding.family, FILE_PRESENT_WITHOUT_VALUE);\n }\n }\n // Absent beside a failed module, which may be what declares it (#3258): held rather than offered. See `unprovenAbsences`.\n const absences = unprovenAbsences(exports);\n for (const binding of APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS) {\n const absence = binding.companionExportsField === undefined ? undefined : absences.get(binding.companionExportsField);\n if (absence !== undefined) unavailableFamilies.set(binding.family, absence);\n }\n const failedSpecificationModules = (await readSpecificationFamiliesWholeValueBasis(this.companionContext)).unevaluatedModules;\n\n if (specificationsPackageRoot) {\n for (const family of FILE_ONLY_ARTIFACT_FAMILIES) {\n if (artifactsByFamily.has(family)) continue;\n const packageRelativePath = getFamilyPackageRelativePath(family);\n if (packageRelativePath && existsSync(join(specificationsPackageRoot, packageRelativePath))) {\n // Present, but unreadable as a value: recorded as an opaque marker so `artifact_exists` can be\n // answered truthfully while `artifact_valid` still fails closed for want of a validator.\n artifactsByFamily.set(family, FILE_PRESENT_WITHOUT_VALUE);\n }\n }\n }\n /*\n * Git freshness for the families that HAVE content, and only those.\n *\n * Absent families are skipped because absence is not a change — the derivation treats a family\n * with no entry as unmoved, which is pinned. That keeps this to two git reads per PRESENT family\n * (six on wonder-crm) rather than per known family, on a call the eligibility board makes every\n * time it is asked.\n */\n const draftArtifactsByFamily = await this.readLandedDraftArtifacts(specificationsPackageRoot);\n\n /*\n * The application's main line (#1603). Supplied on EVERY state this host builds, because this state\n * is where every door that starts a playbook meets the line: the run route, the workbench dispatch,\n * the conversation tool, resume, the loop and each nested choreography level all ask eligibility on it.\n */\n const creatorInputs = artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined;\n const catalog = await this.readParsedCatalog();\n // The line is walked over the WHOLE compiled catalog, structurally: a composite failing the full contract\n // must not take its subtree out of the line (see readCompiledApplicationLineCatalog).\n const applicationLine = resolveApplicationLineScope({ catalog: readCompiledApplicationLineCatalog(), creatorInputs });\n /*\n * A family the line declares not applicable is HIDDEN, even when a file for it exists (#1604): one left\n * by a previous line, or written by hand, is not truth about this application. Hidden here, BEFORE git\n * freshness and everything else is derived, so eligibility, briefs, staleness and the build all agree.\n * The file is never deleted: it records an earlier decision, and it comes back if the line switches back.\n */\n const ignoredLandedFamilies = [...applicationLine.notApplicableFamilies].filter((family) => artifactsByFamily.has(family)).sort();\n for (const family of applicationLine.notApplicableFamilies) artifactsByFamily.delete(family);\n /*\n * A family a DECISION has set aside (#1606): every playbook producing it is gated on a decision now\n * decided otherwise, e.g. a website plan whose composition since declined the website. Hidden like a\n * not-applicable family, for the same reason and before the same derivations; the file is kept, and is\n * visible again the moment the decision flips back.\n */\n const deactivatedFamilies = collectFamiliesDeactivatedByDecisions({ playbooks: catalog, artifactsByFamily });\n for (const entry of deactivatedFamilies) artifactsByFamily.delete(entry.family);\n\n const familyGitFreshness = await this.resolveFamilyGitFreshness([...artifactsByFamily.keys()]);\n const codeSurfaceCommittedAt = await this.resolveCodeSurfaceCommittedAt();\n const landingHistory = await this.resolveLandingHistory([...artifactsByFamily.keys()], specificationsPackageRoot);\n const buildPlanExecution = artifactsByFamily.has('build-plan')\n ? await this.resolveBuildPlanExecutionState(familyGitFreshness)\n : undefined;\n // A register a failed module holds cannot be read: the facts resting on it are not computed from nothing.\n const computedDocumentFactAnswers = unavailableFamilies.has(ApplicationSpecificationFamily.PROCESSOR_REGISTER)\n ? []\n : await this.computeDocumentFactAnswers(exports as unknown as { processorRegister?: unknown } | undefined);\n /*\n * Charters older than their shaping inputs (#2819), so the staffing step is offered again when the brand, the market\n * or the design system changed after a persona was shaped. Each file is dated by the run that last wrote it, else by\n * its last commit, through the same memoised register and git reads as above. Never throws: what it cannot date it\n * does not report.\n */\n // While the build is unfinished, the inputs the build writes do not age a charter (#4022): read off this state's plan.\n const expertCharterDrift = await this.expertPersonas.assessCharterDrift(artifactsByFamily.get(ApplicationSpecificationFamily.EXPERT_PERSONAS), {\n buildUnfinished: isBuildUnfinished({ buildPlanExecution }),\n });\n /*\n * The creator's answers as an IMPLICIT INPUT of the playbooks that READ them (#1454, Step 8): per\n * playbook, the latest `answeredAt` among the answers it reads. Per answer rather than per file —\n * the dossier is one family for every interview, so its commit time would make a vision answer\n * stale-flag the market snapshot. Per READING playbook rather than per recording one, through the\n * runtime's shared-decision resolution, so a decision answered once at its owner also dates the\n * step that asks it through `sameDecisionAs` (gap-4 review).\n */\n // Each instant's answer, from the same derivation, so a REFRESH it causes names the answer that moved (#3270).\n const creatorInputLatestAnswerByPlaybook = Array.isArray(creatorInputs?.answers) && creatorInputs.answers.length > 0\n ? buildCreatorInputLatestReadAnswerByPlaybook(catalog, creatorInputs)\n : new Map<string, PlaybookLatestReadAnswer>();\n const creatorInputAnsweredAtByPlaybook = new Map([...creatorInputLatestAnswerByPlaybook].map(([ref, answer]) => [ref, answer.at]));\n return {\n artifactsByFamily,\n ...(unavailableFamilies.size > 0 ? { unavailableFamilies } : {}),\n ...(failedSpecificationModules.length > 0 ? { failedSpecificationModules } : {}),\n applicationLine: ignoredLandedFamilies.length > 0 ? { ...applicationLine, ignoredLandedFamilies } : applicationLine,\n // The logo step's panel, so the board's staffing standing reads the whole roster (#2462).\n additionalExpertConveners: hostExpertConveners(applicationLine),\n ...(expertCharterDrift.length > 0 ? { expertCharterDrift } : {}),\n ...(deactivatedFamilies.length > 0 ? { deactivatedFamilies } : {}),\n familyGitFreshness,\n ...(codeSurfaceCommittedAt.size > 0 ? { codeSurfaceCommittedAt } : {}),\n ...(landingHistory ? { landingHistory } : {}),\n ...(creatorInputAnsweredAtByPlaybook.size > 0 ? { creatorInputAnsweredAtByPlaybook, creatorInputLatestAnswerByPlaybook } : {}),\n ...(draftArtifactsByFamily.size > 0 ? { draftArtifactsByFamily } : {}),\n ...(computedDocumentFactAnswers.length > 0 ? { computedDocumentFactAnswers } : {}),\n ...(buildPlanExecution ? { buildPlanExecution } : {}),\n };\n }\n\n /**\n * The landed DRAFT families, read as values for the coherence report, and as keys by the rerun verdict, which\n * must see a landed draft as on disk (#3454). Never by eligibility.\n *\n * A draft has no `companionExportsField` on purpose — it is not accepted truth, and `artifact_valid`\n * must keep failing closed for it. So its value cannot go into `artifactsByFamily`, which eligibility\n * reads. It travels on `draftArtifactsByFamily` instead; see that field's contract.\n *\n * The population is DERIVED — every binding with no companion-exports slot whose landing file exists\n * — rather than a second hand-maintained list beside the landing catalog. Today that resolves to\n * exactly one family, `compliance-document-candidate-set` (the singular producer lands INTO it and is\n * skipped), so nothing else changes; when a second draft\n * family lands it is covered without an edit here, which is the failure `COHERENCE_FAMILIES` already\n * warns about in its own docblock.\n *\n * Best-effort by construction: an unparseable or half-written draft must cost nobody their run. The\n * report then simply says less about that family, which is what it said before this existed.\n */\n private async readLandedDraftArtifacts(specificationsPackageRoot: string | undefined): Promise<Map<string, unknown>> {\n /*\n * One loader, shared with the decided-element doors (#1426): the draft population is derived by\n * `readableDraftFamilyLandings`, which also skips a family that lands INTO another — the\n * produced/landed pair shares one file, and handing the producer's schema the set made the coherence\n * report claim, permanently and falsely, that a valid compliance file failed its own schema (#1245).\n */\n return loadDraftFamilyValues(specificationsPackageRoot);\n }\n\n /**\n * When each playbook last landed and when each present family last changed, from the run-write\n * register — what lets an unattended selection withhold a playbook whose inputs have not moved\n * (`PlaybookEligibility.rerun`, 2026-10-01). Families are keyed by their landing file, app-root-relative,\n * which is how the register records a run's writes.\n */\n private async resolveLandingHistory(\n families: readonly string[],\n specificationsPackageRoot: string | undefined,\n ): Promise<PlaybookLandingHistory | undefined> {\n const familyFiles = new Map<string, string>();\n if (specificationsPackageRoot) {\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);\n for (const family of families) {\n const packageRelativePath = getFamilyPackageRelativePath(family);\n if (packageRelativePath) familyFiles.set(family, path.posix.join(specificationsRelativeRoot, packageRelativePath));\n }\n }\n return this.writeRegister.deriveLandingHistory(familyFiles);\n }\n\n /**\n * What git says about each family's path: does it carry working edits, and when was it last\n * committed. The two facts {@link deriveOneFamilyFreshness} interprets.\n *\n * The HOST half of the split, deliberately: reading git is this service's job, and deciding what a\n * commit time MEANS is the runtime's. That is what lets the whole staleness rule be tested against\n * a literal map with no repository.\n *\n * Reads are best-effort per family. A family whose path cannot be resolved contributes no entry,\n * which the derivation reads as \"absent\", not as \"changed\" — the conservative direction for an\n * ANNOTATION, whose cost of a false positive is a creator chasing a re-derivation that was not\n * needed.\n */\n private async resolveFamilyGitFreshness(\n families: readonly string[],\n ): Promise<Map<string, PlaybookFamilyGitFreshness>> {\n const freshness = new Map<string, PlaybookFamilyGitFreshness>();\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) return freshness;\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);\n\n const present = families.flatMap((family) => {\n const packageRelativePath = getFamilyPackageRelativePath(family);\n if (!packageRelativePath) return [];\n const familyPath = path.posix.join(specificationsRelativeRoot, packageRelativePath);\n if (!existsSync(join(this.companionContext.saasRoot, familyPath))) return [];\n return [{ family, familyPath }];\n });\n if (present.length === 0) return freshness;\n\n /*\n * ONE batched answer for \"is it committed\" across every present family, rather than the\n * `ls-files` + `status` PAIR of subprocesses each family used to cost on its own.\n *\n * This call is on the eligibility board's hot path — the board makes it every time it is asked —\n * so its cost is paid per poll, and a spawn storm starves the event loop the readiness endpoint\n * shares. Measured 2026-09-22 with an in-process counter at the spawn site: this method was the\n * single largest remaining source of git subprocesses in the companion.\n *\n * The commit TIMES go through `lastCommitUnixTimes`, which memoises them against the HEAD object\n * id. An earlier revision of this comment said they had \"no equivalent batched form that is\n * cheaper in the general case\", which is true of batching the WALK and beside the point: the\n * answer depends only on the commit graph, so it cannot change while HEAD is unmoved, and the\n * right saving is not to ask again rather than to ask more cleverly. Once the other two readers\n * were batched this was the largest per-path caller left.\n */\n const familyPaths = present.map((entry) => entry.familyPath);\n const [committedFamilyPaths, lastCommitTimes] = await Promise.all([\n this.git.selectCommittedPaths(familyPaths),\n this.git.lastCommitUnixTimes(familyPaths),\n ]);\n\n for (const { family, familyPath } of present) {\n try {\n const committed = committedFamilyPaths.has(familyPath);\n const lastCommitUnixTime = lastCommitTimes.get(familyPath);\n freshness.set(family, { committed, ...(lastCommitUnixTime !== undefined ? { lastCommitUnixTime } : {}) });\n } catch (error) {\n // A git read that throws leaves the family absent from the map, which reads as unmoved. An\n // annotation must never become an alarm because a subprocess failed.\n this.logDebug('Family git freshness read failed (non-fatal)', { family, error: String(error) });\n }\n }\n return freshness;\n }\n\n /**\n * When each application code surface was last committed (#2506): the implicit input of a playbook whose context\n * sources read the code, so document facts derived before the build declared billing and personal data go stale\n * once it has.\n *\n * Where each surface lives is this host's knowledge, kept here and nowhere else:\n * - the application configuration is `wildo.saas.config.ts`;\n * - the backend configuration is each backend service's `src/saas-config.backend.ts` (the skeleton's fixed file);\n * - the resource declarations are each library's `src`.\n *\n * A surface's instant is the latest of its paths. Committed history only: an uncommitted edit is a working edit, and\n * the companion commits a run's writes, so the next poll dates it. Same memoised git reads as the family freshness,\n * so a poll costs one `rev-parse` while HEAD is unmoved. Never throws: an unreadable surface dates nothing.\n */\n private async resolveCodeSurfaceCommittedAt(): Promise<Map<ApplicationCodeSurface, number>> {\n const committedAt = new Map<ApplicationCodeSurface, number>();\n try {\n const saasRoot = this.companionContext.saasRoot;\n const relativeToRoot = (absoluteOrRelative: string) => path.posix.normalize(path.relative(saasRoot, path.resolve(saasRoot, absoluteOrRelative)).split(path.sep).join('/'));\n const pathsBySurface: Record<ApplicationCodeSurface, string[]> = {\n [ApplicationCodeSurface.APPLICATION_CONFIGURATION]: ['wildo.saas.config.ts'],\n [ApplicationCodeSurface.BACKEND_CONFIGURATION]: Object.values(this.companionContext.servicesByKey ?? {})\n .filter((service) => !service.frontendType)\n .map((service) => path.posix.join(relativeToRoot(service.path), 'src', 'saas-config.backend.ts')),\n [ApplicationCodeSurface.RESOURCE_DECLARATIONS]: Object.values(this.companionContext.resolvedLibraries ?? {})\n .map((library) => path.posix.join(relativeToRoot(library.packageRoot), 'src')),\n };\n const present = Object.fromEntries(Object.entries(pathsBySurface)\n .map(([surface, paths]) => [surface, paths.filter((relativePath) => existsSync(join(saasRoot, relativePath)))])) as Record<ApplicationCodeSurface, string[]>;\n const times = await this.git.lastCommitUnixTimes(Object.values(present).flat());\n for (const surface of Object.values(ApplicationCodeSurface)) {\n const instants = present[surface].flatMap((relativePath) => (times.has(relativePath) ? [times.get(relativePath)!] : []));\n if (instants.length > 0) committedAt.set(surface, Math.max(...instants));\n }\n } catch (error) {\n this.logDebug('Code surface commit times could not be read (nothing is dated by them)', { error: String(error) });\n }\n return committedAt;\n }\n\n /**\n * The build plan's execution progress plus git-derived input freshness — the eligibility board's\n * evidence for \"the build has moved past decomposition\".\n *\n * Freshness fails OPEN on purpose: when the build plan has no commit yet, or a timestamp cannot be\n * read, `upstreamChangedSinceBuildPlanLanded` answers true and the completion gate stays open. The\n * gate may only close on POSITIVE evidence that everything is current — a gate that closes on an\n * unreadable answer is the phantom-incompatibility shape all over again.\n *\n * That fail-open is now `derivationPointUnknown` on the SHARED derivation rather than a second\n * copy of the comparison. This gate and the board's `staleOutputs` annotation ask the same question\n * about the same pair and read the answer differently — the gate ORs in the unknown case, the\n * annotation does not (an uncommitted output is a working edit, not a stale one). Two derivations\n * of one fact would be two things that can disagree, and the disagreement would be invisible\n * because each would have its own passing tests.\n */\n private resolveBuildPlanExecutionState(\n familyGitFreshness: ReadonlyMap<string, PlaybookFamilyGitFreshness>,\n ): Promise<PlaybookArtifactState['buildPlanExecution']> {\n return this.buildDispatch.resolveBuildExecutionProgress().then((progress) => {\n if (!progress) return undefined;\n const derived = deriveOneFamilyFreshness('build-plan', BUILD_DECOMPOSE_INPUT_FAMILIES, familyGitFreshness);\n return {\n ...progress,\n upstreamChangedSinceBuildPlanLanded: derived.derivationPointUnknown || derived.changedInputs.length > 0,\n };\n });\n }\n\n /**\n * Families this runtime can actually write a file for.\n *\n * Delegated, not computed here. The first version asked \"does the family have a directory?\", which is a\n * PLACEMENT question — `build-plan` has one and still cannot be rendered — so the live board offered\n * `bottom_up.build-decompose` as runnable and the loop's write refused. The runtime owns the join\n * between a family's validator and its render profile; a companion-side approximation of it is exactly\n * the restated list that drifts.\n */\n private resolveLandableFamilies(): ReadonlySet<string> {\n return getLandableArtifactFamilies();\n }\n\n /**\n * Chain playbooks unattended: gate → the model chooses → run → re-read the tree → repeat.\n *\n * The two halves are deliberately different in kind. The GATE is code and is recomputed from the working\n * tree at the top of every iteration; the CHOICE is the model's, constrained to a Zod enum built from\n * that iteration's eligible set, so it cannot widen its own options. A run that fails stops the loop,\n * because choosing again from unchanged state would spend without progressing.\n */\n public async runPlaybookLoop(input: {\n readonly goal: string;\n readonly maximumIterations: number;\n readonly maximumLanesPerIteration?: number;\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<PlaybookLoopResult> {\n // The loop's OWN steps — the gate and the model's choice between iterations — are work a restart\n // kills too, not only its lanes; counted for its whole life like any run.\n this.loopsInFlight = (this.loopsInFlight ?? 0) + 1;\n try {\n return await this.whileInFlight(() => this.runPlaybookLoopCounted(input));\n } finally {\n this.loopsInFlight = Math.max(0, (this.loopsInFlight ?? 1) - 1);\n }\n }\n\n /**\n * Loops running in this process (#2233). The pulse's `runsInFlight` counts detached submissions only, and a loop is\n * not one: it holds its request. The unattended driver must know a loop is still running after IT stopped waiting\n * for the request, so it never starts a second loop over the first (which the engine's LOOP lease would refuse).\n */\n private loopsInFlight = 0;\n\n /**\n * What the unattended creation driver (`wildo creation drive`, #2233) needs beyond the feed to decide its next step:\n * whether anything still runs in this process (a loop, a detached run such as a wave or a usage-limit resume, any other\n * playbook execution), a person's build stop read live, and the pending usage-limit resume. The other holds (usage\n * limit, connectivity, a backend that does not boot) and what waits on the creator are the feed's, read from the same\n * rows Home shows. Another PROCESS's loop is not seen here; the loop route refuses it (409), and the driver waits.\n */\n public readCreationDriveStatus(): {\n readonly loopsInFlight: number;\n readonly detachedRunsInFlight: number;\n readonly executionsInFlight: number;\n readonly buildStoppedSince?: string;\n readonly pendingBuildResume?: { readonly resumesAt: string };\n readonly codingAgentAccountRefusal?: ModelProviderAccountRefusal;\n } {\n const pendingBuildResume = this.readPendingBuildResume();\n // #3204: the live hold says whether the pending resume only re-asks a refused account, which a person must fix.\n const codingAgentAccountRefusal = this.buildDispatch.readCodingAgentUsageLimitHold()?.accountRefusal;\n const buildStoppedSince = this.buildDispatch.readBuildStopHold();\n return {\n loopsInFlight: this.loopsInFlight ?? 0,\n detachedRunsInFlight: this.runningDetachedRuns?.size ?? 0,\n // Every playbook execution in this process, a synchronous one included (review of 6fe527ed3).\n executionsInFlight: this.playbookExecutionsInFlight ?? 0,\n // Read live, not from a feed snapshot: a stop asked a moment ago holds now (review of 6fe527ed3).\n ...(buildStoppedSince === undefined ? {} : { buildStoppedSince }),\n ...(pendingBuildResume === undefined ? {} : { pendingBuildResume: { resumesAt: pendingBuildResume.resumesAt } }),\n ...(codingAgentAccountRefusal === undefined ? {} : { codingAgentAccountRefusal }),\n };\n }\n\n private async runPlaybookLoopCounted(input: {\n readonly goal: string;\n readonly maximumIterations: number;\n readonly maximumLanesPerIteration?: number;\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<PlaybookLoopResult> {\n let loopFailureMeasurement: PlaybookRunMeasurement | undefined;\n /** Rounds the loop's lanes inherited from checkpoints, fulfilled or failed — for the loop's own failure record (#1507). */\n const lanesInherited = { rounds: 0 };\n try {\n /*\n * THE LOOP IS AN EXECUTION (#1361). Its runs always were; the loop driving them was the one\n * long-running unit of this lane with no row at all, so a companion restart mid-loop left\n * nothing saying one had been going. Opened and settled by the engine's driver — COMPLETED with\n * why it stopped and how many steps it took, FAILED with the message when it throws — and swept\n * at startup with the rest of `meta-workflows.system`'s orphans.\n *\n * ONE loop per application, by the engine's lease on the `LOOP` subject: the in-memory flag\n * this replaced could not see a loop running in another process, and forgot one on restart.\n * Manual single-playbook runs are deliberately NOT blocked — the human is the authority, and\n * git + the write register show exactly what happened.\n */\n return await this.actorsSystem.runActorExecution(\n {\n systemRef: META_WORKFLOWS_SYSTEM_REF,\n actorRef: META_WORKFLOWS_PLAYBOOK_LOOP_ACTOR_REF,\n exclusiveSubject: MetaWorkflowsExclusiveSubject.LOOP,\n task: {\n title: 'Playbook loop',\n description: 'An unattended chain of playbook runs: gate, choose, run, re-read the tree, repeat.',\n topic: Actor_Task_Topics.PLANNING,\n input: { goal: input.goal, maximumIterations: input.maximumIterations, maximumLanesPerIteration: input.maximumLanesPerIteration ?? null },\n ...(input.session\n ? { correlation: { domain: META_WORKFLOWS_CORRELATION_DOMAIN, refs: { traceSessionId: input.session.sessionId } } }\n : {}),\n },\n ...(input.session ? { scope: input.session } : {}),\n },\n async () => {\n /*\n * Measured around the whole loop as well (#1507): its steps carry their own figures when it\n * returns, and a loop that THROWS (a selection or a tree read failing) still records what it\n * spent up to then, beside the engine's failure.\n */\n const startedAtMs = Date.now();\n const measured = await this.spendMeter.measure(() => this.executePlaybookLoop(input, lanesInherited));\n if (measured.settled.status === 'rejected') {\n loopFailureMeasurement = {\n durationMs: Date.now() - startedAtMs,\n // The meter saw this process's calls; rounds its lanes inherited were paid by an earlier one.\n spend: mergePlaybookSpend([measured.spend, ...Array.from({ length: lanesInherited.rounds }, () => PLAYBOOK_SPEND_NOT_OBSERVED)]),\n };\n throw measured.settled.reason;\n }\n return measured.settled.value;\n },\n {\n recordBesideFailure: () => (loopFailureMeasurement ? { measurement: loopFailureMeasurement } : null),\n concludeAs: (result) => ({\n status: FlowsActors_Status.COMPLETED,\n /*\n * What the loop took and spent, per step and per lane, and which steps began over an\n * unchanged tree (#1507). Each lane's own run is also measured on ITS row; this is the\n * loop's view, which adds the selection calls no run row carries.\n */\n taskOutput: summarizePlaybookLoopResult(result),\n }),\n },\n );\n } catch (error) {\n throw await this.nameTheRunHoldingTheSubject(error, MetaWorkflowsExclusiveSubject.LOOP, MetaWorkflowsExclusiveSubject.LOOP, input.session);\n }\n }\n\n private async executePlaybookLoop(input: {\n readonly goal: string;\n readonly maximumIterations: number;\n readonly maximumLanesPerIteration?: number;\n readonly session?: CompanionExecutionSessionContext;\n }, lanesInherited: { rounds: number } = { rounds: 0 }): Promise<PlaybookLoopResult> {\n const playbooks = await this.readParsedCatalog();\n this.logDebug('Starting playbook loop', {\n goal: input.goal,\n maximumIterations: input.maximumIterations,\n maximumLanesPerIteration: input.maximumLanesPerIteration,\n catalogSize: playbooks.length,\n });\n return await runPlaybookLoop({\n goal: input.goal,\n playbooks,\n landableFamilies: this.resolveLandableFamilies(),\n readArtifactState: () => this.readArtifactState(),\n // A quick interview's skipped questions are assumed rather than waited on (#2129).\n assumeInterviewAnswers: (request) => this.assumeInterviewAnswers(request),\n // An iteration waits at its top while the dev supervisor holds a restart, so the restart kills nothing (#3204); waiting\n // on its lanes, which are runs counted themselves, it is paused.\n awaitRestartWindow: () => this.awaitRestartWindow(),\n whilePaused: (work) => companionRestartDrain.whilePaused(work),\n // Lanes of one iteration call this CONCURRENTLY. Safe because admitted lanes are output-disjoint\n // by construction and the write register records per run — where \"output\" is a lane's TRANSITIVE\n // write scope (`resolvePlaybookWriteScope`), so a composite lane is judged by what its children\n // land rather than by its own empty `outputs[]`. This comment said \"each lands different family\n // files\" while a composite lands none of its own, which read as a proof and was the claim that\n // made the hole invisible.\n // A failed lane's inherited rounds, read from what it threw (#1507), and counted for the loop's own record.\n inheritedRoundsOfFailure: (reason) => {\n const rounds = typeof reason === 'object' && reason !== null ? this.inheritedRoundsByFailure.get(reason) : undefined;\n if (rounds !== undefined) lanesInherited.rounds += rounds;\n return rounds;\n },\n runPlaybook: async (lane) => {\n const result = await this.runPlaybook({\n playbookRef: lane.playbookRef,\n // #1423 — the selector's reason for THIS lane reaches the run it explains. It was written\n // per lane and read only by the returned step until now.\n selectionRationale: lane.rationale,\n ...(input.session ? { session: input.session } : {}),\n });\n // The composite foundation executor lands no family files; its deliverable is the\n // composed application. (The loop cannot select it today — it requires the tenancy\n // elicitation answer, which only an explicit run carries — but the type union reaches\n // here, and an empty landed set is its truthful projection.)\n // Neither the composite executor nor a suspension lands a family file. A suspension cannot\n // occur here today (the loop supplies no clarification answers, and an unanswerable question\n // would stall it), but the union reaches this point and an empty set is its truthful\n // projection — the loop's own eligibility gate decides what to do next either way.\n // An ASSESSMENT lands nothing either — its deliverable is the verdict, and the loop's\n // eligibility gate reads artifacts rather than verdicts, so an empty set is truthful.\n // A DISPATCH run lands application CODE in the workspace, never a family file — and unlike\n // the three cases above, the loop CAN reach it: `bottom_up.build-dispatch` becomes eligible\n // the moment a build-plan exists. An empty landed set is truthful here for a different\n // reason than theirs: not \"nothing happened\", but \"what happened is not a family landing\",\n // and the loop's eligibility gate reads families. Its progress is visible through\n // `resolveBuildExecutionProgress`, which counts landed TASKS.\n // `verified` joins them for the same reason: a DETERMINISTIC_CLI run answers a question about\n // the built application and lands no family, so an empty landed set is truthful.\n // A composite lane that resumed carries the rounds it inherited, so the loop step reads as a floor (#1507).\n if ('choreographed' in result) {\n lanesInherited.rounds += result.inheritedRounds;\n return { landed: [...result.landed], ...(result.inheritedRounds > 0 ? { inheritedRounds: result.inheritedRounds } : {}) };\n }\n if ('scenarios' in result || 'status' in result || 'assessed' in result || 'dispatched' in result\n || 'verified' in result) return { landed: [] };\n // A STAFFING run lands charter modules through the persona accept step; it reports their paths itself.\n if ('staffed' in result) return { landed: [...result.landed] };\n return { landed: result.landed.map((entry) => entry.packageRelativePath) };\n },\n model: this.buildGenerationPort(),\n /*\n * A lost network or a wake that aborted a model call is the ENVIRONMENT's, never the loop's (#3235): the loop\n * waits for its model provider to answer again and asks the same iteration once more, or stops INTERRUPTED (a\n * relaunch over the same tree resumes it). Before this, its own selection call settled the loop `failed`.\n */\n isEnvironmentalFailure: isEnvironmentalPlaybookFailure,\n // A playbook the running build wave alone holds back asks it to yield (#3884), instead of waiting for its cap.\n requestBuildWaveYield: (because) => this.buildDispatch.requestBuildWaveYield(because),\n awaitEnvironmentRecovery: (reason) => awaitModelProviderRecovery(reason, {\n log: (message, context) => this.logDebug(message, context),\n }),\n // A provider account with no credits, or at a limit (#3204): the loop stops at once and says which account, since\n // only a person brings the credits back and every later call would be refused identically.\n readProviderAccountRefusal: readPlaybookFailureProviderAccountRefusal,\n // The selection and every lane measured, so the loop's row records its spend per step (#1507).\n meter: this.spendMeter,\n maximumIterations: input.maximumIterations,\n ...(input.maximumLanesPerIteration !== undefined ? { maximumLanesPerIteration: input.maximumLanesPerIteration } : {}),\n ...(input.session ? { trace: this.buildTrace(input.session, 'playbook-loop') } : {}),\n });\n }\n\n /**\n * Judge SUPPLIED artifact values against a playbook's compiled evaluation treatment — the judge\n * value-eval door (OC-16, Gate-4-shaped). Nothing is generated and nothing lands: the caller hands\n * the artifact values (each schema-validated against its family first, so the eval measures the\n * JUDGE and never the schema), and gets the same advisory verdict envelope a run would. Testability\n * is part of the mechanism (Paul, 2026-08-24); this is the judge's dry bench.\n */\n public async judgeArtifacts(input: {\n readonly playbookRef: string;\n readonly artifacts: ReadonlyArray<{ readonly family: string; readonly value: unknown }>;\n readonly creatorBrief?: string;\n readonly elicitationAnswers?: readonly PlaybookElicitationAnswer[];\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<PlaybookJudgeResult & { readonly validation: ReadonlyArray<{ family: string; schemaValid: boolean; validatorFindings: readonly string[] }> }> {\n const hydrated = getFrameworkKnowledgePlaybook(input.playbookRef);\n if (!hydrated) throw new UnknownPlaybookError(`No compiled playbook is registered under \"${input.playbookRef}\".`);\n if (!hydrated.evaluationTreatment) {\n return { judged: false, skipped: 'This playbook carries no compiled evaluation treatment.', validation: [] };\n }\n const treatment = MetaWorkflow_EvaluationTreatmentDefinitionSchema.safeParse(hydrated.evaluationTreatment.value);\n if (!treatment.success) {\n return { judged: false, skipped: `Compiled evaluation treatment does not satisfy its contract: ${treatment.error.issues[0]?.message ?? 'unknown issue'}`, validation: [] };\n }\n\n // Deterministic baseline FIRST, per artifact: what schema + `_core` validation already answer. The\n // comparative framing (the judge must add value BEYOND this) is only measurable when both columns\n // come from the same call.\n const validation = input.artifacts.map((artifact) => {\n const binding = STANDARD_APPLICATION_SPECIFICATION_SEMANTIC_AUTHORITY.getByFamily(artifact.family);\n if (!binding) return { family: artifact.family, schemaValid: false, validatorFindings: [`no semantic binding owns family \"${artifact.family}\"`] };\n const verdict = binding.validate(artifact.value);\n return {\n family: artifact.family,\n schemaValid: verdict.validation === JourneyArtifactValidationState.VALID,\n validatorFindings: verdict.errorDetails.slice(0, 10),\n };\n });\n\n /*\n * The same evidence a run's judge reads (#964 step 2), from the application as it stands now. A bench\n * that judged without it would measure a blinder judge than the one that runs after landing, and a\n * grounding criterion would answer from the supplied artifact alone. Best-effort: a playbook or state\n * that cannot be read leaves the evidence out, and the verdict says what it could not decide.\n */\n let judgeEvidence: { acceptedInputs: readonly string[]; derivedContext: readonly string[] } | undefined;\n const parsedPlaybook = MetaWorkflowPlaybookSchema.safeParse(hydrated.playbook);\n if (parsedPlaybook.success) {\n try {\n judgeEvidence = await this.composeGenerationJudgeEvidence(\n parsedPlaybook.data,\n await this.readArtifactState(),\n input.artifacts.map((artifact) => artifact.family),\n // The bench judges SUPPLIED artifacts, so the supplied ones decide which documents' guards it\n // sees. Reading disk here judged whatever the application happened to hold instead.\n input.artifacts,\n );\n } catch (error) {\n this.logDebug('Judge bench: application evidence unavailable (judged without it)', { error: String(error) });\n }\n }\n\n // Screened as a run's judge screens what it reads (#2938), so the bench measures the judge that actually runs.\n const landed = await this.screenLandedValuesForJudge(input.playbookRef, await this.readArtifactState().catch(() => undefined), input.artifacts);\n const judge = await runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed,\n ...(judgeEvidence && judgeEvidence.acceptedInputs.length > 0 ? { acceptedInputs: judgeEvidence.acceptedInputs } : {}),\n ...(judgeEvidence && judgeEvidence.derivedContext.length > 0 ? { derivedContext: judgeEvidence.derivedContext } : {}),\n ...(input.creatorBrief || input.elicitationAnswers?.length\n ? {\n creatorInput: {\n ...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),\n ...(input.elicitationAnswers?.length ? { elicitationAnswers: input.elicitationAnswers } : {}),\n },\n }\n : {}),\n model: this.buildGenerationPort(),\n ...(input.session ? { trace: this.buildTrace(input.session, `playbook-judge-eval-${input.playbookRef}`) } : {}),\n });\n return { ...judge, validation };\n }\n\n /**\n * Derive and accept a charter for every convened role the application has not committed yet, and derive again every\n * committed charter older than one of its shaping inputs that a person has not edited (#2819).\n *\n * The roster is DERIVED: every `method.deliberation` in the compiled catalog, plus the logo step's own\n * panel (a generation step is not a playbook declaration, so the companion supplies it). A role's\n * derivability is decided from the families its template's shaping inputs read, through\n * `EXPERT_SHAPING_INPUT_FAMILY` (runtime, shared with the eligibility board since #2462), so the run never asks the derivation agent for a brief it cannot compose.\n * Roles run SEQUENTIALLY: each derivation is an agentic three-pass protocol (~200 s measured), and the\n * accept step serializes itself on the aggregator anyway.\n */\n private async staffExpertPanels(input: {\n readonly artifactState: PlaybookArtifactState;\n readonly dryRun?: true;\n /** The run this staffing belongs to, so its landed charters are recorded like any landing. */\n readonly run: {\n readonly runId: string;\n readonly startedAt: string;\n readonly playbookVersion: string;\n readonly traceSessionId?: string;\n };\n }): Promise<ExpertPersonasExecutionResult> {\n const catalog = await this.readParsedCatalog();\n /*\n * Only the panels this application's line convenes (#1605): an internal tool runs no brand identity,\n * so it seats no art director, brand strategist or copy chief, and staffing them would spend a\n * derivation on roles nothing will ever convene.\n */\n const lineScope = input.artifactState.applicationLine;\n const roster = collectConvenedExpertRoles({\n playbooks: lineScope ? catalog.filter((playbook) => lineScope.admittedPlaybookRefs.has(playbook.ref)) : catalog,\n additionalConveners: hostExpertConveners(lineScope),\n });\n const committed = new Set(committedCharterRoleRefs(input.artifactState.artifactsByFamily.get(ApplicationSpecificationFamily.EXPERT_PERSONAS)));\n /*\n * Charters older than an input are derived again (#2819); one a person edited is named and left alone. The drift is\n * the same assessment the board read, carried on the artifact state, so the run derives what the board offered.\n */\n const rosterRoles = new Set(roster.map((entry) => entry.roleRef));\n const drift = (input.artifactState.expertCharterDrift ?? []).filter((entry) => rosterRoles.has(entry.roleRef));\n const rederive = rederivableExpertRoleRefs(drift);\n const describeDrift = (entry: (typeof drift)[number]) => ({ roleRef: entry.roleRef, changedInputs: entry.changedInputs.map(({ kind }) => kind) });\n const driftedEdited = drift.filter((entry) => entry.authored).map(describeDrift);\n const editedDrifted = new Set(driftedEdited.map((entry) => entry.roleRef));\n // Committed AND current: a drifted role is reported as re-derived or as edited, never also here.\n const alreadyCommitted = roster.map((entry) => entry.roleRef).filter((roleRef) => committed.has(roleRef) && !rederive.has(roleRef) && !editedDrifted.has(roleRef));\n /*\n * The same partition the eligibility board uses for this step's standing (#2462), so the board never offers a run\n * that would derive nothing, nor withholds one that would. A family that does not apply to the line is not waited\n * for (#1604); a present-but-unreadable family counts as missing, because the derivation reads its VALUE.\n */\n const partition = partitionUnstaffedExpertRoles({\n roster,\n charters: input.artifactState.artifactsByFamily.get(ApplicationSpecificationFamily.EXPERT_PERSONAS),\n familyReadable: (family) => {\n const value = input.artifactState.artifactsByFamily.get(family);\n return value !== undefined && value !== null && value !== FILE_PRESENT_WITHOUT_VALUE;\n },\n familyNotApplicable: (family) => isFamilyNotApplicable(input.artifactState.applicationLine, family),\n rederive,\n });\n const waiting: ExpertPersonasExecutionResult['waiting'][number][] = partition.waiting.map((entry) => ({ roleRef: entry.roleRef, missingFamilies: [...entry.missingFamilies] }));\n const derivable: string[] = [...partition.staffable];\n const derived: ExpertPersonasExecutionResult['derived'][number][] = [];\n const refused: ExpertPersonasExecutionResult['refused'][number][] = [];\n const landed = new Set<string>();\n /*\n * What this run changed, per file, for the write register (#2421 #2422 #2419): each accept reports its exact\n * writes, and a file several roles touched (the aggregator, the wiring) keeps its FIRST pre-image and its LAST\n * written bytes, which is what the run as a whole changed.\n */\n const writesByPath = new Map<string, { previousContent?: string; writtenContent: string }>();\n let recorded = false;\n if (input.dryRun !== true) {\n /*\n * DERIVED together, ACCEPTED one at a time (#3204). A role's derivation reads the shaping families and writes only\n * its own staging file, never another role's charter, so the derivations (two or three model calls each) can run\n * together; each accept writes files every role shares (the aggregator, the wiring), so the accepts stay in roster\n * order. One after another, the derivations made this step 14 minutes of the reference run's planning.\n *\n * The FIRST role derives alone, and the others start only once it has answered with something other than a fault\n * of the application's own (an account refusal, a lost network, a held specification fault): that fault is thrown\n * at the first role below, and no other role is asked of the provider or paid for. Each outcome is held as a value,\n * so a refusal surfaces at its role's turn and none goes unhandled.\n */\n const settle = (roleRef: string) => this.expertPersonas.derive({ roleRef }).then((proposal) => ({ proposal }), (error: unknown) => ({ error }));\n const [firstRoleRef, ...laterRoleRefs] = derivable;\n const firstDerivation = firstRoleRef === undefined ? undefined : settle(firstRoleRef);\n const laterDerivations = (firstDerivation ?? Promise.resolve(undefined)).then((first) => {\n const stopsTheRun = first !== undefined && 'error' in first\n && (isEnvironmentalPlaybookFailure(first.error) || heldOnAFault(EXPERT_PERSONAS_PLAYBOOK_REF, first.error) !== first.error);\n return new Map(stopsTheRun ? [] : laterRoleRefs.map((roleRef) => [roleRef, settle(roleRef)] as const));\n });\n try {\n for (const roleRef of derivable) {\n /*\n * IN FLIGHT from the accept's first write until its writes are on record (#3221): the charters, the aggregator\n * and the wiring are written role by role with a model call between, so the run's record is written after EACH\n * accept rather than once at the end, and the window spans only the seconds of one accept, never a derivation.\n */\n let landingWindow: PlaybookRunLandingWindow | undefined;\n try {\n const derivation = roleRef === firstRoleRef ? await firstDerivation! : await (await laterDerivations).get(roleRef);\n // Not started only when the first role's fault stops the run, which is thrown at the first role.\n if (derivation === undefined) throw new Error(`The derivation of ${roleRef} was not started.`);\n if ('error' in derivation) throw derivation.error;\n const { proposal } = derivation;\n /*\n * Named BEFORE the accept writes (#3237 review F1, M3): the role's charter, the aggregator and both wiring\n * files, which are all an accept can write; the record follows each accept at once.\n */\n landingWindow = await this.openLandingInFlight(input.run.runId, EXPERT_PERSONAS_PLAYBOOK_REF, this.expertPersonas.describeAcceptWriteTargets(roleRef));\n const accepted = await this.expertPersonas.accept({ roleRef });\n derived.push({\n roleRef,\n charterModulePath: accepted.charterModulePath,\n passes: proposal.qualityReport.passes,\n critiqueVerdict: String(proposal.qualityReport.critique.verdict),\n });\n landed.add(accepted.charterModulePath);\n landed.add(accepted.aggregatorModulePath);\n for (const path of accepted.wiredPaths ?? []) landed.add(path);\n for (const write of accepted.writes ?? []) {\n const first = writesByPath.get(write.path);\n writesByPath.set(write.path, {\n ...(first ? (first.previousContent !== undefined ? { previousContent: first.previousContent } : {}) : (write.previousContent !== undefined ? { previousContent: write.previousContent } : {})),\n writtenContent: write.writtenContent,\n });\n }\n if (writesByPath.size > 0) recorded = await this.recordExpertPersonaLanding({ run: input.run, writes: writesByPath }) || recorded;\n } catch (error) {\n // One role's refusal must not cost the others their charter: record it, keep going (unless it is environmental, below).\n refused.push({ roleRef, reason: describeCaughtError(error) });\n this.logDebug('expert-persona staffing: role refused', { roleRef, reason: String(error) });\n // Every role would meet the same fault, and it is the application's state rather than this role's (#3258).\n const held = heldOnAFault(EXPERT_PERSONAS_PLAYBOOK_REF, error);\n if (held !== error) throw held;\n /*\n * An accept that threw AFTER writing (the charter written, then regenerating the aggregator from the personas\n * directory failed to read or write it) leaves files in the tree (#3237 review M3, F1). A wiring refusal is not\n * that case: the accept turns it into a warning and completes. What its named paths changed is recorded as a\n * FAILED landing of its own, under the run's id and the role, through the same guarded window record every\n * landing uses: a path a coding run has evidence of writing, or claims in flight, stays out, and the posture\n * never accepts a failed record, so a coding run's barrel edit in the same seconds is never committed under the\n * staffing run. The run's other accepts keep their completed record, and the next one adopts the charter this\n * left (review A). The role stays refused.\n */\n if (landingWindow !== undefined) {\n await this.writeRegister.recordWindowLanding({\n window: landingWindow,\n run: { startedAt: input.run.startedAt, playbookVersion: input.run.playbookVersion, ...(input.run.traceSessionId ? { traceSessionId: input.run.traceSessionId } : {}) },\n declaredWrites: landingWindow.declaredPaths(),\n landingFailed: true,\n recordRunId: `${input.run.runId}.${roleRef}`,\n }).catch((recordError: unknown) => this.logDebug('A failed staffing accept\\'s writes could not be recorded', { roleRef, error: String(recordError) }));\n }\n /*\n * An ENVIRONMENTAL fault is the application's state too (#3204): a model provider account out of credits or at\n * a limit, or a lost network. The next role's derivation calls the same provider, so it is thrown, after any\n * writes it left are recorded above: the run fails as interrupted, and the lane, the loop and the drive stop on\n * it. Charters accepted earlier in the run keep their record. Recorded as a refusal instead, it settled the run\n * `ok` with nothing landed: on reference run 42120979649 every derivation met \"Your credit balance is too low to\n * access the Anthropic API\" from 00:18 UTC, and `bottom_up.conception` re-ran the staffing twelve times over one\n * state while the placement plan waited on the charters it would have refreshed.\n */\n if (isEnvironmentalPlaybookFailure(error)) throw error;\n } finally {\n await landingWindow?.release();\n }\n }\n } finally {\n /*\n * Every derivation this run started has settled before the run ends, however it ends (#3204 review): one left\n * running after a later role's fault could write its staging file once the run has failed, and a re-run's accept\n * would then read that file instead of its own derivation. Each outcome is a value, so this never throws.\n */\n await Promise.all([firstDerivation, laterDerivations.then((later) => Promise.all(later.values()))]);\n }\n }\n // Attempted roles and staffed none: a failure, not a run that settled with nothing to show (#3204).\n if (input.dryRun !== true && derivable.length > 0 && derived.length === 0) throw new ExpertPersonasStaffingRefusedError(refused);\n /*\n * What was ACTUALLY derived again, not what drifted: a drifted role still waiting on a family, or refused, is\n * reported there, and only a derivation that landed is \"derived again\".\n */\n const derivedRoleRefs = new Set(derived.map((entry) => entry.roleRef));\n const rederived = drift.filter((entry) => rederive.has(entry.roleRef) && derivedRoleRefs.has(entry.roleRef)).map(describeDrift);\n return {\n playbookRef: EXPERT_PERSONAS_PLAYBOOK_REF,\n staffed: true,\n ...(input.dryRun === true ? { dryRun: true as const } : {}),\n roster,\n alreadyCommitted,\n ...(rederived.length > 0 ? { rederived } : {}),\n ...(driftedEdited.length > 0 ? { driftedEdited } : {}),\n derived,\n waiting,\n refused,\n landed: [...landed],\n ...(recorded ? { runId: input.run.runId } : {}),\n accepted: false,\n };\n }\n\n /**\n * The ONE door a deterministic executor run lands through (#3237): it opens the run's landing WINDOW before the\n * executor writes anything, and records what changed in the tree when it returns, so every executor branch, and\n * one added later, has a write record without assembling it by hand.\n *\n * Before this, `bottom_up.foundation`, `bottom_up.capability-composition` and the maturity reading returned straight\n * from their executors and nothing recorded them (app-creation-test-007, F8a/F24): `wildo creation diff` answered\n * `400 No write record`, their edits of `companion-exports.ts` and the barrels refused five later accepts as\n * `edited_since_the_run`, and with no landing on record the loop offered them as FIRST RUN every round, each\n * re-landing of the composition reopening the paid plans that read it.\n *\n * - The window marks the landing IN FLIGHT (#3221): a coding door asked while it writes withholds what it may have\n * written, and the record takes over once it exists.\n * - A run that changed nothing is dated by a no-change landing: landed for the board, and no input of anyone moved.\n * - The record holds what the executor DECLARES it wrote (#3237 review): what it reports on its result, and what it\n * named as it wrote (`noteWrite`), which is all a run that failed part-way can say. Every other change the window\n * sees, a coding agent's in the same seconds above all, is somebody else's and stays out.\n * - A run that FAILED after writing has its writes recorded with `landingFailed`, then the failure is rethrown. The\n * posture's automatic accept leaves such a record for a person.\n * - Best effort, like every register write: a window that cannot be opened or recorded costs the record, logged,\n * never the run. The files are on disk and git shows them.\n * - A dry run writes nothing and opens no window.\n */\n private async landDeterministicExecutorRun<T>(input: {\n readonly runId: string;\n readonly playbookRef: string;\n readonly startedAt: string;\n readonly playbookVersion: string;\n readonly traceSessionId?: string;\n readonly dryRun: boolean;\n /** The executor reads the application's code itself (the maturity reading): its landing is dated by the code (#3237 review H1). */\n readonly readsApplicationCode?: boolean;\n /**\n * The app-relative paths the executor reports it wrote, read off its result. Required (#3237 review): the window\n * sees a coding agent's write in the same seconds too, and only the executor can say which changes are its own.\n */\n readonly declaredWrites: (result: T) => readonly string[];\n /** Files and directories the executor still composes without rewriting them; see `recordWindowLanding`'s `composes`. */\n readonly composes?: (result: T) => readonly string[];\n /**\n * Runs the executor. `noteWrite` takes each path just before (or, for a configuration edit, as) it is written: it\n * marks the path in flight (#3237 review F1) and is all a FAILED run can declare. `noteMayWrite` takes a path a step\n * may write, before the step runs: it marks the path in flight and declares nothing for the record (review M3).\n */\n readonly execute: (\n noteWrite: (applicationRelativePath: string) => void,\n noteMayWrite: (applicationRelativePath: string) => void,\n ) => Promise<T>;\n }): Promise<T> {\n const noted = new Set<string>();\n let window: PlaybookRunLandingWindow | undefined;\n const noteWrite = (applicationRelativePath: string): void => {\n noted.add(applicationRelativePath);\n window?.declare([applicationRelativePath]);\n };\n const noteMayWrite = (applicationRelativePath: string): void => { window?.declare([applicationRelativePath]); };\n if (input.dryRun) return input.execute(noteWrite, noteMayWrite);\n try {\n window = await this.writeRegister.openLandingWindow({ runId: input.runId, playbookRef: input.playbookRef, keepContent: true });\n } catch (error) {\n this.logger.warn(`The landing window of ${input.playbookRef} (run ${input.runId}) could not be opened; its writes will have no record: ${describeCaughtError(error)}`);\n }\n const run = {\n startedAt: input.startedAt,\n playbookVersion: input.playbookVersion,\n ...(input.traceSessionId ? { traceSessionId: input.traceSessionId } : {}),\n ...(input.readsApplicationCode === true ? { readsApplicationCode: true } : {}),\n };\n let result: T;\n try {\n result = await input.execute(noteWrite, noteMayWrite);\n } catch (caught) {\n // A refusal on a failing module says the same thing here as at a landing, so the lane reads it the same way (#3258).\n const error = heldOnAFault(input.playbookRef, caught);\n if (window) {\n await this.writeRegister.recordWindowLanding({ window, run, declaredWrites: [...noted], landingFailed: true }).catch((recordError: unknown) => {\n this.logger.warn(`${input.playbookRef} (run ${input.runId}) failed after writing, and its writes could not be recorded: ${describeCaughtError(recordError)}`);\n });\n }\n throw error;\n }\n if (window) {\n const landedWindow = window;\n // Best effort to the end: a result that cannot say what it wrote costs the record, never the run.\n await Promise.resolve()\n .then(() => this.writeRegister.recordWindowLanding({\n window: landedWindow,\n run,\n declaredWrites: [...new Set([...noted, ...input.declaredWrites(result)])],\n ...(input.composes ? { composes: input.composes(result) } : {}),\n }))\n .catch(async (error: unknown) => {\n // `recordWindowLanding` releases its window itself; a throw before it was reached must release it here.\n await landedWindow.release();\n this.logger.warn(`${input.playbookRef} (run ${input.runId}) landed, but its write record failed; accept or commit its files by hand: ${describeCaughtError(error)}`);\n });\n }\n return result;\n }\n\n /**\n * Mark a landing that records its own files IN FLIGHT (#3221): a window holding the bytes of the specifications\n * package (review F5), opened just before the first write and released once the writes are on record. Best effort:\n * a mark that cannot be written costs the in-flight protection, logged, never the landing.\n */\n private async openLandingInFlight(runId: string, playbookRef: string, declaredPaths: readonly string[]): Promise<PlaybookRunLandingWindow | undefined> {\n try {\n /*\n * With the bytes (#3237 review M1, M3): a landing that throws after its first write (a validation refusal, a\n * diagram or decision write, a wiring refusal, a staffing accept) records what its declared paths changed, with\n * their pre-images, from this window, whatever threw.\n */\n // Bytes held only for the specifications package, the one tree a generation or staffing landing writes (review F5).\n const packageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n const specificationsRoot = packageRoot === undefined ? '' : path.relative(this.companionContext.saasRoot, packageRoot).split(path.sep).join('/');\n return await this.writeRegister.openLandingWindow({\n runId,\n playbookRef,\n keepContent: true,\n keepContentOf: (applicationRelativePath) => specificationsRoot === '' || applicationRelativePath.startsWith(`${specificationsRoot}/`),\n declaredPaths,\n });\n } catch (error) {\n this.logger.warn(`The landing of run ${runId} could not be marked in flight: ${describeCaughtError(error)}`);\n return undefined;\n }\n }\n\n /** Specifications-package-relative paths as the register keys them: application-root-relative, POSIX. */\n private toApplicationRelativeSpecificationPaths(packageRelativePaths: readonly string[]): readonly string[] {\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) return packageRelativePaths;\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot).split(path.sep).join('/');\n return packageRelativePaths.map((relative) => path.posix.join(specificationsRelativeRoot, relative));\n }\n\n /**\n * Record a staffing run's writes in the playbook-run write register, like any landing (#2421 #2422 #2419).\n *\n * Before this, staffing returned before the register's only write: its charters were in no run's record, so\n * `wildo creation accept` and the posture's automatic commit never carried them (they reached git by hand on\n * app-creation-test-005), and the board had no landing to date the step by, so it could neither report it on\n * record nor see that a family a waiting role needed had landed since. A record that fails to write costs the\n * handle, never the staffing: the charters are on disk and the run says what it did.\n */\n private async recordExpertPersonaLanding(input: {\n readonly run: { readonly runId: string; readonly startedAt: string; readonly playbookVersion: string; readonly traceSessionId?: string };\n readonly writes: ReadonlyMap<string, { readonly previousContent?: string; readonly writtenContent: string }>;\n }): Promise<boolean> {\n const files = [...input.writes]\n .filter(([, write]) => write.writtenContent.length > 0 && write.writtenContent !== write.previousContent)\n .sort(([left], [right]) => left.localeCompare(right))\n .map(([relativePath, write]) => ({\n path: relativePath,\n existedBefore: write.previousContent !== undefined,\n ...(write.previousContent !== undefined ? { previousContent: write.previousContent } : {}),\n writtenContent: write.writtenContent,\n }));\n if (files.length === 0) return false;\n try {\n /*\n * With adoption (#3237 review A): an earlier accept that threw after writing its charter left it in a failed\n * record, and this accept's aggregator, rebuilt from the personas directory, imports it. Adopting the failed\n * record's files under that directory (still holding their bytes) puts the charter in the same record as the\n * aggregator that imports it, so the posture never commits an import of an uncommitted file.\n */\n await this.writeRegister.recordAdoptingFailedLandings({\n runId: input.run.runId,\n playbookRef: EXPERT_PERSONAS_PLAYBOOK_REF,\n ...(input.run.traceSessionId ? { traceSessionId: input.run.traceSessionId } : {}),\n startedAt: input.run.startedAt,\n playbookVersion: input.run.playbookVersion,\n at: new Date().toISOString(),\n files,\n }, { composes: [this.expertPersonas.describePersonasDirectory()] });\n return true;\n } catch (error) {\n this.logger.warn(`Expert staffing landed ${files.length} file(s) but its write record failed; accept or commit them by hand: ${describeCaughtError(error)}`);\n return false;\n }\n }\n\n /** Every catalog entry that satisfies its own contract. A malformed one is skipped, never fatal. */\n private async readParsedCatalog(): Promise<MetaWorkflowPlaybook[]> {\n const playbooks: MetaWorkflowPlaybook[] = [];\n for (const entry of listFrameworkKnowledgePlaybooks()) {\n const hydrated = getFrameworkKnowledgePlaybook(entry.ref);\n if (!hydrated) continue;\n const parsed = MetaWorkflowPlaybookSchema.safeParse(hydrated.playbook);\n if (parsed.success) playbooks.push(parsed.data);\n else this.logDebug('Skipping playbook that fails its own contract', { ref: entry.ref });\n }\n return playbooks;\n }\n\n /**\n * Continue a run that suspended at a clarification, with the creator's decision.\n *\n * ## Why the checkpoint, and not a held-open request\n *\n * A suspension can outlive its HTTP request — a creator answers when they get to it, not inside a\n * socket timeout — so the run's inputs are saved as a checkpoint on its own execution row (the\n * engine's suspended actor execution, read back by `readSuspensionCheckpoint`) and the request\n * returns. This is the\n * shape LangGraph gives `interrupt()` (a checkpointer plus `Command(resume=…)`), Step Functions\n * gives `waitForTaskToken`, and Temporal gives signals: the wait is DURABLE state, never a blocked\n * thread.\n *\n * ## Why the whole run re-executes rather than resuming mid-flight\n *\n * Same reason LangGraph re-executes the interrupted node: there is no portable way to freeze a\n * function's stack. The precondition that makes re-execution safe is that the interrupt sits\n * BEFORE anything is produced — no model call was spent, no file was written — so replaying costs\n * a brief composition and nothing is done twice.\n *\n * ## The three actions, from MCP's elicitation vocabulary\n *\n * `ACCEPT` carries answers. `DECLINE` means \"decide it yourself and say what you assumed\" — the run\n * proceeds with no further questions. `CANCEL` abandons it: the engine moves the waiting execution\n * to `CANCELLED` (`cancelSuspendedActorExecution`), so nothing runs and the round can no longer be\n * answered. The three are distinct on purpose — a decline is a delegation, a cancel is a withdrawal,\n * and collapsing them would make \"I do not want to answer\" indistinguishable from \"stop\".\n */\n public async resumePlaybookRun(input: {\n readonly runId: string;\n /**\n * The ROUND the answer, decline or cancel was read against — required (#1584). A run asks again\n * after an answer under the same run id, so without it the call would act on whichever round waits\n * when it lands. Refused 409 when the run has moved on; the engine then holds the resume to the\n * suspension that was read, so a round asked in between is refused too.\n */\n readonly round: number;\n readonly action: MetaWorkflow_ClarificationAction;\n readonly answers?: readonly PlaybookClarificationAnswer[];\n /**\n * Who answers (#1658) — stamped on every answer in THIS round, and so into the committed\n * `DECISIONS.md` beside what the run lands. An answer that already carries its own author keeps it.\n */\n readonly answeredByRef?: string;\n /**\n * The signed-in person settling the question (#1751), when the door has one. Handed to the engine as\n * the decision's actor: a question routed to its run's starter is settled only by them, and refused\n * NOT_FOUND otherwise, before anything moves. The local console has no person, so it can settle only\n * an unrouted question — one whose run was started from the console too.\n */\n readonly actingUserId?: string;\n readonly session?: CompanionExecutionSessionContext;\n /** May turn a normal continuation into a preview; cannot promote a preview into writes. */\n readonly dryRun?: boolean;\n }): Promise<\n | { status: Workbench_PlaybookRunOutcomeStatus.CANCELLED; runId: string; playbookRef: string }\n | Awaited<ReturnType<PlaybookRunCompanionService['runPlaybook']>>\n > {\n /*\n * READ before anything moves (#1360): the wait is on the run's own execution row, and an answer\n * that does not satisfy the questions must leave it exactly as it was — still waiting, still\n * answerable. So the checkpoint is read and the answers validated first, and only then does the\n * engine move the rows and continue the run UNDER THE SAME ID.\n */\n const { checkpoint, suspensionRef } = await this.readSuspensionCheckpoint(input.runId, input.session);\n /*\n * WHO first, before anything that describes the question (#1751 review F4, N1). The round in a\n * superseded refusal and the refs and options in a validation refusal describe it, so the ENGINE is\n * asked first whether this person may settle it: the same authorization a settle runs, recording a\n * refused attempt, and refusing it as it refuses an unknown run. Such a person's REFUSAL therefore\n * says nothing about the question. (The listings still show a waiting question to every viewer of\n * the board; this governs refusals only.) The engine decides again when the rows move.\n */\n await this.actorsSystem.authorizeSuspendedActorDecision(\n input.runId,\n input.actingUserId ? { actor: humanDecisionSettler(input.actingUserId) } : undefined,\n input.session,\n ).catch(() => { throw new SuspendedPlaybookRunNotFoundError(input.runId); });\n if (checkpoint.round !== input.round) throw new SupersededPlaybookRunQuestionError(input.runId, input.round, checkpoint.round);\n if (input.action === MetaWorkflow_ClarificationAction.CANCEL) {\n // Held to the round that was read, like a resume: a round asked since is refused, never withdrawn (#1584).\n await this.actorsSystem.cancelSuspendedActorExecution(input.runId, input.session, {\n expectedSuspensionRef: suspensionRef,\n // Who withdraws it (#1751): the engine refuses a routed question's withdrawal by anybody else.\n ...(input.actingUserId ? { decision: { actor: humanDecisionSettler(input.actingUserId) } } : {}),\n })\n .catch(async (error: unknown) => { throw await this.explainLateDecision(error, input); });\n return { status: Workbench_PlaybookRunOutcomeStatus.CANCELLED as const, runId: input.runId, playbookRef: checkpoint.playbookRef };\n }\n /*\n * ACCEPT answers the whole round; DECLINE may carry the answers the creator DID give and delegates the\n * rest (#1658) — both validated by the same owner, so a partial decline cannot smuggle an answer the\n * round never asked or a choice outside its options.\n */\n const answers: readonly PlaybookClarificationAnswer[] = input.action === MetaWorkflow_ClarificationAction.ACCEPT\n || (input.action === MetaWorkflow_ClarificationAction.DECLINE && (input.answers?.length ?? 0) > 0)\n ? validateClarificationAnswers({\n requests: checkpoint.requests,\n priorAnswers: checkpoint.priorAnswers,\n answers: (input.answers ?? []).map((answer) => (input.answeredByRef && !answer.answeredByRef ? { ...answer, answeredByRef: input.answeredByRef } : answer)),\n requireEveryQuestion: input.action === MetaWorkflow_ClarificationAction.ACCEPT,\n })\n : checkpoint.priorAnswers;\n /*\n * The leg that ran BEFORE the question (#1507). The engine replaces the task output when the\n * continuation settles, so the run's record would otherwise report only the continuation's spend.\n * Read from the waiting row; a row without one (written before #1507, or unreadable) is an\n * unobserved leg, never a free one.\n */\n const waitingRow = await Promise.resolve()\n .then(() => this.executions.getActorExecution(input.runId, input.session) as Promise<{\n readonly standaloneTasks?: ReadonlyArray<{ readonly output?: unknown }>;\n readonly checkpoint?: { readonly interruptedContinuations?: unknown } | null;\n }>)\n .catch(() => undefined);\n const waitingOutput = waitingRow?.standaloneTasks?.[0]?.output;\n const recordedLeg = readPlaybookRunMeasurement(waitingOutput);\n /*\n * Continuations of this question that DIED WITH THEIR PROCESS (the engine counts them on the\n * checkpoint when its startup sweep puts the run back to waiting): whatever they spent is gone, so\n * each is an unobserved part of this run's spend, and the total reads as a floor.\n */\n const interrupted = typeof waitingRow?.checkpoint?.interruptedContinuations === 'number' ? waitingRow.checkpoint.interruptedContinuations : 0;\n const priorLeg: PlaybookRunMeasurement | undefined = interrupted > 0\n ? {\n durationMs: recordedLeg?.durationMs ?? 0,\n spend: mergePlaybookSpend([recordedLeg?.spend ?? PLAYBOOK_SPEND_NOT_OBSERVED, ...Array.from({ length: interrupted }, () => PLAYBOOK_SPEND_NOT_OBSERVED)]),\n }\n : recordedLeg;\n try {\n // Counted for the continuation's whole life, settle included: a resumed run is a run, and the\n // supervisor must hold a restart for it as for a fresh one.\n return await this.whileInFlight(() => this.actorsSystem.resumeActorExecution(\n input.runId,\n (opened) => this.executePlaybookRun({\n playbookRef: checkpoint.playbookRef,\n // The resume continues the SAME instance (#1609): its answers, its landing, its row.\n ...(checkpoint.instanceKey ? { instanceKey: checkpoint.instanceKey } : {}),\n clarification: {\n requests: checkpoint.requests,\n answers,\n action: input.action,\n round: checkpoint.round,\n },\n ...(checkpoint.creatorBrief ? { creatorBrief: checkpoint.creatorBrief } : {}),\n ...(checkpoint.selectionRationale ? { selectionRationale: checkpoint.selectionRationale } : {}),\n ...(checkpoint.elicitationAnswers.length > 0 ? { elicitationAnswers: checkpoint.elicitationAnswers } : {}),\n // The run's starter, so a question the continuation asks is routed to them again (#1751).\n ...(checkpoint.requestedByUserId ? { requestedByUserId: checkpoint.requestedByUserId } : {}),\n ...(input.session ? { session: input.session } : {}),\n dryRun: checkpoint.dryRun || input.dryRun === true,\n runId: opened.executionId,\n }, priorLeg ?? null),\n input.session,\n // A continuation that THROWS leaves the question standing, so the creator can answer again —\n // what consuming the checkpoint file only after a successful return used to guarantee. The row\n // that goes back to waiting carries what both legs spent (#1507), over the waiting record.\n {\n ...this.playbookRunOptions,\n // The suspension that was read: a round asked since then is refused before anything moves (#1584).\n expectedSuspensionRef: suspensionRef,\n /*\n * Who settles it and what they answered (#1751): checked against the question's route, and\n * recorded as the resolution on the status change whether the question was routed or not.\n */\n decision: {\n ...(input.actingUserId ? { actor: humanDecisionSettler(input.actingUserId) } : {}),\n answer: {\n decisionId: input.runId,\n optionRef: input.action,\n // This round's answers, as validated (a confirmation normalized), never an earlier round's.\n values: answers\n .filter((answer) => !checkpoint.priorAnswers.some((prior) => prior.ref === answer.ref))\n .map((answer) => ({ ref: answer.ref, value: answer.answer })),\n },\n },\n restoreSuspensionOnFailure: true,\n outputOnRestoredSuspension: (error) => {\n const measurement = this.measurementOfFailure(error, input.runId);\n if (!measurement) return null;\n // The waiting record, carried forward — rebuilt from the checkpoint when the row could not be\n // read, so the run still reads as waiting on its question AND carries what it spent. When the\n // row could not be read, its `interruptedContinuations` count was unknown here and is lost as\n // the engine clears it; the spend still reads PARTIAL for the leg that was not read.\n const waiting = typeof waitingOutput === 'object' && waitingOutput !== null\n ? waitingOutput\n : summarizePlaybookRunResult({ status: Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT, accepted: false, dryRun: checkpoint.dryRun, family: checkpoint.family, round: checkpoint.round });\n return { ...waiting, measurement };\n },\n },\n ));\n } catch (error) {\n throw await this.explainLateDecision(error, input);\n } finally {\n this.failedRunMeasurements.delete(input.runId);\n }\n }\n\n /**\n * The engine refuses a decision on a run that moved between this service's read and its own\n * (`ACTOR_EXECUTION_NOT_SUSPENDED`, #1584 review F5). Said in the terms every door already answers:\n * the run asked again (409, superseded) or is no longer waiting (404). Any other error passes unchanged.\n */\n private async explainLateDecision(error: unknown, input: { readonly runId: string; readonly round: number; readonly session?: CompanionExecutionSessionContext }): Promise<unknown> {\n if (!isActorExecutionNotSuspendedError(error)) return error;\n try {\n const { checkpoint } = await this.readSuspensionCheckpoint(input.runId, input.session);\n return checkpoint.round !== input.round\n ? new SupersededPlaybookRunQuestionError(input.runId, input.round, checkpoint.round)\n : new SuspendedPlaybookRunNotFoundError(input.runId);\n } catch {\n return new SuspendedPlaybookRunNotFoundError(input.runId);\n }\n }\n\n /**\n * The waiting run's resume inputs, parsed. \"Not waiting\" — no such row, a row that is not\n * suspended, or a checkpoint this version cannot read — is one answer to a resume, and it is 404.\n */\n private async readSuspensionCheckpoint(\n runId: string,\n session?: CompanionExecutionSessionContext,\n ): Promise<{ readonly checkpoint: PlaybookRunSuspensionCheckpoint; readonly suspensionRef: string }> {\n let waiting: Awaited<ReturnType<ActorsSystemBackendService['readSuspendedActorExecution']>>;\n try {\n waiting = await this.actorsSystem.readSuspendedActorExecution(runId, session);\n } catch {\n throw new SuspendedPlaybookRunNotFoundError(runId);\n }\n const parsed = PlaybookRunSuspensionCheckpointSchema.safeParse(waiting.row.checkpoint?.context);\n if (!parsed.success) throw new SuspendedPlaybookRunNotFoundError(runId);\n return { checkpoint: parsed.data, suspensionRef: actorExecutionSuspensionRef(waiting.suspension) };\n }\n\n /**\n * How the engine reads what a playbook run RETURNED: a run that stopped to ask registered its\n * suspension request against the result object it is about to return, and nothing else is a\n * suspension. A `WeakMap` keyed by that object rather than a field on it, because the request\n * carries the whole resume input set and the result is what the HTTP response serialises.\n */\n private readonly suspensionRequests = new WeakMap<object, ActorExecutionSuspensionRequest>();\n\n /** Each measured result's wall-clock and spend (#1507) — see `createPlaybookRunOptions`. */\n private readonly runMeasurements = new WeakMap<object, PlaybookRunMeasurement>();\n\n /** The root runs each ROOT run's settled value overlapped (#1610) — read into its row summary like its measurement. */\n private readonly runOverlaps = new WeakMap<object, readonly PlaybookRunOverlap[]>();\n\n /** A FAILED root run's overlaps by run id, for a thrown value no WeakMap can key. Cleared when the run settles. */\n private readonly failedRunOverlaps = new Map<string, readonly PlaybookRunOverlap[]>();\n\n /** A FAILED run's measurement by run id (#1507) — for a thrown value no WeakMap can key. Cleared when the run settles. */\n private readonly failedRunMeasurements = new Map<string, PlaybookRunMeasurement>();\n\n /** Iterations a composite adopted from a checkpoint, by run id (#1507) — read by `executePlaybookRun` whatever the outcome. */\n private readonly adoptedCheckpointIterations = new Map<string, number>();\n\n /**\n * The rounds a run that THREW had inherited from a checkpoint, keyed by what it threw (#1507) — so a\n * caller that sees only the rejection (the unattended loop) can still mark its figures as a floor.\n */\n private readonly inheritedRoundsByFailure = new WeakMap<object, number>();\n\n /** What a failed run spent: keyed by its thrown value when that is an object, else by its run id. */\n private measurementOfFailure(error: unknown, runId: string | undefined): PlaybookRunMeasurement | undefined {\n const byValue = typeof error === 'object' && error !== null ? this.runMeasurements.get(error) : undefined;\n return byValue ?? (runId !== undefined ? this.failedRunMeasurements.get(runId) : undefined);\n }\n\n /**\n * Build-plan runs whose read of the tasks already built FAILED (#3449, R10), by run id, with why: the re-decompose ran\n * unheld. Written onto the run's own row by {@link playbookRunOptionsFor} however the run ends, then forgotten.\n *\n * Created on first use rather than as a field initialiser: test harnesses build this service without running field\n * initialisers (the executions service lazily creates its maps for the same reason), and a field-initialised Map is\n * absent there, so the first `get` threw. A real companion constructs it normally either way.\n */\n private builtTasksUnreadByRun: Map<string, string> | undefined;\n private builtTasksUnreadRuns(): Map<string, string> {\n return (this.builtTasksUnreadByRun ??= new Map<string, string>());\n }\n\n /**\n * The run options for ONE run: the shared readings, plus a failure record that can find this run's spend by id, and the\n * marker of a re-decompose that could not read the tasks already built (`builtTasksUnread`), on every ending.\n */\n private playbookRunOptionsFor(runIdOf: () => string | undefined): ActorExecutionRunOptions<PlaybookRunOutcome> {\n const takeBuiltTasksUnread = (): { readonly builtTasksUnread: string } | undefined => {\n const runId = runIdOf();\n const reason = runId === undefined ? undefined : this.builtTasksUnreadRuns().get(runId);\n if (runId !== undefined) this.builtTasksUnreadRuns().delete(runId);\n return reason === undefined ? undefined : { builtTasksUnread: reason };\n };\n const shared = this.playbookRunOptions;\n return {\n ...shared,\n suspendOn: (result) => {\n const request = shared.suspendOn?.(result) ?? null;\n if (request === null) return null;\n const marker = takeBuiltTasksUnread();\n return marker === undefined ? request : { ...request, taskOutput: { ...(request.taskOutput as object | undefined), ...marker } };\n },\n concludeAs: (result) => {\n const conclusion = shared.concludeAs?.(result) ?? null;\n const marker = takeBuiltTasksUnread();\n return conclusion === null || marker === undefined ? conclusion : { ...conclusion, taskOutput: { ...(conclusion.taskOutput as object | undefined), ...marker } };\n },\n recordBesideFailure: (error) => {\n const runId = runIdOf();\n const measurement = this.measurementOfFailure(error, runId);\n const overlappedRuns = (typeof error === 'object' && error !== null ? this.runOverlaps.get(error) : undefined)\n ?? (runId !== undefined ? this.failedRunOverlaps.get(runId) : undefined);\n if (runId !== undefined) this.failedRunOverlaps.delete(runId);\n const beside = { ...(measurement ? { measurement } : {}), ...(overlappedRuns && overlappedRuns.length > 0 ? { overlappedRuns } : {}), ...takeBuiltTasksUnread() };\n return Object.keys(beside).length > 0 ? beside : null;\n },\n };\n }\n\n /**\n * The tasks already built, for a run producing the build plan (#3449), or `undefined` when there is nothing to keep or\n * they could not be read. When they could not be read and a plan exists, the re-decompose runs UNHELD (R10): it is not\n * stopped, because a plan that cannot be read is often what the re-decompose repairs, but it says so, as a warning\n * naming the run and as `builtTasksUnread` on the run's row. Until R10 this was a debug line, so a re-decompose that\n * rewrote built work left nothing to find.\n */\n private async readBuiltTasksForBuildPlanRun(input: { readonly runId: string; readonly playbookRef: string }): Promise<NonNullable<Awaited<ReturnType<ApplicationBuildDispatchCompanionService['resolveLandedTaskEvidence']>>>['landedTasks'] | undefined> {\n let reason: string;\n try {\n const evidence = await this.buildDispatch.resolveLandedTaskEvidence();\n if (evidence !== undefined) return evidence.landedTasks;\n // Absent is two things: no plan yet (nothing to keep), or a plan that exists and did not read.\n if (!(await this.buildDispatch.hasAuthoredBuildPlan())) return undefined;\n reason = 'the build plan exists but could not be read (its module failed or it does not satisfy its schema)';\n } catch (error) {\n reason = describeCaughtError(error);\n }\n this.builtTasksUnreadRuns().set(input.runId, reason);\n this.logger.warn(\n `${input.playbookRef} (run ${input.runId}) could not read the build tasks already built, so this re-decompose is NOT held to keep `\n + `their refs, targets and products: ${reason}. Recorded on the run's row as builtTasksUnread.`,\n { playbookRef: input.playbookRef, runId: input.runId },\n );\n return undefined;\n }\n\n private readonly playbookRunOptions: ActorExecutionRunOptions<PlaybookRunOutcome> = createPlaybookRunOptions(this.suspensionRequests, this.runMeasurements, this.runOverlaps);\n\n /**\n * Every choreography that ENDED without concluding and left its progress on its execution row —\n * an orphan settled `ABORTED` at startup, a run that threw, or one that stopped for its environment.\n * Newest first. The rows of the same system also carry CLARIFICATION checkpoints, which is what the\n * `kind` discriminator is for.\n */\n private async readResumableChoreographies(session?: CompanionExecutionSessionContext): Promise<readonly {\n readonly executionId: string;\n readonly checkpointedAt: string;\n readonly context: PlaybookChoreographyCheckpointContext;\n }[]> {\n const rows = await this.actorsSystem.listResumableActorExecutions(META_WORKFLOWS_SYSTEM_REF, session);\n const resumable: { executionId: string; checkpointedAt: string; context: PlaybookChoreographyCheckpointContext }[] = [];\n for (const row of rows) {\n const parsed = PlaybookChoreographyCheckpointContextSchema.safeParse(row.checkpoint?.context);\n if (parsed.success && row.checkpoint) resumable.push({ executionId: row._id, checkpointedAt: row.checkpoint.checkpointedAt, context: parsed.data });\n }\n return resumable.sort((left, right) => right.checkpointedAt.localeCompare(left.checkpointedAt));\n }\n\n private async listInterruptedChoreographies(): Promise<readonly { readonly playbookRef: string; readonly instanceKey?: string; readonly completedIterations: number; readonly stepRefs: readonly string[]; readonly checkpointedAt: string }[]> {\n try {\n // One per composite INSTANCE (#1609): re-running an instance adopts its NEWEST checkpoint, so that is the one to name.\n const newestByRef = new Map<string, { readonly playbookRef: string; readonly instanceKey?: string; readonly completedIterations: number; readonly stepRefs: readonly string[]; readonly checkpointedAt: string }>();\n for (const entry of await this.readResumableChoreographies()) {\n const instanceId = playbookInstanceId(entry.context.playbookRef, entry.context.instanceKey);\n if (newestByRef.has(instanceId)) continue;\n newestByRef.set(instanceId, {\n playbookRef: entry.context.playbookRef,\n ...(entry.context.instanceKey ? { instanceKey: entry.context.instanceKey } : {}),\n completedIterations: entry.context.completedIterations,\n stepRefs: entry.context.stepResults.map((step) => step.ref),\n checkpointedAt: entry.checkpointedAt,\n });\n }\n return [...newestByRef.values()];\n } catch (error) {\n // A status READ must not fail because the actor plane is unreachable; it answers \"none known\".\n this.logDebug('Interrupted choreographies could not be listed', { error: String(error) });\n return [];\n }\n }\n\n /**\n * Re-running a composite IS the resume gesture: adopt the newest progress an earlier run of the\n * same composite left, in the shape the runtime consumes, or `null` when there is none.\n *\n * ADOPTED, not merely read: the progress is written onto THIS run's row first and only then cleared\n * from the row it came from, so at every instant exactly one row carries it — a host that dies\n * between the two leaves it on both, which a later adoption resolves by taking the newest.\n */\n private async adoptChoreographyCheckpoint(\n playbookRef: string,\n instanceKey: string | undefined,\n runId: string,\n session?: CompanionExecutionSessionContext,\n ): Promise<(PlaybookChoreographyCheckpoint & { readonly checkpointedAt: string }) | null> {\n let source: Awaited<ReturnType<PlaybookRunCompanionService['readResumableChoreographies']>>[number] | undefined;\n try {\n source = (await this.readResumableChoreographies(session)).find((entry) => entry.context.playbookRef === playbookRef\n && entry.context.instanceKey === instanceKey && entry.executionId !== runId);\n if (!source) return null;\n await this.actorsSystem.saveActorExecutionCheckpoint(runId, source.context, session);\n await this.actorsSystem.consumeActorExecutionCheckpoint(source.executionId, session);\n } catch (error) {\n // Resuming is a convenience a run must not die for: start fresh rather than refuse to start.\n this.logDebug('A choreography checkpoint could not be adopted (run starts fresh)', { playbookRef, error: String(error) });\n return null;\n }\n return { ...choreographyProgressFromContext(source.context), checkpointedAt: source.checkpointedAt };\n }\n\n /**\n * Record an iteration's worth of progress on the composite's own execution row.\n *\n * Never throws to the runtime: checkpointing is best-effort by construction, and a run that died\n * because its progress note could not be written would be strictly worse than one that merely\n * cannot resume.\n */\n private async saveChoreographyCheckpoint(runId: string, snapshot: PlaybookChoreographyCheckpoint, session?: CompanionExecutionSessionContext, instanceKey?: string): Promise<void> {\n try {\n const context = PlaybookChoreographyCheckpointContextSchema.parse({\n kind: PlaybookRunCheckpointKind.CHOREOGRAPHY,\n ...choreographyProgressToContext(snapshot),\n // The INSTANCE whose progress this is (#1609), so only that instance adopts it.\n ...(instanceKey ? { instanceKey } : {}),\n });\n await this.actorsSystem.saveActorExecutionCheckpoint(runId, context, session);\n } catch (error) {\n this.logDebug('Choreography checkpoint could not be written (run continues)', { runId, error: String(error) });\n }\n }\n\n /**\n * Run a playbook AS an actor-system execution (#1358).\n *\n * The engine's `ActorsSystemBackendService.runActorExecution` owns the lifecycle: it opens the\n * execution and its task on the actor plane, hands the opened identities to the executor below, and\n * settles both rows on the outcome — task first, then execution, `COMPLETED` for every shape that\n * returns and `FAILED` with the error on the task for a throw. Until 2026-09-20 this method did all\n * of that itself, best-effort, under a per-playbook system ref the engine never registered (#1343);\n * the wrapper it was is now the engine's, and this is its first consumer.\n *\n * ## The run's ONE identity\n *\n * `runId` IS the execution's `_id`. The composed `<session>-<ref>-<ts>-<rand>` string this lane\n * minted until #1358 was a second identity for the same run — used in file names, routes and the\n * correlation envelope while the durable row carried another — and it is gone. Everything the run is\n * named by downstream (the write register, the trace, the resume route) uses the execution id.\n *\n * ## REQUIRED, not best-effort\n *\n * The previous wrapper caught every actor-plane failure and ran anyway, on the reasoning that the\n * companion \"routinely runs without a reachable platform\". The consequence was a run nobody could\n * find afterwards — including the loop guard that reads these rows to decide whether a task already\n * ran. The engine refuses to open an execution it cannot record, before any work, and names why\n * (`ACTOR_EXECUTION_PERSISTENCE_UNBOUND`, or the store's own error). A dev loop with no platform\n * learns that at the first run rather than at the first missing row.\n *\n * A SUSPENSION returns, and is NOT a completion (#1360): the run registers what it is waiting on\n * (`suspensionRequests`), the engine moves both rows to `AWAITING_APPROVAL` with the pending\n * decision and the resume inputs on the execution, and `resumePlaybookRun` continues it under the\n * SAME id. There is no checkpoint file and no second handle.\n */\n public async runPlaybook(input: PlaybookRunInput): Promise<PlaybookRunOutcome> {\n // In flight for its whole life, settle included, so the dev supervisor holds a restart for it\n // exactly as for a detached run.\n return this.whileInFlight(() => this.runPlaybookCounted(input));\n }\n\n private async runPlaybookCounted(input: PlaybookRunInput): Promise<PlaybookRunOutcome> {\n let runId: string | undefined;\n try {\n return await this.actorsSystem.runActorExecution(\n this.buildActorExecutionRequest(input),\n (opened) => {\n runId = opened.executionId;\n return this.executePlaybookRun({ ...input, runId: opened.executionId });\n },\n this.playbookRunOptionsFor(() => runId),\n );\n } catch (error) {\n // Only a run that ASKED for a composite subject can have been refused it; anything else that\n // surfaces here came from inside the run and keeps its own name.\n const subject = this.resolveExclusiveSubject(input);\n if (subject === undefined) throw error;\n throw await this.nameTheRunHoldingTheSubject(error, MetaWorkflowsExclusiveSubject.COMPOSITE, subject, input.session);\n } finally {\n if (runId !== undefined) this.failedRunMeasurements.delete(runId);\n }\n }\n\n /**\n * Derive again the expert charters a build panel refused as stale, by running the staffing step itself (#3204).\n *\n * An input a charter reads can move during the build (since #4022 the brand or the vision: the build's own design-system\n * and accepted-mark writes no longer count while it is unfinished), and the next generation step that seats that expert\n * is refused (#3244). The build holds that step and goes on; this runs `top_down.expert-personas` as a child of the same\n * lane, started the moment the step is held, beside the wave ({@link startStaleExpertChartersRepair}), so its landing\n * is a run of its own, recorded and committed like any other (which is why the refusal itself does not derive the\n * charter inline). Then the held steps it read are offered again. On reference run 42218788356 the refusal ended\n * the build lane at 32 of 98 tasks, and the staffing step it named only ran 20 minutes later, in another lane.\n *\n * Nothing runs when nothing is held, or when every held seat was edited by a person: such a charter is never derived\n * again, and its remedy is the hand edit (the step stays held until that commit). A staffing run that fails is reported\n * and keeps the hold: the next round meets the same refusal and tries again.\n *\n * It releases only the holds it read when it started (#4022): it runs beside the build now\n * ({@link startStaleExpertChartersRepair}), and a step held while it ran may wait on a charter it did not derive.\n */\n private async repairStaleExpertCharters(input: PlaybookRunInput): Promise<StaleExpertChartersRepair | undefined> {\n const held = this.buildDispatch.readStaleExpertChartersHold();\n if (held.length === 0) return undefined;\n const heldTaskRefs = held.map((entry) => entry.taskRef);\n const derivable = [...new Set(held.flatMap((entry) => entry.staleSeats.filter((seat) => !seat.authored).map((seat) => seat.roleRef)))];\n if (derivable.length === 0) {\n return { heldTaskRefs, ran: false, detail: 'Every stale charter was edited by a person and is never derived again: update it by hand and commit it.' };\n }\n /*\n * Not while the dev supervisor holds a restart (#3204 review F5): it is a new run, which the restart would wait on or\n * kill. The hold stays, so the next round, in the restarted companion, meets it and derives the charters then.\n */\n const saasRoot = this.companionContext?.saasRoot;\n if (saasRoot !== undefined && companionRestartDrain.isRestartHeld(saasRoot)) {\n return { heldTaskRefs, ran: false, detail: `${EXPERT_STAFFING_PLAYBOOK_REF} not run: the dev supervisor is holding a restart; the next round runs it.` };\n }\n try {\n await this.runPlaybook({\n playbookRef: EXPERT_STAFFING_PLAYBOOK_REF,\n selectionRationale: `The build's panels refused ${derivable.join(', ')} as older than their inputs (${held.map((entry) => entry.taskRef).join(', ')}). `\n + 'Derive those charters again from what is on record now, so the held build steps can seat them.',\n ...(input.nestedWithinChoreographyRef !== undefined ? { nestedWithinChoreographyRef: input.nestedWithinChoreographyRef } : {}),\n ...(input.rootRunId !== undefined ? { rootRunId: input.rootRunId } : {}),\n ...(input.requestedByUserId ? { requestedByUserId: input.requestedByUserId } : {}),\n ...(input.session ? { session: input.session } : {}),\n });\n this.buildDispatch.releaseStaleExpertChartersHold(`${EXPERT_STAFFING_PLAYBOOK_REF} derived ${derivable.join(', ')} again`, held);\n return { heldTaskRefs, ran: true, detail: `${EXPERT_STAFFING_PLAYBOOK_REF} derived ${derivable.join(', ')} again; the held steps run in the next wave.` };\n } catch (error) {\n this.logger.warn(`The staffing repair for stale expert charters failed; the held steps stay held: ${describeCaughtError(error)}`);\n return { heldTaskRefs, ran: false, detail: `${EXPERT_STAFFING_PLAYBOOK_REF} failed: ${describeCaughtError(error)}` };\n }\n }\n\n /**\n * The end of the queue of staffing runs in this process (#4022): each starts once the one before it settled. Both fields\n * start absent rather than initialised, so a service built without its constructor (the tests' `Object.create`) queues\n * the same way.\n */\n private expertStaffingTail: Promise<void> | undefined;\n /** Staffing runs queued or running, so a run can tell it waited for another. */\n private expertStaffingQueued: number | undefined;\n\n /**\n * Run one staffing (`top_down.expert-personas`) after any other in this process has settled (#4022).\n *\n * The build-dispatch step now starts its staffing repair beside the wave, so the lane's selector, the board, a person or\n * another lane can start a staffing run while it runs. Two at once would derive and accept the same charters side by\n * side: the accept serializes its writes (`acceptMutex`), but both derivations spend a three-pass model protocol and\n * the later accept overwrites the earlier from the same stale reading. In turn, the one that waited re-reads the\n * application (`waitedForAnother`), finds the charters the first derived current, and derives nothing. Every door that\n * runs the step (a direct run, a detached submission, a resume) reaches this through `executePlaybookRun`.\n */\n private runExpertStaffingInTurn<T>(work: (waitedForAnother: boolean) => Promise<T>): Promise<T> {\n const waitedForAnother = (this.expertStaffingQueued ?? 0) > 0;\n this.expertStaffingQueued = (this.expertStaffingQueued ?? 0) + 1;\n const run = (this.expertStaffingTail ?? Promise.resolve()).then(() => work(waitedForAnother));\n this.expertStaffingTail = run.then(() => undefined, () => undefined).finally(() => { this.expertStaffingQueued = (this.expertStaffingQueued ?? 1) - 1; });\n return run;\n }\n\n /** The staffing repair running beside the build (#4022), if one is: there is at most one at a time. */\n private staleExpertChartersRepairInFlight: Promise<StaleExpertChartersRepair | undefined> | undefined;\n\n /**\n * Start {@link repairStaleExpertCharters} without waiting for it, unless one is already running, and return the run\n * in flight (`undefined` when nothing is held, so nothing started).\n *\n * Why it no longer waits for the wave (#4022): on reference run 44052185141 the logo step was held at 11:15, the staffing\n * run started only when that wave drained at 12:27, and the next wave started at 12:36, so ten ready tasks waited eight\n * minutes on a run only the logo step needed (and again from 13:03 to 13:12). Started the moment a step is held, it runs\n * beside the coding runs the wave keeps starting, and when it lands it releases the held step for the next slot. A\n * staffing landing beside live coding runs is the case the in-flight landing window exists for (#3221), as for any\n * other lane's landing during the build. The build-dispatch step waits for it only when the wave could start nothing\n * else, since then the held steps are all that is left (and the lane would otherwise spend rounds on empty waves).\n */\n private startStaleExpertChartersRepair(input: PlaybookRunInput): Promise<StaleExpertChartersRepair | undefined> | undefined {\n if (this.staleExpertChartersRepairInFlight !== undefined) return this.staleExpertChartersRepairInFlight;\n if (this.buildDispatch.readStaleExpertChartersHold().length === 0) return undefined;\n const repair: Promise<StaleExpertChartersRepair | undefined> = this.repairStaleExpertCharters(input)\n .catch((error: unknown) => {\n this.logger.warn(`The staffing repair for stale expert charters failed; the held steps stay held: ${describeCaughtError(error)}`);\n return undefined;\n })\n .finally(() => {\n if (this.staleExpertChartersRepairInFlight === repair) this.staleExpertChartersRepairInFlight = undefined;\n });\n this.staleExpertChartersRepairInFlight = repair;\n return repair;\n }\n\n /**\n * What the build-dispatch step reports of the staffing repair once its wave has drained (#4022), and whether it waits.\n *\n * It waits only when the wave started nothing but steps refused on stale charters (or nothing at all): then the held\n * steps are all the build has left to run now, and returning would hand the lane an empty wave per round until the\n * staffing run lands (a held step is passed over, so the wave would find nothing either). Otherwise the staffing run\n * keeps running beside the next wave, and its landing releases the held steps there.\n */\n private async settleStaleExpertChartersRepairAfterWave(\n input: PlaybookRunInput,\n wave: Pick<ApplicationBuildWaveResult, 'dispatched'>,\n ): Promise<StaleExpertChartersRepair | undefined> {\n // A hold the wave set after its listener was gone (a step settling as the wave ended) starts here.\n const repair = this.startStaleExpertChartersRepair(input);\n if (repair === undefined) return undefined;\n const held = new Set(this.buildDispatch.readStaleExpertChartersHold().map((entry) => entry.taskRef));\n const startedOtherWork = wave.dispatched.some((entry) => !held.has(entry.plan.taskRef));\n if (!startedOtherWork) return repair;\n return {\n heldTaskRefs: [...held],\n ran: false,\n inFlight: true,\n detail: `${EXPERT_STAFFING_PLAYBOOK_REF} is deriving the stale charters again beside the build; the held steps run once it lands.`,\n };\n }\n\n /**\n * The single-flight subject this run holds, if any: its composite INSTANCE's (#1610), exactly when the\n * playbook DECLARES a choreography and the run is not nested inside another composite — see\n * `MetaWorkflowsExclusiveSubject.COMPOSITE`. Read off the compiled catalog without parsing it: an\n * unknown or malformed playbook holds nothing here and is refused by name inside the run.\n */\n private resolveExclusiveSubject(input: PlaybookRunInput): string | undefined {\n if (input.nestedWithinChoreographyRef !== undefined) return undefined;\n const compiled = getFrameworkKnowledgePlaybook(input.playbookRef)?.playbook as { method?: { choreography?: unknown } } | undefined;\n return compiled?.method?.choreography ? compositeExclusiveSubject(input.playbookRef, input.instanceKey) : undefined;\n }\n\n /**\n * Turn the engine's single-flight refusal into THIS lane's typed one, naming the run that holds the\n * subject — the engine says only that the subject is busy, and an operator needs to know by what.\n * Any other error is answered unchanged, so this is safe around a whole run.\n *\n * The transport maps both typed errors to 409. The holder is read from the rows, so the message is\n * as true after a restart or from a second process as it is inside the one that started the run.\n */\n private async nameTheRunHoldingTheSubject(\n error: unknown,\n kind: MetaWorkflowsExclusiveSubject,\n /** The leased string: the kind for the loop, `composite:<instance id>` for a composite (#1610). */\n subject: string,\n session?: CompanionExecutionSessionContext,\n ): Promise<unknown> {\n if (!isActorExecutionSubjectBusyError(error)) return error;\n let held = 'a run this process could not read';\n try {\n const holder = await this.actorsSystem.readExclusiveSubjectHolder(META_WORKFLOWS_SYSTEM_REF, subject, session);\n if (holder) {\n const row = await this.executions.getActorExecution(holder._id, session);\n const task = row.standaloneTasks[0];\n const playbookRef = task?.context?.correlation?.refs?.['playbookRef'];\n const goal = (task?.input as { goal?: unknown } | undefined)?.goal;\n held = kind === MetaWorkflowsExclusiveSubject.LOOP\n ? `goal \"${typeof goal === 'string' ? goal : 'unknown'}\", execution ${holder._id}, started ${row.createdAt.toISOString()}`\n : `playbook \"${typeof playbookRef === 'string' ? playbookRef : 'unknown'}\", execution ${holder._id}, started ${row.createdAt.toISOString()}`;\n }\n } catch {\n // Naming the holder is a courtesy; the refusal stands without it.\n }\n return kind === MetaWorkflowsExclusiveSubject.LOOP\n ? new PlaybookLoopAlreadyRunningError(\n `A playbook loop is already running (${held}). One loop per application: wait for it. A loop whose companion died is `\n + 'released when the companion next starts, which settles it ABORTED.',\n )\n : new PlaybookChoreographyAlreadyRunningError(\n `This composite instance is already running (${held}). One run per instance: a second would adopt the first one's `\n + 'progress checkpoint mid-flight and continue a run that is still going. Wait for it, or run it as another instance '\n + '(open one for its own purpose), or watch it with GET /api/companion/playbooks/runs. A composite whose companion died '\n + 'is released when the companion next starts, which settles it ABORTED and keeps its checkpoint.',\n );\n }\n\n /**\n * What the actor plane records about a playbook run: one task for the PROGRAMMATIC playbook-run\n * actor on one execution of the registered meta-workflows system, correlated back to the playbook\n * — and to the trace session, so a reader can join the run to its evidence without inferring one\n * identity from another.\n */\n private buildActorExecutionRequest(input: PlaybookRunInput): ActorExecutionOpenRequest<CompanionExecutionSessionContext> {\n const exclusiveSubject = this.resolveExclusiveSubject(input);\n return {\n systemRef: META_WORKFLOWS_SYSTEM_REF,\n actorRef: META_WORKFLOWS_PLAYBOOK_RUN_ACTOR_REF,\n ...(exclusiveSubject ? { exclusiveSubject } : {}),\n task: {\n title: `Playbook run ${playbookInstanceId(input.playbookRef, input.instanceKey)}`,\n description: `Meta-workflow playbook run of ${playbookInstanceId(input.playbookRef, input.instanceKey)}.`,\n topic: Actor_Task_Topics.METHOD_STEP,\n // The creator's brief is RECORDED (#1608): a composite once dropped it without trace, and a row that says what it was asked is how that shows.\n input: {\n playbookRef: input.playbookRef,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n ...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),\n dryRun: input.dryRun === true,\n },\n correlation: {\n domain: META_WORKFLOWS_CORRELATION_DOMAIN,\n refs: {\n playbookRef: input.playbookRef,\n // The INSTANCE on the durable row (#1609): every read built from the rows tells instances apart by it.\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n // A CHILD names its tree's root (#1610), so the root's overlap record can leave its own children out.\n ...(input.rootRunId ? { rootRunId: input.rootRunId } : {}),\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n ...(input.conversationId ? { [WorkbenchTaskCorrelationRef.CONVERSATION]: input.conversationId } : {}),\n },\n },\n },\n ...(input.session ? { scope: input.session } : {}),\n };\n }\n\n /** The measurement registered against what a detached run settled with, shaped for its in-process record (#1507). */\n private detachedRecordMeasurement(\n settledWith: unknown,\n shape: (measurement: PlaybookRunMeasurement) => PlaybookSettledRunRecord['measurement'],\n ): { measurement?: PlaybookSettledRunRecord['measurement'] } {\n // Guarded like every read of a report: shaping a measurement must never be why a run's record is lost.\n try {\n const measurement = typeof settledWith === 'object' && settledWith !== null ? this.runMeasurements.get(settledWith) : undefined;\n const shaped = measurement ? shape(measurement) : undefined;\n return shaped ? { measurement: shaped } : {};\n } catch {\n return {};\n }\n }\n\n /**\n * Run a playbook MEASURED (#1507): its wall-clock, and what every model call made inside it reported —\n * the generation, the judge, the selector, a child's coding or research agent. Every executor the\n * engine drives for this lane — a fresh run, a resumed one, a detached one — comes through here, so no\n * run reaches its row unmeasured.\n *\n * The measurement is registered against what the run SETTLED with — the result, which `concludeAs` /\n * `suspendOn` read back when they write the task summary, or the thrown error, which the engine's\n * `recordBesideFailure` reads so a failed run's row carries its spend beside `{ failure }`. A thrown\n * value that is not an object cannot be keyed and records the failure alone.\n */\n private async executePlaybookRun(\n input: PlaybookRunInput & { readonly runId: string },\n /**\n * A RESUMED run's earlier leg: its recorded measurement, or `null` when the waiting row carried\n * none — then that leg is an unobserved segment, so the total reads as a floor. Absent on a fresh run.\n */\n priorLeg?: PlaybookRunMeasurement | null,\n ): Promise<PlaybookRunOutcome> {\n // Counted here as well as at every entry, so a caller added later is covered while it executes.\n // Not drain-counted HERE: every path into it is counted once, at its entry, for the run's whole life (#3204).\n return this.whileInFlight(() => this.executePlaybookRunCounted(input, priorLeg), { drainCounted: false });\n }\n\n /**\n * Count `work` as one RUN for the restart drain (#3204): busy for its whole life unless paused (parked at the restart\n * window, or waiting on children counted themselves). Without an application root there is no supervisor to drain for.\n */\n private whileDrainCounted<T>(work: () => Promise<T>): Promise<T> {\n const saasRoot = this.companionContext?.saasRoot;\n return saasRoot === undefined ? work() : companionRestartDrain.whileWorking(saasRoot, work);\n }\n\n /** {@link whileDrainCounted}'s pause: the counted run calling it waits on work that counts itself. */\n private whileDrainPaused<T>(work: () => Promise<T>): Promise<T> {\n return this.companionContext?.saasRoot === undefined ? work() : companionRestartDrain.whilePaused(work);\n }\n\n /** {@link whileDrainCounted} for a run whose life spans a detached chain: counted until the release is called. */\n private beginDrainCounted(): () => void {\n const saasRoot = this.companionContext?.saasRoot;\n return saasRoot === undefined ? () => undefined : companionRestartDrain.begin(saasRoot);\n }\n\n /**\n * The restart window the creation loop and every choreography wait at before dispatching (#3204): returns at once\n * unless the dev supervisor is holding a restart, and otherwise parks this round until the restart comes. Said once per\n * park in the log, since a parked round is otherwise silent.\n */\n private async awaitRestartWindow(): Promise<void> {\n // No application root, no supervisor to wait for: a harness, or a companion not started from one.\n const saasRoot = this.companionContext?.saasRoot;\n if (saasRoot === undefined) return;\n return companionRestartDrain.awaitRestartWindow(saasRoot, (held) => {\n this.logger.info('A restart is held by the dev supervisor: this round waits at its boundary and starts nothing, so the restart '\n + 'finds nothing running; the run continues after the restart', { reason: held.reason, heldSince: held.since });\n }, (held) => {\n this.logger.warn('A restart has been held past the supervisor\\'s own ceiling and is still published: the round goes on rather '\n + 'than waiting for ever', { reason: held.reason, heldSince: held.since });\n });\n }\n\n private async executePlaybookRunCounted(\n input: PlaybookRunInput & { readonly runId: string },\n priorLeg?: PlaybookRunMeasurement | null,\n ): Promise<PlaybookRunOutcome> {\n const startedAtMs = Date.now();\n // Before any work: a loop spending at an enormous rate starts nothing new (a runaway breaker, not a budget).\n this.spendMeter.assertSpendRateBelowRunawayBreaker();\n const measured = await this.spendMeter.measure(() => this.executePlaybookRunUnmeasured(input));\n /*\n * A composite RESUMED from a checkpoint ran only its later iterations here; the earlier ones were paid\n * for by a process that died before recording them. One unobserved segment each, so the run's total\n * reads as a floor — the same marking the runtime gives the composite's own spend.\n */\n // Read from the ADOPTED checkpoint (root and nested lanes), not the result: a resumed composite that\n // throws has no result, and its failure row must read as a floor too.\n const resumedIterations = this.adoptedCheckpointIterations.get(input.runId) ?? 0;\n this.adoptedCheckpointIterations.delete(input.runId);\n const measurement: PlaybookRunMeasurement = {\n durationMs: Date.now() - startedAtMs + (priorLeg?.durationMs ?? 0),\n spend: mergePlaybookSpend([\n ...(priorLeg === undefined ? [] : [priorLeg?.spend ?? PLAYBOOK_SPEND_NOT_OBSERVED]),\n measured.spend,\n ...Array.from({ length: resumedIterations }, () => PLAYBOOK_SPEND_NOT_OBSERVED),\n ]),\n };\n const settledWith = measured.settled.status === 'rejected' ? measured.settled.reason : measured.settled.value;\n if (typeof settledWith === 'object' && settledWith !== null) this.runMeasurements.set(settledWith, measurement);\n // A ROOT run says which other root runs it shared the tree with (#1610); a child's root says it for the tree.\n if (input.rootRunId === undefined) {\n const overlaps = await this.readOverlappingRootRuns(input.runId, new Date(startedAtMs).toISOString(), input.session);\n if (overlaps.length > 0) {\n if (typeof settledWith === 'object' && settledWith !== null) this.runOverlaps.set(settledWith, overlaps);\n if (measured.settled.status === 'rejected') this.failedRunOverlaps.set(input.runId, overlaps);\n }\n }\n // By run id as well for a failure: a thrown value that is not an object cannot key the WeakMap, so the\n // run id is what carries its spend to the row (the call site clears the entry once the run has settled).\n if (measured.settled.status === 'rejected') {\n this.failedRunMeasurements.set(input.runId, measurement);\n const reason: unknown = measured.settled.reason;\n if (resumedIterations > 0 && typeof reason === 'object' && reason !== null) this.inheritedRoundsByFailure.set(reason, resumedIterations);\n throw reason;\n }\n return measured.settled.value;\n }\n\n /**\n * The other ROOT runs whose time on this application overlapped this one's (#1610), read from the rows\n * as it settles. Best-effort by design: it is a RECORD beside the run, and a plane that cannot be read\n * at that moment costs the record, never the run's own settle. A run RESUMED after a suspension reads\n * from its original row's creation, so its window covers both legs.\n */\n private async readOverlappingRootRuns(runId: string, fallbackStartedAt: string, session?: CompanionExecutionSessionContext): Promise<readonly PlaybookRunOverlap[]> {\n try {\n const executions = await this.executions.listActorExecutions(\n CompanionExecutionsListQuerySchema.parse({ systemRef: META_WORKFLOWS_SYSTEM_REF, limit: 200 }),\n session,\n );\n const startedAt = executions.find((execution) => execution._id === runId)?.createdAt.toISOString() ?? fallbackStartedAt;\n return findOverlappingRootRuns(executions, { runId, startedAt, endedAt: new Date().toISOString() });\n } catch (error) {\n this.logDebug('Could not read the runs this one overlapped; its row goes without the record', { runId, error: describeCaughtError(error) });\n return [];\n }\n }\n\n private async executePlaybookRunUnmeasured(input: PlaybookRunInput & { readonly runId: string }): Promise<PlaybookRunOutcome> {\n /*\n * THE RUN's identity — the actor execution's own id, opened by the engine before this method is\n * entered (#1358), so everything below, including the throws, happens inside a run that can be\n * named and found.\n */\n const runId = input.runId;\n // When the run began reading what it derives from — recorded with its writes, see the register's `startedAt`.\n const runStartedAt = new Date().toISOString();\n const hydrated = getFrameworkKnowledgePlaybook(input.playbookRef);\n if (!hydrated) {\n throw new UnknownPlaybookError(`No compiled playbook is registered under \"${input.playbookRef}\".`);\n }\n /*\n * The loader types `playbook` as `unknown` on purpose — `@wildo-ai/framework-knowledge` cannot depend\n * on `@wildo-ai/saas-specifications`, so it ships the compiled bytes and leaves the contract to the\n * consumer. Parsing here is therefore the FIRST place the playbook's shape is enforced at runtime, and\n * a malformed catalog entry fails by name instead of surfacing as `undefined.outputs` three frames on.\n */\n const parsedPlaybook = MetaWorkflowPlaybookSchema.safeParse(hydrated.playbook);\n if (!parsedPlaybook.success) {\n throw new Error(\n `Compiled playbook \"${input.playbookRef}\" does not satisfy the playbook contract: `\n + parsedPlaybook.error.issues.slice(0, 5).map((issue) => `${issue.path.join('.') || '<root>'}: ${issue.message}`).join('; '),\n );\n }\n const playbook = parsedPlaybook.data;\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n if (!specificationsPackageRoot) {\n throw new Error('No specifications package is declared in wildo.saas.config.ts; there is nowhere to land a playbook output.');\n }\n\n /*\n * The LINE first (#1639): a playbook the application's line does not run is refused by readiness\n * whatever the tree holds, so it is refused here from the creator's answers alone, before the\n * full-state read — measured at 66 s under load on another run — that such a playbook never needed.\n * The refusal names the line, the reason that decides, rather than every unmet gate the full board\n * would add. A line that cannot be read answers no scope, and the full check below decides as before.\n * Traced as 'own-line-check', apart from the choreography's per-lane 'application-line-scope'.\n */\n const lineScope = await this.traceRunPhase(input.session, 'own-line-check', () => this.readApplicationLineScope());\n const lineRefusal = lineScope === undefined\n ? undefined\n : applicationLineRefusalOf(evaluatePlaybookEligibility({\n playbook,\n state: { artifactsByFamily: new Map(), applicationLine: lineScope },\n landableFamilies: this.resolveLandableFamilies(),\n }));\n if (lineRefusal !== undefined) {\n throw new PlaybookNotReadyError(`\"${input.playbookRef}\" is not ready to run: ${lineRefusal.detail}`);\n }\n /*\n * The bytes each output file holds as this run READS (#1614), taken before the inputs so nothing that\n * lands while the model works can hide inside the window. The landing refuses to replace a file that\n * moved since, instead of silently discarding whoever moved it. Held in memory for this run only.\n */\n const readBaselines = await this.traceRunPhase(input.session, 'output-landing-baselines', () => readPlaybookOutputLandingBaselines({\n specificationsPackageRoot,\n constantPrefix: LANDED_CONSTANT_PREFIX,\n outputs: (playbook.outputs ?? []).map((output) => ({ family: output.family, schemaRef: output.schemaRef })),\n }));\n const artifactState = await this.traceRunPhase(input.session, 'artifact-state', () => this.readArtifactState());\n /*\n * An INSTANCE runs only once it was opened (#1609): the dossier's activation record is where its purpose\n * lives, and a run of an instance nobody opened would land work nobody could say what it is for.\n * Refused before any model is asked, by name, with the way to open it.\n */\n /*\n * Asked of the ROOT only: a composite's child inherits its root's instance key and has no activation of\n * its own, so asking it would refuse every child of an instance composite (it did, until #1608). The root\n * was asked, and its purpose travels down as `instancePurpose`.\n */\n const instancePurpose = resolveInstanceRunPurpose({\n ...input,\n creatorInputs: artifactState.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined,\n });\n /* What this instance is for, in the creator's words: rendered beside the interview's answers, which is where the creator's facts go. */\n const purposeSection = instancePurpose === undefined ? '' : composeInstancePurposeSection(playbookInstanceId(input.playbookRef, input.instanceKey), instancePurpose);\n /*\n * An explicit run answers only READINESS: a playbook whose inputs are absent or invalid would produce\n * content derived from nothing, so that still refuses. SEQUENCING is the methodology's ordering, and an\n * explicit run IGNORES it — the creator asked for this playbook by name, which is the acknowledgement\n * (`.claude/rules/application-creation-directive.md`). The loop keeps its full gate; the eligibility\n * board keeps reporting phase information.\n */\n const eligibility = evaluatePlaybookEligibility({\n playbook,\n state: { ...artifactState, ...(input.stepResults ? { stepResults: input.stepResults } : {}) },\n landableFamilies: this.resolveLandableFamilies(),\n });\n if (!eligibility.eligible && !eligibility.blockedOnlyBySequencing) {\n throw new PlaybookNotReadyError(\n `\"${input.playbookRef}\" is not ready to run: ${eligibility.unmet.join(\" \")}`,\n );\n }\n if (!eligibility.eligible) {\n this.logDebug('Running a playbook out of sequence', { playbookRef: input.playbookRef, unmet: eligibility.unmet });\n }\n\n /*\n * The interview's answers come from the DOSSIER by default (#1454, Step 5): the committed\n * `creator-inputs` family, which `readArtifactState` already carries. The request's answers\n * override per question, so re-answering one keeps the rest. What is still missing is refused\n * by name just below — a missing answer is a gap in the interview, never an implicit \"no\".\n */\n const elicitationAnswerInput = {\n playbookRef: input.playbookRef,\n playbook,\n creatorInputs: artifactState.artifactsByFamily.get(ApplicationSpecificationFamily.CREATOR_INPUTS) as ApplicationCreatorInputs | undefined,\n overrides: input.elicitationAnswers,\n // This run's INSTANCE answers first, the default instance's for the rest (#1609).\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n };\n const elicitationAnswers = resolveElicitationAnswers(elicitationAnswerInput);\n /*\n * The questions the creator answered WITHOUT a value (#3437): they cover their question, so the run proceeds,\n * and the brief and the judge both say what they are. Never in `elicitationAnswers`, so no reader of answers (the\n * foundation executor, a clarification checkpoint) can take a reason for an answer.\n */\n const elicitationNonAnswers = resolveElicitationNonAnswers(elicitationAnswerInput);\n // Refuses a missing, unknown, duplicated or out-of-vocabulary answer — see its own header.\n /*\n * Computed options resolved against the families this run reads, so a computed CHOICE answer (the brand\n * name) is re-checked against the screening as it stands NOW — a candidate re-screened into a conflict\n * since the answer was given is refused here rather than carried into the brief.\n */\n const materializedElicitation = materializeElicitationOptions(playbook, { readFamily: (family) => artifactState.artifactsByFamily.get(family) });\n const elicitationSection = composeElicitationSection({\n playbookRef: input.playbookRef,\n elicitation: materializedElicitation.playbook.method?.elicitation,\n answers: elicitationAnswers,\n nonAnswers: elicitationNonAnswers,\n unavailableOptions: materializedElicitation.unavailableOptions,\n });\n\n /*\n * The CHOREOGRAPHY branch — a composite runs its children instead of producing anything itself.\n *\n * Keyed on the DECLARATION (`method.choreography`), never on `executor: COMPOSITE`. The executor\n * value is descriptive and one playbook already uses it for a bespoke deterministic executor that\n * is not a choreography at all; branching on it would make two unrelated things one code path.\n */\n if (playbook.method?.choreography) {\n /*\n * The umbrella's rendered elicitation travels into the run (#284 shape (a)): the questions are\n * declared on the COMPOSITE (validated just above, so an unanswered launch was already refused),\n * and the answers are the product facts every child derives from. Rendered ONCE here — children\n * must not re-validate parent answers against their own (empty) vocabularies, so what travels is\n * the section, not the raw answers. Channel-agnostic on purpose: this is \"the run's elicitation\n * state\", so answers arriving through a future mid-run workbench resume ride the same path.\n */\n return this.runChoreography({\n playbook,\n ...(input.requestedByUserId ? { requestedByUserId: input.requestedByUserId } : {}),\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n ...(instancePurpose !== undefined ? { instancePurpose } : {}),\n ...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),\n ...(elicitationSection ? { parentElicitationSection: elicitationSection } : {}),\n ...(input.nestedWithinChoreographyRef ? { nestedWithinChoreographyRef: input.nestedWithinChoreographyRef } : {}),\n ...(input.session ? { session: input.session } : {}),\n ...(input.dryRun === true ? { dryRun: true } : {}),\n runId,\n rootRunId: input.rootRunId ?? runId,\n });\n }\n\n /*\n * An INSTANCE (#1609) runs as a composite (handled above) or through the generation path below, which\n * lands into keyed sets only. Every other executor acts on state the application holds ONCE: the coding\n * lane builds the application, a deterministic or human step answers for all of it, and the foundation,\n * capability composition, maturity reading and expert staffing each derive one application-wide\n * family. An instance of one of those would be the same work under a second name, so it is refused.\n */\n if (input.instanceKey !== undefined && (\n playbook.executor === MetaWorkflow_Executor.CODING_AGENT\n || playbook.executor === MetaWorkflow_Executor.DETERMINISTIC_CLI\n || playbook.executor === MetaWorkflow_Executor.HUMAN\n || [EXPERT_PERSONAS_PLAYBOOK_REF, CAPABILITY_COMPOSITION_PLAYBOOK_REF, APPLICATION_MATURITY_PLAYBOOK_REF, FOUNDATION_PLAYBOOK_REF].includes(input.playbookRef)\n )) {\n throw new PlaybookNotReadyError(\n `\"${input.playbookRef}\" acts on the application as a whole, so it has no instances; run it without an instance key.`,\n );\n }\n\n /*\n * The CODING_AGENT tier (issue #119).\n *\n * `MetaWorkflow_Executor` answers *which tier runs this playbook's step*, and until now the runtime\n * honoured ONE of its five members. `bottom_up.build-dispatch` and `bottom_up.build-scale` both\n * declare `CODING_AGENT`; both also declare `outputs: []`, so both fell through to the ASSESSMENT\n * path below and returned a JUDGE VERDICT over the build-plan — while their method describes\n * dispatching an agent into the workspace. The declaration was honest and inert.\n *\n * Keyed on the EXECUTOR, unlike the foundation branch below which is keyed on a playbook ref. That\n * is the difference between a TIER and a bespoke executor: any playbook declaring this tier is\n * asking for the same mechanism, so a second author needs no edit here. (The neighbouring warning\n * about not branching on `executor` was written for the retired `COMPOSITE`, whose value described\n * two unrelated things at once; `CODING_AGENT` describes exactly one.)\n *\n * Placed AFTER readiness so the playbook's own preconditions still gate it — `build-dispatch`\n * requires an `artifact_exists: build-plan`, and dispatching against a plan that does not exist\n * would be a coding run with nothing to build.\n *\n * No DI was needed: `ApplicationBuildDispatchService` was already injected here for the read at\n * `resolveBuildExecutionProgress`. The wiring really was a call site, as #119 predicted.\n */\n if (playbook.executor === MetaWorkflow_Executor.CODING_AGENT) {\n /*\n * A DRY RUN must not dispatch. `dryRun` is documented to the operator as \"the full pipe ran\n * and NOTHING was written\", and a coding run writes application code in the workspace — so\n * honouring the flag here is the difference between a promise and a lie. `describeNextBuildTask`\n * is the pure read the dispatch service exposes for exactly this: it locks nothing, creates\n * nothing and starts nothing, while answering the same question about the same next task.\n */\n /*\n * A PARALLEL BUILD (#1528): with a build parallelism above one, this tier runs a rolling wave of\n * coding runs in the shared worktree instead of one dispatch, and returns once it has drained.\n * The per-run advisory judge is not composed here — each run's own row carries its outcome,\n * `concurrency` and `interferenceSuspected`, and the wave's end-of-run repairs are on the result: the\n * reconciliation, and the single-flight re-runs of tasks a sibling overwrote (`interferenceRepairs`, #2210).\n * A dry run never takes this branch: it dispatches nothing, whatever the degree.\n */\n // No application root means nothing to parallelize: one dispatch, as a degree of 1 would.\n const saasRoot = this.companionContext?.saasRoot;\n /*\n * While the coding agent's usage limit holds (#2388), a single-flight build takes the wave path too: at a\n * degree of 1 the wave is one single-flight dispatch, and it is the path that refuses to start a turn into\n * the limit and schedules the resume. A direct dispatch here would start a refused turn every round of the\n * build lane (#2388 review F3).\n */\n if (input.dryRun !== true && saasRoot !== undefined\n && (readBuildParallelism(saasRoot) > 1 || this.buildDispatch.readCodingAgentUsageLimitHold() !== undefined)) {\n /*\n * A panel refused stale expert charters (#3204): the staffing run that derives them again starts the moment a step is\n * held, beside the wave (#4022), and a hold carried from an earlier wave starts it now. Only the held steps wait on it.\n */\n const unsubscribeFromHolds = this.buildDispatch.onStaleExpertChartersHeld(() => { void this.startStaleExpertChartersRepair(input); });\n void this.startStaleExpertChartersRepair(input);\n let wave: ApplicationBuildWaveResult;\n try {\n wave = await this.buildDispatch.dispatchBuildWave(input.session);\n } finally {\n unsubscribeFromHolds();\n }\n const staffingRepair = await this.settleStaleExpertChartersRepairAfterWave(input, wave);\n // The coding agent's account hit its usage limit: the build resumes on its own at the reset (#2388) — unless a\n // person's stop holds it (#3206), read at the wave's END so a stop asked while it drained counts too. The resume\n // relaunches what the limit stopped: this run's tree when it was a child of a composite, else a wave (#2463).\n if (this.buildDispatch.readBuildStopHold() !== undefined) this.cancelBuildWaveResume('a person stopped the build');\n else if (wave.usageLimit) this.scheduleBuildWaveResume(wave.usageLimit.resumesAt, this.deriveBuildResumeTargetOf(input, saasRoot));\n return {\n playbookRef: input.playbookRef,\n dispatched: true as const,\n wave,\n taskRefs: wave.dispatched.map((entry) => entry.plan.taskRef),\n ...(staffingRepair !== undefined ? { staffingRepair } : {}),\n accepted: false as const,\n };\n }\n const dispatch: ApplicationBuildDispatchResult = input.dryRun === true\n ? { plan: await this.buildDispatch.describeNextBuildTask() }\n : await this.buildDispatch.dispatchNextBuildTask(input.session);\n /*\n * A held step's staffing run starts now (#4022), beside the coding run this dispatch admitted, and is awaited after it:\n * a build parallelism of 1 runs one thing per round, so the round waits, but no longer for the two in turn.\n */\n const staffingRepairStarted = input.dryRun === true ? undefined : this.startStaleExpertChartersRepair(input);\n /*\n * WAIT for the work, then report what it did.\n *\n * A coding dispatch resolves at ADMISSION — lock held, durable row written, agent about to\n * start. Returning there made this run's `finishedAt` equal the coding run's `startedAt` to\n * the millisecond on its first live use, so `GET /playbooks/runs` showed a completed green run\n * for a task that was still executing, and any treatment composed over the result would have\n * been handed an outcome that did not exist yet.\n *\n * A GENERATION STEP has no admission and needs no wait: its dispatch already resolved because\n * the work was done. A DRY RUN dispatches nothing, so there is nothing to wait for — and\n * waiting on the PREVIOUS run's task would be the same lie in the other direction.\n *\n * The consequence for the caller is deliberate and stated in the async route's own note: a\n * coding run can outlive the 30-minute request ceiling, so the SYNCHRONOUS route may lose its\n * socket to a run that keeps going. That was already true of a choreography, and the answer is\n * the same — submit with `async: true` and poll. A short-lived truthful answer is worth more\n * than a durable false one.\n */\n const codingRun = dispatch.admission\n ? await this.buildDispatch.awaitCodingRunOutcome(dispatch.admission.taskId, input.session)\n : null;\n // The step's panel refused stale expert charters (#3204): repaired here at a build parallelism of 1 too.\n const staffingRepair = await staffingRepairStarted;\n // The single dispatch met the coding agent's usage limit: the build resumes on its own at the reset (#2388).\n const heldAfterRun = this.buildDispatch.readCodingAgentUsageLimitHold();\n // Not when a person stopped the build while the task ran (#3206 review R1): a stop holds it until they start it.\n if (this.buildDispatch.readBuildStopHold() !== undefined) this.cancelBuildWaveResume('a person stopped the build');\n else if (heldAfterRun) this.scheduleBuildWaveResume(heldAfterRun.resumesAt, this.deriveBuildResumeTargetOf(input, saasRoot));\n /*\n * The ADVISORY judge over the settled run — the first time `bottom_up.build-dispatch`'s own\n * compiled treatment has ever been read by anything.\n *\n * `dispatch-outcome-sound` was authored for exactly this evidence: the host's disposition, the\n * verification gate, the sealed change-set and the recorded out-of-scope paths. It could not run\n * while this branch returned at admission, because at that instant there was no outcome to judge —\n * so a treatment with two criteria and four verdict guides sat compiled and unreachable.\n *\n * Advisory, like every other judge in this lane: the verdict goes to the response and the trace,\n * and nothing refuses on it (`.claude/rules/application-creation-directive.md`).\n *\n * ONE condition, and the dry-run guard that read naturally beside it is deliberately absent: a dry\n * run dispatches nothing, so it has no admission, so it has no outcome — `codingRun` is already\n * null there, and a `dryRun` clause would have been unreachable. It was written, measured against\n * the pins (neutering it reddened nothing) and removed: an unreachable guard is not defence in\n * depth, it is an untested claim that reads like coverage. The same single condition also covers\n * the unreadable row, which must not be judged because the one thing these criteria may never do\n * is infer a result from an absent change-set.\n */\n const judge = codingRun\n ? await this.judgeSettledCodingRun({\n playbookRef: input.playbookRef,\n hydrated,\n plan: dispatch.plan,\n outcome: codingRun,\n ...(input.session ? { session: input.session } : {}),\n })\n : undefined;\n return {\n playbookRef: input.playbookRef,\n dispatched: true as const,\n taskRef: dispatch.plan.taskRef,\n targetKind: dispatch.plan.targetKind,\n // The run's own outcome, beside the plan's. `dispatched` says an agent was STARTED; only\n // this says whether it finished, failed, or parked on a question — and a failed coding run\n // is a normal, reportable result of a successful dispatch, never an error to throw.\n ...(dispatch.admission ? { codingTaskId: dispatch.admission.taskId } : {}),\n ...(codingRun ? { codingRun } : {}),\n // Unreadable is its own answer. Reporting an unreadable row as a failed run would tell an\n // operator to re-dispatch work that may well have landed.\n ...(dispatch.admission && !codingRun ? { codingRunOutcomeUnreadable: true as const } : {}),\n ...(dispatch.staleExpertCharters ? { staleExpertCharters: dispatch.staleExpertCharters } : {}),\n ...(staffingRepair !== undefined ? { staffingRepair } : {}),\n ...(judge ? { judge } : {}),\n // Composed from the TREATMENT, so \"what does done mean\" is present even when the judge stayed\n // silent — withholding the criteria exactly when the automated check did not arrive is the\n // opposite of useful. Same reasoning as the generation path's own review guide.\n reviewGuide: renderPlaybookReviewGuide(buildPlaybookReviewGuide({\n treatment: hydrated.evaluationTreatment?.value,\n ...(judge !== undefined ? { judge } : {}),\n })),\n // The board AS OF DISPATCH, and re-reading it after the wait would report the same thing:\n // landing probes COMMITTED bytes, and a coding run's product is a working edit until a human\n // commits it. So a task cannot land by running — only by being accepted.\n remainingReadyTaskRefs: dispatch.plan.readyTaskRefs.filter((taskRef) => taskRef !== dispatch.plan.taskRef),\n landedTaskRefs: dispatch.plan.landedTaskRefs,\n // Reported, never inferred from the absence of a change: a caller cannot tell a dry run from\n // a real one by looking at the workspace, because a real run may legitimately write nothing.\n ...(input.dryRun === true ? { dryRun: true as const } : {}),\n // No acceptance, as everywhere in this lane: the run leaves working edits, and acceptance is a\n // later commit — a person's, or the companion's under the posture (#1534).\n accepted: false as const,\n };\n }\n\n /*\n * The tiers the runtime does NOT honour REFUSE, rather than falling through (issue #119).\n *\n * This is the defect this issue is about, generalised. `CODING_AGENT` was declared by two\n * playbooks and silently took the ASSESSMENT path, so a run that should have dispatched an agent\n * returned a judge verdict and nobody could tell from the response. `HUMAN` and\n * `DETERMINISTIC_CLI` are in that same position today — zero authors and zero readers — and the\n * moment someone declares one they would inherit exactly the same silence.\n *\n * Refusing by name is deliberately NOT the same as deleting the members. #111 drew that line:\n * they are unbuilt DESIGNS (a step a person performs; a step that is a `wildo` command), not\n * duplications of something that already runs, so deleting them would discard the design rather\n * than the duplication. What is removed here is only the silence.\n *\n * Neither is wired speculatively. `HUMAN` needs a decided contract — what a human step RETURNS,\n * and how a resume supplies it; the existing suspension machinery is shaped around a GENERATION\n * being interrupted (a family, a round, clarification requests) and a human-performed step has\n * none of those. `DETERMINISTIC_CLI` needs a registry of runnable commands, which does not\n * exist. Both are decisions for whoever authors the first playbook that needs one.\n */\n /*\n * The DETERMINISTIC_CLI tier (issues #147, #119).\n *\n * Topic 7 — \"does the built application assemble and pass its own checks?\" — had no producer:\n * `bottom_up.assemble-verify` was deleted on 2026-08-25 with the digest demolition, and the\n * question it asked went with it even though the answer needs no digests. Verification also\n * cannot be a build-plan task: `BuildPlanTaskTargetKind` has no member for it, so the decomposer\n * is structurally right to emit none. It has to be a playbook that RUNS COMMANDS.\n *\n * Keyed on the EXECUTOR, like CODING_AGENT above: any playbook declaring this tier is asking for\n * the same mechanism. The CHECK SET is host-owned and per-ref (see the constant), because\n * translating a semantic check ref into argv is reviewed host work.\n *\n * A DRY RUN resolves the checks and runs NOTHING. Not because verification mutates the\n * application — it does not — but because `tsc` writes `.tsbuildinfo`, so a dry run that executed\n * it would write, and `dryRun` is documented to the operator as \"the full pipe ran and NOTHING\n * was written\". Reporting the resolved set keeps the flag honest and cheap.\n */\n if (playbook.executor === MetaWorkflow_Executor.DETERMINISTIC_CLI) {\n const checkRefs = DETERMINISTIC_CLI_VERIFICATION_CHECKS[input.playbookRef]?.(this.companionContext?.saasRoot);\n if (!checkRefs) {\n throw new PlaybookNotReadyError(\n `\"${input.playbookRef}\" declares executor ${MetaWorkflow_Executor.DETERMINISTIC_CLI} but no verification `\n + 'check set is registered for it. Translating a check ref into a runnable command is reviewed host '\n + 'work — add the ref to DETERMINISTIC_CLI_VERIFICATION_CHECKS rather than letting it verify a '\n + 'default nobody chose.',\n );\n }\n if (input.dryRun === true) {\n return {\n playbookRef: input.playbookRef,\n verified: true as const,\n dryRun: true as const,\n checkRefs: [...checkRefs],\n checks: [],\n passed: null,\n accepted: false as const,\n };\n }\n const { verification, infrastructureError } = await this.codingAgentDispatch\n .runApplicationVerificationChecks(checkRefs);\n /*\n * An infrastructure error is reported, never swallowed and never conflated with a failing\n * check: \"the application does not typecheck\" and \"we could not run the typecheck\" send an\n * operator to entirely different places, and only one of them is the application's fault.\n */\n return {\n playbookRef: input.playbookRef,\n verified: true as const,\n checkRefs: [...checkRefs],\n checks: verification.map(({ checkRef, outcome }) => {\n // stderr first: a compiler or a crashed node process reports its cause there; tsc prints to stdout.\n const output = [outcome.stderrTail, outcome.stdoutTail].map((tail) => tail.trim()).filter((tail) => tail.length > 0).join('\\n').slice(-VERIFICATION_CHECK_OUTPUT_TAIL_CHARS);\n return {\n checkRef,\n success: outcome.success,\n message: outcome.message,\n ...(!outcome.success && output.length > 0 ? { output } : {}),\n };\n }),\n passed: verification.every(({ outcome }) => outcome.success),\n ...(infrastructureError ? { infrastructureError: String(infrastructureError) } : {}),\n // No acceptance in the run itself: acceptance is a later commit, a person's or the posture's (#1534).\n accepted: false as const,\n };\n }\n\n if (playbook.executor === MetaWorkflow_Executor.HUMAN) {\n throw new PlaybookNotReadyError(\n `\"${input.playbookRef}\" declares executor ${playbook.executor}, which this runtime does not honour. `\n + 'It is a declared design with no implementation: HUMAN needs a decided contract for what a '\n + 'human-performed step returns and how a resume supplies it, and DETERMINISTIC_CLI needs a '\n + 'registry of runnable commands. Running it would take the default path and produce something '\n + 'the declaration did not ask for — see issue #119. Declare a tier the runtime honours '\n + `(${MetaWorkflow_Executor.COMPANION_AGENT}, ${MetaWorkflow_Executor.RESEARCH_AGENT}, ${MetaWorkflow_Executor.CODING_AGENT}), or build this one.`,\n );\n }\n\n /*\n * The foundation EXECUTOR branch (J-1 stall E: a zero-output playbook had no runnable door).\n * `bottom_up.foundation` lands no family — it composes the application itself from the approved\n * domain plan. READINESS was checked above like every run; the executor owns everything else\n * (the tenancy elicitation answer, the derivation, the compose engine, the capability flip).\n */\n /*\n * The EXPERT-PERSONAS branch (#572): staff every panel the catalog convenes.\n *\n * Before this, the panel's staffing was not a journey step at all — `bottom_up.placement-plan` and the\n * logo step failed closed at bind time on any application whose charters nobody had curled in, and the\n * eligibility board had said the playbook was eligible. The board now names the missing roles\n * (`PANEL_UNSTAFFED`) and this is the step that removes them. Runner-owned like foundation, because the\n * derive → accept flow already exists as companion services and composes no brief of its own.\n *\n * Idempotent by construction: a committed, current role is left alone, and one older than its inputs is derived\n * again (#2819); a role whose shaping inputs have not\n * landed is reported as WAITING (mark, never gate — `application-creation-directive.md`); a refusal on\n * one role (a human-edited charter, an invalid resulting set) is recorded and the others proceed. The run FAILS\n * when it staffed none of the roles it attempted, and at the first role an environmental fault reaches (#3204).\n */\n if (input.playbookRef === EXPERT_PERSONAS_PLAYBOOK_REF) {\n /*\n * One staffing at a time in this process (#4022); one that waited reads the state the one before it left. A dry run\n * writes nothing, so it does not queue behind a derivation.\n */\n const staff = async (waitedForAnother: boolean) => this.staffExpertPanels({\n artifactState: waitedForAnother ? await this.readArtifactState() : artifactState,\n ...(input.dryRun === true ? { dryRun: true } : {}),\n run: {\n runId,\n startedAt: runStartedAt,\n playbookVersion: playbook.version,\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n },\n });\n return input.dryRun === true ? staff(false) : this.runExpertStaffingInTurn(staff);\n }\n\n /*\n * What every DETERMINISTIC executor branch below lands under (#3237): the run's identity, for the write record\n * {@link landDeterministicExecutorRun} computes from the run's landing window. Every branch that writes through a\n * runner-owned executor goes through that one door, so its output can be diffed, accepted and reverted like a\n * generation landing's, and the board dates it as landed instead of offering it as a FIRST RUN every round.\n */\n const deterministicLanding = {\n runId,\n playbookRef: input.playbookRef,\n startedAt: runStartedAt,\n playbookVersion: playbook.version,\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n dryRun: input.dryRun === true,\n };\n\n /*\n * The CAPABILITY-COMPOSITION executor branch (#1491): which optional packages (website, documentation\n * portal, workers, minions, locales) this application needs, DERIVED from the definition families and\n * landed as its own family — never generated. Keyed on the ref like the foundation branch, for the same\n * reason: a bespoke executor, not a tier. READINESS was checked above like every run.\n */\n if (input.playbookRef === CAPABILITY_COMPOSITION_PLAYBOOK_REF) {\n const valueOf = (family: string): unknown => {\n const value = artifactState.artifactsByFamily.get(family);\n return value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE ? undefined : value;\n };\n return this.landDeterministicExecutorRun<CapabilityCompositionExecutionResult>({\n ...deterministicLanding,\n // The executor reports what it wrote, relative to the specifications package: its family file and its wiring.\n declaredWrites: (result) => this.toApplicationRelativeSpecificationPaths(result.landed),\n execute: (noteWrite) => this.capabilityCompositionExecutor.execute({\n onWillWrite: (paths) => { for (const written of this.toApplicationRelativeSpecificationPaths(paths)) noteWrite(written); },\n inputs: {\n marketSnapshot: valueOf('market-snapshot'),\n brandBrief: valueOf('brand-brief'),\n businessModel: valueOf('business-model'),\n requirements: valueOf('requirements'),\n },\n ...(input.dryRun === true ? { dryRun: true } : {}),\n }),\n });\n }\n\n /*\n * The MATURITY-READING executor branch (#1496): where this application stands against its own\n * requirements, DERIVED from the requirements family, the decided-element graph and the build\n * plan's landing probe, and landed as its own family — never generated, for the composition's\n * reason and one stronger: a model asked where an application stands would answer, and nothing\n * could check the answer.\n *\n * It is a READING. Nothing downstream may gate on the stage it lands, because there is no \"done\"\n * for an application — the measurement moves, and the next requirement lowers it again.\n */\n if (input.playbookRef === APPLICATION_MATURITY_PLAYBOOK_REF) {\n // One composition of the reading's inputs, shared with the drive's requirements standing (#3701).\n const maturityInputs = await this.composeApplicationMaturityInputs(artifactState);\n return this.landDeterministicExecutorRun<ApplicationMaturityExecutionResult>({\n ...deterministicLanding,\n // A reading of the build's landed tasks, which are application code and no family: dated by the code (#3237 review H1).\n readsApplicationCode: true,\n // The executor reports what it wrote, relative to the specifications package: its family file and its wiring.\n declaredWrites: (result) => this.toApplicationRelativeSpecificationPaths(result.landed),\n execute: (noteWrite) => this.applicationMaturityExecutor.execute({\n onWillWrite: (paths) => { for (const written of this.toApplicationRelativeSpecificationPaths(paths)) noteWrite(written); },\n inputs: maturityInputs,\n ...(input.dryRun === true ? { dryRun: true } : {}),\n }),\n });\n }\n\n if (input.playbookRef === FOUNDATION_PLAYBOOK_REF) {\n const domainPlan = artifactState.artifactsByFamily.get('domain-plan');\n if (domainPlan === undefined || domainPlan === null || domainPlan === FILE_PRESENT_WITHOUT_VALUE) {\n throw new PlaybookNotReadyError(\n 'The foundation executor needs the domain-plan VALUE, and the specifications package does not expose it '\n + '(file-only presence). Wire `domainPlanSpecification` in companion-exports.ts — landings wire it '\n + 'automatically now; an older landed family needs the one-line wiring by hand — then restart the companion.',\n );\n }\n // The foundation names each file as it writes it, so a run refused part-way still records what it wrote.\n return this.landDeterministicExecutorRun<FoundationExecutionResult>({\n ...deterministicLanding,\n declaredWrites: (result) => result.writtenPaths,\n composes: (result) => result.stillComposedPaths,\n execute: (noteWrite, noteMayWrite) => this.foundationExecutor.execute({\n domainPlan,\n elicitationAnswers,\n ...(input.dryRun === true ? { dryRun: true } : {}),\n onWrite: noteWrite,\n onMayWrite: noteMayWrite,\n }),\n });\n }\n\n /*\n * Section composition as a function of an EFFECTIVE playbook, so the brief-adequacy repair arm\n * below can recompose ONCE with a widened `contextSources` declaration and nothing else. Every\n * composer already keys off `playbookDeclaresContextSource(effective, MEMBER)`, so widening the\n * declaration is the entire mechanism — no composer changes, and monotonicity is structural:\n * a union can only ADD sections, never remove or soften one (#254, design 2).\n */\n /*\n * Resolved ONCE, before the brief: the authority section lists the documentation requirements this input derives\n * (#707 stage 3), and the run hands the same input to the normalizers that key the programme and the release\n * policy to them. Resolving it twice could let the brief and the refusal disagree.\n */\n const requiredDocumentSet = await this.resolveRequiredDocumentSetInput(artifactState);\n /*\n * Also resolved ONCE, and for the same reason: the drafting brief tells the chooser which documents\n * the application already holds, and the landing merges the new draft into exactly that set. Two\n * reads could disagree — a brief saying \"not yet drafted\" about a document the landing then merges\n * over is the state this is here to prevent.\n */\n const existingComplianceDocumentCandidates = await this.readLandedComplianceDocumentCandidates();\n /** Who the privacy notice addresses, from the application's line (#1649); read once for both briefs below. */\n const organizationStructure = this.resolveOrganizationStructure(artifactState);\n /*\n * The build tasks already built (#3449), read once for a run producing the build plan: the brief names them so the\n * model keeps them, and the normalizer refuses an answer that drops or renames one, or changes its target or what it\n * produces (#3204). ONE read for both, so the two cannot disagree about what was built. Unreadable is absent, never\n * empty: \"not read\" is not \"nothing landed\", and it is loud (R10, `readBuiltTasksForBuildPlanRun`).\n */\n const producesBuildPlan = (playbook.outputs ?? []).some((output) => output.family === ApplicationSpecificationFamily.BUILD_PLAN);\n const landedBuildTasks = producesBuildPlan ? await this.readBuiltTasksForBuildPlanRun(input) : undefined;\n const landedBuildTasksSection = landedBuildTasks === undefined || landedBuildTasks.length === 0 ? '' : [\n '# Build tasks already built (keep every one, under its ref, with its target and products)',\n 'These tasks of the current build plan are built and committed. Your plan keeps each of them, under the same ref (author',\n 'its slug so it normalizes to that ref: the ref without its `build-task-` prefix), with its `target` and its `produces`',\n 'exactly as listed below: they are what proves the task built, so changing them makes built work read unbuilt. You may',\n 'refine what a built task\\'s objective says. Work a refresh adds goes in a NEW task. When an input of this plan REQUIRES',\n 'a built task\\'s target or products to change, declare it in `reshapedBuiltTasks` (its slug and the reason) and the task',\n 'is rebuilt. The reason is not the proof (#3491): a declared reshape is kept only when the task AS BUILT fails a check of',\n 'this plan against its inputs (the domain-plan coverage, the firm\\'s method, a reference that no longer resolves) and the',\n 'new shape repairs it. A plan that drops or renames a built task, changes one it does not declare, or declares a reshape',\n 'nothing requires, is refused.',\n ...[...landedBuildTasks].sort((left, right) => left.taskRef.localeCompare(right.taskRef)).map((task) =>\n `- \\`${task.taskRef}\\` — target ${JSON.stringify(task.target)}; produces ${JSON.stringify(task.produces)}${task.closed === true ? ' (closed by a person: never reshaped)' : ''}`),\n ].join('\\n');\n const composeGenerationOutputs = async (effective: typeof playbook): Promise<readonly PlaybookGenerationRequest[]> => {\n const workspaceTruthSection = await this.composeWorkspaceTruthSection(effective);\n const providerRegistrySection = await this.composeProviderRegistrySection(effective);\n const compliancePrimaryFactsSection = await this.composeCompliancePrimaryFactsSection(effective);\n const documentBlueprintSection = this.composeDocumentBlueprintSection(\n effective,\n existingComplianceDocumentCandidates,\n this.resolveDeclaredDocumentFacts(artifactState).declaredDocumentFacts,\n organizationStructure,\n );\n const documentFactObligationsSection = this.composeDocumentFactObligationsSection(effective, organizationStructure);\n const assuranceProgramAuthoritySection = this.composeAssuranceProgramAuthoritySection(effective, requiredDocumentSet.requiredDocumentSetInput);\n const applicationRoleGraphSection = await this.composeApplicationRoleGraphSection(effective);\n const assuranceEvidenceSection = await this.composeAssuranceEvidenceSection(effective);\n const riskSignalsSection = await this.composeRiskSignalsSection(effective);\n const authoredDocumentFactsSection = this.composeAuthoredDocumentFactsSection(effective, artifactState);\n const creatorStatedFactsSection = await this.composeCreatorStatedFactsSection(effective, artifactState);\n const applicationEnabledSurfaceSection = await this.composeApplicationEnabledSurfaceSection(effective);\n const inputTruthSection = await this.composeInputTruthSection(effective, artifactState);\n const marketFitScoresSection = await this.composeMarketFitScoresSection(effective, artifactState);\n return (playbook.outputs ?? []).map((output) => ({\n family: output.family,\n // A playbook output without a `schemaRef` has no family contract, so nothing could validate what the\n // model returned. Passing the empty string makes the runtime refuse it by name rather than here.\n schemaRef: output.schemaRef ?? '',\n ...declaredLandingScopeOf(output),\n brief: this.composeBrief({\n playbookRef: input.playbookRef,\n guidance: playbook.method?.guidance ?? '',\n family: output.family,\n creatorBrief: input.creatorBrief,\n selectionRationale: input.selectionRationale,\n elicitationSection: [elicitationSection, purposeSection].filter((part) => part !== '').join('\\n\\n'),\n inputTruthSection,\n workspaceTruthSection: output.family === ApplicationSpecificationFamily.BUILD_PLAN\n ? [workspaceTruthSection, landedBuildTasksSection].filter((section) => section !== '').join('\\n\\n')\n : workspaceTruthSection,\n providerRegistrySection,\n compliancePrimaryFactsSection,\n documentBlueprintSection,\n documentFactObligationsSection,\n assuranceProgramAuthoritySection,\n applicationRoleGraphSection,\n assuranceEvidenceSection,\n authoredDocumentFactsSection,\n skillCatalogSection: this.composeSkillCatalogSection(effective),\n skillBodiesSection: this.composeSkillBodiesSection(effective),\n coherenceSection: this.composeCoherenceSection(effective, artifactState),\n marketFitScoresSection,\n riskSignalsSection,\n operatingJurisdictionsSection: this.composeOperatingJurisdictionsSection(effective),\n creatorStatedFactsSection,\n applicationEnabledSurfaceSection,\n stepEvidenceSection: this.composeStepEvidenceSection(input.stepResults),\n parentElicitationSection: input.parentElicitationSection ?? '',\n clarificationAnswersSection: input.clarification\n ? composeClarificationAnswersSection(input.clarification.requests, input.clarification.answers, input.clarification.action)\n : '',\n }),\n }));\n };\n let outputs: readonly PlaybookGenerationRequest[] = await composeGenerationOutputs(playbook);\n let briefAdequacy: {\n verdict: BriefAdequacyVerdict;\n addedSources: readonly MetaWorkflow_ContextSource[];\n addedAspects: readonly string[];\n } | undefined;\n if (playbook.method?.briefAdequacyGate === true && outputs.length > 0) {\n const withheld = composeDeclaredInputWithheldAspects(playbook.inputs ?? [], this.decidedFamilyValues(artifactState));\n const judged = await this.judgeBriefAdequacy(playbook, outputs[0]!.brief, withheld);\n if (judged) {\n const declared = new Set(playbook.method?.contextSources ?? []);\n const excludedSources = new Set(playbook.method?.briefAdequacyExcludedSources ?? []);\n const addedSources = judged.missingSources.filter((source) => !declared.has(source) && !excludedSources.has(source));\n const addedAspects = judged.missingAspects;\n if (judged.verdict === BriefAdequacyVerdict.INSUFFICIENT && (addedSources.length > 0 || addedAspects.length > 0)) {\n const widened = {\n ...playbook,\n ...(addedAspects.length > 0 ? { inputs: widenDeclaredInputAspects(playbook.inputs ?? [], withheld, addedAspects) } : {}),\n method: { ...playbook.method, contextSources: [...declared, ...addedSources] },\n } as typeof playbook;\n outputs = await composeGenerationOutputs(widened);\n briefAdequacy = { verdict: BriefAdequacyVerdict.INSUFFICIENT, addedSources, addedAspects };\n this.logDebug('Brief-adequacy gate repaired the brief', { playbookRef: input.playbookRef, addedSources, addedAspects });\n } else {\n briefAdequacy = { verdict: judged.verdict, addedSources: [], addedAspects: [] };\n }\n }\n /*\n * ALWAYS logged, whatever the verdict — the first pilot run produced a state where \"ran and\n * judged sufficient\" and \"never ran at all\" were byte-identical to every observer (no log, no\n * trace, no result field), which is the silent-gate defect class this gate exists to remove.\n * A gate must SAY it gated.\n */\n this.logger.info('Brief-adequacy gate verdict', {\n playbookRef: input.playbookRef,\n verdict: briefAdequacy?.verdict ?? 'unavailable',\n addedSources: briefAdequacy?.addedSources ?? [],\n addedAspects: briefAdequacy?.addedAspects ?? [],\n });\n }\n\n /*\n * THE ASSESSMENT PATH — a playbook whose deliverable is a VERDICT, not a file.\n *\n * `runPlaybookGeneration` refuses `outputs: []` (\"declares no outputs to generate\"), which is\n * right for a producing playbook and wrong for an assessing one. `top_down.phase-gate` declares\n * five criteria and no outputs, so it has never been runnable: listed on the eligibility board\n * every time, 500 on every attempt, and the sanitized response said only \"internal\". That is the\n * lane's characteristic defect — a capability the catalog ADVERTISES and cannot deliver — for the\n * third time, and this instance was found by the first live run rather than by any test.\n *\n * An assessment run generates nothing, lands nothing and wires nothing. It judges the families\n * the playbook declares it reads, and returns the verdict with the review guide beside it. The\n * judge stays ADVISORY here as everywhere: it reports and nothing refuses on it.\n */\n if (outputs.length === 0) {\n return await this.runAssessmentPlaybook({ playbookRef: input.playbookRef, playbook, hydrated, artifactState, ...(input.session ? { session: input.session } : {}) });\n }\n\n this.logDebug('Running playbook', { playbookRef: input.playbookRef, outputCount: outputs.length });\n /*\n * ONE observed instant, used for both: the draft's `reviewedAt` and the date its cadence schedules\n * from. Two clock reads a millisecond apart could land either side of midnight and date the next\n * review from a different day than the review that scheduled it.\n */\n const recordedAt = new Date().toISOString();\n const nextReviewOn = resolveDeclaredAssuranceNextReviewOn(\n (this.companionContext.saasConfig as { assuranceReviewCadence?: unknown } | undefined)?.assuranceReviewCadence,\n recordedAt,\n );\n /*\n * What the compliance-programme normalizer refuses a NOT_APPLICABLE binding against — read by the\n * SAME method the authority brief reads, so what the producer was told cannot apply here is exactly\n * what is refused, and nothing else.\n */\n const enabledEngineCapabilities = this.readEnabledEngineCapabilities();\n const operatingJurisdictionSlugs = this.readOperatingJurisdictionSlugs();\n /*\n * #3045: what the system-of-record facets declare about splitting records by legal entity, for the domain-plan\n * normalizer to lay a record location's partition down from. Read only for a run producing the domain plan; a library\n * that cannot be read is left absent, and the normalizer records the split unconfirmed rather than guessing.\n */\n const systemOfRecordPartitionFields = await this.readSystemOfRecordPartitionFieldsFor(outputs);\n // #3995: what providers exist, so an integration plan binding nothing (or forking something) goes back to the model.\n const knownProviderRefs = await this.readKnownProviderRefsFor(outputs);\n /*\n * The landing IN FLIGHT (#3221): opened by the landing itself, just before its first write, with the paths it is\n * about to write, and told each later path before its write (#3237 review F1); released once the write record below\n * exists, or the landing fails (a `finally` below). Between the two, a coding door withholds exactly those paths\n * instead of committing them under a build task. The window holds the specifications package's bytes: a landing that\n * completes records its own files, and one that fails after its first write is recorded from the window (review M1).\n */\n let landingWindow: PlaybookRunLandingWindow | undefined;\n const result = await runPlaybookGeneration({\n readWriteBasis: () => this.readLandingWriteBasis(),\n onLandingWillWrite: async (packageRelativePaths) => {\n const paths = this.toApplicationRelativeSpecificationPaths(packageRelativePaths);\n if (landingWindow === undefined) landingWindow = await this.openLandingInFlight(runId, input.playbookRef, paths);\n else landingWindow.declare(paths);\n },\n playbookRef: input.playbookRef,\n // The INSTANCE (#1609): refused before generation, and at landing, unless every output is a keyed set.\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n // The members of each keyed set this playbook declares (#3896): it may land only those, which is what lets two\n // producers of one set run together.\n declaredSetMembers: new Map((playbook.outputs ?? []).flatMap((output) => {\n const members = resolveDeclaredSetMembers(playbook, output.family);\n return members === undefined ? [] : [[output.family, members] as const];\n })),\n outputs,\n specificationsPackageRoot,\n /*\n * The instant THIS HOST observed the run (#647). Supplied explicitly rather than letting the\n * runtime default it: the companion is the process a person is actually driving, so its clock is\n * the honest observer, and a caller that cares should say so rather than inherit one.\n *\n * It is not a review. The REVIEW is the commit — a landed programme is a working edit until a\n * human commits it — and this records when the draft was produced.\n */\n recordedAt,\n ...(nextReviewOn === undefined ? {} : { nextReviewOn }),\n ...(enabledEngineCapabilities === undefined ? {} : { enabledEngineCapabilities }),\n ...(operatingJurisdictionSlugs === undefined ? {} : { operatingJurisdictionSlugs }),\n ...(systemOfRecordPartitionFields === undefined ? {} : { systemOfRecordPartitionFields }),\n ...(knownProviderRefs === undefined ? {} : { knownProviderRefs }),\n ...(landedBuildTasks === undefined ? {} : { landedBuildTasks }),\n // NEUTRAL BY CONTRACT (issue #65): every landed specification constant carries the fixed\n // `application` prefix (`applicationVisionSnapshot`, `applicationBuildPlan`, …), never an\n // app-slug-derived one. The prefix used to be camelCased from the application's declared\n // name (`wonder-todos` → `wonderTodos`), which baked app identity into exported identifiers\n // — exactly what templates and companion introspection cannot rely on. App identity lives\n // in VALUES (`saasConfig.name`/`slug`), never in the names of landed exports.\n constantPrefix: LANDED_CONSTANT_PREFIX,\n model: this.buildArtifactGenerationPort(playbook),\n // The application's DECLARED document facts, so a compliance-document draft citing a fact\n // nobody declared is rejected into the retry rather than landed.\n //\n // The conditional spread is load-bearing and is the whole contract: ABSENT means \"not loaded,\n // skip the check\"; an EMPTY map means \"this application declares NO facts, so refuse every\n // citation\". Collapsing them would refuse every draft in every application that has not yet\n // run `refinement.document-facts`.\n ...this.resolveDeclaredDocumentFacts(artifactState),\n // The judged runs a citation may resolve against (#297), read from the SAME place the brief\n // renders its evidence section from. Absent stays absent for the reason above.\n ...this.resolveCommittedAssuranceRuns(),\n /*\n * The landed values, so the generation loop and the landing can refuse a citation of something\n * that does not exist — the coherence report's dangling class, moved from post-hoc page into\n * the findings-fed retry (2026-09-02). The same map eligibility and the input sections already\n * read; file-only sentinels ride along and are reported unreadable by the report, never thrown on.\n */\n landedFamilyValues: artifactState.artifactsByFamily,\n /*\n * The drafts already held. `undefined` only when this companion has no resolved specifications\n * package, where nothing could have been read and the landing's refusal is the honest outcome.\n */\n ...(existingComplianceDocumentCandidates === undefined ? {} : { existingComplianceDocumentCandidates }),\n /*\n * And re-read at LANDING (#1614): another drafter may land its document while this one is in its\n * model, and merging into the set read above would drop it. The start-of-run set stays the brief's.\n */\n reloadExistingComplianceDocumentCandidates: () => this.readLandedComplianceDocumentCandidates(),\n readBaselines,\n // WHICH documents this application needs, so a draft naming one it does not need is refused at\n // the landing and retried in the generation loop. Same absent-vs-empty contract as the facts\n // above: an omitted key skips the check rather than refusing everything.\n ...requiredDocumentSet,\n ...(input.dryRun === true ? { dryRun: true } : {}),\n ...(input.session ? { trace: this.buildTrace(input.session, `playbook-run-${input.playbookRef}`) } : {}),\n /*\n * The mid-run clarification channel. `mayAsk` is false once the round budget is spent, and\n * false for a CANCELLED or DECLINED resume — a creator who declined must not be asked the same\n * class of question again on the very next pass, which is how a conversation becomes a loop.\n */\n ...(playbook.method?.suspendsForClarification === true\n ? {\n clarification: {\n model: this.buildClarificationPort(),\n priorAnswers: input.clarification?.answers ?? [],\n // The questions and the response mode, so the landing can commit the DECISION RECORD\n // beside the artifact — an answer without its question reviews as nothing.\n ...(input.clarification ? { priorRequests: input.clarification.requests, priorAction: input.clarification.action } : {}),\n mayAsk: (input.clarification?.round ?? 0) < DEFAULT_MAXIMUM_CLARIFICATION_ROUNDS\n && input.clarification?.action !== MetaWorkflow_ClarificationAction.DECLINE,\n },\n }\n : {}),\n }).catch(async (error: unknown) => {\n try {\n /*\n * ANY failure after the landing's first write leaves what it had written in the tree (#3237 review F3, M1): a\n * conflict found at a later output's own write (#1614), a validation refusal, a diagram or decision write, a\n * wiring refusal. The window holds the bytes from before the first write, so what the declared paths changed is\n * recorded as this run's FAILED landing: owned and revertable, and the playbook not dated as landed by it.\n * `recordWindowLanding` releases the window; the `finally` below only covers a throw before it is reached.\n */\n if (landingWindow !== undefined && input.dryRun !== true) {\n // A conflict's own paths hold ANOTHER writer's bytes (that is the conflict), so they are never this run's (review F4).\n const conflicted = new Set(error instanceof PlaybookOutputLandingConflictError\n ? this.toApplicationRelativeSpecificationPaths(error.conflicts.map((conflict) => conflict.packageRelativePath))\n : []);\n await this.writeRegister.recordWindowLanding({\n window: landingWindow,\n run: { startedAt: runStartedAt, playbookVersion: playbook.version, ...(input.session ? { traceSessionId: input.session.sessionId } : {}) },\n declaredWrites: landingWindow.declaredPaths().filter((declared) => !conflicted.has(declared)),\n landingFailed: true,\n }).catch((recordError: unknown) => {\n this.logger.warn(`Run ${runId}'s landing failed after writing, and what it wrote could not be recorded: ${describeCaughtError(recordError)}`);\n });\n }\n } finally {\n await landingWindow?.release();\n }\n // A landing refused because its file moved since this run read it (#1614): name who moved it.\n if (error instanceof PlaybookOutputLandingConflictError) throw await this.describeLandingConflict(error, specificationsPackageRoot);\n throw error;\n });\n\n /*\n * Hoisted: read after the landing window is released, below. Everything from the landing's return to its record\n * runs inside a `try` whose `finally` releases the window (#3237 review F2), so a throw there (an aspect measure, a\n * placement parse) never leaves the marker withholding this run's paths for its whole bound.\n */\n let revertHandle: string | undefined;\n let revertedPlacementRevisions: ReturnType<typeof collectRevertedPlacementRevisions> = [];\n let landingRecorded = false;\n try {\n /*\n * THE INTERRUPT. The run produced nothing — the check runs before the artifact call — so there is\n * no partial work to reconcile: persist the checkpoint and hand the questions back. The creator\n * answers through the resume route and the run continues from here.\n */\n if (isPlaybookGenerationSuspension(result)) {\n const round = (input.clarification?.round ?? 0) + 1;\n const checkpoint: PlaybookRunSuspensionCheckpoint = {\n kind: PlaybookRunCheckpointKind.CLARIFICATION,\n playbookRef: input.playbookRef,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n family: result.family,\n round,\n dryRun: input.dryRun === true,\n ...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),\n ...(input.selectionRationale ? { selectionRationale: input.selectionRationale } : {}),\n ...(input.requestedByUserId ? { requestedByUserId: input.requestedByUserId } : {}),\n elicitationAnswers: elicitationAnswers.map((answer) => ({ ...answer })),\n // Cumulative: this round's answers join every earlier round's, so the next check never\n // re-asks anything the creator has already settled.\n priorAnswers: [...(input.clarification?.answers ?? [])],\n /*\n * CUMULATIVE, like the answers beside them — every round's questions, not just this one's.\n *\n * They were this round's alone until the first live multi-round conversation (2026-08-28),\n * which recorded round 2's two questions and silently lost round 1's three. The answers\n * carried forward and their QUESTIONS did not, so the committed decision record showed two\n * decisions out of five — and the three it dropped were the consequential ones (\"include\n * engagement tracking, defer invoicing\", \"an engagement may have multiple consultants\").\n *\n * A decision record that keeps the answers and loses the questions is worse than none: it\n * reads as a complete account of what was decided.\n *\n * Written field by field rather than spread, so a widened request cannot silently ride into\n * a persisted checkpoint without someone deciding it belongs there.\n */\n requests: accumulateClarificationRequests(input.clarification?.requests ?? [], result.requests).map((request) => ({\n ref: request.ref,\n question: request.question,\n why: request.why,\n kind: request.kind,\n ...(request.options ? { options: [...request.options] } : {}),\n })),\n };\n /*\n * The wait lives on the run's OWN execution row (#1360): the run id IS the handle the resume\n * route takes. The engine reads this registration when the run returns, moves both rows to\n * `AWAITING_APPROVAL`, and writes the decision and the checkpoint on the execution.\n */\n const suspended = {\n status: Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT as const,\n runId,\n playbookRef: input.playbookRef,\n family: result.family,\n round,\n requests: result.requests,\n };\n this.suspensionRequests.set(suspended, {\n decision: projectPlaybookClarificationAsDecision({ runId, requestedAt: new Date().toISOString(), checkpoint }),\n checkpointContext: checkpoint,\n /*\n * ROUTED to the person who started the run, when a person did (#1751): the engine then admits a\n * settle only from them and records who decided. A run with no signed-in starter stays unrouted.\n */\n ...(input.requestedByUserId\n ? { route: { kind: HumanDecision_RouteKind.OWNER }, requester: { kind: HumanDecision_RequesterKind.USER, ref: input.requestedByUserId } }\n : {}),\n });\n return suspended;\n }\n this.logDebug('Playbook run landed', {\n playbookRef: input.playbookRef,\n dryRun: input.dryRun === true,\n landed: result.landed.map((entry) => entry.packageRelativePath),\n });\n\n /*\n * WRITE REGISTER — every real run's files, with pre-images, so a mechanism-test run is revertible in\n * one call (`POST /runs/writes/:runId/revert`). Best-effort: the files are already on disk and git\n * already shows them, so a failed register write degrades the CONVENIENCE, never the run.\n */\n // The cross-family coherence report, refreshed from the tree this run just produced.\n //\n // Written on EVERY landing rather than by one playbook, because it is a pure function of the\n // landed families and any landing can change it — a coherence file that is only refreshed when\n // someone remembers is worse than none. `top_down.phase-gate` assesses exactly this and lands no\n // artifact, so its verdict lived only in whatever response the caller happened to keep.\n //\n // Composed from the PRE-run state overlaid with what just landed, not by re-reading: a second\n // introspection pass costs a subprocess import per run and would answer the same question.\n if (input.dryRun !== true) landingWindow?.declare(this.toApplicationRelativeSpecificationPaths([COHERENCE_REPORT_PACKAGE_RELATIVE_PATH]));\n const coherence = input.dryRun === true ? undefined : this.writeCoherenceReport(specificationsPackageRoot, artifactState, result.landedValues);\n\n /*\n * LOSE LOUDLY (issue #142). A panel re-run overwrites human placement revisions — that stays\n * true, and is the cheapest of the three options on the table — but it must not do it silently.\n *\n * `parsePlacementPlanGeneration` stamps every generated decision `DELIBERATED` and knows nothing\n * of a prior plan, and landing replaces the artifact wholesale. So a creator who moved Billing\n * and recorded WHY loses both the decision and the panel argument it superseded, with nothing in\n * the response saying so. Told, they re-apply it in one edit; untold, they find out when the rail\n * is wrong.\n *\n * Computed from the PRE-run artifact state and what just landed — the same two values the\n * coherence report above already uses, so no extra read.\n */\n const landedPlacementPlan = result.landedValues.find((entry) => entry.family === 'placement-plan');\n const incomingPlacementPlan = landedPlacementPlan === undefined\n ? undefined\n : PlacementPlanSchema.safeParse(landedPlacementPlan.value).data;\n revertedPlacementRevisions = incomingPlacementPlan === undefined\n ? []\n : collectRevertedPlacementRevisions(\n // `.data` is undefined when the application has no prior plan OR carries one this build\n // cannot parse. Both mean \"no prior revision I can vouch for\", and the collector's own\n // contract says an absent prior reverts nothing — a first run must not report reversions.\n PlacementPlanSchema.safeParse(artifactState.artifactsByFamily.get('placement-plan')).data,\n incomingPlacementPlan,\n );\n if (revertedPlacementRevisions.length > 0) {\n this.logger.warn(\n `Playbook '${input.playbookRef}' overwrote ${revertedPlacementRevisions.length} human placement revision(s): `\n + revertedPlacementRevisions\n .map((reverted) => `${reverted.subjectKey} (human: \"${reverted.revisedRationale}\"`\n + `${reverted.supersededRationale === undefined ? '' : `; panel had said: \"${reverted.supersededRationale}\"`})`)\n .join(' | ')\n + ' — re-apply the decision and set origin REVISED, or accept the panel\\'s.',\n );\n }\n\n /*\n * The REVERT handle, which is not the same statement as the run's identity even though it is the\n * same value. `runId` in the RESULT means \"this run is revertable through\n * `POST /runs/writes/:runId/revert`\", so it stays absent on a dry run and is cleared when the\n * register write fails — offering a handle to a record that does not exist would be worse than\n * offering none. The run still HAS an identity in both cases; it simply is not revertable.\n */\n if (input.dryRun !== true) {\n revertHandle = runId;\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);\n await this.writeRegister\n .record({\n runId,\n playbookRef: input.playbookRef,\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n startedAt: runStartedAt,\n playbookVersion: playbook.version,\n // What this landing measurably changed, per family (#2146): the rerun verdict reads it, not the declaration.\n ...(() => {\n // Every landed family is named: `null` records a change measured but not confinable to aspects (review R1).\n const aspectsChanged: Record<string, string[] | null> = {};\n for (const landed of result.landedValues) {\n const changed = measureChangedAspects(landed.family, artifactState.artifactsByFamily.get(landed.family), landed.value);\n aspectsChanged[landed.family] = changed === undefined ? null : [...changed];\n }\n return Object.keys(aspectsChanged).length > 0 ? { aspectsChanged } : {};\n })(),\n ...((briefAdequacy?.addedAspects.length ?? 0) > 0 ? { readAspectsAdded: [...briefAdequacy!.addedAspects] } : {}),\n at: new Date().toISOString(),\n files: [\n ...result.landed.map((entry) => ({\n path: path.posix.join(specificationsRelativeRoot, entry.packageRelativePath),\n existedBefore: entry.existedBefore,\n ...(entry.previousContent !== undefined ? { previousContent: entry.previousContent } : {}),\n writtenContent: entry.renderedSource,\n // Whether this landing replaced only what the run read, or merged over another writer (#1614).\n concurrency: entry.concurrency,\n })),\n // The export-wiring edits (companion-exports slot + barrel) travel in the SAME record, so\n // reverting a run also unwires it — a reverted family must not leave a dangling import.\n ...result.wired.map((entry) => ({\n path: path.posix.join(specificationsRelativeRoot, entry.packageRelativePath),\n existedBefore: true,\n previousContent: entry.previousContent,\n writtenContent: entry.renderedSource,\n })),\n // The coherence report rides the record too: it is derived from the families this run\n // changed, so reverting them must revert the report that describes them.\n ...(coherence ? [{\n path: path.posix.join(specificationsRelativeRoot, coherence.packageRelativePath),\n existedBefore: coherence.existedBefore,\n ...(coherence.previousContent !== undefined ? { previousContent: coherence.previousContent } : {}),\n writtenContent: coherence.renderedSource,\n }] : []),\n // Review diagrams ride the same record for the same reason: they are part of what the\n // creator commits, so a revert must take the picture with the plan it depicts.\n ...result.diagrams.map((entry) => ({\n path: path.posix.join(specificationsRelativeRoot, entry.packageRelativePath),\n existedBefore: entry.existedBefore,\n ...(entry.previousContent !== undefined ? { previousContent: entry.previousContent } : {}),\n writtenContent: entry.renderedSource,\n })),\n // And the decision records, for the same reason once more: a revert that left DECISIONS.md\n // behind would leave the questions standing beside an artifact that no longer exists.\n ...result.decisions.map((entry) => ({\n path: path.posix.join(specificationsRelativeRoot, entry.packageRelativePath),\n existedBefore: entry.existedBefore,\n ...(entry.previousContent !== undefined ? { previousContent: entry.previousContent } : {}),\n writtenContent: entry.renderedSource,\n })),\n ],\n })\n .catch((error: unknown) => {\n this.logDebug('Run write-register record failed (non-fatal)', { runId, error: String(error) });\n revertHandle = undefined;\n });\n landingRecorded = true;\n }\n } catch (error) {\n /*\n * A throw between the landing's return and its record (#3237 review F7): building the record's argument (an aspect\n * measure), the placement check, the coherence report. The files are on disk, so what the declared paths changed\n * is recorded as a FAILED landing from the window, as for a failure inside the landing; then the error goes on.\n */\n if (!landingRecorded && landingWindow !== undefined && input.dryRun !== true) {\n await this.writeRegister.recordWindowLanding({\n window: landingWindow,\n run: { startedAt: runStartedAt, playbookVersion: playbook.version, ...(input.session ? { traceSessionId: input.session.sessionId } : {}) },\n declaredWrites: landingWindow.declaredPaths(),\n landingFailed: true,\n }).catch((recordError: unknown) => this.logger.warn(`Run ${runId} landed, then failed before its record, and what it wrote could not be recorded: ${describeCaughtError(recordError)}`));\n }\n throw error;\n } finally {\n // The record exists (or never will): the landing is no longer in flight (#3221).\n await landingWindow?.release();\n }\n\n /*\n * The ADVISORY judge — the first live reader of the compiled evaluation treatments.\n *\n * It runs AFTER the files are landed, its verdicts go to the trace and the response, and nothing here\n * (or anywhere) refuses on them: promoting a verdict into a guard is a deliberate later decision\n * (`.claude/rules/application-creation-directive.md`). A malformed or absent treatment is a skip.\n */\n let judge: PlaybookJudgeResult | undefined;\n if (hydrated.evaluationTreatment) {\n const treatment = MetaWorkflow_EvaluationTreatmentDefinitionSchema.safeParse(hydrated.evaluationTreatment.value);\n const judgeEvidence = treatment.success\n ? await this.composeGenerationJudgeEvidence(playbook, artifactState, result.landedValues.map((entry) => entry.family), result.landedValues)\n : undefined;\n // The SAME composer the generation brief used, over the same step results — so the judge reads\n // the evidence in the shape the generator was given it, rather than a second rendering of it.\n const stepEvidenceForJudge = this.composeStepEvidenceSection(input.stepResults);\n /*\n * What this run landed, research-informed families screened before the judge reads them (#2938): a GAP's rationale\n * becomes this step's next instruction, so a family a research-fed step wrote is read withheld or marked here as\n * it is everywhere else it is read.\n */\n const judgedLanded = treatment.success ? await this.screenLandedValuesForJudge(input.playbookRef, artifactState, result.landedValues) : [];\n judge = treatment.success\n ? await runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed: judgedLanded,\n ...(artifactState.applicationLine ? { notApplicableFamilies: artifactState.applicationLine.notApplicableFamilies } : {}),\n ...(judgeEvidence && judgeEvidence.acceptedInputs.length > 0 ? { acceptedInputs: judgeEvidence.acceptedInputs } : {}),\n ...(judgeEvidence && judgeEvidence.derivedContext.length > 0 ? { derivedContext: judgeEvidence.derivedContext } : {}),\n /*\n * The evidence THIS RUN gathered (#1432). `top_down.market-snapshot-produce` judges whether\n * its snapshot is grounded in the sealed research evidence, and the judge was handed every\n * source except that one — the generator got it, the grader did not.\n */\n ...(stepEvidenceForJudge ? { stepEvidence: stepEvidenceForJudge } : {}),\n // The creator's own input is the ground truth several criteria judge groundedness against —\n // without it the vision criterion could only answer INDETERMINATE (the first live finding).\n ...(input.creatorBrief || elicitationAnswers.length || elicitationNonAnswers.length\n ? {\n creatorInput: {\n ...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),\n ...(elicitationAnswers.length ? { elicitationAnswers } : {}),\n ...(elicitationNonAnswers.length ? { elicitationNonAnswers } : {}),\n },\n }\n : {}),\n model: this.buildGenerationPort(),\n ...(input.session ? { trace: this.buildTrace(input.session, `playbook-judge-${input.playbookRef}`) } : {}),\n })\n : { judged: false, skipped: `Compiled evaluation treatment does not satisfy its contract: ${treatment.error.issues[0]?.message ?? 'unknown issue'}` };\n this.logDebug('Playbook judge answered', { playbookRef: input.playbookRef, judge });\n /*\n * A GAP verdict is recorded ON THE LANDING (#2142), so the next unattended round can tell a rejected,\n * unchanged playbook (stuck) from an accepted one (finished): both are CURRENT, and withheld alike.\n * Only when the writes were recorded (`revertHandle`); best-effort, like the record itself — a lost\n * stamp makes the playbook read as finished, which re-offers nothing.\n */\n if (revertHandle !== undefined && judge.judged && judge.overall === MetaWorkflow_EvaluationVerdict.GAP) {\n const criteria = judge.criteria\n .filter((criterion) => criterion.verdict === MetaWorkflow_EvaluationVerdict.GAP)\n .map((criterion) => ({ criterionRef: criterion.criterionRef, ...(criterion.rationale.length > 0 ? { rationale: criterion.rationale } : {}) }));\n await this.writeRegister.markJudgedGap(revertHandle, criteria).catch((error: unknown) => {\n this.logDebug('Run write-register GAP stamp failed (non-fatal)', { runId: revertHandle, error: String(error) });\n });\n }\n }\n /*\n * Items the landing DROPPED (#2556): an onboarding document whose host view no plan contains goes, and the rest of\n * the plan lands. Named in the log as well as on the response, because a choreography child's response reaches no\n * person: this is where an unattended run says what the reviewer of the commit should know is gone.\n */\n const droppedItems = result.landed.flatMap((record) => (record.droppedUnresolvableItems ?? []).map((item) => ({ family: record.family, ...item })));\n for (const record of result.landed) {\n if (record.droppedUnresolvableItems === undefined) continue;\n this.logger.warn(`Playbook \"${input.playbookRef}\" landed \"${record.family}\" without ${record.droppedUnresolvableItems.length} item(s) or entries whose refs resolve to nothing`, {\n family: record.family,\n dropped: record.droppedUnresolvableItems.map((item) => `${item.aspectKey} ${item.itemRef} (${item.scope}): ${item.field} → ${item.missingRefs.join(', ')}`),\n });\n }\n /*\n * Elements the generation's LAST attempt removed rather than refuse the output (#3995 review follow-up): a recorded need\n * naming a provider that exists, or a binding to a provider nothing provides. Said here for the same reason as the\n * dropped items above: an unattended run's response reaches no person.\n */\n for (const attempt of result.generation) {\n if (attempt.lastAttemptRemovals === undefined) continue;\n this.logger.warn(`Playbook \"${input.playbookRef}\" landed \"${attempt.family}\" after its last attempt removed ${attempt.lastAttemptRemovals.length} element(s) it could not correct`, {\n family: attempt.family,\n removed: attempt.lastAttemptRemovals,\n });\n }\n // On the run's write record too, so the commit that accepts it names what is missing (best-effort, like the record).\n if (revertHandle !== undefined && droppedItems.length > 0) {\n await this.writeRegister.markDroppedItems(revertHandle, droppedItems).catch((error: unknown) => {\n this.logDebug('Run write-register drop stamp failed (non-fatal)', { runId: revertHandle, error: String(error) });\n });\n }\n // The pre-images and rendered bytes stay in the register; the response and downstream readers get the\n // slim landing records they always had.\n const slim = {\n ...result,\n landed: result.landed.map(({ renderedSource: _renderedSource, previousContent: _previousContent, existedBefore: _existedBefore, ...entry }) => entry),\n wired: result.wired.map(({ renderedSource: _renderedSource, previousContent: _previousContent, ...entry }) => entry),\n diagrams: result.diagrams.map(({ renderedSource: _renderedSource, previousContent: _previousContent, existedBefore: _existedBefore, ...entry }) => entry),\n decisions: result.decisions.map(({ renderedSource: _renderedSource, previousContent: _previousContent, existedBefore: _existedBefore, ...entry }) => entry),\n };\n // WHAT TO CHECK — the playbook's own criteria, in the creator's terms rather than as refs.\n // Composed from the TREATMENT, so it is present on a dry run and on a run whose judge stayed\n // silent: withholding \"what does done mean\" exactly when the automated check did not arrive is\n // the opposite of useful.\n const reviewGuide = renderPlaybookReviewGuide(buildPlaybookReviewGuide({\n treatment: hydrated.evaluationTreatment?.value,\n ...(judge !== undefined ? { judge } : {}),\n }));\n\n /*\n * Does the application still LOAD, having been written to?\n *\n * A run verifies that it WROTE a file. It has never verified that the application survived — and on\n * 2026-09-16 two consecutive runs on Wonder Todos showed both halves of what that costs. One answered\n * 200 with the advisory judge passing and left the specifications package with 249 type errors; the\n * next answered 500 in a second, because a landed family no longer satisfied a hand-authored module\n * that throws at import, and `companion-exports` — which the config loader imports — could not be\n * evaluated at all. Every companion request failed for the rest of the session, INCLUDING the runs\n * that would have landed the correction. The remedy needed the mechanism the landing had taken down.\n *\n * `readArtifactState` is that load, and it genuinely re-reads what this run just wrote:\n * `loadSpecificationsCompanionData` asks again whenever the authored tree's signature moved, and the\n * worker that answers evaluates it with a fresh module cache, so a long-lived companion cannot answer\n * from an evaluation frozen before the landing (#170, #3205). Without that this check would pass on a\n * broken landing and be worse than nothing.\n *\n * It REPORTS rather than throws, and the asymmetry is the point. The files are already on disk and the\n * run genuinely produced them; converting that into a failed run would hide the artifacts an operator\n * now has to look at. What the operator needs is to be told, at the moment it happened, by the run that\n * caused it — with the revert door beside it, which the response note already names.\n *\n * NOT a typecheck. `bottom_up.assemble-verify` owns that question for the whole application and stays\n * where it is: a type error is visible, local, and leaves the companion running to fix it. A load\n * failure is the one that takes down the lane that would land the fix.\n */\n const landingLoadFailure = input.dryRun === true ? undefined : await this.describeLandingLoadFailure();\n\n return {\n ...slim,\n reviewGuide,\n // Present only when the landing broke the load — an absent field is the ordinary, healthy run.\n ...(landingLoadFailure === undefined ? {} : { landingLoadFailure }),\n // Reported even when empty is WRONG here — an empty array on every run of every playbook is\n // noise. Present means \"this run overwrote human decisions\"; absent means it did not.\n ...(revertedPlacementRevisions.length > 0 ? { revertedPlacementRevisions } : {}),\n ...(judge !== undefined ? { judge } : {}),\n ...(revertHandle !== undefined ? { runId: revertHandle } : {}),\n ...(input.dryRun === true ? { dryRun: true } : {}),\n };\n }\n\n /**\n * The application's config load, re-run against what this run just wrote, as a sentence or `undefined`.\n *\n * `undefined` means it loaded. Anything else is the message an operator must act on, and it names the\n * revert door because a landing that breaks the load is the case where that door exists.\n */\n private async describeLandingLoadFailure(): Promise<string | undefined> {\n try {\n await this.readArtifactState();\n return undefined;\n } catch (error) {\n const reason = describeCaughtError(error);\n this.logDebug('Landing broke the application config load', { reason });\n return `This run's files are on disk, and the application can no longer be loaded with them: ${reason}`\n + ' Nothing downstream will work until this is resolved — revert this run with `wildo creation revert <runId>` (the runId is in this response),'\n + ' or correct the family it names.';\n }\n }\n\n /**\n * The evidence a GENERATION-path judge reads the landed values against: what the run was given (#964 step 2).\n *\n * Until this existed the generation-path judge received the landed values and the creator's input, and\n * nothing else — so a criterion asking whether an artifact claims more than the application accepted\n * could only read the artifact. The run's brief carried the evidence; the judge never saw it.\n *\n * - `acceptedInputs`: the playbook's declared input families, the same section the generator read.\n * - `derivedContext`: the objectives a compliance programme may bind — each one's intent and its\n * applicability COMPUTED for this application — when the playbook declares that source; the\n * application's compliance-relevant declarations when it declares that one; and — when the run landed\n * `document-facts` — the facts the runtime computed, which the file omits on purpose and a judge must\n * neither ask for nor let a landed fact contradict; and — when the run landed a `brand-brief` — the theme point its\n * style words derive, computed with the build's own function (#2818).\n *\n * Best-effort, like the judge itself: a declarations read that fails leaves that section out rather\n * than failing a run whose files have already landed. The criterion then answers INDETERMINATE.\n */\n private async composeGenerationJudgeEvidence(\n playbook: MetaWorkflowPlaybook,\n state: PlaybookArtifactState,\n landedFamilies: readonly string[],\n /**\n * The values this run PRODUCED, when the caller holds them.\n *\n * Two entries are read: the compliance-document-candidate ones, to learn which documents the run drafted, and\n * the brand-brief one, whose style words the judge's derived look is computed from (#2818). Omitted means \"the caller does not know\", not \"the run produced\n * none\" — disk then answers,\n * which is the behaviour every caller had before.\n */\n draftedValues?: readonly { readonly family: string; readonly value: unknown }[],\n ): Promise<{ acceptedInputs: readonly string[]; derivedContext: readonly string[] }> {\n const inputTruthSection = await this.composeInputTruthSection(playbook, state);\n let compliancePrimaryFactsSection = '';\n try {\n compliancePrimaryFactsSection = await this.composeCompliancePrimaryFactsSection(playbook);\n } catch (error) {\n this.logDebug('Judge evidence: compliance declarations unavailable (section omitted)', { error: String(error) });\n }\n /*\n * Without this a judge asked whether a bound objective's intent is TRUE of this product sees the\n * objective's REF and nothing it demands — and cannot tell an APPLICABLE claim from one the\n * application's capabilities leave UNDETERMINED. Pure and synchronous, so it cannot fail the run.\n */\n const assuranceProgramAuthoritySection = this.composeAssuranceProgramAuthoritySection(playbook);\n const computedFactsSection = landedFamilies.includes('document-facts')\n ? renderComputedDocumentFactsForJudge(state.computedDocumentFactAnswers)\n : '';\n /*\n * The catalog's claim guards for the drafted documents (#1452) — the prohibitions the drafting brief keeps\n * out of the drafter's prompt on purpose, which therefore reached no reader at all until the judge got them.\n * Best-effort like every section here: an unreadable candidate set leaves it out, and a criterion that needs\n * it answers INDETERMINATE rather than passing on silence.\n */\n let claimGuardsSection = '';\n if (landedFamilies.includes('compliance-document-candidate')) {\n try {\n /*\n * The documents THIS RUN produced come first, and reading them off disk is the fallback.\n *\n * Disk alone was the whole answer until 2026-09-22, and it is right only when landing has already\n * happened — which is true of an ordinary run and false of the two paths that matter most for\n * catching a bad claim. Measured on the first live governance run: a DRY run drafted\n * `governance.scope-system-description`, wrote nothing by design, and the judge was handed the\n * guards of the two PUBLIC documents already on disk. It answered INDETERMINATE — correctly, and\n * about a document nobody had asked it to judge. The judge bench has the same shape for the same\n * reason, and a bench caller supplying a document the application has not landed is its normal use.\n *\n * So the run's own drafts decide, and disk answers only when the run produced none.\n */\n const draftedDocumentRefs = draftedCandidateDocumentRefs(draftedValues);\n const documentRefs = draftedDocumentRefs.length > 0\n ? draftedDocumentRefs\n : ((await this.readLandedComplianceDocumentCandidates()) ?? []).map((candidate) => String(candidate.documentRef));\n claimGuardsSection = renderAssuranceDocumentClaimGuardsForJudge(documentRefs);\n } catch (error) {\n this.logDebug('Judge evidence: drafted candidates unreadable, claim guards omitted', { error: String(error) });\n }\n }\n /*\n * The COHERENCE report, for a generation playbook that declares it (#1638). The assessing path hands\n * it to its judge (the 2026-09-02 fix above `runAssessmentPlaybook`); the generation path put it in\n * the brief and never in the judge's evidence, so a generator's judge asked whether the conception\n * it built on is sound could not see the arithmetic that answers it. Gated on the same declaration,\n * so nothing changes for a playbook that does not declare it.\n */\n const coherenceSection = this.composeCoherenceSection(playbook, state);\n /*\n * The look the drafted brand's style words derive (#2818), when the run landed a brand brief. The judge checks the\n * words honour the creator's visual direction, and words that read faithfully can derive the opposite look; the\n * point is computed with the build's own function, never asked of a model. The run's own draft decides, and the\n * application's brief answers only when the caller holds no draft, as for the claim guards above. Pure, so it\n * cannot fail the run.\n */\n const brandBrief = landedFamilies.includes('brand-brief')\n ? draftedValues?.find((entry) => entry.family === 'brand-brief')?.value ?? state.artifactsByFamily.get('brand-brief')\n : undefined;\n // A brief that is on disk but unreadable says nothing about its words, so it adds no section rather than one\n // claiming the brief states no visual tone.\n const brandDerivedLookSection = brandBrief === undefined || brandBrief === null || brandBrief === FILE_PRESENT_WITHOUT_VALUE\n ? ''\n : renderBrandDerivedLookForJudge(brandBrief);\n /*\n * What the creator stated in the other interviews (#2498, #2499 review F3), for a playbook that declares it. A\n * requirement drawn from a stated fact (VAT numbers on quotes, a named e-invoicing regime) read as untraced to a\n * judge that saw only the vision and the market, and a stated fact dropped without an exclusion was invisible to it.\n * Creator truth, so it is an accepted input beside the declared families.\n */\n let creatorStatedFactsSection = '';\n try {\n creatorStatedFactsSection = await this.composeCreatorStatedFactsSection(playbook, state);\n } catch (error) {\n // Best-effort like every section here (review N2): an advisory judge never fails the run it judges.\n this.logDebug('Judge evidence: creator stated facts unavailable (section omitted)', { error: String(error) });\n }\n const acceptedInputs = [inputTruthSection, creatorStatedFactsSection].filter((section) => section !== '');\n /*\n * The organization model the configuration already declares (#3035, #3039), for a playbook planning against the\n * workspace: the build plan's judge decides whether a type, kind or instance was duplicated or revised in place, and\n * cannot without it. Best effort inside the composer, which says when the configuration could not be read.\n */\n const organizationConfigurationSection = playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.WORKSPACE_TRUTH)\n ? (await this.composeOrganizationConfigurationLines()).join('\\n')\n : '';\n return {\n acceptedInputs,\n derivedContext: [\n assuranceProgramAuthoritySection, compliancePrimaryFactsSection, computedFactsSection, claimGuardsSection, coherenceSection, brandDerivedLookSection,\n organizationConfigurationSection,\n ].filter((section) => section !== ''),\n };\n }\n\n /**\n * Whether a FAMILY the run may have read cannot be read at this landing (#3258, #3451), asked now rather than at the\n * run's start. Only a family can have shortened what a run composed: a fault in a `modules/**` file is no longer one\n * of them, so it holds no family landing. The commonest family fault is a sibling package mid-rebuild under a family\n * that imports it, and a paid run must not lose its output to that: so it is asked about again once the watchers\n * settle, the same two bounded waits the lane takes around a child, and only a fault that outlives them holds the\n * landing. A fault that may be a build behind is never held by the door, so the second ask is a real one. Both waits\n * proceed on timeout, so a tree that never settles holds rather than hangs.\n *\n * LIMIT: this asks about the families now, not about what the run read. A family that failed after the run's read and\n * recovered before this one leaves a clean answer over a short input read. Narrow, and it can reach a write.\n */\n private async readLandingWriteBasis(): Promise<SpecificationWriteBasis> {\n const basis = await readSpecificationFamiliesWholeValueBasis(this.companionContext);\n if (basis.unevaluatedModules.length === 0) return basis;\n const log = (message: string, context?: Record<string, unknown>) => this.logDebug(message, { ...context, heldBy: basis.unevaluatedModules });\n await waitForDevCompileQuiet({ frameworkRepositoryRoot: this.companionContext.resolvedHomes.framework.repositoryRoot, log });\n await waitForApplicationPackagesPublished({ saasRoot: this.companionContext.saasRoot });\n return readSpecificationFamiliesWholeValueBasis(this.companionContext);\n }\n\n /**\n * The runs whose landing is on disk where this run was refused (#1614): for each conflicted file, the\n * recorded run whose written bytes the file holds NOW. Read from the write register, which already keeps\n * every run's exact bytes; a file no recorded run wrote (a person's edit) names nobody.\n */\n private async describeLandingConflict(error: PlaybookOutputLandingConflictError, specificationsPackageRoot: string): Promise<PlaybookRunLandingConflictError> {\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);\n let records: Awaited<ReturnType<PlaybookRunWriteRegisterCompanionService['list']>> = [];\n try {\n records = await this.writeRegister.list();\n } catch {\n // The register is a cache; without it the conflict is still refused, it just names nobody.\n }\n const overlapping = new Map<string, { runId: string; playbookRef: string }>();\n for (const conflict of error.conflicts) {\n const appRelativePath = path.posix.join(specificationsRelativeRoot, conflict.packageRelativePath);\n const current = await readFile(path.join(specificationsPackageRoot, conflict.packageRelativePath)).catch(() => undefined);\n const writer = records.find((record) => record.files.some((file) => file.path === appRelativePath && holdsWrittenBytes(file, current)));\n if (writer) overlapping.set(writer.runId, { runId: writer.runId, playbookRef: writer.playbookRef });\n }\n return new PlaybookRunLandingConflictError(error.conflicts, [...overlapping.values()], error.message);\n }\n\n /**\n * Run one PHASE of a playbook run under its own trace step, with a `started` and a `completed` (or\n * `failed`) event carrying its duration (#1639).\n *\n * The phases this wraps are the reads a run makes BEFORE it does anything a trace already shows: the\n * artifact state (the whole compiled specifications package, git freshness per family, the build\n * plan's execution state) and a composite's build-progress baseline. On a loaded machine they took a\n * market-analysis dry run thirty-eight minutes with nothing in its trace session after the opening\n * actor-plane reads, which read exactly like a hang. The STARTED event is the point: a phase that never\n * returns is then visibly the one it is stuck in. Best-effort, as every trace write is.\n */\n private async traceRunPhase<T>(session: CompanionExecutionSessionContext | undefined, label: string, work: () => Promise<T>): Promise<T> {\n if (!session) return work();\n const step = this.traceability.createStep(session, { kind: PLAYBOOK_RUN_PHASE_TRACE_STEP_KIND, label });\n const startedAt = Date.now();\n await this.traceability.traceEvent({ session, step, minimumLevel: CompanionTraceabilityLevel.DEBUG, type: 'playbook-run-phase-started', summary: `${label} started` });\n try {\n const result = await work();\n const durationMs = Date.now() - startedAt;\n await this.traceability.traceEvent({ session, step, minimumLevel: CompanionTraceabilityLevel.DEBUG, type: 'playbook-run-phase-completed', summary: `${label} took ${durationMs} ms`, payload: { label, durationMs } });\n return result;\n } catch (error) {\n const durationMs = Date.now() - startedAt;\n await this.traceability.traceEvent({ session, step, minimumLevel: CompanionTraceabilityLevel.DEBUG, type: 'playbook-run-phase-failed', summary: `${label} failed after ${durationMs} ms`, payload: { label, durationMs, error: describeCaughtError(error) } });\n throw error;\n }\n }\n\n /** One trace step per run, so a session with several runs keeps their artifacts apart. */\n private buildTrace(session: CompanionExecutionSessionContext, kind: string) {\n return createPlaybookExecutionTrace({\n traceability: this.traceability,\n session,\n step: this.traceability.createStep(session, { kind: META_WORKFLOW_TRACE_STEP_KIND, label: kind }),\n });\n }\n\n /**\n * Everything the model is allowed to know, in one string.\n *\n * The playbook's compiled `method.guidance` is the METHOD; the creator brief is the SUBJECT. They are\n * labelled separately so the model can tell \"how to do this\" from \"what this application is\", and the\n * target family is named explicitly because one playbook may declare several outputs and each call\n * produces exactly one of them.\n */\n /**\n * What sibling steps returned, rendered for the child that derives from them.\n *\n * ## Why this exists, and it is the defect the composite's own R14 comparison found\n *\n * The produce child was reached through `runPlaybook`, which used the run's step results ONLY for\n * its eligibility check — so the choreography gathered evidence, judged it adequate, opened the\n * gate, and then produced a market snapshot the evidence had never reached. Measured 2026-08-29:\n * the composite's snapshot carried ZERO source URLs, exactly like the single-call leaf it was built\n * to beat, because the producer had nothing to cite. The whole claim of the lane — that a snapshot\n * rests on pages someone read — was false at the last hop, and every earlier stage looked correct.\n *\n * Rendered verbatim rather than summarised: the condensation already happened at the step's own\n * contract, and condensing twice is how a source URL becomes \"several sources indicate\".\n */\n private composeStepEvidenceSection(stepResults: ReadonlyMap<string, unknown> | undefined): string {\n /*\n * DERIVED judge verdicts are excluded (#1498). This section tells its reader that what follows is\n * \"what earlier steps of this run actually found\" and asks it to record that provenance on what\n * it authors — true of research text and of an adequacy verdict a child produced, false of a\n * verdict the runtime derived ABOUT a child. Rendering one here would hand a generator a grade to\n * cite as a source, and hand the next JUDGE an earlier judge's answer framed as evidence, which\n * is the conformity failure `app-creation-judge-growth.md` warns a panel against.\n */\n // `new Map()` rather than `[]`: an empty ARRAY widens the entry key to `string | number` and the ref\n // no longer satisfies a `string` parameter. Same emptiness, and it keeps the map's own entry type.\n const evidence = [...(stepResults ?? new Map<string, unknown>()).entries()].filter(([ref]) => !isJudgeVerdictStepRef(ref));\n if (evidence.length === 0) return '';\n return [\n '# Evidence gathered for this run (from sibling steps)',\n 'This is what earlier steps of this run actually found. Derive from it rather than from recall,',\n 'and where a claim rests on one of these sources, RECORD that provenance on the entity you author',\n '— an unsourced claim and a sourced one must not be indistinguishable in what you land.',\n 'Where the evidence does not cover something, say so on the entity rather than inventing it.',\n '',\n ...evidence.map(([ref, value]) =>\n `## ${ref}\\n${typeof value === 'string' ? value : JSON.stringify(value, null, 1)}`),\n ].join('\\n');\n }\n\n /**\n * Judge ONE composed brief through the dedicated structured gate agent. FAIL-OPEN by returning\n * null on any fault — an auxiliary judgment must never withhold a generation (the turn\n * classifier's contract, for the same reason). The judge sees the closed list of UNDECLARED\n * sources only, so the repair arm can never be talked into removing anything.\n */\n private async judgeBriefAdequacy(\n playbook: MetaWorkflowPlaybook,\n brief: string,\n withheld: DeclaredInputWithheldAspects,\n ): Promise<{\n verdict: BriefAdequacyVerdict;\n missingSources: readonly MetaWorkflow_ContextSource[];\n missingAspects: readonly string[];\n } | null> {\n try {\n const declared = new Set(playbook.method?.contextSources ?? []);\n const excluded = new Set(playbook.method?.briefAdequacyExcludedSources ?? []);\n const undeclared = Object.values(MetaWorkflow_ContextSource).filter((source) => !declared.has(source) && !excluded.has(source));\n /*\n * Two repair vocabularies, and the gate runs when EITHER is non-empty (#1422). Before, a\n * playbook that declared every context source returned here — even with a narrowed input\n * family withholding most of what it reads, which is the case the aspect repair exists for.\n */\n if (undeclared.length === 0 && withheld.proposableAspectKeys.length === 0) return null;\n const prompt = [\n 'Judge whether the generation brief below is SUFFICIENT to produce its declared artifact.',\n ...(undeclared.length > 0\n ? [\n 'If it is not, name which of these UNDECLARED context sources would repair it (these are the only',\n `admissible source proposals): ${undeclared.join(', ')}`,\n ]\n : ['Every context source this runtime composes is already in the brief; propose none.']),\n '',\n ...(withheld.rendered === '' ? [] : [withheld.rendered, '']),\n '# The brief',\n brief,\n ].join('\\n');\n const invocation: FlowsActors_Agent_Invocation<any, any> = {\n agentRef: BRIEF_ADEQUACY_JUDGE_AGENT_REF,\n initiator: {},\n invocationContext: [],\n input: { prompt, schema: BriefAdequacyVerdictOutputSchema },\n output: { object: {} },\n executionContext: {},\n artifactBindings: [],\n };\n const response = await this.agents.invokeAgent(invocation);\n const parsed = BriefAdequacyVerdictOutputSchema.safeParse((response.output as { object?: unknown } | undefined)?.object);\n if (!parsed.success) return null;\n /*\n * The aspect bound is enforced HERE rather than in the schema, because aspect keys are\n * per-family and open where `MetaWorkflow_ContextSource` is closed. The admissible set is\n * exactly the map the judge was shown, so an invented key — or an aspect of a family this\n * playbook does not declare — is dropped rather than widening the playbook's family set.\n */\n const proposable = new Set(withheld.proposableAspectKeys);\n return {\n verdict: parsed.data.verdict,\n missingSources: parsed.data.missingSources,\n missingAspects: parsed.data.missingAspects.filter((aspectKey) => proposable.has(aspectKey)),\n };\n } catch (error) {\n this.logger.warn('Brief-adequacy gate failed; generating from the static brief (fail-open)', {\n playbookRef: playbook.ref,\n error: error instanceof Error ? error.message : (() => { try { return JSON.stringify(error)?.slice(0, 400) ?? String(error); } catch { return String(error); } })(),\n });\n return null;\n }\n }\n\n private composeBrief(input: {\n readonly playbookRef: string;\n readonly guidance: string;\n readonly family: string;\n readonly creatorBrief: string | undefined;\n /** Why the journey loop chose this playbook this round (#1423). Empty for any other caller. */\n readonly selectionRationale: string | undefined;\n readonly elicitationSection: string;\n readonly inputTruthSection: string;\n readonly workspaceTruthSection: string;\n /** The provider modules the registry offers. Empty unless the playbook declares the source. */\n readonly providerRegistrySection: string;\n readonly compliancePrimaryFactsSection: string;\n /** What the engine catalog OBLIGES the drafted document to contain. Empty unless the playbook declares it. */\n readonly documentBlueprintSection: string;\n /** The catalog's required fact NAMES. Empty unless the playbook declares it. */\n readonly documentFactObligationsSection: string;\n readonly assuranceProgramAuthoritySection: string;\n readonly applicationRoleGraphSection: string;\n /** This application's own committed judged runs. Empty unless the playbook declares the source. */\n readonly assuranceEvidenceSection: string;\n /** The document facts a PERSON established. Empty unless the playbook declares the source. */\n readonly authoredDocumentFactsSection: string;\n readonly skillCatalogSection: string;\n /** The FULL BODY of the skills the method declares it must follow. Empty unless it declares any. */\n readonly skillBodiesSection: string;\n readonly clarificationAnswersSection: string;\n readonly coherenceSection: string;\n /** The COMPUTED per-ICP FIT matrix. Empty unless the playbook declares the source. */\n readonly marketFitScoresSection: string;\n /** The DERIVED risk signals. Empty unless the playbook declares the source. */\n readonly riskSignalsSection: string;\n /**\n * The DECLARED operating jurisdictions (#2335). Empty unless the playbook declares the source. REQUIRED like its\n * siblings, so a caller that forgets to compose it is a compile error rather than a silently thinner brief.\n */\n readonly operatingJurisdictionsSection: string;\n /** What the creator answered in the other interviews (#2498, #2499). Empty unless the playbook declares the source. */\n readonly creatorStatedFactsSection: string;\n /** What the application has switched on (#2502). Empty unless the playbook declares the source. */\n readonly applicationEnabledSurfaceSection: string;\n /** The PARENT composite's rendered elicitation, on a choreography child. Empty otherwise. */\n readonly parentElicitationSection: string;\n /** What SIBLING steps returned in this choreography run. Empty for a standalone run. */\n readonly stepEvidenceSection: string;\n }): string {\n return [\n `# Playbook: ${input.playbookRef}`,\n `You are producing exactly ONE output for the \"${input.family}\" family, conforming to the schema you were given.`,\n '',\n // The single-response completeness contract. J-1 (wonder-crm, 2026-08-26) measured what happens\n // without it: methods narrate a slice-by-slice authoring WORKFLOW (they are also read by CLI\n // agents that iterate), and the one-shot structured call answered with the FIRST slice — a rich\n // `category` and nothing else — so every other collection failed the family schema. The method\n // teaches how to think; this paragraph states how to answer.\n 'This is a SINGLE-RESPONSE generation: there are no follow-up turns, no later passes, and no other',\n 'agent finishing the work. Where the method below describes step-by-step or slice-by-slice',\n 'authoring, perform ALL of those steps internally and return the COMPLETE object — every',\n 'collection the schema declares, fully populated and cross-referenced. An empty or omitted',\n 'collection is a schema violation, not a deferral.',\n // Second measured failure shape (same run, attempt 2): placeholder text in OPTIONAL\n // typed fields — a made-up string in a `z.url()` field fails the schema where omission\n // would have passed, and an invented extra key fails the strict object.\n 'For OPTIONAL fields, omit the field entirely when you have no true value — never write a',\n 'placeholder (an invalid URL, an empty string, \"TBD\"). Never add keys the schema does not',\n 'declare.',\n /*\n * The distinction the paragraph above does NOT make, and the third measured failure shape\n * (wonder-crm `document-facts`, 2026-08-29): a REQUIRED field typed `[\"string\", \"null\"]` was\n * OMITTED, three attempts running, on every declaration whose value was genuinely absent. The\n * rejection named `declarations.N.reason: invalid_type` each time and the model kept omitting,\n * because the instruction it had been given says to omit when there is no true value — and for a\n * required nullable that is precisely the wrong move.\n *\n * These contracts use required-and-nullable deliberately and pervasively: an omitted key and a\n * considered \"there is none\" are different answers, and a provider that may drop a key gives no\n * way to tell them apart. So the rule has to be STATED, because the two shapes are one word apart\n * in a JSON schema and the guidance above reads as covering both.\n *\n * This is prompt guidance, not a guard — a model may still get it wrong, and the findings-fed\n * retry is what catches that. What it removes is the case where the instruction itself was the\n * cause.\n */\n 'A field the schema declares REQUIRED but allows to be null is the OPPOSITE case: always write the',\n 'key, with the value `null`, when there is nothing true to put in it. Omitting it is a schema',\n 'violation. \"Absent\" and \"considered, and there is none\" are different answers and the contract',\n 'distinguishes them on purpose.',\n '',\n '# Method',\n input.guidance,\n ...(input.creatorBrief ? ['', '# What this application is', input.creatorBrief] : []),\n /*\n * AFTER what the application IS and BEFORE the declared inputs: the loop's reason is about THIS\n * round, so it frames how to read the artifacts that follow rather than competing with them.\n * Labelled as the selector's words, never the creator's — a run must not mistake a machine's\n * reasoning for a product decision somebody made.\n */\n ...(input.selectionRationale\n ? ['', '# Why this playbook was chosen for this round', 'Composed by the journey selector against what has already landed, not by the creator.', input.selectionRationale]\n : []),\n ...(input.inputTruthSection ? ['', input.inputTruthSection] : []),\n /*\n * AFTER the declared inputs and BEFORE the derived sections, because that is what it is: the\n * evidence this run gathered ranks with the artifacts the playbook declares it reads, not with\n * the computed hints below it.\n */\n ...(input.stepEvidenceSection ? ['', input.stepEvidenceSection] : []),\n ...(input.workspaceTruthSection ? ['', input.workspaceTruthSection] : []),\n // Right after the workspace: what could be added reads against what is already there.\n ...(input.providerRegistrySection ? ['', input.providerRegistrySection] : []),\n // BEFORE the facts: the obligation frames what the facts are for. A drafter that meets the\n // application's facts first writes about what it found; one that meets the required set first\n // writes about what is missing, which is the document this lane owes.\n ...(input.documentBlueprintSection ? ['', input.documentBlueprintSection] : []),\n ...(input.documentFactObligationsSection ? ['', input.documentFactObligationsSection] : []),\n ...(input.assuranceProgramAuthoritySection ? ['', input.assuranceProgramAuthoritySection] : []),\n ...(input.applicationRoleGraphSection ? ['', input.applicationRoleGraphSection] : []),\n /*\n * AFTER the obligations and the role graph, BEFORE the application's declarations: a drafter meets\n * what the document owes, then what its controls were MEASURED to do, then what it declares. The\n * order is the argument — evidence read before the obligation invites a document written around\n * whatever happened to be measured.\n */\n ...(input.assuranceEvidenceSection ? ['', input.assuranceEvidenceSection] : []),\n /*\n * IMMEDIATELY after the derived facts' obligations and before the application's declarations: a\n * person's decision outranks a derivation, and a drafter that meets it last has already written\n * the clause.\n */\n ...(input.authoredDocumentFactsSection ? ['', input.authoredDocumentFactsSection] : []),\n ...(input.compliancePrimaryFactsSection ? ['', input.compliancePrimaryFactsSection] : []),\n ...(input.skillCatalogSection ? ['', input.skillCatalogSection] : []),\n // AFTER the catalog, because the catalog says which skills exist and this says what the ones\n // the method chose actually require — the order a reader needs them in.\n ...(input.skillBodiesSection ? ['', input.skillBodiesSection] : []),\n ...(input.coherenceSection ? ['', input.coherenceSection] : []),\n // Beside the coherence report, because they are the same KIND of section: arithmetic the\n // framework did so the model does not estimate it. Both sit after the authored truth they are\n // computed FROM, so a reader meets the inputs before the derivation over them.\n ...(input.marketFitScoresSection ? ['', input.marketFitScoresSection] : []),\n // Beside the FIT matrix, because they are the same KIND of section: measured facts the\n // framework computed so the model does not estimate them, placed after the authored truth\n // they are derived FROM.\n ...(input.riskSignalsSection ? ['', input.riskSignalsSection] : []),\n // A typed config declaration, placed with the other config-derived facts (#2335).\n ...(input.operatingJurisdictionsSection ? ['', input.operatingJurisdictionsSection] : []),\n // What the configuration switches on (#2502): a config-derived fact, beside the jurisdictions.\n ...(input.applicationEnabledSurfaceSection ? ['', input.applicationEnabledSurfaceSection] : []),\n // The creator's statements from the OTHER interviews (#2498, #2499): creator truth, so after every derived fact and\n // before this run's own exchanges, which keep the last word.\n ...(input.creatorStatedFactsSection ? ['', input.creatorStatedFactsSection] : []),\n // LAST, after every other truth: an answer the creator gave DURING this run settles whatever\n // the sections above left ambiguous, and the closing word should be theirs.\n ...(input.clarificationAnswersSection ? ['', input.clarificationAnswersSection] : []),\n // The PARENT's creator answers, on a choreography child — the same last-word ranking as the\n // child's own elicitation, and BEFORE it, so a child that also interviews closes on its own\n // exchange while still seeing the composite's.\n ...(input.parentElicitationSection ? ['', input.parentElicitationSection] : []),\n ...(input.elicitationSection ? ['', input.elicitationSection] : []),\n ].join('\\n');\n }\n\n /**\n * The CURRENT WORKSPACE as ground truth, for playbooks that plan against real code (J-1 stalls\n * G + H). Build-decompose invented `moduleRef: \"module-crm\"` because nothing showed it the real\n * module ids, and emitted \"create the skeleton\" objectives for resources compose had already\n * scaffolded — so the dispatched coding run correctly changed nothing. This section states the\n * ids and each resource's PRESENT schema fields, read through the `resources-registry`\n * introspection behavior — a FRESH subprocess import of the app's shared-lib, never the\n * companion's boot-time cache, so a family landed or composed a minute ago is already visible.\n *\n * Fails CLOSED for the playbooks that declare it: decomposing without workspace truth is how\n * the invented-moduleRef plan gets written, and a broken plan costs more downstream than a\n * refused run costs here.\n */\n /**\n * How many engine resource names to print when the engine has declared nothing about them.\n *\n * Enough to make the population concrete — a reader (human or model) should see that these are\n * ordinary framework resources like `userCredentials` and `auditLogs`, not an exotic corner — and few\n * enough that the section does not become a list. The COUNT beside them is always exact and always\n * printed; it is the actionable half, and truncating it would be the under-reporting this whole\n * projection exists to prevent. Measured on wonder-crm (2026-08-29): 83 of 85.\n */\n private static readonly ENGINE_UNDECLARED_RESOURCE_NAMES_SHOWN = 12;\n\n /**\n * The application's compliance-relevant resource DECLARATIONS, split by origin.\n *\n * This is the consumer the `compliance-primary-facts` introspection behavior did not have. The\n * behavior reads each materialized resource configuration for the four declarations a governed\n * document may rest on — `retentionPolicy.mode`, `dataSubjectPolicy.kind`,\n * `systemAccessPolicy.exportSubject` and `seeRetained` — and reports engine-declared and\n * application-declared coverage separately. Until this method existed it answered only an operator\n * with `curl`, while `refinement.document-facts` told a model, in its intent and three times in its\n * method, that mechanism facts \"are read from the resource configurations\". They were not: the first\n * live run landed two facts, both paraphrased from vision prose, neither citing a declaration.\n *\n * ## What is rendered, and what is deliberately not\n *\n * The COUNTS per origin, the resources that declare something, and the undeclared list BY NAME.\n * Nothing is judged and nothing is inferred: a resource that declared nothing is reported as having\n * declared nothing, which is the honest input to a document that must state its own gaps. The\n * undeclared list is named rather than counted because the remedy is per resource — and because on\n * a real application it is most of the engine set (83 of 85 on wonder-crm, 2026-08-29), which is\n * itself the most load-bearing fact this section carries.\n *\n * ## Why the engine list is TRUNCATED and the application list is not\n *\n * The application's resources are the ones its own authors can fix and the ones a reader of its\n * privacy notice cares about; there are eight of them. The engine's undeclared set is ~83 names of\n * framework-owned resources, identical in every generated application, and printing them all would\n * spend most of this section on a list whose actionable content is its SIZE. The count is exact\n * either way — a truncation that hid the number would be the under-reporting this projection exists\n * to prevent.\n */\n /**\n * What the engine catalog says the document must contain, for a playbook that DRAFTS one.\n *\n * Pure and synchronous — the catalog is engine source, so there is nothing to fetch and nothing to\n * cache. No sealing, no snapshot, no pinning: which catalog you compiled against is a git revision.\n *\n * The refs come from the playbook's own declaration rather than from a parameter, because a drafting\n * playbook does not carry the document it is producing — the lane picks. Declaring the documents a\n * playbook may draft is the same act as declaring which families it reads.\n *\n * That sentence stood here from the beginning and described a frozen constant in this file until\n * 2026-09-22, which is why there could only ever be ONE drafting lane (#1453). It is now true:\n * `method.draftableDocumentDefinitionRefs`. A playbook declaring the context source and no refs\n * renders nothing — caught at authoring time by `playbook-catalog-document-declarations.test.ts`,\n * not here, because a run is the wrong place to discover that a lane declared no subject.\n */\n private composeDocumentBlueprintSection(\n playbook: MetaWorkflowPlaybook | undefined,\n /**\n * The drafts the application already holds, so the brief says which of the draftable documents\n * remain. `undefined` renders nothing about them — \"not read\" rather than \"holds none\".\n */\n existingCandidates?: readonly ApplicationCreationSpecs.ComplianceDocumentCandidate[],\n /**\n * The fact availability the landing checks against, from `resolveDeclaredDocumentFacts`. It lets the brief\n * say which held draft cites facts that no longer exist: the landing checks only the document a run\n * writes, so a draft left behind by a facts regeneration is otherwise corrected only by chance (#2019).\n */\n declaredDocumentFacts?: ReadonlyMap<string, ComplianceDocumentFactAvailability>,\n /** How the application's organizations are arranged, from its line: whom the privacy notice addresses (#1649). */\n organizationStructure?: ApplicationOrganizationStructure,\n ): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.DOCUMENT_BLUEPRINT)) return '';\n return composeAssuranceDocumentBlueprintBrief(\n playbook?.method.draftableDocumentDefinitionRefs ?? [],\n existingCandidates?.map((candidate) => candidate.documentRef),\n existingCandidates === undefined ? undefined : collectHeldDraftUndeclaredFactCitations(existingCandidates, declaredDocumentFacts),\n organizationStructure,\n );\n }\n\n /**\n * The document facts a PERSON established, for a playbook that DRAFTS a governed document.\n *\n * The derived facts reach a drafter as a declared input; these could not reach it at all, and the cost\n * was measured on the first live governance draft — a clause CITING an authored fact and paraphrasing\n * around a value it had never read. See `composeAuthoredDocumentFactsBrief` for the quotation.\n *\n * Read from the artifact state the run already loaded rather than from disk: the authored family is one\n * of the families `readArtifactState` collects, so a second read could disagree with the availability\n * map the landing will check the draft against.\n *\n * Three states, kept apart like every sibling section: a family that parsed, a family that is absent\n * (the application has authored none), and a family present but unreadable.\n */\n private composeAuthoredDocumentFactsSection(playbook: MetaWorkflowPlaybook | undefined, state: PlaybookArtifactState): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.AUTHORED_DOCUMENT_FACTS)) return '';\n const value = state.artifactsByFamily.get('document-facts-authored');\n if (value === undefined) return composeAuthoredDocumentFactsBrief(undefined);\n if (value === FILE_PRESENT_WITHOUT_VALUE) {\n return composeAuthoredDocumentFactsBrief(undefined, 'the family file is present but its value could not be read from here');\n }\n const parsed = ApplicationAuthoredDocumentFactSpecificationSchema.safeParse(value);\n return parsed.success\n ? composeAuthoredDocumentFactsBrief(parsed.data)\n : composeAuthoredDocumentFactsBrief(undefined, `the landed family does not satisfy its schema (${parsed.error.issues[0]?.message ?? 'unknown issue'})`);\n }\n\n /**\n * The application's OWN committed judged runs, for a playbook drafting an INTERNAL governance document.\n *\n * ## Every absence is a different sentence, and none of them fails the run\n *\n * Three states a caller must not merge, which is why this returns a SECTION rather than a list and why\n * the reasons are distinct: no repository at all, a repository holding no judged run, and a repository\n * that could not be read. The composer says which. Silence would collapse all three into \"there is\n * nothing to cite\", indistinguishable from \"nobody looked\"\n * (`negative-results-require-a-positive-probe.md`), and a drafter that reads the third as the first\n * writes a document whose marks are wrong.\n *\n * Nothing here can fail a run. An unreadable repository, an unparsable run file, a missing directory:\n * each degrades to a section that says so, because a compliance workflow may never stand in front of\n * the mechanism (`application-creation-directive.md`).\n *\n * ## It reads, and never writes\n *\n * The assurance plane's one-way street is what keeps this safe (#297, and the note on\n * `MetaWorkflow_ContextSource.ASSURANCE_EVIDENCE`): the collectors read the product and write only\n * into the assurance repository, and this carries committed runs OUT of it into a brief. No creation\n * step gates on a verdict, and nothing here can write a verdict back.\n *\n * A run file that does not satisfy `AssuranceEvidenceRunSchema` is DROPPED rather than refused: the\n * repository is written by a different tool on its own cadence, and one malformed file must not\n * withhold the rest. How many were dropped is logged, so a systematically unreadable repository is\n * visible rather than silently empty.\n */\n private async composeAssuranceEvidenceSection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.ASSURANCE_EVIDENCE)) return '';\n const read = this.readCommittedAssuranceRuns();\n return read.runs === undefined ? composeAssuranceEvidenceBrief(undefined, read.unreadableReason) : composeAssuranceEvidenceBrief(read.runs);\n }\n\n /**\n * Read this application's committed judged runs ONCE, for the two consumers that need them.\n *\n * The brief needs them RENDERED, so a drafter can choose one; the landing needs their REFS, so a\n * citation can be resolved. Two reads of the same directory could disagree — a run present in the\n * brief and absent from the refs is a citation the drafter was invited to make and the landing then\n * refuses — which is the shape `.claude/rules/invariant-call-site-enumeration.md` is about.\n *\n * `runs: undefined` carries the reason, and every caller must preserve the distinction: it means\n * nobody could look, never that the repository is empty.\n */\n private readCommittedAssuranceRuns(): { readonly runs?: readonly AssuranceEvidenceRun[]; readonly unreadableReason?: string } {\n const judgedRunsRoot = join(this.companionContext.saasRoot, ASSURANCE_REPOSITORY_RELATIVE_PATH, ASSURANCE_JUDGED_RUNS_DIRECTORY);\n if (!existsSync(judgedRunsRoot)) {\n return {\n unreadableReason: `this application has no assurance repository at ${ASSURANCE_REPOSITORY_RELATIVE_PATH}/${ASSURANCE_JUDGED_RUNS_DIRECTORY}, so no cycle has recorded a judged run here`,\n };\n }\n try {\n const runs: AssuranceEvidenceRun[] = [];\n let dropped = 0;\n // One level of objective directories, each holding one file per demand — the layout the recorder\n // writes. Walked rather than globbed so a stray file at either level is skipped, not parsed.\n for (const objectiveEntry of readdirSync(judgedRunsRoot, { withFileTypes: true })) {\n if (!objectiveEntry.isDirectory()) continue;\n const objectiveDirectory = join(judgedRunsRoot, objectiveEntry.name);\n for (const runEntry of readdirSync(objectiveDirectory, { withFileTypes: true })) {\n if (!runEntry.isFile() || !runEntry.name.endsWith('.json')) continue;\n const parsed = AssuranceEvidenceRunSchema.safeParse(JSON.parse(readFileSync(join(objectiveDirectory, runEntry.name), 'utf8')));\n if (parsed.success) runs.push(parsed.data);\n else dropped += 1;\n }\n }\n if (dropped > 0) this.logDebug('Assurance evidence: run file(s) did not satisfy the run schema and were dropped', { dropped, judgedRunsRoot });\n return { runs };\n } catch (error) {\n return { unreadableReason: `the assurance repository could not be read (${String(error)})` };\n }\n }\n\n /**\n * The runs a landing may resolve a citation against — the SAME read the brief renders from — each\n * carrying whether its judgement SETTLED the question it was run for.\n *\n * The second fact is what lets the landing refuse a citation of a run that exists and supports\n * nothing. It is decided HERE rather than in the validator because the verdict vocabulary lives in\n * this layer, and `_core` should not learn it to answer one boolean.\n *\n * CONFORMANT and OBSERVATION are the two verdicts that assert the evidence was sufficient to\n * conclude. INSUFFICIENT_EVIDENCE says the question was not settled, NONCONFORMITY that the control\n * fell short, and a DERIVED run's NOT_APPLICABLE_AS_CONFIGURED that nothing was measured at all —\n * none of the three can support a statement that a control operates, and all three RESOLVE, so the\n * landing must refuse them by verdict rather than by absence.\n *\n * Absent when the repository could not be read, which is what the landing needs to skip the\n * resolution rules rather than refuse every citation over a missing tool.\n */\n private resolveCommittedAssuranceRuns(): { committedAssuranceRuns?: ReadonlyMap<string, { readonly maySupportOperatingClaim: boolean }> } {\n const read = this.readCommittedAssuranceRuns();\n if (read.runs === undefined) return {};\n return {\n committedAssuranceRuns: new Map(read.runs.map((run) => [\n String(run.runRef),\n {\n maySupportOperatingClaim: run.kind === AssuranceEvidenceRunKind.JUDGED\n && (run.verdict === AssuranceEvidenceJudgementVerdict.CONFORMANT || run.verdict === AssuranceEvidenceJudgementVerdict.OBSERVATION),\n },\n ])),\n };\n }\n\n /**\n * The catalog's required fact NAMES, for the playbook that declares facts.\n *\n * Same source, different question, which is why it is a separate context source rather than a second\n * shape of the same one: a fact producer authors no sections and needs the closed name set, and\n * burying eight lines under section obligations is how a prompt section gets skimmed.\n */\n /**\n * The closed objective/source sets a compliance programme may draw on, NARROWED to this application.\n *\n * See {@link composeAssuranceProgramAuthorityBrief}. The capability set is what makes the brief say\n * whether each objective can apply HERE rather than only what the basis covers in general, before\n * anyone is asked anything. Today only `BILLING` decides any objective; until 2026-09-14 the audit\n * capability was wrongly gated on `COMPLIANCE_AUDIT_TRAIL`, and Wonder CRM read 16 `NOT_APPLICABLE`\n * and 9 `UNDETERMINED` from it (#302).\n *\n * `enabledEngineCapabilityNames` is reused rather than re-derived: it already knows that a\n * capability declared `{ enabled: false }` is NOT enabled (Wonder CRM declares `MULTI_LANGUAGE`\n * exactly that way), and a second reader that treated presence as enablement would over-report\n * applicability — the dangerous direction, since it invites binding an objective the normalizer then\n * refuses.\n */\n private composeAssuranceProgramAuthoritySection(\n playbook: MetaWorkflowPlaybook | undefined,\n requiredDocumentSetInput?: RequiredDocumentSetInput,\n ): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.ASSURANCE_PROGRAM_AUTHORITY)) return '';\n const enabledEngineCapabilities = this.readEnabledEngineCapabilities();\n const operatingJurisdictionSlugs = this.readOperatingJurisdictionSlugs();\n /*\n * Whether a review is SCHEDULED decides whether a gap can be recorded at all: a gap carries the date its review\n * falls due, and an application declaring no cadence gives the run no date to stamp. Resolved through the SAME\n * function that supplies the normalizer's `nextReviewOn`, so the brief cannot promise what the run then refuses.\n */\n const schedulesAssuranceReview =\n resolveDeclaredAssuranceNextReviewOn(\n (this.companionContext.saasConfig as { assuranceReviewCadence?: unknown } | undefined)?.assuranceReviewCadence,\n new Date().toISOString(),\n ) !== undefined;\n return composeAssuranceProgramAuthorityBrief({\n ...(enabledEngineCapabilities === undefined ? {} : { enabledEngineCapabilities }),\n ...(operatingJurisdictionSlugs === undefined ? {} : { operatingJurisdictionSlugs }),\n ...(requiredDocumentSetInput === undefined ? {} : { requiredDocumentSetInput }),\n schedulesAssuranceReview,\n });\n }\n\n /**\n * The provider refs that exist for this application (#3995), for a generation producing the integration plan; `undefined`\n * for any other generation, and when the registry cannot be read (an unknown provider is then not a wrong one). The\n * installed `providers/<ref>/` are read from disk now; the declared scopes come from the configuration the companion\n * holds, which a provider the integration plan itself declares has not reached yet, and does not need to.\n */\n private async readKnownProviderRefsFor(outputs: readonly { readonly family: string }[]): Promise<ReturnType<typeof collectKnownProviderRefs>> {\n if (!outputs.some((output) => output.family === ApplicationSpecificationFamily.INTEGRATION_PLAN)) return undefined;\n const listing = await listRegistryProviderModules({\n frameworkRoot: this.companionContext.resolvedHomes.framework.repositoryRoot ?? null,\n moduleRegistries: this.companionContext.saasConfig?.moduleRegistries,\n });\n const saasConfig = this.companionContext.saasConfig;\n // Discovery brings what the application authored or installed beside the engine's specifications; unreadable, no check.\n let discoveredContributions: Awaited<ReturnType<typeof discoverSaasProviderCompanionContributions>>['contributions'] | undefined;\n try {\n const discovery = saasConfig === undefined ? undefined : await discoverSaasProviderCompanionContributions({ saasRoot: this.companionContext.saasRoot, saasConfig });\n /*\n * A walk that could not read an owner is partial: a provider that owner authored would be refused against it (#3995\n * review R2), so partial is unknown and unknown skips the check. Since #3995 item 5 every scope is checked\n * (`PROVIDER_BINDING_SCOPES_CHECKED_FOR_EXISTENCE`), so an unreadable FRONTEND service counts too: it used to be\n * exempt only because frontend-scope bindings were not checked.\n */\n const ownerUnreadable = (discovery?.unreadableOwners.length ?? 0) > 0;\n discoveredContributions = discovery === undefined || ownerUnreadable ? undefined : discovery.contributions;\n } catch (error) {\n this.logDebug('Provider discovery unreadable; the integration plan\\'s provider check is skipped', { error: describeCaughtError(error) });\n discoveredContributions = undefined;\n }\n return collectKnownProviderRefs({\n listing,\n applicationRoot: this.companionContext.saasRoot,\n specifications: listRegisteredProviderSpecifications(),\n discoveredContributions,\n saasConfig,\n });\n }\n\n /**\n * The system-of-record facets' partition fields by kind (#3045), for a generation producing the domain plan, read from the\n * application's EFFECTIVE facets, as the backend resolves them at startup (`loadEffectiveSystemOfRecordFacets`, #3053);\n * `undefined`\n * for any other generation, and when the library cannot be read.\n */\n private async readSystemOfRecordPartitionFieldsFor(outputs: readonly { readonly family: string }[]): Promise<DomainPlanSystemOfRecordPartitionFields | undefined> {\n if (!outputs.some((output) => output.family === ApplicationSpecificationFamily.DOMAIN_PLAN)) return undefined;\n // The EFFECTIVE facets (#3053): a vendor an existing instance uses carries that instance's augmentations.\n const facets = await loadEffectiveSystemOfRecordFacets({\n applicationRoot: this.companionContext.saasRoot,\n frameworkRoot: this.companionContext.resolvedHomes?.framework?.repositoryRoot ?? undefined,\n // Re-read, not the configuration the companion loaded at start: an instance declared since then counts.\n systemsOfRecord: await rereadDeclaredSystemOfRecordInstances(\n this.companionContext.saasRoot,\n (this.companionContext.saasConfig as { systemsOfRecord?: Record<string, SystemOfRecordInstanceFacetRequest | undefined> } | undefined)?.systemsOfRecord,\n (error) => this.logDebug('wildo.saas.config.ts could not be re-read; judging the systems of record the companion started with', { error: describeCaughtError(error) }),\n ),\n onUnreadable: (specifier, error) => this.logDebug('A system-of-record facet module could not be imported', { specifier, error: describeCaughtError(error) }),\n });\n return facets === undefined ? undefined : deriveDomainPlanSystemOfRecordPartitionFields(systemOfRecordFacetPartitionsByVendor(facets));\n }\n\n /**\n * The application's enabled engine capabilities, or `undefined` when its configuration cannot be read.\n *\n * ONE reader for the two places that must agree: the authority brief that tells a producer which\n * objectives cannot apply here, and the compliance-programme normalizer that refuses a programme\n * binding one. Two readers would let the brief say APPLICABLE while the normalizer refuses.\n *\n * An UNREADABLE config yields `undefined`, never an empty set. \"We could not read the application\" and\n * \"the application enables nothing\" are different facts, and the second would render 16 confident\n * NOT_APPLICABLE verdicts — and refuse on them — from no evidence at all. A configuration that declares\n * no `engineCapabilities` key at all is read the same way: the blind brief and no refusal, which errs\n * toward refusing less rather than refusing on a capability set nobody declared.\n */\n /**\n * The maturity reading's inputs (#1496), composed ONCE for its two readers: the `bottom_up.maturity-reading` executor,\n * which lands the reading, and {@link readRequirementsStanding}, which the unattended drive reads before it may call the\n * goal reached (#3701). Two compositions would be two answers to \"where does the application stand\".\n *\n * - the landed family VALUES (a family present only as a file contributes nothing);\n * - the landing probe's own sets, read from the build dispatch rather than recomputed here: what LANDED is a question\n * the landing pass answers over the WORKING tree (#3204), and a second implementation of that question is how two\n * surfaces come to disagree about whether a task is done;\n * - the gaps coding runs reported and that are still open, which cap their requirement below VERIFIED (#2580);\n * - the CONFIGURATION a requirement's declared substance is measured against (#3702): the engine capabilities the\n * application enables and the languages it serves. Absent when either cannot be read, which the reading reports as\n * such on every requirement that declares a need, rather than as met.\n */\n private async composeApplicationMaturityInputs(artifactState: PlaybookArtifactState): Promise<ApplicationMaturityInputs> {\n const decidedFamilyValues: Record<string, unknown> = {};\n for (const [family, value] of artifactState.artifactsByFamily) {\n if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE) continue;\n decidedFamilyValues[family] = value;\n }\n const evidence = await this.buildDispatch.resolveLandedTaskEvidence();\n const applicationConfiguration = this.readMaturityConfigurationFacts();\n return {\n decidedFamilyValues,\n ...(evidence === undefined ? {} : { landedTaskRefs: evidence.landedTaskRefs, provenTaskRefs: evidence.provenTaskRefs }),\n ...(evidence?.openReportedGaps === undefined ? {} : { openReportedGaps: evidence.openReportedGaps }),\n ...(applicationConfiguration === undefined ? {} : { applicationConfiguration }),\n };\n }\n\n /**\n * What the application's configuration turns on (#3702), for the maturity reading: the enabled engine capabilities\n * (`wildo.saas.config.ts`; none declared is none enabled) and the languages served, through the one reader the i18n\n * step and the capability composition share. `undefined` when the configuration could not be read: an unknown, never\n * an empty configuration.\n */\n private readMaturityConfigurationFacts(): ApplicationMaturityConfigurationFacts | undefined {\n if (this.companionContext?.saasConfig === undefined) return undefined;\n let config: unknown;\n try {\n config = this.appConfigService?.config;\n } catch {\n return undefined;\n }\n if (config === undefined || config === null) return undefined;\n return {\n enabledEngineCapabilities: this.readEnabledEngineCapabilities() ?? [],\n servedLanguages: getCompanionServedLanguages(config as Parameters<typeof getCompanionServedLanguages>[0]),\n };\n }\n\n /**\n * Where the application stands against its own requirements NOW, for the unattended drive (#3701): the maturity reading\n * derived live from the same inputs the reading's executor lands, and every item still open on it. Derived rather than\n * read from the landed reading, which is only as current as the last time the reading's playbook ran: the reference run\n * stopped minutes after its last landing, and a stop rule must not judge the creation by a photograph.\n */\n public async readRequirementsStanding(): Promise<CreationDrive_RequirementsStanding> {\n const reading = deriveApplicationMaturity(await this.composeApplicationMaturityInputs(await this.readArtifactState()));\n return {\n measuredAt: new Date().toISOString(),\n stage: reading.stage,\n requirementCount: reading.requirements.length,\n openItems: listRequirementOpenItems(reading).map((item) => ({\n requirementRef: item.requirementRef,\n kind: item.kind,\n detail: item.detail,\n closedByTaskRef: item.closedByTaskRef ?? null,\n })),\n };\n }\n\n private readEnabledEngineCapabilities(): EngineCapability[] | undefined {\n const declared = (this.companionContext.saasConfig as { engineCapabilities?: Record<string, unknown> | readonly string[] } | undefined)?.engineCapabilities;\n if (declared === undefined) return undefined;\n return [...enabledEngineCapabilityNames(declared)] as EngineCapability[];\n }\n\n /**\n * The application's agents as the compliance lane reads them (#2838), through the `ai-use-declarations` behavior.\n * Asked only when an AI capability reaches the contracted service, since no other application raises the question.\n * `undefined` means NOT READ (the read failed, or answered no agent list), which the brief states rather than\n * rendering as \"no agents\"; best-effort because it informs a section and never decides whether the run proceeds.\n */\n private async readAgentAiUseDeclarations(backendServiceKey: string, declaredCapabilities: readonly string[]): Promise<AgentAiUseDeclaration[] | undefined> {\n const declared = new Set(declaredCapabilities);\n if (!AI_ENGINE_CAPABILITIES_IN_THE_CONTRACTED_SERVICE.some((capability) => declared.has(capability))) return undefined;\n try {\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'ai-use-declarations' });\n if (!result.success) return undefined;\n const agents = (result.data as { agents?: unknown } | undefined)?.agents;\n return Array.isArray(agents) ? (agents as AgentAiUseDeclaration[]) : undefined;\n } catch (error) {\n this.logDebug('Agent AI-use declarations could not be read (the brief says so)', { error: String(error) });\n return undefined;\n }\n }\n\n /** The application's declared jurisdictions for the assurance applicability gate (#2852); see {@link readDeclaredOperatingJurisdictionSlugs}. */\n private readOperatingJurisdictionSlugs(): string[] | null | undefined {\n return readDeclaredOperatingJurisdictionSlugs(this.companionContext?.saasConfig);\n }\n\n /**\n * The application's OWN role graph — the closed set an accountable role is SELECTED from (#636).\n *\n * Replaces two free-text elicitation questions on `top_down.compliance-conception` that asked a\n * person to type *\"the application's own role key (e.g. `APP_ADMIN_SUPER_ADMIN`)\"*. The vocabulary\n * is a closed enum and the grants are declared in the application's own backend config, so the ask\n * invited a retyped — and mistypeable — value in the one artifact whose purpose is to say who is\n * accountable.\n *\n * BEST-EFFORT, unlike `composeCompliancePrimaryFactsSection` which fails closed, and the asymmetry\n * is deliberate. Primary facts are the EVIDENCE a programme reasons from: without them a producer\n * invents, so refusing the run is cheaper than a confident wrong artifact. The role graph is a\n * SELECTION AID; a run that cannot read it should say the declaration was unreadable and record an\n * explicit gap, which the brief instructs. Failing the run here would make a config-read hiccup\n * more costly than the thing it protects.\n *\n * `undefined` is passed through rather than flattened to `{}` — the brief renders \"could not be\n * read\" and \"declares none\" differently, because the first must never let a producer conclude an\n * application has no roles.\n */\n private async composeApplicationRoleGraphSection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.APPLICATION_ROLE_GRAPH)) return '';\n try {\n const { configuration: backendConfig } = await loadBackendCompanionData(this.companionContext);\n const authored = backendConfig as {\n userTypes?: Record<string, { defaultAppRoles?: readonly string[] }>;\n organizationTypes?: Record<string, { userTypes?: readonly string[]; availableOrgRoles?: readonly string[]; defaultMemberRole?: string }>;\n };\n return composeApplicationRoleGraphBrief({\n ...(authored.userTypes === undefined ? {} : { userTypes: authored.userTypes }),\n ...(authored.organizationTypes === undefined ? {} : { organizationTypes: authored.organizationTypes }),\n });\n } catch {\n // Both absent => the brief says the configuration could not be read, which is the truthful shape.\n return composeApplicationRoleGraphBrief({});\n }\n }\n\n private composeDocumentFactObligationsSection(\n playbook: MetaWorkflowPlaybook | undefined,\n /** Whom the privacy notice addresses follows from this (#1649): the facts are worded for that reader. */\n organizationStructure?: ApplicationOrganizationStructure,\n ): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.DOCUMENT_FACT_OBLIGATIONS)) return '';\n return composeAssuranceDocumentFactObligationsBrief(FACT_OBLIGATION_DOCUMENT_DEFINITION_REFS, organizationStructure);\n }\n\n /**\n * The application's BILLING configuration, as the terms lane needs it (#227).\n *\n * Read from the backend companion exports rather than from `wildo.saas.config.ts`, because that is\n * where it lives: `billing` is declared in the application's `saas-config.backend.ts` and reaches the\n * runtime `AppConfiguration`, not the root config the companion already holds.\n *\n * THREE outcomes, never two. \"The configuration could not be read\" and \"the application declares no\n * billing\" are different facts with different consequences — the first means the question was not\n * asked, the second is a positive statement that nothing is sold through the framework — and a\n * drafter told the wrong one writes a confident clause about a product it never saw. Collapsing them\n * into `undefined` is the conflation this whole lane exists to refuse.\n *\n * Best-effort by design: this brief must not be the reason a run fails. An unreadable configuration\n * is rendered as unreadable and the drafter marks the gap.\n */\n private async resolveBillingDeclaration(): Promise<ApplicationBillingDeclaration> {\n try {\n const { configuration: backendConfig } = await loadBackendCompanionData(this.companionContext);\n const authored = (backendConfig as { billing?: unknown }).billing;\n if (authored === undefined || authored === null) return { kind: 'ABSENT' };\n\n const parsed = BillingConfigurationSchema.safeParse(authored);\n if (!parsed.success) {\n return { kind: 'UNREADABLE', reason: 'the declared billing configuration does not satisfy its own schema' };\n }\n return {\n kind: 'DECLARED',\n billing: parsed.data,\n // The AUTHORED object, before defaults — which is what separates \"the operator chose this\" from\n // \"the framework filled it in\". The parsed value cannot answer that: every key is present there.\n authoredKeys: Object.keys(authored as Record<string, unknown>),\n };\n } catch (error) {\n this.logDebug('Billing configuration read failed (brief will report it as unreadable)', { error: String(error) });\n return { kind: 'UNREADABLE', reason: 'the backend configuration could not be loaded' };\n }\n }\n\n private async composeExternalAuthenticationSection(): Promise<string[]> {\n try {\n const { configuration: backendConfig } = await loadBackendCompanionData(this.companionContext);\n return composeExternalAuthenticationBrief(backendConfig as Parameters<typeof composeExternalAuthenticationBrief>[0], listRegisteredProviderSpecifications());\n } catch {\n return composeExternalAuthenticationBrief(undefined, []);\n }\n }\n\n private async composeCompliancePrimaryFactsSection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.COMPLIANCE_PRIMARY_FACTS)) return '';\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (!backendServiceKey) {\n throw new PlaybookNotReadyError(\n `\"${playbook?.ref ?? '(unknown playbook)'}\" derives facts from the application's resource declarations, `\n + 'but no backend service is available to introspect it.',\n );\n }\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'compliance-primary-facts' });\n if (!result.success) {\n /*\n * FAIL, never degrade. A document whose mechanism facts silently came from prose instead of from\n * declarations is exactly the artifact this whole capability exists to prevent, and it would be\n * indistinguishable from a good one on the page. Refusing names the problem while a human is\n * present.\n */\n throw new PlaybookNotReadyError(\n `\"${playbook?.ref ?? '(unknown playbook)'}\" derives facts from the application's resource declarations, but the `\n + `compliance-primary-facts introspection failed: ${JSON.stringify(result)}`,\n );\n }\n const snapshot = result.data as {\n resources?: ReadonlyArray<{\n resourceType: string;\n origin: string;\n erasureRetentionMode?: string;\n dataSubjectKind?: string;\n declaresSubjectExport: boolean;\n declaresRetainedSeeThrough: boolean;\n personalDataCategories?: readonly string[];\n conditionalPersonalDataCategories?: ReadonlyArray<{ condition: string; categories: readonly string[]; fieldNames: readonly string[] }>;\n uncategorizedPersonalFields?: ReadonlyArray<{ fieldName: string; basis: string }>;\n }>;\n coverageByOrigin?: Record<string, {\n resourceCount: number;\n withErasureRetentionMode: number;\n withDataSubjectKind: number;\n withSubjectExport: number;\n declaringNoPersonalDataOfTheirOwn: number;\n declaringNoPersonalDataOfTheirOwnButNamingADescribedParty?: number;\n withPersonalDataCategories?: number;\n withUncategorizedPersonalFields?: number;\n }>;\n undeclaredResourceTypes?: readonly string[];\n personalDataCategories?: readonly string[];\n unconditionalPersonalDataCategories?: readonly string[];\n conditionalPersonalDataCategories?: ReadonlyArray<{\n condition: string;\n categories: readonly string[];\n resources: ReadonlyArray<{ resourceType: string; origin: string; fieldNames: readonly string[] }>;\n }>;\n uncategorizedPersonalFieldsByResource?: ReadonlyArray<{\n resourceType: string;\n origin: string;\n fields: ReadonlyArray<{ fieldName: string; basis: string }>;\n }>;\n };\n const resources = snapshot.resources ?? [];\n const undeclared = new Set(snapshot.undeclaredResourceTypes ?? []);\n\n const renderOrigin = (origin: string, heading: string, undeclaredLimit: number | null): string[] => {\n const coverage = snapshot.coverageByOrigin?.[origin];\n const owned = resources.filter((resource) => resource.origin === origin);\n const declaring = owned.filter((resource) => !undeclared.has(resource.resourceType));\n const silent = owned.filter((resource) => undeclared.has(resource.resourceType)).map((resource) => resource.resourceType);\n const shown = undeclaredLimit === null ? silent : silent.slice(0, undeclaredLimit);\n return [\n `## ${heading}`,\n coverage\n ? `${coverage.resourceCount} resource(s). Declaring an erasure retention mode: ${coverage.withErasureRetentionMode}. `\n + `Declaring a data-subject kind: ${coverage.withDataSubjectKind}. Declaring subject export: ${coverage.withSubjectExport}. `\n + `Declaring RETAIN_ONLY — the checked statement \"holds no personal data of its own\": ${coverage.declaringNoPersonalDataOfTheirOwn}`\n + ((coverage.declaringNoPersonalDataOfTheirOwnButNamingADescribedParty ?? 0) > 0\n ? ` (of which ${coverage.declaringNoPersonalDataOfTheirOwnButNamingADescribedParty} hold the name of the party they describe, personal data where that party is a natural person). `\n : '. ')\n + `Declaring at least one personal-data category: ${coverage.withPersonalDataCategories ?? 0}.`\n : '(no coverage reported)',\n '',\n ...(declaring.length > 0\n ? declaring.map((resource) =>\n `- \\`${resource.resourceType}\\` — erasure: ${resource.erasureRetentionMode ?? 'UNDECLARED'}; `\n + `data-subject kind: ${resource.dataSubjectKind ?? 'UNDECLARED'}; `\n + `subject export: ${resource.declaresSubjectExport ? 'declared' : 'not declared'}; `\n + `audited see-through over retained rows: ${resource.declaresRetainedSeeThrough ? 'declared' : 'not declared'}`\n + ((resource.personalDataCategories ?? []).length > 0\n ? `; personal-data categories: ${(resource.personalDataCategories ?? []).join(', ')}`\n : '')\n + (resource.conditionalPersonalDataCategories ?? [])\n .map((conditional) => `; held ONLY where \\`${conditional.condition}\\`: ${conditional.categories.join(', ')} (fields ${conditional.fieldNames.map((fieldName) => `\\`${fieldName}\\``).join(', ')})`)\n .join(''))\n : ['(no resource of this origin declares anything on these axes)']),\n ...(silent.length > 0\n ? [\n '',\n `Declaring NOTHING on either axis (${silent.length}): ${shown.map((resourceType) => `\\`${resourceType}\\``).join(', ')}`\n + (shown.length < silent.length ? `, and ${silent.length - shown.length} more.` : '.'),\n ]\n : []),\n ];\n };\n\n /*\n * The application's declared CAPABILITIES and configured PROVIDERS, beside the resource declarations.\n *\n * Without them a whole class of concern can only be marked incomplete, and marked WRONGLY. \"Which\n * external processors receive personal data\", \"does the application make automated decisions\",\n * \"what analytics run\" are all answerable from what the application composed itself out of — and the\n * answer for a small application is usually NONE, which is a positive, checkable statement rather\n * than a gap. Measured on wonder-crm's first produced notice (2026-08-29): recipients-and-processors,\n * international-transfers, automated-decisions-and-ai and analytics-and-tracking all came back\n * `NEEDS_CONFIGURATION` — four concerns the hand-written comparison derives — because the drafter\n * could see the resources and not the composition.\n *\n * An ABSENT capability is reported as absent rather than omitted, for the same reason the resource\n * projection names its undeclared set: \"the application does not enable this\" and \"nobody looked\"\n * must not render identically.\n */\n const saasConfig = this.companionContext.saasConfig as {\n /*\n * The application's own declared BOUNDARY — what the programme covers (#636).\n *\n * Added when `programme-scope` was removed from `top_down.compliance-conception`'s elicitation.\n * That question asked a person \"which product, environments and services? Name what is INSIDE\n * the boundary, and anything a reader might assume is included that is not\" — and this section\n * already answered the harder half of it (which capabilities and providers are the CONTRACTED\n * SERVICE versus build-time tooling that is deliberately outside it). What it did not render was\n * the easy half: the product's own name, the services it declares, and its domain modules. Those\n * are plain field reads on a config object this method already holds.\n */\n name?: string;\n displayName?: string;\n slug?: string;\n type?: string;\n services?: Record<string, { serviceName?: string; frontendType?: string; path?: string }>;\n modules?: Record<string, { services?: readonly string[] }>;\n engineCapabilities?: Record<string, unknown> | readonly string[];\n providers?: { scopes?: Record<string, { providers?: Record<string, unknown> }> };\n providerConfigurations?: Record<string, unknown>;\n dataRetention?: ApplicationRetentionSchedule;\n aiUsePosture?: ApplicationAiUsePosture;\n clientStorage?: ApplicationClientStorageInventory;\n operatingJurisdictions?: ApplicationOperatingJurisdictions;\n operatorComplianceIdentity?: ApplicationOperatorComplianceIdentity;\n providerComplianceChoices?: ApplicationProviderComplianceChoices;\n };\n /*\n * DECLARED capabilities, SPLIT BY THE SURFACE THAT REACHES THEM — and the split is the whole\n * difference between a true and a false sentence in a customer-facing document.\n *\n * `engineCapabilities` answers two questions at once: what the DEPLOYED application offers its\n * users, and what the DEVELOPMENT COMPANION reaches while building it. A privacy notice, a record\n * of processing and a set of service terms are about the first only — the engine's own question\n * for the AI fact says so in English, \"resolve the fact as not applicable when no AI feature\n * reaches THE CONTRACTED SERVICE\" — so handing a drafter one undifferentiated list invites it to\n * describe a build-time tool as a product feature.\n *\n * That is not hypothetical. Wonder CRM enables `AI_CODING_AGENT` and nothing else AI-shaped, and\n * declares `document-fact:ai-features-and-content-use` NOT_APPLICABLE because \"No AI capability is\n * enabled in the application\" — a sentence that is false as written precisely because the flat\n * list cannot distinguish the agent that WROTE the application from a feature the application\n * OFFERS.\n *\n * `ENGINE_CAPABILITY_SURFACES` is the declared authority (total over the enum, so a new capability\n * is a compile error until classified). Authoring-only membership is not a licence to omit: the\n * section reports both, LABELLED, because secure-development and supply-chain obligations are\n * about exactly the half a runtime document must exclude.\n */\n const allDeclaredCapabilities = [...enabledEngineCapabilityNames(saasConfig.engineCapabilities)];\n const configuredProviderScopes = Object.entries(saasConfig.providers?.scopes ?? {})\n .map(([scope, value]) => ({ scope, providerRefs: Object.keys(value?.providers ?? {}) }))\n .filter((entry) => entry.providerRefs.length > 0);\n /*\n * THE CAPABILITY SAYS WHAT IT *CAN* SERVE; THE SCOPE SAYS WHAT THIS APPLICATION *DOES* WITH IT.\n *\n * The surface axis alone is not enough, and `AI_LLM` is why. It is genuinely BOTH — an application\n * may offer LLM features to its users, and the companion reaches an LLM to build the application —\n * so the capability's declaration cannot decide which is true HERE. Only the scope can: a provider\n * offering it under `companion` serves the build; one under any runtime scope serves users.\n *\n * So a capability is treated as reaching the contracted service unless it is EITHER authoring-only\n * by declaration, OR both-capable and offered by no runtime-scoped provider. A capability with no\n * provider at all (`ORGANIZATIONS`, `MULTI_LANGUAGE`) is unaffected: nothing scopes it, and it is\n * an application feature by nature.\n *\n * The rule is the engine's `partitionCapabilitiesByContractedService` (#2838), the one the evidence collector, the\n * assurance extractors and the AI-use facts call too. It walks every runtime scope, `frontendServices.<service>`,\n * `minions.<minion>` and `workers.<worker>` included, so a capability a minion serves is never read as offered\n * only by the companion (#1707).\n */\n // Every declared provider's compliance profile, from discovery (#1708). Unreadable → the population says\n // NOT READ, and the region report falls back to the engine specifications it always read.\n const discoveredProfiles = await this.resolveDiscoveredProviderComplianceProfiles(saasConfig);\n const recipientPopulation = await recipientPopulationOf(saasConfig, this.companionContext?.saasRoot, discoveredProfiles.profiles);\n const complianceProfiles: Readonly<Record<string, ProviderComplianceProfile>> = { ...engineSpecificationComplianceProfiles(), ...(discoveredProfiles.profiles ?? {}) };\n const { register: processorRegister, notRead: processorRegisterNotRead } = await this.resolveProcessorRegister();\n const contractedService = new Set(\n partitionCapabilitiesByContractedService({ declaredCapabilities: allDeclaredCapabilities, providers: saasConfig.providers }).reachingContractedService,\n );\n const reachesContractedService = (capability: string): boolean => contractedService.has(capability);\n const declaredCapabilities = allDeclaredCapabilities.filter(reachesContractedService);\n const authoringOnlyCapabilities = allDeclaredCapabilities.filter((capability) => !reachesContractedService(capability));\n /*\n * RUNTIME-SCOPED and PROFILE-ONLY are different answers, and merging them over-reports a recipient.\n *\n * A provider bound to a runtime scope — backend, companion, workers, minions, a frontend service —\n * can process the application's data. A `providerConfigurations` entry is a configuration PROFILE:\n * it says how to reach a provider, not that any runtime sends it anything.\n *\n * These were unioned until 2026-08-29, and the first live run showed the cost. wonder-crm scopes NO\n * provider to any runtime and configures `anthropic` solely as the coding agent's ACP profile — a\n * BUILD-TIME developer tool operating on the workspace. The union reported it as a configured\n * external provider, and the drafted fact duly said it \"is configured as an external provider and is\n * in use\". For a notice about customer data that names a recipient which receives none.\n *\n * Worth naming the direction: every other guard in this lane defends against UNDER-reporting, and\n * this was the opposite. A notice that invents a recipient is as wrong as one that hides one, and it\n * is harder to notice because it reads as caution.\n */\n /*\n * THE COMPANION SCOPE IS NOT A RUNTIME, and this line is where that stopped being true.\n *\n * The paragraph above already reasons that Wonder CRM's `anthropic` is \"a BUILD-TIME developer\n * tool operating on the workspace\" and that reporting it as a configured external provider put a\n * recipient into a notice which receives nothing. That fix keyed on `providerConfigurations`\n * versus scopes, and it held only while CRM scoped anthropic to no scope at all. CRM now declares\n * it under `companion`, so the identical false sentence came back through the other door — the\n * union below listed it among providers that \"can process this application's data\".\n *\n * A provider in the `companion` scope is reached by the tool that BUILDS the application. It sees\n * source, specifications and generated artifacts; it is never in the path of a request from a\n * user. So it is reported, separately and by name, as an authoring-surface provider — never\n * omitted (a secure-development statement needs it) and never merged (a privacy statement must\n * not have it).\n */\n const authoringScopedProviderRefs = [...new Set(\n configuredProviderScopes.filter((entry) => entry.scope === AUTHORING_PROVIDER_SCOPE).flatMap((entry) => entry.providerRefs),\n )].sort();\n const runtimeScopedProviderRefs = recipientPopulation.members\n .filter((member) => member.kind === RecipientPopulationMemberKind.CONFIGURED_PROVIDER)\n .map((member) => member.ref);\n const profileOnlyProviderRefs = Object.keys(saasConfig.providerConfigurations ?? {})\n .filter((providerRef) => !runtimeScopedProviderRefs.includes(providerRef) && !authoringScopedProviderRefs.includes(providerRef))\n .sort();\n\n return [\n \"# The application's compliance-relevant resource declarations (read from its CODE)\",\n 'These are DECLARATIONS on the resource configurations, enforced at runtime — not prose about the',\n 'application. They are the strongest evidence a governed document can rest on, and a mechanism fact',\n '(what erasure does to a row, whether a subject export can answer for it) must come from here rather',\n 'than from a specification, which states purpose.',\n '',\n 'Read them exactly. `RETAIN_ONLY` is the factory-CHECKED declaration that a resource holds no personal',\n 'data ABOUT ITS OWN SUBJECT. It may still hold the name of the party it describes (a tenant billed, an',\n 'organization a record is about), declared personal only where that party is a natural person: state such a',\n 'resource as holding that party\\'s name under that condition, never as holding no personal data at all.',\n '`RETAIN_AND_IMPERSONALIZE` means at least one field would actually be scrubbed on',\n 'erasure. `dataSubjectKind` answers WHOSE LOGIN SESSION an erasure ends and nothing else — `NO_PRINCIPAL`',\n 'is equally true of an invoice and of a CRM contact who has no account, so never read it as \"not a person\".',\n '',\n 'An UNDECLARED resource has said nothing. That is not a statement that it holds no personal data, and a',\n 'fact asserting either way about it would be invention. Where it matters to a document, say that the',\n 'application has not yet declared it.',\n '',\n ...renderOrigin('ENGINE', 'Engine-declared (inherited by every generated application)', PlaybookRunCompanionService.ENGINE_UNDECLARED_RESOURCE_NAMES_SHOWN),\n '',\n ...renderOrigin('APPLICATION', \"Application-declared (this application's own domain data)\", null),\n /*\n * NOT BUILT is not NONE (#2506). app-creation-test-004 derived its facts before the build had produced a single\n * resource, and wrote \"the application declares zero application-origin domain resources\", which the build then\n * made false. An empty application origin means the question cannot be answered yet.\n */\n ...(resources.some((resource) => resource.origin === 'APPLICATION')\n ? []\n : [\n '',\n 'NOT BUILT YET: no resource of this application\\'s own has been materialized, so the build has not produced its',\n 'domain data. Nothing can be stated about that data, neither that it holds personal data nor that it holds none.',\n 'A fact about it says it is not yet established; these facts go stale, and are derived again, once the build declares it.',\n ]),\n '',\n '## Which CATEGORIES of personal data this application holds',\n 'Read off each field\\'s `.dataCategories()` declaration, plus the one category the framework DERIVES —',\n '`credentials`, from `.isPassword()` / `.isOtp()` / `.isWriteOnlySecret()`, which are markers the author',\n 'wrote. Nothing here is inferred from a field NAME: a category list assembled by pattern-matching',\n '`email`, `phone` or `dateOfBirth` is a guess, and whatever it misses is simply never disclosed.',\n '',\n 'A `special-category:*` value is GDPR Art. 9 data and needs a lawful basis of its own beyond Art. 6.',\n '`criminal-offence` is Art. 10, a different article with a different condition. Say which one applies —',\n '\"special category data\" alone is not a disclosure.',\n '',\n (snapshot.personalDataCategories ?? []).length > 0\n ? `Declared across the whole application: ${(snapshot.personalDataCategories ?? []).map((category) => `\\`${category}\\``).join(', ')}.`\n : 'NO resource declares any personal-data category. Do NOT read that as \"this application holds no '\n + 'personal data\" — it means the question has not been answered per field. State it as outstanding.',\n '',\n /*\n * CONDITIONAL categories (#2119). A tenant organization's name, number and address are an individual's personal\n * data when the tenant is a sole trader and a company's when it is not (GDPR Recital 14 excludes legal persons\n * only). The declaration says so, and the notice must too: stating the data unconditionally claims it about every\n * customer, and omitting it leaves the sole trader out. The brief therefore hands the drafter the split and the\n * sentence shape, rather than a flat union the drafter cannot tell apart.\n */\n ...((snapshot.conditionalPersonalDataCategories ?? []).length > 0\n ? [\n `Held about the people this application serves on EVERY row: ${(snapshot.unconditionalPersonalDataCategories ?? []).map((category) => `\\`${category}\\``).join(', ') || '(none)'}.`,\n '',\n 'Held ONLY UNDER A CONDITION — state each of these CONDITIONALLY, never as data held about everyone, and never',\n 'omit them:',\n '',\n ...(snapshot.conditionalPersonalDataCategories ?? []).map((conditional) =>\n `- \\`${conditional.condition}\\`: ${conditional.categories.map((category) => `\\`${category}\\``).join(', ')} — on `\n + conditional.resources.map((resource) => `\\`${resource.resourceType}\\` (${resource.fieldNames.map((fieldName) => `\\`${fieldName}\\``).join(', ')})`).join(', ')),\n '',\n ...(snapshot.conditionalPersonalDataCategories ?? []).map((conditional) =>\n `\\`${conditional.condition}\\` means: ${PERSONAL_DATA_CONDITION_EXPLANATIONS[conditional.condition as PersonalDataCondition] ?? 'a condition this companion does not know; state these categories as held under a condition it cannot name, and mark the sentence owed.'}`),\n ]\n : ['No field declares a condition: every category above is held unconditionally.']),\n '',\n ...((snapshot.uncategorizedPersonalFieldsByResource ?? []).length > 0\n ? [\n 'OUTSTANDING — fields this application has ALREADY declared to be personal (they carry an erasure scrub',\n 'treatment, a portability provenance, or a credential marker) and has NOT categorized. For these the',\n 'omission is provable: the application said the field holds personal data by another door. Name them;',\n 'never guess what they contain.',\n '',\n ...(snapshot.uncategorizedPersonalFieldsByResource ?? []).map((resource) =>\n `- \\`${resource.resourceType}\\` (${resource.origin.toLowerCase()}): `\n + resource.fields.map((field) => `\\`${field.fieldName}\\` (personal by: ${field.basis})`).join(', ')),\n ]\n : ['No field is personal-by-another-declaration and uncategorized. Nothing is outstanding on this axis.']),\n '',\n '## What this application IS, and what it is COMPOSED of',\n '',\n 'The declared boundary first — this is the programme\\'s scope, read from the application\\'s own',\n 'configuration rather than described by anyone. Name the product by its display name; name the',\n 'services individually. A service NOT listed here is not part of this application.',\n '',\n `- Product: \\`${saasConfig.name ?? 'UNDECLARED'}\\`${saasConfig.displayName ? ` — \"${saasConfig.displayName}\"` : ''}`\n + `${saasConfig.type ? `, declared type \\`${saasConfig.type}\\`` : ''}.`,\n ...(saasConfig.services === undefined\n ? ['- Services: _the configuration declares none, which for a running application means this could not be read rather than that none exist._']\n : [\n `- Services (${Object.keys(saasConfig.services).length}): `\n + Object.entries(saasConfig.services)\n .map(([key, service]) => `\\`${key}\\`${service?.serviceName ? ` (${service.serviceName}` : ''}${service?.frontendType ? `, ${service.frontendType}` : ''}${service?.serviceName ? ')' : ''}`)\n .join(', '),\n ]),\n ...(saasConfig.modules === undefined || Object.keys(saasConfig.modules).length === 0\n ? []\n : [\n `- Domain modules (${Object.keys(saasConfig.modules).length}): `\n + Object.keys(saasConfig.modules).map((moduleRef) => `\\`${moduleRef}\\``).join(', '),\n ]),\n '',\n 'Its declared engine capabilities and configured external providers, read from its own composition.',\n 'An entry that is ABSENT here is absent from the application: nothing enables it, nothing is',\n 'configured for it. That is a positive, checkable statement — not a gap, and not something to mark',\n 'as awaiting configuration. Say it plainly: \"no external analytics provider is configured\".',\n '',\n declaredCapabilities.length > 0\n ? `Declared engine capabilities REACHED BY THE RUNNING APPLICATION (${declaredCapabilities.length}): ${declaredCapabilities.map((capability) => `\\`${capability}\\``).join(', ')}`\n : 'Declared engine capabilities reached by the running application: NONE.',\n ...(authoringOnlyCapabilities.length > 0\n ? [\n `Declared engine capabilities reached ONLY WHILE THE APPLICATION IS BUILT (${authoringOnlyCapabilities.length}): `\n + `${authoringOnlyCapabilities.map((capability) => `\\`${capability}\\``).join(', ')}.`,\n 'These are development tooling. They operate on this application\\'s own source and specifications,',\n 'never on a user\\'s data, and they are NOT features of the contracted service — so a privacy notice,',\n 'a record of processing or a set of service terms must not describe them, and must not be marked',\n 'incomplete for failing to. State plainly that the service itself does not do this.',\n 'They ARE in scope for a statement about how the software is developed (secure development,',\n 'change management, supply chain); say so there rather than here.',\n ]\n : []),\n runtimeScopedProviderRefs.length > 0\n ? `External providers BOUND TO A RUNTIME (${runtimeScopedProviderRefs.length}): ${runtimeScopedProviderRefs.map((providerRef) => `\\`${providerRef}\\``).join(', ')} — these can process this application's data.`\n : 'External providers bound to a runtime: NONE — no third party receives application data through a configured provider.',\n ...(authoringScopedProviderRefs.length > 0\n ? [\n `External providers bound ONLY TO THE BUILD-TIME COMPANION (${authoringScopedProviderRefs.length}): `\n + `${authoringScopedProviderRefs.map((providerRef) => `\\`${providerRef}\\``).join(', ')}.`,\n 'The companion is the tool that builds this application. These providers receive its source and',\n 'specifications; they receive NO user data and are not recipients for a privacy notice.',\n ]\n : []),\n ...(configuredProviderScopes.length > 0\n ? configuredProviderScopes.map((entry) => `- scope \\`${entry.scope}\\`: ${entry.providerRefs.map((ref) => `\\`${ref}\\``).join(', ')}`)\n : []),\n ...(profileOnlyProviderRefs.length > 0\n ? [\n `Provider PROFILES with no runtime binding (${profileOnlyProviderRefs.length}): `\n + `${profileOnlyProviderRefs.map((providerRef) => `\\`${providerRef}\\``).join(', ')}.`,\n 'A profile says how to reach a provider; nothing here binds it to a runtime that handles this',\n \"application's data. Build-time tooling lives here — a coding agent operates on the workspace,\",\n 'not on customer records. Do NOT name these as recipients of personal data without evidence',\n 'that a runtime actually sends them some.',\n ]\n : []),\n ...renderRecipientPopulation(recipientPopulation),\n ...renderRecipientDisclosures(deriveRecipientDisclosures({\n population: recipientPopulation,\n // An unread snapshot is NOT an empty one: undefined makes a system-of-record recipient report FLOWS_NOT_READ.\n systemOfRecordFlows: snapshot.resources === undefined ? undefined : parseSystemOfRecordFlows(snapshot.resources as Parameters<typeof parseSystemOfRecordFlows>[0]),\n providerComplianceChoices: saasConfig.providerComplianceChoices,\n lawfulBases: ApplicationOperatorComplianceIdentitySchema.safeParse(saasConfig.operatorComplianceIdentity).data?.lawfulBases,\n })),\n // Who runs each member the OPERATOR answers for. A tenant's own vendor and a vendor nothing reaches\n // carry no operator deployment choice, so asking for one would be asking the wrong party.\n ...renderProviderComplianceChoices(\n [...recipientPopulation.operatorSubProcessorRefs, ...recipientPopulation.operatorRunRefs],\n saasConfig.providerComplianceChoices,\n ),\n ...renderAppAssertedProcessingRegions(saasConfig.providerComplianceChoices, complianceProfiles),\n ...renderProviderComplianceProfileFindings(recipientPopulation, discoveredProfiles.unreadableReason),\n ...renderCodingModelDestinations(saasConfig.providerConfigurations),\n '',\n ...renderRetentionSchedule(saasConfig.dataRetention),\n '',\n // Joined to the recipient population: a profile with no runtime binding is not a recipient, and neither is a\n // declared vendor no data path reaches.\n ...(processorRegisterNotRead !== undefined\n ? renderProcessorRegisterNotRead(processorRegisterNotRead)\n : [\n ...renderProcessorRegister(recipientPopulation, processorRegister),\n ...renderComplianceFactStaleness(recipientPopulation, processorRegister, complianceProfiles, new Date().toISOString().slice(0, 10)),\n ...renderProcessorAgreementStanding(processorRegister),\n ]),\n '',\n /*\n * The FULL declared set, not the runtime-filtered one. `renderAiUsePosture` performs its own\n * surface split — it must report the runtime AI capabilities as the service's, AND name the\n * build-time ones as deliberately outside it. Handing it the already-filtered list makes the\n * second half unreachable, so the section would silently DENY a capability the application\n * enables instead of placing it. Caught by the pin for exactly that sentence.\n */\n ...renderAiUsePosture(\n new Set(declaredCapabilities),\n new Set(authoringOnlyCapabilities),\n saasConfig.aiUsePosture,\n await this.readAgentAiUseDeclarations(backendServiceKey, declaredCapabilities),\n saasConfig.operatingJurisdictions,\n ),\n '',\n ...await this.composeExternalAuthenticationSection(),\n ...composeBillingCommercialModelBrief(await this.resolveBillingDeclaration()),\n ...composeOperatingJurisdictionCoverageBrief(saasConfig.operatingJurisdictions),\n ...renderOperatorComplianceIdentity(saasConfig.operatorComplianceIdentity),\n ...renderServiceConsentRequirement(saasConfig.operatorComplianceIdentity?.serviceConsentRequirement),\n ...renderClientStorage(\n Object.entries(this.companionContext.servicesByKey)\n .filter(([, service]) => Boolean(service.frontendType))\n .map(([serviceKey]) => serviceKey),\n saasConfig.clientStorage,\n ),\n ].join('\\n');\n }\n\n /**\n * The provider modules the registry offers (#2025), for a playbook that binds providers. Best-effort by construction:\n * an unreadable registry renders a section saying so (`provider-registry-brief.companion.utils.ts`), never a refusal.\n */\n private async composeProviderRegistrySection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.PROVIDER_REGISTRY)) return '';\n const saasRoot = this.companionContext.saasRoot;\n const listing = await listRegistryProviderModules({\n frameworkRoot: this.companionContext.resolvedHomes.framework.repositoryRoot ?? null,\n moduleRegistries: this.companionContext.saasConfig?.moduleRegistries,\n });\n // The engine's own providers beside the registry's (#3992): a planner sees everything the framework has before it\n // concludes a need is unprovided.\n return renderProviderRegistryBrief(listing, (providerRef) => isRegistryProviderInstalled(saasRoot, providerRef), engineProviderOffers(listRegisteredProviderSpecifications()));\n }\n\n private async composeWorkspaceTruthSection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.WORKSPACE_TRUTH)) return '';\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey)\n .find(([, service]) => !service.frontendType)?.[0];\n if (!backendServiceKey) {\n throw new PlaybookNotReadyError(\n `\"${playbook?.ref ?? '(unknown playbook)'}\" plans against the current workspace, but no backend service is available to introspect it.`,\n );\n }\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'resources-registry' });\n if (!result.success) {\n throw new PlaybookNotReadyError(\n `\"${playbook?.ref ?? '(unknown playbook)'}\" plans against the current workspace, but the resources-registry introspection failed: `\n + JSON.stringify(result),\n );\n }\n const snapshot = result.data as {\n modules?: ReadonlyArray<{ moduleId: string; resourceTypes: readonly string[] }>;\n resourceSchemaFields?: Record<string, readonly string[]>;\n };\n const modules = snapshot.modules ?? [];\n const moduleLines = modules.map((sharedModule) => {\n const resourceLines = sharedModule.resourceTypes.map((resourceType) => {\n const fields = snapshot.resourceSchemaFields?.[resourceType] ?? [];\n /*\n * BOTH names, because they differ and a plan needs the SLUG. A registry resourceType is\n * camelCase (`workspaceMember`); a build-plan `resourceRef`/`moduleRef` is validated\n * against a kebab-case slug schema. The first version of this section listed only the\n * resourceType, the model copied it verbatim as instructed, and the provider rejected the\n * whole plan on 8 `resourceRef` format violations — twice (wonder-crm, 2026-08-27).\n */\n // The lane's one name → ref mapping (#3204), the same one the reference checks resolve with.\n const resourceRef = ApplicationCreationSpecs.domainPlanResourceSlugRef(resourceType);\n const both = resourceRef === resourceType\n ? `\\`${resourceType}\\``\n : `\\`${resourceType}\\` (its slug ref, for a task target: \\`${resourceRef}\\`)`;\n return ` - resource ${both} — current schema fields: ${fields.length > 0 ? fields.map((field) => `\\`${field}\\``).join(', ') : '(none readable)'}`;\n });\n return [`- module \\`${sharedModule.moduleId}\\``, ...resourceLines].join('\\n');\n });\n return [\n '# Current application workspace (ground truth)',\n 'This is the application\\'s REAL code state right now, read from its workspace. It is binding:',\n '- A task\\'s `moduleRef` MUST be one of the module ids listed below, EXACTLY. Never invent a module id.',\n '- A task\\'s `resourceRef` MUST be a resource\\'s SLUG ref (the kebab-case form shown in parentheses',\n ' where it differs from the resource type). Both names are given because they differ; refs are slugs.',\n '- Every resource listed below already EXISTS as a compose-born starter skeleton (registered, typechecking,',\n ' with the fields shown). Its stage tasks are ENRICHMENT: state WHAT domain content to add or change',\n ' (the fields, enums, operations, displays the domain plan declares). An objective that asks to',\n ' \"create\" or \"scaffold\" a resource shown here would correctly result in a no-op coding run.',\n '- A resource in the domain plan that is NOT listed below does not exist yet; its tasks are creation tasks.',\n '',\n ...(moduleLines.length > 0 ? moduleLines : ['(no application-authored modules exist yet — every module and resource task is a creation task)']),\n '',\n ...(await this.composeApplicationStoreLines()),\n '',\n ...(await this.composeOrganizationConfigurationLines()),\n '',\n ...composeEngineSettingsDestinationLines(),\n ].join('\\n');\n }\n\n /**\n * The organization model the configuration ALREADY declares (#3035, #3039): its organization types (the owner found\n * by `ownsApplication`), relationship kinds and system-of-record instances, for a playbook planning against the\n * workspace and for its judge. Read FRESH, because a build task may have just changed it. Best effort: an unreadable\n * configuration is said, never rendered as an empty one (`renderOrganizationConfigurationBrief`).\n */\n private async composeOrganizationConfigurationLines(): Promise<readonly string[]> {\n try {\n const config = await loadSaasConfig(path.join(this.companionContext.saasRoot, 'wildo.saas.config.ts'), { freshModuleCache: true });\n const briefInput = config === null || config === undefined ? undefined : config as OrganizationConfigurationBriefInput;\n // #3043: the owner organization's declared chart, beside the model, read where the backend declares it.\n const identityLines = await this.composeOrganizationIdentityLines(Object.entries(briefInput?.organizationTypes ?? {}).find(([, type]) => type?.ownsApplication === true)?.[0]);\n return [...renderOrganizationConfigurationBrief(briefInput), ...(identityLines.length === 0 ? [] : ['', ...identityLines])];\n } catch (error) {\n return renderOrganizationConfigurationBrief(undefined, describeCaughtError(error));\n }\n }\n\n /**\n * The organization chart the backend declares (#3043): `organizationIdentity`, read through the\n * `organization-identity-declaration` introspection behavior from the backend's own initialization configuration, its one\n * source. Only for an application whose configuration has an owner type, which the declaration describes. Best effort:\n * an unreadable declaration is said, never rendered as an absent one (`renderOrganizationIdentityBrief`).\n */\n private async composeOrganizationIdentityLines(ownerTypeRef: string | undefined): Promise<readonly string[]> {\n if (ownerTypeRef === undefined) return [];\n const backendServiceKey = Object.entries(this.companionContext.servicesByKey ?? {}).find(([, service]) => !service.frontendType)?.[0];\n let source: OrganizationIdentityBriefSource;\n if (backendServiceKey === undefined) {\n source = { unreadable: 'no backend service is available to introspect' };\n } else {\n try {\n const result = await this.introspection.requestInfo({ serviceKey: backendServiceKey, behavior: 'organization-identity-declaration' });\n const reading = result.success ? result.data as Partial<OrganizationIdentityDeclarationReading> | undefined : undefined;\n source = typeof reading?.declared === 'boolean'\n ? { reading: reading as OrganizationIdentityDeclarationReading }\n : { unreadable: result.success ? 'the introspection answered no reading' : `the introspection failed: ${JSON.stringify(result)}` };\n } catch (error) {\n source = { unreadable: describeCaughtError(error) };\n }\n }\n return renderOrganizationIdentityBrief(source, ownerTypeRef, existsSync(path.join(this.companionContext.saasRoot, 'backend-api', 'src', 'organization-identity.ts')));\n }\n\n /**\n * The capabilities, billing and sign-in methods this application enables (#2502 review F2), for a playbook declaring\n * `APPLICATION_ENABLED_SURFACE`. Best effort: unreadable is said, never read as off.\n */\n private async composeApplicationEnabledSurfaceSection(playbook: MetaWorkflowPlaybook | undefined): Promise<string> {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.APPLICATION_ENABLED_SURFACE)) return '';\n return (await this.composeEnabledApplicationSurface()).join('\\n');\n }\n\n private async composeEnabledApplicationSurface(): Promise<readonly string[]> {\n const engineCapabilities = this.companionContext?.saasConfig === undefined\n ? undefined\n : enabledEngineCapabilityNames((this.companionContext.saasConfig as { engineCapabilities?: Record<string, unknown> | readonly string[] }).engineCapabilities);\n let userTypeAuthMethods: Record<string, AuthMethodsMap | undefined> | undefined;\n try {\n const { configuration: backendConfig } = await loadBackendCompanionData(this.companionContext);\n const userTypes = (backendConfig as { userTypes?: Record<string, { auth?: { authMethodsEnabled?: AuthMethodsMap } }> }).userTypes;\n userTypeAuthMethods = userTypes === undefined\n ? undefined\n : Object.fromEntries(Object.entries(userTypes).map(([userType, definition]) => [userType, definition.auth?.authMethodsEnabled]));\n } catch (error) {\n this.logDebug('Backend configuration read failed (the enabled sign-in methods will be reported as unreadable)', { error: String(error) });\n }\n return composeEnabledApplicationSurfaceLines({ engineCapabilities, billing: await this.resolveBillingDeclaration(), userTypeAuthMethods });\n }\n\n /**\n * WHICH STORE this application persists to, computed rather than looked up by the model (#1435).\n *\n * `bottom_up.build-decompose` needs it: on PostgreSQL a resource's table is built by a MIGRATION and\n * by nothing else, so a schema-stage task that stops at the Zod file produces a resource the\n * application cannot store. Its method therefore told the model to `rg -n \"applicationDatabase\"` —\n * in a STRUCTURED GENERATION, which has no shell. The instruction could never be followed, and what\n * happened instead is invisible: the model answered from the surrounding prose or from nothing.\n *\n * The companion already computes this exactly, for the generation-step lane\n * (`assessApplicationSchemaPlanObligation`, #1144), from the lockfile plus the authored\n * `applicationDatabase.engine`. So this is the epic's own thesis applied to one value: it was\n * derivable, it was already derived, and an agent was being asked to go and find it.\n *\n * UNDETERMINED is REPORTED, never resolved to a default. Guessing MongoDB leaves a PostgreSQL\n * application with unstorable resources; guessing PostgreSQL teaches a coding agent to carry an\n * obligation that does not apply. Neither is a reading of the evidence, and a plan that says it\n * could not tell is a plan someone can correct.\n */\n private async composeApplicationStoreLines(): Promise<readonly string[]> {\n const heading = '## Where this application STORES its data';\n /*\n * BEST-EFFORT, and the reason is what it sits inside: this is one section of a BRIEF, and a\n * throw here takes the whole composition down — the module and resource truth the planner cannot\n * work without goes with it. The assessment already HAS an honest answer for \"could not read\"\n * (`UNDETERMINED`), so a failure takes the same branch rather than inventing a different outcome.\n */\n let assessment: Awaited<ReturnType<typeof assessApplicationSchemaPlanObligation>>;\n try {\n assessment = await assessApplicationSchemaPlanObligation(this.companionContext.saasRoot);\n } catch (error) {\n assessment = {\n obligation: ApplicationSchemaPlanObligation.UNDETERMINED,\n reason: `the application store could not be assessed: ${describeCaughtError(error)}`,\n };\n }\n switch (assessment.obligation) {\n case ApplicationSchemaPlanObligation.ACCEPTED_PLAN:\n case ApplicationSchemaPlanObligation.BASELINE_OWED:\n return [\n heading,\n 'PostgreSQL. A resource\\'s table is created by a MIGRATION and by nothing else — there is no',\n 'implicit creation — so a schema stage that stops at the Zod file has produced a resource this',\n 'application cannot store. Bind `application-database-migrations` to EVERY schema-stage task,',\n 'and say in the objective that the stage is finished when `wildo db diff --check` is clean.',\n ...(assessment.obligation === ApplicationSchemaPlanObligation.BASELINE_OWED\n ? ['No schema plan has been accepted yet, so the FIRST migration is the baseline: it renders the whole model.']\n : []),\n ];\n case ApplicationSchemaPlanObligation.NOT_OWED:\n return [\n heading,\n 'MongoDB. A collection appears on first write, so do NOT bind `application-database-migrations`',\n 'and do not mention migrations in any objective — a task carrying an obligation that does not',\n 'apply teaches the coding agent to ignore obligations.',\n ];\n default:\n return [\n heading,\n `UNKNOWN — ${assessment.reason}.`,\n 'Do not guess. Say in the plan that the store could not be read, and leave the migration',\n 'obligation unbound: a wrong guess either way costs more than a stated gap.',\n ];\n }\n }\n\n /**\n * The application-knowledge skill catalog, as the brief's own section.\n *\n * A playbook METHOD names skills — `bottom_up.build-decompose` binds every task it emits to a\n * skill folder and instructs the model to \"route through the skills index; do not invent skill\n * names\". Measured 2026-08-27, the model had never been shown one: `skillRefs` reached the brief\n * zero times, so 54 tasks were bound from recall. A dangling ref is a task the dispatch playbook\n * cannot run, and the rendering that would have caught it (`wildo fwk audit` rule 13) only sees\n * AUTHORED playbooks, never a generated plan.\n *\n * Two shapes, because the two needs are different:\n * - a ROUTING playbook (one declaring `SKILL_CATALOG`) gets the whole catalog — it must choose\n * across the full set, so a partial list would silently bound what it can express;\n * - every other playbook gets exactly the skills its OWN method names, which its guidance\n * already mentions by name and which cost a few hundred bytes rather than 25KB.\n *\n * Purpose-only by construction (`listFrameworkKnowledgeSkillSummaries` drops the `Use when \"…\"`\n * trigger half): triggers exist to match a HUMAN's utterance to a skill, and a playbook is\n * matching a build TASK to one. Carrying them would roughly double the section for phrasing this\n * reader cannot use — and the compiled `INDEX.md` router itself (76KB) is larger than the entire\n * rest of a decompose brief, which is why it is deliberately NOT what gets injected.\n */\n /**\n * The FULL BODY of the skills this method declares it must follow (#1435).\n *\n * `composeSkillCatalogSection` below answers \"which skills exist and what does each do\" — the\n * question a model CHOOSING between them asks. This answers the other one: a method that has\n * already chosen, and says \"follow the `brand-logo-authoring` skill for the exact field\n * contracts\", needs the contract. Measured 2026-09-22, three methods said exactly that and only\n * the purpose line ever arrived, so the model followed a document it had never been shown.\n *\n * Bounded by DECLARATION, not by total. `top_down.market-snapshot-produce` names sixteen skills\n * and one of them is 133KB, so \"render every named skill's body\" is not a mechanism — it is a\n * brief nobody can afford. `skillBodyRefs` is the method naming the one or two it must follow.\n *\n * A declared ref that resolves to no skill folder is NAMED in the section rather than skipped: a\n * method instructing the model to follow a skill that is not there is a defect the model should\n * report, and a silent omission would leave it following its recollection instead.\n */\n private composeSkillBodiesSection(playbook: MetaWorkflowPlaybook): string {\n const refs = playbook.method?.skillBodyRefs ?? [];\n if (refs.length === 0) return '';\n const bodies: string[] = [];\n const unresolved: string[] = [];\n for (const ref of refs) {\n let body: string | null = null;\n try {\n body = readFrameworkKnowledgeSkillBody(ref);\n } catch (error) {\n this.logDebug('Skill body unavailable for the brief (continuing without it)', { playbookRef: playbook.ref, ref, error: String(error) });\n }\n if (body === null) {\n unresolved.push(ref);\n continue;\n }\n bodies.push([`## Skill: \\`${ref}\\``, body].join('\\n'));\n }\n if (bodies.length === 0 && unresolved.length === 0) return '';\n return [\n '# The skills this method tells you to FOLLOW',\n 'Your guidance names these by ref and instructs you to follow them. Their contracts are',\n 'authoritative for the fields they describe — follow them exactly rather than recalling a',\n 'similar shape. A skill body may point at `references/`, `examples/` or `scripts/` beside it;',\n 'you cannot open those, so where one is the only source for a detail, say so on what you author',\n 'rather than inventing the detail.',\n '',\n ...bodies,\n ...(unresolved.length === 0\n ? []\n : [\n '',\n `_Declared and NOT FOUND: ${unresolved.map((ref) => `\\`${ref}\\``).join(', ')}. The method told you to_`,\n '_follow these and the framework could not supply them — do not substitute a remembered contract;_',\n '_say on what you author that the contract was unavailable._',\n ]),\n ].join('\\n');\n }\n\n private composeSkillCatalogSection(playbook: MetaWorkflowPlaybook): string {\n const declaredSkillRefs = playbook.method?.skillRefs ?? [];\n const routesThroughCatalog = playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.SKILL_CATALOG);\n if (!routesThroughCatalog && declaredSkillRefs.length === 0) return '';\n\n let summaries: ReturnType<typeof listFrameworkKnowledgeSkillSummaries>;\n try {\n summaries = listFrameworkKnowledgeSkillSummaries();\n } catch (error) {\n // Best-effort BY DESIGN, and only here: the catalog SHARPENS a choice, it is not the\n // application's truth. An artifact that cannot be read must not fail a run that would\n // otherwise produce a valid artifact — the opposite posture to the workspace section, whose\n // absence would let a plan invent module ids.\n this.logDebug('Skill catalog unavailable for the brief (continuing without it)', { playbookRef: playbook.ref, error: String(error) });\n return '';\n }\n const summaryByName = new Map(summaries.map((summary) => [summary.name, summary]));\n const rendered = routesThroughCatalog\n ? summaries\n : declaredSkillRefs.map((ref) => summaryByName.get(ref)).filter((summary): summary is NonNullable<typeof summary> => summary !== undefined);\n if (rendered.length === 0) return '';\n\n const declared = new Set(declaredSkillRefs);\n const lines = rendered.map((summary) => {\n // A skill this playbook's own method names is marked, so \"the catalog\" and \"what my method\n // told me to use\" stay distinguishable inside one list.\n const mark = routesThroughCatalog && declared.has(summary.name) ? ' **(named by this playbook\\'s method)**' : '';\n return `- \\`${summary.name}\\`${mark} — ${summary.purpose}`;\n });\n return [\n '# Application-knowledge skills (the catalog)',\n routesThroughCatalog\n ? 'These are ALL the skills installed in the application. Where an output binds work to a skill, the'\n + ' name MUST be one of these, spelled EXACTLY as listed — a name that is not here addresses no'\n + ' skill folder and the work bound to it cannot be executed. Never invent or infer a skill name.'\n : 'The skills this playbook\\'s method names, and what each one does.',\n '',\n ...lines,\n ].join('\\n');\n }\n\n /**\n * Render the playbook's DECLARED input families into the brief — the derivation substrate.\n *\n * The catalog contract (`inputs: [{ family }]`) is what a playbook derives FROM: market derives from\n * the vision brief, requirements from vision + market, and so on. J-1 (2026-08-26, the first live\n * wonder-crm run) proved that composing the brief without them starves every post-elicitation\n * playbook of the product itself: `top_down.market-analysis` received the method and no vision, and\n * the model — correctly refusing to invent — returned empty collections that failed the family\n * schema, surfacing as an opaque \"no valid object\" three layers away. Eligibility already gates on\n * these same families being present and valid, so a family that reaches this point and still has no\n * VALUE (a file-only marker) is skipped rather than serialized as noise.\n *\n * Content comes from the SAME working-tree read the eligibility gate used (`readArtifactState()`),\n * so the two can never disagree about what the application currently contains.\n *\n * A family research wrote any of (the market snapshot, the compliance posture's constraints) is SCREENED before the model\n * reads it (#2937), through the seam the coding brief uses: withheld when flagged, marked when nothing screened it.\n * This is the one place a generating step reads its declared inputs, so what it writes into the application's trusted\n * specifications (requirements, plans, a build task's objective) is never derived from a flagged instruction. An input\n * that follows references (`related`) can pull in another family's elements, so it is screened too.\n */\n private async composeInputTruthSection(\n playbook: { readonly ref?: string; readonly inputs?: readonly DeclaredInputFamilyRendering[] },\n state: PlaybookArtifactState,\n ): Promise<string> {\n const rendered: RenderedInputFamilySection[] = [];\n const notApplicable: string[] = [];\n const absent: string[] = [];\n const valuesByFamily = this.decidedFamilyValues(state);\n // Read once, and only when a declared input has a value to render.\n let isResearchInformed: ((family: string) => boolean) | undefined;\n for (const declaredInput of playbook.inputs ?? []) {\n /*\n * Said, never merely omitted (#1604). An absent input reads as \"not written yet\", and a model given\n * a requirements brief with no market invents the market it thinks is missing. A family the line\n * declares not applicable is an answer: this application has none, and none is owed.\n */\n if (isFamilyNotApplicable(state.applicationLine, declaredInput.family)) {\n notApplicable.push(declaredInput.family);\n continue;\n }\n const value = valuesByFamily[declaredInput.family];\n if (value === undefined || value === null) {\n /*\n * ABSENT is stated, not dropped (#2235): a model — or the judge reading this same section as its evidence —\n * that meets no heading for a declared input cannot tell \"not written yet\" from \"not shown\". A file-only\n * marker is present, so it stays unstated, as before.\n */\n if (state.artifactsByFamily.get(declaredInput.family) !== FILE_PRESENT_WITHOUT_VALUE) absent.push(declaredInput.family);\n continue;\n }\n // The playbook's DECLARATION decides how much of the family it reads — its aspects, or its intent.\n // Absent = everything, which is what every playbook did before either existed.\n rendered.push({\n family: declaredInput.family,\n text: renderDeclaredInputFamily(declaredInput, value, valuesByFamily),\n researchInformed: (isResearchInformed ??= researchInformedFamilies(readCompiledResearchInformedContent(), valuesByFamily))(declaredInput.family)\n || declaredInput.related !== undefined,\n });\n }\n const screenedTexts = await screenResearchInformedInputSections(rendered, {\n contentSafety: this.contentSafety,\n logger: this.logger,\n verdicts: companionScreeningVerdicts(),\n playbookRef: playbook.ref ?? 'unknown',\n });\n const sections = rendered.map((section, index) => `## Input family: ${section.family}\\n${screenedTexts[index]}`);\n if (sections.length === 0 && notApplicable.length === 0 && absent.length === 0) return '';\n const line = state.applicationLine?.declaration;\n const lineName = line?.state === ApplicationLineDeclarationState.DECLARED ? line.line : 'declared';\n return [\n '# Accepted application truth (derivation inputs)',\n 'Derive the output FROM this content. It is the application\\'s current authored truth for the',\n 'declared input families — never contradict it, and never invent facts it does not support.',\n ...(notApplicable.length > 0\n ? ['', `These input families do NOT APPLY to this application, which is created on the ${lineName} line: ${notApplicable.map((family) => `\\`${family}\\``).join(', ')}.`,\n 'The application has none and none is owed. Do not infer, invent or ask for their content, and leave',\n 'every reference into them empty (for example, requirements name no ICP when the market does not apply).']\n : []),\n ...(absent.length > 0\n ? ['', `These declared input families have NO accepted content yet: ${absent.map((family) => `\\`${family}\\``).join(', ')}.`,\n 'They are absent, not unread. Do not infer or invent their content; where the method says what to do without one,',\n 'do exactly that.']\n : []),\n ...(sections.length > 0 ? ['', sections.join('\\n\\n')] : []),\n ].join('\\n');\n }\n\n /**\n * Every family value this run loaded, as the decided-aspect index reads it (#1420).\n *\n * One construction for the generation brief and the assessment judge, so the two resolve an input —\n * including `document-facts`, which carries the computed overlay — to the same value, and a RELATED\n * walk can reach any family the run read rather than only the declared ones. A file-only marker has\n * no value to index and is left out.\n */\n /**\n * Which families research wrote any of (#2937, #2938), joined over the values a reader is about to read: the tree's,\n * overlaid with `overlay` (what a run just landed, or what the judge bench was handed). `researchInformedFamilies`\n * fails toward over-marking, so an unreadable catalog or index marks every family.\n */\n private researchInformedFamilyPredicate(\n state: PlaybookArtifactState | undefined,\n overlay: ReadonlyArray<{ readonly family: string; readonly value: unknown }> = [],\n ): (family: string) => boolean {\n const values = { ...(state !== undefined ? this.decidedFamilyValues(state) : {}), ...Object.fromEntries(overlay.map((entry) => [entry.family, entry.value])) };\n return researchInformedFamilies(readCompiledResearchInformedContent(), values);\n }\n\n /**\n * Landed (or supplied) family values as a judge reads them (#2938): each research-informed one screened, withheld or\n * marked. The predicate is joined over the tree overlaid with these values, so a family a run just landed is judged by\n * what it now holds. Shared by the generation-path judge and the judge bench, so the bench measures the judge that runs.\n */\n private async screenLandedValuesForJudge(\n playbookRef: string,\n state: PlaybookArtifactState | undefined,\n landed: ReadonlyArray<{ readonly family: string; readonly value: unknown }>,\n ): Promise<PlaybookJudgeSubject[]> {\n const isResearchInformed = this.researchInformedFamilyPredicate(state, landed);\n return screenResearchInformedJudgeSubjects(\n landed.map((entry) => ({ family: entry.family, value: entry.value, researchInformed: isResearchInformed(entry.family) })),\n this.researchFamilyScreeningHost(playbookRef),\n );\n }\n\n /** Which families research wrote any of, in the current tree: for a reader outside a run (the creation assistant, #2938). */\n public async readResearchInformedFamilyPredicate(): Promise<(family: string) => boolean> {\n return this.researchInformedFamilyPredicate(await this.readArtifactState());\n }\n\n /**\n * What screening research-derived text needs here: the companion's classifier, the process's verdicts, a log naming\n * `readerRef`. Public because the creation assistant's tools screen through it too (#2938): this service holds the\n * companion's classifier, and a second injection of it would be a second place to keep it.\n */\n public researchFamilyScreeningHost(readerRef: string): ResearchInformedFamilyScreeningHost {\n return { contentSafety: this.contentSafety, logger: this.logger, verdicts: companionScreeningVerdicts(), readerRef };\n }\n\n private decidedFamilyValues(state: PlaybookArtifactState): Record<string, unknown> {\n const values: Record<string, unknown> = {};\n for (const [family, value] of state.artifactsByFamily) {\n if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE) continue;\n values[family] = value;\n }\n const documentFacts = this.documentFactsWithComputedOverlay(state);\n if (documentFacts !== undefined && documentFacts !== null && documentFacts !== FILE_PRESENT_WITHOUT_VALUE) {\n values['document-facts'] = documentFacts;\n }\n return values;\n }\n\n /**\n * The provider boundary.\n *\n * `invokeAgent` with `GENERATE_STRUCTURED` hands the family's Zod schema to the provider, which\n * CONSTRAINS the model to a conformant object (OpenAI `response_format: json_schema`). That replaced a\n * \"return raw JSON\" prompt hack whose first live run emitted valid-JSON-but-schema-divergent output the\n * `_core` validator rejected — the schema is a floor the prompt cannot talk its way past.\n *\n * Usage is NOT asserted here. An earlier adapter threw when the provider's token counts were incomplete,\n * which turned one unmeasurable call into a permanently failed run; a budget may refuse to SPEND, but it\n * may never invalidate work that already exists (`.claude/rules/one-source-of-truth.md`, rule 5).\n */\n /**\n * RUNAWAY CIRCUIT BREAKER over the playbook lane's model calls — emphatically NOT a budget.\n *\n * Spending here is NORMAL and wanted (Paul, 2026-08-24: \"we are here to spend, we do not make small\n * things\"): the lane exists to build full businesses from a prompt, and real budget limits belong at\n * the MODEL PROVIDER's account, where they cover every lane at once (this breaker warns once, at the\n * lane's first call, to say exactly that). The ONLY thing refused is ABNORMAL behavior — a circle\n * burning calls at machine speed.\n *\n * That is why it measures a RATE (calls per UTC hour), never a daily quota: a legitimate heavy day\n * accumulates calls slowly and can never trip it, while a tight loop trips within the hour it starts.\n * Every model call in this lane — loop chooser, structured generation, advisory judge — funnels\n * through `buildGenerationPort`, and one playbook run costs a handful of calls, so the default of\n * 1000 calls/hour is on the order of 200 runs per hour: nothing human-initiated approaches it. It\n * refuses BEFORE spending, and the refusal names its own doors: the\n * `WILDO_PLAYBOOK_MODEL_CALL_HOURLY_BREAKER` env override, and a companion restart (the counter is a\n * runtime cache — losing it costs nothing but the count).\n */\n /**\n * How many runs THIS process submitted and has not seen answer — the pulse's `runsInFlight` (#1657).\n * In-memory by design: the pulse must not read the actor plane, and a run another process holds is\n * the feed's to report.\n */\n public countRunsInFlightInProcess(): number {\n return this.runningDetachedRuns.size;\n }\n\n /** What is running in this process, and what died leaving a resumable checkpoint. */\n public async readRunsInFlight(): Promise<{\n /** Every root composite instance running now, each holding its own single-flight subject (#1610). Empty when none is. */\n running: readonly { readonly runId: string; readonly playbookRef: string; readonly instanceKey?: string; readonly startedAt: string }[];\n runningDetached: readonly { readonly runId: string; readonly playbookRef: string; readonly instanceKey?: string; readonly startedAt: string; readonly traceSessionId?: string; readonly conversationId?: string }[];\n interrupted: readonly { readonly playbookRef: string; readonly instanceKey?: string; readonly completedIterations: number; readonly stepRefs: readonly string[]; readonly checkpointedAt: string }[];\n lastCompleted: readonly PlaybookSettledRunRecord[];\n /** The newest unattended playbook LOOP and what it took and spent (#1507) — `null` when none ran or the plane is unreachable. */\n lastLoop: PlaybookLoopRunRecord | null;\n }> {\n /*\n * READ FROM THE ROWS (#1362). Every run is an execution of `meta-workflows.system`, so the runs\n * that are in flight and the last outcome per playbook are a projection of that table — and\n * survive the companion restart that emptied the two maps this used to answer from. The maps\n * remain as what they always honestly were: the full result envelope of a run THIS process ran,\n * handed back to a poller as an enrichment of its row.\n */\n const liveResults = new Map([...this.lastCompletedDetachedRuns.values()].map((record) => [record.runId, record.result] as const));\n let fromRows: ReturnType<typeof projectPlaybookRunRecords>;\n let lastLoop: PlaybookLoopRunRecord | null = null;\n try {\n const executions = await this.executions.listActorExecutions(\n CompanionExecutionsListQuerySchema.parse({ systemRef: META_WORKFLOWS_SYSTEM_REF, limit: 200 }),\n );\n fromRows = projectPlaybookRunRecords(executions, (runId) => liveResults.get(runId));\n lastLoop = projectLastPlaybookLoop(executions);\n } catch (error) {\n /*\n * A STATUS READ does not fail because the actor plane is unreachable — the posture\n * `listInterruptedChoreographies` already takes. It answers what THIS process knows, which is\n * exactly what the read answered before #1362, and says so in the log: a poller watching its\n * own submission still sees it, and nothing here claims to know about runs it cannot read.\n */\n this.logDebug('The actor plane could not be read; answering the runs this process knows', { error: describeCaughtError(error) });\n fromRows = { running: [...this.runningDetachedRuns.values()], settled: [...this.lastCompletedDetachedRuns.values()] };\n }\n /*\n * `running` is every COMPOSITE holding a single-flight subject, read from its row since #1361, where\n * it used to be an in-memory marker only the process driving the composite could see. A LIST since\n * #1610: a secondary line's composite runs beside the main line's, one subject per instance. It\n * answers a different question from `runningDetached` (\"what did I submit that has not answered\n * yet\"), so a composite is reported under it alone.\n */\n const composites = fromRows.running.filter((run) => isCompositeExclusiveSubject(run.exclusiveSubject));\n return {\n // With its run id and instance (#1609): \"a composite running\" names WHICH run, not only which playbook.\n running: composites.map((composite) => ({\n runId: composite.runId,\n playbookRef: composite.playbookRef,\n ...(composite.instanceKey ? { instanceKey: composite.instanceKey } : {}),\n startedAt: composite.startedAt,\n })),\n runningDetached: fromRows.running.filter((run) => !composites.includes(run)).map(({ exclusiveSubject: _subject, ...run }) => run),\n interrupted: await this.listInterruptedChoreographies(),\n lastCompleted: fromRows.settled,\n lastLoop,\n };\n }\n\n /**\n * The most recent DETACHED run outcome per playbook INSTANCE — the read side of async submission (#265).\n *\n * In memory deliberately (one-source-of-truth Rule 5: a per-run cache; a restart costs the summary\n * and no fact — the artifacts are in the tree and the details in the traces). Bounded to one entry\n * per instance id (`<ref>` or `<ref>@<key>`, #1609), because the question this answers is \"what happened\n * to the run I submitted\", not a history — the traces are the history. Keyed by ref alone, a second\n * instance settling replaced the first one's outcome.\n */\n private lastCompletedDetachedRuns = new Map<string, PlaybookDetachedRunRecord>();\n\n /**\n * The detached runs THIS PROCESS is executing right now, keyed by RUN ID (#1609).\n *\n * It was keyed by playbook ref, and two runs of one playbook already overlapped before instances\n * existed (an ordinary run holds no single-flight subject): the second hid the first, the first's\n * settle deleted the second's entry, and with the map empty the run-tail heartbeat was REMOVED while\n * the second run still ran, so the supervisor could restart the companion under it. A run id is the one\n * key two runs can never share.\n *\n * `running` beside it lists the composites holding a single-flight subject and answers a different\n * question — a composite is in it while it drives its children, and an ordinary detached run never is.\n * So for every non-composite playbook the submission note's promise (\"`running` while in flight\") was\n * false: a caller polling a `bottom_up.build-dispatch` run saw `running: null` and an empty\n * `lastCompleted`, which is exactly what a run that was never submitted looks like.\n *\n * That was nearly invisible while a build dispatch returned at ADMISSION and the whole run lasted 25\n * seconds. Now that the run waits for the coding agent, the window IS the run — minutes — and a\n * companion restart in that window leaves the operator polling two empty fields forever.\n *\n * In memory, deliberately, like its completed counterpart: this is a per-run cache, and a restart\n * costs the summary and no fact. What the restart must not cost is the ABILITY TO TELL, which is why\n * absence from both fields now has a stated meaning in the note rather than being ambiguous.\n */\n private runningDetachedRuns = new Map<string, { readonly runId: string; readonly playbookRef: string; readonly instanceKey?: string; readonly startedAt: string; readonly traceSessionId?: string; readonly conversationId?: string }>();\n\n /**\n * How many playbook executions are in flight in this process, OTHER than the detached submissions\n * {@link runningDetachedRuns} already names: a synchronous `runPlaybook`, a resumed run, a loop, and\n * — unbypassably — every `executePlaybookRun`, whoever called it. Maintained only through\n * {@link whileInFlight}.\n *\n * A count, not a map: nothing reads them back, and a composite's children run nested inside the same\n * process, so the same ref may be in flight at several depths. It exists only so the heartbeat below\n * covers them. Until 2026-09-27 the heartbeat covered detached runs alone, and a synchronous\n * `bottom_up.build-dispatch` (the shape #1576's execution block submits) was invisible to the dev\n * supervisor, which restarted the companion under it; a resumed run was invisible the same way.\n */\n private playbookExecutionsInFlight = 0;\n\n /**\n * Run `work` counted as in flight, so the dev supervisor holds a restart for its whole life.\n *\n * Used at the ENTRY points (whole life, including the settle that writes the run's record after the\n * work returns) AND inside `executePlaybookRun` itself, so a caller added later is covered while it\n * executes even if nobody remembers to wrap it. Nested counts are harmless: the file beats while the\n * count is above zero.\n */\n private async whileInFlight<T>(work: () => Promise<T>, options: { readonly drainCounted?: boolean } = {}): Promise<T> {\n this.playbookExecutionsInFlight = (this.playbookExecutionsInFlight ?? 0) + 1;\n this.syncPlaybookRunHeartbeat();\n try {\n /*\n * One RUN for the restart drain too (#3204), at the same entry points and for the same whole life, settle included.\n * The inner `executePlaybookRun` wrap passes `drainCounted: false`: counted twice, one paused run would still read\n * busy, and a held restart would never drain.\n */\n return await (options.drainCounted === false ? work() : this.whileDrainCounted(work));\n } finally {\n this.playbookExecutionsInFlight = Math.max(0, (this.playbookExecutionsInFlight ?? 1) - 1);\n this.syncPlaybookRunHeartbeat();\n }\n }\n\n /** The {@link PLAYBOOK_RUN_HEARTBEAT_RELATIVE_PATH} beat; built on first use (see {@link syncPlaybookRunHeartbeat}). */\n private playbookRunHeartbeat: InFlightWorkHeartbeat | undefined;\n\n /**\n * Start or stop the playbook-run heartbeat to match what is in flight: any detached submission, or\n * any execution counted by {@link whileInFlight}.\n *\n * Called on every change to either, so the file exists exactly while a run does. Best-effort\n * throughout — see {@link InFlightWorkHeartbeat}.\n *\n * The beat is built LAZILY rather than as a field initializer: a service built through\n * `Object.create(prototype)` — which the tests and several harnesses do — never runs initializers, so\n * an eagerly-built beat would read `undefined` and never start. Same reason `?? 0` and `?.size` below.\n */\n private syncPlaybookRunHeartbeat(): void {\n // No application root, nowhere to beat — a harness, never a running companion. Skipping keeps the\n // heartbeat what it must be: something that can fail without failing the run it describes.\n const saasRoot = this.companionContext?.saasRoot;\n if (typeof saasRoot !== 'string') return;\n this.playbookRunHeartbeat ??= new InFlightWorkHeartbeat(\n join(saasRoot, PLAYBOOK_RUN_HEARTBEAT_RELATIVE_PATH),\n PLAYBOOK_RUN_HEARTBEAT_INTERVAL_MS,\n (message, error) => this.logDebug(message, { error: String(error) }),\n );\n this.playbookRunHeartbeat.sync((this.runningDetachedRuns?.size ?? 0) > 0 || (this.playbookExecutionsInFlight ?? 0) > 0);\n }\n\n /**\n * Judge one SETTLED coding run against the dispatching playbook's own compiled treatment.\n *\n * The subject is not an artifact family — nothing was landed into the specifications package — it is\n * the run's sealed evidence, which is what every criterion of `dispatch-outcome-sound` actually names:\n * the host's disposition, the verification gate, the change-set summary and the recorded out-of-scope\n * paths. `runPlaybookJudge` takes its subjects as `{ family, value }` pairs and renders the family as a\n * heading, so the constant below is the SUBJECT'S NAME rather than a specification family, and it is\n * named once here instead of written as a literal at the call.\n *\n * The task's declared scope travels beside the outcome deliberately: the second criterion asks whether\n * the change stayed inside the task's module/resource/stage, and a judge shown only the outcome would\n * have to take the scope from the same evidence it is meant to check.\n *\n * Every refusal is a SKIP carrying its reason, never a throw: a playbook with no treatment, a treatment\n * that does not satisfy its contract, and a judge that cannot answer are all things an operator should\n * read in the response — and none of them is a reason to fail a dispatch that already did its work.\n */\n private async judgeSettledCodingRun(input: {\n readonly playbookRef: string;\n readonly hydrated: { readonly evaluationTreatment?: { readonly value: unknown } | null };\n readonly plan: {\n readonly taskRef: string;\n readonly objective: string;\n readonly targetKind: string;\n readonly produces?: readonly unknown[];\n readonly allowedPathPrefixes?: readonly string[];\n };\n readonly outcome: ApplicationCodingTaskSettledOutcome;\n readonly session?: CompanionExecutionSessionContext;\n }): Promise<PlaybookJudgeResult> {\n if (!input.hydrated.evaluationTreatment) {\n return { judged: false, skipped: 'This playbook carries no compiled evaluation treatment.' };\n }\n const treatment = MetaWorkflow_EvaluationTreatmentDefinitionSchema.safeParse(input.hydrated.evaluationTreatment.value);\n if (!treatment.success) {\n return {\n judged: false,\n skipped: `Compiled evaluation treatment does not satisfy its contract: ${treatment.error.issues[0]?.message ?? 'unknown issue'}`,\n };\n }\n return runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed: [{\n family: SETTLED_CODING_RUN_JUDGE_SUBJECT,\n value: {\n ...input.outcome,\n /*\n * The ref the PLAN dispatched, kept beside the ref the durable ROW records. They should be the\n * same string; the treatment's INDETERMINATE guidance is for the case where the evidence \"does\n * not bind the dispatched task\", and a judge given only one of them could never see that.\n */\n dispatchedTaskRef: input.plan.taskRef,\n dispatchedTargetKind: input.plan.targetKind,\n /*\n * WHAT THE TASK ASKED FOR (#1432). The treatment asks whether the run implemented the\n * dispatched task's target and stage, and the subject carried the outcome, the ref, the\n * target kind and the mutation scope — everything about the dispatch except the work. A\n * judge given a ref and a settled status can only grade whether the agent exited cleanly.\n */\n dispatchedObjective: input.plan.objective,\n dispatchedProducts: input.plan.produces ?? [],\n declaredMutationScope: input.plan.allowedPathPrefixes ?? [],\n },\n }],\n model: this.buildGenerationPort(),\n ...(input.session ? { trace: this.buildTrace(input.session, `playbook-judge-${input.playbookRef}`) } : {}),\n });\n }\n\n /**\n * Submit a run and return IMMEDIATELY — the async half of #265's envelope fix.\n *\n * The synchronous route holds one HTTP request open for the run's whole life, and the server's\n * 30-minute request ceiling is SHORTER than a choreography's own duration bound — measured twice:\n * the connection dies at exactly 1800s, the run continues and even completes server-side, and the\n * caller gets HTTP 000 instead of a result. This path returns at submission; the caller polls\n * `readRunsInFlight`, whose `lastCompleted` carries the outcome (including a failure — an async\n * submission must never turn an error into silence).\n */\n\n public async submitPlaybookRunDetached(input: PlaybookRunInput): Promise<{\n readonly accepted: false;\n readonly async: true;\n readonly runId: string;\n readonly playbookRef: string;\n readonly note: string;\n }> {\n return this.submitPlaybookRoundDetached(input, 1);\n }\n\n /**\n * Start a parallel build WAVE detached, or answer `undefined` when this application builds one task\n * at a time (#2208). The build console's `wildo build run` asks this first, so the verb people and\n * agents reach for runs the lane in its normal mode: the build parallelism defaults to\n * `DEFAULT_BUILD_PARALLELISM` (5), and before this the console could only ever start one task.\n *\n * The wave is a run of {@link BUILD_WAVE_PLAYBOOK_REF}, the one door to `dispatchBuildWave` (the\n * CODING_AGENT tier of {@link runPlaybook}). A second door that called the wave directly was\n * rejected: it would leave no run record, so the feed and `lastCompleted` would never report it.\n *\n * The degree is read HERE, through the same `readBuildParallelism` the tier reads, so the console\n * keeps no copy of the setting. The tier reads it again when the run starts; a degree lowered to one\n * in between makes that run a single dispatch, which is still correct.\n *\n * It REFUSES BEFORE SUBMITTING. A detached run reports a refusal only later, in the feed, while the\n * one-task door refuses at once (no build plan, plan exhausted with its assembly verdict, every ready\n * task stuck). So the next task is described through the same qualifying read the one-task door uses,\n * which throws those same errors to the caller now.\n *\n * And it refuses a SECOND wave (#2208 review M1): one already running in `dispatchBuildWave`, or one\n * submitted and not yet there — a detached wave run is registered at submission, before its wave starts,\n * so two quick `wildo build run` calls would otherwise both pass the first check.\n */\n public async submitBuildWaveDetached(\n session?: CompanionExecutionSessionContext,\n /** The PERSON's door asking (#3206): it may start while a stop holds, and its admitted start ends the hold. */\n personDoor?: BuildStopReleaseDoor,\n ): Promise<BuildWaveSubmission | undefined> {\n const saasRoot = this.companionContext?.saasRoot;\n if (saasRoot === undefined) return undefined;\n const degree = readBuildParallelism(saasRoot);\n if (degree <= 1) return undefined;\n // Refused while a person's stop holds the build (#3206), unless a person's door asks.\n if (personDoor === undefined) this.buildDispatch.assertBuildNotHeldByStop();\n this.buildDispatch.assertNoBuildWaveInFlight();\n const submitted = [...this.runningDetachedRuns.values()]\n .find((run) => (getFrameworkKnowledgePlaybook(run.playbookRef)?.playbook as { executor?: MetaWorkflow_Executor } | undefined)?.executor\n === MetaWorkflow_Executor.CODING_AGENT);\n if (submitted !== undefined) throw new ApplicationBuildWaveInFlightError(submitted.startedAt);\n const nextReady = await this.buildDispatch.describeNextBuildTaskBeforeRunning();\n /*\n * Every refusal passed: only now does the person's start end the hold (#3206 review F2) — a refused `wildo build run`\n * (a wave still draining, nothing ready) keeps it. Ended BEFORE the submission, whose wave asks the hold, and put back\n * if the submission itself fails.\n */\n const released = personDoor === undefined ? undefined : this.buildDispatch.releaseBuildStopHold(personDoor);\n let submission: Awaited<ReturnType<typeof this.submitPlaybookRunDetached>>;\n try {\n submission = await this.submitPlaybookRunDetached({ playbookRef: BUILD_WAVE_PLAYBOOK_REF, ...(session ? { session } : {}) });\n } catch (error) {\n if (released !== undefined) this.buildDispatch.restoreBuildStopHold(released);\n throw error;\n }\n return {\n degree,\n runId: submission.runId,\n playbookRef: submission.playbookRef,\n nextReadyTask: { taskRef: nextReady.taskRef, objective: nextReady.objective },\n };\n }\n\n /** Drop a pending usage-limit resume (#3206): a stopped build is not restarted by a timer. */\n private cancelBuildWaveResume(why: string): void {\n const pending = this.buildWaveResume;\n if (pending === undefined) return;\n clearTimeout(pending.timer);\n this.buildWaveResume = undefined;\n this.logDebug('Cancelled the pending build resume', { resumesAt: pending.resumesAt, why });\n }\n\n /** What this companion will submit when the coding agent's usage limit ends (#2388), and what that is (#2463). */\n private buildWaveResume: { readonly resumesAt: string; readonly target: BuildResumeTarget; readonly timer: ReturnType<typeof setTimeout> } | undefined;\n\n /** What the CODING_AGENT tier run that met the usage limit stopped (#2463): see {@link deriveBuildResumeTarget}. */\n private deriveBuildResumeTargetOf(input: PlaybookRunInput, saasRoot: string | undefined): BuildResumeTarget {\n const root = input.rootRunId === undefined ? undefined : this.runningDetachedRuns.get(input.rootRunId);\n return deriveBuildResumeTarget({\n ...(input.nestedWithinChoreographyRef === undefined ? {} : { nestedWithinChoreographyRef: input.nestedWithinChoreographyRef }),\n ...(input.requestedByUserId === undefined ? {} : { requestedByUserId: input.requestedByUserId }),\n ...(root === undefined ? {} : { rootRun: { playbookRef: root.playbookRef, ...(root.instanceKey === undefined ? {} : { instanceKey: root.instanceKey }) } }),\n buildParallelism: saasRoot === undefined ? 1 : readBuildParallelism(saasRoot),\n });\n }\n\n /**\n * The pending usage-limit resume (#2388, #2463): when it fires and what it relaunches. Read by the unattended creation\n * driver (#2233), which waits for the build to resume rather than treating the paused build as nothing to do.\n */\n public readPendingBuildResume(): { readonly resumesAt: string; readonly target: BuildResumeTarget } | undefined {\n const pending = this.buildWaveResume;\n return pending === undefined ? undefined : { resumesAt: pending.resumesAt, target: pending.target };\n }\n\n /**\n * Relaunch what the usage limit paused once it has reset (#2388, #2463) — the \"resumes on its own\" half of the pause:\n * the paused tree, a wave, or one dispatch ({@link startBuildResume}). One pending resume at a time: a later reset\n * replaces an earlier one, an earlier one never shortens it, and the target that restarts more of the build is kept.\n *\n * In-process, like the hold it ends: a restart drops it, and the build then resumes the next time anyone or\n * anything starts a wave. The timer is `unref`'d so it never keeps the companion alive. If a wave is already\n * running when it fires, or the plan has nothing ready, the submission refuses and that refusal is the answer.\n */\n private scheduleBuildWaveResume(resumesAt: string, target: BuildResumeTarget): void {\n const pending = this.buildWaveResume;\n // The target that restarts MORE of the build wins, whichever reset is later (#2463): a lane paused, then a person's\n // single run paused too, must still relaunch the lane.\n const mergedTarget = mergeBuildResumeTargets(pending?.target, target);\n if (pending && Date.parse(pending.resumesAt) >= Date.parse(resumesAt)) {\n if (mergedTarget !== pending.target) this.buildWaveResume = { ...pending, target: mergedTarget };\n return;\n }\n if (pending) clearTimeout(pending.timer);\n // setTimeout overflows past 2^31 - 1 ms (~24.8 days); a reset is hours away, so the clamp only guards a bad parse.\n const delayMs = Math.min(Math.max(0, Date.parse(resumesAt) - Date.now()), 2_147_483_647);\n const timer = setTimeout(() => {\n // Read before it is cleared: a later pause may have widened the target in place (see the merge above).\n const target = this.buildWaveResume?.target ?? mergedTarget;\n this.buildWaveResume = undefined;\n /*\n * A person's stop holds the build (#3206): no resume while it does. Read as the hold's STATE when the timer fires,\n * not as a timestamp against when it was armed, so a person who stopped and then ran `wildo build run` again (which\n * releases the hold) is resumed by whichever timer is pending (#3206 review R1, R2). The submit below refuses too.\n */\n const heldSince = this.buildDispatch.readBuildStopHold();\n if (heldSince !== undefined) {\n this.logDebug('Did not resume the build after the usage limit reset: a person stopped it', { resumesAt, heldSince });\n return;\n }\n /*\n * No trace session: the one that stopped the wave has ended by now, and the resume is its own act. No creation\n * preflight either (#2229): it checks provider configuration, which the door that started the paused build\n * already checked, and a refusal here could only be logged.\n */\n this.startBuildResume(target)\n .then((runId) => this.logDebug('Resumed the build after the coding agent\\'s usage limit reset', { resumesAt, target, runId }))\n .catch((error: unknown) => this.logDebug('The build did not resume after the usage limit reset', { resumesAt, target, error: describeCaughtError(error) }));\n }, delayMs);\n timer.unref?.();\n this.buildWaveResume = { resumesAt, target: mergedTarget, timer };\n this.logDebug('The build resumes when the coding agent\\'s usage limit resets', { resumesAt, target: mergedTarget });\n }\n\n /**\n * Relaunch what the usage limit paused (#2463), once its reset has come and no person's stop holds the build. A LANE\n * target submits the paused tree again (its root, or the composite the dispatch ran under), which carries on building\n * task after task and runs the lane's later steps; a WAVE target submits the next wave; a single dispatch runs once.\n * Detached in every case, like the wave it replaces. Resolves the submitted run's id; a refusal rejects, and the\n * caller logs it, because a refusal (the root's instance still running, nothing ready) is the answer.\n */\n protected async startBuildResume(target: BuildResumeTarget): Promise<string> {\n switch (target.kind) {\n case BuildResumeTargetKind.LANE:\n return (await this.submitPlaybookRunDetached({\n playbookRef: target.playbookRef,\n ...(target.instanceKey === undefined ? {} : { instanceKey: target.instanceKey }),\n ...(target.requestedByUserId === undefined ? {} : { requestedByUserId: target.requestedByUserId }),\n })).runId;\n case BuildResumeTargetKind.WAVE:\n // At a parallelism of one by now (lowered while paused) there is no wave to submit: one dispatch runs (#2388 review F3).\n return (await this.submitBuildWaveDetached() ?? await this.submitPlaybookRunDetached({ playbookRef: BUILD_WAVE_PLAYBOOK_REF })).runId;\n case BuildResumeTargetKind.SINGLE_DISPATCH:\n return (await this.submitPlaybookRunDetached({ playbookRef: BUILD_WAVE_PLAYBOOK_REF })).runId;\n }\n }\n\n /**\n * One ROUND of a detached run. A composite that ends on its breaker is followed by the next round\n * when {@link decideCompositeRoundRelaunch} says so (#1542), which is why the round number travels.\n */\n private async submitPlaybookRoundDetached(input: PlaybookRunInput, round: number): Promise<{\n readonly accepted: false;\n readonly async: true;\n readonly runId: string;\n readonly playbookRef: string;\n readonly note: string;\n }> {\n const startedAt = new Date().toISOString();\n const isComposite = Boolean((getFrameworkKnowledgePlaybook(input.playbookRef)?.playbook as { method?: { choreography?: unknown } } | undefined)?.method?.choreography);\n let tasksLandedBefore: number | undefined;\n /*\n * OPENED before it is answered: the caller must name the run before awaiting it, and the run's\n * only name is the execution id the actor plane assigns (#1358). So the execution is opened here\n * — which is also where an unreachable store refuses, as a 4xx/5xx on THIS request rather than a\n * run that silently never happened — and the work is completed detached against the opened ids.\n * Until 2026-09-20 this minted its own id and handed it in; a submission and its row now share one.\n */\n // Counted for the restart drain from BEFORE the open (#3204 second review L1): no drained marker between the start and the chain.\n const releaseOpeningCount = this.beginDrainCounted();\n const opened = await this.actorsSystem.openActorExecution(this.buildActorExecutionRequest(input))\n .catch(async (error: unknown) => {\n releaseOpeningCount();\n const subject = this.resolveExclusiveSubject(input);\n throw subject === undefined ? error : await this.nameTheRunHoldingTheSubject(error, MetaWorkflowsExclusiveSubject.COMPOSITE, subject, input.session);\n });\n const runId = opened.executionId;\n try {\n // Registered BEFORE the run is started, so a caller that polls immediately cannot see a gap in\n // which its own submission is reported nowhere.\n this.runningDetachedRuns.set(runId, {\n runId,\n playbookRef: input.playbookRef,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n startedAt,\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n ...(input.conversationId ? { conversationId: input.conversationId } : {}),\n });\n this.syncPlaybookRunHeartbeat();\n } catch (error) {\n // Never leak the opening count (second review L4): a leaked count would keep the companion from ever draining.\n releaseOpeningCount();\n throw error;\n }\n // One RUN for the restart drain (#3204) from start to settle: the record and the chain's next round come after the work.\n // The chain's count starts before `work` is called, so releasing the opening count inside it leaves no gap.\n void this.whileDrainCounted(() => (releaseOpeningCount(), this.actorsSystem)\n .completeActorExecution(opened, async () => {\n // Where the build stood BEFORE the round, so its end can tell a round that moved from one that did not.\n // Only where a relaunch could read it (#1639): a dry run or a posture that never relaunches pays nothing here.\n if (isComposite && compositeRoundMayRelaunch({ posture: APPLICATION_CREATION_AUTONOMY_POSTURE, dryRun: input.dryRun === true })) {\n tasksLandedBefore = (await this.traceRunPhase(input.session, 'build-progress-baseline',\n () => this.buildDispatch.resolveBuildExecutionProgress().catch(() => undefined)))?.landedTasks;\n }\n return this.executePlaybookRun({ ...input, runId });\n }, input.session, this.playbookRunOptionsFor(() => runId))\n .then(async (result) => {\n this.runningDetachedRuns.delete(runId);\n this.syncPlaybookRunHeartbeat();\n /*\n * A SUSPENSION is not a completion. The run stopped to ask and is waiting for a person; the\n * resume route carries its own handle, which is not this submission's `runId`.\n */\n const suspended = typeof result === 'object' && result !== null\n && (result as { status?: unknown }).status === Workbench_PlaybookRunOutcomeStatus.AWAITING_CREATOR_INPUT\n ? (result as unknown as Record<string, unknown>)\n : undefined;\n this.lastCompletedDetachedRuns.set(playbookInstanceId(input.playbookRef, input.instanceKey), {\n runId,\n playbookRef: input.playbookRef,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n startedAt,\n finishedAt: new Date().toISOString(),\n ok: true,\n result,\n // The same measurement the row carries (#1507), so a read that falls back to this record when\n // the actor plane is unreachable does not report a measured run as unmeasured.\n ...this.detachedRecordMeasurement(result, (measurement) => readPlaybookRunMeasurement(summarizePlaybookRunResult(result, measurement))),\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n ...(input.conversationId ? { conversationId: input.conversationId } : {}),\n ...(suspended === undefined ? {} : {\n awaitingCreatorInput: {\n runId: String(suspended['runId']),\n family: String(suspended['family']),\n round: Number(suspended['round']),\n },\n }),\n });\n await this.continueCompositeChain(input, round, runId, tasksLandedBefore, result);\n })\n .catch((error: unknown) => {\n this.runningDetachedRuns.delete(runId);\n this.syncPlaybookRunHeartbeat();\n this.lastCompletedDetachedRuns.set(playbookInstanceId(input.playbookRef, input.instanceKey), {\n runId,\n playbookRef: input.playbookRef,\n ...(input.instanceKey ? { instanceKey: input.instanceKey } : {}),\n startedAt,\n finishedAt: new Date().toISOString(),\n ok: false,\n /*\n * The run's recorded reason, read back by `wildo creation why`. `describeCaughtError` names an\n * engine error's target (`not_found (agentRef: …)`) where `.message` is undefined on that plain\n * object and a JSON dump carries its payload as well (#2350).\n */\n error: describeCaughtError(error),\n // The same reading as the row's (#3235): a run the environment took is interrupted, not failed.\n ...(isEnvironmentalPlaybookFailure(error) ? { interruptedByEnvironment: true as const } : {}),\n ...(() => {\n const measurement = this.measurementOfFailure(error, runId);\n this.failedRunMeasurements.delete(runId);\n return measurement ? { measurement } : {};\n })(),\n ...(input.session ? { traceSessionId: input.session.sessionId } : {}),\n ...(input.conversationId ? { conversationId: input.conversationId } : {}),\n });\n }));\n return {\n accepted: false,\n async: true,\n runId,\n playbookRef: input.playbookRef,\n note: `Submitted as runId ${runId} — the id of its execution on the actor plane. Poll GET /playbooks/runs `\n + 'and MATCH THAT ID: it is in `runningDetached` while the run executes, then in `lastCompleted` with the '\n + 'outcome. `lastCompleted` answers ONE record per playbook ref, the most recent, so an entry carrying a '\n + \"DIFFERENT runId is a previous run's outcome and says nothing about yours. Validation failures (an \"\n + 'unanswered elicitation, an ineligible playbook) surface there too, not as an HTTP error. Both fields are '\n + 'read from the actor plane, so they survive a companion restart: a run the restart interrupted is in '\n + '`lastCompleted` with `ok: false` and says the host stopped. After a restart `result` carries the '\n + \"run's summary (accepted, judge verdict) rather than the full envelope, which only the process that ran it holds. \"\n + '(`running` lists the composites holding a single-flight subject, one per instance, and never names an ordinary run.)',\n };\n }\n\n /**\n * After a detached COMPOSITE settles: start its next round, or record why the chain ends (#1542).\n *\n * Recorded either way on the run's settled record as `chain`, so \"why did the build stop here\" has an\n * answer on the same read that says it stopped. A relaunch is a new submission like any other — it\n * opens its own execution, appears in `runningDetached`, and is refused by its instance's single-flight\n * guard like a person's would be. Best-effort: nothing here may turn a settled run into a failed one.\n */\n private async continueCompositeChain(\n input: PlaybookRunInput,\n round: number,\n runId: string,\n tasksLandedBefore: number | undefined,\n result: unknown,\n ): Promise<void> {\n const composite = result as { choreographed?: unknown; stoppedBecause?: PlaybookChoreographyStopReason; landed?: readonly string[] } | null;\n if (composite?.choreographed !== true || composite.stoppedBecause === undefined) return;\n try {\n // Read only when the decision will: a round that concluded, chose to stop or found nothing eligible never looks (#1639).\n const readsProgress = compositeRoundRelaunchReadsBuildProgress({\n posture: APPLICATION_CREATION_AUTONOMY_POSTURE,\n dryRun: input.dryRun === true,\n stoppedBecause: composite.stoppedBecause,\n });\n const buildProgressAfter = readsProgress ? await this.buildDispatch.resolveBuildExecutionProgress().catch(() => undefined) : undefined;\n const decision = decideCompositeRoundRelaunch({\n posture: APPLICATION_CREATION_AUTONOMY_POSTURE,\n dryRun: input.dryRun === true,\n stoppedBecause: composite.stoppedBecause,\n round,\n familiesLanded: composite.landed?.length ?? 0,\n ...(tasksLandedBefore === undefined ? {} : { tasksLandedBefore }),\n ...(buildProgressAfter === undefined ? {} : { buildProgressAfter }),\n });\n const instanceId = playbookInstanceId(input.playbookRef, input.instanceKey);\n const record = this.lastCompletedDetachedRuns.get(instanceId);\n if (record?.runId === runId) this.lastCompletedDetachedRuns.set(instanceId, { ...record, chain: { round, decision } });\n this.logDebug('Composite round settled', { playbookRef: input.playbookRef, round, decision });\n if (decision !== CompositeRoundRelaunchDecision.RELAUNCH) return;\n /*\n * The subject is RELEASED between rounds and re-taken here, deliberately (#1610). Holding it across the\n * gap would need a lease with no run behind it, which a restart could strand. What can start in the gap\n * is only another run of the SAME instance (a different composite or instance never needed the lease):\n * that run is the same piece of work, so it continues the chain, and this relaunch is refused 409 and\n * logged below as the end of this chain. A person's run is never refused for a chain's sake.\n */\n await this.submitPlaybookRoundDetached(input, round + 1);\n } catch (error) {\n this.logDebug('Composite round relaunch failed (non-fatal)', { playbookRef: input.playbookRef, round, error: error instanceof Error ? error.message : JSON.stringify(error)?.slice(0, 500) });\n }\n }\n\n /**\n * Every run waiting for its creator to answer — a THIRD state, and neither of the two above.\n *\n * `readRunsInFlight` answers `{ running, interrupted }`: the in-process marker for a choreography\n * executing right now, and the checkpoints of one that stopped mid-way. A SUSPENDED run is neither.\n * It is healthy, it has written nothing — the clarification check runs before the artifact call —\n * and it is waiting on a decision only a person can make. It appeared in neither read, so nothing\n * could name it once its creator's client was gone.\n *\n * Kept as its own method rather than folded into `readRunsInFlight` for that reason: merging the\n * three would say a suspended run is a kind of in-flight one, and the difference is exactly what a\n * reader needs — one of the three is waiting for THEM.\n */\n public async readSuspendedRuns(session?: CompanionExecutionSessionContext): Promise<{\n readonly suspended: readonly SuspendedPlaybookRunSummary[];\n readonly unreadable: readonly string[];\n }> {\n // The executions of the meta-workflows system that are WAITING (#1360) — durable rows, so a\n // companion restart loses none of them, which the checkpoint directory also gave and the run\n // records beside it never did.\n const waiting = await this.actorsSystem.listSuspendedActorExecutions(META_WORKFLOWS_SYSTEM_REF, session);\n const suspended: SuspendedPlaybookRunSummary[] = [];\n const unreadable: string[] = [];\n for (const row of waiting) {\n const parsed = PlaybookRunSuspensionCheckpointSchema.safeParse(row.checkpoint?.context);\n if (!parsed.success || !row.suspension) {\n // REPORTED, not skipped: a waiting run nothing can resume is a fact a reader must be able to see.\n unreadable.push(row._id);\n continue;\n }\n const answered = new Set(parsed.data.priorAnswers.map((answer) => answer.ref));\n suspended.push({\n runId: row._id,\n playbookRef: parsed.data.playbookRef,\n family: parsed.data.family,\n suspendedAt: row.suspension.suspendedAt,\n round: parsed.data.round,\n dryRun: parsed.data.dryRun,\n // The checkpoint stays cumulative; an answer form needs only questions still outstanding.\n requests: parsed.data.requests.filter((request) => !answered.has(request.ref)),\n // Who alone may answer it (#1751), so a door with no person can say so instead of offering an answer.\n ...(row.suspension.route?.kind === HumanDecision_RouteKind.OWNER && row.suspension.requester?.kind === HumanDecision_RequesterKind.USER\n ? { routedToUserId: row.suspension.requester.ref }\n : {}),\n });\n }\n suspended.sort((left, right) => right.suspendedAt.localeCompare(left.suspendedAt));\n unreadable.sort();\n return { suspended, unreadable };\n }\n\n private modelCallBreaker = { hour: '', calls: 0, providerBudgetNoted: false };\n\n private assertPlaybookModelCallBreaker(): void {\n if (!this.modelCallBreaker.providerBudgetNoted) {\n this.modelCallBreaker.providerBudgetNoted = true;\n this.logger.warn(\n 'Playbook lane model calls have NO budget limit in the companion — only two runaway circuit '\n + 'breakers: 1000 calls/hour (WILDO_PLAYBOOK_MODEL_CALL_HOURLY_BREAKER) and 500 USD of reported spend '\n + 'per hour (WILDO_PLAYBOOK_SPEND_HOURLY_BREAKER_USD). Set real spend limits at the model provider account.',\n );\n }\n const hour = new Date().toISOString().slice(0, 13);\n if (this.modelCallBreaker.hour !== hour) this.modelCallBreaker = { ...this.modelCallBreaker, hour, calls: 0 };\n const configured = Number(process.env['WILDO_PLAYBOOK_MODEL_CALL_HOURLY_BREAKER']);\n const breaker = Number.isSafeInteger(configured) && configured > 0 ? configured : 1000;\n if (this.modelCallBreaker.calls >= breaker) {\n throw new Error(\n `Playbook-lane runaway breaker tripped: ${this.modelCallBreaker.calls} model call(s) within the current hour `\n + `(breaker ${breaker}). This detects an infinite loop, not a budget — if this volume is intended, raise `\n + 'WILDO_PLAYBOOK_MODEL_CALL_HOURLY_BREAKER or restart the companion to reset the in-memory counter.',\n );\n }\n this.modelCallBreaker.calls += 1;\n }\n\n /**\n * The clarification channel's model seam — the same agent and provider as the artifact pass, so a\n * question is asked by the thing that would have had to guess.\n */\n private buildClarificationPort(): { ask: PlaybookStructuredGenerationPort['generate'] } {\n const port = this.buildGenerationPort();\n return { ask: (request) => port.generate(request) };\n }\n\n /**\n * The generation port for THIS playbook's artifact — deliberated when it declares a\n * panel, ordinary otherwise.\n *\n * A SUBSTITUTION at the port, deliberately, rather than a new executor or a new run\n * shape. Everything downstream of `generate` — the `_core` validator, the\n * findings-fed retry, the renderer, the landing, the judge — is identical either\n * way, because what a panel changes is how the value was ARRIVED AT, not what it is.\n * `runPlaybook` never branches on `executor` (only choreography children do), so a\n * `DELIBERATION_PANEL` member would have named a capability nothing dispatches.\n *\n * Cost is real and proportional: `candidateCount` generations, then a rubric pass,\n * then reviewers × candidates per round, then synthesis. Every one of those calls\n * goes through `buildGenerationPort` or the deliberation agents, so the lane's\n * runaway breaker still counts them.\n */\n private buildArtifactGenerationPort(playbook: MetaWorkflowPlaybook): PlaybookStructuredGenerationPort {\n const panel = playbook.method?.deliberation;\n if (!panel) return this.buildGenerationPort();\n\n const base = this.buildGenerationPort();\n return {\n generate: async ({ prompt, schema, label, purpose }) => {\n /*\n * A CORRECTION is never deliberated (#2219 review): it is a short patch against an answer already\n * chosen, and N candidate patches each told to differ from the obvious reading would argue against\n * the correction itself, at N times the cost. Nor is one PART of an artifact written in parts (#3204):\n * a panel judges a whole artifact, not one of its sections apart from the rest.\n */\n if (purpose === PlaybookGenerationPurpose.CORRECTION || purpose === PlaybookGenerationPurpose.ARTIFACT_PART) {\n return base.generate({ prompt, schema, label, purpose });\n }\n /*\n * Candidates are generated through the SAME constrained port, so each is\n * already schema-valid before the panel sees it. The only variation is an\n * appended instruction to take a genuinely different position — a panel\n * handed N paraphrases of one answer has nothing to argue about, and would\n * burn the full cost to rediscover the first candidate.\n */\n const findings: string[] = [];\n const produce = async (index: number, total: number): Promise<unknown> => {\n const result = await base.generate({\n prompt: [\n prompt,\n '',\n `# You are producing candidate ${index + 1} of ${total}`,\n 'Other candidates are being produced independently against this same brief. Take a '\n + 'position that genuinely DIFFERS from the most obvious reading — a different '\n + 'trade-off, a different priority order — and commit to it fully. State what your '\n + 'choice makes worse. A candidate indistinguishable from the obvious answer wastes '\n + 'a seat at the table.',\n ].join('\\n'),\n schema,\n label: `${label}:candidate-${index + 1}`,\n });\n if (result.output === undefined) findings.push(...(result.generationFindings ?? []));\n return result.output;\n };\n\n /*\n * At once (#3204): each candidate is produced independently against the same brief (its own prompt says so), so\n * nothing one says can reach another. Produced one after another, the three candidates of the placement plan were\n * most of its 19 minutes on the reference run's critical path. Kept in index order, so the surviving candidates\n * take their seats in the order they were asked for, whichever answers first. One that throws rejects the batch at\n * once while its siblings finish (and are paid for): the run's ordinary retry handles it, as it did a throw in\n * the sequential loop.\n */\n const candidates = (await Promise.all(Array.from({ length: panel.candidateCount }, (_, index) => produce(index, panel.candidateCount))))\n .filter((value) => value !== undefined);\n\n /*\n * Fewer than two survivors is NOT quietly downgraded to a single generation.\n * The artifact would then carry a panel's authority over a decision no panel\n * ever saw — the worst outcome available here. Returning `undefined` with the\n * findings hands it to the run's ordinary retry, which is the mechanism that\n * already exists for \"the provider did not produce a usable answer\".\n */\n if (candidates.length < 2) {\n return {\n output: undefined,\n generationFindings: [\n `Deliberated generation needs at least 2 schema-valid candidates and produced `\n + `${candidates.length} of ${panel.candidateCount}. The panel was not convened.`,\n ...findings,\n ],\n };\n }\n\n let cursor = 0;\n const deliberated = await this.structuredDeliberation.run({\n /*\n * As many seats as candidates SURVIVED: the panel asks its producer for `candidateCount` initial candidates, so\n * a panel of three with one dropped would otherwise seat `undefined` as the third (#3204 review P1).\n */\n panel: { ...panel, candidateCount: candidates.length },\n briefContext: prompt,\n label,\n producer: {\n agentRef: META_WORKFLOWS_STRUCTURED_ARTIFACT_GENERATOR_AGENT_REF,\n produceInitial: async () => candidates[cursor++],\n produceRevision: async (parent, revisionPrompt) => {\n const revised = await base.generate({\n prompt: [prompt, '', '# Revise this candidate', JSON.stringify(parent, null, 2), '', revisionPrompt].join('\\n'),\n schema,\n label: `${label}:revision`,\n });\n // A failed revision must not collapse the round; keeping the parent means\n // the panel re-scores what it already had rather than losing a candidate.\n return revised.output ?? parent;\n },\n },\n });\n return { output: deliberated.winner };\n },\n };\n }\n\n /**\n * ONE schema-constrained model call outside any run — the interview-answer proposer (#2129). It is the lane's\n * own generation port, so the call reaches the same generator agent and is counted by the same runaway\n * breaker as every run's calls; a second door to the model would be a second, uncounted one.\n */\n public generateStructured(input: Parameters<PlaybookStructuredGenerationPort['generate']>[0]): ReturnType<PlaybookStructuredGenerationPort['generate']> {\n return this.buildGenerationPort().generate(input);\n }\n\n private buildGenerationPort(): PlaybookStructuredGenerationPort {\n return {\n generate: async ({ prompt, schema, label }) => {\n this.assertPlaybookModelCallBreaker();\n this.spendMeter.assertSpendRateBelowRunawayBreaker();\n const invocation: FlowsActors_Agent_Invocation<\n typeof LLMProvider_GenerateStructuredInputSchema,\n typeof LLMProvider_GenerateStructuredOutputSchema\n > = {\n agentRef: META_WORKFLOWS_STRUCTURED_ARTIFACT_GENERATOR_AGENT_REF,\n initiator: {},\n invocationContext: [],\n // `includeRejectedAnswer`: a rejected answer comes back as text, so the retry can correct it in place\n // instead of redrafting blind (#1143). It is a payload like any answer, never telemetry or a log line.\n input: { prompt, schema, includeRejectedAnswer: true },\n output: { object: undefined },\n executionContext: {},\n artifactBindings: [],\n };\n const traceContext: AgentTraceContext = { label, attributes: { label } };\n const response = await this.agents.invokeAgent(invocation, traceContext);\n /*\n * The provider validates the model's answer against the SAME family schema and discards the\n * whole object on any violation, so a near-miss arrives here as `object: undefined` with the\n * real reason parked in `structuredGenerationFailure`. Dropping it left the retry with nothing\n * but \"<root>: received undefined\" — measured live on wonder-crm's build-decompose: a complete\n * 27.7KB plan rejected for 8 mis-cased `resourceRef` values, then two blind retries. Project\n * the provider's own paths so the findings-fed retry works for provider-side rejections\n * exactly as it does for the runtime validator's.\n *\n * ⚠️ IT RIDES ON `executionContext`, NOT ON THE INVOCATION. `invokeAgent` REBUILDS its return\n * as `{ ...request, output, executionContext }` — the caller's own request plus its answer —\n * so a provider-learned fact reaches a caller only through that envelope, beside `usage` and\n * `transport`. The first version of this read cast `response` itself and was therefore INERT:\n * the key it named cannot exist on the returned shape, so `generationFindings` was always\n * empty and every provider-side rejection retried blind. It read as the fix, carried this\n * comment describing the defect it did not close, and was found on 2026-08-29 by a\n * `document-facts` run whose retry prompt still said \"<root>: expected object, received\n * undefined\" while the companion log printed the four exact paths the model had got wrong.\n *\n * READ AND RENDERED BY THE ENGINE'S OWN FUNCTIONS, never by a shape written out here. This site\n * held a hand-written cast and a hand-written hint list, and each field the engine added to an\n * issue afterwards reached the engine's renderer and not this copy — the paths in 2026-08-29,\n * `expected` in 2026-09-13, a `custom` refinement's message in 2026-09-16, every one of them\n * costing live runs while the two formatters sat forty lines apart in different packages.\n * `readStructuredGenerationFailure` parses against the schema and\n * `describeStructuredValidationIssue` is THE issue renderer, so a fourth field arrives here for\n * free.\n */\n const failure = readStructuredGenerationFailure(response.executionContext);\n /*\n * The suffix is this caller's framing rather than the issue's: these findings are fed BACK TO THE\n * MODEL as the retry's corrections, and a model that is told only \"sharedResponsibility: custom\n * (…)\" cannot tell our runtime validator's refusal from the provider's.\n */\n const generationFindings = (failure?.validationIssues ?? []).map(\n (issue) => `${describeStructuredValidationIssue(issue)} — rejected by the provider's schema validation`,\n );\n const rejectedAnswer = (response.output as { rejectedAnswer?: unknown } | undefined)?.rejectedAnswer;\n return {\n output: (response.output as { object?: unknown } | undefined)?.object,\n ...(typeof rejectedAnswer === 'string' ? { rejectedAnswer } : {}),\n ...(generationFindings.length > 0\n ? { generationFindings }\n : failure?.message\n ? { generationFindings: [`<root>: ${failure.message}`] }\n : {}),\n };\n },\n };\n }\n}\n"]}
|