@wildo-ai/saas-specifications 1.1.8 → 1.1.9

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 (147) hide show
  1. package/dist/esm/_core/application-specification-family-identity.schemas.d.ts +9 -0
  2. package/dist/esm/_core/application-specification-family-identity.schemas.d.ts.map +1 -1
  3. package/dist/esm/_core/application-specification-family-identity.schemas.js +9 -0
  4. package/dist/esm/_core/application-specification-family-identity.schemas.js.map +1 -1
  5. package/dist/esm/_core/brand/brand-name-choice.d.ts +136 -0
  6. package/dist/esm/_core/brand/brand-name-choice.d.ts.map +1 -0
  7. package/dist/esm/_core/brand/brand-name-choice.js +193 -0
  8. package/dist/esm/_core/brand/brand-name-choice.js.map +1 -0
  9. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.d.ts +108 -0
  10. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.d.ts.map +1 -0
  11. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.js +59 -0
  12. package/dist/esm/_core/brand/brand-name-screening-generation.schemas.js.map +1 -0
  13. package/dist/esm/_core/brand/brand-name-screening-validation.d.ts +51 -0
  14. package/dist/esm/_core/brand/brand-name-screening-validation.d.ts.map +1 -0
  15. package/dist/esm/_core/brand/brand-name-screening-validation.js +157 -0
  16. package/dist/esm/_core/brand/brand-name-screening-validation.js.map +1 -0
  17. package/dist/esm/_core/brand/brand-name-screening-view.d.ts +120 -0
  18. package/dist/esm/_core/brand/brand-name-screening-view.d.ts.map +1 -0
  19. package/dist/esm/_core/brand/brand-name-screening-view.js +47 -0
  20. package/dist/esm/_core/brand/brand-name-screening-view.js.map +1 -0
  21. package/dist/esm/_core/brand/brand-name-screening.family-aspects.d.ts +3 -0
  22. package/dist/esm/_core/brand/brand-name-screening.family-aspects.d.ts.map +1 -0
  23. package/dist/esm/_core/brand/brand-name-screening.family-aspects.js +42 -0
  24. package/dist/esm/_core/brand/brand-name-screening.family-aspects.js.map +1 -0
  25. package/dist/esm/_core/brand/brand-name-screening.schemas.d.ts +310 -0
  26. package/dist/esm/_core/brand/brand-name-screening.schemas.d.ts.map +1 -0
  27. package/dist/esm/_core/brand/brand-name-screening.schemas.js +272 -0
  28. package/dist/esm/_core/brand/brand-name-screening.schemas.js.map +1 -0
  29. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts +23 -0
  30. package/dist/esm/_core/brand/brand-snapshot.schemas.d.ts.map +1 -1
  31. package/dist/esm/_core/brand/brand-snapshot.schemas.js +32 -0
  32. package/dist/esm/_core/brand/brand-snapshot.schemas.js.map +1 -1
  33. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts +10 -0
  34. package/dist/esm/_core/build-plan/build-plan-task-graph-generation.schemas.d.ts.map +1 -1
  35. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts +57 -0
  36. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.d.ts.map +1 -1
  37. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js +89 -0
  38. package/dist/esm/_core/build-plan/build-plan-task-graph-validation.js.map +1 -1
  39. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts +79 -19
  40. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.d.ts.map +1 -1
  41. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js +61 -11
  42. package/dist/esm/_core/build-plan/build-plan-task-graph.schemas.js.map +1 -1
  43. package/dist/esm/_core/build-plan/build-plan.family-aspects.d.ts.map +1 -1
  44. package/dist/esm/_core/build-plan/build-plan.family-aspects.js +18 -2
  45. package/dist/esm/_core/build-plan/build-plan.family-aspects.js.map +1 -1
  46. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts +28 -4
  47. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.d.ts.map +1 -1
  48. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js +53 -5
  49. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.js.map +1 -1
  50. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts +24 -4
  51. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.d.ts.map +1 -1
  52. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js +64 -4
  53. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot-validation.js.map +1 -1
  54. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts +59 -0
  55. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.d.ts.map +1 -1
  56. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.js +64 -0
  57. package/dist/esm/_core/business-model-lite/business-model-lite-snapshot.schemas.js.map +1 -1
  58. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts +3 -0
  59. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.d.ts.map +1 -1
  60. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js +16 -0
  61. package/dist/esm/_core/business-model-lite/pricing-plan.schemas.js.map +1 -1
  62. package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts +7 -1
  63. package/dist/esm/_core/capability-composition/capability-composition-validation.d.ts.map +1 -1
  64. package/dist/esm/_core/capability-composition/capability-composition-validation.js +34 -28
  65. package/dist/esm/_core/capability-composition/capability-composition-validation.js.map +1 -1
  66. package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts +75 -4
  67. package/dist/esm/_core/capability-composition/capability-composition.schemas.d.ts.map +1 -1
  68. package/dist/esm/_core/capability-composition/capability-composition.schemas.js +62 -4
  69. package/dist/esm/_core/capability-composition/capability-composition.schemas.js.map +1 -1
  70. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.d.ts.map +1 -1
  71. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js +7 -0
  72. package/dist/esm/_core/compliance-documents/computed-document-facts.schemas.js.map +1 -1
  73. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts +153 -0
  74. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.d.ts.map +1 -0
  75. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js +241 -0
  76. package/dist/esm/_core/compliance-documents/launch-blockers.schemas.js.map +1 -0
  77. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.d.ts +8 -1
  78. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.d.ts.map +1 -1
  79. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js +19 -1
  80. package/dist/esm/_core/domain-plan/domain-plan-output-set-validation.js.map +1 -1
  81. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts +61 -3
  82. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.d.ts.map +1 -1
  83. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js +73 -3
  84. package/dist/esm/_core/domain-plan/domain-plan-output-set.schemas.js.map +1 -1
  85. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js +1 -1
  86. package/dist/esm/_core/experience-plan/experience-plan.family-aspects.js.map +1 -1
  87. package/dist/esm/_core/experience-plan/experience-plan.schemas.d.ts.map +1 -1
  88. package/dist/esm/_core/experience-plan/experience-plan.schemas.js +1 -0
  89. package/dist/esm/_core/experience-plan/experience-plan.schemas.js.map +1 -1
  90. package/dist/esm/_core/family-aspects.registry.d.ts.map +1 -1
  91. package/dist/esm/_core/family-aspects.registry.js +2 -0
  92. package/dist/esm/_core/family-aspects.registry.js.map +1 -1
  93. package/dist/esm/_core/index.d.ts +6 -0
  94. package/dist/esm/_core/index.d.ts.map +1 -1
  95. package/dist/esm/_core/index.js +6 -0
  96. package/dist/esm/_core/index.js.map +1 -1
  97. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.d.ts.map +1 -1
  98. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js +5 -1
  99. package/dist/esm/_core/integration-plan/integration-plan.family-aspects.js.map +1 -1
  100. package/dist/esm/_core/market/market-icp.schemas.d.ts +7 -0
  101. package/dist/esm/_core/market/market-icp.schemas.d.ts.map +1 -1
  102. package/dist/esm/_core/market/market-icp.schemas.js +7 -0
  103. package/dist/esm/_core/market/market-icp.schemas.js.map +1 -1
  104. package/dist/esm/_core/market/market-language-coverage.d.ts +62 -0
  105. package/dist/esm/_core/market/market-language-coverage.d.ts.map +1 -0
  106. package/dist/esm/_core/market/market-language-coverage.js +48 -0
  107. package/dist/esm/_core/market/market-language-coverage.js.map +1 -0
  108. package/dist/esm/_core/market/market-snapshot-validation.js +2 -2
  109. package/dist/esm/_core/market/market-snapshot-validation.js.map +1 -1
  110. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts +63 -2
  111. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.d.ts.map +1 -1
  112. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js +73 -5
  113. package/dist/esm/application-creation/application-creator-inputs.application-creation.schemas.js.map +1 -1
  114. package/dist/esm/application-creation/application-line.application-creation.schemas.d.ts.map +1 -1
  115. package/dist/esm/application-creation/application-line.application-creation.schemas.js +2 -0
  116. package/dist/esm/application-creation/application-line.application-creation.schemas.js.map +1 -1
  117. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts +28 -0
  118. package/dist/esm/application-creation/playbooks.application-creation.schemas.d.ts.map +1 -1
  119. package/dist/esm/application-creation/playbooks.application-creation.schemas.js +19 -1
  120. package/dist/esm/application-creation/playbooks.application-creation.schemas.js.map +1 -1
  121. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts +1 -0
  122. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.d.ts.map +1 -1
  123. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js +1 -0
  124. package/dist/esm/application-creation/structured-artifact-landing.application-creation.schemas.js.map +1 -1
  125. package/dist/esm/application-creation.exports.d.ts +7 -0
  126. package/dist/esm/application-creation.exports.d.ts.map +1 -1
  127. package/dist/esm/application-creation.exports.js +7 -0
  128. package/dist/esm/application-creation.exports.js.map +1 -1
  129. package/dist/esm/assurance/application-risk-signals.derivations.d.ts +20 -0
  130. package/dist/esm/assurance/application-risk-signals.derivations.d.ts.map +1 -1
  131. package/dist/esm/assurance/application-risk-signals.derivations.js +81 -0
  132. package/dist/esm/assurance/application-risk-signals.derivations.js.map +1 -1
  133. package/dist/esm/assurance/governed-document-release.d.ts +9 -0
  134. package/dist/esm/assurance/governed-document-release.d.ts.map +1 -1
  135. package/dist/esm/assurance/governed-document-release.js +9 -0
  136. package/dist/esm/assurance/governed-document-release.js.map +1 -1
  137. package/dist/esm/companion-exports.d.ts +10 -1
  138. package/dist/esm/companion-exports.d.ts.map +1 -1
  139. package/dist/esm/companion-exports.js.map +1 -1
  140. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts +1 -0
  141. package/dist/esm/engine/infrastructure/resources/job-executions.resource.specification.d.ts.map +1 -1
  142. package/package.json +8 -8
  143. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts +0 -24
  144. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.d.ts.map +0 -1
  145. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js +0 -24
  146. package/dist/esm/assurance/__tests__/authority-evaluation-instant.fixture.js.map +0 -1
  147. package/dist/tsconfig.build.tsbuildinfo +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"build-plan-task-graph.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan-task-graph.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,6GAA6G;AAC7G,+GAA+G;AAC/G,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAExF,OAAO,EAAE,4BAA4B,EAAE,MAAM,mEAAmE,CAAC;AACjH,OAAO,EAAE,gBAAgB,EAAE,MAAM,0C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,CAAC,CAAC;IACH,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE;QAClC,IAAI,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC,YAAY,EAAE,iBAAiB,EAAE,EAAE;YACpE,IAAI,YAAY,KAAK,IAAI,CAAC,OAAO,EAAE,CAAC;gBAClC,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,IAAI,CAAC,OAAO,kCAAkC,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,CAAC,EAAE,CAAC,CAAC;YAClL,CAAC;iBAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;gBACnC,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,IAAI,CAAC,OAAO,oCAAoC,YAAY,GAAG,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,CAAC,EAAE,CAAC,CAAC;YACnM,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,0DAA0D","sourcesContent":["import { z } from 'zod';\n// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —\n// never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.\nimport '@wildo-ai/zod-decorators';\n\nimport { INBOUND_HANDLER_REF_PATTERN, InboundChannelKind } from '@wildo-ai/saas-models';\n\nimport { MetaWorkflow_FunctionalTopic } from '../../application-creation/playbooks.application-creation.schemas';\nimport { PlacementSurface } from '../placement-plan/placement-plan.schemas';\n\n/**\n * @wildo_source:part:start build-plan.task-graph.config facet:layer:specification facet:family:build-plan\n *\n * Versioning for the build-plan task-graph payload format itself. `V1` —\n * initial shape (one ordered `tasks` collection with typed targets and\n * declared prerequisites). The shape grows additively across versions; the\n * `version` field is the explicit marker for consumers that branch on era.\n */\nexport enum BuildPlanTaskGraphVersion {\n V1 = 'v1',\n}\n\n/** Stable prefix every build-plan task ref carries; the trusted runtime stamps it, a provider supplies only the slug. */\nexport const BUILD_PLAN_TASK_REF_PREFIX = 'build-task-';\n\n/**\n * WHAT a build task builds — a closed vocabulary, because the host derives\n * the physical mutation scope and verification policy from the target kind\n * and the model must never author those powers through free text.\n */\nexport enum BuildPlanTaskTargetKind {\n /** A whole application module (its shared-lib registration, backend module and frontend module skeletons). */\n MODULE = 'MODULE',\n /** One build stage of one resource: schema → config → ui-behavior → spec. */\n RESOURCE_STAGE = 'RESOURCE_STAGE',\n /** One relationship between two resources. */\n RELATIONSHIP = 'RELATIONSHIP',\n /** A companion-owned deterministic generation step (labels, email templates, logo or database migrations) interleaved by the build loop, never a coding-agent run. */\n COMPANION_GENERATION_STEP = 'COMPANION_GENERATION_STEP',\n /**\n * Authoring one SHELL SURFACE's placement configuration from the accepted\n * placement plan — the settings rail, the sidebar, the user menu or the\n * command palette.\n *\n * Its own kind rather than a reuse of the neighbours, because none of them is\n * true of it: it is not a MODULE or a RESOURCE_STAGE (it is application-wide\n * and belongs to no resource), not a RELATIONSHIP, and emphatically not a\n * COMPANION_GENERATION_STEP — that kind is documented as \"never a coding-agent\n * run\" and writing `settings-hub.config.ts` is exactly a coding-agent run.\n * Borrowing one would hand the host the wrong mutation scope and the wrong\n * verification, which is what the closed vocabulary exists to prevent.\n */\n SHELL_PLACEMENT = 'SHELL_PLACEMENT',\n /*\n * THE NON-RESOURCE SURFACES (#1490). Until 2026-09-22 the five kinds above were the whole\n * vocabulary, and every one of them is about a resource or the shell placement of one. The\n * decompose method meanwhile told the planner to emit tasks for views, navigation, the design\n * system, custom components, PDF templates, workers, minions, providers, the website and the\n * documentation — surfaces the framework's own composition scenarios and 85 of its 111 skills\n * already build. A task for any of them had no kind to declare, so it either declared none\n * (landing as RAN-not-PROVEN forever) or borrowed `MODULE` with a product the module scope could\n * not prove. The members below are those surfaces, one per write scope the host can derive.\n */\n /**\n * The FRONTEND and SPECIFICATION layers of one module — its composite, custom and chart views,\n * its custom components and their specifications.\n *\n * Narrower than `MODULE` on purpose: a view task never touches `shared-lib` or `backend-api`, so\n * handing it the four-layer scope also hands it four typechecks and the FK sweep for a change\n * that can only break the frontend and the specifications package.\n */\n MODULE_FRONTEND = 'MODULE_FRONTEND',\n /**\n * The BACKEND layer of one module beside its shared-lib declarations — PDF templates and their\n * bindings, backend addons (services, controllers, flows-actors), email definitions.\n *\n * Shared-lib is in scope because a PDF template is bound to a resource FIELD the config declares\n * (`generatedSummaryPdf`), and a backend addon usually declares its contract there first.\n */\n MODULE_BACKEND = 'MODULE_BACKEND',\n /**\n * ONE application-wide frontend configuration surface — navigation, the design system, the app\n * shell's composition, the global views — named by {@link FrontendConfigSurface}.\n *\n * Distinct from {@link SHELL_PLACEMENT}, which authors the placement plan's decisions into the\n * shell files: a placement puts a decided subject in a decided group, while this kind COMPOSES\n * the surface itself (which sidebar sections exist, which transitions the primary zone uses,\n * which palette the product carries). Same file for `APP_SHELL`, different question.\n */\n APPLICATION_FRONTEND_CONFIG = 'APPLICATION_FRONTEND_CONFIG',\n /** The marketing website workspace (`website/`), composed by the `add-website` scenario. Pages and sections are its products. */\n WEBSITE = 'WEBSITE',\n /**\n * The technical-documentation workspace (`technical-doc/`) and the specification package's\n * `technical-documentation/` declarations that feed it. Its generated tree is never written by a\n * task: the companion publishes into it, and the coding policy prohibits it by prefix.\n */\n TECHNICAL_DOCUMENTATION = 'TECHNICAL_DOCUMENTATION',\n /** One worker package (`workers/<workerRef>/`), Node or Rust, plus its declaration in the SaaS config. */\n WORKER = 'WORKER',\n /** One cron minion package (`minions/<minionRef>/`) plus its declaration in the SaaS config. */\n MINION = 'MINION',\n /**\n * Declaring one provider in the application — the SaaS config's provider scopes, the backend\n * package dependency, the frontend provider module and its companion contribution.\n *\n * Application-wide by construction: a provider binding names no module, and the four files it\n * may touch are the same for every provider.\n */\n PROVIDER_BINDING = 'PROVIDER_BINDING',\n /**\n * The application's BILLING CATALOGUE — the `ProductDefinition[]` in `shared-lib/src/engine/product.ts`\n * (and the product specifications that document it), which the backend syncs to the billing\n * provider and the public website reads for its pricing page (#1835).\n *\n * Its own kind because none of the others is true of it: the catalogue is application-wide (a plan\n * belongs to no module), it lives in the shared library's ENGINE module that no `MODULE_*` scope\n * reaches, and before it existed a journey-built application reached its website with an EMPTY\n * catalogue, so the website re-typed the business model's prices by hand.\n */\n BILLING_CATALOG = 'BILLING_CATALOG',\n}\n\n/**\n * WHICH application-wide frontend configuration surface a task composes — one file each, in\n * `frontend/src/config/`, and the coding policy resolves the member to that file exactly as\n * `SHELL_PLACEMENT` resolves a `PlacementSurface`.\n *\n * Its own vocabulary rather than a reuse of `PlacementSurface`: a placement surface is WHERE a\n * subject sits in the shell (settings hub, sidebar, user menu, command palette), and three of\n * those live in one file. A configuration surface is WHICH FILE a composition task authors, and\n * navigation and the design system are not places anything is placed.\n */\nexport enum FrontendConfigSurface {\n /** `frontend/src/config/navigation.config.ts` — zones, transitions, overlay appearance. */\n NAVIGATION = 'NAVIGATION',\n /** `frontend/src/config/design-system.config.ts` — palette, typography, shell appearance from the brand's visual tone. */\n DESIGN_SYSTEM = 'DESIGN_SYSTEM',\n /** `frontend/src/config/app-shell.config.ts` — top bar, sidebar sections, quick switcher: the shell's COMPOSITION, not a placement into it. */\n APP_SHELL = 'APP_SHELL',\n /** `frontend/src/config/global-views.config.ts` — the application-level launcher and view registrations. */\n GLOBAL_VIEWS = 'GLOBAL_VIEWS',\n}\n\n/**\n * The two shapes of guidance an application gives a person, and the file each is declared in.\n *\n * They are distinct because they are found differently: an onboarding DOCUMENT is embedded in a\n * screen (`EmbedOnboarding`) and is there whenever that screen is, while a guidance FLOW is started\n * by an event and shows once. Both are listed on the owning frontend module — `onboardingViews` and\n * `guidanceFlows`. Each kind has a CONVENTIONAL definitions file, which the authoring skill teaches\n * and a landing probe reads for the declared ref (alongside the module's `index.ts`, where a small\n * module may declare inline). A convention for generated applications: a hand-authored application\n * may keep its declarations elsewhere, and then simply is not probed by a build plan.\n */\nexport enum ApplicationGuidanceKind {\n /** `frontend/src/modules/<m>/app-level-views/onboarding-views.definitions.ts` — an embedded onboarding document. */\n ONBOARDING_DOCUMENT = 'ONBOARDING_DOCUMENT',\n /** `frontend/src/modules/<m>/app-level-views/guidance-flows.definitions.ts` — a triggered guidance flow. */\n GUIDANCE_FLOW = 'GUIDANCE_FLOW',\n}\n\n/**\n * The two worker runtimes the framework composes (`add-worker-node`, `add-worker-rust`). The\n * runtime decides the entry file a landing probe reads and whether a typecheck exists to run: a\n * Node worker is verified by its package typecheck, a Rust worker has no TypeScript to check and\n * the policy says so rather than inventing a command.\n *\n * Not the SaaS config's `WorkerRuntime`, which is a free-form `{ type, language }` pair an\n * application authors for deployment; this is the closed set a creation run can COMPOSE.\n */\nexport enum BuildPlanWorkerRuntime {\n NODE = 'NODE',\n RUST = 'RUST',\n}\n\n/**\n * WHERE a provider is bound — which runtime owner's scope its declaration lands in. Each member\n * is a different file, so a probe and a write grant both derive from it.\n *\n * Named after the SaaS config's own scope keys (`providers.scopes.backend`, `.companion`,\n * `.frontendServices.app`, `.frontendServices.website`), which the `add-provider` and\n * `add-file-picker-provider` scenarios write. Minion and worker scopes are deliberately absent:\n * a provider reaching a minion is declared on that minion's own `providers` block and belongs to\n * the {@link BuildPlanTaskTargetKind.MINION} task that builds it.\n */\nexport enum ProviderBindingScope {\n BACKEND = 'BACKEND',\n COMPANION = 'COMPANION',\n FRONTEND_APP = 'FRONTEND_APP',\n WEBSITE = 'WEBSITE',\n}\n\n/** The per-resource build stages, in their fixed order. */\nexport enum BuildPlanResourceStage {\n SCHEMA = 'SCHEMA',\n CONFIG = 'CONFIG',\n UI_BEHAVIOR = 'UI_BEHAVIOR',\n SPEC = 'SPEC',\n}\n\nconst SlugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\n\n/**\n * The key of the domain-plan MODULE a task targets or produces (`deals`, `tasks-manager`). Same\n * slug grammar as the other keys, declared as its own schema because it names one thing — a\n * module — where the other slugs name resources, relationships, steps, workers and products.\n */\nconst ModuleRefSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\n\n/**\n * The governed document a task produces, named as a COMPLIANCE-DOCUMENT CANDIDATE names it:\n * `document:<namespace>.<id>`, e.g. `document:public.privacy-notice`.\n *\n * **This field was `SlugSchema`, and a slug cannot name a governed document — so until 2026-09-16 no\n * build plan in any application could declare a document the engine catalog defines.** A slug forbids\n * the colon and the dot, the catalog's definitions are `document-definition:public.privacy-notice`,\n * and `selectAssuranceDocumentBlueprintForDocumentRef` joins the two namespaces by exact suffix — so\n * every authored `documentRef` resolved to NO blueprint, and a blueprint is what says which sections,\n * facts and claim guards the document owes. The two vocabularies were disjoint by construction.\n *\n * The cost is measured rather than theoretical. Wonder CRM's plan declares two such products\n * (`gdpr-data-handling-governance`, `terminal-access-governance`), neither of which names anything;\n * the first was dispatched, and its agent spent a full turn establishing — with a positive control —\n * that the document does not exist and could only be invented, which the authoring skill forbids.\n *\n * The bare slug is STILL ACCEPTED, and that is deliberate rather than tidiness left undone: tightening\n * this to the namespaced form alone would make every already-accepted plan carrying one fail to parse,\n * and a build plan that cannot be READ stops the whole lane — the gate\n * `application-creation-directive.md` forbids, for a task nobody can fix by re-running anything. A slug\n * simply resolves to no blueprint, so the dispatcher skips that task with a message naming the ref,\n * and the rest of the plan proceeds.\n */\nconst DocumentProductRefSchema = z.union([\n z.string().regex(/^document:[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z0-9]+(?:-[a-z0-9]+)*$/),\n SlugSchema,\n]);\n/**\n * A skill ref is the skill's FOLDER id in the app-knowledge catalog, which is\n * also its `SKILL.md` frontmatter `name` — one id, kebab-case. The host refuses\n * any skill name outside `[a-z0-9-]+`, so a ref that does not match this shape\n * can never resolve to an installed skill.\n */\nconst SkillRefSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\nconst NonEmptyStringSchema = z.string().trim().min(1);\n\n/**\n * WHAT a build task PRODUCES — the artifact whose presence in the application\n * proves the task is done.\n *\n * **This is not `target`, and the difference is the whole reason it exists.**\n * `target` is a WRITE SCOPE: the host turns it into the path prefixes a run may\n * mutate, and several tasks legitimately share one. `produces` is a PRODUCT\n * IDENTITY: it says which artifact this task, and no other, is accountable for.\n *\n * Measured 2026-09-10 on Wonder CRM (issue #597): `build-task-pipeline-view`\n * and `build-task-deal-follow-through-operation` carry BYTE-IDENTICAL targets\n * (`{ kind: MODULE, moduleRef: 'deals' }`), and 7 of that plan's 42 tasks share\n * 3 targets. Landing had been answered by narrowing the target to a module\n * DIRECTORY — which `wildo compose` commits on day one, and which cannot tell\n * two tasks apart even in principle. The loop reported 40 of 42 tasks landed\n * while no coding task had ever run, so `dispatch-next` skipped every one of\n * them and the phase-advance gate read a build that was all but complete.\n *\n * Like `target`, this stays SEMANTIC: a product names a resource, a field, a\n * relationship or a view — never a path, and never a command. The host owns the\n * translation from a product to the physical question it asks of the working\n * tree, exactly as it owns the translation from a target kind to path prefixes.\n * A model that could author the path could author its own mutation scope.\n */\nexport enum BuildPlanTaskProductKind {\n /**\n * Named fields on one resource's schema.\n *\n * The shape an ENRICHMENT task needs, and the reason a product cannot always\n * be \"a file\": every resource file already exists, written by the scaffold\n * with its self-described STARTER shape, so file presence answers nothing.\n * The FIELDS are what the task adds.\n */\n RESOURCE_SCHEMA_FIELDS = 'RESOURCE_SCHEMA_FIELDS',\n /**\n * One resource's declared operations — its registry presence, named by the verbs it gains.\n *\n * The VERBS, not the config file: `<r>.resources-config.ts` is written by the scaffold, so its\n * existence is satisfied before any task runs. That is the exact shape of the defect this\n * vocabulary replaces, and a kind that reproduced it would be worse than no kind at all.\n */\n RESOURCE_REGISTRATION = 'RESOURCE_REGISTRATION',\n /** One resource's frontend ui-behavior. */\n RESOURCE_UI_BEHAVIOR = 'RESOURCE_UI_BEHAVIOR',\n /**\n * One resource's specification, named by the fields it documents.\n *\n * The FIELDS, for the same reason as {@link RESOURCE_REGISTRATION}: every resource is scaffolded\n * with a `*.resource.specification.ts` documenting only the starter shape, so file existence\n * proves nothing about the task that was meant to enrich it.\n */\n RESOURCE_SPECIFICATION = 'RESOURCE_SPECIFICATION',\n /** One relationship edge between two resources, named by the domain plan's `relationshipRef`. */\n RESOURCE_RELATIONSHIP = 'RESOURCE_RELATIONSHIP',\n /** One named custom operation on one resource. */\n RESOURCE_OPERATION = 'RESOURCE_OPERATION',\n /** One named application-level view. */\n APPLICATION_VIEW = 'APPLICATION_VIEW',\n /** One named governed application document (a compliance notice, a governance statement). */\n APPLICATION_DOCUMENT = 'APPLICATION_DOCUMENT',\n /** One application module, registered across the layer registries under one module identity. */\n APPLICATION_MODULE = 'APPLICATION_MODULE',\n /*\n * THE NON-RESOURCE PRODUCTS (#1490). Each names an artifact of a surface the five target kinds\n * above `MODULE_FRONTEND` could not express, and each is probed by the host from committed bytes —\n * a declaration in the one file that registers it, never a directory a scenario already wrote.\n */\n /**\n * Named declarations in ONE application-wide frontend configuration file — a sidebar section\n * ref the app shell gains, a zone the navigation config declares, a token the design system sets.\n *\n * The DECLARATIONS, never the file: every `frontend/src/config/*.config.ts` is written by\n * `wildo init`, so its presence is true before any task runs. Same reasoning as\n * {@link RESOURCE_SCHEMA_FIELDS}, one level up.\n */\n APPLICATION_FRONTEND_CONFIG = 'APPLICATION_FRONTEND_CONFIG',\n /**\n * One composite view of one resource — the cross-resource surface a resource's ui-behavior\n * declares under `compositeViews`. Distinct from {@link APPLICATION_VIEW}, which is\n * application-level and owned by a module rather than a resource.\n */\n RESOURCE_COMPOSITE_VIEW = 'RESOURCE_COMPOSITE_VIEW',\n /** One custom operation or execution view of one resource, bound in its ui-behavior. */\n RESOURCE_CUSTOM_VIEW = 'RESOURCE_CUSTOM_VIEW',\n /** One chart view of one resource, declared under its ui-behavior's `chartViews`. */\n RESOURCE_CHART_VIEW = 'RESOURCE_CHART_VIEW',\n /** One custom frontend component, registered by `componentRef` in the module's or the engine's registrations. */\n CUSTOM_COMPONENT = 'CUSTOM_COMPONENT',\n /**\n * One milestone a module declares — the moment the application recognises and celebrates.\n *\n * Named by its identifier, which is what the module's `milestones.ts` declares\n * (`first-project-created` is spelled `FIRST_PROJECT_CREATED` there). The module FILE is not the\n * product: a module may carry milestones before this task runs, and only the identifier says this\n * one landed.\n */\n APPLICATION_MILESTONE = 'APPLICATION_MILESTONE',\n /** One onboarding document or guidance flow a module declares, named by its ref. */\n APPLICATION_GUIDANCE = 'APPLICATION_GUIDANCE',\n /** One PDF template bound to one resource's generated-file field. */\n PDF_TEMPLATE = 'PDF_TEMPLATE',\n /**\n * One worker's JOBS — the named handlers its entry file declares.\n *\n * The jobs, not the package: `add-worker-node` writes the package, so its directory proves\n * nothing. What a coding task adds is behaviour, and behaviour is a symbol in the entry file.\n */\n APPLICATION_WORKER = 'APPLICATION_WORKER',\n /** One minion's BEHAVIOURS — the named tick handlers its entry file declares. Same reasoning as the worker. */\n APPLICATION_MINION = 'APPLICATION_MINION',\n /** One provider declared in one runtime owner's scope. */\n PROVIDER_BINDING = 'PROVIDER_BINDING',\n /**\n * One product of the application's billing catalogue — a plan, add-on or purchase the application\n * sells — named by its catalogue `key`, which the catalogue file declares (`key: 'team'`).\n *\n * The KEY, not the file: `wildo init` writes `product.ts` with an empty catalogue, so the file proves\n * nothing. Written from the accepted business model's pricing plans, with the plan's price as typed\n * money and the pricing-surface facts (recommended, price disclosure, availability) the plan implies.\n */\n APPLICATION_BILLING_PRODUCT = 'APPLICATION_BILLING_PRODUCT',\n /** One website page, registered in the website root config by its manifest. */\n WEBSITE_PAGE = 'WEBSITE_PAGE',\n /** One section of one website page, declared in that page's sections file. */\n WEBSITE_SECTION = 'WEBSITE_SECTION',\n /**\n * One authored documentation chapter — a consumer guide the specifications package declares\n * for the documentation portal to publish (#874's publication input).\n */\n DOCUMENTATION_CHAPTER = 'DOCUMENTATION_CHAPTER',\n /**\n * One inbound CHANNEL handler — the code that decides what a message arriving on a channel causes\n * (#1832). Named by the handler's `ref` (`matters.mail-intake`), which the handler file spells and whose\n * file NAME is derived from it, so the module index's import of that file is what proves the handler is\n * registered. Produced once per channel the integration plan declares (`inboundChannels`).\n */\n INBOUND_CHANNEL_HANDLER = 'INBOUND_CHANNEL_HANDLER',\n}\n\n/**\n * One artifact a task is accountable for. Closed by construction: a product the\n * host cannot ask a question about is a product that can never be shown to have\n * landed, so the vocabulary only grows alongside the resolver that answers it.\n */\nexport const BuildPlanTaskProductSchema = z.discriminatedUnion('kind', [\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.RESOURCE_SCHEMA_FIELDS).systemEnum('BuildPlanTaskProductKind'),\n resourceRef: SlugSchema,\n /**\n * At least one field, because a task that enriches a schema with nothing is\n * the vacuity this whole field exists to stop: it would land the moment the\n * scaffold existed, which is the defect being fixed.\n */\n fieldRefs: z.array(NonEmptyStringSchema).min(1),\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_REGISTRATION).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema, operationRefs: z.array(NonEmptyStringSchema).min(1) }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_UI_BEHAVIOR).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_SPECIFICATION).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema, fieldRefs: z.array(NonEmptyStringSchema).min(1) }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.RESOURCE_RELATIONSHIP).systemEnum('BuildPlanTaskProductKind'),\n relationshipRef: SlugSchema,\n /*\n * The two resources the edge relates, NAMED rather than parsed out of the ref.\n *\n * A ref is `<source>-<target>` by convention and that convention is not invertible:\n * `next-step-deal` splits as (`next`, `step-deal`) or (`next-step`, `deal`) and only the domain\n * plan knows which. The domain plan already carries both, so the plan passes them on instead of\n * making the host guess — a host that guesses wrong probes for a resource that does not exist\n * and reports the task permanently unlanded.\n */\n sourceResourceRef: SlugSchema,\n targetResourceRef: SlugSchema,\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_OPERATION).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema, operationRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_VIEW).systemEnum('BuildPlanTaskProductKind'), viewRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_DOCUMENT).systemEnum('BuildPlanTaskProductKind'), documentRef: DocumentProductRefSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_MODULE).systemEnum('BuildPlanTaskProductKind'), moduleRef: ModuleRefSchema }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.APPLICATION_FRONTEND_CONFIG).systemEnum('BuildPlanTaskProductKind'),\n configSurface: z.enum(FrontendConfigSurface).systemEnum('FrontendConfigSurface'),\n /** At least one, for the same vacuity reason as a schema's `fieldRefs`: the file exists on day one. */\n declarationRefs: z.array(NonEmptyStringSchema).min(1),\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_COMPOSITE_VIEW).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema, viewRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_CUSTOM_VIEW).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema, viewRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_CHART_VIEW).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema, chartRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.CUSTOM_COMPONENT).systemEnum('BuildPlanTaskProductKind'), componentRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_MILESTONE).systemEnum('BuildPlanTaskProductKind'), milestoneRef: SlugSchema }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.APPLICATION_GUIDANCE).systemEnum('BuildPlanTaskProductKind'),\n /** Which definitions file carries it — a document and a flow live in different ones. */\n guidanceKind: z.enum(ApplicationGuidanceKind).systemEnum('ApplicationGuidanceKind'),\n guidanceRef: SlugSchema,\n }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.PDF_TEMPLATE).systemEnum('BuildPlanTaskProductKind'),\n resourceRef: SlugSchema,\n /** The generated-file FIELD the template is bound to (`generatedSummaryPdf`) — a symbol, so any spelling. */\n templateRef: NonEmptyStringSchema,\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_WORKER).systemEnum('BuildPlanTaskProductKind'), workerRef: SlugSchema, jobRefs: z.array(NonEmptyStringSchema).min(1) }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_MINION).systemEnum('BuildPlanTaskProductKind'), minionRef: SlugSchema, behaviorRefs: z.array(NonEmptyStringSchema).min(1) }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.PROVIDER_BINDING).systemEnum('BuildPlanTaskProductKind'),\n providerRef: SlugSchema,\n scope: z.enum(ProviderBindingScope).systemEnum('ProviderBindingScope'),\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT).systemEnum('BuildPlanTaskProductKind'), productKey: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.WEBSITE_PAGE).systemEnum('BuildPlanTaskProductKind'), pageRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.WEBSITE_SECTION).systemEnum('BuildPlanTaskProductKind'), pageRef: SlugSchema, sectionRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.DOCUMENTATION_CHAPTER).systemEnum('BuildPlanTaskProductKind'), chapterRef: SlugSchema }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.INBOUND_CHANNEL_HANDLER).systemEnum('BuildPlanTaskProductKind'),\n /** The channel the handler serves — one the integration plan declared. Email is the only declarable channel. */\n channel: z.literal(InboundChannelKind.EMAIL).systemEnum('InboundChannelKind'),\n /** The handler's `ref`, exactly as `inboundHandlerRef()` will accept it. */\n handlerRef: z.string().regex(INBOUND_HANDLER_REF_PATTERN),\n }),\n]);\nexport type BuildPlanTaskProduct = z.infer<typeof BuildPlanTaskProductSchema>;\n\n/**\n * Every artifact identity a product claims — one string per artifact, not one\n * per product, because a product may claim several.\n *\n * `RESOURCE_SCHEMA_FIELDS` is why this returns a list. Two tasks may both enrich\n * one resource's schema (a domain shape and a billing concern, say), and that is\n * legitimate; what must never overlap is the FIELDS. Comparing whole products\n * would refuse the legitimate pair, and comparing only the resource would let two\n * tasks claim one field and make landing ambiguous again.\n *\n * Derived from the product's own members rather than stored, and total over the\n * vocabulary, so a kind added tomorrow must state its identity here or fail to\n * compile — it cannot be silently treated as equal to its siblings.\n */\nexport function buildPlanTaskProductIdentities(product: BuildPlanTaskProduct): readonly string[] {\n switch (product.kind) {\n case BuildPlanTaskProductKind.RESOURCE_SCHEMA_FIELDS:\n return product.fieldRefs.map((fieldRef) => `${product.kind}:${product.resourceRef}:${fieldRef}`);\n case BuildPlanTaskProductKind.RESOURCE_REGISTRATION:\n return product.operationRefs.map((operationRef) => `${product.kind}:${product.resourceRef}:${operationRef}`);\n case BuildPlanTaskProductKind.RESOURCE_SPECIFICATION:\n return product.fieldRefs.map((fieldRef) => `${product.kind}:${product.resourceRef}:${fieldRef}`);\n case BuildPlanTaskProductKind.RESOURCE_UI_BEHAVIOR:\n return [`${product.kind}:${product.resourceRef}`];\n case BuildPlanTaskProductKind.RESOURCE_RELATIONSHIP:\n return [`${product.kind}:${product.relationshipRef}`];\n case BuildPlanTaskProductKind.RESOURCE_OPERATION:\n return [`${product.kind}:${product.resourceRef}:${product.operationRef}`];\n case BuildPlanTaskProductKind.APPLICATION_VIEW:\n return [`${product.kind}:${product.viewRef}`];\n case BuildPlanTaskProductKind.APPLICATION_DOCUMENT:\n /*\n * The ref AS AUTHORED, so a slug and a namespaced ref are different artifact identities even\n * where they mean the same document — the duplicate-artifact refusal cannot see two tasks\n * claiming one document if they spell it differently. Not normalisable: a slug carries no\n * namespace, so nothing can recover `public.` from `privacy-notice`. It costs nothing today\n * because a slug names no catalogued document at all, and the dispatcher skips such a task.\n */\n return [`${product.kind}:${product.documentRef}`];\n case BuildPlanTaskProductKind.APPLICATION_MODULE:\n return [`${product.kind}:${product.moduleRef}`];\n // One identity per DECLARATION, like schema fields: two tasks may compose one config file as\n // long as they declare different things in it.\n case BuildPlanTaskProductKind.APPLICATION_FRONTEND_CONFIG:\n return product.declarationRefs.map((declarationRef) => `${product.kind}:${product.configSurface}:${declarationRef}`);\n case BuildPlanTaskProductKind.RESOURCE_COMPOSITE_VIEW:\n case BuildPlanTaskProductKind.RESOURCE_CUSTOM_VIEW:\n return [`${product.kind}:${product.resourceRef}:${product.viewRef}`];\n case BuildPlanTaskProductKind.RESOURCE_CHART_VIEW:\n return [`${product.kind}:${product.resourceRef}:${product.chartRef}`];\n case BuildPlanTaskProductKind.CUSTOM_COMPONENT:\n return [`${product.kind}:${product.componentRef}`];\n case BuildPlanTaskProductKind.APPLICATION_MILESTONE:\n return [`${product.kind}:${product.milestoneRef}`];\n // The ref alone: a document and a flow sharing one ref is still one guidance identity, and the\n // runtime keys a person's saved state by it — two artifacts claiming it would collide there too.\n case BuildPlanTaskProductKind.APPLICATION_GUIDANCE:\n return [`${product.kind}:${product.guidanceRef}`];\n case BuildPlanTaskProductKind.PDF_TEMPLATE:\n return [`${product.kind}:${product.resourceRef}:${product.templateRef}`];\n case BuildPlanTaskProductKind.APPLICATION_WORKER:\n return product.jobRefs.map((jobRef) => `${product.kind}:${product.workerRef}:${jobRef}`);\n case BuildPlanTaskProductKind.APPLICATION_MINION:\n return product.behaviorRefs.map((behaviorRef) => `${product.kind}:${product.minionRef}:${behaviorRef}`);\n // The SCOPE is part of the identity: one provider bound on the backend and on the website is two artifacts.\n case BuildPlanTaskProductKind.PROVIDER_BINDING:\n return [`${product.kind}:${product.scope}:${product.providerRef}`];\n case BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT:\n return [`${product.kind}:${product.productKey}`];\n case BuildPlanTaskProductKind.WEBSITE_PAGE:\n return [`${product.kind}:${product.pageRef}`];\n case BuildPlanTaskProductKind.WEBSITE_SECTION:\n return [`${product.kind}:${product.pageRef}:${product.sectionRef}`];\n case BuildPlanTaskProductKind.DOCUMENTATION_CHAPTER:\n return [`${product.kind}:${product.chapterRef}`];\n case BuildPlanTaskProductKind.INBOUND_CHANNEL_HANDLER:\n return [`${product.kind}:${product.handlerRef}`];\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 skill every billing-catalogue task is authored with (#1835): the product-catalogue contract, the\n * money encoding (minor units), and the pricing-surface facts. The dispatch derives it from an\n * `APPLICATION_BILLING_PRODUCT` product whatever the decomposer wrote, so an agent writing the catalogue\n * the backend sells from is never without it.\n */\nexport const BILLING_CATALOG_SKILL_REF = 'configure-billing';\n\nexport const BuildPlanTaskTargetSchema = z.discriminatedUnion('kind', [\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.MODULE), moduleRef: ModuleRefSchema }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.RESOURCE_STAGE),\n moduleRef: ModuleRefSchema,\n resourceRef: SlugSchema,\n stage: z.enum(BuildPlanResourceStage),\n }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.RELATIONSHIP),\n moduleRef: ModuleRefSchema,\n relationshipRef: SlugSchema,\n }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP),\n /** The companion generation step this task runs (e.g. i18n-labels, email-templates); resolved by the companion, never by a coding agent. */\n generationStepRef: SlugSchema,\n }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.SHELL_PLACEMENT),\n /**\n * Which shell surface this task authors — the placement family's OWN\n * `PlacementSurface`, deliberately not a build-plan copy of it.\n *\n * A copy was written first and was a defect, caught by probing the landing\n * renderer rather than by any test: `PlacementAddress` discriminates on\n * `surface` with `z.literal(...)` per option, so only the VALUES survive into\n * the schema, and the renderer resolves a discriminator by matching that value\n * SET against the exported enums. Two enums with identical values made the\n * match ambiguous, the renderer correctly refused to guess an owner, and the\n * address discriminator became unnameable — a landed placement plan would have\n * emitted `surface: \"SETTINGS_HUB\"` as a bare string instead of\n * `PlacementSurface.SETTINGS_HUB`. One concept, one named source.\n */\n surface: z.enum(PlacementSurface).systemEnum('PlacementSurface'),\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.MODULE_FRONTEND), moduleRef: ModuleRefSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.MODULE_BACKEND), moduleRef: ModuleRefSchema }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.APPLICATION_FRONTEND_CONFIG),\n configSurface: z.enum(FrontendConfigSurface).systemEnum('FrontendConfigSurface'),\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.WEBSITE) }),\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.TECHNICAL_DOCUMENTATION) }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.WORKER),\n /** The worker's directory under `workers/` and its key in the SaaS config, in slug form. */\n workerRef: SlugSchema,\n runtime: z.enum(BuildPlanWorkerRuntime).systemEnum('BuildPlanWorkerRuntime'),\n }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.MINION),\n /** The minion's directory under `minions/` and its key in the SaaS config, in slug form. */\n minionRef: SlugSchema,\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.PROVIDER_BINDING), providerRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.BILLING_CATALOG) }),\n]);\nexport type BuildPlanTaskTarget = z.infer<typeof BuildPlanTaskTargetSchema>;\n\n/**\n * One ordered build task. It names WHAT to build and WHY; it never carries\n * HOW (no paths, commands, prompts, cwd, model, profile). The host resolves\n * the physical allowed/prohibited paths and the fixed verification from the\n * target kind, and the installed skills from `skillRefs` against the app\n * knowledge catalog.\n *\n * Dependency readiness is DECLARED as prerequisite task refs and RESOLVED by\n * the host (a prerequisite is satisfied when its task has landed), never a\n * solved DAG the model must get right.\n */\nexport const BuildPlanTaskSchema = z.strictObject({\n /** `build-task-<slug>`, stamped by the trusted runtime. */\n taskRef: z.string().regex(new RegExp(`^${BUILD_PLAN_TASK_REF_PREFIX}[a-z0-9]+(?:-[a-z0-9]+)*$`)),\n /**\n * One sentence of intent: what this task delivers.\n *\n * Its OWN instance, not the file's shared leaf, which `templateRef` and the product ref lists also\n * hold. A display decorator mutates the instance it is applied to, and the workbench gives those\n * refs a receding identifier look, which the objective sentence then took too.\n */\n objective: z.string().trim().min(1),\n target: BuildPlanTaskTargetSchema,\n /**\n * The artifacts this task is accountable for — what proves it done.\n *\n * Coding tasks should declare at least one product that composition did not already\n * write. A target is a shared mutation scope; its scaffolded file is not evidence\n * that this task's intended work exists. Products identify the output to probe.\n *\n * Empty declarations remain representable and produce the advisory\n * `TASK_DECLARES_NO_PRODUCT`. The host may advance after a COMPLETED durable run,\n * while naming the task in `unverifiableLandedTaskRefs`: it ran, but its output\n * cannot be proven from a product declaration. An unexecuted task is not landed.\n * This distinction avoids repeatedly dispatching the same unprovable task without\n * presenting execution history as evidence that the intended product is correct.\n *\n * The ONE hard exception is a `COMPANION_GENERATION_STEP`, which must declare NONE.\n * That kind already carries its own typed landed condition, owned by the\n * generation-step service — a set computed asynchronously (planner units x\n * enabled locales), and for the migration step a STATE rather than files. A\n * product declared beside it would be read by nothing, which is the inert\n * declaration this field exists to avoid. Enforced on the graph below, in both\n * directions.\n */\n produces: z.array(BuildPlanTaskProductSchema).default([]),\n /**\n * Exactly ONE functional topic this task belongs to.\n *\n * **It does NOT drive ordering** — this said \"drives cross-app ordering\" until 2026-08-30 and\n * nothing ever ordered by it. Sequencing is `prerequisiteTaskRefs`, resolved by the host, and it\n * is the only thing that decides what may run next.\n *\n * What it DOES: the dispatch host stamps it into the coding-agent's task payload beside\n * `skillRefs`, so the agent is told which phase of building the application this task belongs to.\n * That is context an LLM reads, not a value the runtime branches on — the distinction matters,\n * because a reader who believes it orders will look here for a scheduling bug that lives in the\n * prerequisite graph. See issue #124.\n */\n functionalTopic: z.enum(MetaWorkflow_FunctionalTopic).systemEnum('MetaWorkflow_FunctionalTopic'),\n /** Installed app-knowledge skill folders that carry the technical HOW; resolved via the skills router at dispatch. */\n skillRefs: z.array(SkillRefSchema).min(1),\n /** Task refs that must have landed first; resolved by the host, not solved by the model. */\n prerequisiteTaskRefs: z.array(z.string()).default([]),\n /**\n * What this task is accountable to — traceability only, NEVER scope authority.\n *\n * The vocabulary is the five aspects `BUILD_PLAN_FAMILY_ASPECTS` declares as targets: functional\n * and non-functional requirements, roadmap phases, and the vision's success criteria and\n * constraints. It reads \"Requirement / roadmap refs\" until 2026-09-11, and the last two were added\n * because the producer had been writing them all along (#629) — the generation contract asks for a\n * plain string list, so nothing here has ever refused a key.\n *\n * A key outside those five is not rejected and must not be: this is traceability a human or a\n * model wrote down, and dropping it loses the intent. The workbench renders such a key as visibly\n * unresolved instead, which is what makes a producer drift legible rather than silent.\n */\n servesRefs: z.array(NonEmptyStringSchema).default([]),\n /**\n * Who asked for this task DIRECTLY (#1608), rather than it being derived from the specifications: the\n * signed-in person who added it in conversation. STAMPED by the append, never authored: a value in\n * generated output is discarded. Absent on every task the decomposition derived.\n *\n * It is what keeps a requested task alive. Build decomposition refines the plan from the domain plan, and\n * a task nothing in the specifications justifies would read as unjustified and be dropped; a requested\n * task it leaves out is carried forward instead, keeping only the prerequisites the new plan still holds.\n */\n requestedBy: NonEmptyStringSchema.optional(),\n});\nexport type BuildPlanTask = z.infer<typeof BuildPlanTaskSchema>;\n\n/**\n * THE build-plan payload — a **single aggregate per product**: the ORDERED\n * task graph that turns the accepted domain plan into buildable units.\n *\n * **Artifact-family id: `build-plan`.** This schema is the shape of the\n * journey artifact selected by `MetaWorkflow_ArtifactSelector.family ===\n * 'build-plan'` (the `family` vocabulary stays an open string owned by the\n * selector surface; this note is the single place tying the SHAPE to the\n * NAME). Produced by the build-decompose playbook, consumed one task at a\n * time by build-dispatch (single-flight coding dispatch) and by the scale\n * playbook.\n *\n * Invariants enforced here: unique task refs; every prerequisite names a task\n * in this graph; no self-prerequisite. Cycle detection and ordering\n * soundness are the deterministic validator's job (`validateBuildPlanTaskGraph`).\n */\nexport const BuildPlanTaskGraphSchema = z.object({\n version: z.enum(BuildPlanTaskGraphVersion).default(BuildPlanTaskGraphVersion.V1),\n /**\n * At least one task, at the SCHEMA — not merely as a validator warning. The first live playbook-loop\n * run (2026-08-24) proved why: build-decompose answered `tasks: []`, which was schema-valid, passed\n * `_core` validation as a mere warning, and LANDED — overwriting a completed 3-task plan with a\n * vacuous artifact. Decomposing to zero tasks is a refusal (\"nothing to decompose\"), never an\n * artifact: an empty plan carries no information a reader could act on, and the file it replaces\n * does. Same vacuity class already closed on the requirements family (`functional: min(1)`).\n */\n tasks: z.array(BuildPlanTaskSchema).min(1),\n}).superRefine((graph, context) => {\n const refs = new Set<string>();\n graph.tasks.forEach((task, index) => {\n if (refs.has(task.taskRef)) {\n context.addIssue({ code: 'custom', message: `duplicate build task ref \"${task.taskRef}\"`, path: ['tasks', index, 'taskRef'] });\n }\n refs.add(task.taskRef);\n });\n /*\n * No two tasks claim the same artifact.\n *\n * This is what makes landing DECIDABLE, not a tidiness rule. If two tasks name\n * one product, the host cannot tell which of them a present artifact proves —\n * exactly the ambiguity that shared `target`s created, arriving through the\n * field that replaced them. Enforced here rather than left to the validator\n * because a graph that cannot answer \"has this task landed?\" is not a graph\n * the loop may run at all.\n */\n graph.tasks.forEach((task, index) => {\n const isGenerationStep = task.target.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP;\n if (isGenerationStep && task.produces.length > 0) {\n context.addIssue({\n code: 'custom',\n message: `build task \"${task.taskRef}\" is a companion generation step and must declare no products; its landing is the generation step's own condition`,\n path: ['tasks', index, 'produces'],\n });\n }\n });\n const productOwners = new Map<string, string>();\n graph.tasks.forEach((task, index) => {\n task.produces.forEach((product, productIndex) => {\n buildPlanTaskProductIdentities(product).forEach((identity) => {\n const owner = productOwners.get(identity);\n if (owner !== undefined) {\n context.addIssue({\n code: 'custom',\n message: `build task \"${task.taskRef}\" claims the same artifact as \"${owner}\" (${identity}); an artifact is produced by exactly one task`,\n path: ['tasks', index, 'produces', productIndex],\n });\n return;\n }\n productOwners.set(identity, task.taskRef);\n });\n });\n });\n graph.tasks.forEach((task, index) => {\n task.prerequisiteTaskRefs.forEach((prerequisite, prerequisiteIndex) => {\n if (prerequisite === task.taskRef) {\n context.addIssue({ code: 'custom', message: `build task \"${task.taskRef}\" cannot be its own prerequisite`, path: ['tasks', index, 'prerequisiteTaskRefs', prerequisiteIndex] });\n } else if (!refs.has(prerequisite)) {\n context.addIssue({ code: 'custom', message: `build task \"${task.taskRef}\" names an unknown prerequisite \"${prerequisite}\"`, path: ['tasks', index, 'prerequisiteTaskRefs', prerequisiteIndex] });\n }\n });\n });\n});\nexport type BuildPlanTaskGraph = z.infer<typeof BuildPlanTaskGraphSchema>;\n/** @wildo_source:part:end build-plan.task-graph.config */\n"]}
1
+ {"version":3,"file":"build-plan-task-graph.schemas.js","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan-task-graph.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,6GAA6G;AAC7G,+GAA+G;AAC/G,OAAO,0BAA0B,CAAC;AAElC,OAAO,EAAE,2BAA2B,EAAE,kBAAkB,EAAE,MAAM,uB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eAAe,IAAI,CAAC,OAAO,kCAAkC,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,CAAC,EAAE,CAAC,CAAC;YAClL,CAAC;iBAAM,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,YAAY,CAAC,EAAE,CAAC;gBACnC,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,eAAe,IAAI,CAAC,OAAO,oCAAoC,YAAY,GAAG,EAAE,IAAI,EAAE,CAAC,OAAO,EAAE,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,CAAC,EAAE,CAAC,CAAC;YACnM,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC;AAEH,0DAA0D","sourcesContent":["import { z } from 'zod';\n// Side-effect import: this module calls `.systemEnum()` at load, so the decorators must be installed first —\n// never by the importer's luck (#966). A named import used only as a type would be elided and install nothing.\nimport '@wildo-ai/zod-decorators';\n\nimport { INBOUND_HANDLER_REF_PATTERN, InboundChannelKind } from '@wildo-ai/saas-models';\n\nimport { MetaWorkflow_FunctionalTopic } from '../../application-creation/playbooks.application-creation.schemas';\nimport { PlacementSurface } from '../placement-plan/placement-plan.schemas';\n\n/**\n * @wildo_source:part:start build-plan.task-graph.config facet:layer:specification facet:family:build-plan\n *\n * Versioning for the build-plan task-graph payload format itself. `V1` —\n * initial shape (one ordered `tasks` collection with typed targets and\n * declared prerequisites). The shape grows additively across versions; the\n * `version` field is the explicit marker for consumers that branch on era.\n */\nexport enum BuildPlanTaskGraphVersion {\n V1 = 'v1',\n}\n\n/** Stable prefix every build-plan task ref carries; the trusted runtime stamps it, a provider supplies only the slug. */\nexport const BUILD_PLAN_TASK_REF_PREFIX = 'build-task-';\n\n/**\n * WHAT a build task builds — a closed vocabulary, because the host derives\n * the physical mutation scope and verification policy from the target kind\n * and the model must never author those powers through free text.\n */\nexport enum BuildPlanTaskTargetKind {\n /** A whole application module (its shared-lib registration, backend module and frontend module skeletons). */\n MODULE = 'MODULE',\n /** One build stage of one resource: schema → config → ui-behavior → spec. */\n RESOURCE_STAGE = 'RESOURCE_STAGE',\n /** One relationship between two resources. */\n RELATIONSHIP = 'RELATIONSHIP',\n /** A companion-owned deterministic generation step (labels, email templates, logo or database migrations) interleaved by the build loop, never a coding-agent run. */\n COMPANION_GENERATION_STEP = 'COMPANION_GENERATION_STEP',\n /**\n * Authoring one SHELL SURFACE's placement configuration from the accepted\n * placement plan — the settings rail, the sidebar, the user menu or the\n * command palette.\n *\n * Its own kind rather than a reuse of the neighbours, because none of them is\n * true of it: it is not a MODULE or a RESOURCE_STAGE (it is application-wide\n * and belongs to no resource), not a RELATIONSHIP, and emphatically not a\n * COMPANION_GENERATION_STEP — that kind is documented as \"never a coding-agent\n * run\" and writing `settings-hub.config.ts` is exactly a coding-agent run.\n * Borrowing one would hand the host the wrong mutation scope and the wrong\n * verification, which is what the closed vocabulary exists to prevent.\n */\n SHELL_PLACEMENT = 'SHELL_PLACEMENT',\n /*\n * THE NON-RESOURCE SURFACES (#1490). Until 2026-09-22 the five kinds above were the whole\n * vocabulary, and every one of them is about a resource or the shell placement of one. The\n * decompose method meanwhile told the planner to emit tasks for views, navigation, the design\n * system, custom components, PDF templates, workers, minions, providers, the website and the\n * documentation — surfaces the framework's own composition scenarios and 85 of its 111 skills\n * already build. A task for any of them had no kind to declare, so it either declared none\n * (landing as RAN-not-PROVEN forever) or borrowed `MODULE` with a product the module scope could\n * not prove. The members below are those surfaces, one per write scope the host can derive.\n */\n /**\n * The FRONTEND and SPECIFICATION layers of one module — its composite, custom and chart views,\n * its custom components and their specifications.\n *\n * Narrower than `MODULE` on purpose: a view task never touches `shared-lib` or `backend-api`, so\n * handing it the four-layer scope also hands it four typechecks and the FK sweep for a change\n * that can only break the frontend and the specifications package.\n */\n MODULE_FRONTEND = 'MODULE_FRONTEND',\n /**\n * The BACKEND layer of one module beside its shared-lib declarations — PDF templates and their\n * bindings, backend addons (services, controllers, flows-actors), email definitions.\n *\n * Shared-lib is in scope because a PDF template is bound to a resource FIELD the config declares\n * (`generatedSummaryPdf`), and a backend addon usually declares its contract there first.\n */\n MODULE_BACKEND = 'MODULE_BACKEND',\n /**\n * ONE application-wide frontend configuration surface — navigation, the design system, the app\n * shell's composition, the global views — named by {@link FrontendConfigSurface}.\n *\n * Distinct from {@link SHELL_PLACEMENT}, which authors the placement plan's decisions into the\n * shell files: a placement puts a decided subject in a decided group, while this kind COMPOSES\n * the surface itself (which sidebar sections exist, which transitions the primary zone uses,\n * which palette the product carries). Same file for `APP_SHELL`, different question.\n */\n APPLICATION_FRONTEND_CONFIG = 'APPLICATION_FRONTEND_CONFIG',\n /** The marketing website workspace (`website/`), composed by the `add-website` scenario. Pages and sections are its products. */\n WEBSITE = 'WEBSITE',\n /**\n * The technical-documentation workspace (`technical-doc/`) and the specification package's\n * `technical-documentation/` declarations that feed it. Its generated tree is never written by a\n * task: the companion publishes into it, and the coding policy prohibits it by prefix.\n */\n TECHNICAL_DOCUMENTATION = 'TECHNICAL_DOCUMENTATION',\n /** One worker package (`workers/<workerRef>/`), Node or Rust, plus its declaration in the SaaS config. */\n WORKER = 'WORKER',\n /** One cron minion package (`minions/<minionRef>/`) plus its declaration in the SaaS config. */\n MINION = 'MINION',\n /**\n * Declaring one provider in the application — the SaaS config's provider scopes, the backend\n * package dependency, the frontend provider module and its companion contribution.\n *\n * Application-wide by construction: a provider binding names no module, and the four files it\n * may touch are the same for every provider.\n */\n PROVIDER_BINDING = 'PROVIDER_BINDING',\n /**\n * The application's BILLING CATALOGUE — the `ProductDefinition[]` in `shared-lib/src/engine/product.ts`\n * (and the product specifications that document it), which the backend syncs to the billing\n * provider and the public website reads for its pricing page (#1835).\n *\n * Its own kind because none of the others is true of it: the catalogue is application-wide (a plan\n * belongs to no module), it lives in the shared library's ENGINE module that no `MODULE_*` scope\n * reaches, and before it existed a journey-built application reached its website with an EMPTY\n * catalogue, so the website re-typed the business model's prices by hand.\n */\n BILLING_CATALOG = 'BILLING_CATALOG',\n}\n\n/**\n * WHICH application-wide frontend configuration surface a task composes — one file each, in\n * `frontend/src/config/`, and the coding policy resolves the member to that file exactly as\n * `SHELL_PLACEMENT` resolves a `PlacementSurface`.\n *\n * Its own vocabulary rather than a reuse of `PlacementSurface`: a placement surface is WHERE a\n * subject sits in the shell (settings hub, sidebar, user menu, command palette), and three of\n * those live in one file. A configuration surface is WHICH FILE a composition task authors, and\n * navigation and the design system are not places anything is placed.\n */\nexport enum FrontendConfigSurface {\n /** `frontend/src/config/navigation.config.ts` — zones, transitions, overlay appearance. */\n NAVIGATION = 'NAVIGATION',\n /** `frontend/src/config/design-system.config.ts` — palette, typography, shell appearance from the brand's visual tone. */\n DESIGN_SYSTEM = 'DESIGN_SYSTEM',\n /** `frontend/src/config/app-shell.config.ts` — top bar, sidebar sections, quick switcher: the shell's COMPOSITION, not a placement into it. */\n APP_SHELL = 'APP_SHELL',\n /** `frontend/src/config/global-views.config.ts` — the application-level launcher and view registrations. */\n GLOBAL_VIEWS = 'GLOBAL_VIEWS',\n}\n\n/**\n * The two shapes of guidance an application gives a person, and the file each is declared in.\n *\n * They are distinct because they are found differently: an onboarding DOCUMENT is embedded in a\n * screen (`EmbedOnboarding`) and is there whenever that screen is, while a guidance FLOW is started\n * by an event and shows once. Both are listed on the owning frontend module — `onboardingViews` and\n * `guidanceFlows`. Each kind has a CONVENTIONAL definitions file, which the authoring skill teaches\n * and a landing probe reads for the declared ref (alongside the module's `index.ts`, where a small\n * module may declare inline). A convention for generated applications: a hand-authored application\n * may keep its declarations elsewhere, and then simply is not probed by a build plan.\n */\nexport enum ApplicationGuidanceKind {\n /** `frontend/src/modules/<m>/app-level-views/onboarding-views.definitions.ts` — an embedded onboarding document. */\n ONBOARDING_DOCUMENT = 'ONBOARDING_DOCUMENT',\n /** `frontend/src/modules/<m>/app-level-views/guidance-flows.definitions.ts` — a triggered guidance flow. */\n GUIDANCE_FLOW = 'GUIDANCE_FLOW',\n}\n\n/**\n * The two worker runtimes the framework composes (`add-worker-node`, `add-worker-rust`). The\n * runtime decides the entry file a landing probe reads and whether a typecheck exists to run: a\n * Node worker is verified by its package typecheck, a Rust worker has no TypeScript to check and\n * the policy says so rather than inventing a command.\n *\n * Not the SaaS config's `WorkerRuntime`, which is a free-form `{ type, language }` pair an\n * application authors for deployment; this is the closed set a creation run can COMPOSE.\n */\nexport enum BuildPlanWorkerRuntime {\n NODE = 'NODE',\n RUST = 'RUST',\n}\n\n/**\n * WHERE a provider is bound — which runtime owner's scope its declaration lands in. Each member\n * is a different file, so a probe and a write grant both derive from it.\n *\n * Named after the SaaS config's own scope keys (`providers.scopes.backend`, `.companion`,\n * `.frontendServices.app`, `.frontendServices.website`), which the `add-provider` and\n * `add-file-picker-provider` scenarios write. Minion and worker scopes are deliberately absent:\n * a provider reaching a minion is declared on that minion's own `providers` block and belongs to\n * the {@link BuildPlanTaskTargetKind.MINION} task that builds it.\n */\nexport enum ProviderBindingScope {\n BACKEND = 'BACKEND',\n COMPANION = 'COMPANION',\n FRONTEND_APP = 'FRONTEND_APP',\n WEBSITE = 'WEBSITE',\n}\n\n/** The per-resource build stages, in their fixed order. */\nexport enum BuildPlanResourceStage {\n SCHEMA = 'SCHEMA',\n CONFIG = 'CONFIG',\n UI_BEHAVIOR = 'UI_BEHAVIOR',\n SPEC = 'SPEC',\n}\n\nconst SlugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\n\n/**\n * The key of the domain-plan MODULE a task targets or produces (`deals`, `tasks-manager`). Same\n * slug grammar as the other keys, declared as its own schema because it names one thing — a\n * module — where the other slugs name resources, relationships, steps, workers and products.\n */\nconst ModuleRefSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\n\n/**\n * The governed document a task produces, named as a COMPLIANCE-DOCUMENT CANDIDATE names it:\n * `document:<namespace>.<id>`, e.g. `document:public.privacy-notice`.\n *\n * **This field was `SlugSchema`, and a slug cannot name a governed document — so until 2026-09-16 no\n * build plan in any application could declare a document the engine catalog defines.** A slug forbids\n * the colon and the dot, the catalog's definitions are `document-definition:public.privacy-notice`,\n * and `selectAssuranceDocumentBlueprintForDocumentRef` joins the two namespaces by exact suffix — so\n * every authored `documentRef` resolved to NO blueprint, and a blueprint is what says which sections,\n * facts and claim guards the document owes. The two vocabularies were disjoint by construction.\n *\n * The cost is measured rather than theoretical. Wonder CRM's plan declares two such products\n * (`gdpr-data-handling-governance`, `terminal-access-governance`), neither of which names anything;\n * the first was dispatched, and its agent spent a full turn establishing — with a positive control —\n * that the document does not exist and could only be invented, which the authoring skill forbids.\n *\n * The bare slug is STILL ACCEPTED, and that is deliberate rather than tidiness left undone: tightening\n * this to the namespaced form alone would make every already-accepted plan carrying one fail to parse,\n * and a build plan that cannot be READ stops the whole lane — the gate\n * `application-creation-directive.md` forbids, for a task nobody can fix by re-running anything. A slug\n * simply resolves to no blueprint, so the dispatcher skips that task with a message naming the ref,\n * and the rest of the plan proceeds.\n */\nconst DocumentProductRefSchema = z.union([\n z.string().regex(/^document:[a-z0-9]+(?:-[a-z0-9]+)*\\.[a-z0-9]+(?:-[a-z0-9]+)*$/),\n SlugSchema,\n]);\n/**\n * A skill ref is the skill's FOLDER id in the app-knowledge catalog, which is\n * also its `SKILL.md` frontmatter `name` — one id, kebab-case. The host refuses\n * any skill name outside `[a-z0-9-]+`, so a ref that does not match this shape\n * can never resolve to an installed skill.\n */\nconst SkillRefSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);\nconst NonEmptyStringSchema = z.string().trim().min(1);\n\n/**\n * WHAT a build task PRODUCES — the artifact whose presence in the application\n * proves the task is done.\n *\n * **This is not `target`, and the difference is the whole reason it exists.**\n * `target` is a WRITE SCOPE: the host turns it into the path prefixes a run may\n * mutate, and several tasks legitimately share one. `produces` is a PRODUCT\n * IDENTITY: it says which artifact this task, and no other, is accountable for.\n *\n * Measured 2026-09-10 on Wonder CRM (issue #597): `build-task-pipeline-view`\n * and `build-task-deal-follow-through-operation` carry BYTE-IDENTICAL targets\n * (`{ kind: MODULE, moduleRef: 'deals' }`), and 7 of that plan's 42 tasks share\n * 3 targets. Landing had been answered by narrowing the target to a module\n * DIRECTORY — which `wildo compose` commits on day one, and which cannot tell\n * two tasks apart even in principle. The loop reported 40 of 42 tasks landed\n * while no coding task had ever run, so `dispatch-next` skipped every one of\n * them and the phase-advance gate read a build that was all but complete.\n *\n * Like `target`, this stays SEMANTIC: a product names a resource, a field, a\n * relationship or a view — never a path, and never a command. The host owns the\n * translation from a product to the physical question it asks of the working\n * tree, exactly as it owns the translation from a target kind to path prefixes.\n * A model that could author the path could author its own mutation scope.\n */\nexport enum BuildPlanTaskProductKind {\n /**\n * Named fields on one resource's schema.\n *\n * The shape an ENRICHMENT task needs, and the reason a product cannot always\n * be \"a file\": every resource file already exists, written by the scaffold\n * with its self-described STARTER shape, so file presence answers nothing.\n * The FIELDS are what the task adds.\n */\n RESOURCE_SCHEMA_FIELDS = 'RESOURCE_SCHEMA_FIELDS',\n /**\n * One resource's declared operations — its registry presence, named by the verbs it gains.\n *\n * The VERBS, not the config file: `<r>.resources-config.ts` is written by the scaffold, so its\n * existence is satisfied before any task runs. That is the exact shape of the defect this\n * vocabulary replaces, and a kind that reproduced it would be worse than no kind at all.\n */\n RESOURCE_REGISTRATION = 'RESOURCE_REGISTRATION',\n /** One resource's frontend ui-behavior. */\n RESOURCE_UI_BEHAVIOR = 'RESOURCE_UI_BEHAVIOR',\n /**\n * One resource's specification, named by the fields it documents.\n *\n * The FIELDS, for the same reason as {@link RESOURCE_REGISTRATION}: every resource is scaffolded\n * with a `*.resource.specification.ts` documenting only the starter shape, so file existence\n * proves nothing about the task that was meant to enrich it.\n */\n RESOURCE_SPECIFICATION = 'RESOURCE_SPECIFICATION',\n /** One relationship edge between two resources, named by the domain plan's `relationshipRef`. */\n RESOURCE_RELATIONSHIP = 'RESOURCE_RELATIONSHIP',\n /** One named custom operation on one resource. */\n RESOURCE_OPERATION = 'RESOURCE_OPERATION',\n /** One named application-level view. */\n APPLICATION_VIEW = 'APPLICATION_VIEW',\n /** One named governed application document (a compliance notice, a governance statement). */\n APPLICATION_DOCUMENT = 'APPLICATION_DOCUMENT',\n /** One application module, registered across the layer registries under one module identity. */\n APPLICATION_MODULE = 'APPLICATION_MODULE',\n /*\n * THE NON-RESOURCE PRODUCTS (#1490). Each names an artifact of a surface the five target kinds\n * above `MODULE_FRONTEND` could not express, and each is probed by the host from committed bytes —\n * a declaration in the one file that registers it, never a directory a scenario already wrote.\n */\n /**\n * Named declarations in ONE application-wide frontend configuration file — a sidebar section\n * ref the app shell gains, a zone the navigation config declares, a token the design system sets.\n *\n * The DECLARATIONS, never the file: every `frontend/src/config/*.config.ts` is written by\n * `wildo init`, so its presence is true before any task runs. Same reasoning as\n * {@link RESOURCE_SCHEMA_FIELDS}, one level up.\n */\n APPLICATION_FRONTEND_CONFIG = 'APPLICATION_FRONTEND_CONFIG',\n /**\n * One composite view of one resource — the cross-resource surface a resource's ui-behavior\n * declares under `compositeViews`. Distinct from {@link APPLICATION_VIEW}, which is\n * application-level and owned by a module rather than a resource.\n */\n RESOURCE_COMPOSITE_VIEW = 'RESOURCE_COMPOSITE_VIEW',\n /** One custom operation or execution view of one resource, bound in its ui-behavior. */\n RESOURCE_CUSTOM_VIEW = 'RESOURCE_CUSTOM_VIEW',\n /** One chart view of one resource, declared under its ui-behavior's `chartViews`. */\n RESOURCE_CHART_VIEW = 'RESOURCE_CHART_VIEW',\n /** One custom frontend component, registered by `componentRef` in the module's or the engine's registrations. */\n CUSTOM_COMPONENT = 'CUSTOM_COMPONENT',\n /**\n * One milestone a module declares — the moment the application recognises and celebrates.\n *\n * Named by its identifier, which is what the module's `milestones.ts` declares\n * (`first-project-created` is spelled `FIRST_PROJECT_CREATED` there). The module FILE is not the\n * product: a module may carry milestones before this task runs, and only the identifier says this\n * one landed.\n */\n APPLICATION_MILESTONE = 'APPLICATION_MILESTONE',\n /** One onboarding document or guidance flow a module declares, named by its ref. */\n APPLICATION_GUIDANCE = 'APPLICATION_GUIDANCE',\n /** One PDF template bound to one resource's generated-file field. */\n PDF_TEMPLATE = 'PDF_TEMPLATE',\n /**\n * One worker's JOBS — the named handlers its entry file declares.\n *\n * The jobs, not the package: `add-worker-node` writes the package, so its directory proves\n * nothing. What a coding task adds is behaviour, and behaviour is a symbol in the entry file.\n */\n APPLICATION_WORKER = 'APPLICATION_WORKER',\n /** One minion's BEHAVIOURS — the named tick handlers its entry file declares. Same reasoning as the worker. */\n APPLICATION_MINION = 'APPLICATION_MINION',\n /** One provider declared in one runtime owner's scope. */\n PROVIDER_BINDING = 'PROVIDER_BINDING',\n /**\n * One product of the application's billing catalogue — a plan, add-on or purchase the application\n * sells — named by its catalogue `key`, which the catalogue file declares (`key: 'team'`).\n *\n * The KEY, not the file: `wildo init` writes `product.ts` with an empty catalogue, so the file proves\n * nothing. Written from the accepted business model's pricing plans, with the plan's price as typed\n * money and the pricing-surface facts (recommended, price disclosure, availability) the plan implies.\n */\n APPLICATION_BILLING_PRODUCT = 'APPLICATION_BILLING_PRODUCT',\n /**\n * One data seed a module declares — rows the application creates for itself, named by the seed's\n * `seedKey` (`crm:demo-customers`).\n *\n * The seed is its own file, `backend-api/src/modules/<module>/seeds/<seedKey with ':' as '.'>.seed.ts`,\n * and it lands only once the module registers it — a seed file nothing imports never runs. Its\n * {@link BuildPlanDataSeedContent} says whether it is REFERENCE data the application needs everywhere\n * or DEMONSTRATION data that must never reach production.\n */\n APPLICATION_DATA_SEED = 'APPLICATION_DATA_SEED',\n /** One website page, registered in the website root config by its manifest. */\n WEBSITE_PAGE = 'WEBSITE_PAGE',\n /** One section of one website page, declared in that page's sections file. */\n WEBSITE_SECTION = 'WEBSITE_SECTION',\n /**\n * One authored documentation chapter — a consumer guide the specifications package declares\n * for the documentation portal to publish (#874's publication input).\n */\n DOCUMENTATION_CHAPTER = 'DOCUMENTATION_CHAPTER',\n /**\n * One inbound CHANNEL handler — the code that decides what a message arriving on a channel causes\n * (#1832). Named by the handler's `ref` (`matters.mail-intake`), which the handler file spells and whose\n * file NAME is derived from it, so the module index's import of that file is what proves the handler is\n * registered. Produced once per channel the integration plan declares (`inboundChannels`).\n */\n INBOUND_CHANNEL_HANDLER = 'INBOUND_CHANNEL_HANDLER',\n}\n\n\n/**\n * What a data seed's rows ARE, which decides where they may exist.\n *\n * - `REFERENCE` — rows the application needs to work wherever it runs: a closed list, a default\n * record, a system template. Every environment, production included.\n * - `DEMONSTRATION` — sample rows that make a freshly created application look lived-in (customers,\n * projects, a few records per list). They must never sit beside real rows, so the seed declares\n * `allowedApplicationEnvironments` without `production`, and the task lands only once it does.\n */\nexport enum BuildPlanDataSeedContent {\n REFERENCE = 'REFERENCE',\n DEMONSTRATION = 'DEMONSTRATION',\n}\n\n/**\n * A data seed's key: kebab-case segments joined by `:` (`crm:demo-customers`), the convention a\n * `DataSeedDefinition` documents. Constrained here because the seed's FILE is derived from it.\n */\nexport const DATA_SEED_KEY_PATTERN: RegExp = /^[a-z0-9]+(?:-[a-z0-9]+)*(?::[a-z0-9]+(?:-[a-z0-9]+)*)*$/;\n\n/**\n * One artifact a task is accountable for. Closed by construction: a product the\n * host cannot ask a question about is a product that can never be shown to have\n * landed, so the vocabulary only grows alongside the resolver that answers it.\n */\nexport const BuildPlanTaskProductSchema = z.discriminatedUnion('kind', [\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.RESOURCE_SCHEMA_FIELDS).systemEnum('BuildPlanTaskProductKind'),\n resourceRef: SlugSchema,\n /**\n * At least one field, because a task that enriches a schema with nothing is\n * the vacuity this whole field exists to stop: it would land the moment the\n * scaffold existed, which is the defect being fixed.\n */\n fieldRefs: z.array(NonEmptyStringSchema).min(1),\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_REGISTRATION).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema, operationRefs: z.array(NonEmptyStringSchema).min(1) }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_UI_BEHAVIOR).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_SPECIFICATION).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema, fieldRefs: z.array(NonEmptyStringSchema).min(1) }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.RESOURCE_RELATIONSHIP).systemEnum('BuildPlanTaskProductKind'),\n relationshipRef: SlugSchema,\n /*\n * The two resources the edge relates, NAMED rather than parsed out of the ref.\n *\n * A ref is `<source>-<target>` by convention and that convention is not invertible:\n * `next-step-deal` splits as (`next`, `step-deal`) or (`next-step`, `deal`) and only the domain\n * plan knows which. The domain plan already carries both, so the plan passes them on instead of\n * making the host guess — a host that guesses wrong probes for a resource that does not exist\n * and reports the task permanently unlanded.\n */\n sourceResourceRef: SlugSchema,\n targetResourceRef: SlugSchema,\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_OPERATION).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema, operationRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_VIEW).systemEnum('BuildPlanTaskProductKind'), viewRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_DOCUMENT).systemEnum('BuildPlanTaskProductKind'), documentRef: DocumentProductRefSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_MODULE).systemEnum('BuildPlanTaskProductKind'), moduleRef: ModuleRefSchema }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.APPLICATION_FRONTEND_CONFIG).systemEnum('BuildPlanTaskProductKind'),\n configSurface: z.enum(FrontendConfigSurface).systemEnum('FrontendConfigSurface'),\n /** At least one, for the same vacuity reason as a schema's `fieldRefs`: the file exists on day one. */\n declarationRefs: z.array(NonEmptyStringSchema).min(1),\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_COMPOSITE_VIEW).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema, viewRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_CUSTOM_VIEW).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema, viewRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.RESOURCE_CHART_VIEW).systemEnum('BuildPlanTaskProductKind'), resourceRef: SlugSchema, chartRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.CUSTOM_COMPONENT).systemEnum('BuildPlanTaskProductKind'), componentRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_MILESTONE).systemEnum('BuildPlanTaskProductKind'), milestoneRef: SlugSchema }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.APPLICATION_GUIDANCE).systemEnum('BuildPlanTaskProductKind'),\n /** Which definitions file carries it — a document and a flow live in different ones. */\n guidanceKind: z.enum(ApplicationGuidanceKind).systemEnum('ApplicationGuidanceKind'),\n guidanceRef: SlugSchema,\n }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.PDF_TEMPLATE).systemEnum('BuildPlanTaskProductKind'),\n resourceRef: SlugSchema,\n /** The generated-file FIELD the template is bound to (`generatedSummaryPdf`) — a symbol, so any spelling. */\n templateRef: NonEmptyStringSchema,\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_WORKER).systemEnum('BuildPlanTaskProductKind'), workerRef: SlugSchema, jobRefs: z.array(NonEmptyStringSchema).min(1) }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_MINION).systemEnum('BuildPlanTaskProductKind'), minionRef: SlugSchema, behaviorRefs: z.array(NonEmptyStringSchema).min(1) }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.PROVIDER_BINDING).systemEnum('BuildPlanTaskProductKind'),\n providerRef: SlugSchema,\n scope: z.enum(ProviderBindingScope).systemEnum('ProviderBindingScope'),\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT).systemEnum('BuildPlanTaskProductKind'), productKey: SlugSchema }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.APPLICATION_DATA_SEED).systemEnum('BuildPlanTaskProductKind'),\n seedKey: z.string().regex(DATA_SEED_KEY_PATTERN),\n /** The resource whose rows the seed writes — the `resourceType` it declares. */\n resourceRef: SlugSchema,\n content: z.enum(BuildPlanDataSeedContent).systemEnum('BuildPlanDataSeedContent'),\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.WEBSITE_PAGE).systemEnum('BuildPlanTaskProductKind'), pageRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.WEBSITE_SECTION).systemEnum('BuildPlanTaskProductKind'), pageRef: SlugSchema, sectionRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskProductKind.DOCUMENTATION_CHAPTER).systemEnum('BuildPlanTaskProductKind'), chapterRef: SlugSchema }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskProductKind.INBOUND_CHANNEL_HANDLER).systemEnum('BuildPlanTaskProductKind'),\n /** The channel the handler serves — one the integration plan declared. Email is the only declarable channel. */\n channel: z.literal(InboundChannelKind.EMAIL).systemEnum('InboundChannelKind'),\n /** The handler's `ref`, exactly as `inboundHandlerRef()` will accept it. */\n handlerRef: z.string().regex(INBOUND_HANDLER_REF_PATTERN),\n }),\n]);\nexport type BuildPlanTaskProduct = z.infer<typeof BuildPlanTaskProductSchema>;\n\n/**\n * Every artifact identity a product claims — one string per artifact, not one\n * per product, because a product may claim several.\n *\n * `RESOURCE_SCHEMA_FIELDS` is why this returns a list. Two tasks may both enrich\n * one resource's schema (a domain shape and a billing concern, say), and that is\n * legitimate; what must never overlap is the FIELDS. Comparing whole products\n * would refuse the legitimate pair, and comparing only the resource would let two\n * tasks claim one field and make landing ambiguous again.\n *\n * Derived from the product's own members rather than stored, and total over the\n * vocabulary, so a kind added tomorrow must state its identity here or fail to\n * compile — it cannot be silently treated as equal to its siblings.\n */\nexport function buildPlanTaskProductIdentities(product: BuildPlanTaskProduct): readonly string[] {\n switch (product.kind) {\n case BuildPlanTaskProductKind.RESOURCE_SCHEMA_FIELDS:\n return product.fieldRefs.map((fieldRef) => `${product.kind}:${product.resourceRef}:${fieldRef}`);\n case BuildPlanTaskProductKind.RESOURCE_REGISTRATION:\n return product.operationRefs.map((operationRef) => `${product.kind}:${product.resourceRef}:${operationRef}`);\n case BuildPlanTaskProductKind.RESOURCE_SPECIFICATION:\n return product.fieldRefs.map((fieldRef) => `${product.kind}:${product.resourceRef}:${fieldRef}`);\n case BuildPlanTaskProductKind.RESOURCE_UI_BEHAVIOR:\n return [`${product.kind}:${product.resourceRef}`];\n case BuildPlanTaskProductKind.RESOURCE_RELATIONSHIP:\n return [`${product.kind}:${product.relationshipRef}`];\n case BuildPlanTaskProductKind.RESOURCE_OPERATION:\n return [`${product.kind}:${product.resourceRef}:${product.operationRef}`];\n case BuildPlanTaskProductKind.APPLICATION_VIEW:\n return [`${product.kind}:${product.viewRef}`];\n case BuildPlanTaskProductKind.APPLICATION_DOCUMENT:\n /*\n * The ref AS AUTHORED, so a slug and a namespaced ref are different artifact identities even\n * where they mean the same document — the duplicate-artifact refusal cannot see two tasks\n * claiming one document if they spell it differently. Not normalisable: a slug carries no\n * namespace, so nothing can recover `public.` from `privacy-notice`. It costs nothing today\n * because a slug names no catalogued document at all, and the dispatcher skips such a task.\n */\n return [`${product.kind}:${product.documentRef}`];\n case BuildPlanTaskProductKind.APPLICATION_MODULE:\n return [`${product.kind}:${product.moduleRef}`];\n // One identity per DECLARATION, like schema fields: two tasks may compose one config file as\n // long as they declare different things in it.\n case BuildPlanTaskProductKind.APPLICATION_FRONTEND_CONFIG:\n return product.declarationRefs.map((declarationRef) => `${product.kind}:${product.configSurface}:${declarationRef}`);\n case BuildPlanTaskProductKind.RESOURCE_COMPOSITE_VIEW:\n case BuildPlanTaskProductKind.RESOURCE_CUSTOM_VIEW:\n return [`${product.kind}:${product.resourceRef}:${product.viewRef}`];\n case BuildPlanTaskProductKind.RESOURCE_CHART_VIEW:\n return [`${product.kind}:${product.resourceRef}:${product.chartRef}`];\n case BuildPlanTaskProductKind.CUSTOM_COMPONENT:\n return [`${product.kind}:${product.componentRef}`];\n case BuildPlanTaskProductKind.APPLICATION_MILESTONE:\n return [`${product.kind}:${product.milestoneRef}`];\n // The ref alone: a document and a flow sharing one ref is still one guidance identity, and the\n // runtime keys a person's saved state by it — two artifacts claiming it would collide there too.\n case BuildPlanTaskProductKind.APPLICATION_GUIDANCE:\n return [`${product.kind}:${product.guidanceRef}`];\n case BuildPlanTaskProductKind.PDF_TEMPLATE:\n return [`${product.kind}:${product.resourceRef}:${product.templateRef}`];\n case BuildPlanTaskProductKind.APPLICATION_WORKER:\n return product.jobRefs.map((jobRef) => `${product.kind}:${product.workerRef}:${jobRef}`);\n case BuildPlanTaskProductKind.APPLICATION_MINION:\n return product.behaviorRefs.map((behaviorRef) => `${product.kind}:${product.minionRef}:${behaviorRef}`);\n // The SCOPE is part of the identity: one provider bound on the backend and on the website is two artifacts.\n case BuildPlanTaskProductKind.PROVIDER_BINDING:\n return [`${product.kind}:${product.scope}:${product.providerRef}`];\n case BuildPlanTaskProductKind.APPLICATION_BILLING_PRODUCT:\n return [`${product.kind}:${product.productKey}`];\n // The key alone: two seeds may write one resource, and the key is what the seed run ledger tracks.\n case BuildPlanTaskProductKind.APPLICATION_DATA_SEED:\n return [`${product.kind}:${product.seedKey}`];\n case BuildPlanTaskProductKind.WEBSITE_PAGE:\n return [`${product.kind}:${product.pageRef}`];\n case BuildPlanTaskProductKind.WEBSITE_SECTION:\n return [`${product.kind}:${product.pageRef}:${product.sectionRef}`];\n case BuildPlanTaskProductKind.DOCUMENTATION_CHAPTER:\n return [`${product.kind}:${product.chapterRef}`];\n case BuildPlanTaskProductKind.INBOUND_CHANNEL_HANDLER:\n return [`${product.kind}:${product.handlerRef}`];\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 skill every billing-catalogue task is authored with (#1835): the product-catalogue contract, the\n * money encoding (minor units), and the pricing-surface facts. The dispatch derives it from an\n * `APPLICATION_BILLING_PRODUCT` product whatever the decomposer wrote, so an agent writing the catalogue\n * the backend sells from is never without it.\n */\nexport const BILLING_CATALOG_SKILL_REF = 'configure-billing';\n\n/**\n * The skill every data-seed task is authored with (#2234): levels, modes, business keys, and the\n * environment restriction that keeps demonstration rows out of production. The dispatch derives it from\n * an `APPLICATION_DATA_SEED` product whatever the decomposer wrote.\n */\nexport const DATA_SEED_SKILL_REF = 'seeding-authoring';\n\nexport const BuildPlanTaskTargetSchema = z.discriminatedUnion('kind', [\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.MODULE), moduleRef: ModuleRefSchema }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.RESOURCE_STAGE),\n moduleRef: ModuleRefSchema,\n resourceRef: SlugSchema,\n stage: z.enum(BuildPlanResourceStage),\n }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.RELATIONSHIP),\n moduleRef: ModuleRefSchema,\n relationshipRef: SlugSchema,\n }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP),\n /** The companion generation step this task runs (e.g. i18n-labels, email-templates); resolved by the companion, never by a coding agent. */\n generationStepRef: SlugSchema,\n }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.SHELL_PLACEMENT),\n /**\n * Which shell surface this task authors — the placement family's OWN\n * `PlacementSurface`, deliberately not a build-plan copy of it.\n *\n * A copy was written first and was a defect, caught by probing the landing\n * renderer rather than by any test: `PlacementAddress` discriminates on\n * `surface` with `z.literal(...)` per option, so only the VALUES survive into\n * the schema, and the renderer resolves a discriminator by matching that value\n * SET against the exported enums. Two enums with identical values made the\n * match ambiguous, the renderer correctly refused to guess an owner, and the\n * address discriminator became unnameable — a landed placement plan would have\n * emitted `surface: \"SETTINGS_HUB\"` as a bare string instead of\n * `PlacementSurface.SETTINGS_HUB`. One concept, one named source.\n */\n surface: z.enum(PlacementSurface).systemEnum('PlacementSurface'),\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.MODULE_FRONTEND), moduleRef: ModuleRefSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.MODULE_BACKEND), moduleRef: ModuleRefSchema }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.APPLICATION_FRONTEND_CONFIG),\n configSurface: z.enum(FrontendConfigSurface).systemEnum('FrontendConfigSurface'),\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.WEBSITE) }),\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.TECHNICAL_DOCUMENTATION) }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.WORKER),\n /** The worker's directory under `workers/` and its key in the SaaS config, in slug form. */\n workerRef: SlugSchema,\n runtime: z.enum(BuildPlanWorkerRuntime).systemEnum('BuildPlanWorkerRuntime'),\n }),\n z.strictObject({\n kind: z.literal(BuildPlanTaskTargetKind.MINION),\n /** The minion's directory under `minions/` and its key in the SaaS config, in slug form. */\n minionRef: SlugSchema,\n }),\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.PROVIDER_BINDING), providerRef: SlugSchema }),\n z.strictObject({ kind: z.literal(BuildPlanTaskTargetKind.BILLING_CATALOG) }),\n]);\nexport type BuildPlanTaskTarget = z.infer<typeof BuildPlanTaskTargetSchema>;\n\n/**\n * One ordered build task. It names WHAT to build and WHY; it never carries\n * HOW (no paths, commands, prompts, cwd, model, profile). The host resolves\n * the physical allowed/prohibited paths and the fixed verification from the\n * target kind, and the installed skills from `skillRefs` against the app\n * knowledge catalog.\n *\n * Dependency readiness is DECLARED as prerequisite task refs and RESOLVED by\n * the host (a prerequisite is satisfied when its task has landed), never a\n * solved DAG the model must get right.\n */\nexport const BuildPlanTaskSchema = z.strictObject({\n /** `build-task-<slug>`, stamped by the trusted runtime. */\n taskRef: z.string().regex(new RegExp(`^${BUILD_PLAN_TASK_REF_PREFIX}[a-z0-9]+(?:-[a-z0-9]+)*$`)),\n /**\n * One sentence of intent: what this task delivers.\n *\n * Its OWN instance, not the file's shared leaf, which `templateRef` and the product ref lists also\n * hold. A display decorator mutates the instance it is applied to, and the workbench gives those\n * refs a receding identifier look, which the objective sentence then took too.\n */\n objective: z.string().trim().min(1),\n target: BuildPlanTaskTargetSchema,\n /**\n * The artifacts this task is accountable for — what proves it done.\n *\n * Coding tasks should declare at least one product that composition did not already\n * write. A target is a shared mutation scope; its scaffolded file is not evidence\n * that this task's intended work exists. Products identify the output to probe.\n *\n * Empty declarations remain representable and produce the advisory\n * `TASK_DECLARES_NO_PRODUCT`. The host may advance after a COMPLETED durable run,\n * while naming the task in `unverifiableLandedTaskRefs`: it ran, but its output\n * cannot be proven from a product declaration. An unexecuted task is not landed.\n * This distinction avoids repeatedly dispatching the same unprovable task without\n * presenting execution history as evidence that the intended product is correct.\n *\n * The ONE hard exception is a `COMPANION_GENERATION_STEP`, which must declare NONE.\n * That kind already carries its own typed landed condition, owned by the\n * generation-step service — a set computed asynchronously (planner units x\n * enabled locales), and for the migration step a STATE rather than files. A\n * product declared beside it would be read by nothing, which is the inert\n * declaration this field exists to avoid. Enforced on the graph below, in both\n * directions.\n */\n produces: z.array(BuildPlanTaskProductSchema).default([]),\n /**\n * Exactly ONE functional topic this task belongs to.\n *\n * **It does NOT drive ordering** — this said \"drives cross-app ordering\" until 2026-08-30 and\n * nothing ever ordered by it. Sequencing is `prerequisiteTaskRefs`, resolved by the host, and it\n * is the only thing that decides what may run next.\n *\n * What it DOES: the dispatch host stamps it into the coding-agent's task payload beside\n * `skillRefs`, so the agent is told which phase of building the application this task belongs to.\n * That is context an LLM reads, not a value the runtime branches on — the distinction matters,\n * because a reader who believes it orders will look here for a scheduling bug that lives in the\n * prerequisite graph. See issue #124.\n */\n functionalTopic: z.enum(MetaWorkflow_FunctionalTopic).systemEnum('MetaWorkflow_FunctionalTopic'),\n /** Installed app-knowledge skill folders that carry the technical HOW; resolved via the skills router at dispatch. */\n skillRefs: z.array(SkillRefSchema).min(1),\n /** Task refs that must have landed first; resolved by the host, not solved by the model. */\n prerequisiteTaskRefs: z.array(z.string()).default([]),\n /**\n * What this task is accountable to — traceability only, NEVER scope authority.\n *\n * The vocabulary is the target aspects `BUILD_PLAN_FAMILY_ASPECTS` declares for this edge:\n * functional and non-functional requirements, roadmap phases, the vision's success criteria and\n * constraints, drafted features, pricing plans, and the brand's name, logo direction and visual\n * tone. Each target after the first three was added because a producer had already been writing\n * it (#629, #1433, #1835, #2221). A companion generation step serves what it consumes: the `logo`\n * step serves the brand's logo direction and name.\n *\n * This schema accepts any non-empty string. Generation does not: the edge is DECLARED, so a key\n * that resolves to no element of a target family (when that family has landed) is a dangling\n * reference. The model is told so on retry, and the landing refuses it. That is why widening the\n * vocabulary to what producers genuinely mean matters: a true link the vocabulary does not name\n * fails generation. The workbench renders a key outside the vocabulary as visibly unresolved.\n */\n servesRefs: z.array(NonEmptyStringSchema).default([]),\n /**\n * Who asked for this task DIRECTLY (#1608), rather than it being derived from the specifications: the\n * signed-in person who added it in conversation. STAMPED by the append, never authored: a value in\n * generated output is discarded. Absent on every task the decomposition derived.\n *\n * It is what keeps a requested task alive. Build decomposition refines the plan from the domain plan, and\n * a task nothing in the specifications justifies would read as unjustified and be dropped; a requested\n * task it leaves out is carried forward instead, keeping only the prerequisites the new plan still holds.\n */\n requestedBy: NonEmptyStringSchema.optional(),\n});\nexport type BuildPlanTask = z.infer<typeof BuildPlanTaskSchema>;\n\n/**\n * THE build-plan payload — a **single aggregate per product**: the ORDERED\n * task graph that turns the accepted domain plan into buildable units.\n *\n * **Artifact-family id: `build-plan`.** This schema is the shape of the\n * journey artifact selected by `MetaWorkflow_ArtifactSelector.family ===\n * 'build-plan'` (the `family` vocabulary stays an open string owned by the\n * selector surface; this note is the single place tying the SHAPE to the\n * NAME). Produced by the build-decompose playbook, consumed by\n * build-dispatch (and build-scale, which runs the same branch): ready tasks\n * are dispatched in parallel waves of up to the application's build\n * parallelism (`wildo workbench parallelism`, 5 by default; 1 = one at a\n * time).\n *\n * Invariants enforced here: unique task refs; every prerequisite names a task\n * in this graph; no self-prerequisite. Cycle detection and ordering\n * soundness are the deterministic validator's job (`validateBuildPlanTaskGraph`).\n */\nexport const BuildPlanTaskGraphSchema = z.object({\n version: z.enum(BuildPlanTaskGraphVersion).default(BuildPlanTaskGraphVersion.V1),\n /**\n * At least one task, at the SCHEMA — not merely as a validator warning. The first live playbook-loop\n * run (2026-08-24) proved why: build-decompose answered `tasks: []`, which was schema-valid, passed\n * `_core` validation as a mere warning, and LANDED — overwriting a completed 3-task plan with a\n * vacuous artifact. Decomposing to zero tasks is a refusal (\"nothing to decompose\"), never an\n * artifact: an empty plan carries no information a reader could act on, and the file it replaces\n * does. Same vacuity class already closed on the requirements family (`functional: min(1)`).\n */\n tasks: z.array(BuildPlanTaskSchema).min(1),\n}).superRefine((graph, context) => {\n const refs = new Set<string>();\n graph.tasks.forEach((task, index) => {\n if (refs.has(task.taskRef)) {\n context.addIssue({ code: 'custom', message: `duplicate build task ref \"${task.taskRef}\"`, path: ['tasks', index, 'taskRef'] });\n }\n refs.add(task.taskRef);\n });\n /*\n * No two tasks claim the same artifact.\n *\n * This is what makes landing DECIDABLE, not a tidiness rule. If two tasks name\n * one product, the host cannot tell which of them a present artifact proves —\n * exactly the ambiguity that shared `target`s created, arriving through the\n * field that replaced them. Enforced here rather than left to the validator\n * because a graph that cannot answer \"has this task landed?\" is not a graph\n * the loop may run at all.\n */\n graph.tasks.forEach((task, index) => {\n const isGenerationStep = task.target.kind === BuildPlanTaskTargetKind.COMPANION_GENERATION_STEP;\n if (isGenerationStep && task.produces.length > 0) {\n context.addIssue({\n code: 'custom',\n message: `build task \"${task.taskRef}\" is a companion generation step and must declare no products; its landing is the generation step's own condition`,\n path: ['tasks', index, 'produces'],\n });\n }\n });\n const productOwners = new Map<string, string>();\n graph.tasks.forEach((task, index) => {\n task.produces.forEach((product, productIndex) => {\n buildPlanTaskProductIdentities(product).forEach((identity) => {\n const owner = productOwners.get(identity);\n if (owner !== undefined) {\n context.addIssue({\n code: 'custom',\n message: `build task \"${task.taskRef}\" claims the same artifact as \"${owner}\" (${identity}); an artifact is produced by exactly one task`,\n path: ['tasks', index, 'produces', productIndex],\n });\n return;\n }\n productOwners.set(identity, task.taskRef);\n });\n });\n });\n graph.tasks.forEach((task, index) => {\n task.prerequisiteTaskRefs.forEach((prerequisite, prerequisiteIndex) => {\n if (prerequisite === task.taskRef) {\n context.addIssue({ code: 'custom', message: `build task \"${task.taskRef}\" cannot be its own prerequisite`, path: ['tasks', index, 'prerequisiteTaskRefs', prerequisiteIndex] });\n } else if (!refs.has(prerequisite)) {\n context.addIssue({ code: 'custom', message: `build task \"${task.taskRef}\" names an unknown prerequisite \"${prerequisite}\"`, path: ['tasks', index, 'prerequisiteTaskRefs', prerequisiteIndex] });\n }\n });\n });\n});\nexport type BuildPlanTaskGraph = z.infer<typeof BuildPlanTaskGraphSchema>;\n/** @wildo_source:part:end build-plan.task-graph.config */\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"build-plan.family-aspects.d.ts","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan.family-aspects.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAI1E,eAAO,MAAM,yBAAyB,EAAE,wBA6HvC,CAAC"}
1
+ {"version":3,"file":"build-plan.family-aspects.d.ts","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan.family-aspects.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,2BAA2B,CAAC;AAI1E,eAAO,MAAM,yBAAyB,EAAE,wBA6IvC,CAAC"}
@@ -15,8 +15,10 @@ export const BUILD_PLAN_FAMILY_ASPECTS = {
15
15
  // The graph's only ordering authority — a SELF-edge (issue #124's lesson lives in the schema JSDoc).
16
16
  { field: 'prerequisiteTaskRefs', targetAspects: ['build-plan.task'] },
17
17
  /*
18
- * FIVE targets, and the two at the end were added 2026-09-11 (#629) because the producer
19
- * had already been writing them for as long as the field existed.
18
+ * The `servesRefs` targets (the edge below), and they grew one producer measurement at a
19
+ * time: five by 2026-09-11 — the two vision targets added (#629) because the producer had
20
+ * already been writing them for as long as the field existed — then a drafted feature
21
+ * (#1433), a pricing plan (#1835) and the brand (#2221).
20
22
  *
21
23
  * `servesRefs` is TRACEABILITY — what this task is accountable to — and the generation
22
24
  * contract asks the model for a plain string list, so nothing ever constrained it. Wonder
@@ -88,6 +90,20 @@ export const BUILD_PLAN_FAMILY_ASPECTS = {
88
90
  * nobody can trace back to its decision.
89
91
  */
90
92
  'business-model.plan',
93
+ /*
94
+ * The BRAND, added 2026-10-01 (#2221), on the same argument as the four above. The `logo`
95
+ * generation step consumes the brand brief, and the method tells the producer so, so a
96
+ * model naturally cites `brand.logo-direction` and `brand.name`. Refusing those keys made
97
+ * a correct 91-task plan fail generation over one task (app-creation-test-004, run
98
+ * `6abe4b92…`), and with a whole-artifact retry the plan came back as one task.
99
+ * `brand.visual-tone` is the input the design-system config target derives its palette
100
+ * and typography from. `brand.audience` and `brand.asset` are left out: no build task
101
+ * is accountable to an audience description, and an asset is something a step PRODUCES,
102
+ * not something it serves.
103
+ */
104
+ 'brand.name',
105
+ 'brand.logo-direction',
106
+ 'brand.visual-tone',
91
107
  ],
92
108
  },
93
109
  ],
@@ -1 +1 @@
1
- {"version":3,"file":"build-plan.family-aspects.js","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan.family-aspects.ts"],"names":[],"mappings":"A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AC,2BAA2B,CAAC,EAAE;gBACjG,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,EAAE,aAAa,EAAE,CAAC,0BAA0B,CAAC,EAAE;gBAC/F;oBACE,KAAK,EAAE,YAAY;oBACnB,aAAa,EAAE;wBACb,yBAAyB;wBACzB,6BAA6B;wBAC7B,eAAe;wBACf,0BAA0B;wBAC1B,mBAAmB;wBACnB;;;;;;;2BAOG;wBACH,sBAAsB;wBACtB;;;;;2BAKG;wBACH,qBAAqB;qBACtB;iBACF;aACF;YACD,gBAAgB,EAAE;gBAChB,SAAS,EAAE,iFAAiF;gBAC5F;;;;;;mBAMG;gBACH,QAAQ,EAAE,6TAA6T;gBACvU;;;;;;;;;;;mBAWG;gBACH,0BAA0B,EAAE,gGAAgG;gBAC5H;;;;;mBAKG;gBACH,kBAAkB,EAAE,kHAAkH;gBACtI,kBAAkB,EAAE,kHAAkH;gBACtI,oBAAoB,EAAE,4EAA4E;aACnG;SACF;KACF;CACF,CAAC","sourcesContent":["import { ApplicationSpecificationFamilySemanticSchemaRef } from \"../application-specification-family-identity.schemas\";\nimport type { FamilyAspectsDeclaration } from '../family-aspects.schemas';\nimport { FamilyAspectKind } from '../family-aspects.schemas';\nimport { BuildPlanTaskSchema } from './build-plan-task-graph.schemas';\n\nexport const BUILD_PLAN_FAMILY_ASPECTS: FamilyAspectsDeclaration = {\n schemaRef: ApplicationSpecificationFamilySemanticSchemaRef.BUILD_PLAN_TASK_GRAPH,\n aspects: [\n {\n key: 'build-plan.task',\n snapshotPath: 'tasks',\n kind: FamilyAspectKind.COLLECTION,\n itemSchema: BuildPlanTaskSchema,\n businessKey: 'taskRef',\n headlineField: 'objective',\n edges: [\n // The graph's only ordering authority — a SELF-edge (issue #124's lesson lives in the schema JSDoc).\n { field: 'prerequisiteTaskRefs', targetAspects: ['build-plan.task'] },\n /*\n * FIVE targets, and the two at the end were added 2026-09-11 (#629) because the producer\n * had already been writing them for as long as the field existed.\n *\n * `servesRefs` is TRACEABILITY — what this task is accountable to — and the generation\n * contract asks the model for a plain string list, so nothing ever constrained it. Wonder\n * CRM's plan named 8 keys outside the three declared targets: 2 `success-criterion-` and 6\n * `constraint-`, both real vision aspects with their own workbench resources. Neither is a\n * typo, and neither is unreasonable: a roadmap phase already carries\n * `deliversSuccessCriterionRefs` as a first-class edge, so \"work is accountable to a success\n * criterion\" is a relation this vocabulary already makes elsewhere.\n *\n * The alternative — refuse them and regenerate the plan — was rejected: it treats a\n * narrower-than-reality declaration as the truth and throws away traceability a human wrote\n * down. Widening costs nothing to a plan that names none of them (every split field is\n * `hideWhenEmpty`), and it makes the 8 keys resolve instead of sitting on the page as\n * \"unresolved\".\n */\n /*\n * THE LINK BACK TO THE DECISION (#1427). A build task's target names the domain-plan module\n * or relationship it builds, and those refs were carried in the data and invisible to the\n * registry: the drift pin only ever read TOP-LEVEL field names, and `target` is an object.\n * Measured on Wonder CRM, `relationshipRef` resolved 8 of 8.\n *\n * It is what makes RELATED useful on a build plan: from a task, the decision that motivated\n * it; from a decision, every task accountable to it.\n */\n { field: 'target', throughField: 'moduleRef', targetAspects: ['domain-plan.module'] },\n { field: 'target', throughField: 'relationshipRef', targetAspects: ['domain-plan.relationship'] },\n /*\n * The most-travelled link in the build lane, and an edge since #1482: 24 of 24 tasks on\n * Wonder CRM name a resource here. It was a stated non-edge for one reason — the domain plan\n * listed resources as strings with no identity — and that reason is gone.\n */\n { field: 'target', throughField: 'resourceRef', targetAspects: ['domain-plan.resource'] },\n // The same link on the PRODUCT side: what the task will have built when it lands.\n { field: 'produces', throughField: 'resourceRef', targetAspects: ['domain-plan.resource'] },\n /*\n * The experience plan's entries, on the product side (#1660). A view, milestone or guidance\n * task builds an entry the experience plan decided, and names it by the plan's own ref. As\n * edges, a ref the plan does not carry is a DANGLING finding — refused at generation, so the\n * model corrects it — instead of a silent mismatch. The one that made this necessary: the\n * dispatch tells an execution view from a custom view by looking the product's `viewRef` up in\n * the plan, and a free-text ref would quietly load the custom-view skill. Silent when the\n * application has no experience plan (the report asks only when the target family is present);\n * measured on the journey-built application, all four view products already resolve.\n */\n { field: 'produces', throughField: 'viewRef', targetAspects: ['experience-plan.view'] },\n { field: 'produces', throughField: 'milestoneRef', targetAspects: ['experience-plan.milestone'] },\n { field: 'produces', throughField: 'guidanceRef', targetAspects: ['experience-plan.guidance'] },\n {\n field: 'servesRefs',\n targetAspects: [\n 'requirements.functional',\n 'requirements.non-functional',\n 'roadmap.phase',\n 'vision.success-criterion',\n 'vision.constraint',\n /*\n * SIXTH, added 2026-09-22 (#1433 row 4) on the same evidence and the same argument as the\n * two above. Wonder CRM's plan names `feature-due-today-view` here, and that IS one of\n * its eight authored feature drafts — so the declaration was narrower than reality, and\n * refusing the key would treat the narrow declaration as the truth and throw away\n * traceability a human wrote down. \"This work serves that drafted feature\" is a relation\n * this vocabulary already makes everywhere else.\n */\n 'feature-drafts.draft',\n /*\n * SEVENTH, added 2026-09-27 (#1835): a billing-catalogue task writes the products a pricing\n * plan decided, and names the plan it realises here (`pricing-plan-team`) — so a task citing a\n * plan the business model does not carry is a dangling finding at generation, not a product\n * nobody can trace back to its decision.\n */\n 'business-model.plan',\n ],\n },\n ],\n nonEdgeRefFields: {\n skillRefs: 'installed app-knowledge skill folders — the skills catalog, not a family aspect',\n /*\n * NARROWED by #1482 and again by #1660 rather than removed: `produces.resourceRef` is an edge\n * (the resource IS a decided element), and so are `viewRef`, `milestoneRef` and `guidanceRef`\n * (the experience plan decides those entries). Everything else a product names — a field, an\n * operation, a chart, a component, a document — belongs to the built application and has no\n * aspect to point at.\n */\n produces: 'the rest of a product — fields, operations, charts, components, documents, inbound handlers and billing-catalogue product keys of the BUILT application, not decided elements (its `resourceRef`, `viewRef`, `milestoneRef` and `guidanceRef` are edges; a billing product traces to its pricing plan through `servesRefs`)',\n /*\n * The two halves of `target` that reach nothing addressable, stated rather than left silent\n * (#1427). `moduleRef` and `relationshipRef` beside them ARE edges — see above.\n *\n * `resourceRef` is the one to explain, because it LOOKS like it should resolve and the\n * measurement says it does: every `resourceRef` a build plan carries appears in a domain-plan\n * module's `mainResources` / `supportingResources`. But those are plain string arrays inside\n * a module item, not an aspect — the registry declares `domain-plan.module` and\n * `domain-plan.relationship` and nothing between them — so there is no target to point at.\n * Giving the domain plan a RESOURCE aspect would make this an edge and is the right fix; it\n * is a schema decision about a landed family, not something an edge declaration can do.\n */\n 'target.generationStepRef': 'a COMPANION generation step id (labels, seeds, emails) — a runtime step, not a decided element',\n /*\n * The non-resource targets (#1490). A worker, a minion and a provider are surfaces of the BUILT\n * application — composed by a scenario, bound in the SaaS config — and no family declares\n * them as elements. The capability composition decides whether the application HAS them, by\n * scenario, not which ones; so there is nothing addressable for these refs to point at.\n */\n 'target.workerRef': 'a worker package directory under `workers/` — a composed surface of the built application, not a decided element',\n 'target.minionRef': 'a minion package directory under `minions/` — a composed surface of the built application, not a decided element',\n 'target.providerRef': \"an engine provider ref — the engine's own catalogue, not a decided element\",\n },\n },\n ],\n};\n"]}
1
+ {"version":3,"file":"build-plan.family-aspects.js","sourceRoot":"","sources":["../../../../../src/_core/build-plan/build-plan.family-aspects.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,+CAA+C,EAAE,MAAM,sDAAsD,CAAC;AAEvH,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAEtE,MAAM,CAAC,MAAM,yBAAyB,GAA6B;IACjE,SAAS,EAAE,+CAA+C,CAAC,qBAAqB;IAChF,OAAO,EAAE;QACP;YACE,GAAG,EAAE,iBAAiB;YACtB,YAAY,EAAE,OAAO;YACrB,IAAI,EAAE,gBAAgB,CAAC,UAAU;YACjC,UAAU,EAAE,mBAAmB;YAC/B,WAAW,EAAE,SAAS;YACtB,aAAa,EAAE,WAAW;YAC1B,KAAK,EAAE;gBACL,qGAAqG;gBACrG,EAAE,KAAK,EAAE,sBAAsB,EAAE,aAAa,EAAE,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;;;;;;;;;;mBAWG;gBACH,0BAA0B,EAAE,gGAAgG;gBAC5H;;;;;mBAKG;gBACH,kBAAkB,EAAE,kHAAkH;gBACtI,kBAAkB,EAAE,kHAAkH;gBACtI,oBAAoB,EAAE,4EAA4E;aACnG;SACF;KACF;CACF,CAAC","sourcesContent":["import { ApplicationSpecificationFamilySemanticSchemaRef } from \"../application-specification-family-identity.schemas\";\nimport type { FamilyAspectsDeclaration } from '../family-aspects.schemas';\nimport { FamilyAspectKind } from '../family-aspects.schemas';\nimport { BuildPlanTaskSchema } from './build-plan-task-graph.schemas';\n\nexport const BUILD_PLAN_FAMILY_ASPECTS: FamilyAspectsDeclaration = {\n schemaRef: ApplicationSpecificationFamilySemanticSchemaRef.BUILD_PLAN_TASK_GRAPH,\n aspects: [\n {\n key: 'build-plan.task',\n snapshotPath: 'tasks',\n kind: FamilyAspectKind.COLLECTION,\n itemSchema: BuildPlanTaskSchema,\n businessKey: 'taskRef',\n headlineField: 'objective',\n edges: [\n // The graph's only ordering authority — a SELF-edge (issue #124's lesson lives in the schema JSDoc).\n { field: 'prerequisiteTaskRefs', targetAspects: ['build-plan.task'] },\n /*\n * The `servesRefs` targets (the edge below), and they grew one producer measurement at a\n * time: five by 2026-09-11 — the two vision targets added (#629) because the producer had\n * already been writing them for as long as the field existed — then a drafted feature\n * (#1433), a pricing plan (#1835) and the brand (#2221).\n *\n * `servesRefs` is TRACEABILITY — what this task is accountable to — and the generation\n * contract asks the model for a plain string list, so nothing ever constrained it. Wonder\n * CRM's plan named 8 keys outside the three declared targets: 2 `success-criterion-` and 6\n * `constraint-`, both real vision aspects with their own workbench resources. Neither is a\n * typo, and neither is unreasonable: a roadmap phase already carries\n * `deliversSuccessCriterionRefs` as a first-class edge, so \"work is accountable to a success\n * criterion\" is a relation this vocabulary already makes elsewhere.\n *\n * The alternative — refuse them and regenerate the plan — was rejected: it treats a\n * narrower-than-reality declaration as the truth and throws away traceability a human wrote\n * down. Widening costs nothing to a plan that names none of them (every split field is\n * `hideWhenEmpty`), and it makes the 8 keys resolve instead of sitting on the page as\n * \"unresolved\".\n */\n /*\n * THE LINK BACK TO THE DECISION (#1427). A build task's target names the domain-plan module\n * or relationship it builds, and those refs were carried in the data and invisible to the\n * registry: the drift pin only ever read TOP-LEVEL field names, and `target` is an object.\n * Measured on Wonder CRM, `relationshipRef` resolved 8 of 8.\n *\n * It is what makes RELATED useful on a build plan: from a task, the decision that motivated\n * it; from a decision, every task accountable to it.\n */\n { field: 'target', throughField: 'moduleRef', targetAspects: ['domain-plan.module'] },\n { field: 'target', throughField: 'relationshipRef', targetAspects: ['domain-plan.relationship'] },\n /*\n * The most-travelled link in the build lane, and an edge since #1482: 24 of 24 tasks on\n * Wonder CRM name a resource here. It was a stated non-edge for one reason — the domain plan\n * listed resources as strings with no identity — and that reason is gone.\n */\n { field: 'target', throughField: 'resourceRef', targetAspects: ['domain-plan.resource'] },\n // The same link on the PRODUCT side: what the task will have built when it lands.\n { field: 'produces', throughField: 'resourceRef', targetAspects: ['domain-plan.resource'] },\n /*\n * The experience plan's entries, on the product side (#1660). A view, milestone or guidance\n * task builds an entry the experience plan decided, and names it by the plan's own ref. As\n * edges, a ref the plan does not carry is a DANGLING finding — refused at generation, so the\n * model corrects it — instead of a silent mismatch. The one that made this necessary: the\n * dispatch tells an execution view from a custom view by looking the product's `viewRef` up in\n * the plan, and a free-text ref would quietly load the custom-view skill. Silent when the\n * application has no experience plan (the report asks only when the target family is present);\n * measured on the journey-built application, all four view products already resolve.\n */\n { field: 'produces', throughField: 'viewRef', targetAspects: ['experience-plan.view'] },\n { field: 'produces', throughField: 'milestoneRef', targetAspects: ['experience-plan.milestone'] },\n { field: 'produces', throughField: 'guidanceRef', targetAspects: ['experience-plan.guidance'] },\n {\n field: 'servesRefs',\n targetAspects: [\n 'requirements.functional',\n 'requirements.non-functional',\n 'roadmap.phase',\n 'vision.success-criterion',\n 'vision.constraint',\n /*\n * SIXTH, added 2026-09-22 (#1433 row 4) on the same evidence and the same argument as the\n * two above. Wonder CRM's plan names `feature-due-today-view` here, and that IS one of\n * its eight authored feature drafts — so the declaration was narrower than reality, and\n * refusing the key would treat the narrow declaration as the truth and throw away\n * traceability a human wrote down. \"This work serves that drafted feature\" is a relation\n * this vocabulary already makes everywhere else.\n */\n 'feature-drafts.draft',\n /*\n * SEVENTH, added 2026-09-27 (#1835): a billing-catalogue task writes the products a pricing\n * plan decided, and names the plan it realises here (`pricing-plan-team`) — so a task citing a\n * plan the business model does not carry is a dangling finding at generation, not a product\n * nobody can trace back to its decision.\n */\n 'business-model.plan',\n /*\n * The BRAND, added 2026-10-01 (#2221), on the same argument as the four above. The `logo`\n * generation step consumes the brand brief, and the method tells the producer so, so a\n * model naturally cites `brand.logo-direction` and `brand.name`. Refusing those keys made\n * a correct 91-task plan fail generation over one task (app-creation-test-004, run\n * `6abe4b92…`), and with a whole-artifact retry the plan came back as one task.\n * `brand.visual-tone` is the input the design-system config target derives its palette\n * and typography from. `brand.audience` and `brand.asset` are left out: no build task\n * is accountable to an audience description, and an asset is something a step PRODUCES,\n * not something it serves.\n */\n 'brand.name',\n 'brand.logo-direction',\n 'brand.visual-tone',\n ],\n },\n ],\n nonEdgeRefFields: {\n skillRefs: 'installed app-knowledge skill folders — the skills catalog, not a family aspect',\n /*\n * NARROWED by #1482 and again by #1660 rather than removed: `produces.resourceRef` is an edge\n * (the resource IS a decided element), and so are `viewRef`, `milestoneRef` and `guidanceRef`\n * (the experience plan decides those entries). Everything else a product names — a field, an\n * operation, a chart, a component, a document — belongs to the built application and has no\n * aspect to point at.\n */\n produces: 'the rest of a product — fields, operations, charts, components, documents, inbound handlers and billing-catalogue product keys of the BUILT application, not decided elements (its `resourceRef`, `viewRef`, `milestoneRef` and `guidanceRef` are edges; a billing product traces to its pricing plan through `servesRefs`)',\n /*\n * The two halves of `target` that reach nothing addressable, stated rather than left silent\n * (#1427). `moduleRef` and `relationshipRef` beside them ARE edges — see above.\n *\n * `resourceRef` is the one to explain, because it LOOKS like it should resolve and the\n * measurement says it does: every `resourceRef` a build plan carries appears in a domain-plan\n * module's `mainResources` / `supportingResources`. But those are plain string arrays inside\n * a module item, not an aspect — the registry declares `domain-plan.module` and\n * `domain-plan.relationship` and nothing between them — so there is no target to point at.\n * Giving the domain plan a RESOURCE aspect would make this an edge and is the right fix; it\n * is a schema decision about a landed family, not something an edge declaration can do.\n */\n 'target.generationStepRef': 'a COMPANION generation step id (labels, seeds, emails) — a runtime step, not a decided element',\n /*\n * The non-resource targets (#1490). A worker, a minion and a provider are surfaces of the BUILT\n * application — composed by a scenario, bound in the SaaS config — and no family declares\n * them as elements. The capability composition decides whether the application HAS them, by\n * scenario, not which ones; so there is nothing addressable for these refs to point at.\n */\n 'target.workerRef': 'a worker package directory under `workers/` — a composed surface of the built application, not a decided element',\n 'target.minionRef': 'a minion package directory under `minions/` — a composed surface of the built application, not a decided element',\n 'target.providerRef': \"an engine provider ref — the engine's own catalogue, not a decided element\",\n },\n },\n ],\n};\n"]}
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { RevenueModelKind, type BusinessModelLiteSnapshot } from './business-model-lite-snapshot.schemas';
2
+ import { PricingTiersStatus, RevenueModelKind, type BusinessModelLiteSnapshot } from './business-model-lite-snapshot.schemas';
3
3
  import { PricingModelAxis } from './pricing-plan.schemas';
4
4
  /**
5
5
  * The STRICT contract a provider answers for the business-model family.
@@ -10,9 +10,24 @@ import { PricingModelAxis } from './pricing-plan.schemas';
10
10
  * parsed against, and `plans: default([])` is a legitimate "not sketched yet" state for a human. A
11
11
  * provider handed that same schema can satisfy it with `{}`, which is the vacuity class already
12
12
  * closed on vision, roadmap, requirements and the build plan: schema-valid, validator-clean, and
13
- * carrying no information a reader could act on. So the generation contract requires at least one
14
- * plan and a classified revenue model, and stamps refs in the trusted runtime rather than asking the
15
- * model to produce them.
13
+ * carrying no information a reader could act on. So the generation contract requires a classified
14
+ * revenue model AND a declared `pricingTiers` status, and stamps refs in the trusted runtime rather
15
+ * than asking the model to produce them.
16
+ *
17
+ * ## An empty `plans` is a statement, never a default
18
+ *
19
+ * This contract used to require `plans.min(1)`. That closed the vacuity hole and opened a worse one:
20
+ * a creator who answered "not decided yet" left the model no honest output — it had to invent a
21
+ * tier, and the evaluation treatment correctly refused any tier the creator did not name. Every run
22
+ * failed, at roughly 20k tokens each (app-creation-test-004, 2026-10-01).
23
+ *
24
+ * The non-vacuity guarantee now comes from the STATUS rather than the count: `plans` may be empty only
25
+ * when `pricingTiers` is `UNDECIDED`, and the status is required, so `{ revenueModel, plans: [] }`
26
+ * still fails. Whether the declared status is TRUE of the interview is the judge's question, not the
27
+ * schema's — a schema cannot read the creator's answers.
28
+ *
29
+ * The superRefine also holds `proposalBasis` to the status: present on every plan of a `PROPOSED`
30
+ * sketch, absent on every plan of a `CREATOR_STATED` one.
16
31
  *
17
32
  * ## Nullable rather than optional, deliberately
18
33
  *
@@ -34,6 +49,8 @@ export declare const PricingPlanGenerationSchema: z.ZodObject<{
34
49
  targetIcpRefs: z.ZodArray<z.ZodString>;
35
50
  /** Requirement refs this plan unlocks — the traceability foundation reads to derive billing. */
36
51
  includesRequirementRefs: z.ZodArray<z.ZodString>;
52
+ /** What a PROPOSED plan was derived from; `null` on a creator-stated plan. See `PricingPlanConfig.proposalBasis`. */
53
+ proposalBasis: z.ZodNullable<z.ZodString>;
37
54
  }, z.core.$strict>;
38
55
  export type PricingPlanGeneration = z.infer<typeof PricingPlanGenerationSchema>;
39
56
  export declare const BusinessModelLiteSnapshotGenerationSchema: z.ZodObject<{
@@ -43,6 +60,11 @@ export declare const BusinessModelLiteSnapshotGenerationSchema: z.ZodObject<{
43
60
  * costs the reader the one thing this family exists to tell them.
44
61
  */
45
62
  revenueModel: z.ZodEnum<typeof RevenueModelKind>;
63
+ /**
64
+ * Required here though optional on the family schema: it is what lets an empty `plans` be an
65
+ * answer ("the creator has not decided") rather than an omission. See `PricingTiersStatus`.
66
+ */
67
+ pricingTiers: z.ZodEnum<typeof PricingTiersStatus>;
46
68
  plans: z.ZodArray<z.ZodObject<{
47
69
  /** Stamped into `pricing-plan-<slug>` by the runtime — the model never authors a ref. */
48
70
  slug: z.ZodString;
@@ -57,6 +79,8 @@ export declare const BusinessModelLiteSnapshotGenerationSchema: z.ZodObject<{
57
79
  targetIcpRefs: z.ZodArray<z.ZodString>;
58
80
  /** Requirement refs this plan unlocks — the traceability foundation reads to derive billing. */
59
81
  includesRequirementRefs: z.ZodArray<z.ZodString>;
82
+ /** What a PROPOSED plan was derived from; `null` on a creator-stated plan. See `PricingPlanConfig.proposalBasis`. */
83
+ proposalBasis: z.ZodNullable<z.ZodString>;
60
84
  }, z.core.$strict>>;
61
85
  }, z.core.$strict>;
62
86
  export type BusinessModelLiteSnapshotGeneration = z.infer<typeof BusinessModelLiteSnapshotGenerationSchema>;
@@ -1 +1 @@
1
- {"version":3,"file":"business-model-lite-snapshot-generation.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAqE,gBAAgB,EAAE,KAAK,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAG7K,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D;;;;;;;;;;;;;;;;;;GAkBG;AACH,eAAO,MAAM,2BAA2B;IACtC,yFAAyF;;;IAGzF,mGAAmG;;;;;;IAMnG,uGAAuG;;IAEvG,gGAAgG;;kBAEhG,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,yCAAyC;IACpD;;;;OAIG;;;QArBH,yFAAyF;;;QAGzF,mGAAmG;;;;;;QAMnG,uGAAuG;;QAEvG,gGAAgG;;;kBA2BhG,CAAC;AACH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAC;AAE5G,mFAAmF;AACnF,wBAAgB,wCAAwC,CAAC,KAAK,EAAE,OAAO,GAAG,yBAAyB,CAiBlG"}
1
+ {"version":3,"file":"business-model-lite-snapshot-generation.schemas.d.ts","sourceRoot":"","sources":["../../../../../src/_core/business-model-lite/business-model-lite-snapshot-generation.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAqE,kBAAkB,EAAE,gBAAgB,EAAE,KAAK,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AAGjM,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAI1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiCG;AACH,eAAO,MAAM,2BAA2B;IACtC,yFAAyF;;;IAGzF,mGAAmG;;;;;;IAMnG,uGAAuG;;IAEvG,gGAAgG;;IAEhG,qHAAqH;;kBAErH,CAAC;AACH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF,eAAO,MAAM,yCAAyC;IACpD;;;;OAIG;;IAEH;;;OAGG;;;QA5BH,yFAAyF;;;QAGzF,mGAAmG;;;;;;QAMnG,uGAAuG;;QAEvG,gGAAgG;;QAEhG,qHAAqH;;;kBAwDrH,CAAC;AACH,MAAM,MAAM,mCAAmC,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yCAAyC,CAAC,CAAC;AAE5G,mFAAmF;AACnF,wBAAgB,wCAAwC,CAAC,KAAK,EAAE,OAAO,GAAG,yBAAyB,CAmBlG"}
@@ -1,6 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { NonEmptyStringSchema } from '../market/market-references.schemas.js';
3
- import { BusinessModelLiteSnapshotSchema, BusinessModelLiteSnapshotVersion, RevenueModelKind } from './business-model-lite-snapshot.schemas.js';
3
+ import { BusinessModelLiteSnapshotSchema, BusinessModelLiteSnapshotVersion, PricingTiersStatus, RevenueModelKind } from './business-model-lite-snapshot.schemas.js';
4
4
  import { PRICING_PLAN_REF_PREFIX } from './business-model-references.schemas.js';
5
5
  import { applyFamilyRefPrefix } from '../utils/family-ref-stamping.js';
6
6
  import { PricingModelAxis } from './pricing-plan.schemas.js';
@@ -14,9 +14,24 @@ const SemanticSlugSchema = z.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/);
14
14
  * parsed against, and `plans: default([])` is a legitimate "not sketched yet" state for a human. A
15
15
  * provider handed that same schema can satisfy it with `{}`, which is the vacuity class already
16
16
  * closed on vision, roadmap, requirements and the build plan: schema-valid, validator-clean, and
17
- * carrying no information a reader could act on. So the generation contract requires at least one
18
- * plan and a classified revenue model, and stamps refs in the trusted runtime rather than asking the
19
- * model to produce them.
17
+ * carrying no information a reader could act on. So the generation contract requires a classified
18
+ * revenue model AND a declared `pricingTiers` status, and stamps refs in the trusted runtime rather
19
+ * than asking the model to produce them.
20
+ *
21
+ * ## An empty `plans` is a statement, never a default
22
+ *
23
+ * This contract used to require `plans.min(1)`. That closed the vacuity hole and opened a worse one:
24
+ * a creator who answered "not decided yet" left the model no honest output — it had to invent a
25
+ * tier, and the evaluation treatment correctly refused any tier the creator did not name. Every run
26
+ * failed, at roughly 20k tokens each (app-creation-test-004, 2026-10-01).
27
+ *
28
+ * The non-vacuity guarantee now comes from the STATUS rather than the count: `plans` may be empty only
29
+ * when `pricingTiers` is `UNDECIDED`, and the status is required, so `{ revenueModel, plans: [] }`
30
+ * still fails. Whether the declared status is TRUE of the interview is the judge's question, not the
31
+ * schema's — a schema cannot read the creator's answers.
32
+ *
33
+ * The superRefine also holds `proposalBasis` to the status: present on every plan of a `PROPOSED`
34
+ * sketch, absent on every plan of a `CREATOR_STATED` one.
20
35
  *
21
36
  * ## Nullable rather than optional, deliberately
22
37
  *
@@ -38,6 +53,8 @@ export const PricingPlanGenerationSchema = z.strictObject({
38
53
  targetIcpRefs: z.array(NonEmptyStringSchema),
39
54
  /** Requirement refs this plan unlocks — the traceability foundation reads to derive billing. */
40
55
  includesRequirementRefs: z.array(NonEmptyStringSchema),
56
+ /** What a PROPOSED plan was derived from; `null` on a creator-stated plan. See `PricingPlanConfig.proposalBasis`. */
57
+ proposalBasis: NonEmptyStringSchema.nullable(),
41
58
  });
42
59
  export const BusinessModelLiteSnapshotGenerationSchema = z.strictObject({
43
60
  /**
@@ -46,8 +63,37 @@ export const BusinessModelLiteSnapshotGenerationSchema = z.strictObject({
46
63
  * costs the reader the one thing this family exists to tell them.
47
64
  */
48
65
  revenueModel: z.enum(RevenueModelKind),
49
- plans: z.array(PricingPlanGenerationSchema).min(1),
66
+ /**
67
+ * Required here though optional on the family schema: it is what lets an empty `plans` be an
68
+ * answer ("the creator has not decided") rather than an omission. See `PricingTiersStatus`.
69
+ */
70
+ pricingTiers: z.enum(PricingTiersStatus),
71
+ plans: z.array(PricingPlanGenerationSchema),
50
72
  }).superRefine((generated, context) => {
73
+ if (generated.pricingTiers === PricingTiersStatus.UNDECIDED) {
74
+ if (generated.plans.length > 0) {
75
+ context.addIssue({
76
+ code: 'custom',
77
+ path: ['plans'],
78
+ message: 'pricingTiers is "undecided" but plans are present — an undecided sketch carries no plans; declare "creator_stated" or "proposed" instead.',
79
+ });
80
+ }
81
+ }
82
+ else if (generated.plans.length === 0) {
83
+ context.addIssue({
84
+ code: 'custom',
85
+ path: ['plans'],
86
+ message: `pricingTiers is "${generated.pricingTiers}" but no plan is present — record at least one plan, or declare "undecided" when the creator has not decided the tiers.`,
87
+ });
88
+ }
89
+ generated.plans.forEach((plan, index) => {
90
+ if (generated.pricingTiers === PricingTiersStatus.PROPOSED && plan.proposalBasis === null) {
91
+ context.addIssue({ code: 'custom', path: ['plans', index, 'proposalBasis'], message: 'a proposed plan must state its proposalBasis — the ICP and requirements it was derived from.' });
92
+ }
93
+ if (generated.pricingTiers === PricingTiersStatus.CREATOR_STATED && plan.proposalBasis !== null) {
94
+ context.addIssue({ code: 'custom', path: ['plans', index, 'proposalBasis'], message: 'a creator-stated plan carries no proposalBasis — a basis claims a proposal nobody asked for.' });
95
+ }
96
+ });
51
97
  // Keyed on the STAMPED form, not on the authored slug, because `applyFamilyRefPrefix` is deliberately
52
98
  // not injective: `team` and `pricing-plan-team` are two distinct slugs that both become
53
99
  // `pricing-plan-team`. Checking the slug would let that pair through and produce two plans sharing one
@@ -68,6 +114,7 @@ export function parseBusinessModelLiteSnapshotGeneration(input) {
68
114
  return BusinessModelLiteSnapshotSchema.parse({
69
115
  version: BusinessModelLiteSnapshotVersion.V1,
70
116
  revenueModel: generated.revenueModel,
117
+ pricingTiers: generated.pricingTiers,
71
118
  plans: generated.plans.map((plan) => ({
72
119
  ref: applyFamilyRefPrefix(plan.slug, PRICING_PLAN_REF_PREFIX),
73
120
  name: plan.name,
@@ -78,6 +125,7 @@ export function parseBusinessModelLiteSnapshotGeneration(input) {
78
125
  ...(plan.targetSummary === null ? {} : { targetSummary: plan.targetSummary }),
79
126
  ...(plan.targetIcpRefs.length === 0 ? {} : { targetIcpRefs: plan.targetIcpRefs }),
80
127
  ...(plan.includesRequirementRefs.length === 0 ? {} : { includesRequirementRefs: plan.includesRequirementRefs }),
128
+ ...(plan.proposalBasis === null ? {} : { proposalBasis: plan.proposalBasis }),
81
129
  })),
82
130
  });
83
131
  }