@wildo-ai/dev-companion 1.1.2 → 1.1.4
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/__tests__/asset-noop.d.ts.map +1 -1
- package/dist/esm/__tests__/chdir-dogfood-app.setup.d.ts.map +1 -1
- package/dist/esm/__tests__/internal-test-view.d.ts.map +1 -1
- package/dist/esm/brand/models/logo-creative-brief.schemas.d.ts.map +1 -1
- package/dist/esm/brand/models/logo-generation.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/brand/models/logo-judge.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/brand/models/logo-judge.actors-system.definitions.js +9 -3
- package/dist/esm/brand/models/logo-judge.actors-system.definitions.js.map +1 -1
- package/dist/esm/brand/models/logo-judge.schemas.d.ts.map +1 -1
- package/dist/esm/brand/services/brand-accept.companion.service.d.ts +3 -24
- package/dist/esm/brand/services/brand-accept.companion.service.d.ts.map +1 -1
- package/dist/esm/brand/services/brand-accept.companion.service.js +10 -48
- package/dist/esm/brand/services/brand-accept.companion.service.js.map +1 -1
- package/dist/esm/brand/services/logo-deliberation.companion.service.d.ts.map +1 -1
- package/dist/esm/brand/services/logo-deliberation.companion.service.js +2 -8
- package/dist/esm/brand/services/logo-deliberation.companion.service.js.map +1 -1
- package/dist/esm/brand/services/logo-generation.companion.service.d.ts +6 -3
- package/dist/esm/brand/services/logo-generation.companion.service.d.ts.map +1 -1
- package/dist/esm/brand/services/logo-generation.companion.service.js +11 -12
- package/dist/esm/brand/services/logo-generation.companion.service.js.map +1 -1
- package/dist/esm/brand/utils/derived-brand-assets.d.ts +0 -1
- package/dist/esm/brand/utils/derived-brand-assets.d.ts.map +1 -1
- package/dist/esm/brand/utils/derived-brand-assets.js +1 -2
- package/dist/esm/brand/utils/derived-brand-assets.js.map +1 -1
- package/dist/esm/brand/utils/stage-brand-candidate.d.ts +7 -9
- package/dist/esm/brand/utils/stage-brand-candidate.d.ts.map +1 -1
- package/dist/esm/brand/utils/stage-brand-candidate.js +8 -11
- package/dist/esm/brand/utils/stage-brand-candidate.js.map +1 -1
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +52 -2
- 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 +45 -0
- package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +45 -5
- 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 +180 -9
- package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts +12 -22
- package/dist/esm/claude-cli/services/git-change-set.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/git-change-set.companion.service.js +151 -82
- package/dist/esm/claude-cli/services/git-change-set.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts +30 -4
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js +30 -4
- package/dist/esm/claude-cli/services/research-agent-dispatch.companion.service.js.map +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js +1 -1
- package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
- package/dist/esm/code-compliance-check/check-label-placeholder-contract.companion.d.ts.map +1 -1
- package/dist/esm/code-compliance-check/check-raw-feature-id-literals.companion.d.ts.map +1 -1
- package/dist/esm/companion-api/companion-api.schemas.d.ts +57 -57
- package/dist/esm/companion-api/companion-api.schemas.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion-i18n-api-contract.utils.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts +90 -0
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.d.ts.map +1 -0
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.js +98 -0
- package/dist/esm/companion-api/controllers/companion-token-floor.policy.js.map +1 -0
- package/dist/esm/companion-api/controllers/companion.controller.d.ts +32 -5
- package/dist/esm/companion-api/controllers/companion.controller.d.ts.map +1 -1
- package/dist/esm/companion-api/controllers/companion.controller.js +126 -41
- package/dist/esm/companion-api/controllers/companion.controller.js.map +1 -1
- package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts +8 -1
- package/dist/esm/core/auth/companion-auth-floor.companion.service.d.ts.map +1 -1
- package/dist/esm/core/auth/companion-auth-floor.companion.service.js +8 -1
- package/dist/esm/core/auth/companion-auth-floor.companion.service.js.map +1 -1
- package/dist/esm/core/catalogs/catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/catalog-context.factory.models.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/aggregate-offer-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/aggregate-rating-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/article-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/blog-posting-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/breadcrumb-list-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/faq-page-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/offer-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/organization-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/product-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/review-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts +34 -0
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.d.ts.map +1 -0
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js +65 -0
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-boundary.shared.js.map +1 -0
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts +11 -1
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/schema-org-catalog-context.shared.js.map +1 -1
- package/dist/esm/core/catalogs/schema-org/software-application-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/schema-org/website-catalog-context.factory.d.ts.map +1 -1
- package/dist/esm/core/catalogs/structured-data-catalog-audit.service.d.ts.map +1 -1
- package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js +10 -2
- package/dist/esm/core/catalogs/structured-data-catalog-audit.service.js.map +1 -1
- package/dist/esm/core/config/primary-language.companion.utils.d.ts.map +1 -1
- package/dist/esm/core/context/companion-context.d.ts.map +1 -1
- package/dist/esm/core/context/companion-package-loaders.companion.d.ts.map +1 -1
- package/dist/esm/core/inject/models/container.d.ts.map +1 -1
- package/dist/esm/core/inject/models/container.js +0 -7
- package/dist/esm/core/inject/models/container.js.map +1 -1
- package/dist/esm/core/inject/models/service-types.d.ts +0 -1
- package/dist/esm/core/inject/models/service-types.d.ts.map +1 -1
- package/dist/esm/core/inject/models/service-types.js +0 -1
- package/dist/esm/core/inject/models/service-types.js.map +1 -1
- package/dist/esm/core/introspection/behaviors/companion-introspection-behavior-definitions.d.ts.map +1 -1
- package/dist/esm/core/introspection/models/companion-introspection.models.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js +8 -4
- package/dist/esm/core/introspection/resources/creation-plane-dispatch.custom-impl.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/creation-plane-projection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-notifier.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/resources/introspection-resource-source.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/companion-introspection-behavior-registry.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.js +42 -1
- package/dist/esm/core/introspection/services/companion-introspection.companion.service.js.map +1 -1
- package/dist/esm/core/introspection/services/introspection-derivation-state.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-state.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/introspection-source-watcher.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/application-domain-model.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/assertions.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/asset-noop-hooks.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/asset-noop-register.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/brand-prompt-renderer.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/chart-registration-refs.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +3 -2
- package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-child.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/companion-introspection-module-exports.utils.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts +14 -5
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js +14 -5
- package/dist/esm/core/introspection/subprocess/compliance-primary-facts.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/definition-specifications.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/expert-persona-brief.renderer.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/family-aspects.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/frontend-labels-needed-info.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/market-context-block.builder.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/market-prompt-renderer.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts +38 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.d.ts.map +1 -1
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js +143 -19
- package/dist/esm/core/introspection/subprocess/openapi-generation-input.behavior.js.map +1 -1
- package/dist/esm/core/introspection/subprocess/specification-artifacts.behavior.d.ts.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts +23 -0
- package/dist/esm/core/lock/wildo-saas-lock.companion.service.d.ts.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.companion.service.js +23 -0
- package/dist/esm/core/lock/wildo-saas-lock.companion.service.js.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.models.d.ts.map +1 -1
- package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts +4 -4
- package/dist/esm/core/lock/wildo-saas-lock.schemas.d.ts.map +1 -1
- package/dist/esm/core/runtime/companion-startup-assembly.d.ts.map +1 -1
- package/dist/esm/core/runtime/companion-startup-assembly.js.map +1 -1
- package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/models/companion-runtime.models.d.ts.map +1 -1
- package/dist/esm/core/runtime/services/start-companion-application.service.d.ts +16 -13
- package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
- package/dist/esm/core/runtime/services/start-companion-application.service.js +70 -45
- package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
- package/dist/esm/core/runtime/utils/companion-local-signing-key.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +9 -2
- package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
- package/dist/esm/core/runtime/utils/companion-workbench-topology.d.ts.map +1 -1
- package/dist/esm/core/runtime/utils/platform-core-domain-modules.companion.d.ts.map +1 -1
- package/dist/esm/core/specifications/chart-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/composite-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/cross-registry-rendering.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/execution-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/feature-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/flows-actors-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/frontend-component-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/full-custom-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/guidance-flow-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/milestone-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/non-composite-view-specification-context.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/onboarding-element-rendering.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/onboarding-view-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/product-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/resource-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/role-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/specification-context-factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/specification-context-factory.models.d.ts.map +1 -1
- package/dist/esm/core/specifications/specification-context-factory.shared.d.ts.map +1 -1
- package/dist/esm/core/specifications/system-email-template-specification-context.factory.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/composite-view/composite-view-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/composite-view/composite-view-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/composite-view/composite-view-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/composite-view/composite-view-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/feature/feature-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/feature/feature-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/feature/feature-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/feature/feature-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/frontend-component/frontend-component-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/frontend-component/frontend-component-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/frontend-component/frontend-component-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/frontend-component/frontend-component-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/guidance-flow-specification/guidance-flow-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/milestone/milestone-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/milestone/milestone-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/milestone/milestone-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/milestone/milestone-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/non-composite-view/non-composite-view-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/onboarding-view-specification/onboarding-view-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/product/product-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/product/product-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/product/product-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/product/product-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/resource/resource-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/resource/resource-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/resource/resource-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/resource/resource-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/role/role-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/role/role-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/role/role-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/role/role-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/system-email-template/system-email-template-all-information.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/system-email-template/system-email-template-custom-implementation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/system-email-template/system-email-template-development-usage-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/templates/system-email-template/system-email-template-translation-context.template.d.ts.map +1 -1
- package/dist/esm/core/specifications/validate-resource-field-completeness.d.ts.map +1 -1
- package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.d.ts.map +1 -1
- package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js +4 -4
- package/dist/esm/core/traceability/companion-agent-call-trace-sink.companion.service.js.map +1 -1
- package/dist/esm/core/traceability/companion-traceability.models.d.ts.map +1 -1
- package/dist/esm/core/traceability/companion-traceability.service.d.ts.map +1 -1
- package/dist/esm/core/utils/atomic-write.utils.d.ts.map +1 -1
- package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js +13 -3
- package/dist/esm/deliberations/models/deliberation-agents.actors-system.definitions.js.map +1 -1
- package/dist/esm/deliberations/services/deliberation.companion.service.d.ts.map +1 -1
- package/dist/esm/deliberations/services/deliberation.companion.service.js +0 -5
- package/dist/esm/deliberations/services/deliberation.companion.service.js.map +1 -1
- package/dist/esm/deliberations/services/structured-deliberation.companion.service.d.ts.map +1 -1
- package/dist/esm/deliberations/services/structured-deliberation.companion.service.js +0 -2
- package/dist/esm/deliberations/services/structured-deliberation.companion.service.js.map +1 -1
- package/dist/esm/deliberations/utils/load-committed-expert-agents.d.ts.map +1 -1
- package/dist/esm/email/models/email-template.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/email/models/email-template.actors-system.definitions.js +4 -2
- package/dist/esm/email/models/email-template.actors-system.definitions.js.map +1 -1
- package/dist/esm/email/services/email-spec-context-loader.companion.service.d.ts +1 -1
- package/dist/esm/email/services/email-spec-context-loader.companion.service.d.ts.map +1 -1
- package/dist/esm/email/services/email-spec-context-loader.companion.service.js +1 -1
- package/dist/esm/email/services/email-spec-context-loader.companion.service.js.map +1 -1
- package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
- package/dist/esm/email/services/email-template.companion.service.js +23 -1
- package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
- package/dist/esm/email/utils/email-labels-file-source.utils.d.ts.map +1 -1
- package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.d.ts.map +1 -1
- package/dist/esm/executions/services/companion-executions.companion.service.js +15 -2
- package/dist/esm/executions/services/companion-executions.companion.service.js.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js +7 -3
- package/dist/esm/expert-personas/models/expert-persona-critique.actors-system.definitions.js.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js +11 -5
- package/dist/esm/expert-personas/models/expert-persona-derivation.actors-system.definitions.js.map +1 -1
- package/dist/esm/expert-personas/models/expert-persona-derivation.schemas.d.ts.map +1 -1
- package/dist/esm/expert-personas/services/expert-persona.companion.service.d.ts +9 -24
- 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 +11 -60
- package/dist/esm/expert-personas/services/expert-persona.companion.service.js.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_ACTIVITY_BAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_COMMAND_MENU.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_CONTROL_PANEL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_MENUBAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_NAVIGATION_BACK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_NOTIFICATION_CENTER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_ACTION_BUTTON.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_QUICK_SWITCHER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_SIDEBAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_STATUS_BAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_TOOLBAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_USER_DROPDOWN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APPLICATION_LEVEL_UTILITY_PANEL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_APPEARANCE_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_BILLING_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_ERROR_BOUNDARY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_HOME.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_INVITATIONS_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_MAIN_CONTAINER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_ROUTER_ERROR_BOUNDARY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_SECURITY_SETTINGS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/APP_LAYOUTS_SETTINGS_HUB.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_CHART_WIDGET.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_EXECUTION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_FLOWS_ACTORS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/HIGH_LEVEL_VIEWS_NOT_FOUND.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_ACTION_BAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ACTOR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_APPROVAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_ARTIFACT_BROWSER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CHAIN_OF_THOUGHT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CODE_BLOCK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONFIRMATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONTEXT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_CONVERSATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_DECISION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_PLAN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_EXECUTION_STREAM.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_FLOW_EXECUTION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_FLOW_NODE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_INLINE_CITATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_MESSAGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_MODEL_SELECTOR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_OPEN_IN_CHAT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_PLAN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_PROMPT_INPUT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_SYSTEM_CATALOG.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_DETAIL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_TASK_MEMORY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_AI_WEB_PREVIEW.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_INVOICE_HISTORY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PORTAL_LINK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PRICING_TABLE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_SUBSCRIPTION_STATUS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_USAGE_DASHBOARD.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BREADCRUMB.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BUTTON.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CAROUSEL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CELEBRATION_OVERLAY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_COLOR_INPUT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_COMMAND.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_CONTENT_SECTION_CONTAINER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DIALOG.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BIGDECIMAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_BOOLEAN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_CODE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_DURATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_AUDIO.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_DOCUMENT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_GALLERY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_IMAGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_FILE_VIDEO.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_MONEY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_PHONE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_BIGDECIMAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_MONEY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DISPLAY_FIELD_RANGE_NUMBER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_DRAWER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_ERROR_DISPLAY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_LOCK_BADGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FEATURE_UNAVAILABLE_PROMPT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FILE_UPLOAD.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_BOOLEAN.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_CODE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_FILE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_PHONE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_FIELD_STRING.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_FORM_MESSAGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_IMAGE_CROP.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_LOADING_OVERLAY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_LOADING_SPINNER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_OPERATIONS_CONFIRM_CRITICAL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_OVERLAY_CONTAINER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_PAGINATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_SELECT_MULTIPLE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_SHEET.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/LOW_LEVEL_SIDEBAR.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_AUTH_CALLBACK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ENROLLMENT_REQUIRED.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts +39 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.d.ts.map +1 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js +39 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_FILE_UPLOAD_GRANT.en.js.map +1 -0
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MAGIC_LINK_VERIFY.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_MFA_CHALLENGE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_CONSENT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGGED_OUT.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_OAUTH_LOGOUT_CONFIRM.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_ONE_OFF_SESSION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_TERMS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_AUTH.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_CONFIRM_EMAIL.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_INVITATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_PASSWORD_LOST.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/PUBLIC_LAYOUTS_USER_REGISTER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_FIELDS_RESOURCE_REFERENCE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_ACTION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CONTAINER_NESTED.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_CREATE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_DANGER_ZONE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_FILTERS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_HEADER.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_LIST.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_BULK.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_OPERATIONS_ITEMS.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_PAGINATION.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_READ.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_SEARCH.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/RESOURCES_LAYOUTS_UPDATE.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_announcement.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_banner.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_card.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_checklist.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_checklist_item.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_modal.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_onboarding_view.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_survey.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_tooltip.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/guidance_tour.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/progression_achievement_badge.en.d.ts.map +1 -1
- package/dist/esm/i18n/components/progression_milestone_tracker.en.d.ts.map +1 -1
- package/dist/esm/i18n/composite_views/app.creation-board.en.d.ts.map +1 -1
- package/dist/esm/i18n/composite_views/app.domain-model.en.d.ts.map +1 -1
- package/dist/esm/i18n/index.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorSystemExecutions.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationActorTasks.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/wildoApplicationFlowSystemExecutions.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchBuildPlanTasks.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchDomainResources.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchPlaybooks.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchRunWriteRecords.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
- package/dist/esm/i18n/resources/workbenchTraceSessions.en.d.ts.map +1 -1
- package/dist/esm/i18n/system_enums/market.en.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts +58 -0
- package/dist/esm/i18n-labelling/models/labelling-unit.models.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling-unit.models.js +35 -0
- package/dist/esm/i18n-labelling/models/labelling-unit.models.js.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js +8 -3
- package/dist/esm/i18n-labelling/models/labelling.actors-system.definitions.js.map +1 -1
- package/dist/esm/i18n-labelling/services/component-labels-bootstrap.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts +55 -1
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js +178 -73
- package/dist/esm/i18n-labelling/services/labelling-planner.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts +3 -3
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js +16 -5
- package/dist/esm/i18n-labelling/services/labelling-spec-context-loader.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts +35 -2
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js +68 -29
- package/dist/esm/i18n-labelling/services/labellize-orchestrator.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js +126 -35
- package/dist/esm/i18n-labelling/services/translate-orchestrator.companion.service.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/frontend-derived-label-keys.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/guidance-keys.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/label-file-source.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts +143 -0
- package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js +179 -0
- package/dist/esm/i18n-labelling/utils/label-placeholder-drift.utils.js.map +1 -0
- package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts +154 -0
- package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.d.ts.map +1 -0
- package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js +174 -0
- package/dist/esm/i18n-labelling/utils/orphan-label-artifacts.utils.js.map +1 -0
- package/dist/esm/i18n-labelling/utils/per-unit-file.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/role-lifecycle-keys.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts +104 -0
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js +163 -18
- package/dist/esm/i18n-labelling/utils/schema-fields-extractor.utils.js.map +1 -1
- package/dist/esm/i18n-labelling/utils/structured-chunk-completion.utils.d.ts.map +1 -1
- package/dist/esm/i18n-labelling/utils/translate-locale-contract.utils.d.ts.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/market/services/market-generation.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js +72 -0
- package/dist/esm/meta-workflows/models/application-coding-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/application-research-agent.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts +17 -4
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js +25 -5
- package/dist/esm/meta-workflows/models/brief-adequacy.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/models/meta-workflows-lane.models.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.d.ts.map +1 -1
- package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js +9 -4
- package/dist/esm/meta-workflows/models/meta-workflows.actors-system.definitions.js.map +1 -1
- package/dist/esm/meta-workflows/services/__tests__/application-build-task-coding.companion.test-fixtures.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +3 -9
- 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 +48 -28
- package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/application-build-generation-step.companion.service.d.ts +83 -2
- 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 +197 -4
- 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.map +1 -1
- package/dist/esm/meta-workflows/services/execution-trace-read.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/foundation-executor.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-choreography-checkpoint.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-execution-trace.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run-write-register.companion.service.d.ts.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +37 -1
- 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 +227 -15
- package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
- package/dist/esm/meta-workflows/services/playbook-suspended-run.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts +117 -2
- package/dist/esm/technical-doc/services/technical-doc.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-doc.companion.service.js +258 -69
- package/dist/esm/technical-doc/services/technical-doc.companion.service.js.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts +5 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js +142 -10
- package/dist/esm/technical-doc/services/technical-documentation-application-derivation.companion.service.js.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-environment-identity.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot-assets.companion.service.d.ts.map +1 -1
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.d.ts +2 -1
- 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 +10 -2
- package/dist/esm/technical-doc/services/technical-documentation-pilot.companion.service.js.map +1 -1
- package/package.json +17 -17
- package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts +0 -44
- package/dist/esm/core/runtime/companion-startup-composition-fence.d.ts.map +0 -1
- package/dist/esm/core/runtime/companion-startup-composition-fence.js +0 -85
- package/dist/esm/core/runtime/companion-startup-composition-fence.js.map +0 -1
- package/dist/esm/expert-personas/utils/canonical-json.d.ts +0 -25
- package/dist/esm/expert-personas/utils/canonical-json.d.ts.map +0 -1
- package/dist/esm/expert-personas/utils/canonical-json.js +0 -45
- package/dist/esm/expert-personas/utils/canonical-json.js.map +0 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts +0 -19
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.d.ts.map +0 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js +0 -19
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PLAN_CHANGE_PREVIEW.en.js.map +0 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts +0 -17
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.d.ts.map +0 -1
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js +0 -17
- package/dist/esm/i18n/components/LOW_LEVEL_BILLING_PROMOTION_CODE_INPUT.en.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playbook-run.companion.service.js","sourceRoot":"","sources":["../../../../../src/meta-workflows/services/playbook-run.companion.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qCAAqC,EAAE,MAAM,qEAAqE,CAAC;AAC5H,OAAO,KAAK,wBAAwB,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,kBAAkB,EAClB,oBAAoB,EACpB,2BAA2B,EAC3B,0BAA0B,EAC1B,kCAAkC,EAGlC,0BAA0B,EAC1B,0CAA0C,EAI1C,qBAAqB,EAErB,uBAAuB,GAGxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kDAAkD,EAClD,0CAA0C,EAC1C,kCAAkC,EAClC,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,wCAA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B;IADvC,UAAU,EAAE;IAKR,WAAA,MAAM,CAAC,kBAAkB,CAAC,MAAM,CAAC,CAAA;IACjC,WAAA,MAAM,CAAC,uBAAuB,CAAC,gBAAgB,CAAC,CAAA;IAChD,WAAA,MAAM,CAAC,uBAAuB,CAAC,4BAA4B,CAAC,CAAA;IAC5D,WAAA,MAAM,CAAC,kBAAkB,CAAC,oBAAoB,CAAC,CAAA;IAC/C,WAAA,MAAM,CAAC,uBAAuB,CAAC,mBAAmB,CAAC,CAAA;IACnD,WAAA,MAAM,CAAC,uBAAuB,CAAC,+BAA+B,CAAC,CAAA;IAC/D,WAAA,MAAM,CAAC,uBAAuB,CAAC,+BAA+B,CAAC,CAAA;IAC/D,WAAA,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,2BAA2B,CAAC,CAAA;IAC3D,YAAA,MAAM,CAAC,uBAAuB,CAAC,qCAAqC,CAAC,CAAA;IACrE,YAAA,MAAM,CAAC,uBAAuB,CAAC,6BAA6B,CAAC,CAAA;uDAXmC,qCAAqC,YAElD,4BAA4B;QACf,wCAAwC;QACxC,wCAAwC;QACvC,mCAAmC;QAC1D,4BAA4B;QACjB,6BAA6B;QACnB,kCAAkC;QACrC,oCAAoC;QAChB,8CAA8C;QACvD,sCAAsC;GAjBrI,2BAA2B,CA85FvC","sourcesContent":["import { z } from 'zod';\nimport { ResearchAgentDispatchCompanionService } from '../../claude-cli/services/research-agent-dispatch.companion.service';\nimport * as ApplicationCreationSpecs from '@wildo-ai/saas-specifications/application-creation';\nimport { inject, injectable } from 'inversify';\nimport {\n AI_ENGINE_CAPABILITIES,\n ENGINE_CLIENT_STORAGE_ENTRIES,\n DataRetentionClass,\n ErasureRetentionMode,\n undeclaredAiUseCapabilities,\n undeclaredRetentionClasses,\n uninventoriedClientStorageSurfaces,\n type ApplicationAiUsePosture,\n type ApplicationClientStorageInventory,\n BillingConfigurationSchema,\n outstandingOperatorComplianceIdentityParts,\n type ApplicationOperatingJurisdictions,\n type ApplicationOperatorComplianceIdentity,\n type ServiceConsentRequirement,\n DataProcessingConsent,\n type ApplicationProviderComplianceChoices,\n ProviderDeploymentModel,\n type ApplicationRetentionSchedule,\n type ClientStorageEntry,\n} from '@wildo-ai/saas-models';\nimport {\n ApplicationAuthoredDocumentFactSpecificationSchema,\n ApplicationDocumentFactSpecificationSchema,\n ApplicationProcessorRegisterSchema,\n processorRefsNotConfigured,\n ProcessorRegisterEntryKind,\n processorProcessingRegions,\n registerEstablishesNoProcessorRecipients,\n undeclaredProcessorRefs,\n type ApplicationProcessorRegister,\n MetaWorkflow_ArtifactIntent,\n MetaWorkflow_ContextSource,\n MetaWorkflow_Executor,\n collectComplianceDocumentFactAvailability,\n type ComplianceDocumentFactAvailability,\n type RequiredDocumentSetInput,\n} from '@wildo-ai/saas-specifications/application-creation';\n\nimport { existsSync, readFileSync, writeFileSync } from 'node:fs';\nimport * as path from 'node:path';\nimport { join } from 'node:path';\n\nimport { loadPackageCompanionExport } from '@wildo-ai/platform-config-lib';\nimport { getFrameworkKnowledgePlaybook, listFrameworkKnowledgePlaybooks, listFrameworkKnowledgeSkillSummaries } from '@wildo-ai/framework-knowledge';\nimport { MetaWorkflow_EvaluationTreatmentDefinitionSchema } from '@wildo-ai/saas-models/meta-workflows';\nimport {\n APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS,\n composeElicitationSection,\n BUILD_DECOMPOSE_INPUT_FAMILIES,\n STANDARD_APPLICATION_SPECIFICATION_SEMANTIC_AUTHORITY,\n evaluatePlaybookCatalogEligibility,\n buildApplicationCoherenceReport,\n composeAssuranceDocumentBlueprintBrief,\n composeAssuranceDocumentFactObligationsBrief,\n composeAssuranceProgramAuthorityBrief,\n deriveOneFamilyFreshness,\n resolveStepOutputSchema,\n runPlaybookChoreography,\n PlaybookChoreographyStopReason,\n type PlaybookChoreographyChildResult,\n type PlaybookChoreographyResult,\n type PlaybookFamilyGitFreshness,\n buildPlaybookReviewGuide,\n evaluatePlaybookEligibility,\n getFamilyPackageRelativePath,\n getLandableArtifactFamilies,\n isPlaybookGenerationSuspension,\n renderApplicationCoherenceReport,\n renderInputFamilyContext,\n renderPlaybookReviewGuide,\n runPlaybookGeneration,\n DEFAULT_MAXIMUM_CLARIFICATION_ROUNDS,\n PlaybookClarificationAction,\n accumulateClarificationRequests,\n composeClarificationAnswersSection,\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 type PlaybookStructuredGenerationPort,\n type PlaybookJudgeResult,\n type PlaybookExportWiringRecord,\n type PlaybookOutputLandingRecord,\n type RunPlaybookGenerationResult,\n composeBillingCommercialModelBrief,\n composeOperatingJurisdictionCoverageBrief,\n type ApplicationBillingDeclaration,\n} from '@wildo-ai/application-creation-runtime';\nimport type { AgentsBackendService, LoggerService } from '@wildo-ai/saas-backend-lib';\nimport { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';\nimport type { AgentTraceContext, FlowsActors_Agent_Invocation } from '@wildo-ai/saas-models';\nimport { JourneyArtifactValidationState, MetaWorkflowPlaybookSchema, type MetaWorkflow_Phase, type MetaWorkflowPlaybook } from '@wildo-ai/saas-specifications/application-creation';\nimport {\n LLMProvider_GenerateStructuredInputSchema,\n LLMProvider_GenerateStructuredOutputSchema,\n} from '@wildo-ai/external-connectors-models';\n\nimport { StructuredDeliberationCompanionService } from '../../deliberations/services/structured-deliberation.companion.service';\nimport { PlacementPlanSchema, collectRevertedPlacementRevisions } from '@wildo-ai/saas-specifications/application-creation';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport { PlaybookRunWriteRegisterCompanionService } from './playbook-run-write-register.companion.service';\nimport { ApplicationBuildDispatchCompanionService } from './application-build-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 { CodingAgentDispatchCompanionService } from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport { PlaybookChoreographyCheckpointCompanionService } from './playbook-choreography-checkpoint.companion.service';\nimport { PlaybookSuspendedRunCompanionService, type SuspendedPlaybookRun } from './playbook-suspended-run.companion.service';\nimport 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';\nimport { loadBackendCompanionExports, loadSpecificationsCompanionExports } from '../../core/context/companion-package-loaders.companion';\nimport {\n choreographyEndedByEnvironment,\n isInfrastructureShapedAgentFailure,\n waitForDevCompileQuiet,\n} from '../../core/runtime/dev-compile-quiet.companion';\nimport { META_WORKFLOWS_STRUCTURED_ARTIFACT_GENERATOR_AGENT_REF, META_WORKFLOW_TRACE_STEP_KIND } from '../models/meta-workflows-lane.models';\nimport { BRIEF_ADEQUACY_JUDGE_AGENT_REF, BriefAdequacyVerdictOutputSchema } from '../models/brief-adequacy.actors-system.definitions';\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. `git status` shows them and a human commits them\n * (`.claude/rules/one-source-of-truth.md`, rules 2 and 3). 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/** One detached (async-submitted) run's outcome — the poll answer for #265's envelope fix. */\nexport interface PlaybookDetachedRunRecord {\n readonly playbookRef: string;\n readonly startedAt: string;\n readonly finishedAt: 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\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 four checks: topic 7 asks whether the built application ASSEMBLES, so the unit is the\n * application's four workspace packages, 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 */\nconst DETERMINISTIC_CLI_VERIFICATION_CHECKS: Readonly<Record<string, readonly string[]>> = {\n 'bottom_up.assemble-verify': [\n 'check:specifications-typecheck',\n 'check:shared-lib-typecheck',\n 'check:backend-api-typecheck',\n 'check:app-typecheck',\n ],\n};\n\n/** The zero-output playbook the composite foundation executor owns (J-2 item 2). */\nconst FOUNDATION_PLAYBOOK_REF = 'bottom_up.foundation';\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 drafting lane may produce today.\n *\n * The two PUBLIC definitions, matching `refinement.compliance-document-candidate`'s own intent\n * (\"privacy-notice or service-terms\"). The four governance documents in the catalog are internal and\n * belong to a programme the lane does not yet produce, so shipping their blueprints into a drafting\n * prompt would be ~42KB of obligations for documents nobody asked for — and a prompt section that\n * gets skimmed is indistinguishable from one that is absent.\n */\nconst DRAFTABLE_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 ...DRAFTABLE_DOCUMENT_DEFINITION_REFS,\n 'document-definition:governance.scope-system-description',\n 'document-definition:governance.program-handbook',\n]);\n\nconst FILE_PRESENT_WITHOUT_VALUE = Object.freeze({ __artifactPresentWithoutValue: true });\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/** The requested playbook ref is not in the compiled catalog. Named so the transport can answer 404 rather than 500. */\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/** A second concurrent loop was refused — one loop per companion (OC-1 design D4). Named so the transport answers 409. */\nexport class PlaybookLoopAlreadyRunningError extends Error {}\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 */\nfunction enabledEngineCapabilityNames(\n engineCapabilities: Record<string, unknown> | readonly string[] | undefined,\n): ReadonlySet<string> {\n if (Array.isArray(engineCapabilities)) return new Set(engineCapabilities.map(String));\n return new Set(\n Object.entries(engineCapabilities ?? {})\n .filter(([, activation]) => (activation !== null && typeof activation === 'object'\n ? (activation as { enabled?: unknown }).enabled === true\n : activation === true))\n .map(([capability]) => capability),\n );\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 configuredProviderRefs: readonly string[],\n register: ApplicationProcessorRegister | undefined,\n choices: ApplicationProviderComplianceChoices | 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 — and until this filter existed it was reported as one.\n *\n * `renderProviderComplianceChoices` above already draws exactly this line (\"the deployment model is\n * the axis that decides whether a bound provider is a RECIPIENT at all\"), and\n * `vendorHostedProviderRefs` exists so a caller need not remember it. The two renderers sat in ONE\n * section disagreeing: one said a self-hosted provider is operator-run, the other listed it as an\n * identity nobody had established. Measured on wonder-crm's `email-preview`, which renders mail to a\n * log and calls no API — the notice reported an outstanding disclosure about a provider that\n * discloses nothing (wildo-ai/wildo-ai#208).\n *\n * A provider with NO choice STAYS in scope, deliberately. Absence means nobody has answered, which is\n * exactly the gap this section exists to report; assuming self-hosted would silence it, and assuming\n * vendor-hosted would publish a third party nobody declared. Only an explicit SELF_HOSTED excludes.\n */\n const operatorRunRefs = new Set(\n Object.entries(choices ?? {})\n .filter(([, choice]) => choice.deploymentModel === ProviderDeploymentModel.SELF_HOSTED)\n .map(([providerRef]) => providerRef),\n );\n const recipientCandidateRefs = configuredProviderRefs.filter((providerRef) => !operatorRunRefs.has(providerRef));\n const undeclared = undeclaredProcessorRefs(recipientCandidateRefs, register);\n const stale = processorRefsNotConfigured(recipientCandidateRefs, 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 + (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(', ')}; 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 : []),\n ...(stale.length > 0\n ? ['', `STALE (${stale.length}): ${stale.map((ref) => `\\`${ref}\\``).join(', ')} — declared in the register but NOT configured. Do not name these as recipients.`]\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 * Whether the AI this application enables DECIDES anything about a person.\n *\n * A capability says AI is in use and for what function; it cannot say consequence, and the difference\n * carries the legal weight (issue #92). Rendered per ENABLED AI capability, because a capability the\n * application has not enabled raises no question — reporting it would fill a notice with AI the\n * application does not use.\n *\n * An enabled capability with no posture 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 enabledCapabilities: ReadonlySet<string>,\n posture: ApplicationAiUsePosture | undefined,\n): readonly string[] {\n const enabledAi = AI_ENGINE_CAPABILITIES.filter((capability) => enabledCapabilities.has(capability));\n if (enabledAi.length === 0) {\n return [\n '## Automated decisions and AI',\n 'This application enables NO AI capability. That is a positive, checkable statement: it performs no',\n 'AI processing of personal data, automated or otherwise.',\n ];\n }\n const undeclared = undeclaredAiUseCapabilities([...enabledCapabilities], posture);\n return [\n '## Automated decisions and AI',\n 'Per enabled AI capability: what it is used for, whether it DECIDES something about a person, and how',\n 'human intervention is obtained where it does. A capability listed OUTSTANDING has no declared',\n 'posture — do NOT read that as \"it decides nothing\". Saying nothing about consequence is how a notice',\n '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}\\` — OUTSTANDING: enabled, consequence not declared.`;\n return `- \\`${capability}\\` — ${declared.consequence}; used for: ${declared.purpose}`\n + (declared.humanReviewArrangement === null ? '' : `; human intervention: ${declared.humanReviewArrangement}`);\n }),\n ...(undeclared.length > 0\n ? ['', `OUTSTANDING (${undeclared.length}): ${undeclared.map((capability) => `\\`${capability}\\``).join(', ')} — an operator decides and states this.`]\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 * 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 * - `NONE` — a POSITIVE answer: the operator declared that nothing is gated on consent. Usually the\n * correct one, and the brief says why, because a drafter that reads NONE as \"no information\" would\n * throw away a declaration the operator deliberately made.\n * - above `NONE` — a gate, rendered with what it gates, since the schema refuses one without.\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.requiredLevel === DataProcessingConsent.NONE\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: ${requirement.requiredLevel}, gating: ${requirement.gatedProcessing}`,\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, and the lawful basis per purpose are all',\n 'absent from the application configuration. State them as outstanding and name the surface: they are',\n 'declared in `wildo.saas.config.ts` under `operatorComplianceIdentity`. Do NOT invent an entity name,',\n 'an address or a contact — those are what a subject uses to exercise a 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 ...(outstanding.length === 0\n ? []\n : [\n '',\n `${outstanding.length} of 5 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@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.PlaybookSuspendedRunService) private readonly suspendedRuns: PlaybookSuspendedRunCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookChoreographyCheckpointService) private readonly choreographyCheckpoints: PlaybookChoreographyCheckpointCompanionService,\n @inject(COMPANION_SERVICE_TYPES.StructuredDeliberationService) private readonly structuredDeliberation: StructuredDeliberationCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('PlaybookRunCompanionService');\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 public async listPlaybookEligibility(): Promise<{\n readonly playbooks: readonly PlaybookEligibility[];\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 return evaluatePlaybookCatalogEligibility({\n playbooks,\n state,\n landableFamilies: this.resolveLandableFamilies(),\n });\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 OWN rendered elicitation (questions + the creator's answers), forwarded to every child. */\n readonly parentElicitationSection?: string;\n readonly session?: CompanionExecutionSessionContext;\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 /**\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 const playbooks = await this.readParsedCatalog();\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 * so its ref identifies \"the run in progress\", and the person restarting is usually the one who\n * just watched a companion restart eat their run.\n */\n const resumeFrom = await this.choreographyCheckpoints.load(input.playbook.ref);\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 /*\n * Marked BEFORE the first child runs and cleared in `finally`, so a run that throws does not\n * leave the companion claiming to be busy forever — a stuck marker would make this read worse\n * than no read at all.\n */\n this.activeChoreography = { playbookRef: input.playbook.ref, startedAt: new Date().toISOString() };\n try {\n const result = await runPlaybookChoreography({\n composite: input.playbook,\n checkpoint: (snapshot) => this.choreographyCheckpoints.save(snapshot),\n ...(resumeFrom ? { resumeFrom } : {}),\n goal: input.playbook.intent,\n playbooks,\n landableFamilies: this.resolveLandableFamilies(),\n readArtifactState: () => this.readArtifactState(),\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 runChild: (playbookRef, objective, stepResults) =>\n this.runChoreographyChild({\n playbookRef,\n objective,\n stepResults,\n ...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),\n // The COMPOSITE names the investigation: every research child of every run of this\n // composite consolidates into one evidence-store directory, which is what makes a\n // relaunch start from what earlier runs already established.\n evidenceScope: input.playbook.ref,\n ...(input.session ? { session: input.session } : {}),\n }),\n select: {\n select: (request) => this.selectChoreographyChildren({\n ...request,\n composite: input.playbook,\n ...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),\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 } else {\n await this.choreographyCheckpoints.consume(input.playbook.ref);\n }\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 /*\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 a\n // human commit is the only acceptance there has ever been.\n accepted: false,\n };\n } finally {\n this.activeChoreography = null;\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 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 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\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 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 '',\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 try {\n const research = await this.researchDispatch.runResearchTask({\n objective: researchObjective,\n ...(input.evidenceScope ? { evidenceScope: input.evidenceScope } : {}),\n playbookRef: child.ref,\n });\n return { stepResults: new Map([[stepOutput.ref, research.evidence]]) };\n } catch (error) {\n const message = error instanceof Error ? error.message : String(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 playbookRef: child.ref,\n });\n return { stepResults: new Map([[stepOutput.ref, research.evidence]]) };\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 value = await this.generateChoreographyStepValue({\n child,\n stepOutput,\n objective: input.objective,\n stepResults: input.stepResults,\n ...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),\n });\n return { stepResults: new Map([[stepOutput.ref, value]]) };\n }\n\n const run = await this.runPlaybook({\n playbookRef: input.playbookRef,\n creatorBrief: input.objective,\n stepResults: input.stepResults,\n ...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),\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 };\n }\n return {};\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 }): 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 '',\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, [ApplicationCreationSpecs]);\n const generated = await this.buildGenerationPort().generate({\n prompt,\n schema: schema ?? z.object({ value: z.string().min(1) }),\n label: `choreography-step:${input.child.ref}:${input.stepOutput.ref}`,\n });\n if (!schema) return generated.output;\n const parsed = schema.safeParse(generated.output);\n if (!parsed.success) {\n /*\n * REFUSED rather than returned. A step value that failed its own contract cannot satisfy a\n * sibling's `requires` honestly, and returning it anyway would let a malformed verdict either\n * open a gate it should not or close one it should not — both silently.\n */\n throw new Error(\n `Step \"${input.stepOutput.ref}\" of \"${input.child.ref}\" did not satisfy ${input.stepOutput.schemaRef}: `\n + (parsed.error as z.ZodError).issues.slice(0, 3).map((issue) => `${issue.path.join('.') || '<root>'}: ${issue.message}`).join('; '),\n );\n }\n return parsed.data;\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: readonly { readonly playbookRef: string; readonly intent: string }[];\n readonly goal: string;\n readonly history: PlaybookChoreographyResult['iterations'];\n readonly stepResults: ReadonlyMap<string, unknown>;\n readonly maximumLanes: number;\n /** The composite's rendered elicitation — the creator's product facts, so objectives are aimed at them. */\n readonly parentElicitationSection?: string;\n }): Promise<{ children: readonly { playbookRef: string; objective: string }[]; stopRationale?: string }> {\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 const schema = z.object({\n children: z.array(z.object({\n choice: z.enum(choices),\n objective: z.string().min(1),\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 = this.composeInputTruthSection(request.composite, await this.readArtifactState());\n\n const prompt = [\n '# Decide what this composite does next',\n `Goal: ${request.goal}`,\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 ...request.eligible.map((entry) => `- ${entry.playbookRef}: ${entry.intent}`),\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 ...(request.stepResults.size === 0 ? [] : [\n '',\n '# What has been returned so far',\n ...[...request.stepResults.entries()].map(([ref, value]) =>\n `## ${ref}\\n${(typeof value === 'string' ? value : JSON.stringify(value)).slice(0, 4000)}`),\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}\"${child.failure ? ` — FAILED: ${child.failure}` : ''}`)),\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.' };\n }\n const stopped = parsed.data.children.find((child) => child.choice === STOP);\n if (stopped) return { children: [], stopRationale: stopped.objective };\n return { children: parsed.data.children.map((child) => ({ playbookRef: child.choice, objective: child.objective })) };\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 public async buildCoherenceReport(): Promise<{ report: ApplicationCoherenceReport; markdown: string }> {\n const state = await this.readArtifactState();\n const report = buildApplicationCoherenceReport(coherenceInputFor(state));\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 readonly hydrated: { readonly evaluationTreatment?: { readonly value: unknown } };\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 const subjects: Array<{ family: string; value: unknown }> = [];\n for (const declared of input.playbook.inputs ?? []) {\n const value = input.artifactState.artifactsByFamily.get(declared.family);\n if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE) continue;\n subjects.push({ family: declared.family, value });\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 judge = await runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed: subjects,\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 private composeCoherenceSection(playbook: MetaWorkflowPlaybook | undefined, state: PlaybookArtifactState): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.COHERENCE_REPORT)) return '';\n try {\n const report = buildApplicationCoherenceReport(coherenceInputFor(state));\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 — except one, deliberately\n *\n * `regimes` is **always empty**, and that is the truthful answer rather than a gap:\n *\n * The schema wants the regimes \"recorded by the compliance-posture pass as `compliance`-kind\n * constraints on the vision\". Those constraints exist and are FREE PROSE — wonder-crm's reads\n * *\"Ordinary B2B customer relationship data … must receive GDPR-standard handling\"*. Scanning it for\n * the token `GDPR` would manufacture a structured posture out of a sentence, which is the invention\n * this whole capability refuses; a compliance regime is not something to infer from a substring.\n *\n * Empty is explicitly a first-class state in the contract — *\"an application whose posture has not\n * been assessed … NOT read as 'no regime applies'\"* — and it costs nothing here: a privacy notice\n * stays ADMISSIBLE on `holdsPersonalData` alone, which is the whole point of B2's required-vs-\n * admissible split. What would populate it is a posture pass that records regimes as a CLOSED\n * vocabulary rather than as prose, and until one exists this reads `[]` and says so.\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 `assurance-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 const assuranceProgram = artifactState.artifactsByFamily.get('assurance-program');\n\n return {\n requiredDocumentSetInput: {\n regimes: [],\n holdsPersonalData,\n declaresCommercialModel: [...enabledCapabilities].some((capability) => capability.startsWith('BILLING')),\n runsGovernanceProgramme: assuranceProgram !== undefined && assuranceProgram !== FILE_PRESENT_WITHOUT_VALUE,\n },\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 private async resolveProcessorRegister(): Promise<ApplicationProcessorRegister | undefined> {\n let exports: { processorRegister?: unknown } | undefined;\n try {\n exports = await loadSpecificationsCompanionExports(this.companionContext) as { processorRegister?: unknown } | undefined;\n } catch (error) {\n /*\n * An application with no specifications package — or one that cannot be evaluated right now — has\n * no register, and that is a legitimate state rather than a failure. It resolves to the same\n * truthful answer as an empty register: every configured provider is reported UNDECLARED, which is\n * exactly \"nobody has established this\". Refusing here would let an unrelated specifications defect\n * block a document designed to be producible with its gaps visible.\n */\n this.logDebug('Specifications exports unavailable — processor register treated as absent', { error: String(error) });\n return undefined;\n }\n if (exports?.processorRegister === undefined) return undefined;\n const parsed = ApplicationProcessorRegisterSchema.safeParse(exports.processorRegister);\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 undefined;\n }\n return 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 derived = readFamily('document-facts', ApplicationDocumentFactSpecificationSchema);\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(after));\n const packageRelativePath = 'src/COHERENCE.md';\n const absolutePath = path.join(specificationsPackageRoot, packageRelativePath);\n const existedBefore = existsSync(absolutePath);\n const previousContent = existedBefore ? readFileSync(absolutePath, 'utf8') : undefined;\n writeFileSync(absolutePath, rendered, 'utf8');\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 private async readArtifactState(): Promise<PlaybookArtifactState> {\n const artifactsByFamily = new Map<string, unknown>();\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n\n const exports = await loadSpecificationsCompanionExports(this.companionContext);\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 const value = (exports as unknown as Record<string, unknown>)[binding.companionExportsField];\n if (value !== undefined && value !== null) artifactsByFamily.set(binding.family, value);\n }\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 const familyGitFreshness = await this.resolveFamilyGitFreshness([...artifactsByFamily.keys()]);\n const buildPlanExecution = artifactsByFamily.has('build-plan')\n ? await this.resolveBuildPlanExecutionState(familyGitFreshness)\n : undefined;\n return {\n artifactsByFamily,\n familyGitFreshness,\n ...(draftArtifactsByFamily.size > 0 ? { draftArtifactsByFamily } : {}),\n ...(buildPlanExecution ? { buildPlanExecution } : {}),\n };\n }\n\n /**\n * The landed DRAFT families, read as values for the coherence report and for nothing else.\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`, 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 const drafts = new Map<string, unknown>();\n if (!specificationsPackageRoot) return drafts;\n\n for (const binding of APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS) {\n if (binding.companionExportsField !== undefined) continue;\n const packageRelativePath = getFamilyPackageRelativePath(binding.family);\n if (!packageRelativePath || !existsSync(join(specificationsPackageRoot, packageRelativePath))) continue;\n\n // `./<directory>` is the subpath form the package loader resolves to `src/<directory>/index.ts`\n // — measured, because the bare and `/index` forms both fail to resolve.\n const subpath = `./${path.basename(path.dirname(packageRelativePath))}`;\n try {\n /*\n * `freshModuleCache` is REQUIRED here, and its absence was issue #170.\n *\n * jiti's module cache is process-global, so in the long-lived companion a draft family\n * imported once stays frozen at that evaluation for the process lifetime. The accepted\n * families beside it are read through `loadSpecificationsCompanionExports`, which does pass\n * it — so a run that lands a draft produced a report comparing a STALE draft against FRESH\n * declarations. Measured on wonder-crm: 17 phantom\n * `compliance-document-cites-undeclared-fact` findings against a document that was actually\n * coherent, on an endpoint whose own heading claims to describe \"the CURRENT working tree\".\n *\n * Worst exactly when it matters most — immediately after a run lands files, which is when\n * someone asks for a coherence report.\n */\n const moduleExports = await loadPackageCompanionExport<Record<string, unknown>>(specificationsPackageRoot, subpath, {\n freshModuleCache: true,\n });\n // A landed family module exports exactly one constant, named by the landing profile's\n // `constantSuffix`. Taking the sole export keeps this from restating that naming rule.\n const values = Object.values(moduleExports ?? {}).filter((value) => value !== undefined && value !== null);\n if (values.length === 1) drafts.set(binding.family, values[0]);\n } catch {\n // Deliberately silent: see the best-effort note above.\n }\n }\n return drafts;\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 for (const family of families) {\n const packageRelativePath = getFamilyPackageRelativePath(family);\n if (!packageRelativePath) continue;\n const familyPath = path.posix.join(specificationsRelativeRoot, packageRelativePath);\n if (!existsSync(join(this.companionContext.saasRoot, familyPath))) continue;\n try {\n const [committed, lastCommitUnixTime] = await Promise.all([\n this.git.isWorktreePathCommitted(familyPath),\n this.git.lastCommitUnixTime(familyPath),\n ]);\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 * 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 /**\n * ONE loop per companion (OC-1 design D4). A second concurrent loop over the same working tree would\n * interleave two portfolios' writes with nothing relating them; refusing names the loop already\n * running. In-memory on purpose — a runtime cache, cleared by restart, never a stored state\n * (`one-source-of-truth.md`). Manual single-playbook runs are deliberately NOT blocked: the human is\n * the authority, and git + the write register show exactly what happened.\n */\n private activeLoop: { readonly goal: string; readonly startedAt: string } | null = null;\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 if (this.activeLoop) {\n throw new PlaybookLoopAlreadyRunningError(\n `A playbook loop is already running (goal \"${this.activeLoop.goal}\", started ${this.activeLoop.startedAt}). `\n + 'One loop per companion: wait for it, or restart the companion to clear an orphaned flag.',\n );\n }\n this.activeLoop = { goal: input.goal, startedAt: new Date().toISOString() };\n try {\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 // Lanes of one iteration call this CONCURRENTLY. Safe because admitted lanes are output-disjoint\n // by construction (each lands different family files) and the write register records per run.\n runPlaybook: async (playbookRef) => {\n const result = await this.runPlaybook({\n playbookRef,\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 if ('scenarios' in result || 'status' in result || 'assessed' in result || 'dispatched' in result\n || 'verified' in result) return { landed: [] };\n return { landed: result.landed.map((entry) => entry.packageRelativePath) };\n },\n model: this.buildGenerationPort(),\n maximumIterations: input.maximumIterations,\n ...(input.maximumLanesPerIteration !== undefined ? { maximumLanesPerIteration: input.maximumLanesPerIteration } : {}),\n ...(input.session ? { trace: this.buildTrace(input.session, 'playbook-loop') } : {}),\n });\n } finally {\n this.activeLoop = null;\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 const judge = await runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed: input.artifacts,\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 /** 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 written to disk and the request 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 checkpoint is consumed and nothing\n * runs. 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 readonly action: PlaybookClarificationAction;\n readonly answers?: readonly PlaybookClarificationAnswer[];\n readonly session?: CompanionExecutionSessionContext;\n readonly dryRun?: boolean;\n }): Promise<\n | { status: 'cancelled'; runId: string; playbookRef: string }\n | Awaited<ReturnType<PlaybookRunCompanionService['runPlaybook']>>\n > {\n const checkpoint = await this.suspendedRuns.load(input.runId);\n if (input.action === PlaybookClarificationAction.CANCEL) {\n await this.suspendedRuns.consume(input.runId);\n return { status: 'cancelled' as const, runId: input.runId, playbookRef: checkpoint.playbookRef };\n }\n const answers: readonly PlaybookClarificationAnswer[] = input.action === PlaybookClarificationAction.ACCEPT\n ? [...checkpoint.priorAnswers, ...(input.answers ?? [])]\n : checkpoint.priorAnswers;\n const result = await this.runPlaybook({\n playbookRef: checkpoint.playbookRef,\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.elicitationAnswers.length > 0 ? { elicitationAnswers: checkpoint.elicitationAnswers } : {}),\n ...(input.session ? { session: input.session } : {}),\n ...(input.dryRun ? { dryRun: true } : {}),\n });\n // Consumed only once the continuation RETURNED — a run that suspends again has already written\n // its own successor checkpoint, and a run that threw leaves this one so the resume can be retried.\n await this.suspendedRuns.consume(input.runId);\n return result;\n }\n\n public async runPlaybook(input: {\n readonly playbookRef: 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: PlaybookClarificationAction;\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 /** 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 /** The request's trace session, so this run's evidence lands beside the LLM call it explains. */\n readonly session?: CompanionExecutionSessionContext;\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 }): Promise<\n | FoundationExecutionResult\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: '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 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 checks: readonly { checkRef: string; success: boolean; message: 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. The dispatch mechanism is SINGLE-FLIGHT — one workspace-mutating run at a time — while\n * `bottom_up.build-scale` declares this same tier and describes a WAVE across several concurrent\n * agents. That capability does not exist. Reporting the one task dispatched, beside the ones that\n * were ready and were not, is what stops a scale run reading as a wave it never performed; a bare\n * \"dispatched\" would silently under-deliver, which is this lane's characteristic defect.\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 /** Present only on a dry run, which DESCRIBES the next task and dispatches nothing. */\n dryRun?: true;\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 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 * 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 artifactState = await this.readArtifactState();\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 // Refuses a missing, unknown, duplicated or out-of-vocabulary answer — see its own header.\n const elicitationSection = composeElicitationSection({\n playbookRef: input.playbookRef,\n elicitation: playbook.method?.elicitation,\n answers: input.elicitationAnswers ?? [],\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 ...(elicitationSection ? { parentElicitationSection: elicitationSection } : {}),\n ...(input.session ? { session: input.session } : {}),\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 const dispatch = input.dryRun === true\n ? { plan: await this.buildDispatch.describeNextBuildTask({}) }\n : await this.buildDispatch.dispatchNextBuildTask({}, input.session);\n return {\n playbookRef: input.playbookRef,\n dispatched: true as const,\n taskRef: dispatch.plan.taskRef,\n targetKind: dispatch.plan.targetKind,\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 a human commit\n // is the only acceptance there has ever been.\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];\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 checkRef,\n success: outcome.success,\n message: outcome.message,\n })),\n passed: verification.every(({ outcome }) => outcome.success),\n ...(infrastructureError ? { infrastructureError: String(infrastructureError) } : {}),\n // No acceptance, as everywhere in this lane: a human commit is the only acceptance.\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 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 return this.foundationExecutor.execute({\n domainPlan,\n elicitationAnswers: input.elicitationAnswers ?? [],\n ...(input.dryRun === true ? { dryRun: true } : {}),\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 const composeGenerationOutputs = async (effective: typeof playbook): Promise<readonly PlaybookGenerationRequest[]> => {\n const workspaceTruthSection = await this.composeWorkspaceTruthSection(effective);\n const compliancePrimaryFactsSection = await this.composeCompliancePrimaryFactsSection(effective);\n const documentBlueprintSection = this.composeDocumentBlueprintSection(effective);\n const documentFactObligationsSection = this.composeDocumentFactObligationsSection(effective);\n const assuranceProgramAuthoritySection = this.composeAssuranceProgramAuthoritySection(effective);\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 brief: this.composeBrief({\n playbookRef: input.playbookRef,\n guidance: playbook.method?.guidance ?? '',\n family: output.family,\n creatorBrief: input.creatorBrief,\n elicitationSection,\n inputTruthSection: this.composeInputTruthSection(effective, artifactState),\n workspaceTruthSection,\n compliancePrimaryFactsSection,\n documentBlueprintSection,\n documentFactObligationsSection,\n assuranceProgramAuthoritySection,\n skillCatalogSection: this.composeSkillCatalogSection(effective),\n coherenceSection: this.composeCoherenceSection(effective, artifactState),\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: { verdict: 'sufficient' | 'insufficient'; addedSources: readonly MetaWorkflow_ContextSource[] } | undefined;\n if (playbook.method?.briefAdequacyGate === true && outputs.length > 0) {\n const judged = await this.judgeBriefAdequacy(playbook, outputs[0]!.brief);\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 if (judged.verdict === 'insufficient' && addedSources.length > 0) {\n const widened = {\n ...playbook,\n method: { ...playbook.method, contextSources: [...declared, ...addedSources] },\n } as typeof playbook;\n outputs = await composeGenerationOutputs(widened);\n briefAdequacy = { verdict: 'insufficient', addedSources };\n this.logDebug('Brief-adequacy gate repaired the brief', { playbookRef: input.playbookRef, addedSources });\n } else {\n briefAdequacy = { verdict: judged.verdict, addedSources: [] };\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 });\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 const result = await runPlaybookGeneration({\n playbookRef: input.playbookRef,\n outputs,\n specificationsPackageRoot,\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: 'application',\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 /*\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 // 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 ...(await this.resolveRequiredDocumentSetInput(artifactState)),\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 !== PlaybookClarificationAction.DECLINE,\n },\n }\n : {}),\n });\n\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 suspendedRunId = `${input.session?.sessionId ?? 'run'}-${input.playbookRef.replace(/[^a-zA-Z0-9._-]+/g, '-')}-${Date.now()}`;\n const round = (input.clarification?.round ?? 0) + 1;\n const record: SuspendedPlaybookRun = {\n runId: suspendedRunId,\n playbookRef: input.playbookRef,\n family: result.family,\n suspendedAt: new Date().toISOString(),\n round,\n ...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),\n elicitationAnswers: (input.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 * The checkpoint is a MUTABLE record on its way to JSON; a request is a readonly view.\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 await this.suspendedRuns.save(record);\n return {\n status: 'awaiting_creator_input' as const,\n runId: suspendedRunId,\n playbookRef: input.playbookRef,\n family: result.family,\n round,\n requests: result.requests,\n };\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 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 const 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 let runId: string | undefined;\n if (input.dryRun !== true) {\n runId = `${input.session?.sessionId ?? 'run'}-${input.playbookRef.replace(/[^a-zA-Z0-9._-]+/g, '-')}-${Date.now()}`;\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);\n await this.writeRegister\n .record({\n runId,\n playbookRef: input.playbookRef,\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 })),\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 runId = undefined;\n });\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 judge = treatment.success\n ? await runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed: result.landedValues,\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 || 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-${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 // 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 return {\n ...slim,\n reviewGuide,\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 ...(runId !== undefined ? { runId } : {}),\n ...(input.dryRun === true ? { dryRun: true } : {}),\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 if (!stepResults || stepResults.size === 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 ...[...stepResults.entries()].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 ): Promise<{ verdict: 'sufficient' | 'insufficient'; missingSources: readonly MetaWorkflow_ContextSource[] } | 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 if (undeclared.length === 0) return null;\n const prompt = [\n 'Judge whether the generation brief below is SUFFICIENT to produce its declared artifact.',\n 'If it is not, name which of these UNDECLARED context sources would repair it (these are the only',\n `admissible proposals): ${undeclared.join(', ')}`,\n '',\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 return { verdict: parsed.data.verdict, missingSources: parsed.data.missingSources };\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 readonly elicitationSection: string;\n readonly inputTruthSection: string;\n readonly workspaceTruthSection: 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 skillCatalogSection: string;\n readonly clarificationAnswersSection: string;\n readonly coherenceSection: 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 ...(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 // 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.compliancePrimaryFactsSection ? ['', input.compliancePrimaryFactsSection] : []),\n ...(input.skillCatalogSection ? ['', input.skillCatalogSection] : []),\n ...(input.coherenceSection ? ['', input.coherenceSection] : []),\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 private composeDocumentBlueprintSection(playbook: MetaWorkflowPlaybook | undefined): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.DOCUMENT_BLUEPRINT)) return '';\n return composeAssuranceDocumentBlueprintBrief(DRAFTABLE_DOCUMENT_DEFINITION_REFS);\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 /** The closed objective/source sets a compliance programme may draw on. See {@link composeAssuranceProgramAuthorityBrief}. */\n private composeAssuranceProgramAuthoritySection(playbook: MetaWorkflowPlaybook | undefined): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.ASSURANCE_PROGRAM_AUTHORITY)) return '';\n return composeAssuranceProgramAuthorityBrief();\n }\n\n private composeDocumentFactObligationsSection(playbook: MetaWorkflowPlaybook | undefined): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.DOCUMENT_FACT_OBLIGATIONS)) return '';\n return composeAssuranceDocumentFactObligationsBrief(FACT_OBLIGATION_DOCUMENT_DEFINITION_REFS);\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 { backendConfig } = await loadBackendCompanionExports(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 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 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 withPersonalDataCategories?: number;\n withUncategorizedPersonalFields?: number;\n }>;\n undeclaredResourceTypes?: readonly string[];\n personalDataCategories?: readonly string[];\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 + `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 : ['(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 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 const declaredCapabilities = [...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 * 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 const runtimeScopedProviderRefs = [...new Set(configuredProviderScopes.flatMap((entry) => entry.providerRefs))].sort();\n const profileOnlyProviderRefs = Object.keys(saasConfig.providerConfigurations ?? {})\n .filter((providerRef) => !runtimeScopedProviderRefs.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 of its own. `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 '## 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 ...((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 COMPOSED of',\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 (${declaredCapabilities.length}): ${declaredCapabilities.map((capability) => `\\`${capability}\\``).join(', ')}`\n : 'Declared engine capabilities: NONE.',\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 ...(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 ...renderProviderComplianceChoices(runtimeScopedProviderRefs, saasConfig.providerComplianceChoices),\n '',\n ...renderRetentionSchedule(saasConfig.dataRetention),\n '',\n // Joined to the RUNTIME-SCOPED set: a profile with no runtime binding is not a recipient.\n ...renderProcessorRegister(runtimeScopedProviderRefs, await this.resolveProcessorRegister(), saasConfig.providerComplianceChoices),\n '',\n ...renderAiUsePosture(new Set(declaredCapabilities), saasConfig.aiUsePosture),\n '',\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 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 const resourceRef = resourceType\n .replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n .replace(/[_\\s]+/g, '-')\n .toLowerCase();\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 ].join('\\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 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 private composeInputTruthSection(\n playbook: { readonly inputs?: readonly { readonly family: string; readonly intent?: MetaWorkflow_ArtifactIntent }[] },\n state: PlaybookArtifactState,\n ): string {\n const sections: string[] = [];\n for (const declaredInput of playbook.inputs ?? []) {\n const value = state.artifactsByFamily.get(declaredInput.family);\n if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE) continue;\n // The playbook's DECLARED intent decides how much of the family it reads. Absent = everything,\n // which is what every playbook did before intents existed.\n sections.push(`## Input family: ${declaredInput.family}\\n${renderInputFamilyContext(declaredInput.family, value, declaredInput.intent)}`);\n }\n if (sections.length === 0) return '';\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 '',\n sections.join('\\n\\n'),\n ].join('\\n');\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 * The composite executing in THIS process, if any.\n *\n * In memory on purpose, and it is the half a checkpoint cannot supply: a checkpoint appears only\n * after the first iteration COMPLETES, so a run that is three minutes into its first agent turn —\n * the most expensive moment to interrupt — is on disk nowhere. This is what lets a reader see it.\n *\n * Its counterpart is the checkpoint listing, which reports runs whose process is GONE. Together\n * they answer the two different questions a developer has before saving a file: is something\n * running right now, and did something die that I could resume.\n */\n private activeChoreography: { readonly playbookRef: string; readonly startedAt: string } | null = null;\n\n /** What is running in this process, and what died leaving a resumable checkpoint. */\n public async readRunsInFlight(): Promise<{\n running: { readonly playbookRef: string; readonly startedAt: string } | null;\n interrupted: Awaited<ReturnType<PlaybookChoreographyCheckpointCompanionService['list']>>;\n lastCompleted: readonly PlaybookDetachedRunRecord[];\n }> {\n return {\n running: this.activeChoreography,\n interrupted: await this.choreographyCheckpoints.list(),\n lastCompleted: [...this.lastCompletedDetachedRuns.values()],\n };\n }\n\n /**\n * The most recent DETACHED run outcome per playbook ref — 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 ref, because the question this answers is \"what happened to the run I submitted\", not a\n * history — the traces are the history.\n */\n private lastCompletedDetachedRuns = new Map<string, PlaybookDetachedRunRecord>();\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 public submitPlaybookRunDetached(input: Parameters<PlaybookRunCompanionService['runPlaybook']>[0]): {\n readonly accepted: false;\n readonly async: true;\n readonly playbookRef: string;\n readonly note: string;\n } {\n const startedAt = new Date().toISOString();\n void this.runPlaybook(input)\n .then((result) => {\n this.lastCompletedDetachedRuns.set(input.playbookRef, {\n playbookRef: input.playbookRef,\n startedAt,\n finishedAt: new Date().toISOString(),\n ok: true,\n result,\n });\n })\n .catch((error: unknown) => {\n this.lastCompletedDetachedRuns.set(input.playbookRef, {\n playbookRef: input.playbookRef,\n startedAt,\n finishedAt: new Date().toISOString(),\n ok: false,\n error: error instanceof Error ? error.message : JSON.stringify(error)?.slice(0, 500) ?? 'unknown',\n });\n });\n return {\n accepted: false,\n async: true,\n playbookRef: input.playbookRef,\n note: 'Submitted. Poll GET /playbooks/runs — `running` while in flight, then your outcome in `lastCompleted`. '\n + 'Validation failures (an unanswered elicitation, an ineligible playbook) surface there too, not as an HTTP error.',\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(): Promise<Awaited<ReturnType<PlaybookSuspendedRunCompanionService['list']>>> {\n return this.suspendedRuns.list();\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 a runaway circuit '\n + 'breaker (default 1000 calls/hour, WILDO_PLAYBOOK_MODEL_CALL_HOURLY_BREAKER to change). '\n + '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 }) => {\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 const candidates: unknown[] = [];\n for (let index = 0; index < panel.candidateCount; index += 1) {\n const value = await produce(index, panel.candidateCount);\n if (value !== undefined) candidates.push(value);\n }\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 panel,\n briefContext: prompt,\n label,\n producer: {\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 private buildGenerationPort(): PlaybookStructuredGenerationPort {\n return {\n generate: async ({ prompt, schema, label }) => {\n this.assertPlaybookModelCallBreaker();\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 input: { prompt, schema },\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 const failure = (response.executionContext as {\n structuredGenerationFailure?: {\n message?: string;\n validationIssues?: ReadonlyArray<{ code?: string; path?: ReadonlyArray<string | number> }>;\n };\n } | undefined)?.structuredGenerationFailure;\n const generationFindings = (failure?.validationIssues ?? []).map((issue) =>\n `${(issue.path ?? []).map(String).join('.') || '<root>'}: ${issue.code ?? 'invalid'} (rejected by the provider's schema validation)`,\n );\n return {\n output: (response.output as { object?: unknown } | undefined)?.object,\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":";;;;;;;;;;;;;AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,qCAAqC,EAAE,MAAM,qEAAqE,CAAC;AAC5H,OAAO,KAAK,wBAAwB,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EACL,sBAAsB,EACtB,6BAA6B,EAC7B,kBAAkB,EAClB,oBAAoB,EACpB,2BAA2B,EAC3B,0BAA0B,EAC1B,kCAAkC,EAGlC,0BAA0B,EAC1B,0CAA0C,EAI1C,qBAAqB,EAErB,4BAA4B,EAE5B,uBAAuB,GAGxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,kDAAkD,EAClD,0CAA0C,EAC1C,kCAAkC,EAClC,0BAA0B,EAC1B,0BAA0B,EAC1B,0BAA0B,EAC1B,wCAAwC,EACxC,uBAAuB,EAGvB,0BAA0B,EAC1B,qBAAqB,EACrB,yCAAyC,GAG1C,MAAM,oDAAoD,CAAC;AAE5D,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAClE,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,+BAA+B,CAAC;AAC3E,OAAO,EAAE,6BAA6B,EAAE,+BAA+B,EAAE,oCAAoC,EAAE,MAAM,+BAA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AAmB,CAAC,CAAA;IACnD,WAAA,MAAM,CAAC,uBAAuB,CAAC,+BAA+B,CAAC,CAAA;IAC/D,WAAA,MAAM,CAAC,uBAAuB,CAAC,+BAA+B,CAAC,CAAA;IAC/D,WAAA,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,2BAA2B,CAAC,CAAA;IAC3D,YAAA,MAAM,CAAC,uBAAuB,CAAC,qCAAqC,CAAC,CAAA;IACrE,YAAA,MAAM,CAAC,uBAAuB,CAAC,6BAA6B,CAAC,CAAA;uDAXmC,qCAAqC,YAElD,4BAA4B;QACf,wCAAwC;QACxC,wCAAwC;QACvC,mCAAmC;QAC1D,4BAA4B;QACjB,6BAA6B;QACnB,kCAAkC;QACrC,oCAAoC;QAChB,8CAA8C;QACvD,sCAAsC;GAjBrI,2BAA2B,CAi/FvC","sourcesContent":["import { z } from 'zod';\nimport { ResearchAgentDispatchCompanionService } from '../../claude-cli/services/research-agent-dispatch.companion.service';\nimport * as ApplicationCreationSpecs from '@wildo-ai/saas-specifications/application-creation';\nimport { inject, injectable } from 'inversify';\nimport {\n AI_ENGINE_CAPABILITIES,\n ENGINE_CLIENT_STORAGE_ENTRIES,\n DataRetentionClass,\n ErasureRetentionMode,\n undeclaredAiUseCapabilities,\n undeclaredRetentionClasses,\n uninventoriedClientStorageSurfaces,\n type ApplicationAiUsePosture,\n type ApplicationClientStorageInventory,\n BillingConfigurationSchema,\n outstandingOperatorComplianceIdentityParts,\n type ApplicationOperatingJurisdictions,\n type ApplicationOperatorComplianceIdentity,\n type ServiceConsentRequirement,\n DataProcessingConsent,\n type ApplicationProviderComplianceChoices,\n appAssertedProcessingRegions,\n type ProviderComplianceProfile,\n ProviderDeploymentModel,\n type ApplicationRetentionSchedule,\n type ClientStorageEntry,\n} from '@wildo-ai/saas-models';\nimport {\n ApplicationAuthoredDocumentFactSpecificationSchema,\n ApplicationDocumentFactSpecificationSchema,\n ApplicationProcessorRegisterSchema,\n processorRefsNotConfigured,\n ProcessorRegisterEntryKind,\n processorProcessingRegions,\n registerEstablishesNoProcessorRecipients,\n undeclaredProcessorRefs,\n type ApplicationProcessorRegister,\n MetaWorkflow_ArtifactIntent,\n MetaWorkflow_ContextSource,\n MetaWorkflow_Executor,\n collectComplianceDocumentFactAvailability,\n type ComplianceDocumentFactAvailability,\n type RequiredDocumentSetInput,\n} from '@wildo-ai/saas-specifications/application-creation';\n\nimport { existsSync, readFileSync, writeFileSync } from 'node:fs';\nimport * as path from 'node:path';\nimport { join } from 'node:path';\n\nimport { loadPackageCompanionExport } from '@wildo-ai/platform-config-lib';\nimport { getFrameworkKnowledgePlaybook, listFrameworkKnowledgePlaybooks, listFrameworkKnowledgeSkillSummaries } from '@wildo-ai/framework-knowledge';\nimport { MetaWorkflow_EvaluationTreatmentDefinitionSchema } from '@wildo-ai/saas-models/meta-workflows';\nimport {\n APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS,\n composeElicitationSection,\n BUILD_DECOMPOSE_INPUT_FAMILIES,\n STANDARD_APPLICATION_SPECIFICATION_SEMANTIC_AUTHORITY,\n evaluatePlaybookCatalogEligibility,\n buildApplicationCoherenceReport,\n composeAssuranceDocumentBlueprintBrief,\n composeAssuranceDocumentFactObligationsBrief,\n composeAssuranceProgramAuthorityBrief,\n deriveOneFamilyFreshness,\n resolveStepOutputSchema,\n runPlaybookChoreography,\n PlaybookChoreographyStopReason,\n type PlaybookChoreographyChildResult,\n type PlaybookChoreographyResult,\n type PlaybookFamilyGitFreshness,\n buildPlaybookReviewGuide,\n evaluatePlaybookEligibility,\n getFamilyPackageRelativePath,\n getLandableArtifactFamilies,\n isPlaybookGenerationSuspension,\n renderApplicationCoherenceReport,\n renderInputFamilyContext,\n renderPlaybookReviewGuide,\n runPlaybookGeneration,\n DEFAULT_MAXIMUM_CLARIFICATION_ROUNDS,\n PlaybookClarificationAction,\n accumulateClarificationRequests,\n composeClarificationAnswersSection,\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 type PlaybookStructuredGenerationPort,\n type PlaybookJudgeResult,\n type PlaybookExportWiringRecord,\n type PlaybookOutputLandingRecord,\n type RunPlaybookGenerationResult,\n composeBillingCommercialModelBrief,\n composeOperatingJurisdictionCoverageBrief,\n type ApplicationBillingDeclaration,\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 { listRegisteredProviderSpecifications } from '@wildo-ai/saas-specifications';\nimport type { AgentsBackendService, LoggerService } from '@wildo-ai/saas-backend-lib';\nimport { SAAS_SERVICE_TYPES } from '@wildo-ai/saas-backend-lib';\nimport type { AgentTraceContext, FlowsActors_Agent_Invocation } from '@wildo-ai/saas-models';\nimport { JourneyArtifactValidationState, MetaWorkflowPlaybookSchema, type MetaWorkflow_Phase, type MetaWorkflowPlaybook } from '@wildo-ai/saas-specifications/application-creation';\nimport {\n LLMProvider_GenerateStructuredInputSchema,\n LLMProvider_GenerateStructuredOutputSchema,\n readCodingModelDestinations,\n} from '@wildo-ai/external-connectors-models';\n\nimport { StructuredDeliberationCompanionService } from '../../deliberations/services/structured-deliberation.companion.service';\nimport { PlacementPlanSchema, collectRevertedPlacementRevisions } from '@wildo-ai/saas-specifications/application-creation';\nimport { COMPANION_SERVICE_TYPES } from '../../core/inject/models/service-types';\nimport { PlaybookRunWriteRegisterCompanionService } from './playbook-run-write-register.companion.service';\nimport { ApplicationBuildDispatchCompanionService } from './application-build-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 { CodingAgentDispatchCompanionService } from '../../claude-cli/services/coding-agent-dispatch.companion.service';\nimport { PlaybookChoreographyCheckpointCompanionService } from './playbook-choreography-checkpoint.companion.service';\nimport { PlaybookSuspendedRunCompanionService, type SuspendedPlaybookRun } from './playbook-suspended-run.companion.service';\nimport 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';\nimport { loadBackendCompanionExports, loadSpecificationsCompanionExports } from '../../core/context/companion-package-loaders.companion';\nimport {\n choreographyEndedByEnvironment,\n isInfrastructureShapedAgentFailure,\n waitForDevCompileQuiet,\n} from '../../core/runtime/dev-compile-quiet.companion';\nimport { META_WORKFLOWS_STRUCTURED_ARTIFACT_GENERATOR_AGENT_REF, META_WORKFLOW_TRACE_STEP_KIND } from '../models/meta-workflows-lane.models';\nimport { BRIEF_ADEQUACY_JUDGE_AGENT_REF, BriefAdequacyVerdict, BriefAdequacyVerdictOutputSchema } from '../models/brief-adequacy.actors-system.definitions';\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. `git status` shows them and a human commits them\n * (`.claude/rules/one-source-of-truth.md`, rules 2 and 3). 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/** One detached (async-submitted) run's outcome — the poll answer for #265's envelope fix. */\nexport interface PlaybookDetachedRunRecord {\n readonly playbookRef: string;\n readonly startedAt: string;\n readonly finishedAt: 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\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 the\n * application's four workspace packages, 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 all four packages 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 */\nconst DETERMINISTIC_CLI_VERIFICATION_CHECKS: Readonly<Record<string, readonly string[]>> = {\n 'bottom_up.assemble-verify': [\n 'check:specifications-typecheck',\n 'check:shared-lib-typecheck',\n 'check:backend-api-typecheck',\n 'check:app-typecheck',\n 'check:schema-plan-in-sync',\n ],\n};\n\n/** The zero-output playbook the composite foundation executor owns (J-2 item 2). */\nconst FOUNDATION_PLAYBOOK_REF = 'bottom_up.foundation';\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 drafting lane may produce today.\n *\n * The two PUBLIC definitions, matching `refinement.compliance-document-candidate`'s own intent\n * (\"privacy-notice or service-terms\"). The four governance documents in the catalog are internal and\n * belong to a programme the lane does not yet produce, so shipping their blueprints into a drafting\n * prompt would be ~42KB of obligations for documents nobody asked for — and a prompt section that\n * gets skimmed is indistinguishable from one that is absent.\n */\nconst DRAFTABLE_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 ...DRAFTABLE_DOCUMENT_DEFINITION_REFS,\n 'document-definition:governance.scope-system-description',\n 'document-definition:governance.program-handbook',\n]);\n\nconst FILE_PRESENT_WITHOUT_VALUE = Object.freeze({ __artifactPresentWithoutValue: true });\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/** The requested playbook ref is not in the compiled catalog. Named so the transport can answer 404 rather than 500. */\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 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 CHOREOGRAPHY was refused — one composite per companion. Transport answers 409.\n *\n * The refusal the checkpoint store has assumed since it was written and nobody enforced: it keys by\n * playbook REF (`playbook-choreography-checkpoint.companion.service.ts`, \"a composite is single-flight\n * per application — so the ref IS the identity of the run in progress\"), so a second run of the same\n * composite LOADS the live run's mid-flight checkpoint and resumes from it, both runs then write the\n * same file every iteration, and whichever concludes first `consume()`s it — deleting the other's only\n * resume point while it is still paying for iterations. Two DIFFERENT composites do not collide on the\n * file, and are refused for the loop's own recorded reason: two portfolios' writes interleaved over one\n * working tree with nothing relating them, plus a single-slot `activeChoreography` marker that the\n * second run overwrites and the first run's `finally` then clears, leaving `readRunsInFlight` reporting\n * \"nothing running\" while something is.\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 */\nfunction enabledEngineCapabilityNames(\n engineCapabilities: Record<string, unknown> | readonly string[] | undefined,\n): ReadonlySet<string> {\n if (Array.isArray(engineCapabilities)) return new Set(engineCapabilities.map(String));\n return new Set(\n Object.entries(engineCapabilities ?? {})\n .filter(([, activation]) => (activation !== null && typeof activation === 'object'\n ? (activation as { enabled?: unknown }).enabled === true\n : activation === true))\n .map(([capability]) => capability),\n );\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 configuredProviderRefs: readonly string[],\n register: ApplicationProcessorRegister | undefined,\n choices: ApplicationProviderComplianceChoices | 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 — and until this filter existed it was reported as one.\n *\n * `renderProviderComplianceChoices` above already draws exactly this line (\"the deployment model is\n * the axis that decides whether a bound provider is a RECIPIENT at all\"), and\n * `vendorHostedProviderRefs` exists so a caller need not remember it. The two renderers sat in ONE\n * section disagreeing: one said a self-hosted provider is operator-run, the other listed it as an\n * identity nobody had established. Measured on wonder-crm's `email-preview`, which renders mail to a\n * log and calls no API — the notice reported an outstanding disclosure about a provider that\n * discloses nothing (wildo-ai/wildo-ai#208).\n *\n * A provider with NO choice STAYS in scope, deliberately. Absence means nobody has answered, which is\n * exactly the gap this section exists to report; assuming self-hosted would silence it, and assuming\n * vendor-hosted would publish a third party nobody declared. Only an explicit SELF_HOSTED excludes.\n */\n const operatorRunRefs = new Set(\n Object.entries(choices ?? {})\n .filter(([, choice]) => choice.deploymentModel === ProviderDeploymentModel.SELF_HOSTED)\n .map(([providerRef]) => providerRef),\n );\n const recipientCandidateRefs = configuredProviderRefs.filter((providerRef) => !operatorRunRefs.has(providerRef));\n const undeclared = undeclaredProcessorRefs(recipientCandidateRefs, register);\n const stale = processorRefsNotConfigured(recipientCandidateRefs, 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 + (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(', ')}; 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 : []),\n ...(stale.length > 0\n ? ['', `STALE (${stale.length}): ${stale.map((ref) => `\\`${ref}\\``).join(', ')} — declared in the register but NOT configured. Do not name these as recipients.`]\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 * Whether the AI this application enables DECIDES anything about a person.\n *\n * A capability says AI is in use and for what function; it cannot say consequence, and the difference\n * carries the legal weight (issue #92). Rendered per ENABLED AI capability, because a capability the\n * application has not enabled raises no question — reporting it would fill a notice with AI the\n * application does not use.\n *\n * An enabled capability with no posture 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 enabledCapabilities: ReadonlySet<string>,\n posture: ApplicationAiUsePosture | undefined,\n): readonly string[] {\n const enabledAi = AI_ENGINE_CAPABILITIES.filter((capability) => enabledCapabilities.has(capability));\n if (enabledAi.length === 0) {\n return [\n '## Automated decisions and AI',\n 'This application enables NO AI capability. That is a positive, checkable statement: it performs no',\n 'AI processing of personal data, automated or otherwise.',\n ];\n }\n const undeclared = undeclaredAiUseCapabilities([...enabledCapabilities], posture);\n return [\n '## Automated decisions and AI',\n 'Per enabled AI capability: what it is used for, whether it DECIDES something about a person, and how',\n 'human intervention is obtained where it does. A capability listed OUTSTANDING has no declared',\n 'posture — do NOT read that as \"it decides nothing\". Saying nothing about consequence is how a notice',\n '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}\\` — OUTSTANDING: enabled, consequence not declared.`;\n return `- \\`${capability}\\` — ${declared.consequence}; used for: ${declared.purpose}`\n + (declared.humanReviewArrangement === null ? '' : `; human intervention: ${declared.humanReviewArrangement}`);\n }),\n ...(undeclared.length > 0\n ? ['', `OUTSTANDING (${undeclared.length}): ${undeclared.map((capability) => `\\`${capability}\\``).join(', ')} — an operator decides and states this.`]\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): readonly string[] {\n if (choices === undefined) return [];\n\n const profilesByProviderRef: Record<string, ProviderComplianceProfile> = {};\n for (const specification of listRegisteredProviderSpecifications()) {\n profilesByProviderRef[specification.ref] = specification.complianceProfile;\n }\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 = 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 * 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 * - `NONE` — a POSITIVE answer: the operator declared that nothing is gated on consent. Usually the\n * correct one, and the brief says why, because a drafter that reads NONE as \"no information\" would\n * throw away a declaration the operator deliberately made.\n * - above `NONE` — a gate, rendered with what it gates, since the schema refuses one without.\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.requiredLevel === DataProcessingConsent.NONE\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: ${requirement.requiredLevel}, gating: ${requirement.gatedProcessing}`,\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, and the lawful basis per purpose are all',\n 'absent from the application configuration. State them as outstanding and name the surface: they are',\n 'declared in `wildo.saas.config.ts` under `operatorComplianceIdentity`. Do NOT invent an entity name,',\n 'an address or a contact — those are what a subject uses to exercise a 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 ...(outstanding.length === 0\n ? []\n : [\n '',\n `${outstanding.length} of 5 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@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.PlaybookSuspendedRunService) private readonly suspendedRuns: PlaybookSuspendedRunCompanionService,\n @inject(COMPANION_SERVICE_TYPES.PlaybookChoreographyCheckpointService) private readonly choreographyCheckpoints: PlaybookChoreographyCheckpointCompanionService,\n @inject(COMPANION_SERVICE_TYPES.StructuredDeliberationService) private readonly structuredDeliberation: StructuredDeliberationCompanionService,\n ) {\n this.logDebug = this.logger.debugByType('PlaybookRunCompanionService');\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 public async listPlaybookEligibility(): Promise<{\n readonly playbooks: readonly PlaybookEligibility[];\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 return evaluatePlaybookCatalogEligibility({\n playbooks,\n state,\n landableFamilies: this.resolveLandableFamilies(),\n });\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 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 }): 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 /**\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, and until now it was an assumption two other comments relied on rather than a\n * refusal anything made.\n *\n * What happened before this: nothing. `activeChoreography` was set below, cleared in `finally`,\n * and read at exactly one place — `readRunsInFlight`, for reporting. A second composite launched\n * while one was running simply started, and the two shared a working tree, a marker slot and (for\n * the same ref) one checkpoint file. The operator saw two 200s and, some minutes later, one run\n * missing its accumulated evidence. Now the second caller is refused immediately with the ref and\n * start time of the run that holds the companion, and the transport answers 409 — the shape the\n * sibling loop has had since OC-1 D4, whose reasoning (\"a second concurrent loop over the same\n * working tree would interleave two portfolios' writes with nothing relating them\") is the same\n * argument one tier down.\n *\n * IN-MEMORY, like the loop's flag: a runtime cache cleared by restart, never stored state\n * (`one-source-of-truth.md` rule 5). A stuck marker is impossible for the reason the `finally`\n * below already gives, and a restart clears it anyway — which is also the operator's remedy of\n * last resort, so the message says so.\n *\n * A NESTED composite is ADMITTED, and that is not a hole — it is the difference between a\n * single-flight guard and a self-deadlock. `runChoreographyChild` reaches `runPlaybook`, which\n * routes a child declaring `method.choreography` straight back here; a blanket refusal would\n * abort the parent on its own child. No composite in the compiled catalog admits a composite\n * today (measured: `top_down.market-analysis` and `top_down.compliance-analysis` are the only two,\n * and neither admits the other or itself), but the shape is already contemplated in code — see the\n * `landedValues` narrowing in `runChoreographyChild`, which exists because \"a nested CHOREOGRAPHY\n * result also carries `landed`\". So nesting is threaded EXPLICITLY rather than inferred: a depth\n * counter would misread a fresh operator request arriving mid-run as nested, and only the call\n * path knows the difference. The flag travels on `runPlaybook`'s input beside `stepResults` and\n * `parentElicitationSection`, the two fields already documented as driver-only; neither HTTP\n * entry point spreads a request body into that input, so no caller can forge it.\n */\n if (input.nestedWithinChoreographyRef === undefined && this.activeChoreography) {\n throw new PlaybookChoreographyAlreadyRunningError(\n `A composite is already running (playbook \"${this.activeChoreography.playbookRef}\", started ${this.activeChoreography.startedAt}). `\n + 'One composite per companion: two of them share this working tree, and two runs of the same composite share one '\n + 'checkpoint file, so the second would resume the first mid-flight and then delete its resume point. '\n + 'Wait for it, watch it with GET /api/companion/playbooks/runs, or restart the companion to clear an orphaned flag.',\n );\n }\n const playbooks = await this.readParsedCatalog();\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 const resumeFrom = await this.choreographyCheckpoints.load(input.playbook.ref);\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 /*\n * Marked BEFORE the first child runs and cleared in `finally`, so a run that throws does not\n * leave the companion claiming to be busy forever — a stuck marker would make this read worse\n * than no read at all. Since the refusal above, this is also the thing that refuses, so leaking\n * it would brick every later composite rather than merely misreport one.\n *\n * The OUTERMOST run owns the marker. A nested composite must not overwrite it and — the half\n * that actually bites — must not CLEAR it on the way out: its `finally` would run while the\n * parent is still going, leaving `readRunsInFlight` reporting nothing and the refusal above\n * admitting a second concurrent composite for the rest of the parent's life. That was already\n * wrong before this change; it was only invisible because nothing read the marker for anything\n * but a status line.\n */\n const ownsActiveMarker = input.nestedWithinChoreographyRef === undefined;\n if (ownsActiveMarker) {\n this.activeChoreography = { playbookRef: input.playbook.ref, startedAt: new Date().toISOString() };\n }\n try {\n const result = await runPlaybookChoreography({\n composite: input.playbook,\n checkpoint: (snapshot) => this.choreographyCheckpoints.save(snapshot),\n ...(resumeFrom ? { resumeFrom } : {}),\n goal: input.playbook.intent,\n playbooks,\n landableFamilies: this.resolveLandableFamilies(),\n readArtifactState: () => this.readArtifactState(),\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 runChild: (playbookRef, objective, stepResults) =>\n this.runChoreographyChild({\n playbookRef,\n objective,\n stepResults,\n parentChoreographyRef: input.playbook.ref,\n ...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),\n // The COMPOSITE names the investigation: every research child of every run of this\n // composite consolidates into one evidence-store directory, which is what makes a\n // relaunch start from what earlier runs already established.\n evidenceScope: input.playbook.ref,\n ...(input.session ? { session: input.session } : {}),\n }),\n select: {\n select: (request) => this.selectChoreographyChildren({\n ...request,\n composite: input.playbook,\n ...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),\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 } else {\n await this.choreographyCheckpoints.consume(input.playbook.ref);\n }\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 /*\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 a\n // human commit is the only acceptance there has ever been.\n accepted: false,\n };\n } finally {\n if (ownsActiveMarker) this.activeChoreography = null;\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 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\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 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 '',\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 try {\n const research = await this.researchDispatch.runResearchTask({\n objective: researchObjective,\n ...(input.evidenceScope ? { evidenceScope: input.evidenceScope } : {}),\n playbookRef: child.ref,\n });\n return { stepResults: new Map([[stepOutput.ref, research.evidence]]) };\n } catch (error) {\n const message = error instanceof Error ? error.message : String(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 playbookRef: child.ref,\n });\n return { stepResults: new Map([[stepOutput.ref, research.evidence]]) };\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 value = await this.generateChoreographyStepValue({\n child,\n stepOutput,\n objective: input.objective,\n stepResults: input.stepResults,\n ...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),\n });\n return { stepResults: new Map([[stepOutput.ref, value]]) };\n }\n\n const run = await this.runPlaybook({\n playbookRef: input.playbookRef,\n creatorBrief: 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 ...(input.parentElicitationSection ? { parentElicitationSection: input.parentElicitationSection } : {}),\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 };\n }\n return {};\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 }): 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 '',\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, [ApplicationCreationSpecs]);\n const generated = await this.buildGenerationPort().generate({\n prompt,\n schema: schema ?? z.object({ value: z.string().min(1) }),\n label: `choreography-step:${input.child.ref}:${input.stepOutput.ref}`,\n });\n if (!schema) return generated.output;\n const parsed = schema.safeParse(generated.output);\n if (!parsed.success) {\n /*\n * REFUSED rather than returned. A step value that failed its own contract cannot satisfy a\n * sibling's `requires` honestly, and returning it anyway would let a malformed verdict either\n * open a gate it should not or close one it should not — both silently.\n */\n throw new Error(\n `Step \"${input.stepOutput.ref}\" of \"${input.child.ref}\" did not satisfy ${input.stepOutput.schemaRef}: `\n + (parsed.error as z.ZodError).issues.slice(0, 3).map((issue) => `${issue.path.join('.') || '<root>'}: ${issue.message}`).join('; '),\n );\n }\n return parsed.data;\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: readonly { readonly playbookRef: string; readonly intent: string }[];\n readonly goal: string;\n readonly history: PlaybookChoreographyResult['iterations'];\n readonly stepResults: ReadonlyMap<string, unknown>;\n readonly maximumLanes: number;\n /** The composite's rendered elicitation — the creator's product facts, so objectives are aimed at them. */\n readonly parentElicitationSection?: string;\n }): Promise<{ children: readonly { playbookRef: string; objective: string }[]; stopRationale?: string }> {\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 const schema = z.object({\n children: z.array(z.object({\n choice: z.enum(choices),\n objective: z.string().min(1),\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 = this.composeInputTruthSection(request.composite, await this.readArtifactState());\n\n const prompt = [\n '# Decide what this composite does next',\n `Goal: ${request.goal}`,\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 ...request.eligible.map((entry) => `- ${entry.playbookRef}: ${entry.intent}`),\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 ...(request.stepResults.size === 0 ? [] : [\n '',\n '# What has been returned so far',\n ...[...request.stepResults.entries()].map(([ref, value]) =>\n `## ${ref}\\n${(typeof value === 'string' ? value : JSON.stringify(value)).slice(0, 4000)}`),\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}\"${child.failure ? ` — FAILED: ${child.failure}` : ''}`)),\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.' };\n }\n const stopped = parsed.data.children.find((child) => child.choice === STOP);\n if (stopped) return { children: [], stopRationale: stopped.objective };\n return { children: parsed.data.children.map((child) => ({ playbookRef: child.choice, objective: child.objective })) };\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 public async buildCoherenceReport(): Promise<{ report: ApplicationCoherenceReport; markdown: string }> {\n const state = await this.readArtifactState();\n const report = buildApplicationCoherenceReport(coherenceInputFor(state));\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 readonly hydrated: { readonly evaluationTreatment?: { readonly value: unknown } };\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 const subjects: Array<{ family: string; value: unknown }> = [];\n for (const declared of input.playbook.inputs ?? []) {\n const value = input.artifactState.artifactsByFamily.get(declared.family);\n if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE) continue;\n subjects.push({ family: declared.family, value });\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 judge = await runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed: subjects,\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 private composeCoherenceSection(playbook: MetaWorkflowPlaybook | undefined, state: PlaybookArtifactState): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.COHERENCE_REPORT)) return '';\n try {\n const report = buildApplicationCoherenceReport(coherenceInputFor(state));\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 — except one, deliberately\n *\n * `regimes` is **always empty**, and that is the truthful answer rather than a gap:\n *\n * The schema wants the regimes \"recorded by the compliance-posture pass as `compliance`-kind\n * constraints on the vision\". Those constraints exist and are FREE PROSE — wonder-crm's reads\n * *\"Ordinary B2B customer relationship data … must receive GDPR-standard handling\"*. Scanning it for\n * the token `GDPR` would manufacture a structured posture out of a sentence, which is the invention\n * this whole capability refuses; a compliance regime is not something to infer from a substring.\n *\n * Empty is explicitly a first-class state in the contract — *\"an application whose posture has not\n * been assessed … NOT read as 'no regime applies'\"* — and it costs nothing here: a privacy notice\n * stays ADMISSIBLE on `holdsPersonalData` alone, which is the whole point of B2's required-vs-\n * admissible split. What would populate it is a posture pass that records regimes as a CLOSED\n * vocabulary rather than as prose, and until one exists this reads `[]` and says so.\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 `assurance-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 const assuranceProgram = artifactState.artifactsByFamily.get('assurance-program');\n\n return {\n requiredDocumentSetInput: {\n regimes: [],\n holdsPersonalData,\n declaresCommercialModel: [...enabledCapabilities].some((capability) => capability.startsWith('BILLING')),\n runsGovernanceProgramme: assuranceProgram !== undefined && assuranceProgram !== FILE_PRESENT_WITHOUT_VALUE,\n },\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 private async resolveProcessorRegister(): Promise<ApplicationProcessorRegister | undefined> {\n let exports: { processorRegister?: unknown } | undefined;\n try {\n exports = await loadSpecificationsCompanionExports(this.companionContext) as { processorRegister?: unknown } | undefined;\n } catch (error) {\n /*\n * An application with no specifications package — or one that cannot be evaluated right now — has\n * no register, and that is a legitimate state rather than a failure. It resolves to the same\n * truthful answer as an empty register: every configured provider is reported UNDECLARED, which is\n * exactly \"nobody has established this\". Refusing here would let an unrelated specifications defect\n * block a document designed to be producible with its gaps visible.\n */\n this.logDebug('Specifications exports unavailable — processor register treated as absent', { error: String(error) });\n return undefined;\n }\n if (exports?.processorRegister === undefined) return undefined;\n const parsed = ApplicationProcessorRegisterSchema.safeParse(exports.processorRegister);\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 undefined;\n }\n return 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 derived = readFamily('document-facts', ApplicationDocumentFactSpecificationSchema);\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(after));\n const packageRelativePath = 'src/COHERENCE.md';\n const absolutePath = path.join(specificationsPackageRoot, packageRelativePath);\n const existedBefore = existsSync(absolutePath);\n const previousContent = existedBefore ? readFileSync(absolutePath, 'utf8') : undefined;\n writeFileSync(absolutePath, rendered, 'utf8');\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 private async readArtifactState(): Promise<PlaybookArtifactState> {\n const artifactsByFamily = new Map<string, unknown>();\n const specificationsPackageRoot = this.companionContext.resolvedSpecifications?.packageRoot;\n\n const exports = await loadSpecificationsCompanionExports(this.companionContext);\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 const value = (exports as unknown as Record<string, unknown>)[binding.companionExportsField];\n if (value !== undefined && value !== null) artifactsByFamily.set(binding.family, value);\n }\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 const familyGitFreshness = await this.resolveFamilyGitFreshness([...artifactsByFamily.keys()]);\n const buildPlanExecution = artifactsByFamily.has('build-plan')\n ? await this.resolveBuildPlanExecutionState(familyGitFreshness)\n : undefined;\n return {\n artifactsByFamily,\n familyGitFreshness,\n ...(draftArtifactsByFamily.size > 0 ? { draftArtifactsByFamily } : {}),\n ...(buildPlanExecution ? { buildPlanExecution } : {}),\n };\n }\n\n /**\n * The landed DRAFT families, read as values for the coherence report and for nothing else.\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`, 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 const drafts = new Map<string, unknown>();\n if (!specificationsPackageRoot) return drafts;\n\n for (const binding of APPLICATION_SPECIFICATION_SEMANTIC_SCHEMA_BINDINGS) {\n if (binding.companionExportsField !== undefined) continue;\n const packageRelativePath = getFamilyPackageRelativePath(binding.family);\n if (!packageRelativePath || !existsSync(join(specificationsPackageRoot, packageRelativePath))) continue;\n\n // `./<directory>` is the subpath form the package loader resolves to `src/<directory>/index.ts`\n // — measured, because the bare and `/index` forms both fail to resolve.\n const subpath = `./${path.basename(path.dirname(packageRelativePath))}`;\n try {\n /*\n * `freshModuleCache` is REQUIRED here, and its absence was issue #170.\n *\n * jiti's module cache is process-global, so in the long-lived companion a draft family\n * imported once stays frozen at that evaluation for the process lifetime. The accepted\n * families beside it are read through `loadSpecificationsCompanionExports`, which does pass\n * it — so a run that lands a draft produced a report comparing a STALE draft against FRESH\n * declarations. Measured on wonder-crm: 17 phantom\n * `compliance-document-cites-undeclared-fact` findings against a document that was actually\n * coherent, on an endpoint whose own heading claims to describe \"the CURRENT working tree\".\n *\n * Worst exactly when it matters most — immediately after a run lands files, which is when\n * someone asks for a coherence report.\n */\n const moduleExports = await loadPackageCompanionExport<Record<string, unknown>>(specificationsPackageRoot, subpath, {\n freshModuleCache: true,\n });\n // A landed family module exports exactly one constant, named by the landing profile's\n // `constantSuffix`. Taking the sole export keeps this from restating that naming rule.\n const values = Object.values(moduleExports ?? {}).filter((value) => value !== undefined && value !== null);\n if (values.length === 1) drafts.set(binding.family, values[0]);\n } catch {\n // Deliberately silent: see the best-effort note above.\n }\n }\n return drafts;\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 for (const family of families) {\n const packageRelativePath = getFamilyPackageRelativePath(family);\n if (!packageRelativePath) continue;\n const familyPath = path.posix.join(specificationsRelativeRoot, packageRelativePath);\n if (!existsSync(join(this.companionContext.saasRoot, familyPath))) continue;\n try {\n const [committed, lastCommitUnixTime] = await Promise.all([\n this.git.isWorktreePathCommitted(familyPath),\n this.git.lastCommitUnixTime(familyPath),\n ]);\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 * 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 /**\n * ONE loop per companion (OC-1 design D4). A second concurrent loop over the same working tree would\n * interleave two portfolios' writes with nothing relating them; refusing names the loop already\n * running. In-memory on purpose — a runtime cache, cleared by restart, never a stored state\n * (`one-source-of-truth.md`). Manual single-playbook runs are deliberately NOT blocked: the human is\n * the authority, and git + the write register show exactly what happened.\n */\n private activeLoop: { readonly goal: string; readonly startedAt: string } | null = null;\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 if (this.activeLoop) {\n throw new PlaybookLoopAlreadyRunningError(\n `A playbook loop is already running (goal \"${this.activeLoop.goal}\", started ${this.activeLoop.startedAt}). `\n + 'One loop per companion: wait for it, or restart the companion to clear an orphaned flag.',\n );\n }\n this.activeLoop = { goal: input.goal, startedAt: new Date().toISOString() };\n try {\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 // 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 runPlaybook: async (playbookRef) => {\n const result = await this.runPlaybook({\n playbookRef,\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 if ('scenarios' in result || 'status' in result || 'assessed' in result || 'dispatched' in result\n || 'verified' in result) return { landed: [] };\n return { landed: result.landed.map((entry) => entry.packageRelativePath) };\n },\n model: this.buildGenerationPort(),\n maximumIterations: input.maximumIterations,\n ...(input.maximumLanesPerIteration !== undefined ? { maximumLanesPerIteration: input.maximumLanesPerIteration } : {}),\n ...(input.session ? { trace: this.buildTrace(input.session, 'playbook-loop') } : {}),\n });\n } finally {\n this.activeLoop = null;\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 const judge = await runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed: input.artifacts,\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 /** 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 written to disk and the request 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 checkpoint is consumed and nothing\n * runs. 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 readonly action: PlaybookClarificationAction;\n readonly answers?: readonly PlaybookClarificationAnswer[];\n readonly session?: CompanionExecutionSessionContext;\n readonly dryRun?: boolean;\n }): Promise<\n | { status: 'cancelled'; runId: string; playbookRef: string }\n | Awaited<ReturnType<PlaybookRunCompanionService['runPlaybook']>>\n > {\n const checkpoint = await this.suspendedRuns.load(input.runId);\n if (input.action === PlaybookClarificationAction.CANCEL) {\n await this.suspendedRuns.consume(input.runId);\n return { status: 'cancelled' as const, runId: input.runId, playbookRef: checkpoint.playbookRef };\n }\n const answers: readonly PlaybookClarificationAnswer[] = input.action === PlaybookClarificationAction.ACCEPT\n ? [...checkpoint.priorAnswers, ...(input.answers ?? [])]\n : checkpoint.priorAnswers;\n const result = await this.runPlaybook({\n playbookRef: checkpoint.playbookRef,\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.elicitationAnswers.length > 0 ? { elicitationAnswers: checkpoint.elicitationAnswers } : {}),\n ...(input.session ? { session: input.session } : {}),\n ...(input.dryRun ? { dryRun: true } : {}),\n });\n // Consumed only once the continuation RETURNED — a run that suspends again has already written\n // its own successor checkpoint, and a run that threw leaves this one so the resume can be retried.\n await this.suspendedRuns.consume(input.runId);\n return result;\n }\n\n public async runPlaybook(input: {\n readonly playbookRef: 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: PlaybookClarificationAction;\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 /** 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 /** The request's trace session, so this run's evidence lands beside the LLM call it explains. */\n readonly session?: CompanionExecutionSessionContext;\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 }): Promise<\n | FoundationExecutionResult\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: '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 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 checks: readonly { checkRef: string; success: boolean; message: 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. The dispatch mechanism is SINGLE-FLIGHT — one workspace-mutating run at a time — while\n * `bottom_up.build-scale` declares this same tier and describes a WAVE across several concurrent\n * agents. That capability does not exist. Reporting the one task dispatched, beside the ones that\n * were ready and were not, is what stops a scale run reading as a wave it never performed; a bare\n * \"dispatched\" would silently under-deliver, which is this lane's characteristic defect.\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 /** Present only on a dry run, which DESCRIBES the next task and dispatches nothing. */\n dryRun?: true;\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 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 * 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 artifactState = await this.readArtifactState();\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 // Refuses a missing, unknown, duplicated or out-of-vocabulary answer — see its own header.\n const elicitationSection = composeElicitationSection({\n playbookRef: input.playbookRef,\n elicitation: playbook.method?.elicitation,\n answers: input.elicitationAnswers ?? [],\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 ...(elicitationSection ? { parentElicitationSection: elicitationSection } : {}),\n ...(input.nestedWithinChoreographyRef ? { nestedWithinChoreographyRef: input.nestedWithinChoreographyRef } : {}),\n ...(input.session ? { session: input.session } : {}),\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 const dispatch = input.dryRun === true\n ? { plan: await this.buildDispatch.describeNextBuildTask() }\n : await this.buildDispatch.dispatchNextBuildTask(input.session);\n return {\n playbookRef: input.playbookRef,\n dispatched: true as const,\n taskRef: dispatch.plan.taskRef,\n targetKind: dispatch.plan.targetKind,\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 a human commit\n // is the only acceptance there has ever been.\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];\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 checkRef,\n success: outcome.success,\n message: outcome.message,\n })),\n passed: verification.every(({ outcome }) => outcome.success),\n ...(infrastructureError ? { infrastructureError: String(infrastructureError) } : {}),\n // No acceptance, as everywhere in this lane: a human commit is the only acceptance.\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 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 return this.foundationExecutor.execute({\n domainPlan,\n elicitationAnswers: input.elicitationAnswers ?? [],\n ...(input.dryRun === true ? { dryRun: true } : {}),\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 const composeGenerationOutputs = async (effective: typeof playbook): Promise<readonly PlaybookGenerationRequest[]> => {\n const workspaceTruthSection = await this.composeWorkspaceTruthSection(effective);\n const compliancePrimaryFactsSection = await this.composeCompliancePrimaryFactsSection(effective);\n const documentBlueprintSection = this.composeDocumentBlueprintSection(effective);\n const documentFactObligationsSection = this.composeDocumentFactObligationsSection(effective);\n const assuranceProgramAuthoritySection = this.composeAssuranceProgramAuthoritySection(effective);\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 brief: this.composeBrief({\n playbookRef: input.playbookRef,\n guidance: playbook.method?.guidance ?? '',\n family: output.family,\n creatorBrief: input.creatorBrief,\n elicitationSection,\n inputTruthSection: this.composeInputTruthSection(effective, artifactState),\n workspaceTruthSection,\n compliancePrimaryFactsSection,\n documentBlueprintSection,\n documentFactObligationsSection,\n assuranceProgramAuthoritySection,\n skillCatalogSection: this.composeSkillCatalogSection(effective),\n coherenceSection: this.composeCoherenceSection(effective, artifactState),\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: { verdict: BriefAdequacyVerdict; addedSources: readonly MetaWorkflow_ContextSource[] } | undefined;\n if (playbook.method?.briefAdequacyGate === true && outputs.length > 0) {\n const judged = await this.judgeBriefAdequacy(playbook, outputs[0]!.brief);\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 if (judged.verdict === BriefAdequacyVerdict.INSUFFICIENT && addedSources.length > 0) {\n const widened = {\n ...playbook,\n method: { ...playbook.method, contextSources: [...declared, ...addedSources] },\n } as typeof playbook;\n outputs = await composeGenerationOutputs(widened);\n briefAdequacy = { verdict: BriefAdequacyVerdict.INSUFFICIENT, addedSources };\n this.logDebug('Brief-adequacy gate repaired the brief', { playbookRef: input.playbookRef, addedSources });\n } else {\n briefAdequacy = { verdict: judged.verdict, addedSources: [] };\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 });\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 const result = await runPlaybookGeneration({\n playbookRef: input.playbookRef,\n outputs,\n specificationsPackageRoot,\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: 'application',\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 /*\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 // 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 ...(await this.resolveRequiredDocumentSetInput(artifactState)),\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 !== PlaybookClarificationAction.DECLINE,\n },\n }\n : {}),\n });\n\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 suspendedRunId = `${input.session?.sessionId ?? 'run'}-${input.playbookRef.replace(/[^a-zA-Z0-9._-]+/g, '-')}-${Date.now()}`;\n const round = (input.clarification?.round ?? 0) + 1;\n const record: SuspendedPlaybookRun = {\n runId: suspendedRunId,\n playbookRef: input.playbookRef,\n family: result.family,\n suspendedAt: new Date().toISOString(),\n round,\n ...(input.creatorBrief ? { creatorBrief: input.creatorBrief } : {}),\n elicitationAnswers: (input.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 * The checkpoint is a MUTABLE record on its way to JSON; a request is a readonly view.\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 await this.suspendedRuns.save(record);\n return {\n status: 'awaiting_creator_input' as const,\n runId: suspendedRunId,\n playbookRef: input.playbookRef,\n family: result.family,\n round,\n requests: result.requests,\n };\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 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 const 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 let runId: string | undefined;\n if (input.dryRun !== true) {\n runId = `${input.session?.sessionId ?? 'run'}-${input.playbookRef.replace(/[^a-zA-Z0-9._-]+/g, '-')}-${Date.now()}`;\n const specificationsRelativeRoot = path.relative(this.companionContext.saasRoot, specificationsPackageRoot);\n await this.writeRegister\n .record({\n runId,\n playbookRef: input.playbookRef,\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 })),\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 runId = undefined;\n });\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 judge = treatment.success\n ? await runPlaybookJudge({\n playbookRef: input.playbookRef,\n treatment: treatment.data,\n landed: result.landedValues,\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 || 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-${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 // 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 return {\n ...slim,\n reviewGuide,\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 ...(runId !== undefined ? { runId } : {}),\n ...(input.dryRun === true ? { dryRun: true } : {}),\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 if (!stepResults || stepResults.size === 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 ...[...stepResults.entries()].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 ): Promise<{ verdict: BriefAdequacyVerdict; missingSources: readonly MetaWorkflow_ContextSource[] } | 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 if (undeclared.length === 0) return null;\n const prompt = [\n 'Judge whether the generation brief below is SUFFICIENT to produce its declared artifact.',\n 'If it is not, name which of these UNDECLARED context sources would repair it (these are the only',\n `admissible proposals): ${undeclared.join(', ')}`,\n '',\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 return { verdict: parsed.data.verdict, missingSources: parsed.data.missingSources };\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 readonly elicitationSection: string;\n readonly inputTruthSection: string;\n readonly workspaceTruthSection: 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 skillCatalogSection: string;\n readonly clarificationAnswersSection: string;\n readonly coherenceSection: 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 ...(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 // 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.compliancePrimaryFactsSection ? ['', input.compliancePrimaryFactsSection] : []),\n ...(input.skillCatalogSection ? ['', input.skillCatalogSection] : []),\n ...(input.coherenceSection ? ['', input.coherenceSection] : []),\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 private composeDocumentBlueprintSection(playbook: MetaWorkflowPlaybook | undefined): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.DOCUMENT_BLUEPRINT)) return '';\n return composeAssuranceDocumentBlueprintBrief(DRAFTABLE_DOCUMENT_DEFINITION_REFS);\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 /** The closed objective/source sets a compliance programme may draw on. See {@link composeAssuranceProgramAuthorityBrief}. */\n private composeAssuranceProgramAuthoritySection(playbook: MetaWorkflowPlaybook | undefined): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.ASSURANCE_PROGRAM_AUTHORITY)) return '';\n return composeAssuranceProgramAuthorityBrief();\n }\n\n private composeDocumentFactObligationsSection(playbook: MetaWorkflowPlaybook | undefined): string {\n if (!playbookDeclaresContextSource(playbook, MetaWorkflow_ContextSource.DOCUMENT_FACT_OBLIGATIONS)) return '';\n return composeAssuranceDocumentFactObligationsBrief(FACT_OBLIGATION_DOCUMENT_DEFINITION_REFS);\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 { backendConfig } = await loadBackendCompanionExports(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 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 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 withPersonalDataCategories?: number;\n withUncategorizedPersonalFields?: number;\n }>;\n undeclaredResourceTypes?: readonly string[];\n personalDataCategories?: readonly string[];\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 + `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 : ['(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 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 const declaredCapabilities = [...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 * 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 const runtimeScopedProviderRefs = [...new Set(configuredProviderScopes.flatMap((entry) => entry.providerRefs))].sort();\n const profileOnlyProviderRefs = Object.keys(saasConfig.providerConfigurations ?? {})\n .filter((providerRef) => !runtimeScopedProviderRefs.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 of its own. `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 '## 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 ...((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 COMPOSED of',\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 (${declaredCapabilities.length}): ${declaredCapabilities.map((capability) => `\\`${capability}\\``).join(', ')}`\n : 'Declared engine capabilities: NONE.',\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 ...(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 ...renderProviderComplianceChoices(runtimeScopedProviderRefs, saasConfig.providerComplianceChoices),\n ...renderAppAssertedProcessingRegions(saasConfig.providerComplianceChoices),\n ...renderCodingModelDestinations(saasConfig.providerConfigurations),\n '',\n ...renderRetentionSchedule(saasConfig.dataRetention),\n '',\n // Joined to the RUNTIME-SCOPED set: a profile with no runtime binding is not a recipient.\n ...renderProcessorRegister(runtimeScopedProviderRefs, await this.resolveProcessorRegister(), saasConfig.providerComplianceChoices),\n '',\n ...renderAiUsePosture(new Set(declaredCapabilities), saasConfig.aiUsePosture),\n '',\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 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 const resourceRef = resourceType\n .replace(/([a-z0-9])([A-Z])/g, '$1-$2')\n .replace(/[_\\s]+/g, '-')\n .toLowerCase();\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 ].join('\\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 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 private composeInputTruthSection(\n playbook: { readonly inputs?: readonly { readonly family: string; readonly intent?: MetaWorkflow_ArtifactIntent }[] },\n state: PlaybookArtifactState,\n ): string {\n const sections: string[] = [];\n for (const declaredInput of playbook.inputs ?? []) {\n const value = state.artifactsByFamily.get(declaredInput.family);\n if (value === undefined || value === null || value === FILE_PRESENT_WITHOUT_VALUE) continue;\n // The playbook's DECLARED intent decides how much of the family it reads. Absent = everything,\n // which is what every playbook did before intents existed.\n sections.push(`## Input family: ${declaredInput.family}\\n${renderInputFamilyContext(declaredInput.family, value, declaredInput.intent)}`);\n }\n if (sections.length === 0) return '';\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 '',\n sections.join('\\n\\n'),\n ].join('\\n');\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 * The composite executing in THIS process, if any.\n *\n * In memory on purpose, and it is the half a checkpoint cannot supply: a checkpoint appears only\n * after the first iteration COMPLETES, so a run that is three minutes into its first agent turn —\n * the most expensive moment to interrupt — is on disk nowhere. This is what lets a reader see it.\n *\n * Its counterpart is the checkpoint listing, which reports runs whose process is GONE. Together\n * they answer the two different questions a developer has before saving a file: is something\n * running right now, and did something die that I could resume.\n */\n private activeChoreography: { readonly playbookRef: string; readonly startedAt: string } | null = null;\n\n /** What is running in this process, and what died leaving a resumable checkpoint. */\n public async readRunsInFlight(): Promise<{\n running: { readonly playbookRef: string; readonly startedAt: string } | null;\n interrupted: Awaited<ReturnType<PlaybookChoreographyCheckpointCompanionService['list']>>;\n lastCompleted: readonly PlaybookDetachedRunRecord[];\n }> {\n return {\n running: this.activeChoreography,\n interrupted: await this.choreographyCheckpoints.list(),\n lastCompleted: [...this.lastCompletedDetachedRuns.values()],\n };\n }\n\n /**\n * The most recent DETACHED run outcome per playbook ref — 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 ref, because the question this answers is \"what happened to the run I submitted\", not a\n * history — the traces are the history.\n */\n private lastCompletedDetachedRuns = new Map<string, PlaybookDetachedRunRecord>();\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 public submitPlaybookRunDetached(input: Parameters<PlaybookRunCompanionService['runPlaybook']>[0]): {\n readonly accepted: false;\n readonly async: true;\n readonly playbookRef: string;\n readonly note: string;\n } {\n const startedAt = new Date().toISOString();\n void this.runPlaybook(input)\n .then((result) => {\n this.lastCompletedDetachedRuns.set(input.playbookRef, {\n playbookRef: input.playbookRef,\n startedAt,\n finishedAt: new Date().toISOString(),\n ok: true,\n result,\n });\n })\n .catch((error: unknown) => {\n this.lastCompletedDetachedRuns.set(input.playbookRef, {\n playbookRef: input.playbookRef,\n startedAt,\n finishedAt: new Date().toISOString(),\n ok: false,\n error: error instanceof Error ? error.message : JSON.stringify(error)?.slice(0, 500) ?? 'unknown',\n });\n });\n return {\n accepted: false,\n async: true,\n playbookRef: input.playbookRef,\n note: 'Submitted. Poll GET /playbooks/runs — `running` while in flight, then your outcome in `lastCompleted`. '\n + 'Validation failures (an unanswered elicitation, an ineligible playbook) surface there too, not as an HTTP error.',\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(): Promise<Awaited<ReturnType<PlaybookSuspendedRunCompanionService['list']>>> {\n return this.suspendedRuns.list();\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 a runaway circuit '\n + 'breaker (default 1000 calls/hour, WILDO_PLAYBOOK_MODEL_CALL_HOURLY_BREAKER to change). '\n + '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 }) => {\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 const candidates: unknown[] = [];\n for (let index = 0; index < panel.candidateCount; index += 1) {\n const value = await produce(index, panel.candidateCount);\n if (value !== undefined) candidates.push(value);\n }\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 panel,\n briefContext: prompt,\n label,\n producer: {\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 private buildGenerationPort(): PlaybookStructuredGenerationPort {\n return {\n generate: async ({ prompt, schema, label }) => {\n this.assertPlaybookModelCallBreaker();\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 input: { prompt, schema },\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 const failure = (response.executionContext as {\n structuredGenerationFailure?: {\n message?: string;\n validationIssues?: ReadonlyArray<{ code?: string; path?: ReadonlyArray<string | number> }>;\n };\n } | undefined)?.structuredGenerationFailure;\n const generationFindings = (failure?.validationIssues ?? []).map((issue) =>\n `${(issue.path ?? []).map(String).join('.') || '<root>'}: ${issue.code ?? 'invalid'} (rejected by the provider's schema validation)`,\n );\n return {\n output: (response.output as { object?: unknown } | undefined)?.object,\n ...(generationFindings.length > 0\n ? { generationFindings }\n : failure?.message\n ? { generationFindings: [`<root>: ${failure.message}`] }\n : {}),\n };\n },\n };\n }\n}\n"]}
|