pomaster 0.3.0 → 0.4.0

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 (393) hide show
  1. package/README.md +9 -10
  2. package/catalog/archetypes/archetype.frontend.error_taxonomy.json +13 -5
  3. package/catalog/archetypes/archetype.frontend.feature_oriented.json +1 -1
  4. package/catalog/archetypes/archetype.state.async_command.json +4 -4
  5. package/catalog/catalog-lock.draft.json +1120 -104
  6. package/catalog/gates/gate.be.api.contract_checks.json +2 -1
  7. package/catalog/gates/gate.be.chg.contract_change_checks.json +2 -1
  8. package/catalog/gates/gate.chg.prechange_checks.json +2 -1
  9. package/catalog/gates/gate.web.api.request_checks.json +2 -1
  10. package/catalog/gates/gate.web.grid.checks.json +2 -1
  11. package/catalog/knowledge/knowledge.api.example_stable_error_code.json +2 -1
  12. package/catalog/knowledge/knowledge.chg.example_compat_window.json +2 -1
  13. package/catalog/knowledge/knowledge.chg.example_prop_migration.json +2 -1
  14. package/catalog/knowledge/knowledge.fp.api.field_drift_no_contract.json +2 -1
  15. package/catalog/knowledge/knowledge.fp.api.per_page_http_client.json +2 -1
  16. package/catalog/knowledge/knowledge.fp.be.contract_drift.json +2 -1
  17. package/catalog/knowledge/knowledge.fp.chg.page_local_padding.json +2 -1
  18. package/catalog/knowledge/knowledge.fp.grid.global_td_width.json +2 -1
  19. package/catalog/knowledge/knowledge.web.api.example_get_entity_list.json +2 -1
  20. package/catalog/knowledge/knowledge.web.grid.example_column_preset.json +2 -1
  21. package/catalog/policies/authority.be.api_contract_ownership.json +2 -1
  22. package/catalog/policies/authority.be.contract_ownership.json +2 -1
  23. package/catalog/policies/authority.chg.change_owners.json +2 -1
  24. package/catalog/policies/authority.web.api.request_owners.json +2 -1
  25. package/catalog/policies/authority.web.grid.ownership.json +2 -1
  26. package/catalog/policies/policy.ai.change_plan_first.json +91 -0
  27. package/catalog/policies/policy.ai.fact_inference_separation.json +91 -0
  28. package/catalog/policies/policy.ai.read_search_verify_before_write.json +92 -0
  29. package/catalog/policies/policy.ai.rule_relaxation_approval.json +91 -0
  30. package/catalog/policies/policy.api.backward_compat_defaults.json +2 -1
  31. package/catalog/policies/policy.api.contract_impl_consistency.json +2 -1
  32. package/catalog/policies/policy.api.no_informal_contract.json +2 -1
  33. package/catalog/policies/policy.arch.adr_immutable_history.json +91 -0
  34. package/catalog/policies/policy.arch.decision_tradeoff_record.json +2 -1
  35. package/catalog/policies/policy.arch.no_convenience_over_boundary.json +93 -0
  36. package/catalog/policies/policy.arch.prefer_verifiable_option.json +92 -0
  37. package/catalog/policies/policy.authz.no_gating_proxy_trust.json +99 -0
  38. package/catalog/policies/policy.authz.permission_scope_expansion_gate.json +99 -0
  39. package/catalog/policies/policy.authz.server_five_factor_verification.json +101 -0
  40. package/catalog/policies/policy.be.conc.prefer_db_constraints.json +97 -0
  41. package/catalog/policies/policy.be.db.expand_migrate_contract.json +97 -0
  42. package/catalog/policies/policy.be.idem.key_payload_conflict.json +97 -0
  43. package/catalog/policies/policy.be.model.single_boundary_conversion.json +97 -0
  44. package/catalog/policies/policy.be.sql.index_for_known_queries.json +97 -0
  45. package/catalog/policies/policy.be.state.single_rule_source.json +97 -0
  46. package/catalog/policies/policy.be.txn.short_locks_compensation.json +96 -0
  47. package/catalog/policies/policy.bound.search_first_entry_only.json +91 -0
  48. package/catalog/policies/policy.boundary.validate_in_encode_out.json +92 -0
  49. package/catalog/policies/policy.cache.failure_mode_guards.json +93 -0
  50. package/catalog/policies/policy.cache.lifecycle_definition.json +2 -1
  51. package/catalog/policies/policy.cache.schema_versioning.json +91 -0
  52. package/catalog/policies/policy.cfg.config_attribute_completeness.json +95 -0
  53. package/catalog/policies/policy.cfg.key_rename_dual_read.json +92 -0
  54. package/catalog/policies/policy.cfg.no_secret_dispersal.json +90 -0
  55. package/catalog/policies/policy.cfg.production_safe_defaults.json +92 -0
  56. package/catalog/policies/policy.cfg.schema_backed_config.json +92 -0
  57. package/catalog/policies/policy.chg.affect_templates.json +2 -1
  58. package/catalog/policies/policy.chg.breaking_versioning.json +2 -1
  59. package/catalog/policies/policy.chg.compat_migration_rollback.json +2 -1
  60. package/catalog/policies/policy.chg.deprecate_before_delete.json +2 -1
  61. package/catalog/policies/policy.chg.fix_at_root_cause_level.json +2 -1
  62. package/catalog/policies/policy.chg.no_unrelated_changes.json +91 -0
  63. package/catalog/policies/policy.chg.observable_evolution.json +2 -1
  64. package/catalog/policies/policy.chg.prechange_consumer_scan.json +2 -1
  65. package/catalog/policies/policy.chg.staged_rollout.json +2 -1
  66. package/catalog/policies/policy.chg.sync_contract_docs_tests.json +2 -1
  67. package/catalog/policies/policy.conflict.priority_ladder.json +2 -1
  68. package/catalog/policies/policy.contract.no_invented_facts.json +93 -0
  69. package/catalog/policies/policy.dep.admission_six_dimension_check.json +2 -1
  70. package/catalog/policies/policy.dep.build_path_supply_chain.json +93 -0
  71. package/catalog/policies/policy.dep.change_surface_review.json +2 -1
  72. package/catalog/policies/policy.dep.introduction_review.json +2 -1
  73. package/catalog/policies/policy.dep.no_untrusted_source_no_lock_bypass.json +92 -0
  74. package/catalog/policies/policy.dep.time_boxed_urgent_exception.json +91 -0
  75. package/catalog/policies/policy.deploy.no_dev_env_as_production_fact.json +91 -0
  76. package/catalog/policies/policy.deploy.operational_capabilities.json +93 -0
  77. package/catalog/policies/policy.deploy.runtime_fact_record.json +97 -0
  78. package/catalog/policies/policy.derived.single_implementation.json +2 -1
  79. package/catalog/policies/policy.err.failure_five_part_mapping.json +101 -0
  80. package/catalog/policies/policy.err.no_internal_detail_exposure.json +97 -0
  81. package/catalog/policies/policy.err.published_code_immutable.json +98 -0
  82. package/catalog/policies/policy.evid.acceptance_binds_verifiable_evidence.json +92 -0
  83. package/catalog/policies/policy.evid.no_silent_gate_removal.json +90 -0
  84. package/catalog/policies/policy.evid.no_unverifiable_pass.json +92 -0
  85. package/catalog/policies/policy.flag.cleanup_after_full_rollout.json +94 -0
  86. package/catalog/policies/policy.flag.consistent_off_state.json +92 -0
  87. package/catalog/policies/policy.flag.kill_switch.json +91 -0
  88. package/catalog/policies/policy.flag.lifecycle_metadata.json +93 -0
  89. package/catalog/policies/policy.flag.not_a_permission.json +92 -0
  90. package/catalog/policies/policy.gate.p0_non_bypassable.json +92 -0
  91. package/catalog/policies/policy.gate.risk_factors_confirmed.json +93 -0
  92. package/catalog/policies/policy.guard.no_check_weakening.json +92 -0
  93. package/catalog/policies/policy.integration.call_definition_minimum.json +95 -0
  94. package/catalog/policies/policy.integration.fault_containment.json +94 -0
  95. package/catalog/policies/policy.job.lifecycle_definition.json +96 -0
  96. package/catalog/policies/policy.job.no_unmanaged_execution.json +92 -0
  97. package/catalog/policies/policy.job.operational_features.json +93 -0
  98. package/catalog/policies/policy.obs.actionable_signals.json +93 -0
  99. package/catalog/policies/policy.obs.alert_with_owner.json +91 -0
  100. package/catalog/policies/policy.obs.context_field_baseline.json +91 -0
  101. package/catalog/policies/policy.obs.correlation_context_minimum.json +2 -1
  102. package/catalog/policies/policy.obs.no_sensitive_or_unbounded_logging.json +92 -0
  103. package/catalog/policies/policy.obs.no_sensitive_raw_values.json +93 -0
  104. package/catalog/policies/policy.obs.rum_dimension_whitelist.json +2 -1
  105. package/catalog/policies/policy.obs.signal_change_impact.json +91 -0
  106. package/catalog/policies/policy.obs.source_map_access_control.json +92 -0
  107. package/catalog/policies/policy.obs.telemetry_lifecycle_declared.json +93 -0
  108. package/catalog/policies/policy.obs.trace_correlation.json +91 -0
  109. package/catalog/policies/policy.perf.budget_change_retest.json +91 -0
  110. package/catalog/policies/policy.perf.evidence_binding.json +95 -0
  111. package/catalog/policies/policy.perf.observation_dimensions.json +94 -0
  112. package/catalog/policies/policy.proc.checklist_change_policy.json +91 -0
  113. package/catalog/policies/policy.proc.pre_code_declaration.json +2 -1
  114. package/catalog/policies/policy.proc.scope_drift_reclassify.json +91 -0
  115. package/catalog/policies/policy.prv.processing_scope_re_review.json +97 -0
  116. package/catalog/policies/policy.prv.sensitive_data_six_facts.json +102 -0
  117. package/catalog/policies/policy.registry.human_fields_validated_decorrelated.json +93 -0
  118. package/catalog/policies/policy.rel.no_irreversible_unmonitored_full_release.json +91 -0
  119. package/catalog/policies/policy.rel.observability_before_ship.json +91 -0
  120. package/catalog/policies/policy.rel.pre_release_confirmation.json +2 -1
  121. package/catalog/policies/policy.rel.process_change_needs_drill_audit.json +91 -0
  122. package/catalog/policies/policy.rel.traceable_build.json +93 -0
  123. package/catalog/policies/policy.role.domain_decision_authority.json +2 -1
  124. package/catalog/policies/policy.role.human_signs_for_ai.json +93 -0
  125. package/catalog/policies/policy.sec.authn_policy_unified.json +91 -0
  126. package/catalog/policies/policy.sec.no_client_side_trust.json +92 -0
  127. package/catalog/policies/policy.sec.no_longterm_security_disable.json +91 -0
  128. package/catalog/policies/policy.sec.no_script_readable_credentials.json +91 -0
  129. package/catalog/policies/policy.sec.no_secrets_in_client_surface.json +91 -0
  130. package/catalog/policies/policy.sec.relaxation_approval.json +92 -0
  131. package/catalog/policies/policy.sec.security_relaxation_gate.json +92 -0
  132. package/catalog/policies/policy.sec.third_party_execution_register.json +2 -1
  133. package/catalog/policies/policy.sec.trust_boundary_enforcement.json +93 -0
  134. package/catalog/policies/policy.sec.upload_download_server_recheck.json +91 -0
  135. package/catalog/policies/policy.sec.url_source_allowlist.json +91 -0
  136. package/catalog/policies/policy.spec.admission_criteria.json +2 -1
  137. package/catalog/policies/policy.spec.derived_view_regeneration.json +2 -1
  138. package/catalog/policies/policy.spec.draft_not_baseline.json +2 -1
  139. package/catalog/policies/policy.spec.family_conflict_precedence.json +93 -0
  140. package/catalog/policies/policy.spec.file_structure_contract.json +2 -1
  141. package/catalog/policies/policy.spec.freeze_before_use.json +93 -0
  142. package/catalog/policies/policy.spec.metadata_required.json +2 -1
  143. package/catalog/policies/policy.spec.post_dev_backfill_classify.json +2 -1
  144. package/catalog/policies/policy.spec.primary_source_basis.json +93 -0
  145. package/catalog/policies/policy.spec.procedural_record_not_surrogate.json +2 -1
  146. package/catalog/policies/policy.spec.semantic_identity.json +2 -1
  147. package/catalog/policies/policy.spec.unresolved_ledger_gate.json +2 -1
  148. package/catalog/policies/policy.stack.derived_store_not_authority.json +93 -0
  149. package/catalog/policies/policy.stack.dual_web_stack_boundary.json +93 -0
  150. package/catalog/policies/policy.stack.entry_chain_recorded.json +93 -0
  151. package/catalog/policies/policy.stack.entry_limits_aligned.json +94 -0
  152. package/catalog/policies/policy.stack.local_form_not_prod_fact.json +93 -0
  153. package/catalog/policies/policy.stack.multi_datastore_ownership.json +93 -0
  154. package/catalog/policies/policy.stack.no_implicit_selection.json +2 -1
  155. package/catalog/policies/policy.stack.persistence_coexistence_scope.json +93 -0
  156. package/catalog/policies/policy.stack.toolchain_versions_pinned.json +95 -0
  157. package/catalog/policies/policy.stack.upgrade_compat_verified.json +93 -0
  158. package/catalog/policies/policy.struct.module_entry_dependency_declared.json +92 -0
  159. package/catalog/policies/policy.struct.no_unexplained_top_level_dir.json +91 -0
  160. package/catalog/policies/policy.struct.reuse_proven_structure.json +91 -0
  161. package/catalog/policies/policy.test.control_nondeterminism_keep_diagnosis.json +91 -0
  162. package/catalog/policies/policy.test.isolation_and_cleanup.json +93 -0
  163. package/catalog/policies/policy.test.no_synthetic_stability.json +92 -0
  164. package/catalog/policies/policy.test.pyramid_and_ci_matrix.json +92 -0
  165. package/catalog/policies/policy.test.removal_justification.json +91 -0
  166. package/catalog/policies/policy.test.removal_needs_substitute_evidence.json +91 -0
  167. package/catalog/policies/policy.test.risk_driven_plan.json +92 -0
  168. package/catalog/policies/policy.test.stable_observable_assertions.json +92 -0
  169. package/catalog/policies/policy.tool.discoverable_toolchain.json +92 -0
  170. package/catalog/policies/policy.tool.no_hand_edit_generated_no_ci_drift.json +91 -0
  171. package/catalog/policies/policy.tool.no_vendored_body_edits.json +94 -0
  172. package/catalog/policies/policy.tool.scoped_scan_boundary.json +2 -1
  173. package/catalog/policies/policy.tool.upgrade_verify_lock_rollback.json +92 -0
  174. package/catalog/policies/policy.web.api.auth_app_client_split.json +2 -1
  175. package/catalog/policies/policy.web.api.client_change_impact.json +2 -1
  176. package/catalog/policies/policy.web.api.domain_api_only.json +2 -1
  177. package/catalog/policies/policy.web.api.error_normalization.json +2 -1
  178. package/catalog/policies/policy.web.api.generated_client.json +2 -1
  179. package/catalog/policies/policy.web.api.late_result_guard.json +2 -1
  180. package/catalog/policies/policy.web.api.mutation_idempotency.json +2 -1
  181. package/catalog/policies/policy.web.api.no_network_optimism.json +2 -1
  182. package/catalog/policies/policy.web.api.query_cancel_stale_drop.json +2 -1
  183. package/catalog/policies/policy.web.api.request_infrastructure.json +2 -1
  184. package/catalog/policies/policy.web.api.retry_discipline.json +2 -1
  185. package/catalog/policies/policy.web.api.session_recovery_split.json +2 -1
  186. package/catalog/policies/policy.web.api.single_http_client.json +2 -1
  187. package/catalog/policies/policy.web.api.single_loading_source.json +2 -1
  188. package/catalog/policies/policy.web.api.transport_vs_business.json +2 -1
  189. package/catalog/policies/policy.web.api.trusted_endpoint_source.json +2 -1
  190. package/catalog/policies/policy.web.api.typed_domain_naming.json +2 -1
  191. package/catalog/policies/policy.web.arch.layer_isolation.json +2 -1
  192. package/catalog/policies/policy.web.arch.naming_conventions.json +2 -1
  193. package/catalog/policies/policy.web.arch.public_api_barrel.json +2 -1
  194. package/catalog/policies/policy.web.chg.controlled_change_triggers.json +2 -1
  195. package/catalog/policies/policy.web.comp.no_trivial_or_god_component.json +91 -0
  196. package/catalog/policies/policy.web.comp.public_contract_completeness.json +93 -0
  197. package/catalog/policies/policy.web.copy.action_object_clarity.json +92 -0
  198. package/catalog/policies/policy.web.copy.enumerable_placement.json +91 -0
  199. package/catalog/policies/policy.web.copy.error_next_step.json +92 -0
  200. package/catalog/policies/policy.web.copy.suppression_ledger_discipline.json +2 -1
  201. package/catalog/policies/policy.web.grid.column_schema_fields.json +2 -1
  202. package/catalog/policies/policy.web.grid.config_isolation.json +2 -1
  203. package/catalog/policies/policy.web.grid.freeze_key_columns.json +2 -1
  204. package/catalog/policies/policy.web.grid.interaction_registry.json +2 -1
  205. package/catalog/policies/policy.web.grid.keyboard_clipboard.json +2 -1
  206. package/catalog/policies/policy.web.grid.schema_driven_shell.json +2 -1
  207. package/catalog/policies/policy.web.grid.schema_versioning.json +2 -1
  208. package/catalog/policies/policy.web.grid.server_ops_virtualization.json +2 -1
  209. package/catalog/policies/policy.web.grid.shell_change_matrix.json +2 -1
  210. package/catalog/policies/policy.web.grid.width_fix_ladder.json +2 -1
  211. package/catalog/policies/policy.web.handoff.state_matrix_full.json +94 -0
  212. package/catalog/policies/policy.web.i18n.copy_key_discipline.json +92 -0
  213. package/catalog/policies/policy.web.i18n.raw_value_for_compute.json +91 -0
  214. package/catalog/policies/policy.web.page.region_consistency.json +93 -0
  215. package/catalog/policies/policy.web.perf.budget_skeleton.json +2 -1
  216. package/catalog/policies/policy.web.style.ownership_matrix.json +2 -1
  217. package/catalog/policies/policy.web.track.attempt_result_correlation.json +91 -0
  218. package/catalog/policies/policy.web.track.consent_lifecycle.json +2 -1
  219. package/catalog/policies/policy.web.track.no_synthetic_actions.json +92 -0
  220. package/catalog/policies/policy.web.track.privacy_default_deny.json +2 -1
  221. package/catalog/policies/policy.web.track.stable_event_keys.json +2 -1
  222. package/catalog/policies/policy.web.track.typed_client_validation.json +91 -0
  223. package/catalog/policies/policy.web.uiux.provider_evidence_not_business_truth.json +2 -1
  224. package/catalog/policies/policy.wf.no_planned_as_verified.json +91 -0
  225. package/catalog/policies/policy.wf.task_facts_preconfirm.json +94 -0
  226. package/catalog/policies/profile.baseline.java_enterprise_default.json +96 -0
  227. package/catalog/sensors/sensor.browser.deterministic.json +2 -1
  228. package/catalog/sensors/sensor.browser.interactive.json +2 -1
  229. package/catalog/sensors/sensor.build.static.json +2 -1
  230. package/catalog/sensors/sensor.contract.conformance.json +2 -1
  231. package/catalog/sensors/sensor.performance.budget.json +2 -1
  232. package/catalog/sensors/sensor.production.metric.json +2 -1
  233. package/catalog/tools/seed_b6b_frontend.py +1424 -0
  234. package/catalog/tools/seed_b6c_backend.py +1495 -0
  235. package/catalog/tools/seed_b6d_baseline.py +620 -0
  236. package/catalog/tools/seed_b6e_evidence.py +1305 -0
  237. package/catalog/tools/seed_d3_review.py +1105 -0
  238. package/catalog/tools/seed_v06_batch2_materials.py +27 -18
  239. package/dist/bin.js +23026 -16635
  240. package/package.json +2 -1
  241. package/seeds/baseline/backend/api-contract.md +26 -0
  242. package/seeds/baseline/backend/architecture.md +31 -0
  243. package/seeds/baseline/backend/data-access.md +31 -0
  244. package/seeds/baseline/backend/directory-structure.md +11 -0
  245. package/seeds/baseline/backend/integration-runtime.md +21 -0
  246. package/seeds/baseline/backend/quality.md +31 -0
  247. package/seeds/baseline/backend/stack.yaml +13 -0
  248. package/seeds/baseline/backend/transaction-concurrency.md +26 -0
  249. package/seeds/baseline/data/lineage.md +11 -0
  250. package/seeds/baseline/data/migration.md +11 -0
  251. package/seeds/baseline/data/model.md +31 -0
  252. package/seeds/baseline/data/precision-units.md +31 -0
  253. package/seeds/baseline/data/quality.md +31 -0
  254. package/seeds/baseline/frontend/api-and-error.md +21 -0
  255. package/seeds/baseline/frontend/architecture.md +26 -0
  256. package/seeds/baseline/frontend/design-system.md +21 -0
  257. package/seeds/baseline/frontend/directory-structure.md +16 -0
  258. package/seeds/baseline/frontend/quality.md +26 -0
  259. package/seeds/baseline/frontend/stack.yaml +17 -0
  260. package/seeds/baseline/frontend/state-and-data.md +26 -0
  261. package/seeds/baseline/manifest.yaml +32 -0
  262. package/seeds/baseline/platform/delivery.md +36 -0
  263. package/seeds/baseline/platform/environment.md +11 -0
  264. package/seeds/baseline/platform/observability.md +31 -0
  265. package/seeds/baseline/platform/security.md +26 -0
  266. package/seeds/manifest.json +2006 -0
  267. package/seeds/specs/evidence/accessibility.md +89 -0
  268. package/seeds/specs/evidence/architecture.md +89 -0
  269. package/seeds/specs/evidence/browser-e2e.md +91 -0
  270. package/seeds/specs/evidence/build.md +91 -0
  271. package/seeds/specs/evidence/business-acceptance.md +89 -0
  272. package/seeds/specs/evidence/complexity-crap.md +97 -0
  273. package/seeds/specs/evidence/contract.md +89 -0
  274. package/seeds/specs/evidence/coverage.md +91 -0
  275. package/seeds/specs/evidence/data-migration.md +91 -0
  276. package/seeds/specs/evidence/dead-code-duplicate.md +89 -0
  277. package/seeds/specs/evidence/dependency-supply-chain.md +89 -0
  278. package/seeds/specs/evidence/index.md +55 -0
  279. package/seeds/specs/evidence/mutation.md +89 -0
  280. package/seeds/specs/evidence/performance.md +89 -0
  281. package/seeds/specs/evidence/release.md +91 -0
  282. package/seeds/specs/evidence/runtime-observability.md +91 -0
  283. package/seeds/specs/evidence/security.md +89 -0
  284. package/seeds/specs/evidence/typecheck-lint.md +91 -0
  285. package/seeds/specs/evidence/unit-component-integration.md +91 -0
  286. package/seeds/specs/evidence/visual-regression.md +89 -0
  287. package/seeds/specs/hard/backend/01-architecture-governance-protocol.md +68 -0
  288. package/seeds/specs/hard/backend/02-project-structure-governance-protocol.md +68 -0
  289. package/seeds/specs/hard/backend/03-directory-boundary-protocol.md +68 -0
  290. package/seeds/specs/hard/backend/04-layering-architecture-protocol.md +68 -0
  291. package/seeds/specs/hard/backend/05-task-workflow-protocol.md +68 -0
  292. package/seeds/specs/hard/backend/06-ai-generated-code-protocol.md +68 -0
  293. package/seeds/specs/hard/backend/07-evidence-acceptance-protocol.md +68 -0
  294. package/seeds/specs/hard/backend/08-contract-change-protocol.md +68 -0
  295. package/seeds/specs/hard/backend/09-role-responsibility-protocol.md +68 -0
  296. package/seeds/specs/hard/backend/10-security-protocol.md +68 -0
  297. package/seeds/specs/hard/backend/11-environment-configuration-protocol.md +67 -0
  298. package/seeds/specs/hard/backend/12-api-contract-protocol.md +68 -0
  299. package/seeds/specs/hard/backend/13-privacy-data-lifecycle-protocol.md +68 -0
  300. package/seeds/specs/hard/backend/14-business-rules-state-protocol.md +68 -0
  301. package/seeds/specs/hard/backend/15-data-model-protocol.md +68 -0
  302. package/seeds/specs/hard/backend/16-error-code-protocol.md +68 -0
  303. package/seeds/specs/hard/backend/17-permission-authorization-protocol.md +68 -0
  304. package/seeds/specs/hard/backend/18-database-schema-migration-protocol.md +68 -0
  305. package/seeds/specs/hard/backend/19-query-index-sql-protocol.md +68 -0
  306. package/seeds/specs/hard/backend/20-transaction-boundary-protocol.md +68 -0
  307. package/seeds/specs/hard/backend/21-concurrency-locking-protocol.md +68 -0
  308. package/seeds/specs/hard/backend/22-idempotency-protocol.md +68 -0
  309. package/seeds/specs/hard/backend/23-cache-redis-consistency-protocol.md +68 -0
  310. package/seeds/specs/hard/backend/24-external-integration-resilience-protocol.md +68 -0
  311. package/seeds/specs/hard/backend/25-async-job-scheduler-protocol.md +68 -0
  312. package/seeds/specs/hard/backend/26-engineering-tooling-protocol.md +68 -0
  313. package/seeds/specs/hard/backend/27-dependency-supply-chain-protocol.md +68 -0
  314. package/seeds/specs/hard/backend/28-testing-protocol.md +68 -0
  315. package/seeds/specs/hard/backend/29-observability-logging-tracing-protocol.md +68 -0
  316. package/seeds/specs/hard/backend/30-performance-capacity-protocol.md +68 -0
  317. package/seeds/specs/hard/backend/31-runtime-deployment-protocol.md +68 -0
  318. package/seeds/specs/hard/backend/32-release-versioning-rollback-protocol.md +68 -0
  319. package/seeds/specs/hard/backend/index.md +177 -0
  320. package/seeds/specs/hard/frontend/01-development-checklist-protocol.md +86 -0
  321. package/seeds/specs/hard/frontend/02-ai-generated-code-protocol.md +82 -0
  322. package/seeds/specs/hard/frontend/03-acceptance-gate-protocol.md +86 -0
  323. package/seeds/specs/hard/frontend/04-security-protocol.md +283 -0
  324. package/seeds/specs/hard/frontend/05-environment-configuration-protocol.md +80 -0
  325. package/seeds/specs/hard/frontend/06-change-governance-protocol.md +90 -0
  326. package/seeds/specs/hard/frontend/07-frontend-backend-communication-protocol.md +219 -0
  327. package/seeds/specs/hard/frontend/08-role-responsibility-protocol.md +80 -0
  328. package/seeds/specs/hard/frontend/09-module-boundary-protocol.md +81 -0
  329. package/seeds/specs/hard/frontend/10-engineering-tooling-protocol.md +89 -0
  330. package/seeds/specs/hard/frontend/11-dependency-package-management-protocol.md +87 -0
  331. package/seeds/specs/hard/frontend/12-business-rules-protocol.md +79 -0
  332. package/seeds/specs/hard/frontend/13-monetary-precision-protocol.md +81 -0
  333. package/seeds/specs/hard/frontend/14-data-model-protocol.md +85 -0
  334. package/seeds/specs/hard/frontend/15-request-api-protocol.md +87 -0
  335. package/seeds/specs/hard/frontend/16-error-handling-protocol.md +79 -0
  336. package/seeds/specs/hard/frontend/17-permission-protocol.md +79 -0
  337. package/seeds/specs/hard/frontend/18-state-management-protocol.md +88 -0
  338. package/seeds/specs/hard/frontend/19-cache-protocol.md +79 -0
  339. package/seeds/specs/hard/frontend/20-testing-protocol.md +88 -0
  340. package/seeds/specs/hard/frontend/21-design-system-protocol.md +79 -0
  341. package/seeds/specs/hard/frontend/22-theme-protocol.md +79 -0
  342. package/seeds/specs/hard/frontend/23-accessibility-protocol.md +189 -0
  343. package/seeds/specs/hard/frontend/24-component-protocol.md +80 -0
  344. package/seeds/specs/hard/frontend/25-page-structure-protocol.md +79 -0
  345. package/seeds/specs/hard/frontend/26-style-layout-protocol.md +80 -0
  346. package/seeds/specs/hard/frontend/27-rendering-state-protocol.md +81 -0
  347. package/seeds/specs/hard/frontend/28-form-protocol.md +88 -0
  348. package/seeds/specs/hard/frontend/29-routing-url-protocol.md +79 -0
  349. package/seeds/specs/hard/frontend/30-data-grid-protocol.md +83 -0
  350. package/seeds/specs/hard/frontend/31-performance-protocol.md +137 -0
  351. package/seeds/specs/hard/frontend/32-file-import-export-protocol.md +80 -0
  352. package/seeds/specs/hard/frontend/33-release-versioning-protocol.md +79 -0
  353. package/seeds/specs/hard/frontend/34-monitoring-logging-protocol.md +128 -0
  354. package/seeds/specs/hard/frontend/35-mock-protocol.md +97 -0
  355. package/seeds/specs/hard/frontend/36-feature-flag-protocol.md +79 -0
  356. package/seeds/specs/hard/frontend/37-browser-device-compatibility-protocol.md +83 -0
  357. package/seeds/specs/hard/frontend/38-internationalization-protocol.md +243 -0
  358. package/seeds/specs/hard/frontend/39-copywriting-protocol.md +79 -0
  359. package/seeds/specs/hard/frontend/40-analytics-protocol.md +98 -0
  360. package/seeds/specs/hard/frontend/41-design-handoff-protocol.md +80 -0
  361. package/seeds/specs/hard/frontend/42-browser-runtime-lifecycle-protocol.md +86 -0
  362. package/seeds/specs/hard/frontend/43-time-temporal-protocol.md +86 -0
  363. package/seeds/specs/hard/frontend/44-privacy-data-lifecycle-protocol.md +87 -0
  364. package/seeds/specs/hard/frontend/45-browser-storage-protocol.md +87 -0
  365. package/seeds/specs/hard/frontend/index.md +308 -0
  366. package/seeds/specs/hard/stacks/java/index.md +20 -0
  367. package/seeds/specs/hard/stacks/java/java-language-overlay.md +35 -0
  368. package/seeds/specs/hard/stacks/jpa/index.md +20 -0
  369. package/seeds/specs/hard/stacks/jpa/jpa-persistence-overlay.md +35 -0
  370. package/seeds/specs/hard/stacks/kubernetes-ingress/index.md +20 -0
  371. package/seeds/specs/hard/stacks/kubernetes-ingress/kubernetes-ingress-overlay.md +35 -0
  372. package/seeds/specs/hard/stacks/messaging/index.md +20 -0
  373. package/seeds/specs/hard/stacks/messaging/messaging-reliability-overlay.md +35 -0
  374. package/seeds/specs/hard/stacks/mybatis/index.md +20 -0
  375. package/seeds/specs/hard/stacks/mybatis/mybatis-persistence-overlay.md +35 -0
  376. package/seeds/specs/hard/stacks/mysql/index.md +20 -0
  377. package/seeds/specs/hard/stacks/mysql/mysql-database-overlay.md +35 -0
  378. package/seeds/specs/hard/stacks/nginx/index.md +20 -0
  379. package/seeds/specs/hard/stacks/nginx/nginx-proxy-overlay.md +35 -0
  380. package/seeds/specs/hard/stacks/postgresql/index.md +20 -0
  381. package/seeds/specs/hard/stacks/postgresql/postgresql-database-overlay.md +35 -0
  382. package/seeds/specs/hard/stacks/redis/index.md +20 -0
  383. package/seeds/specs/hard/stacks/redis/redis-cache-overlay.md +35 -0
  384. package/seeds/specs/hard/stacks/spring-batch/index.md +20 -0
  385. package/seeds/specs/hard/stacks/spring-batch/spring-batch-job-overlay.md +35 -0
  386. package/seeds/specs/hard/stacks/spring-boot/index.md +20 -0
  387. package/seeds/specs/hard/stacks/spring-boot/spring-boot-application-overlay.md +35 -0
  388. package/seeds/specs/hard/stacks/spring-mvc/index.md +20 -0
  389. package/seeds/specs/hard/stacks/spring-mvc/spring-mvc-web-overlay.md +35 -0
  390. package/seeds/specs/hard/stacks/spring-webflux/index.md +20 -0
  391. package/seeds/specs/hard/stacks/spring-webflux/spring-webflux-reactive-overlay.md +35 -0
  392. package/seeds/specs/hard/stacks/tomcat/index.md +20 -0
  393. package/seeds/specs/hard/stacks/tomcat/tomcat-runtime-overlay.md +35 -0
@@ -0,0 +1,177 @@
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、兼容窗口和迁移说明。
@@ -0,0 +1,86 @@
1
+ ---
2
+ seed_source: pomaster/components/frontend-hard-spec/assets/universal/01-development-checklist-protocol.md
3
+ seed_source_sha256: fa8914b29dbf7af25c8128aa1b8936fd658e37854e0a4f457175e2e3c82c3a03
4
+ seed_version: B6B-1
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
+ ---
12
+
13
+ # 01 开发检查项协议
14
+
15
+ ## Scope
16
+
17
+ P0。把规范转成每次开发前、开发中、开发后的强制动作,适用于功能、修复、重构、配置和文档驱动变更。
18
+
19
+ ## Non-Scope
20
+
21
+ 不定义技术栈命令,不替代测试协议、验收门禁和发布审批。
22
+
23
+ ## Terms
24
+
25
+ - Change Classification:局部、同类模式、公共能力、契约、平台或工程变更。
26
+ - Impact Set:必须修改、需要同步、明确禁止修改的范围。
27
+ - Evidence:搜索、测试、截图、构建、契约差异等可复核证据。
28
+ - Spec Update Review:开发完成后判断是否需要补充 spec 的强制复核。
29
+
30
+ ## MUST
31
+
32
+ - 开发前完成变更分类、协议选择、复用搜索和影响范围。
33
+ - 写代码前列出 Must Change、Must Sync、Must Not Change。
34
+ - 缺少正式字段、状态、权限、接口或业务规则时先补契约或阻塞确认。
35
+ - 开发中发现范围扩大时重新分类并更新计划。
36
+ - 开发后提供检查结果、影响说明和残余风险。
37
+ - 开发后、任务关闭或收口(closeout)流程前必须完成 Spec Update Review。
38
+ - 发现新规则、重复坑点、接口/组件/目录/测试约定时必须更新对应 spec;无更新时必须记录原因。
39
+
40
+ ## MUST NOT
41
+
42
+ - MUST NOT 先实现后补范围。
43
+ - MUST NOT 用“应该没问题”代替证据。
44
+ - MUST NOT 混入无关清理、升级或重构。
45
+ - MUST NOT 跳过 Spec Update Review 后直接归档、收口或发布。
46
+ - MUST NOT 将一次性实现细节写入长期 spec。
47
+
48
+ ## SHOULD
49
+
50
+ - SHOULD 将检查项集成任务模板、PR 模板和自动化门禁。
51
+ - SHOULD 按风险扩大检查,而非机械执行无关项目。
52
+
53
+ ## Contract
54
+
55
+ ```text
56
+ Goal, Classification, ProtocolsLoaded, SpecStatus, ReuseSearch,
57
+ MustChange, MustSync, MustNotChange, ContractsAffected,
58
+ ValidationRequired, Evidence, SpecUpdateDecision, ResidualRisk
59
+ ```
60
+
61
+ ## Checklist
62
+
63
+ - [ ] 已分类并加载协议。
64
+ - [ ] 已搜索已有能力。
65
+ - [ ] 已声明影响与禁止范围。
66
+ - [ ] 已确认契约、安全和数据边界。
67
+ - [ ] 已提供验证证据。
68
+ - [ ] 已完成 Spec Update Review,并记录更新或不更新的原因。
69
+
70
+ ## Examples
71
+
72
+ ### 内容示例,可删除
73
+
74
+ 修复单页列宽时,先证明根因属于页面 schema,只修改该 schema 和页面测试,并明确禁止修改全局样式。
75
+
76
+ ## Anti-patterns
77
+
78
+ 直接修改公共组件,既不搜索调用方,也不验证同类页面,把局部问题扩散成全局回归。
79
+
80
+ ## Ownership
81
+
82
+ 实现者负责填写,Reviewer 核验范围与证据,协议 Owner 裁决歧义。
83
+
84
+ ## Change Policy
85
+
86
+ 新增检查项必须定义触发、验证和失败动作;降级 P0 检查项必须批准并记录期限。
@@ -0,0 +1,82 @@
1
+ ---
2
+ seed_source: pomaster/components/frontend-hard-spec/assets/universal/02-ai-generated-code-protocol.md
3
+ seed_source_sha256: a80ea1c51c9afc0b96001cfffa0675edafb1572563652840bcf88770d81203c8
4
+ seed_version: B6B-1
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
+ ---
12
+
13
+ # 02 AI 生成代码协议
14
+
15
+ ## Scope
16
+
17
+ P0。约束 AI 分析、生成、修改、评审和验证代码时的行为。
18
+
19
+ ## Non-Scope
20
+
21
+ 不替代人工需求决策、代码所有权、测试、合规审批或上线责任。
22
+
23
+ ## Terms
24
+
25
+ - AI Change Plan:写代码前声明的协议、事实、范围和验证计划。
26
+ - Invented Contract:无正式来源而猜测的字段、状态、权限、API 或规则。
27
+ - Unrelated Change:当前目标不需要的修改。
28
+
29
+ ## MUST
30
+
31
+ - AI 写代码前读取适用协议并输出 Change Plan。
32
+ - AI 必须先搜索已有组件、抽象、契约、工具和同类实现。
33
+ - AI 必须区分事实、推断和待确认项。
34
+ - AI 必须说明为什么修改这些文件、为什么不修改其他层。
35
+ - AI 必须运行可用检查并如实报告未验证项。
36
+ - AI 必须保留与任务无关的用户现有改动。
37
+
38
+ ## MUST NOT
39
+
40
+ - MUST NOT 发明正式字段、枚举、公式、权限码、接口、路由或配置。
41
+ - MUST NOT 重复创建已有能力。
42
+ - MUST NOT 删除测试、降低断言、关闭规则或用类型逃逸掩盖问题。
43
+ - MUST NOT 声称执行了实际未运行的验证。
44
+
45
+ ## SHOULD
46
+
47
+ - SHOULD 把重复决策沉淀为协议、contract 或自动检查。
48
+ - SHOULD 为高风险公共变更提供迁移和回滚。
49
+
50
+ ## Contract
51
+
52
+ ```text
53
+ Goal, Protocols, Facts, Assumptions, TODO_CONFIRM,
54
+ ReuseSearch, FilesToChange, FilesNotToChange,
55
+ Validation, ResidualRisk
56
+ ```
57
+
58
+ ## Checklist
59
+
60
+ - [ ] 已读协议和正式契约。
61
+ - [ ] 已证明新建必要性。
62
+ - [ ] 未猜测业务和接口事实。
63
+ - [ ] 修改与同步范围明确。
64
+ - [ ] 验证结果真实可复核。
65
+
66
+ ## Examples
67
+
68
+ ### 内容示例,可删除
69
+
70
+ AI 修复报表列宽前识别列 schema 所属层级,验证相同表格类型,再修改领域 preset。
71
+
72
+ ## Anti-patterns
73
+
74
+ 未搜索组件库便新建相似组件,并顺手重构 store、API 和全局样式。
75
+
76
+ ## Ownership
77
+
78
+ AI 仅为 Contributor;任务、代码、评审和上线分别由对应人类 Owner 负责。
79
+
80
+ ## Change Policy
81
+
82
+ 放宽 AI 禁止规则必须由工程治理和领域 Owner 批准;新型 AI 错误应转为协议或门禁。
@@ -0,0 +1,86 @@
1
+ ---
2
+ seed_source: pomaster/components/frontend-hard-spec/assets/universal/03-acceptance-gate-protocol.md
3
+ seed_source_sha256: 646dcbd7035d43d84ca592218a356c08a4baca36619109797322d90ba3d99b73
4
+ seed_version: B6B-1
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
+ ---
12
+
13
+ # 03 验收门禁协议
14
+
15
+ ## Scope
16
+
17
+ P0。定义变更何时可以进入 Review、提测和上线,以及各阶段的必备证据。
18
+
19
+ ## Non-Scope
20
+
21
+ 不指定测试框架,不替代业务验收、发布平台操作或人工批准责任。
22
+
23
+ ## Terms
24
+
25
+ - Ready for Review:实现和自检完成。
26
+ - Ready for Test:评审阻塞关闭,构建可测试。
27
+ - Ready for Release:质量、安全、监控和回滚可用。
28
+ - Ready for Development:相关项目级和需求级 spec 已达到 Baseline 或批准的 Candidate。
29
+ - Blocker:不满足即禁止进入下一阶段的问题。
30
+
31
+ ## MUST
32
+
33
+ - 每个阶段输出 pass、fail 或有期限的 exception,并附证据。
34
+ - P0 门禁失败时禁止进入下一阶段。
35
+ - 契约、权限、安全、数据迁移和回滚风险必须确认。
36
+ - 公共能力变更必须验证全部受影响调用方。
37
+ - 例外必须记录负责人、风险、补偿措施和期限。
38
+ - 开发前必须确认命中的项目级、需求级、组件级和接口级 spec 状态。
39
+ - Review、提测、上线或任务关闭前必须确认 Spec Update Review 已完成。
40
+
41
+ ## MUST NOT
42
+
43
+ - MUST NOT 以时间紧、人工点过或本地正常绕过 P0。
44
+ - MUST NOT 在测试失败、契约未冻结或回滚不可用时放行。
45
+ - MUST NOT 将未知风险标记为通过。
46
+ - MUST NOT 在 spec 仍为 Draft 且无批准 Candidate 的情况下进入正式开发。
47
+ - MUST NOT 将收口(closeout)、归档、发布记录当作 Spec Update Review 的替代品。
48
+
49
+ ## SHOULD
50
+
51
+ - SHOULD 自动采集 lint、类型、测试、构建、安全和包体证据。
52
+ - SHOULD 按风险设置附加门禁。
53
+
54
+ ## Contract
55
+
56
+ ```text
57
+ Gate, SpecStatus, Result, Evidence[], Blockers[], Risks[],
58
+ Approver, ExceptionExpiry?, RollbackVerified?, SpecUpdateReviewed?
59
+ ```
60
+
61
+ ## Checklist
62
+
63
+ - [ ] Review 前范围、契约、自检齐全。
64
+ - [ ] 提测前评审关闭、构建成功、环境明确。
65
+ - [ ] 上线前回归、安全、监控、灰度、回滚通过。
66
+ - [ ] 例外有负责人和到期时间。
67
+ - [ ] 开发前 Ready for Development 已通过。
68
+ - [ ] 收尾前 Spec Update Review 已完成。
69
+
70
+ ## Examples
71
+
72
+ ### 内容示例,可删除
73
+
74
+ 公共表格变更在组件测试、代表页面 E2E 和视觉回归通过后才可提测。
75
+
76
+ ## Anti-patterns
77
+
78
+ 仅凭“改动很小”跳过构建和调用方验证,直接交付测试或发布。
79
+
80
+ ## Ownership
81
+
82
+ 实现者提供 Review 证据,Reviewer/QA 确认提测,发布和风险 Owner 确认上线。
83
+
84
+ ## Change Policy
85
+
86
+ 门禁降级或删除必须有书面风险评估、批准人和恢复计划。