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/26-engineering-tooling-protocol.md
3
- seed_source_sha256: b0fcecee17a3acdb11f59f065ae7cac269cc292e999dd39444e5293565d38fe1
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:engineering-tooling-protocol
12
- criticality: standard
13
- injection_mode: triggered
14
- stages: [prepare, implement, check]
15
- triggers: [build, tooling, ci]
16
- requires: []
17
- ---
18
-
19
- # 工程工具协议
20
-
21
- ## Scope
22
-
23
- 规范构建、静态检查、生成产物、CI、版本固定、ADR 与可复现性。
24
-
25
- ## Non-Scope
26
-
27
- 不规定所有项目使用同一构建工具。
28
-
29
- ## Terms
30
-
31
- 可复现构建是从受控输入得到可核对产物的过程。
32
-
33
- ## MUST
34
-
35
- - 运行时、构建工具、依赖锁定和质量命令必须在仓库或受控环境中可发现。
36
-
37
- ## MUST NOT
38
-
39
- - 不得手工修改生成产物或让本地与 CI 使用不一致的门禁。
40
-
41
- ## SHOULD
42
-
43
- - 应自动校验生成代码、契约、migration、依赖和容器配置漂移。
44
-
45
- ## Contract
46
-
47
- 工具链记录必须包含版本来源、入口命令、输入、输出和失败门禁。
48
-
49
- ## Checklist
50
-
51
- - [ ] 干净环境可完成构建、测试和静态检查。
52
-
53
- ## Examples
54
-
55
- - CI 重新生成 OpenAPI 产物并拒绝未提交差异。
56
-
57
- ## Anti-patterns
58
-
59
- - 依赖开发机全局工具或未记录的 IDE 操作。
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/27-dependency-supply-chain-protocol.md
3
- seed_source_sha256: 7e0817507039ab5f633ff4cb7eb3590d8755a547b8db91867f92bc702a64ddfe
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:dependency-supply-chain-protocol
12
- criticality: critical
13
- injection_mode: triggered
14
- stages: [prepare, implement, check, release]
15
- triggers: [dependency, supply-chain]
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
- - 安全升级同时验证 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/28-testing-protocol.md
3
- seed_source_sha256: f5df73dd7bec4ccf4132c3d7a9918a6f1cb0dd9682aa17956cb24446aa406ad7
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:testing-protocol
12
- criticality: critical
13
- injection_mode: triggered
14
- stages: [prepare, check, release]
15
- triggers: [testing, acceptance]
16
- requires: []
17
- ---
18
-
19
- # 测试协议
20
-
21
- ## Scope
22
-
23
- 规范单元、API、集成、契约、迁移、并发、安全、性能与故障测试。
24
-
25
- ## Non-Scope
26
-
27
- 不规定统一覆盖率阈值或替代验收证据协议。
28
-
29
- ## Terms
30
-
31
- 测试层级按需要隔离的边界与要证明的风险划分。
32
-
33
- ## MUST
34
-
35
- - 测试计划必须覆盖变更行为、边界、失败、兼容和高风险交互。
36
-
37
- ## MUST NOT
38
-
39
- - 不得用固定 sleep、共享脏数据或只测成功路径获得虚假稳定性。
40
-
41
- ## SHOULD
42
-
43
- - 应控制时间、随机、网络和外部依赖,并保留失败诊断信息。
44
-
45
- ## Contract
46
-
47
- 测试证据必须包含范围、环境、命令、结果、失败和未覆盖风险。
48
-
49
- ## Checklist
50
-
51
- - [ ] API、DB、事务、并发、幂等、缓存、安全和回滚按影响选择。
52
-
53
- ## Examples
54
-
55
- - migration 在真实数据库版本上验证前向、兼容与恢复。
56
-
57
- ## Anti-patterns
58
-
59
- - Mock 掉所有边界后声称集成行为已验证。
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/29-observability-logging-tracing-protocol.md
3
- seed_source_sha256: e871f5d7d1e9fe68956881877baba94f376a5539753441853f8cfa12939f5ebd
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:observability-logging-tracing-protocol
12
- criticality: standard
13
- injection_mode: triggered
14
- stages: [implement, check, release]
15
- triggers: [observability, logging, tracing]
16
- requires: []
17
- ---
18
-
19
- # 可观测性、日志与追踪协议
20
-
21
- ## Scope
22
-
23
- 规范日志、指标、TraceId、审计、告警和事故诊断证据。
24
-
25
- ## Non-Scope
26
-
27
- 不替代错误码、隐私、安全或具体监控平台配置。
28
-
29
- ## Terms
30
-
31
- 可观测信号包括结构化日志、指标、trace、审计和健康状态。
32
-
33
- ## MUST
34
-
35
- - 关键操作必须可关联版本、环境、主体、操作结果与 TraceId。
36
-
37
- ## MUST NOT
38
-
39
- - 不得记录 token、密码、secret、完整敏感 payload 或无界高基数值。
40
-
41
- ## SHOULD
42
-
43
- - 应为关键失败、延迟、容量和依赖建立可行动的指标与告警。
44
-
45
- ## Contract
46
-
47
- 信号设计必须定义 schema、级别、采样、保留、脱敏、Owner 与排障用途。
48
-
49
- ## Checklist
50
-
51
- - [ ] 成功、失败、重试、降级和恢复均能通过信号关联。
52
-
53
- ## Examples
54
-
55
- - 外部调用 trace 记录供应方、结果类和延迟,不记录认证凭据。
56
-
57
- ## Anti-patterns
58
-
59
- - 只打印自由文本异常,无法按请求、版本或业务操作聚合。
60
-
61
- ## Ownership
62
-
63
- 服务维护者拥有诊断信号,运行角色维护告警与事故流程。
64
-
65
- ## Change Policy
66
-
67
- 信号 schema、采样或保留变化必须评估仪表盘、告警和隐私影响。
68
-
@@ -1,68 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/30-performance-capacity-protocol.md
3
- seed_source_sha256: b575dd07e4bb6def646acb55c3d62d086a9fd12035b2ab359ec353bf443773e5
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:performance-capacity-protocol
12
- criticality: standard
13
- injection_mode: triggered
14
- stages: [prepare, check, release]
15
- triggers: [performance, capacity]
16
- requires: []
17
- ---
18
-
19
- # 性能与容量协议
20
-
21
- ## Scope
22
-
23
- 规范延迟、吞吐、连接池、线程、批处理、背压、容量和压测证据。
24
-
25
- ## Non-Scope
26
-
27
- 不在 universal 中规定具体数值阈值或硬件规模。
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
- - 在目标数据量和并发模型下报告 p95/p99、错误率与资源曲线。
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/31-runtime-deployment-protocol.md
3
- seed_source_sha256: c791451de0be3aa0629fd562e2b43cc54066e4b10d786264fa7a333c561ef23a
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:runtime-deployment-protocol
12
- criticality: critical
13
- injection_mode: triggered
14
- stages: [prepare, implement, check, release]
15
- triggers: [runtime, deployment, configuration]
16
- requires: []
17
- ---
18
-
19
- # 运行时与部署协议
20
-
21
- ## Scope
22
-
23
- 规范部署单元、实例、网络、TLS、代理头、健康检查、容器与运行时加固。
24
-
25
- ## Non-Scope
26
-
27
- 不默认选择 Nginx、Ingress、Tomcat、容器平台或具体 JVM 参数。
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
- - [ ] 多实例、代理链、TLS、健康、配置、日志与回滚已演练。
52
-
53
- ## Examples
54
-
55
- - 明确 Ingress 到 Service 再到应用的代理头与健康检查责任。
56
-
57
- ## Anti-patterns
58
-
59
- - 应用无条件信任任意来源的 `X-Forwarded-*`。
60
-
61
- ## Ownership
62
-
63
- Backend 拥有应用运行契约,平台角色拥有受控部署环境。
64
-
65
- ## Change Policy
66
-
67
- 拓扑或打包变化必须同步技术基线、发布方案与运行验证。
68
-
@@ -1,68 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/32-release-versioning-rollback-protocol.md
3
- seed_source_sha256: 26a6a23928fc24338f69fb34199ecdea5f654e21534a76ac53a7c0b78030b3c8
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:release-versioning-rollback-protocol
12
- criticality: critical
13
- injection_mode: triggered
14
- stages: [prepare, check, release]
15
- triggers: [release, rollback, versioning]
16
- requires: []
17
- ---
18
-
19
- # 发布、版本与回滚协议
20
-
21
- ## Scope
22
-
23
- 规范版本、灰度、开关、发布记录、兼容窗口、回滚和数据库演进。
24
-
25
- ## Non-Scope
26
-
27
- 不替代具体平台操作手册或证据验收协议。
28
-
29
- ## Terms
30
-
31
- 可回退包括代码回滚、配置恢复、流量撤回和数据 roll-forward 的组合能力。
32
-
33
- ## MUST
34
-
35
- - 发布前必须确认版本、依赖顺序、兼容、观测、停止条件和恢复路径。
36
-
37
- ## MUST NOT
38
-
39
- - 不得在无法恢复数据或无监控信号时进行不可逆全量发布。
40
-
41
- ## SHOULD
42
-
43
- - 应采用小批量灰度、可撤回开关和前后版本并行兼容。
44
-
45
- ## Contract
46
-
47
- 发布记录必须包含变更范围、产物 hash、步骤、门禁、指标、Owner 与结果。
48
-
49
- ## Checklist
50
-
51
- - [ ] 应用、数据库、配置、消息、缓存与消费者版本已对齐。
52
-
53
- ## Examples
54
-
55
- - 先发布兼容读写版本,完成数据迁移后再清理旧契约。
56
-
57
- ## Anti-patterns
58
-
59
- - 把数据库回滚等同于逆向执行破坏性 migration。
60
-
61
- ## Ownership
62
-
63
- 发布责任人执行门禁,Backend 提供兼容与恢复证据。
64
-
65
- ## Change Policy
66
-
67
- 发布流程和阻断门禁变化必须通过演练与审计后生效。
68
-
@@ -1,177 +0,0 @@
1
- ---
2
- seed_source: pomaster/components/backend-hard-spec/assets/universal/index.md
3
- seed_source_sha256: b50c1fdcab5d1a3217a6e28059580195f681b6e68f465eb8e055bd8e5310c479
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:index
12
- injection_mode: always
13
- stages: [prepare, implement, check, release]
14
- ---
15
-
16
- # 后端通用硬规范索引
17
-
18
- 本目录包含 32 个编号协议和本索引。语义 ID、编号和 canonical filename 是稳定地址;编号只追加,不表示 criticality 或激活优先级。协议正文只定义跨项目治理,不保存项目 endpoint、table、column、业务状态、环境阈值或责任人。
19
-
20
- ## 使用规则
21
-
22
- 本目录协议由 init 一次性播种到 `.pomaster/specs/hard/backend/`(seed-once:缺席才写、在座零触碰);开发/验收上下文的协议激活由 `pomaster context compile --role <role>` 投影承载(frontmatter 的 injection_mode/stages/triggers 为移植保留的 info 性注记,非执行语义)。`criticality` 只决定违规严重度,不参与默认选择。
23
-
24
- ## 维护 spec:主题 → 协议路由表
25
-
26
- **要给本项目补充/修改后端规则时,MUST 就地编辑下表命中的编号协议文件,MUST NOT 新建平行文件。**
27
- 把规则写进目标文件的 `MUST` / `MUST NOT` / `SHOULD` / `Contract` / `Checklist` 章节;
28
- 技术栈特有规则进 `stacks/<slug>/<slug>-overlay.md`。
29
-
30
- | 你要维护的主题(关键词) | 就地编辑这个文件 |
31
- |---|---|
32
- | 架构治理、架构决策、ADR | `01-architecture-governance-protocol.md` |
33
- | 工程结构、模块划分、包组织 | `02-project-structure-governance-protocol.md` |
34
- | 目录边界、依赖方向 | `03-directory-boundary-protocol.md` |
35
- | 分层架构、Controller/Service/Repository 职责 | `04-layering-architecture-protocol.md` |
36
- | 任务流程、开发工作流 | `05-task-workflow-protocol.md` |
37
- | AI 生成代码约束 | `06-ai-generated-code-protocol.md` |
38
- | 证据、验收标准 | `07-evidence-acceptance-protocol.md` |
39
- | 契约变更、破坏性改动、兼容窗口 | `08-contract-change-protocol.md` |
40
- | Owner、角色责任 | `09-role-responsibility-protocol.md` |
41
- | 认证授权、加密、注入防护、安全边界 | `10-security-protocol.md` |
42
- | 环境变量、配置中心、多环境 | `11-environment-configuration-protocol.md` |
43
- | API 契约、OpenAPI、REST 风格、版本 | `12-api-contract-protocol.md` |
44
- | 隐私、数据留存与删除、脱敏 | `13-privacy-data-lifecycle-protocol.md` |
45
- | 业务规则、领域状态机 | `14-business-rules-state-protocol.md` |
46
- | 实体、DTO、领域模型、字段语义 | `15-data-model-protocol.md` |
47
- | 错误码、异常体系、错误响应 | `16-error-code-protocol.md` |
48
- | 权限模型、RBAC、数据范围 | `17-permission-authorization-protocol.md` |
49
- | 数据库 schema、migration、Flyway/Liquibase | `18-database-schema-migration-protocol.md` |
50
- | SQL、索引、慢查询、查询优化 | `19-query-index-sql-protocol.md` |
51
- | 事务边界、传播行为、回滚 | `20-transaction-boundary-protocol.md` |
52
- | 并发、锁、乐观/悲观锁、竞态 | `21-concurrency-locking-protocol.md` |
53
- | 幂等、重复请求、去重 | `22-idempotency-protocol.md` |
54
- | 缓存、Redis 一致性、缓存失效 | `23-cache-redis-consistency-protocol.md` |
55
- | 外部集成、熔断、降级、重试、超时 | `24-external-integration-resilience-protocol.md` |
56
- | 异步任务、定时调度、消息消费 | `25-async-job-scheduler-protocol.md` |
57
- | 构建工具、静态检查、CI | `26-engineering-tooling-protocol.md` |
58
- | 依赖管理、供应链安全 | `27-dependency-supply-chain-protocol.md` |
59
- | 单元/集成/契约测试、覆盖率 | `28-testing-protocol.md` |
60
- | 日志、链路追踪、可观测性、指标 | `29-observability-logging-tracing-protocol.md` |
61
- | 性能、容量、压测、限流 | `30-performance-capacity-protocol.md` |
62
- | 运行时、部署、容器、健康检查 | `31-runtime-deployment-protocol.md` |
63
- | 发布、版本、回滚 | `32-release-versioning-rollback-protocol.md` |
64
- | 语言/框架/中间件特有细则(Java、Spring、MyBatis、MySQL、Redis、Nginx…) | `stacks/<slug>/<slug>-overlay.md` |
65
-
66
- 只有当一条规则在上表与所有 overlay 里**找不到任何归属主题**时,才允许新增协议文件;此时必须同步
67
- 下方「协议目录」与「任务命中矩阵」,保持双向索引完整。
68
-
69
- 重跑播种(init)默认只补齐缺失文件、不覆盖已存在的协议,所以就地维护不会被覆盖。
70
-
71
- ## 协议目录
72
-
73
- | No | Semantic ID | Canonical filename | Criticality | Injection | Stages | Triggers | 核心职责 |
74
- |---:|---|---|---|---|---|---|---|
75
- | 01 | `backend:architecture-governance-protocol` | `01-architecture-governance-protocol.md` | critical | reference | prepare,check | architecture,technology-baseline,deployment-topology | 架构边界、ADR 与演进门禁 |
76
- | 02 | `backend:project-structure-governance-protocol` | `02-project-structure-governance-protocol.md` | standard | triggered | prepare,implement,check | project-structure,module-layout | 项目目录分区与结构检查 |
77
- | 03 | `backend:directory-boundary-protocol` | `03-directory-boundary-protocol.md` | critical | always | implement,check | - | 公开入口、依赖方向与越界识别 |
78
- | 04 | `backend:layering-architecture-protocol` | `04-layering-architecture-protocol.md` | critical | triggered | prepare,implement,check | layering,module-boundary,domain-design | 后端分层职责与边界 |
79
- | 05 | `backend:task-workflow-protocol` | `05-task-workflow-protocol.md` | critical | always | prepare,implement,check,release | - | Backend Ready 与阶段路由 |
80
- | 06 | `backend:ai-generated-code-protocol` | `06-ai-generated-code-protocol.md` | critical | always | prepare,implement,check | - | Agent 事实边界与验证 |
81
- | 07 | `backend:evidence-acceptance-protocol` | `07-evidence-acceptance-protocol.md` | critical | always | prepare,check,release | - | 证据、验收与例外门禁 |
82
- | 08 | `backend:contract-change-protocol` | `08-contract-change-protocol.md` | critical | always | prepare,implement,check,release | - | 公共契约兼容与迁移 |
83
- | 09 | `backend:role-responsibility-protocol` | `09-role-responsibility-protocol.md` | advisory | reference | prepare,check | ownership,handoff | Owner、RACI 与交接 |
84
- | 10 | `backend:security-protocol` | `10-security-protocol.md` | critical | triggered | prepare,implement,check,release | security,api-input,authentication,authorization,file-processing,secrets | 服务端安全控制 |
85
- | 11 | `backend:environment-configuration-protocol` | `11-environment-configuration-protocol.md` | critical | triggered | prepare,implement,check,release | environment-configuration,configuration,secrets,runtime | 环境、secret 与配置漂移 |
86
- | 12 | `backend:api-contract-protocol` | `12-api-contract-protocol.md` | critical | triggered | prepare,implement,check | api-contract,api-change | API 与兼容契约 |
87
- | 13 | `backend:privacy-data-lifecycle-protocol` | `13-privacy-data-lifecycle-protocol.md` | critical | triggered | prepare,implement,check,release | sensitive-data,privacy,data-export | 隐私与数据生命周期 |
88
- | 14 | `backend:business-rules-state-protocol` | `14-business-rules-state-protocol.md` | critical | triggered | prepare,implement,check | business-rules,state-transition | 服务端规则与状态机 |
89
- | 15 | `backend:data-model-protocol` | `15-data-model-protocol.md` | standard | triggered | prepare,implement,check | data-model,dto,mapping | 边界模型与映射 |
90
- | 16 | `backend:error-code-protocol` | `16-error-code-protocol.md` | standard | triggered | prepare,implement,check | error-code,error-handling | 稳定错误语义 |
91
- | 17 | `backend:permission-authorization-protocol` | `17-permission-authorization-protocol.md` | critical | triggered | prepare,implement,check | authorization,tenant,data-scope | 权限、租户与数据范围 |
92
- | 18 | `backend:database-schema-migration-protocol` | `18-database-schema-migration-protocol.md` | critical | triggered | prepare,implement,check,release | database-schema,migration,data-repair | Schema、迁移与修复 |
93
- | 19 | `backend:query-index-sql-protocol` | `19-query-index-sql-protocol.md` | standard | triggered | implement,check | sql,query,index,pagination | SQL、分页与索引证据 |
94
- | 20 | `backend:transaction-boundary-protocol` | `20-transaction-boundary-protocol.md` | critical | triggered | prepare,implement,check | transaction | 事务边界与失败语义 |
95
- | 21 | `backend:concurrency-locking-protocol` | `21-concurrency-locking-protocol.md` | critical | triggered | prepare,implement,check | concurrency,locking | 并发、锁与冲突 |
96
- | 22 | `backend:idempotency-protocol` | `22-idempotency-protocol.md` | critical | triggered | prepare,implement,check | idempotency,callback,replay | 写操作幂等与重放 |
97
- | 23 | `backend:cache-redis-consistency-protocol` | `23-cache-redis-consistency-protocol.md` | critical | triggered | prepare,implement,check,release | redis,cache | 缓存与权威源一致性 |
98
- | 24 | `backend:external-integration-resilience-protocol` | `24-external-integration-resilience-protocol.md` | critical | triggered | prepare,implement,check,release | external-integration,resilience | 超时、重试、补偿与对账 |
99
- | 25 | `backend:async-job-scheduler-protocol` | `25-async-job-scheduler-protocol.md` | standard | triggered | prepare,implement,check,release | async-job,scheduler,import-export | Job 生命周期与调度 |
100
- | 26 | `backend:engineering-tooling-protocol` | `26-engineering-tooling-protocol.md` | standard | triggered | prepare,implement,check | build,tooling,ci | 构建、生成与 CI |
101
- | 27 | `backend:dependency-supply-chain-protocol` | `27-dependency-supply-chain-protocol.md` | critical | triggered | prepare,implement,check,release | dependency,supply-chain | 依赖与供应链风险 |
102
- | 28 | `backend:testing-protocol` | `28-testing-protocol.md` | critical | triggered | prepare,check,release | testing,acceptance | 风险导向测试 |
103
- | 29 | `backend:observability-logging-tracing-protocol` | `29-observability-logging-tracing-protocol.md` | standard | triggered | implement,check,release | observability,logging,tracing | 日志、指标、追踪与审计 |
104
- | 30 | `backend:performance-capacity-protocol` | `30-performance-capacity-protocol.md` | standard | triggered | prepare,check,release | performance,capacity | 性能预算与容量证据 |
105
- | 31 | `backend:runtime-deployment-protocol` | `31-runtime-deployment-protocol.md` | critical | triggered | prepare,implement,check,release | runtime,deployment,configuration | 运行时、入口与部署拓扑 |
106
- | 32 | `backend:release-versioning-rollback-protocol` | `32-release-versioning-rollback-protocol.md` | critical | triggered | prepare,check,release | release,rollback,versioning | 发布、版本与恢复 |
107
-
108
- ## 默认激活基线
109
-
110
- 默认激活面严格只有以下 5 个短协议和索引;实际命中按任务特征(见「任务命中矩阵」)继续收窄。
111
-
112
- ```text
113
- backend:index
114
- backend:task-workflow-protocol
115
- backend:ai-generated-code-protocol
116
- backend:directory-boundary-protocol
117
- backend:contract-change-protocol
118
- backend:evidence-acceptance-protocol
119
- ```
120
-
121
- | Stage | 建议纳入上下文 |
122
- |---|---|
123
- | prepare | index、task workflow、AI generated code、contract change、evidence acceptance |
124
- | implement | index、task workflow、AI generated code、directory boundary、contract change |
125
- | check | index 加全部 5 个基线协议 |
126
- | release | index、task workflow、contract change、evidence acceptance |
127
-
128
- ## 任务命中矩阵
129
-
130
- | 任务特征 | 建议命中的协议特征 |
131
- |---|---|
132
- | 架构、技术栈或部署形态选择 | 显式展开 `backend:architecture-governance-protocol`,并命中 `project-structure`、`layering`、`environment-configuration`、`build`、`dependency`、`performance`、`runtime`、`release` |
133
- | 新增或修改 API | `api-contract`、`data-model`、`error-code`、`data-scope`、`idempotency`、`testing`、`observability`、`release` |
134
- | 业务规则或状态流转 | `layering`、`business-rules`、`state-transition`、`data-model`、`error-code`、`data-scope`、`transaction`、`concurrency`、`testing` |
135
- | 数据库结构或迁移 | `database-schema`、`migration`、`sql`、`transaction`、`concurrency`、`testing`、`observability`、`rollback` |
136
- | 查询、分页、报表或导出 | `api-contract`、`data-model`、`data-scope`、`query`、`pagination`、`cache`、`testing`、`performance` |
137
- | 事务写流程 | `business-rules`、`error-code`、`transaction`、`concurrency`、`idempotency`、`external-integration`、`testing`、`observability` |
138
- | Redis 或缓存变更 | `environment-configuration`、`concurrency`、`idempotency`、`redis`、`testing`、`observability`、`capacity` |
139
- | 外部系统集成 | `environment-configuration`、`api-contract`、`error-code`、`idempotency`、`external-integration`、`resilience`、`async-job`、`testing`、`observability` |
140
- | 导入、导出或异步任务 | `api-contract`、`error-code`、`data-scope`、`idempotency`、`cache`、`async-job`、`scheduler`、`testing`、`observability`、`performance` |
141
- | 认证、权限或敏感数据 | `security`、`authentication`、`sensitive-data`、`privacy`、`error-code`、`data-scope`、`testing`、`observability` |
142
- | 运行时、部署或配置 | `environment-configuration`、`external-integration`、`deployment`、`observability`、`performance`、`release` |
143
- | 依赖升级 | `build`、`dependency`、`supply-chain`、`testing`、`performance`、`release` |
144
- | 发布、灰度或回滚 | `environment-configuration`、`testing`、`observability`、`performance`、`deployment`、`release`、`rollback` |
145
-
146
- 矩阵只产生候选特征;实际纳入由 `pomaster context compile --role <role>` 投影承载(Overlay 依赖与冲突按「冲突与责任边界」收窄),纳入/排除决策可经 `pomaster context explain` 逐条审计。
147
-
148
- ## 协议固定结构
149
-
150
- 所有编号协议严格使用以下顺序:
151
-
152
- 1. `Scope`
153
- 2. `Non-Scope`
154
- 3. `Terms`
155
- 4. `MUST`
156
- 5. `MUST NOT`
157
- 6. `SHOULD`
158
- 7. `Contract`
159
- 8. `Checklist`
160
- 9. `Examples`
161
- 10. `Anti-patterns`
162
- 11. `Ownership`
163
- 12. `Change Policy`
164
-
165
- ## 冲突与责任边界
166
-
167
- - 安全规则优先于便利性;最终服务端授权优先于客户端展示。
168
- - 正式 API、schema、消息和配置契约优先于 Mock、历史示例和聊天记录。
169
- - 业务规则协议定义权威语义;数据模型协议只定义边界转换。
170
- - 错误码协议定义调用方语义;可观测性协议定义内部诊断与审计信号。
171
- - 事务协议定义原子边界;并发协议定义竞争、锁与冲突。
172
- - 测试协议选择验证方式;证据协议决定声明与门禁是否成立。
173
- - Stack Overlay 只能收紧或具体化本目录规则,不能保存项目事实或放宽底线。
174
-
175
- ## 维护规则
176
-
177
- 协议编号、语义 ID 与 canonical filename 只追加不重排。新增或修改规则必须同步索引、模板、播种清单与 catalog 锁校验;废弃规则必须提供替代 ID、兼容窗口和迁移说明。