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.
- package/README.md +9 -10
- package/catalog/archetypes/archetype.frontend.error_taxonomy.json +13 -5
- package/catalog/archetypes/archetype.frontend.feature_oriented.json +1 -1
- package/catalog/archetypes/archetype.state.async_command.json +4 -4
- package/catalog/catalog-lock.draft.json +1120 -104
- package/catalog/gates/gate.be.api.contract_checks.json +2 -1
- package/catalog/gates/gate.be.chg.contract_change_checks.json +2 -1
- package/catalog/gates/gate.chg.prechange_checks.json +2 -1
- package/catalog/gates/gate.web.api.request_checks.json +2 -1
- package/catalog/gates/gate.web.grid.checks.json +2 -1
- package/catalog/knowledge/knowledge.api.example_stable_error_code.json +2 -1
- package/catalog/knowledge/knowledge.chg.example_compat_window.json +2 -1
- package/catalog/knowledge/knowledge.chg.example_prop_migration.json +2 -1
- package/catalog/knowledge/knowledge.fp.api.field_drift_no_contract.json +2 -1
- package/catalog/knowledge/knowledge.fp.api.per_page_http_client.json +2 -1
- package/catalog/knowledge/knowledge.fp.be.contract_drift.json +2 -1
- package/catalog/knowledge/knowledge.fp.chg.page_local_padding.json +2 -1
- package/catalog/knowledge/knowledge.fp.grid.global_td_width.json +2 -1
- package/catalog/knowledge/knowledge.web.api.example_get_entity_list.json +2 -1
- package/catalog/knowledge/knowledge.web.grid.example_column_preset.json +2 -1
- package/catalog/policies/authority.be.api_contract_ownership.json +2 -1
- package/catalog/policies/authority.be.contract_ownership.json +2 -1
- package/catalog/policies/authority.chg.change_owners.json +2 -1
- package/catalog/policies/authority.web.api.request_owners.json +2 -1
- package/catalog/policies/authority.web.grid.ownership.json +2 -1
- package/catalog/policies/policy.ai.change_plan_first.json +91 -0
- package/catalog/policies/policy.ai.fact_inference_separation.json +91 -0
- package/catalog/policies/policy.ai.read_search_verify_before_write.json +92 -0
- package/catalog/policies/policy.ai.rule_relaxation_approval.json +91 -0
- package/catalog/policies/policy.api.backward_compat_defaults.json +2 -1
- package/catalog/policies/policy.api.contract_impl_consistency.json +2 -1
- package/catalog/policies/policy.api.no_informal_contract.json +2 -1
- package/catalog/policies/policy.arch.adr_immutable_history.json +91 -0
- package/catalog/policies/policy.arch.decision_tradeoff_record.json +2 -1
- package/catalog/policies/policy.arch.no_convenience_over_boundary.json +93 -0
- package/catalog/policies/policy.arch.prefer_verifiable_option.json +92 -0
- package/catalog/policies/policy.authz.no_gating_proxy_trust.json +99 -0
- package/catalog/policies/policy.authz.permission_scope_expansion_gate.json +99 -0
- package/catalog/policies/policy.authz.server_five_factor_verification.json +101 -0
- package/catalog/policies/policy.be.conc.prefer_db_constraints.json +97 -0
- package/catalog/policies/policy.be.db.expand_migrate_contract.json +97 -0
- package/catalog/policies/policy.be.idem.key_payload_conflict.json +97 -0
- package/catalog/policies/policy.be.model.single_boundary_conversion.json +97 -0
- package/catalog/policies/policy.be.sql.index_for_known_queries.json +97 -0
- package/catalog/policies/policy.be.state.single_rule_source.json +97 -0
- package/catalog/policies/policy.be.txn.short_locks_compensation.json +96 -0
- package/catalog/policies/policy.bound.search_first_entry_only.json +91 -0
- package/catalog/policies/policy.boundary.validate_in_encode_out.json +92 -0
- package/catalog/policies/policy.cache.failure_mode_guards.json +93 -0
- package/catalog/policies/policy.cache.lifecycle_definition.json +2 -1
- package/catalog/policies/policy.cache.schema_versioning.json +91 -0
- package/catalog/policies/policy.cfg.config_attribute_completeness.json +95 -0
- package/catalog/policies/policy.cfg.key_rename_dual_read.json +92 -0
- package/catalog/policies/policy.cfg.no_secret_dispersal.json +90 -0
- package/catalog/policies/policy.cfg.production_safe_defaults.json +92 -0
- package/catalog/policies/policy.cfg.schema_backed_config.json +92 -0
- package/catalog/policies/policy.chg.affect_templates.json +2 -1
- package/catalog/policies/policy.chg.breaking_versioning.json +2 -1
- package/catalog/policies/policy.chg.compat_migration_rollback.json +2 -1
- package/catalog/policies/policy.chg.deprecate_before_delete.json +2 -1
- package/catalog/policies/policy.chg.fix_at_root_cause_level.json +2 -1
- package/catalog/policies/policy.chg.no_unrelated_changes.json +91 -0
- package/catalog/policies/policy.chg.observable_evolution.json +2 -1
- package/catalog/policies/policy.chg.prechange_consumer_scan.json +2 -1
- package/catalog/policies/policy.chg.staged_rollout.json +2 -1
- package/catalog/policies/policy.chg.sync_contract_docs_tests.json +2 -1
- package/catalog/policies/policy.conflict.priority_ladder.json +2 -1
- package/catalog/policies/policy.contract.no_invented_facts.json +93 -0
- package/catalog/policies/policy.dep.admission_six_dimension_check.json +2 -1
- package/catalog/policies/policy.dep.build_path_supply_chain.json +93 -0
- package/catalog/policies/policy.dep.change_surface_review.json +2 -1
- package/catalog/policies/policy.dep.introduction_review.json +2 -1
- package/catalog/policies/policy.dep.no_untrusted_source_no_lock_bypass.json +92 -0
- package/catalog/policies/policy.dep.time_boxed_urgent_exception.json +91 -0
- package/catalog/policies/policy.deploy.no_dev_env_as_production_fact.json +91 -0
- package/catalog/policies/policy.deploy.operational_capabilities.json +93 -0
- package/catalog/policies/policy.deploy.runtime_fact_record.json +97 -0
- package/catalog/policies/policy.derived.single_implementation.json +2 -1
- package/catalog/policies/policy.err.failure_five_part_mapping.json +101 -0
- package/catalog/policies/policy.err.no_internal_detail_exposure.json +97 -0
- package/catalog/policies/policy.err.published_code_immutable.json +98 -0
- package/catalog/policies/policy.evid.acceptance_binds_verifiable_evidence.json +92 -0
- package/catalog/policies/policy.evid.no_silent_gate_removal.json +90 -0
- package/catalog/policies/policy.evid.no_unverifiable_pass.json +92 -0
- package/catalog/policies/policy.flag.cleanup_after_full_rollout.json +94 -0
- package/catalog/policies/policy.flag.consistent_off_state.json +92 -0
- package/catalog/policies/policy.flag.kill_switch.json +91 -0
- package/catalog/policies/policy.flag.lifecycle_metadata.json +93 -0
- package/catalog/policies/policy.flag.not_a_permission.json +92 -0
- package/catalog/policies/policy.gate.p0_non_bypassable.json +92 -0
- package/catalog/policies/policy.gate.risk_factors_confirmed.json +93 -0
- package/catalog/policies/policy.guard.no_check_weakening.json +92 -0
- package/catalog/policies/policy.integration.call_definition_minimum.json +95 -0
- package/catalog/policies/policy.integration.fault_containment.json +94 -0
- package/catalog/policies/policy.job.lifecycle_definition.json +96 -0
- package/catalog/policies/policy.job.no_unmanaged_execution.json +92 -0
- package/catalog/policies/policy.job.operational_features.json +93 -0
- package/catalog/policies/policy.obs.actionable_signals.json +93 -0
- package/catalog/policies/policy.obs.alert_with_owner.json +91 -0
- package/catalog/policies/policy.obs.context_field_baseline.json +91 -0
- package/catalog/policies/policy.obs.correlation_context_minimum.json +2 -1
- package/catalog/policies/policy.obs.no_sensitive_or_unbounded_logging.json +92 -0
- package/catalog/policies/policy.obs.no_sensitive_raw_values.json +93 -0
- package/catalog/policies/policy.obs.rum_dimension_whitelist.json +2 -1
- package/catalog/policies/policy.obs.signal_change_impact.json +91 -0
- package/catalog/policies/policy.obs.source_map_access_control.json +92 -0
- package/catalog/policies/policy.obs.telemetry_lifecycle_declared.json +93 -0
- package/catalog/policies/policy.obs.trace_correlation.json +91 -0
- package/catalog/policies/policy.perf.budget_change_retest.json +91 -0
- package/catalog/policies/policy.perf.evidence_binding.json +95 -0
- package/catalog/policies/policy.perf.observation_dimensions.json +94 -0
- package/catalog/policies/policy.proc.checklist_change_policy.json +91 -0
- package/catalog/policies/policy.proc.pre_code_declaration.json +2 -1
- package/catalog/policies/policy.proc.scope_drift_reclassify.json +91 -0
- package/catalog/policies/policy.prv.processing_scope_re_review.json +97 -0
- package/catalog/policies/policy.prv.sensitive_data_six_facts.json +102 -0
- package/catalog/policies/policy.registry.human_fields_validated_decorrelated.json +93 -0
- package/catalog/policies/policy.rel.no_irreversible_unmonitored_full_release.json +91 -0
- package/catalog/policies/policy.rel.observability_before_ship.json +91 -0
- package/catalog/policies/policy.rel.pre_release_confirmation.json +2 -1
- package/catalog/policies/policy.rel.process_change_needs_drill_audit.json +91 -0
- package/catalog/policies/policy.rel.traceable_build.json +93 -0
- package/catalog/policies/policy.role.domain_decision_authority.json +2 -1
- package/catalog/policies/policy.role.human_signs_for_ai.json +93 -0
- package/catalog/policies/policy.sec.authn_policy_unified.json +91 -0
- package/catalog/policies/policy.sec.no_client_side_trust.json +92 -0
- package/catalog/policies/policy.sec.no_longterm_security_disable.json +91 -0
- package/catalog/policies/policy.sec.no_script_readable_credentials.json +91 -0
- package/catalog/policies/policy.sec.no_secrets_in_client_surface.json +91 -0
- package/catalog/policies/policy.sec.relaxation_approval.json +92 -0
- package/catalog/policies/policy.sec.security_relaxation_gate.json +92 -0
- package/catalog/policies/policy.sec.third_party_execution_register.json +2 -1
- package/catalog/policies/policy.sec.trust_boundary_enforcement.json +93 -0
- package/catalog/policies/policy.sec.upload_download_server_recheck.json +91 -0
- package/catalog/policies/policy.sec.url_source_allowlist.json +91 -0
- package/catalog/policies/policy.spec.admission_criteria.json +2 -1
- package/catalog/policies/policy.spec.derived_view_regeneration.json +2 -1
- package/catalog/policies/policy.spec.draft_not_baseline.json +2 -1
- package/catalog/policies/policy.spec.family_conflict_precedence.json +93 -0
- package/catalog/policies/policy.spec.file_structure_contract.json +2 -1
- package/catalog/policies/policy.spec.freeze_before_use.json +93 -0
- package/catalog/policies/policy.spec.metadata_required.json +2 -1
- package/catalog/policies/policy.spec.post_dev_backfill_classify.json +2 -1
- package/catalog/policies/policy.spec.primary_source_basis.json +93 -0
- package/catalog/policies/policy.spec.procedural_record_not_surrogate.json +2 -1
- package/catalog/policies/policy.spec.semantic_identity.json +2 -1
- package/catalog/policies/policy.spec.unresolved_ledger_gate.json +2 -1
- package/catalog/policies/policy.stack.derived_store_not_authority.json +93 -0
- package/catalog/policies/policy.stack.dual_web_stack_boundary.json +93 -0
- package/catalog/policies/policy.stack.entry_chain_recorded.json +93 -0
- package/catalog/policies/policy.stack.entry_limits_aligned.json +94 -0
- package/catalog/policies/policy.stack.local_form_not_prod_fact.json +93 -0
- package/catalog/policies/policy.stack.multi_datastore_ownership.json +93 -0
- package/catalog/policies/policy.stack.no_implicit_selection.json +2 -1
- package/catalog/policies/policy.stack.persistence_coexistence_scope.json +93 -0
- package/catalog/policies/policy.stack.toolchain_versions_pinned.json +95 -0
- package/catalog/policies/policy.stack.upgrade_compat_verified.json +93 -0
- package/catalog/policies/policy.struct.module_entry_dependency_declared.json +92 -0
- package/catalog/policies/policy.struct.no_unexplained_top_level_dir.json +91 -0
- package/catalog/policies/policy.struct.reuse_proven_structure.json +91 -0
- package/catalog/policies/policy.test.control_nondeterminism_keep_diagnosis.json +91 -0
- package/catalog/policies/policy.test.isolation_and_cleanup.json +93 -0
- package/catalog/policies/policy.test.no_synthetic_stability.json +92 -0
- package/catalog/policies/policy.test.pyramid_and_ci_matrix.json +92 -0
- package/catalog/policies/policy.test.removal_justification.json +91 -0
- package/catalog/policies/policy.test.removal_needs_substitute_evidence.json +91 -0
- package/catalog/policies/policy.test.risk_driven_plan.json +92 -0
- package/catalog/policies/policy.test.stable_observable_assertions.json +92 -0
- package/catalog/policies/policy.tool.discoverable_toolchain.json +92 -0
- package/catalog/policies/policy.tool.no_hand_edit_generated_no_ci_drift.json +91 -0
- package/catalog/policies/policy.tool.no_vendored_body_edits.json +94 -0
- package/catalog/policies/policy.tool.scoped_scan_boundary.json +2 -1
- package/catalog/policies/policy.tool.upgrade_verify_lock_rollback.json +92 -0
- package/catalog/policies/policy.web.api.auth_app_client_split.json +2 -1
- package/catalog/policies/policy.web.api.client_change_impact.json +2 -1
- package/catalog/policies/policy.web.api.domain_api_only.json +2 -1
- package/catalog/policies/policy.web.api.error_normalization.json +2 -1
- package/catalog/policies/policy.web.api.generated_client.json +2 -1
- package/catalog/policies/policy.web.api.late_result_guard.json +2 -1
- package/catalog/policies/policy.web.api.mutation_idempotency.json +2 -1
- package/catalog/policies/policy.web.api.no_network_optimism.json +2 -1
- package/catalog/policies/policy.web.api.query_cancel_stale_drop.json +2 -1
- package/catalog/policies/policy.web.api.request_infrastructure.json +2 -1
- package/catalog/policies/policy.web.api.retry_discipline.json +2 -1
- package/catalog/policies/policy.web.api.session_recovery_split.json +2 -1
- package/catalog/policies/policy.web.api.single_http_client.json +2 -1
- package/catalog/policies/policy.web.api.single_loading_source.json +2 -1
- package/catalog/policies/policy.web.api.transport_vs_business.json +2 -1
- package/catalog/policies/policy.web.api.trusted_endpoint_source.json +2 -1
- package/catalog/policies/policy.web.api.typed_domain_naming.json +2 -1
- package/catalog/policies/policy.web.arch.layer_isolation.json +2 -1
- package/catalog/policies/policy.web.arch.naming_conventions.json +2 -1
- package/catalog/policies/policy.web.arch.public_api_barrel.json +2 -1
- package/catalog/policies/policy.web.chg.controlled_change_triggers.json +2 -1
- package/catalog/policies/policy.web.comp.no_trivial_or_god_component.json +91 -0
- package/catalog/policies/policy.web.comp.public_contract_completeness.json +93 -0
- package/catalog/policies/policy.web.copy.action_object_clarity.json +92 -0
- package/catalog/policies/policy.web.copy.enumerable_placement.json +91 -0
- package/catalog/policies/policy.web.copy.error_next_step.json +92 -0
- package/catalog/policies/policy.web.copy.suppression_ledger_discipline.json +2 -1
- package/catalog/policies/policy.web.grid.column_schema_fields.json +2 -1
- package/catalog/policies/policy.web.grid.config_isolation.json +2 -1
- package/catalog/policies/policy.web.grid.freeze_key_columns.json +2 -1
- package/catalog/policies/policy.web.grid.interaction_registry.json +2 -1
- package/catalog/policies/policy.web.grid.keyboard_clipboard.json +2 -1
- package/catalog/policies/policy.web.grid.schema_driven_shell.json +2 -1
- package/catalog/policies/policy.web.grid.schema_versioning.json +2 -1
- package/catalog/policies/policy.web.grid.server_ops_virtualization.json +2 -1
- package/catalog/policies/policy.web.grid.shell_change_matrix.json +2 -1
- package/catalog/policies/policy.web.grid.width_fix_ladder.json +2 -1
- package/catalog/policies/policy.web.handoff.state_matrix_full.json +94 -0
- package/catalog/policies/policy.web.i18n.copy_key_discipline.json +92 -0
- package/catalog/policies/policy.web.i18n.raw_value_for_compute.json +91 -0
- package/catalog/policies/policy.web.page.region_consistency.json +93 -0
- package/catalog/policies/policy.web.perf.budget_skeleton.json +2 -1
- package/catalog/policies/policy.web.style.ownership_matrix.json +2 -1
- package/catalog/policies/policy.web.track.attempt_result_correlation.json +91 -0
- package/catalog/policies/policy.web.track.consent_lifecycle.json +2 -1
- package/catalog/policies/policy.web.track.no_synthetic_actions.json +92 -0
- package/catalog/policies/policy.web.track.privacy_default_deny.json +2 -1
- package/catalog/policies/policy.web.track.stable_event_keys.json +2 -1
- package/catalog/policies/policy.web.track.typed_client_validation.json +91 -0
- package/catalog/policies/policy.web.uiux.provider_evidence_not_business_truth.json +2 -1
- package/catalog/policies/policy.wf.no_planned_as_verified.json +91 -0
- package/catalog/policies/policy.wf.task_facts_preconfirm.json +94 -0
- package/catalog/policies/profile.baseline.java_enterprise_default.json +96 -0
- package/catalog/sensors/sensor.browser.deterministic.json +2 -1
- package/catalog/sensors/sensor.browser.interactive.json +2 -1
- package/catalog/sensors/sensor.build.static.json +2 -1
- package/catalog/sensors/sensor.contract.conformance.json +2 -1
- package/catalog/sensors/sensor.performance.budget.json +2 -1
- package/catalog/sensors/sensor.production.metric.json +2 -1
- package/catalog/tools/seed_b6b_frontend.py +1424 -0
- package/catalog/tools/seed_b6c_backend.py +1495 -0
- package/catalog/tools/seed_b6d_baseline.py +620 -0
- package/catalog/tools/seed_b6e_evidence.py +1305 -0
- package/catalog/tools/seed_d3_review.py +1105 -0
- package/catalog/tools/seed_v06_batch2_materials.py +27 -18
- package/dist/bin.js +23026 -16635
- package/package.json +2 -1
- package/seeds/baseline/backend/api-contract.md +26 -0
- package/seeds/baseline/backend/architecture.md +31 -0
- package/seeds/baseline/backend/data-access.md +31 -0
- package/seeds/baseline/backend/directory-structure.md +11 -0
- package/seeds/baseline/backend/integration-runtime.md +21 -0
- package/seeds/baseline/backend/quality.md +31 -0
- package/seeds/baseline/backend/stack.yaml +13 -0
- package/seeds/baseline/backend/transaction-concurrency.md +26 -0
- package/seeds/baseline/data/lineage.md +11 -0
- package/seeds/baseline/data/migration.md +11 -0
- package/seeds/baseline/data/model.md +31 -0
- package/seeds/baseline/data/precision-units.md +31 -0
- package/seeds/baseline/data/quality.md +31 -0
- package/seeds/baseline/frontend/api-and-error.md +21 -0
- package/seeds/baseline/frontend/architecture.md +26 -0
- package/seeds/baseline/frontend/design-system.md +21 -0
- package/seeds/baseline/frontend/directory-structure.md +16 -0
- package/seeds/baseline/frontend/quality.md +26 -0
- package/seeds/baseline/frontend/stack.yaml +17 -0
- package/seeds/baseline/frontend/state-and-data.md +26 -0
- package/seeds/baseline/manifest.yaml +32 -0
- package/seeds/baseline/platform/delivery.md +36 -0
- package/seeds/baseline/platform/environment.md +11 -0
- package/seeds/baseline/platform/observability.md +31 -0
- package/seeds/baseline/platform/security.md +26 -0
- package/seeds/manifest.json +2006 -0
- package/seeds/specs/evidence/accessibility.md +89 -0
- package/seeds/specs/evidence/architecture.md +89 -0
- package/seeds/specs/evidence/browser-e2e.md +91 -0
- package/seeds/specs/evidence/build.md +91 -0
- package/seeds/specs/evidence/business-acceptance.md +89 -0
- package/seeds/specs/evidence/complexity-crap.md +97 -0
- package/seeds/specs/evidence/contract.md +89 -0
- package/seeds/specs/evidence/coverage.md +91 -0
- package/seeds/specs/evidence/data-migration.md +91 -0
- package/seeds/specs/evidence/dead-code-duplicate.md +89 -0
- package/seeds/specs/evidence/dependency-supply-chain.md +89 -0
- package/seeds/specs/evidence/index.md +55 -0
- package/seeds/specs/evidence/mutation.md +89 -0
- package/seeds/specs/evidence/performance.md +89 -0
- package/seeds/specs/evidence/release.md +91 -0
- package/seeds/specs/evidence/runtime-observability.md +91 -0
- package/seeds/specs/evidence/security.md +89 -0
- package/seeds/specs/evidence/typecheck-lint.md +91 -0
- package/seeds/specs/evidence/unit-component-integration.md +91 -0
- package/seeds/specs/evidence/visual-regression.md +89 -0
- package/seeds/specs/hard/backend/01-architecture-governance-protocol.md +68 -0
- package/seeds/specs/hard/backend/02-project-structure-governance-protocol.md +68 -0
- package/seeds/specs/hard/backend/03-directory-boundary-protocol.md +68 -0
- package/seeds/specs/hard/backend/04-layering-architecture-protocol.md +68 -0
- package/seeds/specs/hard/backend/05-task-workflow-protocol.md +68 -0
- package/seeds/specs/hard/backend/06-ai-generated-code-protocol.md +68 -0
- package/seeds/specs/hard/backend/07-evidence-acceptance-protocol.md +68 -0
- package/seeds/specs/hard/backend/08-contract-change-protocol.md +68 -0
- package/seeds/specs/hard/backend/09-role-responsibility-protocol.md +68 -0
- package/seeds/specs/hard/backend/10-security-protocol.md +68 -0
- package/seeds/specs/hard/backend/11-environment-configuration-protocol.md +67 -0
- package/seeds/specs/hard/backend/12-api-contract-protocol.md +68 -0
- package/seeds/specs/hard/backend/13-privacy-data-lifecycle-protocol.md +68 -0
- package/seeds/specs/hard/backend/14-business-rules-state-protocol.md +68 -0
- package/seeds/specs/hard/backend/15-data-model-protocol.md +68 -0
- package/seeds/specs/hard/backend/16-error-code-protocol.md +68 -0
- package/seeds/specs/hard/backend/17-permission-authorization-protocol.md +68 -0
- package/seeds/specs/hard/backend/18-database-schema-migration-protocol.md +68 -0
- package/seeds/specs/hard/backend/19-query-index-sql-protocol.md +68 -0
- package/seeds/specs/hard/backend/20-transaction-boundary-protocol.md +68 -0
- package/seeds/specs/hard/backend/21-concurrency-locking-protocol.md +68 -0
- package/seeds/specs/hard/backend/22-idempotency-protocol.md +68 -0
- package/seeds/specs/hard/backend/23-cache-redis-consistency-protocol.md +68 -0
- package/seeds/specs/hard/backend/24-external-integration-resilience-protocol.md +68 -0
- package/seeds/specs/hard/backend/25-async-job-scheduler-protocol.md +68 -0
- package/seeds/specs/hard/backend/26-engineering-tooling-protocol.md +68 -0
- package/seeds/specs/hard/backend/27-dependency-supply-chain-protocol.md +68 -0
- package/seeds/specs/hard/backend/28-testing-protocol.md +68 -0
- package/seeds/specs/hard/backend/29-observability-logging-tracing-protocol.md +68 -0
- package/seeds/specs/hard/backend/30-performance-capacity-protocol.md +68 -0
- package/seeds/specs/hard/backend/31-runtime-deployment-protocol.md +68 -0
- package/seeds/specs/hard/backend/32-release-versioning-rollback-protocol.md +68 -0
- package/seeds/specs/hard/backend/index.md +177 -0
- package/seeds/specs/hard/frontend/01-development-checklist-protocol.md +86 -0
- package/seeds/specs/hard/frontend/02-ai-generated-code-protocol.md +82 -0
- package/seeds/specs/hard/frontend/03-acceptance-gate-protocol.md +86 -0
- package/seeds/specs/hard/frontend/04-security-protocol.md +283 -0
- package/seeds/specs/hard/frontend/05-environment-configuration-protocol.md +80 -0
- package/seeds/specs/hard/frontend/06-change-governance-protocol.md +90 -0
- package/seeds/specs/hard/frontend/07-frontend-backend-communication-protocol.md +219 -0
- package/seeds/specs/hard/frontend/08-role-responsibility-protocol.md +80 -0
- package/seeds/specs/hard/frontend/09-module-boundary-protocol.md +81 -0
- package/seeds/specs/hard/frontend/10-engineering-tooling-protocol.md +89 -0
- package/seeds/specs/hard/frontend/11-dependency-package-management-protocol.md +87 -0
- package/seeds/specs/hard/frontend/12-business-rules-protocol.md +79 -0
- package/seeds/specs/hard/frontend/13-monetary-precision-protocol.md +81 -0
- package/seeds/specs/hard/frontend/14-data-model-protocol.md +85 -0
- package/seeds/specs/hard/frontend/15-request-api-protocol.md +87 -0
- package/seeds/specs/hard/frontend/16-error-handling-protocol.md +79 -0
- package/seeds/specs/hard/frontend/17-permission-protocol.md +79 -0
- package/seeds/specs/hard/frontend/18-state-management-protocol.md +88 -0
- package/seeds/specs/hard/frontend/19-cache-protocol.md +79 -0
- package/seeds/specs/hard/frontend/20-testing-protocol.md +88 -0
- package/seeds/specs/hard/frontend/21-design-system-protocol.md +79 -0
- package/seeds/specs/hard/frontend/22-theme-protocol.md +79 -0
- package/seeds/specs/hard/frontend/23-accessibility-protocol.md +189 -0
- package/seeds/specs/hard/frontend/24-component-protocol.md +80 -0
- package/seeds/specs/hard/frontend/25-page-structure-protocol.md +79 -0
- package/seeds/specs/hard/frontend/26-style-layout-protocol.md +80 -0
- package/seeds/specs/hard/frontend/27-rendering-state-protocol.md +81 -0
- package/seeds/specs/hard/frontend/28-form-protocol.md +88 -0
- package/seeds/specs/hard/frontend/29-routing-url-protocol.md +79 -0
- package/seeds/specs/hard/frontend/30-data-grid-protocol.md +83 -0
- package/seeds/specs/hard/frontend/31-performance-protocol.md +137 -0
- package/seeds/specs/hard/frontend/32-file-import-export-protocol.md +80 -0
- package/seeds/specs/hard/frontend/33-release-versioning-protocol.md +79 -0
- package/seeds/specs/hard/frontend/34-monitoring-logging-protocol.md +128 -0
- package/seeds/specs/hard/frontend/35-mock-protocol.md +97 -0
- package/seeds/specs/hard/frontend/36-feature-flag-protocol.md +79 -0
- package/seeds/specs/hard/frontend/37-browser-device-compatibility-protocol.md +83 -0
- package/seeds/specs/hard/frontend/38-internationalization-protocol.md +243 -0
- package/seeds/specs/hard/frontend/39-copywriting-protocol.md +79 -0
- package/seeds/specs/hard/frontend/40-analytics-protocol.md +98 -0
- package/seeds/specs/hard/frontend/41-design-handoff-protocol.md +80 -0
- package/seeds/specs/hard/frontend/42-browser-runtime-lifecycle-protocol.md +86 -0
- package/seeds/specs/hard/frontend/43-time-temporal-protocol.md +86 -0
- package/seeds/specs/hard/frontend/44-privacy-data-lifecycle-protocol.md +87 -0
- package/seeds/specs/hard/frontend/45-browser-storage-protocol.md +87 -0
- package/seeds/specs/hard/frontend/index.md +308 -0
- package/seeds/specs/hard/stacks/java/index.md +20 -0
- package/seeds/specs/hard/stacks/java/java-language-overlay.md +35 -0
- package/seeds/specs/hard/stacks/jpa/index.md +20 -0
- package/seeds/specs/hard/stacks/jpa/jpa-persistence-overlay.md +35 -0
- package/seeds/specs/hard/stacks/kubernetes-ingress/index.md +20 -0
- package/seeds/specs/hard/stacks/kubernetes-ingress/kubernetes-ingress-overlay.md +35 -0
- package/seeds/specs/hard/stacks/messaging/index.md +20 -0
- package/seeds/specs/hard/stacks/messaging/messaging-reliability-overlay.md +35 -0
- package/seeds/specs/hard/stacks/mybatis/index.md +20 -0
- package/seeds/specs/hard/stacks/mybatis/mybatis-persistence-overlay.md +35 -0
- package/seeds/specs/hard/stacks/mysql/index.md +20 -0
- package/seeds/specs/hard/stacks/mysql/mysql-database-overlay.md +35 -0
- package/seeds/specs/hard/stacks/nginx/index.md +20 -0
- package/seeds/specs/hard/stacks/nginx/nginx-proxy-overlay.md +35 -0
- package/seeds/specs/hard/stacks/postgresql/index.md +20 -0
- package/seeds/specs/hard/stacks/postgresql/postgresql-database-overlay.md +35 -0
- package/seeds/specs/hard/stacks/redis/index.md +20 -0
- package/seeds/specs/hard/stacks/redis/redis-cache-overlay.md +35 -0
- package/seeds/specs/hard/stacks/spring-batch/index.md +20 -0
- package/seeds/specs/hard/stacks/spring-batch/spring-batch-job-overlay.md +35 -0
- package/seeds/specs/hard/stacks/spring-boot/index.md +20 -0
- package/seeds/specs/hard/stacks/spring-boot/spring-boot-application-overlay.md +35 -0
- package/seeds/specs/hard/stacks/spring-mvc/index.md +20 -0
- package/seeds/specs/hard/stacks/spring-mvc/spring-mvc-web-overlay.md +35 -0
- package/seeds/specs/hard/stacks/spring-webflux/index.md +20 -0
- package/seeds/specs/hard/stacks/spring-webflux/spring-webflux-reactive-overlay.md +35 -0
- package/seeds/specs/hard/stacks/tomcat/index.md +20 -0
- package/seeds/specs/hard/stacks/tomcat/tomcat-runtime-overlay.md +35 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
seed_source: pomaster/components/backend-hard-spec/assets/universal/13-privacy-data-lifecycle-protocol.md
|
|
3
|
+
seed_source_sha256: df20ccb85008f8744ea16db3ea64e54bdf9fd19d7aa3098c45dc44fff94c3d8d
|
|
4
|
+
seed_version: B6C
|
|
5
|
+
lane: backend
|
|
6
|
+
status: CURRENT
|
|
7
|
+
authority_scope: mixed_required_and_advisory
|
|
8
|
+
applies_to: [backend]
|
|
9
|
+
related_evidence_specs: []
|
|
10
|
+
related_tools: []
|
|
11
|
+
legacy_id: backend:privacy-data-lifecycle-protocol
|
|
12
|
+
criticality: critical
|
|
13
|
+
injection_mode: triggered
|
|
14
|
+
stages: [prepare, implement, check, release]
|
|
15
|
+
triggers: [sensitive-data, privacy, data-export]
|
|
16
|
+
requires: []
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# 隐私与数据生命周期协议
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
规范数据最小化、分类、脱敏、保留、删除、导出、接收方与审计。
|
|
24
|
+
|
|
25
|
+
## Non-Scope
|
|
26
|
+
|
|
27
|
+
不替代一般安全控制或业务合法性确认。
|
|
28
|
+
|
|
29
|
+
## Terms
|
|
30
|
+
|
|
31
|
+
生命周期覆盖收集、传输、存储、使用、共享、导出、保留与删除。
|
|
32
|
+
|
|
33
|
+
## MUST
|
|
34
|
+
|
|
35
|
+
- 敏感数据必须有目的、来源、接收方、保留期、删除触发与访问控制。
|
|
36
|
+
|
|
37
|
+
## MUST NOT
|
|
38
|
+
|
|
39
|
+
- 不得因“以后可能有用”收集或无限期保留数据。
|
|
40
|
+
|
|
41
|
+
## SHOULD
|
|
42
|
+
|
|
43
|
+
- 应在非必要场景使用最小字段、脱敏值或不可逆标识。
|
|
44
|
+
|
|
45
|
+
## Contract
|
|
46
|
+
|
|
47
|
+
数据设计必须记录分类、处理目的、存储位置、流向、保留与删除证据。
|
|
48
|
+
|
|
49
|
+
## Checklist
|
|
50
|
+
|
|
51
|
+
- [ ] URL、日志、trace、缓存、导出和备份均已检查敏感数据。
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
- 审计记录保存必要标识与操作事实,不复制完整敏感 payload。
|
|
56
|
+
|
|
57
|
+
## Anti-patterns
|
|
58
|
+
|
|
59
|
+
- 在测试样例、日志或分析事件中使用真实敏感数据。
|
|
60
|
+
|
|
61
|
+
## Ownership
|
|
62
|
+
|
|
63
|
+
数据 Owner 决定用途与保留,Backend 实施并证明技术控制。
|
|
64
|
+
|
|
65
|
+
## Change Policy
|
|
66
|
+
|
|
67
|
+
扩大处理范围或接收方必须重新评审目的、权限与保留规则。
|
|
68
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
seed_source: pomaster/components/backend-hard-spec/assets/universal/14-business-rules-state-protocol.md
|
|
3
|
+
seed_source_sha256: fb255dd2331ac35e73a1ad222e4de4ec2f5fb3a09e675de0e1919d80022ac291
|
|
4
|
+
seed_version: B6C
|
|
5
|
+
lane: backend
|
|
6
|
+
status: CURRENT
|
|
7
|
+
authority_scope: mixed_required_and_advisory
|
|
8
|
+
applies_to: [backend]
|
|
9
|
+
related_evidence_specs: []
|
|
10
|
+
related_tools: []
|
|
11
|
+
legacy_id: backend:business-rules-state-protocol
|
|
12
|
+
criticality: critical
|
|
13
|
+
injection_mode: triggered
|
|
14
|
+
stages: [prepare, implement, check]
|
|
15
|
+
triggers: [business-rules, state-transition]
|
|
16
|
+
requires: []
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# 业务规则与状态协议
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
规范服务端权威不变量、状态机、计算、校验和失败语义。
|
|
24
|
+
|
|
25
|
+
## Non-Scope
|
|
26
|
+
|
|
27
|
+
不发明 BP 未确认的业务规则、阈值或状态。
|
|
28
|
+
|
|
29
|
+
## Terms
|
|
30
|
+
|
|
31
|
+
不变量是在任何成功事务后都必须成立的业务条件。
|
|
32
|
+
|
|
33
|
+
## MUST
|
|
34
|
+
|
|
35
|
+
- 状态转移必须定义前置条件、权限、效果、失败码和并发行为。
|
|
36
|
+
|
|
37
|
+
## MUST NOT
|
|
38
|
+
|
|
39
|
+
- 不得只依赖前端禁用按钮或流程顺序维护业务不变量。
|
|
40
|
+
|
|
41
|
+
## SHOULD
|
|
42
|
+
|
|
43
|
+
- 应集中表达同一权威规则并覆盖边界与非法转移测试。
|
|
44
|
+
|
|
45
|
+
## Contract
|
|
46
|
+
|
|
47
|
+
规则设计必须绑定 BP 来源、输入、状态、输出、失败和证据。
|
|
48
|
+
|
|
49
|
+
## Checklist
|
|
50
|
+
|
|
51
|
+
- [ ] 不变量、状态、权限、事务与并发边界已对齐。
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
- 审批操作在服务端校验当前状态与操作权限后原子更新。
|
|
56
|
+
|
|
57
|
+
## Anti-patterns
|
|
58
|
+
|
|
59
|
+
- 在多个 Controller 和 SQL 中复制略有差异的状态判断。
|
|
60
|
+
|
|
61
|
+
## Ownership
|
|
62
|
+
|
|
63
|
+
BP 拥有业务语义,Backend 拥有服务端一致实现。
|
|
64
|
+
|
|
65
|
+
## Change Policy
|
|
66
|
+
|
|
67
|
+
业务语义变化必须来自正式 delta,并同步状态迁移与兼容计划。
|
|
68
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
seed_source: pomaster/components/backend-hard-spec/assets/universal/15-data-model-protocol.md
|
|
3
|
+
seed_source_sha256: 21cdd88fac93c9dc834a51d62978b51453ca02eca68f223859aeca0ada99c3f2
|
|
4
|
+
seed_version: B6C
|
|
5
|
+
lane: backend
|
|
6
|
+
status: CURRENT
|
|
7
|
+
authority_scope: mixed_required_and_advisory
|
|
8
|
+
applies_to: [backend]
|
|
9
|
+
related_evidence_specs: []
|
|
10
|
+
related_tools: []
|
|
11
|
+
legacy_id: backend:data-model-protocol
|
|
12
|
+
criticality: standard
|
|
13
|
+
injection_mode: triggered
|
|
14
|
+
stages: [prepare, implement, check]
|
|
15
|
+
triggers: [data-model, dto, mapping]
|
|
16
|
+
requires: []
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# 数据模型协议
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
规范 Command、DTO、Domain Model、Entity 与持久化模型的边界和映射。
|
|
24
|
+
|
|
25
|
+
## Non-Scope
|
|
26
|
+
|
|
27
|
+
不定义具体项目字段、表或业务枚举。
|
|
28
|
+
|
|
29
|
+
## Terms
|
|
30
|
+
|
|
31
|
+
边界模型是在特定层或契约中表达数据的稳定结构。
|
|
32
|
+
|
|
33
|
+
## MUST
|
|
34
|
+
|
|
35
|
+
- 每次转换必须明确字段来源、空值、默认值、精度、时间和枚举语义。
|
|
36
|
+
|
|
37
|
+
## MUST NOT
|
|
38
|
+
|
|
39
|
+
- 不得让 API DTO、ORM Entity 与领域模型无条件共用同一类型。
|
|
40
|
+
|
|
41
|
+
## SHOULD
|
|
42
|
+
|
|
43
|
+
- 应只在边界转换一次,并通过契约或 round-trip 测试验证。
|
|
44
|
+
|
|
45
|
+
## Contract
|
|
46
|
+
|
|
47
|
+
映射必须声明源、目标、必填性、丢失规则和失败行为。
|
|
48
|
+
|
|
49
|
+
## Checklist
|
|
50
|
+
|
|
51
|
+
- [ ] 新增字段已追踪到所有生产、转换、存储与消费边界。
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
- API 字符串枚举在入口转换为受控领域值,未知值返回稳定错误。
|
|
56
|
+
|
|
57
|
+
## Anti-patterns
|
|
58
|
+
|
|
59
|
+
- 使用反射复制掩盖字段语义、精度或空值差异。
|
|
60
|
+
|
|
61
|
+
## Ownership
|
|
62
|
+
|
|
63
|
+
各边界 Owner 维护模型契约,映射实现者负责 round-trip 证据。
|
|
64
|
+
|
|
65
|
+
## Change Policy
|
|
66
|
+
|
|
67
|
+
模型变化必须评估 API、数据、消息和历史数据兼容性。
|
|
68
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
seed_source: pomaster/components/backend-hard-spec/assets/universal/16-error-code-protocol.md
|
|
3
|
+
seed_source_sha256: aa80ee60f7431e14859f61e563784e71b2002f35e220964170a779800fdde090
|
|
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:error-code-protocol
|
|
12
|
+
criticality: standard
|
|
13
|
+
injection_mode: triggered
|
|
14
|
+
stages: [prepare, implement, check]
|
|
15
|
+
triggers: [error-code, error-handling]
|
|
16
|
+
requires: []
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# 错误码协议
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
规范错误分类、稳定错误码、状态映射、字段错误、重试性与安全消息。
|
|
24
|
+
|
|
25
|
+
## Non-Scope
|
|
26
|
+
|
|
27
|
+
不负责日志采样、告警或业务规则本身。
|
|
28
|
+
|
|
29
|
+
## Terms
|
|
30
|
+
|
|
31
|
+
稳定错误码是调用方可依赖且不暴露内部实现的机器语义。
|
|
32
|
+
|
|
33
|
+
## MUST
|
|
34
|
+
|
|
35
|
+
- 失败必须映射到稳定 code、适当状态、可选字段错误、retryable 与 TraceId。
|
|
36
|
+
|
|
37
|
+
## MUST NOT
|
|
38
|
+
|
|
39
|
+
- 不得向调用方返回堆栈、SQL、secret 或不稳定内部异常文本。
|
|
40
|
+
|
|
41
|
+
## SHOULD
|
|
42
|
+
|
|
43
|
+
- 应区分认证、鉴权、未找到、冲突、校验、限流和服务失败。
|
|
44
|
+
|
|
45
|
+
## Contract
|
|
46
|
+
|
|
47
|
+
错误注册项必须包含语义、状态映射、消息边界、重试性和所有者。
|
|
48
|
+
|
|
49
|
+
## Checklist
|
|
50
|
+
|
|
51
|
+
- [ ] 新错误已验证客户端恢复、日志关联和兼容行为。
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
- 乐观锁冲突返回稳定冲突 code,并明确客户端是否可重试。
|
|
56
|
+
|
|
57
|
+
## Anti-patterns
|
|
58
|
+
|
|
59
|
+
- 所有异常都返回 HTTP 200 或统一未知错误。
|
|
60
|
+
|
|
61
|
+
## Ownership
|
|
62
|
+
|
|
63
|
+
Backend 维护错误注册表,API 消费方按稳定语义处理。
|
|
64
|
+
|
|
65
|
+
## Change Policy
|
|
66
|
+
|
|
67
|
+
已发布错误码不得复用;废弃必须保留兼容说明。
|
|
68
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
seed_source: pomaster/components/backend-hard-spec/assets/universal/17-permission-authorization-protocol.md
|
|
3
|
+
seed_source_sha256: d85a431b682a3a7c3dd4a6ee1f67fc375b54edb4a8e7fe98d283103b64a6b41e
|
|
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:permission-authorization-protocol
|
|
12
|
+
criticality: critical
|
|
13
|
+
injection_mode: triggered
|
|
14
|
+
stages: [prepare, implement, check]
|
|
15
|
+
triggers: [authorization, tenant, data-scope]
|
|
16
|
+
requires: []
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# 权限与鉴权协议
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
规范操作权限、数据范围、租户隔离、资源归属和字段脱敏。
|
|
24
|
+
|
|
25
|
+
## Non-Scope
|
|
26
|
+
|
|
27
|
+
不替代认证机制、业务状态规则或隐私保留决策。
|
|
28
|
+
|
|
29
|
+
## Terms
|
|
30
|
+
|
|
31
|
+
数据范围是主体在当前租户、角色与资源关系下可访问的记录集合。
|
|
32
|
+
|
|
33
|
+
## MUST
|
|
34
|
+
|
|
35
|
+
- 每个受保护操作必须在服务端验证主体、操作、租户、数据范围和资源归属。
|
|
36
|
+
|
|
37
|
+
## MUST NOT
|
|
38
|
+
|
|
39
|
+
- 不得只依赖路由隐藏、按钮状态或客户端传入的租户与 owner。
|
|
40
|
+
|
|
41
|
+
## SHOULD
|
|
42
|
+
|
|
43
|
+
- 应采用集中策略并测试越权、跨租户、批量与导出场景。
|
|
44
|
+
|
|
45
|
+
## Contract
|
|
46
|
+
|
|
47
|
+
权限契约必须定义主体、资源、动作、范围、拒绝语义和审计。
|
|
48
|
+
|
|
49
|
+
## Checklist
|
|
50
|
+
|
|
51
|
+
- [ ] 单条、列表、搜索、批量、导入与导出均执行一致范围控制。
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
- 查询在数据库条件中收紧租户与数据范围,而不是返回后再过滤。
|
|
56
|
+
|
|
57
|
+
## Anti-patterns
|
|
58
|
+
|
|
59
|
+
- 只检查角色名,不检查目标资源归属和字段敏感级别。
|
|
60
|
+
|
|
61
|
+
## Ownership
|
|
62
|
+
|
|
63
|
+
BP 定义业务权限语义,Backend 执行最终授权。
|
|
64
|
+
|
|
65
|
+
## Change Policy
|
|
66
|
+
|
|
67
|
+
扩大权限范围必须经过正式业务确认、安全评审和回归测试。
|
|
68
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
seed_source: pomaster/components/backend-hard-spec/assets/universal/18-database-schema-migration-protocol.md
|
|
3
|
+
seed_source_sha256: e7d0b660673dc1978653c39c9efcc7ad7d9b2809c4a88040a6fcf74839bc82c0
|
|
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:database-schema-migration-protocol
|
|
12
|
+
criticality: critical
|
|
13
|
+
injection_mode: triggered
|
|
14
|
+
stages: [prepare, implement, check, release]
|
|
15
|
+
triggers: [database-schema, migration, data-repair]
|
|
16
|
+
requires: []
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# 数据库 Schema 与迁移协议
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
规范 table、column、type、约束、索引、migration、回滚和数据修复。
|
|
24
|
+
|
|
25
|
+
## Non-Scope
|
|
26
|
+
|
|
27
|
+
不规定具体数据库产品的语法或项目表名。
|
|
28
|
+
|
|
29
|
+
## Terms
|
|
30
|
+
|
|
31
|
+
迁移是受版本控制、顺序稳定且可验证的数据结构或数据变更。
|
|
32
|
+
|
|
33
|
+
## MUST
|
|
34
|
+
|
|
35
|
+
- 每次 schema 变化必须有前向迁移、兼容分析、验证和回退或 roll-forward 路径。
|
|
36
|
+
|
|
37
|
+
## MUST NOT
|
|
38
|
+
|
|
39
|
+
- 不得依赖 ORM 自动改表、手工生产操作或无记录脚本作为正式迁移。
|
|
40
|
+
|
|
41
|
+
## SHOULD
|
|
42
|
+
|
|
43
|
+
- 应采用 expand/migrate/contract,避免应用与数据库无法并行部署。
|
|
44
|
+
|
|
45
|
+
## Contract
|
|
46
|
+
|
|
47
|
+
迁移记录必须包含对象、影响数据、锁风险、顺序、验证、修复和恢复。
|
|
48
|
+
|
|
49
|
+
## Checklist
|
|
50
|
+
|
|
51
|
+
- [ ] 约束、索引、默认值、历史数据、备份与发布窗口已检查。
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
- 先新增可空字段并双写,完成回填与读切换后再收紧约束。
|
|
56
|
+
|
|
57
|
+
## Anti-patterns
|
|
58
|
+
|
|
59
|
+
- 在同一步中删除旧字段并发布仍依赖它的应用版本。
|
|
60
|
+
|
|
61
|
+
## Ownership
|
|
62
|
+
|
|
63
|
+
数据 Owner 审批语义,Backend 维护 migration 与验证证据。
|
|
64
|
+
|
|
65
|
+
## Change Policy
|
|
66
|
+
|
|
67
|
+
已执行 migration 不得原地改写;修正必须追加新 migration。
|
|
68
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
seed_source: pomaster/components/backend-hard-spec/assets/universal/19-query-index-sql-protocol.md
|
|
3
|
+
seed_source_sha256: 60a660730a82a4f911bc6c18d5f6808a320f722df27d397a4e4b13835111610d
|
|
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:query-index-sql-protocol
|
|
12
|
+
criticality: standard
|
|
13
|
+
injection_mode: triggered
|
|
14
|
+
stages: [implement, check]
|
|
15
|
+
triggers: [sql, query, index, pagination]
|
|
16
|
+
requires: []
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# 查询、索引与 SQL 协议
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
规范参数化 SQL、查询形态、分页、N+1、索引和执行计划证据。
|
|
24
|
+
|
|
25
|
+
## Non-Scope
|
|
26
|
+
|
|
27
|
+
不规定具体数据库的固定索引或性能阈值。
|
|
28
|
+
|
|
29
|
+
## Terms
|
|
30
|
+
|
|
31
|
+
查询形态包括过滤、连接、排序、分页、聚合与预期数据规模。
|
|
32
|
+
|
|
33
|
+
## MUST
|
|
34
|
+
|
|
35
|
+
- SQL 必须参数化,并以真实查询形态验证结果、边界和执行计划。
|
|
36
|
+
|
|
37
|
+
## MUST NOT
|
|
38
|
+
|
|
39
|
+
- 不得用字符串拼接构造不可信 SQL 或无界读取大结果集。
|
|
40
|
+
|
|
41
|
+
## SHOULD
|
|
42
|
+
|
|
43
|
+
- 应让索引服务于已知查询,并记录写放大与存储取舍。
|
|
44
|
+
|
|
45
|
+
## Contract
|
|
46
|
+
|
|
47
|
+
关键查询必须记录输入、排序稳定性、分页语义、索引和验证数据规模。
|
|
48
|
+
|
|
49
|
+
## Checklist
|
|
50
|
+
|
|
51
|
+
- [ ] 空结果、重复排序键、深分页、N+1 与慢查询已检查。
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
- 游标分页包含稳定唯一排序键并验证并发写入下的行为。
|
|
56
|
+
|
|
57
|
+
## Anti-patterns
|
|
58
|
+
|
|
59
|
+
- 仅凭列名添加索引,不检查选择性和实际执行计划。
|
|
60
|
+
|
|
61
|
+
## Ownership
|
|
62
|
+
|
|
63
|
+
查询维护者提供计划证据,数据 Owner 评审容量与一致性影响。
|
|
64
|
+
|
|
65
|
+
## Change Policy
|
|
66
|
+
|
|
67
|
+
索引删除或查询重写必须先验证所有已知消费者和回滚路径。
|
|
68
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
seed_source: pomaster/components/backend-hard-spec/assets/universal/20-transaction-boundary-protocol.md
|
|
3
|
+
seed_source_sha256: 4c4634b71f1e07e9cae074f9790fa50b3425f0af71300ab2ac12e644b521eff4
|
|
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:transaction-boundary-protocol
|
|
12
|
+
criticality: critical
|
|
13
|
+
injection_mode: triggered
|
|
14
|
+
stages: [prepare, implement, check]
|
|
15
|
+
triggers: [transaction]
|
|
16
|
+
requires: []
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# 事务边界协议
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
规范事务所有者、边界、隔离、传播、重试、补偿与外部调用。
|
|
24
|
+
|
|
25
|
+
## Non-Scope
|
|
26
|
+
|
|
27
|
+
不替代业务不变量、锁选择或数据库产品细节。
|
|
28
|
+
|
|
29
|
+
## Terms
|
|
30
|
+
|
|
31
|
+
事务边界是需要原子提交或一致失败的一组本地持久化操作。
|
|
32
|
+
|
|
33
|
+
## MUST
|
|
34
|
+
|
|
35
|
+
- 写流程必须明确事务入口、隔离、传播、失败、重试和提交后动作。
|
|
36
|
+
|
|
37
|
+
## MUST NOT
|
|
38
|
+
|
|
39
|
+
- 不得在长事务中执行无界网络调用、用户等待或不可控批处理。
|
|
40
|
+
|
|
41
|
+
## SHOULD
|
|
42
|
+
|
|
43
|
+
- 应缩短锁持有时间,并将外部副作用设计为可重试或可补偿。
|
|
44
|
+
|
|
45
|
+
## Contract
|
|
46
|
+
|
|
47
|
+
事务设计必须列出读写集合、锁、唯一约束、外部调用和一致性证据。
|
|
48
|
+
|
|
49
|
+
## Checklist
|
|
50
|
+
|
|
51
|
+
- [ ] 异常、超时、重试、部分失败和提交后发布均已测试。
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
- 本地事务写入 outbox,提交后由可靠发布器发送外部消息。
|
|
56
|
+
|
|
57
|
+
## Anti-patterns
|
|
58
|
+
|
|
59
|
+
- 通过扩大事务范围掩盖跨系统一致性设计缺失。
|
|
60
|
+
|
|
61
|
+
## Ownership
|
|
62
|
+
|
|
63
|
+
应用服务拥有事务编排,Repository 提供明确持久化语义。
|
|
64
|
+
|
|
65
|
+
## Change Policy
|
|
66
|
+
|
|
67
|
+
边界或隔离变化必须复核并发、锁、性能和失败恢复。
|
|
68
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
seed_source: pomaster/components/backend-hard-spec/assets/universal/21-concurrency-locking-protocol.md
|
|
3
|
+
seed_source_sha256: 6141612e1135cc67ccd9d47553ea5fa7b9c00e05b6e50706f8e117c80d3b8d95
|
|
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:concurrency-locking-protocol
|
|
12
|
+
criticality: critical
|
|
13
|
+
injection_mode: triggered
|
|
14
|
+
stages: [prepare, implement, check]
|
|
15
|
+
triggers: [concurrency, locking]
|
|
16
|
+
requires: []
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# 并发与锁协议
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
规范乐观锁、悲观锁、唯一约束、分布式锁和冲突响应。
|
|
24
|
+
|
|
25
|
+
## Non-Scope
|
|
26
|
+
|
|
27
|
+
不替代事务边界或业务状态规则。
|
|
28
|
+
|
|
29
|
+
## Terms
|
|
30
|
+
|
|
31
|
+
竞争窗口是多个执行者可基于同一旧状态作出冲突决策的时间范围。
|
|
32
|
+
|
|
33
|
+
## MUST
|
|
34
|
+
|
|
35
|
+
- 并发写必须明确竞争对象、原子条件、冲突结果、重试与最终一致性。
|
|
36
|
+
|
|
37
|
+
## MUST NOT
|
|
38
|
+
|
|
39
|
+
- 不得把进程内锁用于跨实例互斥或忽略锁超时与所有权。
|
|
40
|
+
|
|
41
|
+
## SHOULD
|
|
42
|
+
|
|
43
|
+
- 应优先使用数据库约束或带版本条件的原子更新保护不变量。
|
|
44
|
+
|
|
45
|
+
## Contract
|
|
46
|
+
|
|
47
|
+
锁设计必须记录粒度、顺序、超时、续租、释放、失败和可观测性。
|
|
48
|
+
|
|
49
|
+
## Checklist
|
|
50
|
+
|
|
51
|
+
- [ ] 重复请求、乱序、死锁、超时、崩溃和多实例场景已测试。
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
- 以版本号条件更新并将零行更新映射为稳定冲突错误。
|
|
56
|
+
|
|
57
|
+
## Anti-patterns
|
|
58
|
+
|
|
59
|
+
- 先查询再无条件更新,并假设请求不会并发。
|
|
60
|
+
|
|
61
|
+
## Ownership
|
|
62
|
+
|
|
63
|
+
业务用例 Owner 定义冲突语义,持久化维护者验证原子性。
|
|
64
|
+
|
|
65
|
+
## Change Policy
|
|
66
|
+
|
|
67
|
+
锁策略变化必须重新评估事务、性能、恢复和兼容行为。
|
|
68
|
+
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
---
|
|
2
|
+
seed_source: pomaster/components/backend-hard-spec/assets/universal/22-idempotency-protocol.md
|
|
3
|
+
seed_source_sha256: c97d003622b9075f0c094ec5c5bfa950a977e18b2f4ce8ffc9bc014858e27670
|
|
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:idempotency-protocol
|
|
12
|
+
criticality: critical
|
|
13
|
+
injection_mode: triggered
|
|
14
|
+
stages: [prepare, implement, check]
|
|
15
|
+
triggers: [idempotency, callback, replay]
|
|
16
|
+
requires: []
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
# 幂等协议
|
|
20
|
+
|
|
21
|
+
## Scope
|
|
22
|
+
|
|
23
|
+
规范创建、提交、审批、导入、回调和任务重放语义。
|
|
24
|
+
|
|
25
|
+
## Non-Scope
|
|
26
|
+
|
|
27
|
+
不把所有读取或天然无副作用操作强制包装为幂等流程。
|
|
28
|
+
|
|
29
|
+
## Terms
|
|
30
|
+
|
|
31
|
+
幂等键标识同一业务意图,而不是单次网络请求。
|
|
32
|
+
|
|
33
|
+
## MUST
|
|
34
|
+
|
|
35
|
+
- 可重试写操作必须定义 key 范围、请求指纹、保留期、并发和响应重放。
|
|
36
|
+
|
|
37
|
+
## MUST NOT
|
|
38
|
+
|
|
39
|
+
- 不得仅依赖客户端防抖、按钮禁用或短时进程内缓存。
|
|
40
|
+
|
|
41
|
+
## SHOULD
|
|
42
|
+
|
|
43
|
+
- 应对相同 key 不同 payload 返回稳定冲突,而非重复执行。
|
|
44
|
+
|
|
45
|
+
## Contract
|
|
46
|
+
|
|
47
|
+
幂等记录必须包含主体、操作、key、指纹、状态、结果与过期语义。
|
|
48
|
+
|
|
49
|
+
## Checklist
|
|
50
|
+
|
|
51
|
+
- [ ] 并发首请求、失败重试、超时、重放和过期边界已测试。
|
|
52
|
+
|
|
53
|
+
## Examples
|
|
54
|
+
|
|
55
|
+
- 回调以供应方事件 ID 和租户范围去重,并原子保存处理结果。
|
|
56
|
+
|
|
57
|
+
## Anti-patterns
|
|
58
|
+
|
|
59
|
+
- 用当前时间生成幂等键,使每次重试都成为新操作。
|
|
60
|
+
|
|
61
|
+
## Ownership
|
|
62
|
+
|
|
63
|
+
API 或任务 Owner 定义业务意图,存储实现维护原子去重。
|
|
64
|
+
|
|
65
|
+
## Change Policy
|
|
66
|
+
|
|
67
|
+
key 格式或保留期变化必须处理旧记录和滚动发布兼容。
|
|
68
|
+
|