@wildo-ai/framework-knowledge 1.1.8 → 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.
- package/dist/claude-marketplace/.claude-plugin/marketplace.json +1 -1
- package/dist/claude-marketplace/plugins/wildo/.claude-plugin/plugin.json +1 -1
- package/dist/claude-marketplace/plugins/wildo/references/acceptance.md +11 -0
- package/dist/claude-marketplace/plugins/wildo/references/composites-and-the-loop.md +9 -2
- package/dist/claude-marketplace/plugins/wildo/references/creation-state.md +21 -0
- package/dist/claude-marketplace/plugins/wildo/references/derived-artifacts.md +121 -0
- package/dist/claude-marketplace/plugins/wildo/references/expert-personas-and-deliberations.md +26 -7
- package/dist/claude-marketplace/plugins/wildo/references/runs-judges-and-questions.md +31 -5
- package/dist/claude-marketplace/plugins/wildo/skills/accept/SKILL.md +4 -2
- package/dist/claude-marketplace/plugins/wildo/skills/answer/SKILL.md +29 -2
- package/dist/claude-marketplace/plugins/wildo/skills/build/SKILL.md +69 -24
- package/dist/claude-marketplace/plugins/wildo/skills/doctor/SKILL.md +10 -0
- package/dist/claude-marketplace/plugins/wildo/skills/run/SKILL.md +21 -5
- package/dist/claude-marketplace/plugins/wildo/skills/start/SKILL.md +31 -5
- package/dist/claude-marketplace/plugins/wildo/skills/status/SKILL.md +2 -0
- package/dist/claude-marketplace/plugins/wildo/skills/why/SKILL.md +20 -4
- package/dist/esm/framework-knowledge.definitions.d.ts +1 -1
- package/dist/esm/framework-knowledge.definitions.d.ts.map +1 -1
- package/dist/esm/framework-knowledge.definitions.js +95 -5
- package/dist/esm/framework-knowledge.definitions.js.map +1 -1
- package/dist/esm/framework-knowledge.loader.d.ts.map +1 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.d.ts +2 -2
- package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.js +2 -2
- package/dist/esm/playbooks/bottom_up.assemble-verify/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.build/playbook.definition.d.ts +11 -11
- package/dist/esm/playbooks/bottom_up.build/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.build/playbook.definition.js +29 -22
- package/dist/esm/playbooks/bottom_up.build/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts +41 -3
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js +175 -14
- package/dist/esm/playbooks/bottom_up.build-decompose/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts +1 -1
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js +3 -3
- package/dist/esm/playbooks/bottom_up.build-dispatch/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.d.ts +1 -1
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js +1 -1
- package/dist/esm/playbooks/bottom_up.build-scale/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.conception/playbook.definition.d.ts +8 -4
- package/dist/esm/playbooks/bottom_up.conception/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.conception/playbook.definition.js +13 -6
- package/dist/esm/playbooks/bottom_up.conception/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts +4 -2
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js +90 -13
- package/dist/esm/playbooks/bottom_up.domain-plan/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.experience-plan/playbook.definition.d.ts +4 -3
- package/dist/esm/playbooks/bottom_up.experience-plan/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.experience-plan/playbook.definition.js +4 -3
- package/dist/esm/playbooks/bottom_up.experience-plan/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts +8 -0
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js +12 -4
- package/dist/esm/playbooks/bottom_up.foundation/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts +12 -3
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js +8 -4
- package/dist/esm/playbooks/bottom_up.placement-plan/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/bottom_up.website-plan/playbook.definition.d.ts +4 -1
- package/dist/esm/playbooks/bottom_up.website-plan/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/bottom_up.website-plan/playbook.definition.js +2 -1
- package/dist/esm/playbooks/bottom_up.website-plan/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/cross_cutting.application-creation/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/cross_cutting.compliance/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/cross_cutting.feature-development/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/cross_cutting.refinement/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/refinement.compliance-document-candidate/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts +1 -1
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js +13 -1
- package/dist/esm/playbooks/refinement.document-facts/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/refinement.feature-contribution/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/refinement.governance-document-candidate/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts +25 -27
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js +91 -43
- package/dist/esm/playbooks/top_down.brand-identity/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.d.ts +41 -0
- package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.js +43 -0
- package/dist/esm/playbooks/top_down.brand-name-research/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.d.ts +200 -0
- package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.js +203 -0
- package/dist/esm/playbooks/top_down.brand-name-screening-produce/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.d.ts +81 -0
- package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.d.ts.map +1 -0
- package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.js +93 -0
- package/dist/esm/playbooks/top_down.brand-naming/playbook.definition.js.map +1 -0
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts +3 -1
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.js +27 -18
- package/dist/esm/playbooks/top_down.business-model/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.capability-map/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.d.ts +11 -1
- package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.js +11 -11
- package/dist/esm/playbooks/top_down.compliance-analysis/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.d.ts +2 -0
- package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.js +3 -1
- package/dist/esm/playbooks/top_down.compliance-conception/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-evidence-adequacy/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts +2 -0
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js +3 -1
- package/dist/esm/playbooks/top_down.compliance-posture/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.compliance-research/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.definition/playbook.definition.d.ts +5 -2
- package/dist/esm/playbooks/top_down.definition/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.definition/playbook.definition.js +16 -4
- package/dist/esm/playbooks/top_down.definition/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.expert-personas/playbook.definition.d.ts +27 -6
- package/dist/esm/playbooks/top_down.expert-personas/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.expert-personas/playbook.definition.js +32 -12
- package/dist/esm/playbooks/top_down.expert-personas/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.feature-drafts/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.market-analysis/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.market-evidence-adequacy/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.market-research/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts +2 -1
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js +13 -5
- package/dist/esm/playbooks/top_down.market-snapshot-produce/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts +7 -3
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js +71 -2
- package/dist/esm/playbooks/top_down.phase-gate/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts +2 -1
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js +23 -8
- package/dist/esm/playbooks/top_down.requirements-definition/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.risk-register/playbook.definition.d.ts +7 -1
- package/dist/esm/playbooks/top_down.risk-register/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.risk-register/playbook.definition.js +4 -2
- package/dist/esm/playbooks/top_down.risk-register/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts +9 -3
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js +3 -3
- package/dist/esm/playbooks/top_down.scope-roadmap/playbook.definition.js.map +1 -1
- package/dist/esm/playbooks/top_down.value-proposition/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts +35 -2
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.d.ts.map +1 -1
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js +41 -17
- package/dist/esm/playbooks/top_down.vision-elicitation/playbook.definition.js.map +1 -1
- package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/authority-basis.json +1 -1
- package/dist/knowledge/assurance-authority-bases/wildo-safe-baseline-v1/external-framework-mapping.json +1 -1
- package/dist/knowledge/manifest.json +8 -8
- package/dist/knowledge/playbooks/bottom_up.assemble-verify/method.md +22 -7
- package/dist/knowledge/playbooks/bottom_up.assemble-verify/playbook.json +3 -3
- package/dist/knowledge/playbooks/bottom_up.build/method.md +17 -15
- package/dist/knowledge/playbooks/bottom_up.build/playbook.json +4 -3
- package/dist/knowledge/playbooks/bottom_up.build-decompose/evaluation-protocol.json +1 -1
- package/dist/knowledge/playbooks/bottom_up.build-decompose/evaluation-treatment.json +1 -1
- package/dist/knowledge/playbooks/bottom_up.build-decompose/method.md +261 -34
- package/dist/knowledge/playbooks/bottom_up.build-decompose/playbook.json +42 -4
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/method.md +188 -59
- package/dist/knowledge/playbooks/bottom_up.build-dispatch/playbook.json +2 -2
- package/dist/knowledge/playbooks/bottom_up.build-scale/method.md +169 -276
- package/dist/knowledge/playbooks/bottom_up.build-scale/playbook.json +2 -2
- package/dist/knowledge/playbooks/bottom_up.capability-composition/method.md +8 -1
- package/dist/knowledge/playbooks/bottom_up.capability-composition/playbook.json +1 -1
- package/dist/knowledge/playbooks/bottom_up.conception/method.md +3 -2
- package/dist/knowledge/playbooks/bottom_up.conception/playbook.json +11 -3
- package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-protocol.json +1 -1
- package/dist/knowledge/playbooks/bottom_up.domain-plan/evaluation-treatment.json +1 -1
- package/dist/knowledge/playbooks/bottom_up.domain-plan/method.md +129 -17
- package/dist/knowledge/playbooks/bottom_up.domain-plan/playbook.json +7 -4
- package/dist/knowledge/playbooks/bottom_up.experience-plan/method.md +28 -6
- package/dist/knowledge/playbooks/bottom_up.experience-plan/playbook.json +5 -4
- package/dist/knowledge/playbooks/bottom_up.foundation/playbook.json +13 -5
- package/dist/knowledge/playbooks/bottom_up.placement-plan/method.md +50 -0
- package/dist/knowledge/playbooks/bottom_up.placement-plan/playbook.json +16 -4
- package/dist/knowledge/playbooks/bottom_up.website-plan/method.md +19 -0
- package/dist/knowledge/playbooks/bottom_up.website-plan/playbook.json +5 -2
- package/dist/knowledge/playbooks/refinement.compliance-document-candidate/method.md +7 -3
- package/dist/knowledge/playbooks/refinement.compliance-document-candidate/playbook.json +1 -1
- package/dist/knowledge/playbooks/refinement.document-facts/method.md +8 -0
- package/dist/knowledge/playbooks/refinement.document-facts/playbook.json +3 -2
- package/dist/knowledge/playbooks/refinement.feature-contribution/method.md +5 -2
- package/dist/knowledge/playbooks/refinement.feature-contribution/playbook.json +1 -1
- package/dist/knowledge/playbooks/top_down.brand-identity/evaluation-protocol.json +1 -1
- package/dist/knowledge/playbooks/top_down.brand-identity/evaluation-treatment.json +1 -1
- package/dist/knowledge/playbooks/top_down.brand-identity/method.md +75 -37
- package/dist/knowledge/playbooks/top_down.brand-identity/playbook.json +35 -38
- package/dist/knowledge/playbooks/top_down.brand-name-research/method.md +145 -0
- package/dist/knowledge/playbooks/top_down.brand-name-research/playbook.json +57 -0
- package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/evaluation-protocol.json +1 -0
- package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/evaluation-treatment.json +1 -0
- package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/method.md +99 -0
- package/dist/knowledge/playbooks/top_down.brand-name-screening-produce/playbook.json +65 -0
- package/dist/knowledge/playbooks/top_down.brand-naming/method.md +56 -0
- package/dist/knowledge/playbooks/top_down.brand-naming/playbook.json +76 -0
- package/dist/knowledge/playbooks/top_down.business-model/evaluation-protocol.json +1 -1
- package/dist/knowledge/playbooks/top_down.business-model/evaluation-treatment.json +1 -1
- package/dist/knowledge/playbooks/top_down.business-model/method.md +60 -6
- package/dist/knowledge/playbooks/top_down.business-model/playbook.json +15 -10
- package/dist/knowledge/playbooks/top_down.capability-map/method.md +10 -9
- package/dist/knowledge/playbooks/top_down.capability-map/playbook.json +1 -1
- package/dist/knowledge/playbooks/top_down.compliance-analysis/playbook.json +30 -10
- package/dist/knowledge/playbooks/top_down.compliance-conception/playbook.json +3 -1
- package/dist/knowledge/playbooks/top_down.compliance-posture/playbook.json +4 -1
- package/dist/knowledge/playbooks/top_down.definition/method.md +8 -3
- package/dist/knowledge/playbooks/top_down.definition/playbook.json +6 -4
- package/dist/knowledge/playbooks/top_down.expert-personas/playbook.json +16 -2
- package/dist/knowledge/playbooks/top_down.feature-drafts/method.md +5 -2
- package/dist/knowledge/playbooks/top_down.feature-drafts/playbook.json +1 -1
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-protocol.json +1 -1
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/evaluation-treatment.json +1 -1
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/method.md +26 -0
- package/dist/knowledge/playbooks/top_down.market-snapshot-produce/playbook.json +4 -2
- package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-protocol.json +1 -1
- package/dist/knowledge/playbooks/top_down.phase-gate/evaluation-treatment.json +1 -1
- package/dist/knowledge/playbooks/top_down.phase-gate/playbook.json +11 -1
- package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-protocol.json +1 -1
- package/dist/knowledge/playbooks/top_down.requirements-definition/evaluation-treatment.json +1 -1
- package/dist/knowledge/playbooks/top_down.requirements-definition/method.md +84 -9
- package/dist/knowledge/playbooks/top_down.requirements-definition/playbook.json +6 -3
- package/dist/knowledge/playbooks/top_down.risk-register/method.md +21 -0
- package/dist/knowledge/playbooks/top_down.risk-register/playbook.json +8 -2
- package/dist/knowledge/playbooks/top_down.scope-roadmap/playbook.json +4 -2
- package/dist/knowledge/playbooks/top_down.vision-elicitation/method.md +29 -0
- package/dist/knowledge/playbooks/top_down.vision-elicitation/playbook.json +58 -17
- package/dist/knowledge/references/brand.name-choice.config.md +144 -0
- package/dist/knowledge/references/brand.name-screening.config.md +308 -0
- package/dist/knowledge/references/build-plan.task-graph.config.md +119 -11
- package/dist/knowledge/references/business-model.pricing-plan.config.md +16 -0
- package/dist/knowledge/references/business-model.snapshot.config.md +64 -0
- package/dist/knowledge/references/business-model.snapshot.validation.md +68 -4
- package/dist/knowledge/references/capability-composition.config.md +67 -4
- package/dist/knowledge/references/companion.market.prompt-renderer.md +11 -6
- package/dist/knowledge/references/example.authorization.application-roles.office-and-field.md +44 -0
- package/dist/knowledge/references/example.backend.custom-operation.audit-event.md +81 -0
- package/dist/knowledge/references/example.backend.custom-operation.child-line-total.md +258 -0
- package/dist/knowledge/references/example.backend.custom-operation.computed-total.md +153 -0
- package/dist/knowledge/references/example.backend.custom-operation.create-related-resource.md +107 -0
- package/dist/knowledge/references/example.data-seeding.minimal.md +39 -10
- package/dist/knowledge/references/example.data-seeding.row-reference.md +80 -0
- package/dist/knowledge/references/example.email.template.minimal.md +1 -1
- package/dist/knowledge/references/example.resource.config-wiring.retention-policy-operations.md +74 -0
- package/dist/knowledge/references/example.resource.personal-data.free-text-field.md +19 -0
- package/dist/knowledge/references/example.resource.personal-data.person-without-account.md +27 -0
- package/dist/knowledge/references/example.resource.status-lifecycle.quote.md +152 -0
- package/dist/knowledge/references/example.resource.ui-behavior.filter-presets.md +15 -0
- package/dist/knowledge/references/example.resource.ui-behavior.operation-icon.md +8 -0
- package/dist/knowledge/references/example.views.app-level.home-definition.md +13 -0
- package/dist/knowledge/references/example.views.chart-definition.shared.md +83 -0
- package/dist/knowledge/references/experience-plan.config.md +60 -7
- package/dist/knowledge/references/market.context-block.builder.md +1 -1
- package/dist/knowledge/references/market.snapshot.validation.md +1 -1
- package/dist/knowledge/references/placement-plan.config.md +43 -0
- package/dist/knowledge/references/requirements.functional-requirement.config.md +8 -2
- package/dist/knowledge/references/requirements.non-functional-requirement.config.md +2 -0
- package/dist/knowledge/references/requirements.references.conventions.md +1 -1
- package/dist/knowledge/references/requirements.snapshot.config.md +57 -1
- package/dist/knowledge/references/requirements.snapshot.validation.md +35 -1
- package/dist/knowledge/references/saas.backend.audit-logs.log-event.md +63 -0
- package/dist/knowledge/references/saas.backend.document-sequence.issue-in-operation.md +60 -0
- package/dist/knowledge/references/saas.backend.document-sequence.raise-floor.md +156 -0
- package/dist/knowledge/references/saas.backend.email.send.md +77 -0
- package/dist/knowledge/references/saas.backend.notifications.operation-email-template-ref.md +60 -0
- package/dist/knowledge/references/saas.data-seeding.bootstrap-wiring.md +7 -1
- package/dist/knowledge/references/saas.data-seeding.computed-entry.md +43 -0
- package/dist/knowledge/references/saas.data-seeding.definition-input.md +14 -2
- package/dist/knowledge/references/saas.data-seeding.row-reference.md +93 -0
- package/dist/knowledge/references/saas.frontend.collection-filter-presets.md +124 -0
- package/dist/knowledge/references/saas.frontend.launcher.item-refs.md +316 -0
- package/dist/knowledge/references/saas.frontend.launcher.merge-rules.md +106 -0
- package/dist/knowledge/references/saas.frontend.launcher.runtime-availability.md +60 -0
- package/dist/knowledge/references/saas.frontend.resource-label-params.md +52 -0
- package/dist/knowledge/references/saas.frontend.resource-operation-frontend-config.md +47 -18
- package/dist/knowledge/references/saas.frontend.resource-ui-behavior-config.md +4 -1
- package/dist/knowledge/references/saas.frontend.settings-hub.engine-destination-roles.md +25 -0
- package/dist/knowledge/references/saas.frontend.settings-hub.placement.md +2 -2
- package/dist/knowledge/references/saas.models.audit.trail-config.md +45 -0
- package/dist/knowledge/references/saas.models.notifications.user-notification-definition.md +5 -3
- package/dist/knowledge/references/saas.models.queue.scheduled-recovery.md +81 -2
- package/dist/knowledge/references/saas.models.resource-config.builder-parameters.md +26 -0
- package/dist/knowledge/references/saas.models.roles.definition.md +61 -0
- package/dist/knowledge/references/saas.models.roles.organization-defaults.md +97 -0
- package/dist/knowledge/references/saas.public-runtime.contract.md +26 -0
- package/dist/knowledge/references/saas.specifications.companion-exports.contract.md +10 -0
- package/dist/knowledge/references/saas.website.astro.bridge.md +10 -0
- package/dist/knowledge/references/saas.website.astro.label-loader.md +12 -0
- package/dist/knowledge/references/saas.website.astro.llms-txt-server.md +14 -1
- package/dist/knowledge/references/saas.website.astro.site-context.md +13 -0
- package/dist/knowledge/references/saas.website.blog.bridge.md +4 -0
- package/dist/knowledge/references/saas.website.config.site-context-loader.md +3 -0
- package/dist/knowledge/references/saas.website.factories.define-section.md +4 -0
- package/dist/knowledge/references/saas.website.legal.public-document-links.md +76 -0
- package/dist/knowledge/references/saas.website.page-manifest.schema.md +12 -3
- package/dist/knowledge/references/saas.website.page-sections.component.md +72 -0
- package/dist/knowledge/references/saas.website.root-config.seo.md +2 -1
- package/dist/knowledge/references/saas.website.runtime.context.md +7 -0
- package/dist/knowledge/references/saas.website.sections.definition-schema.md +11 -0
- package/dist/knowledge/references/saas.website.seo.llms-txt-config.md +2 -0
- package/dist/knowledge/references/website-plan.config.md +26 -0
- package/dist/knowledge/references/zod.decorators.chainable-runtime.md +13 -0
- package/dist/knowledge/references/zod.decorators.decorator-vocabulary.md +7 -0
- package/dist/knowledge/references/zod.decorators.document-sequence.md +65 -0
- package/dist/knowledge/references/zod.decorators.schema-metadata.md +1 -0
- package/dist/knowledge/references/zod.decorators.shared-structural-methods.md +21 -0
- package/dist/knowledge/references/zod.factories.bigdecimal.md +1 -0
- package/dist/knowledge/references/zod.factories.code.md +1 -0
- package/dist/knowledge/references/zod.factories.duration.md +1 -0
- package/dist/knowledge/references/zod.factories.money.md +1 -0
- package/dist/knowledge/registries/assurance-authority-bases.json +1 -1
- package/dist/knowledge/registries/framework-topics.json +374 -1
- package/dist/knowledge/registries/playbooks.json +76 -28
- package/dist/knowledge/registries/source-tags.json +1513 -898
- package/dist/knowledge/rules/live-context-door.md +5 -2
- package/dist/knowledge/skills/INDEX.md +5 -2
- package/dist/knowledge/skills/application-consumer-documentation-authoring/SKILL.md +16 -3
- package/dist/knowledge/skills/application-database-migrations/SKILL.md +14 -3
- package/dist/knowledge/skills/application-roles-authoring/SKILL.md +158 -0
- package/dist/knowledge/skills/application-roles-authoring/references/framework-application-roles-api.md +169 -0
- package/dist/knowledge/skills/application-roles-authoring/references/office-and-field-worked-example.md +63 -0
- package/dist/knowledge/skills/authorization-unit-narrowing/SKILL.md +6 -1
- package/dist/knowledge/skills/backend-custom-operation/SKILL.md +256 -9
- package/dist/knowledge/skills/backend-custom-operation/references/after-the-operation.md +42 -0
- package/dist/knowledge/skills/backend-custom-operation/references/framework-audit-log-event-api.md +220 -0
- package/dist/knowledge/skills/brand-logo-authoring/SKILL.md +5 -0
- package/dist/knowledge/skills/brand-name-screening/SKILL.md +178 -0
- package/dist/knowledge/skills/brand-name-screening/references/framework-brand-name-screening-api.md +466 -0
- package/dist/knowledge/skills/brand-name-screening/references/screening-procedure.md +87 -0
- package/dist/knowledge/skills/compliance-document-authoring/references/document-composition-privacy-notice.md +7 -3
- package/dist/knowledge/skills/config-app-shell/SKILL.md +58 -5
- package/dist/knowledge/skills/config-app-shell/references/framework-launcher-items-api.md +461 -0
- package/dist/knowledge/skills/config-app-shell/references/framework-launcher-visibility-api.md +80 -0
- package/dist/knowledge/skills/config-design-system/SKILL.md +28 -6
- package/dist/knowledge/skills/config-navigation/SKILL.md +14 -3
- package/dist/knowledge/skills/config-saas/SKILL.md +56 -15
- package/dist/knowledge/skills/config-saas/references/compliance-declarations.md +65 -2
- package/dist/knowledge/skills/config-saas/references/framework-audit-trail-config-api.md +62 -2
- package/dist/knowledge/skills/config-saas/references/framework-background-work-api.md +81 -2
- package/dist/knowledge/skills/config-saas-backend/SKILL.md +6 -1
- package/dist/knowledge/skills/configure-billing/SKILL.md +18 -4
- package/dist/knowledge/skills/email-add-template/SKILL.md +28 -6
- package/dist/knowledge/skills/email-add-template/references/email-artifact-paths.md +1 -1
- package/dist/knowledge/skills/email-add-template/references/framework-email-send-api.md +128 -0
- package/dist/knowledge/skills/email-add-template/references/framework-operation-email-template-ref-api.md +99 -0
- package/dist/knowledge/skills/engine-component-registration/SKILL.md +6 -1
- package/dist/knowledge/skills/engine-product-definitions/SKILL.md +21 -8
- package/dist/knowledge/skills/flows-actors-chat-assistant/SKILL.md +10 -2
- package/dist/knowledge/skills/flows-actors-llm-agent-invocation/SKILL.md +18 -4
- package/dist/knowledge/skills/frontend-component-catalog/SKILL.md +11 -3
- package/dist/knowledge/skills/frontend-component-catalog/references/framework-component-catalog.md +2 -1
- package/dist/knowledge/skills/frontend-component-catalog/references/framework-component-usage.md +8 -0
- package/dist/knowledge/skills/i18n-rerun-pipeline/SKILL.md +19 -5
- package/dist/knowledge/skills/i18n-translation-rerun/SKILL.md +10 -2
- package/dist/knowledge/skills/inbound-channels/SKILL.md +2 -2
- package/dist/knowledge/skills/infra-environment-config/SKILL.md +6 -1
- package/dist/knowledge/skills/local-environment-bootstrap/SKILL.md +17 -2
- package/dist/knowledge/skills/local-environment-bootstrap/references/derived-artifact-currency.md +122 -0
- package/dist/knowledge/skills/local-environment-bootstrap/references/framework-upgrade-and-dependency-alignment.md +11 -0
- package/dist/knowledge/skills/local-environment-bootstrap/references/wildo-cli-bootstrap-commands.md +9 -2
- package/dist/knowledge/skills/market-add-feature-benefit/SKILL.md +10 -2
- package/dist/knowledge/skills/market-alternatives/SKILL.md +10 -2
- package/dist/knowledge/skills/market-authoring-overview/SKILL.md +10 -2
- package/dist/knowledge/skills/market-category/SKILL.md +21 -7
- package/dist/knowledge/skills/market-channels/SKILL.md +6 -1
- package/dist/knowledge/skills/market-companion-prompt-enrichment/SKILL.md +22 -4
- package/dist/knowledge/skills/market-companion-prompt-enrichment/references/framework-companion-behavior-api.md +12 -2
- package/dist/knowledge/skills/market-generation-cli/SKILL.md +21 -11
- package/dist/knowledge/skills/market-generation-cli/references/framework-market-generation-cli.md +11 -6
- package/dist/knowledge/skills/market-icp/SKILL.md +10 -2
- package/dist/knowledge/skills/market-jobs-pains-gains/SKILL.md +6 -1
- package/dist/knowledge/skills/market-message-templates-authoring/SKILL.md +6 -1
- package/dist/knowledge/skills/market-message-templates-authoring/references/framework-message-template-api.md +1 -1
- package/dist/knowledge/skills/market-persona/SKILL.md +14 -3
- package/dist/knowledge/skills/market-positioning-authoring/SKILL.md +6 -1
- package/dist/knowledge/skills/market-proof-and-objection/SKILL.md +10 -2
- package/dist/knowledge/skills/market-scoring-interpretation/SKILL.md +6 -1
- package/dist/knowledge/skills/market-snapshot-validation/SKILL.md +15 -4
- package/dist/knowledge/skills/market-snapshot-validation/references/framework-snapshot-validation-api.md +1 -1
- package/dist/knowledge/skills/market-tone-of-voice/SKILL.md +6 -1
- package/dist/knowledge/skills/model-cost-attribution/references/framework-work-unit-api.md +26 -0
- package/dist/knowledge/skills/module-companion-exports/SKILL.md +7 -1
- package/dist/knowledge/skills/module-companion-exports/references/companion-exports-by-package.md +10 -0
- package/dist/knowledge/skills/module-relationships/SKILL.md +37 -8
- package/dist/knowledge/skills/pdf-template-authoring/SKILL.md +4 -2
- package/dist/knowledge/skills/provider-address-lookup/SKILL.md +14 -3
- package/dist/knowledge/skills/provider-frontend-file-picker/SKILL.md +6 -1
- package/dist/knowledge/skills/provider-operation-calls/SKILL.md +14 -3
- package/dist/knowledge/skills/rate-limit-authoring/SKILL.md +10 -2
- package/dist/knowledge/skills/resource-add-field/SKILL.md +10 -2
- package/dist/knowledge/skills/resource-add-field/references/framework-field-cross-layer-api.md +46 -17
- package/dist/knowledge/skills/resource-add-resource/SKILL.md +14 -2
- package/dist/knowledge/skills/resource-add-resource/references/framework-new-resource-core-config-api.md +26 -0
- package/dist/knowledge/skills/resource-config-wiring/SKILL.md +29 -3
- package/dist/knowledge/skills/resource-config-wiring/references/framework-collection-operation-declarations.md +19 -4
- package/dist/knowledge/skills/resource-config-wiring/references/framework-operation-audit-api.md +5 -2
- package/dist/knowledge/skills/resource-config-wiring/references/framework-personal-data-declaration-api.md +103 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-retention-policy-operations.md +135 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-saas-models-resource-config-api.md +26 -0
- package/dist/knowledge/skills/resource-config-wiring/references/framework-user-notifications-api.md +26 -7
- package/dist/knowledge/skills/resource-custom-view/SKILL.md +10 -2
- package/dist/knowledge/skills/resource-custom-view/references/custom-view-contracts.md +46 -17
- package/dist/knowledge/skills/resource-external-data/references/erasure-suppression.md +2 -2
- package/dist/knowledge/skills/resource-retention-binding/SKILL.md +5 -1
- package/dist/knowledge/skills/resource-schema-authoring/SKILL.md +15 -1
- package/dist/knowledge/skills/resource-schema-authoring/references/computed-totals.md +569 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/document-numbers.md +358 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-decorator-vocabulary-api.md +8 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-shared-decorator-methods-api.md +21 -0
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-special-factories-api.md +7 -2
- package/dist/knowledge/skills/resource-schema-authoring/references/framework-zod-lifecycle-and-chainable-api.md +13 -0
- package/dist/knowledge/skills/resource-status-lifecycle/SKILL.md +153 -0
- package/dist/knowledge/skills/resource-status-lifecycle/references/commercial-documents.md +46 -0
- package/dist/knowledge/skills/resource-status-lifecycle/references/quote-lifecycle-worked-example.md +198 -0
- package/dist/knowledge/skills/resource-ui-behavior/SKILL.md +30 -4
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-collection-filter-presets-api.md +157 -0
- package/dist/knowledge/skills/resource-ui-behavior/references/framework-frontend-resource-ui-contracts-api.md +101 -19
- package/dist/knowledge/skills/seeding-authoring/SKILL.md +202 -39
- package/dist/knowledge/skills/seeding-authoring/references/cross-seed-row-references.md +67 -0
- package/dist/knowledge/skills/seeding-authoring/references/framework-data-seeding-api.md +154 -4
- package/dist/knowledge/skills/seeding-authoring/references/seed-row-overlay.md +22 -0
- package/dist/knowledge/skills/seeding-operations/references/framework-data-seeding-operations-api.md +7 -1
- package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-destinations-catalog.md +43 -0
- package/dist/knowledge/skills/settings-placement-authoring/references/framework-settings-placement-api.md +2 -2
- package/dist/knowledge/skills/spec-companion-exports/SKILL.md +6 -1
- package/dist/knowledge/skills/spec-companion-exports/references/framework-companion-exports-contract-api.md +10 -0
- package/dist/knowledge/skills/spec-component-update/SKILL.md +10 -2
- package/dist/knowledge/skills/spec-composite-view-update/SKILL.md +2 -2
- package/dist/knowledge/skills/spec-family-update/SKILL.md +71 -66
- package/dist/knowledge/skills/spec-family-update/references/family-spec-routing.md +1 -1
- package/dist/knowledge/skills/spec-resource-update/SKILL.md +30 -10
- package/dist/knowledge/skills/spec-resource-update/references/resource-spec-field-routing.md +28 -0
- package/dist/knowledge/skills/spec-update-after-change/SKILL.md +22 -5
- package/dist/knowledge/skills/views-add-composite-view/SKILL.md +6 -1
- package/dist/knowledge/skills/views-add-custom-view/SKILL.md +10 -2
- package/dist/knowledge/skills/views-app-level/SKILL.md +13 -3
- package/dist/knowledge/skills/views-app-level/references/application-home.md +56 -0
- package/dist/knowledge/skills/views-chart-authoring/SKILL.md +221 -37
- package/dist/knowledge/skills/views-composite-authoring/SKILL.md +22 -5
- package/dist/knowledge/skills/views-execution-authoring/SKILL.md +1 -1
- package/dist/knowledge/skills/website-anonymous-session/SKILL.md +32 -2
- package/dist/knowledge/skills/website-blog-authoring/SKILL.md +16 -3
- package/dist/knowledge/skills/website-blog-authoring/references/blog-adapter-api.md +4 -0
- package/dist/knowledge/skills/website-bundle-discipline/SKILL.md +7 -1
- package/dist/knowledge/skills/website-consent-gate-overrides/SKILL.md +13 -1
- package/dist/knowledge/skills/website-factory-advanced/SKILL.md +14 -2
- package/dist/knowledge/skills/website-inbound-contact-forms/SKILL.md +13 -1
- package/dist/knowledge/skills/website-layout-overrides/SKILL.md +6 -1
- package/dist/knowledge/skills/website-marketing-metadata-extension/SKILL.md +19 -1
- package/dist/knowledge/skills/website-navigation-authoring/SKILL.md +55 -18
- package/dist/knowledge/skills/website-navigation-authoring/references/framework-public-document-links-api.md +98 -0
- package/dist/knowledge/skills/website-navigation-authoring/references/worked-examples-header-footer.md +8 -11
- package/dist/knowledge/skills/website-page-authoring/SKILL.md +100 -8
- package/dist/knowledge/skills/website-page-authoring/references/framework-site-context-loader-api.md +3 -0
- package/dist/knowledge/skills/website-primitive-overrides/SKILL.md +6 -1
- package/dist/knowledge/skills/website-section-contact/SKILL.md +15 -0
- package/dist/knowledge/skills/website-section-contact/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-cta/SKILL.md +15 -0
- package/dist/knowledge/skills/website-section-cta/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-faq/SKILL.md +21 -1
- package/dist/knowledge/skills/website-section-faq/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-feature-benefit-summary/SKILL.md +21 -1
- package/dist/knowledge/skills/website-section-feature-benefit-summary/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-feature-detail/SKILL.md +25 -2
- package/dist/knowledge/skills/website-section-feature-detail/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-footer-cta/SKILL.md +15 -0
- package/dist/knowledge/skills/website-section-footer-cta/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-hero/SKILL.md +33 -10
- package/dist/knowledge/skills/website-section-hero/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-pricing/SKILL.md +21 -1
- package/dist/knowledge/skills/website-section-pricing/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-section-social-proof/SKILL.md +27 -2
- package/dist/knowledge/skills/website-section-social-proof/references/define-website-section-api.md +15 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/SKILL.md +16 -4
- package/dist/knowledge/skills/website-seo-aeo-geo/references/aeo-api.md +11 -0
- package/dist/knowledge/skills/website-seo-aeo-geo/references/geo-api.md +16 -1
- package/dist/knowledge/skills/website-seo-aeo-geo/references/seo-api.md +2 -1
- package/dist/knowledge/topic-index.json +1590 -292
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
|
@@ -188,7 +188,7 @@ module barrel (`index.ts`) if siblings re-export theirs.
|
|
|
188
188
|
|
|
189
189
|
## Verification
|
|
190
190
|
|
|
191
|
-
- [ ] **The personal-data question is ANSWERED** — a `retentionPolicy` (`RETAIN_ONLY` says, checkably, that it holds
|
|
191
|
+
- [ ] **The personal-data question is ANSWERED** — a `retentionPolicy` TOGETHER WITH its `dataSubjectPolicy` (the factory refuses either one alone; `RETAIN_ONLY` + `NO_PRINCIPAL` says, checkably, that it holds no personal data of its own), a `systemAccessPolicy.exportSubject`, or `.dataCategories()` on the fields that hold it. The decision table in `resource-config-wiring`'s `references/framework-personal-data-declaration-api.md` routes the four cases. This is the cheapest moment; later means editing a shipped schema, and until it is answered the application's privacy notice can say nothing about this resource.
|
|
192
192
|
- [ ] New value added to the module's `<Module>_ResourceType` enum
|
|
193
193
|
- [ ] A user-facing resource's `ui-behavior` declares `views: [...]` (ADDRESSABLE per operation with a page) and `getFrontendResourceLabel` — without them it has no page and no Create button
|
|
194
194
|
- [ ] `<resource>.schemas.ts` exists and calls `initZodDecorators(z)` before schema definitions
|
|
@@ -211,7 +211,19 @@ Run from the app root and substitute `<resource>` (folder name) and
|
|
|
211
211
|
| The new schema file initializes Zod decorators | `rg -n "initZodDecorators" shared-lib/src/modules/*/resources/<resource>/<resource>.schemas.ts` |
|
|
212
212
|
| The new factory is exported from the resource's own config file | `rg -n "<resource>_ResourceConfiguration_InitializationFactory" shared-lib/src/modules/*/resources/<resource>/<resource>.resources-config.ts` |
|
|
213
213
|
| **The module factory map includes the new resource** (this MUST return 1 match) | `rg -n "<RESOURCE>\\]:\\s*<resource>_ResourceConfiguration" shared-lib/src/modules/*/resources/*.resource-configs.ts` |
|
|
214
|
-
| Every FK on the new schema has a relationship declaration
|
|
214
|
+
| Every FK on the new schema has a relationship declaration (must print nothing) | see the commands below the table |
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
# Every FK on the new schema has a relationship declaration — prints each `.isForeignKey()` field no relationship names
|
|
218
|
+
rg -oNP '^\s*\K\w+(?=\s*:.*\.isForeignKey\(\))' shared-lib/src/modules/*/resources/<resource>/<resource>.schemas.ts | sort -u | while read -r f; do
|
|
219
|
+
rg -q "foreignKeyField:\s*.$f." shared-lib/src/modules/*/resources/*.relationships.ts || echo "no relationship names: $f"
|
|
220
|
+
done
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
The frontend enforces the same rule: in development its resource registry refuses to start
|
|
224
|
+
(`frontend_fk_resolution_failed`, naming the field) when an `.isForeignKey()` field resolves to no resource. One gap
|
|
225
|
+
in both: a field named after a resource's own identifier (`organizationId`, `userId`) resolves by NAME even with no
|
|
226
|
+
relationship edge, so declare `foreignKeyField` on every relationship, which also makes the check above exact.
|
|
215
227
|
|
|
216
228
|
The fourth grep is the most important invariant: a missing entry in the
|
|
217
229
|
factory map is the most common silent scaffold failure.
|
|
@@ -693,6 +693,32 @@ export type ResourceConfiguration_BuilderParameters<
|
|
|
693
693
|
* Declaring this also REQUIRES {@link dataSubjectPolicy}: a retention-governed resource is exactly
|
|
694
694
|
* one that can be handed to `eraseSubjectAsSystem` as a subject, so it must say whether its rows are
|
|
695
695
|
* a person — and if so, whose session an erasure ends.
|
|
696
|
+
*
|
|
697
|
+
* And it REQUIRES three operations, for every `mode` including `RETAIN_ONLY`: `READ`, `LIST` and
|
|
698
|
+
* `UPDATE_MANY`, in `coreOperations` (and so in its core-operation type parameter), each with an
|
|
699
|
+
* `API_CALL` or `INTERNAL_CALL` DEFAULT variant. `UPDATE_MANY` is normally `INTERNAL_CALL`: route-less
|
|
700
|
+
* and still service-resolvable; `REPOSITORY_ONLY` is route-less too but resolves through a different
|
|
701
|
+
* transport, so the factory refuses it when the backend starts (`… to be SERVICE-RESOLVABLE`). Retaining a row still writes to it (the
|
|
702
|
+
* erasure marks `retentionStatus` in place through `updateManyAsSystem`). Do not author
|
|
703
|
+
* `systemAccessPolicy.updateMany` or `seeRetained` as `FORBIDDEN`; both are derived to `ALLOWED`.
|
|
704
|
+
*
|
|
705
|
+
* Checked twice. At COMPILE time the factory refuses a `retentionPolicy` whose core-operation TYPE lacks READ, LIST
|
|
706
|
+
* or UPDATE_MANY (`RetentionPolicyRequiresReadListAndUpdateManyInCoreOperations` in the error). When the BACKEND
|
|
707
|
+
* STARTS it checks what a type cannot see: the `coreOperations` array itself, and that each operation has a
|
|
708
|
+
* service-resolvable default variant. `wildo config check-resources` asks the start-time half without starting it.
|
|
709
|
+
*
|
|
710
|
+
* @example
|
|
711
|
+
* ```ts
|
|
712
|
+
* retentionPolicy: { mode: ErasureRetentionMode.RETAIN_ONLY },
|
|
713
|
+
* dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },
|
|
714
|
+
* coreOperations: [CoreResourceOperation.READ, CoreResourceOperation.LIST, CoreResourceOperation.UPDATE_MANY],
|
|
715
|
+
* operationsConfiguration: {
|
|
716
|
+
* // …READ / LIST as API_CALL defaults…
|
|
717
|
+
* [CoreResourceOperation.UPDATE_MANY]: {
|
|
718
|
+
* variants: [{ variantType: ResourceOperationVariantType.INTERNAL_CALL, isDefault: true, roles: [], riskLevel: ResourceOperationRiskLevel.CRITICAL }],
|
|
719
|
+
* },
|
|
720
|
+
* },
|
|
721
|
+
* ```
|
|
696
722
|
*/
|
|
697
723
|
retentionPolicy?: ResourceRetentionPolicy,
|
|
698
724
|
|
|
@@ -298,6 +298,20 @@ fields (derived from the schema, never caller-supplied). Distinct from `isSystem
|
|
|
298
298
|
("infrastructure" ≠ "ACL-bypassable"). See
|
|
299
299
|
`references/framework-system-access-reads-api.md`.
|
|
300
300
|
|
|
301
|
+
## A `retentionPolicy` resource owes READ, LIST and UPDATE_MANY
|
|
302
|
+
|
|
303
|
+
Any `retentionPolicy` — `RETAIN_ONLY` included — requires `READ`, `LIST` and `UPDATE_MANY` in the
|
|
304
|
+
core-operation type AND in `coreOperations`, each with an `API_CALL` or `INTERNAL_CALL` default
|
|
305
|
+
variant (`UPDATE_MANY` as `INTERNAL_CALL`, never `REPOSITORY_ONLY`). The erasure writes the row in
|
|
306
|
+
place through `updateManyAsSystem` even when it scrubs nothing. `systemAccessPolicy.updateMany` and
|
|
307
|
+
`seeRetained` are derived for you; never author them `FORBIDDEN`. A typecheck catches a missing
|
|
308
|
+
operation in the core-operation TYPE (the error names
|
|
309
|
+
`RetentionPolicyRequiresReadListAndUpdateManyInCoreOperations`); the `coreOperations` array and the
|
|
310
|
+
variant types are checked only when the backend STARTS. Ask that half before the backend does with
|
|
311
|
+
`wildo config check-resources`, which builds every resource configuration and the registry offline
|
|
312
|
+
(the build lane runs it as `check:resources-registry-init`). See
|
|
313
|
+
`references/framework-retention-policy-operations.md` for the rule and a worked example.
|
|
314
|
+
|
|
301
315
|
## References
|
|
302
316
|
|
|
303
317
|
- `references/config-change-routing.md` — review table for which sub-areas a change touches
|
|
@@ -314,11 +328,13 @@ fields (derived from the schema, never caller-supplied). Distinct from `isSystem
|
|
|
314
328
|
- `references/framework-collection-operation-declarations.md` — what a LIST/SEARCH variant declares (`filterFields`, `sortFields`, `isSearchable`, `maxPaginatedResultPerPageLimit`, `collectionExport`) and what each ABSENCE means — including why omitting `sortFields` is not "no sorting"
|
|
315
329
|
- `references/framework-operation-step-up-api.md` — source-backed `requiresStepUpAuthentication`: gating an irreversible operation behind a fresh proof of identity, why it is per-variant, and the read-shaped operations where it silently enforces nothing
|
|
316
330
|
- `references/framework-operation-idempotency-key-api.md` — source-backed `idempotencyKey`: making a provider-backed mutation safe to retry, `ACCEPTED` vs `REQUIRED`, and the half of the contract (remember, replay, refuse reuse) your implementation still owns
|
|
331
|
+
- `references/framework-retention-policy-operations.md` — **read before adding any `retentionPolicy`**: the three operations it requires, their variant types, and a worked `RETAIN_ONLY` example
|
|
317
332
|
- `references/framework-personal-data-declaration-api.md` — **read once per resource**: does it hold data about a person, and the four ways to answer (including the checked way to say "no")
|
|
318
333
|
|
|
319
334
|
## Verification
|
|
320
335
|
|
|
321
|
-
- [ ] The resource has ANSWERED the personal-data question — a `retentionPolicy` (`RETAIN_ONLY` is the checked way to say it holds
|
|
336
|
+
- [ ] The resource has ANSWERED the personal-data question — a `retentionPolicy` TOGETHER WITH its `dataSubjectPolicy` (the factory refuses either one alone; `RETAIN_ONLY` + `NO_PRINCIPAL` is the checked way to say it holds no personal data of its own), a `systemAccessPolicy.exportSubject`, or a `.dataCategories()` declaration on the fields that hold it. Start from the decision table in `references/framework-personal-data-declaration-api.md`. Startup warns by name for every application resource that has said nothing.
|
|
337
|
+
- [ ] A resource with a `retentionPolicy` declares `READ`, `LIST` and `UPDATE_MANY` in its core-operation type and `coreOperations`, with `UPDATE_MANY` as an `INTERNAL_CALL` (or `API_CALL`) default — never `REPOSITORY_ONLY` (catch with the retention grep below; the backend otherwise refuses to start)
|
|
322
338
|
- [ ] Every FK in the schema has a matching `createResourcesRelationship(...)` entry in the module relationships file
|
|
323
339
|
- [ ] Every relationship that resolves to multiple FKs to the same parent type sets `foreignKeyField` explicitly
|
|
324
340
|
- [ ] Operations referenced from `*.ui-behavior.tsx` exist in `*.resources-config.ts`
|
|
@@ -343,7 +359,16 @@ Run from the app root and substitute the resource / FK field name:
|
|
|
343
359
|
| Custom operation IDs in the UI exist in the resource config | `rg -n "operationLike:\\s*<Resource>_Operations\\." frontend/src/modules/*/resources/<resource>/<resource>.ui-behavior.tsx` |
|
|
344
360
|
| Same custom operation IDs are defined in the resource config | `rg -n "<Resource>_Operations\\." shared-lib/src/modules/*/resources/<resource>/<resource>.resources-config.ts` |
|
|
345
361
|
| Long-running variants declare their client timeout | `rg -n "clientRequestTimeoutMs" shared-lib/src/modules/*/resources/<resource>/<resource>.resources-config.ts` (expect a hit for any variant that generates/imports synchronously) |
|
|
346
|
-
| The two custom-operation lists agree |
|
|
362
|
+
| The two custom-operation lists agree | see the commands below the table |
|
|
363
|
+
| Every `retentionPolicy` resource declares UPDATE_MANY (expect each listed file in both outputs) | see the commands below the table (must be empty) |
|
|
364
|
+
|
|
365
|
+
```bash
|
|
366
|
+
# The two custom-operation lists agree
|
|
367
|
+
comm -23 <(rg -oN "<Resource>_Operations\\.[A-Z_]+" frontend/src/modules/*/resources/<resource>/*.tsx | sort -u) <(rg -oN "<Resource>_Operations\\.[A-Z_]+" shared-lib/src/modules/*/resources/<resource>/*.ts | sort -u)
|
|
368
|
+
|
|
369
|
+
# Every `retentionPolicy` resource declares UPDATE_MANY (expect each listed file in both outputs)
|
|
370
|
+
comm -23 <(rg -l "retentionPolicy:" shared-lib/src --glob '*.resources-config.ts' | sort) <(rg -l "CoreResourceOperation\.UPDATE_MANY" shared-lib/src --glob '*.resources-config.ts' | sort)
|
|
371
|
+
```
|
|
347
372
|
|
|
348
373
|
The third grep MUST return zero matches — relationship declarations in
|
|
349
374
|
`resources-config.ts` are a layering bug. The `comm` invariant MUST also
|
|
@@ -381,9 +406,10 @@ branch, and the template must consume the generated token context.
|
|
|
381
406
|
- `createResourcesRelationship` called from inside `*.resources-config.ts` (catch with the **Relationship is co-located** grep — should be empty).
|
|
382
407
|
- Custom operation referenced from UI behavior but not declared in `resources-config.ts` (catch with the **comm** invariant above).
|
|
383
408
|
- High-cardinality `REFERENCE` relationship with `contextPolicy: {}` and no `LIST`/`SEARCH` override (manual review — N+1 risk).
|
|
384
|
-
- Relational `searchableFields` entry whose `localField` is not a field on this resource's schema (catch with the **relational search** `rg -n "localField:"` invariant above)
|
|
409
|
+
- Relational `searchableFields` entry whose `localField` is not a field on this resource's schema (catch with the **relational search** `rg -n "localField:"` invariant above).
|
|
385
410
|
- A junction/row labeled by a denormalized copy of a related resource's MUTABLE name instead of `forwardedLabel` (manual review — staleness trap), or a `forwardedLabel` whose `localField` is not a field on this schema (catch with the `forwardedLabel` `localField` grep below).
|
|
386
411
|
- Token generation and its notification use different conditions, leaving a live token without an email or an email without a usable token.
|
|
412
|
+
- A `retentionPolicy` (even `RETAIN_ONLY`) on a resource whose `coreOperations` lack `UPDATE_MANY`, or whose `UPDATE_MANY` is `REPOSITORY_ONLY` (catch with the **retentionPolicy declares UPDATE_MANY** `comm` invariant above). When the core-operation type still lists it, it typechecks, and the backend then refuses to start.
|
|
387
413
|
|
|
388
414
|
## Related Skills
|
|
389
415
|
|
|
@@ -9,7 +9,7 @@ Read this when authoring a collection operation, or when a list "works" but retu
|
|
|
9
9
|
|---|---|---|
|
|
10
10
|
| `filterFields` | field name → schema; the fields a caller may filter on. A date-typed field automatically becomes a RANGE filter | no filtering offered |
|
|
11
11
|
| `sortFields` | the sortable allow-list | **no allow-list you chose** — see below |
|
|
12
|
-
| `isSearchable` + `searchableFields` + `searchableOptions` | free-text search over declared fields, own or relational |
|
|
12
|
+
| `isSearchable` + `searchableFields` + `searchableOptions` | free-text search over declared fields, own or relational | **refused at registration** unless `isSearchable: false` — see below |
|
|
13
13
|
| `maxPaginatedResultPerPageLimit` | the per-page ceiling a caller cannot exceed | 100 on a LIST, 50 on a SEARCH — see below |
|
|
14
14
|
| `collectionExport` | `formats` (`CSV` / `JSON` / `PDF`), `rowScopes`, `maximumExportedRows`, and `pdfTemplateId` exactly when `PDF` is offered, with `maximumExportedRows` required for a whole-set PDF (see the `pdf-template-authoring` skill); derives an export route beside the operation, under the same roles | no export route |
|
|
15
15
|
|
|
@@ -47,9 +47,24 @@ narrow.
|
|
|
47
47
|
|
|
48
48
|
## Free text is substring matching, not a search engine
|
|
49
49
|
|
|
50
|
-
Own-field search compiles to a
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
Own-field search compiles to a substring match. There is no relevance ordering, no stemming and no
|
|
51
|
+
typo tolerance — results come back in the declared sort order. If the product needs ranked search,
|
|
52
|
+
this declaration is not it.
|
|
53
|
+
|
|
54
|
+
`searchableOptions` reads the same on both adapters, for own fields and for the related resource's
|
|
55
|
+
fields a relational entry reaches (each read with that resource's own options): `caseSensitive`
|
|
56
|
+
(default `false`) and `fullMatchOnly` (default `false`) choose between a case-insensitive substring
|
|
57
|
+
match, a case-sensitive one, and an exact match (case-insensitive unless `caseSensitive`).
|
|
58
|
+
|
|
59
|
+
### A searchable SEARCH declares `searchableFields`, or the resource is refused
|
|
60
|
+
|
|
61
|
+
A SEARCH variant is searchable by default (`isSearchable` defaults to `true`), and a searchable one
|
|
62
|
+
with no `searchableFields` fails registration with a message naming both fixes:
|
|
63
|
+
|
|
64
|
+
- **Declare the fields** a person would type into the search box: `searchableFields: ['name', 'email']`.
|
|
65
|
+
- **Or declare `isSearchable: false`** for a variant that only filters and sorts (an audit log, a
|
|
66
|
+
delivery log). Its SEARCH call still answers with filters and sort applied; a non-empty search term
|
|
67
|
+
is refused (`repository_resource_search_not_enabled`), and the frontend shows no search box for it.
|
|
53
68
|
|
|
54
69
|
Every own-field name in `searchableFields` must be a field of the resource, exactly like `filterFields`
|
|
55
70
|
and `sortFields`: the factory refuses a name that is not one when the resource is registered. On
|
package/dist/knowledge/skills/resource-config-wiring/references/framework-operation-audit-api.md
CHANGED
|
@@ -33,6 +33,8 @@ data. No other request values are copied by this declaration. It does not raise
|
|
|
33
33
|
`OVERRIDE_ALL` implementations own persistence and bypass the framework-managed post-commit lane. They must
|
|
34
34
|
record their own committed event, after persistence succeeds or an enclosing transaction commits. The engine's
|
|
35
35
|
application and organization feature commands do this explicitly, including enable, disable and reset reasons.
|
|
36
|
+
An application does it with `AuditLogsBackendService.logEvent`, passing the request's execution context: see
|
|
37
|
+
`backend-custom-operation`, `references/framework-audit-log-event-api.md`.
|
|
36
38
|
|
|
37
39
|
## Three things the trail will not tell you
|
|
38
40
|
|
|
@@ -40,8 +42,9 @@ application and organization feature commands do this explicitly, including enab
|
|
|
40
42
|
none. Neither a higher risk nor `auditBelowRiskFloor` overrides this exclusion. One-time response
|
|
41
43
|
disclosure is a separate controller mechanism: backend-only fields returned at creation, or ephemeral
|
|
42
44
|
response fields, trigger it when exposed. `.isAuditEvidence()` is not one of those triggers. For an
|
|
43
|
-
ordinary business read that needs a record,
|
|
44
|
-
|
|
45
|
+
ordinary business read that needs a record, record your own event with `logEvent` from that operation
|
|
46
|
+
(`backend-custom-operation`, `references/framework-audit-log-event-api.md`); do not mark stored data as
|
|
47
|
+
ephemeral merely to obtain a row.
|
|
45
48
|
- **A bulk write records submitted field NAMES without prior values.** The before-image is fetched only
|
|
46
49
|
when exactly one row is selected.
|
|
47
50
|
- **There is no suppression path.** An operation with its own purpose-built event emits BOTH rows —
|
|
@@ -5,6 +5,77 @@ Read this **once per resource**, before you consider it finished.
|
|
|
5
5
|
It answers one question: **do this resource's rows describe a person?** Every resource owes an
|
|
6
6
|
answer — including "no", which is a real answer and has a way to say it.
|
|
7
7
|
|
|
8
|
+
## Decide here first
|
|
9
|
+
|
|
10
|
+
Find the row that describes your resource. `retentionPolicy` and `dataSubjectPolicy` are always declared
|
|
11
|
+
together: the resource factory refuses either one alone.
|
|
12
|
+
|
|
13
|
+
| your rows are… | `retentionPolicy.mode` | `dataSubjectPolicy.kind` | `exportSubject` | on the fields |
|
|
14
|
+
|---|---|---|---|---|
|
|
15
|
+
| **about no person, and naming none** — a product catalog, a price list with no author field | `RETAIN_ONLY` | `NO_PRINCIPAL` | not owed: nothing links it to a person | nothing; `.impersonalizeWith()` is refused beside `RETAIN_ONLY` |
|
|
16
|
+
| **about no person, but naming one** — a pipeline stage or a quote with a `createdByUserId`, a job pointing at a homeowner | `RETAIN_ONLY` | `NO_PRINCIPAL` | **`ALLOWED`** (or `FORBIDDEN` to keep it out on purpose): the link puts it on that person's export graph, and an undeclared resource there makes the subject-access export refuse when it is requested | nothing of its own |
|
|
17
|
+
| **a person with no account** — a CRM contact, a lead, a homeowner on a quote | `RETAIN_AND_IMPERSONALIZE` | `NO_PRINCIPAL` | `ALLOWED` | every personal field: `.dataCategories(...)` and `.impersonalizeWith(...)` |
|
|
18
|
+
| **a person who signs in** — the row IS the user, or names the user it belongs to | `RETAIN_AND_IMPERSONALIZE` | `SELF_PRINCIPAL` (the row's id is the user), or `LINKED_PRINCIPAL` with `sessionPrincipalField` (a field names the user) | `ALLOWED` | as above; erasing the row also ends that user's sessions |
|
|
19
|
+
| **a business record carrying free text about people** — notes, descriptions, comments | `RETAIN_AND_IMPERSONALIZE` (the text is personal data of its own, so not `RETAIN_ONLY`) | whichever of the rows above fits the record itself | `ALLOWED` when the record names a person, as above | the text field, optional: `.dataCategories(PersonalDataCategory.USER_CONTENT)` and `.impersonalizeWith(RedactionType.REMOVE)` |
|
|
20
|
+
|
|
21
|
+
`REMOVE` clears the field, so it is accepted only on an optional field; a required one takes
|
|
22
|
+
`RedactionType.MASK`, with a `maskValue` when the field's schema would reject the default mask. The enums come from `@wildo-ai/saas-models`: `ErasureRetentionMode`,
|
|
23
|
+
`ResourceDataSubjectKind`, `ResourceSystemAccessMode`, `RedactionType`, `PersonalDataCategory`.
|
|
24
|
+
|
|
25
|
+
Two things the table does not change:
|
|
26
|
+
|
|
27
|
+
- `NO_PRINCIPAL` is about SESSIONS only. A contact with no account is still a data subject with every right; an
|
|
28
|
+
erasure reaches them through `eraseSubjectAsSystem(resourceType, rowIds)`, which needs no login.
|
|
29
|
+
- Any `retentionPolicy` costs three core operations (`READ`, `LIST`, `UPDATE_MANY`); see the warning below.
|
|
30
|
+
|
|
31
|
+
A person with no account, as Wonder CRM declares its contact:
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
## Usage Example
|
|
35
|
+
|
|
36
|
+
```typescript
|
|
37
|
+
systemAccessPolicy: {
|
|
38
|
+
// Art. 15 and Art. 20 both reach a contact: it is the personal data a customer stores about a
|
|
39
|
+
// third party, and it is the data most likely to be the SUBJECT of a request rather than
|
|
40
|
+
// incidental to one.
|
|
41
|
+
exportSubject: ResourceSystemAccessMode.ALLOWED,
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A contact IS a person, and the person has no account here. The two declarations below say so on two
|
|
46
|
+
* independent axes:
|
|
47
|
+
*
|
|
48
|
+
* - `RETAIN_AND_IMPERSONALIZE` — this row holds personal data of its own, and the fields carrying
|
|
49
|
+
* `.impersonalizeWith()` are what an erasure destroys. The row itself is kept and frozen, because
|
|
50
|
+
* a deal referencing a contact that vanished is a broken record rather than an erased one.
|
|
51
|
+
* - `NO_PRINCIPAL` — erasing it revokes no session, because a contact never had one. Nothing about
|
|
52
|
+
* the person's rights follows from that: `eraseSubjectAsSystem(CONTACT, ids)` takes a resource
|
|
53
|
+
* type and row ids and needs no login.
|
|
54
|
+
*/
|
|
55
|
+
retentionPolicy: { mode: ErasureRetentionMode.RETAIN_AND_IMPERSONALIZE },
|
|
56
|
+
dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
A free-text field on the same resource:
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
## Usage Example
|
|
63
|
+
|
|
64
|
+
```typescript
|
|
65
|
+
/*
|
|
66
|
+
* Free prose about a person — routinely holds far more personal data than the name does.
|
|
67
|
+
*
|
|
68
|
+
* Declared `USER_CONTENT` rather than a narrower category, and the honesty of that is worth
|
|
69
|
+
* stating: the declaration says what the field is FOR, never what it will contain. A CRM note is
|
|
70
|
+
* the classic surface where a special category (a health remark, a religious observance) arrives
|
|
71
|
+
* unannounced, and no schema can certify otherwise. If this field is ever used for one
|
|
72
|
+
* FORESEEABLY, declare that member alongside — the decorator takes an array for exactly this.
|
|
73
|
+
*/
|
|
74
|
+
description: z.string().max(1000).optional()
|
|
75
|
+
.impersonalizeWith(RedactionType.REMOVE)
|
|
76
|
+
.dataCategories(PersonalDataCategory.USER_CONTENT),
|
|
77
|
+
```
|
|
78
|
+
|
|
8
79
|
## Why you are asked, when nothing forces you
|
|
9
80
|
|
|
10
81
|
The framework does NOT refuse to start a resource that says nothing. That was decided deliberately:
|
|
@@ -42,6 +113,12 @@ can cite, not silence — which is exactly why saying it is worth a line.
|
|
|
42
113
|
A resource that genuinely holds nothing about people — a product catalog, a price list, a pipeline
|
|
43
114
|
stage — should say so this way.
|
|
44
115
|
|
|
116
|
+
⚠️ **Saying it costs three operations.** Every `retentionPolicy`, `RETAIN_ONLY` included, requires
|
|
117
|
+
`READ`, `LIST` and `UPDATE_MANY` in the resource's core operations, `UPDATE_MANY` as a route-less
|
|
118
|
+
`INTERNAL_CALL` default. Retaining a row still writes to it. Without them the backend refuses to
|
|
119
|
+
start, and no typecheck says so beforehand. Read `framework-retention-policy-operations.md` before
|
|
120
|
+
writing the line.
|
|
121
|
+
|
|
45
122
|
### The two config declarations that must travel together
|
|
46
123
|
|
|
47
124
|
`retentionPolicy` REQUIRES `dataSubjectPolicy`, and `dataSubjectPolicy` is rejected without a
|
|
@@ -667,6 +744,32 @@ export type ResourceConfiguration_BuilderParameters<
|
|
|
667
744
|
* Declaring this also REQUIRES {@link dataSubjectPolicy}: a retention-governed resource is exactly
|
|
668
745
|
* one that can be handed to `eraseSubjectAsSystem` as a subject, so it must say whether its rows are
|
|
669
746
|
* a person — and if so, whose session an erasure ends.
|
|
747
|
+
*
|
|
748
|
+
* And it REQUIRES three operations, for every `mode` including `RETAIN_ONLY`: `READ`, `LIST` and
|
|
749
|
+
* `UPDATE_MANY`, in `coreOperations` (and so in its core-operation type parameter), each with an
|
|
750
|
+
* `API_CALL` or `INTERNAL_CALL` DEFAULT variant. `UPDATE_MANY` is normally `INTERNAL_CALL`: route-less
|
|
751
|
+
* and still service-resolvable; `REPOSITORY_ONLY` is route-less too but resolves through a different
|
|
752
|
+
* transport, so the factory refuses it when the backend starts (`… to be SERVICE-RESOLVABLE`). Retaining a row still writes to it (the
|
|
753
|
+
* erasure marks `retentionStatus` in place through `updateManyAsSystem`). Do not author
|
|
754
|
+
* `systemAccessPolicy.updateMany` or `seeRetained` as `FORBIDDEN`; both are derived to `ALLOWED`.
|
|
755
|
+
*
|
|
756
|
+
* Checked twice. At COMPILE time the factory refuses a `retentionPolicy` whose core-operation TYPE lacks READ, LIST
|
|
757
|
+
* or UPDATE_MANY (`RetentionPolicyRequiresReadListAndUpdateManyInCoreOperations` in the error). When the BACKEND
|
|
758
|
+
* STARTS it checks what a type cannot see: the `coreOperations` array itself, and that each operation has a
|
|
759
|
+
* service-resolvable default variant. `wildo config check-resources` asks the start-time half without starting it.
|
|
760
|
+
*
|
|
761
|
+
* @example
|
|
762
|
+
* ```ts
|
|
763
|
+
* retentionPolicy: { mode: ErasureRetentionMode.RETAIN_ONLY },
|
|
764
|
+
* dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },
|
|
765
|
+
* coreOperations: [CoreResourceOperation.READ, CoreResourceOperation.LIST, CoreResourceOperation.UPDATE_MANY],
|
|
766
|
+
* operationsConfiguration: {
|
|
767
|
+
* // …READ / LIST as API_CALL defaults…
|
|
768
|
+
* [CoreResourceOperation.UPDATE_MANY]: {
|
|
769
|
+
* variants: [{ variantType: ResourceOperationVariantType.INTERNAL_CALL, isDefault: true, roles: [], riskLevel: ResourceOperationRiskLevel.CRITICAL }],
|
|
770
|
+
* },
|
|
771
|
+
* },
|
|
772
|
+
* ```
|
|
670
773
|
*/
|
|
671
774
|
retentionPolicy?: ResourceRetentionPolicy,
|
|
672
775
|
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# A `retentionPolicy` resource owes three operations (source)
|
|
2
|
+
|
|
3
|
+
Read this when:
|
|
4
|
+
|
|
5
|
+
- you add `retentionPolicy` to a resource — including `RETAIN_ONLY`, the "holds no personal data of its own" answer;
|
|
6
|
+
- the backend refuses to start with `retentionPolicy requires update_many in coreOperations …`,
|
|
7
|
+
`retentionPolicy requires … to be SERVICE-RESOLVABLE …`, or
|
|
8
|
+
`retentionPolicy requires systemAccessPolicy.updateMany = ALLOWED …`.
|
|
9
|
+
|
|
10
|
+
## The rule
|
|
11
|
+
|
|
12
|
+
Any resource that declares `retentionPolicy`, whatever its `mode`, must:
|
|
13
|
+
|
|
14
|
+
1. **declare `READ`, `LIST` and `UPDATE_MANY`** in BOTH the core-operation type parameter of its
|
|
15
|
+
initialization factory and its `coreOperations` array;
|
|
16
|
+
2. give each of the three a **default variant the system primitives can resolve**: `API_CALL` or
|
|
17
|
+
`INTERNAL_CALL`. `UPDATE_MANY` is normally `INTERNAL_CALL` — route-less, so no client bulk route
|
|
18
|
+
appears, and still service-resolvable. **Never `REPOSITORY_ONLY`**: it is route-less too, but it is
|
|
19
|
+
served by a different transport, and the factory refuses it when the backend starts
|
|
20
|
+
(`retentionPolicy requires … to be SERVICE-RESOLVABLE`);
|
|
21
|
+
3. **not author `systemAccessPolicy.updateMany` or `seeRetained` as `FORBIDDEN`**. Both are derived to
|
|
22
|
+
`ALLOWED` automatically for a retention-governed resource, so you do not need to write them; an
|
|
23
|
+
explicit `FORBIDDEN` contradicts the policy and is refused.
|
|
24
|
+
|
|
25
|
+
Why `RETAIN_ONLY` needs it too: retaining a row still WRITES to it. An erasure marks the row's
|
|
26
|
+
`retentionStatus` in place through `updateManyAsSystem`, and reads retained rows back through
|
|
27
|
+
`readRetainedAsSystem` / `listRetainedAsSystem`.
|
|
28
|
+
|
|
29
|
+
## Why this matters more than it looks
|
|
30
|
+
|
|
31
|
+
Only part of this is visible to a typecheck. The factory's TYPE refuses a `retentionPolicy` when the
|
|
32
|
+
core-operation type parameter lacks `READ`, `LIST` or `UPDATE_MANY`, and the error names
|
|
33
|
+
`RetentionPolicyRequiresReadListAndUpdateManyInCoreOperations`. Everything else, the `coreOperations`
|
|
34
|
+
array itself, each operation's variant type and the `FORBIDDEN` grants, is enforced only when the
|
|
35
|
+
backend STARTS, inside `ResourcesRegistryBackendService.initialize`. Before the type check existed, a
|
|
36
|
+
generated application crash-looped for hours on a missing `UPDATE_MANY` while every task's typecheck
|
|
37
|
+
stayed green.
|
|
38
|
+
|
|
39
|
+
Ask the question the backend will ask, without starting it: run `wildo config check-resources` at the
|
|
40
|
+
application root. It builds every resource configuration and the resources registry from the compiled
|
|
41
|
+
backend, offline, and prints the factory's refusal and the resource it names. Exit 1 is a refused
|
|
42
|
+
configuration; exit 2 means it could not ask (rebuild, then ask again).
|
|
43
|
+
|
|
44
|
+
## The factory's other start-time refusals a worker trips
|
|
45
|
+
|
|
46
|
+
Each is raised by the resource factory when the backend starts, each names the resource in brackets, and
|
|
47
|
+
`wildo config check-resources` reports every one without starting anything:
|
|
48
|
+
|
|
49
|
+
| You declared | It also requires |
|
|
50
|
+
|---|---|
|
|
51
|
+
| `retentionPolicy` (any mode) | a `dataSubjectPolicy`; an object `mainSchema`; no field of your own named `retentionStatus` or `impersonalizedAt` (the factory injects them) |
|
|
52
|
+
| `retentionPolicy: RETAIN_ONLY` | no `.impersonalizeWith()` and no `.dataCategories()` on any field: it states the resource holds no personal data of its own (scope foreign keys and `createdByUserId` do not count) |
|
|
53
|
+
| `retentionPolicy: RETAIN_AND_IMPERSONALIZE` | at least one field whose treatment really scrubs something, and every treatment valid for its field (a `MASK` value the field accepts, `REMOVE` only on a clearable field) |
|
|
54
|
+
| `isAnonymizable: true` | a `USER_SELF` primary scope, a nullable `userId` field, the operations the anonymous-session transposition uses, and no `systemAccessPolicy.updateMany: FORBIDDEN` |
|
|
55
|
+
| `retentionBinding` | an object `mainSchema` (the retention clock is a field of the row), a delete the retention sweep can resolve, and no `.ttl()` on the same resource (one row, one retention authority) |
|
|
56
|
+
| `.ttl()` on an organization-scoped resource | refused: a tenant row's lifetime is a retention binding, not a TTL |
|
|
57
|
+
|
|
58
|
+
## Worked example
|
|
59
|
+
|
|
60
|
+
From a real application: a configuration record that holds no personal data (`RETAIN_ONLY`), declaring
|
|
61
|
+
the three operations in the type and in `coreOperations`, with `UPDATE_MANY` as a route-less
|
|
62
|
+
`INTERNAL_CALL` default. Read the comments — they say why each line is there.
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
## Usage Example
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
type OrganizationEscalationPolicies_CoreOperations =
|
|
69
|
+
| CoreResourceOperation.READ
|
|
70
|
+
| CoreResourceOperation.LIST
|
|
71
|
+
| CoreResourceOperation.CREATE
|
|
72
|
+
| CoreResourceOperation.UPDATE
|
|
73
|
+
| CoreResourceOperation.UPDATE_MANY
|
|
74
|
+
| CoreResourceOperation.DELETE;
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Usage Example
|
|
78
|
+
|
|
79
|
+
```typescript
|
|
80
|
+
/**
|
|
81
|
+
* RETAIN_ONLY, and the contrast with the sibling rota is the point.
|
|
82
|
+
*
|
|
83
|
+
* `organizationEscalationContacts` holds a contact number, so it holds personal data of its own and
|
|
84
|
+
* declares RETAIN_AND_IMPERSONALIZE. A policy holds none: its `targetUserId` is a foreign key that
|
|
85
|
+
* NAMES a person without being data about them (the never-scrub floor treats scope and actor keys
|
|
86
|
+
* exactly this way), and `webhookUrl` addresses a system rather than a human. So there is nothing
|
|
87
|
+
* here an erasure could scrub, and claiming otherwise would be a declaration the factory refuses —
|
|
88
|
+
* RETAIN_AND_IMPERSONALIZE requires at least one genuinely scrubbable field.
|
|
89
|
+
*/
|
|
90
|
+
retentionPolicy: { mode: ErasureRetentionMode.RETAIN_ONLY },
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Erasing a policy revokes no session. It is a configuration record, not a person: `targetUserId`
|
|
94
|
+
* names an escalation ACTOR, which is the exact case the enum's own documentation gives for
|
|
95
|
+
* NO_PRINCIPAL, and revoking their session because a policy was deleted would log out someone who
|
|
96
|
+
* merely appeared in it.
|
|
97
|
+
*/
|
|
98
|
+
dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },
|
|
99
|
+
|
|
100
|
+
coreOperations: [
|
|
101
|
+
CoreResourceOperation.READ,
|
|
102
|
+
CoreResourceOperation.LIST,
|
|
103
|
+
CoreResourceOperation.CREATE,
|
|
104
|
+
CoreResourceOperation.UPDATE,
|
|
105
|
+
/*
|
|
106
|
+
* Declared for the RETENTION POLICY, not as an authoring affordance — and required even under
|
|
107
|
+
* RETAIN_ONLY, which is worth knowing before assuming it is only the scrub's concern. Retaining a
|
|
108
|
+
* row still WRITES to it: the erasure marks `retentionStatus`, in place, through
|
|
109
|
+
* `updateManyAsSystem`. So a resource that declares how it behaves under erasure must grant the
|
|
110
|
+
* writer that carries it out, whether or not any field is scrubbed.
|
|
111
|
+
*
|
|
112
|
+
* Its variant is INTERNAL_CALL, so it registers no route and no affordance. Nobody bulk-edits
|
|
113
|
+
* escalation policies; the erasure writer does.
|
|
114
|
+
*/
|
|
115
|
+
CoreResourceOperation.UPDATE_MANY,
|
|
116
|
+
CoreResourceOperation.DELETE,
|
|
117
|
+
],
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
## Usage Example
|
|
121
|
+
|
|
122
|
+
```typescript
|
|
123
|
+
[CoreResourceOperation.UPDATE_MANY]: {
|
|
124
|
+
variants: [{
|
|
125
|
+
// INTERNAL_CALL, because this operation exists only for the erasure writer (see
|
|
126
|
+
// `coreOperations` above). As API_CALL it registered a `PUT` collection route that failed
|
|
127
|
+
// validation on every request and was published in the API reference; declaring no view
|
|
128
|
+
// for it does not withhold the route.
|
|
129
|
+
variantType: ResourceOperationVariantType.INTERNAL_CALL,
|
|
130
|
+
isDefault: true,
|
|
131
|
+
roles: [CORE_ORG_ROLES.ORG_ADMIN],
|
|
132
|
+
riskLevel: ResourceOperationRiskLevel.HIGH,
|
|
133
|
+
}]
|
|
134
|
+
},
|
|
135
|
+
```
|
|
@@ -1141,6 +1141,32 @@ export type ResourceConfiguration_BuilderParameters<
|
|
|
1141
1141
|
* Declaring this also REQUIRES {@link dataSubjectPolicy}: a retention-governed resource is exactly
|
|
1142
1142
|
* one that can be handed to `eraseSubjectAsSystem` as a subject, so it must say whether its rows are
|
|
1143
1143
|
* a person — and if so, whose session an erasure ends.
|
|
1144
|
+
*
|
|
1145
|
+
* And it REQUIRES three operations, for every `mode` including `RETAIN_ONLY`: `READ`, `LIST` and
|
|
1146
|
+
* `UPDATE_MANY`, in `coreOperations` (and so in its core-operation type parameter), each with an
|
|
1147
|
+
* `API_CALL` or `INTERNAL_CALL` DEFAULT variant. `UPDATE_MANY` is normally `INTERNAL_CALL`: route-less
|
|
1148
|
+
* and still service-resolvable; `REPOSITORY_ONLY` is route-less too but resolves through a different
|
|
1149
|
+
* transport, so the factory refuses it when the backend starts (`… to be SERVICE-RESOLVABLE`). Retaining a row still writes to it (the
|
|
1150
|
+
* erasure marks `retentionStatus` in place through `updateManyAsSystem`). Do not author
|
|
1151
|
+
* `systemAccessPolicy.updateMany` or `seeRetained` as `FORBIDDEN`; both are derived to `ALLOWED`.
|
|
1152
|
+
*
|
|
1153
|
+
* Checked twice. At COMPILE time the factory refuses a `retentionPolicy` whose core-operation TYPE lacks READ, LIST
|
|
1154
|
+
* or UPDATE_MANY (`RetentionPolicyRequiresReadListAndUpdateManyInCoreOperations` in the error). When the BACKEND
|
|
1155
|
+
* STARTS it checks what a type cannot see: the `coreOperations` array itself, and that each operation has a
|
|
1156
|
+
* service-resolvable default variant. `wildo config check-resources` asks the start-time half without starting it.
|
|
1157
|
+
*
|
|
1158
|
+
* @example
|
|
1159
|
+
* ```ts
|
|
1160
|
+
* retentionPolicy: { mode: ErasureRetentionMode.RETAIN_ONLY },
|
|
1161
|
+
* dataSubjectPolicy: { kind: ResourceDataSubjectKind.NO_PRINCIPAL },
|
|
1162
|
+
* coreOperations: [CoreResourceOperation.READ, CoreResourceOperation.LIST, CoreResourceOperation.UPDATE_MANY],
|
|
1163
|
+
* operationsConfiguration: {
|
|
1164
|
+
* // …READ / LIST as API_CALL defaults…
|
|
1165
|
+
* [CoreResourceOperation.UPDATE_MANY]: {
|
|
1166
|
+
* variants: [{ variantType: ResourceOperationVariantType.INTERNAL_CALL, isDefault: true, roles: [], riskLevel: ResourceOperationRiskLevel.CRITICAL }],
|
|
1167
|
+
* },
|
|
1168
|
+
* },
|
|
1169
|
+
* ```
|
|
1144
1170
|
*/
|
|
1145
1171
|
retentionPolicy?: ResourceRetentionPolicy,
|
|
1146
1172
|
|
package/dist/knowledge/skills/resource-config-wiring/references/framework-user-notifications-api.md
CHANGED
|
@@ -166,10 +166,27 @@ so they were removed. The framework's SMS transport serves authentication's one-
|
|
|
166
166
|
resource notifications. Users no longer have SMS or push switches in their notification preferences
|
|
167
167
|
either: `email` and `inApp` are the two they can turn off.
|
|
168
168
|
|
|
169
|
-
For an `EMAIL`, create the template
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
169
|
+
For an `EMAIL`, create the template the derived ref names:
|
|
170
|
+
`email.<resource>.<operation>[.<variantKey>].<target>[_<customNotificationRef>]`, the target lowercased with `_` as
|
|
171
|
+
`-`, in the folder `resources/<resource>/` plus the rest of the ref (see `email-add-template`,
|
|
172
|
+
`references/framework-operation-email-template-ref-api.md`). `userNotifications` is declared on the operation, so an
|
|
173
|
+
operation with a keyed variant needs one template per variant.
|
|
174
|
+
|
|
175
|
+
The startup validator resolves every declared ref through the locale chain and names the folder to create when one
|
|
176
|
+
is missing. It REFUSES to start only for an operation with `tokenGeneration`, whose email carries the token its flow
|
|
177
|
+
needs. For every other operation it WARNS and starts, and that email is silently never sent: read the startup
|
|
178
|
+
warnings after adding one.
|
|
179
|
+
|
|
180
|
+
Most emails a business needs are declared here, including two cases that look as if they need code:
|
|
181
|
+
|
|
182
|
+
| the email | declare |
|
|
183
|
+
|---|---|
|
|
184
|
+
| to somebody who is not a user (a customer contact, a lead), at an address on the record | `recipientEmailField` (below) |
|
|
185
|
+
| that must reach the recipient whatever their preferences | `alwaysDeliver: true` |
|
|
186
|
+
|
|
187
|
+
Send from custom code (`email-add-template`, `references/framework-email-send-api.md`) only when a declaration cannot
|
|
188
|
+
express it: an attachment, several addresses or an address in a nested field, cc / bcc / reply-to / threading, or a
|
|
189
|
+
non-user recipient who must be written to in their own language.
|
|
173
190
|
|
|
174
191
|
## Recipient preferences are honoured — and three things override them
|
|
175
192
|
|
|
@@ -231,9 +248,11 @@ who must not be written to.
|
|
|
231
248
|
* dropped, and were removed. The framework's SMS transport serves authentication's one-time codes, not
|
|
232
249
|
* resource notifications.
|
|
233
250
|
*
|
|
234
|
-
* For an EMAIL, create the template
|
|
235
|
-
*
|
|
236
|
-
* and
|
|
251
|
+
* For an EMAIL, create the template the derived reference names: one per operation variant that declares a
|
|
252
|
+
* `variantKey`, since the reference carries it. The startup validator resolves every declared reference through
|
|
253
|
+
* the configured locale chain before the application takes traffic and names the folder to create when one is
|
|
254
|
+
* missing. It REFUSES to start only for an operation with `tokenGeneration` (the email carries the token its flow
|
|
255
|
+
* needs); for any other operation it WARNS and starts, and that email is silently never sent.
|
|
237
256
|
*
|
|
238
257
|
* ## The recipient's preferences are honoured, and three things override them
|
|
239
258
|
*
|
|
@@ -200,10 +200,18 @@ Run from the app root, substituting `<resource>` and `<Operation>`:
|
|
|
200
200
|
|--------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------|
|
|
201
201
|
| Component signature is typed | `rg -n "Resource[A-Z][a-z]+CustomViewComponent" frontend/src/modules/<slug>/resources/<resource>/<Resource><Operation>CustomView.tsx` |
|
|
202
202
|
| Framework surface hook is used | `rg -n "use[A-Z][a-z]+OperationSurface" frontend/src/modules/<slug>/resources/<resource>/<Resource><Operation>CustomView.tsx` |
|
|
203
|
-
| **No deep package-internal imports** (must return empty) |
|
|
203
|
+
| **No deep package-internal imports** (must return empty) | see the commands below the table |
|
|
204
204
|
| Embed `viewRef` references constants, not literals | `rg -n "viewRef=\"[a-z]" frontend/src/modules/<slug>/resources/<resource>/<Resource><Operation>CustomView.tsx` (must return empty) |
|
|
205
205
|
| `ui-behavior.tsx` references the component | `rg -n "<Component name>" frontend/src/modules/<slug>/resources/<resource>/<resource>.ui-behavior.tsx` |
|
|
206
|
-
| **No raw error text rendered** (every hit must be a log call) |
|
|
206
|
+
| **No raw error text rendered** (every hit must be a log call) | see the commands below the table |
|
|
207
|
+
|
|
208
|
+
```bash
|
|
209
|
+
# No deep package-internal imports (must return empty)
|
|
210
|
+
rg -P -n "from\s+'@wildo-ai/(?!saas-frontend-lib\b|saas-models\b|presets-components\b|zod-decorators\b)[^']+/[^']+/" <CustomView>.tsx
|
|
211
|
+
|
|
212
|
+
# No raw error text rendered (every hit must be a log call)
|
|
213
|
+
rg -n "\.message\b|String\((e|err|error)\)" <CustomView>.tsx
|
|
214
|
+
```
|
|
207
215
|
|
|
208
216
|
The third invariant (no deep imports) is the high-signal one —
|
|
209
217
|
deep imports break when the framework refactors internal layout and
|