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
@@ -1,68 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/06-ai-generated-code-protocol.md
3
- seed_source_sha256: a88614806137f33161b741d2a9fbc6ee310fa4f0cbf6acd222de07c14aee3d75
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:ai-generated-code-protocol
12
- criticality: critical
13
- injection_mode: always
14
- stages: [prepare, implement, check]
15
- triggers: []
16
- requires: []
17
- ---
18
-
19
- # AI 生成代码协议
20
-
21
- ## Scope
22
-
23
- 约束 Agent 的前置检查、事实边界、复用搜索、实现与验证声明。
24
-
25
- ## Non-Scope
26
-
27
- 不授权 Agent 自行决定业务事实或扩大写集。
28
-
29
- ## Terms
30
-
31
- 权威事实包括已确认的 PRD、契约、schema、配置来源和仓库证据。
32
-
33
- ## MUST
34
-
35
- - 写入前必须读取规范、搜索复用点,并按风险运行可复核检查。
36
-
37
- ## MUST NOT
38
-
39
- - 不得发明字段、接口、错误码、迁移、锁、Redis key、topic、secret 或环境阈值。
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
- Agent 对变更与声明负责,用户拥有超出既定范围的决策权。
64
-
65
- ## Change Policy
66
-
67
- 新增高频误改模式时应追加明确禁止项和回归测试。
68
-
@@ -1,68 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/07-evidence-acceptance-protocol.md
3
- seed_source_sha256: fb86312eaadaec81d21e20abfb979e0127138002731ddc4fb1ead9ec90cd10bb
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:evidence-acceptance-protocol
12
- criticality: critical
13
- injection_mode: always
14
- stages: [prepare, check, release]
15
- triggers: []
16
- requires: []
17
- ---
18
-
19
- # 证据与验收协议
20
-
21
- ## Scope
22
-
23
- 定义计划证据、实现证据、检查证据、发布证据和例外门禁。
24
-
25
- ## Non-Scope
26
-
27
- 不替代各领域协议规定的具体测试方法。
28
-
29
- ## Terms
30
-
31
- 证据是可由他人复核的代码坐标、hash、测试、报告或运行结果。
32
-
33
- ## MUST
34
-
35
- - 验收结论必须绑定当前任务、review range、版本和可复核证据。
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
- - 用 migration 测试与 schema hash 证明数据库变更已验证。
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/08-contract-change-protocol.md
3
- seed_source_sha256: 805c146b31c70d08f876631bc19273076eb242d78fcb3b3a3bd33437e28a6953
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:contract-change-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
- 识别 API、错误码、schema、消息、配置与运行行为的兼容影响。
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
- - [ ] API、数据、消息、配置和运行消费者均已检查。
52
-
53
- ## Examples
54
-
55
- - 新字段先以兼容方式发布,消费者迁移后再结束旧版本窗口。
56
-
57
- ## Anti-patterns
58
-
59
- - 只修改实现而不更新 OpenAPI、migration、事件 schema 或变更记录。
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/09-role-responsibility-protocol.md
3
- seed_source_sha256: 603b285faa271b77140f28e1038f850cd01b17ed1813b965898c4746233b342f
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:role-responsibility-protocol
12
- criticality: advisory
13
- injection_mode: reference
14
- stages: [prepare, check]
15
- triggers: [ownership, handoff]
16
- requires: []
17
- ---
18
-
19
- # 角色与责任协议
20
-
21
- ## Scope
22
-
23
- 规范 Owner、RACI、评审责任、升级和跨角色交接。
24
-
25
- ## Non-Scope
26
-
27
- 不保存具体项目的人员名单或排班。
28
-
29
- ## Terms
30
-
31
- Owner 指对契约、实现或证据完整性承担最终维护责任的角色。
32
-
33
- ## MUST
34
-
35
- - 高风险决策、公共契约和运行门禁必须有可识别的责任角色。
36
-
37
- ## MUST NOT
38
-
39
- - 不得用“团队共同负责”掩盖审批、维护或事故响应空缺。
40
-
41
- ## SHOULD
42
-
43
- - 应在 handoff 中明确输入、输出、截止条件和拒收标准。
44
-
45
- ## Contract
46
-
47
- 责任记录至少包含决策者、执行者、评审者、被通知方和升级路径。
48
-
49
- ## Checklist
50
-
51
- - [ ] 跨 BP、Frontend、Backend、Test 与 Ops 的边界已明确。
52
-
53
- ## Examples
54
-
55
- - API 提供方维护契约,调用方确认兼容窗口内完成迁移。
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/10-security-protocol.md
3
- seed_source_sha256: 56387f03edd35df50a5a701f4daab174b744d490663393f43331cf5401149f67
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:security-protocol
12
- criticality: critical
13
- injection_mode: triggered
14
- stages: [prepare, implement, check, release]
15
- triggers: [security, api-input, authentication, authorization, file-processing, secrets]
16
- requires: []
17
- ---
18
-
19
- # 安全协议
20
-
21
- ## Scope
22
-
23
- 规范认证、鉴权、输入与文件校验、注入防护、密钥和安全默认值。
24
-
25
- ## Non-Scope
26
-
27
- 不替代隐私保留规则或具体基础设施加固 Overlay。
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
- - [ ] 认证、鉴权、输入、输出、文件、secret 与审计路径已检查。
52
-
53
- ## Examples
54
-
55
- - 下载接口同时验证操作权限、数据范围和资源归属。
56
-
57
- ## Anti-patterns
58
-
59
- - 把 token、密码或敏感 payload 写入日志与异常。
60
-
61
- ## Ownership
62
-
63
- 服务端拥有最终安全判断,安全评审者维护阻断门禁。
64
-
65
- ## Change Policy
66
-
67
- 放宽安全控制必须经过显式风险审批、范围限制和到期复审。
68
-
@@ -1,67 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/11-environment-configuration-protocol.md
3
- seed_source_sha256: eb9e82e9df64ce238501bc51cd359f36150f911c149904e2ed5a43d9b652b1bd
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:environment-configuration-protocol
12
- criticality: critical
13
- injection_mode: triggered
14
- stages: [prepare, implement, check, release]
15
- triggers: [environment-configuration, configuration, secrets, runtime]
16
- requires: []
17
- ---
18
-
19
- # 环境与配置协议
20
-
21
- ## Scope
22
-
23
- 规范环境、profile、secret、超时、配置来源、变更和漂移。
24
-
25
- ## Non-Scope
26
-
27
- 不规定具体环境名称、凭据或连接参数数值。
28
-
29
- ## Terms
30
-
31
- 配置漂移是声明基线与构建、部署或运行时有效值不一致。
32
-
33
- ## MUST
34
-
35
- - 配置必须有类型、来源、默认行为、敏感级别、验证与变更路径。
36
-
37
- ## MUST NOT
38
-
39
- - 不得把 secret 写入仓库、日志、示例、命令行历史或生成文档。
40
-
41
- ## SHOULD
42
-
43
- - 应在启动时校验关键配置,并对版本与来源提供可观测证据。
44
-
45
- ## Contract
46
-
47
- 配置变更必须说明兼容影响、部署顺序、回滚和漂移检测方式。
48
-
49
- ## Checklist
50
-
51
- - [ ] 本地、CI、测试与运行环境的来源和覆盖顺序已核对。
52
-
53
- ## Examples
54
-
55
- - 缺少必需配置时启动失败并输出不含 secret 的稳定错误。
56
-
57
- ## Anti-patterns
58
-
59
- - 用环境默认值掩盖未声明的生产行为。
60
-
61
- ## Ownership
62
-
63
- 应用维护者定义消费契约,平台维护者提供受控配置与 secret 来源。
64
-
65
- ## Change Policy
66
-
67
- 配置键重命名必须提供双读或迁移窗口并验证旧值清理。
@@ -1,68 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/12-api-contract-protocol.md
3
- seed_source_sha256: 35519d81548cabff729de888e0bf9e0d5b40a0274c9fa3684641b50e75938ca0
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:api-contract-protocol
12
- criticality: critical
13
- injection_mode: triggered
14
- stages: [prepare, implement, check]
15
- triggers: [api-contract, api-change]
16
- requires: []
17
- ---
18
-
19
- # API 契约协议
20
-
21
- ## Scope
22
-
23
- 规范请求响应、版本、字段、权限、错误、幂等、分页、兼容与 TraceId。
24
-
25
- ## Non-Scope
26
-
27
- 不替代领域规则、最终鉴权或具体 endpoint 事实。
28
-
29
- ## Terms
30
-
31
- 正式契约是 OpenAPI 或项目明确指定的等价权威来源。
32
-
33
- ## MUST
34
-
35
- - method、path、字段、状态码、错误码、权限和兼容策略必须与实现一致。
36
-
37
- ## MUST NOT
38
-
39
- - 不得把 Mock、聊天记录或调用方猜测当作正式契约。
40
-
41
- ## SHOULD
42
-
43
- - 应对新增字段、分页、重试和版本演进采用向后兼容默认值。
44
-
45
- ## Contract
46
-
47
- 每个接口必须定义输入、输出、失败、幂等、权限、追踪与版本语义。
48
-
49
- ## Checklist
50
-
51
- - [ ] 契约、实现、生成客户端、测试和 handoff 已同步。
52
-
53
- ## Examples
54
-
55
- - 冲突返回稳定错误码与 TraceId,而不是泄露内部异常。
56
-
57
- ## Anti-patterns
58
-
59
- - 修改响应字段但不更新正式契约和调用方兼容测试。
60
-
61
- ## Ownership
62
-
63
- Backend 维护服务端契约,消费者确认联调与兼容结果。
64
-
65
- ## Change Policy
66
-
67
- 破坏性 API 变化必须按契约变更协议执行版本与迁移。
68
-
@@ -1,68 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/13-privacy-data-lifecycle-protocol.md
3
- seed_source_sha256: df20ccb85008f8744ea16db3ea64e54bdf9fd19d7aa3098c45dc44fff94c3d8d
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:privacy-data-lifecycle-protocol
12
- criticality: critical
13
- injection_mode: triggered
14
- stages: [prepare, implement, check, release]
15
- triggers: [sensitive-data, privacy, data-export]
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
- - [ ] URL、日志、trace、缓存、导出和备份均已检查敏感数据。
52
-
53
- ## Examples
54
-
55
- - 审计记录保存必要标识与操作事实,不复制完整敏感 payload。
56
-
57
- ## Anti-patterns
58
-
59
- - 在测试样例、日志或分析事件中使用真实敏感数据。
60
-
61
- ## Ownership
62
-
63
- 数据 Owner 决定用途与保留,Backend 实施并证明技术控制。
64
-
65
- ## Change Policy
66
-
67
- 扩大处理范围或接收方必须重新评审目的、权限与保留规则。
68
-
@@ -1,68 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/14-business-rules-state-protocol.md
3
- seed_source_sha256: fb255dd2331ac35e73a1ad222e4de4ec2f5fb3a09e675de0e1919d80022ac291
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:business-rules-state-protocol
12
- criticality: critical
13
- injection_mode: triggered
14
- stages: [prepare, implement, check]
15
- triggers: [business-rules, state-transition]
16
- requires: []
17
- ---
18
-
19
- # 业务规则与状态协议
20
-
21
- ## Scope
22
-
23
- 规范服务端权威不变量、状态机、计算、校验和失败语义。
24
-
25
- ## Non-Scope
26
-
27
- 不发明 BP 未确认的业务规则、阈值或状态。
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
- 规则设计必须绑定 BP 来源、输入、状态、输出、失败和证据。
48
-
49
- ## Checklist
50
-
51
- - [ ] 不变量、状态、权限、事务与并发边界已对齐。
52
-
53
- ## Examples
54
-
55
- - 审批操作在服务端校验当前状态与操作权限后原子更新。
56
-
57
- ## Anti-patterns
58
-
59
- - 在多个 Controller 和 SQL 中复制略有差异的状态判断。
60
-
61
- ## Ownership
62
-
63
- BP 拥有业务语义,Backend 拥有服务端一致实现。
64
-
65
- ## Change Policy
66
-
67
- 业务语义变化必须来自正式 delta,并同步状态迁移与兼容计划。
68
-
@@ -1,68 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/15-data-model-protocol.md
3
- seed_source_sha256: 21cdd88fac93c9dc834a51d62978b51453ca02eca68f223859aeca0ada99c3f2
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:data-model-protocol
12
- criticality: standard
13
- injection_mode: triggered
14
- stages: [prepare, implement, check]
15
- triggers: [data-model, dto, mapping]
16
- requires: []
17
- ---
18
-
19
- # 数据模型协议
20
-
21
- ## Scope
22
-
23
- 规范 Command、DTO、Domain Model、Entity 与持久化模型的边界和映射。
24
-
25
- ## Non-Scope
26
-
27
- 不定义具体项目字段、表或业务枚举。
28
-
29
- ## Terms
30
-
31
- 边界模型是在特定层或契约中表达数据的稳定结构。
32
-
33
- ## MUST
34
-
35
- - 每次转换必须明确字段来源、空值、默认值、精度、时间和枚举语义。
36
-
37
- ## MUST NOT
38
-
39
- - 不得让 API DTO、ORM Entity 与领域模型无条件共用同一类型。
40
-
41
- ## SHOULD
42
-
43
- - 应只在边界转换一次,并通过契约或 round-trip 测试验证。
44
-
45
- ## Contract
46
-
47
- 映射必须声明源、目标、必填性、丢失规则和失败行为。
48
-
49
- ## Checklist
50
-
51
- - [ ] 新增字段已追踪到所有生产、转换、存储与消费边界。
52
-
53
- ## Examples
54
-
55
- - API 字符串枚举在入口转换为受控领域值,未知值返回稳定错误。
56
-
57
- ## Anti-patterns
58
-
59
- - 使用反射复制掩盖字段语义、精度或空值差异。
60
-
61
- ## Ownership
62
-
63
- 各边界 Owner 维护模型契约,映射实现者负责 round-trip 证据。
64
-
65
- ## Change Policy
66
-
67
- 模型变化必须评估 API、数据、消息和历史数据兼容性。
68
-