pomaster 0.4.0 → 0.5.1

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 (229) hide show
  1. package/README.md +102 -183
  2. package/catalog/catalog-lock.draft.json +117 -117
  3. package/catalog/policies/policy.ai.change_plan_first.json +1 -1
  4. package/catalog/policies/policy.ai.fact_inference_separation.json +1 -1
  5. package/catalog/policies/policy.ai.read_search_verify_before_write.json +1 -1
  6. package/catalog/policies/policy.ai.rule_relaxation_approval.json +1 -1
  7. package/catalog/policies/policy.arch.adr_immutable_history.json +1 -1
  8. package/catalog/policies/policy.arch.no_convenience_over_boundary.json +1 -1
  9. package/catalog/policies/policy.arch.prefer_verifiable_option.json +2 -2
  10. package/catalog/policies/policy.authz.no_gating_proxy_trust.json +1 -1
  11. package/catalog/policies/policy.authz.permission_scope_expansion_gate.json +1 -1
  12. package/catalog/policies/policy.authz.server_five_factor_verification.json +1 -1
  13. package/catalog/policies/policy.be.conc.prefer_db_constraints.json +1 -1
  14. package/catalog/policies/policy.be.db.expand_migrate_contract.json +1 -1
  15. package/catalog/policies/policy.be.idem.key_payload_conflict.json +1 -1
  16. package/catalog/policies/policy.be.model.single_boundary_conversion.json +1 -1
  17. package/catalog/policies/policy.be.sql.index_for_known_queries.json +1 -1
  18. package/catalog/policies/policy.be.state.single_rule_source.json +1 -1
  19. package/catalog/policies/policy.be.txn.short_locks_compensation.json +1 -1
  20. package/catalog/policies/policy.bound.search_first_entry_only.json +1 -1
  21. package/catalog/policies/policy.boundary.validate_in_encode_out.json +1 -1
  22. package/catalog/policies/policy.cache.failure_mode_guards.json +1 -1
  23. package/catalog/policies/policy.cache.schema_versioning.json +1 -1
  24. package/catalog/policies/policy.cfg.config_attribute_completeness.json +1 -1
  25. package/catalog/policies/policy.cfg.key_rename_dual_read.json +1 -1
  26. package/catalog/policies/policy.cfg.no_secret_dispersal.json +1 -1
  27. package/catalog/policies/policy.cfg.production_safe_defaults.json +1 -1
  28. package/catalog/policies/policy.cfg.schema_backed_config.json +1 -1
  29. package/catalog/policies/policy.chg.no_unrelated_changes.json +1 -1
  30. package/catalog/policies/policy.contract.no_invented_facts.json +1 -1
  31. package/catalog/policies/policy.dep.build_path_supply_chain.json +1 -1
  32. package/catalog/policies/policy.dep.no_untrusted_source_no_lock_bypass.json +1 -1
  33. package/catalog/policies/policy.dep.time_boxed_urgent_exception.json +1 -1
  34. package/catalog/policies/policy.deploy.no_dev_env_as_production_fact.json +1 -1
  35. package/catalog/policies/policy.deploy.operational_capabilities.json +1 -1
  36. package/catalog/policies/policy.deploy.runtime_fact_record.json +1 -1
  37. package/catalog/policies/policy.err.failure_five_part_mapping.json +1 -1
  38. package/catalog/policies/policy.err.no_internal_detail_exposure.json +1 -1
  39. package/catalog/policies/policy.err.published_code_immutable.json +1 -1
  40. package/catalog/policies/policy.evid.acceptance_binds_verifiable_evidence.json +1 -1
  41. package/catalog/policies/policy.evid.no_silent_gate_removal.json +1 -1
  42. package/catalog/policies/policy.evid.no_unverifiable_pass.json +1 -1
  43. package/catalog/policies/policy.flag.cleanup_after_full_rollout.json +1 -1
  44. package/catalog/policies/policy.flag.consistent_off_state.json +1 -1
  45. package/catalog/policies/policy.flag.kill_switch.json +1 -1
  46. package/catalog/policies/policy.flag.lifecycle_metadata.json +1 -1
  47. package/catalog/policies/policy.flag.not_a_permission.json +1 -1
  48. package/catalog/policies/policy.gate.p0_non_bypassable.json +1 -1
  49. package/catalog/policies/policy.gate.risk_factors_confirmed.json +1 -1
  50. package/catalog/policies/policy.guard.no_check_weakening.json +2 -2
  51. package/catalog/policies/policy.integration.call_definition_minimum.json +1 -1
  52. package/catalog/policies/policy.integration.fault_containment.json +1 -1
  53. package/catalog/policies/policy.job.lifecycle_definition.json +1 -1
  54. package/catalog/policies/policy.job.no_unmanaged_execution.json +1 -1
  55. package/catalog/policies/policy.job.operational_features.json +1 -1
  56. package/catalog/policies/policy.obs.actionable_signals.json +1 -1
  57. package/catalog/policies/policy.obs.alert_with_owner.json +1 -1
  58. package/catalog/policies/policy.obs.context_field_baseline.json +1 -1
  59. package/catalog/policies/policy.obs.no_sensitive_or_unbounded_logging.json +1 -1
  60. package/catalog/policies/policy.obs.no_sensitive_raw_values.json +1 -1
  61. package/catalog/policies/policy.obs.signal_change_impact.json +1 -1
  62. package/catalog/policies/policy.obs.source_map_access_control.json +1 -1
  63. package/catalog/policies/policy.obs.telemetry_lifecycle_declared.json +1 -1
  64. package/catalog/policies/policy.obs.trace_correlation.json +1 -1
  65. package/catalog/policies/policy.perf.budget_change_retest.json +1 -1
  66. package/catalog/policies/policy.perf.evidence_binding.json +1 -1
  67. package/catalog/policies/policy.perf.observation_dimensions.json +1 -1
  68. package/catalog/policies/policy.proc.checklist_change_policy.json +2 -2
  69. package/catalog/policies/policy.proc.scope_drift_reclassify.json +1 -1
  70. package/catalog/policies/policy.prv.processing_scope_re_review.json +1 -1
  71. package/catalog/policies/policy.prv.sensitive_data_six_facts.json +1 -1
  72. package/catalog/policies/policy.registry.human_fields_validated_decorrelated.json +1 -1
  73. package/catalog/policies/policy.rel.no_irreversible_unmonitored_full_release.json +1 -1
  74. package/catalog/policies/policy.rel.observability_before_ship.json +1 -1
  75. package/catalog/policies/policy.rel.process_change_needs_drill_audit.json +1 -1
  76. package/catalog/policies/policy.rel.traceable_build.json +1 -1
  77. package/catalog/policies/policy.role.human_signs_for_ai.json +1 -1
  78. package/catalog/policies/policy.sec.authn_policy_unified.json +1 -1
  79. package/catalog/policies/policy.sec.no_client_side_trust.json +4 -1
  80. package/catalog/policies/policy.sec.no_longterm_security_disable.json +1 -1
  81. package/catalog/policies/policy.sec.no_script_readable_credentials.json +1 -1
  82. package/catalog/policies/policy.sec.no_secrets_in_client_surface.json +2 -2
  83. package/catalog/policies/policy.sec.relaxation_approval.json +1 -1
  84. package/catalog/policies/policy.sec.security_relaxation_gate.json +4 -1
  85. package/catalog/policies/policy.sec.trust_boundary_enforcement.json +4 -1
  86. package/catalog/policies/policy.sec.upload_download_server_recheck.json +1 -1
  87. package/catalog/policies/policy.sec.url_source_allowlist.json +1 -1
  88. package/catalog/policies/policy.spec.family_conflict_precedence.json +1 -1
  89. package/catalog/policies/policy.spec.freeze_before_use.json +1 -1
  90. package/catalog/policies/policy.spec.primary_source_basis.json +1 -1
  91. package/catalog/policies/policy.struct.module_entry_dependency_declared.json +1 -1
  92. package/catalog/policies/policy.struct.no_unexplained_top_level_dir.json +1 -1
  93. package/catalog/policies/policy.struct.reuse_proven_structure.json +1 -1
  94. package/catalog/policies/policy.test.control_nondeterminism_keep_diagnosis.json +1 -1
  95. package/catalog/policies/policy.test.isolation_and_cleanup.json +1 -1
  96. package/catalog/policies/policy.test.no_synthetic_stability.json +1 -1
  97. package/catalog/policies/policy.test.pyramid_and_ci_matrix.json +1 -1
  98. package/catalog/policies/policy.test.removal_justification.json +1 -1
  99. package/catalog/policies/policy.test.removal_needs_substitute_evidence.json +1 -1
  100. package/catalog/policies/policy.test.risk_driven_plan.json +1 -1
  101. package/catalog/policies/policy.test.stable_observable_assertions.json +1 -1
  102. package/catalog/policies/policy.tool.discoverable_toolchain.json +1 -1
  103. package/catalog/policies/policy.tool.no_hand_edit_generated_no_ci_drift.json +1 -1
  104. package/catalog/policies/policy.tool.no_vendored_body_edits.json +1 -1
  105. package/catalog/policies/policy.tool.upgrade_verify_lock_rollback.json +1 -1
  106. package/catalog/policies/policy.web.comp.no_trivial_or_god_component.json +1 -1
  107. package/catalog/policies/policy.web.comp.public_contract_completeness.json +1 -1
  108. package/catalog/policies/policy.web.copy.action_object_clarity.json +1 -1
  109. package/catalog/policies/policy.web.copy.enumerable_placement.json +1 -1
  110. package/catalog/policies/policy.web.copy.error_next_step.json +1 -1
  111. package/catalog/policies/policy.web.handoff.state_matrix_full.json +1 -1
  112. package/catalog/policies/policy.web.i18n.copy_key_discipline.json +1 -1
  113. package/catalog/policies/policy.web.i18n.raw_value_for_compute.json +1 -1
  114. package/catalog/policies/policy.web.page.region_consistency.json +1 -1
  115. package/catalog/policies/policy.web.track.attempt_result_correlation.json +1 -1
  116. package/catalog/policies/policy.web.track.no_synthetic_actions.json +1 -1
  117. package/catalog/policies/policy.web.track.typed_client_validation.json +1 -1
  118. package/catalog/policies/policy.wf.no_planned_as_verified.json +1 -1
  119. package/catalog/policies/policy.wf.task_facts_preconfirm.json +1 -1
  120. package/dist/bin.js +11233 -7336
  121. package/legal/THIRD_PARTY_NOTICES.md +461 -35
  122. package/package.json +1 -1
  123. package/seeds/aggregation-manifest.json +691 -0
  124. package/seeds/manifest.json +466 -1043
  125. package/seeds/specs/hard/stacks/antdesign/antdesign-ui-overlay.md +48 -0
  126. package/seeds/specs/hard/stacks/antdesign/index.md +20 -0
  127. package/seeds/specs/hard/stacks/css/css-system-overlay.md +52 -0
  128. package/seeds/specs/hard/stacks/css/index.md +20 -0
  129. package/seeds/specs/hard/stacks/geist/geist-design-system-overlay.md +48 -0
  130. package/seeds/specs/hard/stacks/geist/index.md +20 -0
  131. package/seeds/specs/hard/stacks/vue3/index.md +20 -0
  132. package/seeds/specs/hard/stacks/vue3/vue3-framework-overlay.md +71 -0
  133. package/seeds/specs/hard/themes/ai-generated-code.md +171 -0
  134. package/seeds/specs/hard/themes/api-contract-and-error-semantics.md +532 -0
  135. package/seeds/specs/hard/themes/architecture-and-module-boundaries.md +323 -0
  136. package/seeds/specs/hard/themes/data-and-transactions.md +582 -0
  137. package/seeds/specs/hard/themes/engineering-toolchain-and-dependencies.md +333 -0
  138. package/seeds/specs/hard/themes/environment-and-configuration.md +196 -0
  139. package/seeds/specs/hard/themes/frontend-state-and-client-data.md +342 -0
  140. package/seeds/specs/hard/themes/index.md +374 -0
  141. package/seeds/specs/hard/themes/integration-and-async-runtime.md +331 -0
  142. package/seeds/specs/hard/{frontend/38-internationalization-protocol.md → themes/internationalization-and-copywriting.md} +112 -5
  143. package/seeds/specs/hard/themes/observability-and-analytics.md +305 -0
  144. package/seeds/specs/hard/themes/page-composition-and-browser-environment.md +554 -0
  145. package/seeds/specs/hard/{frontend/31-performance-protocol.md → themes/performance-and-capacity.md} +95 -6
  146. package/seeds/specs/hard/themes/permission-and-authorization.md +168 -0
  147. package/seeds/specs/hard/themes/privacy-and-data-lifecycle.md +176 -0
  148. package/seeds/specs/hard/themes/release-and-feature-flags.md +237 -0
  149. package/seeds/specs/hard/{frontend/04-security-protocol.md → themes/security.md} +95 -6
  150. package/seeds/specs/hard/themes/task-governance-and-acceptance.md +554 -0
  151. package/seeds/specs/hard/themes/testing-and-verification.md +266 -0
  152. package/seeds/specs/hard/themes/ui-presentation-and-design.md +670 -0
  153. package/seeds/specs/hard/themes/value-semantics-and-domain-data.md +339 -0
  154. package/seeds/specs/hard/backend/01-architecture-governance-protocol.md +0 -68
  155. package/seeds/specs/hard/backend/02-project-structure-governance-protocol.md +0 -68
  156. package/seeds/specs/hard/backend/03-directory-boundary-protocol.md +0 -68
  157. package/seeds/specs/hard/backend/04-layering-architecture-protocol.md +0 -68
  158. package/seeds/specs/hard/backend/05-task-workflow-protocol.md +0 -68
  159. package/seeds/specs/hard/backend/06-ai-generated-code-protocol.md +0 -68
  160. package/seeds/specs/hard/backend/07-evidence-acceptance-protocol.md +0 -68
  161. package/seeds/specs/hard/backend/08-contract-change-protocol.md +0 -68
  162. package/seeds/specs/hard/backend/09-role-responsibility-protocol.md +0 -68
  163. package/seeds/specs/hard/backend/10-security-protocol.md +0 -68
  164. package/seeds/specs/hard/backend/11-environment-configuration-protocol.md +0 -67
  165. package/seeds/specs/hard/backend/12-api-contract-protocol.md +0 -68
  166. package/seeds/specs/hard/backend/13-privacy-data-lifecycle-protocol.md +0 -68
  167. package/seeds/specs/hard/backend/14-business-rules-state-protocol.md +0 -68
  168. package/seeds/specs/hard/backend/15-data-model-protocol.md +0 -68
  169. package/seeds/specs/hard/backend/16-error-code-protocol.md +0 -68
  170. package/seeds/specs/hard/backend/17-permission-authorization-protocol.md +0 -68
  171. package/seeds/specs/hard/backend/18-database-schema-migration-protocol.md +0 -68
  172. package/seeds/specs/hard/backend/19-query-index-sql-protocol.md +0 -68
  173. package/seeds/specs/hard/backend/20-transaction-boundary-protocol.md +0 -68
  174. package/seeds/specs/hard/backend/21-concurrency-locking-protocol.md +0 -68
  175. package/seeds/specs/hard/backend/22-idempotency-protocol.md +0 -68
  176. package/seeds/specs/hard/backend/23-cache-redis-consistency-protocol.md +0 -68
  177. package/seeds/specs/hard/backend/24-external-integration-resilience-protocol.md +0 -68
  178. package/seeds/specs/hard/backend/25-async-job-scheduler-protocol.md +0 -68
  179. package/seeds/specs/hard/backend/26-engineering-tooling-protocol.md +0 -68
  180. package/seeds/specs/hard/backend/27-dependency-supply-chain-protocol.md +0 -68
  181. package/seeds/specs/hard/backend/28-testing-protocol.md +0 -68
  182. package/seeds/specs/hard/backend/29-observability-logging-tracing-protocol.md +0 -68
  183. package/seeds/specs/hard/backend/30-performance-capacity-protocol.md +0 -68
  184. package/seeds/specs/hard/backend/31-runtime-deployment-protocol.md +0 -68
  185. package/seeds/specs/hard/backend/32-release-versioning-rollback-protocol.md +0 -68
  186. package/seeds/specs/hard/backend/index.md +0 -177
  187. package/seeds/specs/hard/frontend/01-development-checklist-protocol.md +0 -86
  188. package/seeds/specs/hard/frontend/02-ai-generated-code-protocol.md +0 -82
  189. package/seeds/specs/hard/frontend/03-acceptance-gate-protocol.md +0 -86
  190. package/seeds/specs/hard/frontend/05-environment-configuration-protocol.md +0 -80
  191. package/seeds/specs/hard/frontend/06-change-governance-protocol.md +0 -90
  192. package/seeds/specs/hard/frontend/07-frontend-backend-communication-protocol.md +0 -219
  193. package/seeds/specs/hard/frontend/08-role-responsibility-protocol.md +0 -80
  194. package/seeds/specs/hard/frontend/09-module-boundary-protocol.md +0 -81
  195. package/seeds/specs/hard/frontend/10-engineering-tooling-protocol.md +0 -89
  196. package/seeds/specs/hard/frontend/11-dependency-package-management-protocol.md +0 -87
  197. package/seeds/specs/hard/frontend/12-business-rules-protocol.md +0 -79
  198. package/seeds/specs/hard/frontend/13-monetary-precision-protocol.md +0 -81
  199. package/seeds/specs/hard/frontend/14-data-model-protocol.md +0 -85
  200. package/seeds/specs/hard/frontend/15-request-api-protocol.md +0 -87
  201. package/seeds/specs/hard/frontend/16-error-handling-protocol.md +0 -79
  202. package/seeds/specs/hard/frontend/17-permission-protocol.md +0 -79
  203. package/seeds/specs/hard/frontend/18-state-management-protocol.md +0 -88
  204. package/seeds/specs/hard/frontend/19-cache-protocol.md +0 -79
  205. package/seeds/specs/hard/frontend/20-testing-protocol.md +0 -88
  206. package/seeds/specs/hard/frontend/21-design-system-protocol.md +0 -79
  207. package/seeds/specs/hard/frontend/22-theme-protocol.md +0 -79
  208. package/seeds/specs/hard/frontend/23-accessibility-protocol.md +0 -189
  209. package/seeds/specs/hard/frontend/24-component-protocol.md +0 -80
  210. package/seeds/specs/hard/frontend/25-page-structure-protocol.md +0 -79
  211. package/seeds/specs/hard/frontend/26-style-layout-protocol.md +0 -80
  212. package/seeds/specs/hard/frontend/27-rendering-state-protocol.md +0 -81
  213. package/seeds/specs/hard/frontend/28-form-protocol.md +0 -88
  214. package/seeds/specs/hard/frontend/29-routing-url-protocol.md +0 -79
  215. package/seeds/specs/hard/frontend/30-data-grid-protocol.md +0 -83
  216. package/seeds/specs/hard/frontend/32-file-import-export-protocol.md +0 -80
  217. package/seeds/specs/hard/frontend/33-release-versioning-protocol.md +0 -79
  218. package/seeds/specs/hard/frontend/34-monitoring-logging-protocol.md +0 -128
  219. package/seeds/specs/hard/frontend/35-mock-protocol.md +0 -97
  220. package/seeds/specs/hard/frontend/36-feature-flag-protocol.md +0 -79
  221. package/seeds/specs/hard/frontend/37-browser-device-compatibility-protocol.md +0 -83
  222. package/seeds/specs/hard/frontend/39-copywriting-protocol.md +0 -79
  223. package/seeds/specs/hard/frontend/40-analytics-protocol.md +0 -98
  224. package/seeds/specs/hard/frontend/41-design-handoff-protocol.md +0 -80
  225. package/seeds/specs/hard/frontend/42-browser-runtime-lifecycle-protocol.md +0 -86
  226. package/seeds/specs/hard/frontend/43-time-temporal-protocol.md +0 -86
  227. package/seeds/specs/hard/frontend/44-privacy-data-lifecycle-protocol.md +0 -87
  228. package/seeds/specs/hard/frontend/45-browser-storage-protocol.md +0 -87
  229. package/seeds/specs/hard/frontend/index.md +0 -308
@@ -0,0 +1,339 @@
1
+ ---
2
+ seed_source: packages/cli/seeds/aggregation-manifest.json
3
+ seed_source_sha256: 039b637ccffacdfe3ce30d85e193f4b38928fcdfb16efdc4eb255e35e05af91f
4
+ seed_version: B7-THEME
5
+ lane: [frontend]
6
+ status: CURRENT
7
+ authority_scope: mixed_required_and_advisory
8
+ applies_to: [frontend]
9
+ related_evidence_specs: []
10
+ related_tools: []
11
+ legacy_id: theme:value-semantics-and-domain-data
12
+ criticality: standard # 聚合注记:来源无 criticality 字段,取中性默认;info 性注记非执行语义
13
+ injection_mode: mixed # 聚合注记:来源无 injection_mode 字段(默认基线 + 任务命中激活模型);info 性注记非执行语义
14
+ stages: [] # 聚合注记:来源无 stages 字段;info 性注记非执行语义
15
+ triggers: [] # 聚合注记:来源无 triggers 字段;info 性注记非执行语义
16
+ requires: [] # 聚合注记:来源 requires 并集(全空)
17
+ x-aggregation: # 聚合来源(D6):逐源 vendor pin(sha256 与卡 vendor_pin 同值)
18
+ - seed_source: pomaster/components/frontend-hard-spec/assets/universal/12-business-rules-protocol.md
19
+ sha256: dda683a7c907989032c82a2c1c3e552b51226e0e0cd5bdf3b6068cc7f649c525
20
+ seed_version: B6B-1
21
+ - seed_source: pomaster/components/frontend-hard-spec/assets/universal/13-monetary-precision-protocol.md
22
+ sha256: 4930246c7dfed2751d3a71d617a21e24b46b376131723451b39152582c7a3d4f
23
+ seed_version: B6B-1
24
+ - seed_source: pomaster/components/frontend-hard-spec/assets/universal/14-data-model-protocol.md
25
+ sha256: 7d4e31ef04a1f57d88e982c01dabc22c421bafc850b7295a73d084ec3c6fc838
26
+ seed_version: B6B-1
27
+ - seed_source: pomaster/components/frontend-hard-spec/assets/universal/43-time-temporal-protocol.md
28
+ sha256: 4669cc3d927289f99bbd66c3e906f97d548f0cf8ea9e94b66e8b21cb24d00afb
29
+ seed_version: B6B-2
30
+ ---
31
+
32
+ # 值语义与领域数据
33
+
34
+ > **聚合纪律**:本文档 12 节正文规则行逐字取自 frontmatter x-aggregation 所列来源协议(节内按「端 → 源编号升序」以加粗来源行分块,源内标题与层级原样保留),零新增、零改写、零删除;新增文本仅限文档标题、本注记与逐节来源行。
35
+
36
+ ## Scope
37
+
38
+ **源:FE 12 业务规则协议(pomaster/components/frontend-hard-spec/assets/universal/12-business-rules-protocol.md)**
39
+
40
+ P1。定义领域校验、操作许可、状态流转、时间范围、金额规则入口和后端兜底关系。
41
+
42
+ **源:FE 13 金额精度协议(pomaster/components/frontend-hard-spec/assets/universal/13-monetary-precision-protocol.md)**
43
+
44
+ P1。定义金额、单价、成本、汇率、比例和汇总的传输、计算、比较、展示与导出精度。
45
+
46
+ **源:FE 14 数据模型协议(pomaster/components/frontend-hard-spec/assets/universal/14-data-model-protocol.md)**
47
+
48
+ P1。定义 API DTO、Adapter、Domain Model、ViewModel、FormModel 和 RowModel 的分层。
49
+
50
+ **源:FE 43 时间、日期与时区协议(pomaster/components/frontend-hard-spec/assets/universal/43-time-temporal-protocol.md)**
51
+
52
+ P1。定义时间点、日历日期、墙上时间、带时区计划、持续时长、序列化、计算、显示和测试语义。
53
+
54
+ ## Non-Scope
55
+
56
+ **源:FE 12 业务规则协议**
57
+
58
+ 不定义视觉呈现,不允许前端规则替代后端权威规则。
59
+
60
+ **源:FE 13 金额精度协议**
61
+
62
+ 不定义业务公式、税务政策、币种范围或最终结算口径。
63
+
64
+ **源:FE 14 数据模型协议**
65
+
66
+ 不定义接口传输协议或具体业务公式,不允许模型层承担页面布局。
67
+
68
+ **源:FE 43 时间、日期与时区协议**
69
+
70
+ 不决定项目业务时区、营业日历、节假日或具体日期库,不替代国际化显示协议。
71
+
72
+ ## Terms
73
+
74
+ **源:FE 12 业务规则协议**
75
+
76
+ - Domain Rule:不依赖具体页面的业务判断。
77
+ - State Machine:合法状态及转换集合。
78
+ - Authoritative Validation:决定业务结果的后端校验。
79
+
80
+ **源:FE 13 金额精度协议**
81
+
82
+ - Amount:十进制定点值。
83
+ - Currency:正式币种标识。
84
+ - Scale:小数位数量。
85
+ - Rounding Mode/Stage:舍入方式与时点。
86
+
87
+ **源:FE 14 数据模型协议**
88
+
89
+ - DTO:接口原始结构。
90
+ - Adapter:边界转换函数。
91
+ - Domain Model:稳定业务语义模型。
92
+ - ViewModel:面向展示或交互的模型。
93
+
94
+ **源:FE 43 时间、日期与时区协议**
95
+
96
+ - Instant:全球唯一的精确时间点。
97
+ - Local Date:不带时间与时区的日历日期。
98
+ - Wall-clock Time:某地日历和时钟上的本地时间,不天然对应唯一 Instant。
99
+ - Zoned Schedule:带命名时区和日历规则的计划时间。
100
+ - Duration:两个时间点之间的经过量或业务定义时长。
101
+
102
+ ## MUST
103
+
104
+ **源:FE 12 业务规则协议 · §MUST**
105
+
106
+ - 规则集中存放、命名、测试并有 Owner。
107
+ - 页面和组件调用规则函数,不复制表达式。
108
+ - 状态转换声明来源、目标、条件、权限和失败码。
109
+ - 金额、比例、日期区间和操作限制有明确契约。
110
+ - 后端执行最终一致性和权威校验。
111
+
112
+ **源:FE 13 金额精度协议 · §MUST**
113
+
114
+ - 金额声明 amount、currency、scale 和舍入规则。
115
+ - 传输使用十进制字符串或无歧义最小单位整数。
116
+ - 权威计算使用 Decimal/BigDecimal 等十进制能力。
117
+ - 区分原始、计算、展示和导出值。
118
+ - 汇总按正式顺序计算和舍入。
119
+ - 百分比声明传输倍率。
120
+
121
+ **源:FE 14 数据模型协议 · §MUST**
122
+
123
+ - 使用 `DTO -> Adapter -> Domain Model -> View/Form/Row Model` 链路。
124
+ - 明确类型命名、位置、Owner 和公开边界。
125
+ - 空值、未知枚举、日期、金额和单位在边界统一处理。
126
+ - API、浏览器存储、跨窗口消息、运行时配置和第三方 SDK 等外部数据必须在信任边界执行 schema 校验后再转换;失败时保守降级并产生安全监控。
127
+ - opaque ID、超出 JavaScript safe integer 的整数和高精度数值必须使用不会静默丢失精度的传输与模型类型。
128
+ - 后端字段变化优先只影响契约和 adapter。
129
+ - adapter 有正常、空值、未知值和边界测试。
130
+
131
+ **源:FE 43 时间、日期与时区协议 · §MUST**
132
+
133
+ - 每个时间字段必须分类为 Instant、Local Date、Wall-clock Time、Zoned Schedule 或 Duration,并在契约中记录精度、时区、日历和空值语义。
134
+ - 跨系统传输必须使用无歧义、版本化的机器格式;Instant 携带 UTC 或明确 offset,Zoned Schedule 同时保留命名时区。
135
+ - Local Date 不得隐式转换为午夜 Instant;Wall-clock Time 转换为 Instant 时必须提供时区和夏令时歧义策略。
136
+ - 解析必须使用明确格式,不依赖浏览器 locale、宿主默认时区或实现相关的字符串猜测。
137
+ - 比较、排序、筛选和计算必须使用规范化原始值,不得使用本地化显示文本。
138
+ - 时间单位必须显式,秒、毫秒、微秒等不得依靠数值大小猜测。
139
+ - 当前时间必须经可替换 Clock 获取;测试必须固定 Clock、时区和 locale,并覆盖月末、闰日、夏令时跳变及重复时刻。
140
+ - 经过时长和超时测量必须使用不受系统时钟回拨影响的单调时间来源;业务日历计算使用明确规则。
141
+
142
+ ## MUST NOT
143
+
144
+ **源:FE 12 业务规则协议 · §MUST NOT**
145
+
146
+ - MUST NOT 将同一规则散落在组件、文案和 API 回调。
147
+ - MUST NOT 以按钮禁用代替后端校验。
148
+ - MUST NOT 在无正式来源时发明状态或公式。
149
+ - MUST NOT 用展示文案作为规则返回值。
150
+
151
+ **源:FE 13 金额精度协议 · §MUST NOT**
152
+
153
+ - MUST NOT 使用二进制浮点执行正式金额累计、乘除和相等比较。
154
+ - MUST NOT 用 `toFixed` 代替十进制计算。
155
+ - MUST NOT 混合币种直接求和。
156
+ - MUST NOT 页面、报表、导出各自决定精度。
157
+
158
+ **源:FE 14 数据模型协议 · §MUST NOT**
159
+
160
+ - MUST NOT 让 DTO 穿透公共组件、模板或列定义。
161
+ - MUST NOT 在页面重复字段转换和兜底。
162
+ - MUST NOT 使用万能对象代替类型。
163
+ - MUST NOT 在模型转换中隐藏正式业务计算。
164
+ - MUST NOT 用 TypeScript 类型、类型断言或生成类型替代运行时外部数据校验。
165
+ - MUST NOT 把 opaque ID 或大整数转成可能丢失精度的 `number`。
166
+
167
+ **源:FE 43 时间、日期与时区协议 · §MUST NOT**
168
+
169
+ - MUST NOT 用字符串截断、手工 offset 加减或固定 24 小时替代日历/时区运算。
170
+ - MUST NOT 把无时区值静默解释为浏览器本地时区或 UTC。
171
+ - MUST NOT 混用秒与毫秒、日期与时间点、经过时长与日历天数。
172
+ - MUST NOT 将格式化后的日期时间用于计算、排序、缓存键或接口提交。
173
+ - MUST NOT 在业务代码中直接读取不可控的系统当前时间。
174
+
175
+ ## SHOULD
176
+
177
+ **源:FE 12 业务规则协议 · §SHOULD**
178
+
179
+ - SHOULD 使用纯函数、schema 和状态机表达可测试规则。
180
+ - SHOULD 返回稳定原因码供 UI 映射文案。
181
+
182
+ **源:FE 13 金额精度协议 · §SHOULD**
183
+
184
+ - SHOULD 使用统一 Money/Decimal 类型、parser 和 formatter。
185
+ - SHOULD 测试负数、极值、尾数 5、汇总和跨币种边界。
186
+
187
+ **源:FE 14 数据模型协议 · §SHOULD**
188
+
189
+ - SHOULD 使用 schema 校验外部数据。
190
+ - SHOULD 为未知枚举保留安全兜底和监控。
191
+
192
+ **源:FE 43 时间、日期与时区协议 · §SHOULD**
193
+
194
+ - SHOULD 使用能区分日期、时间点、带时区时间和 Duration 的标准平台 API 或经评审的时间库。
195
+ - SHOULD 在用户界面明确展示与用户预期不同的业务时区。
196
+ - SHOULD 在日志和审计中同时记录规范化时间、时区上下文和事件顺序标识。
197
+
198
+ ## Contract
199
+
200
+ **源:FE 12 业务规则协议 · §Contract**
201
+
202
+ ```text
203
+ RuleId, Inputs, Preconditions, Result,
204
+ ReasonCodes[], BackendEnforcement, Owner, Version
205
+ ```
206
+
207
+ **源:FE 13 金额精度协议 · §Contract**
208
+
209
+ ```text
210
+ Money { amount: decimal-string, currency: string, scale: integer }
211
+ Rule { calculationScale, displayScale, roundingMode, roundingStage }
212
+ ```
213
+
214
+ **源:FE 14 数据模型协议 · §Contract**
215
+
216
+ ```text
217
+ SourceDTO, RuntimeSchema, Adapter, DomainModel, ConsumerModel,
218
+ NullPolicy, EnumPolicy, IdentifierPolicy, PrecisionPolicy, FormatPolicy, Owner
219
+ ```
220
+
221
+ **源:FE 43 时间、日期与时区协议 · §Contract**
222
+
223
+ ```text
224
+ Field, TemporalKind, MachineFormat, Precision, TimeZone,
225
+ Calendar, AmbiguityPolicy, DisplayZone, ClockSource, TestMatrix
226
+ ```
227
+
228
+ ## Checklist
229
+
230
+ **源:FE 12 业务规则协议 · §Checklist**
231
+
232
+ - [ ] 规则来源和 Owner 明确。
233
+ - [ ] 页面未复制规则。
234
+ - [ ] 状态与错误码完整。
235
+ - [ ] 后端有权威兜底。
236
+
237
+ **源:FE 13 金额精度协议 · §Checklist**
238
+
239
+ - [ ] amount/currency/scale/rounding 完整。
240
+ - [ ] 未使用浮点做正式计算。
241
+ - [ ] 展示、汇总和导出一致。
242
+ - [ ] 比例和跨币种语义明确。
243
+
244
+ **源:FE 14 数据模型协议 · §Checklist**
245
+
246
+ - [ ] 模型层次明确。
247
+ - [ ] 外部数据已校验转换。
248
+ - [ ] 组件只消费稳定模型。
249
+ - [ ] adapter 测试完整。
250
+ - [ ] 外部数据校验失败和大整数/opaque ID 已覆盖。
251
+
252
+ **源:FE 43 时间、日期与时区协议 · §Checklist**
253
+
254
+ - [ ] 时间字段类型和单位无歧义。
255
+ - [ ] 日期、时间点和带时区计划未混用。
256
+ - [ ] 解析、排序和计算不依赖显示文本或宿主默认值。
257
+ - [ ] Clock 可替换,边界日期和夏令时已有测试。
258
+
259
+ ## Examples
260
+
261
+ **源:FE 12 业务规则协议 · §Examples**
262
+
263
+ ### 内容示例,可删除
264
+
265
+ `canApprove(entity, actor)` 返回允许状态和原因码,页面仅决定如何展示。
266
+
267
+ **源:FE 13 金额精度协议 · §Examples**
268
+
269
+ ### 内容示例,可删除
270
+
271
+ 保留接口金额字符串,通过统一 formatter 展示,不先转为浮点数。
272
+
273
+ **源:FE 14 数据模型协议 · §Examples**
274
+
275
+ ### 内容示例,可删除
276
+
277
+ API 的 snake_case DTO 经 adapter 转成稳定 Domain Model,再生成表格 RowModel。
278
+
279
+ **源:FE 43 时间、日期与时区协议 · §Examples**
280
+
281
+ ### 内容示例,可删除
282
+
283
+ 审计事件保存为 Instant,生日保存为 Local Date,跨地区会议保存为带命名时区的 Zoned Schedule;三者使用不同类型和 adapter。
284
+
285
+ ## Anti-patterns
286
+
287
+ **源:FE 12 业务规则协议 · §Anti-patterns**
288
+
289
+ 三个页面分别用不同 if 判断“审批中不可编辑”,导致规则漂移。
290
+
291
+ **源:FE 13 金额精度协议 · §Anti-patterns**
292
+
293
+ 用 `parseFloat` 累加成本,再 `toFixed(2)` 生成正式报表。
294
+
295
+ **源:FE 14 数据模型协议 · §Anti-patterns**
296
+
297
+ 模板直接访问后端字段并在多个单元格各自处理 null 和枚举。
298
+
299
+ **源:FE 43 时间、日期与时区协议 · §Anti-patterns**
300
+
301
+ 把 `YYYY-MM-DD` 直接构造成时间点,再用浏览器默认时区显示,导致部分地区日期前移或后移一天。
302
+
303
+ ## Ownership
304
+
305
+ **源:FE 12 业务规则协议 · §Ownership**
306
+
307
+ 业务/领域 Owner 定义语义,后端 Owner 保证权威执行,前端负责一致呈现。
308
+
309
+ **源:FE 13 金额精度协议 · §Ownership**
310
+
311
+ 业务/财务定义口径,后端负责权威计算,前端负责无损传输,QA 验证边界。
312
+
313
+ **源:FE 14 数据模型协议 · §Ownership**
314
+
315
+ API Owner 维护 DTO,领域 Owner 维护 Domain Model,前端模块 Owner 维护 adapter/ViewModel。
316
+
317
+ **源:FE 43 时间、日期与时区协议 · §Ownership**
318
+
319
+ 领域 Owner 定义业务时间语义,接口 Owner 定义传输格式,前端平台 Owner 维护 Clock、解析和格式化能力。
320
+
321
+ ## Change Policy
322
+
323
+ **源:FE 12 业务规则协议 · §Change Policy**
324
+
325
+ 规则或状态变化必须版本化并同步 API、权限、审计、文案和测试。
326
+
327
+ **源:FE 13 金额精度协议 · §Change Policy**
328
+
329
+ 精度、币种、舍入或比例语义变化属于破坏性契约变更,必须同步全链路。
330
+
331
+ **源:FE 14 数据模型协议 · §Change Policy**
332
+
333
+ 模型字段变化必须说明兼容、迁移和受影响消费者;公共模型不得静默改语义。
334
+
335
+ **源:FE 43 时间、日期与时区协议 · §Change Policy**
336
+
337
+ 改变时间类型、精度、时区或序列化格式属于契约变更,必须迁移数据、缓存、测试和调用方,并同步 `universal:data-model-protocol` 与 `universal:internationalization-protocol`。
338
+
339
+ > **语言节**:本主题无语言节挂点(缺席诚实);规则本体即上文通用节。
@@ -1,68 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/01-architecture-governance-protocol.md
3
- seed_source_sha256: 726502f4e5a5dcf2e8076fafa943b33de4b7ab9bd0fc2d8551479b43385e7636
4
- seed_version: B6C
5
- lane: backend
6
- status: CURRENT
7
- authority_scope: mixed_required_and_advisory
8
- applies_to: [backend]
9
- related_evidence_specs: []
10
- related_tools: []
11
- legacy_id: backend:architecture-governance-protocol
12
- criticality: critical
13
- injection_mode: reference
14
- stages: [prepare, check]
15
- triggers: [architecture, technology-baseline, deployment-topology]
16
- requires: []
17
- ---
18
-
19
- # 架构治理协议
20
-
21
- ## Scope
22
-
23
- 规范系统边界、架构层级、技术决策、ADR 与演进门禁。
24
-
25
- ## Non-Scope
26
-
27
- 不规定具体项目的模块名、部署数量或技术版本。
28
-
29
- ## Terms
30
-
31
- 架构决策指影响边界、数据所有权、部署单元或公共契约的长期选择。
32
-
33
- ## MUST
34
-
35
- - 架构选择必须记录候选、取舍、风险、ADR 坐标和复审条件。
36
-
37
- ## MUST NOT
38
-
39
- - 不得以局部代码便利替代边界、数据所有权或部署约束分析。
40
-
41
- ## SHOULD
42
-
43
- - 应优先选择能由现有团队、工具和运行证据持续验证的方案。
44
-
45
- ## Contract
46
-
47
- 架构记录至少输出稳定决策 ID、适用范围、被放弃方案、依赖与验证方式。
48
-
49
- ## Checklist
50
-
51
- - [ ] 边界、依赖方向、部署单元和数据所有权已明确。
52
-
53
- ## Examples
54
-
55
- - 将单体与服务拆分作为候选比较,并记录选择理由和复审触发条件。
56
-
57
- ## Anti-patterns
58
-
59
- - 只画理想架构图,不绑定构建产物、部署单元或实际依赖。
60
-
61
- ## Ownership
62
-
63
- 后端技术负责人维护决策,模块维护者提供实现与运行证据。
64
-
65
- ## Change Policy
66
-
67
- 改变已采用架构必须新增或替代 ADR,不得静默改写历史结论。
68
-
@@ -1,68 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/02-project-structure-governance-protocol.md
3
- seed_source_sha256: add6e21ffa5dd45940dda725e8d4e234c9d2a49775139c895cc7ad5f7caf7bf0
4
- seed_version: B6C
5
- lane: backend
6
- status: CURRENT
7
- authority_scope: mixed_required_and_advisory
8
- applies_to: [backend]
9
- related_evidence_specs: []
10
- related_tools: []
11
- legacy_id: backend:project-structure-governance-protocol
12
- criticality: standard
13
- injection_mode: triggered
14
- stages: [prepare, implement, check]
15
- triggers: [project-structure, module-layout]
16
- requires: []
17
- ---
18
-
19
- # 项目结构治理协议
20
-
21
- ## Scope
22
-
23
- 规范消费项目的后端目录分区、模块入口和结构检查。
24
-
25
- ## Non-Scope
26
-
27
- 不强制所有语言和框架采用同一目录树。
28
-
29
- ## Terms
30
-
31
- 公开入口是其他模块被允许依赖的稳定包、接口或构建产物。
32
-
33
- ## MUST
34
-
35
- - 新目录和模块必须有单一职责、公开入口和明确依赖方向。
36
-
37
- ## MUST NOT
38
-
39
- - 不得创建无法解释职责的顶层目录或把业务代码放入通用工具区。
40
-
41
- ## SHOULD
42
-
43
- - 应沿用仓库已验证的结构模式,并在新增结构前搜索现有实现。
44
-
45
- ## Contract
46
-
47
- 结构变更必须给出目标路径、所有者、入口、消费者和迁移计划。
48
-
49
- ## Checklist
50
-
51
- - [ ] 已搜索同类模块并检查构建、测试和部署发现路径。
52
-
53
- ## Examples
54
-
55
- - 为独立领域建立模块,并通过公开接口而不是内部包提供能力。
56
-
57
- ## Anti-patterns
58
-
59
- - 复制相似模块后仅改名,造成规则和修复长期漂移。
60
-
61
- ## Ownership
62
-
63
- 模块所有者维护结构,评审者检查跨模块依赖和重复实现。
64
-
65
- ## Change Policy
66
-
67
- 目录迁移必须同步引用、构建、测试、文档和兼容入口。
68
-
@@ -1,68 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/03-directory-boundary-protocol.md
3
- seed_source_sha256: 95a917cfe3c929b5a0a40de5f6215b25ef4a358a4e7f1c7cb2daa08defcf6bcc
4
- seed_version: B6C
5
- lane: backend
6
- status: CURRENT
7
- authority_scope: mixed_required_and_advisory
8
- applies_to: [backend]
9
- related_evidence_specs: []
10
- related_tools: []
11
- legacy_id: backend:directory-boundary-protocol
12
- criticality: critical
13
- injection_mode: always
14
- stages: [implement, check]
15
- triggers: []
16
- requires: []
17
- ---
18
-
19
- # 目录边界协议
20
-
21
- ## Scope
22
-
23
- 约束实现阶段的模块目录、公开入口、依赖方向和越界识别。
24
-
25
- ## Non-Scope
26
-
27
- 不规定某种框架的固定包名。
28
-
29
- ## Terms
30
-
31
- 越界指绕过公开入口依赖其他模块内部实现。
32
-
33
- ## MUST
34
-
35
- - 修改前必须搜索现有实现,并保持依赖只指向声明的公开入口。
36
-
37
- ## MUST NOT
38
-
39
- - 不得把跨域逻辑塞入共享工具或直接引用其他模块内部文件。
40
-
41
- ## SHOULD
42
-
43
- - 应以最小写集完成任务,并复用已有边界内能力。
44
-
45
- ## Contract
46
-
47
- 新增依赖必须能说明提供方、消费方、稳定入口与验证方式。
48
-
49
- ## Checklist
50
-
51
- - [ ] 写集、入口、依赖方向和受影响消费者已复核。
52
-
53
- ## Examples
54
-
55
- - 通过领域端口调用基础设施适配器,而不是从 Controller 直接访问实现类。
56
-
57
- ## Anti-patterns
58
-
59
- - 为绕过循环依赖建立含混的 `common` 目录。
60
-
61
- ## Ownership
62
-
63
- 代码作者说明边界影响,模块所有者审批公开入口变化。
64
-
65
- ## Change Policy
66
-
67
- 公开入口变化按契约变更处理,迁移完成前保留兼容路径。
68
-
@@ -1,68 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/04-layering-architecture-protocol.md
3
- seed_source_sha256: 4a2ab2aa695a7b78136a2fd96076a869c367bb008a417be508756c632ad4ed6e
4
- seed_version: B6C
5
- lane: backend
6
- status: CURRENT
7
- authority_scope: mixed_required_and_advisory
8
- applies_to: [backend]
9
- related_evidence_specs: []
10
- related_tools: []
11
- legacy_id: backend:layering-architecture-protocol
12
- criticality: critical
13
- injection_mode: triggered
14
- stages: [prepare, implement, check]
15
- triggers: [layering, module-boundary, domain-design]
16
- requires: []
17
- ---
18
-
19
- # 分层架构协议
20
-
21
- ## Scope
22
-
23
- 规范 Controller、Application/Service、Domain、Repository 与 Infrastructure 的职责。
24
-
25
- ## Non-Scope
26
-
27
- 不要求简单系统机械创建所有层或使用特定框架注解。
28
-
29
- ## Terms
30
-
31
- 依赖方向指高层策略不依赖低层技术细节的约束。
32
-
33
- ## MUST
34
-
35
- - 业务不变量、事务编排和外部适配必须位于可解释且可测试的边界。
36
-
37
- ## MUST NOT
38
-
39
- - 不得在 Controller、ORM Entity 或基础设施适配器中散落权威业务规则。
40
-
41
- ## SHOULD
42
-
43
- - 应让层间数据转换显式并避免同一校验在多层重复实现。
44
-
45
- ## Contract
46
-
47
- 每层必须声明输入、输出、失败语义、依赖和测试责任。
48
-
49
- ## Checklist
50
-
51
- - [ ] 调用链、转换点、事务所有者和异常映射已明确。
52
-
53
- ## Examples
54
-
55
- - Controller 校验传输格式,应用服务编排用例,领域对象维护不变量。
56
-
57
- ## Anti-patterns
58
-
59
- - Service 仅转发,而 Controller 同时处理事务、SQL 和业务判断。
60
-
61
- ## Ownership
62
-
63
- 架构所有者维护分层约束,各层维护者提供边界测试。
64
-
65
- ## Change Policy
66
-
67
- 跨层迁移必须记录兼容影响并分阶段消除旧依赖。
68
-
@@ -1,68 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/05-task-workflow-protocol.md
3
- seed_source_sha256: b0d176f1f2d19cd14739ff4de39d77659036516ab1377b83c261ecc53a2de2dd
4
- seed_version: B6C
5
- lane: backend
6
- status: CURRENT
7
- authority_scope: mixed_required_and_advisory
8
- applies_to: [backend]
9
- related_evidence_specs: []
10
- related_tools: []
11
- legacy_id: backend:task-workflow-protocol
12
- criticality: critical
13
- injection_mode: always
14
- stages: [prepare, implement, check, release]
15
- triggers: []
16
- requires: []
17
- ---
18
-
19
- # 后端任务工作流协议
20
-
21
- ## Scope
22
-
23
- 定义 Backend Ready、阶段选择、影响识别和执行路由。
24
-
25
- ## Non-Scope
26
-
27
- 不替代 BP 业务事实或项目级实施方案。
28
-
29
- ## Terms
30
-
31
- stage 为 `prepare`、`implement`、`check` 或 `release`。
32
-
33
- ## MUST
34
-
35
- - 必须确认任务事实、stage、写集、契约影响、风险和验证计划。
36
-
37
- ## MUST NOT
38
-
39
- - 不得把 planned、推测或未运行检查描述为 verified。
40
-
41
- ## SHOULD
42
-
43
- - 应在发现跨角色缺口时生成明确问题或 blocker。
44
-
45
- ## Contract
46
-
47
- 每次执行必须输出范围、选中规范、变更结果、检查证据和剩余风险。
48
-
49
- ## Checklist
50
-
51
- - [ ] 当前 stage 与任务目标一致。
52
-
53
- ## Examples
54
-
55
- - 简单内部 Mapper 修复只加载当前 stage 的 always 基线。
56
-
57
- ## Anti-patterns
58
-
59
- - 因协议 critical 就无条件加载其完整正文。
60
-
61
- ## Ownership
62
-
63
- 执行者维护任务状态,评审者核对证据与声明一致性。
64
-
65
- ## Change Policy
66
-
67
- 阶段语义变化必须同步注入器、索引和生命周期消费者。
68
-