@wowok/agent-mcp 3.3.0 → 3.3.2

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 (167) hide show
  1. package/dist/chain-semantics/field-capability.js +1 -1
  2. package/dist/chain-semantics/freeze-map.js +1 -1
  3. package/dist/chain-semantics/fund-flow.js +1 -1
  4. package/dist/chain-semantics/guard-verbs.js +1 -1
  5. package/dist/chain-semantics/object-graph.js +1 -1
  6. package/dist/composition/audit.d.ts +5 -0
  7. package/dist/composition/audit.js +1 -1
  8. package/dist/composition/blueprint-view.d.ts +0 -1
  9. package/dist/composition/blueprint-view.js +1 -1
  10. package/dist/composition/compile.d.ts +4 -2
  11. package/dist/composition/compile.js +1 -1
  12. package/dist/composition/inflight.d.ts +8 -4
  13. package/dist/composition/inflight.js +1 -1
  14. package/dist/customer/industry-risks.js +1 -1
  15. package/dist/customer/user-preferences.js +1 -1
  16. package/dist/extensions/business-modules.d.ts +7 -2
  17. package/dist/extensions/business-modules.js +1 -1
  18. package/dist/extensions/industry-audit.spec.js +1 -1
  19. package/dist/extensions/industry-pack.d.ts +3 -2
  20. package/dist/extensions/industry-pack.js +1 -1
  21. package/dist/extensions/modes.js +1 -1
  22. package/dist/graph/onchain/project-relationship.js +1 -1
  23. package/dist/knowledge/acquisition-flywheel.js +1 -1
  24. package/dist/knowledge/allocation-ledger.d.ts +4 -1
  25. package/dist/knowledge/allocation-ledger.js +1 -1
  26. package/dist/knowledge/allocation-puzzle.d.ts +1 -0
  27. package/dist/knowledge/allocation-puzzle.js +1 -1
  28. package/dist/knowledge/allocation-risk.d.ts +1 -1
  29. package/dist/knowledge/allocation-risk.js +1 -1
  30. package/dist/knowledge/arb-fund-facts.d.ts +5 -0
  31. package/dist/knowledge/arb-fund-facts.js +1 -1
  32. package/dist/knowledge/audit-rules.d.ts +4 -3
  33. package/dist/knowledge/audit-rules.js +1 -1
  34. package/dist/knowledge/baselines/rules/plan.json +48 -2
  35. package/dist/knowledge/baselines/rules/reward.json +1 -1
  36. package/dist/knowledge/builtin-templates.d.ts +9 -1
  37. package/dist/knowledge/builtin-templates.js +1 -1
  38. package/dist/knowledge/discount-threshold.js +1 -1
  39. package/dist/knowledge/guard-bindings.js +1 -1
  40. package/dist/knowledge/guard-design-patterns.js +1 -1
  41. package/dist/knowledge/guard-field-cognition.js +1 -1
  42. package/dist/knowledge/guard-lint.js +1 -1
  43. package/dist/knowledge/guard-submission-brief.d.ts +5 -0
  44. package/dist/knowledge/guard-submission-brief.js +1 -1
  45. package/dist/knowledge/guard-submission-prompt.d.ts +2 -1
  46. package/dist/knowledge/guard-submission-prompt.js +1 -1
  47. package/dist/knowledge/guard-templates.d.ts +1 -1
  48. package/dist/knowledge/guard-templates.js +1 -1
  49. package/dist/knowledge/industry-generalizer.js +1 -1
  50. package/dist/knowledge/industry-registry.js +1 -1
  51. package/dist/knowledge/industry-strategy.js +1 -1
  52. package/dist/knowledge/reward-ledger.js +1 -1
  53. package/dist/knowledge/reward-puzzle.d.ts +1 -1
  54. package/dist/knowledge/reward-risk.d.ts +1 -1
  55. package/dist/knowledge/scenario-modes.d.ts +2 -2
  56. package/dist/knowledge/scenario-modes.js +1 -1
  57. package/dist/knowledge/scenario-topology.js +1 -1
  58. package/dist/knowledge/strategy-manuals.js +1 -1
  59. package/dist/knowledge/template-index.d.ts +19 -0
  60. package/dist/knowledge/template-index.js +1 -0
  61. package/dist/knowledge/template-loader.d.ts +36 -0
  62. package/dist/knowledge/template-loader.js +1 -1
  63. package/dist/knowledge/template-registry.js +1 -1
  64. package/dist/knowledge/template-scanner.d.ts +7 -0
  65. package/dist/knowledge/template-scanner.js +1 -1
  66. package/dist/knowledge/tool-constraints.js +1 -1
  67. package/dist/knowledge/workflow-guidance.js +1 -1
  68. package/dist/monitor/MonitorLoop.js +1 -1
  69. package/dist/participation/radar-core.d.ts +1 -0
  70. package/dist/participation/radar-core.js +1 -1
  71. package/dist/persona/defaults.js +1 -1
  72. package/dist/persona/topology-focus.js +1 -1
  73. package/dist/playbooks/service-build/business-puzzle.js +1 -1
  74. package/dist/playbooks/service-build/game-theory.d.ts +4 -1
  75. package/dist/playbooks/service-build/game-theory.js +1 -1
  76. package/dist/playbooks/service-build/machine-panorama.js +1 -1
  77. package/dist/playbooks/service-build/merchant-guide.d.ts +25 -1
  78. package/dist/playbooks/service-build/merchant-guide.js +1 -1
  79. package/dist/playbooks/service-build/migration-planner.js +1 -1
  80. package/dist/playbooks/service-build/object-panorama.js +1 -1
  81. package/dist/playbooks/service-build/participation-radar.js +1 -1
  82. package/dist/playbooks/service-build/pipeline-actions.d.ts +4 -1
  83. package/dist/playbooks/service-build/pipeline-actions.js +1 -1
  84. package/dist/playbooks/service-build/relationship-profile.js +1 -1
  85. package/dist/playbooks/service-build/service-panorama.d.ts +4 -0
  86. package/dist/playbooks/service-build/service-panorama.js +1 -1
  87. package/dist/playbooks/service-build/service-quote.js +1 -1
  88. package/dist/relationship/derivation.d.ts +1 -1
  89. package/dist/review/index.js +1 -1
  90. package/dist/rules.js +1 -1
  91. package/dist/safety/confirm-gate.js +1 -1
  92. package/dist/schema/benchmark-migration/index.d.ts +35 -0
  93. package/dist/schema/benchmark-migration/index.js +1 -1
  94. package/dist/schema/call/allocation.d.ts +46 -3
  95. package/dist/schema/call/allocation.js +1 -1
  96. package/dist/schema/call/contact.js +1 -1
  97. package/dist/schema/call/guard.js +1 -1
  98. package/dist/schema/call/handler.js +1 -1
  99. package/dist/schema/call/order.js +1 -1
  100. package/dist/schema/call/progress.d.ts +6 -3
  101. package/dist/schema/call/progress.js +1 -1
  102. package/dist/schema/call/repository.js +1 -1
  103. package/dist/schema/call/reward.d.ts +2 -2
  104. package/dist/schema/call/reward.js +1 -1
  105. package/dist/schema/call/semantic.js +1 -1
  106. package/dist/schema/call/service.d.ts +8 -4
  107. package/dist/schema/call/service.js +1 -1
  108. package/dist/schema/common/index.js +1 -1
  109. package/dist/schema/goal/index.d.ts +54 -0
  110. package/dist/schema/goal/planning.d.ts +86 -0
  111. package/dist/schema/goal/planning.js +1 -1
  112. package/dist/schema/local/index.d.ts +39 -0
  113. package/dist/schema/local/index.js +1 -1
  114. package/dist/schema/operations.d.ts +20 -5
  115. package/dist/schema/operations.js +1 -1
  116. package/dist/schema/query/bi.d.ts +2 -0
  117. package/dist/schema/query/bi.js +1 -1
  118. package/dist/schema/query/index.d.ts +24 -12
  119. package/dist/schema/query/index.js +1 -1
  120. package/dist/schema/schema-version.d.ts +1 -1
  121. package/dist/schema/schema-version.js +1 -1
  122. package/dist/schema/workspace/index.d.ts +9 -0
  123. package/dist/schema/workspace/index.js +1 -1
  124. package/dist/schema-query-impl/index.js +1 -1
  125. package/dist/schemas/account_operation.output.json +28 -3
  126. package/dist/schemas/benchmark_migration_operation.schema.json +87 -0
  127. package/dist/schemas/goal_operation.schema.json +94 -0
  128. package/dist/schemas/index.json +1 -1
  129. package/dist/schemas/onchain_operations.output.json +1 -1
  130. package/dist/schemas/onchain_operations.schema.json +409 -119
  131. package/dist/schemas/onchain_operations_allocation.schema.json +290 -6
  132. package/dist/schemas/onchain_operations_arbitration.schema.json +2 -2
  133. package/dist/schemas/onchain_operations_contact.schema.json +2 -2
  134. package/dist/schemas/onchain_operations_demand.schema.json +3 -3
  135. package/dist/schemas/onchain_operations_gen_passport.schema.json +1 -1
  136. package/dist/schemas/onchain_operations_guard.schema.json +63 -63
  137. package/dist/schemas/onchain_operations_machine.schema.json +1 -1
  138. package/dist/schemas/onchain_operations_order.schema.json +2 -2
  139. package/dist/schemas/onchain_operations_progress.schema.json +7 -3
  140. package/dist/schemas/onchain_operations_proof.schema.json +1 -1
  141. package/dist/schemas/onchain_operations_repository.schema.json +2 -2
  142. package/dist/schemas/onchain_operations_reward.schema.json +8 -8
  143. package/dist/schemas/onchain_operations_service.schema.json +20 -18
  144. package/dist/schemas/onchain_operations_treasury.schema.json +7 -7
  145. package/dist/schemas/query_toolkit.output.json +67 -53
  146. package/dist/schemas/workflow_operation.schema.json +1 -1
  147. package/dist/schemas/workspace_operation.output.json +23 -3
  148. package/dist/schemas/workspace_operation.schema.json +3 -3
  149. package/dist/tools/handlers/benchmark-migration.js +1 -1
  150. package/dist/tools/handlers/config.js +1 -1
  151. package/dist/tools/handlers/file-export.js +1 -1
  152. package/dist/tools/handlers/industry-pack.d.ts +1 -0
  153. package/dist/tools/handlers/industry-pack.js +1 -1
  154. package/dist/tools/handlers/local.js +1 -1
  155. package/dist/tools/handlers/onchain.d.ts +24 -0
  156. package/dist/tools/handlers/onchain.js +1 -1
  157. package/dist/tools/handlers/query.js +1 -1
  158. package/dist/tools/handlers/review-chain.d.ts +1 -1
  159. package/dist/tools/handlers/review-chain.js +1 -1
  160. package/dist/tools/handlers/schema-query.js +1 -1
  161. package/dist/tools/handlers/workflow.js +1 -1
  162. package/dist/tools/handlers/workspace.js +1 -1
  163. package/dist/tools/registry/agent.js +1 -1
  164. package/dist/tools/registry/local.js +1 -1
  165. package/dist/tools/wip-deploy-assist.js +1 -1
  166. package/dist/tools/wrap.js +1 -1
  167. package/package.json +2 -2
@@ -1 +1 @@
1
- export const CORE_BUSINESS_MODULES=[{'id':'milestone_escrow','name':'Milestone\x20Escrow','description':'Funds\x20held\x20in\x20Order\x20and\x20released\x20per\x20milestone\x20completion.\x20Protects\x20both\x20merchant\x20and\x20user.','objectTypes':['service','machine','order','allocation'],'templateRefs':[{'template_id':'freelance-machine','object_type':'machine','purpose':'Milestone\x20workflow\x20with\x20accept/reject\x20nodes'},{'template_id':'milestone-allocation','object_type':'allocation','purpose':'Per-milestone\x20fund\x20release'}],'requiredConstraints':[{'constraint_id':'order_allocators_bound','description':'Order\x20must\x20have\x20allocators\x20bound\x20before\x20publish','level':'hard','blocking':!![]},{'constraint_id':'machine_published','description':'Machine\x20must\x20be\x20published\x20and\x20bound\x20to\x20Service','level':'hard','blocking':!![]},{'constraint_id':'milestone_forward_guarded','description':'Each\x20milestone\x20forward\x20must\x20have\x20a\x20guard','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'boost','description':'Escrow\x20ensures\x20funds\x20not\x20released\x20until\x20verification'},{'dimension':'escrow_quality','effect':'required','description':'Module\x20requires\x20proper\x20escrow\x20configuration'},{'dimension':'operational_risk','effect':'boost','description':'Milestones\x20reduce\x20single-point\x20delivery\x20risk'}],'industryFit':{'freelance':0x5f,'education':0x50,'rental':0x3c,'retail':0x28,'subscription':0x1e,'travel':0x32,'general':0x46},'addressesPainPoints':['Client\x20never\x20approves\x20deliverables','Merchant\x20delivers\x20but\x20cannot\x20get\x20paid','Full\x20upfront\x20payment\x20with\x20no\x20delivery\x20guarantee'],'userProtections':['Funds\x20held\x20in\x20escrow\x20until\x20milestone\x20verified','Can\x20reject\x20substandard\x20deliverables','Refund\x20for\x20unstarted\x20milestones'],'merchantObligations':['Must\x20deliver\x20each\x20milestone\x20to\x20defined\x20acceptance\x20criteria','Must\x20configure\x20Machine\x20with\x20proper\x20forward\x20guards'],'requiresKeeper':!![],'keeperHint':'Keeper\x20must\x20monitor\x20Machine\x20node\x20timeouts\x20and\x20trigger\x20adminUnhold\x20if\x20user\x20does\x20not\x20respond'},{'id':'independent_arbitration','name':'Independent\x20Arbitration','description':'Third-party\x20arbitration\x20with\x20Guard-weighted\x20voting.\x20Arbitration\x20Permission\x20MUST\x20differ\x20from\x20Service\x20Permission\x20(contract-enforced).','objectTypes':['arb','permission','guard'],'templateRefs':[{'template_id':'arbitration-3-voters','object_type':'arb','purpose':'3-voter\x20arbitration\x20with\x20weighted\x20voting'},{'template_id':'voting-guard-weighted','object_type':'guard','purpose':'Vote\x20weight\x20from\x20Guard\x20config'}],'requiredConstraints':[{'constraint_id':'arbitration_permission_independent','description':'Arbitration.permission\x20!=\x20Service.permission','level':'hard','blocking':!![]},{'constraint_id':'voting_guard_configured','description':'At\x20least\x20one\x20voting_guard\x20must\x20be\x20configured','level':'soft','blocking':![]},{'constraint_id':'arbitration_bound_to_service','description':'Arbitration\x20must\x20be\x20in\x20Service.arbitrations\x20list','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'arbitration_coverage','effect':'required','description':'Module\x20requires\x20arbitration\x20configuration'},{'dimension':'arbitration_fairness','effect':'required','description':'Independent\x20permission\x20ensures\x20neutrality'},{'dimension':'governance_risk','effect':'boost','description':'Reduces\x20platform-as-judge\x20risk'}],'industryFit':{'freelance':0x5a,'education':0x4b,'rental':0x55,'retail':0x4b,'subscription':0x3c,'travel':0x50,'general':0x46},'addressesPainPoints':['Platform\x20acts\x20as\x20both\x20judge\x20and\x20party','Arbitration\x20fees\x20too\x20high\x20for\x20small\x20claims','No\x20binding\x20dispute\x20resolution'],'userProtections':['Independent\x20arbitrators\x20(not\x20merchant\x20or\x20platform)','Guard-weighted\x20voting\x20prevents\x20Sybil\x20attacks','Micro-arbitration:\x20no\x20per-case\x20fees'],'merchantObligations':['Must\x20accept\x20arbitration\x20verdict','Must\x20maintain\x20compensation_fund\x20for\x20indemnities'],'requiresKeeper':![]},{'id':'wip_provenance','name':'WIP\x20Provenance','description':'Work-in-progress\x20hash\x20commitments\x20on-chain\x20via\x20Repository.\x20Prevents\x20tampering\x20of\x20delivery\x20evidence.','objectTypes':['repository','guard','proof'],'templateRefs':[{'template_id':'wip-hash-guard','object_type':'guard','purpose':'Verify\x20WIP\x20hash\x20matches\x20commitment'},{'template_id':'delivery-proof','object_type':'proof','purpose':'On-chain\x20delivery\x20confirmation'}],'requiredConstraints':[{'constraint_id':'repository_published','description':'Repository\x20must\x20be\x20published','level':'hard','blocking':!![]},{'constraint_id':'wip_hash_before_delivery','description':'WIP\x20hash\x20must\x20be\x20committed\x20before\x20delivery','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'proof_integrity','effect':'required','description':'WIP\x20hash\x20provides\x20tamper-proof\x20evidence'},{'dimension':'transparency','effect':'boost','description':'On-chain\x20commitment\x20is\x20publicly\x20verifiable'}],'industryFit':{'freelance':0x5a,'education':0x55,'rental':0x5f,'retail':0x46,'subscription':0x3c,'travel':0x46,'general':0x4b},'addressesPainPoints':['Evidence\x20stored\x20on\x20platform\x20servers\x20can\x20be\x20tampered','No\x20proof\x20of\x20pre-delivery\x20state\x20(e.g.\x20rental\x20condition)','Dispute\x20resolution\x20relies\x20on\x20trust\x20in\x20platform'],'userProtections':['WIP\x20hash\x20commitment\x20is\x20immutable\x20on-chain','Guard\x20automatically\x20verifies\x20hash\x20match','Repository\x20history\x20is\x20auditable'],'merchantObligations':['Must\x20commit\x20WIP\x20hash\x20at\x20defined\x20checkpoints','Must\x20use\x20Repository\x20for\x20evidence\x20storage'],'requiresKeeper':![]},{'id':'multi_tier_allocation','name':'Multi-Tier\x20Allocation','description':'Order\x20funds\x20automatically\x20split\x20among\x20multiple\x20recipients.\x20Fully\x20transparent\x20on-chain.','objectTypes':['allocation','treasury','payment'],'templateRefs':[{'template_id':'multi-tier-allocation','object_type':'allocation','purpose':'Waterfall\x20fund\x20distribution'},{'template_id':'supplier-waterfall','object_type':'allocation','purpose':'Supplier\x20payment\x20tiers'}],'requiredConstraints':[{'constraint_id':'allocators_configured','description':'Allocators\x20must\x20be\x20configured\x20with\x20recipients','level':'hard','blocking':!![]},{'constraint_id':'sharing_sum_100','description':'Allocation\x20percentages\x20must\x20sum\x20to\x20100%','level':'hard','blocking':!![]},{'constraint_id':'platform_fee_zero','description':'Platform\x20fee\x20should\x20be\x200\x20or\x20user-defined','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fee_transparency','effect':'required','description':'All\x20allocations\x20visible\x20on-chain'},{'dimension':'supplier_visibility','effect':'boost','description':'Supplier\x20payments\x20are\x20auditable'}],'industryFit':{'freelance':0x3c,'education':0x32,'rental':0x28,'retail':0x50,'subscription':0x46,'travel':0x5f,'general':0x46},'addressesPainPoints':['Multi-layer\x20commission\x20hidden\x20from\x20users','Suppliers\x20paid\x20opaquely','Platform\x20takes\x20undisclosed\x20FX\x20spread'],'userProtections':['Full\x20allocation\x20waterfall\x20visible\x20on-chain','No\x20hidden\x20fees','Can\x20verify\x20supplier\x20payments'],'merchantObligations':['Must\x20declare\x20all\x20allocation\x20recipients\x20upfront','Cannot\x20change\x20allocation\x20after\x20publish'],'requiresKeeper':![]},{'id':'subscription_with_proof','name':'Subscription\x20with\x20Delivery\x20Proof','description':'Each\x20billing\x20cycle\x20requires\x20proof\x20of\x20content\x20delivery\x20before\x20charging.\x20Prevents\x20creator\x20abandonment.','objectTypes':['service','guard','repository','progress'],'templateRefs':[{'template_id':'subscription-machine','object_type':'machine','purpose':'Cycle-based\x20workflow'},{'template_id':'delivery-guard-cycle','object_type':'guard','purpose':'Verify\x20content\x20delivery\x20per\x20cycle'}],'requiredConstraints':[{'constraint_id':'delivery_guard_per_cycle','description':'Each\x20cycle\x20must\x20have\x20a\x20delivery\x20guard','level':'hard','blocking':!![]},{'constraint_id':'repository_updated','description':'Repository\x20must\x20be\x20updated\x20with\x20cycle\x20content\x20hash','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'content_commitment','effect':'required','description':'Delivery\x20proof\x20required\x20before\x20each\x20charge'},{'dimension':'timeout_protection','effect':'boost','description':'Cycles\x20enforce\x20regular\x20delivery'}],'industryFit':{'freelance':0x28,'education':0x55,'rental':0x1e,'retail':0x14,'subscription':0x62,'travel':0x1e,'general':0x32},'addressesPainPoints':['Creator\x20abandons\x20after\x20collecting\x20subscriptions','Silent\x20auto-renewal\x20with\x20no\x20delivery\x20proof','No\x20mechanism\x20to\x20hold\x20creators\x20accountable'],'userProtections':['Payment\x20only\x20after\x20delivery\x20proof\x20verified','Can\x20cancel\x20if\x20delivery\x20guard\x20fails','Cycle\x20history\x20on-chain'],'merchantObligations':['Must\x20deliver\x20content\x20and\x20commit\x20hash\x20each\x20cycle','Must\x20configure\x20delivery_guard\x20per\x20cycle'],'requiresKeeper':!![],'keeperHint':'Keeper\x20triggers\x20cycle\x20transitions\x20and\x20verifies\x20delivery_guard\x20conditions'},{'id':'accept_timeout_protection','name':'Accept\x20Timeout\x20Protection','description':'If\x20user\x20does\x20not\x20accept/reject\x20within\x20N\x20days,\x20auto-accept\x20advances\x20the\x20Machine.\x20Protects\x20merchant\x20from\x20indefinite\x20stalls.','objectTypes':['machine','guard'],'templateRefs':[{'template_id':'timeout-forward','object_type':'machine','purpose':'Forward\x20with\x20time_guard\x20+\x20adminUnhold\x20fallback'}],'requiredConstraints':[{'constraint_id':'time_guard_configured','description':'time_guard\x20must\x20be\x20set\x20on\x20accept\x20forward','level':'hard','blocking':!![]},{'constraint_id':'adminUnhold_permission','description':'Admin\x20must\x20have\x20PROGRESS_UNHOLD\x20(224)\x20permission','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'timeout_protection','effect':'required','description':'Auto-advance\x20prevents\x20indefinite\x20user\x20stalls'},{'dimension':'operational_risk','effect':'boost','description':'Reduces\x20delivery\x20timeline\x20uncertainty'}],'industryFit':{'freelance':0x5f,'education':0x46,'rental':0x50,'retail':0x3c,'subscription':0x28,'travel':0x3c,'general':0x4b},'addressesPainPoints':['Buyer\x20never\x20approves\x20deliverables\x20(common\x20on\x20incumbent\x20talent\x20marketplaces)','Merchant\x20cash\x20flow\x20blocked\x20by\x20inactive\x20buyer','Infinite\x20revision\x20loops\x20without\x20resolution'],'userProtections':['Still\x20has\x20full\x20N\x20days\x20to\x20review\x20and\x20reject','Rejection\x20triggers\x20arbitration\x20if\x20configured'],'merchantObligations':['Must\x20configure\x20time_guard\x20on\x20forward','Timeout\x20value\x20comes\x20from\x20the\x20template\x27s\x20window\x20fee_params\x20(e.g.\x20escrow_release_days;\x20override\x20per\x20build\x20via\x20fee_overrides)\x20—\x20never\x20a\x20hardcoded\x20number'],'requiresKeeper':!![],'keeperHint':'Keeper\x20monitors\x20time_guard\x20deadlines\x20and\x20advances\x20the\x20timeout\x20forward\x20when\x20the\x20window\x20elapses\x20(adminUnhold\x20is\x20only\x20the\x20hold-release\x20escape\x20hatch,\x20never\x20the\x20timeout\x20path)'},{'id':'refund_guarantee','name':'Refund\x20Guarantee','description':'Service\x20maintains\x20compensation_fund\x20for\x20refunds.\x20Refund_guard\x20validates\x20eligibility\x20and\x20transfers\x20funds\x20back\x20to\x20Order.','objectTypes':['service','guard','order'],'templateRefs':[{'template_id':'refund-guard','object_type':'guard','purpose':'Validate\x20refund\x20eligibility'}],'requiredConstraints':[{'constraint_id':'compensation_fund_positive','description':'compensation_fund_add\x20>\x200','level':'hard','blocking':!![]},{'constraint_id':'refund_guard_configured','description':'Service\x20must\x20have\x20refund_guard','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'boost','description':'Compensation\x20fund\x20backs\x20refund\x20promise'},{'dimension':'consumer_diligence','effect':'boost','description':'Shows\x20merchant\x20confidence\x20in\x20service\x20quality'}],'industryFit':{'freelance':0x46,'education':0x55,'rental':0x5a,'retail':0x5f,'subscription':0x50,'travel':0x55,'general':0x50},'addressesPainPoints':['Refund\x20trapped\x20in\x20incumbent\x20platform\x20balance','No\x20refund\x20mechanism\x20for\x20service\x20failure','Refund\x20decision\x20centralized\x20at\x20platform'],'userProtections':['Refund\x20goes\x20back\x20to\x20Order\x20(not\x20platform\x20balance)','Guard\x20validates\x20eligibility\x20(not\x20platform\x20discretion)','Compensation\x20fund\x20guarantees\x20liquidity'],'merchantObligations':['Must\x20maintain\x20compensation_fund\x20>\x200','Must\x20configure\x20refund_guard\x20rules'],'requiresKeeper':![]},{'id':'reputation_on_chain','name':'On-Chain\x20Reputation','description':'Merchant\x20and\x20user\x20behavior\x20permanently\x20recorded\x20on\x20Registrar.\x20Evaluations,\x20completions,\x20and\x20disputes\x20contribute\x20to\x20reputation\x20score.','objectTypes':['service','order','arb'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'service_published','description':'Service\x20must\x20be\x20published\x20to\x20accumulate\x20reputation','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'reputation_verifiability','effect':'required','description':'On-chain\x20history\x20is\x20tamper-proof'},{'dimension':'trust','effect':'boost','description':'Reputation\x20signals\x20reduce\x20information\x20asymmetry'}],'industryFit':{'freelance':0x5a,'education':0x50,'rental':0x55,'retail':0x5a,'subscription':0x55,'travel':0x50,'general':0x55},'addressesPainPoints':['Fake\x20reviews\x20and\x20rating\x20manipulation','No\x20cross-platform\x20reputation\x20portability','Platform\x20can\x20delete\x20negative\x20reviews'],'userProtections':['Reputation\x20is\x20on-chain\x20and\x20immutable','Can\x20verify\x20merchant\x27s\x20complete\x20transaction\x20history','Dispute\x20outcomes\x20affect\x20reputation\x20permanently'],'merchantObligations':['All\x20service\x20interactions\x20become\x20part\x20of\x20permanent\x20record','Cannot\x20hide\x20negative\x20outcomes'],'requiresKeeper':![]},{'id':'supplier_collaboration','name':'Supplier\x20Collaboration','description':'Enable\x20merchant\x20to\x20delegate\x20sub-services\x20to\x20suppliers\x20with\x20transparent\x20payment\x20splitting.\x20No\x20platform\x20intermediary.','objectTypes':['service','allocation','demand'],'templateRefs':[{'template_id':'supplier-demand','object_type':'demand','purpose':'Create\x20sub-service\x20demand\x20for\x20suppliers'},{'template_id':'supplier-allocation','object_type':'allocation','purpose':'Split\x20order\x20payment\x20with\x20suppliers'}],'requiredConstraints':[{'constraint_id':'demand_configured','description':'Demand\x20must\x20reference\x20main\x20Service','level':'soft','blocking':![]},{'constraint_id':'allocation_sharing_configured','description':'Allocation\x20sharing\x20must\x20include\x20suppliers','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'supplier_visibility','effect':'required','description':'Supplier\x20payments\x20transparent\x20on-chain'},{'dimension':'governance_risk','effect':'boost','description':'No\x20platform\x20controls\x20supplier\x20relationships'}],'industryFit':{'freelance':0x3c,'education':0x46,'rental':0x28,'retail':0x55,'subscription':0x32,'travel':0x5a,'general':0x3c},'addressesPainPoints':['Supplier\x20payments\x20opaque\x20to\x20end\x20user','Platform\x20controls\x20supplier\x20relationships','No\x20direct\x20merchant-supplier\x20collaboration'],'userProtections':['Can\x20see\x20all\x20suppliers\x20involved\x20in\x20service','Supplier\x20payments\x20are\x20on-chain\x20auditable','Merchant\x20remains\x20accountable\x20for\x20supplier\x20quality'],'merchantObligations':['Must\x20declare\x20all\x20suppliers\x20upfront','Must\x20ensure\x20supplier\x20deliverables\x20meet\x20criteria'],'requiresKeeper':![]},{'id':'damage_attestation','name':'Damage\x20Attestation','description':'Rental-specific:\x20pre/post\x20condition\x20photos\x20hashed\x20to\x20Repository.\x20Guard\x20compares\x20hashes\x20to\x20automatically\x20enforce\x20damage\x20deductions.','objectTypes':['repository','guard','service'],'templateRefs':[{'template_id':'rental-condition-guard','object_type':'guard','purpose':'Compare\x20pre/post\x20rental\x20condition\x20hashes'},{'template_id':'condition-repository','object_type':'repository','purpose':'Store\x20rental\x20condition\x20evidence'}],'requiredConstraints':[{'constraint_id':'pre_rental_hash','description':'Pre-rental\x20condition\x20hash\x20must\x20be\x20committed','level':'hard','blocking':!![]},{'constraint_id':'post_rental_hash','description':'Post-rental\x20condition\x20hash\x20must\x20be\x20committed','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'proof_integrity','effect':'required','description':'Condition\x20hashes\x20prevent\x20tampering'},{'dimension':'arbitration_fairness','effect':'boost','description':'Objective\x20evidence\x20reduces\x20dispute\x20bias'}],'industryFit':{'freelance':0x14,'education':0x1e,'rental':0x62,'retail':0x28,'subscription':0x14,'travel':0x3c,'general':0x28},'addressesPainPoints':['Landlord\x20claims\x20damage\x20without\x20proof\x20(common\x20on\x20incumbent\x20short-stay\x20platforms)','No\x20mandatory\x20pre-rental\x20photo\x20(vehicle-rental\x20damage\x20claims\x20denied)','Platform\x20arbitrates\x20damage\x20disputes\x20opaquely'],'userProtections':['Pre-rental\x20hash\x20commits\x20baseline\x20condition','Guard\x20automatically\x20compares\x20post-rental\x20state','Cannot\x20be\x20charged\x20for\x20pre-existing\x20damage'],'merchantObligations':['Must\x20commit\x20pre-rental\x20condition\x20hash','Must\x20commit\x20post-rental\x20condition\x20hash','Must\x20use\x20Repository\x20for\x20evidence\x20storage'],'requiresKeeper':!![],'keeperHint':'Keeper\x20triggers\x20post-rental\x20hash\x20collection\x20and\x20initiates\x20damage\x20Guard\x20comparison'},{'id':'discount_lifecycle','name':'Discount\x20Lifecycle','description':'Coupon\x20promotions\x20bound\x20to\x20a\x20Service\x20(percentage\x20or\x20fixed-amount\x20off):\x20minted\x20to\x20recipients,\x20redeemed\x20automatically\x20at\x20buy,\x20burned\x20on\x20use.\x20Chain\x20truth:\x20a\x20redeemed\x20coupon\x27s\x20balance\x20decrements\x20PERMANENTLY\x20(no\x20restock,\x20no\x20revert),\x20and\x20standing\x20renewal\x20discounts\x20are\x20NOT\x20constructible\x20(the\x20renew\x20path\x20has\x20no\x20discount\x20hook\x20—\x20every\x20renewal\x20re-prices\x20from\x20the\x20SKU\x20price).','objectTypes':['service'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'discount_budget_planned','description':'Total\x20discount\x20budget\x20(max_uses\x20x\x20discount_value)\x20planned\x20before\x20minting\x20—\x20the\x20burn\x20is\x20irreversible','level':'hard','blocking':!![]},{'constraint_id':'discount_burn_disclosed','description':'Burn-on-use\x20semantics\x20(permanent\x20decrement,\x20no\x20revert)\x20disclosed\x20in\x20the\x20promotion\x20terms','level':'hard','blocking':!![]},{'constraint_id':'discount_renewal_disclosed','description':'\x27First\x20period\x20X%\x20off,\x20then\x20standard\x27\x20disclosed\x20in\x20the\x20listing/WIP\x20BEFORE\x20purchase\x20(renewals\x20re-price\x20from\x20the\x20SKU\x20price\x20—\x20anti-dark-pattern)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'promotion_integrity','effect':'required','description':'Coupon\x20budget\x20and\x20burn\x20semantics\x20are\x20planned\x20and\x20disclosed,\x20never\x20improvised'},{'dimension':'fee_transparency','effect':'boost','description':'The\x20discounted\x20price\x20at\x20redemption\x20is\x20computed\x20by\x20the\x20chain,\x20not\x20asserted\x20by\x20prose'}],'industryFit':{'freelance':0x2d,'education':0x46,'rental':0x32,'retail':0x5f,'subscription':0x55,'travel':0x50,'general':0x46},'addressesPainPoints':['Coupon\x20systems\x20locked\x20inside\x20incumbent\x20platforms','Promotions\x20improvised\x20after\x20publish\x20with\x20no\x20budget\x20plan','Discount\x20promises\x20that\x20silently\x20change\x20at\x20renewal'],'userProtections':['Redemption\x20is\x20computed\x20on-chain\x20at\x20buy\x20(no\x20manual\x20discount\x20approval)','Renewal\x20price\x20is\x20the\x20SKU\x20price\x20—\x20a\x20first-period\x20coupon\x20cannot\x20silently\x20renew\x20at\x20the\x20discounted\x20price','Expired\x20coupons\x20cannot\x20redeem'],'merchantObligations':['Plan\x20the\x20total\x20discount\x20budget\x20(max_uses\x20x\x20value)\x20before\x20minting','Disclose\x20burn-on-use\x20and\x20renewal\x20re-pricing\x20in\x20the\x20promotion\x20terms','Never\x20promise\x20a\x20standing\x20renewal\x20discount\x20(not\x20constructible\x20on-chain)'],'requiresKeeper':![]},{'id':'praise_incentive','name':'Review\x20Praise\x20Incentive','description':'Sale-time-planned\x20claim\x20Reward\x20for\x20buyer\x20reviews\x20(template\x20review_mode\x20\x27review_reward\x27):\x20the\x20build\x20emits\x20the\x20Reward\x20object,\x20attaches\x20the\x20replay-armed\x20claim\x20guard,\x20binds\x20it\x20to\x20the\x20Service,\x20and\x20funds\x20it\x20via\x20the\x20reward_funding\x20input\x20—\x20so\x20the\x20incentive\x20is\x20perceivable\x20by\x20the\x20buyer\x20BEFORE\x20ordering,\x20and\x20an\x20unfunded\x20or\x20unguarded\x20incentive\x20promise\x20must\x20not\x20publish.','objectTypes':['service','reward','guard'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'reward_pool_funded','description':'reward_funding\x20input\x20present\x20at\x20build\x20(an\x20unfunded\x20incentive\x20promise\x20must\x20not\x20publish)','level':'hard','blocking':!![]},{'constraint_id':'reward_claim_replay_armed','description':'Claim\x20guard\x20carries\x20the\x20record-gate\x20idempotency\x20leg\x20(replay-drain\x20target\x20otherwise)','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'trust','effect':'boost','description':'Funded,\x20perceivable\x20review\x20incentives\x20raise\x20honest\x20review\x20volume'},{'dimension':'promotion_integrity','effect':'required','description':'Incentive\x20terms\x20are\x20chain-enforced\x20(funded\x20pool\x20+\x20guarded\x20claim),\x20not\x20prose\x20promises'}],'industryFit':{'freelance':0x4b,'education':0x41,'rental':0x2d,'retail':0x55,'subscription':0x4b,'travel':0x41,'general':0x41},'addressesPainPoints':['No\x20mechanism\x20to\x20incentivize\x20honest\x20buyer\x20reviews','Review\x20rewards\x20locked\x20inside\x20incumbent\x20platforms','Incentive\x20promises\x20that\x20evaporate\x20after\x20purchase'],'userProtections':['Incentive\x20perceivable\x20BEFORE\x20ordering\x20(funded\x20at\x20build,\x20not\x20after)','Claim\x20terms\x20chain-enforced\x20with\x20replay\x20protection','Rating\x20polarity\x20recorded\x20as\x20range-queryable\x20on-chain\x20rows\x20(1-5\x20rating\x20column)'],'merchantObligations':['Fund\x20the\x20reward\x20pool\x20at\x20build\x20time\x20(reward_funding)','Keep\x20the\x20claim\x20guard\x20replay-armed\x20(record-gate\x20leg)','Disclose\x20claim\x20terms\x20in\x20the\x20listing/WIP\x20promise'],'requiresKeeper':![]}];export function getBusinessModule(a){return CORE_BUSINESS_MODULES['find'](b=>b['id']===a);}export function getModulesForIndustry(a){return[...CORE_BUSINESS_MODULES]['sort']((c,d)=>(d['industryFit'][a]??0x0)-(c['industryFit'][a]??0x0));}export function recommendModules(a,b,c){const d=c?.['minFit']??0x32,e=c?.['maxModules']??0x5,f=CORE_BUSINESS_MODULES['map'](g=>{let h=g['industryFit'][a]??0x32;const i=b['toLowerCase']();for(const j of g['addressesPainPoints']){const k=j['toLowerCase']()['split'](/\s+/),l=k['filter'](n=>i['includes'](n))['length'];h+=l*0x5;}return{'module':g,'score':Math['min'](h,0x64)};});return f['filter'](g=>g['score']>=d)['sort']((g,h)=>h['score']-g['score'])['slice'](0x0,e)['map'](g=>g['module']);}export function checkModuleConstraints(a,b){const c=a['requiredConstraints']['filter'](f=>f['blocking']&&!b['has'](f['constraint_id']))['map'](f=>f['constraint_id']),d=c['length']===0x0,e=a['evaluationImpact']['filter'](f=>f['effect']==='boost'||f['effect']==='required')['reduce']((f,g)=>f+(g['effect']==='required'?0xf:0x8),0x0);return{'module':a['id'],'adopted':d,'reason':d?undefined:'Missing\x20required\x20constraints:\x20'+c['join'](',\x20'),'missingConstraints':c['length']>0x0?c:undefined,'estimatedScoreBoost':Math['min'](e,0x64)};}export function calculateModuleScoreBoost(a){const b={};for(const c of a){for(const d of c['evaluationImpact']){const e=d['effect']==='required'?0xf:d['effect']==='boost'?0x8:0x3;b[d['dimension']]=(b[d['dimension']]??0x0)+e;}}return b;}
1
+ export const CORE_BUSINESS_MODULES=[{'id':'milestone_escrow','name':'Milestone\x20Escrow','description':'Funds\x20held\x20in\x20Order\x20and\x20released\x20per\x20milestone\x20completion.\x20Protects\x20both\x20merchant\x20and\x20user.','objectTypes':['service','machine','order','allocation'],'templateRefs':[{'template_id':'freelance-machine','object_type':'machine','purpose':'Milestone\x20workflow\x20with\x20accept/reject\x20nodes'},{'template_id':'milestone-allocation','object_type':'allocation','purpose':'Per-milestone\x20fund\x20release'}],'requiredConstraints':[{'constraint_id':'order_allocators_bound','description':'Order\x20must\x20have\x20allocators\x20bound\x20before\x20publish','level':'hard','blocking':!![]},{'constraint_id':'machine_published','description':'Machine\x20must\x20be\x20published\x20and\x20bound\x20to\x20Service','level':'hard','blocking':!![]},{'constraint_id':'milestone_forward_guarded','description':'Each\x20milestone\x20forward\x20must\x20have\x20a\x20guard','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'boost','description':'Escrow\x20ensures\x20funds\x20not\x20released\x20until\x20verification'},{'dimension':'escrow_quality','effect':'required','description':'Module\x20requires\x20proper\x20escrow\x20configuration'},{'dimension':'operational_risk','effect':'boost','description':'Milestones\x20reduce\x20single-point\x20delivery\x20risk'}],'industryFit':{'freelance':0x5f,'education':0x50,'rental':0x3c,'retail':0x28,'subscription':0x1e,'travel':0x32,'licensing':0x55,'crowdfunding':0x55,'general':0x46},'addressesPainPoints':['Client\x20never\x20approves\x20deliverables','Merchant\x20delivers\x20but\x20cannot\x20get\x20paid','Full\x20upfront\x20payment\x20with\x20no\x20delivery\x20guarantee'],'intentSignals':[/milestone/i,/escrow/i,/pay(ment)? (per|on|at|upon) (each )?(milestone|stage|delivery|approval)/i,/staged? (payment|release)/i,/progress payment/i,/hold funds until/i],'userProtections':['Funds\x20held\x20in\x20escrow\x20until\x20milestone\x20verified','Can\x20reject\x20substandard\x20deliverables','Refund\x20for\x20unstarted\x20milestones'],'merchantObligations':['Must\x20deliver\x20each\x20milestone\x20to\x20defined\x20acceptance\x20criteria','Must\x20configure\x20Machine\x20with\x20proper\x20forward\x20guards'],'requiresKeeper':!![],'keeperHint':'Keeper\x20must\x20monitor\x20Machine\x20node\x20timeouts\x20and\x20trigger\x20adminUnhold\x20if\x20user\x20does\x20not\x20respond'},{'id':'independent_arbitration','name':'Independent\x20Arbitration','description':'Third-party\x20arbitration\x20with\x20Guard-weighted\x20voting.\x20Arbitration\x20Permission\x20MUST\x20differ\x20from\x20Service\x20Permission\x20(contract-enforced).','objectTypes':['arb','permission','guard'],'templateRefs':[{'template_id':'arbitration-3-voters','object_type':'arb','purpose':'3-voter\x20arbitration\x20with\x20weighted\x20voting'},{'template_id':'voting-guard-weighted','object_type':'guard','purpose':'Vote\x20weight\x20from\x20Guard\x20config'}],'requiredConstraints':[{'constraint_id':'arbitration_permission_independent','description':'Arbitration.permission\x20!=\x20Service.permission','level':'hard','blocking':!![]},{'constraint_id':'voting_guard_configured','description':'At\x20least\x20one\x20voting_guard\x20must\x20be\x20configured','level':'soft','blocking':![]},{'constraint_id':'arbitration_bound_to_service','description':'Arbitration\x20must\x20be\x20in\x20Service.arbitrations\x20list','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'arbitration_coverage','effect':'required','description':'Module\x20requires\x20arbitration\x20configuration'},{'dimension':'arbitration_fairness','effect':'required','description':'Independent\x20permission\x20ensures\x20neutrality'},{'dimension':'governance_risk','effect':'boost','description':'Reduces\x20platform-as-judge\x20risk'}],'industryFit':{'freelance':0x5a,'education':0x4b,'rental':0x55,'retail':0x4b,'subscription':0x3c,'travel':0x50,'licensing':0x5a,'crowdfunding':0x50,'general':0x46},'addressesPainPoints':['Platform\x20acts\x20as\x20both\x20judge\x20and\x20party','Arbitration\x20fees\x20too\x20high\x20for\x20small\x20claims','No\x20binding\x20dispute\x20resolution'],'intentSignals':[/arbitrat/i,/dispute/i,/mediat/i,/third[ -]?party (resolution|judgement|judgment|venue)/i,/voting/i,/ruling/i,/appeal/i],'userProtections':['Independent\x20arbitrators\x20(not\x20merchant\x20or\x20platform)','Guard-weighted\x20voting\x20prevents\x20Sybil\x20attacks','Micro-arbitration:\x20no\x20per-case\x20fees'],'merchantObligations':['Must\x20accept\x20arbitration\x20verdict','Must\x20maintain\x20compensation_fund\x20for\x20indemnities'],'requiresKeeper':![]},{'id':'wip_provenance','name':'WIP\x20Provenance','description':'Work-in-progress\x20hash\x20commitments\x20on-chain\x20via\x20Repository.\x20Prevents\x20tampering\x20of\x20delivery\x20evidence.','objectTypes':['repository','guard','proof'],'templateRefs':[{'template_id':'wip-hash-guard','object_type':'guard','purpose':'Verify\x20WIP\x20hash\x20matches\x20commitment'},{'template_id':'delivery-proof','object_type':'proof','purpose':'On-chain\x20delivery\x20confirmation'}],'requiredConstraints':[{'constraint_id':'repository_published','description':'Repository\x20must\x20be\x20published','level':'hard','blocking':!![]},{'constraint_id':'wip_hash_before_delivery','description':'WIP\x20hash\x20must\x20be\x20committed\x20before\x20delivery','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'proof_integrity','effect':'required','description':'WIP\x20hash\x20provides\x20tamper-proof\x20evidence'},{'dimension':'transparency','effect':'boost','description':'On-chain\x20commitment\x20is\x20publicly\x20verifiable'}],'industryFit':{'freelance':0x5a,'education':0x55,'rental':0x5f,'retail':0x46,'subscription':0x3c,'travel':0x46,'licensing':0x5f,'crowdfunding':0x55,'general':0x4b},'addressesPainPoints':['Evidence\x20stored\x20on\x20platform\x20servers\x20can\x20be\x20tampered','No\x20proof\x20of\x20pre-delivery\x20state\x20(e.g.\x20rental\x20condition)','Dispute\x20resolution\x20relies\x20on\x20trust\x20in\x20platform'],'intentSignals':[/\bwip\b/i,/work[ -]?in[ -]?progress/i,/\bhash\b/i,/evidence/i,/tamper/i,/proof of (work|progress|delivery)/i],'userProtections':['WIP\x20hash\x20commitment\x20is\x20immutable\x20on-chain','Guard\x20automatically\x20verifies\x20hash\x20match','Repository\x20history\x20is\x20auditable'],'merchantObligations':['Must\x20commit\x20WIP\x20hash\x20at\x20defined\x20checkpoints','Must\x20use\x20Repository\x20for\x20evidence\x20storage'],'requiresKeeper':![]},{'id':'multi_tier_allocation','name':'Multi-Tier\x20Allocation','description':'Order\x20funds\x20automatically\x20split\x20among\x20multiple\x20recipients.\x20Fully\x20transparent\x20on-chain.','objectTypes':['allocation','treasury','payment'],'templateRefs':[{'template_id':'multi-tier-allocation','object_type':'allocation','purpose':'Waterfall\x20fund\x20distribution'},{'template_id':'supplier-waterfall','object_type':'allocation','purpose':'Supplier\x20payment\x20tiers'}],'requiredConstraints':[{'constraint_id':'allocators_configured','description':'Allocators\x20must\x20be\x20configured\x20with\x20recipients','level':'hard','blocking':!![]},{'constraint_id':'sharing_sum_100','description':'Allocation\x20percentages\x20must\x20sum\x20to\x20100%','level':'hard','blocking':!![]},{'constraint_id':'platform_fee_zero','description':'Platform\x20fee\x20should\x20be\x200\x20or\x20user-defined','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fee_transparency','effect':'required','description':'All\x20allocations\x20visible\x20on-chain'},{'dimension':'supplier_visibility','effect':'boost','description':'Supplier\x20payments\x20are\x20auditable'}],'industryFit':{'freelance':0x3c,'education':0x32,'rental':0x28,'retail':0x50,'subscription':0x46,'travel':0x5f,'licensing':0x62,'crowdfunding':0x50,'general':0x46},'addressesPainPoints':['Multi-layer\x20commission\x20hidden\x20from\x20users','Suppliers\x20paid\x20opaquely','Platform\x20takes\x20undisclosed\x20FX\x20spread'],'intentSignals':[/multi[ -]?tier/i,/waterfall/i,/\bsplit/i,/divide/i,/distribut/i,/tiered payout/i],'userProtections':['Full\x20allocation\x20waterfall\x20visible\x20on-chain','No\x20hidden\x20fees','Can\x20verify\x20supplier\x20payments'],'merchantObligations':['Must\x20declare\x20all\x20allocation\x20recipients\x20upfront','Cannot\x20change\x20allocation\x20after\x20publish'],'requiresKeeper':![]},{'id':'subscription_with_proof','name':'Subscription\x20with\x20Delivery\x20Proof','description':'Each\x20billing\x20cycle\x20requires\x20proof\x20of\x20content\x20delivery\x20before\x20charging.\x20Prevents\x20creator\x20abandonment.','objectTypes':['service','guard','repository','progress'],'templateRefs':[{'template_id':'subscription-machine','object_type':'machine','purpose':'Cycle-based\x20workflow'},{'template_id':'delivery-guard-cycle','object_type':'guard','purpose':'Verify\x20content\x20delivery\x20per\x20cycle'}],'requiredConstraints':[{'constraint_id':'delivery_guard_per_cycle','description':'Each\x20cycle\x20must\x20have\x20a\x20delivery\x20guard','level':'hard','blocking':!![]},{'constraint_id':'repository_updated','description':'Repository\x20must\x20be\x20updated\x20with\x20cycle\x20content\x20hash','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'content_commitment','effect':'required','description':'Delivery\x20proof\x20required\x20before\x20each\x20charge'},{'dimension':'timeout_protection','effect':'boost','description':'Cycles\x20enforce\x20regular\x20delivery'}],'industryFit':{'freelance':0x28,'education':0x55,'rental':0x1e,'retail':0x14,'subscription':0x62,'travel':0x1e,'licensing':0x28,'crowdfunding':0x19,'general':0x32},'addressesPainPoints':['Creator\x20abandons\x20after\x20collecting\x20subscriptions','Silent\x20auto-renewal\x20with\x20no\x20delivery\x20proof','No\x20mechanism\x20to\x20hold\x20creators\x20accountable'],'intentSignals':[/subscri/i,/recurring/i,/billing cycle/i,/auto[ -]?renew/i,/renewal/i,/membership/i],'userProtections':['Payment\x20only\x20after\x20delivery\x20proof\x20verified','Can\x20cancel\x20if\x20delivery\x20guard\x20fails','Cycle\x20history\x20on-chain'],'merchantObligations':['Must\x20deliver\x20content\x20and\x20commit\x20hash\x20each\x20cycle','Must\x20configure\x20delivery_guard\x20per\x20cycle'],'requiresKeeper':!![],'keeperHint':'Keeper\x20triggers\x20cycle\x20transitions\x20and\x20verifies\x20delivery_guard\x20conditions'},{'id':'accept_timeout_protection','name':'Accept\x20Timeout\x20Protection','description':'If\x20user\x20does\x20not\x20accept/reject\x20within\x20N\x20days,\x20auto-accept\x20advances\x20the\x20Machine.\x20Protects\x20merchant\x20from\x20indefinite\x20stalls.','objectTypes':['machine','guard'],'templateRefs':[{'template_id':'timeout-forward','object_type':'machine','purpose':'Forward\x20with\x20time_guard\x20+\x20adminUnhold\x20fallback'}],'requiredConstraints':[{'constraint_id':'time_guard_configured','description':'time_guard\x20must\x20be\x20set\x20on\x20accept\x20forward','level':'hard','blocking':!![]},{'constraint_id':'adminUnhold_permission','description':'Admin\x20must\x20have\x20PROGRESS_UNHOLD\x20(224)\x20permission','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'timeout_protection','effect':'required','description':'Auto-advance\x20prevents\x20indefinite\x20user\x20stalls'},{'dimension':'operational_risk','effect':'boost','description':'Reduces\x20delivery\x20timeline\x20uncertainty'}],'industryFit':{'freelance':0x5f,'education':0x46,'rental':0x50,'retail':0x3c,'subscription':0x28,'travel':0x3c,'licensing':0x55,'crowdfunding':0x46,'general':0x4b},'addressesPainPoints':['Buyer\x20never\x20approves\x20deliverables\x20(common\x20on\x20incumbent\x20talent\x20marketplaces)','Merchant\x20cash\x20flow\x20blocked\x20by\x20inactive\x20buyer','Infinite\x20revision\x20loops\x20without\x20resolution'],'intentSignals':[/timeout/i,/time[ -]?out/i,/auto[ -]?accept/i,/never (approves?|responds?|accepts?)/i,/unresponsive/i,/inactive (buyer|client)/i,/\bstall/i,/\bdeadline\b/i],'userProtections':['Still\x20has\x20full\x20N\x20days\x20to\x20review\x20and\x20reject','Rejection\x20triggers\x20arbitration\x20if\x20configured'],'merchantObligations':['Must\x20configure\x20time_guard\x20on\x20forward','Timeout\x20value\x20comes\x20from\x20the\x20template\x27s\x20window\x20fee_params\x20(e.g.\x20escrow_release_days;\x20override\x20per\x20build\x20via\x20fee_overrides)\x20—\x20never\x20a\x20hardcoded\x20number'],'requiresKeeper':!![],'keeperHint':'Keeper\x20monitors\x20time_guard\x20deadlines\x20and\x20advances\x20the\x20timeout\x20forward\x20when\x20the\x20window\x20elapses\x20(adminUnhold\x20is\x20only\x20the\x20hold-release\x20escape\x20hatch,\x20never\x20the\x20timeout\x20path)'},{'id':'refund_guarantee','name':'Refund\x20Guarantee','description':'Service\x20maintains\x20compensation_fund\x20for\x20refunds.\x20Refund_guard\x20validates\x20eligibility\x20and\x20transfers\x20funds\x20back\x20to\x20Order.','objectTypes':['service','guard','order'],'templateRefs':[{'template_id':'refund-guard','object_type':'guard','purpose':'Validate\x20refund\x20eligibility'}],'requiredConstraints':[{'constraint_id':'compensation_fund_positive','description':'compensation_fund_add\x20>\x200','level':'hard','blocking':!![]},{'constraint_id':'refund_guard_configured','description':'Service\x20must\x20have\x20refund_guard','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'boost','description':'Compensation\x20fund\x20backs\x20refund\x20promise'},{'dimension':'consumer_diligence','effect':'boost','description':'Shows\x20merchant\x20confidence\x20in\x20service\x20quality'}],'industryFit':{'freelance':0x46,'education':0x55,'rental':0x5a,'retail':0x5f,'subscription':0x50,'travel':0x55,'licensing':0x4b,'crowdfunding':0x5f,'general':0x50},'addressesPainPoints':['Refund\x20trapped\x20in\x20incumbent\x20platform\x20balance','No\x20refund\x20mechanism\x20for\x20service\x20failure','Refund\x20decision\x20centralized\x20at\x20platform'],'intentSignals':[/refund/i,/money[ -]?back/i,/guarantee/i],'userProtections':['Refund\x20goes\x20back\x20to\x20Order\x20(not\x20platform\x20balance)','Guard\x20validates\x20eligibility\x20(not\x20platform\x20discretion)','Compensation\x20fund\x20guarantees\x20liquidity'],'merchantObligations':['Must\x20maintain\x20compensation_fund\x20>\x200','Must\x20configure\x20refund_guard\x20rules'],'requiresKeeper':![]},{'id':'reputation_on_chain','name':'On-Chain\x20Reputation','description':'Merchant\x20and\x20user\x20behavior\x20permanently\x20recorded\x20on\x20Registrar.\x20Evaluations,\x20completions,\x20and\x20disputes\x20contribute\x20to\x20reputation\x20score.','objectTypes':['service','order','arb'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'service_published','description':'Service\x20must\x20be\x20published\x20to\x20accumulate\x20reputation','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'reputation_verifiability','effect':'required','description':'On-chain\x20history\x20is\x20tamper-proof'},{'dimension':'trust','effect':'boost','description':'Reputation\x20signals\x20reduce\x20information\x20asymmetry'}],'industryFit':{'freelance':0x5a,'education':0x50,'rental':0x55,'retail':0x5a,'subscription':0x55,'travel':0x50,'licensing':0x50,'crowdfunding':0x41,'general':0x55},'addressesPainPoints':['Fake\x20reviews\x20and\x20rating\x20manipulation','No\x20cross-platform\x20reputation\x20portability','Platform\x20can\x20delete\x20negative\x20reviews'],'intentSignals':[/reputation/i,/\breviews?\b/i,/\brating/i,/track record/i,/feedback/i],'userProtections':['Reputation\x20is\x20on-chain\x20and\x20immutable','Can\x20verify\x20merchant\x27s\x20complete\x20transaction\x20history','Dispute\x20outcomes\x20affect\x20reputation\x20permanently'],'merchantObligations':['All\x20service\x20interactions\x20become\x20part\x20of\x20permanent\x20record','Cannot\x20hide\x20negative\x20outcomes'],'requiresKeeper':![]},{'id':'supplier_collaboration','name':'Supplier\x20Collaboration','description':'Enable\x20merchant\x20to\x20delegate\x20sub-services\x20to\x20suppliers\x20with\x20transparent\x20payment\x20splitting.\x20No\x20platform\x20intermediary.','objectTypes':['service','allocation','demand'],'templateRefs':[{'template_id':'supplier-demand','object_type':'demand','purpose':'Create\x20sub-service\x20demand\x20for\x20suppliers'},{'template_id':'supplier-allocation','object_type':'allocation','purpose':'Split\x20order\x20payment\x20with\x20suppliers'}],'requiredConstraints':[{'constraint_id':'demand_configured','description':'Demand\x20must\x20reference\x20main\x20Service','level':'soft','blocking':![]},{'constraint_id':'allocation_sharing_configured','description':'Allocation\x20sharing\x20must\x20include\x20suppliers','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'supplier_visibility','effect':'required','description':'Supplier\x20payments\x20transparent\x20on-chain'},{'dimension':'governance_risk','effect':'boost','description':'No\x20platform\x20controls\x20supplier\x20relationships'}],'industryFit':{'freelance':0x3c,'education':0x46,'rental':0x28,'retail':0x55,'subscription':0x32,'travel':0x5a,'licensing':0x41,'crowdfunding':0x1e,'general':0x3c},'addressesPainPoints':['Supplier\x20payments\x20opaque\x20to\x20end\x20user','Platform\x20controls\x20supplier\x20relationships','No\x20direct\x20merchant-supplier\x20collaboration'],'intentSignals':[/supplier/i,/subcontract/i,/outsourc/i,/vendor/i,/sub[ -]?service/i,/delegate to/i],'userProtections':['Can\x20see\x20all\x20suppliers\x20involved\x20in\x20service','Supplier\x20payments\x20are\x20on-chain\x20auditable','Merchant\x20remains\x20accountable\x20for\x20supplier\x20quality'],'merchantObligations':['Must\x20declare\x20all\x20suppliers\x20upfront','Must\x20ensure\x20supplier\x20deliverables\x20meet\x20criteria'],'requiresKeeper':![]},{'id':'damage_attestation','name':'Damage\x20Attestation','description':'Rental-specific:\x20pre/post\x20condition\x20photos\x20hashed\x20to\x20Repository.\x20Guard\x20compares\x20hashes\x20to\x20automatically\x20enforce\x20damage\x20deductions.','objectTypes':['repository','guard','service'],'templateRefs':[{'template_id':'rental-condition-guard','object_type':'guard','purpose':'Compare\x20pre/post\x20rental\x20condition\x20hashes'},{'template_id':'condition-repository','object_type':'repository','purpose':'Store\x20rental\x20condition\x20evidence'}],'requiredConstraints':[{'constraint_id':'pre_rental_hash','description':'Pre-rental\x20condition\x20hash\x20must\x20be\x20committed','level':'hard','blocking':!![]},{'constraint_id':'post_rental_hash','description':'Post-rental\x20condition\x20hash\x20must\x20be\x20committed','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'proof_integrity','effect':'required','description':'Condition\x20hashes\x20prevent\x20tampering'},{'dimension':'arbitration_fairness','effect':'boost','description':'Objective\x20evidence\x20reduces\x20dispute\x20bias'}],'industryFit':{'freelance':0x14,'education':0x1e,'rental':0x62,'retail':0x28,'subscription':0x14,'travel':0x3c,'licensing':0x19,'crowdfunding':0x14,'general':0x28},'addressesPainPoints':['Landlord\x20claims\x20damage\x20without\x20proof\x20(common\x20on\x20incumbent\x20short-stay\x20platforms)','No\x20mandatory\x20pre-rental\x20photo\x20(vehicle-rental\x20damage\x20claims\x20denied)','Platform\x20arbitrates\x20damage\x20disputes\x20opaquely'],'intentSignals':[/damage/i,/condition (photo|report|check|record)/i,/pre[ -]?rental/i,/post[ -]?rental/i,/attest/i,/wear and tear/i],'userProtections':['Pre-rental\x20hash\x20commits\x20baseline\x20condition','Guard\x20automatically\x20compares\x20post-rental\x20state','Cannot\x20be\x20charged\x20for\x20pre-existing\x20damage'],'merchantObligations':['Must\x20commit\x20pre-rental\x20condition\x20hash','Must\x20commit\x20post-rental\x20condition\x20hash','Must\x20use\x20Repository\x20for\x20evidence\x20storage'],'requiresKeeper':!![],'keeperHint':'Keeper\x20triggers\x20post-rental\x20hash\x20collection\x20and\x20initiates\x20damage\x20Guard\x20comparison'},{'id':'discount_lifecycle','name':'Discount\x20Lifecycle','description':'Coupon\x20promotions\x20bound\x20to\x20a\x20Service\x20(percentage\x20or\x20fixed-amount\x20off):\x20minted\x20to\x20recipients,\x20redeemed\x20automatically\x20at\x20buy,\x20burned\x20on\x20use.\x20Chain\x20truth:\x20a\x20redeemed\x20coupon\x27s\x20balance\x20decrements\x20PERMANENTLY\x20(no\x20restock,\x20no\x20revert),\x20and\x20standing\x20renewal\x20discounts\x20are\x20NOT\x20constructible\x20(the\x20renew\x20path\x20has\x20no\x20discount\x20hook\x20—\x20every\x20renewal\x20re-prices\x20from\x20the\x20SKU\x20price).','objectTypes':['service'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'discount_budget_planned','description':'Total\x20discount\x20budget\x20(max_uses\x20x\x20discount_value)\x20planned\x20before\x20minting\x20—\x20the\x20burn\x20is\x20irreversible','level':'hard','blocking':!![]},{'constraint_id':'discount_burn_disclosed','description':'Burn-on-use\x20semantics\x20(permanent\x20decrement,\x20no\x20revert)\x20disclosed\x20in\x20the\x20promotion\x20terms','level':'hard','blocking':!![]},{'constraint_id':'discount_renewal_disclosed','description':'\x27First\x20period\x20X%\x20off,\x20then\x20standard\x27\x20disclosed\x20in\x20the\x20listing/WIP\x20BEFORE\x20purchase\x20(renewals\x20re-price\x20from\x20the\x20SKU\x20price\x20—\x20anti-dark-pattern)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'promotion_integrity','effect':'required','description':'Coupon\x20budget\x20and\x20burn\x20semantics\x20are\x20planned\x20and\x20disclosed,\x20never\x20improvised'},{'dimension':'fee_transparency','effect':'boost','description':'The\x20discounted\x20price\x20at\x20redemption\x20is\x20computed\x20by\x20the\x20chain,\x20not\x20asserted\x20by\x20prose'}],'industryFit':{'freelance':0x2d,'education':0x46,'rental':0x32,'retail':0x5f,'subscription':0x55,'travel':0x50,'licensing':0x3c,'crowdfunding':0x37,'general':0x46},'addressesPainPoints':['Coupon\x20systems\x20locked\x20inside\x20incumbent\x20platforms','Promotions\x20improvised\x20after\x20publish\x20with\x20no\x20budget\x20plan','Discount\x20promises\x20that\x20silently\x20change\x20at\x20renewal'],'intentSignals':[/coupon/i,/discount/i,/\bpromo/i,/voucher/i,/percentage off/i,/first[ -]?period off/i],'userProtections':['Redemption\x20is\x20computed\x20on-chain\x20at\x20buy\x20(no\x20manual\x20discount\x20approval)','Renewal\x20price\x20is\x20the\x20SKU\x20price\x20—\x20a\x20first-period\x20coupon\x20cannot\x20silently\x20renew\x20at\x20the\x20discounted\x20price','Expired\x20coupons\x20cannot\x20redeem'],'merchantObligations':['Plan\x20the\x20total\x20discount\x20budget\x20(max_uses\x20x\x20value)\x20before\x20minting','Disclose\x20burn-on-use\x20and\x20renewal\x20re-pricing\x20in\x20the\x20promotion\x20terms','Never\x20promise\x20a\x20standing\x20renewal\x20discount\x20(not\x20constructible\x20on-chain)'],'requiresKeeper':![]},{'id':'praise_incentive','name':'Review\x20Praise\x20Incentive','description':'Sale-time-planned\x20claim\x20Reward\x20for\x20buyer\x20reviews\x20(template\x20review_mode\x20\x27review_reward\x27):\x20the\x20build\x20emits\x20the\x20Reward\x20object,\x20attaches\x20the\x20replay-armed\x20claim\x20guard,\x20binds\x20it\x20to\x20the\x20Service,\x20and\x20funds\x20it\x20via\x20the\x20reward_funding\x20input\x20—\x20so\x20the\x20incentive\x20is\x20perceivable\x20by\x20the\x20buyer\x20BEFORE\x20ordering,\x20and\x20an\x20unfunded\x20or\x20unguarded\x20incentive\x20promise\x20must\x20not\x20publish.','objectTypes':['service','reward','guard'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'reward_pool_funded','description':'reward_funding\x20input\x20present\x20at\x20build\x20(an\x20unfunded\x20incentive\x20promise\x20must\x20not\x20publish)','level':'hard','blocking':!![]},{'constraint_id':'reward_claim_replay_armed','description':'Claim\x20guard\x20carries\x20the\x20record-gate\x20idempotency\x20leg\x20(replay-drain\x20target\x20otherwise)','level':'hard','blocking':!![]}],'evaluationImpact':[{'dimension':'trust','effect':'boost','description':'Funded,\x20perceivable\x20review\x20incentives\x20raise\x20honest\x20review\x20volume'},{'dimension':'promotion_integrity','effect':'required','description':'Incentive\x20terms\x20are\x20chain-enforced\x20(funded\x20pool\x20+\x20guarded\x20claim),\x20not\x20prose\x20promises'}],'industryFit':{'freelance':0x4b,'education':0x41,'rental':0x2d,'retail':0x55,'subscription':0x4b,'travel':0x41,'licensing':0x2d,'crowdfunding':0x2d,'general':0x41},'addressesPainPoints':['No\x20mechanism\x20to\x20incentivize\x20honest\x20buyer\x20reviews','Review\x20rewards\x20locked\x20inside\x20incumbent\x20platforms','Incentive\x20promises\x20that\x20evaporate\x20after\x20purchase'],'intentSignals':[/incentive/i,/reward/i,/cashback/i,/rebate/i,/bonus/i,/\btips?\b/i],'userProtections':['Incentive\x20perceivable\x20BEFORE\x20ordering\x20(funded\x20at\x20build,\x20not\x20after)','Claim\x20terms\x20chain-enforced\x20with\x20replay\x20protection','Rating\x20polarity\x20recorded\x20as\x20range-queryable\x20on-chain\x20rows\x20(1-5\x20rating\x20column)'],'merchantObligations':['Fund\x20the\x20reward\x20pool\x20at\x20build\x20time\x20(reward_funding)','Keep\x20the\x20claim\x20guard\x20replay-armed\x20(record-gate\x20leg)','Disclose\x20claim\x20terms\x20in\x20the\x20listing/WIP\x20promise'],'requiresKeeper':![]},{'id':'after_sales_guarantee','name':'After-Sales\x20Guarantee','description':'Declared\x20buyer\x20after-sales\x20remedy\x20(template\x20after_sales_mode\x20\x27return\x27\x20|\x20\x27exchange\x27\x20|\x20\x27warranty\x27):\x20the\x20machine_shape\x20ships\x20the\x20backing\x20rail\x20(e.g.\x20return_requested\x20->\x20returned),\x20riding\x20a\x20claimed_by\x20polarity\x20pair\x20—\x20the\x20refund\x20leg\x20pays\x20the\x20buyer\x20at\x20claimed_by\x20none,\x20the\x20merchant-recovery\x20leg\x20at\x20claimed_by\x20some\x20—\x20with\x20the\x20remedy\x20window\x20anchored\x20on\x20the\x20delivered\x20ENTRY\x20time\x20so\x20a\x20buyer\x20cannot\x20stall\x20the\x20merchant,\x20and\x20de-conflicted\x20against\x20settlement\x20so\x20refund\x20and\x20ruling\x20payouts\x20never\x20double-pay.','objectTypes':['machine','guard','allocation','order'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'after_sales_rail_present','description':'machine_shape\x20carries\x20a\x20node\x20backing\x20the\x20declared\x20after_sales_mode\x20(compile\x20AFTER_SALES_RAIL_MISSING\x20/\x20scanner\x20R-AFTER-SALES-RAIL)','level':'hard','blocking':!![]},{'constraint_id':'after_sales_polarity_pair','description':'refund\x20leg\x20claimed_by\x20some==false\x20paired\x20with\x20merchant-recovery\x20leg\x20some==true\x20(INV-C1,\x20RAIL_POLARITY_COLLISION\x20backstop)','level':'hard','blocking':!![]},{'constraint_id':'after_sales_window_anchored','description':'remedy\x20window\x20anchored\x20on\x20the\x20delivered\x20ENTRY\x20time,\x20not\x20a\x20drifting\x20current_time\x20(INV-C2,\x20TIME-ANCHOR-01)','level':'hard','blocking':!![]},{'constraint_id':'after_sales_no_double_remedy','description':'after-sales\x20refund\x20and\x20arbitration/award\x20payout\x20are\x20mutually\x20exclusive\x20rails\x20(INV-C3,\x20DUAL-RAIL-01)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'The\x20claimed_by\x20polarity\x20pair\x20means\x20an\x20order\x20is\x20refunded\x20OR\x20recovered,\x20never\x20both'},{'dimension':'consumer_diligence','effect':'boost','description':'A\x20declared,\x20structurally-backed\x20remedy\x20window\x20is\x20verifiable\x20before\x20purchase'}],'industryFit':{'freelance':0x28,'education':0x2d,'rental':0x46,'retail':0x62,'subscription':0x23,'travel':0x37,'licensing':0x41,'crowdfunding':0x37,'general':0x3c},'addressesPainPoints':['Return/refund\x20policy\x20locked\x20inside\x20incumbent\x20platforms','No\x20enforced\x20return\x20window\x20—\x20buyer\x20stalls\x20or\x20merchant\x20refuses','Refund\x20and\x20dispute\x20payout\x20both\x20fire\x20(double-pay)','Exchange/warranty\x20promised\x20in\x20prose\x20with\x20no\x20on-chain\x20rail'],'intentSignals':[/after[ -]?sales/i,/\breturn/i,/exchange/i,/warranty/i,/remedy/i],'userProtections':['Remedy\x20window\x20is\x20chain-anchored\x20on\x20delivery\x20entry\x20(verifiable,\x20not\x20merchant\x20discretion)','Refund\x20returns\x20to\x20the\x20Order\x20(not\x20a\x20platform\x20balance)','The\x20polarity\x20pair\x20guarantees\x20exactly\x20one\x20remedy\x20pays'],'merchantObligations':['Ship\x20the\x20backing\x20rail\x20for\x20the\x20declared\x20after_sales_mode','Anchor\x20the\x20remedy\x20window\x20on\x20the\x20delivered\x20entry\x20time','Keep\x20the\x20refund\x20and\x20recovery\x20legs\x20a\x20claimed_by\x20polarity\x20pair\x20(never\x20both\x20satisfiable)'],'requiresKeeper':![]},{'id':'acceptance_judging','name':'Acceptance\x20&\x20Judging','description':'Declared\x20acceptance_mode\x20(\x27milestone\x27\x20|\x20\x27contest\x27\x20|\x20\x27bounty\x27\x20|\x20\x27agent\x27):\x20who\x20decides\x20the\x20escrow\x20releases\x20and\x20how\x20many\x20redelivery\x20rounds\x20are\x20allowed.\x20A\x20judge-decided\x20mode\x20routes\x20the\x20release\x20decision\x20to\x20an\x20independent\x20venue\x20(arbitration_mode\x20\x27third_party\x27)\x20so\x20the\x20payout-owing\x20party\x20never\x20self-adjudicates;\x20a\x20finite\x20revision_rounds_max\x20is\x20backed\x20by\x20a\x20counter\x20Repository\x20guard\x20because\x20the\x20chain\x20bounds\x20edges,\x20not\x20visits;\x20the\x20acceptance\x20and\x20timeout\x20siblings\x20are\x20distinct\x20forwards\x20so\x20the\x20buyer\x27s\x20approval\x20and\x20the\x20auto-accept\x20deadline\x20never\x20race\x20into\x20one\x20node.','objectTypes':['machine','guard','allocation','arb','repository'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'acceptance_judge_independent','description':'a\x20judge-decided\x20acceptance_mode\x20(contest/bounty/agent)\x20declares\x20arbitration_mode\x20\x27third_party\x27\x20(INV-A3,\x20compile\x20ACCEPTANCE_JUDGE_NOT_INDEPENDENT\x20/\x20scanner\x20R-ACCEPTANCE-JUDGE)','level':'hard','blocking':!![]},{'constraint_id':'acceptance_revision_bounded','description':'a\x20finite\x20revision_rounds_max\x20is\x20backed\x20by\x20a\x20counter\x20Repository\x20guard,\x20or\x20declared\x20\x27unlimited\x27\x20(INV-A1,\x20compile\x20ACCEPTANCE_REVISION_UNBOUNDED\x20/\x20scanner\x20R-ACCEPTANCE-REVISION)','level':'hard','blocking':!![]},{'constraint_id':'acceptance_race_free','description':'the\x20acceptance\x20forward\x20and\x20its\x20timeout\x20complement\x20are\x20distinct\x20siblings,\x20never\x20a\x20dual-prev\x20race\x20into\x20one\x20node\x20(INV-A2,\x20widened\x20R-REVIEW-NORACE)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'arbitration_fairness','effect':'required','description':'A\x20judge-decided\x20release\x20routes\x20through\x20an\x20independent\x20venue,\x20not\x20the\x20payout-owing\x20party'},{'dimension':'fund_safety','effect':'boost','description':'A\x20finite\x20revision\x20cap\x20the\x20chain\x20can\x20actually\x20enforce\x20(counter-backed)\x20prevents\x20an\x20unbounded\x20redelivery\x20drain'},{'dimension':'operational_risk','effect':'boost','description':'Distinct\x20accept/timeout\x20siblings\x20keep\x20the\x20buyer\x27s\x20decision\x20and\x20the\x20auto-accept\x20deadline\x20from\x20deadlocking\x20the\x20node'}],'industryFit':{'freelance':0x60,'education':0x37,'rental':0x1e,'retail':0x23,'subscription':0x1e,'travel':0x28,'licensing':0x4b,'crowdfunding':0x23,'general':0x3c},'addressesPainPoints':['Contest/bounty\x20winner\x20picked\x20by\x20the\x20party\x20holding\x20the\x20escrow\x20(self-adjudication)','Revision\x20rounds\x20promised\x20as\x20finite\x20in\x20prose\x20but\x20unbounded\x20on-chain\x20(progress.move\x20caps\x20edges,\x20not\x20visits)','Buyer\x20approval\x20and\x20auto-accept\x20timeout\x20racing\x20into\x20one\x20node\x20(deadlock\x20or\x20double-advance)','Agent-task\x20evaluator\x20not\x20identity-bound\x20to\x20the\x20delivery'],'intentSignals':[/acceptance/i,/judg(e|ing)/i,/contest/i,/bounty/i,/revision/i,/redeliver/i,/deliverable approv/i,/who decides/i],'userProtections':['A\x20judge-decided\x20release\x20is\x20ruled\x20by\x20an\x20independent\x20venue,\x20verifiable\x20before\x20purchase','A\x20finite\x20revision\x20cap\x20is\x20genuinely\x20enforceable\x20(counter\x20guard),\x20not\x20a\x20prose\x20promise','Auto-accept\x20only\x20fires\x20on\x20its\x20own\x20distinct\x20timeout\x20forward,\x20never\x20by\x20racing\x20the\x20buyer\x27s\x20decision'],'merchantObligations':['Declare\x20arbitration_mode\x20\x27third_party\x27\x20for\x20any\x20judge-decided\x20acceptance_mode','Back\x20a\x20finite\x20revision_rounds_max\x20with\x20a\x20counter\x20Repository\x20guard,\x20or\x20declare\x20it\x20\x27unlimited\x27\x20honestly','Keep\x20the\x20acceptance\x20and\x20timeout\x20forwards\x20distinct\x20siblings\x20(distinct\x20forward\x20names)'],'requiresKeeper':!![],'keeperHint':'A\x20judge-decided\x20acceptance\x20needs\x20a\x20keeper\x20to\x20push\x20the\x20ruling/placement\x20terminal\x20forward\x20once\x20the\x20independent\x20venue\x20decides;\x20the\x20accept-timeout\x20forward\x20also\x20needs\x20a\x20keeper\x20at\x20the\x20window\x20deadline'},{'id':'installment_deposit','name':'Installment\x20&\x20Deposit','description':'Declared\x20installment_mode\x20(\x27deposit_balance\x27\x20|\x20\x27milestone_n\x27):\x20the\x20buyer\x20pays\x20in\x20stages\x20—\x20a\x20deposit\x20now\x20and\x20the\x20balance\x20later,\x20or\x20N\x20milestone\x20captures.\x20Each\x20later\x20capture\x20rides\x20the\x20one-PTB\x20order_renew\x20call\x20(fund\x20+\x20record\x20+\x20advance\x20atomically)\x20and\x20its\x20capture\x20forward\x20binds\x20an\x20allocation.balance\x20fund\x20gate\x20so\x20an\x20unfunded\x20advance\x20is\x20rejected;\x20every\x20deposit-held\x20state\x20carries\x20a\x20refund/cancel\x20exit\x20rail\x20(a\x20full\x20refund\x20or\x20a\x20declared\x20kill\x20fee)\x20because\x20the\x20chain\x20imposes\x20no\x20obligation\x20to\x20pay\x20the\x20balance,\x20so\x20a\x20buyer\x20who\x20walks\x20away\x20never\x20strands\x20the\x20paid\x20portion.','objectTypes':['machine','guard','allocation','order','payment'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'installment_funding_gated','description':'every\x20capture\x20forward\x20(a\x20due\x20state\x20advancing\x20into\x20a\x20paid\x20state)\x20binds\x20a\x20fund-gate\x20Guard\x20reading\x20allocation.balance\x20(INV-B1,\x20compile\x20INSTALLMENT_FUNDING_UNGATED\x20/\x20scanner\x20R-INSTALLMENT-FUNDING)','level':'soft','blocking':![]},{'constraint_id':'installment_deposit_exit','description':'every\x20deposit-held\x20state\x20carries\x20a\x20refund/cancel/forfeit\x20exit\x20rail\x20so\x20the\x20paid\x20portion\x20is\x20never\x20stranded\x20(INV-B2,\x20compile\x20INSTALLMENT_DEPOSIT_STRANDED\x20/\x20scanner\x20R-INSTALLMENT-DEPOSIT)','level':'soft','blocking':![]},{'constraint_id':'installment_release_once','description':'the\x20release\x20allocator\x20is\x20once_per_order\x20and\x20order-anchored\x20so\x20a\x20replay\x20cannot\x20re-capture\x20(INV-B3,\x20rides\x20the\x20existing\x20E-2\x20/\x20once-slot\x20/\x20order-anchor\x20audit)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'The\x20allocation.balance\x20fund\x20gate\x20means\x20a\x20capture\x20forward\x20cannot\x20advance\x20without\x20the\x20payment\x20landing\x20—\x20no\x20zero-value\x20advance'},{'dimension':'consumer_diligence','effect':'boost','description':'A\x20declared\x20deposit-exit\x20policy\x20(full\x20refund\x20vs\x20kill\x20fee)\x20is\x20verifiable\x20before\x20the\x20buyer\x20commits\x20the\x20deposit'},{'dimension':'operational_risk','effect':'boost','description':'once_per_order\x20+\x20order\x20anchor\x20on\x20the\x20release\x20keeps\x20a\x20replay\x20from\x20re-capturing\x20or\x20double-releasing'}],'industryFit':{'freelance':0x46,'education':0x2d,'rental':0x37,'retail':0x5a,'subscription':0x28,'travel':0x32,'licensing':0x1e,'crowdfunding':0x37,'general':0x3c},'addressesPainPoints':['Pre-order\x20/\x20deposit-then-balance\x20sales\x20locked\x20inside\x20incumbent\x20platforms','A\x20later\x20payment\x20recorded\x20without\x20the\x20funds\x20actually\x20landing\x20(zero-value\x20advance)','A\x20buyer\x20who\x20walks\x20away\x20strands\x20the\x20deposit\x20with\x20no\x20on-chain\x20exit','Milestone\x20billing\x20where\x20a\x20replay\x20re-charges\x20or\x20double-releases'],'intentSignals':[/installment/i,/deposit/i,/pay in stages/i,/down[ -]?payment/i,/balance (later|afterwards?)/i,/part(ial)? payment/i,/staged? payment/i],'userProtections':['A\x20capture\x20forward\x20only\x20advances\x20when\x20the\x20payment\x20lands\x20in\x20the\x20Allocation\x20(fund\x20gate)','The\x20deposit-exit\x20policy\x20is\x20declared\x20and\x20structurally\x20backed\x20before\x20purchase','The\x20release\x20is\x20once-per-order\x20and\x20order-anchored,\x20so\x20no\x20replay\x20double-charges'],'merchantObligations':['Bind\x20an\x20allocation.balance\x20fund\x20gate\x20on\x20every\x20capture\x20forward\x20and\x20route\x20the\x20buyer\x20through\x20order_renew','Ship\x20a\x20deposit-exit\x20rail\x20(refund\x20or\x20declared\x20kill\x20fee)\x20from\x20every\x20deposit-held\x20state','Make\x20the\x20release\x20allocator\x20once_per_order\x20and\x20order-anchored','Disclose\x20the\x20deposit\x20amount,\x20balance\x20window,\x20and\x20exit\x20policy\x20in\x20the\x20listing/WIP\x20promise'],'requiresKeeper':!![],'keeperHint':'The\x20balance-window\x20deadline\x20(a\x20buyer\x20who\x20never\x20pays\x20the\x20balance)\x20needs\x20a\x20keeper\x20to\x20drive\x20the\x20deposit-exit\x20rail\x20at\x20the\x20window\x20close;\x20a\x20milestone\x20capture\x20timeout\x20likewise'},{'id':'affiliate_commission','name':'Affiliate\x20Commission','description':'Declared\x20affiliate_mode\x20(\x27commission\x27):\x20the\x20merchant\x20sells\x20through\x20referral/affiliate\x20partners\x20and\x20owes\x20the\x20referring\x20partner\x20an\x20independent\x20commission\x20leg.\x20The\x20commission\x20is\x20window-anchored\x20—\x20it\x20accrues\x20at\x20attribution\x20but\x20is\x20claimable\x20only\x20after\x20the\x20attribution/refund\x20window\x20closes,\x20so\x20an\x20in-window\x20refund\x20never\x20has\x20to\x20reverse\x20an\x20already-paid\x20partner\x20(the\x20chain\x20has\x20no\x20debit/clawback\x20primitive,\x20so\x20a\x20released\x20commission\x20is\x20unrecoverable\x20and\x20the\x20template\x20must\x20disclose\x20that\x20honestly).\x20The\x20commission\x20leg\x20is\x20an\x20INDEPENDENT\x20allocation\x20off\x20a\x20dedicated\x20pool,\x20never\x20a\x20drain\x20of\x20the\x20buyer\x27s\x20goods\x20escrow.','objectTypes':['machine','guard','allocation','repository'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'affiliate_rail_present','description':'a\x20declared\x20commission\x20overlay\x20has\x20a\x20commission-family\x20machine\x20node\x20or\x20a\x20commission\x20allocator\x20row,\x20and\x20the\x20leg\x20is\x20INDEPENDENT\x20of\x20the\x20goods\x20escrow\x20(INV-D3,\x20compile\x20AFFILIATE_RAIL_MISSING\x20/\x20scanner\x20R-AFFILIATE-RAIL)','level':'soft','blocking':![]},{'constraint_id':'affiliate_clawback_disclosed','description':'a\x20build_note\x20discloses\x20the\x20post-lock\x20no-clawback\x20truth\x20—\x20a\x20released\x20commission\x20cannot\x20be\x20reversed\x20on\x20chain\x20(INV-D2,\x20compile\x20AFFILIATE_CLAWBACK_UNDISCLOSED\x20/\x20scanner\x20R-AFFILIATE-DISCLOSURE)','level':'soft','blocking':![]},{'constraint_id':'affiliate_window_anchored','description':'the\x20commission\x20claim\x20is\x20gated\x20by\x20a\x20window-anchored\x20guard\x20so\x20it\x20is\x20claimable\x20only\x20after\x20the\x20attribution/refund\x20window\x20closes\x20(INV-D1,\x20rides\x20the\x20generic\x20TIME-ANCHOR-01\x20audit)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'The\x20commission\x20leg\x20is\x20an\x20independent\x20allocation\x20off\x20its\x20own\x20pool,\x20never\x20a\x20Surplus/Rate\x20drain\x20of\x20the\x20buyer\x27s\x20goods\x20escrow\x20(防抢池)'},{'dimension':'consumer_diligence','effect':'boost','description':'The\x20post-lock\x20no-clawback\x20truth\x20is\x20disclosed\x20before\x20purchase,\x20so\x20a\x20buyer/merchant\x20never\x20assumes\x20a\x20reversal\x20the\x20chain\x20cannot\x20do'},{'dimension':'operational_risk','effect':'boost','description':'The\x20window\x20anchor\x20means\x20an\x20in-window\x20refund\x20never\x20has\x20to\x20reverse\x20an\x20already-paid\x20partner\x20—\x20the\x20unrecoverable\x20surface\x20is\x20minimized\x20by\x20construction'}],'industryFit':{'freelance':0x3c,'education':0x37,'rental':0x23,'retail':0x50,'subscription':0x41,'travel':0x3c,'licensing':0x46,'crowdfunding':0x3c,'general':0x3c},'addressesPainPoints':['Referral/affiliate\x20payouts\x20locked\x20inside\x20incumbent\x20affiliate\x20networks\x20with\x20opaque\x20attribution','A\x20commission\x20drained\x20from\x20the\x20buyer\x27s\x20goods\x20escrow\x20instead\x20of\x20an\x20independent\x20pool\x20(抢池)','A\x20refund\x20after\x20commission\x20release\x20falsely\x20assumed\x20to\x20claw\x20back\x20the\x20partner\x20payout\x20(no\x20on-chain\x20debit\x20exists)','Attribution\x20claimed\x20instantly,\x20before\x20the\x20refund\x20window,\x20then\x20unrecoverable\x20when\x20the\x20order\x20refunds'],'intentSignals':[/affiliate/i,/referral/i,/referr/i,/commission/i,/revenue[ -]?shar/i,/partner[ -]?payout/i],'userProtections':['The\x20commission\x20is\x20paid\x20from\x20a\x20dedicated\x20pool,\x20so\x20the\x20buyer\x27s\x20goods\x20escrow\x20is\x20never\x20drained\x20by\x20the\x20partner\x20leg','The\x20post-lock\x20no-clawback\x20reality\x20is\x20disclosed\x20before\x20purchase,\x20not\x20discovered\x20at\x20refund\x20time','The\x20commission\x20is\x20only\x20claimable\x20after\x20the\x20attribution/refund\x20window\x20closes,\x20so\x20an\x20in-window\x20refund\x20is\x20clean'],'merchantObligations':['Route\x20the\x20commission\x20through\x20an\x20INDEPENDENT\x20allocation\x20leg\x20to\x20an\x20explicit\x20non-empty\x20partner\x20Entity','Gate\x20the\x20claim\x20with\x20a\x20window-anchored\x20guard\x20(claimable\x20only\x20after\x20the\x20attribution/refund\x20window)','Disclose\x20the\x20post-lock\x20no-clawback\x20truth\x20in\x20a\x20build_note\x20and\x20the\x20listing\x20promise','Declare\x20the\x20commission\x20rate/bps\x20and\x20the\x20attribution\x20window\x20in\x20the\x20listing\x20so\x20a\x20partner\x20can\x20price\x20it\x20before\x20referral'],'requiresKeeper':!![],'keeperHint':'The\x20attribution/refund\x20window\x20deadline\x20needs\x20a\x20keeper\x20to\x20open\x20the\x20commission\x20claim\x20once\x20the\x20window\x20closes\x20(the\x20claim\x20guard\x27s\x20time\x20gate\x20arms\x20at\x20entry_time\x20+\x20window)'},{'id':'crowdfunding','name':'Crowdfunding\x20Campaign','description':'Declared\x20crowdfunding_mode\x20(\x27threshold\x27\x20all-or-nothing\x20/\x20\x27flexible\x27\x20keep-it-all):\x20backers\x20each\x20escrow\x20a\x20contribution\x20in\x20its\x20OWN\x20unpooled\x20Allocation\x20(for_object\x20=\x20their\x20order,\x20never\x20balance-joined,\x20so\x20attribution\x20survives).\x20A\x20shared\x20campaign\x20Repository\x20records\x20one\x20writer-bound\x20numeric\x20row\x20per\x20contribution\x20(id_from\x20signer,\x20value\x20=\x20amount).\x20At\x20an\x20ABSOLUTE\x20campaign\x20deadline\x20a\x20settlement\x20guard\x20reads\x20the\x20on-chain\x20aggregate\x20(repository.data\x20sum-where,\x20query\x201174\x20→\x20U256)\x20and\x20decides:\x20aggregate\x20>=\x20goal\x20→\x20release\x20every\x20contribution\x20to\x20the\x20project\x20Entity;\x20aggregate\x20<\x20goal\x20(threshold\x20model)\x20→\x20refund\x20each\x20backer\x20their\x20own\x20contribution\x20(slot\x20254).\x20The\x20flexible\x20model\x20has\x20no\x20goal\x20and\x20no\x20refund\x20leg\x20—\x20contributions\x20release\x20at\x20the\x20deadline\x20and\x20are\x20non-refundable\x20(disclosed).\x20The\x20aggregate\x20is\x20attested-roster\x20evidence,\x20not\x20a\x20chain-verified\x20custody\x20proof;\x20a\x20raise\x20is\x20never\x20an\x20investment.','objectTypes':['machine','guard','allocation','repository'],'templateRefs':[],'requiredConstraints':[{'constraint_id':'crowdfunding_exit_rail_present','description':'a\x20declared\x20campaign\x20has\x20a\x20release/settlement\x20rail,\x20and\x20a\x20threshold\x20campaign\x20additionally\x20has\x20a\x20refund\x20rail\x20—\x20the\x20two-leg\x20escrow-exit\x20(release\x20XOR\x20refund,\x20D-BUG-2)\x20so\x20contributions\x20never\x20strand\x20at\x20the\x20deadline\x20(INV-E1,\x20compile\x20CROWDFUNDING_THRESHOLD_GATE_MISSING\x20/\x20scanner\x20R-CROWDFUNDING-RAIL)','level':'soft','blocking':![]},{'constraint_id':'crowdfunding_aggregate_writer_bound','description':'a\x20threshold\x20aggregate\x20reads\x20a\x20repository.data\x20sum-where\x20over\x20WRITER-BOUND\x20rows\x20(id_from\x20signer\x20+\x20an\x20identity\x20write_guard\x20order.owner==Signer),\x20never\x20an\x20existence\x20read\x20(INV-E2\x20/\x20R-X1-17,\x20compile\x20CROWDFUNDING_AGGREGATE_UNBOUND\x20/\x20scanner\x20R-CROWDFUNDING-AGGREGATE)','level':'soft','blocking':![]},{'constraint_id':'crowdfunding_disclosure_present','description':'build_notes\x20disclose\x20the\x20L-04\x20aggregate\x20trust\x20boundary\x20(threshold),\x20the\x20L-01\x20non-investment\x20statement,\x20the\x20L-05\x20KYC/AML\x20caution,\x20and\x20—\x20for\x20a\x20flexible\x20build\x20—\x20the\x20NO-REFUND\x20keep-it-all\x20posture\x20(INV-E3,\x20compile\x20CROWDFUNDING_DISCLOSURE_MISSING\x20/\x20scanner\x20R-CROWDFUNDING-DISCLOSURE)','level':'soft','blocking':![]}],'evaluationImpact':[{'dimension':'fund_safety','effect':'required','description':'Each\x20contribution\x20is\x20escrowed\x20UNPOOLED\x20(for_object\x20=\x20its\x20own\x20order,\x20never\x20balance::join)\x20so\x20a\x20missed\x20campaign\x20refunds\x20every\x20backer\x20their\x20OWN\x20money;\x20the\x20release/refund\x20legs\x20are\x20mutually\x20exclusive\x20(D-BUG-2)'},{'dimension':'consumer_diligence','effect':'boost','description':'The\x20aggregate-trust\x20boundary,\x20the\x20non-investment\x20posture\x20and\x20(flexible)\x20the\x20no-refund\x20reality\x20are\x20disclosed\x20before\x20contribution,\x20so\x20a\x20backer\x20never\x20assumes\x20a\x20chain-verified\x20custody\x20proof\x20or\x20a\x20refund\x20the\x20model\x20does\x20not\x20have'},{'dimension':'operational_risk','effect':'boost','description':'One\x20ABSOLUTE\x20shared\x20deadline\x20(not\x20per-order\x20entry+duration)\x20means\x20every\x20backer\x20settles\x20at\x20the\x20same\x20cutoff;\x20the\x20writer-bound\x20ledger\x20makes\x20the\x20raise\x20total\x20attributable\x20and\x20honest'}],'industryFit':{'freelance':0x1e,'education':0x28,'rental':0x14,'retail':0x3c,'subscription':0x23,'travel':0x19,'licensing':0x2d,'crowdfunding':0x64,'general':0x37},'addressesPainPoints':['An\x20all-or-nothing\x20raise\x20where\x20a\x20missed\x20goal\x20must\x20refund\x20every\x20backer,\x20but\x20pooled\x20custody\x20loses\x20per-backer\x20attribution','A\x20funding\x20total\x20presented\x20as\x20a\x20chain-verified\x20custody\x20proof\x20when\x20it\x20is\x20only\x20an\x20attested\x20sum\x20over\x20keeper-supplied\x20rows','A\x20backer\x20mistaking\x20a\x20flexible\x20keep-it-all\x20raise\x20for\x20a\x20refundable\x20all-or-nothing\x20campaign','Pooled\x20cross-border\x20fundraising\x20treated\x20as\x20a\x20casual\x20purchase\x20despite\x20HIGH\x20securities\x20/\x20money-transmission\x20/\x20KYC-AML\x20exposure'],'intentSignals':[/crowdfund/i,/\bbackers?\b/i,/campaign/i,/all[ -]?or[ -]?nothing/i,/fundrais/i,/\bpledge/i,/raise (funds|money)/i,/keep[ -]?it[ -]?all/i],'userProtections':['Each\x20contribution\x20is\x20escrowed\x20to\x20the\x20backer\x27s\x20OWN\x20order\x20(unpooled),\x20so\x20a\x20missed\x20threshold\x20refunds\x20exactly\x20their\x20money','The\x20aggregate-trust\x20boundary\x20and\x20the\x20non-investment\x20posture\x20are\x20disclosed\x20before\x20contribution','A\x20flexible\x20raise\x20states\x20the\x20NO-REFUND\x20keep-it-all\x20posture\x20up\x20front,\x20never\x20blurred\x20with\x20all-or-nothing','Delivery\x20after\x20a\x20successful\x20raise\x20is\x20backed\x20by\x20the\x20compensation\x20fund\x20+\x20third-party\x20arbitration'],'merchantObligations':['Escrow\x20each\x20contribution\x20UNPOOLED\x20(for_object\x20=\x20the\x20funder\x27s\x20order),\x20never\x20balance-joined\x20into\x20a\x20shared\x20pot','Bind\x20the\x20campaign\x20Repository\x20write_guard\x20to\x20the\x20contributing\x20backer\x20(id_from\x20signer,\x20order.owner==Signer)\x20so\x20the\x20aggregate\x20cannot\x20be\x20forged','Gate\x20release\x20on\x20the\x20sum-where\x20aggregate\x20ANDed\x20with\x20an\x20ABSOLUTE\x20shared\x20campaign\x20deadline;\x20pair\x20the\x20refund\x20leg\x20with\x20a\x20recover_gate\x20rail\x20(D-BUG-2)','Disclose\x20the\x20L-04\x20aggregate\x20trust\x20boundary,\x20the\x20L-01\x20non-investment\x20statement,\x20the\x20L-05\x20KYC/AML\x20caution,\x20and\x20(flexible)\x20the\x20no-refund\x20posture\x20in\x20build_notes\x20and\x20the\x20listing'],'requiresKeeper':!![],'keeperHint':'The\x20ABSOLUTE\x20campaign\x20deadline\x20needs\x20a\x20keeper\x20to\x20drive\x20settlement\x20once\x20Clock\x20>=\x20deadline:\x20on\x20a\x20met\x20goal\x20advance\x20each\x20order\x20to\x20the\x20release\x20terminal;\x20on\x20a\x20missed\x20threshold\x20enumerate\x20contributor\x20ids\x20via\x20find-where\x20(1176)\x20/\x20keys-where\x20(1177,\x20max\x20100\x20per\x20batch)\x20and\x20advance\x20each\x20refund\x20leg'}];export function getBusinessModule(a){return CORE_BUSINESS_MODULES['find'](b=>b['id']===a);}export function getModulesForIndustry(a){return[...CORE_BUSINESS_MODULES]['sort']((c,d)=>(d['industryFit'][a]??0x0)-(c['industryFit'][a]??0x0));}export function recommendModules(a,b,c){const d=c?.['minFit']??0x32,e=c?.['maxModules']??0x5,f=CORE_BUSINESS_MODULES['map'](g=>{let h=g['industryFit'][a]??0x32;const i=b['toLowerCase']();for(const j of g['addressesPainPoints']){const k=j['toLowerCase']()['split'](/\s+/),l=k['filter'](n=>i['includes'](n))['length'];h+=l*0x5;}return{'module':g,'score':Math['min'](h,0x64)};});return f['filter'](g=>g['score']>=d)['sort']((g,h)=>h['score']-g['score'])['slice'](0x0,e)['map'](g=>g['module']);}export function moduleHasIntentEvidence(a,b){if(!a['intentSignals']||a['intentSignals']['length']===0x0)return![];return a['intentSignals']['some'](c=>c['test'](b));}export function checkModuleConstraints(a,b,c){const d=a['requiredConstraints']['filter'](h=>h['blocking']&&!b['has'](h['constraint_id']))['map'](h=>h['constraint_id']),e=d['length']===0x0,f=a['evaluationImpact']['filter'](h=>h['effect']==='boost'||h['effect']==='required')['reduce']((h,i)=>h+(i['effect']==='required'?0xf:0x8),0x0),g=c?.['evidenceMatched']===![]?0x0:f;return{'module':a['id'],'adopted':e,'reason':e?undefined:'Missing\x20required\x20constraints:\x20'+d['join'](',\x20'),'missingConstraints':d['length']>0x0?d:undefined,'estimatedScoreBoost':Math['min'](g,0x64),'evidence_matched':c?.['evidenceMatched']};}export function calculateModuleScoreBoost(a){const b={};for(const c of a){for(const d of c['evaluationImpact']){const e=d['effect']==='required'?0xf:d['effect']==='boost'?0x8:0x3;b[d['dimension']]=(b[d['dimension']]??0x0)+e;}}return b;}
@@ -1 +1 @@
1
- import{afterEach,beforeEach,describe,expect,it}from'vitest';import{existsSync,mkdirSync,mkdtempSync,readFileSync,rmSync,writeFileSync}from'node:fs';import{tmpdir}from'node:os';import{join}from'node:path';import{buildPristineMergedPack,getRegisteredPack,industryReadmeContent,packKind,registerIndustryPack,scaffoldIndustryPack,scanPacks}from'./industry-pack.js';import{evaluateIndustryCondition,mergedBaselinesOverlay,resolveComplianceRules,resolveDisputeRules,resolveIndustryBaselines,resolveIndustryPlaybook,resolveIndustryRules,resolveSupplyRules}from'./industry-layers.js';import{applyHardConstraints,resolveCategoryMatchRules}from'../evaluation/category-match-rules.js';import{setJudgmentIndustryOverlay,getJudgmentDoc,clearJudgmentLayers}from'../config/judgment.js';import{PERSONA_ROLES}from'../persona/types.js';let root;beforeEach(()=>{root=mkdtempSync(join(tmpdir(),'wowok-industry-audit-'));}),afterEach(()=>{if(existsSync(root))rmSync(root,{'recursive':!![],'force':!![]});clearJudgmentLayers();});function manifest(a,b){return{'pack':'industry-pack','name':a,'display_name':a,'version':'1.0.0','layers':b};}describe('industry\x20audit\x20—\x20scaffold\x20shape',()=>{it('14.\x20scaffold\x20writes\x20pack.json\x20(all\x20sections;\x20baselines/mode\x20null)\x20+\x20template\x20playbook.md',()=>{const a=scaffoldIndustryPack('audit_scaffold',root);expect(a['ok'])['toBe'](!![]),expect(a['files'])['toEqual'](['pack.json','playbook.md']);const b=JSON['parse'](readFileSync(join(a['dir'],'pack.json'),'utf-8'));expect(b['manifest']['pack'])['toBe']('industry-pack'),expect(b['manifest']['layers'])['toContain']('playbook');for(const d of['match','personae','dispute','compliance','supply','rules']){expect(b[d])['not']['toBeNull']();}expect(b['match']?.['category'])['toBe']('audit_scaffold'),expect(b['baselines'])['toBeNull'](),expect(b['mode'])['toBeNull'](),expect(b['compliance']?.['refund_window'])['toEqual']({'not_applicable':!![]}),expect(b['personae'])['toHaveLength'](PERSONA_ROLES['length']);const c=readFileSync(join(a['dir'],'playbook.md'),'utf-8');expect(c)['toContain']('Industry\x20Playbook'),expect(c)['toContain']('(Example)');}),it('14b.\x20industry\x20README\x20documents\x20the\x20baselines\x20layer\x20and\x20legal\x20layer\x20names',()=>{const a=industryReadmeContent();expect(a)['toContain']('##\x20baselines\x20—\x20judgment\x20baselines\x20overlay'),expect(a)['toContain']('factory\x20<\x20pack\x20baselines\x20<\x20persona\x20fragment\x20<\x20user\x20document\x20<\x20session\x20overrides'),expect(a)['toContain']('\x22severity_deduction\x22:\x20{\x20\x22critical\x22:\x2040\x20}'),expect(a)['toContain']('\x22rule_id\x22:\x20\x22R-UTIL-03\x22,\x20\x22enabled\x22:\x20false'),expect(a)['toContain']('Legal'),expect(a)['toContain']('`baselines`,\x20`playbook`');});}),describe('industry\x20audit\x20—\x20meaningful-content\x20gates',()=>{it('15.\x20a\x20pristine\x20(placeholder-only)\x20pack\x20registers\x20NOTHING:\x20every\x20resolve*\x20stays\x20undefined',()=>{const a=buildPristineMergedPack('audit_pristine');a['manifest']['layers']=['match','personae','dispute','compliance','supply','rules'];const b=registerIndustryPack(a);expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual']([]),expect(resolveCategoryMatchRules('audit_pristine'))['toBeUndefined'](),expect(resolveDisputeRules('audit_pristine'))['toBeUndefined'](),expect(resolveComplianceRules('audit_pristine'))['toBeUndefined'](),expect(resolveSupplyRules('audit_pristine'))['toBeUndefined'](),expect(resolveIndustryRules('audit_pristine'))['toBeUndefined'](),expect(resolveIndustryBaselines('audit_pristine'))['toBeUndefined']();const c=buildPristineMergedPack('audit_pristine2');c['manifest']['layers']=['compliance'],c['compliance']={'category':'audit_pristine2','refund_window':{'days':0xe}},expect(registerIndustryPack(c)['registered'])['toEqual'](['compliance']),expect(resolveComplianceRules('audit_pristine2')?.['refund_window']?.['days'])['toBe'](0xe);}),it('15b.\x20the\x20registry\x20record\x20lists\x20REGISTERED\x20layers,\x20not\x20declared\x20ones\x20(no\x20empty-shell\x20\x27full\x27)',()=>{const a=buildPristineMergedPack('audit_shell');a['manifest']['layers']=['match','personae','dispute','compliance','supply','rules'],expect(registerIndustryPack(a)['ok'])['toBe'](!![]);const b=getRegisteredPack('audit_shell');expect(b?.['layers'])['toEqual']([]),expect(packKind(b?.['layers']??[]))['toBe']('stub');const c=buildPristineMergedPack('audit_mixed');c['manifest']['layers']=['dispute','compliance','supply','rules'],c['compliance']={'category':'audit_mixed','refund_window':{'days':0x7}};const d=registerIndustryPack(c);expect(d['ok'])['toBe'](!![]),expect(d['registered'])['toEqual'](['compliance']);const e=getRegisteredPack('audit_mixed');expect(e?.['layers'])['toEqual'](['compliance']),expect(packKind(e?.['layers']??[]))['toBe']('full');});}),describe('industry\x20audit\x20—\x20data\x20layers\x20(dispute/compliance/supply/rules)',()=>{it('16.\x20meaningful\x20dispute/compliance/supply/rules\x20register\x20and\x20resolve;\x20structured\x20conditions\x20evaluate',()=>{const a='audit_data',b=registerIndustryPack({'manifest':manifest(a,['dispute','compliance','supply','rules']),'dispute':{'category':a,'sla_tiers':[{'level':'L1','timeout':'72h','description':'standard\x20tier'}],'fault_rules':['late\x20delivery\x20without\x20evidence\x20->\x20merchant']},'compliance':{'category':a,'refund_window':{'days':0xe},'qualification':['Trade\x20License']},'supply':{'category':a,'supplier_qualification':['ISO-9001'],'first_order_policy':'sample-only','redundancy_required':!![]},'rules':{'category':a,'rules':[{'rule_id':'audit_r1','dimension':'risk','description':'must\x20have\x20arbitration','severity':'hard','red_flag':!![],'condition':{'field':'has_arbitration','op':'eq','value':!![]}},{'rule_id':'audit_r2','description':'counterfeit\x20suspicion','condition_hint':'buyer\x20reports\x20counterfeit'}]}});expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual'](['dispute','compliance','supply','rules']),expect(resolveDisputeRules(a)?.['sla_tiers']?.[0x0]?.['level'])['toBe']('L1'),expect(resolveComplianceRules(a)?.['refund_window']?.['days'])['toBe'](0xe),expect(resolveSupplyRules(a)?.['first_order_policy'])['toBe']('sample-only');const c=resolveIndustryRules(a)?.['rules']??[];expect(c)['toHaveLength'](0x2),expect(c[0x1]?.['condition'])['toBeUndefined'](),expect(evaluateIndustryCondition(c[0x0]['condition'],{'facts':{'has_arbitration':!![]},'entities':{}}))['toBe'](!![]),expect(evaluateIndustryCondition(c[0x0]['condition'],{'facts':{'has_arbitration':![]},'entities':{}}))['toBe'](![]);}),it('17.\x20a\x20meaningful\x20match\x20layer\x20is\x20queryable:\x20constraints\x20apply,\x20modes/weights\x20visible',()=>{const a='audit_match',b=registerIndustryPack({'manifest':manifest(a,['match']),'match':{'category':a,'hard_constraints':[{'field':'bPublished','kind':'truthy','description':'service\x20must\x20be\x20published'}],'soft_weights':{'trust':0x28,'price':0xa},'highlight_fields':['wip_hash'],'calendar_mode':'slot','geo_mode':'near','pricing_rules':['time_slot']}});expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual'](['match']);const c=resolveCategoryMatchRules(a);expect(c?.['geo_mode'])['toBe']('near'),expect(c?.['calendar_mode'])['toBe']('slot'),expect(c?.['soft_weights'])['toEqual']({'trust':0x28,'price':0xa});const d=applyHardConstraints(c,[{'bPublished':![]},{'bPublished':!![]}]);expect(d['passed'])['toHaveLength'](0x1),expect(d['dropped'][0x0]?.['candidate'])['toEqual']({'bPublished':![]});}),it('18a.\x20a\x20legal\x20baselines\x20fragment\x20registers\x20and\x20drives\x20mergedBaselinesOverlay\x20into\x20the\x20judgment\x20chain',()=>{const a='audit_base_ok',b={'monitor':{'thresholds':{'messenger_timeout_hours':0x3}}},c=registerIndustryPack({'manifest':manifest(a,['baselines']),'baselines':b});expect(c['ok'])['toBe'](!![]),expect(c['registered'])['toEqual'](['baselines']),expect(resolveIndustryBaselines(a)?.['fragment'])['toEqual'](b);const d=mergedBaselinesOverlay([a]);expect(d)['toEqual'](b),expect(setJudgmentIndustryOverlay(d)['ok'])['toBe'](!![]),expect(getJudgmentDoc()['monitor']['thresholds']['messenger_timeout_hours'])['toBe'](0x3);}),it('18b.\x20a\x20misspelled-dimension\x20baselines\x20fragment\x20is\x20rejected\x20with\x20a\x20visible\x20error\x20(register\x20+\x20scan)',()=>{const a={'evaluation':{'weights':{'trust_revews':0x32}}},b=registerIndustryPack({'manifest':manifest('audit_base_bad',['baselines']),'baselines':a});expect(b['ok'])['toBe'](![]),expect(b['errors']['join']('\x20'))['toContain']('unknown\x20dimension\x20\x27trust_revews\x27'),expect(resolveIndustryBaselines('audit_base_bad'))['toBeUndefined']();const c=join(root,'audit_base_scan');mkdirSync(c,{'recursive':!![]}),writeFileSync(join(c,'pack.json'),JSON['stringify']({'manifest':manifest('audit_base_scan',['baselines']),'baselines':a}),'utf-8');const [d]=scanPacks(root);expect(d['ok'])['toBe'](![]),expect(d['errors']['join']('\x20'))['toContain']('trust_revews');});}),describe('industry\x20audit\x20—\x20playbook\x20layer',()=>{it('19a.\x20real\x20playbook\x20content\x20registers\x20and\x20resolves',()=>{const a='audit_play',b=join(root,a);mkdirSync(b,{'recursive':!![]}),writeFileSync(join(b,'pack.json'),JSON['stringify']({'manifest':manifest(a,['playbook'])}),'utf-8'),writeFileSync(join(b,'playbook.md'),'#\x20audit_play\x20playbook\x0a\x0aAUDIT-REAL:\x20always\x20answer\x20complaint\x20threads\x20within\x204\x20hours.\x0a','utf-8');const [c]=scanPacks(root);expect(c['ok'])['toBe'](!![]),expect(c['registered'])['toContain']('playbook'),expect(resolveIndustryPlaybook(a)?.['content'])['toContain']('AUDIT-REAL');}),it('19b.\x20the\x20scaffolded\x20TEMPLATE\x20playbook\x20is\x20SKIPPED\x20(placeholder\x20bullets\x20carry\x20no\x20registerable\x20content)',()=>{scaffoldIndustryPack('audit_play_tmpl',root);const [a]=scanPacks(root);expect(a['ok'])['toBe'](!![]),expect(a['registered'])['toEqual']([]),expect(resolveIndustryPlaybook('audit_play_tmpl'))['toBeUndefined']();}),it('19c.\x20template\x20+\x20ONE\x20real\x20user\x20line\x20IS\x20meaningful\x20(no\x20false\x20negative\x20on\x20real\x20content)',()=>{scaffoldIndustryPack('audit_play_mix',root);const a=join(root,'audit_play_mix','playbook.md');writeFileSync(a,readFileSync(a,'utf-8')+'\x0a-\x20AUDIT-REAL:\x20answer\x20complaint\x20threads\x20within\x204\x20hours.\x0a','utf-8');const [b]=scanPacks(root);expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toContain']('playbook'),expect(resolveIndustryPlaybook('audit_play_mix')?.['content'])['toContain']('AUDIT-REAL');});}),describe('industry\x20audit\x20—\x20manifest.layers\x20enable\x20flags',()=>{it('20.\x20a\x20layer\x20removed\x20from\x20manifest.layers\x20is\x20ignored\x20even\x20when\x20its\x20section\x20carries\x20real\x20content',()=>{const a='audit_off',b=registerIndustryPack({'manifest':manifest(a,['compliance']),'dispute':{'category':a,'sla_tiers':[{'level':'L1','timeout':'1h'}]},'compliance':{'category':a,'refund_window':{'days':0x7}}});expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual'](['compliance']),expect(resolveComplianceRules(a)?.['refund_window']?.['days'])['toBe'](0x7),expect(resolveDisputeRules(a))['toBeUndefined']();});});
1
+ import{afterEach,beforeEach,describe,expect,it}from'vitest';import{existsSync,mkdirSync,mkdtempSync,readFileSync,rmSync,writeFileSync}from'node:fs';import{tmpdir}from'node:os';import{join}from'node:path';import{buildPristineMergedPack,getRegisteredPack,industryReadmeContent,packKind,registerIndustryPack,scaffoldIndustryPack,scanPacks}from'./industry-pack.js';import{evaluateIndustryCondition,mergedBaselinesOverlay,resolveComplianceRules,resolveDisputeRules,resolveIndustryBaselines,resolveIndustryPlaybook,resolveIndustryRules,resolveSupplyRules}from'./industry-layers.js';import{applyHardConstraints,resolveCategoryMatchRules}from'../evaluation/category-match-rules.js';import{setJudgmentIndustryOverlay,getJudgmentDoc,clearJudgmentLayers}from'../config/judgment.js';import{PERSONA_ROLES}from'../persona/types.js';let root;beforeEach(()=>{root=mkdtempSync(join(tmpdir(),'wowok-industry-audit-'));}),afterEach(()=>{if(existsSync(root))rmSync(root,{'recursive':!![],'force':!![]});clearJudgmentLayers();});function manifest(a,b){return{'pack':'industry-pack','name':a,'display_name':a,'version':'1.0.0','layers':b};}describe('industry\x20audit\x20—\x20scaffold\x20shape',()=>{it('14.\x20scaffold\x20writes\x20pack.json\x20(all\x20sections;\x20baselines/mode\x20null)\x20+\x20template\x20playbook.md',()=>{const a=scaffoldIndustryPack('audit_scaffold',root);expect(a['ok'])['toBe'](!![]),expect(a['files'])['toEqual'](['pack.json','playbook.md']);const b=JSON['parse'](readFileSync(join(a['dir'],'pack.json'),'utf-8'));expect(b['manifest']['pack'])['toBe']('industry-pack'),expect(b['manifest']['layers'])['toContain']('playbook');for(const d of['match','personae','dispute','compliance','supply','rules']){expect(b[d])['not']['toBeNull']();}expect(b['match']?.['category'])['toBe']('audit_scaffold'),expect(b['baselines'])['toBeNull'](),expect(b['mode'])['toBeNull'](),expect(b['compliance']?.['refund_window'])['toEqual']({'not_applicable':!![]}),expect(b['personae'])['toHaveLength'](PERSONA_ROLES['length']);const c=readFileSync(join(a['dir'],'playbook.md'),'utf-8');expect(c)['toContain']('Industry\x20Playbook'),expect(c)['toContain']('(Example)');}),it('14b.\x20industry\x20README\x20documents\x20the\x20baselines\x20layer\x20and\x20legal\x20layer\x20names',()=>{const a=industryReadmeContent();expect(a)['toContain']('##\x20baselines\x20—\x20judgment\x20baselines\x20overlay'),expect(a)['toContain']('factory\x20<\x20pack\x20baselines\x20<\x20persona\x20fragment\x20<\x20user\x20document\x20<\x20session\x20overrides'),expect(a)['toContain']('\x22severity_deduction\x22:\x20{\x20\x22critical\x22:\x2040\x20}'),expect(a)['toContain']('\x22rule_id\x22:\x20\x22R-UTIL-03\x22,\x20\x22enabled\x22:\x20false'),expect(a)['toContain']('Legal'),expect(a)['toContain']('`baselines`,\x20`playbook`');});}),describe('industry\x20audit\x20—\x20meaningful-content\x20gates',()=>{it('15.\x20a\x20pristine\x20(placeholder-only)\x20pack\x20registers\x20NOTHING:\x20every\x20resolve*\x20stays\x20undefined',()=>{const a=buildPristineMergedPack('audit_pristine');a['manifest']['layers']=['match','personae','dispute','compliance','supply','rules'];const b=registerIndustryPack(a);expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual']([]),expect(resolveCategoryMatchRules('audit_pristine'))['toBeUndefined'](),expect(resolveDisputeRules('audit_pristine'))['toBeUndefined'](),expect(resolveComplianceRules('audit_pristine'))['toBeUndefined'](),expect(resolveSupplyRules('audit_pristine'))['toBeUndefined'](),expect(resolveIndustryRules('audit_pristine'))['toBeUndefined'](),expect(resolveIndustryBaselines('audit_pristine'))['toBeUndefined']();const c=buildPristineMergedPack('audit_pristine2');c['manifest']['layers']=['compliance'],c['compliance']={'category':'audit_pristine2','refund_window':{'days':0xe}},expect(registerIndustryPack(c)['registered'])['toEqual'](['compliance']),expect(resolveComplianceRules('audit_pristine2')?.['refund_window']?.['days'])['toBe'](0xe);}),it('15b.\x20the\x20registry\x20record\x20lists\x20REGISTERED\x20layers,\x20not\x20declared\x20ones\x20(no\x20empty-shell\x20\x27full\x27)',()=>{const a=buildPristineMergedPack('audit_shell');a['manifest']['layers']=['match','personae','dispute','compliance','supply','rules'],expect(registerIndustryPack(a)['ok'])['toBe'](!![]);const b=getRegisteredPack('audit_shell');expect(b?.['layers'])['toEqual']([]),expect(packKind(b?.['layers']??[]))['toBe']('stub');const c=buildPristineMergedPack('audit_mixed');c['manifest']['layers']=['dispute','compliance','supply','rules'],c['compliance']={'category':'audit_mixed','refund_window':{'days':0x7}};const d=registerIndustryPack(c);expect(d['ok'])['toBe'](!![]),expect(d['registered'])['toEqual'](['compliance']);const e=getRegisteredPack('audit_mixed');expect(e?.['layers'])['toEqual'](['compliance']),expect(packKind(e?.['layers']??[]))['toBe']('partial');}),it('15c.\x20packKind\x20is\x20three-valued:\x20\x27full\x27\x20only\x20when\x20EVERY\x20business\x20layer\x20is\x20registered\x20(G-05)',()=>{expect(packKind([]))['toBe']('stub'),expect(packKind(['mode','match']))['toBe']('stub'),expect(packKind(['dispute']))['toBe']('partial'),expect(packKind(['mode','match','rules','playbook']))['toBe']('partial'),expect(packKind(['template','dispute','supply']))['toBe']('partial'),expect(packKind(['dispute','compliance','supply','rules','playbook']))['toBe']('full'),expect(packKind(['mode','match','dispute','compliance','supply','rules','playbook']))['toBe']('full');});}),describe('industry\x20audit\x20—\x20data\x20layers\x20(dispute/compliance/supply/rules)',()=>{it('16.\x20meaningful\x20dispute/compliance/supply/rules\x20register\x20and\x20resolve;\x20structured\x20conditions\x20evaluate',()=>{const a='audit_data',b=registerIndustryPack({'manifest':manifest(a,['dispute','compliance','supply','rules']),'dispute':{'category':a,'sla_tiers':[{'level':'L1','timeout':'72h','description':'standard\x20tier'}],'fault_rules':['late\x20delivery\x20without\x20evidence\x20->\x20merchant']},'compliance':{'category':a,'refund_window':{'days':0xe},'qualification':['Trade\x20License']},'supply':{'category':a,'supplier_qualification':['ISO-9001'],'first_order_policy':'sample-only','redundancy_required':!![]},'rules':{'category':a,'rules':[{'rule_id':'audit_r1','dimension':'risk','description':'must\x20have\x20arbitration','severity':'hard','red_flag':!![],'condition':{'field':'has_arbitration','op':'eq','value':!![]}},{'rule_id':'audit_r2','description':'counterfeit\x20suspicion','condition_hint':'buyer\x20reports\x20counterfeit'}]}});expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual'](['dispute','compliance','supply','rules']),expect(resolveDisputeRules(a)?.['sla_tiers']?.[0x0]?.['level'])['toBe']('L1'),expect(resolveComplianceRules(a)?.['refund_window']?.['days'])['toBe'](0xe),expect(resolveSupplyRules(a)?.['first_order_policy'])['toBe']('sample-only');const c=resolveIndustryRules(a)?.['rules']??[];expect(c)['toHaveLength'](0x2),expect(c[0x1]?.['condition'])['toBeUndefined'](),expect(evaluateIndustryCondition(c[0x0]['condition'],{'facts':{'has_arbitration':!![]},'entities':{}}))['toBe'](!![]),expect(evaluateIndustryCondition(c[0x0]['condition'],{'facts':{'has_arbitration':![]},'entities':{}}))['toBe'](![]);}),it('17.\x20a\x20meaningful\x20match\x20layer\x20is\x20queryable:\x20constraints\x20apply,\x20modes/weights\x20visible',()=>{const a='audit_match',b=registerIndustryPack({'manifest':manifest(a,['match']),'match':{'category':a,'hard_constraints':[{'field':'bPublished','kind':'truthy','description':'service\x20must\x20be\x20published'}],'soft_weights':{'trust':0x28,'price':0xa},'highlight_fields':['wip_hash'],'calendar_mode':'slot','geo_mode':'near','pricing_rules':['time_slot']}});expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual'](['match']);const c=resolveCategoryMatchRules(a);expect(c?.['geo_mode'])['toBe']('near'),expect(c?.['calendar_mode'])['toBe']('slot'),expect(c?.['soft_weights'])['toEqual']({'trust':0x28,'price':0xa});const d=applyHardConstraints(c,[{'bPublished':![]},{'bPublished':!![]}]);expect(d['passed'])['toHaveLength'](0x1),expect(d['dropped'][0x0]?.['candidate'])['toEqual']({'bPublished':![]});}),it('18a.\x20a\x20legal\x20baselines\x20fragment\x20registers\x20and\x20drives\x20mergedBaselinesOverlay\x20into\x20the\x20judgment\x20chain',()=>{const a='audit_base_ok',b={'monitor':{'thresholds':{'messenger_timeout_hours':0x3}}},c=registerIndustryPack({'manifest':manifest(a,['baselines']),'baselines':b});expect(c['ok'])['toBe'](!![]),expect(c['registered'])['toEqual'](['baselines']),expect(resolveIndustryBaselines(a)?.['fragment'])['toEqual'](b);const d=mergedBaselinesOverlay([a]);expect(d)['toEqual'](b),expect(setJudgmentIndustryOverlay(d)['ok'])['toBe'](!![]),expect(getJudgmentDoc()['monitor']['thresholds']['messenger_timeout_hours'])['toBe'](0x3);}),it('18b.\x20a\x20misspelled-dimension\x20baselines\x20fragment\x20is\x20rejected\x20with\x20a\x20visible\x20error\x20(register\x20+\x20scan)',()=>{const a={'evaluation':{'weights':{'trust_revews':0x32}}},b=registerIndustryPack({'manifest':manifest('audit_base_bad',['baselines']),'baselines':a});expect(b['ok'])['toBe'](![]),expect(b['errors']['join']('\x20'))['toContain']('unknown\x20dimension\x20\x27trust_revews\x27'),expect(resolveIndustryBaselines('audit_base_bad'))['toBeUndefined']();const c=join(root,'audit_base_scan');mkdirSync(c,{'recursive':!![]}),writeFileSync(join(c,'pack.json'),JSON['stringify']({'manifest':manifest('audit_base_scan',['baselines']),'baselines':a}),'utf-8');const [d]=scanPacks(root);expect(d['ok'])['toBe'](![]),expect(d['errors']['join']('\x20'))['toContain']('trust_revews');});}),describe('industry\x20audit\x20—\x20playbook\x20layer',()=>{it('19a.\x20real\x20playbook\x20content\x20registers\x20and\x20resolves',()=>{const a='audit_play',b=join(root,a);mkdirSync(b,{'recursive':!![]}),writeFileSync(join(b,'pack.json'),JSON['stringify']({'manifest':manifest(a,['playbook'])}),'utf-8'),writeFileSync(join(b,'playbook.md'),'#\x20audit_play\x20playbook\x0a\x0aAUDIT-REAL:\x20always\x20answer\x20complaint\x20threads\x20within\x204\x20hours.\x0a','utf-8');const [c]=scanPacks(root);expect(c['ok'])['toBe'](!![]),expect(c['registered'])['toContain']('playbook'),expect(resolveIndustryPlaybook(a)?.['content'])['toContain']('AUDIT-REAL');}),it('19b.\x20the\x20scaffolded\x20TEMPLATE\x20playbook\x20is\x20SKIPPED\x20(placeholder\x20bullets\x20carry\x20no\x20registerable\x20content)',()=>{scaffoldIndustryPack('audit_play_tmpl',root);const [a]=scanPacks(root);expect(a['ok'])['toBe'](!![]),expect(a['registered'])['toEqual']([]),expect(resolveIndustryPlaybook('audit_play_tmpl'))['toBeUndefined']();}),it('19c.\x20template\x20+\x20ONE\x20real\x20user\x20line\x20IS\x20meaningful\x20(no\x20false\x20negative\x20on\x20real\x20content)',()=>{scaffoldIndustryPack('audit_play_mix',root);const a=join(root,'audit_play_mix','playbook.md');writeFileSync(a,readFileSync(a,'utf-8')+'\x0a-\x20AUDIT-REAL:\x20answer\x20complaint\x20threads\x20within\x204\x20hours.\x0a','utf-8');const [b]=scanPacks(root);expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toContain']('playbook'),expect(resolveIndustryPlaybook('audit_play_mix')?.['content'])['toContain']('AUDIT-REAL');});}),describe('industry\x20audit\x20—\x20manifest.layers\x20enable\x20flags',()=>{it('20.\x20a\x20layer\x20removed\x20from\x20manifest.layers\x20is\x20ignored\x20even\x20when\x20its\x20section\x20carries\x20real\x20content',()=>{const a='audit_off',b=registerIndustryPack({'manifest':manifest(a,['compliance']),'dispute':{'category':a,'sla_tiers':[{'level':'L1','timeout':'1h'}]},'compliance':{'category':a,'refund_window':{'days':0x7}}});expect(b['ok'])['toBe'](!![]),expect(b['registered'])['toEqual'](['compliance']),expect(resolveComplianceRules(a)?.['refund_window']?.['days'])['toBe'](0x7),expect(resolveDisputeRules(a))['toBeUndefined']();});});
@@ -54,13 +54,14 @@ export interface PackRecord {
54
54
  export declare function validatePackManifest(manifest: IndustryPackManifest): PackValidation;
55
55
  export declare function ensureIndustryProfile(pack: IndustryPack, errors: string[]): void;
56
56
  export declare function registerIndustryPack(pack: IndustryPack, force?: boolean): PackRegistrationResult;
57
- export declare function packKind(layers: string[]): "full" | "stub";
57
+ export type PackKind = "full" | "partial" | "stub";
58
+ export declare function packKind(layers: string[]): PackKind;
58
59
  export declare function getRegisteredPack(name: string): (PackRecord & {
59
60
  name: string;
60
61
  }) | undefined;
61
62
  export declare function listRegisteredPacks(): Array<PackRecord & {
62
63
  name: string;
63
- kind: "full" | "stub";
64
+ kind: PackKind;
64
65
  product_refs: string[];
65
66
  }>;
66
67
  export declare function unregisterIndustryPack(name: string): boolean;