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,219 @@
1
+ ---
2
+ seed_source: pomaster/components/frontend-hard-spec/assets/universal/07-frontend-backend-communication-protocol.md
3
+ seed_source_sha256: b14d2f8281198ff663e6e21e58df2e429c4683907cb77b6ebcdb6609d37f72d2
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
+ # 07 前后端通信协议
14
+
15
+ ## Scope
16
+
17
+ P0。定义前后端共同确认的接口、认证、错误、幂等、并发、文件、任务、实时通信和版本契约。
18
+
19
+ ## Non-Scope
20
+
21
+ 不规定前端请求库实现、页面错误呈现或具体后端框架。
22
+
23
+ ## Terms
24
+
25
+ - Formal Contract:可版本化、可校验的 OpenAPI 或等价契约。
26
+ - Idempotency:重复请求不产生重复业务结果。
27
+ - Optimistic Concurrency:通过 version/ETag 防止静默覆盖。
28
+ - TraceId:贯穿请求、任务和日志的问题定位标识。
29
+
30
+ ## MUST
31
+
32
+ - 每个 endpoint 定义 URL、Method、参数位置、类型、响应、错误、权限和 owner。
33
+ - 分页、筛选、排序、空值、枚举、单位和时间语义必须明确。
34
+ - 写操作定义幂等、并发版本和缓存影响。
35
+ - 文件、异步任务和实时消息使用正式 schema。
36
+ - 破坏性变更必须版本化并提供迁移期。
37
+ - 所有错误和任务链路可通过 TraceId 追踪。
38
+ - 错误码到 UI 状态的映射必须维护在单一事实源 `outputs/frontend/10_planned/api-error-mapping.yaml`,并与契约版本同步。
39
+
40
+ ## MUST NOT
41
+
42
+ - MUST NOT 用口头、截图、Mock 或示例替代正式契约。
43
+ - MUST NOT 依赖 message 文本表达业务错误。
44
+ - MUST NOT 用按钮 loading 代替后端幂等。
45
+ - MUST NOT 未版本化地修改字段、枚举、分页或错误语义。
46
+
47
+ ## SHOULD
48
+
49
+ - SHOULD 以机器可读契约生成类型、Mock 和校验。
50
+ - SHOULD 对任务进度优先使用 SSE,双向场景再用 WebSocket。
51
+
52
+ ## Contract
53
+
54
+ ### 接口元数据
55
+
56
+ ```text
57
+ Endpoint, Method, Auth, Permission, RequestSchema,
58
+ ResponseSchema, ErrorSchema, Idempotency,
59
+ Concurrency, Cache, RateLimit, Version, Owner
60
+ ```
61
+
62
+ 每个接口还必须记录用途、所属领域、稳定 operation id、超时、弃用状态和变更历史。口头约定、Mock、抓包结果和前端临时类型只能作为评审输入,不能成为主契约。
63
+
64
+ ### URL 与 Method
65
+
66
+ - URL 使用稳定资源名和层级,不把页面动作或展示标题编码进路径。
67
+ - GET 只读且可安全重试;POST/PUT/PATCH/DELETE 的创建、替换、部分更新和删除语义必须明确。
68
+ - 提交、审批、归档、计算等非 CRUD 动作使用明确领域动作,不使用 `doAction` 等万能端点。
69
+ - Path 参数标识资源,Query 表达分页/筛选/排序,Header 表达协议上下文,Body 表达命令或资源数据。
70
+
71
+ ### 请求参数
72
+
73
+ 每个字段必须定义:名称、位置、类型、必填、nullable、默认值、长度/范围、格式、枚举、单位、时区、示例和未知值策略。空字符串、null、缺失字段和空数组的语义不得混用。
74
+
75
+ ### 响应结构
76
+
77
+ - 成功响应必须声明 HTTP status、内容类型、数据 schema、可空性和 TraceId。
78
+ - 列表必须固定数据数组、页码或游标、pageSize、total/hasNext 的语义。
79
+ - 删除、提交、异步创建等操作必须明确同步结果、任务标识或无内容响应。
80
+ - 前端不得为同一业务同时兼容多个未版本化 envelope。
81
+
82
+ ### 错误结构
83
+
84
+ ```text
85
+ Error {
86
+ httpStatus,
87
+ code,
88
+ safeMessage?,
89
+ traceId,
90
+ fieldErrors?,
91
+ itemErrors?,
92
+ retryable,
93
+ retryAfter?,
94
+ conflictVersion?
95
+ }
96
+ ```
97
+
98
+ - HTTP status 表达认证、权限、资源、冲突、校验、限流和服务状态。
99
+ - 业务 code 必须稳定且可枚举,message 仅用于展示或诊断,不能驱动逻辑。
100
+ - 字段错误包含稳定 field key、错误码和参数;批量错误包含对象/行标识。
101
+ - 409 返回冲突实体或重新获取方式;429 返回明确退避信息;5xx 不代表所有请求均可重试。
102
+
103
+ ### DTO、Adapter 与 ViewModel
104
+
105
+ 接口契约定义 DTO。前端通过 Adapter 转成稳定 Domain Model/ViewModel;公共组件、表格列和模板不得直接依赖 DTO。字段重命名、null、枚举、日期和金额转换只能在边界完成。
106
+
107
+ ### 分页、筛选与排序
108
+
109
+ - 页码起点或游标语义、pageSize 上限、total 是否精确必须固定。
110
+ - 筛选字段采用允许列表,并定义操作符、组合逻辑、空值和时间区间。
111
+ - 排序字段和方向采用允许列表;需要稳定结果时声明次排序。
112
+ - 导出必须复用列表筛选语义,并明确当前页、选中项或符合条件的全量范围。
113
+
114
+ ### 权限通信
115
+
116
+ - 接口声明认证要求、操作权限和数据范围。
117
+ - 后端只返回调用方有权访问的数据;前端隐藏入口不能替代鉴权。
118
+ - 字段可见、脱敏、编辑和导出权限必须有稳定 contract。
119
+ - 权限变化后 token、缓存和已打开页面如何失效必须明确。
120
+
121
+ ### 认证与 Token
122
+
123
+ 必须定义 access/refresh token 生命周期、传输位置、刷新、撤销、退出、多标签同步、并发 401 合并和 CSRF 策略。Token 不得出现在 URL、日志、埋点或业务组件。
124
+
125
+ ### 幂等性
126
+
127
+ - 创建、提交、审批、批量动作、导入、导出和计算等可能重复执行的命令必须声明幂等支持。
128
+ - 幂等键的生成方、作用域、有效期、重复请求响应和冲突行为必须固定。
129
+ - 前端按钮禁用和 loading 只是体验保护,不构成业务幂等。
130
+
131
+ ### 并发与数据冲突
132
+
133
+ - 可编辑资源返回 version、updatedAt 或 ETag,并在更新命令携带预期版本。
134
+ - 冲突必须显式返回,不允许静默 last-write-wins。
135
+ - 契约声明刷新、放弃本地修改、重新提交和字段 diff 所需数据。
136
+
137
+ ### 缓存与刷新
138
+
139
+ 接口声明可缓存性、ETag/version、数据实时性和写操作影响资源。权限、BOM、成本、审批等高风险数据不得由调用方擅自延长缓存;mutation 必须提供足够信息完成准确失效。
140
+
141
+ ### 文件上传与下载
142
+
143
+ - 上传声明 multipart 字段、类型、大小、数量、文件名、校验阶段和安全错误。
144
+ - 下载声明内容类型、文件名编码、权限、数据范围、有效期和断点/大文件策略。
145
+ - 文件 URL 不得成为永久越权入口,下载时必须重新授权。
146
+
147
+ ### 异步任务
148
+
149
+ ```text
150
+ Job {
151
+ taskId, type, status, progress,
152
+ message?, result?, error?, traceId,
153
+ createdAt, updatedAt
154
+ }
155
+ ```
156
+
157
+ 必须定义创建、查询、取消、重试、结果、错误明细、过期和幂等。状态机至少区分 pending、running、success、failed、cancelled;新增状态需契约变更。
158
+
159
+ ### 实时通信
160
+
161
+ - 服务端单向进度和通知优先 SSE;双向协作才使用 WebSocket;轮询为降级。
162
+ - 消息至少包含 messageId、type、payload、timestamp、version 和 TraceId。
163
+ - 必须定义鉴权、心跳、断线重连、重复、乱序、丢失、回放、完成终止和降级行为。
164
+
165
+ ### 版本兼容
166
+
167
+ - 新增可选字段通常向后兼容;删除、改名、类型、枚举或语义变化属于破坏性变更。
168
+ - 未知枚举必须安全兜底,但不得静默赋予业务含义。
169
+ - 破坏性变化提供新版本、调用方清单、迁移期、弃用日期和回滚。
170
+ - 生成类型、Adapter、Mock、导入导出和测试必须随契约同步。
171
+
172
+ ### 联调流程
173
+
174
+ 正式流程为:契约提案 -> 示例/Mock -> 前后端与业务评审 -> 冻结 -> 类型生成/Adapter -> 联调 -> 非理想态验收 -> 发布。联调不能只验证 200,至少覆盖 401、403、409、422、429、5xx、超时和部分成功。
175
+
176
+ ### TraceId
177
+
178
+ 客户端操作、HTTP 请求、异步任务、实时消息、后端日志和用户可见错误应能关联 TraceId/OperationId。TraceId 不携带敏感信息,并在跨服务时保持或建立明确父子关系。
179
+
180
+ ### 错误码到 UI 状态映射
181
+
182
+ `outputs/frontend/10_planned/api-error-mapping.yaml` 是每个项目必须维护的事实源,字段包括:
183
+
184
+ ```text
185
+ ErrorCode, HttpStatus, UIState, RecoverAction, DefaultMessage, TraceIdRequired, ContractVersion
186
+ ```
187
+
188
+ - 每个稳定业务 code 必须映射到唯一 UI 状态(idle/loading/error/success/retry/conflict/permission)。
189
+ - 映射必须随契约版本升级;破坏性 code 变化属于契约变更。
190
+ - UI 不得直接按 message 文本或 HTTP status 推导状态;未映射 code 必须进入兜底状态并记录。
191
+
192
+ ## Checklist
193
+
194
+ - [ ] 请求/响应和错误完整。
195
+ - [ ] 参数位置、空值、枚举、单位和时间语义明确。
196
+ - [ ] 分页、筛选、排序和导出语义一致。
197
+ - [ ] 权限、幂等、并发明确。
198
+ - [ ] 文件/任务/实时契约完整。
199
+ - [ ] 兼容和 TraceId 可验证。
200
+ - [ ] 类型、Adapter、Mock 和错误场景随契约同步。
201
+ - [ ] api-error-mapping.yaml 已维护并与契约版本一致。
202
+
203
+ ## Examples
204
+
205
+ ### 内容示例,可删除
206
+
207
+ 更新实体携带预期 version;冲突返回 409、稳定错误码、服务器版本和 TraceId。批量导入返回 taskId,进度消息使用固定 Job/Realtime schema,完成后按契约刷新受影响资源。
208
+
209
+ ## Anti-patterns
210
+
211
+ 前端按 Mock 猜字段,后端改名后页面同时兼容多种响应并比较错误 message;创建、导入和审批只靠按钮 loading 防重;轮询、SSE 和 WebSocket 又各自定义一套任务状态。
212
+
213
+ ## Ownership
214
+
215
+ 前后端 API Owner 共同负责,业务 Owner 确认语义,安全 Owner 确认认证和权限。
216
+
217
+ ## Change Policy
218
+
219
+ 契约先评审、再冻结、后实现;破坏性变化必须有版本、调用方清单、迁移和退役日期。
@@ -0,0 +1,80 @@
1
+ ---
2
+ seed_source: pomaster/components/frontend-hard-spec/assets/universal/08-role-responsibility-protocol.md
3
+ seed_source_sha256: 732ac305cd16207e4a7bd4c95a6774d1aca33fb4e45cf29991ac0f6475605d6f
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
+ # 08 角色责任协议
14
+
15
+ ## Scope
16
+
17
+ P0/P1 治理协议。定义需求、设计、前端、后端、测试、平台、安全、协议和 AI 协作中的责任边界。
18
+
19
+ ## Non-Scope
20
+
21
+ 不规定组织架构、职级、绩效或人员姓名,不替代项目管理系统。
22
+
23
+ ## Terms
24
+
25
+ - Responsible:执行者。
26
+ - Accountable:最终责任者。
27
+ - Consulted:必须征询者。
28
+ - Informed:必须通知者。
29
+ - Approver:有权放行例外者。
30
+
31
+ ## MUST
32
+
33
+ - 每个协议、公共组件、接口、业务规则和发布都有 Accountable Owner。
34
+ - 跨团队变更开发前确定 Reviewer 和通知范围。
35
+ - 无 Owner 的关键决策必须阻塞并升级。
36
+ - AI 输出必须由人类 Owner Review,AI 不得成为 Approver。
37
+
38
+ ## MUST NOT
39
+
40
+ - MUST NOT 用“团队共同负责”隐藏无人负责。
41
+ - MUST NOT 让前端单方面决定后端契约、公式或数据权限。
42
+ - MUST NOT 让设计稿覆盖安全、可访问性或公共 API。
43
+ - MUST NOT 让 AI 代替业务、合规或上线签字。
44
+
45
+ ## SHOULD
46
+
47
+ - SHOULD 为跨层能力维护轻量 RACI。
48
+ - SHOULD 为 Owner 缺席定义代理和升级路径。
49
+
50
+ ## Contract
51
+
52
+ ```text
53
+ ArtifactOrDecision, Responsible, Accountable,
54
+ Consulted[], Informed[], RequiredReviewers[], EscalationPath
55
+ ```
56
+
57
+ ## Checklist
58
+
59
+ - [ ] 各阶段 Owner 明确。
60
+ - [ ] 跨层 Reviewer 已确定。
61
+ - [ ] 例外有批准者。
62
+ - [ ] AI 输出有人类责任人。
63
+
64
+ ## Examples
65
+
66
+ ### 内容示例,可删除
67
+
68
+ 业务 Owner 定义金额口径,后端负责权威计算,前端负责无损展示,QA 验证边界。
69
+
70
+ ## Anti-patterns
71
+
72
+ 接口含义未确认时由前端和 AI 自行解释,最终无人能判断哪个结果正确。
73
+
74
+ ## Ownership
75
+
76
+ 项目负责人维护角色模型,各领域 Owner 维护其 RACI,治理 Owner 处理无人归属。
77
+
78
+ ## Change Policy
79
+
80
+ 角色或批准边界变化必须通知协作者;临时代理必须有范围和期限。
@@ -0,0 +1,81 @@
1
+ ---
2
+ seed_source: pomaster/components/frontend-hard-spec/assets/universal/09-module-boundary-protocol.md
3
+ seed_source_sha256: f9a3c194910bbb31cd322849cb277db5d2ae0fd74773eef7df34197b8ad89c4f
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
+ # 09 模块边界协议
14
+
15
+ ## Scope
16
+
17
+ P0。定义顶层目录职责、依赖方向、公开入口、shared 下沉和跨模块协作。
18
+
19
+ ## Non-Scope
20
+
21
+ 不规定具体框架目录名,不替代组件、状态或业务规则协议。
22
+
23
+ ## Terms
24
+
25
+ - Module:有明确职责、Owner 和公开入口的代码边界。
26
+ - Public API:允许其他模块依赖的最小出口。
27
+ - Internal:只允许模块内部使用的实现。
28
+ - Shared:无特定业务所有权且满足复用门槛的能力。
29
+
30
+ ## MUST
31
+
32
+ - 顶层目录和模块职责必须文档化。
33
+ - 依赖方向和禁止方向必须可检查。
34
+ - 模块外部只能通过 Public API 引用。
35
+ - 跨模块流程进入明确的 orchestration/feature 层。
36
+ - shared 下沉必须证明稳定复用和低业务耦合。
37
+ - 循环依赖必须被工具检测并阻止。
38
+
39
+ ## MUST NOT
40
+
41
+ - MUST NOT 引用其他模块内部文件。
42
+ - MUST NOT 把页面代码作为其他模块依赖。
43
+ - MUST NOT 因方便把业务能力放进 shared。
44
+ - MUST NOT 新建无职责说明的顶层目录。
45
+
46
+ ## SHOULD
47
+
48
+ - SHOULD 每个模块维护 contract、owner 和 index/public exports。
49
+ - SHOULD 用依赖图和 lint 自动执行边界。
50
+
51
+ ## Contract
52
+
53
+ ```text
54
+ Module, Responsibility, Owner, PublicExports[],
55
+ AllowedDependencies[], ForbiddenDependencies[], InternalPaths[]
56
+ ```
57
+
58
+ ## Checklist
59
+
60
+ - [ ] 新文件归属可解释。
61
+ - [ ] 只通过公开入口依赖。
62
+ - [ ] shared 满足下沉条件。
63
+ - [ ] 无循环或越层引用。
64
+
65
+ ## Examples
66
+
67
+ ### 内容示例,可删除
68
+
69
+ 两个业务域共同参与的导入流程放入 feature/orchestration 层,而不是让域 A 引用域 B 的页面。
70
+
71
+ ## Anti-patterns
72
+
73
+ 把带客户、订单、成本语义的组件放入 shared,再被多个模块反向耦合。
74
+
75
+ ## Ownership
76
+
77
+ 架构 Owner 维护顶层边界,模块 Owner 维护公开入口,Reviewer 阻止越层引用。
78
+
79
+ ## Change Policy
80
+
81
+ 新增顶层模块、改变依赖方向或扩大 Public API 必须经过架构评审和迁移说明。
@@ -0,0 +1,89 @@
1
+ ---
2
+ seed_source: pomaster/components/frontend-hard-spec/assets/universal/10-engineering-tooling-protocol.md
3
+ seed_source_sha256: c628d47dcae1ddd58ea3651eeae9dd84ff5157365a3892a367bd7b5bf0af2b9d
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
+ # 10 工程工具协议
14
+
15
+ ## Scope
16
+
17
+ P0。用类型、格式、Lint、契约、测试、示例、CI 和 ADR 固化团队协议。
18
+
19
+ ## Non-Scope
20
+
21
+ 不强制所有项目使用同一框架或供应商工具,不替代依赖评审。
22
+
23
+ ## Terms
24
+
25
+ - Quality Command:本地与 CI 共用的标准检查入口。
26
+ - Generated Artifact:由可重复命令生成、禁止手改的文件。
27
+ - ADR:记录重要架构决策及后果的文档。
28
+
29
+ ## MUST
30
+
31
+ - 项目明确 TypeScript/类型、Lint、Format、样式、测试和构建工具。
32
+ - 本地与 CI 使用相同标准命令。
33
+ - 接口契约和生成物必须可重复生成和校验。
34
+ - 公共组件必须有可运行示例。
35
+ - 重要架构和工具决策必须记录 ADR/RFC。
36
+ - 工具违规必须产生明确失败而非仅提示。
37
+ - 运行时、包管理器和关键构建工具版本必须被仓库内机器可读配置固定,并由 CI 校验。
38
+ - TypeScript 项目必须启用与代码库兼容的严格类型检查;暂不能启用的严格选项必须有范围、Owner、迁移计划和期限。
39
+ - 外部数据必须先经运行时校验再进入可信类型;类型断言和非空断言不得替代边界验证。
40
+ - 配置必须有单一有效来源,废弃配置应移除或显式失效,避免多个配置文件竞争生效。
41
+
42
+ ## MUST NOT
43
+
44
+ - MUST NOT 只靠口头约定格式、类型、接口和组件用法。
45
+ - MUST NOT 手改生成物。
46
+ - MUST NOT 为局部问题关闭全局规则。
47
+ - MUST NOT 让 CI 与本地使用不同质量标准。
48
+ - MUST NOT 依赖开发机全局安装的工具或隐式环境状态完成构建和检查。
49
+ - MUST NOT 用项目级忽略、`any`、类型断言或关闭规则掩盖局部问题;例外必须最小化并可追踪。
50
+
51
+ ## SHOULD
52
+
53
+ - SHOULD 自动检测依赖边界、契约漂移、包体、可访问性和视觉回归。
54
+ - SHOULD 提供一条命令执行常规质量门禁。
55
+
56
+ ## Contract
57
+
58
+ ```text
59
+ Tool, Purpose, VersionPolicy, Command,
60
+ Inputs, Outputs, FailureCondition, Owner
61
+ ```
62
+
63
+ ## Checklist
64
+
65
+ - [ ] 工具和命令明确。
66
+ - [ ] CI 可自动发现违规。
67
+ - [ ] 生成过程可重复。
68
+ - [ ] 公共组件有示例。
69
+ - [ ] 重要决策有记录。
70
+ - [ ] 运行时和工具版本可复现,未依赖全局安装。
71
+ - [ ] 类型严格度和例外有边界、Owner 与迁移计划。
72
+
73
+ ## Examples
74
+
75
+ ### 内容示例,可删除
76
+
77
+ 类型、lint、单测和构建通过统一脚本运行,CI 直接调用相同脚本。
78
+
79
+ ## Anti-patterns
80
+
81
+ 开发者本地忽略类型错误,CI 又没有 typecheck,问题直到上线构建才暴露。
82
+
83
+ ## Ownership
84
+
85
+ 工程 Owner 维护工具链,模块 Owner 修复违规,CI Owner 保证门禁可靠。
86
+
87
+ ## Change Policy
88
+
89
+ 工具新增、替换或规则放宽必须评估迁移、性能和开发体验,并提供版本化配置。
@@ -0,0 +1,87 @@
1
+ ---
2
+ seed_source: pomaster/components/frontend-hard-spec/assets/universal/11-dependency-package-management-protocol.md
3
+ seed_source_sha256: a0cc135edaf0dfd1f5122d2ff7298866143ef3a273ad4d45f5e1eff763691867
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
+ # 11 依赖与包管理协议
14
+
15
+ ## Scope
16
+
17
+ P1。管理包管理器、锁文件、依赖引入、版本、许可证、安全、升级和删除。
18
+
19
+ ## Non-Scope
20
+
21
+ 不规定具体框架选型,不替代供应链扫描和法律审查。
22
+
23
+ ## Terms
24
+
25
+ - Runtime Dependency:进入生产运行路径的依赖。
26
+ - Development Dependency:仅构建、测试或开发使用。
27
+ - Dependency Budget:包体、维护、安全和替换成本预算。
28
+
29
+ ## MUST
30
+
31
+ - 固定包管理器、锁文件和受信 registry。
32
+ - 固定 runtime 与包管理器版本;仓库只能有一种生效锁文件,CI 使用 frozen/immutable 安装并在 manifest 与锁文件漂移时失败。
33
+ - 引入前检查现有能力、维护状态、许可证、安全、包体和替代方案。
34
+ - 依赖变更必须审查直接与传递依赖、完整性/来源、安装脚本、可执行代码、发布内容和锁文件差异。
35
+ - 正确区分 runtime/dev 并保证可重复安装。
36
+ - 升级审查 breaking changes、测试和回滚。
37
+ - 删除未使用依赖及其配置、适配和文档。
38
+ - 构建插件、CI action、代码生成器和远程脚本按供应链依赖治理;可变引用必须改为不可变版本或受控版本策略。
39
+
40
+ ## MUST NOT
41
+
42
+ - MUST NOT 为简单函数引入大型库。
43
+ - MUST NOT 并存职责重复的核心库而无批准。
44
+ - MUST NOT 手改或绕过锁文件。
45
+ - MUST NOT 忽略高危漏洞和许可证冲突。
46
+ - MUST NOT 盲目执行依赖安装脚本、远程脚本或自动修复命令而不审查将执行和变更的内容。
47
+ - MUST NOT 只审查 `package.json` 而忽略锁文件、传递依赖和 CI/构建依赖变化。
48
+
49
+ ## SHOULD
50
+
51
+ - SHOULD 选择维护活跃、tree-shakable、类型完整的依赖。
52
+ - SHOULD 通过 adapter 隔离高替换成本 API。
53
+ - SHOULD 自动执行依赖差异、安全、许可证和来源审查;发布包时生成可验证 provenance/SBOM,并检查发布内容不含凭据、测试身份或私有 source map。
54
+
55
+ ## Contract
56
+
57
+ ```text
58
+ Package, Purpose, AlternativesChecked, RuntimeOrDev,
59
+ VersionPolicy, LockfileImpact, TransitiveDiff, Integrity, Provenance,
60
+ InstallScripts, BundleImpact, License, Security, Owner, RemovalPlan
61
+ ```
62
+
63
+ ## Checklist
64
+
65
+ - [ ] 新增必要性已证明。
66
+ - [ ] 安全、许可、维护、包体已评估。
67
+ - [ ] 安装可重复。
68
+ - [ ] 有升级和移除策略。
69
+ - [ ] 传递依赖、安装脚本和构建/CI 依赖已审查。
70
+
71
+ ## Examples
72
+
73
+ ### 内容示例,可删除
74
+
75
+ 引入表格引擎前比较现有组件、许可证、虚拟滚动、可访问性和长期维护,并通过 adapter 隔离。
76
+
77
+ ## Anti-patterns
78
+
79
+ 多个页面分别引入不同日期库,只为格式化日期,造成包体和时区行为不一致。
80
+
81
+ ## Ownership
82
+
83
+ 工程 Owner 维护策略,模块 Owner 负责新增,安全/法务裁决风险。
84
+
85
+ ## Change Policy
86
+
87
+ 新增或主版本升级需要评审记录;紧急安全升级可加速但必须补测试。
@@ -0,0 +1,79 @@
1
+ ---
2
+ seed_source: pomaster/components/frontend-hard-spec/assets/universal/12-business-rules-protocol.md
3
+ seed_source_sha256: dda683a7c907989032c82a2c1c3e552b51226e0e0cd5bdf3b6068cc7f649c525
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
+ # 12 业务规则协议
14
+
15
+ ## Scope
16
+
17
+ P1。定义领域校验、操作许可、状态流转、时间范围、金额规则入口和后端兜底关系。
18
+
19
+ ## Non-Scope
20
+
21
+ 不定义视觉呈现,不允许前端规则替代后端权威规则。
22
+
23
+ ## Terms
24
+
25
+ - Domain Rule:不依赖具体页面的业务判断。
26
+ - State Machine:合法状态及转换集合。
27
+ - Authoritative Validation:决定业务结果的后端校验。
28
+
29
+ ## MUST
30
+
31
+ - 规则集中存放、命名、测试并有 Owner。
32
+ - 页面和组件调用规则函数,不复制表达式。
33
+ - 状态转换声明来源、目标、条件、权限和失败码。
34
+ - 金额、比例、日期区间和操作限制有明确契约。
35
+ - 后端执行最终一致性和权威校验。
36
+
37
+ ## MUST NOT
38
+
39
+ - MUST NOT 将同一规则散落在组件、文案和 API 回调。
40
+ - MUST NOT 以按钮禁用代替后端校验。
41
+ - MUST NOT 在无正式来源时发明状态或公式。
42
+ - MUST NOT 用展示文案作为规则返回值。
43
+
44
+ ## SHOULD
45
+
46
+ - SHOULD 使用纯函数、schema 和状态机表达可测试规则。
47
+ - SHOULD 返回稳定原因码供 UI 映射文案。
48
+
49
+ ## Contract
50
+
51
+ ```text
52
+ RuleId, Inputs, Preconditions, Result,
53
+ ReasonCodes[], BackendEnforcement, Owner, Version
54
+ ```
55
+
56
+ ## Checklist
57
+
58
+ - [ ] 规则来源和 Owner 明确。
59
+ - [ ] 页面未复制规则。
60
+ - [ ] 状态与错误码完整。
61
+ - [ ] 后端有权威兜底。
62
+
63
+ ## Examples
64
+
65
+ ### 内容示例,可删除
66
+
67
+ `canApprove(entity, actor)` 返回允许状态和原因码,页面仅决定如何展示。
68
+
69
+ ## Anti-patterns
70
+
71
+ 三个页面分别用不同 if 判断“审批中不可编辑”,导致规则漂移。
72
+
73
+ ## Ownership
74
+
75
+ 业务/领域 Owner 定义语义,后端 Owner 保证权威执行,前端负责一致呈现。
76
+
77
+ ## Change Policy
78
+
79
+ 规则或状态变化必须版本化并同步 API、权限、审计、文案和测试。