@wildo-ai/dev-companion 1.1.14 → 1.1.15

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.
Files changed (138) hide show
  1. package/dist/esm/.tsbuildinfo +1 -1
  2. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts +68 -1
  3. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.d.ts.map +1 -1
  4. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js +77 -5
  5. package/dist/esm/claude-cli/models/coding-agent-dispatch.models.js.map +1 -1
  6. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts +46 -1
  7. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.d.ts.map +1 -1
  8. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js +39 -2
  9. package/dist/esm/claude-cli/models/concurrent-coding-runs.models.js.map +1 -1
  10. package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.d.ts +6 -0
  11. package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.d.ts.map +1 -1
  12. package/dist/esm/claude-cli/models/shared-tree-reconciliation.models.js.map +1 -1
  13. package/dist/esm/claude-cli/models/verification-tool-availability.models.d.ts +19 -5
  14. package/dist/esm/claude-cli/models/verification-tool-availability.models.d.ts.map +1 -1
  15. package/dist/esm/claude-cli/models/verification-tool-availability.models.js +17 -5
  16. package/dist/esm/claude-cli/models/verification-tool-availability.models.js.map +1 -1
  17. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts +16 -1
  18. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.d.ts.map +1 -1
  19. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js +44 -4
  20. package/dist/esm/claude-cli/services/accepted-change-commit.companion.service.js.map +1 -1
  21. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts +79 -6
  22. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.d.ts.map +1 -1
  23. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js +291 -40
  24. package/dist/esm/claude-cli/services/coding-agent-dispatch.companion.service.js.map +1 -1
  25. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts +14 -0
  26. package/dist/esm/claude-cli/services/research-evidence-store.companion.d.ts.map +1 -1
  27. package/dist/esm/claude-cli/services/research-evidence-store.companion.js +35 -0
  28. package/dist/esm/claude-cli/services/research-evidence-store.companion.js.map +1 -1
  29. package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.d.ts +36 -0
  30. package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.d.ts.map +1 -0
  31. package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.js +134 -0
  32. package/dist/esm/claude-cli/services/unrecorded-provider-directories.companion.js.map +1 -0
  33. package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts +3 -2
  34. package/dist/esm/core/introspection/services/translation-placement.companion.service.d.ts.map +1 -1
  35. package/dist/esm/core/introspection/services/translation-placement.companion.service.js.map +1 -1
  36. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.d.ts.map +1 -1
  37. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js +24 -14
  38. package/dist/esm/core/introspection/subprocess/companion-introspection-behavior-handlers.js.map +1 -1
  39. package/dist/esm/core/introspection/workspace-element-index.companion.d.ts +42 -0
  40. package/dist/esm/core/introspection/workspace-element-index.companion.d.ts.map +1 -1
  41. package/dist/esm/core/introspection/workspace-element-index.companion.js +42 -0
  42. package/dist/esm/core/introspection/workspace-element-index.companion.js.map +1 -1
  43. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts +53 -0
  44. package/dist/esm/core/runtime/dev-compile-quiet.companion.d.ts.map +1 -1
  45. package/dist/esm/core/runtime/dev-compile-quiet.companion.js +119 -2
  46. package/dist/esm/core/runtime/dev-compile-quiet.companion.js.map +1 -1
  47. package/dist/esm/core/runtime/services/start-companion-application.service.d.ts.map +1 -1
  48. package/dist/esm/core/runtime/services/start-companion-application.service.js +13 -1
  49. package/dist/esm/core/runtime/services/start-companion-application.service.js.map +1 -1
  50. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts +2 -2
  51. package/dist/esm/core/runtime/utils/companion-platform-config.companion.d.ts.map +1 -1
  52. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js +6 -6
  53. package/dist/esm/core/runtime/utils/companion-platform-config.companion.js.map +1 -1
  54. package/dist/esm/email/services/email-template.companion.service.d.ts +5 -0
  55. package/dist/esm/email/services/email-template.companion.service.d.ts.map +1 -1
  56. package/dist/esm/email/services/email-template.companion.service.js +44 -11
  57. package/dist/esm/email/services/email-template.companion.service.js.map +1 -1
  58. package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts +26 -2
  59. package/dist/esm/email/utils/email-template-fs-discovery.utils.d.ts.map +1 -1
  60. package/dist/esm/email/utils/email-template-fs-discovery.utils.js +41 -2
  61. package/dist/esm/email/utils/email-template-fs-discovery.utils.js.map +1 -1
  62. package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.d.ts +19 -0
  63. package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.d.ts.map +1 -0
  64. package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.js +171 -0
  65. package/dist/esm/email/utils/email-template-scanner-calls.companion.utils.js.map +1 -0
  66. package/dist/esm/email/utils/module-email-root.companion.utils.d.ts +75 -0
  67. package/dist/esm/email/utils/module-email-root.companion.utils.d.ts.map +1 -0
  68. package/dist/esm/email/utils/module-email-root.companion.utils.js +162 -0
  69. package/dist/esm/email/utils/module-email-root.companion.utils.js.map +1 -0
  70. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts +1 -0
  71. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.d.ts.map +1 -1
  72. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js +1 -0
  73. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.en.js.map +1 -1
  74. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.d.ts +1 -0
  75. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.d.ts.map +1 -1
  76. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.js +1 -0
  77. package/dist/esm/i18n/components/LOW_LEVEL_AI_AGENT_CONFIG.fr.js.map +1 -1
  78. package/dist/esm/i18n/resources/workbenchAspects.en.d.ts.map +1 -1
  79. package/dist/esm/i18n/resources/workbenchAspects.en.js +4 -0
  80. package/dist/esm/i18n/resources/workbenchAspects.en.js.map +1 -1
  81. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts +35 -0
  82. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.d.ts.map +1 -1
  83. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js +12 -0
  84. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.en.js.map +1 -1
  85. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts +536 -531
  86. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.d.ts.map +1 -1
  87. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js +536 -531
  88. package/dist/esm/i18n/resources/workbenchSpecificationArtifacts.fr.js.map +1 -1
  89. package/dist/esm/i18n/system_enums/workbench-build.en.d.ts +2 -2
  90. package/dist/esm/i18n/system_enums/workbench-build.en.js +2 -2
  91. package/dist/esm/i18n/system_enums/workbench-build.en.js.map +1 -1
  92. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.d.ts.map +1 -1
  93. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js +7 -3
  94. package/dist/esm/i18n-labelling/services/email-template-labelling-units.companion.service.js.map +1 -1
  95. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts +9 -0
  96. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.d.ts.map +1 -1
  97. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js +18 -2
  98. package/dist/esm/meta-workflows/models/creation-journey-timeline.models.js.map +1 -1
  99. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts +33 -6
  100. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.d.ts.map +1 -1
  101. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js +97 -19
  102. package/dist/esm/meta-workflows/services/application-build-dispatch.companion.service.js.map +1 -1
  103. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts +21 -8
  104. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.d.ts.map +1 -1
  105. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js +65 -12
  106. package/dist/esm/meta-workflows/services/application-build-follow-up-derivation.companion.js.map +1 -1
  107. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts +1 -1
  108. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.d.ts.map +1 -1
  109. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js +48 -26
  110. package/dist/esm/meta-workflows/services/application-build-task-coding-policy.companion.service.js.map +1 -1
  111. package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.d.ts +12 -0
  112. package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.d.ts.map +1 -1
  113. package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.js +30 -1
  114. package/dist/esm/meta-workflows/services/build-task-brief-application-facts.companion.js.map +1 -1
  115. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.d.ts.map +1 -1
  116. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js +12 -1
  117. package/dist/esm/meta-workflows/services/creation-run-report.companion.service.js.map +1 -1
  118. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts +7 -0
  119. package/dist/esm/meta-workflows/services/playbook-run.companion.service.d.ts.map +1 -1
  120. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js +81 -4
  121. package/dist/esm/meta-workflows/services/playbook-run.companion.service.js.map +1 -1
  122. package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.d.ts +55 -1
  123. package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.d.ts.map +1 -1
  124. package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.js +157 -10
  125. package/dist/esm/meta-workflows/services/provider-registry-brief.companion.utils.js.map +1 -1
  126. package/dist/esm/module-layout/module-layout-convention.companion.d.ts +158 -0
  127. package/dist/esm/module-layout/module-layout-convention.companion.d.ts.map +1 -0
  128. package/dist/esm/module-layout/module-layout-convention.companion.js +272 -0
  129. package/dist/esm/module-layout/module-layout-convention.companion.js.map +1 -0
  130. package/dist/esm/module-layout/module-layout-inspection.companion.d.ts +42 -0
  131. package/dist/esm/module-layout/module-layout-inspection.companion.d.ts.map +1 -0
  132. package/dist/esm/module-layout/module-layout-inspection.companion.js +290 -0
  133. package/dist/esm/module-layout/module-layout-inspection.companion.js.map +1 -0
  134. package/dist/esm/module-layout/module-source-files.companion.d.ts +3 -0
  135. package/dist/esm/module-layout/module-source-files.companion.d.ts.map +1 -0
  136. package/dist/esm/module-layout/module-source-files.companion.js +45 -0
  137. package/dist/esm/module-layout/module-source-files.companion.js.map +1 -0
  138. package/package.json +17 -17
@@ -1 +1 @@
1
- {"version":3,"file":"application-build-task-coding-policy.companion.service.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/application-build-task-coding-policy.companion.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,qBAAqB,EACrB,gBAAgB,EAChB,oBAAoB,EACpB,uBAAuB,EAEvB,gCAAgC,EAChC,8BAA8B,EAC9B,iCAAiC,EACjC,oBAAoB,EACpB,qBAAqB,EAErB,qCAAqC,EACrC,yBAAyB,EACzB,2BAA2B,EAC3B,wBA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Kind,\n BuildPlanWorkerRuntime,\n ApplicationGuidanceKind,\n FrontendConfigSurface,\n PlacementSurface,\n ProviderBindingScope,\n BuildPlanTaskTargetKind,\n type BuildPlanTask,\n isScaffoldedResourceOperationRef,\n isScaffoldedWebsiteStarterPage,\n isScaffoldedWebsiteStarterSection,\n PlacementSubjectKind,\n placementViewIdentity,\n type PlacementSubject,\n INTEGRATION_INBOUND_CHANNEL_SKILL_REF,\n BILLING_CATALOG_SKILL_REF,\n APPLICATION_ROLES_SKILL_REF,\n BuildPlanDataSeedContent,\n DATA_SEED_SKILL_REF,\n PDF_TEMPLATE_SKILL_REF,\n ORGANIZATION_RELATIONSHIPS_SKILL_REF,\n RESOURCE_RETENTION_SKILL_REF,\n AGENT_APPROVAL_GATE_SKILL_REF,\n AI_USE_DECLARATION_SKILL_REF,\n BUILD_PLAN_AGENT_SHAPE_SKILL_REF,\n BuildPlanAgentShape,\n WORK_UNIT_SKILL_REF,\n ORGANIZATION_TYPE_SKILL_REF,\n ORGANIZATION_UNIT_CONFINEMENT_SKILL_REF,\n SYSTEM_OF_RECORD_BINDING_SKILL_REFS,\n type BuildPlanTaskProduct,\n} from '@wildo-ai/saas-specifications/application-creation';\nimport { posix } from 'node:path';\nimport { AgentWorkShortfallKind, isOrganizationRoleOfferedByType, SystemOfRecordAccess, type AgentWorkDeclarations, type AgentWorkShortfall, type RelationshipConferralDeclaration, type UnreadableResourceConfiguration } from '@wildo-ai/saas-models';\nimport { LauncherItemTargetKind } from '@wildo-ai/saas-frontend-lib/companion';\nimport { AvailableLanguage, languagePathSegment } from '@wildo-ai/presets-components-models';\n\nimport { PACKAGE_TYPECHECK_CHECK_REF_PREFIX, packageTypecheckCheckRef } from '../../claude-cli/models/coding-agent-dispatch.models';\nimport { flattenNestedStringLabels, parseNestedLabelsTsSource } from '../../i18n-labelling/utils/label-file-source.utils';\nimport {\n createInitialAssuranceDocumentAuthorityCatalog,\n selectAssuranceDocumentBlueprintForDocumentRef,\n} from '@wildo-ai/saas-specifications/assurance';\nimport { BUILD_TASK_DECISIONS_DEFAULT_APPLICATION_PATH } from '../models/build-task-decisions-path.models';\nimport { blankSourceComments } from '@wildo-ai/saas-models/public-runtime';\n\n/**\n * Host-owned translation of a typed build-plan task into the physical coding\n * boundary the F2 coding host enforces: the application-root-relative path\n * prefixes the run may mutate and the verification checks that must pass\n * afterwards. The model never chooses either — the typed task carries a closed\n * `target.kind`, the target switch below is the ONLY place that kind becomes\n * paths, and the checks are DERIVED from those paths (`deriveRequiredCheckRefs`,\n * #1540). Prefixes follow the standard Wildo application layout\n * (`shared-lib/`, `backend-api/`, `frontend/`, `specifications/`, each with\n * `src/modules/<module>/`).\n */\nexport interface ApplicationBuildTaskCodingPolicy {\n readonly allowedPathPrefixes: readonly string[];\n readonly prohibitedPathPrefixes: readonly string[];\n readonly requiredCheckRefs: readonly string[];\n}\n\n/** A build task no coding agent may run: the companion owns it (labels, seeds, emails…). */\nexport class ApplicationBuildTaskNotACodingTaskError extends Error {\n public constructor(public readonly taskRef: string, public readonly generationStepRef: string) {\n super(`Build task ${taskRef} is a companion generation step (${generationStepRef}); it is never dispatched to a coding agent.`);\n this.name = 'ApplicationBuildTaskNotACodingTaskError';\n }\n}\n\nconst MODULE_REGISTRY_FILES = [\n 'shared-lib/src/modules-registry.shared.ts',\n 'backend-api/src/modules-registry.backend.ts',\n 'frontend/src/modules-registry.frontend.ts',\n 'shared-lib/src/modules/index.ts',\n 'backend-api/src/modules/index.ts',\n 'frontend/src/modules/index.ts',\n] as const;\n\n/**\n * The one thing a build task may never touch.\n *\n * ## This list SHRANK on purpose, and both removals reverse a decision (#1268)\n *\n * It read `['.wildo-saas/', 'wildo.saas.config.ts', 'infrastructure/']`, under the sentence\n * *\"Nothing a build task does may touch the companion, its state, or the application's declared\n * identity/config.\"* Two of those three are gone by DECISION, not by oversight — Paul, 2026-09-17:\n * *\"we need to send the more permissive rights to update things … we will see after for potential\n * restrictions on that, but, not an emergency.\"*\n *\n * `wildo.saas.config.ts` had to go first: #1272 asks the journey to ENABLE an engine capability, and\n * a capability is enabled in that file. A prohibition on it makes a \"full application\" — one with\n * billing, email or a second locale — unreachable by any run.\n *\n * `infrastructure/` follows the same decision. Neither removal is an oversight to restore; if the\n * restriction comes back it should come back as a judge-style guard, which is what\n * `application-creation-directive.md` asks for.\n *\n * ## `.wildo-saas/` STAYS, and it is not a policy preference\n *\n * It is the companion's own runtime and its state, including the records of the run that is\n * executing. An agent writing there kills the run dispatching it, so the prohibition protects the\n * mechanism rather than the product.\n */\nconst ALWAYS_PROHIBITED_PREFIXES = ['.wildo-saas/'] as const;\n\n/**\n * Files only a PERSON's door writes, prohibited to every coding run whatever its target (review of 8d6b95d29): the\n * build-task decisions (`wildo build close` / `approve`). A run that wrote one could make a task read as closed, declined\n * or approved by a person who never decided. This confines the agent's FILE EDITS only: a shell command declares no\n * path, so an `UNRESTRICTED` profile can still write the file; the reader's content check is what holds then. Kept apart from {@link ALWAYS_PROHIBITED_PREFIXES}, which also feeds the\n * top-level entries never in scope, because these are single files inside a tree runs do write. The accept doors refuse\n * them too (`AcceptRefusalReason.PERSON_DECISION_RECORD`), and the reader honours them only from the door's own commit.\n */\n// The SCAFFOLDED location (`specifications/` at the application root): this policy is static and names it the way it\n// names every other `specifications/src/…` path. An application that configures its specifications package elsewhere is\n// still covered at the accept doors, which refuse the CONFIGURED location too (`isBuildTaskDecisionsPath`), and by the\n// reader, which honours only a door's bytes; only the agent's edit-time refusal names the default.\nconst PERSON_DECISION_RECORD_PATHS: readonly string[] = [BUILD_TASK_DECISIONS_DEFAULT_APPLICATION_PATH];\n\n/** What every coding run is prohibited from writing: the companion's runtime and the person's decision records. */\nconst PROHIBITED_TO_EVERY_RUN: readonly string[] = [...ALWAYS_PROHIBITED_PREFIXES, ...PERSON_DECISION_RECORD_PATHS];\n\n/**\n * Top-level workspace entries no coding run may write, whatever the policy is.\n *\n * Distinct from the prohibition above, which is a POLICY the predicate enforces; this is a\n * derivation filter, so these never enter the allowed set in the first place.\n *\n * ## The rule: the widening's safety story is GIT, so an entry git cannot restore is outside it\n *\n * `application-creation-directive.md` makes mutation free and names the reason — \"git makes every\n * change visible and reversible; that is the whole safety story for now\". Every entry below is one\n * that story does not cover, so excluding it is that argument applied rather than a restriction\n * placed on top of it:\n *\n * - **`.git`** — a run that can rewrite history can undo the one thing that makes every other\n * write reversible.\n * - **`.env` and its siblings** — gitignored by construction, so a rewrite has NO undo at all. They\n * also hold the local admin and infrastructure credentials, and every application's own\n * dispatched-agent rule already says an agent may not alter credentials.\n * - **`node_modules`** — regenerable rather than dangerous; excluded so a change set never has to\n * reason about it.\n *\n * Found by RUNNING the predicate rather than by reading the derivation: a probe against the real\n * Wonder Todos workspace listed `.env` in the admitted set, which no reading of \"the whole\n * application workspace\" had made visible.\n */\nconst WORKSPACE_ENTRIES_NEVER_IN_SCOPE: readonly string[] = ['.git', 'node_modules', ...ALWAYS_PROHIBITED_PREFIXES.map((prefix) => prefix.replace(/\\/$/, ''))];\n\n/** `.env`, `.env.local`, `.env.wildo-platform` — the whole dot-env family, matched by prefix. */\nconst DOT_ENV_ENTRY_PREFIX = '.env';\n\n/**\n * The application workspace as a mutation scope — every top-level entry that is not excluded above.\n *\n * ## Why it is DERIVED and not a list\n *\n * There is no prefix meaning \"everything\". The live predicate matches with a path boundary —\n * `path === prefix || path.startsWith(prefix + '/')` — so the empty string matches NOTHING, and\n * supplying it would build a guard that silently denies every path, which that file's own realpath\n * comment records as worse than a guard that denies none.\n *\n * So the whole workspace has to be named entry by entry, and naming them by hand would be a second\n * copy of the application layout. Measured 2026-09-17: Wonder Todos has 19 top-level entries and\n * Wonder CRM 15, and the difference is composition scenarios — `website`, `technical-doc`,\n * `minions`, `workers`, `e2e` arrive with `wildo compose`. A literal list goes stale the day a\n * scenario adds a package, and goes stale as a REFUSAL: the run is confined away from the package it\n * was asked to write, which is the defect this whole change exists to remove, one level up.\n *\n * Derived from what exists, it cannot rot.\n */\nexport function resolveApplicationWorkspaceMutationScope(\n applicationWorkspaceEntries: readonly string[],\n): readonly string[] {\n return applicationWorkspaceEntries.filter(\n (entry) => !WORKSPACE_ENTRIES_NEVER_IN_SCOPE.includes(entry) && !entry.startsWith(DOT_ENV_ENTRY_PREFIX),\n );\n}\n\n/**\n * The ONE config file each shell surface's placement is authored in.\n *\n * A file path, not a directory prefix, and that is the point: `frontend/src/config/`\n * would also hand the task the design-system, navigation and global-views configs,\n * none of which a placement decision may touch. The prefix match is `startsWith`, so\n * a full file path allows exactly that file.\n */\nconst SHELL_PLACEMENT_CONFIG_FILE: Readonly<Record<PlacementSurface, string>> = {\n [PlacementSurface.SETTINGS_HUB]: 'frontend/src/config/settings-hub.config.ts',\n [PlacementSurface.SIDEBAR]: 'frontend/src/config/app-shell.config.ts',\n [PlacementSurface.USER_MENU]: 'frontend/src/config/app-shell.config.ts',\n [PlacementSurface.COMMAND_MENU]: 'frontend/src/config/app-shell.config.ts',\n};\n\n/**\n * The ONE config file each application-wide frontend surface is composed in (#1490). Same technique\n * as the placement table above, for the same reason: a full file path allows exactly that file.\n * Total over the vocabulary, so a surface added tomorrow does not compile until it names its file.\n */\nconst FRONTEND_CONFIG_FILE: Readonly<Record<FrontendConfigSurface, string>> = {\n [FrontendConfigSurface.NAVIGATION]: 'frontend/src/config/navigation.config.ts',\n [FrontendConfigSurface.DESIGN_SYSTEM]: 'frontend/src/config/design-system.config.ts',\n [FrontendConfigSurface.APP_SHELL]: 'frontend/src/config/app-shell.config.ts',\n [FrontendConfigSurface.GLOBAL_VIEWS]: 'frontend/src/config/global-views.config.ts',\n /**\n * The shell layout is one registration line in the engine registrations file (`register2DLayout(MORPH_LAYOUT_2D)`),\n * the only list that runs after the framework presets. The landing probe finds its declaration there: the layout\n * constant, written out — a bare `register2DLayout()` (glide by default) names nothing and would never land.\n */\n [FrontendConfigSurface.SHELL_LAYOUT]: 'frontend/src/engine/component-registrations.frontend.ts',\n};\n\n/**\n * The one file a frontend config surface is composed in — the file an `APPLICATION_FRONTEND_CONFIG` task\n * targeting that surface may write.\n *\n * Exported for the `design-tokens` generation step (#2358), which regenerates the stylesheet belonging to\n * the design-system config a DESIGN_SYSTEM task wrote, and must therefore find that config where the task\n * found it rather than restate the path.\n */\nexport function resolveFrontendConfigSurfaceFile(surface: FrontendConfigSurface): string {\n return FRONTEND_CONFIG_FILE[surface];\n}\n\n/**\n * The application's billing catalogue (#1835): the `ProductDefinition[]` the backend syncs to the billing\n * provider and the public website reads for its pricing page. One file, written by `wildo init` with an\n * empty catalogue — every scaffolded application has it — and the only file a `BILLING_CATALOG` task\n * writes besides the product specifications.\n */\nconst BILLING_CATALOG_FILE = 'shared-lib/src/engine/product.ts';\n\n/**\n * The application's role table (#2490): `CUSTOM_ROLES_CONFIGURATION`, written by `wildo init` with an empty\n * record — every scaffolded application has it — keyed by each role's name.\n */\nconst APPLICATION_ROLES_FILE = 'shared-lib/src/engine/roles.ts';\n/** The application's configuration: where its organization types and relationship kinds are declared (#2305 S6). */\nconst APPLICATION_SAAS_CONFIG_FILE = 'wildo.saas.config.ts';\n/**\n * The backend's startup configuration (#3036): where an application declares `organizationUnitNarrowing` and\n * `organizationOwnRows`, the confinements of its rows below the whole organization. Written by `wildo init` with empty\n * maps, so the file existing proves nothing; what the backend assembles from it at startup does.\n */\nconst BACKEND_STARTUP_CONFIGURATION_FILE = 'backend-api/src/bootstrap-config.ts';\n/**\n * The backend's own configuration (#3044): where the user types are declared, with their sign-in policy, and which\n * frontend authenticates which of them. Renaming the owner's people (`member` → `employee`) is an edit here, carrying the\n * declared rename (`userTypes.<new>.renamedFrom`) that moves the existing accounts.\n */\nconst BACKEND_CONFIGURATION_FILE = 'backend-api/src/saas-config.backend.ts';\n/** The `moduleRef` of a registry probe whose product belongs to no module (a relationship role, #2305 S6). */\nexport const APPLICATION_WIDE_AGENT_WORK_MODULE_REF = '';\n\n/**\n * The file a provider binding is DECLARED in, per scope (#1490).\n *\n * The backend and companion scopes are blocks of the SaaS config, which the `add-provider` scenario\n * writes; a frontend binding is a companion contribution in the service's own\n * `provider-contributions.ts`, which `add-file-picker-provider` writes. The probe reads the file the\n * scope names and asks whether the provider ref appears in it.\n */\nconst PROVIDER_BINDING_DECLARATION_FILE: Readonly<Record<ProviderBindingScope, string>> = {\n [ProviderBindingScope.BACKEND]: 'wildo.saas.config.ts',\n [ProviderBindingScope.COMPANION]: 'wildo.saas.config.ts',\n [ProviderBindingScope.FRONTEND_APP]: 'frontend/src/provider-contributions.ts',\n [ProviderBindingScope.WEBSITE]: 'website/src/provider-contributions.ts',\n};\n\n/** A worker's entry file, by runtime — where its jobs are declared and where a landing probe reads. */\nconst WORKER_ENTRY_FILE: Readonly<Record<BuildPlanWorkerRuntime, (workerRef: string) => string>> = {\n [BuildPlanWorkerRuntime.NODE]: (workerRef) => `workers/${workerRef}/src/index.ts`,\n [BuildPlanWorkerRuntime.RUST]: (workerRef) => `workers/${workerRef}/src/main.rs`,\n};\n\n/**\n * A documentation chapter's own file, named by its `chapterRef` (#3204). One file per chapter, which nothing imports:\n * publication reads the directory. With one shared declarations file every chapter task wrote the same file, so the\n * dispatch ran them one at a time; measured on reference run 42506906346's plan, 23 chapter tasks made that file the\n * build's longest queue, about 48 minutes at ten runs at once.\n */\nconst technicalDocumentationChapterFile = (chapterRef: string): string => `specifications/src/technical-documentation/chapters/${chapterRef}.ts`;\n/**\n * The companion PUBLISHES here; no task writes it. Prohibited on the documentation target rather\n * than merely absent from its scope, because the workspace widening (#1268) would otherwise admit\n * it through the `technical-doc/` entry.\n */\nconst TECHNICAL_DOCUMENTATION_GENERATED_PREFIX = 'technical-doc/src/generated/';\n\n/**\n * The physical boundary a run may mutate — the target's own scope, WIDENED to reach the paths this\n * task's landing probes say it may WRITE.\n *\n * **The invariant: a task must be able to write where its landing is measured.** Nothing stated it\n * until 2026-09-16, and the two halves had drifted apart in exactly one place. `target` derives the\n * scope and `produces` derives the probes (deliberately — see `BuildPlanTaskLandedProbeKind`, which\n * records why landing must NOT be answered from the write scope). What that separation never said is\n * the converse obligation, so an `APPLICATION_DOCUMENT` product probed\n * `specifications/src/compliance-document-candidates/index.ts` while its `MODULE` target allowed only\n * `specifications/src/modules/<module>/`. The run was confined away from the one file its product can\n * land in: unbuildable by construction, and no correct agent behaviour could have fixed it.\n *\n * Measured on Wonder CRM's `build-task-gdpr-data-handling-governance`, whose agent reported exactly\n * that — \"there is no per-module document location, so the deliverable cannot be written where any\n * document mechanism reads it\" — having spent a full turn deriving it.\n *\n * Widened here rather than corrected per target, so the two cannot disagree again: the scope now\n * FOLLOWS the probes instead of being maintained beside them. Every other product kind is\n * module-relative and already inside its target's scope, so this admits nothing new for them — pinned\n * by `describe('every product kind can be written inside its own task scope')`, whose fixture map is a\n * `Record` keyed on `BuildPlanTaskProductKind`, so a kind added tomorrow does not compile until it\n * states where it lands.\n *\n * ## And then widened AGAIN, to the whole workspace (#1268)\n *\n * Everything above describes what a TARGET means, and it stays true and stays tested — it is what a\n * revert restores to. What the dispatch actually hands the agent is that scope PLUS every top-level\n * entry of the application workspace, by decision rather than by derivation: a task dispatched for\n * one module could not write in another package, nor in `wildo.saas.config.ts`, and was denied\n * `LOCATION_OUT_OF_SCOPE` **even under an UNRESTRICTED permission ceiling** — the ceiling decides the\n * KIND of operation and this predicate decides the PLACE, and only the first was permissive.\n *\n * `applicationWorkspaceEntries` is REQUIRED rather than optional deliberately. An optional widening\n * is one a third call site can forget, and forgetting it restores the refusal this exists to remove.\n */\nexport function resolveBuildPlanTaskCodingPolicy(\n task: BuildPlanTask,\n applicationWorkspaceEntries: readonly string[],\n): ApplicationBuildTaskCodingPolicy {\n const targetPolicy = admitLandedProbePaths(task, resolveBuildPlanTaskTargetCodingPolicy(task));\n return {\n ...targetPolicy,\n /*\n * THE WIDENING (#1268), and the whole of it — one expression, so reverting is deleting a spread.\n *\n * ADDITIVE rather than a replacement, for a property that matters when the derivation has\n * nothing to say: an unreadable or empty workspace listing degrades to the task's own scope,\n * which is exactly today's behaviour, instead of collapsing to an empty scope that\n * `composeBuildTaskCodingContract` refuses. A run that cannot be widened should still run.\n *\n * The task scope is a SUBSET of the workspace whenever the listing is real, so this adds no\n * permission the line below does not already give. What it adds is a floor.\n *\n * The empty-scope refusal survives both ways: a target with no prefixes and a workspace with no\n * entries still composes to nothing, and the contract composer still refuses it by name.\n */\n allowedPathPrefixes: [...new Set([\n ...targetPolicy.allowedPathPrefixes,\n ...resolveApplicationWorkspaceMutationScope(applicationWorkspaceEntries),\n ])],\n };\n}\n\n/**\n * Widen a target-derived scope to admit the paths this task's own landing probes say it may WRITE.\n *\n * The WRITABLE set, never the read set — a probe for a product whose home is not one known path reads\n * several candidates and is satisfied by any of them, and turning that into a write grant hands the\n * run another producer's files. See `writablePaths` on the probe type for the measured case.\n *\n * A probe path is a FILE, so it is added whole: the prefix match is `startsWith`, and a full file path\n * allows exactly that file — the same technique `SHELL_PLACEMENT_CONFIG_FILE` uses, for the same\n * reason (a directory prefix would hand the run its unrelated neighbours).\n *\n * The target's own prohibition list is never crossed. A probe naming a prohibited path would be a\n * defect in the probe, and admitting it here would make the prohibition bypassable by declaring a\n * product.\n */\nfunction admitLandedProbePaths(task: BuildPlanTask, targetPolicy: ApplicationBuildTaskCodingPolicy): ApplicationBuildTaskCodingPolicy {\n /*\n * A scope is a property of the TARGET; probes are a property of the PRODUCTS. So a task whose\n * products cannot be placed — unplaceable, or simply absent — still has a perfectly good write\n * scope, and this widening must not be able to take it away.\n *\n * DEFENCE, not the repair of something production can produce. `produces` carries `.default([])`, and\n * `resolveBuildTaskLandedProbes` returns before `productModuleRef` for both target kinds that could\n * throw, so no plan the companion can PARSE reaches this catch. What makes it worth keeping is what\n * a throw would COST: the scope of a task whose target is perfectly placeable, refused over products\n * that are not. It was first kept for a narrower reason — until #1359 a parked question was resumed\n * by re-composing this boundary inside a `try` whose `catch` meant \"not answerable\", so a throw here\n * became an unresumable question rather than an error someone could read. That path is gone (the\n * parked run carries its admitted contract), and the fallback stays on the general ground. Observed\n * exactly once, against a test fixture that casts its way past the schema — the operator remedy\n * would have been \"declare what the task produces\", which is authoring work and must not gate\n * (`application-creation-directive.md`).\n *\n * Falling back is not swallowing: an unplaceable product already surfaces where it belongs, in the\n * LANDING resolution, which is the question it actually answers.\n */\n let writablePaths: readonly string[];\n try {\n writablePaths = resolveBuildTaskLandedProbes(task).flatMap(buildPlanTaskLandedProbeWritablePaths);\n } catch {\n return targetPolicy;\n }\n const admissible = [...new Set(writablePaths)]\n .filter((probePath) => !targetPolicy.allowedPathPrefixes.some((prefix) => probePath.startsWith(prefix)))\n /*\n * The POLICY'S OWN prohibition list, not the module constant. They are equal today only because\n * `policy()` copies the constant; reading the constant here would let the two drift, and a target\n * that prohibited more than the default would be silently overruled by this widening.\n */\n .filter((probePath) => !targetPolicy.prohibitedPathPrefixes.some((prefix) => probePath.startsWith(prefix)))\n .sort();\n if (admissible.length === 0) return targetPolicy;\n const allowedPathPrefixes = [...targetPolicy.allowedPathPrefixes, ...admissible];\n return {\n ...targetPolicy,\n allowedPathPrefixes,\n // A path this widening admits is a path the task writes, so it obliges the checks that speak about\n // it — a module task whose product lands in the settings rail owes the settings sweep. The target's\n // own set is kept, so a stated exception (a Rust worker) is not re-derived away.\n requiredCheckRefs: orderCheckRefs([...new Set([...targetPolicy.requiredCheckRefs, ...deriveRequiredCheckRefs(admissible)])]),\n };\n}\n\n/**\n * The catalog is engine SOURCE and the lookup is pure, so this is built once and never refreshed.\n * Which catalog you compiled against is a git revision (`one-source-of-truth.md`, Rule 0).\n */\nlet assuranceDocumentCatalog: ReturnType<typeof createInitialAssuranceDocumentAuthorityCatalog> | undefined;\n\n/**\n * The document this task declares it produces, when the engine catalog cannot say what that document\n * must CONTAIN — otherwise `undefined`.\n *\n * A governed document is drafted against a BLUEPRINT: required sections, required facts, claim guards.\n * With no blueprint an agent has nothing to draft against, and the shipped `compliance-document-authoring`\n * skill forbids the only remaining option — inventing the structure. So the task cannot be completed by\n * any run, however good, and dispatching it spends a full agent turn to rediscover that.\n *\n * Measured on Wonder CRM, whose plan declares TWO such products (`gdpr-data-handling-governance` and\n * `terminal-access-governance`). Neither names a document the catalog defines; neither is even in the\n * `document:<namespace>.<id>` shape a landed candidate carries, because the build-plan schema types\n * `documentRef` as a bare slug while the candidate family requires a namespaced ref. The first was\n * dispatched, and its agent spent a turn deriving exactly this — with a positive control, correctly —\n * before reporting that the task could not be built as declared.\n *\n * That is `derive-before-you-ask.md`'s own test failing: a function could have produced that answer, so\n * the question was the defect rather than the agent's handling of it. `selectAssuranceDocumentBlueprintForDocumentRef`\n * is exact — an unprefixed or unknown ref resolves to nothing, and nothing is inferred from a partial\n * match — so this cannot mistake a real document for an absent one.\n *\n * Reported so the SELECTOR can skip, never so a caller can refuse the queue: the remedy is to declare a\n * catalogued document or retire the task, which is authoring work, and authoring work must not gate\n * (`application-creation-directive.md`).\n */\nexport function resolveUndraftableDocumentRef(task: BuildPlanTask): string | undefined {\n assuranceDocumentCatalog ??= createInitialAssuranceDocumentAuthorityCatalog();\n for (const product of task.produces ?? []) {\n if (product.kind !== BuildPlanTaskProductKind.APPLICATION_DOCUMENT) continue;\n if (selectAssuranceDocumentBlueprintForDocumentRef(assuranceDocumentCatalog, product.documentRef) === undefined) {\n return product.documentRef;\n }\n }\n return undefined;\n}\n\n/** Every path a probe READS — total over the probe vocabulary, so a kind added tomorrow must say. */\nexport function buildPlanTaskLandedProbePaths(probe: BuildPlanTaskLandedProbe): readonly string[] {\n switch (probe.kind) {\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE:\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES:\n case BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_FILE_DECLARES_KEYS:\n return [probe.path];\n case BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES:\n return probe.paths;\n case BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_PACKS_DECLARE:\n return [...probe.paths, ...probe.fragmentPaths];\n // The files a shell probe reads are the ones the RESOLVED shell says contribute — known only at\n // evaluation, from the introspection answer, and checked there. Nothing fixed to prime or batch.\n case BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN:\n case BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT:\n return [];\n // The registration files are fixed; the index's imports are read at evaluation (#2966).\n case BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED:\n return probe.registrationFiles;\n default: {\n const unhandled: never = probe;\n throw new Error(`Unhandled build-plan landed probe ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * The paths a probe's producing task may WRITE — a SUBSET of what it reads, never the whole set.\n *\n * The two questions differ and must not share an answer. Landing asks \"is the artifact there?\", and\n * for a product whose home is not one known path it accepts ANY candidate. A mutation scope asks\n * \"what may this run change?\", where admitting every candidate hands the run files that belong to\n * other producers — see `writablePaths` on the probe type for the measured case.\n */\nexport function buildPlanTaskLandedProbeWritablePaths(probe: BuildPlanTaskLandedProbe): readonly string[] {\n switch (probe.kind) {\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE:\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES:\n case BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_FILE_DECLARES_KEYS:\n return [probe.path];\n case BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES:\n return probe.writablePaths;\n // A section writes its words into its OWN file in each locale (#3204), never into the packs other sections share.\n // One case is outside this set: words a site already holds in a PACK (a site scaffolded before #3204) are MOVED out by\n // the task, which edits that pack, and the contention check does not see the edit. Every scenario now seeds a section's\n // words in its own file, so a site created since has no such words.\n case BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_PACKS_DECLARE:\n return probe.fragmentPaths;\n // No grant from the probe: the task's TARGET already names the surface's config file, and a\n // module's contribution file is inside the workspace-wide scope every task now carries.\n case BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN:\n case BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT:\n return [];\n // The registration files only — files, never a directory; the agent's own files sit in the target's module scope.\n case BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED:\n return probe.registrationFiles;\n default: {\n const unhandled: never = probe;\n throw new Error(`Unhandled build-plan landed probe ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * What each build-task check can SPEAK ABOUT: the application paths whose change it can find broken\n * (#1540). A task's required checks are DERIVED from this and from what the task writes — never listed\n * per target kind.\n *\n * ## Why a table of coverage rather than a list per target\n *\n * The required checks used to be a hand-written list per target kind, and a check missing from a list\n * was silent: the task passed, the artifact shipped, and the consequence landed elsewhere.\n * `check:schema-plan-in-sync` was absent from the SCHEMA stage for that stage's whole life, and on the\n * first end-to-end run (#1273) the application's backend crash-looped on a column no migration built.\n * The lists were the only statement of the obligation, so nothing could be compared against them.\n * Now each check states what it covers, each target states what it writes, and the join is a function:\n * a check added tomorrow lands on every target that can break what it checks, without anyone\n * remembering. Its first run found two gaps that no list had recorded — provider bindings write the\n * website and never typechecked it, and relationship/config/backend tasks write `shared-lib` (an FK\n * column, an index) without being asked for the migration they owe.\n *\n * ## Coverage is a check's OWN package, deliberately not its dependents\n *\n * `backend-api` compiles against `shared-lib`, so a `shared-lib` edit can break it — and it would be\n * tempting to say the backend typecheck speaks about `shared-lib/` too. Rejected: a workspace typecheck\n * resolves its sibling packages through their BUILT output, so right after a `shared-lib` source edit\n * it reads a `dist` the edit has not reached yet. It would answer, green or red, about the tree as it\n * stood before the task — confident and stale (`staleness-presents-as-a-logic-defect.md`). A check is\n * only honest about code it reads as source.\n *\n * ## The semantic checks, and why they sit on those paths\n *\n * `check:frontend-fk-resolution` — an `.isForeignKey()` field is declared in `shared-lib`, and an\n * unregistered relationship edge is invisible to every typecheck and fatal to the frontend at first\n * page load (wonder-crm, 2026-08-27).\n *\n * `check:schema-plan-in-sync` — a resource, a field, an index or a unique constraint in `shared-lib` is\n * what changes the physical shape the engine plans for a table. On PostgreSQL a table exists only\n * because a migration built it, and no type in any program knows whether one did, so the change\n * compiles green through every other check and the backend then refuses to boot on\n * `postgresql_table_schema_mismatch`. It ran ONLY at `bottom_up.assemble-verify`, the capstone, dozens of\n * tasks after the one that owed the migration: `teamMembership` declared `teamId`, no migration built\n * the column, and `scratch-journey`'s backend crash-looped five times and sat paused while the build\n * carried on above it. The remedy is in the task's own reach — the mutation scope carries every\n * top-level workspace entry (#1268), so `backend-api/migrations/` is writable, and the application\n * ships `database-migration-obligation.md` as an ALWAYS-ON rule naming `wildo db generate`. A stale or\n * absent model is classified as infrastructure rather than reported as drift.\n *\n * `check:settings-placement-content` — a placement naming a `destinationRef` the engine catalog does not\n * ship is not a type error: `resolveSettingsHubConfig` drops it and the section silently never\n * renders. The sweep asks the working tree, in the companion's introspection subprocess. It covers the\n * settings rail AND the app-shell config, because the user menu's `settingsEntries` name rail sections\n * too, and the frontend registry, which is where the running frontend receives the rail (#3101): the check also refuses\n * a registry that does not pass it.\n *\n * `check:design-system-contrast` — a palette is not a type: a label the user cannot read, an invisible focus ring\n * or a status colour lost on its page compiles green everywhere. It measures every pair the framework draws on the\n * palette the design-system config paints (#2351), and its findings name both colours and the ratio, so the agent\n * that wrote the config can correct it in the same task.\n *\n * `check:design-system-contract` — the same file's theme against the theme contract (#2359): a card painted with the\n * page colour, a `transition-all`, a badge in the mid-tone status colour all compile green. Its findings name the rule\n * and the recipe.\n *\n * `check:design-system-brand` — the same file against the brand (#2818): a theme or palette the agent picked by hand,\n * when the build generated the brand's point in `brand-design.ts`, compiles green and passes both checks above. Its\n * findings name the composition it expected. It also covers the website's root config, on which it only ADVISES: a\n * site may differ from its product on purpose, so an axis set away from the brand is said, never refused.\n *\n * `check:requirements-schema` is absent on purpose: it belongs to the requirements coding task, not to\n * a build-plan target. The parametric workers/minions typecheck is derived by\n * {@link deriveRequiredCheckRefs} from the package directory itself, since no fixed row can name it.\n */\nconst CHECK_COVERAGE: Readonly<Record<string, readonly string[]>> = {\n 'check:shared-lib-typecheck': ['shared-lib/'],\n 'check:backend-api-typecheck': ['backend-api/'],\n 'check:app-typecheck': ['frontend/'],\n 'check:specifications-typecheck': ['specifications/'],\n /*\n * The specifications package EVALUATED (#3210, #3211): every factory runs its module-load validation. After the\n * typecheck, whose failure would make this one's finding a restatement. Covers `specifications/` only, which it reads\n * as source; a shared-lib edit it reads as a build, so it does not speak about `shared-lib/` (see above).\n */\n 'check:specification-exports': ['specifications/'],\n 'check:frontend-fk-resolution': ['shared-lib/'],\n 'check:settings-placement-content': [\n SHELL_PLACEMENT_CONFIG_FILE[PlacementSurface.SETTINGS_HUB],\n FRONTEND_CONFIG_FILE[FrontendConfigSurface.APP_SHELL],\n // The registry that passes the rail to the running frontend: a task dropping `settingsHub` there empties Settings (#3101).\n 'frontend/src/modules-registry.frontend.ts',\n ],\n 'check:schema-plan-in-sync': ['shared-lib/'],\n 'check:design-system-contrast': [FRONTEND_CONFIG_FILE[FrontendConfigSurface.DESIGN_SYSTEM]],\n 'check:design-system-contract': [FRONTEND_CONFIG_FILE[FrontendConfigSurface.DESIGN_SYSTEM]],\n /*\n * The design-system config, and the website's root config (#2818): a website task that sets a shared personality\n * axis away from the brand never writes the design-system config, and the check's advice about it is the only\n * place that departure is said.\n */\n 'check:design-system-brand': [FRONTEND_CONFIG_FILE[FrontendConfigSurface.DESIGN_SYSTEM], 'website/src/website-root.config.ts'],\n /*\n * The resources registry the backend builds at startup (#2404). Shared resources live in `shared-lib/`, backend-only\n * ones and the module registry in `backend-api/`; a write to either can make the factory refuse at the next start.\n */\n 'check:resources-registry-init': ['shared-lib/', 'backend-api/'],\n 'check:website-typecheck': ['website/'],\n /*\n * The website's drawn demos, held to the resources they draw (#2784). After the typecheck: a site that does not\n * compile is that check's finding, not this one's. Covers `website/` only, where the drawing is written; a task that\n * changes a resource is not made to owe it, and the end-of-build run catches a landed drawing it made untrue.\n */\n 'check:website-demo-facts': ['website/'],\n 'check:technical-doc-typecheck': ['technical-doc/'],\n};\n\n/** The build-task checks whose coverage is stated, in the order a task runs them. */\nexport const BUILD_TASK_COVERED_CHECK_REFS: readonly string[] = Object.keys(CHECK_COVERAGE);\n\n/**\n * Whole-application questions a typecheck cannot answer, asked ONLY at the end of a build (#2228): does each optional\n * site BUILD (`astro build`, `docusaurus build`), and does the configuration pass the checks the backend runs at\n * startup. Never per task: a site build takes minutes, and a task already owes its package's typecheck, which is\n * the fast half of the same question. An absent package answers \"nothing to build\" in the executor.\n */\nexport const APPLICATION_ASSEMBLY_ONLY_CHECK_REFS: readonly string[] = [\n 'check:website-build',\n 'check:technical-doc-build',\n 'check:config-validate',\n // The RUNNING backend: a build can typecheck, build and validate while the backend crash-loops at boot.\n 'check:backend-ready',\n // And the running frontend, in a browser — the CLI drives it, and answers could-not-ask without Playwright.\n 'check:browser-smoke',\n];\n\n/**\n * Does the WHOLE application assemble? The checks that answer it (#2222): the typecheck of every workspace package\n * the application can have, the package typecheck of every workers/minions package it has, the resources registry\n * built offline (#2404), the website's drawn demos held to the application (#2784), the end-of-build-only questions,\n * and the schema-plan gate — the typechecks derived from {@link CHECK_COVERAGE} and the workspace, never listed.\n *\n * It was a list of four (specifications, shared-lib, backend-api, frontend) in `bottom_up.assemble-verify`, and the\n * list went stale the day #1490 added `website` and `technical-doc` packages: `app-creation-test-004` built a\n * website that did not compile and no end-of-build question could see it. Derived from the coverage table, a\n * package added there is asked about here with nobody remembering to. A package the application does not have\n * answers \"nothing to typecheck\" in the executor, so naming every one is always safe.\n *\n * `packageDirectories` are the application's workers/minions package directories (`workers/reminders`, …), listed\n * by `resolveApplicationAssemblyCheckRefs`; `nonTypeScriptPackages` the ones with no TypeScript (a Rust worker).\n */\nexport function deriveApplicationAssemblyCheckRefs(\n packageDirectories: readonly string[],\n nonTypeScriptPackages: readonly string[] = [],\n): string[] {\n const packageTypechecks = Object.entries(CHECK_COVERAGE)\n .filter(([checkRef, covered]) => checkRef.endsWith('-typecheck') && covered.length === 1 && /^[a-z-]+\\/$/u.test(covered[0]!))\n .map(([checkRef]) => checkRef);\n const parametric = [...new Set(packageDirectories.flatMap((entry) => PARAMETRIC_PACKAGE_DIRECTORY.exec(entry)?.[1] ?? []))]\n .filter((directory) => !nonTypeScriptPackages.includes(directory))\n .sort()\n .map(packageTypecheckCheckRef);\n // Builds and config after the compile questions (a build of a package that does not typecheck says nothing new);\n // the drift gate LAST, as assemble-verify always ran it: a drift report reads best once the compile questions are settled.\n // The registry construction before the running backend is asked (#2404): it names the resource a crash-loop would not.\n // The website's demos once more (#2784): a website task checked them when it landed, but a later task that changes a\n // resource (a status member removed, a field excluded from update) can make a landed drawing untrue, and no website\n // task runs again to notice.\n return [\n ...packageTypechecks,\n ...parametric,\n // The specifications package evaluated (#3211): a task that typechecked can still leave a specification its\n // factory refuses, and a later task can make an earlier one untrue (a removed enum member it names).\n 'check:specification-exports',\n 'check:resources-registry-init',\n 'check:website-demo-facts',\n ...APPLICATION_ASSEMBLY_ONLY_CHECK_REFS,\n 'check:schema-plan-in-sync',\n ];\n}\n\n/**\n * What each end-of-build-only check READS (#2283), the counterpart of {@link CHECK_COVERAGE} for the checks no task\n * runs. A repair of the check is scoped and verified from it. A site build reads its package; `wildo config validate`\n * reads the application declaration, its infrastructure configuration and its CI workflow; the running backend\n * boots from the backend and the shared library; the browser smoke renders the frontend.\n */\nconst ASSEMBLY_ONLY_CHECK_COVERAGE: Readonly<Record<string, readonly string[]>> = {\n 'check:website-build': ['website/'],\n 'check:technical-doc-build': ['technical-doc/'],\n 'check:config-validate': ['wildo.saas.config.ts', 'infrastructure/', '.github/'],\n 'check:backend-ready': ['backend-api/', 'shared-lib/'],\n 'check:browser-smoke': ['frontend/'],\n};\n\n/**\n * The boundary of a REPAIR of one failing end-of-build check (#2283): where it may write and what it must pass,\n * derived from the check alone, never chosen by a model.\n *\n * - **Scope**: the check's coverage, widened to every workspace entry exactly as a build task's is (#1268), since a\n * compile error in one package is often fixed in another. `.wildo-saas/` stays prohibited, and so does the generated\n * documentation tree when the repair touches `technical-doc/`: the publication step owns it and would overwrite a\n * hand edit, as it does for a documentation task.\n * - **Checks**: what the coverage obliges ({@link deriveRequiredCheckRefs}), then the failing check itself, last, so\n * the run's own verification asks the question again. A check with no known coverage still requires itself.\n */\nexport function resolveAssemblyRepairCodingPolicy(\n checkRef: string,\n applicationWorkspaceEntries: readonly string[],\n nonTypeScriptPackages: readonly string[] = [],\n): ApplicationBuildTaskCodingPolicy {\n const coverage = CHECK_COVERAGE[checkRef]\n ?? ASSEMBLY_ONLY_CHECK_COVERAGE[checkRef]\n ?? (checkRef.startsWith(PACKAGE_TYPECHECK_CHECK_REF_PREFIX) ? [`${checkRef.slice(PACKAGE_TYPECHECK_CHECK_REF_PREFIX.length)}/`] : []);\n const required = deriveRequiredCheckRefs(coverage, nonTypeScriptPackages).filter((ref) => ref !== checkRef);\n return {\n allowedPathPrefixes: [...new Set([...coverage, ...resolveApplicationWorkspaceMutationScope(applicationWorkspaceEntries)])],\n prohibitedPathPrefixes: coverage.some((prefix) => prefix.startsWith('technical-doc/'))\n ? [...PROHIBITED_TO_EVERY_RUN, TECHNICAL_DOCUMENTATION_GENERATED_PREFIX]\n : [...PROHIBITED_TO_EVERY_RUN],\n requiredCheckRefs: [...required, checkRef],\n };\n}\n\n/** A workers/ or minions/ package directory, as the parametric package typecheck names it. */\nconst PARAMETRIC_PACKAGE_DIRECTORY = /^((?:workers|minions)\\/[a-z0-9]+(?:-[a-z0-9]+)*)(?:\\/|$)/u;\n\n/** Two path prefixes overlap when either contains the other: a write there can reach what the check reads. */\nfunction pathsOverlap(written: string, covered: string): boolean {\n return written.startsWith(covered) || covered.startsWith(written);\n}\n\nfunction orderCheckRefs(checkRefs: readonly string[]): string[] {\n const rank = (ref: string) => {\n const index = BUILD_TASK_COVERED_CHECK_REFS.indexOf(ref);\n return index === -1 ? BUILD_TASK_COVERED_CHECK_REFS.length : index;\n };\n return [...checkRefs].sort((left, right) => rank(left) - rank(right) || left.localeCompare(right));\n}\n\n/**\n * The checks a task that writes `writtenPathPrefixes` must pass (#1540): every check whose coverage one\n * of those paths can reach, plus the package typecheck of every workers/minions package it writes.\n *\n * `nonTypeScriptPackages` names package directories with no TypeScript to check (a Rust worker) — the\n * honest answer there is no typecheck, stated by the target, rather than a command that cannot run.\n *\n * Errs toward requiring, and that direction is the point: a spurious check costs seconds, a missing one\n * is invisible. Paths no check covers (`wildo.saas.config.ts`, `backend-api/package.json`) oblige\n * nothing, and the coverage test names them so a new one is noticed.\n */\nexport function deriveRequiredCheckRefs(\n writtenPathPrefixes: readonly string[],\n nonTypeScriptPackages: readonly string[] = [],\n): string[] {\n const required = new Set<string>();\n for (const [checkRef, covered] of Object.entries(CHECK_COVERAGE)) {\n if (writtenPathPrefixes.some((written) => covered.some((path) => pathsOverlap(written, path)))) required.add(checkRef);\n }\n for (const written of writtenPathPrefixes) {\n const packageDirectory = PARAMETRIC_PACKAGE_DIRECTORY.exec(written)?.[1];\n if (packageDirectory && !nonTypeScriptPackages.includes(packageDirectory)) required.add(packageTypecheckCheckRef(packageDirectory));\n }\n return orderCheckRefs([...required]);\n}\n\nfunction resolveBuildPlanTaskTargetCodingPolicy(task: BuildPlanTask): ApplicationBuildTaskCodingPolicy {\n const target = task.target;\n switch (target.kind) {\n case BuildPlanTaskTargetKind.MODULE:\n return policy(\n [\n `shared-lib/src/modules/${target.moduleRef}/`,\n `backend-api/src/modules/${target.moduleRef}/`,\n `frontend/src/modules/${target.moduleRef}/`,\n `specifications/src/modules/${target.moduleRef}/`,\n ...MODULE_REGISTRY_FILES,\n ],\n );\n case BuildPlanTaskTargetKind.RESOURCE_STAGE:\n switch (target.stage) {\n case BuildPlanResourceStage.SCHEMA:\n return policy([`shared-lib/src/modules/${target.moduleRef}/`]);\n case BuildPlanResourceStage.CONFIG:\n return policy([`shared-lib/src/modules/${target.moduleRef}/`, `backend-api/src/modules/${target.moduleRef}/`]);\n case BuildPlanResourceStage.UI_BEHAVIOR:\n return policy([`frontend/src/modules/${target.moduleRef}/`]);\n case BuildPlanResourceStage.SPEC:\n return policy([`specifications/src/modules/${target.moduleRef}/`]);\n default: {\n const unhandled: never = target.stage;\n throw new Error(`Unhandled build-plan resource stage ${String(unhandled)}.`);\n }\n }\n case BuildPlanTaskTargetKind.RELATIONSHIP:\n /*\n * The relationship is declared in shared-lib, but the `module-relationships` workflow it is\n * dispatched with also shows the reference on the holder's pages (frontend ui-behavior) and\n * updates both resources' specifications (#2503). Writing there is already permitted by the\n * whole-workspace widening below; naming the two prefixes here is what makes the checks follow\n * the edit — `deriveRequiredCheckRefs` reads the TARGET's prefixes, so without them a\n * relationship task that broke a ui-behavior file was never typechecked for it. Any module's\n * `frontend/src/modules/...` overlaps the frontend typecheck, so a holder in another module is\n * covered as well.\n */\n return policy([\n `shared-lib/src/modules/${target.moduleRef}/`,\n `backend-api/src/modules/${target.moduleRef}/`,\n `frontend/src/modules/${target.moduleRef}/`,\n `specifications/src/modules/${target.moduleRef}/`,\n ]);\n case BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP:\n throw new ApplicationBuildTaskNotACodingTaskError(task.taskRef, target.generationStepRef);\n case BuildPlanTaskTargetKind.MODULE_FRONTEND:\n /*\n * The module's frontend and specifications, plus the ENGINE registrations file: a custom\n * component may be registered there rather than in the module's own index, and both are\n * legitimate homes (see `CUSTOM_COMPONENT`'s probe).\n */\n return policy(\n [\n `frontend/src/modules/${target.moduleRef}/`,\n `specifications/src/modules/${target.moduleRef}/`,\n 'frontend/src/engine/component-registrations.frontend.ts',\n ]);\n case BuildPlanTaskTargetKind.MODULE_BACKEND:\n return policy([`shared-lib/src/modules/${target.moduleRef}/`, `backend-api/src/modules/${target.moduleRef}/`]);\n case BuildPlanTaskTargetKind.APPLICATION_FRONTEND_CONFIG:\n // One file, like a placement — the composition of a surface never needs its neighbours.\n return policy([FRONTEND_CONFIG_FILE[target.configSurface]]);\n case BuildPlanTaskTargetKind.WEBSITE:\n return policy(['website/']);\n case BuildPlanTaskTargetKind.TECHNICAL_DOCUMENTATION:\n return policy(['technical-doc/', 'specifications/src/technical-documentation/'], {\n prohibitedPathPrefixes: [...PROHIBITED_TO_EVERY_RUN, TECHNICAL_DOCUMENTATION_GENERATED_PREFIX],\n });\n case BuildPlanTaskTargetKind.WORKER:\n /*\n * The SaaS config is in scope because the worker's declaration lives there (the\n * `add-worker-*` scenario appends it); a task that composes the package and declares it in\n * one run must reach both. A RUST worker has no TypeScript to check — the honest answer is no\n * check, stated here, rather than a command the catalog cannot run.\n */\n return policy([`workers/${target.workerRef}/`, 'wildo.saas.config.ts'], {\n nonTypeScriptPackages: target.runtime === BuildPlanWorkerRuntime.NODE ? [] : [`workers/${target.workerRef}`],\n });\n case BuildPlanTaskTargetKind.MINION:\n return policy([`minions/${target.minionRef}/`, 'wildo.saas.config.ts']);\n case BuildPlanTaskTargetKind.PROVIDER_BINDING:\n /*\n * Every file a binding can touch, for every scope, because one task may bind one provider on\n * several scopes (`add-provider` writes the backend AND the companion block in one run).\n */\n return policy(\n [\n 'wildo.saas.config.ts',\n 'backend-api/package.json',\n 'frontend/src/engine/providers/',\n 'frontend/src/provider-contributions.ts',\n 'website/src/provider-contributions.ts',\n ]);\n case BuildPlanTaskTargetKind.SHELL_PLACEMENT:\n return policy([SHELL_PLACEMENT_CONFIG_FILE[target.surface]]);\n case BuildPlanTaskTargetKind.BILLING_CATALOG:\n /*\n * The catalogue file and the product specifications that document it. This is the TARGET's\n * contribution — what the task is FOR — not an isolation boundary: `resolveBuildPlanTaskCodingPolicy`\n * widens every task to the workspace it runs in (#1268), so what keeps a catalogue task off the\n * backend and the website that read the catalogue is its objective and its skill, not this list.\n */\n return policy([BILLING_CATALOG_FILE, 'specifications/src/engine/products/']);\n case BuildPlanTaskTargetKind.APPLICATION_ROLES:\n /*\n * The role table, the SaaS config whose organization types offer a role (`availableOrgRoles`), the\n * role specifications, and the modules whose operation `roles` the declared roles narrow — a role\n * that no operation names changes nothing, so binding it is this task's work (#2490). Naming the\n * modules is what makes the shared-lib checks follow those edits; writing is already permitted\n * by the workspace widening.\n */\n return policy([APPLICATION_ROLES_FILE, 'wildo.saas.config.ts', 'specifications/src/engine/roles/', 'shared-lib/src/modules/']);\n case BuildPlanTaskTargetKind.ORGANIZATION_MODEL:\n /*\n * The application's configuration (organization types, relationship kinds), the backend's startup configuration\n * (row confinements), and the modules' shared library (#3035, #3036): narrowing is ADDITIVE, so a confined\n * resource's reads must be gated above the default member role or the confinement confines nobody, and that gate\n * is in the resource's configuration. Naming the modules is what makes the shared-lib checks follow those edits.\n * And the backend's configuration, where renaming the owner's user type to the plan's name is written (#3044).\n */\n return policy([APPLICATION_SAAS_CONFIG_FILE, BACKEND_STARTUP_CONFIGURATION_FILE, BACKEND_CONFIGURATION_FILE, 'shared-lib/src/modules/']);\n default: {\n const unhandled: never = target;\n throw new Error(`Unhandled build-plan task target ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * A target's write scope, with the checks DERIVED from it (#1540). A target states what it writes and\n * nothing else; which checks that obliges is {@link deriveRequiredCheckRefs}'s answer, never a list here.\n */\nfunction policy(\n allowedPathPrefixes: readonly string[],\n options: { readonly prohibitedPathPrefixes?: readonly string[]; readonly nonTypeScriptPackages?: readonly string[] } = {},\n): ApplicationBuildTaskCodingPolicy {\n return {\n allowedPathPrefixes,\n prohibitedPathPrefixes: options.prohibitedPathPrefixes ?? [...PROHIBITED_TO_EVERY_RUN],\n requiredCheckRefs: deriveRequiredCheckRefs(allowedPathPrefixes, options.nonTypeScriptPackages),\n };\n}\n\n/**\n * The PROBES that prove this task landed — one per artifact it declares in `produces`.\n *\n * **Landing is answered from `produces`, never from `target`, and the distinction is the whole\n * point.** `target` is a WRITE SCOPE: the host turns it into path prefixes a run may mutate, and\n * several tasks legitimately share one. Answering \"did this task land?\" from it asks the wrong\n * question — and for the shapes this repository actually ships, gets the wrong answer.\n *\n * Measured on Wonder CRM 2026-09-10 (#597), against the previous version of this function, which\n * resolved a task to a module DIRECTORY:\n *\n * - `wildo compose` commits those directories on day one, so a task landed before it existed;\n * - every task in that plan ENRICHES a scaffold file rather than creating one, so file presence\n * answers nothing;\n * - a directory is shared, so two tasks were indistinguishable — `build-task-pipeline-view` and\n * `build-task-deal-follow-through-operation` carry BYTE-IDENTICAL targets.\n *\n * The result was 40 of 42 tasks reported landed while no coding task had ever run: `dispatch-next`\n * skipped every one of them, and the phase-advance gate read a build that was all but complete.\n *\n * Git remains the accepted state (`.claude/rules/one-source-of-truth.md`, Rule 2): every probe is\n * answered against COMMITTED bytes, so it survives a restart, a fresh clone and a branch switch, and\n * two branches carrying different answers merge.\n */\nexport enum BuildPlanTaskLandedProbeKind {\n /** The file exists, is tracked, and HEAD/index/worktree agree. Sound only where the SCAFFOLD does not write it. */\n COMMITTED_FILE = 'COMMITTED_FILE',\n /**\n * The committed file DECLARES each named symbol.\n *\n * The shape an ENRICHMENT product needs: `deal.schemas.ts` exists from day one carrying the\n * scaffold's self-described STARTER shape, so only the fields distinguish a task that ran from one\n * that did not.\n */\n COMMITTED_FILE_DECLARES = 'COMMITTED_FILE_DECLARES',\n /** Any one of several candidate files declares each named symbol — a product whose home is not a single known path. */\n ANY_COMMITTED_FILE_DECLARES = 'ANY_COMMITTED_FILE_DECLARES',\n /**\n * Every locale with a COMMITTED pack or section fragment carries a key under `keyPrefix` in one of the two, and at\n * least one is committed (#2216) — a website section's words, in each locale. `paths[i]` is a locale's pack\n * (`websiteLabelPackPath`: `website/src/i18n/<segment>.json`) and `fragmentPaths[i]` the SAME locale's file of this\n * section's own (`websiteSectionLabelFragmentPath`: `website/src/i18n/<segment>/<page>.<sectionRef>.json`), which the\n * website's pack loader merges into the pack. Total over the language vocabulary, so no locale is guessed and a\n * locale the application does not have is simply not committed. Every committed locale, because the website build\n * refuses a locale missing a key its sections read.\n *\n * A section WRITES only its fragments (#3204): with every section editing every locale pack, 64 sections of one plan\n * could not run beside each other, which serialized the build. The pack still counts, so words already there land.\n */\n COMMITTED_LABEL_PACKS_DECLARE = 'COMMITTED_LABEL_PACKS_DECLARE',\n /**\n * The committed labelling-pipeline file at `path` declares every one of `keys`, each a full dotted key with a\n * non-empty string value (#2504) — the pipeline's own completeness bar, so this lands exactly when a labels run\n * would generate nothing more. A key is matched EXACTLY, by parsing the file the way the pipeline writes it (one nested\n * object, a key segment per dot), never by a text prefix: the frontend-derived root units nest under a category\n * (`composite_views.app.<view>.title`, `settings_hub.sections.<ref>.label`), so a prefix probe on the segment after\n * the bucket matched the CATEGORY (`app`, `sections`) and landed once any one entry existed. A file that does not\n * parse declares nothing.\n */\n COMMITTED_LABEL_FILE_DECLARES_KEYS = 'COMMITTED_LABEL_FILE_DECLARES_KEYS',\n /**\n * The RESOLVED shell surface carries what the placement plan decided for it (#1538): every subject\n * the plan PLACED on that surface is present by identity, no subject the plan DECLINED is, and every\n * file that contributes the surface is identical to HEAD.\n *\n * Why none of the file-shaped kinds above can do this, measured on the #1273 run: a shell placement\n * task's declared products are placement-plan refs the tree never spells (a sidebar section is\n * `ref: 'main'`, a command is a resource type plus an operation), so a text probe could only ever\n * answer \"no\"; and a COUNT of what a surface carries cannot help either, because the skeleton already\n * ships a billing command in the palette and a full settings rail (and, until #2331 moved Settings to the\n * user menu, a settings launcher in the sidebar).\n * Only the entry's IDENTITY separates a scaffold default from a placement — and it lives in the\n * resolved configuration, which the `app-shell-placement-content` introspection behavior reads.\n *\n * DECLINED is half the question, not a detail: the settings placement's real work in that run was\n * mostly REMOVING 25 engine destinations the scaffold's rail shows and the plan declined.\n */\n SHELL_SURFACE_CARRIES_PLAN = 'SHELL_SURFACE_CARRIES_PLAN',\n /**\n * At least one surface carries at least one subject the placement plan PLACED there, from files\n * identical to HEAD — the whole shell's landing, for the task that composes the shell frame rather\n * than one surface. It is Paul's rule, 2026-09-23: an application needs at least one shell surface,\n * never all of them, so \"every surface\" would be the wrong question.\n */\n SHELL_CARRIES_A_PLACEMENT = 'SHELL_CARRIES_A_PLACEMENT',\n /**\n * The application's backend REGISTERS the agent-work product (#2966) in the task's module — an agent under\n * `flowsActors.agents` or `autonomousAgents`, a function tool whose approval gate the engine resolves to the planned\n * route and role, a resource declared as the unit of work, an operation recording usage of the planned metered product\n * counted as planned (#2305 S5), a resource bound to the planned retention class (#2305 S6) — and the files that\n * REGISTER it are identical to HEAD. A row confinement (#3036) is read from the initialization declaration the backend\n * assembles, and a system-of-record binding (#3039) from the resource's configuration, whose instance the application's\n * configuration must also declare. A role conferred through a relationship (#2305 S6), an organization type and a\n * relationship kind (#3035) are judged from the application's CONFIGURATION alone: `wildo.saas.config.ts`, read fresh,\n * must declare them (and, for a conferred role, every granting type must offer it).\n *\n * Read through introspection (`agent-work-declarations`) because none of these is a name the tree spells in one place:\n * an agent's ref and a gate's role are written through constants in another file (Wonder Ledger keeps every ref in\n * `month-end-close-agents.refs.ts`), and a gate is a property of a tool object.\n *\n * What it guarantees, and no more: the BUILT backend registers the product, and the registration chain the shape\n * skills teach is committed — the module's backend index, its `addons/flows-actors/index.ts`, and every file that index\n * imports. It does not prove the built `dist` is current (a stale build answers about the code it was built from), and\n * it does not follow a definition registered from outside that chain (a service, an operation file, an inbound\n * handler); such a product is still read from the registry, and its own file's commit is the task's to make. Imports\n * are followed ONE level: a tool file reached only through an agent file the index imports is not required committed.\n * And the gate is resolved by the companion's copy of the engine, without the deadline checks that need the\n * application's configuration (`reviewCalendar`).\n */\n AGENT_WORK_REGISTERED = 'AGENT_WORK_REGISTERED',\n}\n\n/**\n * The agent-work products (#2966): proven from the registry the backend registers, never from the tree's text — except a\n * relationship role (#2305 S6), proven from the application's configuration; {@link RegisteredAgentWorkProduct} is the\n * backend-proven rest.\n */\nexport type AgentWorkProduct = Extract<BuildPlanTaskProduct, {\n readonly kind:\n | BuildPlanTaskProductKind.APPLICATION_AGENT\n | BuildPlanTaskProductKind.AGENT_APPROVAL_GATE\n | BuildPlanTaskProductKind.WORK_UNIT_RESOURCE\n | BuildPlanTaskProductKind.METERED_USAGE_RECORDING\n | BuildPlanTaskProductKind.RESOURCE_RETENTION_BINDING\n | BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE\n | BuildPlanTaskProductKind.ORGANIZATION_TYPE\n | BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND\n | BuildPlanTaskProductKind.ORGANIZATION_UNIT_CONFINEMENT\n | BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING;\n}>;\n\n/**\n * What of one agent-work product the task's module does not register as planned (#2966): empty when it is there as\n * planned. Pure, so a landing decision and its explanation are the same function. Typed shortfalls, never sentences, so\n * every surface words them from the i18n tree.\n *\n * A gate lands only on the planned route AND role: a tool gated on the wrong role is the case the issue exists for — an\n * approval that reaches someone the plan did not authorize — and a gate the engine refuses at startup never lands.\n */\nexport function findAgentWorkShortfalls(product: RegisteredAgentWorkProduct, moduleRef: string, declarations: AgentWorkDeclarations): readonly AgentWorkShortfall[] {\n const registered = declarations.modules.find((module) => module.moduleId === moduleRef);\n const shortfall = (kind: AgentWorkShortfallKind, ref: string, planned: string | null = null, actual: string | null = null): AgentWorkShortfall[] => [\n { kind, ref, planned, registered: actual },\n ];\n switch (product.kind) {\n case BuildPlanTaskProductKind.APPLICATION_AGENT: {\n const autonomous = product.shape === BuildPlanAgentShape.AUTONOMOUS;\n const refs = (autonomous ? registered?.autonomousAgentRefs : registered?.agentRefs) ?? [];\n if (refs.includes(product.agentRef)) return [];\n return shortfall(autonomous ? AgentWorkShortfallKind.AUTONOMOUS_AGENT_NOT_REGISTERED : AgentWorkShortfallKind.AGENT_NOT_REGISTERED, product.agentRef);\n }\n case BuildPlanTaskProductKind.AGENT_APPROVAL_GATE: {\n const tool = registered?.tools.find((candidate) => candidate.functionRef === product.functionRef);\n if (tool === undefined) return shortfall(AgentWorkShortfallKind.TOOL_NOT_REGISTERED, product.functionRef);\n if (tool.refusal !== null) return shortfall(AgentWorkShortfallKind.GATE_REFUSED, product.functionRef, null, tool.refusal);\n if (tool.route === null) return shortfall(AgentWorkShortfallKind.TOOL_NOT_GATED, product.functionRef, product.route);\n if (tool.route !== product.route) return shortfall(AgentWorkShortfallKind.GATE_ROUTE_DIFFERS, product.functionRef, product.route, tool.route);\n const plannedRole = product.eligibleRole ?? null;\n if (tool.eligibleRole !== plannedRole) return shortfall(AgentWorkShortfallKind.GATE_ROLE_DIFFERS, product.functionRef, plannedRole, tool.eligibleRole);\n // #2967: the qualifications too, as sets. A gate built without the qualification the plan required has not landed.\n const plannedKinds = [...(product.requiredQualificationKinds ?? [])].sort().join(',');\n const registeredKinds = [...(tool.requiredQualificationKinds ?? [])].sort().join(',');\n if (plannedKinds !== registeredKinds) {\n return shortfall(AgentWorkShortfallKind.GATE_QUALIFICATIONS_DIFFER, product.functionRef, plannedKinds || null, registeredKinds || null);\n }\n return [];\n }\n case BuildPlanTaskProductKind.WORK_UNIT_RESOURCE: {\n // The plan names a resource by its slug (`adjustment-proposals`); the registry keys it by its type (`adjustmentProposals`).\n const spellings = new Set(resourceRefSpellings(product.resourceRef));\n return declarations.workUnitResourceTypes.some((resourceType) => spellings.has(resourceType))\n ? []\n : shortfall(AgentWorkShortfallKind.NOT_A_WORK_UNIT, product.resourceRef);\n }\n case BuildPlanTaskProductKind.METERED_USAGE_RECORDING: {\n // #2305 S5: the planned operation of the planned resource records the planned product, counted as planned.\n const resourceSpellings = new Set(resourceRefSpellings(product.resourceRef));\n const operationSpellings = new Set(refSpellings(product.operationRef));\n const recording = declarations.meteredUsageRecordings.find((candidate) => resourceSpellings.has(candidate.resourceType)\n && operationSpellings.has(candidate.operationIdentifier)\n && candidate.productKey === product.productKey);\n const operationRef = `${product.resourceRef}.${product.operationRef}`;\n if (recording === undefined) return shortfall(AgentWorkShortfallKind.USAGE_NOT_RECORDED, operationRef, product.productKey);\n if (recording.oncePerRecord !== product.oncePerRecord) {\n return shortfall(AgentWorkShortfallKind.USAGE_COUNTED_DIFFERENTLY, operationRef, String(product.oncePerRecord), String(recording.oncePerRecord));\n }\n return [];\n }\n case BuildPlanTaskProductKind.ORGANIZATION_UNIT_CONFINEMENT: {\n // #3036: application-wide, keyed by resource type. The mode first, then the field it reads.\n const spellings = new Set(resourceRefSpellings(product.resourceRef));\n const confinement = declarations.rowConfinements.find((candidate) => spellings.has(candidate.resourceType) && candidate.mode === product.mode);\n if (confinement === undefined) return shortfall(AgentWorkShortfallKind.ROWS_NOT_CONFINED, product.resourceRef, product.mode);\n if (confinement.fieldName !== product.fieldName) {\n return shortfall(AgentWorkShortfallKind.CONFINEMENT_FIELD_DIFFERS, product.resourceRef, product.fieldName, confinement.fieldName);\n }\n return [];\n }\n case BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING: {\n // #3039: the planned instance, then the planned lane. That the instance is DECLARED, of the planned vendor, is the\n // configuration's to say (`findSystemOfRecordDeclarationShortfalls`).\n const spellings = new Set(resourceRefSpellings(product.resourceRef));\n const bindings = declarations.systemOfRecordBindings.filter((candidate) => spellings.has(candidate.resourceType));\n if (bindings.length === 0) return shortfall(AgentWorkShortfallKind.NOT_BOUND_TO_SYSTEM_OF_RECORD, product.resourceRef, product.systemOfRecordRef);\n const onInstance = bindings.filter((candidate) => candidate.systemOfRecordRef === product.systemOfRecordRef);\n if (onInstance.length === 0) {\n return shortfall(AgentWorkShortfallKind.SYSTEM_OF_RECORD_DIFFERS, product.resourceRef, product.systemOfRecordRef, [...new Set(bindings.map((binding) => binding.systemOfRecordRef))].join(','));\n }\n const onLane = onInstance.filter((binding) => binding.access === product.access);\n if (onLane.length === 0) {\n return shortfall(AgentWorkShortfallKind.SYSTEM_OF_RECORD_ACCESS_DIFFERS, product.resourceRef, product.access, onInstance.map((binding) => binding.access).join(','));\n }\n /*\n * #3045: a COPY of a partitioned instance stamps each row's partition on its pipeline, and a copy of an unpartitioned\n * one does not; the backend refuses either mismatch at startup. Whether the instance IS partitioned is the\n * configuration's to say (`findSystemOfRecordDeclarationShortfalls`); here the plan's split is compared with the\n * pipeline. A read-through binding declares nothing: the engine confines it on its own field.\n */\n if (product.partitioned !== undefined && product.access === SystemOfRecordAccess.OWNED_COPY\n && !onLane.some((binding) => (binding.stampsPartition === true) === product.partitioned)) {\n return shortfall(AgentWorkShortfallKind.SYSTEM_OF_RECORD_COPY_PARTITION_STAMP_DIFFERS, product.resourceRef, String(product.partitioned), String(!product.partitioned));\n }\n return [];\n }\n case BuildPlanTaskProductKind.RESOURCE_RETENTION_BINDING: {\n // #2305 S6: application-wide, like a work unit; the plan's slug against the registry's resource type.\n const spellings = new Set(resourceRefSpellings(product.resourceRef));\n const binding = declarations.retentionBindings.find((candidate) => spellings.has(candidate.resourceType));\n if (binding === undefined) return shortfall(AgentWorkShortfallKind.NOT_RETENTION_BOUND, product.resourceRef, product.retentionClass);\n if (binding.retentionClass !== product.retentionClass) {\n return shortfall(AgentWorkShortfallKind.RETENTION_CLASS_DIFFERS, product.resourceRef, product.retentionClass, binding.retentionClass);\n }\n return [];\n }\n default: {\n const unhandled: never = product;\n throw new Error(`Unhandled agent-work product ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * The files a module's `addons/flows-actors/index.ts` imports from its own directory (#2966): the agent, tool and refs\n * files that reach startup through it, and therefore the ones a landed agent or gate needs committed. Read from the\n * index's text with comments blanked; a specifier's `.js` / `.ts` extension is replaced by `.ts`, as the backend's\n * NodeNext imports write it. Only `./` imports: a file outside the directory is not part of this chain.\n */\nexport function flowsActorsIndexImportedFiles(indexPath: string, indexText: string): readonly string[] {\n const directory = indexPath.slice(0, indexPath.lastIndexOf('/') + 1);\n const code = blankSourceComments(indexText);\n const files = new Set<string>();\n for (const match of code.matchAll(/(?:from|import)\\s*['\"](\\.\\/[^'\"]+)['\"]/gu)) {\n const specifier = match[1]!.slice(2).replace(/\\.(?:[cm]?[jt]s)$/u, '');\n files.add(`${directory}${specifier}.ts`);\n }\n return [...files].sort();\n}\n\n/**\n * The products judged from the application's CONFIGURATION alone, never from the backend: a conferred role (#2305 S6), an\n * organization type and a relationship kind (#3035). All three are keys of `wildo.saas.config.ts`, which the backend\n * process does not hold.\n */\nexport type ConfigurationProvenProduct = Extract<AgentWorkProduct, {\n readonly kind: BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE | BuildPlanTaskProductKind.ORGANIZATION_TYPE | BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND;\n}>;\n\n/** Is this product judged from the configuration alone? The one test the dispatch branches on. */\nexport function isConfigurationProvenProduct(product: AgentWorkProduct): product is ConfigurationProvenProduct {\n return product.kind === BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE\n || product.kind === BuildPlanTaskProductKind.ORGANIZATION_TYPE\n || product.kind === BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND;\n}\n\n/** The agent-work products read from what the BACKEND registers; the configuration-proven ones are read from the configuration. */\nexport type RegisteredAgentWorkProduct = Exclude<AgentWorkProduct, ConfigurationProvenProduct>;\n\n/** One organization type as the configuration declares it, read for an `ORGANIZATION_TYPE` product (#3035). */\nexport interface ConfiguredOrganizationType {\n /** Its key in `organizationTypes`. */\n readonly organizationTypeRef: string;\n readonly ownsApplication: boolean;\n readonly userTypes: readonly string[];\n /** `availableOrgRoles` as declared, or `null` when the type takes the engine's default offer. */\n readonly availableOrgRoles: readonly string[] | null;\n /** `authOverrides.mfaPolicy.requireMFA`. */\n readonly requiresMfa: boolean;\n}\n\n/**\n * What the application's configuration declares that a landing probe asks about: its organization types (#3035), its\n * relationship kinds with what they confer (#2305 S6), and its system-of-record instances (#3039). Read from\n * `wildo.saas.config.ts` by {@link applicationConfigurationDeclarationsOf}.\n */\nexport interface ApplicationConfigurationDeclarations {\n /** Each `organizationTypes` entry, with what an `ORGANIZATION_TYPE` product compares (#3035). */\n readonly organizationTypes: readonly ConfiguredOrganizationType[];\n readonly relationshipConferrals: readonly RelationshipConferralDeclaration[];\n /**\n * Each `systemsOfRecord` instance: its key, the `vendor` whose facet it uses, whether it is `partition`ed (#3045), and\n * whether that vendor's facet declares a partition the engine can confine on (`partitionSupported`): `undefined` when the\n * facet library could not be read, which is not the same as \"it cannot\".\n */\n readonly systemsOfRecord: readonly {\n readonly systemOfRecordRef: string;\n readonly vendor: string | null;\n readonly partitioned: boolean;\n readonly partitionSupported?: boolean | undefined;\n }[];\n}\n\n/**\n * The application's configuration as the configuration-proven probes need it: read from `wildo.saas.config.ts`, fresh,\n * once per landing resolution and only when such a probe asks. Three-valued like the registry witness: a configuration\n * that could not be loaded carries its reason and lands nothing, never \"nothing is declared\".\n */\nexport type ApplicationConfigurationWitness =\n | { readonly answered: false; readonly reason: string }\n | { readonly answered: true; readonly configuration: ApplicationConfigurationDeclarations };\n\n/**\n * The configuration a resource-level product is read from, when the backend could not materialize it (#2305 review): a\n * work unit, a metered recording and a retention binding are all read off the resource's materialized configuration, so\n * for an unreadable one the probe cannot answer, and so is a system-of-record binding (#3039). `undefined` for an agent, a\n * gate, a confinement or a configuration-proven product, and for a resource that was read.\n */\nexport function unreadableResourceConfigurationFor(product: AgentWorkProduct, declarations: AgentWorkDeclarations): UnreadableResourceConfiguration | undefined {\n if (product.kind !== BuildPlanTaskProductKind.WORK_UNIT_RESOURCE && product.kind !== BuildPlanTaskProductKind.METERED_USAGE_RECORDING\n && product.kind !== BuildPlanTaskProductKind.RESOURCE_RETENTION_BINDING && product.kind !== BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING) return undefined;\n const spellings = new Set(resourceRefSpellings(product.resourceRef));\n return declarations.unreadableResourceConfigurations.find((unreadable) => spellings.has(unreadable.resourceType));\n}\n\n/**\n * What of one conferred role the application's configuration does not declare as planned (#2305 S6). Pure, over a\n * configuration that WAS read: one that could not be loaded is the caller's to report as unanswerable (#2305 review),\n * never a shortfall, since it says nothing about what the application declares.\n *\n * Note what \"conferred\" means here: the role is in the relationship kind's CEILING (`confers.roles`); each client still\n * grants it, or not, on its own relationship. And `ROLE_NOT_OFFERED_BY_GRANTING_TYPE` is a defensive check: the\n * configuration's own validation (`defineSaasConfig`) refuses a conferred role a granting type does not offer, so in\n * practice that mistake arrives as an unread configuration whose reason names it.\n */\nexport function findRelationshipConferredRoleShortfalls(\n product: Extract<AgentWorkProduct, { readonly kind: BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE }>,\n relationshipConferrals: readonly RelationshipConferralDeclaration[],\n): readonly AgentWorkShortfall[] {\n const shortfall = (kind: AgentWorkShortfallKind, planned: string | null = null, actual: string | null = null): AgentWorkShortfall[] => [\n { kind, ref: product.relationshipRef, planned, registered: actual },\n ];\n const kind = relationshipConferrals.find((candidate) => candidate.relationshipRef === product.relationshipRef);\n if (kind === undefined) return shortfall(AgentWorkShortfallKind.RELATIONSHIP_NOT_DECLARED);\n if (!kind.conferredRoles.includes(product.roleRef)) return shortfall(AgentWorkShortfallKind.ROLE_NOT_CONFERRED, product.roleRef, kind.conferredRoles.join(',') || null);\n const notOffering = kind.grantingTypes.filter((type) => !type.offeredConferredRoles.includes(product.roleRef)).map((type) => type.organizationType);\n return notOffering.length > 0 ? shortfall(AgentWorkShortfallKind.ROLE_NOT_OFFERED_BY_GRANTING_TYPE, product.roleRef, notOffering.join(',')) : [];\n}\n\n/**\n * What of one configuration-proven product the application's configuration does not declare (#2305 S6, #3035). Pure,\n * over a configuration that WAS read, like {@link findRelationshipConferredRoleShortfalls}. An organization type is\n * compared with what the plan decided of it ({@link findOrganizationTypeShortfalls}); a relationship kind lands on its\n * KEY: the configuration's own validation (`defineSaasConfig`, the relationship-kind checks) refuses an ill-formed\n * declaration, so one that is wrong arrives as an unread configuration naming why.\n */\nexport function findConfigurationShortfalls(product: ConfigurationProvenProduct, configuration: ApplicationConfigurationDeclarations): readonly AgentWorkShortfall[] {\n switch (product.kind) {\n case BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE:\n return findRelationshipConferredRoleShortfalls(product, configuration.relationshipConferrals);\n case BuildPlanTaskProductKind.ORGANIZATION_TYPE:\n return findOrganizationTypeShortfalls(product, configuration.organizationTypes);\n case BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND:\n return configuration.relationshipConferrals.some((kind) => kind.relationshipRef === product.relationshipRef)\n ? []\n : [{ kind: AgentWorkShortfallKind.RELATIONSHIP_NOT_DECLARED, ref: product.relationshipRef, planned: null, registered: null }];\n default: {\n const unhandled: never = product;\n throw new Error(`Unhandled configuration-proven product ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * What of one planned organization type the configuration does not declare (#3035, #3044).\n *\n * The OWNER type is found by `ownsApplication`, never by its key: the platform created the operator's organization under\n * the scaffold's key before the build ran, so a plan calling it `group` describes the configuration's `workspace`. Its\n * task RENAMES that type, and the owner's user types, to the plan's names through a declared rename (`renamedFrom`, which\n * re-types the seeded organization and the first administrator at the next start), so the owner lands only under the\n * plan's key and granting no user type of its own the plan does not name: a scaffold `member` left beside the plan's\n * `employee` is a key nobody renamed, held by the first administrator. A user type another type grants too is shared and\n * may stay. A non-owner type is found by its key. Then the type must offer every\n * planned role (read with the engine's `isOrganizationRoleOfferedByType`, default offer included), grant every planned\n * user type, and require a second factor exactly when the plan says. The joining posture is not compared: the\n * application line sets it, and a rename carries it along.\n */\nexport function findOrganizationTypeShortfalls(\n product: Extract<AgentWorkProduct, { readonly kind: BuildPlanTaskProductKind.ORGANIZATION_TYPE }>,\n organizationTypes: readonly ConfiguredOrganizationType[],\n): readonly AgentWorkShortfall[] {\n const owner = product.ownsApplication === true;\n const type = owner\n ? organizationTypes.find((candidate) => candidate.ownsApplication)\n : organizationTypes.find((candidate) => candidate.organizationTypeRef === product.organizationTypeRef);\n if (type === undefined) {\n return [{ kind: owner ? AgentWorkShortfallKind.APPLICATION_OWNER_TYPE_NOT_DECLARED : AgentWorkShortfallKind.ORGANIZATION_TYPE_NOT_DECLARED, ref: product.organizationTypeRef, planned: null, registered: null }];\n }\n const ref = type.organizationTypeRef;\n const offering = { [ref]: { availableOrgRoles: type.availableOrgRoles ?? undefined } };\n const notOffered = (product.offeredRoles ?? []).filter((role) => !isOrganizationRoleOfferedByType(offering, ref, role));\n const notGranted = (product.userTypes ?? []).filter((userType) => !type.userTypes.includes(userType));\n /*\n * An owner user type the plan does not name is a scaffold key nobody renamed (`member` beside the plan's `employee`),\n * unless another organization type grants it too: then it is shared (a service firm's clients hold `member` as well), a\n * rename would split it, which a declared rename refuses, and the plan's type is added beside it instead.\n */\n const sharedUserTypes = new Set(organizationTypes.filter((candidate) => candidate !== type).flatMap((candidate) => candidate.userTypes));\n const notPlanned = owner && product.userTypes !== undefined\n ? type.userTypes.filter((userType) => !product.userTypes!.includes(userType) && !sharedUserTypes.has(userType))\n : [];\n return [\n ...(owner && ref !== product.organizationTypeRef\n ? [{ kind: AgentWorkShortfallKind.APPLICATION_OWNER_TYPE_KEY_DIFFERS, ref, planned: product.organizationTypeRef, registered: ref }]\n : []),\n ...(notPlanned.length > 0 ? [{ kind: AgentWorkShortfallKind.APPLICATION_OWNER_USER_TYPES_NOT_PLANNED, ref, planned: product.userTypes!.join(',') || null, registered: notPlanned.join(',') }] : []),\n ...(notOffered.length > 0 ? [{ kind: AgentWorkShortfallKind.ORGANIZATION_TYPE_ROLES_NOT_OFFERED, ref, planned: notOffered.join(','), registered: type.availableOrgRoles?.join(',') ?? null }] : []),\n ...(notGranted.length > 0 ? [{ kind: AgentWorkShortfallKind.ORGANIZATION_TYPE_USER_TYPES_NOT_GRANTED, ref, planned: notGranted.join(','), registered: type.userTypes.join(',') || null }] : []),\n ...(product.requiresMfa !== undefined && product.requiresMfa !== type.requiresMfa\n ? [{ kind: AgentWorkShortfallKind.ORGANIZATION_TYPE_MFA_DIFFERS, ref, planned: String(product.requiresMfa), registered: String(type.requiresMfa) }]\n : []),\n ];\n}\n\n/**\n * The configuration half of a system-of-record binding (#3039): the instance the resource binds must be one the\n * application declares under `systemsOfRecord`, or the backend refuses the binding at startup, and of the vendor the\n * domain plan named, or the records come from another system than planned. Pure, over a configuration that was read.\n * The binding itself is the registry's to say ({@link findAgentWorkShortfalls}).\n */\nexport function findSystemOfRecordDeclarationShortfalls(\n product: Extract<AgentWorkProduct, { readonly kind: BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING }>,\n configuration: ApplicationConfigurationDeclarations,\n): readonly AgentWorkShortfall[] {\n const instance = configuration.systemsOfRecord.find((candidate) => candidate.systemOfRecordRef === product.systemOfRecordRef);\n if (instance === undefined) return [{ kind: AgentWorkShortfallKind.SYSTEM_OF_RECORD_NOT_DECLARED, ref: product.systemOfRecordRef, planned: null, registered: null }];\n return [\n ...(instance.vendor === product.systemOfRecordKind\n ? []\n : [{ kind: AgentWorkShortfallKind.SYSTEM_OF_RECORD_VENDOR_DIFFERS, ref: product.systemOfRecordRef, planned: product.systemOfRecordKind, registered: instance.vendor }]),\n /*\n * #3045: the instance is partitioned exactly when the plan splits its records by legal entity. A plan written before\n * the split was recorded (`partitioned` absent) compares nothing. Whether the vendor's facet CAN partition is the next\n * entry's.\n */\n ...(product.partitioned === undefined || product.partitioned === instance.partitioned\n ? []\n : [{ kind: AgentWorkShortfallKind.SYSTEM_OF_RECORD_PARTITION_DIFFERS, ref: product.systemOfRecordRef, planned: String(product.partitioned), registered: String(instance.partitioned) }]),\n /*\n * A partitioned instance of a vendor whose facet declares no partition the engine can confine on: the backend refuses\n * it at startup (`PARTITION_NOT_SUPPORTED_BY_VENDOR`, or `PARTITION_KIND_UNSUPPORTED` for a path segment), so it has\n * not landed. Reached by a plan whose split was UNCONFIRMED (no facets read when it was written). Whether the facet\n * library could be read at all is the caller's to report as unanswerable ({@link systemOfRecordPartitionUnanswerable}).\n */\n ...(product.partitioned === true && instance.partitioned && instance.partitionSupported === false\n ? [{ kind: AgentWorkShortfallKind.SYSTEM_OF_RECORD_PARTITION_NOT_SUPPORTED_BY_VENDOR, ref: product.systemOfRecordRef, planned: 'true', registered: instance.vendor }]\n : []),\n ];\n}\n\n/**\n * Why a planned partition cannot be judged, or `undefined` (#3045): a binding that partitions its instance lands only on a\n * vendor whose facet can split, and with the facet library unread that is unknown. Unanswerable, never landed: a\n * partition the backend may refuse at startup would otherwise read as done.\n */\nexport function systemOfRecordPartitionUnanswerable(\n product: Extract<AgentWorkProduct, { readonly kind: BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING }>,\n configuration: ApplicationConfigurationDeclarations,\n): string | undefined {\n if (product.partitioned !== true) return undefined;\n const instance = configuration.systemsOfRecord.find((candidate) => candidate.systemOfRecordRef === product.systemOfRecordRef);\n if (instance === undefined || !instance.partitioned || instance.partitionSupported !== undefined) return undefined;\n return `Whether vendor ${instance.vendor ?? '(none)'} can split \\`${product.systemOfRecordRef}\\`'s records by legal entity is unknown: the system-of-record facets could not be read (run \\`wildo config sync\\` so the backend declares and links @wildo-ai/systems-of-record), or the engine's resolution of the instance's facet refused it (an augmentation package it opts into is not discovered, unreadable or in conflict), which the backend also refuses at startup, naming why.`;\n}\n\n/**\n * Whether an instance's vendor can split its records (#3045), from the instance's EFFECTIVE facet as the engine's own\n * resolution gives it (`loadEffectiveSystemOfRecordFacets`, a facet augmentation the instance opted into included, #3053):\n * `systemOfRecordInstancePartitionSupport` holds, per instance key, `true` or `false`, or `undefined` when the resolution\n * refused the facet. An instance it does not list has no facet, so it cannot split. No property at all when the facets\n * were not read: that is not the same as \"it cannot\".\n */\nfunction partitionSupportOf(\n instanceKey: string,\n systemOfRecordInstancePartitionSupport: Readonly<Record<string, boolean | undefined>> | undefined,\n): { readonly partitionSupported?: boolean } {\n if (systemOfRecordInstancePartitionSupport === undefined) return {};\n const supported = Object.hasOwn(systemOfRecordInstancePartitionSupport, instanceKey) ? systemOfRecordInstancePartitionSupport[instanceKey] : false;\n return supported === undefined ? {} : { partitionSupported: supported };\n}\n\n/**\n * Everything the configuration-proven probes read from a loaded `wildo.saas.config.ts` (#3035, #3039). Pure: the keys of\n * `organizationTypes`, each `systemsOfRecord` instance with its vendor and partition flag (#3045), and the relationship kinds as\n * {@link relationshipConferralsOf} reads them. `systemOfRecordInstancePartitionSupport`, per instance and when the caller\n * could resolve the facets, says whether each instance's effective facet can split its records ({@link partitionSupportOf}).\n */\nexport function applicationConfigurationDeclarationsOf(config: Parameters<typeof relationshipConferralsOf>[0] & {\n readonly organizationTypes?: Readonly<Record<string, {\n readonly availableOrgRoles?: readonly string[];\n readonly ownsApplication?: unknown;\n readonly userTypes?: readonly string[];\n readonly authOverrides?: { readonly mfaPolicy?: { readonly requireMFA?: unknown } };\n }>>;\n readonly systemsOfRecord?: Readonly<Record<string, { readonly vendor?: unknown; readonly partition?: unknown } | undefined>>;\n}, systemOfRecordInstancePartitionSupport?: Readonly<Record<string, boolean | undefined>>): ApplicationConfigurationDeclarations {\n return {\n organizationTypes: Object.entries(config.organizationTypes ?? {}).map(([organizationTypeRef, type]) => ({\n organizationTypeRef,\n ownsApplication: type?.ownsApplication === true,\n userTypes: [...(type?.userTypes ?? [])],\n availableOrgRoles: type?.availableOrgRoles === undefined ? null : [...type.availableOrgRoles],\n requiresMfa: type?.authOverrides?.mfaPolicy?.requireMFA === true,\n })),\n relationshipConferrals: relationshipConferralsOf(config),\n systemsOfRecord: Object.entries(config.systemsOfRecord ?? {}).map(([systemOfRecordRef, instance]) => ({\n systemOfRecordRef,\n vendor: typeof instance?.vendor === 'string' ? instance.vendor : null,\n partitioned: instance?.partition === true,\n ...partitionSupportOf(systemOfRecordRef, systemOfRecordInstancePartitionSupport),\n })),\n };\n}\n\n/**\n * The relationship kinds of an application's configuration, as a conferred-role probe reads them (#2305 S6): each kind's\n * conferred roles, and the roles each organization type it grants offers, read with the engine's own rule\n * (`isOrganizationRoleOfferedByType`, which falls back to the default offer when a type declares none). Pure, over the\n * loaded `wildo.saas.config.ts`.\n */\nexport function relationshipConferralsOf(config: {\n readonly organizationRelationships?: Readonly<Record<string, { readonly granting?: { readonly organizationTypes?: Readonly<Record<string, unknown>> }; readonly confers?: { readonly roles?: readonly string[] } }>>;\n readonly organizationTypes?: Readonly<Record<string, { readonly availableOrgRoles?: readonly string[] }>>;\n}): readonly RelationshipConferralDeclaration[] {\n return Object.entries(config.organizationRelationships ?? {}).map(([relationshipRef, kind]) => {\n const conferredRoles = [...(kind.confers?.roles ?? [])];\n return {\n relationshipRef,\n conferredRoles,\n grantingTypes: Object.keys(kind.granting?.organizationTypes ?? {}).map((organizationType) => ({\n organizationType,\n offeredConferredRoles: conferredRoles.filter((role) => isOrganizationRoleOfferedByType(config.organizationTypes, organizationType, role)),\n })),\n };\n });\n}\n\n/**\n * The files a configuration file imports by RELATIVE path, `./` and `../` alike (#2305 review): the files whose content\n * a product declared in it is evaluated from. A resource's retention binding is often a constant one directory up\n * (Wonder Ledger's `month-end-close.retention.ts`), and the application's configuration imports its roles from\n * `./shared-lib/…`; such a file left uncommitted changes what the registry answers while the configuration itself is\n * identical to HEAD. Read from the text with comments blanked; a specifier's `.js` / `.ts` extension is replaced by\n * `.ts`, as NodeNext imports write it, and a path leaving the application root is ignored. The reader then requires the\n * ones that exist in its tree (a directory specifier resolves to its `index.ts`).\n */\nexport function relativeImportedFiles(importerPath: string, importerText: string): readonly string[] {\n const directory = posix.dirname(importerPath);\n const files = new Set<string>();\n for (const match of blankSourceComments(importerText).matchAll(/(?:from|import)\\s*['\"](\\.{1,2}\\/[^'\"]+)['\"]/gu)) {\n const resolved = posix.normalize(posix.join(directory, match[1]!)).replace(/\\.(?:[cm]?[jt]s)$/u, '');\n if (resolved.startsWith('../') || resolved === '..') continue;\n files.add(`${resolved}.ts`);\n }\n return [...files].sort();\n}\n\nexport type BuildPlanTaskLandedProbe =\n | { readonly kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE; readonly path: string }\n | {\n readonly kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES;\n readonly path: string;\n readonly declarations: readonly string[];\n /** Where the declarations must appear together, or that each may appear alone — see {@link ProductDeclarationSite}. */\n readonly site: ProductDeclarationSite;\n }\n | {\n readonly kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES;\n readonly paths: readonly string[];\n readonly declarations: readonly string[];\n /**\n * Which of `paths` the producing task may WRITE — never assumed to be all of them.\n *\n * Landing READS every candidate and is satisfied by ANY of them (`texts.some(...)`). That is\n * right for landing and catastrophic as a write grant: one of `APPLICATION_DOCUMENT`'s two\n * candidates is `specifications/src/document-facts/index.ts`, which belongs to\n * `refinement.document-facts` and is the artifact `refinement.compliance-document-candidate`\n * checks every clause against — \"a clause asserting a fact the application never declared is\n * refused before it becomes a file\". Handing a build coding agent that file would let it author\n * the facts it wants to cite, and, because landing is satisfied by any candidate, writing the\n * documentRef into it ALONE would mark the task landed without producing a document at all.\n *\n * Required rather than optional, so a probe added tomorrow must state the split instead of\n * inheriting the permissive answer — the shape that produced this defect in the first place.\n */\n readonly writablePaths: readonly string[];\n readonly site: ProductDeclarationSite;\n }\n | { readonly kind: BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_PACKS_DECLARE; readonly paths: readonly string[]; readonly fragmentPaths: readonly string[]; readonly keyPrefix: string }\n | { readonly kind: BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_FILE_DECLARES_KEYS; readonly path: string; readonly keys: readonly string[] }\n | { readonly kind: BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN; readonly surface: PlacementSurface }\n | { readonly kind: BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT }\n | {\n readonly kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED;\n readonly product: AgentWorkProduct;\n /**\n * The module the product must be registered in: the task's target module. A product of the whole application (a\n * relationship role, #2305 S6) carries {@link APPLICATION_WIDE_AGENT_WORK_MODULE_REF}, which no reading consults.\n */\n readonly moduleRef: string;\n /** The files that register the product, each required identical to HEAD. */\n readonly registrationFiles: readonly string[];\n /**\n * The `addons/flows-actors/index.ts` whose own `./` imports are ALSO required committed, read from the reader's own\n * text of it (`flowsActorsIndexImportedFiles`); absent for a work unit. Its imports rather than its whole directory, so\n * a sibling task's draft agent file, or a gitignored file, never holds this product back.\n */\n readonly followImportsOf?: string;\n /**\n * A configuration file whose RELATIVE imports (`./` and `../`, {@link relativeImportedFiles}) are also required\n * committed (#2305 review): the resource configuration of a work unit, a usage recording or a retention binding, and\n * `wildo.saas.config.ts` for a conferred role. The value the registry or the configuration answers is evaluated from\n * those files too, so an uncommitted one would otherwise land a product HEAD does not carry.\n */\n readonly followRelativeImportsOf?: string;\n };\n\n/** A task whose product names a module the plan never places it in — a plan-authoring fault, surfaced rather than guessed past. */\nexport class ApplicationBuildTaskProductNotPlaceableError extends Error {\n public constructor(public readonly taskRef: string, public readonly detail: string) {\n super(`Build task ${taskRef} declares a product that cannot be placed: ${detail}`);\n this.name = 'ApplicationBuildTaskProductNotPlaceableError';\n }\n}\n\n/**\n * The module a product's artifact lives under.\n *\n * A product is SEMANTIC and names no path, so the host supplies the placement — exactly as it\n * supplies the mutation scope. `target` is the right source for it: it is a write scope, which is\n * precisely the question \"which module does this task write in?\", and it is the one question a write\n * scope answers correctly.\n */\nfunction productModuleRef(task: BuildPlanTask): string {\n const target = task.target;\n switch (target.kind) {\n case BuildPlanTaskTargetKind.MODULE:\n case BuildPlanTaskTargetKind.RESOURCE_STAGE:\n case BuildPlanTaskTargetKind.RELATIONSHIP:\n case BuildPlanTaskTargetKind.MODULE_FRONTEND:\n case BuildPlanTaskTargetKind.MODULE_BACKEND:\n return target.moduleRef;\n case BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP:\n case BuildPlanTaskTargetKind.SHELL_PLACEMENT:\n case BuildPlanTaskTargetKind.APPLICATION_FRONTEND_CONFIG:\n case BuildPlanTaskTargetKind.WEBSITE:\n case BuildPlanTaskTargetKind.TECHNICAL_DOCUMENTATION:\n case BuildPlanTaskTargetKind.WORKER:\n case BuildPlanTaskTargetKind.MINION:\n case BuildPlanTaskTargetKind.PROVIDER_BINDING:\n case BuildPlanTaskTargetKind.BILLING_CATALOG:\n case BuildPlanTaskTargetKind.APPLICATION_ROLES:\n case BuildPlanTaskTargetKind.ORGANIZATION_MODEL:\n throw new ApplicationBuildTaskProductNotPlaceableError(task.taskRef, `target kind ${target.kind} names no module`);\n default: {\n const unhandled: never = target;\n throw new Error(`Unhandled build-plan task target ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * The runtime a worker product's entry file is read for — from the WORKER target, which is the only\n * place it is declared. A worker product under any other target cannot be placed: the plan would be\n * asking the host to guess between `src/index.ts` and `src/main.rs`.\n */\nfunction productWorkerRuntime(task: BuildPlanTask): BuildPlanWorkerRuntime {\n const target = task.target;\n if (target.kind !== BuildPlanTaskTargetKind.WORKER) {\n throw new ApplicationBuildTaskProductNotPlaceableError(task.taskRef, `a worker product needs a ${BuildPlanTaskTargetKind.WORKER} target to name its runtime; got ${target.kind}`);\n }\n return target.runtime;\n}\n\n/**\n * The conventional definitions file of each guidance kind, under the module's frontend — total over\n * {@link ApplicationGuidanceKind}, so a third kind must name its file or fail to compile. The\n * `guidance-onboarding-authoring` skill tells the coding agent these same two names.\n */\nconst APPLICATION_GUIDANCE_DEFINITIONS_FILE: Readonly<Record<ApplicationGuidanceKind, (moduleRef: string) => string>> = {\n [ApplicationGuidanceKind.ONBOARDING_DOCUMENT]: (moduleRef) => `frontend/src/modules/${moduleRef}/app-level-views/onboarding-views.definitions.ts`,\n [ApplicationGuidanceKind.GUIDANCE_FLOW]: (moduleRef) => `frontend/src/modules/${moduleRef}/app-level-views/guidance-flows.definitions.ts`,\n};\n\n/**\n * The file an inbound channel handler lives in, without its extension — DERIVED from the handler's ref, never\n * chosen (#1832): `matters.mail-intake` → `inbound/matters.mail-intake.inbound-channel-handler`. A determined\n * name is what lets landing ask one question of the module index — does it import this file? — where an\n * author-chosen name would leave nothing to ask. The `inbound-channels` skill states the same rule.\n */\nexport function inboundChannelHandlerFileStem(handlerRef: string): string {\n return `${handlerRef}.inbound-channel-handler`;\n}\n\n/**\n * What the module index's import of an inbound channel handler must spell: the file stem QUALIFIED by the\n * `inbound/` directory it lives in. The directory is what makes the match exact. The stem alone would be\n * found inside another handler's longer name, because a whole-word match treats `.` as a boundary:\n * `inbound/crm.mail-intake.inbound-channel-handler` contains `mail-intake.inbound-channel-handler`, but not\n * `inbound/mail-intake.inbound-channel-handler`.\n */\nexport function inboundChannelHandlerImportTail(handlerRef: string): string {\n return `inbound/${inboundChannelHandlerFileStem(handlerRef)}`;\n}\n\n/**\n * The file a data seed lives in, without its extension — DERIVED from the seed's key, never chosen (#2234):\n * `crm:demo-customers` → `seeds/crm.demo-customers.seed`. `:` becomes `.` because a file name cannot carry `:` on\n * every platform. The `seeding-authoring` skill states the same rule, so the agent writes the file landing reads.\n */\nexport function dataSeedFileStem(seedKey: string): string {\n return `${seedKey.replaceAll(':', '.')}.seed`;\n}\n\n/**\n * The skills a task's PRODUCTS require, whatever the decomposer wrote (#1832, #1835). A task producing an inbound\n * channel handler is authored with `inbound-channels`: the skill carries the handler contract, the file-name rule\n * the landing probe depends on, and the rule that a message never authorizes a payment or an approval — so a\n * decomposer that forgot to list it must not leave the agent without it.\n */\nexport function productDerivedSkillRefs(task: BuildPlanTask): readonly string[] {\n const kinds = new Set(task.produces.map((product) => product.kind));\n return [\n ...(kinds.has(BuildPlanTaskProductKind.INBOUND_CHANNEL_HANDLER) ? [INTEGRATION_INBOUND_CHANNEL_SKILL_REF] : []),\n // #1835: the catalogue the backend sells from and the website advertises is written with its contract in hand.\n // #2305 S5: an operation recording usage is written with the metered-usage contract, from the same billing skill.\n ...(kinds.has(BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT) || kinds.has(BuildPlanTaskProductKind.METERED_USAGE_RECORDING) ? [BILLING_CATALOG_SKILL_REF] : []),\n // #2490: a role is declared with the three places it must appear in hand — table, organization type, operations.\n ...(kinds.has(BuildPlanTaskProductKind.APPLICATION_ROLE) ? [APPLICATION_ROLES_SKILL_REF] : []),\n // #2234: a seed is authored with its levels, modes, business keys and environment restriction in hand.\n ...(kinds.has(BuildPlanTaskProductKind.APPLICATION_DATA_SEED) ? [DATA_SEED_SKILL_REF] : []),\n // #2495: a generated document is authored with the template contract in hand.\n ...(kinds.has(BuildPlanTaskProductKind.PDF_TEMPLATE) ? [PDF_TEMPLATE_SKILL_REF] : []),\n // #2966: an agent with the skill of its shape, a gate with the `humanApproval` contract, and both with their declared use.\n ...task.produces.flatMap((product) => (product.kind === BuildPlanTaskProductKind.APPLICATION_AGENT ? [BUILD_PLAN_AGENT_SHAPE_SKILL_REF[product.shape]] : [])),\n ...(kinds.has(BuildPlanTaskProductKind.AGENT_APPROVAL_GATE) ? [AGENT_APPROVAL_GATE_SKILL_REF] : []),\n ...(kinds.has(BuildPlanTaskProductKind.APPLICATION_AGENT) || kinds.has(BuildPlanTaskProductKind.AGENT_APPROVAL_GATE) ? [AI_USE_DECLARATION_SKILL_REF] : []),\n ...(kinds.has(BuildPlanTaskProductKind.WORK_UNIT_RESOURCE) ? [WORK_UNIT_SKILL_REF] : []),\n // #2305 S6: a binding is written with the retention contract, a conferred role with the relationship one.\n ...(kinds.has(BuildPlanTaskProductKind.RESOURCE_RETENTION_BINDING) ? [RESOURCE_RETENTION_SKILL_REF] : []),\n ...(kinds.has(BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE) ? [ORGANIZATION_RELATIONSHIPS_SKILL_REF] : []),\n // #3040: the organization model is built with the skill that teaches each of its declarations.\n ...(kinds.has(BuildPlanTaskProductKind.ORGANIZATION_TYPE) ? [ORGANIZATION_TYPE_SKILL_REF] : []),\n ...(kinds.has(BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND) ? [ORGANIZATION_RELATIONSHIPS_SKILL_REF] : []),\n ...(kinds.has(BuildPlanTaskProductKind.ORGANIZATION_UNIT_CONFINEMENT) ? [ORGANIZATION_UNIT_CONFINEMENT_SKILL_REF] : []),\n ...(kinds.has(BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING) ? SYSTEM_OF_RECORD_BINDING_SKILL_REFS : []),\n ].filter((skillRef, index, all) => all.indexOf(skillRef) === index);\n}\n\n/** Where a resource's schema lives in the standard layout — the file a resource SCHEMA task writes. */\nexport function resourceSchemaFilePath(moduleRef: string, resourceRef: string): string {\n return `shared-lib/src/modules/${moduleRef}/resources/${resourceRef}/${resourceRef}.schemas.ts`;\n}\n\n/**\n * The field declarations that make a resource hold PERSONAL DATA — the same markers the engine's\n * `resolveResourcePersonalDataCategories` reads (a declared category, a credential marker, an erasure scrub, a portability\n * provenance), as the method and standalone-helper names an author writes. Derived from declarations, never from a\n * field being called `email`: that is the engine's own rule, and a guess here would route on names.\n */\nconst PERSONAL_DATA_DECLARATION_CALLS: readonly string[] = [\n // Fluent methods, and the four standalone helpers `@wildo-ai/zod-decorators` exports for schemas that have no fluent\n // form — `addDataCategories(z_phone(), …)` is the ONLY way to mark a phone number (#2495 review R1).\n 'dataCategories', 'addDataCategories',\n 'isPassword', 'isOtp', 'isWriteOnlySecret', 'addWriteOnlySecret',\n 'impersonalizeWith', 'addImpersonalizeWith',\n 'portabilityProvenance', 'addPortabilityProvenance',\n];\n\n/**\n * Does this schema source DECLARE personal data (#2495)? Read lexically, with comments blanked, because at dispatch the\n * schema is a file the previous task wrote, not a loaded module. A call, never a mention: `.dataCategories(` or\n * `addImpersonalizeWith(`.\n */\nexport function schemaSourceDeclaresPersonalData(text: string): boolean {\n const code = blankSourceComments(text);\n return PERSONAL_DATA_DECLARATION_CALLS.some((name) => new RegExp(`(?<![A-Za-z0-9_$])${name}\\\\s*\\\\(`, 'u').test(code));\n}\n\n/**\n * The skills a task's TARGET requires, whatever the decomposer wrote (#2495). A resource's CONFIG stage is where its\n * retention binding is declared (`retentionBinding`), and a resource holding personal data owes one: storage limitation\n * is a duty about personal data. 005 declared personal data on six resources and its workers bound none, because the\n * question was never in front of them. Routed only there: a resource with no personal data has no such duty, and\n * routing the skill everywhere had every CONFIG task of a wave editing the shared retention schedule at once.\n */\nexport function targetDerivedSkillRefs(task: BuildPlanTask, facts: { readonly targetDeclaresPersonalData: boolean }): readonly string[] {\n const isConfigStage = task.target.kind === BuildPlanTaskTargetKind.RESOURCE_STAGE && task.target.stage === BuildPlanResourceStage.CONFIG;\n return isConfigStage && facts.targetDeclaresPersonalData ? [RESOURCE_RETENTION_SKILL_REF] : [];\n}\n\nexport function resolveBuildTaskLandedProbes(task: BuildPlanTask): readonly BuildPlanTaskLandedProbe[] {\n /*\n * A generation step's landing is the generation-step service's answer, not this table's — it is\n * resolved asynchronously (planner units x enabled locales) and one step lands on a STATE rather\n * than on files. Returning nothing keeps a caller that forgets that seam fail-closed\n * (never-landed) instead of wrongly landed.\n */\n if (task.target.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) return [];\n if (task.target.kind === BuildPlanTaskTargetKind.SHELL_PLACEMENT) {\n // The surface carries what the plan decided for it, by identity — never the plan's refs by text,\n // which the tree does not spell (#1546, #1538).\n return [{ kind: BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN, surface: task.target.surface }];\n }\n /*\n * LAZY, since #1490: a website page, a worker job or a provider binding names no module, and a\n * task carrying only such products under a module-less target must not be refused for a module it\n * never needed. Resolved once, the first time a module-relative product asks for it.\n */\n let resolvedModuleRef: string | undefined;\n const moduleRefOf = (): string => (resolvedModuleRef ??= productModuleRef(task));\n return task.produces.flatMap((product) => {\n const drafts = landedProbeDraft(task, product, moduleRefOf);\n return (Array.isArray(drafts) ? drafts : [drafts]).map((draft) => withDeclarationSite(product, draft));\n }).filter((probe): probe is BuildPlanTaskLandedProbe => probe !== undefined);\n}\n\n/**\n * Where each LAYER registers an application module, as the `add-module` scenario writes it (#3701) — one entry per layer,\n * and a module is registered only when every layer carries it:\n *\n * - **shared**: `shared-lib/src/modules-registry.shared.ts` imports `./modules/<id>` (or the modules barrel exports it);\n * - **frontend**: `frontend/src/modules/index.ts` imports `./<id>` into `applicationFrontendModules` (or the registry names it);\n * - **backend**: the modules barrel DISCOVERS `backend-api/src/modules/<id>/index.ts` by scanning (`scanSubdirDefaultExports`),\n * and that descriptor names `moduleId: '<id>'`; an application that registers by hand names it in the registry or barrel.\n *\n * Every path is in {@link MODULE_REGISTRY_FILES} or under the module's own backend directory, which a MODULE target allows.\n */\nexport const MODULE_REGISTRY_LAYER_PATHS: Readonly<Record<'shared' | 'frontend' | 'backend', (moduleRef: string) => readonly string[]>> = {\n shared: () => ['shared-lib/src/modules-registry.shared.ts', 'shared-lib/src/modules/index.ts'],\n frontend: () => ['frontend/src/modules/index.ts', 'frontend/src/modules-registry.frontend.ts'],\n backend: (moduleRef) => [`backend-api/src/modules/${moduleRef}/index.ts`, 'backend-api/src/modules-registry.backend.ts', 'backend-api/src/modules/index.ts'],\n};\n\n/** One probe per layer: the module is declared in one of that layer's registration homes (#3701). All must hold. */\nfunction moduleRegistryMembershipProbes(moduleRef: string): readonly BuildPlanTaskLandedProbeDraft[] {\n return Object.values(MODULE_REGISTRY_LAYER_PATHS).map((pathsOf) => ({\n kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES,\n paths: pathsOf(moduleRef),\n writablePaths: pathsOf(moduleRef),\n declarations: [moduleRef],\n }) as const);\n}\n\n/** A probe as a product's case builds it — before its declaration site is attached from the one table. */\ntype WithoutSite<T> = T extends { readonly site: ProductDeclarationSite } ? Omit<T, 'site'> : T;\ntype BuildPlanTaskLandedProbeDraft = WithoutSite<BuildPlanTaskLandedProbe>;\n\n/**\n * Attach the product's declaration site to a probe that asks about declarations (#1539). Done HERE,\n * once, rather than in each case, so no case can state a site that disagrees with\n * {@link productDeclarationSite} — the table is the only answer.\n */\nfunction withDeclarationSite(\n product: BuildPlanTask['produces'][number],\n draft: BuildPlanTaskLandedProbeDraft | undefined,\n): BuildPlanTaskLandedProbe | undefined {\n if (draft === undefined) return undefined;\n switch (draft.kind) {\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES:\n case BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES:\n return { ...draft, site: productDeclarationSite(product) };\n default:\n return draft;\n }\n}\n\n/**\n * A product's landing draft — or several, when the product is real only once it exists in more than one place (a\n * website section: defined in its page's list AND worded for every committed locale, in that locale's pack or in the\n * section's own file, #2216, #3204). Every one must hold.\n */\nfunction landedProbeDraft(\n task: BuildPlanTask,\n product: BuildPlanTask['produces'][number],\n moduleRefOf: () => string,\n): BuildPlanTaskLandedProbeDraft | readonly BuildPlanTaskLandedProbeDraft[] | undefined {\n switch (product.kind) {\n case BuildPlanTaskProductKind.APPLICATION_FRONTEND_CONFIG:\n // The SHELL frame is witnessed by identity, like its placements: its declarations are\n // experience-plan refs that land as sidebar sections, commands and dropdown entries, never as\n // those strings (#1538). The other config surfaces still have a file the refs are spelled in.\n if (product.configSurface === FrontendConfigSurface.APP_SHELL) {\n return { kind: BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT } as const;\n }\n // The declarations, in the one file the surface names — a config file is scaffolded, its entries are not.\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: FRONTEND_CONFIG_FILE[product.configSurface],\n declarations: product.declarationRefs,\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_CUSTOM_VIEW:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: `frontend/src/modules/${moduleRefOf()}/resources/${product.resourceRef}/${product.resourceRef}.ui-behavior.tsx`,\n // The COMPONENT the binding names, not the plan's ref — which the tree never spells.\n declarations: [resourceCustomViewIdentity(product.viewRef)],\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_COMPOSITE_VIEW:\n /*\n * The ui-behavior is where a resource BINDS its views (`compositeViews`, a custom operation's\n * view, an execution view), so it is the one file that proves the view is wired rather than\n * merely written. The component file's name is the author's (`TaskWorkspaceCompositeView.tsx`)\n * and cannot be derived from the ref, which is why the probe does not look for it.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: `frontend/src/modules/${moduleRefOf()}/resources/${product.resourceRef}/${product.resourceRef}.ui-behavior.tsx`,\n declarations: [product.viewRef],\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_CHART_VIEW:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: `frontend/src/modules/${moduleRefOf()}/resources/${product.resourceRef}/${product.resourceRef}.ui-behavior.tsx`,\n declarations: [product.chartRef],\n } as const;\n case BuildPlanTaskProductKind.CUSTOM_COMPONENT: {\n /*\n * Two legitimate homes: a module registers its own components on its frontend module\n * (`componentRegistrations`), and application-wide ones live in the engine registrations\n * file. Both are writable — the `MODULE_FRONTEND` target names both.\n */\n const paths = [`frontend/src/modules/${moduleRefOf()}/index.ts`, 'frontend/src/engine/component-registrations.frontend.ts'];\n return { kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES, paths, writablePaths: paths, declarations: [product.componentRef] } as const;\n }\n case BuildPlanTaskProductKind.APPLICATION_MILESTONE: {\n /*\n * The IDENTIFIER, in the module's own milestone file or where the module lists it. Both sit\n * under the module's shared-lib directory, which the `MODULE_BACKEND` target carrying this\n * product already allows. `first-deal-won` matches `FIRST_DEAL_WON` through the matcher's\n * spellings, which is how a milestone identifier is written.\n *\n * Known looseness, accepted: the matcher's right boundary admits `_`, so an already-declared\n * `FIRST_DEAL_WON_TWICE` would satisfy `first-deal-won`. Tightening it would break the suffixed\n * spellings other products rely on, and a plan naming one milestone as the prefix of another\n * is itself the thing to avoid.\n */\n const paths = [`shared-lib/src/modules/${moduleRefOf()}/milestones.ts`, `shared-lib/src/modules/${moduleRefOf()}/index.ts`];\n return {\n kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES,\n paths,\n /*\n * WRITABLE beyond what landing reads: the milestone's specification, which grounds the words\n * its labels are generated from. The `milestones-and-celebrations` skill tells the agent to\n * write it, and the `MODULE_BACKEND` scope does not reach `specifications/` — without this\n * the scope check flags an agent for following its own skill. Not a landing candidate: a\n * specification that documents a milestone nobody declared proves nothing.\n */\n writablePaths: [...paths, `specifications/src/modules/${moduleRefOf()}/milestones/`],\n declarations: [product.milestoneRef],\n } as const;\n }\n case BuildPlanTaskProductKind.APPLICATION_GUIDANCE: {\n // The REF, in the definitions file its kind names, or inline on the module that lists it.\n const paths = [APPLICATION_GUIDANCE_DEFINITIONS_FILE[product.guidanceKind](moduleRefOf()), `frontend/src/modules/${moduleRefOf()}/index.ts`];\n return { kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES, paths, writablePaths: paths, declarations: [product.guidanceRef] } as const;\n }\n case BuildPlanTaskProductKind.PDF_TEMPLATE: {\n // The BINDING, not the template file: a template that nothing binds renders nothing.\n const paths = [\n `backend-api/src/modules/${moduleRefOf()}/pdf/pdf-template-bindings.ts`,\n `backend-api/src/modules/${moduleRefOf()}/module-pdf-template-bindings.ts`,\n ];\n return { kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES, paths, writablePaths: paths, declarations: [product.templateRef] } as const;\n }\n case BuildPlanTaskProductKind.APPLICATION_WORKER:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: WORKER_ENTRY_FILE[productWorkerRuntime(task)](product.workerRef),\n declarations: product.jobRefs,\n } as const;\n case BuildPlanTaskProductKind.APPLICATION_MINION:\n /*\n * The DECLARATION, not the behaviour refs — which the tree never spells (#1273).\n *\n * `behaviorRefs` are JOBS-TO-BE-DONE refs from the requirements vocabulary, not names the\n * minion declares. Measured on the first end-to-end run:\n * `job-establish-lightweight-learning-routine` appears in `specifications/src/{requirements,\n * market,integration-plan,website-plan,build-plan}` and NOWHERE in application code. The\n * minion's entry is a runtime bootstrap (dotenv, DI setup, a `minion-init` import) and its\n * behaviour is one `onTick` handler; there is no job name anywhere for the probe to find.\n *\n * So the task ran, composed the whole package — manifest, both tsconfigs, Dockerfile,\n * `wildo.minion.config.ts`, five source files — declared it in `wildo.saas.config.ts`, and\n * recorded `working_result_recorded`, and the board still read it as not landed.\n *\n * `wildo.saas.config.ts` is what the tree DOES spell, and it is the right witness for a\n * second reason: the WORKER policy beside this one states that the config is in the task's\n * scope *\"because the worker's declaration lives there … a task that composes the package\n * and declares it in one run must reach both\"*. Composing WITHOUT declaring leaves a package\n * nothing runs, so the declaration — not the directory — is what landing means here. The ref\n * appears twice in it, as the camel key and inside the kebab `path`, and {@link refSpellings}\n * matches either.\n *\n * ## What this gives up, and why that is the lesser loss\n *\n * Per-BEHAVIOUR discrimination: a minion declaring two behaviours across two tasks would\n * land both when one is declared. That is #1539's shape — a product whose refs have no tree\n * identity — and the honest fix is for the product to name something the minion declares.\n * Until then the choice is between a probe that is coarse and one that can never match, and\n * a probe that can never match reports finished work as undone forever.\n *\n * NOT applied to `APPLICATION_WORKER` above, which has the same shape by inspection — a\n * worker's entry declares an HTTP route, not job refs — because no application has a\n * journey-built worker to measure against, and changing a probe on a suspicion is what this\n * comment exists to stop.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: 'wildo.saas.config.ts',\n declarations: [product.minionRef],\n } as const;\n case BuildPlanTaskProductKind.PROVIDER_BINDING:\n // An augmentation (#2025) lands on its opt-in, in the application config whatever its scope; see\n // `productDeclarationSite` for where in that file.\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: product.augments === undefined ? PROVIDER_BINDING_DECLARATION_FILE[product.scope] : PROVIDER_BINDING_DECLARATION_FILE[ProviderBindingScope.BACKEND],\n declarations: product.augments === undefined ? [product.providerRef] : [augmentationPackageName(product.providerRef)],\n } as const;\n case BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT:\n /*\n * The KEY in the catalogue file, as a `key: 'team'` PROPERTY (see `productDeclarationSite`):\n * `wildo init` writes the file with an empty catalogue whose identifier and prose already\n * contain short words like `pro` and `business`, so a word match would report an empty\n * catalogue as landed. The key is what the backend syncs and the website lists.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: BILLING_CATALOG_FILE,\n declarations: [product.productKey],\n } as const;\n case BuildPlanTaskProductKind.APPLICATION_ROLE:\n // The role's `role: 'FIELD_TECHNICIAN'` property in the role table (see `productDeclarationSite`):\n // the scaffolded table is empty, so the file existing proves nothing.\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: APPLICATION_ROLES_FILE,\n declarations: [product.roleRef],\n } as const;\n case BuildPlanTaskProductKind.WEBSITE_PAGE: {\n // The ROOT CONFIG registers a page by importing its manifest; a page file nothing registers is not a page.\n // `websitePageIdentity`, never the raw ref: the plan speaks `page-pricing`, the tree spells it `pricing`.\n const pageIdentity = websitePageIdentity(product.pageRef);\n // The scaffold's own starter page is registered from day one, so naming it proves nothing: no probe,\n // the task is dispatched, and it is marked unverifiable after its run (as for scaffolded verbs above).\n //\n // Since the HOME page's ref is fixed to the starter's (`WEBSITE_HOME_PAGE_REF`), this is EVERY plan's home\n // page task: it always ends \"ran, not proven\". That is the trade, accepted deliberately (#2554 review F17).\n // Everything a home page task can write besides its words already exists, and no probe kind can say \"the\n // placeholder copy is gone\". What proves the home page is its SECTION tasks, each probed (an entry of its\n // list and words for every locale), and each waits on this task.\n if (isScaffoldedWebsiteStarterPage(pageIdentity)) return undefined;\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: 'website/src/website-root.config.ts',\n declarations: [pageIdentity],\n } as const;\n }\n case BuildPlanTaskProductKind.WEBSITE_SECTION:\n if (isScaffoldedWebsiteStarterSection(product.sectionRef)) return undefined;\n /*\n * TWO probes, both required (#2216): the section is an entry of its page's list (the site the declaration\n * table states), and its words exist under `website.<page>.<sectionRef>.` for every committed locale, in that locale's pack or\n * in the section's own file (`website/src/i18n/<segment>/<page>.<sectionRef>.json`, the only place it writes, #3204).\n * A section the page lists with no words renders keys, and the website build refuses it.\n */\n return [\n {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: `website/src/sections/${websitePageIdentity(product.pageRef)}.sections.tsx`,\n declarations: [product.sectionRef],\n },\n {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_PACKS_DECLARE,\n paths: WEBSITE_LABEL_PACK_PATHS,\n fragmentPaths: WEBSITE_LOCALES.map((locale) => websiteSectionLabelFragmentPath(locale, websitePageIdentity(product.pageRef), product.sectionRef)),\n keyPrefix: `website.${websitePageIdentity(product.pageRef)}.${product.sectionRef}.`,\n },\n ] as const;\n case BuildPlanTaskProductKind.DOCUMENTATION_CHAPTER:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: technicalDocumentationChapterFile(product.chapterRef),\n declarations: [product.chapterRef],\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_SCHEMA_FIELDS:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: resourceSchemaFilePath(moduleRefOf(), product.resourceRef),\n declarations: product.fieldRefs,\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_REGISTRATION: {\n /*\n * Only the verbs a task GAINS are evidence. `add-resource` writes create / read / list /\n * update / delete into every config on day one, so a probe that counted them reported a\n * task landed before it ran — measured 2026-09-13 on Wonder CRM's regenerated plan, where\n * all six CONFIG tasks read LANDED with none dispatched.\n *\n * A product left with no gained verb yields NO probe, so a task whose products are all\n * scaffolded reaches the no-product path: never landed before a run, marked unverifiable\n * after one. Marked, never blocking.\n */\n const gained = product.operationRefs.filter((operationRef) => !isScaffoldedResourceOperationRef(operationRef));\n if (gained.length === 0) return undefined;\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: `shared-lib/src/modules/${moduleRefOf()}/resources/${product.resourceRef}/${product.resourceRef}.resources-config.ts`,\n declarations: gained,\n } as const;\n }\n case BuildPlanTaskProductKind.RESOURCE_UI_BEHAVIOR:\n /*\n * The one product whose bare EXISTENCE is honest evidence: measured 2026-09-10, Wonder CRM\n * contains zero `*.ui-behavior.tsx` files across the whole application while all six of its\n * ui-behavior tasks reported landed. The scaffold never writes one.\n *\n * The file lives in the RESOURCE'S OWN DIRECTORY, like its schema and config beside it. This\n * probe first named `resources/<resource>.ui-behavior.tsx`, a path no application uses: on\n * 2026-09-13 every ui-behavior file in Wonder CRM and Wonder Todos (8 of 8) sat at\n * `resources/<resource>/<resource>.ui-behavior.tsx`, which is also the path the\n * `resource-ui-behavior` skill teaches. So a committed, correct ui-behavior could never land,\n * and its task was offered again forever — first seen when `build-task-contact-ui-behavior`\n * was accepted and still read un-landed.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE,\n path: `frontend/src/modules/${moduleRefOf()}/resources/${product.resourceRef}/${product.resourceRef}.ui-behavior.tsx`,\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_SPECIFICATION:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: `specifications/src/modules/${moduleRefOf()}/resources/${product.resourceRef}.resource.specification.ts`,\n declarations: product.fieldRefs,\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_RELATIONSHIP:\n /*\n * The edge, not the file. `<module>.relationships.ts` ships with every module carrying its\n * two scaffold edges, so the file proves nothing; the relationship's two resource types are\n * what a wired edge declares. Wonder CRM: 7 of 8 relationship tasks reported landed with no\n * edge at all.\n *\n * BOTH resources are required, and that is what makes the probe discriminating: the scaffold\n * already writes `ORGANIZATIONS -> DEAL` and `DEAL -> USERS` into the deals module, so `deal`\n * alone is satisfied on day one. `contact` never appears there until the edge is wired.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: `shared-lib/src/modules/${moduleRefOf()}/resources/${moduleRefOf()}.relationships.ts`,\n declarations: [product.sourceResourceRef, product.targetResourceRef],\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_OPERATION:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: `shared-lib/src/modules/${moduleRefOf()}/resources/${product.resourceRef}/${product.resourceRef}.resources-config.ts`,\n declarations: [product.operationRef],\n } as const;\n case BuildPlanTaskProductKind.APPLICATION_VIEW:\n /*\n * A view's home is not one known path — an app-level view may be declared in the module's\n * view-refs or authored as its own file — so the probe accepts either, and still asks for the\n * REF rather than for a file that ships empty with every module.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES,\n paths: [\n `frontend/src/modules/${moduleRefOf()}/app-level-views/view-refs.frontend.ts`,\n `frontend/src/modules/${moduleRefOf()}/app-level-views/index.ts`,\n ],\n // Both sit under the module's frontend directory, which every target carrying this product\n // already allows — so the widening adds nothing here, and says so rather than assuming it.\n writablePaths: [\n `frontend/src/modules/${moduleRefOf()}/app-level-views/view-refs.frontend.ts`,\n `frontend/src/modules/${moduleRefOf()}/app-level-views/index.ts`,\n ],\n declarations: [product.viewRef],\n } as const;\n case BuildPlanTaskProductKind.APPLICATION_MODULE:\n /*\n * A module's identity is the REGISTRY, not its directory. `wildo compose` creates the\n * directory, so probing it would repeat the defect this whole resolver replaces; the module\n * being registered under one identity is what the task's objective actually claims.\n *\n * In EVERY layer's registry, not the shared one alone (#3701): an application module is real only when the\n * shared, frontend and backend registries all carry it, the alignment `wonder-todos-registry-alignment` checks.\n * The reference run of 2026-11-10 read a module's every task landed while the module was missing from the\n * backend and frontend registries, so the product did not deliver it. See {@link moduleRegistryMembershipProbes}.\n */\n return moduleRegistryMembershipProbes(product.moduleRef);\n case BuildPlanTaskProductKind.APPLICATION_DOCUMENT:\n return {\n kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES,\n paths: ['specifications/src/compliance-document-candidates/index.ts', 'specifications/src/document-facts/index.ts'],\n /*\n * The CANDIDATE only. `document-facts/index.ts` is read as landing evidence and must never be\n * writable here: it is `refinement.document-facts`' accepted output, and it is the artifact\n * `refinement.compliance-document-candidate` checks every clause against — \"a clause asserting\n * a fact the application never declared is refused before it becomes a file\". A build agent\n * holding it could author the facts it wants to cite, and since landing is satisfied by ANY\n * candidate, writing the ref into it alone would mark the task landed with no document at all.\n */\n writablePaths: ['specifications/src/compliance-document-candidates/index.ts'],\n declarations: [product.documentRef],\n } as const;\n case BuildPlanTaskProductKind.APPLICATION_DATA_SEED: {\n /*\n * The seed AND its registration, both required (#2234), as for an inbound handler: a seed file nothing\n * registers never runs. The file is task-authored and named from the key, so its declaring the key is\n * sound; the registration is an import spelling the derived stem, in the module index (`./seeds/<stem>`) or in\n * the module's `seeds/index.ts` aggregator (`./<stem>`) — both shapes the `seeding-authoring` skill allows.\n *\n * Known looseness, accepted as for a milestone: the matcher's left boundary is alphanumeric, so a key that is a\n * hyphen-suffix of another (`customers` beside `crm:demo-customers`) would be satisfied by the longer one's\n * import. Keys carry their module namespace (`crm:`), which is what keeps that from arising in practice.\n *\n * A DEMONSTRATION seed must also declare `allowedApplicationEnvironments`, or its rows would be inserted\n * beside real ones in production. What this cannot see: WHICH environments it lists — a demo seed that\n * names `production` among them would land. The skill states the rule; the probe guarantees the field.\n */\n const seedsDirectory = `backend-api/src/modules/${moduleRefOf()}/seeds`;\n const seedFile = `${seedsDirectory}/${dataSeedFileStem(product.seedKey)}.ts`;\n const registrationPaths = [`backend-api/src/modules/${moduleRefOf()}/index.ts`, `${seedsDirectory}/index.ts`];\n return [\n { kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES, path: seedFile, declarations: [product.seedKey] },\n {\n kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES,\n paths: registrationPaths,\n writablePaths: registrationPaths,\n declarations: [dataSeedFileStem(product.seedKey)],\n },\n /*\n * And the module reaches it: the module index imports `./seeds` in BOTH shapes — `./seeds/<stem>` when it\n * imports the seed itself, `./seeds` (or `./seeds/index`) when an aggregator lists it. Without this, a seed\n * listed only in an aggregator nothing imports would land and never run (review of #2234).\n */\n { kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES, path: registrationPaths[0]!, declarations: ['./seeds'] },\n ...(product.content === BuildPlanDataSeedContent.DEMONSTRATION\n ? [{ kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES, path: seedFile, declarations: ['allowedApplicationEnvironments'] } as const]\n : []),\n ] as const;\n }\n case BuildPlanTaskProductKind.INBOUND_CHANNEL_HANDLER:\n /*\n * The REGISTRATION, as for a minion: the module's backend index importing the handler's file (#1832).\n *\n * A handler file nothing registers never runs, so the file alone is not the product. The index is what\n * `inboundHandlers` is declared in, but it spells the handler's CONST, whose name the author chooses;\n * the file name is derived from the handler's ref ({@link inboundChannelHandlerFileStem}), so its\n * import is the one thing the index must spell. The index is scaffolded, which is why this is a\n * DECLARES probe on it rather than a bare file probe.\n *\n * What it gives up: it cannot tell a registered handler from an imported-but-unregistered one, or check\n * the channel inside the file, and a COMMENT in the index spelling the path counts as an import, since\n * the set site blanks no comments. For email, the backend refuses to start when `EMAIL_INBOUND` is\n * enabled and no handler is its default, so an unregistered default fails loudly at boot. For a text\n * (#3394) the default is owed only once an SMS handler is declared, so an unregistered one is quieter:\n * every text is still recorded (`smsProviderEvents`) and stored as a delivery no handler runs.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: `backend-api/src/modules/${moduleRefOf()}/index.ts`,\n declarations: [inboundChannelHandlerImportTail(product.handlerRef)],\n } as const;\n /*\n * AGENT WORK (#2966): proven from the registry, written where the shape skills place it. An agent and the gate on\n * one of its tools both live in the module's `addons/flows-actors/` directory and reach startup through the\n * module's backend index; a work unit is one property of the resource's configuration.\n */\n case BuildPlanTaskProductKind.APPLICATION_AGENT:\n case BuildPlanTaskProductKind.AGENT_APPROVAL_GATE: {\n const flowsActorsIndex = `backend-api/src/modules/${moduleRefOf()}/addons/flows-actors/index.ts`;\n return {\n kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED,\n product,\n moduleRef: moduleRefOf(),\n registrationFiles: [`backend-api/src/modules/${moduleRefOf()}/index.ts`, flowsActorsIndex],\n followImportsOf: flowsActorsIndex,\n } as const;\n }\n // #2305 S5/S6: a usage recording and a retention binding are properties of the resource's configuration, like a work unit.\n case BuildPlanTaskProductKind.WORK_UNIT_RESOURCE:\n case BuildPlanTaskProductKind.METERED_USAGE_RECORDING:\n case BuildPlanTaskProductKind.RESOURCE_RETENTION_BINDING: {\n const resourceConfiguration = `shared-lib/src/modules/${moduleRefOf()}/resources/${product.resourceRef}/${product.resourceRef}.resources-config.ts`;\n return {\n kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED,\n product,\n moduleRef: moduleRefOf(),\n registrationFiles: [resourceConfiguration],\n followRelativeImportsOf: resourceConfiguration,\n } as const;\n }\n // #2305 S6, #3035: a relationship kind and an organization type live in the application's configuration, which no\n // module owns. A type lands when the configuration's type (the OWNER type found by `ownsApplication`, any other by\n // key) carries what the plan decided; a kind lands on its KEY, and the method declares no product for revising one.\n case BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE:\n case BuildPlanTaskProductKind.ORGANIZATION_TYPE:\n case BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND:\n return {\n kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED,\n product,\n moduleRef: APPLICATION_WIDE_AGENT_WORK_MODULE_REF,\n registrationFiles: [APPLICATION_SAAS_CONFIG_FILE],\n followRelativeImportsOf: APPLICATION_SAAS_CONFIG_FILE,\n } as const;\n /*\n * #3036: a confinement is declared in the backend's startup configuration, which no module owns. Its relative\n * imports are NOT followed: the startup configuration imports the module registry, whose closure is the whole\n * backend, and the confined resource types reach it as constants from the shared library, a package the backend's\n * build reads. What must be committed is the declaration itself.\n *\n * What it does not prove: narrowing is ADDITIVE, so a member whose organization-wide role already satisfies a read\n * is not confined. A landed confinement on a resource whose reads are still open to the default member role\n * confines nobody; the method has the task gate those reads, and the reviewer reads its objective for it.\n */\n case BuildPlanTaskProductKind.ORGANIZATION_UNIT_CONFINEMENT:\n return {\n kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED,\n product,\n moduleRef: APPLICATION_WIDE_AGENT_WORK_MODULE_REF,\n registrationFiles: [BACKEND_STARTUP_CONFIGURATION_FILE],\n } as const;\n /*\n * #3039: a binding is a property of the resource's configuration, like a retention binding, and the instance it\n * names is declared in the application's configuration. Both are written by the task and both must be committed.\n */\n case BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING: {\n const resourceConfiguration = `shared-lib/src/modules/${moduleRefOf()}/resources/${product.resourceRef}/${product.resourceRef}.resources-config.ts`;\n return {\n kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED,\n product,\n moduleRef: moduleRefOf(),\n registrationFiles: [resourceConfiguration, APPLICATION_SAAS_CONFIG_FILE],\n followRelativeImportsOf: resourceConfiguration,\n } as const;\n }\n default: {\n const unhandled: never = product;\n throw new Error(`Unhandled build-plan task product ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * What a product's declarations ARE (#1539): a SET of symbols, each independently present, or a\n * RELATION, present together at one syntactic site.\n *\n * A probe's declarations used to be N independent whole-file questions for every product, which is\n * right for a set (a schema's fields, a registration's operations) and silently wrong for a relation.\n * `RESOURCE_RELATIONSHIP` was the one caught: both resource names sit in the module's relationships\n * file from the scaffold onward, so two unrelated edges answered for a third, and 7 of 11\n * relationship tasks on the first end-to-end run (#1273) read LANDED with no edge. It was fixed by a\n * flag one probe happened to set, which left the next relation to be found the same way. Now every\n * product kind answers in {@link productDeclarationSite}, and a kind added tomorrow does not compile\n * until it does.\n */\nexport enum ProductDeclarationRelation {\n /** Each declaration is independently present in the file — a set of symbols. */\n SET = 'set',\n /** Every declaration among ONE call's positional arguments — a relation between the names. */\n TUPLE_IN_ONE_CALL = 'tuple-in-one-call',\n /** Each declaration is a property KEY of the object at a property path — a relation between the name and where it sits. */\n KEY_AT_OBJECT_PATH = 'key-at-object-path',\n /**\n * Each declaration is a PACKAGE, unscoped (`provider-microsoft-teams`), listed as a string element of the array at a\n * property path, under any npm scope (`'@wonder-todos/provider-microsoft-teams'`). For an augmentation's opt-in\n * (`providers.augmentations.microsoft`, #2025): the installing application's scope is its own, so the plan cannot\n * name it, and the package's unscoped name is what the registry install fixes.\n */\n PACKAGE_IN_ARRAY_AT_OBJECT_PATH = 'package-in-array-at-object-path',\n /**\n * Each declaration is the exact STRING VALUE of a named property (`key: 'team'`), comments blanked — a\n * relation between the name and the property that declares it. For a catalogue whose entries are\n * objects: a bare word match on a short key (`pro`, `team`) is satisfied by the scaffold's own\n * `CUSTOM_PRODUCT_CATALOG` identifier and its prose, so an EMPTY catalogue would read as landed (#1835).\n */\n PROPERTY_VALUE = 'property-value',\n /**\n * Each declaration is the exact string value of a named property inside an entry of a named LIST — written\n * inline in the list's literal, or bound to a `const` the list names (#2216). A relation between the name, the\n * object that declares it and the list that makes it count.\n *\n * For a product that exists only once something INCLUDES it: a website section is rendered, registered and\n * label-audited from its page's `<PAGE>_SECTIONS` array, so one defined and never appended renders nothing.\n * The page task writes that file with the list EMPTY and, from the brief it is given, a comment naming every\n * section in reading order. Read as a set, all 18 sections of `app-creation-test-004` were landed by that\n * comment before any section existed.\n */\n PROPERTY_VALUE_IN_LIST = 'property-value-in-list',\n}\n\nexport type ProductDeclarationSite =\n | { readonly relation: ProductDeclarationRelation.SET }\n | { readonly relation: ProductDeclarationRelation.TUPLE_IN_ONE_CALL; readonly callee: string }\n | { readonly relation: ProductDeclarationRelation.KEY_AT_OBJECT_PATH; readonly objectPath: readonly string[] }\n | { readonly relation: ProductDeclarationRelation.PACKAGE_IN_ARRAY_AT_OBJECT_PATH; readonly objectPath: readonly string[] }\n | { readonly relation: ProductDeclarationRelation.PROPERTY_VALUE; readonly propertyName: string }\n | { readonly relation: ProductDeclarationRelation.PROPERTY_VALUE_IN_LIST; readonly propertyName: string; readonly listName: string };\n\nconst SET_SITE: ProductDeclarationSite = { relation: ProductDeclarationRelation.SET };\n\n/**\n * Where, in `wildo.saas.config.ts`, a provider bound in each config-authored scope is declared: a key\n * of `providers` under that scope inside `defineSaaSProviders({ scopes })`. The two scopes share ONE\n * file, and the file also names providers in `providerConfigurations` and in prose — so a bare name\n * would let a backend binding answer for a companion one. The frontend scopes each have a file of\n * their own, where the file already is the site.\n */\nconst PROVIDER_BINDING_SCOPE_OBJECT_PATH: Readonly<Record<ProviderBindingScope, readonly string[] | null>> = {\n [ProviderBindingScope.BACKEND]: ['scopes', 'backend', 'providers'],\n [ProviderBindingScope.COMPANION]: ['scopes', 'companion', 'providers'],\n [ProviderBindingScope.FRONTEND_APP]: null,\n [ProviderBindingScope.WEBSITE]: null,\n};\n\n/**\n * The declaration site of every product kind (#1539). TOTAL over the vocabulary: the `never` arm makes\n * a new kind a compile error until it states whether its artifact is a set or a relation.\n *\n * A single-declaration product is a SET of one unless WHERE the name sits is part of what it means —\n * which is why `PROVIDER_BINDING` is not a set even though it declares one name.\n *\n * Reviewed kind by kind for the question the issue names. `APPLICATION_VIEW` and\n * `RESOURCE_COMPOSITE_VIEW` each declare ONE ref, in a file whose only job is to hold such refs (the\n * module's view refs; the resource's own ui-behavior), so there is no second member for a relation to\n * join. `APPLICATION_FRONTEND_CONFIG`, `RESOURCE_SCHEMA_FIELDS`, `RESOURCE_REGISTRATION`,\n * `RESOURCE_SPECIFICATION` and `APPLICATION_WORKER` declare several names that are genuinely\n * independent — a schema is a set of fields — so the set reading is the true one.\n */\nexport function productDeclarationSite(product: BuildPlanTask['produces'][number]): ProductDeclarationSite {\n switch (product.kind) {\n case BuildPlanTaskProductKind.RESOURCE_RELATIONSHIP:\n // An edge is ONE `createResourcesRelationship(source, target, …)` call; see `declarationsAppearInOneCall`.\n return { relation: ProductDeclarationRelation.TUPLE_IN_ONE_CALL, callee: 'createResourcesRelationship' };\n case BuildPlanTaskProductKind.PROVIDER_BINDING: {\n /*\n * An augmentation owns no ref and writes no scope entry, so the scope's keys cannot say it landed: binding it as its\n * base would read landed the moment the base was scoped, with nothing installed or opted in (#2025 review F1). What\n * lands it is the application's opt-in, which configuration sync refuses unless a scope declares the base.\n */\n if (product.augments !== undefined) {\n return { relation: ProductDeclarationRelation.PACKAGE_IN_ARRAY_AT_OBJECT_PATH, objectPath: ['augmentations', product.augments] };\n }\n const objectPath = PROVIDER_BINDING_SCOPE_OBJECT_PATH[product.scope];\n return objectPath === null ? SET_SITE : { relation: ProductDeclarationRelation.KEY_AT_OBJECT_PATH, objectPath };\n }\n // A catalogue entry is declared by its `key` property — never by the word appearing anywhere (#1835).\n case BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT:\n return { relation: ProductDeclarationRelation.PROPERTY_VALUE, propertyName: 'key' };\n // A role is declared by its `role` property in the role table — never by its name appearing in a comment (#2490).\n case BuildPlanTaskProductKind.APPLICATION_ROLE:\n return { relation: ProductDeclarationRelation.PROPERTY_VALUE, propertyName: 'role' };\n // A section is `defineWebsiteSection({ sectionRef: 'home-hero', … })` appended to its page's list (#2216).\n case BuildPlanTaskProductKind.WEBSITE_SECTION:\n return { relation: ProductDeclarationRelation.PROPERTY_VALUE_IN_LIST, propertyName: 'sectionRef', listName: websitePageSectionsListName(product.pageRef) };\n case BuildPlanTaskProductKind.APPLICATION_FRONTEND_CONFIG:\n /*\n * The shell layout is ONE `register2DLayout(<constant>)` call. The whole-file set would read the layout landed from\n * its import alone, or from a comment naming it, with nothing registered (#2055 review M-4).\n */\n return product.configSurface === FrontendConfigSurface.SHELL_LAYOUT\n ? { relation: ProductDeclarationRelation.TUPLE_IN_ONE_CALL, callee: 'register2DLayout' }\n : SET_SITE;\n case BuildPlanTaskProductKind.RESOURCE_CUSTOM_VIEW:\n case BuildPlanTaskProductKind.RESOURCE_COMPOSITE_VIEW:\n case BuildPlanTaskProductKind.RESOURCE_CHART_VIEW:\n case BuildPlanTaskProductKind.CUSTOM_COMPONENT:\n case BuildPlanTaskProductKind.APPLICATION_MILESTONE:\n case BuildPlanTaskProductKind.APPLICATION_GUIDANCE:\n case BuildPlanTaskProductKind.PDF_TEMPLATE:\n case BuildPlanTaskProductKind.APPLICATION_WORKER:\n case BuildPlanTaskProductKind.APPLICATION_MINION:\n case BuildPlanTaskProductKind.WEBSITE_PAGE:\n case BuildPlanTaskProductKind.DOCUMENTATION_CHAPTER:\n case BuildPlanTaskProductKind.RESOURCE_SCHEMA_FIELDS:\n case BuildPlanTaskProductKind.RESOURCE_REGISTRATION:\n case BuildPlanTaskProductKind.RESOURCE_UI_BEHAVIOR:\n case BuildPlanTaskProductKind.RESOURCE_SPECIFICATION:\n case BuildPlanTaskProductKind.RESOURCE_OPERATION:\n case BuildPlanTaskProductKind.APPLICATION_VIEW:\n case BuildPlanTaskProductKind.APPLICATION_MODULE:\n case BuildPlanTaskProductKind.APPLICATION_DOCUMENT:\n case BuildPlanTaskProductKind.INBOUND_CHANNEL_HANDLER:\n case BuildPlanTaskProductKind.APPLICATION_DATA_SEED:\n // Proven from the registry rather than declared in a file (#2966); no text probe ever reads this site.\n case BuildPlanTaskProductKind.APPLICATION_AGENT:\n case BuildPlanTaskProductKind.AGENT_APPROVAL_GATE:\n case BuildPlanTaskProductKind.WORK_UNIT_RESOURCE:\n case BuildPlanTaskProductKind.METERED_USAGE_RECORDING:\n case BuildPlanTaskProductKind.RESOURCE_RETENTION_BINDING:\n case BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE:\n case BuildPlanTaskProductKind.ORGANIZATION_TYPE:\n case BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND:\n case BuildPlanTaskProductKind.ORGANIZATION_UNIT_CONFINEMENT:\n case BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING:\n return SET_SITE;\n default: {\n const unhandled: never = product;\n throw new Error(`Unhandled build-plan task product ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * The files whose comments can be blanked lexically: TypeScript and JavaScript, where `//`, `/* *\\/` and the\n * three quote characters mean exactly what {@link blankSourceComments} assumes. Nothing else is touched — a Rust\n * entry spells a lifetime `'a`, which would open a quote, and a Markdown file's `https://` is not a comment.\n */\nconst COMMENT_BLANKABLE_SOURCE = /\\.(?:[cm]?[jt]sx?)$/u;\n\n/**\n * Does the committed text declare these refs at the site the product names? The one question every declaration\n * probe asks.\n *\n * `sourcePath`, when the file is a script source, blanks its comments BEFORE any relation reads it (#2216). A\n * structural question must never be answered by prose, and for a SET that used to be exactly what happened: the\n * whole-word matcher counted a JSDoc that NAMED a product as the product. The file a probe reads is often written\n * by a sibling task with every ref of the plan in its brief — the website page task wrote all 18 section refs of\n * `app-creation-test-004` into its sections file's header and every section read landed. The relations that\n * already blanked their own input (`PROPERTY_VALUE`, `KEY_AT_OBJECT_PATH`) are unchanged by the second pass.\n */\nexport function declarationsAppearAt(text: string, declarations: readonly string[], site: ProductDeclarationSite, sourcePath?: string): boolean {\n const read = sourcePath !== undefined && COMMENT_BLANKABLE_SOURCE.test(sourcePath) ? blankSourceComments(text) : text;\n switch (site.relation) {\n case ProductDeclarationRelation.SET:\n return declarationsAppear(read, declarations);\n case ProductDeclarationRelation.TUPLE_IN_ONE_CALL:\n return declarationsAppearInOneCall(read, declarations, site.callee);\n case ProductDeclarationRelation.KEY_AT_OBJECT_PATH:\n return declarationsAppearAsKeysAt(read, declarations, site.objectPath);\n case ProductDeclarationRelation.PACKAGE_IN_ARRAY_AT_OBJECT_PATH:\n return declarationsAppearAsPackagesAt(read, declarations, site.objectPath);\n case ProductDeclarationRelation.PROPERTY_VALUE:\n return declarationsAppearAsPropertyValues(read, declarations, site.propertyName);\n case ProductDeclarationRelation.PROPERTY_VALUE_IN_LIST:\n return declarationsAppearAsListedPropertyValues(read, declarations, site.propertyName, site.listName);\n default: {\n const unhandled: never = site;\n throw new Error(`Unhandled declaration site ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * Is every declaration the exact string value of `propertyName` somewhere in the comment-blanked text?\n *\n * EXACT, unlike the whole-file matcher: a catalogue key is a string a runtime compares verbatim, so no\n * spelling variants — `team` is not `TEAM` or `teamPlan`. The property name is bounded on the left so\n * `productKey: 'team'` does not count as `key: 'team'`.\n */\nexport function declarationsAppearAsPropertyValues(text: string, declarations: readonly string[], propertyName: string): boolean {\n const code = blankSourceComments(text);\n const property = propertyName.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n return declarations.every((declaration) => {\n const value = declaration.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n return new RegExp(`(?<![A-Za-z0-9_$])${property}\\\\s*:\\\\s*(['\"\\`])${value}\\\\1`, 'u').test(code);\n });\n}\n\n/**\n * Is every declaration the exact string value of `propertyName` in an ENTRY of the array bound to `listName`?\n * An entry declares it inline (`[defineWebsiteSection({ sectionRef: 'home-hero' })]`) or through a `const` the\n * list names (`const HOME_HERO = defineWebsiteSection({ sectionRef: 'home-hero' })` … `[HOME_HERO]`) — the\n * second is how every section skill and the `add-website` scaffold write it (#2216).\n *\n * Membership is what makes the product real: a page renders, registers and label-audits exactly what its list\n * holds, so a section defined and never appended is not a section. A name in a comment, or in another list,\n * counts for nothing.\n *\n * Lexical, like every matcher here, and blind in the honest direction: a value it cannot see — one computed by a\n * helper, a list built by a function call, a binding imported from another file — reads as NOT landed, which costs\n * a run that finds the work done; it never reads an empty list as full.\n *\n * Known residual: an apostrophe in JSX TEXT (`<p>Don't</p>`) opens a \"string\" to a lexer that knows no JSX, so quote\n * parity can flip for the rest of the file in this matcher, which keeps its own quote state. A section file keeps its\n * words in label packs rather than JSX text, which is why this has not been worth a parser; if it ever bites, the answer\n * is the introspection subprocess, not a smarter regex.\n */\nexport function declarationsAppearAsListedPropertyValues(\n text: string,\n declarations: readonly string[],\n propertyName: string,\n listName: string,\n): boolean {\n const code = blankSourceComments(text);\n const bindings = constBindingInitializers(code);\n const list = bindings.get(listName);\n if (list === undefined) return false;\n // Every binding the list reaches, through any chain of names (`[...OPENING]`, `OPENING = [HOME_HERO]`):\n // bounded by the file's own bindings, and a name already visited is not walked again.\n const names = (body: string): string[] => [...bindings.keys()]\n .filter((name) => new RegExp(`(?<![A-Za-z0-9_$])${escapeRegExp(name)}(?![A-Za-z0-9_$])`, 'u').test(body));\n const reached = new Set<string>([listName]);\n const pending = [list];\n while (pending.length > 0) {\n for (const name of names(pending.pop()!)) {\n if (reached.has(name)) continue;\n reached.add(name);\n pending.push(bindings.get(name)!);\n }\n }\n const bodies = [...reached].map((name) => bindings.get(name)!);\n const property = escapeRegExp(propertyName);\n return declarations.every((declaration) => {\n const declares = new RegExp(`(?<![A-Za-z0-9_$])${property}\\\\s*:\\\\s*(['\"\\`])${escapeRegExp(declaration)}\\\\1`, 'u');\n return bodies.some((body) => declares.test(body));\n });\n}\n\n/**\n * A locale's website label pack, named as the website's own pack loader names it: by the language's path segment,\n * `website/src/i18n/en-gb.json` for `en-GB` (`languagePathSegment`, #2810). Named by the raw code it was `en-GB.json`,\n * a file the scaffold never writes, so an `en-GB` section never landed.\n */\nexport function websiteLabelPackPath(locale: AvailableLanguage | string): string {\n return `website/src/i18n/${languagePathSegment(locale)}.json`;\n}\n\n/**\n * Every label pack a website CAN have — one per member of the language vocabulary. Total over the enum, so a locale\n * added tomorrow is probed with nobody remembering to.\n */\nconst WEBSITE_LOCALES: readonly AvailableLanguage[] = Object.values(AvailableLanguage);\nexport const WEBSITE_LABEL_PACK_PATHS: readonly string[] = WEBSITE_LOCALES.map((locale) => websiteLabelPackPath(locale));\n\n/**\n * A website section's own words in one locale (#3204): `website/src/i18n/<segment>/<page>.<sectionRef>.json`, a fragment\n * the website's pack loader merges into that locale's pack. One file per section and locale, so sections built at the\n * same time never edit one file.\n */\nexport function websiteSectionLabelFragmentPath(locale: AvailableLanguage | string, pageIdentity: string, sectionRef: string): string {\n return `website/src/i18n/${languagePathSegment(locale)}/${pageIdentity}.${sectionRef}.json`;\n}\n\n/**\n * Does every locale with a committed pack or fragment carry a key under `keyPrefix` in one of the two, and is at least\n * one committed? `packTexts[i]` and `fragmentTexts[i]` are the same locale's, `undefined` where not committed (#2216,\n * #3204). A KEY, not a mention: the prefix must open a quoted string that a colon follows, so a value that happens to\n * contain it does not count.\n */\nexport function labelPacksDeclareKeyPrefix(packTexts: readonly (string | undefined)[], keyPrefix: string, fragmentTexts: readonly (string | undefined)[] = []): boolean {\n const key = new RegExp(`\"${escapeRegExp(keyPrefix)}[^\"\\\\\\\\]*\"\\\\s*:`, 'u');\n const locales = packTexts.map((pack, index) => [pack, fragmentTexts[index]] as const).filter(([pack, fragment]) => pack !== undefined || fragment !== undefined);\n if (locales.length === 0) return false;\n return locales.every(([pack, fragment]) => (pack !== undefined && key.test(pack)) || (fragment !== undefined && key.test(fragment)));\n}\n\n/**\n * Does the labelling-pipeline file `text` declare every one of `keys` with a non-empty string value (#2504)? Parsed and\n * flattened with the pipeline's own reader, so a key is exactly what the pipeline would write for it. `undefined`\n * (not committed) and a file that does not parse both declare nothing.\n */\nexport function labelFileDeclaresKeys(text: string | undefined, keys: readonly string[]): boolean {\n if (text === undefined) return false;\n let declared: Record<string, string>;\n try {\n declared = flattenNestedStringLabels(parseNestedLabelsTsSource(text).labels);\n } catch {\n return false;\n }\n return keys.every((key) => typeof declared[key] === 'string' && declared[key]!.trim() !== '');\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n}\n\n/**\n * Every `const`/`let`/`var` binding of the (comment-blanked) text, mapped to the text of its initializer. An\n * initializer ends at a `;` at depth 0, or at a line break at depth 0 that begins a new top-level statement — the\n * shape of a module written without semicolons. Skips string contents, so a bracket inside a string does not move\n * the depth. A destructuring binding is not a name and is skipped.\n */\nfunction constBindingInitializers(code: string): Map<string, string> {\n const bindings = new Map<string, string>();\n const binding = /(?<![A-Za-z0-9_$.])(?:const|let|var)\\s+([A-Za-z_$][A-Za-z0-9_$]*)\\s*(?::[^=;]*?)?=(?![=>])/gu;\n const nextStatement = /^\\s*(?:export|const|let|var|function|class|import|type|interface|enum)\\b/u;\n for (const match of code.matchAll(binding)) {\n const from = match.index! + match[0].length;\n let depth = 0;\n let quote: string | null = null;\n let at = from;\n for (; at < code.length; at += 1) {\n const char = code[at]!;\n if (quote !== null) {\n if (char === '\\\\') at += 1;\n else if (char === quote) quote = null;\n continue;\n }\n if (char === \"'\" || char === '\"' || char === '`') quote = char;\n else if (char === '(' || char === '[' || char === '{') depth += 1;\n else if (char === ')' || char === ']' || char === '}') {\n depth -= 1;\n if (depth < 0) break;\n } else if (depth === 0 && char === ';') break;\n else if (depth === 0 && char === '\\n' && at > from && nextStatement.test(code.slice(at + 1))) break;\n }\n if (!bindings.has(match[1]!)) bindings.set(match[1]!, code.slice(from, at));\n }\n return bindings;\n}\n\n/**\n * The property keys at depth 0 of an object BODY (the text between its braces), each with the body of\n * its value when that value is an object literal. Skips string contents, so a brace inside a string\n * does not move the depth. Expects comments already blanked.\n */\nfunction objectMembers(body: string): { readonly key: string; readonly valueBody?: string }[] {\n const members: { key: string; valueBody?: string }[] = [];\n const keyAt = /(['\"]?)([A-Za-z_$][A-Za-z0-9_$-]*)\\1\\s*:/uy;\n let depth = 0;\n let quote: string | null = null;\n for (let at = 0; at < body.length; at += 1) {\n const char = body[at]!;\n if (quote !== null) {\n if (char === '\\\\') at += 1;\n else if (char === quote) quote = null;\n continue;\n }\n if (depth === 0 && (at === 0 || /[\\s,{]/u.test(body[at - 1]!))) {\n keyAt.lastIndex = at;\n const match = keyAt.exec(body);\n if (match) {\n const afterColon = keyAt.lastIndex;\n const valueStart = afterColon + (/^\\s*/u.exec(body.slice(afterColon))?.[0].length ?? 0);\n const close = body[valueStart] === '{' ? matchingBrace(body, valueStart) : -1;\n members.push({ key: match[2]!, ...(close > valueStart ? { valueBody: body.slice(valueStart + 1, close) } : {}) });\n at = afterColon - 1;\n continue;\n }\n }\n if (char === \"'\" || char === '\"' || char === '`') quote = char;\n else if (char === '{' || char === '[' || char === '(') depth += 1;\n else if (char === '}' || char === ']' || char === ')') depth -= 1;\n }\n return members;\n}\n\n/** The index of the brace closing the one at `open`, or -1. Skips string contents. */\nfunction matchingBrace(text: string, open: number): number {\n let depth = 0;\n let quote: string | null = null;\n for (let at = open; at < text.length; at += 1) {\n const char = text[at]!;\n if (quote !== null) {\n if (char === '\\\\') at += 1;\n else if (char === quote) quote = null;\n continue;\n }\n if (char === \"'\" || char === '\"' || char === '`') quote = char;\n else if (char === '{') depth += 1;\n else if (char === '}') {\n depth -= 1;\n if (depth === 0) return at;\n }\n }\n return -1;\n}\n\n/**\n * Is every declaration a property KEY of the object at `objectPath`? The first segment may sit at any\n * depth (the path starts inside a call such as `defineSaaSProviders({ scopes })`); every later segment\n * is a direct member of the one before, and the declarations are direct keys of the last.\n *\n * Keys are matched EXACTLY against the ref's spellings, never as substrings: `openai` is not satisfied\n * by `openai-compatible`. Lexical rather than a parse, like the call matcher beside it, and blind in the\n * same honest direction — a key it cannot see reads as not landed, never as landed.\n */\nexport function declarationsAppearAsKeysAt(text: string, declarations: readonly string[], objectPath: readonly string[]): boolean {\n const [first, ...rest] = objectPath;\n if (first === undefined) return false;\n const code = blankSourceComments(text);\n const opening = new RegExp(`(?<![A-Za-z0-9_$])(['\"]?)${first.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&')}\\\\1\\\\s*:\\\\s*\\\\{`, 'gu');\n for (const match of code.matchAll(opening)) {\n const open = match.index! + match[0].length - 1;\n const close = matchingBrace(code, open);\n if (close < 0) continue;\n let body: string | undefined = code.slice(open + 1, close);\n for (const segment of rest) body = body === undefined ? undefined : objectMembers(body).find((member) => member.key === segment)?.valueBody;\n if (body === undefined) continue;\n const keys = new Set(objectMembers(body).map((member) => member.key));\n if (declarations.every((declaration) => refSpellings(declaration).some((spelling) => keys.has(spelling)))) return true;\n }\n return false;\n}\n\n/** The unscoped package name a registry provider module installs as (`@<app-scope>/provider-<ref>`, #2014). */\nexport function augmentationPackageName(providerRef: string): string {\n return `provider-${providerRef}`;\n}\n\n/**\n * Is every declaration an unscoped package name listed in the ARRAY at `objectPath` (the last segment names the array),\n * under any npm scope or none? Comment-blanked, so a commented-out opt-in is not one.\n */\nexport function declarationsAppearAsPackagesAt(text: string, declarations: readonly string[], objectPath: readonly string[]): boolean {\n const arrayKey = objectPath.at(-1);\n const ownerPath = objectPath.slice(0, -1);\n const [first, ...rest] = ownerPath;\n if (arrayKey === undefined || first === undefined) return false;\n const code = blankSourceComments(text);\n const opening = new RegExp(`(?<![A-Za-z0-9_$])(['\"]?)${first.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&')}\\\\1\\\\s*:\\\\s*\\\\{`, 'gu');\n for (const match of code.matchAll(opening)) {\n const open = match.index! + match[0].length - 1;\n const close = matchingBrace(code, open);\n if (close < 0) continue;\n let body: string | undefined = code.slice(open + 1, close);\n for (const segment of rest) body = body === undefined ? undefined : objectMembers(body).find((member) => member.key === segment)?.valueBody;\n if (body === undefined) continue;\n const elements = arrayStringElementsAt(body, arrayKey);\n if (elements === undefined) continue;\n const listed = new Set(elements.map((element) => element.replace(/^@[^/]+\\//u, '')));\n if (declarations.every((declaration) => listed.has(declaration))) return true;\n }\n return false;\n}\n\n/** The string literals of the array value of `key` directly inside an object body, or `undefined` when there is none. */\nfunction arrayStringElementsAt(body: string, key: string): string[] | undefined {\n const keyed = new RegExp(`(?<![A-Za-z0-9_$])(['\"]?)${key.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&')}\\\\1\\\\s*:\\\\s*\\\\[`, 'gu');\n for (const match of body.matchAll(keyed)) {\n const open = match.index! + match[0].length - 1;\n let depth = 0;\n let quote: string | null = null;\n for (let at = open; at < body.length; at += 1) {\n const char = body[at]!;\n if (quote !== null) {\n if (char === '\\\\') at += 1;\n else if (char === quote) quote = null;\n continue;\n }\n if (char === \"'\" || char === '\"' || char === '`') quote = char;\n else if (char === '[') depth += 1;\n else if (char === ']') {\n depth -= 1;\n if (depth === 0) {\n return [...body.slice(open + 1, at).matchAll(/(['\"`])((?:\\\\.|(?!\\1).)*)\\1/gu)].map((element) => element[2]!);\n }\n }\n }\n }\n return undefined;\n}\n\n/**\n * A website page's identity IN THE TREE, from the plan ref that names it.\n *\n * Two namespaces meet here and they are not the same. The website plan speaks the specification\n * families' ELEMENT-REF vocabulary, where a page is `page-pricing` exactly as an ICP is\n * `icp-small-teams` and a voice is `voice-calm-evidence-led`. The application spells the same page\n * bare — `pricing.page.tsx`, `PRICING_PAGE_MANIFEST`, `pricing.sections.tsx` — and so do the plan's own\n * SECTION refs, which are `pricing-hero`, never `page-pricing-hero`.\n *\n * `produces.pageRef` carries the element ref, and both website probes use it as a tree identity: one\n * looks for a symbol in the root config, the other builds a filename from it. Measured on the first\n * end-to-end journey run (#1273), whose plan still named its home page `page-home` (a HOME page's ref is now always\n * `page-landing`, the scaffold's starter): the probes looked for `page-home` in a root config that registers\n * `HOME_PAGE_MANIFEST`, and for `website/src/sections/page-home.sections.tsx` against a tree holding\n * `home.sections.tsx`. **All 28 website tasks — 30% of the plan — could never land**, however\n * correctly they were built, and the board read 9 of 94 while the work was being done and committed.\n *\n * That is precisely the failure direction {@link refSpellings} exists to prevent, stated in its own\n * JSDoc: *\"a probe that looked for the slug verbatim would answer 'not landed' for a perfectly wired\n * edge — the failure direction that re-offers finished work forever.\"* This is the same defect one\n * namespace over.\n *\n * Narrow ON PURPOSE. Teaching {@link refSpellings} to drop any leading segment would make\n * `deal-contact` match a bare `contact` and report a task landed having done nothing — the opposite\n * and worse direction, which is what `isScaffoldedResourceOperationRef` exists for. So the\n * normalization lives here, at the two sites that turn a plan ref into a path or a symbol, and is\n * keyed to the one prefix the website-plan family actually uses.\n */\nexport function websitePageIdentity(pageRef: string): string {\n return pageRef.replace(/^page-/u, '');\n}\n\n/**\n * The name of a page's ordered sections list — `PRICING_SECTIONS` for `page-pricing` — which the page renders, registers\n * and label-audits. ONE derivation for the two sides that must agree on it: the page task's brief, which tells the\n * agent to export it, and the section probe, which lands a section only once it is an entry of it (#2216).\n */\nexport function websitePageSectionsListName(pageRef: string): string {\n return `${websitePageIdentity(pageRef).toUpperCase().replace(/[^A-Z0-9]+/gu, '_')}_SECTIONS`;\n}\n\n/**\n * A resource custom view's ref, as the TREE spells it.\n *\n * A custom view is the one view kind with NO identity of its own. An app-level view is a named\n * artifact — its registry states that `library-home-view` is *\"addressed by the router\n * (`/composite/library-home-view`), by the labelling pipeline\n * (`composite_views.app.library-home-view.*`)\"* — and its probe reads that registry. A custom view\n * is a component bound to an operation and nothing else:\n *\n * ```ts\n * [CoreResourceOperation.CREATE, { surface: …, customView: ReadingItemCaptureCustomView }],\n * ```\n *\n * There is an OPERATION and a COMPONENT. There is no view ref, and nowhere for one to live —\n * measured on the first end-to-end journey run (#1273): `view-reading-item-capture-view` appears\n * NOWHERE in application code, only in `specifications/src/experience-plan` and the build plan. So a\n * probe looking for the plan's ref in the ui-behavior was unlandable by construction, for every\n * application. All three of that run's custom-view tasks ran, committed their work, and were\n * recorded `completed_unlanded`; the prerequisite graph put **13 of 94 tasks** behind them.\n *\n * The component name is what the tree actually carries, and it follows one rule across both\n * applications that have custom views — `<the ref's words>CustomView`:\n *\n * | ref | component |\n * |---|---|\n * | `view-reading-item-capture-view` | `ReadingItemCaptureCustomView` |\n * | `view-reading-item-detail-view` | `ReadingItemDetailCustomView` |\n * | `view-weekly-digest-summary-view` | `WeeklyDigestSummaryCustomView` |\n * | — (Wonder Todos, hand-authored) | `TaskChangeStatusCustomView` · `TaskListCustomView` · `TodoReadCustomView` |\n *\n * So this strips the `view-` prefix and the `-view` suffix and leaves {@link refSpellings} to do the\n * rest: its Pascal spelling is `ReadingItemCapture`, and the matcher's right boundary is\n * `(?![a-z0-9])`, which admits the `CustomView` suffix while still refusing\n * `ReadingItemDetailCustomView`. Two custom views on one resource stay distinguishable, which is the\n * property a bare \"does it bind any customView?\" probe would lose.\n *\n * Narrow on purpose, exactly as {@link websitePageIdentity} is: it drops the two segments this one\n * plan vocabulary actually uses, and nothing else.\n *\n * **This is a normalization, not the right long-term answer.** A custom view is identified by\n * `resource × operation`, and the product models it as a single opaque ref — see #1530 and #1539.\n * When the product carries the operation, the probe should assert the BINDING rather than the name.\n */\nexport function resourceCustomViewIdentity(viewRef: string): string {\n return viewRef.replace(/^view-/u, '').replace(/-view$/u, '');\n}\n\n/**\n * Every spelling one semantic ref can wear in application source.\n *\n * A plan speaks kebab-case slugs (`pipeline-stage`, `deal-contact`) because that is the vocabulary\n * the domain plan and the decomposer share. Application code spells the same thing as an enum member\n * (`PIPELINE_STAGE`), a type prefix (`PipelineStage`) or a field (`pipelineStageId`). A probe that\n * looked for the slug verbatim would answer \"not landed\" for a perfectly wired edge — the failure\n * direction that re-offers finished work forever.\n */\n/**\n * The regular English plural of a word (`job` → `jobs`, `property` → `properties`, `address` → `addresses`).\n * Used only where a plan ref and a resource type name ONE resource (see {@link resourceRefSpellings}).\n */\nfunction pluralWord(word: string): string {\n if (/[^aeiou]y$/iu.test(word)) return `${word.slice(0, -1)}ies`;\n if (/(s|x|z|ch|sh)$/iu.test(word)) return `${word}es`;\n return `${word}s`;\n}\n\n/**\n * The singular of a regular English plural (`jobs` → `job`, `properties` → `property`, `addresses` → `address`); the word\n * unchanged when it does not end like one. The inverse of {@link pluralWord} on what it produces.\n */\nfunction singularWord(word: string): string {\n if (/ies$/iu.test(word)) return `${word.slice(0, -3)}y`;\n if (/(ss|x|z|ch|sh)es$/iu.test(word)) return word.slice(0, -2);\n if (/[^s]s$/iu.test(word)) return word.slice(0, -1);\n return word;\n}\n\n/**\n * Every spelling a resource type may give a plan's resource ref (#3204): {@link refSpellings} of the ref, and of the ref\n * with its last word made plural.\n *\n * A domain plan names ONE resource (`job`, `site-visit`, `pipeline-stage-setting`); the resource TYPE an application\n * registers names the collection (`jobs`, `siteVisits`, `pipelineStageSettings`), as the engine's own types do (`users`,\n * `organizations`). Reference run 42782969940 measured it: `build-task-org-confinement` confined `jobs` and `siteVisits`\n * to their assignee exactly as planned, and its landing probe, looking for `job` and `siteVisit`, read it as not confined\n * through three runs. Only for a comparison with a registered resource TYPE: a probe that reads committed TEXT keeps\n * {@link refSpellings}, where a plural is another word.\n */\nfunction resourceRefSpellings(ref: string): readonly string[] {\n const parts = ref.split(/[-_]/u).filter((part) => part.length > 0);\n if (parts.length === 0) return refSpellings(ref);\n const plural = [...parts.slice(0, -1), pluralWord(parts[parts.length - 1]!)].join('-');\n return [...new Set([...refSpellings(ref), ...refSpellings(plural)])];\n}\n\nfunction refSpellings(ref: string): readonly string[] {\n const parts = ref.split(/[-_]/u).filter((part) => part.length > 0);\n if (parts.length === 0) return [ref];\n const pascal = parts.map((part) => `${part.charAt(0).toUpperCase()}${part.slice(1)}`).join('');\n return [...new Set([\n ref,\n parts.join('-'),\n parts.join('_'),\n parts.map((part) => part.toUpperCase()).join('_'),\n pascal,\n `${pascal.charAt(0).toLowerCase()}${pascal.slice(1)}`,\n ])];\n}\n\n/**\n * Does the committed text declare every one of these refs?\n *\n * Whole-word, never a bare substring: `deal.schemas.ts` carries prose naming its own build tasks, so\n * `includes('pipelineStageId')` is satisfied by a COMMENT mentioning it and would report a task\n * landed on its own documentation. A word boundary is not an AST — a mention still counts — but it\n * is sound against the shapes that produced #597, where the symbol is absent from the file entirely.\n *\n * `camelCase` needs its own boundary rule: `\\b` does not fire between `pipelineStage` and `Id`, so\n * `pipelineStage` correctly matches inside `pipelineStageId`, which is what a field-bearing edge\n * looks like in a schema.\n */\nexport function declarationsAppear(text: string, declarations: readonly string[]): boolean {\n return declarations.every((declaration) => refSpellings(declaration).some((spelling) => {\n const escaped = spelling.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n return new RegExp(`(?<![A-Za-z0-9])${escaped}(?![a-z0-9])`, 'u').test(text);\n }));\n}\n\n/**\n * Does ONE call to `callee` name every one of these refs among its positional arguments?\n *\n * The question a RELATION product asks, and the one {@link declarationsAppear} cannot answer: two\n * names present in a file say nothing about whether anything joins them. See\n * {@link ProductDeclarationRelation} for the measured case (#1539), and `TUPLE_IN_ONE_CALL` for the\n * site this function checks.\n *\n * ## Two deliberate narrowings, each of which a looser form got wrong\n *\n * **The scan stops at the options object.** A relationship is\n * `createResourcesRelationship(A, B, cardinality, cardinality, { ... })`, and everything that\n * identifies the EDGE is positional. Reading on into the options body would re-admit prose — a\n * `contextPolicy` comment naming a sibling resource is exactly the mention this exists to exclude —\n * and would let one call's options satisfy a different call's identity. An unterminated head (no\n * `{` and no `)`) contributes nothing rather than spilling into the next call.\n *\n * **The boundary excludes `_`, unlike the whole-file matcher.** Enum members are SCREAMING_SNAKE and\n * nest: `(?![a-z0-9])` lets `WEEKLY_DIGEST` match inside `WEEKLY_DIGEST_ITEM`, so the head\n * `READING_ITEM, WEEKLY_DIGEST_ITEM` would satisfy a probe for `weekly-digest -> weekly-digest-item`\n * — the very edge that is missing, reported landed by its neighbour. The whole-file matcher keeps\n * its looser boundary because there `pipelineStage` matching inside `pipelineStageId` is the\n * intended behaviour; here a resource type is named exactly or not at all.\n */\nexport function declarationsAppearInOneCall(text: string, declarations: readonly string[], callee: string): boolean {\n // A commented-out call declares nothing (#2055 review M-4): match against the comment-blanked text.\n text = blankSourceComments(text);\n const opening = `${callee}(`;\n for (let at = text.indexOf(opening); at >= 0; at = text.indexOf(opening, at + opening.length)) {\n const from = at + opening.length;\n const brace = text.indexOf('{', from);\n const close = text.indexOf(')', from);\n const end = brace >= 0 && (close < 0 || brace < close) ? brace : close;\n if (end < 0) continue;\n const head = text.slice(from, end);\n const matchesAll = declarations.every((declaration) => refSpellings(declaration).some((spelling) => {\n const escaped = spelling.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n return new RegExp(`(?<![A-Za-z0-9_])${escaped}(?![A-Za-z0-9_])`, 'u').test(head);\n }));\n if (matchesAll) return true;\n }\n return false;\n}\n\n/**\n * The canonical IDENTITY of a shell entry (#1538) — what a placement decision and the resolved shell\n * are compared by, so that neither side's SPELLING decides the answer.\n *\n * The two sides spell one thing differently, measured on the #1273 run: the plan says\n * `reading-item` / `LIST`, the tree `readingItem` / `list`; the plan names a view `view-library-home`,\n * the tree `library-home`. Each part is lower-cased with every non-alphanumeric removed, and a view is compared by\n * `placementViewIdentity`, the one view identity the coherence report also uses (#3066, so the two cannot disagree).\n *\n * `undefined` for an entry no placement decision can name (an engine page, a custom component, the\n * settings launcher that opens the hub at its default section).\n */\nfunction identityPart(value: string): string {\n return value.toLowerCase().replace(/[^a-z0-9]/gu, '');\n}\n\nexport function placementSubjectShellIdentity(subject: PlacementSubject): string {\n switch (subject.kind) {\n case PlacementSubjectKind.RESOURCE_OPERATION:\n return `resource-operation:${identityPart(subject.resourceRef)}:${identityPart(subject.operation)}`;\n case PlacementSubjectKind.APP_VIEW:\n return `view:${placementViewIdentity(subject.viewRef)}`;\n case PlacementSubjectKind.ENGINE_SETTINGS_DESTINATION:\n return `settings-destination:${identityPart(subject.destinationRef)}`;\n default: {\n const unhandled: never = subject;\n throw new Error(`Unhandled placement subject ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/** A launcher entry as the shell oracle reports it (kind plus its addressing fields). */\nexport interface ShellLauncherEntry {\n readonly kind: string;\n readonly resourceType?: string;\n readonly operation?: string;\n readonly viewRef?: string;\n readonly sectionRef?: string;\n}\n\n/**\n * Every identity a launcher answers to (#3204): {@link launcherShellIdentity}, and for a resource operation also the one\n * spelled with the singular of its resource type. A placement plan names a resource as the domain plan does, in the\n * singular (`pipeline-stage-setting`), while the shell carries the registered type (`pipelineStageSettings`): on reference\n * run 42782969940 the settings hub carried all four planned lists and its probe reported them missing. The singular of a\n * word that is not a regular plural is the word itself, so an exact match is unchanged.\n */\nexport function launcherShellIdentities(entry: ShellLauncherEntry): readonly string[] {\n const identity = launcherShellIdentity(entry);\n if (identity === undefined) return [];\n if (entry.kind !== LauncherItemTargetKind.RESOURCE_OPERATION || !entry.resourceType || !entry.operation) return [identity];\n const singular = `resource-operation:${singularWord(identityPart(entry.resourceType))}:${identityPart(entry.operation)}`;\n return singular === identity ? [identity] : [identity, singular];\n}\n\nexport function launcherShellIdentity(entry: ShellLauncherEntry): string | undefined {\n if (entry.kind === LauncherItemTargetKind.RESOURCE_OPERATION && entry.resourceType && entry.operation) {\n return `resource-operation:${identityPart(entry.resourceType)}:${identityPart(entry.operation)}`;\n }\n if (entry.kind === LauncherItemTargetKind.VIEW && entry.viewRef) return `view:${placementViewIdentity(entry.viewRef)}`;\n if (entry.kind === LauncherItemTargetKind.SETTINGS_SECTION && entry.sectionRef) {\n return `settings-destination:${identityPart(entry.sectionRef)}`;\n }\n return undefined;\n}\n\nexport function settingsDestinationShellIdentity(destinationRef: string): string {\n return `settings-destination:${identityPart(destinationRef)}`;\n}\n\n/** The config file a shell surface is authored in — the application half of what a landing must see committed. */\nexport function shellSurfaceConfigFile(surface: PlacementSurface): string {\n return SHELL_PLACEMENT_CONFIG_FILE[surface];\n}\n\n/**\n * The file a module's own shell contribution lives in — the module half. The same root rule the\n * `frontend-artifact-placement-info` behavior uses (`engine` under `frontend/src/engine`, every other\n * module under `frontend/src/modules/<id>`), with the file name the skeleton and the `add-module`\n * scenario both write. A module that contributes from a differently named file is not seen as\n * committed, so its surface does not land — visible in the build record, never a silent pass.\n */\nexport function shellModuleContributionFile(moduleId: string): string {\n return moduleId === 'engine'\n ? 'frontend/src/engine/app-shell.module.frontend.ts'\n : `frontend/src/modules/${moduleId}/app-shell.module.frontend.ts`;\n}\n\n/**\n * Where an application enables billing (`billing: { enabled, providerRef }`): the backend configuration every application\n * is scaffolded with, and the file the `configure-billing` skill names for the switch.\n */\nexport const BACKEND_BILLING_SWITCH_FILE = 'backend-api/src/saas-config.backend.ts';\n\n/** What the committed backend configuration says about the billing switch (#3285). */\nexport enum BackendBillingSwitchState {\n /** `billing.enabled` is the literal `true`. */\n ENABLED = 'ENABLED',\n /** The literal `false`. */\n DISABLED = 'DISABLED',\n /** No `billing.enabled` member, or no `billing` section (the scaffold writes none), or the file is not committed. */\n ABSENT = 'ABSENT',\n /** A value no lexical read can evaluate (`enabled: process.env.BILLING === 'on'`): said nothing about, never guessed. */\n UNDETERMINED = 'UNDETERMINED',\n}\n\n/**\n * Read the billing switch from the committed backend configuration's text (`undefined` = not committed). Lexical, with\n * comments blanked, like every declaration reader here: the `billing` object's own top-level `enabled` member, never one\n * nested deeper or named in prose.\n */\nexport function readBackendBillingSwitch(text: string | undefined): BackendBillingSwitchState {\n if (text === undefined) return BackendBillingSwitchState.ABSENT;\n const code = blankSourceComments(text);\n for (const match of code.matchAll(/(?<![A-Za-z0-9_$.])(['\"]?)billing\\1\\s*:\\s*\\{/gu)) {\n const open = match.index! + match[0].length - 1;\n const close = matchingBrace(code, open);\n if (close < 0) continue;\n const topLevel = blankNestedBrackets(code.slice(open + 1, close));\n const enabled = /(?<![A-Za-z0-9_$])(['\"]?)enabled\\1\\s*:\\s*([^,\\n}]*)/u.exec(topLevel);\n if (enabled === null) continue;\n const value = enabled[2]!.trim();\n if (value === 'true') return BackendBillingSwitchState.ENABLED;\n if (value === 'false') return BackendBillingSwitchState.DISABLED;\n return BackendBillingSwitchState.UNDETERMINED;\n }\n return BackendBillingSwitchState.ABSENT;\n}\n\n/** `body` with the contents of every nested bracket blanked, so only its own top-level members remain readable. */\nfunction blankNestedBrackets(body: string): string {\n let depth = 0;\n let out = '';\n for (const char of body) {\n if (char === '{' || char === '[' || char === '(') depth += 1;\n out += depth > 0 ? ' ' : char;\n if ((char === '}' || char === ']' || char === ')') && depth > 0) depth -= 1;\n }\n return out;\n}\n\n/**\n * A fact about a LANDED task that its landing does not cover, said beside the landing and never instead of it (#3285).\n * A closed vocabulary: each member is a different unfinished state with its own remedy.\n */\nexport enum BuildTaskLandingAdvisoryKind {\n /**\n * The billing catalogue is committed and the backend does not enable billing, so the running application never syncs or\n * sells it (app-creation-test-007: `build-task-billing-catalogue` landed and every restart withheld the Stripe webhook).\n */\n BILLING_CATALOGUE_NOT_SERVED = 'BILLING_CATALOGUE_NOT_SERVED',\n}\n\n/** One advisory on a landed task: what is unfinished, the setting and file that finish it, and the switch's state. */\nexport interface BuildTaskLandingAdvisory {\n readonly kind: BuildTaskLandingAdvisoryKind;\n readonly setting: string;\n readonly settingPath: string;\n readonly switchState: BackendBillingSwitchState;\n /** One sentence for a reader: why it matters and what turning the switch on also needs. */\n readonly detail: string;\n}\n\n/** Whether a task writes products of the billing catalogue — the tasks whose landing the billing switch qualifies (#3285). */\nexport function buildTaskProducesBillingCatalogue(task: BuildPlanTask): boolean {\n return task.produces.some((product) => product.kind === BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT);\n}\n\n/**\n * The advisories owed by a task that LANDED (#3285). A MARK, never a refusal: the task stays landed and the build goes on,\n * per `application-creation-directive.md` — the catalogue is TRUE (its products exist) and UNFINISHED (nothing serves\n * them). Refusing the landing instead was rejected twice over: the remedy is a person's (the provider secret, which only\n * they can supply), and the switch turned on without that secret FAILS backend startup (`SECRET_MISSING`), so a landing\n * that required it would push the build into crashing its own backend.\n *\n * Derived from the committed tree at read time and stored nowhere, so it clears by itself the moment `billing.enabled:\n * true` is committed. An UNDETERMINED switch says nothing: an advisory that may be false is not one.\n */\nexport function resolveBuildTaskLandingAdvisories(\n task: BuildPlanTask,\n committed: { readonly backendBillingConfigText: string | undefined },\n): readonly BuildTaskLandingAdvisory[] {\n if (!buildTaskProducesBillingCatalogue(task)) return [];\n const switchState = readBackendBillingSwitch(committed.backendBillingConfigText);\n if (switchState !== BackendBillingSwitchState.DISABLED && switchState !== BackendBillingSwitchState.ABSENT) return [];\n return [{\n kind: BuildTaskLandingAdvisoryKind.BILLING_CATALOGUE_NOT_SERVED,\n setting: 'billing.enabled',\n settingPath: BACKEND_BILLING_SWITCH_FILE,\n switchState,\n detail: `The catalogue is committed, and \\`billing.enabled\\` is ${switchState === BackendBillingSwitchState.DISABLED ? 'false' : 'not set'} in `\n + `${BACKEND_BILLING_SWITCH_FILE}, so the backend never syncs or sells it. Before turning it on, set \\`billing.providerRef\\` and the `\n + \"provider's secrets (`wildo secrets set STRIPE_SECRET_KEY`, `STRIPE_WEBHOOK_SECRET`): the switch alone fails backend startup. \"\n + 'The configure-billing skill lists the whole chain.',\n }];\n}\n"]}
1
+ {"version":3,"file":"application-build-task-coding-policy.companion.service.js","sourceRoot":"","sources":["../../../../src/meta-workflows/services/application-build-task-coding-policy.companion.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL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;AACH,MAAM,CAAN,IAAY,4BAMX;AAND,WAAY,4BAA4B;IACtC;;;OAGG;IACH,6FAA6D,CAAA;AAC/D,CAAC,EANW,4BAA4B,KAA5B,4BAA4B,QAMvC;AAYD,8HAA8H;AAC9H,MAAM,UAAU,iCAAiC,CAAC,IAAmB;IACnE,OAAO,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,IAAI,KAAK,wBAAwB,CAAC,2BAA2B,CAAC,CAAC;AAChH,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,iCAAiC,CAC/C,IAAmB,EACnB,SAAoE;IAEpE,IAAI,CAAC,iCAAiC,CAAC,IAAI,CAAC;QAAE,OAAO,EAAE,CAAC;IACxD,MAAM,WAAW,GAAG,wBAAwB,CAAC,SAAS,CAAC,wBAAwB,CAAC,CAAC;IACjF,IAAI,WAAW,KAAK,yBAAyB,CAAC,QAAQ,IAAI,WAAW,KAAK,yBAAyB,CAAC,MAAM;QAAE,OAAO,EAAE,CAAC;IACtH,OAAO,CAAC;YACN,IAAI,EAAE,4BAA4B,CAAC,4BAA4B;YAC/D,OAAO,EAAE,iBAAiB;YAC1B,WAAW,EAAE,2BAA2B;YACxC,WAAW;YACX,MAAM,EAAE,0DAA0D,WAAW,KAAK,yBAAyB,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,MAAM;kBAC5I,GAAG,2BAA2B,sGAAsG;kBACpI,+HAA+H;kBAC/H,oDAAoD;SACzD,CAAC,CAAC;AACL,CAAC","sourcesContent":["import {\n BuildPlanResourceStage,\n BuildPlanTaskProductKind,\n BuildPlanWorkerRuntime,\n ApplicationGuidanceKind,\n FrontendConfigSurface,\n PlacementSurface,\n ProviderBindingScope,\n BuildPlanTaskTargetKind,\n type BuildPlanTask,\n isScaffoldedResourceOperationRef,\n isScaffoldedWebsiteStarterPage,\n isScaffoldedWebsiteStarterSection,\n PlacementSubjectKind,\n placementViewIdentity,\n type PlacementSubject,\n INTEGRATION_INBOUND_CHANNEL_SKILL_REF,\n BILLING_CATALOG_SKILL_REF,\n APPLICATION_ROLES_SKILL_REF,\n BuildPlanDataSeedContent,\n DATA_SEED_SKILL_REF,\n PDF_TEMPLATE_SKILL_REF,\n ORGANIZATION_RELATIONSHIPS_SKILL_REF,\n RESOURCE_RETENTION_SKILL_REF,\n AGENT_APPROVAL_GATE_SKILL_REF,\n AI_USE_DECLARATION_SKILL_REF,\n BUILD_PLAN_AGENT_SHAPE_SKILL_REF,\n BuildPlanAgentShape,\n WORK_UNIT_SKILL_REF,\n ORGANIZATION_TYPE_SKILL_REF,\n ORGANIZATION_UNIT_CONFINEMENT_SKILL_REF,\n SYSTEM_OF_RECORD_BINDING_SKILL_REFS,\n type BuildPlanTaskProduct,\n integrationMinionDirectoryName,\n integrationWorkerDirectoryName,\n} from '@wildo-ai/saas-specifications/application-creation';\nimport { posix } from 'node:path';\nimport { AgentWorkShortfallKind, isOrganizationRoleOfferedByType, SystemOfRecordAccess, type AgentWorkDeclarations, type AgentWorkShortfall, type RelationshipConferralDeclaration, type UnreadableResourceConfiguration } from '@wildo-ai/saas-models';\nimport { LauncherItemTargetKind } from '@wildo-ai/saas-frontend-lib/companion';\nimport { AvailableLanguage, languagePathSegment } from '@wildo-ai/presets-components-models';\n\nimport { PACKAGE_TYPECHECK_CHECK_REF_PREFIX, packageTypecheckCheckRef } from '../../claude-cli/models/coding-agent-dispatch.models';\nimport { flattenNestedStringLabels, parseNestedLabelsTsSource } from '../../i18n-labelling/utils/label-file-source.utils';\nimport {\n createInitialAssuranceDocumentAuthorityCatalog,\n selectAssuranceDocumentBlueprintForDocumentRef,\n} from '@wildo-ai/saas-specifications/assurance';\nimport { BUILD_TASK_DECISIONS_DEFAULT_APPLICATION_PATH } from '../models/build-task-decisions-path.models';\nimport { blankSourceComments } from '@wildo-ai/saas-models/public-runtime';\nimport { conventionalModuleFilePath, MODULE_PACKAGES, MODULES_SOURCE_DIRECTORY, ModuleConventionalFileKind } from '../../module-layout/module-layout-convention.companion';\n\n/**\n * Host-owned translation of a typed build-plan task into the physical coding\n * boundary the F2 coding host enforces: the application-root-relative path\n * prefixes the run may mutate and the verification checks that must pass\n * afterwards. The model never chooses either — the typed task carries a closed\n * `target.kind`, the target switch below is the ONLY place that kind becomes\n * paths, and the checks are DERIVED from those paths (`deriveRequiredCheckRefs`,\n * #1540). Prefixes follow the standard Wildo application layout\n * (`shared-lib/`, `backend-api/`, `frontend/`, `specifications/`, each with\n * `src/modules/<module>/`).\n */\nexport interface ApplicationBuildTaskCodingPolicy {\n readonly allowedPathPrefixes: readonly string[];\n readonly prohibitedPathPrefixes: readonly string[];\n readonly requiredCheckRefs: readonly string[];\n}\n\n/** A build task no coding agent may run: the companion owns it (labels, seeds, emails…). */\nexport class ApplicationBuildTaskNotACodingTaskError extends Error {\n public constructor(public readonly taskRef: string, public readonly generationStepRef: string) {\n super(`Build task ${taskRef} is a companion generation step (${generationStepRef}); it is never dispatched to a coding agent.`);\n this.name = 'ApplicationBuildTaskNotACodingTaskError';\n }\n}\n\nconst MODULE_REGISTRY_FILES = [\n 'shared-lib/src/modules-registry.shared.ts',\n 'backend-api/src/modules-registry.backend.ts',\n 'frontend/src/modules-registry.frontend.ts',\n 'shared-lib/src/modules/index.ts',\n 'backend-api/src/modules/index.ts',\n 'frontend/src/modules/index.ts',\n] as const;\n\n/**\n * The one thing a build task may never touch.\n *\n * ## This list SHRANK on purpose, and both removals reverse a decision (#1268)\n *\n * It read `['.wildo-saas/', 'wildo.saas.config.ts', 'infrastructure/']`, under the sentence\n * *\"Nothing a build task does may touch the companion, its state, or the application's declared\n * identity/config.\"* Two of those three are gone by DECISION, not by oversight — Paul, 2026-09-17:\n * *\"we need to send the more permissive rights to update things … we will see after for potential\n * restrictions on that, but, not an emergency.\"*\n *\n * `wildo.saas.config.ts` had to go first: #1272 asks the journey to ENABLE an engine capability, and\n * a capability is enabled in that file. A prohibition on it makes a \"full application\" — one with\n * billing, email or a second locale — unreachable by any run.\n *\n * `infrastructure/` follows the same decision. Neither removal is an oversight to restore; if the\n * restriction comes back it should come back as a judge-style guard, which is what\n * `application-creation-directive.md` asks for.\n *\n * ## `.wildo-saas/` STAYS, and it is not a policy preference\n *\n * It is the companion's own runtime and its state, including the records of the run that is\n * executing. An agent writing there kills the run dispatching it, so the prohibition protects the\n * mechanism rather than the product.\n */\nconst ALWAYS_PROHIBITED_PREFIXES = ['.wildo-saas/'] as const;\n\n/**\n * Files only a PERSON's door writes, prohibited to every coding run whatever its target (review of 8d6b95d29): the\n * build-task decisions (`wildo build close` / `approve`). A run that wrote one could make a task read as closed, declined\n * or approved by a person who never decided. This confines the agent's FILE EDITS only: a shell command declares no\n * path, so an `UNRESTRICTED` profile can still write the file; the reader's content check is what holds then. Kept apart from {@link ALWAYS_PROHIBITED_PREFIXES}, which also feeds the\n * top-level entries never in scope, because these are single files inside a tree runs do write. The accept doors refuse\n * them too (`AcceptRefusalReason.PERSON_DECISION_RECORD`), and the reader honours them only from the door's own commit.\n */\n// The SCAFFOLDED location (`specifications/` at the application root): this policy is static and names it the way it\n// names every other `specifications/src/…` path. An application that configures its specifications package elsewhere is\n// still covered at the accept doors, which refuse the CONFIGURED location too (`isBuildTaskDecisionsPath`), and by the\n// reader, which honours only a door's bytes; only the agent's edit-time refusal names the default.\nconst PERSON_DECISION_RECORD_PATHS: readonly string[] = [BUILD_TASK_DECISIONS_DEFAULT_APPLICATION_PATH];\n\n/** What every coding run is prohibited from writing: the companion's runtime and the person's decision records. */\nconst PROHIBITED_TO_EVERY_RUN: readonly string[] = [...ALWAYS_PROHIBITED_PREFIXES, ...PERSON_DECISION_RECORD_PATHS];\n\n/**\n * Top-level workspace entries no coding run may write, whatever the policy is.\n *\n * Distinct from the prohibition above, which is a POLICY the predicate enforces; this is a\n * derivation filter, so these never enter the allowed set in the first place.\n *\n * ## The rule: the widening's safety story is GIT, so an entry git cannot restore is outside it\n *\n * `application-creation-directive.md` makes mutation free and names the reason — \"git makes every\n * change visible and reversible; that is the whole safety story for now\". Every entry below is one\n * that story does not cover, so excluding it is that argument applied rather than a restriction\n * placed on top of it:\n *\n * - **`.git`** — a run that can rewrite history can undo the one thing that makes every other\n * write reversible.\n * - **`.env` and its siblings** — gitignored by construction, so a rewrite has NO undo at all. They\n * also hold the local admin and infrastructure credentials, and every application's own\n * dispatched-agent rule already says an agent may not alter credentials.\n * - **`node_modules`** — regenerable rather than dangerous; excluded so a change set never has to\n * reason about it.\n *\n * Found by RUNNING the predicate rather than by reading the derivation: a probe against the real\n * Wonder Todos workspace listed `.env` in the admitted set, which no reading of \"the whole\n * application workspace\" had made visible.\n */\nconst WORKSPACE_ENTRIES_NEVER_IN_SCOPE: readonly string[] = ['.git', 'node_modules', ...ALWAYS_PROHIBITED_PREFIXES.map((prefix) => prefix.replace(/\\/$/, ''))];\n\n/** `.env`, `.env.local`, `.env.wildo-platform` — the whole dot-env family, matched by prefix. */\nconst DOT_ENV_ENTRY_PREFIX = '.env';\n\n/**\n * The application workspace as a mutation scope — every top-level entry that is not excluded above.\n *\n * ## Why it is DERIVED and not a list\n *\n * There is no prefix meaning \"everything\". The live predicate matches with a path boundary —\n * `path === prefix || path.startsWith(prefix + '/')` — so the empty string matches NOTHING, and\n * supplying it would build a guard that silently denies every path, which that file's own realpath\n * comment records as worse than a guard that denies none.\n *\n * So the whole workspace has to be named entry by entry, and naming them by hand would be a second\n * copy of the application layout. Measured 2026-09-17: Wonder Todos has 19 top-level entries and\n * Wonder CRM 15, and the difference is composition scenarios — `website`, `technical-doc`,\n * `minions`, `workers`, `e2e` arrive with `wildo compose`. A literal list goes stale the day a\n * scenario adds a package, and goes stale as a REFUSAL: the run is confined away from the package it\n * was asked to write, which is the defect this whole change exists to remove, one level up.\n *\n * Derived from what exists, it cannot rot.\n */\nexport function resolveApplicationWorkspaceMutationScope(\n applicationWorkspaceEntries: readonly string[],\n): readonly string[] {\n return applicationWorkspaceEntries.filter(\n (entry) => !WORKSPACE_ENTRIES_NEVER_IN_SCOPE.includes(entry) && !entry.startsWith(DOT_ENV_ENTRY_PREFIX),\n );\n}\n\n/**\n * The ONE config file each shell surface's placement is authored in.\n *\n * A file path, not a directory prefix, and that is the point: `frontend/src/config/`\n * would also hand the task the design-system, navigation and global-views configs,\n * none of which a placement decision may touch. The prefix match is `startsWith`, so\n * a full file path allows exactly that file.\n */\nconst SHELL_PLACEMENT_CONFIG_FILE: Readonly<Record<PlacementSurface, string>> = {\n [PlacementSurface.SETTINGS_HUB]: 'frontend/src/config/settings-hub.config.ts',\n [PlacementSurface.SIDEBAR]: 'frontend/src/config/app-shell.config.ts',\n [PlacementSurface.USER_MENU]: 'frontend/src/config/app-shell.config.ts',\n [PlacementSurface.COMMAND_MENU]: 'frontend/src/config/app-shell.config.ts',\n};\n\n/**\n * The ONE config file each application-wide frontend surface is composed in (#1490). Same technique\n * as the placement table above, for the same reason: a full file path allows exactly that file.\n * Total over the vocabulary, so a surface added tomorrow does not compile until it names its file.\n */\nconst FRONTEND_CONFIG_FILE: Readonly<Record<FrontendConfigSurface, string>> = {\n [FrontendConfigSurface.NAVIGATION]: 'frontend/src/config/navigation.config.ts',\n [FrontendConfigSurface.DESIGN_SYSTEM]: 'frontend/src/config/design-system.config.ts',\n [FrontendConfigSurface.APP_SHELL]: 'frontend/src/config/app-shell.config.ts',\n [FrontendConfigSurface.GLOBAL_VIEWS]: 'frontend/src/config/global-views.config.ts',\n /**\n * The shell layout is one registration line in the engine registrations file (`register2DLayout(MORPH_LAYOUT_2D)`),\n * the only list that runs after the framework presets. The landing probe finds its declaration there: the layout\n * constant, written out — a bare `register2DLayout()` (glide by default) names nothing and would never land.\n */\n [FrontendConfigSurface.SHELL_LAYOUT]: 'frontend/src/engine/component-registrations.frontend.ts',\n};\n\n/**\n * The one file a frontend config surface is composed in — the file an `APPLICATION_FRONTEND_CONFIG` task\n * targeting that surface may write.\n *\n * Exported for the `design-tokens` generation step (#2358), which regenerates the stylesheet belonging to\n * the design-system config a DESIGN_SYSTEM task wrote, and must therefore find that config where the task\n * found it rather than restate the path.\n */\nexport function resolveFrontendConfigSurfaceFile(surface: FrontendConfigSurface): string {\n return FRONTEND_CONFIG_FILE[surface];\n}\n\n/**\n * The application's billing catalogue (#1835): the `ProductDefinition[]` the backend syncs to the billing\n * provider and the public website reads for its pricing page. One file, written by `wildo init` with an\n * empty catalogue — every scaffolded application has it — and the only file a `BILLING_CATALOG` task\n * writes besides the product specifications.\n */\nconst BILLING_CATALOG_FILE = 'shared-lib/src/engine/product.ts';\n\n/**\n * The application's role table (#2490): `CUSTOM_ROLES_CONFIGURATION`, written by `wildo init` with an empty\n * record — every scaffolded application has it — keyed by each role's name.\n */\nconst APPLICATION_ROLES_FILE = 'shared-lib/src/engine/roles.ts';\n/** The application's configuration: where its organization types and relationship kinds are declared (#2305 S6). */\nconst APPLICATION_SAAS_CONFIG_FILE = 'wildo.saas.config.ts';\n/**\n * The backend's startup configuration (#3036): where an application declares `organizationUnitNarrowing` and\n * `organizationOwnRows`, the confinements of its rows below the whole organization. Written by `wildo init` with empty\n * maps, so the file existing proves nothing; what the backend assembles from it at startup does.\n */\nconst BACKEND_STARTUP_CONFIGURATION_FILE = 'backend-api/src/bootstrap-config.ts';\n/**\n * The backend's own configuration (#3044): where the user types are declared, with their sign-in policy, and which\n * frontend authenticates which of them. Renaming the owner's people (`member` → `employee`) is an edit here, carrying the\n * declared rename (`userTypes.<new>.renamedFrom`) that moves the existing accounts.\n */\nconst BACKEND_CONFIGURATION_FILE = 'backend-api/src/saas-config.backend.ts';\n/** The `moduleRef` of a registry probe whose product belongs to no module (a relationship role, #2305 S6). */\nexport const APPLICATION_WIDE_AGENT_WORK_MODULE_REF = '';\n\n/**\n * The file a provider binding is DECLARED in, per scope (#1490).\n *\n * The backend and companion scopes are blocks of the SaaS config, which the `add-provider` scenario\n * writes; a frontend binding is a companion contribution in the service's own\n * `provider-contributions.ts`, which `add-file-picker-provider` writes. The probe reads the file the\n * scope names and asks whether the provider ref appears in it.\n */\nconst PROVIDER_BINDING_DECLARATION_FILE: Readonly<Record<ProviderBindingScope, string>> = {\n [ProviderBindingScope.BACKEND]: 'wildo.saas.config.ts',\n [ProviderBindingScope.COMPANION]: 'wildo.saas.config.ts',\n [ProviderBindingScope.FRONTEND_APP]: 'frontend/src/provider-contributions.ts',\n [ProviderBindingScope.WEBSITE]: 'website/src/provider-contributions.ts',\n};\n\n/**\n * A worker's package directory, from the integration plan's `worker-<slug>` ref, by the rule the foundation step composes\n * the package with. Every worker path below goes through it: run 44031607175 probed `workers/worker-spreadsheet-import/`\n * for a package composed in `workers/spreadsheet-import/`, and the task never landed.\n */\nconst workerPackageDirectory = (workerRef: string): string => `workers/${integrationWorkerDirectoryName(workerRef)}`;\n/** A minion's package directory, by the same rule as {@link workerPackageDirectory}. */\nconst minionPackageDirectory = (minionRef: string): string => `minions/${integrationMinionDirectoryName(minionRef)}`;\n\n/** A worker's entry file, by runtime — where its jobs are declared and where a landing probe reads. */\nconst WORKER_ENTRY_FILE: Readonly<Record<BuildPlanWorkerRuntime, (workerRef: string) => string>> = {\n [BuildPlanWorkerRuntime.NODE]: (workerRef) => `${workerPackageDirectory(workerRef)}/src/index.ts`,\n [BuildPlanWorkerRuntime.RUST]: (workerRef) => `${workerPackageDirectory(workerRef)}/src/main.rs`,\n};\n\n/**\n * A documentation chapter's own file, named by its `chapterRef` (#3204). One file per chapter, which nothing imports:\n * publication reads the directory. With one shared declarations file every chapter task wrote the same file, so the\n * dispatch ran them one at a time; measured on reference run 42506906346's plan, 23 chapter tasks made that file the\n * build's longest queue, about 48 minutes at ten runs at once.\n */\nconst technicalDocumentationChapterFile = (chapterRef: string): string => `specifications/src/technical-documentation/chapters/${chapterRef}.ts`;\n/**\n * The companion PUBLISHES here; no task writes it. Prohibited on the documentation target rather\n * than merely absent from its scope, because the workspace widening (#1268) would otherwise admit\n * it through the `technical-doc/` entry.\n */\nconst TECHNICAL_DOCUMENTATION_GENERATED_PREFIX = 'technical-doc/src/generated/';\n\n/**\n * The physical boundary a run may mutate — the target's own scope, WIDENED to reach the paths this\n * task's landing probes say it may WRITE.\n *\n * **The invariant: a task must be able to write where its landing is measured.** Nothing stated it\n * until 2026-09-16, and the two halves had drifted apart in exactly one place. `target` derives the\n * scope and `produces` derives the probes (deliberately — see `BuildPlanTaskLandedProbeKind`, which\n * records why landing must NOT be answered from the write scope). What that separation never said is\n * the converse obligation, so an `APPLICATION_DOCUMENT` product probed\n * `specifications/src/compliance-document-candidates/index.ts` while its `MODULE` target allowed only\n * `specifications/src/modules/<module>/`. The run was confined away from the one file its product can\n * land in: unbuildable by construction, and no correct agent behaviour could have fixed it.\n *\n * Measured on Wonder CRM's `build-task-gdpr-data-handling-governance`, whose agent reported exactly\n * that — \"there is no per-module document location, so the deliverable cannot be written where any\n * document mechanism reads it\" — having spent a full turn deriving it.\n *\n * Widened here rather than corrected per target, so the two cannot disagree again: the scope now\n * FOLLOWS the probes instead of being maintained beside them. Every other product kind is\n * module-relative and already inside its target's scope, so this admits nothing new for them — pinned\n * by `describe('every product kind can be written inside its own task scope')`, whose fixture map is a\n * `Record` keyed on `BuildPlanTaskProductKind`, so a kind added tomorrow does not compile until it\n * states where it lands.\n *\n * ## And then widened AGAIN, to the whole workspace (#1268)\n *\n * Everything above describes what a TARGET means, and it stays true and stays tested — it is what a\n * revert restores to. What the dispatch actually hands the agent is that scope PLUS every top-level\n * entry of the application workspace, by decision rather than by derivation: a task dispatched for\n * one module could not write in another package, nor in `wildo.saas.config.ts`, and was denied\n * `LOCATION_OUT_OF_SCOPE` **even under an UNRESTRICTED permission ceiling** — the ceiling decides the\n * KIND of operation and this predicate decides the PLACE, and only the first was permissive.\n *\n * `applicationWorkspaceEntries` is REQUIRED rather than optional deliberately. An optional widening\n * is one a third call site can forget, and forgetting it restores the refusal this exists to remove.\n */\nexport function resolveBuildPlanTaskCodingPolicy(\n task: BuildPlanTask,\n applicationWorkspaceEntries: readonly string[],\n): ApplicationBuildTaskCodingPolicy {\n const targetPolicy = admitLandedProbePaths(task, resolveBuildPlanTaskTargetCodingPolicy(task));\n return {\n ...targetPolicy,\n /*\n * THE WIDENING (#1268), and the whole of it — one expression, so reverting is deleting a spread.\n *\n * ADDITIVE rather than a replacement, for a property that matters when the derivation has\n * nothing to say: an unreadable or empty workspace listing degrades to the task's own scope,\n * which is exactly today's behaviour, instead of collapsing to an empty scope that\n * `composeBuildTaskCodingContract` refuses. A run that cannot be widened should still run.\n *\n * The task scope is a SUBSET of the workspace whenever the listing is real, so this adds no\n * permission the line below does not already give. What it adds is a floor.\n *\n * The empty-scope refusal survives both ways: a target with no prefixes and a workspace with no\n * entries still composes to nothing, and the contract composer still refuses it by name.\n */\n allowedPathPrefixes: [...new Set([\n ...targetPolicy.allowedPathPrefixes,\n ...resolveApplicationWorkspaceMutationScope(applicationWorkspaceEntries),\n ])],\n };\n}\n\n/**\n * Widen a target-derived scope to admit the paths this task's own landing probes say it may WRITE.\n *\n * The WRITABLE set, never the read set — a probe for a product whose home is not one known path reads\n * several candidates and is satisfied by any of them, and turning that into a write grant hands the\n * run another producer's files. See `writablePaths` on the probe type for the measured case.\n *\n * A probe path is a FILE, so it is added whole: the prefix match is `startsWith`, and a full file path\n * allows exactly that file — the same technique `SHELL_PLACEMENT_CONFIG_FILE` uses, for the same\n * reason (a directory prefix would hand the run its unrelated neighbours).\n *\n * The target's own prohibition list is never crossed. A probe naming a prohibited path would be a\n * defect in the probe, and admitting it here would make the prohibition bypassable by declaring a\n * product.\n */\nfunction admitLandedProbePaths(task: BuildPlanTask, targetPolicy: ApplicationBuildTaskCodingPolicy): ApplicationBuildTaskCodingPolicy {\n /*\n * A scope is a property of the TARGET; probes are a property of the PRODUCTS. So a task whose\n * products cannot be placed — unplaceable, or simply absent — still has a perfectly good write\n * scope, and this widening must not be able to take it away.\n *\n * DEFENCE, not the repair of something production can produce. `produces` carries `.default([])`, and\n * `resolveBuildTaskLandedProbes` returns before `productModuleRef` for both target kinds that could\n * throw, so no plan the companion can PARSE reaches this catch. What makes it worth keeping is what\n * a throw would COST: the scope of a task whose target is perfectly placeable, refused over products\n * that are not. It was first kept for a narrower reason — until #1359 a parked question was resumed\n * by re-composing this boundary inside a `try` whose `catch` meant \"not answerable\", so a throw here\n * became an unresumable question rather than an error someone could read. That path is gone (the\n * parked run carries its admitted contract), and the fallback stays on the general ground. Observed\n * exactly once, against a test fixture that casts its way past the schema — the operator remedy\n * would have been \"declare what the task produces\", which is authoring work and must not gate\n * (`application-creation-directive.md`).\n *\n * Falling back is not swallowing: an unplaceable product already surfaces where it belongs, in the\n * LANDING resolution, which is the question it actually answers.\n */\n let writablePaths: readonly string[];\n try {\n writablePaths = resolveBuildTaskLandedProbes(task).flatMap(buildPlanTaskLandedProbeWritablePaths);\n } catch {\n return targetPolicy;\n }\n const admissible = [...new Set(writablePaths)]\n .filter((probePath) => !targetPolicy.allowedPathPrefixes.some((prefix) => probePath.startsWith(prefix)))\n /*\n * The POLICY'S OWN prohibition list, not the module constant. They are equal today only because\n * `policy()` copies the constant; reading the constant here would let the two drift, and a target\n * that prohibited more than the default would be silently overruled by this widening.\n */\n .filter((probePath) => !targetPolicy.prohibitedPathPrefixes.some((prefix) => probePath.startsWith(prefix)))\n .sort();\n if (admissible.length === 0) return targetPolicy;\n const allowedPathPrefixes = [...targetPolicy.allowedPathPrefixes, ...admissible];\n return {\n ...targetPolicy,\n allowedPathPrefixes,\n // A path this widening admits is a path the task writes, so it obliges the checks that speak about\n // it — a module task whose product lands in the settings rail owes the settings sweep. The target's\n // own set is kept, so a stated exception (a Rust worker) is not re-derived away.\n requiredCheckRefs: orderCheckRefs([...new Set([...targetPolicy.requiredCheckRefs, ...deriveRequiredCheckRefs(admissible)])]),\n };\n}\n\n/**\n * The catalog is engine SOURCE and the lookup is pure, so this is built once and never refreshed.\n * Which catalog you compiled against is a git revision (`one-source-of-truth.md`, Rule 0).\n */\nlet assuranceDocumentCatalog: ReturnType<typeof createInitialAssuranceDocumentAuthorityCatalog> | undefined;\n\n/**\n * The document this task declares it produces, when the engine catalog cannot say what that document\n * must CONTAIN — otherwise `undefined`.\n *\n * A governed document is drafted against a BLUEPRINT: required sections, required facts, claim guards.\n * With no blueprint an agent has nothing to draft against, and the shipped `compliance-document-authoring`\n * skill forbids the only remaining option — inventing the structure. So the task cannot be completed by\n * any run, however good, and dispatching it spends a full agent turn to rediscover that.\n *\n * Measured on Wonder CRM, whose plan declares TWO such products (`gdpr-data-handling-governance` and\n * `terminal-access-governance`). Neither names a document the catalog defines; neither is even in the\n * `document:<namespace>.<id>` shape a landed candidate carries, because the build-plan schema types\n * `documentRef` as a bare slug while the candidate family requires a namespaced ref. The first was\n * dispatched, and its agent spent a turn deriving exactly this — with a positive control, correctly —\n * before reporting that the task could not be built as declared.\n *\n * That is `derive-before-you-ask.md`'s own test failing: a function could have produced that answer, so\n * the question was the defect rather than the agent's handling of it. `selectAssuranceDocumentBlueprintForDocumentRef`\n * is exact — an unprefixed or unknown ref resolves to nothing, and nothing is inferred from a partial\n * match — so this cannot mistake a real document for an absent one.\n *\n * Reported so the SELECTOR can skip, never so a caller can refuse the queue: the remedy is to declare a\n * catalogued document or retire the task, which is authoring work, and authoring work must not gate\n * (`application-creation-directive.md`).\n */\nexport function resolveUndraftableDocumentRef(task: BuildPlanTask): string | undefined {\n assuranceDocumentCatalog ??= createInitialAssuranceDocumentAuthorityCatalog();\n for (const product of task.produces ?? []) {\n if (product.kind !== BuildPlanTaskProductKind.APPLICATION_DOCUMENT) continue;\n if (selectAssuranceDocumentBlueprintForDocumentRef(assuranceDocumentCatalog, product.documentRef) === undefined) {\n return product.documentRef;\n }\n }\n return undefined;\n}\n\n/** Every path a probe READS — total over the probe vocabulary, so a kind added tomorrow must say. */\nexport function buildPlanTaskLandedProbePaths(probe: BuildPlanTaskLandedProbe): readonly string[] {\n switch (probe.kind) {\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE:\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES:\n case BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_FILE_DECLARES_KEYS:\n return [probe.path];\n case BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES:\n return probe.paths;\n case BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_PACKS_DECLARE:\n return [...probe.paths, ...probe.fragmentPaths];\n // The files a shell probe reads are the ones the RESOLVED shell says contribute — known only at\n // evaluation, from the introspection answer, and checked there. Nothing fixed to prime or batch.\n case BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN:\n case BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT:\n return [];\n // The registration files are fixed; the index's imports are read at evaluation (#2966).\n case BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED:\n return probe.registrationFiles;\n default: {\n const unhandled: never = probe;\n throw new Error(`Unhandled build-plan landed probe ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * The paths a probe's producing task may WRITE — a SUBSET of what it reads, never the whole set.\n *\n * The two questions differ and must not share an answer. Landing asks \"is the artifact there?\", and\n * for a product whose home is not one known path it accepts ANY candidate. A mutation scope asks\n * \"what may this run change?\", where admitting every candidate hands the run files that belong to\n * other producers — see `writablePaths` on the probe type for the measured case.\n */\nexport function buildPlanTaskLandedProbeWritablePaths(probe: BuildPlanTaskLandedProbe): readonly string[] {\n switch (probe.kind) {\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE:\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES:\n case BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_FILE_DECLARES_KEYS:\n return [probe.path];\n case BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES:\n return probe.writablePaths;\n // A section writes its words into its OWN file in each locale (#3204), never into the packs other sections share.\n // One case is outside this set: words a site already holds in a PACK (a site scaffolded before #3204) are MOVED out by\n // the task, which edits that pack, and the contention check does not see the edit. Every scenario now seeds a section's\n // words in its own file, so a site created since has no such words.\n case BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_PACKS_DECLARE:\n return probe.fragmentPaths;\n // No grant from the probe: the task's TARGET already names the surface's config file, and a\n // module's contribution file is inside the workspace-wide scope every task now carries.\n case BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN:\n case BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT:\n return [];\n // The registration files only — files, never a directory; the agent's own files sit in the target's module scope.\n case BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED:\n return probe.registrationFiles;\n default: {\n const unhandled: never = probe;\n throw new Error(`Unhandled build-plan landed probe ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * What each build-task check can SPEAK ABOUT: the application paths whose change it can find broken\n * (#1540). A task's required checks are DERIVED from this and from what the task writes — never listed\n * per target kind.\n *\n * ## Why a table of coverage rather than a list per target\n *\n * The required checks used to be a hand-written list per target kind, and a check missing from a list\n * was silent: the task passed, the artifact shipped, and the consequence landed elsewhere.\n * `check:schema-plan-in-sync` was absent from the SCHEMA stage for that stage's whole life, and on the\n * first end-to-end run (#1273) the application's backend crash-looped on a column no migration built.\n * The lists were the only statement of the obligation, so nothing could be compared against them.\n * Now each check states what it covers, each target states what it writes, and the join is a function:\n * a check added tomorrow lands on every target that can break what it checks, without anyone\n * remembering. Its first run found two gaps that no list had recorded — provider bindings write the\n * website and never typechecked it, and relationship/config/backend tasks write `shared-lib` (an FK\n * column, an index) without being asked for the migration they owe.\n *\n * ## Coverage is a check's OWN package, deliberately not its dependents\n *\n * `backend-api` compiles against `shared-lib`, so a `shared-lib` edit can break it — and it would be\n * tempting to say the backend typecheck speaks about `shared-lib/` too. Rejected: a workspace typecheck\n * resolves its sibling packages through their BUILT output, so right after a `shared-lib` source edit\n * it reads a `dist` the edit has not reached yet. It would answer, green or red, about the tree as it\n * stood before the task — confident and stale (`staleness-presents-as-a-logic-defect.md`). A check is\n * only honest about code it reads as source.\n *\n * ## The semantic checks, and why they sit on those paths\n *\n * `check:frontend-fk-resolution` — an `.isForeignKey()` field is declared in `shared-lib`, and an\n * unregistered relationship edge is invisible to every typecheck and fatal to the frontend at first\n * page load (wonder-crm, 2026-08-27).\n *\n * `check:schema-plan-in-sync` — a resource, a field, an index or a unique constraint in `shared-lib` is\n * what changes the physical shape the engine plans for a table. On PostgreSQL a table exists only\n * because a migration built it, and no type in any program knows whether one did, so the change\n * compiles green through every other check and the backend then refuses to boot on\n * `postgresql_table_schema_mismatch`. It ran ONLY at `bottom_up.assemble-verify`, the capstone, dozens of\n * tasks after the one that owed the migration: `teamMembership` declared `teamId`, no migration built\n * the column, and `scratch-journey`'s backend crash-looped five times and sat paused while the build\n * carried on above it. The remedy is in the task's own reach — the mutation scope carries every\n * top-level workspace entry (#1268), so `backend-api/migrations/` is writable, and the application\n * ships `database-migration-obligation.md` as an ALWAYS-ON rule naming `wildo db generate`. A stale or\n * absent model is classified as infrastructure rather than reported as drift.\n *\n * `check:settings-placement-content` — a placement naming a `destinationRef` the engine catalog does not\n * ship is not a type error: `resolveSettingsHubConfig` drops it and the section silently never\n * renders. The sweep asks the working tree, in the companion's introspection subprocess. It covers the\n * settings rail AND the app-shell config, because the user menu's `settingsEntries` name rail sections\n * too, and the frontend registry, which is where the running frontend receives the rail (#3101): the check also refuses\n * a registry that does not pass it.\n *\n * `check:design-system-contrast` — a palette is not a type: a label the user cannot read, an invisible focus ring\n * or a status colour lost on its page compiles green everywhere. It measures every pair the framework draws on the\n * palette the design-system config paints (#2351), and its findings name both colours and the ratio, so the agent\n * that wrote the config can correct it in the same task.\n *\n * `check:design-system-contract` — the same file's theme against the theme contract (#2359): a card painted with the\n * page colour, a `transition-all`, a badge in the mid-tone status colour all compile green. Its findings name the rule\n * and the recipe.\n *\n * `check:design-system-brand` — the same file against the brand (#2818): a theme or palette the agent picked by hand,\n * when the build generated the brand's point in `brand-design.ts`, compiles green and passes both checks above. Its\n * findings name the composition it expected. It also covers the website's root config, on which it only ADVISES: a\n * site may differ from its product on purpose, so an axis set away from the brand is said, never refused.\n *\n * `check:requirements-schema` is absent on purpose: it belongs to the requirements coding task, not to\n * a build-plan target. The parametric workers/minions typecheck is derived by\n * {@link deriveRequiredCheckRefs} from the package directory itself, since no fixed row can name it.\n */\nconst CHECK_COVERAGE: Readonly<Record<string, readonly string[]>> = {\n 'check:shared-lib-typecheck': ['shared-lib/'],\n 'check:backend-api-typecheck': ['backend-api/'],\n 'check:app-typecheck': ['frontend/'],\n 'check:specifications-typecheck': ['specifications/'],\n /*\n * The specifications package EVALUATED (#3210, #3211): every factory runs its module-load validation. After the\n * typecheck, whose failure would make this one's finding a restatement. Covers `specifications/` only, which it reads\n * as source; a shared-lib edit it reads as a build, so it does not speak about `shared-lib/` (see above).\n */\n 'check:specification-exports': ['specifications/'],\n 'check:frontend-fk-resolution': ['shared-lib/'],\n 'check:settings-placement-content': [\n SHELL_PLACEMENT_CONFIG_FILE[PlacementSurface.SETTINGS_HUB],\n FRONTEND_CONFIG_FILE[FrontendConfigSurface.APP_SHELL],\n // The registry that passes the rail to the running frontend: a task dropping `settingsHub` there empties Settings (#3101).\n 'frontend/src/modules-registry.frontend.ts',\n ],\n 'check:schema-plan-in-sync': ['shared-lib/'],\n 'check:design-system-contrast': [FRONTEND_CONFIG_FILE[FrontendConfigSurface.DESIGN_SYSTEM]],\n 'check:design-system-contract': [FRONTEND_CONFIG_FILE[FrontendConfigSurface.DESIGN_SYSTEM]],\n /*\n * The design-system config, and the website's root config (#2818): a website task that sets a shared personality\n * axis away from the brand never writes the design-system config, and the check's advice about it is the only\n * place that departure is said.\n */\n 'check:design-system-brand': [FRONTEND_CONFIG_FILE[FrontendConfigSurface.DESIGN_SYSTEM], 'website/src/website-root.config.ts'],\n /*\n * The resources registry the backend builds at startup (#2404). Shared resources live in `shared-lib/`, backend-only\n * ones and the module registry in `backend-api/`; a write to either can make the factory refuse at the next start.\n */\n 'check:resources-registry-init': ['shared-lib/', 'backend-api/'],\n /*\n * Every module's conventional files in their conventional folders (#3904): a write under any package's\n * `src/modules/` can place a module file where the framework never reads it (an email definitions file in `email/`,\n * the reference run 43691253927 defect). Read from source by path and syntax tree, so it speaks about what it covers.\n */\n 'check:module-layout': MODULE_PACKAGES.map((modulePackage) => `${modulePackage}/${MODULES_SOURCE_DIRECTORY}/`),\n 'check:website-typecheck': ['website/'],\n /*\n * The website's drawn demos, held to the resources they draw (#2784). After the typecheck: a site that does not\n * compile is that check's finding, not this one's. Covers `website/` only, where the drawing is written; a task that\n * changes a resource is not made to owe it, and the end-of-build run catches a landed drawing it made untrue.\n */\n 'check:website-demo-facts': ['website/'],\n 'check:technical-doc-typecheck': ['technical-doc/'],\n};\n\n/** The build-task checks whose coverage is stated, in the order a task runs them. */\nexport const BUILD_TASK_COVERED_CHECK_REFS: readonly string[] = Object.keys(CHECK_COVERAGE);\n\n/**\n * Whole-application questions a typecheck cannot answer, asked ONLY at the end of a build (#2228): does each optional\n * site BUILD (`astro build`, `docusaurus build`), and does the configuration pass the checks the backend runs at\n * startup. Never per task: a site build takes minutes, and a task already owes its package's typecheck, which is\n * the fast half of the same question. An absent package answers \"nothing to build\" in the executor.\n */\nexport const APPLICATION_ASSEMBLY_ONLY_CHECK_REFS: readonly string[] = [\n 'check:website-build',\n 'check:technical-doc-build',\n 'check:config-validate',\n // The RUNNING backend: a build can typecheck, build and validate while the backend crash-loops at boot.\n 'check:backend-ready',\n // And the running frontend, in a browser — the CLI drives it, and answers could-not-ask without Playwright.\n 'check:browser-smoke',\n];\n\n/**\n * Does the WHOLE application assemble? The checks that answer it (#2222): the typecheck of every workspace package\n * the application can have, the package typecheck of every workers/minions package it has, the resources registry\n * built offline (#2404), the website's drawn demos held to the application (#2784), the end-of-build-only questions,\n * and the schema-plan gate — the typechecks derived from {@link CHECK_COVERAGE} and the workspace, never listed.\n *\n * It was a list of four (specifications, shared-lib, backend-api, frontend) in `bottom_up.assemble-verify`, and the\n * list went stale the day #1490 added `website` and `technical-doc` packages: `app-creation-test-004` built a\n * website that did not compile and no end-of-build question could see it. Derived from the coverage table, a\n * package added there is asked about here with nobody remembering to. A package the application does not have\n * answers \"nothing to typecheck\" in the executor, so naming every one is always safe.\n *\n * `packageDirectories` are the application's workers/minions package directories (`workers/reminders`, …), listed\n * by `resolveApplicationAssemblyCheckRefs`; `nonTypeScriptPackages` the ones with no TypeScript (a Rust worker).\n */\nexport function deriveApplicationAssemblyCheckRefs(\n packageDirectories: readonly string[],\n nonTypeScriptPackages: readonly string[] = [],\n): string[] {\n const packageTypechecks = Object.entries(CHECK_COVERAGE)\n .filter(([checkRef, covered]) => checkRef.endsWith('-typecheck') && covered.length === 1 && /^[a-z-]+\\/$/u.test(covered[0]!))\n .map(([checkRef]) => checkRef);\n const parametric = [...new Set(packageDirectories.flatMap((entry) => PARAMETRIC_PACKAGE_DIRECTORY.exec(entry)?.[1] ?? []))]\n .filter((directory) => !nonTypeScriptPackages.includes(directory))\n .sort()\n .map(packageTypecheckCheckRef);\n // Builds and config after the compile questions (a build of a package that does not typecheck says nothing new);\n // the drift gate LAST, as assemble-verify always ran it: a drift report reads best once the compile questions are settled.\n // The registry construction before the running backend is asked (#2404): it names the resource a crash-loop would not.\n // The website's demos once more (#2784): a website task checked them when it landed, but a later task that changes a\n // resource (a status member removed, a field excluded from update) can make a landed drawing untrue, and no website\n // task runs again to notice.\n return [\n ...packageTypechecks,\n ...parametric,\n // The specifications package evaluated (#3211): a task that typechecked can still leave a specification its\n // factory refuses, and a later task can make an earlier one untrue (a removed enum member it names).\n 'check:specification-exports',\n 'check:resources-registry-init',\n // Every module's files where the framework reads them (#3904): a misplacement a task's check carried, or one that\n // predates the build lane, is asked once more at the end, where a repair run moves it.\n 'check:module-layout',\n 'check:website-demo-facts',\n ...APPLICATION_ASSEMBLY_ONLY_CHECK_REFS,\n 'check:schema-plan-in-sync',\n ];\n}\n\n/**\n * What each end-of-build-only check READS (#2283), the counterpart of {@link CHECK_COVERAGE} for the checks no task\n * runs. A repair of the check is scoped and verified from it. A site build reads its package; `wildo config validate`\n * reads the application declaration, its infrastructure configuration and its CI workflow; the running backend\n * boots from the backend and the shared library; the browser smoke renders the frontend.\n */\nconst ASSEMBLY_ONLY_CHECK_COVERAGE: Readonly<Record<string, readonly string[]>> = {\n 'check:website-build': ['website/'],\n 'check:technical-doc-build': ['technical-doc/'],\n 'check:config-validate': ['wildo.saas.config.ts', 'infrastructure/', '.github/'],\n 'check:backend-ready': ['backend-api/', 'shared-lib/'],\n 'check:browser-smoke': ['frontend/'],\n};\n\n/**\n * The boundary of a REPAIR of one failing end-of-build check (#2283): where it may write and what it must pass,\n * derived from the check alone, never chosen by a model.\n *\n * - **Scope**: the check's coverage, widened to every workspace entry exactly as a build task's is (#1268), since a\n * compile error in one package is often fixed in another. `.wildo-saas/` stays prohibited, and so does the generated\n * documentation tree when the repair touches `technical-doc/`: the publication step owns it and would overwrite a\n * hand edit, as it does for a documentation task.\n * - **Checks**: what the coverage obliges ({@link deriveRequiredCheckRefs}), then the failing check itself, last, so\n * the run's own verification asks the question again. A check with no known coverage still requires itself.\n */\nexport function resolveAssemblyRepairCodingPolicy(\n checkRef: string,\n applicationWorkspaceEntries: readonly string[],\n nonTypeScriptPackages: readonly string[] = [],\n): ApplicationBuildTaskCodingPolicy {\n const coverage = CHECK_COVERAGE[checkRef]\n ?? ASSEMBLY_ONLY_CHECK_COVERAGE[checkRef]\n ?? (checkRef.startsWith(PACKAGE_TYPECHECK_CHECK_REF_PREFIX) ? [`${checkRef.slice(PACKAGE_TYPECHECK_CHECK_REF_PREFIX.length)}/`] : []);\n const required = deriveRequiredCheckRefs(coverage, nonTypeScriptPackages).filter((ref) => ref !== checkRef);\n return {\n allowedPathPrefixes: [...new Set([...coverage, ...resolveApplicationWorkspaceMutationScope(applicationWorkspaceEntries)])],\n prohibitedPathPrefixes: coverage.some((prefix) => prefix.startsWith('technical-doc/'))\n ? [...PROHIBITED_TO_EVERY_RUN, TECHNICAL_DOCUMENTATION_GENERATED_PREFIX]\n : [...PROHIBITED_TO_EVERY_RUN],\n requiredCheckRefs: [...required, checkRef],\n };\n}\n\n/** A workers/ or minions/ package directory, as the parametric package typecheck names it. */\nconst PARAMETRIC_PACKAGE_DIRECTORY = /^((?:workers|minions)\\/[a-z0-9]+(?:-[a-z0-9]+)*)(?:\\/|$)/u;\n\n/** Two path prefixes overlap when either contains the other: a write there can reach what the check reads. */\nfunction pathsOverlap(written: string, covered: string): boolean {\n return written.startsWith(covered) || covered.startsWith(written);\n}\n\nfunction orderCheckRefs(checkRefs: readonly string[]): string[] {\n const rank = (ref: string) => {\n const index = BUILD_TASK_COVERED_CHECK_REFS.indexOf(ref);\n return index === -1 ? BUILD_TASK_COVERED_CHECK_REFS.length : index;\n };\n return [...checkRefs].sort((left, right) => rank(left) - rank(right) || left.localeCompare(right));\n}\n\n/**\n * The checks a task that writes `writtenPathPrefixes` must pass (#1540): every check whose coverage one\n * of those paths can reach, plus the package typecheck of every workers/minions package it writes.\n *\n * `nonTypeScriptPackages` names package directories with no TypeScript to check (a Rust worker) — the\n * honest answer there is no typecheck, stated by the target, rather than a command that cannot run.\n *\n * Errs toward requiring, and that direction is the point: a spurious check costs seconds, a missing one\n * is invisible. Paths no check covers (`wildo.saas.config.ts`, `backend-api/package.json`) oblige\n * nothing, and the coverage test names them so a new one is noticed.\n */\nexport function deriveRequiredCheckRefs(\n writtenPathPrefixes: readonly string[],\n nonTypeScriptPackages: readonly string[] = [],\n): string[] {\n const required = new Set<string>();\n for (const [checkRef, covered] of Object.entries(CHECK_COVERAGE)) {\n if (writtenPathPrefixes.some((written) => covered.some((path) => pathsOverlap(written, path)))) required.add(checkRef);\n }\n for (const written of writtenPathPrefixes) {\n const packageDirectory = PARAMETRIC_PACKAGE_DIRECTORY.exec(written)?.[1];\n if (packageDirectory && !nonTypeScriptPackages.includes(packageDirectory)) required.add(packageTypecheckCheckRef(packageDirectory));\n }\n return orderCheckRefs([...required]);\n}\n\nfunction resolveBuildPlanTaskTargetCodingPolicy(task: BuildPlanTask): ApplicationBuildTaskCodingPolicy {\n const target = task.target;\n switch (target.kind) {\n case BuildPlanTaskTargetKind.MODULE:\n return policy(\n [\n `shared-lib/src/modules/${target.moduleRef}/`,\n `backend-api/src/modules/${target.moduleRef}/`,\n `frontend/src/modules/${target.moduleRef}/`,\n `specifications/src/modules/${target.moduleRef}/`,\n ...MODULE_REGISTRY_FILES,\n ],\n );\n case BuildPlanTaskTargetKind.RESOURCE_STAGE:\n switch (target.stage) {\n case BuildPlanResourceStage.SCHEMA:\n return policy([`shared-lib/src/modules/${target.moduleRef}/`]);\n case BuildPlanResourceStage.CONFIG:\n return policy([`shared-lib/src/modules/${target.moduleRef}/`, `backend-api/src/modules/${target.moduleRef}/`]);\n case BuildPlanResourceStage.UI_BEHAVIOR:\n return policy([`frontend/src/modules/${target.moduleRef}/`]);\n case BuildPlanResourceStage.SPEC:\n return policy([`specifications/src/modules/${target.moduleRef}/`]);\n default: {\n const unhandled: never = target.stage;\n throw new Error(`Unhandled build-plan resource stage ${String(unhandled)}.`);\n }\n }\n case BuildPlanTaskTargetKind.RELATIONSHIP:\n /*\n * The relationship is declared in shared-lib, but the `module-relationships` workflow it is\n * dispatched with also shows the reference on the holder's pages (frontend ui-behavior) and\n * updates both resources' specifications (#2503). Writing there is already permitted by the\n * whole-workspace widening below; naming the two prefixes here is what makes the checks follow\n * the edit — `deriveRequiredCheckRefs` reads the TARGET's prefixes, so without them a\n * relationship task that broke a ui-behavior file was never typechecked for it. Any module's\n * `frontend/src/modules/...` overlaps the frontend typecheck, so a holder in another module is\n * covered as well.\n */\n return policy([\n `shared-lib/src/modules/${target.moduleRef}/`,\n `backend-api/src/modules/${target.moduleRef}/`,\n `frontend/src/modules/${target.moduleRef}/`,\n `specifications/src/modules/${target.moduleRef}/`,\n ]);\n case BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP:\n throw new ApplicationBuildTaskNotACodingTaskError(task.taskRef, target.generationStepRef);\n case BuildPlanTaskTargetKind.MODULE_FRONTEND:\n /*\n * The module's frontend and specifications, plus the ENGINE registrations file: a custom\n * component may be registered there rather than in the module's own index, and both are\n * legitimate homes (see `CUSTOM_COMPONENT`'s probe).\n */\n return policy(\n [\n `frontend/src/modules/${target.moduleRef}/`,\n `specifications/src/modules/${target.moduleRef}/`,\n 'frontend/src/engine/component-registrations.frontend.ts',\n ]);\n case BuildPlanTaskTargetKind.MODULE_BACKEND:\n return policy([`shared-lib/src/modules/${target.moduleRef}/`, `backend-api/src/modules/${target.moduleRef}/`]);\n case BuildPlanTaskTargetKind.APPLICATION_FRONTEND_CONFIG:\n // One file, like a placement — the composition of a surface never needs its neighbours.\n return policy([FRONTEND_CONFIG_FILE[target.configSurface]]);\n case BuildPlanTaskTargetKind.WEBSITE:\n return policy(['website/']);\n case BuildPlanTaskTargetKind.TECHNICAL_DOCUMENTATION:\n return policy(['technical-doc/', 'specifications/src/technical-documentation/'], {\n prohibitedPathPrefixes: [...PROHIBITED_TO_EVERY_RUN, TECHNICAL_DOCUMENTATION_GENERATED_PREFIX],\n });\n case BuildPlanTaskTargetKind.WORKER:\n /*\n * The SaaS config is in scope because the worker's declaration lives there (the\n * `add-worker-*` scenario appends it); a task that composes the package and declares it in\n * one run must reach both. A RUST worker has no TypeScript to check — the honest answer is no\n * check, stated here, rather than a command the catalog cannot run.\n */\n return policy([`${workerPackageDirectory(target.workerRef)}/`, 'wildo.saas.config.ts'], {\n nonTypeScriptPackages: target.runtime === BuildPlanWorkerRuntime.NODE ? [] : [workerPackageDirectory(target.workerRef)],\n });\n case BuildPlanTaskTargetKind.MINION:\n return policy([`${minionPackageDirectory(target.minionRef)}/`, 'wildo.saas.config.ts']);\n case BuildPlanTaskTargetKind.PROVIDER_BINDING:\n /*\n * Every file a binding can touch, for every scope, because one task may bind one provider on\n * several scopes (`add-provider` writes the backend AND the companion block in one run).\n */\n return policy(\n [\n 'wildo.saas.config.ts',\n 'backend-api/package.json',\n 'frontend/src/engine/providers/',\n 'frontend/src/provider-contributions.ts',\n 'website/src/provider-contributions.ts',\n ]);\n case BuildPlanTaskTargetKind.SHELL_PLACEMENT:\n return policy([SHELL_PLACEMENT_CONFIG_FILE[target.surface]]);\n case BuildPlanTaskTargetKind.BILLING_CATALOG:\n /*\n * The catalogue file and the product specifications that document it. This is the TARGET's\n * contribution — what the task is FOR — not an isolation boundary: `resolveBuildPlanTaskCodingPolicy`\n * widens every task to the workspace it runs in (#1268), so what keeps a catalogue task off the\n * backend and the website that read the catalogue is its objective and its skill, not this list.\n */\n return policy([BILLING_CATALOG_FILE, 'specifications/src/engine/products/']);\n case BuildPlanTaskTargetKind.APPLICATION_ROLES:\n /*\n * The role table, the SaaS config whose organization types offer a role (`availableOrgRoles`), the\n * role specifications, and the modules whose operation `roles` the declared roles narrow — a role\n * that no operation names changes nothing, so binding it is this task's work (#2490). Naming the\n * modules is what makes the shared-lib checks follow those edits; writing is already permitted\n * by the workspace widening.\n */\n return policy([APPLICATION_ROLES_FILE, 'wildo.saas.config.ts', 'specifications/src/engine/roles/', 'shared-lib/src/modules/']);\n case BuildPlanTaskTargetKind.ORGANIZATION_MODEL:\n /*\n * The application's configuration (organization types, relationship kinds), the backend's startup configuration\n * (row confinements), and the modules' shared library (#3035, #3036): narrowing is ADDITIVE, so a confined\n * resource's reads must be gated above the default member role or the confinement confines nobody, and that gate\n * is in the resource's configuration. Naming the modules is what makes the shared-lib checks follow those edits.\n * And the backend's configuration, where renaming the owner's user type to the plan's name is written (#3044).\n */\n return policy([APPLICATION_SAAS_CONFIG_FILE, BACKEND_STARTUP_CONFIGURATION_FILE, BACKEND_CONFIGURATION_FILE, 'shared-lib/src/modules/']);\n default: {\n const unhandled: never = target;\n throw new Error(`Unhandled build-plan task target ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * A target's write scope, with the checks DERIVED from it (#1540). A target states what it writes and\n * nothing else; which checks that obliges is {@link deriveRequiredCheckRefs}'s answer, never a list here.\n */\nfunction policy(\n allowedPathPrefixes: readonly string[],\n options: { readonly prohibitedPathPrefixes?: readonly string[]; readonly nonTypeScriptPackages?: readonly string[] } = {},\n): ApplicationBuildTaskCodingPolicy {\n return {\n allowedPathPrefixes,\n prohibitedPathPrefixes: options.prohibitedPathPrefixes ?? [...PROHIBITED_TO_EVERY_RUN],\n requiredCheckRefs: deriveRequiredCheckRefs(allowedPathPrefixes, options.nonTypeScriptPackages),\n };\n}\n\n/**\n * The PROBES that prove this task landed — one per artifact it declares in `produces`.\n *\n * **Landing is answered from `produces`, never from `target`, and the distinction is the whole\n * point.** `target` is a WRITE SCOPE: the host turns it into path prefixes a run may mutate, and\n * several tasks legitimately share one. Answering \"did this task land?\" from it asks the wrong\n * question — and for the shapes this repository actually ships, gets the wrong answer.\n *\n * Measured on Wonder CRM 2026-09-10 (#597), against the previous version of this function, which\n * resolved a task to a module DIRECTORY:\n *\n * - `wildo compose` commits those directories on day one, so a task landed before it existed;\n * - every task in that plan ENRICHES a scaffold file rather than creating one, so file presence\n * answers nothing;\n * - a directory is shared, so two tasks were indistinguishable — `build-task-pipeline-view` and\n * `build-task-deal-follow-through-operation` carry BYTE-IDENTICAL targets.\n *\n * The result was 40 of 42 tasks reported landed while no coding task had ever run: `dispatch-next`\n * skipped every one of them, and the phase-advance gate read a build that was all but complete.\n *\n * Git remains the accepted state (`.claude/rules/one-source-of-truth.md`, Rule 2): every probe is\n * answered against COMMITTED bytes, so it survives a restart, a fresh clone and a branch switch, and\n * two branches carrying different answers merge.\n */\nexport enum BuildPlanTaskLandedProbeKind {\n /** The file exists, is tracked, and HEAD/index/worktree agree. Sound only where the SCAFFOLD does not write it. */\n COMMITTED_FILE = 'COMMITTED_FILE',\n /**\n * The committed file DECLARES each named symbol.\n *\n * The shape an ENRICHMENT product needs: `deal.schemas.ts` exists from day one carrying the\n * scaffold's self-described STARTER shape, so only the fields distinguish a task that ran from one\n * that did not.\n */\n COMMITTED_FILE_DECLARES = 'COMMITTED_FILE_DECLARES',\n /** Any one of several candidate files declares each named symbol — a product whose home is not a single known path. */\n ANY_COMMITTED_FILE_DECLARES = 'ANY_COMMITTED_FILE_DECLARES',\n /**\n * Every locale with a COMMITTED pack or section fragment carries a key under `keyPrefix` in one of the two, and at\n * least one is committed (#2216) — a website section's words, in each locale. `paths[i]` is a locale's pack\n * (`websiteLabelPackPath`: `website/src/i18n/<segment>.json`) and `fragmentPaths[i]` the SAME locale's file of this\n * section's own (`websiteSectionLabelFragmentPath`: `website/src/i18n/<segment>/<page>.<sectionRef>.json`), which the\n * website's pack loader merges into the pack. Total over the language vocabulary, so no locale is guessed and a\n * locale the application does not have is simply not committed. Every committed locale, because the website build\n * refuses a locale missing a key its sections read.\n *\n * A section WRITES only its fragments (#3204): with every section editing every locale pack, 64 sections of one plan\n * could not run beside each other, which serialized the build. The pack still counts, so words already there land.\n */\n COMMITTED_LABEL_PACKS_DECLARE = 'COMMITTED_LABEL_PACKS_DECLARE',\n /**\n * The committed labelling-pipeline file at `path` declares every one of `keys`, each a full dotted key with a\n * non-empty string value (#2504) — the pipeline's own completeness bar, so this lands exactly when a labels run\n * would generate nothing more. A key is matched EXACTLY, by parsing the file the way the pipeline writes it (one nested\n * object, a key segment per dot), never by a text prefix: the frontend-derived root units nest under a category\n * (`composite_views.app.<view>.title`, `settings_hub.sections.<ref>.label`), so a prefix probe on the segment after\n * the bucket matched the CATEGORY (`app`, `sections`) and landed once any one entry existed. A file that does not\n * parse declares nothing.\n */\n COMMITTED_LABEL_FILE_DECLARES_KEYS = 'COMMITTED_LABEL_FILE_DECLARES_KEYS',\n /**\n * The RESOLVED shell surface carries what the placement plan decided for it (#1538): every subject\n * the plan PLACED on that surface is present by identity, no subject the plan DECLINED is, and every\n * file that contributes the surface is identical to HEAD.\n *\n * Why none of the file-shaped kinds above can do this, measured on the #1273 run: a shell placement\n * task's declared products are placement-plan refs the tree never spells (a sidebar section is\n * `ref: 'main'`, a command is a resource type plus an operation), so a text probe could only ever\n * answer \"no\"; and a COUNT of what a surface carries cannot help either, because the skeleton already\n * ships a billing command in the palette and a full settings rail (and, until #2331 moved Settings to the\n * user menu, a settings launcher in the sidebar).\n * Only the entry's IDENTITY separates a scaffold default from a placement — and it lives in the\n * resolved configuration, which the `app-shell-placement-content` introspection behavior reads.\n *\n * DECLINED is half the question, not a detail: the settings placement's real work in that run was\n * mostly REMOVING 25 engine destinations the scaffold's rail shows and the plan declined.\n */\n SHELL_SURFACE_CARRIES_PLAN = 'SHELL_SURFACE_CARRIES_PLAN',\n /**\n * At least one surface carries at least one subject the placement plan PLACED there, from files\n * identical to HEAD — the whole shell's landing, for the task that composes the shell frame rather\n * than one surface. It is Paul's rule, 2026-09-23: an application needs at least one shell surface,\n * never all of them, so \"every surface\" would be the wrong question.\n */\n SHELL_CARRIES_A_PLACEMENT = 'SHELL_CARRIES_A_PLACEMENT',\n /**\n * The application's backend REGISTERS the agent-work product (#2966) in the task's module — an agent under\n * `flowsActors.agents` or `autonomousAgents`, a function tool whose approval gate the engine resolves to the planned\n * route and role, a resource declared as the unit of work, an operation recording usage of the planned metered product\n * counted as planned (#2305 S5), a resource bound to the planned retention class (#2305 S6) — and the files that\n * REGISTER it are identical to HEAD. A row confinement (#3036) is read from the initialization declaration the backend\n * assembles, and a system-of-record binding (#3039) from the resource's configuration, whose instance the application's\n * configuration must also declare. A role conferred through a relationship (#2305 S6), an organization type and a\n * relationship kind (#3035) are judged from the application's CONFIGURATION alone: `wildo.saas.config.ts`, read fresh,\n * must declare them (and, for a conferred role, every granting type must offer it).\n *\n * Read through introspection (`agent-work-declarations`) because none of these is a name the tree spells in one place:\n * an agent's ref and a gate's role are written through constants in another file (Wonder Ledger keeps every ref in\n * `month-end-close-agents.refs.ts`), and a gate is a property of a tool object.\n *\n * What it guarantees, and no more: the BUILT backend registers the product, and the registration chain the shape\n * skills teach is committed — the module's backend index, its `addons/flows-actors/index.ts`, and every file that index\n * imports. It does not prove the built `dist` is current (a stale build answers about the code it was built from), and\n * it does not follow a definition registered from outside that chain (a service, an operation file, an inbound\n * handler); such a product is still read from the registry, and its own file's commit is the task's to make. Imports\n * are followed ONE level: a tool file reached only through an agent file the index imports is not required committed.\n * And the gate is resolved by the companion's copy of the engine, without the deadline checks that need the\n * application's configuration (`reviewCalendar`).\n */\n AGENT_WORK_REGISTERED = 'AGENT_WORK_REGISTERED',\n}\n\n/**\n * The agent-work products (#2966): proven from the registry the backend registers, never from the tree's text — except a\n * relationship role (#2305 S6), proven from the application's configuration; {@link RegisteredAgentWorkProduct} is the\n * backend-proven rest.\n */\nexport type AgentWorkProduct = Extract<BuildPlanTaskProduct, {\n readonly kind:\n | BuildPlanTaskProductKind.APPLICATION_AGENT\n | BuildPlanTaskProductKind.AGENT_APPROVAL_GATE\n | BuildPlanTaskProductKind.WORK_UNIT_RESOURCE\n | BuildPlanTaskProductKind.METERED_USAGE_RECORDING\n | BuildPlanTaskProductKind.RESOURCE_RETENTION_BINDING\n | BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE\n | BuildPlanTaskProductKind.ORGANIZATION_TYPE\n | BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND\n | BuildPlanTaskProductKind.ORGANIZATION_UNIT_CONFINEMENT\n | BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING;\n}>;\n\n/**\n * What of one agent-work product the task's module does not register as planned (#2966): empty when it is there as\n * planned. Pure, so a landing decision and its explanation are the same function. Typed shortfalls, never sentences, so\n * every surface words them from the i18n tree.\n *\n * A gate lands only on the planned route AND role: a tool gated on the wrong role is the case the issue exists for — an\n * approval that reaches someone the plan did not authorize — and a gate the engine refuses at startup never lands.\n */\nexport function findAgentWorkShortfalls(product: RegisteredAgentWorkProduct, moduleRef: string, declarations: AgentWorkDeclarations): readonly AgentWorkShortfall[] {\n const registered = declarations.modules.find((module) => module.moduleId === moduleRef);\n const shortfall = (kind: AgentWorkShortfallKind, ref: string, planned: string | null = null, actual: string | null = null): AgentWorkShortfall[] => [\n { kind, ref, planned, registered: actual },\n ];\n switch (product.kind) {\n case BuildPlanTaskProductKind.APPLICATION_AGENT: {\n const autonomous = product.shape === BuildPlanAgentShape.AUTONOMOUS;\n const refs = (autonomous ? registered?.autonomousAgentRefs : registered?.agentRefs) ?? [];\n if (refs.includes(product.agentRef)) return [];\n return shortfall(autonomous ? AgentWorkShortfallKind.AUTONOMOUS_AGENT_NOT_REGISTERED : AgentWorkShortfallKind.AGENT_NOT_REGISTERED, product.agentRef);\n }\n case BuildPlanTaskProductKind.AGENT_APPROVAL_GATE: {\n const tool = registered?.tools.find((candidate) => candidate.functionRef === product.functionRef);\n if (tool === undefined) return shortfall(AgentWorkShortfallKind.TOOL_NOT_REGISTERED, product.functionRef);\n if (tool.refusal !== null) return shortfall(AgentWorkShortfallKind.GATE_REFUSED, product.functionRef, null, tool.refusal);\n if (tool.route === null) return shortfall(AgentWorkShortfallKind.TOOL_NOT_GATED, product.functionRef, product.route);\n if (tool.route !== product.route) return shortfall(AgentWorkShortfallKind.GATE_ROUTE_DIFFERS, product.functionRef, product.route, tool.route);\n const plannedRole = product.eligibleRole ?? null;\n if (tool.eligibleRole !== plannedRole) return shortfall(AgentWorkShortfallKind.GATE_ROLE_DIFFERS, product.functionRef, plannedRole, tool.eligibleRole);\n // #2967: the qualifications too, as sets. A gate built without the qualification the plan required has not landed.\n const plannedKinds = [...(product.requiredQualificationKinds ?? [])].sort().join(',');\n const registeredKinds = [...(tool.requiredQualificationKinds ?? [])].sort().join(',');\n if (plannedKinds !== registeredKinds) {\n return shortfall(AgentWorkShortfallKind.GATE_QUALIFICATIONS_DIFFER, product.functionRef, plannedKinds || null, registeredKinds || null);\n }\n return [];\n }\n case BuildPlanTaskProductKind.WORK_UNIT_RESOURCE: {\n // The plan names a resource by its slug (`adjustment-proposals`); the registry keys it by its type (`adjustmentProposals`).\n const spellings = new Set(resourceRefSpellings(product.resourceRef));\n return declarations.workUnitResourceTypes.some((resourceType) => spellings.has(resourceType))\n ? []\n : shortfall(AgentWorkShortfallKind.NOT_A_WORK_UNIT, product.resourceRef);\n }\n case BuildPlanTaskProductKind.METERED_USAGE_RECORDING: {\n // #2305 S5: the planned operation of the planned resource records the planned product, counted as planned.\n const resourceSpellings = new Set(resourceRefSpellings(product.resourceRef));\n const operationSpellings = new Set(refSpellings(product.operationRef));\n const recording = declarations.meteredUsageRecordings.find((candidate) => resourceSpellings.has(candidate.resourceType)\n && operationSpellings.has(candidate.operationIdentifier)\n && candidate.productKey === product.productKey);\n const operationRef = `${product.resourceRef}.${product.operationRef}`;\n if (recording === undefined) return shortfall(AgentWorkShortfallKind.USAGE_NOT_RECORDED, operationRef, product.productKey);\n if (recording.oncePerRecord !== product.oncePerRecord) {\n return shortfall(AgentWorkShortfallKind.USAGE_COUNTED_DIFFERENTLY, operationRef, String(product.oncePerRecord), String(recording.oncePerRecord));\n }\n return [];\n }\n case BuildPlanTaskProductKind.ORGANIZATION_UNIT_CONFINEMENT: {\n // #3036: application-wide, keyed by resource type. The mode first, then the field it reads.\n const spellings = new Set(resourceRefSpellings(product.resourceRef));\n const confinement = declarations.rowConfinements.find((candidate) => spellings.has(candidate.resourceType) && candidate.mode === product.mode);\n if (confinement === undefined) return shortfall(AgentWorkShortfallKind.ROWS_NOT_CONFINED, product.resourceRef, product.mode);\n if (confinement.fieldName !== product.fieldName) {\n return shortfall(AgentWorkShortfallKind.CONFINEMENT_FIELD_DIFFERS, product.resourceRef, product.fieldName, confinement.fieldName);\n }\n return [];\n }\n case BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING: {\n // #3039: the planned instance, then the planned lane. That the instance is DECLARED, of the planned vendor, is the\n // configuration's to say (`findSystemOfRecordDeclarationShortfalls`).\n const spellings = new Set(resourceRefSpellings(product.resourceRef));\n const bindings = declarations.systemOfRecordBindings.filter((candidate) => spellings.has(candidate.resourceType));\n if (bindings.length === 0) return shortfall(AgentWorkShortfallKind.NOT_BOUND_TO_SYSTEM_OF_RECORD, product.resourceRef, product.systemOfRecordRef);\n const onInstance = bindings.filter((candidate) => candidate.systemOfRecordRef === product.systemOfRecordRef);\n if (onInstance.length === 0) {\n return shortfall(AgentWorkShortfallKind.SYSTEM_OF_RECORD_DIFFERS, product.resourceRef, product.systemOfRecordRef, [...new Set(bindings.map((binding) => binding.systemOfRecordRef))].join(','));\n }\n const onLane = onInstance.filter((binding) => binding.access === product.access);\n if (onLane.length === 0) {\n return shortfall(AgentWorkShortfallKind.SYSTEM_OF_RECORD_ACCESS_DIFFERS, product.resourceRef, product.access, onInstance.map((binding) => binding.access).join(','));\n }\n /*\n * #3045: a COPY of a partitioned instance stamps each row's partition on its pipeline, and a copy of an unpartitioned\n * one does not; the backend refuses either mismatch at startup. Whether the instance IS partitioned is the\n * configuration's to say (`findSystemOfRecordDeclarationShortfalls`); here the plan's split is compared with the\n * pipeline. A read-through binding declares nothing: the engine confines it on its own field.\n */\n if (product.partitioned !== undefined && product.access === SystemOfRecordAccess.OWNED_COPY\n && !onLane.some((binding) => (binding.stampsPartition === true) === product.partitioned)) {\n return shortfall(AgentWorkShortfallKind.SYSTEM_OF_RECORD_COPY_PARTITION_STAMP_DIFFERS, product.resourceRef, String(product.partitioned), String(!product.partitioned));\n }\n return [];\n }\n case BuildPlanTaskProductKind.RESOURCE_RETENTION_BINDING: {\n // #2305 S6: application-wide, like a work unit; the plan's slug against the registry's resource type.\n const spellings = new Set(resourceRefSpellings(product.resourceRef));\n const binding = declarations.retentionBindings.find((candidate) => spellings.has(candidate.resourceType));\n if (binding === undefined) return shortfall(AgentWorkShortfallKind.NOT_RETENTION_BOUND, product.resourceRef, product.retentionClass);\n if (binding.retentionClass !== product.retentionClass) {\n return shortfall(AgentWorkShortfallKind.RETENTION_CLASS_DIFFERS, product.resourceRef, product.retentionClass, binding.retentionClass);\n }\n return [];\n }\n default: {\n const unhandled: never = product;\n throw new Error(`Unhandled agent-work product ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * The files a module's `addons/flows-actors/index.ts` imports from its own directory (#2966): the agent, tool and refs\n * files that reach startup through it, and therefore the ones a landed agent or gate needs committed. Read from the\n * index's text with comments blanked; a specifier's `.js` / `.ts` extension is replaced by `.ts`, as the backend's\n * NodeNext imports write it. Only `./` imports: a file outside the directory is not part of this chain.\n */\nexport function flowsActorsIndexImportedFiles(indexPath: string, indexText: string): readonly string[] {\n const directory = indexPath.slice(0, indexPath.lastIndexOf('/') + 1);\n const code = blankSourceComments(indexText);\n const files = new Set<string>();\n for (const match of code.matchAll(/(?:from|import)\\s*['\"](\\.\\/[^'\"]+)['\"]/gu)) {\n const specifier = match[1]!.slice(2).replace(/\\.(?:[cm]?[jt]s)$/u, '');\n files.add(`${directory}${specifier}.ts`);\n }\n return [...files].sort();\n}\n\n/**\n * The products judged from the application's CONFIGURATION alone, never from the backend: a conferred role (#2305 S6), an\n * organization type and a relationship kind (#3035). All three are keys of `wildo.saas.config.ts`, which the backend\n * process does not hold.\n */\nexport type ConfigurationProvenProduct = Extract<AgentWorkProduct, {\n readonly kind: BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE | BuildPlanTaskProductKind.ORGANIZATION_TYPE | BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND;\n}>;\n\n/** Is this product judged from the configuration alone? The one test the dispatch branches on. */\nexport function isConfigurationProvenProduct(product: AgentWorkProduct): product is ConfigurationProvenProduct {\n return product.kind === BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE\n || product.kind === BuildPlanTaskProductKind.ORGANIZATION_TYPE\n || product.kind === BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND;\n}\n\n/** The agent-work products read from what the BACKEND registers; the configuration-proven ones are read from the configuration. */\nexport type RegisteredAgentWorkProduct = Exclude<AgentWorkProduct, ConfigurationProvenProduct>;\n\n/** One organization type as the configuration declares it, read for an `ORGANIZATION_TYPE` product (#3035). */\nexport interface ConfiguredOrganizationType {\n /** Its key in `organizationTypes`. */\n readonly organizationTypeRef: string;\n readonly ownsApplication: boolean;\n readonly userTypes: readonly string[];\n /** `availableOrgRoles` as declared, or `null` when the type takes the engine's default offer. */\n readonly availableOrgRoles: readonly string[] | null;\n /** `authOverrides.mfaPolicy.requireMFA`. */\n readonly requiresMfa: boolean;\n}\n\n/**\n * What the application's configuration declares that a landing probe asks about: its organization types (#3035), its\n * relationship kinds with what they confer (#2305 S6), and its system-of-record instances (#3039). Read from\n * `wildo.saas.config.ts` by {@link applicationConfigurationDeclarationsOf}.\n */\nexport interface ApplicationConfigurationDeclarations {\n /** Each `organizationTypes` entry, with what an `ORGANIZATION_TYPE` product compares (#3035). */\n readonly organizationTypes: readonly ConfiguredOrganizationType[];\n readonly relationshipConferrals: readonly RelationshipConferralDeclaration[];\n /**\n * Each `systemsOfRecord` instance: its key, the `vendor` whose facet it uses, whether it is `partition`ed (#3045), and\n * whether that vendor's facet declares a partition the engine can confine on (`partitionSupported`): `undefined` when the\n * facet library could not be read, which is not the same as \"it cannot\".\n */\n readonly systemsOfRecord: readonly {\n readonly systemOfRecordRef: string;\n readonly vendor: string | null;\n readonly partitioned: boolean;\n readonly partitionSupported?: boolean | undefined;\n }[];\n}\n\n/**\n * The application's configuration as the configuration-proven probes need it: read from `wildo.saas.config.ts`, fresh,\n * once per landing resolution and only when such a probe asks. Three-valued like the registry witness: a configuration\n * that could not be loaded carries its reason and lands nothing, never \"nothing is declared\".\n */\nexport type ApplicationConfigurationWitness =\n | { readonly answered: false; readonly reason: string }\n | { readonly answered: true; readonly configuration: ApplicationConfigurationDeclarations };\n\n/**\n * The configuration a resource-level product is read from, when the backend could not materialize it (#2305 review): a\n * work unit, a metered recording and a retention binding are all read off the resource's materialized configuration, so\n * for an unreadable one the probe cannot answer, and so is a system-of-record binding (#3039). `undefined` for an agent, a\n * gate, a confinement or a configuration-proven product, and for a resource that was read.\n */\nexport function unreadableResourceConfigurationFor(product: AgentWorkProduct, declarations: AgentWorkDeclarations): UnreadableResourceConfiguration | undefined {\n if (product.kind !== BuildPlanTaskProductKind.WORK_UNIT_RESOURCE && product.kind !== BuildPlanTaskProductKind.METERED_USAGE_RECORDING\n && product.kind !== BuildPlanTaskProductKind.RESOURCE_RETENTION_BINDING && product.kind !== BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING) return undefined;\n const spellings = new Set(resourceRefSpellings(product.resourceRef));\n return declarations.unreadableResourceConfigurations.find((unreadable) => spellings.has(unreadable.resourceType));\n}\n\n/**\n * What of one conferred role the application's configuration does not declare as planned (#2305 S6). Pure, over a\n * configuration that WAS read: one that could not be loaded is the caller's to report as unanswerable (#2305 review),\n * never a shortfall, since it says nothing about what the application declares.\n *\n * Note what \"conferred\" means here: the role is in the relationship kind's CEILING (`confers.roles`); each client still\n * grants it, or not, on its own relationship. And `ROLE_NOT_OFFERED_BY_GRANTING_TYPE` is a defensive check: the\n * configuration's own validation (`defineSaasConfig`) refuses a conferred role a granting type does not offer, so in\n * practice that mistake arrives as an unread configuration whose reason names it.\n */\nexport function findRelationshipConferredRoleShortfalls(\n product: Extract<AgentWorkProduct, { readonly kind: BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE }>,\n relationshipConferrals: readonly RelationshipConferralDeclaration[],\n): readonly AgentWorkShortfall[] {\n const shortfall = (kind: AgentWorkShortfallKind, planned: string | null = null, actual: string | null = null): AgentWorkShortfall[] => [\n { kind, ref: product.relationshipRef, planned, registered: actual },\n ];\n const kind = relationshipConferrals.find((candidate) => candidate.relationshipRef === product.relationshipRef);\n if (kind === undefined) return shortfall(AgentWorkShortfallKind.RELATIONSHIP_NOT_DECLARED);\n if (!kind.conferredRoles.includes(product.roleRef)) return shortfall(AgentWorkShortfallKind.ROLE_NOT_CONFERRED, product.roleRef, kind.conferredRoles.join(',') || null);\n const notOffering = kind.grantingTypes.filter((type) => !type.offeredConferredRoles.includes(product.roleRef)).map((type) => type.organizationType);\n return notOffering.length > 0 ? shortfall(AgentWorkShortfallKind.ROLE_NOT_OFFERED_BY_GRANTING_TYPE, product.roleRef, notOffering.join(',')) : [];\n}\n\n/**\n * What of one configuration-proven product the application's configuration does not declare (#2305 S6, #3035). Pure,\n * over a configuration that WAS read, like {@link findRelationshipConferredRoleShortfalls}. An organization type is\n * compared with what the plan decided of it ({@link findOrganizationTypeShortfalls}); a relationship kind lands on its\n * KEY: the configuration's own validation (`defineSaasConfig`, the relationship-kind checks) refuses an ill-formed\n * declaration, so one that is wrong arrives as an unread configuration naming why.\n */\nexport function findConfigurationShortfalls(product: ConfigurationProvenProduct, configuration: ApplicationConfigurationDeclarations): readonly AgentWorkShortfall[] {\n switch (product.kind) {\n case BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE:\n return findRelationshipConferredRoleShortfalls(product, configuration.relationshipConferrals);\n case BuildPlanTaskProductKind.ORGANIZATION_TYPE:\n return findOrganizationTypeShortfalls(product, configuration.organizationTypes);\n case BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND:\n return configuration.relationshipConferrals.some((kind) => kind.relationshipRef === product.relationshipRef)\n ? []\n : [{ kind: AgentWorkShortfallKind.RELATIONSHIP_NOT_DECLARED, ref: product.relationshipRef, planned: null, registered: null }];\n default: {\n const unhandled: never = product;\n throw new Error(`Unhandled configuration-proven product ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * What of one planned organization type the configuration does not declare (#3035, #3044).\n *\n * The OWNER type is found by `ownsApplication`, never by its key: the platform created the operator's organization under\n * the scaffold's key before the build ran, so a plan calling it `group` describes the configuration's `workspace`. Its\n * task RENAMES that type, and the owner's user types, to the plan's names through a declared rename (`renamedFrom`, which\n * re-types the seeded organization and the first administrator at the next start), so the owner lands only under the\n * plan's key and granting no user type of its own the plan does not name: a scaffold `member` left beside the plan's\n * `employee` is a key nobody renamed, held by the first administrator. A user type another type grants too is shared and\n * may stay. A non-owner type is found by its key. Then the type must offer every\n * planned role (read with the engine's `isOrganizationRoleOfferedByType`, default offer included), grant every planned\n * user type, and require a second factor exactly when the plan says. The joining posture is not compared: the\n * application line sets it, and a rename carries it along.\n */\nexport function findOrganizationTypeShortfalls(\n product: Extract<AgentWorkProduct, { readonly kind: BuildPlanTaskProductKind.ORGANIZATION_TYPE }>,\n organizationTypes: readonly ConfiguredOrganizationType[],\n): readonly AgentWorkShortfall[] {\n const owner = product.ownsApplication === true;\n const type = owner\n ? organizationTypes.find((candidate) => candidate.ownsApplication)\n : organizationTypes.find((candidate) => candidate.organizationTypeRef === product.organizationTypeRef);\n if (type === undefined) {\n return [{ kind: owner ? AgentWorkShortfallKind.APPLICATION_OWNER_TYPE_NOT_DECLARED : AgentWorkShortfallKind.ORGANIZATION_TYPE_NOT_DECLARED, ref: product.organizationTypeRef, planned: null, registered: null }];\n }\n const ref = type.organizationTypeRef;\n const offering = { [ref]: { availableOrgRoles: type.availableOrgRoles ?? undefined } };\n const notOffered = (product.offeredRoles ?? []).filter((role) => !isOrganizationRoleOfferedByType(offering, ref, role));\n const notGranted = (product.userTypes ?? []).filter((userType) => !type.userTypes.includes(userType));\n /*\n * An owner user type the plan does not name is a scaffold key nobody renamed (`member` beside the plan's `employee`),\n * unless another organization type grants it too: then it is shared (a service firm's clients hold `member` as well), a\n * rename would split it, which a declared rename refuses, and the plan's type is added beside it instead.\n */\n const sharedUserTypes = new Set(organizationTypes.filter((candidate) => candidate !== type).flatMap((candidate) => candidate.userTypes));\n const notPlanned = owner && product.userTypes !== undefined\n ? type.userTypes.filter((userType) => !product.userTypes!.includes(userType) && !sharedUserTypes.has(userType))\n : [];\n return [\n ...(owner && ref !== product.organizationTypeRef\n ? [{ kind: AgentWorkShortfallKind.APPLICATION_OWNER_TYPE_KEY_DIFFERS, ref, planned: product.organizationTypeRef, registered: ref }]\n : []),\n ...(notPlanned.length > 0 ? [{ kind: AgentWorkShortfallKind.APPLICATION_OWNER_USER_TYPES_NOT_PLANNED, ref, planned: product.userTypes!.join(',') || null, registered: notPlanned.join(',') }] : []),\n ...(notOffered.length > 0 ? [{ kind: AgentWorkShortfallKind.ORGANIZATION_TYPE_ROLES_NOT_OFFERED, ref, planned: notOffered.join(','), registered: type.availableOrgRoles?.join(',') ?? null }] : []),\n ...(notGranted.length > 0 ? [{ kind: AgentWorkShortfallKind.ORGANIZATION_TYPE_USER_TYPES_NOT_GRANTED, ref, planned: notGranted.join(','), registered: type.userTypes.join(',') || null }] : []),\n ...(product.requiresMfa !== undefined && product.requiresMfa !== type.requiresMfa\n ? [{ kind: AgentWorkShortfallKind.ORGANIZATION_TYPE_MFA_DIFFERS, ref, planned: String(product.requiresMfa), registered: String(type.requiresMfa) }]\n : []),\n ];\n}\n\n/**\n * The configuration half of a system-of-record binding (#3039): the instance the resource binds must be one the\n * application declares under `systemsOfRecord`, or the backend refuses the binding at startup, and of the vendor the\n * domain plan named, or the records come from another system than planned. Pure, over a configuration that was read.\n * The binding itself is the registry's to say ({@link findAgentWorkShortfalls}).\n */\nexport function findSystemOfRecordDeclarationShortfalls(\n product: Extract<AgentWorkProduct, { readonly kind: BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING }>,\n configuration: ApplicationConfigurationDeclarations,\n): readonly AgentWorkShortfall[] {\n const instance = configuration.systemsOfRecord.find((candidate) => candidate.systemOfRecordRef === product.systemOfRecordRef);\n if (instance === undefined) return [{ kind: AgentWorkShortfallKind.SYSTEM_OF_RECORD_NOT_DECLARED, ref: product.systemOfRecordRef, planned: null, registered: null }];\n return [\n ...(instance.vendor === product.systemOfRecordKind\n ? []\n : [{ kind: AgentWorkShortfallKind.SYSTEM_OF_RECORD_VENDOR_DIFFERS, ref: product.systemOfRecordRef, planned: product.systemOfRecordKind, registered: instance.vendor }]),\n /*\n * #3045: the instance is partitioned exactly when the plan splits its records by legal entity. A plan written before\n * the split was recorded (`partitioned` absent) compares nothing. Whether the vendor's facet CAN partition is the next\n * entry's.\n */\n ...(product.partitioned === undefined || product.partitioned === instance.partitioned\n ? []\n : [{ kind: AgentWorkShortfallKind.SYSTEM_OF_RECORD_PARTITION_DIFFERS, ref: product.systemOfRecordRef, planned: String(product.partitioned), registered: String(instance.partitioned) }]),\n /*\n * A partitioned instance of a vendor whose facet declares no partition the engine can confine on: the backend refuses\n * it at startup (`PARTITION_NOT_SUPPORTED_BY_VENDOR`, or `PARTITION_KIND_UNSUPPORTED` for a path segment), so it has\n * not landed. Reached by a plan whose split was UNCONFIRMED (no facets read when it was written). Whether the facet\n * library could be read at all is the caller's to report as unanswerable ({@link systemOfRecordPartitionUnanswerable}).\n */\n ...(product.partitioned === true && instance.partitioned && instance.partitionSupported === false\n ? [{ kind: AgentWorkShortfallKind.SYSTEM_OF_RECORD_PARTITION_NOT_SUPPORTED_BY_VENDOR, ref: product.systemOfRecordRef, planned: 'true', registered: instance.vendor }]\n : []),\n ];\n}\n\n/**\n * Why a planned partition cannot be judged, or `undefined` (#3045): a binding that partitions its instance lands only on a\n * vendor whose facet can split, and with the facet library unread that is unknown. Unanswerable, never landed: a\n * partition the backend may refuse at startup would otherwise read as done.\n */\nexport function systemOfRecordPartitionUnanswerable(\n product: Extract<AgentWorkProduct, { readonly kind: BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING }>,\n configuration: ApplicationConfigurationDeclarations,\n): string | undefined {\n if (product.partitioned !== true) return undefined;\n const instance = configuration.systemsOfRecord.find((candidate) => candidate.systemOfRecordRef === product.systemOfRecordRef);\n if (instance === undefined || !instance.partitioned || instance.partitionSupported !== undefined) return undefined;\n return `Whether vendor ${instance.vendor ?? '(none)'} can split \\`${product.systemOfRecordRef}\\`'s records by legal entity is unknown: the system-of-record facets could not be read (run \\`wildo config sync\\` so the backend declares and links @wildo-ai/systems-of-record), or the engine's resolution of the instance's facet refused it (an augmentation package it opts into is not discovered, unreadable or in conflict), which the backend also refuses at startup, naming why.`;\n}\n\n/**\n * Whether an instance's vendor can split its records (#3045), from the instance's EFFECTIVE facet as the engine's own\n * resolution gives it (`loadEffectiveSystemOfRecordFacets`, a facet augmentation the instance opted into included, #3053):\n * `systemOfRecordInstancePartitionSupport` holds, per instance key, `true` or `false`, or `undefined` when the resolution\n * refused the facet. An instance it does not list has no facet, so it cannot split. No property at all when the facets\n * were not read: that is not the same as \"it cannot\".\n */\nfunction partitionSupportOf(\n instanceKey: string,\n systemOfRecordInstancePartitionSupport: Readonly<Record<string, boolean | undefined>> | undefined,\n): { readonly partitionSupported?: boolean } {\n if (systemOfRecordInstancePartitionSupport === undefined) return {};\n const supported = Object.hasOwn(systemOfRecordInstancePartitionSupport, instanceKey) ? systemOfRecordInstancePartitionSupport[instanceKey] : false;\n return supported === undefined ? {} : { partitionSupported: supported };\n}\n\n/**\n * Everything the configuration-proven probes read from a loaded `wildo.saas.config.ts` (#3035, #3039). Pure: the keys of\n * `organizationTypes`, each `systemsOfRecord` instance with its vendor and partition flag (#3045), and the relationship kinds as\n * {@link relationshipConferralsOf} reads them. `systemOfRecordInstancePartitionSupport`, per instance and when the caller\n * could resolve the facets, says whether each instance's effective facet can split its records ({@link partitionSupportOf}).\n */\nexport function applicationConfigurationDeclarationsOf(config: Parameters<typeof relationshipConferralsOf>[0] & {\n readonly organizationTypes?: Readonly<Record<string, {\n readonly availableOrgRoles?: readonly string[];\n readonly ownsApplication?: unknown;\n readonly userTypes?: readonly string[];\n readonly authOverrides?: { readonly mfaPolicy?: { readonly requireMFA?: unknown } };\n }>>;\n readonly systemsOfRecord?: Readonly<Record<string, { readonly vendor?: unknown; readonly partition?: unknown } | undefined>>;\n}, systemOfRecordInstancePartitionSupport?: Readonly<Record<string, boolean | undefined>>): ApplicationConfigurationDeclarations {\n return {\n organizationTypes: Object.entries(config.organizationTypes ?? {}).map(([organizationTypeRef, type]) => ({\n organizationTypeRef,\n ownsApplication: type?.ownsApplication === true,\n userTypes: [...(type?.userTypes ?? [])],\n availableOrgRoles: type?.availableOrgRoles === undefined ? null : [...type.availableOrgRoles],\n requiresMfa: type?.authOverrides?.mfaPolicy?.requireMFA === true,\n })),\n relationshipConferrals: relationshipConferralsOf(config),\n systemsOfRecord: Object.entries(config.systemsOfRecord ?? {}).map(([systemOfRecordRef, instance]) => ({\n systemOfRecordRef,\n vendor: typeof instance?.vendor === 'string' ? instance.vendor : null,\n partitioned: instance?.partition === true,\n ...partitionSupportOf(systemOfRecordRef, systemOfRecordInstancePartitionSupport),\n })),\n };\n}\n\n/**\n * The relationship kinds of an application's configuration, as a conferred-role probe reads them (#2305 S6): each kind's\n * conferred roles, and the roles each organization type it grants offers, read with the engine's own rule\n * (`isOrganizationRoleOfferedByType`, which falls back to the default offer when a type declares none). Pure, over the\n * loaded `wildo.saas.config.ts`.\n */\nexport function relationshipConferralsOf(config: {\n readonly organizationRelationships?: Readonly<Record<string, { readonly granting?: { readonly organizationTypes?: Readonly<Record<string, unknown>> }; readonly confers?: { readonly roles?: readonly string[] } }>>;\n readonly organizationTypes?: Readonly<Record<string, { readonly availableOrgRoles?: readonly string[] }>>;\n}): readonly RelationshipConferralDeclaration[] {\n return Object.entries(config.organizationRelationships ?? {}).map(([relationshipRef, kind]) => {\n const conferredRoles = [...(kind.confers?.roles ?? [])];\n return {\n relationshipRef,\n conferredRoles,\n grantingTypes: Object.keys(kind.granting?.organizationTypes ?? {}).map((organizationType) => ({\n organizationType,\n offeredConferredRoles: conferredRoles.filter((role) => isOrganizationRoleOfferedByType(config.organizationTypes, organizationType, role)),\n })),\n };\n });\n}\n\n/**\n * The files a configuration file imports by RELATIVE path, `./` and `../` alike (#2305 review): the files whose content\n * a product declared in it is evaluated from. A resource's retention binding is often a constant one directory up\n * (Wonder Ledger's `month-end-close.retention.ts`), and the application's configuration imports its roles from\n * `./shared-lib/…`; such a file left uncommitted changes what the registry answers while the configuration itself is\n * identical to HEAD. Read from the text with comments blanked; a specifier's `.js` / `.ts` extension is replaced by\n * `.ts`, as NodeNext imports write it, and a path leaving the application root is ignored. The reader then requires the\n * ones that exist in its tree (a directory specifier resolves to its `index.ts`).\n */\nexport function relativeImportedFiles(importerPath: string, importerText: string): readonly string[] {\n const directory = posix.dirname(importerPath);\n const files = new Set<string>();\n for (const match of blankSourceComments(importerText).matchAll(/(?:from|import)\\s*['\"](\\.{1,2}\\/[^'\"]+)['\"]/gu)) {\n const resolved = posix.normalize(posix.join(directory, match[1]!)).replace(/\\.(?:[cm]?[jt]s)$/u, '');\n if (resolved.startsWith('../') || resolved === '..') continue;\n files.add(`${resolved}.ts`);\n }\n return [...files].sort();\n}\n\nexport type BuildPlanTaskLandedProbe =\n | { readonly kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE; readonly path: string }\n | {\n readonly kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES;\n readonly path: string;\n readonly declarations: readonly string[];\n /** Where the declarations must appear together, or that each may appear alone — see {@link ProductDeclarationSite}. */\n readonly site: ProductDeclarationSite;\n }\n | {\n readonly kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES;\n readonly paths: readonly string[];\n readonly declarations: readonly string[];\n /**\n * Which of `paths` the producing task may WRITE — never assumed to be all of them.\n *\n * Landing READS every candidate and is satisfied by ANY of them (`texts.some(...)`). That is\n * right for landing and catastrophic as a write grant: one of `APPLICATION_DOCUMENT`'s two\n * candidates is `specifications/src/document-facts/index.ts`, which belongs to\n * `refinement.document-facts` and is the artifact `refinement.compliance-document-candidate`\n * checks every clause against — \"a clause asserting a fact the application never declared is\n * refused before it becomes a file\". Handing a build coding agent that file would let it author\n * the facts it wants to cite, and, because landing is satisfied by any candidate, writing the\n * documentRef into it ALONE would mark the task landed without producing a document at all.\n *\n * Required rather than optional, so a probe added tomorrow must state the split instead of\n * inheriting the permissive answer — the shape that produced this defect in the first place.\n */\n readonly writablePaths: readonly string[];\n readonly site: ProductDeclarationSite;\n }\n | { readonly kind: BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_PACKS_DECLARE; readonly paths: readonly string[]; readonly fragmentPaths: readonly string[]; readonly keyPrefix: string }\n | { readonly kind: BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_FILE_DECLARES_KEYS; readonly path: string; readonly keys: readonly string[] }\n | { readonly kind: BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN; readonly surface: PlacementSurface }\n | { readonly kind: BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT }\n | {\n readonly kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED;\n readonly product: AgentWorkProduct;\n /**\n * The module the product must be registered in: the task's target module. A product of the whole application (a\n * relationship role, #2305 S6) carries {@link APPLICATION_WIDE_AGENT_WORK_MODULE_REF}, which no reading consults.\n */\n readonly moduleRef: string;\n /** The files that register the product, each required identical to HEAD. */\n readonly registrationFiles: readonly string[];\n /**\n * The `addons/flows-actors/index.ts` whose own `./` imports are ALSO required committed, read from the reader's own\n * text of it (`flowsActorsIndexImportedFiles`); absent for a work unit. Its imports rather than its whole directory, so\n * a sibling task's draft agent file, or a gitignored file, never holds this product back.\n */\n readonly followImportsOf?: string;\n /**\n * A configuration file whose RELATIVE imports (`./` and `../`, {@link relativeImportedFiles}) are also required\n * committed (#2305 review): the resource configuration of a work unit, a usage recording or a retention binding, and\n * `wildo.saas.config.ts` for a conferred role. The value the registry or the configuration answers is evaluated from\n * those files too, so an uncommitted one would otherwise land a product HEAD does not carry.\n */\n readonly followRelativeImportsOf?: string;\n };\n\n/** A task whose product names a module the plan never places it in — a plan-authoring fault, surfaced rather than guessed past. */\nexport class ApplicationBuildTaskProductNotPlaceableError extends Error {\n public constructor(public readonly taskRef: string, public readonly detail: string) {\n super(`Build task ${taskRef} declares a product that cannot be placed: ${detail}`);\n this.name = 'ApplicationBuildTaskProductNotPlaceableError';\n }\n}\n\n/**\n * The module a product's artifact lives under.\n *\n * A product is SEMANTIC and names no path, so the host supplies the placement — exactly as it\n * supplies the mutation scope. `target` is the right source for it: it is a write scope, which is\n * precisely the question \"which module does this task write in?\", and it is the one question a write\n * scope answers correctly.\n */\nfunction productModuleRef(task: BuildPlanTask): string {\n const target = task.target;\n switch (target.kind) {\n case BuildPlanTaskTargetKind.MODULE:\n case BuildPlanTaskTargetKind.RESOURCE_STAGE:\n case BuildPlanTaskTargetKind.RELATIONSHIP:\n case BuildPlanTaskTargetKind.MODULE_FRONTEND:\n case BuildPlanTaskTargetKind.MODULE_BACKEND:\n return target.moduleRef;\n case BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP:\n case BuildPlanTaskTargetKind.SHELL_PLACEMENT:\n case BuildPlanTaskTargetKind.APPLICATION_FRONTEND_CONFIG:\n case BuildPlanTaskTargetKind.WEBSITE:\n case BuildPlanTaskTargetKind.TECHNICAL_DOCUMENTATION:\n case BuildPlanTaskTargetKind.WORKER:\n case BuildPlanTaskTargetKind.MINION:\n case BuildPlanTaskTargetKind.PROVIDER_BINDING:\n case BuildPlanTaskTargetKind.BILLING_CATALOG:\n case BuildPlanTaskTargetKind.APPLICATION_ROLES:\n case BuildPlanTaskTargetKind.ORGANIZATION_MODEL:\n throw new ApplicationBuildTaskProductNotPlaceableError(task.taskRef, `target kind ${target.kind} names no module`);\n default: {\n const unhandled: never = target;\n throw new Error(`Unhandled build-plan task target ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * The runtime a worker product's entry file is read for — from the WORKER target, which is the only\n * place it is declared. A worker product under any other target cannot be placed: the plan would be\n * asking the host to guess between `src/index.ts` and `src/main.rs`.\n */\nfunction productWorkerRuntime(task: BuildPlanTask): BuildPlanWorkerRuntime {\n const target = task.target;\n if (target.kind !== BuildPlanTaskTargetKind.WORKER) {\n throw new ApplicationBuildTaskProductNotPlaceableError(task.taskRef, `a worker product needs a ${BuildPlanTaskTargetKind.WORKER} target to name its runtime; got ${target.kind}`);\n }\n return target.runtime;\n}\n\n/**\n * The conventional definitions file of each guidance kind, under the module's frontend — total over\n * {@link ApplicationGuidanceKind}, so a third kind must name its file or fail to compile. The\n * `guidance-onboarding-authoring` skill tells the coding agent these same two names.\n */\nconst APPLICATION_GUIDANCE_DEFINITIONS_FILE: Readonly<Record<ApplicationGuidanceKind, (moduleRef: string) => string>> = {\n [ApplicationGuidanceKind.ONBOARDING_DOCUMENT]: (moduleRef) => `frontend/src/modules/${moduleRef}/app-level-views/onboarding-views.definitions.ts`,\n [ApplicationGuidanceKind.GUIDANCE_FLOW]: (moduleRef) => `frontend/src/modules/${moduleRef}/app-level-views/guidance-flows.definitions.ts`,\n};\n\n/**\n * The file an inbound channel handler lives in, without its extension — DERIVED from the handler's ref, never\n * chosen (#1832): `matters.mail-intake` → `inbound/matters.mail-intake.inbound-channel-handler`. A determined\n * name is what lets landing ask one question of the module index — does it import this file? — where an\n * author-chosen name would leave nothing to ask. The `inbound-channels` skill states the same rule.\n */\nexport function inboundChannelHandlerFileStem(handlerRef: string): string {\n return `${handlerRef}.inbound-channel-handler`;\n}\n\n/**\n * What the module index's import of an inbound channel handler must spell: the file stem QUALIFIED by the\n * `inbound/` directory it lives in. The directory is what makes the match exact. The stem alone would be\n * found inside another handler's longer name, because a whole-word match treats `.` as a boundary:\n * `inbound/crm.mail-intake.inbound-channel-handler` contains `mail-intake.inbound-channel-handler`, but not\n * `inbound/mail-intake.inbound-channel-handler`.\n */\nexport function inboundChannelHandlerImportTail(handlerRef: string): string {\n return `inbound/${inboundChannelHandlerFileStem(handlerRef)}`;\n}\n\n/**\n * The file a data seed lives in, without its extension — DERIVED from the seed's key, never chosen (#2234):\n * `crm:demo-customers` → `seeds/crm.demo-customers.seed`. `:` becomes `.` because a file name cannot carry `:` on\n * every platform. The `seeding-authoring` skill states the same rule, so the agent writes the file landing reads.\n */\nexport function dataSeedFileStem(seedKey: string): string {\n return `${seedKey.replaceAll(':', '.')}.seed`;\n}\n\n/**\n * The skills a task's PRODUCTS require, whatever the decomposer wrote (#1832, #1835). A task producing an inbound\n * channel handler is authored with `inbound-channels`: the skill carries the handler contract, the file-name rule\n * the landing probe depends on, and the rule that a message never authorizes a payment or an approval — so a\n * decomposer that forgot to list it must not leave the agent without it.\n */\nexport function productDerivedSkillRefs(task: BuildPlanTask): readonly string[] {\n const kinds = new Set(task.produces.map((product) => product.kind));\n return [\n ...(kinds.has(BuildPlanTaskProductKind.INBOUND_CHANNEL_HANDLER) ? [INTEGRATION_INBOUND_CHANNEL_SKILL_REF] : []),\n // #1835: the catalogue the backend sells from and the website advertises is written with its contract in hand.\n // #2305 S5: an operation recording usage is written with the metered-usage contract, from the same billing skill.\n ...(kinds.has(BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT) || kinds.has(BuildPlanTaskProductKind.METERED_USAGE_RECORDING) ? [BILLING_CATALOG_SKILL_REF] : []),\n // #2490: a role is declared with the three places it must appear in hand — table, organization type, operations.\n ...(kinds.has(BuildPlanTaskProductKind.APPLICATION_ROLE) ? [APPLICATION_ROLES_SKILL_REF] : []),\n // #2234: a seed is authored with its levels, modes, business keys and environment restriction in hand.\n ...(kinds.has(BuildPlanTaskProductKind.APPLICATION_DATA_SEED) ? [DATA_SEED_SKILL_REF] : []),\n // #2495: a generated document is authored with the template contract in hand.\n ...(kinds.has(BuildPlanTaskProductKind.PDF_TEMPLATE) ? [PDF_TEMPLATE_SKILL_REF] : []),\n // #2966: an agent with the skill of its shape, a gate with the `humanApproval` contract, and both with their declared use.\n ...task.produces.flatMap((product) => (product.kind === BuildPlanTaskProductKind.APPLICATION_AGENT ? [BUILD_PLAN_AGENT_SHAPE_SKILL_REF[product.shape]] : [])),\n ...(kinds.has(BuildPlanTaskProductKind.AGENT_APPROVAL_GATE) ? [AGENT_APPROVAL_GATE_SKILL_REF] : []),\n ...(kinds.has(BuildPlanTaskProductKind.APPLICATION_AGENT) || kinds.has(BuildPlanTaskProductKind.AGENT_APPROVAL_GATE) ? [AI_USE_DECLARATION_SKILL_REF] : []),\n ...(kinds.has(BuildPlanTaskProductKind.WORK_UNIT_RESOURCE) ? [WORK_UNIT_SKILL_REF] : []),\n // #2305 S6: a binding is written with the retention contract, a conferred role with the relationship one.\n ...(kinds.has(BuildPlanTaskProductKind.RESOURCE_RETENTION_BINDING) ? [RESOURCE_RETENTION_SKILL_REF] : []),\n ...(kinds.has(BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE) ? [ORGANIZATION_RELATIONSHIPS_SKILL_REF] : []),\n // #3040: the organization model is built with the skill that teaches each of its declarations.\n ...(kinds.has(BuildPlanTaskProductKind.ORGANIZATION_TYPE) ? [ORGANIZATION_TYPE_SKILL_REF] : []),\n ...(kinds.has(BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND) ? [ORGANIZATION_RELATIONSHIPS_SKILL_REF] : []),\n ...(kinds.has(BuildPlanTaskProductKind.ORGANIZATION_UNIT_CONFINEMENT) ? [ORGANIZATION_UNIT_CONFINEMENT_SKILL_REF] : []),\n ...(kinds.has(BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING) ? SYSTEM_OF_RECORD_BINDING_SKILL_REFS : []),\n ].filter((skillRef, index, all) => all.indexOf(skillRef) === index);\n}\n\n/** Where a resource's schema lives in the standard layout — the file a resource SCHEMA task writes (the module layout convention, #3904). */\nexport function resourceSchemaFilePath(moduleRef: string, resourceRef: string): string {\n return conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_SCHEMA, moduleRef, resourceRef);\n}\n\n/**\n * The field declarations that make a resource hold PERSONAL DATA — the same markers the engine's\n * `resolveResourcePersonalDataCategories` reads (a declared category, a credential marker, an erasure scrub, a portability\n * provenance), as the method and standalone-helper names an author writes. Derived from declarations, never from a\n * field being called `email`: that is the engine's own rule, and a guess here would route on names.\n */\nconst PERSONAL_DATA_DECLARATION_CALLS: readonly string[] = [\n // Fluent methods, and the four standalone helpers `@wildo-ai/zod-decorators` exports for schemas that have no fluent\n // form — `addDataCategories(z_phone(), …)` is the ONLY way to mark a phone number (#2495 review R1).\n 'dataCategories', 'addDataCategories',\n 'isPassword', 'isOtp', 'isWriteOnlySecret', 'addWriteOnlySecret',\n 'impersonalizeWith', 'addImpersonalizeWith',\n 'portabilityProvenance', 'addPortabilityProvenance',\n];\n\n/**\n * Does this schema source DECLARE personal data (#2495)? Read lexically, with comments blanked, because at dispatch the\n * schema is a file the previous task wrote, not a loaded module. A call, never a mention: `.dataCategories(` or\n * `addImpersonalizeWith(`.\n */\nexport function schemaSourceDeclaresPersonalData(text: string): boolean {\n const code = blankSourceComments(text);\n return PERSONAL_DATA_DECLARATION_CALLS.some((name) => new RegExp(`(?<![A-Za-z0-9_$])${name}\\\\s*\\\\(`, 'u').test(code));\n}\n\n/**\n * The skills a task's TARGET requires, whatever the decomposer wrote (#2495). A resource's CONFIG stage is where its\n * retention binding is declared (`retentionBinding`), and a resource holding personal data owes one: storage limitation\n * is a duty about personal data. 005 declared personal data on six resources and its workers bound none, because the\n * question was never in front of them. Routed only there: a resource with no personal data has no such duty, and\n * routing the skill everywhere had every CONFIG task of a wave editing the shared retention schedule at once.\n */\nexport function targetDerivedSkillRefs(task: BuildPlanTask, facts: { readonly targetDeclaresPersonalData: boolean }): readonly string[] {\n const isConfigStage = task.target.kind === BuildPlanTaskTargetKind.RESOURCE_STAGE && task.target.stage === BuildPlanResourceStage.CONFIG;\n return isConfigStage && facts.targetDeclaresPersonalData ? [RESOURCE_RETENTION_SKILL_REF] : [];\n}\n\nexport function resolveBuildTaskLandedProbes(task: BuildPlanTask): readonly BuildPlanTaskLandedProbe[] {\n /*\n * A generation step's landing is the generation-step service's answer, not this table's — it is\n * resolved asynchronously (planner units x enabled locales) and one step lands on a STATE rather\n * than on files. Returning nothing keeps a caller that forgets that seam fail-closed\n * (never-landed) instead of wrongly landed.\n */\n if (task.target.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP) return [];\n if (task.target.kind === BuildPlanTaskTargetKind.SHELL_PLACEMENT) {\n // The surface carries what the plan decided for it, by identity — never the plan's refs by text,\n // which the tree does not spell (#1546, #1538).\n return [{ kind: BuildPlanTaskLandedProbeKind.SHELL_SURFACE_CARRIES_PLAN, surface: task.target.surface }];\n }\n /*\n * LAZY, since #1490: a website page, a worker job or a provider binding names no module, and a\n * task carrying only such products under a module-less target must not be refused for a module it\n * never needed. Resolved once, the first time a module-relative product asks for it.\n */\n let resolvedModuleRef: string | undefined;\n const moduleRefOf = (): string => (resolvedModuleRef ??= productModuleRef(task));\n return task.produces.flatMap((product) => {\n const drafts = landedProbeDraft(task, product, moduleRefOf);\n return (Array.isArray(drafts) ? drafts : [drafts]).map((draft) => withDeclarationSite(product, draft));\n }).filter((probe): probe is BuildPlanTaskLandedProbe => probe !== undefined);\n}\n\n/**\n * Where each LAYER registers an application module, as the `add-module` scenario writes it (#3701) — one entry per layer,\n * and a module is registered only when every layer carries it:\n *\n * - **shared**: `shared-lib/src/modules-registry.shared.ts` imports `./modules/<id>` (or the modules barrel exports it);\n * - **frontend**: `frontend/src/modules/index.ts` imports `./<id>` into `applicationFrontendModules` (or the registry names it);\n * - **backend**: the modules barrel DISCOVERS `backend-api/src/modules/<id>/index.ts` by scanning (`scanSubdirDefaultExports`),\n * and that descriptor names `moduleId: '<id>'`; an application that registers by hand names it in the registry or barrel.\n *\n * Every path is in {@link MODULE_REGISTRY_FILES} or under the module's own backend directory, which a MODULE target allows.\n */\nexport const MODULE_REGISTRY_LAYER_PATHS: Readonly<Record<'shared' | 'frontend' | 'backend', (moduleRef: string) => readonly string[]>> = {\n shared: () => ['shared-lib/src/modules-registry.shared.ts', 'shared-lib/src/modules/index.ts'],\n frontend: () => ['frontend/src/modules/index.ts', 'frontend/src/modules-registry.frontend.ts'],\n backend: (moduleRef) => [`backend-api/src/modules/${moduleRef}/index.ts`, 'backend-api/src/modules-registry.backend.ts', 'backend-api/src/modules/index.ts'],\n};\n\n/** One probe per layer: the module is declared in one of that layer's registration homes (#3701). All must hold. */\nfunction moduleRegistryMembershipProbes(moduleRef: string): readonly BuildPlanTaskLandedProbeDraft[] {\n return Object.values(MODULE_REGISTRY_LAYER_PATHS).map((pathsOf) => ({\n kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES,\n paths: pathsOf(moduleRef),\n writablePaths: pathsOf(moduleRef),\n declarations: [moduleRef],\n }) as const);\n}\n\n/** A probe as a product's case builds it — before its declaration site is attached from the one table. */\ntype WithoutSite<T> = T extends { readonly site: ProductDeclarationSite } ? Omit<T, 'site'> : T;\ntype BuildPlanTaskLandedProbeDraft = WithoutSite<BuildPlanTaskLandedProbe>;\n\n/**\n * Attach the product's declaration site to a probe that asks about declarations (#1539). Done HERE,\n * once, rather than in each case, so no case can state a site that disagrees with\n * {@link productDeclarationSite} — the table is the only answer.\n */\nfunction withDeclarationSite(\n product: BuildPlanTask['produces'][number],\n draft: BuildPlanTaskLandedProbeDraft | undefined,\n): BuildPlanTaskLandedProbe | undefined {\n if (draft === undefined) return undefined;\n switch (draft.kind) {\n case BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES:\n case BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES:\n return { ...draft, site: productDeclarationSite(product) };\n default:\n return draft;\n }\n}\n\n/**\n * A product's landing draft — or several, when the product is real only once it exists in more than one place (a\n * website section: defined in its page's list AND worded for every committed locale, in that locale's pack or in the\n * section's own file, #2216, #3204). Every one must hold.\n */\nfunction landedProbeDraft(\n task: BuildPlanTask,\n product: BuildPlanTask['produces'][number],\n moduleRefOf: () => string,\n): BuildPlanTaskLandedProbeDraft | readonly BuildPlanTaskLandedProbeDraft[] | undefined {\n switch (product.kind) {\n case BuildPlanTaskProductKind.APPLICATION_FRONTEND_CONFIG:\n // The SHELL frame is witnessed by identity, like its placements: its declarations are\n // experience-plan refs that land as sidebar sections, commands and dropdown entries, never as\n // those strings (#1538). The other config surfaces still have a file the refs are spelled in.\n if (product.configSurface === FrontendConfigSurface.APP_SHELL) {\n return { kind: BuildPlanTaskLandedProbeKind.SHELL_CARRIES_A_PLACEMENT } as const;\n }\n // The declarations, in the one file the surface names — a config file is scaffolded, its entries are not.\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: FRONTEND_CONFIG_FILE[product.configSurface],\n declarations: product.declarationRefs,\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_CUSTOM_VIEW:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_UI_BEHAVIOR, moduleRefOf(), product.resourceRef),\n // The COMPONENT the binding names, not the plan's ref — which the tree never spells.\n declarations: [resourceCustomViewIdentity(product.viewRef)],\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_COMPOSITE_VIEW:\n /*\n * The ui-behavior is where a resource BINDS its views (`compositeViews`, a custom operation's\n * view, an execution view), so it is the one file that proves the view is wired rather than\n * merely written. The component file's name is the author's (`TaskWorkspaceCompositeView.tsx`)\n * and cannot be derived from the ref, which is why the probe does not look for it.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_UI_BEHAVIOR, moduleRefOf(), product.resourceRef),\n declarations: [product.viewRef],\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_CHART_VIEW:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_UI_BEHAVIOR, moduleRefOf(), product.resourceRef),\n declarations: [product.chartRef],\n } as const;\n case BuildPlanTaskProductKind.CUSTOM_COMPONENT: {\n /*\n * Two legitimate homes: a module registers its own components on its frontend module\n * (`componentRegistrations`), and application-wide ones live in the engine registrations\n * file. Both are writable — the `MODULE_FRONTEND` target names both.\n */\n const paths = [`frontend/src/modules/${moduleRefOf()}/index.ts`, 'frontend/src/engine/component-registrations.frontend.ts'];\n return { kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES, paths, writablePaths: paths, declarations: [product.componentRef] } as const;\n }\n case BuildPlanTaskProductKind.APPLICATION_MILESTONE: {\n /*\n * The IDENTIFIER, in the module's own milestone file or where the module lists it. Both sit\n * under the module's shared-lib directory, which the `MODULE_BACKEND` target carrying this\n * product already allows. `first-deal-won` matches `FIRST_DEAL_WON` through the matcher's\n * spellings, which is how a milestone identifier is written.\n *\n * Known looseness, accepted: the matcher's right boundary admits `_`, so an already-declared\n * `FIRST_DEAL_WON_TWICE` would satisfy `first-deal-won`. Tightening it would break the suffixed\n * spellings other products rely on, and a plan naming one milestone as the prefix of another\n * is itself the thing to avoid.\n */\n const paths = [`shared-lib/src/modules/${moduleRefOf()}/milestones.ts`, `shared-lib/src/modules/${moduleRefOf()}/index.ts`];\n return {\n kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES,\n paths,\n /*\n * WRITABLE beyond what landing reads: the milestone's specification, which grounds the words\n * its labels are generated from. The `milestones-and-celebrations` skill tells the agent to\n * write it, and the `MODULE_BACKEND` scope does not reach `specifications/` — without this\n * the scope check flags an agent for following its own skill. Not a landing candidate: a\n * specification that documents a milestone nobody declared proves nothing.\n */\n writablePaths: [...paths, `specifications/src/modules/${moduleRefOf()}/milestones/`],\n declarations: [product.milestoneRef],\n } as const;\n }\n case BuildPlanTaskProductKind.APPLICATION_GUIDANCE: {\n // The REF, in the definitions file its kind names, or inline on the module that lists it.\n const paths = [APPLICATION_GUIDANCE_DEFINITIONS_FILE[product.guidanceKind](moduleRefOf()), `frontend/src/modules/${moduleRefOf()}/index.ts`];\n return { kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES, paths, writablePaths: paths, declarations: [product.guidanceRef] } as const;\n }\n case BuildPlanTaskProductKind.PDF_TEMPLATE: {\n // The BINDING, not the template file: a template that nothing binds renders nothing.\n const paths = [\n `backend-api/src/modules/${moduleRefOf()}/pdf/pdf-template-bindings.ts`,\n `backend-api/src/modules/${moduleRefOf()}/module-pdf-template-bindings.ts`,\n ];\n return { kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES, paths, writablePaths: paths, declarations: [product.templateRef] } as const;\n }\n case BuildPlanTaskProductKind.APPLICATION_WORKER:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: WORKER_ENTRY_FILE[productWorkerRuntime(task)](product.workerRef),\n declarations: product.jobRefs,\n } as const;\n case BuildPlanTaskProductKind.APPLICATION_MINION:\n /*\n * The DECLARATION, not the behaviour refs — which the tree never spells (#1273).\n *\n * `behaviorRefs` are JOBS-TO-BE-DONE refs from the requirements vocabulary, not names the\n * minion declares. Measured on the first end-to-end run:\n * `job-establish-lightweight-learning-routine` appears in `specifications/src/{requirements,\n * market,integration-plan,website-plan,build-plan}` and NOWHERE in application code. The\n * minion's entry is a runtime bootstrap (dotenv, DI setup, a `minion-init` import) and its\n * behaviour is one `onTick` handler; there is no job name anywhere for the probe to find.\n *\n * So the task ran, composed the whole package — manifest, both tsconfigs, Dockerfile,\n * `wildo.minion.config.ts`, five source files — declared it in `wildo.saas.config.ts`, and\n * recorded `working_result_recorded`, and the board still read it as not landed.\n *\n * `wildo.saas.config.ts` is what the tree DOES spell, and it is the right witness for a\n * second reason: the WORKER policy beside this one states that the config is in the task's\n * scope *\"because the worker's declaration lives there … a task that composes the package\n * and declares it in one run must reach both\"*. Composing WITHOUT declaring leaves a package\n * nothing runs, so the declaration — not the directory — is what landing means here. What\n * the config spells is the package's DIRECTORY name, twice: as the camel key and inside the\n * kebab `path`, and {@link refSpellings} matches either. The plan's `minion-<slug>` ref is\n * spelled nowhere in it, so the probe asks for the directory name; asking for the ref made\n * run 44031607175's agents add the ref to the config as comments and an invented ref map,\n * for the probe to find.\n *\n * ## What this gives up, and why that is the lesser loss\n *\n * Per-BEHAVIOUR discrimination: a minion declaring two behaviours across two tasks would\n * land both when one is declared. That is #1539's shape — a product whose refs have no tree\n * identity — and the honest fix is for the product to name something the minion declares.\n * Until then the choice is between a probe that is coarse and one that can never match, and\n * a probe that can never match reports finished work as undone forever.\n *\n * NOT applied to `APPLICATION_WORKER` above, and now measured rather than suspected: the\n * first journey-built worker (client creation run 44031607175) registers each job as a\n * route named after its job ref (`router.post('/parse-and-preview', …)` in\n * `workers/spreadsheet-import/src/index.ts`), so the job refs ARE spelled in its entry. That\n * task failed to land only because its entry was looked for under the wrong directory.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: 'wildo.saas.config.ts',\n declarations: [integrationMinionDirectoryName(product.minionRef)],\n } as const;\n case BuildPlanTaskProductKind.PROVIDER_BINDING:\n // An augmentation (#2025) lands on its opt-in, in the application config whatever its scope; see\n // `productDeclarationSite` for where in that file.\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: product.augments === undefined ? PROVIDER_BINDING_DECLARATION_FILE[product.scope] : PROVIDER_BINDING_DECLARATION_FILE[ProviderBindingScope.BACKEND],\n declarations: product.augments === undefined ? [product.providerRef] : [augmentationPackageName(product.providerRef)],\n } as const;\n case BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT:\n /*\n * The KEY in the catalogue file, as a `key: 'team'` PROPERTY (see `productDeclarationSite`):\n * `wildo init` writes the file with an empty catalogue whose identifier and prose already\n * contain short words like `pro` and `business`, so a word match would report an empty\n * catalogue as landed. The key is what the backend syncs and the website lists.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: BILLING_CATALOG_FILE,\n declarations: [product.productKey],\n } as const;\n case BuildPlanTaskProductKind.APPLICATION_ROLE:\n // The role's `role: 'FIELD_TECHNICIAN'` property in the role table (see `productDeclarationSite`):\n // the scaffolded table is empty, so the file existing proves nothing.\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: APPLICATION_ROLES_FILE,\n declarations: [product.roleRef],\n } as const;\n case BuildPlanTaskProductKind.WEBSITE_PAGE: {\n // The ROOT CONFIG registers a page by importing its manifest; a page file nothing registers is not a page.\n // `websitePageIdentity`, never the raw ref: the plan speaks `page-pricing`, the tree spells it `pricing`.\n const pageIdentity = websitePageIdentity(product.pageRef);\n // The scaffold's own starter page is registered from day one, so naming it proves nothing: no probe,\n // the task is dispatched, and it is marked unverifiable after its run (as for scaffolded verbs above).\n //\n // Since the HOME page's ref is fixed to the starter's (`WEBSITE_HOME_PAGE_REF`), this is EVERY plan's home\n // page task: it always ends \"ran, not proven\". That is the trade, accepted deliberately (#2554 review F17).\n // Everything a home page task can write besides its words already exists, and no probe kind can say \"the\n // placeholder copy is gone\". What proves the home page is its SECTION tasks, each probed (an entry of its\n // list and words for every locale), and each waits on this task.\n if (isScaffoldedWebsiteStarterPage(pageIdentity)) return undefined;\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: 'website/src/website-root.config.ts',\n declarations: [pageIdentity],\n } as const;\n }\n case BuildPlanTaskProductKind.WEBSITE_SECTION:\n if (isScaffoldedWebsiteStarterSection(product.sectionRef)) return undefined;\n /*\n * TWO probes, both required (#2216): the section is an entry of its page's list (the site the declaration\n * table states), and its words exist under `website.<page>.<sectionRef>.` for every committed locale, in that locale's pack or\n * in the section's own file (`website/src/i18n/<segment>/<page>.<sectionRef>.json`, the only place it writes, #3204).\n * A section the page lists with no words renders keys, and the website build refuses it.\n */\n return [\n {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: `website/src/sections/${websitePageIdentity(product.pageRef)}.sections.tsx`,\n declarations: [product.sectionRef],\n },\n {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_LABEL_PACKS_DECLARE,\n paths: WEBSITE_LABEL_PACK_PATHS,\n fragmentPaths: WEBSITE_LOCALES.map((locale) => websiteSectionLabelFragmentPath(locale, websitePageIdentity(product.pageRef), product.sectionRef)),\n keyPrefix: `website.${websitePageIdentity(product.pageRef)}.${product.sectionRef}.`,\n },\n ] as const;\n case BuildPlanTaskProductKind.DOCUMENTATION_CHAPTER:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: technicalDocumentationChapterFile(product.chapterRef),\n declarations: [product.chapterRef],\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_SCHEMA_FIELDS:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: resourceSchemaFilePath(moduleRefOf(), product.resourceRef),\n declarations: product.fieldRefs,\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_REGISTRATION: {\n /*\n * Only the verbs a task GAINS are evidence. `add-resource` writes create / read / list /\n * update / delete into every config on day one, so a probe that counted them reported a\n * task landed before it ran — measured 2026-09-13 on Wonder CRM's regenerated plan, where\n * all six CONFIG tasks read LANDED with none dispatched.\n *\n * A product left with no gained verb yields NO probe, so a task whose products are all\n * scaffolded reaches the no-product path: never landed before a run, marked unverifiable\n * after one. Marked, never blocking.\n */\n const gained = product.operationRefs.filter((operationRef) => !isScaffoldedResourceOperationRef(operationRef));\n if (gained.length === 0) return undefined;\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_CONFIGURATION, moduleRefOf(), product.resourceRef),\n declarations: gained,\n } as const;\n }\n case BuildPlanTaskProductKind.RESOURCE_UI_BEHAVIOR:\n /*\n * The one product whose bare EXISTENCE is honest evidence: measured 2026-09-10, Wonder CRM\n * contains zero `*.ui-behavior.tsx` files across the whole application while all six of its\n * ui-behavior tasks reported landed. The scaffold never writes one.\n *\n * The file lives in the RESOURCE'S OWN DIRECTORY, like its schema and config beside it. This\n * probe first named `resources/<resource>.ui-behavior.tsx`, a path no application uses: on\n * 2026-09-13 every ui-behavior file in Wonder CRM and Wonder Todos (8 of 8) sat at\n * `resources/<resource>/<resource>.ui-behavior.tsx`, which is also the path the\n * `resource-ui-behavior` skill teaches. So a committed, correct ui-behavior could never land,\n * and its task was offered again forever — first seen when `build-task-contact-ui-behavior`\n * was accepted and still read un-landed.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE,\n path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_UI_BEHAVIOR, moduleRefOf(), product.resourceRef),\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_SPECIFICATION:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_SPECIFICATION, moduleRefOf(), product.resourceRef),\n declarations: product.fieldRefs,\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_RELATIONSHIP:\n /*\n * The edge, not the file. `<module>.relationships.ts` ships with every module carrying its\n * two scaffold edges, so the file proves nothing; the relationship's two resource types are\n * what a wired edge declares. Wonder CRM: 7 of 8 relationship tasks reported landed with no\n * edge at all.\n *\n * BOTH resources are required, and that is what makes the probe discriminating: the scaffold\n * already writes `ORGANIZATIONS -> DEAL` and `DEAL -> USERS` into the deals module, so `deal`\n * alone is satisfied on day one. `contact` never appears there until the edge is wired.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: conventionalModuleFilePath(ModuleConventionalFileKind.MODULE_RELATIONSHIPS, moduleRefOf(), moduleRefOf()),\n declarations: [product.sourceResourceRef, product.targetResourceRef],\n } as const;\n case BuildPlanTaskProductKind.RESOURCE_OPERATION:\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_CONFIGURATION, moduleRefOf(), product.resourceRef),\n declarations: [product.operationRef],\n } as const;\n case BuildPlanTaskProductKind.APPLICATION_VIEW:\n /*\n * A view's home is not one known path — an app-level view may be declared in the module's\n * view-refs or authored as its own file — so the probe accepts either, and still asks for the\n * REF rather than for a file that ships empty with every module.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES,\n paths: [\n `frontend/src/modules/${moduleRefOf()}/app-level-views/view-refs.frontend.ts`,\n `frontend/src/modules/${moduleRefOf()}/app-level-views/index.ts`,\n ],\n // Both sit under the module's frontend directory, which every target carrying this product\n // already allows — so the widening adds nothing here, and says so rather than assuming it.\n writablePaths: [\n `frontend/src/modules/${moduleRefOf()}/app-level-views/view-refs.frontend.ts`,\n `frontend/src/modules/${moduleRefOf()}/app-level-views/index.ts`,\n ],\n declarations: [product.viewRef],\n } as const;\n case BuildPlanTaskProductKind.APPLICATION_MODULE:\n /*\n * A module's identity is the REGISTRY, not its directory. `wildo compose` creates the\n * directory, so probing it would repeat the defect this whole resolver replaces; the module\n * being registered under one identity is what the task's objective actually claims.\n *\n * In EVERY layer's registry, not the shared one alone (#3701): an application module is real only when the\n * shared, frontend and backend registries all carry it, the alignment `wonder-todos-registry-alignment` checks.\n * The reference run of 2026-11-10 read a module's every task landed while the module was missing from the\n * backend and frontend registries, so the product did not deliver it. See {@link moduleRegistryMembershipProbes}.\n */\n return moduleRegistryMembershipProbes(product.moduleRef);\n case BuildPlanTaskProductKind.APPLICATION_DOCUMENT:\n return {\n kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES,\n paths: ['specifications/src/compliance-document-candidates/index.ts', 'specifications/src/document-facts/index.ts'],\n /*\n * The CANDIDATE only. `document-facts/index.ts` is read as landing evidence and must never be\n * writable here: it is `refinement.document-facts`' accepted output, and it is the artifact\n * `refinement.compliance-document-candidate` checks every clause against — \"a clause asserting\n * a fact the application never declared is refused before it becomes a file\". A build agent\n * holding it could author the facts it wants to cite, and since landing is satisfied by ANY\n * candidate, writing the ref into it alone would mark the task landed with no document at all.\n */\n writablePaths: ['specifications/src/compliance-document-candidates/index.ts'],\n declarations: [product.documentRef],\n } as const;\n case BuildPlanTaskProductKind.APPLICATION_DATA_SEED: {\n /*\n * The seed AND its registration, both required (#2234), as for an inbound handler: a seed file nothing\n * registers never runs. The file is task-authored and named from the key, so its declaring the key is\n * sound; the registration is an import spelling the derived stem, in the module index (`./seeds/<stem>`) or in\n * the module's `seeds/index.ts` aggregator (`./<stem>`) — both shapes the `seeding-authoring` skill allows.\n *\n * Known looseness, accepted as for a milestone: the matcher's left boundary is alphanumeric, so a key that is a\n * hyphen-suffix of another (`customers` beside `crm:demo-customers`) would be satisfied by the longer one's\n * import. Keys carry their module namespace (`crm:`), which is what keeps that from arising in practice.\n *\n * A DEMONSTRATION seed must also declare `allowedApplicationEnvironments`, or its rows would be inserted\n * beside real ones in production. What this cannot see: WHICH environments it lists — a demo seed that\n * names `production` among them would land. The skill states the rule; the probe guarantees the field.\n */\n const seedsDirectory = `backend-api/src/modules/${moduleRefOf()}/seeds`;\n const seedFile = `${seedsDirectory}/${dataSeedFileStem(product.seedKey)}.ts`;\n const registrationPaths = [`backend-api/src/modules/${moduleRefOf()}/index.ts`, `${seedsDirectory}/index.ts`];\n return [\n { kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES, path: seedFile, declarations: [product.seedKey] },\n {\n kind: BuildPlanTaskLandedProbeKind.ANY_COMMITTED_FILE_DECLARES,\n paths: registrationPaths,\n writablePaths: registrationPaths,\n declarations: [dataSeedFileStem(product.seedKey)],\n },\n /*\n * And the module reaches it: the module index imports `./seeds` in BOTH shapes — `./seeds/<stem>` when it\n * imports the seed itself, `./seeds` (or `./seeds/index`) when an aggregator lists it. Without this, a seed\n * listed only in an aggregator nothing imports would land and never run (review of #2234).\n */\n { kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES, path: registrationPaths[0]!, declarations: ['./seeds'] },\n ...(product.content === BuildPlanDataSeedContent.DEMONSTRATION\n ? [{ kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES, path: seedFile, declarations: ['allowedApplicationEnvironments'] } as const]\n : []),\n ] as const;\n }\n case BuildPlanTaskProductKind.INBOUND_CHANNEL_HANDLER:\n /*\n * The REGISTRATION, as for a minion: the module's backend index importing the handler's file (#1832).\n *\n * A handler file nothing registers never runs, so the file alone is not the product. The index is what\n * `inboundHandlers` is declared in, but it spells the handler's CONST, whose name the author chooses;\n * the file name is derived from the handler's ref ({@link inboundChannelHandlerFileStem}), so its\n * import is the one thing the index must spell. The index is scaffolded, which is why this is a\n * DECLARES probe on it rather than a bare file probe.\n *\n * What it gives up: it cannot tell a registered handler from an imported-but-unregistered one, or check\n * the channel inside the file, and a COMMENT in the index spelling the path counts as an import, since\n * the set site blanks no comments. For email, the backend refuses to start when `EMAIL_INBOUND` is\n * enabled and no handler is its default, so an unregistered default fails loudly at boot. For a text\n * (#3394) the default is owed only once an SMS handler is declared, so an unregistered one is quieter:\n * every text is still recorded (`smsProviderEvents`) and stored as a delivery no handler runs.\n */\n return {\n kind: BuildPlanTaskLandedProbeKind.COMMITTED_FILE_DECLARES,\n path: `backend-api/src/modules/${moduleRefOf()}/index.ts`,\n declarations: [inboundChannelHandlerImportTail(product.handlerRef)],\n } as const;\n /*\n * AGENT WORK (#2966): proven from the registry, written where the shape skills place it. An agent and the gate on\n * one of its tools both live in the module's `addons/flows-actors/` directory and reach startup through the\n * module's backend index; a work unit is one property of the resource's configuration.\n */\n case BuildPlanTaskProductKind.APPLICATION_AGENT:\n case BuildPlanTaskProductKind.AGENT_APPROVAL_GATE: {\n const flowsActorsIndex = `backend-api/src/modules/${moduleRefOf()}/addons/flows-actors/index.ts`;\n return {\n kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED,\n product,\n moduleRef: moduleRefOf(),\n registrationFiles: [`backend-api/src/modules/${moduleRefOf()}/index.ts`, flowsActorsIndex],\n followImportsOf: flowsActorsIndex,\n } as const;\n }\n // #2305 S5/S6: a usage recording and a retention binding are properties of the resource's configuration, like a work unit.\n case BuildPlanTaskProductKind.WORK_UNIT_RESOURCE:\n case BuildPlanTaskProductKind.METERED_USAGE_RECORDING:\n case BuildPlanTaskProductKind.RESOURCE_RETENTION_BINDING: {\n const resourceConfiguration = conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_CONFIGURATION, moduleRefOf(), product.resourceRef);\n return {\n kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED,\n product,\n moduleRef: moduleRefOf(),\n registrationFiles: [resourceConfiguration],\n followRelativeImportsOf: resourceConfiguration,\n } as const;\n }\n // #2305 S6, #3035: a relationship kind and an organization type live in the application's configuration, which no\n // module owns. A type lands when the configuration's type (the OWNER type found by `ownsApplication`, any other by\n // key) carries what the plan decided; a kind lands on its KEY, and the method declares no product for revising one.\n case BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE:\n case BuildPlanTaskProductKind.ORGANIZATION_TYPE:\n case BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND:\n return {\n kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED,\n product,\n moduleRef: APPLICATION_WIDE_AGENT_WORK_MODULE_REF,\n registrationFiles: [APPLICATION_SAAS_CONFIG_FILE],\n followRelativeImportsOf: APPLICATION_SAAS_CONFIG_FILE,\n } as const;\n /*\n * #3036: a confinement is declared in the backend's startup configuration, which no module owns. Its relative\n * imports are NOT followed: the startup configuration imports the module registry, whose closure is the whole\n * backend, and the confined resource types reach it as constants from the shared library, a package the backend's\n * build reads. What must be committed is the declaration itself.\n *\n * What it does not prove: narrowing is ADDITIVE, so a member whose organization-wide role already satisfies a read\n * is not confined. A landed confinement on a resource whose reads are still open to the default member role\n * confines nobody; the method has the task gate those reads, and the reviewer reads its objective for it.\n */\n case BuildPlanTaskProductKind.ORGANIZATION_UNIT_CONFINEMENT:\n return {\n kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED,\n product,\n moduleRef: APPLICATION_WIDE_AGENT_WORK_MODULE_REF,\n registrationFiles: [BACKEND_STARTUP_CONFIGURATION_FILE],\n } as const;\n /*\n * #3039: a binding is a property of the resource's configuration, like a retention binding, and the instance it\n * names is declared in the application's configuration. Both are written by the task and both must be committed.\n */\n case BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING: {\n const resourceConfiguration = conventionalModuleFilePath(ModuleConventionalFileKind.RESOURCE_CONFIGURATION, moduleRefOf(), product.resourceRef);\n return {\n kind: BuildPlanTaskLandedProbeKind.AGENT_WORK_REGISTERED,\n product,\n moduleRef: moduleRefOf(),\n registrationFiles: [resourceConfiguration, APPLICATION_SAAS_CONFIG_FILE],\n followRelativeImportsOf: resourceConfiguration,\n } as const;\n }\n default: {\n const unhandled: never = product;\n throw new Error(`Unhandled build-plan task product ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * What a product's declarations ARE (#1539): a SET of symbols, each independently present, or a\n * RELATION, present together at one syntactic site.\n *\n * A probe's declarations used to be N independent whole-file questions for every product, which is\n * right for a set (a schema's fields, a registration's operations) and silently wrong for a relation.\n * `RESOURCE_RELATIONSHIP` was the one caught: both resource names sit in the module's relationships\n * file from the scaffold onward, so two unrelated edges answered for a third, and 7 of 11\n * relationship tasks on the first end-to-end run (#1273) read LANDED with no edge. It was fixed by a\n * flag one probe happened to set, which left the next relation to be found the same way. Now every\n * product kind answers in {@link productDeclarationSite}, and a kind added tomorrow does not compile\n * until it does.\n */\nexport enum ProductDeclarationRelation {\n /** Each declaration is independently present in the file — a set of symbols. */\n SET = 'set',\n /** Every declaration among ONE call's positional arguments — a relation between the names. */\n TUPLE_IN_ONE_CALL = 'tuple-in-one-call',\n /** Each declaration is a property KEY of the object at a property path — a relation between the name and where it sits. */\n KEY_AT_OBJECT_PATH = 'key-at-object-path',\n /**\n * Each declaration is a PACKAGE, unscoped (`provider-microsoft-teams`), listed as a string element of the array at a\n * property path, under any npm scope (`'@wonder-todos/provider-microsoft-teams'`). For an augmentation's opt-in\n * (`providers.augmentations.microsoft`, #2025): the installing application's scope is its own, so the plan cannot\n * name it, and the package's unscoped name is what the registry install fixes.\n */\n PACKAGE_IN_ARRAY_AT_OBJECT_PATH = 'package-in-array-at-object-path',\n /**\n * Each declaration is the exact STRING VALUE of a named property (`key: 'team'`), comments blanked — a\n * relation between the name and the property that declares it. For a catalogue whose entries are\n * objects: a bare word match on a short key (`pro`, `team`) is satisfied by the scaffold's own\n * `CUSTOM_PRODUCT_CATALOG` identifier and its prose, so an EMPTY catalogue would read as landed (#1835).\n */\n PROPERTY_VALUE = 'property-value',\n /**\n * Each declaration is the exact string value of a named property inside an entry of a named LIST — written\n * inline in the list's literal, or bound to a `const` the list names (#2216). A relation between the name, the\n * object that declares it and the list that makes it count.\n *\n * For a product that exists only once something INCLUDES it: a website section is rendered, registered and\n * label-audited from its page's `<PAGE>_SECTIONS` array, so one defined and never appended renders nothing.\n * The page task writes that file with the list EMPTY and, from the brief it is given, a comment naming every\n * section in reading order. Read as a set, all 18 sections of `app-creation-test-004` were landed by that\n * comment before any section existed.\n */\n PROPERTY_VALUE_IN_LIST = 'property-value-in-list',\n}\n\nexport type ProductDeclarationSite =\n | { readonly relation: ProductDeclarationRelation.SET }\n | { readonly relation: ProductDeclarationRelation.TUPLE_IN_ONE_CALL; readonly callee: string }\n | { readonly relation: ProductDeclarationRelation.KEY_AT_OBJECT_PATH; readonly objectPath: readonly string[] }\n | { readonly relation: ProductDeclarationRelation.PACKAGE_IN_ARRAY_AT_OBJECT_PATH; readonly objectPath: readonly string[] }\n | { readonly relation: ProductDeclarationRelation.PROPERTY_VALUE; readonly propertyName: string }\n | { readonly relation: ProductDeclarationRelation.PROPERTY_VALUE_IN_LIST; readonly propertyName: string; readonly listName: string };\n\nconst SET_SITE: ProductDeclarationSite = { relation: ProductDeclarationRelation.SET };\n\n/**\n * Where, in `wildo.saas.config.ts`, a provider bound in each config-authored scope is declared: a key\n * of `providers` under that scope inside `defineSaaSProviders({ scopes })`. The two scopes share ONE\n * file, and the file also names providers in `providerConfigurations` and in prose — so a bare name\n * would let a backend binding answer for a companion one. The frontend scopes each have a file of\n * their own, where the file already is the site.\n */\nconst PROVIDER_BINDING_SCOPE_OBJECT_PATH: Readonly<Record<ProviderBindingScope, readonly string[] | null>> = {\n [ProviderBindingScope.BACKEND]: ['scopes', 'backend', 'providers'],\n [ProviderBindingScope.COMPANION]: ['scopes', 'companion', 'providers'],\n [ProviderBindingScope.FRONTEND_APP]: null,\n [ProviderBindingScope.WEBSITE]: null,\n};\n\n/**\n * The declaration site of every product kind (#1539). TOTAL over the vocabulary: the `never` arm makes\n * a new kind a compile error until it states whether its artifact is a set or a relation.\n *\n * A single-declaration product is a SET of one unless WHERE the name sits is part of what it means —\n * which is why `PROVIDER_BINDING` is not a set even though it declares one name.\n *\n * Reviewed kind by kind for the question the issue names. `APPLICATION_VIEW` and\n * `RESOURCE_COMPOSITE_VIEW` each declare ONE ref, in a file whose only job is to hold such refs (the\n * module's view refs; the resource's own ui-behavior), so there is no second member for a relation to\n * join. `APPLICATION_FRONTEND_CONFIG`, `RESOURCE_SCHEMA_FIELDS`, `RESOURCE_REGISTRATION`,\n * `RESOURCE_SPECIFICATION` and `APPLICATION_WORKER` declare several names that are genuinely\n * independent — a schema is a set of fields — so the set reading is the true one.\n */\nexport function productDeclarationSite(product: BuildPlanTask['produces'][number]): ProductDeclarationSite {\n switch (product.kind) {\n case BuildPlanTaskProductKind.RESOURCE_RELATIONSHIP:\n // An edge is ONE `createResourcesRelationship(source, target, …)` call; see `declarationsAppearInOneCall`.\n return { relation: ProductDeclarationRelation.TUPLE_IN_ONE_CALL, callee: 'createResourcesRelationship' };\n case BuildPlanTaskProductKind.PROVIDER_BINDING: {\n /*\n * An augmentation owns no ref and writes no scope entry, so the scope's keys cannot say it landed: binding it as its\n * base would read landed the moment the base was scoped, with nothing installed or opted in (#2025 review F1). What\n * lands it is the application's opt-in, which configuration sync refuses unless a scope declares the base.\n */\n if (product.augments !== undefined) {\n return { relation: ProductDeclarationRelation.PACKAGE_IN_ARRAY_AT_OBJECT_PATH, objectPath: ['augmentations', product.augments] };\n }\n const objectPath = PROVIDER_BINDING_SCOPE_OBJECT_PATH[product.scope];\n return objectPath === null ? SET_SITE : { relation: ProductDeclarationRelation.KEY_AT_OBJECT_PATH, objectPath };\n }\n // A catalogue entry is declared by its `key` property — never by the word appearing anywhere (#1835).\n case BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT:\n return { relation: ProductDeclarationRelation.PROPERTY_VALUE, propertyName: 'key' };\n // A role is declared by its `role` property in the role table — never by its name appearing in a comment (#2490).\n case BuildPlanTaskProductKind.APPLICATION_ROLE:\n return { relation: ProductDeclarationRelation.PROPERTY_VALUE, propertyName: 'role' };\n // A section is `defineWebsiteSection({ sectionRef: 'home-hero', … })` appended to its page's list (#2216).\n case BuildPlanTaskProductKind.WEBSITE_SECTION:\n return { relation: ProductDeclarationRelation.PROPERTY_VALUE_IN_LIST, propertyName: 'sectionRef', listName: websitePageSectionsListName(product.pageRef) };\n case BuildPlanTaskProductKind.APPLICATION_FRONTEND_CONFIG:\n /*\n * The shell layout is ONE `register2DLayout(<constant>)` call. The whole-file set would read the layout landed from\n * its import alone, or from a comment naming it, with nothing registered (#2055 review M-4).\n */\n return product.configSurface === FrontendConfigSurface.SHELL_LAYOUT\n ? { relation: ProductDeclarationRelation.TUPLE_IN_ONE_CALL, callee: 'register2DLayout' }\n : SET_SITE;\n case BuildPlanTaskProductKind.RESOURCE_CUSTOM_VIEW:\n case BuildPlanTaskProductKind.RESOURCE_COMPOSITE_VIEW:\n case BuildPlanTaskProductKind.RESOURCE_CHART_VIEW:\n case BuildPlanTaskProductKind.CUSTOM_COMPONENT:\n case BuildPlanTaskProductKind.APPLICATION_MILESTONE:\n case BuildPlanTaskProductKind.APPLICATION_GUIDANCE:\n case BuildPlanTaskProductKind.PDF_TEMPLATE:\n case BuildPlanTaskProductKind.APPLICATION_WORKER:\n case BuildPlanTaskProductKind.APPLICATION_MINION:\n case BuildPlanTaskProductKind.WEBSITE_PAGE:\n case BuildPlanTaskProductKind.DOCUMENTATION_CHAPTER:\n case BuildPlanTaskProductKind.RESOURCE_SCHEMA_FIELDS:\n case BuildPlanTaskProductKind.RESOURCE_REGISTRATION:\n case BuildPlanTaskProductKind.RESOURCE_UI_BEHAVIOR:\n case BuildPlanTaskProductKind.RESOURCE_SPECIFICATION:\n case BuildPlanTaskProductKind.RESOURCE_OPERATION:\n case BuildPlanTaskProductKind.APPLICATION_VIEW:\n case BuildPlanTaskProductKind.APPLICATION_MODULE:\n case BuildPlanTaskProductKind.APPLICATION_DOCUMENT:\n case BuildPlanTaskProductKind.INBOUND_CHANNEL_HANDLER:\n case BuildPlanTaskProductKind.APPLICATION_DATA_SEED:\n // Proven from the registry rather than declared in a file (#2966); no text probe ever reads this site.\n case BuildPlanTaskProductKind.APPLICATION_AGENT:\n case BuildPlanTaskProductKind.AGENT_APPROVAL_GATE:\n case BuildPlanTaskProductKind.WORK_UNIT_RESOURCE:\n case BuildPlanTaskProductKind.METERED_USAGE_RECORDING:\n case BuildPlanTaskProductKind.RESOURCE_RETENTION_BINDING:\n case BuildPlanTaskProductKind.RELATIONSHIP_CONFERRED_ROLE:\n case BuildPlanTaskProductKind.ORGANIZATION_TYPE:\n case BuildPlanTaskProductKind.ORGANIZATION_RELATIONSHIP_KIND:\n case BuildPlanTaskProductKind.ORGANIZATION_UNIT_CONFINEMENT:\n case BuildPlanTaskProductKind.SYSTEM_OF_RECORD_BINDING:\n return SET_SITE;\n default: {\n const unhandled: never = product;\n throw new Error(`Unhandled build-plan task product ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * The files whose comments can be blanked lexically: TypeScript and JavaScript, where `//`, `/* *\\/` and the\n * three quote characters mean exactly what {@link blankSourceComments} assumes. Nothing else is touched — a Rust\n * entry spells a lifetime `'a`, which would open a quote, and a Markdown file's `https://` is not a comment.\n */\nconst COMMENT_BLANKABLE_SOURCE = /\\.(?:[cm]?[jt]sx?)$/u;\n\n/**\n * Does the committed text declare these refs at the site the product names? The one question every declaration\n * probe asks.\n *\n * `sourcePath`, when the file is a script source, blanks its comments BEFORE any relation reads it (#2216). A\n * structural question must never be answered by prose, and for a SET that used to be exactly what happened: the\n * whole-word matcher counted a JSDoc that NAMED a product as the product. The file a probe reads is often written\n * by a sibling task with every ref of the plan in its brief — the website page task wrote all 18 section refs of\n * `app-creation-test-004` into its sections file's header and every section read landed. The relations that\n * already blanked their own input (`PROPERTY_VALUE`, `KEY_AT_OBJECT_PATH`) are unchanged by the second pass.\n */\nexport function declarationsAppearAt(text: string, declarations: readonly string[], site: ProductDeclarationSite, sourcePath?: string): boolean {\n const read = sourcePath !== undefined && COMMENT_BLANKABLE_SOURCE.test(sourcePath) ? blankSourceComments(text) : text;\n switch (site.relation) {\n case ProductDeclarationRelation.SET:\n return declarationsAppear(read, declarations);\n case ProductDeclarationRelation.TUPLE_IN_ONE_CALL:\n return declarationsAppearInOneCall(read, declarations, site.callee);\n case ProductDeclarationRelation.KEY_AT_OBJECT_PATH:\n return declarationsAppearAsKeysAt(read, declarations, site.objectPath);\n case ProductDeclarationRelation.PACKAGE_IN_ARRAY_AT_OBJECT_PATH:\n return declarationsAppearAsPackagesAt(read, declarations, site.objectPath);\n case ProductDeclarationRelation.PROPERTY_VALUE:\n return declarationsAppearAsPropertyValues(read, declarations, site.propertyName);\n case ProductDeclarationRelation.PROPERTY_VALUE_IN_LIST:\n return declarationsAppearAsListedPropertyValues(read, declarations, site.propertyName, site.listName);\n default: {\n const unhandled: never = site;\n throw new Error(`Unhandled declaration site ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/**\n * Is every declaration the exact string value of `propertyName` somewhere in the comment-blanked text?\n *\n * EXACT, unlike the whole-file matcher: a catalogue key is a string a runtime compares verbatim, so no\n * spelling variants — `team` is not `TEAM` or `teamPlan`. The property name is bounded on the left so\n * `productKey: 'team'` does not count as `key: 'team'`.\n */\nexport function declarationsAppearAsPropertyValues(text: string, declarations: readonly string[], propertyName: string): boolean {\n const code = blankSourceComments(text);\n const property = propertyName.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n return declarations.every((declaration) => {\n const value = declaration.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n return new RegExp(`(?<![A-Za-z0-9_$])${property}\\\\s*:\\\\s*(['\"\\`])${value}\\\\1`, 'u').test(code);\n });\n}\n\n/**\n * Is every declaration the exact string value of `propertyName` in an ENTRY of the array bound to `listName`?\n * An entry declares it inline (`[defineWebsiteSection({ sectionRef: 'home-hero' })]`) or through a `const` the\n * list names (`const HOME_HERO = defineWebsiteSection({ sectionRef: 'home-hero' })` … `[HOME_HERO]`) — the\n * second is how every section skill and the `add-website` scaffold write it (#2216).\n *\n * Membership is what makes the product real: a page renders, registers and label-audits exactly what its list\n * holds, so a section defined and never appended is not a section. A name in a comment, or in another list,\n * counts for nothing.\n *\n * Lexical, like every matcher here, and blind in the honest direction: a value it cannot see — one computed by a\n * helper, a list built by a function call, a binding imported from another file — reads as NOT landed, which costs\n * a run that finds the work done; it never reads an empty list as full.\n *\n * Known residual: an apostrophe in JSX TEXT (`<p>Don't</p>`) opens a \"string\" to a lexer that knows no JSX, so quote\n * parity can flip for the rest of the file in this matcher, which keeps its own quote state. A section file keeps its\n * words in label packs rather than JSX text, which is why this has not been worth a parser; if it ever bites, the answer\n * is the introspection subprocess, not a smarter regex.\n */\nexport function declarationsAppearAsListedPropertyValues(\n text: string,\n declarations: readonly string[],\n propertyName: string,\n listName: string,\n): boolean {\n const code = blankSourceComments(text);\n const bindings = constBindingInitializers(code);\n const list = bindings.get(listName);\n if (list === undefined) return false;\n // Every binding the list reaches, through any chain of names (`[...OPENING]`, `OPENING = [HOME_HERO]`):\n // bounded by the file's own bindings, and a name already visited is not walked again.\n const names = (body: string): string[] => [...bindings.keys()]\n .filter((name) => new RegExp(`(?<![A-Za-z0-9_$])${escapeRegExp(name)}(?![A-Za-z0-9_$])`, 'u').test(body));\n const reached = new Set<string>([listName]);\n const pending = [list];\n while (pending.length > 0) {\n for (const name of names(pending.pop()!)) {\n if (reached.has(name)) continue;\n reached.add(name);\n pending.push(bindings.get(name)!);\n }\n }\n const bodies = [...reached].map((name) => bindings.get(name)!);\n const property = escapeRegExp(propertyName);\n return declarations.every((declaration) => {\n const declares = new RegExp(`(?<![A-Za-z0-9_$])${property}\\\\s*:\\\\s*(['\"\\`])${escapeRegExp(declaration)}\\\\1`, 'u');\n return bodies.some((body) => declares.test(body));\n });\n}\n\n/**\n * A locale's website label pack, named as the website's own pack loader names it: by the language's path segment,\n * `website/src/i18n/en-gb.json` for `en-GB` (`languagePathSegment`, #2810). Named by the raw code it was `en-GB.json`,\n * a file the scaffold never writes, so an `en-GB` section never landed.\n */\nexport function websiteLabelPackPath(locale: AvailableLanguage | string): string {\n return `website/src/i18n/${languagePathSegment(locale)}.json`;\n}\n\n/**\n * Every label pack a website CAN have — one per member of the language vocabulary. Total over the enum, so a locale\n * added tomorrow is probed with nobody remembering to.\n */\nconst WEBSITE_LOCALES: readonly AvailableLanguage[] = Object.values(AvailableLanguage);\nexport const WEBSITE_LABEL_PACK_PATHS: readonly string[] = WEBSITE_LOCALES.map((locale) => websiteLabelPackPath(locale));\n\n/**\n * A website section's own words in one locale (#3204): `website/src/i18n/<segment>/<page>.<sectionRef>.json`, a fragment\n * the website's pack loader merges into that locale's pack. One file per section and locale, so sections built at the\n * same time never edit one file.\n */\nexport function websiteSectionLabelFragmentPath(locale: AvailableLanguage | string, pageIdentity: string, sectionRef: string): string {\n return `website/src/i18n/${languagePathSegment(locale)}/${pageIdentity}.${sectionRef}.json`;\n}\n\n/**\n * Does every locale with a committed pack or fragment carry a key under `keyPrefix` in one of the two, and is at least\n * one committed? `packTexts[i]` and `fragmentTexts[i]` are the same locale's, `undefined` where not committed (#2216,\n * #3204). A KEY, not a mention: the prefix must open a quoted string that a colon follows, so a value that happens to\n * contain it does not count.\n */\nexport function labelPacksDeclareKeyPrefix(packTexts: readonly (string | undefined)[], keyPrefix: string, fragmentTexts: readonly (string | undefined)[] = []): boolean {\n const key = new RegExp(`\"${escapeRegExp(keyPrefix)}[^\"\\\\\\\\]*\"\\\\s*:`, 'u');\n const locales = packTexts.map((pack, index) => [pack, fragmentTexts[index]] as const).filter(([pack, fragment]) => pack !== undefined || fragment !== undefined);\n if (locales.length === 0) return false;\n return locales.every(([pack, fragment]) => (pack !== undefined && key.test(pack)) || (fragment !== undefined && key.test(fragment)));\n}\n\n/**\n * Does the labelling-pipeline file `text` declare every one of `keys` with a non-empty string value (#2504)? Parsed and\n * flattened with the pipeline's own reader, so a key is exactly what the pipeline would write for it. `undefined`\n * (not committed) and a file that does not parse both declare nothing.\n */\nexport function labelFileDeclaresKeys(text: string | undefined, keys: readonly string[]): boolean {\n if (text === undefined) return false;\n let declared: Record<string, string>;\n try {\n declared = flattenNestedStringLabels(parseNestedLabelsTsSource(text).labels);\n } catch {\n return false;\n }\n return keys.every((key) => typeof declared[key] === 'string' && declared[key]!.trim() !== '');\n}\n\nfunction escapeRegExp(value: string): string {\n return value.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n}\n\n/**\n * Every `const`/`let`/`var` binding of the (comment-blanked) text, mapped to the text of its initializer. An\n * initializer ends at a `;` at depth 0, or at a line break at depth 0 that begins a new top-level statement — the\n * shape of a module written without semicolons. Skips string contents, so a bracket inside a string does not move\n * the depth. A destructuring binding is not a name and is skipped.\n */\nfunction constBindingInitializers(code: string): Map<string, string> {\n const bindings = new Map<string, string>();\n const binding = /(?<![A-Za-z0-9_$.])(?:const|let|var)\\s+([A-Za-z_$][A-Za-z0-9_$]*)\\s*(?::[^=;]*?)?=(?![=>])/gu;\n const nextStatement = /^\\s*(?:export|const|let|var|function|class|import|type|interface|enum)\\b/u;\n for (const match of code.matchAll(binding)) {\n const from = match.index! + match[0].length;\n let depth = 0;\n let quote: string | null = null;\n let at = from;\n for (; at < code.length; at += 1) {\n const char = code[at]!;\n if (quote !== null) {\n if (char === '\\\\') at += 1;\n else if (char === quote) quote = null;\n continue;\n }\n if (char === \"'\" || char === '\"' || char === '`') quote = char;\n else if (char === '(' || char === '[' || char === '{') depth += 1;\n else if (char === ')' || char === ']' || char === '}') {\n depth -= 1;\n if (depth < 0) break;\n } else if (depth === 0 && char === ';') break;\n else if (depth === 0 && char === '\\n' && at > from && nextStatement.test(code.slice(at + 1))) break;\n }\n if (!bindings.has(match[1]!)) bindings.set(match[1]!, code.slice(from, at));\n }\n return bindings;\n}\n\n/**\n * The property keys at depth 0 of an object BODY (the text between its braces), each with the body of\n * its value when that value is an object literal. Skips string contents, so a brace inside a string\n * does not move the depth. Expects comments already blanked.\n */\nfunction objectMembers(body: string): { readonly key: string; readonly valueBody?: string }[] {\n const members: { key: string; valueBody?: string }[] = [];\n const keyAt = /(['\"]?)([A-Za-z_$][A-Za-z0-9_$-]*)\\1\\s*:/uy;\n let depth = 0;\n let quote: string | null = null;\n for (let at = 0; at < body.length; at += 1) {\n const char = body[at]!;\n if (quote !== null) {\n if (char === '\\\\') at += 1;\n else if (char === quote) quote = null;\n continue;\n }\n if (depth === 0 && (at === 0 || /[\\s,{]/u.test(body[at - 1]!))) {\n keyAt.lastIndex = at;\n const match = keyAt.exec(body);\n if (match) {\n const afterColon = keyAt.lastIndex;\n const valueStart = afterColon + (/^\\s*/u.exec(body.slice(afterColon))?.[0].length ?? 0);\n const close = body[valueStart] === '{' ? matchingBrace(body, valueStart) : -1;\n members.push({ key: match[2]!, ...(close > valueStart ? { valueBody: body.slice(valueStart + 1, close) } : {}) });\n at = afterColon - 1;\n continue;\n }\n }\n if (char === \"'\" || char === '\"' || char === '`') quote = char;\n else if (char === '{' || char === '[' || char === '(') depth += 1;\n else if (char === '}' || char === ']' || char === ')') depth -= 1;\n }\n return members;\n}\n\n/** The index of the brace closing the one at `open`, or -1. Skips string contents. */\nfunction matchingBrace(text: string, open: number): number {\n let depth = 0;\n let quote: string | null = null;\n for (let at = open; at < text.length; at += 1) {\n const char = text[at]!;\n if (quote !== null) {\n if (char === '\\\\') at += 1;\n else if (char === quote) quote = null;\n continue;\n }\n if (char === \"'\" || char === '\"' || char === '`') quote = char;\n else if (char === '{') depth += 1;\n else if (char === '}') {\n depth -= 1;\n if (depth === 0) return at;\n }\n }\n return -1;\n}\n\n/**\n * Is every declaration a property KEY of the object at `objectPath`? The first segment may sit at any\n * depth (the path starts inside a call such as `defineSaaSProviders({ scopes })`); every later segment\n * is a direct member of the one before, and the declarations are direct keys of the last.\n *\n * Keys are matched EXACTLY against the ref's spellings, never as substrings: `openai` is not satisfied\n * by `openai-compatible`. Lexical rather than a parse, like the call matcher beside it, and blind in the\n * same honest direction — a key it cannot see reads as not landed, never as landed.\n */\nexport function declarationsAppearAsKeysAt(text: string, declarations: readonly string[], objectPath: readonly string[]): boolean {\n const [first, ...rest] = objectPath;\n if (first === undefined) return false;\n const code = blankSourceComments(text);\n const opening = new RegExp(`(?<![A-Za-z0-9_$])(['\"]?)${first.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&')}\\\\1\\\\s*:\\\\s*\\\\{`, 'gu');\n for (const match of code.matchAll(opening)) {\n const open = match.index! + match[0].length - 1;\n const close = matchingBrace(code, open);\n if (close < 0) continue;\n let body: string | undefined = code.slice(open + 1, close);\n for (const segment of rest) body = body === undefined ? undefined : objectMembers(body).find((member) => member.key === segment)?.valueBody;\n if (body === undefined) continue;\n const keys = new Set(objectMembers(body).map((member) => member.key));\n if (declarations.every((declaration) => refSpellings(declaration).some((spelling) => keys.has(spelling)))) return true;\n }\n return false;\n}\n\n/** The unscoped package name a registry provider module installs as (`@<app-scope>/provider-<ref>`, #2014). */\nexport function augmentationPackageName(providerRef: string): string {\n return `provider-${providerRef}`;\n}\n\n/**\n * Is every declaration an unscoped package name listed in the ARRAY at `objectPath` (the last segment names the array),\n * under any npm scope or none? Comment-blanked, so a commented-out opt-in is not one.\n */\nexport function declarationsAppearAsPackagesAt(text: string, declarations: readonly string[], objectPath: readonly string[]): boolean {\n const arrayKey = objectPath.at(-1);\n const ownerPath = objectPath.slice(0, -1);\n const [first, ...rest] = ownerPath;\n if (arrayKey === undefined || first === undefined) return false;\n const code = blankSourceComments(text);\n const opening = new RegExp(`(?<![A-Za-z0-9_$])(['\"]?)${first.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&')}\\\\1\\\\s*:\\\\s*\\\\{`, 'gu');\n for (const match of code.matchAll(opening)) {\n const open = match.index! + match[0].length - 1;\n const close = matchingBrace(code, open);\n if (close < 0) continue;\n let body: string | undefined = code.slice(open + 1, close);\n for (const segment of rest) body = body === undefined ? undefined : objectMembers(body).find((member) => member.key === segment)?.valueBody;\n if (body === undefined) continue;\n const elements = arrayStringElementsAt(body, arrayKey);\n if (elements === undefined) continue;\n const listed = new Set(elements.map((element) => element.replace(/^@[^/]+\\//u, '')));\n if (declarations.every((declaration) => listed.has(declaration))) return true;\n }\n return false;\n}\n\n/** The string literals of the array value of `key` directly inside an object body, or `undefined` when there is none. */\nfunction arrayStringElementsAt(body: string, key: string): string[] | undefined {\n const keyed = new RegExp(`(?<![A-Za-z0-9_$])(['\"]?)${key.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&')}\\\\1\\\\s*:\\\\s*\\\\[`, 'gu');\n for (const match of body.matchAll(keyed)) {\n const open = match.index! + match[0].length - 1;\n let depth = 0;\n let quote: string | null = null;\n for (let at = open; at < body.length; at += 1) {\n const char = body[at]!;\n if (quote !== null) {\n if (char === '\\\\') at += 1;\n else if (char === quote) quote = null;\n continue;\n }\n if (char === \"'\" || char === '\"' || char === '`') quote = char;\n else if (char === '[') depth += 1;\n else if (char === ']') {\n depth -= 1;\n if (depth === 0) {\n return [...body.slice(open + 1, at).matchAll(/(['\"`])((?:\\\\.|(?!\\1).)*)\\1/gu)].map((element) => element[2]!);\n }\n }\n }\n }\n return undefined;\n}\n\n/**\n * A website page's identity IN THE TREE, from the plan ref that names it.\n *\n * Two namespaces meet here and they are not the same. The website plan speaks the specification\n * families' ELEMENT-REF vocabulary, where a page is `page-pricing` exactly as an ICP is\n * `icp-small-teams` and a voice is `voice-calm-evidence-led`. The application spells the same page\n * bare — `pricing.page.tsx`, `PRICING_PAGE_MANIFEST`, `pricing.sections.tsx` — and so do the plan's own\n * SECTION refs, which are `pricing-hero`, never `page-pricing-hero`.\n *\n * `produces.pageRef` carries the element ref, and both website probes use it as a tree identity: one\n * looks for a symbol in the root config, the other builds a filename from it. Measured on the first\n * end-to-end journey run (#1273), whose plan still named its home page `page-home` (a HOME page's ref is now always\n * `page-landing`, the scaffold's starter): the probes looked for `page-home` in a root config that registers\n * `HOME_PAGE_MANIFEST`, and for `website/src/sections/page-home.sections.tsx` against a tree holding\n * `home.sections.tsx`. **All 28 website tasks — 30% of the plan — could never land**, however\n * correctly they were built, and the board read 9 of 94 while the work was being done and committed.\n *\n * That is precisely the failure direction {@link refSpellings} exists to prevent, stated in its own\n * JSDoc: *\"a probe that looked for the slug verbatim would answer 'not landed' for a perfectly wired\n * edge — the failure direction that re-offers finished work forever.\"* This is the same defect one\n * namespace over.\n *\n * Narrow ON PURPOSE. Teaching {@link refSpellings} to drop any leading segment would make\n * `deal-contact` match a bare `contact` and report a task landed having done nothing — the opposite\n * and worse direction, which is what `isScaffoldedResourceOperationRef` exists for. So the\n * normalization lives here, at the two sites that turn a plan ref into a path or a symbol, and is\n * keyed to the one prefix the website-plan family actually uses.\n */\nexport function websitePageIdentity(pageRef: string): string {\n return pageRef.replace(/^page-/u, '');\n}\n\n/**\n * The name of a page's ordered sections list — `PRICING_SECTIONS` for `page-pricing` — which the page renders, registers\n * and label-audits. ONE derivation for the two sides that must agree on it: the page task's brief, which tells the\n * agent to export it, and the section probe, which lands a section only once it is an entry of it (#2216).\n */\nexport function websitePageSectionsListName(pageRef: string): string {\n return `${websitePageIdentity(pageRef).toUpperCase().replace(/[^A-Z0-9]+/gu, '_')}_SECTIONS`;\n}\n\n/**\n * A resource custom view's ref, as the TREE spells it.\n *\n * A custom view is the one view kind with NO identity of its own. An app-level view is a named\n * artifact — its registry states that `library-home-view` is *\"addressed by the router\n * (`/composite/library-home-view`), by the labelling pipeline\n * (`composite_views.app.library-home-view.*`)\"* — and its probe reads that registry. A custom view\n * is a component bound to an operation and nothing else:\n *\n * ```ts\n * [CoreResourceOperation.CREATE, { surface: …, customView: ReadingItemCaptureCustomView }],\n * ```\n *\n * There is an OPERATION and a COMPONENT. There is no view ref, and nowhere for one to live —\n * measured on the first end-to-end journey run (#1273): `view-reading-item-capture-view` appears\n * NOWHERE in application code, only in `specifications/src/experience-plan` and the build plan. So a\n * probe looking for the plan's ref in the ui-behavior was unlandable by construction, for every\n * application. All three of that run's custom-view tasks ran, committed their work, and were\n * recorded `completed_unlanded`; the prerequisite graph put **13 of 94 tasks** behind them.\n *\n * The component name is what the tree actually carries, and it follows one rule across both\n * applications that have custom views — `<the ref's words>CustomView`:\n *\n * | ref | component |\n * |---|---|\n * | `view-reading-item-capture-view` | `ReadingItemCaptureCustomView` |\n * | `view-reading-item-detail-view` | `ReadingItemDetailCustomView` |\n * | `view-weekly-digest-summary-view` | `WeeklyDigestSummaryCustomView` |\n * | — (Wonder Todos, hand-authored) | `TaskChangeStatusCustomView` · `TaskListCustomView` · `TodoReadCustomView` |\n *\n * So this strips the `view-` prefix and the `-view` suffix and leaves {@link refSpellings} to do the\n * rest: its Pascal spelling is `ReadingItemCapture`, and the matcher's right boundary is\n * `(?![a-z0-9])`, which admits the `CustomView` suffix while still refusing\n * `ReadingItemDetailCustomView`. Two custom views on one resource stay distinguishable, which is the\n * property a bare \"does it bind any customView?\" probe would lose.\n *\n * Narrow on purpose, exactly as {@link websitePageIdentity} is: it drops the two segments this one\n * plan vocabulary actually uses, and nothing else.\n *\n * **This is a normalization, not the right long-term answer.** A custom view is identified by\n * `resource × operation`, and the product models it as a single opaque ref — see #1530 and #1539.\n * When the product carries the operation, the probe should assert the BINDING rather than the name.\n */\nexport function resourceCustomViewIdentity(viewRef: string): string {\n return viewRef.replace(/^view-/u, '').replace(/-view$/u, '');\n}\n\n/**\n * Every spelling one semantic ref can wear in application source.\n *\n * A plan speaks kebab-case slugs (`pipeline-stage`, `deal-contact`) because that is the vocabulary\n * the domain plan and the decomposer share. Application code spells the same thing as an enum member\n * (`PIPELINE_STAGE`), a type prefix (`PipelineStage`) or a field (`pipelineStageId`). A probe that\n * looked for the slug verbatim would answer \"not landed\" for a perfectly wired edge — the failure\n * direction that re-offers finished work forever.\n */\n/**\n * The regular English plural of a word (`job` → `jobs`, `property` → `properties`, `address` → `addresses`).\n * Used only where a plan ref and a resource type name ONE resource (see {@link resourceRefSpellings}).\n */\nfunction pluralWord(word: string): string {\n if (/[^aeiou]y$/iu.test(word)) return `${word.slice(0, -1)}ies`;\n if (/(s|x|z|ch|sh)$/iu.test(word)) return `${word}es`;\n return `${word}s`;\n}\n\n/**\n * The singular of a regular English plural (`jobs` → `job`, `properties` → `property`, `addresses` → `address`); the word\n * unchanged when it does not end like one. The inverse of {@link pluralWord} on what it produces.\n */\nfunction singularWord(word: string): string {\n if (/ies$/iu.test(word)) return `${word.slice(0, -3)}y`;\n if (/(ss|x|z|ch|sh)es$/iu.test(word)) return word.slice(0, -2);\n if (/[^s]s$/iu.test(word)) return word.slice(0, -1);\n return word;\n}\n\n/**\n * Every spelling a resource type may give a plan's resource ref (#3204): {@link refSpellings} of the ref, and of the ref\n * with its last word made plural.\n *\n * A domain plan names ONE resource (`job`, `site-visit`, `pipeline-stage-setting`); the resource TYPE an application\n * registers names the collection (`jobs`, `siteVisits`, `pipelineStageSettings`), as the engine's own types do (`users`,\n * `organizations`). Reference run 42782969940 measured it: `build-task-org-confinement` confined `jobs` and `siteVisits`\n * to their assignee exactly as planned, and its landing probe, looking for `job` and `siteVisit`, read it as not confined\n * through three runs. Only for a comparison with a registered resource TYPE: a probe that reads committed TEXT keeps\n * {@link refSpellings}, where a plural is another word.\n */\nfunction resourceRefSpellings(ref: string): readonly string[] {\n const parts = ref.split(/[-_]/u).filter((part) => part.length > 0);\n if (parts.length === 0) return refSpellings(ref);\n const plural = [...parts.slice(0, -1), pluralWord(parts[parts.length - 1]!)].join('-');\n return [...new Set([...refSpellings(ref), ...refSpellings(plural)])];\n}\n\nfunction refSpellings(ref: string): readonly string[] {\n const parts = ref.split(/[-_]/u).filter((part) => part.length > 0);\n if (parts.length === 0) return [ref];\n const pascal = parts.map((part) => `${part.charAt(0).toUpperCase()}${part.slice(1)}`).join('');\n return [...new Set([\n ref,\n parts.join('-'),\n parts.join('_'),\n parts.map((part) => part.toUpperCase()).join('_'),\n pascal,\n `${pascal.charAt(0).toLowerCase()}${pascal.slice(1)}`,\n ])];\n}\n\n/**\n * Does the committed text declare every one of these refs?\n *\n * Whole-word, never a bare substring: `deal.schemas.ts` carries prose naming its own build tasks, so\n * `includes('pipelineStageId')` is satisfied by a COMMENT mentioning it and would report a task\n * landed on its own documentation. A word boundary is not an AST — a mention still counts — but it\n * is sound against the shapes that produced #597, where the symbol is absent from the file entirely.\n *\n * `camelCase` needs its own boundary rule: `\\b` does not fire between `pipelineStage` and `Id`, so\n * `pipelineStage` correctly matches inside `pipelineStageId`, which is what a field-bearing edge\n * looks like in a schema.\n */\nexport function declarationsAppear(text: string, declarations: readonly string[]): boolean {\n return declarations.every((declaration) => refSpellings(declaration).some((spelling) => {\n const escaped = spelling.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n return new RegExp(`(?<![A-Za-z0-9])${escaped}(?![a-z0-9])`, 'u').test(text);\n }));\n}\n\n/**\n * Does ONE call to `callee` name every one of these refs among its positional arguments?\n *\n * The question a RELATION product asks, and the one {@link declarationsAppear} cannot answer: two\n * names present in a file say nothing about whether anything joins them. See\n * {@link ProductDeclarationRelation} for the measured case (#1539), and `TUPLE_IN_ONE_CALL` for the\n * site this function checks.\n *\n * ## Two deliberate narrowings, each of which a looser form got wrong\n *\n * **The scan stops at the options object.** A relationship is\n * `createResourcesRelationship(A, B, cardinality, cardinality, { ... })`, and everything that\n * identifies the EDGE is positional. Reading on into the options body would re-admit prose — a\n * `contextPolicy` comment naming a sibling resource is exactly the mention this exists to exclude —\n * and would let one call's options satisfy a different call's identity. An unterminated head (no\n * `{` and no `)`) contributes nothing rather than spilling into the next call.\n *\n * **The boundary excludes `_`, unlike the whole-file matcher.** Enum members are SCREAMING_SNAKE and\n * nest: `(?![a-z0-9])` lets `WEEKLY_DIGEST` match inside `WEEKLY_DIGEST_ITEM`, so the head\n * `READING_ITEM, WEEKLY_DIGEST_ITEM` would satisfy a probe for `weekly-digest -> weekly-digest-item`\n * — the very edge that is missing, reported landed by its neighbour. The whole-file matcher keeps\n * its looser boundary because there `pipelineStage` matching inside `pipelineStageId` is the\n * intended behaviour; here a resource type is named exactly or not at all.\n */\nexport function declarationsAppearInOneCall(text: string, declarations: readonly string[], callee: string): boolean {\n // A commented-out call declares nothing (#2055 review M-4): match against the comment-blanked text.\n text = blankSourceComments(text);\n const opening = `${callee}(`;\n for (let at = text.indexOf(opening); at >= 0; at = text.indexOf(opening, at + opening.length)) {\n const from = at + opening.length;\n const brace = text.indexOf('{', from);\n const close = text.indexOf(')', from);\n const end = brace >= 0 && (close < 0 || brace < close) ? brace : close;\n if (end < 0) continue;\n const head = text.slice(from, end);\n const matchesAll = declarations.every((declaration) => refSpellings(declaration).some((spelling) => {\n const escaped = spelling.replace(/[.*+?^${}()|[\\]\\\\]/gu, '\\\\$&');\n return new RegExp(`(?<![A-Za-z0-9_])${escaped}(?![A-Za-z0-9_])`, 'u').test(head);\n }));\n if (matchesAll) return true;\n }\n return false;\n}\n\n/**\n * The canonical IDENTITY of a shell entry (#1538) — what a placement decision and the resolved shell\n * are compared by, so that neither side's SPELLING decides the answer.\n *\n * The two sides spell one thing differently, measured on the #1273 run: the plan says\n * `reading-item` / `LIST`, the tree `readingItem` / `list`; the plan names a view `view-library-home`,\n * the tree `library-home`. Each part is lower-cased with every non-alphanumeric removed, and a view is compared by\n * `placementViewIdentity`, the one view identity the coherence report also uses (#3066, so the two cannot disagree).\n *\n * `undefined` for an entry no placement decision can name (an engine page, a custom component, the\n * settings launcher that opens the hub at its default section).\n */\nfunction identityPart(value: string): string {\n return value.toLowerCase().replace(/[^a-z0-9]/gu, '');\n}\n\nexport function placementSubjectShellIdentity(subject: PlacementSubject): string {\n switch (subject.kind) {\n case PlacementSubjectKind.RESOURCE_OPERATION:\n return `resource-operation:${identityPart(subject.resourceRef)}:${identityPart(subject.operation)}`;\n case PlacementSubjectKind.APP_VIEW:\n return `view:${placementViewIdentity(subject.viewRef)}`;\n case PlacementSubjectKind.ENGINE_SETTINGS_DESTINATION:\n return `settings-destination:${identityPart(subject.destinationRef)}`;\n default: {\n const unhandled: never = subject;\n throw new Error(`Unhandled placement subject ${JSON.stringify(unhandled)}.`);\n }\n }\n}\n\n/** A launcher entry as the shell oracle reports it (kind plus its addressing fields). */\nexport interface ShellLauncherEntry {\n readonly kind: string;\n readonly resourceType?: string;\n readonly operation?: string;\n readonly viewRef?: string;\n readonly sectionRef?: string;\n}\n\n/**\n * Every identity a launcher answers to (#3204): {@link launcherShellIdentity}, and for a resource operation also the one\n * spelled with the singular of its resource type. A placement plan names a resource as the domain plan does, in the\n * singular (`pipeline-stage-setting`), while the shell carries the registered type (`pipelineStageSettings`): on reference\n * run 42782969940 the settings hub carried all four planned lists and its probe reported them missing. The singular of a\n * word that is not a regular plural is the word itself, so an exact match is unchanged.\n */\nexport function launcherShellIdentities(entry: ShellLauncherEntry): readonly string[] {\n const identity = launcherShellIdentity(entry);\n if (identity === undefined) return [];\n if (entry.kind !== LauncherItemTargetKind.RESOURCE_OPERATION || !entry.resourceType || !entry.operation) return [identity];\n const singular = `resource-operation:${singularWord(identityPart(entry.resourceType))}:${identityPart(entry.operation)}`;\n return singular === identity ? [identity] : [identity, singular];\n}\n\nexport function launcherShellIdentity(entry: ShellLauncherEntry): string | undefined {\n if (entry.kind === LauncherItemTargetKind.RESOURCE_OPERATION && entry.resourceType && entry.operation) {\n return `resource-operation:${identityPart(entry.resourceType)}:${identityPart(entry.operation)}`;\n }\n if (entry.kind === LauncherItemTargetKind.VIEW && entry.viewRef) return `view:${placementViewIdentity(entry.viewRef)}`;\n if (entry.kind === LauncherItemTargetKind.SETTINGS_SECTION && entry.sectionRef) {\n return `settings-destination:${identityPart(entry.sectionRef)}`;\n }\n return undefined;\n}\n\nexport function settingsDestinationShellIdentity(destinationRef: string): string {\n return `settings-destination:${identityPart(destinationRef)}`;\n}\n\n/** The config file a shell surface is authored in — the application half of what a landing must see committed. */\nexport function shellSurfaceConfigFile(surface: PlacementSurface): string {\n return SHELL_PLACEMENT_CONFIG_FILE[surface];\n}\n\n/**\n * The file a module's own shell contribution lives in — the module half. The same root rule the\n * `frontend-artifact-placement-info` behavior uses (`engine` under `frontend/src/engine`, every other\n * module under `frontend/src/modules/<id>`), with the file name the skeleton and the `add-module`\n * scenario both write. A module that contributes from a differently named file is not seen as\n * committed, so its surface does not land — visible in the build record, never a silent pass.\n */\nexport function shellModuleContributionFile(moduleId: string): string {\n return moduleId === 'engine'\n ? 'frontend/src/engine/app-shell.module.frontend.ts'\n : `frontend/src/modules/${moduleId}/app-shell.module.frontend.ts`;\n}\n\n/**\n * Where an application enables billing (`billing: { enabled, providerRef }`): the backend configuration every application\n * is scaffolded with, and the file the `configure-billing` skill names for the switch.\n */\nexport const BACKEND_BILLING_SWITCH_FILE = 'backend-api/src/saas-config.backend.ts';\n\n/** What the committed backend configuration says about the billing switch (#3285). */\nexport enum BackendBillingSwitchState {\n /** `billing.enabled` is the literal `true`. */\n ENABLED = 'ENABLED',\n /** The literal `false`. */\n DISABLED = 'DISABLED',\n /** No `billing.enabled` member, or no `billing` section (the scaffold writes none), or the file is not committed. */\n ABSENT = 'ABSENT',\n /** A value no lexical read can evaluate (`enabled: process.env.BILLING === 'on'`): said nothing about, never guessed. */\n UNDETERMINED = 'UNDETERMINED',\n}\n\n/**\n * Read the billing switch from the committed backend configuration's text (`undefined` = not committed). Lexical, with\n * comments blanked, like every declaration reader here: the `billing` object's own top-level `enabled` member, never one\n * nested deeper or named in prose.\n */\nexport function readBackendBillingSwitch(text: string | undefined): BackendBillingSwitchState {\n if (text === undefined) return BackendBillingSwitchState.ABSENT;\n const code = blankSourceComments(text);\n for (const match of code.matchAll(/(?<![A-Za-z0-9_$.])(['\"]?)billing\\1\\s*:\\s*\\{/gu)) {\n const open = match.index! + match[0].length - 1;\n const close = matchingBrace(code, open);\n if (close < 0) continue;\n const topLevel = blankNestedBrackets(code.slice(open + 1, close));\n const enabled = /(?<![A-Za-z0-9_$])(['\"]?)enabled\\1\\s*:\\s*([^,\\n}]*)/u.exec(topLevel);\n if (enabled === null) continue;\n const value = enabled[2]!.trim();\n if (value === 'true') return BackendBillingSwitchState.ENABLED;\n if (value === 'false') return BackendBillingSwitchState.DISABLED;\n return BackendBillingSwitchState.UNDETERMINED;\n }\n return BackendBillingSwitchState.ABSENT;\n}\n\n/** `body` with the contents of every nested bracket blanked, so only its own top-level members remain readable. */\nfunction blankNestedBrackets(body: string): string {\n let depth = 0;\n let out = '';\n for (const char of body) {\n if (char === '{' || char === '[' || char === '(') depth += 1;\n out += depth > 0 ? ' ' : char;\n if ((char === '}' || char === ']' || char === ')') && depth > 0) depth -= 1;\n }\n return out;\n}\n\n/**\n * A fact about a LANDED task that its landing does not cover, said beside the landing and never instead of it (#3285).\n * A closed vocabulary: each member is a different unfinished state with its own remedy.\n */\nexport enum BuildTaskLandingAdvisoryKind {\n /**\n * The billing catalogue is committed and the backend does not enable billing, so the running application never syncs or\n * sells it (app-creation-test-007: `build-task-billing-catalogue` landed and every restart withheld the Stripe webhook).\n */\n BILLING_CATALOGUE_NOT_SERVED = 'BILLING_CATALOGUE_NOT_SERVED',\n}\n\n/** One advisory on a landed task: what is unfinished, the setting and file that finish it, and the switch's state. */\nexport interface BuildTaskLandingAdvisory {\n readonly kind: BuildTaskLandingAdvisoryKind;\n readonly setting: string;\n readonly settingPath: string;\n readonly switchState: BackendBillingSwitchState;\n /** One sentence for a reader: why it matters and what turning the switch on also needs. */\n readonly detail: string;\n}\n\n/** Whether a task writes products of the billing catalogue — the tasks whose landing the billing switch qualifies (#3285). */\nexport function buildTaskProducesBillingCatalogue(task: BuildPlanTask): boolean {\n return task.produces.some((product) => product.kind === BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT);\n}\n\n/**\n * The advisories owed by a task that LANDED (#3285). A MARK, never a refusal: the task stays landed and the build goes on,\n * per `application-creation-directive.md` — the catalogue is TRUE (its products exist) and UNFINISHED (nothing serves\n * them). Refusing the landing instead was rejected twice over: the remedy is a person's (the provider secret, which only\n * they can supply), and the switch turned on without that secret FAILS backend startup (`SECRET_MISSING`), so a landing\n * that required it would push the build into crashing its own backend.\n *\n * Derived from the committed tree at read time and stored nowhere, so it clears by itself the moment `billing.enabled:\n * true` is committed. An UNDETERMINED switch says nothing: an advisory that may be false is not one.\n */\nexport function resolveBuildTaskLandingAdvisories(\n task: BuildPlanTask,\n committed: { readonly backendBillingConfigText: string | undefined },\n): readonly BuildTaskLandingAdvisory[] {\n if (!buildTaskProducesBillingCatalogue(task)) return [];\n const switchState = readBackendBillingSwitch(committed.backendBillingConfigText);\n if (switchState !== BackendBillingSwitchState.DISABLED && switchState !== BackendBillingSwitchState.ABSENT) return [];\n return [{\n kind: BuildTaskLandingAdvisoryKind.BILLING_CATALOGUE_NOT_SERVED,\n setting: 'billing.enabled',\n settingPath: BACKEND_BILLING_SWITCH_FILE,\n switchState,\n detail: `The catalogue is committed, and \\`billing.enabled\\` is ${switchState === BackendBillingSwitchState.DISABLED ? 'false' : 'not set'} in `\n + `${BACKEND_BILLING_SWITCH_FILE}, so the backend never syncs or sells it. Before turning it on, set \\`billing.providerRef\\` and the `\n + \"provider's secrets (`wildo secrets set STRIPE_SECRET_KEY`, `STRIPE_WEBHOOK_SECRET`): the switch alone fails backend startup. \"\n + 'The configure-billing skill lists the whole chain.',\n }];\n}\n"]}