@wildo-ai/framework-knowledge 1.1.9 → 1.1.10

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 (376) hide show
  1. package/dist/claude-marketplace/.claude-plugin/marketplace.json +1 -1
  2. package/dist/claude-marketplace/plugins/wildo/.claude-plugin/plugin.json +1 -1
  3. package/dist/claude-marketplace/plugins/wildo/references/acceptance.md +11 -0
  4. package/dist/claude-marketplace/plugins/wildo/references/expert-personas-and-deliberations.md +26 -7
  5. package/dist/claude-marketplace/plugins/wildo/references/runs-judges-and-questions.md +4 -2
  6. package/dist/claude-marketplace/plugins/wildo/skills/accept/SKILL.md +4 -2
  7. package/dist/claude-marketplace/plugins/wildo/skills/why/SKILL.md +9 -3
  8. package/dist/esm/framework-knowledge.definitions.d.ts +1 -1
  9. package/dist/esm/framework-knowledge.definitions.d.ts.map +1 -1
  10. package/dist/esm/framework-knowledge.definitions.js +84 -4
  11. package/dist/esm/framework-knowledge.definitions.js.map +1 -1
  12. package/dist/esm/framework-knowledge.loader.d.ts.map +1 -1
  13. package/dist/esm/index.d.ts.map +1 -1
  14. package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.d.ts +1 -1
  15. package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.d.ts.map +1 -1
  16. package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.js +1 -1
  17. package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.js.map +1 -1
  18. package/dist/esm/playbooks/bottom_up.build/playbook.definition.d.ts.map +1 -1
  19. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts +39 -1
  20. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts.map +1 -1
  21. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js +132 -20
  22. package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js.map +1 -1
  23. package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts.map +1 -1
  24. package/dist/esm/playbooks/bottom_up.conception/playbook.definition.d.ts +8 -4
  25. package/dist/esm/playbooks/bottom_up.conception/playbook.definition.d.ts.map +1 -1
  26. package/dist/esm/playbooks/bottom_up.conception/playbook.definition.js +13 -6
  27. package/dist/esm/playbooks/bottom_up.conception/playbook.definition.js.map +1 -1
  28. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts +2 -1
  29. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts.map +1 -1
  30. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js +85 -8
  31. package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js.map +1 -1
  32. package/dist/esm/playbooks/bottom_up.experience-plan/playbook.definition.d.ts +4 -3
  33. package/dist/esm/playbooks/bottom_up.experience-plan/playbook.definition.d.ts.map +1 -1
  34. package/dist/esm/playbooks/bottom_up.experience-plan/playbook.definition.js +4 -3
  35. package/dist/esm/playbooks/bottom_up.experience-plan/playbook.definition.js.map +1 -1
  36. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts +12 -3
  37. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts.map +1 -1
  38. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js +8 -4
  39. package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js.map +1 -1
  40. package/dist/esm/playbooks/bottom_up.website-plan/playbook.definition.d.ts +4 -1
  41. package/dist/esm/playbooks/bottom_up.website-plan/playbook.definition.d.ts.map +1 -1
  42. package/dist/esm/playbooks/bottom_up.website-plan/playbook.definition.js +2 -1
  43. package/dist/esm/playbooks/bottom_up.website-plan/playbook.definition.js.map +1 -1
  44. package/dist/esm/playbooks/cross_cutting.application-creation/playbook.definition.d.ts.map +1 -1
  45. package/dist/esm/playbooks/cross_cutting.compliance/playbook.definition.d.ts.map +1 -1
  46. package/dist/esm/playbooks/cross_cutting.feature-development/playbook.definition.d.ts.map +1 -1
  47. package/dist/esm/playbooks/cross_cutting.refinement/playbook.definition.d.ts.map +1 -1
  48. package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts.map +1 -1
  49. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts +1 -1
  50. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts.map +1 -1
  51. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js +13 -1
  52. package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js.map +1 -1
  53. package/dist/esm/playbooks/refinement.feature-contribution/playbook.definition.d.ts.map +1 -1
  54. package/dist/esm/playbooks/refinement.governance-document-candidate/playbook.definition.d.ts.map +1 -1
  55. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts +2 -2
  56. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts.map +1 -1
  57. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js +10 -4
  58. package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js.map +1 -1
  59. package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.d.ts +2 -1
  60. package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.d.ts.map +1 -1
  61. package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.js +5 -3
  62. package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.js.map +1 -1
  63. package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.d.ts +2 -1
  64. package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.d.ts.map +1 -1
  65. package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.js +11 -9
  66. package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.js.map +1 -1
  67. package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.d.ts +17 -3
  68. package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.d.ts.map +1 -1
  69. package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.js +19 -2
  70. package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.js.map +1 -1
  71. package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts.map +1 -1
  72. package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts.map +1 -1
  73. package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.d.ts.map +1 -1
  74. package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.d.ts.map +1 -1
  75. package/dist/esm/playbooks/top_down.compliance-evidence-adequacy/playbook.definition.d.ts.map +1 -1
  76. package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts.map +1 -1
  77. package/dist/esm/playbooks/top_down.compliance-research/playbook.definition.d.ts.map +1 -1
  78. package/dist/esm/playbooks/top_down.definition/playbook.definition.d.ts.map +1 -1
  79. package/dist/esm/playbooks/top_down.expert-personas/playbook.definition.d.ts +27 -6
  80. package/dist/esm/playbooks/top_down.expert-personas/playbook.definition.d.ts.map +1 -1
  81. package/dist/esm/playbooks/top_down.expert-personas/playbook.definition.js +32 -12
  82. package/dist/esm/playbooks/top_down.expert-personas/playbook.definition.js.map +1 -1
  83. package/dist/esm/playbooks/top_down.feature-drafts/playbook.definition.d.ts.map +1 -1
  84. package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts.map +1 -1
  85. package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.d.ts.map +1 -1
  86. package/dist/esm/playbooks/top_down.market-research/playbook.definition.d.ts.map +1 -1
  87. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts +2 -1
  88. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts.map +1 -1
  89. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js +13 -5
  90. package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js.map +1 -1
  91. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts.map +1 -1
  92. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js +38 -3
  93. package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js.map +1 -1
  94. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts +2 -1
  95. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts.map +1 -1
  96. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js +23 -8
  97. package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js.map +1 -1
  98. package/dist/esm/playbooks/top_down.risk-register/playbook.definition.d.ts.map +1 -1
  99. package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts.map +1 -1
  100. package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts.map +1 -1
  101. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts.map +1 -1
  102. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js +11 -0
  103. package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js.map +1 -1
  104. package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/external-framework-mapping.json +1 -1
  105. package/dist/knowledge/manifest.json +7 -7
  106. package/dist/knowledge/playbooks/bottom_up.assemble-verify/playbook.json +1 -1
  107. package/dist/knowledge/playbooks/bottom_up.build-decompose/evaluation-protocol.json +1 -1
  108. package/dist/knowledge/playbooks/bottom_up.build-decompose/evaluation-treatment.json +1 -1
  109. package/dist/knowledge/playbooks/bottom_up.build-decompose/method.md +149 -11
  110. package/dist/knowledge/playbooks/bottom_up.build-decompose/playbook.json +40 -2
  111. package/dist/knowledge/playbooks/bottom_up.build-dispatch/method.md +55 -0
  112. package/dist/knowledge/playbooks/bottom_up.build-dispatch/playbook.json +1 -1
  113. package/dist/knowledge/playbooks/bottom_up.conception/playbook.json +10 -2
  114. package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-protocol.json +1 -1
  115. package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-treatment.json +1 -1
  116. package/dist/knowledge/playbooks/bottom_up.domain-plan/method.md +107 -11
  117. package/dist/knowledge/playbooks/bottom_up.domain-plan/playbook.json +4 -2
  118. package/dist/knowledge/playbooks/bottom_up.experience-plan/method.md +28 -6
  119. package/dist/knowledge/playbooks/bottom_up.experience-plan/playbook.json +5 -4
  120. package/dist/knowledge/playbooks/bottom_up.placement-plan/method.md +50 -0
  121. package/dist/knowledge/playbooks/bottom_up.placement-plan/playbook.json +16 -4
  122. package/dist/knowledge/playbooks/bottom_up.website-plan/method.md +19 -0
  123. package/dist/knowledge/playbooks/bottom_up.website-plan/playbook.json +5 -2
  124. package/dist/knowledge/playbooks/refinement.compliance-document-candidate/method.md +2 -1
  125. package/dist/knowledge/playbooks/refinement.compliance-document-candidate/playbook.json +1 -1
  126. package/dist/knowledge/playbooks/refinement.document-facts/method.md +8 -0
  127. package/dist/knowledge/playbooks/refinement.document-facts/playbook.json +3 -2
  128. package/dist/knowledge/playbooks/refinement.feature-contribution/method.md +5 -2
  129. package/dist/knowledge/playbooks/refinement.feature-contribution/playbook.json +1 -1
  130. package/dist/knowledge/playbooks/top_down.brand-identity/evaluation-protocol.json +1 -1
  131. package/dist/knowledge/playbooks/top_down.brand-identity/evaluation-treatment.json +1 -1
  132. package/dist/knowledge/playbooks/top_down.brand-identity/method.md +7 -3
  133. package/dist/knowledge/playbooks/top_down.brand-identity/playbook.json +3 -3
  134. package/dist/knowledge/playbooks/top_down.brand-name-research/method.md +56 -16
  135. package/dist/knowledge/playbooks/top_down.brand-name-research/playbook.json +6 -4
  136. package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/evaluation-protocol.json +1 -1
  137. package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/evaluation-treatment.json +1 -1
  138. package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/method.md +30 -9
  139. package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/playbook.json +5 -3
  140. package/dist/knowledge/playbooks/top_down.brand-naming/playbook.json +12 -1
  141. package/dist/knowledge/playbooks/top_down.capability-map/method.md +10 -9
  142. package/dist/knowledge/playbooks/top_down.capability-map/playbook.json +1 -1
  143. package/dist/knowledge/playbooks/top_down.expert-personas/playbook.json +16 -2
  144. package/dist/knowledge/playbooks/top_down.feature-drafts/method.md +5 -2
  145. package/dist/knowledge/playbooks/top_down.feature-drafts/playbook.json +1 -1
  146. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-protocol.json +1 -1
  147. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-treatment.json +1 -1
  148. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/method.md +26 -0
  149. package/dist/knowledge/playbooks/top_down.market-snapshot-produce/playbook.json +4 -2
  150. package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-protocol.json +1 -1
  151. package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-treatment.json +1 -1
  152. package/dist/knowledge/playbooks/top_down.phase-gate/playbook.json +1 -1
  153. package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-protocol.json +1 -1
  154. package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-treatment.json +1 -1
  155. package/dist/knowledge/playbooks/top_down.requirements-definition/method.md +84 -9
  156. package/dist/knowledge/playbooks/top_down.requirements-definition/playbook.json +6 -3
  157. package/dist/knowledge/playbooks/top_down.vision-elicitation/method.md +19 -0
  158. package/dist/knowledge/playbooks/top_down.vision-elicitation/playbook.json +19 -1
  159. package/dist/knowledge/references/brand.name-choice.config.md +20 -3
  160. package/dist/knowledge/references/brand.name-screening.config.md +58 -3
  161. package/dist/knowledge/references/build-plan.task-graph.config.md +55 -0
  162. package/dist/knowledge/references/companion.market.prompt-renderer.md +11 -6
  163. package/dist/knowledge/references/example.authorization.application-roles.office-and-field.md +44 -0
  164. package/dist/knowledge/references/example.backend.custom-operation.audit-event.md +81 -0
  165. package/dist/knowledge/references/example.backend.custom-operation.child-line-total.md +258 -0
  166. package/dist/knowledge/references/example.backend.custom-operation.computed-total.md +153 -0
  167. package/dist/knowledge/references/example.backend.custom-operation.create-related-resource.md +107 -0
  168. package/dist/knowledge/references/example.data-seeding.minimal.md +10 -9
  169. package/dist/knowledge/references/example.data-seeding.row-reference.md +80 -0
  170. package/dist/knowledge/references/example.email.template.minimal.md +1 -1
  171. package/dist/knowledge/references/example.resource.config-wiring.retention-policy-operations.md +74 -0
  172. package/dist/knowledge/references/example.resource.personal-data.free-text-field.md +19 -0
  173. package/dist/knowledge/references/example.resource.personal-data.person-without-account.md +27 -0
  174. package/dist/knowledge/references/example.resource.status-lifecycle.quote.md +152 -0
  175. package/dist/knowledge/references/example.resource.ui-behavior.filter-presets.md +15 -0
  176. package/dist/knowledge/references/example.resource.ui-behavior.operation-icon.md +8 -0
  177. package/dist/knowledge/references/example.views.app-level.home-definition.md +13 -0
  178. package/dist/knowledge/references/example.views.chart-definition.shared.md +83 -0
  179. package/dist/knowledge/references/experience-plan.config.md +60 -7
  180. package/dist/knowledge/references/market.context-block.builder.md +1 -1
  181. package/dist/knowledge/references/placement-plan.config.md +43 -0
  182. package/dist/knowledge/references/requirements.functional-requirement.config.md +8 -2
  183. package/dist/knowledge/references/requirements.non-functional-requirement.config.md +2 -0
  184. package/dist/knowledge/references/requirements.references.conventions.md +1 -1
  185. package/dist/knowledge/references/requirements.snapshot.config.md +57 -1
  186. package/dist/knowledge/references/requirements.snapshot.validation.md +35 -1
  187. package/dist/knowledge/references/saas.backend.audit-logs.log-event.md +63 -0
  188. package/dist/knowledge/references/saas.backend.document-sequence.issue-in-operation.md +60 -0
  189. package/dist/knowledge/references/saas.backend.document-sequence.raise-floor.md +156 -0
  190. package/dist/knowledge/references/saas.backend.email.send.md +77 -0
  191. package/dist/knowledge/references/saas.backend.notifications.operation-email-template-ref.md +60 -0
  192. package/dist/knowledge/references/saas.data-seeding.computed-entry.md +43 -0
  193. package/dist/knowledge/references/saas.data-seeding.definition-input.md +8 -2
  194. package/dist/knowledge/references/saas.data-seeding.row-reference.md +93 -0
  195. package/dist/knowledge/references/saas.frontend.collection-filter-presets.md +124 -0
  196. package/dist/knowledge/references/saas.frontend.launcher.item-refs.md +316 -0
  197. package/dist/knowledge/references/saas.frontend.launcher.merge-rules.md +106 -0
  198. package/dist/knowledge/references/saas.frontend.launcher.runtime-availability.md +60 -0
  199. package/dist/knowledge/references/saas.frontend.resource-label-params.md +52 -0
  200. package/dist/knowledge/references/saas.frontend.resource-operation-frontend-config.md +47 -18
  201. package/dist/knowledge/references/saas.frontend.resource-ui-behavior-config.md +4 -1
  202. package/dist/knowledge/references/saas.frontend.settings-hub.engine-destination-roles.md +25 -0
  203. package/dist/knowledge/references/saas.frontend.settings-hub.placement.md +2 -2
  204. package/dist/knowledge/references/saas.models.audit.trail-config.md +45 -0
  205. package/dist/knowledge/references/saas.models.notifications.user-notification-definition.md +5 -3
  206. package/dist/knowledge/references/saas.models.resource-config.builder-parameters.md +26 -0
  207. package/dist/knowledge/references/saas.models.roles.definition.md +61 -0
  208. package/dist/knowledge/references/saas.models.roles.organization-defaults.md +97 -0
  209. package/dist/knowledge/references/saas.public-runtime.contract.md +26 -0
  210. package/dist/knowledge/references/saas.website.astro.bridge.md +10 -0
  211. package/dist/knowledge/references/saas.website.astro.label-loader.md +3 -0
  212. package/dist/knowledge/references/saas.website.astro.llms-txt-server.md +14 -1
  213. package/dist/knowledge/references/saas.website.astro.site-context.md +13 -0
  214. package/dist/knowledge/references/saas.website.blog.bridge.md +4 -0
  215. package/dist/knowledge/references/saas.website.config.site-context-loader.md +3 -0
  216. package/dist/knowledge/references/saas.website.legal.public-document-links.md +76 -0
  217. package/dist/knowledge/references/saas.website.root-config.seo.md +2 -1
  218. package/dist/knowledge/references/saas.website.runtime.context.md +7 -0
  219. package/dist/knowledge/references/saas.website.seo.llms-txt-config.md +2 -0
  220. package/dist/knowledge/references/website-plan.config.md +26 -0
  221. package/dist/knowledge/references/zod.decorators.chainable-runtime.md +13 -0
  222. package/dist/knowledge/references/zod.decorators.decorator-vocabulary.md +7 -0
  223. package/dist/knowledge/references/zod.decorators.document-sequence.md +65 -0
  224. package/dist/knowledge/references/zod.decorators.schema-metadata.md +1 -0
  225. package/dist/knowledge/references/zod.decorators.shared-structural-methods.md +21 -0
  226. package/dist/knowledge/references/zod.factories.bigdecimal.md +1 -0
  227. package/dist/knowledge/references/zod.factories.code.md +1 -0
  228. package/dist/knowledge/references/zod.factories.duration.md +1 -0
  229. package/dist/knowledge/references/zod.factories.money.md +1 -0
  230. package/dist/knowledge/registries/assurance-authority-bases.json +1 -1
  231. package/dist/knowledge/registries/framework-topics.json +337 -1
  232. package/dist/knowledge/registries/playbooks.json +18 -18
  233. package/dist/knowledge/registries/source-tags.json +1435 -873
  234. package/dist/knowledge/rules/live-context-door.md +1 -1
  235. package/dist/knowledge/skills/INDEX.md +3 -1
  236. package/dist/knowledge/skills/application-consumer-documentation-authoring/SKILL.md +16 -3
  237. package/dist/knowledge/skills/application-database-migrations/SKILL.md +14 -3
  238. package/dist/knowledge/skills/application-roles-authoring/SKILL.md +158 -0
  239. package/dist/knowledge/skills/application-roles-authoring/references/framework-application-roles-api.md +169 -0
  240. package/dist/knowledge/skills/application-roles-authoring/references/office-and-field-worked-example.md +63 -0
  241. package/dist/knowledge/skills/authorization-unit-narrowing/SKILL.md +6 -1
  242. package/dist/knowledge/skills/backend-custom-operation/SKILL.md +256 -9
  243. package/dist/knowledge/skills/backend-custom-operation/references/after-the-operation.md +42 -0
  244. package/dist/knowledge/skills/backend-custom-operation/references/framework-audit-log-event-api.md +220 -0
  245. package/dist/knowledge/skills/brand-logo-authoring/SKILL.md +5 -0
  246. package/dist/knowledge/skills/brand-name-screening/SKILL.md +33 -9
  247. package/dist/knowledge/skills/brand-name-screening/references/framework-brand-name-screening-api.md +78 -6
  248. package/dist/knowledge/skills/brand-name-screening/references/screening-procedure.md +30 -8
  249. package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-privacy-notice.md +2 -1
  250. package/dist/knowledge/skills/config-app-shell/SKILL.md +58 -5
  251. package/dist/knowledge/skills/config-app-shell/references/framework-launcher-items-api.md +461 -0
  252. package/dist/knowledge/skills/config-app-shell/references/framework-launcher-visibility-api.md +80 -0
  253. package/dist/knowledge/skills/config-design-system/SKILL.md +28 -6
  254. package/dist/knowledge/skills/config-navigation/SKILL.md +14 -3
  255. package/dist/knowledge/skills/config-saas/SKILL.md +25 -11
  256. package/dist/knowledge/skills/config-saas/references/compliance-declarations.md +51 -1
  257. package/dist/knowledge/skills/config-saas/references/framework-audit-trail-config-api.md +62 -2
  258. package/dist/knowledge/skills/config-saas-backend/SKILL.md +6 -1
  259. package/dist/knowledge/skills/configure-billing/SKILL.md +18 -4
  260. package/dist/knowledge/skills/email-add-template/SKILL.md +27 -5
  261. package/dist/knowledge/skills/email-add-template/references/email-artifact-paths.md +1 -1
  262. package/dist/knowledge/skills/email-add-template/references/framework-email-send-api.md +128 -0
  263. package/dist/knowledge/skills/email-add-template/references/framework-operation-email-template-ref-api.md +99 -0
  264. package/dist/knowledge/skills/engine-component-registration/SKILL.md +6 -1
  265. package/dist/knowledge/skills/engine-product-definitions/SKILL.md +21 -8
  266. package/dist/knowledge/skills/flows-actors-chat-assistant/SKILL.md +10 -2
  267. package/dist/knowledge/skills/flows-actors-llm-agent-invocation/SKILL.md +18 -4
  268. package/dist/knowledge/skills/frontend-component-catalog/SKILL.md +11 -3
  269. package/dist/knowledge/skills/frontend-component-catalog/references/framework-component-catalog.md +2 -1
  270. package/dist/knowledge/skills/frontend-component-catalog/references/framework-component-usage.md +8 -0
  271. package/dist/knowledge/skills/i18n-rerun-pipeline/SKILL.md +18 -4
  272. package/dist/knowledge/skills/i18n-translation-rerun/SKILL.md +10 -2
  273. package/dist/knowledge/skills/infra-environment-config/SKILL.md +6 -1
  274. package/dist/knowledge/skills/local-environment-bootstrap/SKILL.md +6 -1
  275. package/dist/knowledge/skills/market-add-feature-benefit/SKILL.md +10 -2
  276. package/dist/knowledge/skills/market-alternatives/SKILL.md +10 -2
  277. package/dist/knowledge/skills/market-authoring-overview/SKILL.md +10 -2
  278. package/dist/knowledge/skills/market-category/SKILL.md +21 -7
  279. package/dist/knowledge/skills/market-channels/SKILL.md +6 -1
  280. package/dist/knowledge/skills/market-companion-prompt-enrichment/SKILL.md +11 -3
  281. package/dist/knowledge/skills/market-companion-prompt-enrichment/references/framework-companion-behavior-api.md +1 -1
  282. package/dist/knowledge/skills/market-generation-cli/SKILL.md +21 -11
  283. package/dist/knowledge/skills/market-generation-cli/references/framework-market-generation-cli.md +11 -6
  284. package/dist/knowledge/skills/market-icp/SKILL.md +10 -2
  285. package/dist/knowledge/skills/market-jobs-pains-gains/SKILL.md +6 -1
  286. package/dist/knowledge/skills/market-message-templates-authoring/SKILL.md +6 -1
  287. package/dist/knowledge/skills/market-persona/SKILL.md +14 -3
  288. package/dist/knowledge/skills/market-positioning-authoring/SKILL.md +6 -1
  289. package/dist/knowledge/skills/market-proof-and-objection/SKILL.md +10 -2
  290. package/dist/knowledge/skills/market-scoring-interpretation/SKILL.md +6 -1
  291. package/dist/knowledge/skills/market-snapshot-validation/SKILL.md +14 -3
  292. package/dist/knowledge/skills/market-tone-of-voice/SKILL.md +6 -1
  293. package/dist/knowledge/skills/model-cost-attribution/references/framework-work-unit-api.md +26 -0
  294. package/dist/knowledge/skills/module-companion-exports/SKILL.md +7 -1
  295. package/dist/knowledge/skills/module-relationships/SKILL.md +31 -4
  296. package/dist/knowledge/skills/pdf-template-authoring/SKILL.md +4 -2
  297. package/dist/knowledge/skills/provider-address-lookup/SKILL.md +14 -3
  298. package/dist/knowledge/skills/provider-frontend-file-picker/SKILL.md +6 -1
  299. package/dist/knowledge/skills/provider-operation-calls/SKILL.md +14 -3
  300. package/dist/knowledge/skills/rate-limit-authoring/SKILL.md +10 -2
  301. package/dist/knowledge/skills/resource-add-field/SKILL.md +10 -2
  302. package/dist/knowledge/skills/resource-add-field/references/framework-field-cross-layer-api.md +46 -17
  303. package/dist/knowledge/skills/resource-add-resource/SKILL.md +14 -2
  304. package/dist/knowledge/skills/resource-add-resource/references/framework-new-resource-core-config-api.md +26 -0
  305. package/dist/knowledge/skills/resource-config-wiring/SKILL.md +29 -3
  306. package/dist/knowledge/skills/resource-config-wiring/references/framework-collection-operation-declarations.md +19 -4
  307. package/dist/knowledge/skills/resource-config-wiring/references/framework-operation-audit-api.md +5 -2
  308. package/dist/knowledge/skills/resource-config-wiring/references/framework-personal-data-declaration-api.md +103 -0
  309. package/dist/knowledge/skills/resource-config-wiring/references/framework-retention-policy-operations.md +135 -0
  310. package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-resource-config-api.md +26 -0
  311. package/dist/knowledge/skills/resource-config-wiring/references/framework-user-notifications-api.md +26 -7
  312. package/dist/knowledge/skills/resource-custom-view/SKILL.md +10 -2
  313. package/dist/knowledge/skills/resource-custom-view/references/custom-view-contracts.md +46 -17
  314. package/dist/knowledge/skills/resource-external-data/references/erasure-suppression.md +2 -2
  315. package/dist/knowledge/skills/resource-retention-binding/SKILL.md +5 -1
  316. package/dist/knowledge/skills/resource-schema-authoring/SKILL.md +15 -1
  317. package/dist/knowledge/skills/resource-schema-authoring/references/computed-totals.md +569 -0
  318. package/dist/knowledge/skills/resource-schema-authoring/references/document-numbers.md +358 -0
  319. package/dist/knowledge/skills/resource-schema-authoring/references/framework-decorator-vocabulary-api.md +8 -0
  320. package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-decorator-methods-api.md +21 -0
  321. package/dist/knowledge/skills/resource-schema-authoring/references/framework-special-factories-api.md +7 -2
  322. package/dist/knowledge/skills/resource-schema-authoring/references/framework-zod-lifecycle-and-chainable-api.md +13 -0
  323. package/dist/knowledge/skills/resource-status-lifecycle/SKILL.md +153 -0
  324. package/dist/knowledge/skills/resource-status-lifecycle/references/commercial-documents.md +46 -0
  325. package/dist/knowledge/skills/resource-status-lifecycle/references/quote-lifecycle-worked-example.md +198 -0
  326. package/dist/knowledge/skills/resource-ui-behavior/SKILL.md +30 -4
  327. package/dist/knowledge/skills/resource-ui-behavior/references/framework-collection-filter-presets-api.md +157 -0
  328. package/dist/knowledge/skills/resource-ui-behavior/references/framework-frontend-resource-ui-contracts-api.md +101 -19
  329. package/dist/knowledge/skills/seeding-authoring/SKILL.md +155 -40
  330. package/dist/knowledge/skills/seeding-authoring/references/cross-seed-row-references.md +67 -0
  331. package/dist/knowledge/skills/seeding-authoring/references/framework-data-seeding-api.md +148 -4
  332. package/dist/knowledge/skills/seeding-authoring/references/seed-row-overlay.md +22 -0
  333. package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-destinations-catalog.md +43 -0
  334. package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-placement-api.md +2 -2
  335. package/dist/knowledge/skills/spec-companion-exports/SKILL.md +6 -1
  336. package/dist/knowledge/skills/spec-component-update/SKILL.md +10 -2
  337. package/dist/knowledge/skills/spec-composite-view-update/SKILL.md +2 -2
  338. package/dist/knowledge/skills/spec-family-update/SKILL.md +71 -66
  339. package/dist/knowledge/skills/spec-family-update/references/family-spec-routing.md +1 -1
  340. package/dist/knowledge/skills/spec-resource-update/SKILL.md +30 -10
  341. package/dist/knowledge/skills/spec-resource-update/references/resource-spec-field-routing.md +28 -0
  342. package/dist/knowledge/skills/spec-update-after-change/SKILL.md +22 -5
  343. package/dist/knowledge/skills/views-add-composite-view/SKILL.md +6 -1
  344. package/dist/knowledge/skills/views-add-custom-view/SKILL.md +10 -2
  345. package/dist/knowledge/skills/views-app-level/SKILL.md +13 -3
  346. package/dist/knowledge/skills/views-app-level/references/application-home.md +56 -0
  347. package/dist/knowledge/skills/views-chart-authoring/SKILL.md +221 -37
  348. package/dist/knowledge/skills/views-composite-authoring/SKILL.md +22 -5
  349. package/dist/knowledge/skills/views-execution-authoring/SKILL.md +1 -1
  350. package/dist/knowledge/skills/website-anonymous-session/SKILL.md +32 -2
  351. package/dist/knowledge/skills/website-blog-authoring/SKILL.md +16 -3
  352. package/dist/knowledge/skills/website-blog-authoring/references/blog-adapter-api.md +4 -0
  353. package/dist/knowledge/skills/website-bundle-discipline/SKILL.md +7 -1
  354. package/dist/knowledge/skills/website-consent-gate-overrides/SKILL.md +13 -1
  355. package/dist/knowledge/skills/website-factory-advanced/SKILL.md +10 -2
  356. package/dist/knowledge/skills/website-inbound-contact-forms/SKILL.md +13 -1
  357. package/dist/knowledge/skills/website-layout-overrides/SKILL.md +6 -1
  358. package/dist/knowledge/skills/website-marketing-metadata-extension/SKILL.md +19 -1
  359. package/dist/knowledge/skills/website-navigation-authoring/SKILL.md +55 -18
  360. package/dist/knowledge/skills/website-navigation-authoring/references/framework-public-document-links-api.md +98 -0
  361. package/dist/knowledge/skills/website-navigation-authoring/references/worked-examples-header-footer.md +8 -11
  362. package/dist/knowledge/skills/website-page-authoring/SKILL.md +16 -5
  363. package/dist/knowledge/skills/website-page-authoring/references/framework-site-context-loader-api.md +3 -0
  364. package/dist/knowledge/skills/website-primitive-overrides/SKILL.md +6 -1
  365. package/dist/knowledge/skills/website-section-faq/SKILL.md +6 -1
  366. package/dist/knowledge/skills/website-section-feature-benefit-summary/SKILL.md +6 -1
  367. package/dist/knowledge/skills/website-section-feature-detail/SKILL.md +10 -2
  368. package/dist/knowledge/skills/website-section-hero/SKILL.md +6 -1
  369. package/dist/knowledge/skills/website-section-pricing/SKILL.md +6 -1
  370. package/dist/knowledge/skills/website-section-social-proof/SKILL.md +12 -2
  371. package/dist/knowledge/skills/website-seo-aeo-geo/SKILL.md +15 -3
  372. package/dist/knowledge/skills/website-seo-aeo-geo/references/geo-api.md +16 -1
  373. package/dist/knowledge/skills/website-seo-aeo-geo/references/seo-api.md +2 -1
  374. package/dist/knowledge/topic-index.json +1441 -269
  375. package/dist/tsconfig.build.tsbuildinfo +1 -1
  376. package/package.json +4 -4
@@ -0,0 +1,46 @@
1
+ # Commercial documents: a quote, an order, an invoice
2
+
3
+ Read this when a resource is a document a customer receives and relies on: a quote, an order confirmation, an
4
+ invoice, a credit note, a delivery note. Such a document is several engine features at once, and leaving one out is
5
+ what makes an application's documents untrustworthy: a hand-typed number that repeats, a total someone edited, an
6
+ issued invoice that still changes.
7
+
8
+ | part | what it must be | how | owning skill |
9
+ |---|---|---|---|
10
+ | **its number** | allocated by the server, consecutive, unique per organization | `.documentSequence({ format, scope })`; for a document numbered at issue rather than at drafting (an invoice), `allocation: DocumentSequenceAllocation.EXPLICIT` on a field declared `.optional()` | `resource-schema-authoring`, `references/document-numbers.md` |
11
+ | **its money** | amounts in one currency, never summed across currencies | `currency: CurrencySchema` on the document, every amount `z_money({ currenciesAllowed: [CurrencyAllowed.FIAT] })` (all three from `@wildo-ai/zod-decorators`). A money value carries its own scale (`decimals`), so a total converts each amount to the currency's scale before summing | `resource-schema-authoring`, `references/special-factories.md` and `references/computed-totals.md` |
12
+ | **its lines** | frozen with the document | an array field on the document (below) | `resource-schema-authoring` |
13
+ | **its total** | computed by the server, never typed | excluded from create and update, set by a prefix with `authoritativeFields` | `resource-schema-authoring`, `references/computed-totals.md` |
14
+ | **frozen once issued** | no edit after it is sent or issued; transitions only | the status excluded from UPDATE, one operation per transition, UPDATE's `enabledCondition` true only in DRAFT | this skill, Steps 2–4 |
15
+ | **its PDF** (when the customer receives a file) | generated from the frozen document | `z_file({ generation: { source: FileGenerationSource.PDF_TEMPLATE, templateId } })` and a template binding | `pdf-template-authoring` |
16
+
17
+ The worked example (`references/quote-lifecycle-worked-example.md`) ties the number, the currency, the lines, the
18
+ discount, the server-owned total and the freeze together on one quote; the prefix that computes its total is the
19
+ computed-total example in `resource-schema-authoring`.
20
+
21
+ ## Lines: an array on the document
22
+
23
+ Declare the lines as an array of objects on the document (`lines: z.array(z.object({ description, quantity,
24
+ unitPrice: z_money() }))`), not as a separate resource. A sent quote or an issued invoice is a snapshot: the
25
+ customer received exactly those lines, at those prices. As an array they are part of the document's own row, so the
26
+ UPDATE that edits them is the UPDATE the freeze refuses, the total is computed from the same row, and the PDF renders
27
+ one record. A price inside a line is stored and returned as exactly as a top-level amount, on both databases.
28
+
29
+ Make lines their own resource (a COMPOSITION child; the relationship, the parent foreign key and the cascade are
30
+ `module-relationships`) only when each line has a life of its own: it is reported on across documents (sales per
31
+ product), it is fulfilled or invoiced separately, or one document holds thousands. Then the document needs an internal
32
+ operation that recomputes its total, called from every line operation inside the line's transaction, and that same
33
+ operation refuses once the document is issued, which keeps the lines frozen with it. `resource-schema-authoring`,
34
+ `references/computed-totals.md` ("When the lines are their own resource"), shows it, run on both databases; it re-reads
35
+ every line on each line write, so for a document of thousands of lines consider an incremental total instead. The PDF
36
+ and the export then read the children, not the row.
37
+
38
+ ## Issuing
39
+
40
+ A document numbered at issue (an invoice) is drafted without a number. Its ISSUE transition allocates the number in
41
+ the same transaction that moves the status: `issueDocumentSequenceNumberInOperation` in the transition's custom
42
+ implementation, with `transactionalCore: true` and the counters as a participant (`references/document-numbers.md`).
43
+ A document numbered at creation (a quote, an order) needs nothing more than the decorator.
44
+
45
+ Conversions between documents (an accepted quote creates an order, an order creates an invoice) are Step 5 of this
46
+ skill: the target is created in the source's transition, in one transaction.
@@ -0,0 +1,198 @@
1
+ # Worked Example — A Quote's Lifecycle
2
+
3
+ A quote moves DRAFT → SENT → ACCEPTED or DECLINED, and is frozen once sent. It is also a commercial
4
+ document: a server-allocated number, one currency, lines, and a total the server computes. The schema, the
5
+ organization relationship and the resource configuration, as one example that the framework builds in
6
+ its own tests.
7
+
8
+ Read it when a resource has states a person moves it through and the application must refuse the
9
+ moves the business does not allow.
10
+
11
+
12
+ ## Usage Example
13
+
14
+ ```typescript
15
+ *
16
+ * A quote moves DRAFT → SENT → ACCEPTED or DECLINED. `z_money`, `CurrencySchema`, `CurrencyAllowed` and
17
+ * `DocumentSequenceScope` import from `@wildo-ai/zod-decorators`; everything else below from
18
+ * `@wildo-ai/saas-models` (and `zod`). The schema lives in `<resource>.schemas.ts`, the rest in
19
+ * `<resource>.resources-config.ts`.
20
+ *
21
+ * Four things make it a lifecycle rather than a field anyone edits:
22
+ * 1. `status` is `.excludeFromUpdate()`, so the generic UPDATE cannot move it at all.
23
+ * 2. Each transition is its own operation, `resourceOperationLike: UPDATE` with an empty
24
+ * `requestDto`: the target state is the server's decision, never the caller's.
25
+ * 3. `enabledCondition` says which state the transition starts from. The engine enforces it on the
26
+ * backend (and the UI hides the action), so SEND on an accepted quote is refused.
27
+ * 4. `basicPrefixOperation` returns ONLY the new state and its timestamp (spreading the current row
28
+ * would write every field back, overwriting a concurrent edit), and `authoritativeFields` names
29
+ * them. A key the prefix introduces is kept on the ordinary HTTP path anyway; the declaration is
30
+ * what keeps it when a caller reaches the service with that key already in its payload (an MCP
31
+ * tool, another service), where the strict re-parse would otherwise strip it.
32
+ * And UPDATE itself is enabled only while the quote is a DRAFT: SENT is LOCKED (no edits, yet ACCEPT and
33
+ * DECLINE still move it on) and ACCEPTED and DECLINED are FINAL (nothing moves them again).
34
+ *
35
+ * It is also a COMMERCIAL DOCUMENT, and these fields make it one:
36
+ * - `number` is allocated by the server at create, consecutive per organization and year (`Q-2026-00042`); a client
37
+ * never sends it, and the decorator makes it unique and server-only;
38
+ * - `currency` is the quote's one currency; every amount on it is a fiat `z_money()` in that currency;
39
+ * - `lines` are an array on the quote, so they freeze with it: the UPDATE that edits them is refused once it is SENT;
40
+ * - `total` is the server's: excluded from create and update, computed by a prefix on CREATE and UPDATE with
41
+ * `authoritativeFields: ['total']` from the lines and `discountPercent` (see the computed-total recipe), never typed
42
+ * by a person.
43
+ *
44
+ * Concurrency: the starting-state check runs before the write and is not a compare-and-swap. Two
45
+ * transitions from the same state arriving at the same moment (ACCEPT and DECLINE on one SENT quote)
46
+ * can both pass it, and the last write wins. Sequential calls are refused correctly. Closing the
47
+ * concurrent case is the engine's work (a transition whose write is conditional on its starting state),
48
+ * not something an application can declare today.
49
+ */
50
+ export enum Quote_Status {
51
+ DRAFT = 'DRAFT',
52
+ SENT = 'SENT',
53
+ ACCEPTED = 'ACCEPTED',
54
+ DECLINED = 'DECLINED',
55
+ }
56
+
57
+ export const Quote_Schema = z.object({
58
+ _id: z.string().min(1).isPrimaryKey(),
59
+ organizationId: z.string().min(1).isDBIndexed().isForeignKey().excludeFromUpdate(),
60
+ number: z.string().documentSequence({ format: 'Q-{YYYY}-{n:5}', scope: DocumentSequenceScope.ORGANIZATION }).isSummaryField(),
61
+ title: z.string().trim().min(1).max(200).isSummaryField(),
62
+ currency: CurrencySchema,
63
+ lines: z.array(z.object({
64
+ description: z.string().trim().min(1).max(500),
65
+ quantity: z.number().int().min(1),
66
+ unitPrice: z_money({ currenciesAllowed: [CurrencyAllowed.FIAT] }),
67
+ })).default([]),
68
+ discountPercent: z.number().min(0).max(100).default(0),
69
+ total: z_money({ currenciesAllowed: [CurrencyAllowed.FIAT] }).optional().isSummaryField().excludeFromCreate().excludeFromUpdate(),
70
+ status: z.enum(Quote_Status).default(Quote_Status.DRAFT).isSummaryField().excludeFromCreate().excludeFromUpdate(),
71
+ sentAt: z.date().optional().excludeFromCreate().excludeFromUpdate(),
72
+ decidedAt: z.date().optional().excludeFromCreate().excludeFromUpdate(),
73
+ });
74
+
75
+ /** In `<module>.relationships.ts`: the organization the quote belongs to (its primary scope). */
76
+ export const quote_ResourceRelationships: ResourceRelationship[] = [
77
+ createResourcesRelationship(
78
+ CoreResourceType.ORGANIZATIONS, 'quotes',
79
+ ResourceRelationshipCardinality.ONE, ResourceRelationshipCardinality.MANY,
80
+ { nature: RelationshipNature.COMPOSITION, isPrimaryScope: true, foreignKeyField: 'organizationId' },
81
+ ),
82
+ ];
83
+
84
+ export enum Quote_Operations {
85
+ SEND = 'send',
86
+ ACCEPT = 'accept',
87
+ DECLINE = 'decline',
88
+ }
89
+
90
+ type Quote_CoreOperations = CoreResourceOperation.READ | CoreResourceOperation.LIST | CoreResourceOperation.CREATE | CoreResourceOperation.UPDATE;
91
+
92
+ export const quote_ResourceConfiguration_InitializationFactory = (resourcesRelationships: ResourceRelationship[]) =>
93
+ createResourceConfiguration_Initialization<typeof Quote_Operations, Quote_CoreOperations, typeof Quote_Schema>({
94
+ mainSchema: Quote_Schema,
95
+ resourceIdentifier: 'quotes',
96
+ resourceFieldIdentifier: 'quoteId',
97
+ resourceRelationships: resourcesRelationships,
98
+ isSystemResource: false,
99
+ coreOperations: [CoreResourceOperation.READ, CoreResourceOperation.LIST, CoreResourceOperation.CREATE, CoreResourceOperation.UPDATE],
100
+ customOperation: Quote_Operations,
101
+ operationsConfiguration: {
102
+ [CoreResourceOperation.READ]: { variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_MEMBER], riskLevel: ResourceOperationRiskLevel.LOW }] },
103
+ [CoreResourceOperation.LIST]: { variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_MEMBER], riskLevel: ResourceOperationRiskLevel.LOW }] },
104
+ [CoreResourceOperation.CREATE]: { variants: [{ variantType: ResourceOperationVariantType.API_CALL, isDefault: true, roles: [CORE_ORG_ROLES.ORG_MEMBER], riskLevel: ResourceOperationRiskLevel.MEDIUM }] },
105
+ [CoreResourceOperation.UPDATE]: {
106
+ variants: [{
107
+ variantType: ResourceOperationVariantType.API_CALL,
108
+ isDefault: true,
109
+ roles: [CORE_ORG_ROLES.ORG_MEMBER],
110
+ riskLevel: ResourceOperationRiskLevel.MEDIUM,
111
+ // Frozen once sent: the content a customer received does not change under them.
112
+ enabledCondition: ({ currentObject }) => currentObject.status === Quote_Status.DRAFT,
113
+ }],
114
+ },
115
+ [Quote_Operations.SEND]: {
116
+ variants: [{
117
+ variantType: ResourceOperationVariantType.API_CALL,
118
+ isDefault: true,
119
+ roles: [CORE_ORG_ROLES.ORG_MEMBER],
120
+ // A decision a customer relies on: HIGH puts every transition in the audit trail.
121
+ riskLevel: ResourceOperationRiskLevel.HIGH,
122
+ resourceOperationLike: CoreResourceOperation.UPDATE,
123
+ requestDto: z.object({}),
124
+ enabledCondition: ({ currentObject }) => currentObject.status === Quote_Status.DRAFT,
125
+ basicPrefixOperation: () => ({ status: Quote_Status.SENT, sentAt: new Date() }),
126
+ authoritativeFields: ['status', 'sentAt'],
127
+ }],
128
+ },
129
+ [Quote_Operations.ACCEPT]: {
130
+ variants: [{
131
+ variantType: ResourceOperationVariantType.API_CALL,
132
+ isDefault: true,
133
+ roles: [CORE_ORG_ROLES.ORG_MEMBER],
134
+ // Only a sent quote can be accepted; accepting a draft is refused.
135
+ riskLevel: ResourceOperationRiskLevel.HIGH,
136
+ resourceOperationLike: CoreResourceOperation.UPDATE,
137
+ requestDto: z.object({}),
138
+ enabledCondition: ({ currentObject }) => currentObject.status === Quote_Status.SENT,
139
+ basicPrefixOperation: () => ({ status: Quote_Status.ACCEPTED, decidedAt: new Date() }),
140
+ authoritativeFields: ['status', 'decidedAt'],
141
+ }],
142
+ },
143
+ [Quote_Operations.DECLINE]: {
144
+ variants: [{
145
+ variantType: ResourceOperationVariantType.API_CALL,
146
+ isDefault: true,
147
+ roles: [CORE_ORG_ROLES.ORG_MEMBER],
148
+ // Starts from SENT like ACCEPT, so after either has run the other is refused. Two calls arriving at the
149
+ // same moment are not serialized: see the concurrency note above.
150
+ riskLevel: ResourceOperationRiskLevel.HIGH,
151
+ resourceOperationLike: CoreResourceOperation.UPDATE,
152
+ requestDto: z.object({}),
153
+ enabledCondition: ({ currentObject }) => currentObject.status === Quote_Status.SENT,
154
+ basicPrefixOperation: () => ({ status: Quote_Status.DECLINED, decidedAt: new Date() }),
155
+ authoritativeFields: ['status', 'decidedAt'],
156
+ }],
157
+ },
158
+ },
159
+ });
160
+ ```
161
+
162
+ What each part earns:
163
+
164
+ - **`number` is `.documentSequence(...)`.** The server allocates `Q-2026-00042` at create, consecutive per
165
+ organization and restarting each year; the decorator makes it server-only and unique. A hand-typed number repeats.
166
+ - **`currency`, with every amount a fiat `z_money()`.** One currency per quote, so a total never sums across
167
+ currencies.
168
+ - **`lines` are an array on the quote.** They are part of the row, so the UPDATE that edits them is the UPDATE the
169
+ freeze refuses: what the customer received cannot change underneath them. `references/commercial-documents.md` says
170
+ when lines deserve their own resource instead.
171
+ - **`total` is excluded from create and update.** No client can send it; a prefix on CREATE and UPDATE computes it from
172
+ the lines and `discountPercent` and owns it through `authoritativeFields` (`resource-schema-authoring`,
173
+ `references/computed-totals.md`).
174
+ - **`status` is `.excludeFromUpdate()` (and `.excludeFromCreate()`).** The generic UPDATE and CREATE
175
+ cannot set it, so the only way to change a quote's state is one of its transitions. Without this,
176
+ every transition below is a shortcut beside a door that is still open.
177
+ - **One operation per transition, borrowing UPDATE, with an empty `requestDto`.** The caller asks
178
+ for the transition; the server decides the resulting state. A transition that accepted a body would
179
+ let the caller rewrite the quote on the way past.
180
+ - **`enabledCondition` names the starting state.** The engine checks it on the backend before the
181
+ operation runs and refuses a call from any other state; the frontend hides the action from the same
182
+ rule. This is the guard, not a hint.
183
+ - **`basicPrefixOperation` returns only the new state and its timestamp.** Spreading the current row
184
+ into the result would write every field back, overwriting an edit made in between.
185
+ - **`authoritativeFields` names those fields.** On the ordinary HTTP path a key the prefix introduces is
186
+ kept anyway. The declaration is what keeps it when a caller reaches the service with the key already in
187
+ its payload (an MCP tool, another service): there the strict re-parse would drop the excluded field and
188
+ the transition would answer success having written nothing.
189
+ - **UPDATE's own `enabledCondition` freezes the quote outside DRAFT.** A sent quote's content is what
190
+ the customer received.
191
+ - **HIGH risk on transitions.** It puts every transition in the audit trail; MEDIUM and LOW sit below
192
+ the automatic audit floor.
193
+
194
+ **The limit to know:** the starting-state check runs before the write and is not a compare-and-swap. Two
195
+ transitions from the same state that arrive at the same moment (ACCEPT and DECLINE on one SENT quote) can
196
+ both pass, and the last write wins. One after the other, the second is refused. Do not try to close this
197
+ in application code: it is the engine's to close, by making a transition's write conditional on its
198
+ starting state.
@@ -81,6 +81,7 @@ from the resource itself (Step 7).
81
81
  | Need | Read next |
82
82
  |-------------------------------------|---------------------------------------------------------------------------------|
83
83
  | Layout / sections / chrome | Step 7 — decide each surface; `references/surface-decisions.md` |
84
+ | Filter pills above a list ("Overdue", "Mine") | `collectionDisplayConfig.presetFilters`; `references/framework-collection-filter-presets-api.md` |
84
85
  | Operation keys / `ResourceUIBehaviorConfig` / preset map | `references/framework-frontend-resource-ui-contracts-api.md` |
85
86
  | Enum visuals + modes | `references/framework-enum-frontend-handling-api.md` |
86
87
  | Display vs edit mode vocabulary | `references/framework-display-edit-modes-api.md` |
@@ -479,8 +480,16 @@ while leaving the core operations to inherit framework defaults:
479
480
  * tomorrow. It resolves against the viewer's own clock at the moment the pill is
480
481
  * pressed, and goes off by itself when the day rolls over.
481
482
  */
483
+ /*
484
+ * `overdue` and `due-this-week` are windows on the due date (#2511), and they combine with the status tabs:
485
+ * "Pending" plus "Overdue" is the list a person opens first. `mine` names the VIEWER, resolved from the session
486
+ * when the pill is clicked, so each person's "Mine" is their own todos; it is disabled for a viewer with no user.
487
+ */
482
488
  presetFilters: [
483
489
  { ref: 'urgent', filters: { priority: Todos_Priority.URGENT } },
490
+ { ref: 'overdue', filters: { dueDate: { relativeRange: CollectionFilterPresetRelativeRange.BEFORE_TODAY } } },
491
+ { ref: 'due-this-week', filters: { dueDate: { relativeRange: CollectionFilterPresetRelativeRange.NEXT_7_DAYS } } },
492
+ { ref: 'mine', filters: { assignedToUserId: { contextValue: CollectionFilterPresetContextValue.CURRENT_USER } } },
484
493
  { ref: 'created-today', filters: { createdAt: { relativeRange: CollectionFilterPresetRelativeRange.TODAY } } },
485
494
  { ref: 'touched-this-week', filters: { updatedAt: { relativeRange: CollectionFilterPresetRelativeRange.LAST_7_DAYS } } },
486
495
  ],
@@ -567,6 +576,7 @@ while leaving the core operations to inherit framework defaults:
567
576
  - `references/framework-per-primitive-ui-api.md` — source-backed per-type UI
568
577
  - `references/framework-foreign-key-ui-api.md` — source-backed FK reference display & picker row modes (`LABEL` / `SUMMARY`)
569
578
  - `references/surface-decisions.md` — deciding each surface without a sibling to mirror, when a section earns its place, the chrome decision table, and a rejected over-separated layout beside the accepted one, plus the action lane (how an action collects its input, and which filter controls a collection offers)
579
+ - `references/framework-collection-filter-presets-api.md` — source-backed preset vocabulary: date windows (incl. overdue, next N days), the viewer's own id, numeric bounds
570
580
  - `references/framework-resource-layout-templates-api.md` — source-backed `layout.{edit,display,summary,header}`, the `layout.refs` manifest, and `<ResourceHeaderTitle />`
571
581
  - `references/framework-related-resource-embeds-api.md` — source-backed `RelatedResourceSections`, the `EmbedRelated*` family, `viaForeignKey` edge disambiguation, preview, and descent bounding
572
582
 
@@ -598,9 +608,20 @@ Run from the app root and substitute the resource path:
598
608
  | No descriptions on read surfaces | `rg -n "display:\s*\{[^}]*showDescription:\s*true" frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx` (expect no output) |
599
609
  | Summary chrome is bare | `rg -n "summary:\s*DisplayChromeMode\." frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx` (expect `HIDDEN`) |
600
610
  | No raw color strings in enum chrome | `rg -n "color:\s*['\"]#" frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx` |
601
- | No Tailwind class smuggling | `rg -n "className:\s*['\"](bg-\|text-\|border-)" frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx` |
602
- | Every UI field exists in the schema | `comm -23 <(rg -oN "^\s*(\w+):\s*sh\." frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx \| sed -E 's/^\s*([^:]+):.*/\1/' \| sort -u) <(rg -oN "^\s*(\w+):\s*z\." shared-lib/src/modules/*/resources/<resource>/<resource>.schemas.ts \| sed -E 's/^\s*([^:]+):.*/\1/' \| sort -u)` |
603
- | No `isForeignKey` / `isDBIndexed` / `excludeFrom*` accidentally added here | `rg -n "isForeignKey\|isDBIndexed\|excludeFrom" frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx` |
611
+ | No Tailwind class smuggling | see the commands below the table |
612
+ | Every UI field exists in the schema | see the commands below the table |
613
+ | No `isForeignKey` / `isDBIndexed` / `excludeFrom*` accidentally added here | see the commands below the table |
614
+
615
+ ```bash
616
+ # No Tailwind class smuggling
617
+ rg -n "className:\s*['\"](bg-|text-|border-)" frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx
618
+
619
+ # Every UI field exists in the schema
620
+ comm -23 <(rg -oN "^\s*(\w+):\s*sh\." frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx | sed -E 's/^\s*([^:]+):.*/\1/' | sort -u) <(rg -oN "^\s*(\w+):\s*z\." shared-lib/src/modules/*/resources/<resource>/<resource>.schemas.ts | sed -E 's/^\s*([^:]+):.*/\1/' | sort -u)
621
+
622
+ # No `isForeignKey` / `isDBIndexed` / `excludeFrom*` accidentally added here
623
+ rg -n "isForeignKey|isDBIndexed|excludeFrom" frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx
624
+ ```
604
625
 
605
626
  Surface-decision invariants:
606
627
 
@@ -608,7 +629,12 @@ Surface-decision invariants:
608
629
  |---|---|
609
630
  | The file opens with a decision JSDoc (first line is `/**`) | `head -1 frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx` |
610
631
  | Named sections, to check each against the tests (list them; each needs a stated reason) | `rg -n "<Section[^>]*name=" frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx` |
611
- | No section named after a field type (should be empty) | `rg -n "<Section[^>]*name=\"(dates\|metadata\|details\|info\|other)\"" frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx` |
632
+ | No section named after a field type (should be empty) | see the commands below the table |
633
+
634
+ ```bash
635
+ # No section named after a field type (should be empty)
636
+ rg -n "<Section[^>]*name=\"(dates|metadata|details|info|other)\"" frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx
637
+ ```
612
638
 
613
639
  Related-resource placement invariants:
614
640
 
@@ -0,0 +1,157 @@
1
+ # Collection filter presets (one-click pills above a list)
2
+
3
+ The vocabulary a list's `collectionDisplayConfig.presetFilters` assigns: fixed values, numeric bounds, date windows
4
+ resolved against the viewer's clock, and values resolved from who is looking.
5
+
6
+ Read this when:
7
+
8
+ - a list needs "Overdue", "Due this week", "Created today", "Mine" or "Assigned to me" as one click;
9
+ - you are tempted to build a custom component or a custom filter for a narrowing like that: you do not need one;
10
+ - a preset's pill reads as permanently off (every key it assigns must be a filter field of the operation).
11
+
12
+ ## Import Origins
13
+
14
+ - `@wildo-ai/saas-frontend-lib`
15
+
16
+ ## Source Excerpts
17
+
18
+ ### Origin Package: `@wildo-ai/saas-frontend-lib`
19
+
20
+ ```typescript
21
+ */
22
+ /**
23
+ * A DATE WINDOW named relative to NOW, for a preset filter that must mean the same thing tomorrow.
24
+ *
25
+ * A preset is authored once and clicked forever, so "created today" cannot be an authored pair of
26
+ * instants — it has to be RESOLVED at the moment it is applied. The vocabulary is closed and small
27
+ * on purpose: each member is a window a person actually asks for, and each resolves to the
28
+ * `{ startDate, endDate }` pair the framework's date-range filter already carries end to end, so a
29
+ * preset needs no filter grammar of its own and no backend change.
30
+ *
31
+ * Resolution is in the VIEWER's timezone, which is the only one that makes "today" true for the
32
+ * person reading the screen. The backend compares instants, so the boundaries travel as absolute
33
+ * times and nothing downstream has to know a timezone was involved.
34
+ *
35
+ * Every window is whole local days and ends at the LAST instant of its last day, one millisecond before the next local
36
+ * midnight. The date-range filter's end bound is inclusive, and a date-only value (a due date picked in a calendar) is
37
+ * stored at the local midnight of the day it names, so ending at the next midnight would also match the day after.
38
+ */
39
+ export enum CollectionFilterPresetRelativeRange {
40
+ /** All of today, local: midnight this morning to the end of the day. */
41
+ TODAY = 'today',
42
+ /** All of yesterday, local. */
43
+ YESTERDAY = 'yesterday',
44
+ /** The last seven days INCLUDING today — the rolling week, not the last seven whole days. */
45
+ LAST_7_DAYS = 'last_7_days',
46
+ /** The last thirty days including today. */
47
+ LAST_30_DAYS = 'last_30_days',
48
+ /** The first of this calendar month through the end of today. */
49
+ THIS_MONTH = 'this_month',
50
+ /** The first of this calendar year through the end of today. */
51
+ THIS_YEAR = 'this_year',
52
+ /**
53
+ * Everything BEFORE today, local: what an "overdue" list shows on a due-date field. Ends at the last instant of
54
+ * yesterday, so a date-only value due TODAY is due, not overdue. A deadline with a time earlier today is in TODAY, not
55
+ * here: the window is whole days, like every other member, so the pill reads the same all day.
56
+ */
57
+ BEFORE_TODAY = 'before_today',
58
+ /** Today and the six days after it, local: "due this week" from today. */
59
+ NEXT_7_DAYS = 'next_7_days',
60
+ /** Today and the twenty-nine days after it, local. */
61
+ NEXT_30_DAYS = 'next_30_days',
62
+ }
63
+
64
+ /**
65
+ * A value a preset can only know once it is clicked, because it depends on WHO is looking. Resolved from the
66
+ * viewer's session at that moment, like a relative range is resolved from the clock, so "My jobs" means the person
67
+ * reading the list, whoever that is.
68
+ *
69
+ * A preset naming one is unavailable to a viewer the value cannot be resolved for (no signed-in user): the pill is
70
+ * disabled rather than applied without the field, which would show a different list under the same name.
71
+ */
72
+ export enum CollectionFilterPresetContextValue {
73
+ /** The signed-in user's id, for a reference field such as an assignee or owner. */
74
+ CURRENT_USER = 'current_user',
75
+ }
76
+
77
+ /**
78
+ * What a preset ASSIGNS to one filter field.
79
+ *
80
+ * Four kinds, split by WHEN the value is known:
81
+ *
82
+ * - a LITERAL (string, number, boolean) is fixed at authoring time and covers every enum value, id, number and flag,
83
+ * which is the whole of "filter to HIGH priority";
84
+ * - a RELATIVE RANGE (`{ relativeRange }`) is the temporal case, resolved when the pill is clicked, because an authored
85
+ * answer would be wrong by tomorrow;
86
+ * - a NUMERIC BOUND (`{ min?, max? }`) writes the same value the filter panel's own two number inputs do, and the
87
+ * backend applies it on every adapter. Both bounds are optional because "under 500" has no floor, and that is the
88
+ * commonest threshold anyone asks for;
89
+ * - a CONTEXT VALUE (`{ contextValue }`) is known only from who is looking, such as "assigned to me", and is resolved
90
+ * when the pill is clicked, so the same authored preset shows each viewer their own rows.
91
+ */
92
+ export const CollectionFilterPresetValueSchema = z.union([
93
+ z.string(),
94
+ z.number(),
95
+ z.boolean(),
96
+ z.object({ relativeRange: z.enum(CollectionFilterPresetRelativeRange) }),
97
+ z.object({ min: z.number().optional(), max: z.number().optional() }),
98
+ z.object({ contextValue: z.enum(CollectionFilterPresetContextValue) }),
99
+ ]);
100
+ export type CollectionFilterPresetValue = z.infer<typeof CollectionFilterPresetValueSchema>;
101
+
102
+ /**
103
+ * ONE named, one-click narrowing of a collection, rendered as a toggleable pill above the list.
104
+ *
105
+ * ## Why this is not `quickFilterField`
106
+ *
107
+ * They answer different questions and both are worth having. A quick-filter field promotes ONE enum
108
+ * and spends every one of its values on a TAB STRIP: the tabs are mutually exclusive and they read
109
+ * as "which slice of this collection am I looking at". A preset is ADDITIVE and crosses fields —
110
+ * "high priority", "created today", "unassigned" — and several can be on at once. Collapsing them
111
+ * would cost one of the two meanings.
112
+ *
113
+ * ## No state of its own
114
+ *
115
+ * A preset is a WRITE into the collection's existing filter values, and its ON/OFF is DERIVED by
116
+ * reading them back: it is active exactly when every key it assigns currently holds its value. So
117
+ * clearing a chip, editing the panel, or applying a second preset that touches the same field all
118
+ * update the pills for free, and there is no second copy of the filter state to keep in step.
119
+ */
120
+ export const CollectionFilterPresetSchema = z.object({
121
+ /**
122
+ * Stable identity — the i18n key segment and the pill's DOM hook. Author-owned and never shown:
123
+ * the words come from `resources.<type>.filterPresets.<ref>.label`.
124
+ */
125
+ ref: z.string().min(1),
126
+ /**
127
+ * The fields this preset assigns, and to what. Every key must be a filter field of the operation;
128
+ * a key that is not simply never matches, so the pill would read as permanently off.
129
+ */
130
+ filters: z.record(z.string(), CollectionFilterPresetValueSchema),
131
+ });
132
+ export type CollectionFilterPreset = z.infer<typeof CollectionFilterPresetSchema>;
133
+ ```
134
+
135
+ ## Worked example
136
+
137
+
138
+ ## Usage Example
139
+
140
+ ```tsx
141
+ presetFilters: [
142
+ { ref: 'urgent', filters: { priority: Todos_Priority.URGENT } },
143
+ { ref: 'overdue', filters: { dueDate: { relativeRange: CollectionFilterPresetRelativeRange.BEFORE_TODAY } } },
144
+ { ref: 'due-this-week', filters: { dueDate: { relativeRange: CollectionFilterPresetRelativeRange.NEXT_7_DAYS } } },
145
+ { ref: 'mine', filters: { assignedToUserId: { contextValue: CollectionFilterPresetContextValue.CURRENT_USER } } },
146
+ { ref: 'created-today', filters: { createdAt: { relativeRange: CollectionFilterPresetRelativeRange.TODAY } } },
147
+ { ref: 'touched-this-week', filters: { updatedAt: { relativeRange: CollectionFilterPresetRelativeRange.LAST_7_DAYS } } },
148
+ ],
149
+ ```
150
+
151
+ - A window on a date field needs that field in the operation's `filterFields` as `z.date()` (it becomes a date range).
152
+ - `BEFORE_TODAY` is "overdue": every earlier date, and a date-only value due today is not in it.
153
+ - `CURRENT_USER` resolves to the signed-in user's id when the pill is clicked; the pill is disabled for a viewer with no
154
+ user, never applied without the field.
155
+ - Presets combine with each other and with the status tabs. A preset assigning several fields is on only when all of
156
+ them hold its values.
157
+ - Each preset's label is `resources.<resourceType>.filterPresets.<ref>.label`, generated by the labels pipeline.