pomaster 0.3.0 → 0.5.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 +57 -22
- 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 +95 -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 +95 -0
- package/catalog/policies/policy.sec.third_party_execution_register.json +2 -1
- package/catalog/policies/policy.sec.trust_boundary_enforcement.json +96 -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 +20514 -10735
- package/package.json +2 -1
- package/seeds/aggregation-manifest.json +691 -0
- 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 +1429 -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/stacks/antdesign/antdesign-ui-overlay.md +48 -0
- package/seeds/specs/hard/stacks/antdesign/index.md +20 -0
- package/seeds/specs/hard/stacks/css/css-system-overlay.md +52 -0
- package/seeds/specs/hard/stacks/css/index.md +20 -0
- package/seeds/specs/hard/stacks/geist/geist-design-system-overlay.md +48 -0
- package/seeds/specs/hard/stacks/geist/index.md +20 -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
- package/seeds/specs/hard/stacks/vue3/index.md +20 -0
- package/seeds/specs/hard/stacks/vue3/vue3-framework-overlay.md +71 -0
- package/seeds/specs/hard/themes/ai-generated-code.md +171 -0
- package/seeds/specs/hard/themes/api-contract-and-error-semantics.md +532 -0
- package/seeds/specs/hard/themes/architecture-and-module-boundaries.md +323 -0
- package/seeds/specs/hard/themes/data-and-transactions.md +582 -0
- package/seeds/specs/hard/themes/engineering-toolchain-and-dependencies.md +333 -0
- package/seeds/specs/hard/themes/environment-and-configuration.md +196 -0
- package/seeds/specs/hard/themes/frontend-state-and-client-data.md +342 -0
- package/seeds/specs/hard/themes/index.md +374 -0
- package/seeds/specs/hard/themes/integration-and-async-runtime.md +331 -0
- package/seeds/specs/hard/themes/internationalization-and-copywriting.md +350 -0
- package/seeds/specs/hard/themes/observability-and-analytics.md +305 -0
- package/seeds/specs/hard/themes/page-composition-and-browser-environment.md +554 -0
- package/seeds/specs/hard/themes/performance-and-capacity.md +226 -0
- package/seeds/specs/hard/themes/permission-and-authorization.md +168 -0
- package/seeds/specs/hard/themes/privacy-and-data-lifecycle.md +176 -0
- package/seeds/specs/hard/themes/release-and-feature-flags.md +237 -0
- package/seeds/specs/hard/themes/security.md +372 -0
- package/seeds/specs/hard/themes/task-governance-and-acceptance.md +554 -0
- package/seeds/specs/hard/themes/testing-and-verification.md +266 -0
- package/seeds/specs/hard/themes/ui-presentation-and-design.md +670 -0
- package/seeds/specs/hard/themes/value-semantics-and-domain-data.md +339 -0
|
@@ -0,0 +1,1305 @@
|
|
|
1
|
+
# -*- coding: utf-8 -*-
|
|
2
|
+
"""B6e Evidence Spec Kit 20 文件新著工具(播种资产 + 自指指纹 pin + gates 绑定登记级注记)。
|
|
3
|
+
|
|
4
|
+
输入(只读):
|
|
5
|
+
- packages/cli/seeds/manifest.json B6b/B6c/B6d 清单(132 条原样保留并入)
|
|
6
|
+
- doc/POMaster-vNext-Project-Store-Spec-Baseline-Evidence-Tooling-Studio-PRD.md
|
|
7
|
+
§13(19 spec 清单真源,不读取——清单与十七段结构以常量表逐字承载)
|
|
8
|
+
|
|
9
|
+
输出:
|
|
10
|
+
- packages/cli/seeds/specs/evidence/index.md Kit 索引(分母 19/十七段结构/
|
|
11
|
+
四值词形/文件↔SPEC 词形映射/对象面衔接注记)
|
|
12
|
+
- packages/cli/seeds/specs/evidence/{build,typecheck-lint,unit-component-integration,
|
|
13
|
+
contract,coverage,complexity-crap,mutation,architecture,dead-code-duplicate,
|
|
14
|
+
browser-e2e,visual-regression,accessibility,performance,security,
|
|
15
|
+
dependency-supply-chain,data-migration,business-acceptance,runtime-observability,
|
|
16
|
+
release}.md 19 份证据要求面
|
|
17
|
+
- packages/cli/seeds/manifest.json 播种清单单源(132 条原样保留
|
|
18
|
+
+ B6E 20 条追加;152 条全量分母)
|
|
19
|
+
|
|
20
|
+
新著形态定案(ADR-lite,B6e;任务红线「新著内容非移植/零新治理语义」):
|
|
21
|
+
- **源在 PRD 不在旧包**:旧包无 19 件成套 evidence specs(实盘见任务 research
|
|
22
|
+
old-assets-inventory §4)——清单与十七段结构 = Project-Store PRD §13/§13.1 逐字;
|
|
23
|
+
语义祖先(旧 evidence-model 五类原始证据/20_verified 模板/quality-architecture-gate
|
|
24
|
+
references)仅作交叉参照,不作字节源;
|
|
25
|
+
- **要求面非证据面**(PRD §9.2/§2.5):Evidence Spec 持要求不持判定——判定值只在
|
|
26
|
+
Verification Result(claim 四态)/Gate Result(七态);判卷四值词形闭包
|
|
27
|
+
PASS/FAIL/UNKNOWN/NOT_RUN(§13.1),禁发明第五值/评分轴/新状态轴;每份 spec 含
|
|
28
|
+
「显式缺席诚实位」(证据不可得 = NOT_RUN,禁静默缺证当 PASS——NOT_AVAILABLE
|
|
29
|
+
语义在 NOT_RUN 位承载,不新立词形);
|
|
30
|
+
- **阈值项目化**(§13.2 逐字「阈值必须项目化」):本 Kit 不写任何通用阈值数字——
|
|
31
|
+
阈值只住 baseline/quality 登记,Spec 只要求「阈值已登记且被引用」;与 B6d baseline
|
|
32
|
+
UNKNOWN 起步分形:Spec 是规范性要求(起步纪律=要求模板,可含具体判定条款),不是
|
|
33
|
+
Owner 填写模板,如实按 §13 写要求内容;
|
|
34
|
+
- **工具词形池**(零发明):工具名只从 PRD §2.8 词形池(Vitest/JaCoCo/Stryker/PIT/
|
|
35
|
+
Playwright/axe/Lighthouse/dependency-cruiser/ArchUnit)与 §13.2/§13.3 逐字
|
|
36
|
+
(Complexity Adapter/Istanbul/V8/c8/PITest)取;其余 spec 的 Tool Bindings 写
|
|
37
|
+
「项目登记」资格要求——栈选型词(baseline 禁词表同款)照禁(vitest/playwright 因
|
|
38
|
+
§2.8 词形池豁免);
|
|
39
|
+
- **gates 绑定 = 登记级注记**(无消费者不加机制):文件↔对象绑定零新机制——对象面
|
|
40
|
+
(B2 SPEC.* 一等对象,kind=business_rule + payload.spec_kind=evidence_spec 判别,
|
|
41
|
+
21-evidence-spec kind profile)已以 requirements[].claim_refs/gate_refs 承载资格
|
|
42
|
+
判定,closeout 消费分母恒为 store 对象;最小接线 = 每份 spec 头行「对象面词形:
|
|
43
|
+
SPEC.*」+ index 映射表(登记/注记级),catalog gate recipe 零改动(gate_def_draft
|
|
44
|
+
已含 verdict_vocabulary,无 evidence spec 引用字段位);对象登记 = init 步骤 4.7
|
|
45
|
+
预植 SPEC.* store 对象(PROPOSED 起步,裁定批 D D2——init 写 store),此后对象演进
|
|
46
|
+
归项目运行时 applyTransaction;
|
|
47
|
+
- **批 G 陈旧声明清洗**(2026-09-05,D5=(a) 同类授权延伸;D2 预植落地后的内容演进):
|
|
48
|
+
头行与 index 登记通路行的旧词形「对象登记时机由项目运行时 applyTransaction 决定,
|
|
49
|
+
init 播种不写 store 对象」按 D2 预植现状改写——头行改为「对应对象由 init 步骤 4.7
|
|
50
|
+
预植 SPEC.* store 对象(PROPOSED 起步,裁定批 D D2);本文件为该对象 requirements 的
|
|
51
|
+
播种底稿,对象演进归项目运行时 applyTransaction」,index 登记通路行同步改写;
|
|
52
|
+
旧词形播种面零残留(生成器模板+重演逐字节承载,manifest 自指指纹 pin 同批重算);
|
|
53
|
+
- **播种件无 frontmatter**(authoring:new 通路复用,B6d 先例):纯正文 + 清单
|
|
54
|
+
自指指纹 pin(资产自身字节 sha256/字节数);lane 词形 = 播种分区词形 evidence;
|
|
55
|
+
- **播种面零变更**:SEEDABLE_STORE_DIRS 已含 specs/evidence(B6a),kernel/layout
|
|
56
|
+
零改动;seed-once-missing-only 语义不变。
|
|
57
|
+
|
|
58
|
+
用法:
|
|
59
|
+
python seed_b6e_evidence.py # 物化(write_if_changed 幂等)
|
|
60
|
+
python seed_b6e_evidence.py --verify # 只读重演(字节逐等比对)
|
|
61
|
+
"""
|
|
62
|
+
|
|
63
|
+
import hashlib
|
|
64
|
+
import io
|
|
65
|
+
import json
|
|
66
|
+
import os
|
|
67
|
+
import re
|
|
68
|
+
import sys
|
|
69
|
+
|
|
70
|
+
if __name__ == "__main__":
|
|
71
|
+
try:
|
|
72
|
+
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding="utf-8", errors="replace")
|
|
73
|
+
except Exception:
|
|
74
|
+
pass
|
|
75
|
+
|
|
76
|
+
HERE = os.path.dirname(os.path.abspath(__file__)) # .../POMaster_VNext/catalog/tools
|
|
77
|
+
VNEXT = os.path.dirname(os.path.dirname(HERE)) # .../POMaster_VNext
|
|
78
|
+
SEEDS_DIR = os.path.join(VNEXT, "packages", "cli", "seeds")
|
|
79
|
+
EVIDENCE_ASSET_DIR = os.path.join(SEEDS_DIR, "specs", "evidence")
|
|
80
|
+
MANIFEST_PATH = os.path.join(SEEDS_DIR, "manifest.json")
|
|
81
|
+
|
|
82
|
+
BATCH = "B6E"
|
|
83
|
+
MANIFEST_SCHEMA = "pomaster.seed-manifest/1"
|
|
84
|
+
PLANTED_TOTAL = 152
|
|
85
|
+
BATCH_SCOPE = ("B6e:Evidence Spec Kit 20 文件新著播种(index 1 + 19 份证据要求面;"
|
|
86
|
+
"PRD §13 清单+§13.1 十七段结构;要求面非证据面——持要求不持判定,"
|
|
87
|
+
"判卷四值词形闭包;gates 绑定=登记级注记;B6b/B6c/B6d 132 条在册——"
|
|
88
|
+
"清单合并承载全量分母 152)")
|
|
89
|
+
|
|
90
|
+
# 设计源锚(新著件的 source_path 词形——非 vendor 字节源,provenance 语义见头注 ADR)。
|
|
91
|
+
DESIGN_SOURCE = ("doc/POMaster-vNext-Project-Store-Spec-Baseline-Evidence-Tooling-Studio-PRD.md"
|
|
92
|
+
"#s13-evidence-spec-kit(PRD §13 清单逐字+§13.1 十七段结构;新著无 vendor "
|
|
93
|
+
"字节源——语义祖先=旧 evidence-model/20_verified 模板/quality-architecture-"
|
|
94
|
+
"gate references,仅参照)")
|
|
95
|
+
|
|
96
|
+
NEW_AUTHORING_NOTES = [
|
|
97
|
+
"B6e 新著件(非移植):旧包无 19 件成套 evidence specs——源=Project-Store PRD §13 清单"
|
|
98
|
+
"(PRD 文本非 vendor 字节);语义祖先=旧 evidence-model 五类原始证据/20_verified 模板/"
|
|
99
|
+
"quality-architecture-gate references(仅参照);内容=规范性要求新著(要求面——持要求不持"
|
|
100
|
+
"判定,判定值只在 Verification Result/Gate Result),十七段结构照 PRD §13.1,判卷四值词形"
|
|
101
|
+
"闭包(PASS/FAIL/UNKNOWN/NOT_RUN)禁发明第五值;阈值/工具具体选型项目化(baseline 面决策),"
|
|
102
|
+
"零通用阈值零新治理语义",
|
|
103
|
+
"B6e 形态注记:本件无 frontmatter(纯正文——authoring:new 通路复用);清单 pin=资产自身"
|
|
104
|
+
"字节 sha256(自指指纹,装载器按 authoring 分流校验);gates 绑定=登记级注记(对象面词形 "
|
|
105
|
+
"SPEC.* 头行+index 映射表),无第二套机器绑定机制(无消费者不加机制——对象面 21 schema "
|
|
106
|
+
"requirements 已承载资格判定)",
|
|
107
|
+
"裁定批 G 陈旧声明清洗(2026-09-05,D5=(a) 同类授权延伸——D2 预植落地后的内容演进,"
|
|
108
|
+
"最小改写只动登记面):对象面词形头行旧词形「对象登记时机由项目运行时 applyTransaction "
|
|
109
|
+
"决定,init 播种不写 store 对象」→「对应对象由 init 步骤 4.7 预植 SPEC.* store 对象"
|
|
110
|
+
"(PROPOSED 起步,裁定批 D D2);本文件为该对象 requirements 的播种底稿,对象演进归项目"
|
|
111
|
+
"运行时 applyTransaction」(index 登记通路行同步改写);生成器模板+manifest 自指指纹 pin "
|
|
112
|
+
"同批重算,旧词形播种面零残留(测试钉)",
|
|
113
|
+
]
|
|
114
|
+
|
|
115
|
+
# ======================================================================
|
|
116
|
+
# 十七段结构(PRD §13.1 逐字)与判卷四值词形闭包
|
|
117
|
+
# ======================================================================
|
|
118
|
+
# §13.1 顶层 13 段;四值词形是 Assertions 段的判定词位(§13.1 词面平列;research
|
|
119
|
+
# old-assets-inventory §4 词形 Assertions(PASS/FAIL/UNKNOWN/NOT_RUN)——落 ### 子段)。
|
|
120
|
+
SECTION_ORDER = [
|
|
121
|
+
"Purpose", "Subjects", "Claims", "Required Observations", "Allowed Producers",
|
|
122
|
+
"Tool Bindings", "Assertions", "Required Artifacts", "Retention", "Exceptions",
|
|
123
|
+
"Activation Guidance", "Ownership", "Change Policy",
|
|
124
|
+
]
|
|
125
|
+
VERDICTS = ["PASS", "FAIL", "UNKNOWN", "NOT_RUN"]
|
|
126
|
+
|
|
127
|
+
# 21-evidence-spec.schema.json definitions.governed_id 文法镜像(词形冻结面——单源禁二次
|
|
128
|
+
# 发明文法;此处只作构建期对账,运行期权威解析归 kernel parseGovernedId)。
|
|
129
|
+
GOVERNED_ID_SPEC = re.compile(
|
|
130
|
+
r"^SPEC\.[A-Z][A-Z0-9_]{0,31}(\.[A-Z][A-Z0-9_]{0,31})*(\.[0-9]+)?$")
|
|
131
|
+
|
|
132
|
+
# ======================================================================
|
|
133
|
+
# 判定词位共用帧(资格语义从 PRD §9.2/§3.1/21 schema requirements 资格词形推导——
|
|
134
|
+
# 零新治理语义:不发明第五值/评分;每份 spec 叠加自己的具体条款)
|
|
135
|
+
# ======================================================================
|
|
136
|
+
ASSERTIONS_PREAMBLE = [
|
|
137
|
+
"- 判定资格总则:四值词形闭包(PASS/FAIL/UNKNOWN/NOT_RUN——PRD §13.1;禁发明第五值);"
|
|
138
|
+
"判卷执行归 Verification Result(claim 四态)/Gate Result(七态),本文件不自填判定值。",
|
|
139
|
+
"- 资格判定:可满足本 Spec 条款的 claim/run 必须出自对象面 requirements 资格清单"
|
|
140
|
+
"(claim_refs/gate_refs 在册;资格外一律不满足,跨对象借证=资格不成立——21-evidence-spec "
|
|
141
|
+
"kind profile 词形)。",
|
|
142
|
+
]
|
|
143
|
+
PASS_FRAME = ("- 资格:全部 Required Observations 在座且出自 Allowed Producers/Tool Bindings "
|
|
144
|
+
"资格面;Required Artifacts 齐备且可取回;要求条款逐条满足。")
|
|
145
|
+
FAIL_FRAME = ("- 资格:任一必需要求不满足(观察缺席/出自资格外生产者/工件缺席或不可解析/"
|
|
146
|
+
"claim_refs·gate_refs 清单外或跨对象借证)。")
|
|
147
|
+
UNKNOWN_FRAME = ("- 证据在座但不足以判定(receipt 维度不全/工件损坏/口径未登记)——诚实位,"
|
|
148
|
+
"禁当 PASS 呈现;补证后重判。")
|
|
149
|
+
NOT_RUN_FRAME = ("- 本证据类型未被产出(工具未执行/环境缺席)或范围显式不适用且例外已登记"
|
|
150
|
+
"——显式缺席诚实位,禁把未跑写成 PASS/UNKNOWN。")
|
|
151
|
+
|
|
152
|
+
DEFAULT_CHANGE_POLICY = [
|
|
153
|
+
"- 本文件是项目可编辑要求面:条款修订走项目变更流程(CHANGE.* 登记);要求条款(必要性)"
|
|
154
|
+
"修订需 Owner 确认,措辞/呈现类修订不受限。",
|
|
155
|
+
"- 阈值联动:数值阈值只住 baseline/quality 登记(§13.2「阈值必须项目化」);本文件修订"
|
|
156
|
+
"只改要求条款,不改阈值数字。",
|
|
157
|
+
]
|
|
158
|
+
DEFAULT_OWNERSHIP = [
|
|
159
|
+
"- 要求属主:项目 Owner(条款与例外裁决)。",
|
|
160
|
+
"- 证据生产:变更执行 lane 角色(Activation Guidance 所列时点);判定:Verification/Gate "
|
|
161
|
+
"通路——角色分离,生产者不得自判 PASS。",
|
|
162
|
+
]
|
|
163
|
+
|
|
164
|
+
# ======================================================================
|
|
165
|
+
# 19 份证据要求面(文件名 = PRD §13 清单逐字;内容 = 规范性要求新著)
|
|
166
|
+
# ======================================================================
|
|
167
|
+
SPECS = [
|
|
168
|
+
{
|
|
169
|
+
"slug": "build",
|
|
170
|
+
"spec_id": "SPEC.BUILD",
|
|
171
|
+
"title": "构建成功",
|
|
172
|
+
"one_liner": "构建成功证据:登记命令在登记环境退出码 0,产物清单与交付登记一致且可取回",
|
|
173
|
+
"purpose": "本 Spec 定义「构建成功」这一证据的要求:登记的构建命令在登记环境完成,"
|
|
174
|
+
"退出码可机读,构建产物清单与 baseline/platform/delivery.md 的交付登记"
|
|
175
|
+
"一致且可取回。构建成功是其余全部证据类型的前提位。",
|
|
176
|
+
"subjects": [
|
|
177
|
+
"- 变更涉及的全部构建单元(前端/后端/包/镜像等——以 baseline/platform/delivery.md "
|
|
178
|
+
"登记的构建单元清单为准)。",
|
|
179
|
+
],
|
|
180
|
+
"claims": [
|
|
181
|
+
"- 可立 claim 语句类型:「changed code builds successfully in the registered "
|
|
182
|
+
"environment」类。",
|
|
183
|
+
],
|
|
184
|
+
"observations": [
|
|
185
|
+
"- 构建命令与参数(与登记逐字一致);退出码。",
|
|
186
|
+
"- 执行锚:execution_id/AGX 与 store seq(时间锚恒 seq,零墙钟)。",
|
|
187
|
+
"- 产物清单(名称+内容寻址引用)。",
|
|
188
|
+
],
|
|
189
|
+
"producers": [
|
|
190
|
+
"- 项目登记的构建工具链执行(本地或 CI);Agent 自述「我构建过了」不是合法生产者。",
|
|
191
|
+
],
|
|
192
|
+
"tool_bindings": [
|
|
193
|
+
"- 构建命令以 baseline/platform/delivery.md 登记为准;CI 产出的完整构建日志是合法"
|
|
194
|
+
"观察来源。",
|
|
195
|
+
],
|
|
196
|
+
"pass_specific": "- 本 Spec 具体条款:登记构建命令退出码 0;产物清单与交付登记一致"
|
|
197
|
+
"(缺产物/多产物均不满足)。",
|
|
198
|
+
"fail_specific": "- 本 Spec 具体情形:退出码非 0;产物缺席;实际命令与登记漂移。",
|
|
199
|
+
"artifacts": [
|
|
200
|
+
"- 完整构建日志;产物清单及其内容寻址引用(evidence/blobs/,优先内容寻址)。",
|
|
201
|
+
],
|
|
202
|
+
"exceptions": [
|
|
203
|
+
"- 环境不可得(如需密钥/专用机)→ NOT_RUN + 例外显式登记;禁口头豁免。",
|
|
204
|
+
],
|
|
205
|
+
"activation": [
|
|
206
|
+
"- 激活时点:变更涉及构建面;发布前;CI 门禁放行前。",
|
|
207
|
+
],
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"slug": "typecheck-lint",
|
|
211
|
+
"spec_id": "SPEC.TYPECHECK_LINT",
|
|
212
|
+
"title": "类型检查与静态检查",
|
|
213
|
+
"one_liner": "静态检查证据:类型检查与 lint 零未处置 error 级发现,规则集配置锚在座",
|
|
214
|
+
"purpose": "本 Spec 定义「静态检查通过」这一证据的要求:项目登记的类型检查器与 "
|
|
215
|
+
"linter 在变更面执行完成,零未处置的 error 级发现,规则集配置锚在座可溯。",
|
|
216
|
+
"subjects": [
|
|
217
|
+
"- 变更触碰的代码文件及其类型依赖闭包(闭包口径以项目登记的检查范围为准)。",
|
|
218
|
+
],
|
|
219
|
+
"claims": [
|
|
220
|
+
"- 可立 claim 语句类型:「changed code passes typecheck and lint with zero "
|
|
221
|
+
"unresolved error-level findings」类。",
|
|
222
|
+
],
|
|
223
|
+
"observations": [
|
|
224
|
+
"- 类型检查命令退出码与发现清单(逐条:文件/位置/规则)。",
|
|
225
|
+
"- lint 命令退出码与发现清单(同上)。",
|
|
226
|
+
"- 规则集配置锚(配置文件路径+内容寻址引用),证明发现清单出自登记规则集。",
|
|
227
|
+
],
|
|
228
|
+
"producers": [
|
|
229
|
+
"- 项目登记的类型检查器与 linter;发现清单必须出自工具原始输出,禁人工转述替代。",
|
|
230
|
+
],
|
|
231
|
+
"tool_bindings": [
|
|
232
|
+
"- 类型检查器/linter 的具体工具与规则集由项目登记(配置锚在座);未登记工具的"
|
|
233
|
+
"发现清单不具备资格。",
|
|
234
|
+
],
|
|
235
|
+
"pass_specific": "- 本 Spec 具体条款:两类命令退出码 0;发现清单为空,或每条发现都有"
|
|
236
|
+
"例外登记(Exceptions 通道)。",
|
|
237
|
+
"fail_specific": "- 本 Spec 具体情形:任一 error 级发现无例外登记;配置锚缺席"
|
|
238
|
+
"(发现不可溯源)。",
|
|
239
|
+
"artifacts": [
|
|
240
|
+
"- 工具原始输出(逐字);例外登记引用。",
|
|
241
|
+
],
|
|
242
|
+
"exceptions": [
|
|
243
|
+
"- 逐发现登记豁免(理由+批准者+复核触发);批量豁免禁用。",
|
|
244
|
+
],
|
|
245
|
+
"activation": [
|
|
246
|
+
"- 激活时点:每次代码变更提交前;CI 门禁放行前。",
|
|
247
|
+
],
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"slug": "unit-component-integration",
|
|
251
|
+
"spec_id": "SPEC.UNIT_COMPONENT_INTEGRATION",
|
|
252
|
+
"title": "单元/组件/集成测试",
|
|
253
|
+
"one_liner": "三层测试证据:unit/component/integration 全部在册命令执行,计数与失败清单可溯,范围覆盖变更面",
|
|
254
|
+
"purpose": "本 Spec 定义「测试通过且范围充分」这一证据的要求:单元/组件/集成三层"
|
|
255
|
+
"测试按登记命令执行,结果计数与失败清单可溯,执行范围覆盖变更面。",
|
|
256
|
+
"subjects": [
|
|
257
|
+
"- 变更触碰的代码及其直接协作面(范围口径以 baseline/quality 登记为准)。",
|
|
258
|
+
],
|
|
259
|
+
"claims": [
|
|
260
|
+
"- 可立 claim 语句类型:「changed code is sufficiently test protected」类"
|
|
261
|
+
"(PRD §3.2 例文同族)。",
|
|
262
|
+
],
|
|
263
|
+
"observations": [
|
|
264
|
+
"- 测试命令(与登记一致)与退出码;用例计数(total/passed/failed/skipped)。",
|
|
265
|
+
"- 失败与跳过清单(逐条:用例+理由);随机种子(如适用,保复现)。",
|
|
266
|
+
"- 执行范围声明(三层各自覆盖的变更面)。",
|
|
267
|
+
],
|
|
268
|
+
"producers": [
|
|
269
|
+
"- 项目登记的测试 runner 执行;计数必须出自 runner 原始报告,禁手写计数。",
|
|
270
|
+
],
|
|
271
|
+
"tool_bindings": [
|
|
272
|
+
"- 测试 runner 由项目登记(PRD §2.8 词形池:Vitest 等);未登记 runner 的结果"
|
|
273
|
+
"不具备资格。",
|
|
274
|
+
],
|
|
275
|
+
"pass_specific": "- 本 Spec 具体条款:全部在册命令退出码 0;failed=0;执行范围覆盖"
|
|
276
|
+
"变更面(范围缺口逐条有例外登记)。",
|
|
277
|
+
"fail_specific": "- 本 Spec 具体情形:任一命令失败;范围缺口无例外;计数与原始报告"
|
|
278
|
+
"不一致。",
|
|
279
|
+
"artifacts": [
|
|
280
|
+
"- runner 原始报告(junit/json 形态);失败用例的诊断输出。",
|
|
281
|
+
],
|
|
282
|
+
"exceptions": [
|
|
283
|
+
"- skipped/范围缺口逐条登记(理由+补测触发);禁整层静默跳过。",
|
|
284
|
+
],
|
|
285
|
+
"activation": [
|
|
286
|
+
"- 激活时点:每次代码变更提交前;CI 门禁放行前;重构前后对照。",
|
|
287
|
+
],
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
"slug": "contract",
|
|
291
|
+
"spec_id": "SPEC.CONTRACT",
|
|
292
|
+
"title": "API 契约兼容",
|
|
293
|
+
"one_liner": "契约证据:契约 diff 在座,兼容判定对照登记的版本承诺,破坏性变更零未处置",
|
|
294
|
+
"purpose": "本 Spec 定义「API 契约兼容」这一证据的要求:契约源在座,机器 diff 与"
|
|
295
|
+
"兼容性判定完成,破坏性变更对照 baseline/backend/api-contract.md 的版本"
|
|
296
|
+
"承诺逐条处置。",
|
|
297
|
+
"subjects": [
|
|
298
|
+
"- 变更触碰的 API(以 API_REQ.* governed 面与契约源登记为准)。",
|
|
299
|
+
],
|
|
300
|
+
"claims": [
|
|
301
|
+
"- 可立 claim 语句类型:「api contract diff is compatible within the registered "
|
|
302
|
+
"versioning promise」类。",
|
|
303
|
+
],
|
|
304
|
+
"observations": [
|
|
305
|
+
"- 契约源(OpenAPI 或等价)与其版本锚;diff 清单(逐条:路径/方法/变更类别)。",
|
|
306
|
+
"- 兼容性判定结果(逐条:兼容/破坏);破坏性变更的处置(版本升级/例外登记)。",
|
|
307
|
+
],
|
|
308
|
+
"producers": [
|
|
309
|
+
"- 项目登记的契约 diff 工具与属性用例生成器(vNext 既有 CONTRACT 门禁双腿语义:"
|
|
310
|
+
"oasdiff/schemathesis 词形族);判定必须出自工具输出。",
|
|
311
|
+
],
|
|
312
|
+
"tool_bindings": [
|
|
313
|
+
"- diff 工具与契约源位置由项目登记;双独立腿(diff+用例)结果都需在座,禁合并为"
|
|
314
|
+
"单一绿灯。",
|
|
315
|
+
],
|
|
316
|
+
"pass_specific": "- 本 Spec 具体条款:diff 非破坏,或破坏性变更已按登记的版本承诺"
|
|
317
|
+
"处置(版本升级/废弃流程在座)。",
|
|
318
|
+
"fail_specific": "- 本 Spec 具体情形:破坏性变更无版本处置;契约源缺席或不可解析。",
|
|
319
|
+
"artifacts": [
|
|
320
|
+
"- 契约源快照(内容寻址);diff 报告;兼容判定原始输出。",
|
|
321
|
+
],
|
|
322
|
+
"exceptions": [
|
|
323
|
+
"- 兼容承诺的例外(如内部端点)逐条登记于契约面,禁以口头约定豁免。",
|
|
324
|
+
],
|
|
325
|
+
"activation": [
|
|
326
|
+
"- 激活时点:变更触碰 API 面;契约文件修订;对外发布前。",
|
|
327
|
+
],
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"slug": "coverage",
|
|
331
|
+
"spec_id": "SPEC.COVERAGE",
|
|
332
|
+
"title": "测试覆盖率",
|
|
333
|
+
"one_liner": "覆盖率证据:分层口径(全局/关键模块/变化代码)逐层在座,对照项目登记阈值,分母不被生成物扭曲",
|
|
334
|
+
"purpose": "本 Spec 定义「测试保护充分」这一证据的要求:覆盖率按分层口径逐层在座"
|
|
335
|
+
"(全局/关键模块/变化代码——只看全局平均会掩盖关键模块缺口),逐层对照"
|
|
336
|
+
"项目登记阈值判定。",
|
|
337
|
+
"subjects": [
|
|
338
|
+
"- 变更触碰代码所在的全部分组(分组与阈值以 baseline/quality 登记为准)。",
|
|
339
|
+
],
|
|
340
|
+
"claims": [
|
|
341
|
+
"- 可立 claim 语句类型:「coverage meets the registered layered budget」类。",
|
|
342
|
+
],
|
|
343
|
+
"observations": [
|
|
344
|
+
"- 各分组×各指标(lines/statements/functions/branches)数值。",
|
|
345
|
+
"- 口径定义(Total/Executable 类执行口径)与排除项清单生效证明。",
|
|
346
|
+
"- 变化代码覆盖率(变更面单独口径)。",
|
|
347
|
+
],
|
|
348
|
+
"producers": [
|
|
349
|
+
"- 项目登记的 coverage runner;数值必须出自原始报告,禁手写。",
|
|
350
|
+
],
|
|
351
|
+
"tool_bindings": [
|
|
352
|
+
"- PRD §13.2 词形:Istanbul/V8/c8 coverage(前端)、JaCoCo(Java);由项目按技术栈"
|
|
353
|
+
"登记。",
|
|
354
|
+
],
|
|
355
|
+
"pass_specific": "- 本 Spec 具体条款:各分组指标不低于 baseline/quality 登记的项目"
|
|
356
|
+
"阈值;分母排除项与登记一致(无 generated/mock 扭曲)。",
|
|
357
|
+
"fail_specific": "- 本 Spec 具体情形:任一分组低于阈值无例外;分母被生成物/ mock "
|
|
358
|
+
"扭曲;口径与登记漂移。",
|
|
359
|
+
"artifacts": [
|
|
360
|
+
"- 原始 coverage 报告(blob,内容寻址);分组×指标明细表。",
|
|
361
|
+
],
|
|
362
|
+
"exceptions": [
|
|
363
|
+
"- 分组/文件级豁免逐条登记(理由+复核触发);禁全局豁免。",
|
|
364
|
+
],
|
|
365
|
+
"activation": [
|
|
366
|
+
"- 激活时点:代码变更提交前;CI 门禁放行前。",
|
|
367
|
+
],
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
"slug": "complexity-crap",
|
|
371
|
+
"spec_id": "SPEC.COMPLEXITY_CRAP",
|
|
372
|
+
"title": "复杂度风险(CRAP)",
|
|
373
|
+
"one_liner": "CRAP 证据:按 v1 公式逐符号计算在座,超阈值符号逐个处置;目的=高复杂度+低测试保护,阈值项目化",
|
|
374
|
+
"purpose": "本 Spec 定义「复杂度风险被度量与处置」这一证据的要求。CRAP v1:",
|
|
375
|
+
"formula_block": [
|
|
376
|
+
"CRAP = Complexity² × (1 - Coverage)³ + Complexity",
|
|
377
|
+
],
|
|
378
|
+
"purpose_tail": [
|
|
379
|
+
"其中 Coverage 使用 0~1。CRAP 目的:识别 High Complexity + Low Test Protection"
|
|
380
|
+
"(高复杂度且缺测试保护);不是评价代码优不优雅。",
|
|
381
|
+
"阈值必须项目化,不能把某个数字写成全世界永久真理(§13.2 逐字)——项目阈值只住 "
|
|
382
|
+
"baseline/quality 的 CRAP 登记,本 Spec 不设通用数字。",
|
|
383
|
+
],
|
|
384
|
+
"subjects": [
|
|
385
|
+
"- 变更触碰的符号(函数/方法级;语言以项目登记的分析器覆盖面为准)。",
|
|
386
|
+
],
|
|
387
|
+
"claims": [
|
|
388
|
+
"- 可立 claim 语句类型:「changed code complexity risk is measured and mitigated」类。",
|
|
389
|
+
],
|
|
390
|
+
"observations": [
|
|
391
|
+
"- 逐符号 Complexity 与 Coverage 及其 CRAP 值(计算原始输出)。",
|
|
392
|
+
"- 超阈值符号清单与逐个处置记录(补测试/重构/例外登记)。",
|
|
393
|
+
],
|
|
394
|
+
"producers": [
|
|
395
|
+
"- 复杂度分析与覆盖率数据的合法组合产出;数值必须出自工具输出。",
|
|
396
|
+
],
|
|
397
|
+
"tool_bindings": [
|
|
398
|
+
"- PRD §13.2 逐字词形:允许前端 Complexity Adapter + Istanbul/V8/c8 coverage;"
|
|
399
|
+
"允许 Java Complexity source + JaCoCo。",
|
|
400
|
+
],
|
|
401
|
+
"pass_specific": "- 本 Spec 具体条款:变更面逐符号 CRAP 计算在座;超阈值符号逐个有"
|
|
402
|
+
"处置(测试保护提升/重构/例外登记)。",
|
|
403
|
+
"fail_specific": "- 本 Spec 具体情形:计算缺席;超阈值符号无处置;Coverage 输入缺席"
|
|
404
|
+
"(公式不可计算)。",
|
|
405
|
+
"artifacts": [
|
|
406
|
+
"- 逐符号 CRAP 表(原始输出);处置记录。",
|
|
407
|
+
],
|
|
408
|
+
"exceptions": [
|
|
409
|
+
"- 符号级豁免逐条登记(理由+复核触发);豁免不改变计算,只改变处置要求。",
|
|
410
|
+
],
|
|
411
|
+
"activation": [
|
|
412
|
+
"- 激活时点:代码变更提交前(与 coverage 同窗);CI 门禁放行前。",
|
|
413
|
+
],
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
"slug": "mutation",
|
|
417
|
+
"spec_id": "SPEC.MUTATION",
|
|
418
|
+
"title": "变异测试",
|
|
419
|
+
"one_liner": "变异测试证据:六维在册(score/survivors/killed/timeout/not-covered/affected scope),score 对照项目阈值,survivors 逐个处置",
|
|
420
|
+
"purpose": "本 Spec 定义「测试有效性」这一证据的要求:变异测试在变更面执行,六维"
|
|
421
|
+
"证据在座,mutation score 对照项目登记阈值,survivors 逐个处置。",
|
|
422
|
+
"subjects": [
|
|
423
|
+
"- 变更触碰的执行类代码(范围=affected scope;生成物/声明类不入围)。",
|
|
424
|
+
],
|
|
425
|
+
"claims": [
|
|
426
|
+
"- 可立 claim 语句类型:「tests kill the registered share of mutants on changed "
|
|
427
|
+
"scope」类。",
|
|
428
|
+
],
|
|
429
|
+
"observations": [
|
|
430
|
+
"- PRD §13.3 六维逐字:mutation score;survivors;killed;timeout;not-covered;"
|
|
431
|
+
"affected scope。",
|
|
432
|
+
"- survivors 逐个处置记录(补断言/等价变异论证/豁免登记)。",
|
|
433
|
+
],
|
|
434
|
+
"producers": [
|
|
435
|
+
"- 项目登记的变异测试框架执行;六维必须出自原始报告。",
|
|
436
|
+
],
|
|
437
|
+
"tool_bindings": [
|
|
438
|
+
"- PRD §13.3 逐字:支持 Stryker、PIT / PITest;由项目按技术栈登记其一。",
|
|
439
|
+
],
|
|
440
|
+
"pass_specific": "- 本 Spec 具体条款:score 不低于 baseline/quality 登记的项目阈值;"
|
|
441
|
+
"survivors 逐个有处置;not-covered 面与 coverage 证据一致。",
|
|
442
|
+
"fail_specific": "- 本 Spec 具体情形:score 低于阈值无例外;survivors 未处置;"
|
|
443
|
+
"六维缺任一。",
|
|
444
|
+
"artifacts": [
|
|
445
|
+
"- 完整 mutation 报告(blob,内容寻址);survivors 明细。",
|
|
446
|
+
],
|
|
447
|
+
"exceptions": [
|
|
448
|
+
"- 等价变异/性能受限豁免逐条登记(理由+复核触发)。",
|
|
449
|
+
],
|
|
450
|
+
"activation": [
|
|
451
|
+
"- 激活时点:关键执行类变更(与 baseline/quality 登记的适用范围一致);CI 门禁"
|
|
452
|
+
"放行前。",
|
|
453
|
+
],
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
"slug": "architecture",
|
|
457
|
+
"spec_id": "SPEC.ARCHITECTURE",
|
|
458
|
+
"title": "架构核查",
|
|
459
|
+
"one_liner": "架构证据:依赖方向与分层约定的机判结果在座,违规零未处置,规则集对照 baseline 登记",
|
|
460
|
+
"purpose": "本 Spec 定义「架构约定被遵守」这一证据的要求:依赖方向与分层约定"
|
|
461
|
+
"(baseline/architecture.md 与 directory-structure.md 登记的规则集)经"
|
|
462
|
+
"机器核查,违规清单在座且逐条处置。",
|
|
463
|
+
"subjects": [
|
|
464
|
+
"- 变更触碰模块及其依赖闭包(以 baseline/backend/architecture.md 的层/模块登记"
|
|
465
|
+
"为准;前端同构对应 frontend 分区)。",
|
|
466
|
+
],
|
|
467
|
+
"claims": [
|
|
468
|
+
"- 可立 claim 语句类型:「changed code respects the registered dependency and "
|
|
469
|
+
"layering rules」类。",
|
|
470
|
+
],
|
|
471
|
+
"observations": [
|
|
472
|
+
"- 规则集锚(登记引用);违规清单(逐条:源/目标/规则)。",
|
|
473
|
+
"- 违规处置记录(修复/例外登记)。",
|
|
474
|
+
],
|
|
475
|
+
"producers": [
|
|
476
|
+
"- 项目登记的架构核查工具机判;人工评审可补充,不可替代机判。",
|
|
477
|
+
],
|
|
478
|
+
"tool_bindings": [
|
|
479
|
+
"- PRD §2.8 词形池:dependency-cruiser、ArchUnit(vNext 既有 ARCHITECTURE 门禁"
|
|
480
|
+
"腿 import-linter 同族);由项目按技术栈登记。",
|
|
481
|
+
],
|
|
482
|
+
"pass_specific": "- 本 Spec 具体条款:违规清单为空,或每条违规都有例外登记。",
|
|
483
|
+
"fail_specific": "- 本 Spec 具体情形:任一违规无处置;规则集与 baseline 登记漂移。",
|
|
484
|
+
"artifacts": [
|
|
485
|
+
"- 机判原始输出;例外登记引用。",
|
|
486
|
+
],
|
|
487
|
+
"exceptions": [
|
|
488
|
+
"- 边界例外逐条登记(理由+期限+复核触发);期限到期未复核即转 FAIL。",
|
|
489
|
+
],
|
|
490
|
+
"activation": [
|
|
491
|
+
"- 激活时点:新增模块/跨层引用变更;CI 门禁放行前。",
|
|
492
|
+
],
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"slug": "dead-code-duplicate",
|
|
496
|
+
"spec_id": "SPEC.DEAD_CODE_DUPLICATE",
|
|
497
|
+
"title": "死代码与重复代码",
|
|
498
|
+
"one_liner": "死代码/重复证据:可达性口径与重复块清单在座,新引入项零未处置",
|
|
499
|
+
"purpose": "本 Spec 定义「无新增死代码与重复」这一证据的要求:死代码(入口可达性"
|
|
500
|
+
"口径)与重复块清单在座,新引入项逐条处置。",
|
|
501
|
+
"subjects": [
|
|
502
|
+
"- 变更触碰的模块与其入口面(可达性口径以项目登记的入口清单为准)。",
|
|
503
|
+
],
|
|
504
|
+
"claims": [
|
|
505
|
+
"- 可立 claim 语句类型:「no unhandled dead or duplicated code introduced by "
|
|
506
|
+
"the change」类。",
|
|
507
|
+
],
|
|
508
|
+
"observations": [
|
|
509
|
+
"- 死代码清单(逐条:符号+不可达判定口径);重复块清单(逐条:位置+重复度)。",
|
|
510
|
+
"- 逐条处置记录(删除/保留+理由)。",
|
|
511
|
+
],
|
|
512
|
+
"producers": [
|
|
513
|
+
"- 项目登记的静态分析工具机判;人工发现可补充登记,不可替代清单机判。",
|
|
514
|
+
],
|
|
515
|
+
"tool_bindings": [
|
|
516
|
+
"- 具体工具由项目登记(静态分析类;登记配置锚在座);未登记工具的清单不具备资格。",
|
|
517
|
+
],
|
|
518
|
+
"pass_specific": "- 本 Spec 具体条款:新引入死代码/重复为零,或逐条有处置记录。",
|
|
519
|
+
"fail_specific": "- 本 Spec 具体情形:新引入项无处置;清单与登记口径漂移。",
|
|
520
|
+
"artifacts": [
|
|
521
|
+
"- 分析原始输出;处置记录。",
|
|
522
|
+
],
|
|
523
|
+
"exceptions": [
|
|
524
|
+
"- 保留类豁免(如对外契约要求的导出)逐条登记(理由+复核触发)。",
|
|
525
|
+
],
|
|
526
|
+
"activation": [
|
|
527
|
+
"- 激活时点:代码变更提交前;重构收口前。",
|
|
528
|
+
],
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"slug": "browser-e2e",
|
|
532
|
+
"spec_id": "SPEC.BROWSER_E2E",
|
|
533
|
+
"title": "浏览器端到端",
|
|
534
|
+
"one_liner": "E2E 证据:在册 journey 在真实浏览器逐项通过,evidence 必含 console error/network 维度,trace 在座",
|
|
535
|
+
"purpose": "本 Spec 定义「关键用户路径可用」这一证据的要求:在册 journey 清单在"
|
|
536
|
+
"真实浏览器执行,逐步结果可溯,证据必含 console error 与 network 维度"
|
|
537
|
+
"(vNext BROWSER 门禁确定性腿既有语义)。",
|
|
538
|
+
"subjects": [
|
|
539
|
+
"- 变更触碰页面(PAGE.* 面)上的关键 journey;journey 清单由项目登记。",
|
|
540
|
+
],
|
|
541
|
+
"claims": [
|
|
542
|
+
"- 可立 claim 语句类型:「registered journeys pass in a real browser with zero "
|
|
543
|
+
"unhandled console errors」类。",
|
|
544
|
+
],
|
|
545
|
+
"observations": [
|
|
546
|
+
"- journey 逐步执行结果(逐条:步骤/期望/实测)。",
|
|
547
|
+
"- console error 清单(逐条未处置项);network 维度(失败请求/异常时延)。",
|
|
548
|
+
"- 执行环境锚(浏览器与视口;base_url 与环境登记一致)。",
|
|
549
|
+
],
|
|
550
|
+
"producers": [
|
|
551
|
+
"- 浏览器自动化执行(确定性腿);交互腿 MCP 通道(chrome-devtools/playwright MCP"
|
|
552
|
+
"——既有 Browser Eyes 双通道语义)按各自动作资格补位,通道名随 receipt 登记。",
|
|
553
|
+
],
|
|
554
|
+
"tool_bindings": [
|
|
555
|
+
"- PRD §2.8 词形池:Playwright(确定性腿);MCP 交互腿通道登记于项目 .mcp.json。",
|
|
556
|
+
],
|
|
557
|
+
"pass_specific": "- 本 Spec 具体条款:在册 journey 全通过;console error 零未处置;"
|
|
558
|
+
"network 维度零未解释失败。",
|
|
559
|
+
"fail_specific": "- 本 Spec 具体情形:journey 失败;未处置 console error;环境与"
|
|
560
|
+
"登记漂移。",
|
|
561
|
+
"artifacts": [
|
|
562
|
+
"- 执行 trace 与截图(blob,内容寻址);console/network 明细。",
|
|
563
|
+
],
|
|
564
|
+
"exceptions": [
|
|
565
|
+
"- journey 级豁免(功能暂缓)逐条登记(理由+复归触发)。",
|
|
566
|
+
],
|
|
567
|
+
"activation": [
|
|
568
|
+
"- 激活时点:页面/交互面变更;发布前冒烟。",
|
|
569
|
+
],
|
|
570
|
+
},
|
|
571
|
+
{
|
|
572
|
+
"slug": "visual-regression",
|
|
573
|
+
"spec_id": "SPEC.VISUAL_REGRESSION",
|
|
574
|
+
"title": "视觉回归",
|
|
575
|
+
"one_liner": "视觉回归证据:渲染快照与基准逐 viewport 对比,diff 全部属已登记的有意变更或零漂移",
|
|
576
|
+
"purpose": "本 Spec 定义「视觉呈现未发生意外漂移」这一证据的要求:渲染快照与基准"
|
|
577
|
+
"逐 viewport 对比,diff 清单逐条判定(有意变更登记/意外漂移)。",
|
|
578
|
+
"subjects": [
|
|
579
|
+
"- 变更触碰页面与其关键状态(状态集合由项目登记)。",
|
|
580
|
+
],
|
|
581
|
+
"claims": [
|
|
582
|
+
"- 可立 claim 语句类型:「visual diffs are limited to the registered intended "
|
|
583
|
+
"changes」类。",
|
|
584
|
+
],
|
|
585
|
+
"observations": [
|
|
586
|
+
"- 快照集(逐 viewport)与基准版本锚;diff 清单(逐条:页面/状态/viewport/差异度)。",
|
|
587
|
+
"- diff 判定(有意变更登记引用/意外漂移)。",
|
|
588
|
+
],
|
|
589
|
+
"producers": [
|
|
590
|
+
"- 项目登记的快照对比执行;基准更新必须走登记通路,禁就地改基准消 diff。",
|
|
591
|
+
],
|
|
592
|
+
"tool_bindings": [
|
|
593
|
+
"- 快照/对比工具由项目登记(可与 SPEC.BROWSER_E2E 同链路);基准存储位置与版本"
|
|
594
|
+
"锚登记在座。",
|
|
595
|
+
],
|
|
596
|
+
"pass_specific": "- 本 Spec 具体条款:diff 全部属于已登记的有意变更,或 diff 为零。",
|
|
597
|
+
"fail_specific": "- 本 Spec 具体情形:意外漂移未处置;基准版本锚缺席。",
|
|
598
|
+
"artifacts": [
|
|
599
|
+
"- 前后快照与 diff 图(blob,内容寻址);有意变更登记引用。",
|
|
600
|
+
],
|
|
601
|
+
"exceptions": [
|
|
602
|
+
"- 动态区域掩码逐条登记(理由+范围);禁全页掩码。",
|
|
603
|
+
],
|
|
604
|
+
"activation": [
|
|
605
|
+
"- 激活时点:样式/布局/组件视觉面变更;发布前。",
|
|
606
|
+
],
|
|
607
|
+
},
|
|
608
|
+
{
|
|
609
|
+
"slug": "accessibility",
|
|
610
|
+
"spec_id": "SPEC.ACCESSIBILITY",
|
|
611
|
+
"title": "可访问性",
|
|
612
|
+
"one_liner": "可访问性证据:自动核查发现清单在座,对标标准登记于 baseline,严重级发现零未处置",
|
|
613
|
+
"purpose": "本 Spec 定义「可访问性基线被核查」这一证据的要求:自动核查发现在座,"
|
|
614
|
+
"对标标准与其版本登记于 baseline/quality 的 a11y 面,严重级发现零未处置。",
|
|
615
|
+
"subjects": [
|
|
616
|
+
"- 变更触碰页面与其交互组件(键盘可达/焦点/对比度/语义标注面)。",
|
|
617
|
+
],
|
|
618
|
+
"claims": [
|
|
619
|
+
"- 可立 claim 语句类型:「zero unhandled serious accessibility findings against "
|
|
620
|
+
"the registered a11y baseline」类。",
|
|
621
|
+
],
|
|
622
|
+
"observations": [
|
|
623
|
+
"- 自动核查发现清单(逐条:规则/严重度/命中元素)。",
|
|
624
|
+
"- 对标标准与其版本(baseline/quality a11y 登记引用);人工核查记录(如适用)。",
|
|
625
|
+
],
|
|
626
|
+
"producers": [
|
|
627
|
+
"- 项目登记的自动核查工具执行;人工核查可补充,不可替代自动清单。",
|
|
628
|
+
],
|
|
629
|
+
"tool_bindings": [
|
|
630
|
+
"- PRD §2.8 词形池:axe;由项目登记规则集与扫描范围。",
|
|
631
|
+
],
|
|
632
|
+
"pass_specific": "- 本 Spec 具体条款:零未处置的严重级发现;对标标准登记在座且与"
|
|
633
|
+
"核查规则集一致。",
|
|
634
|
+
"fail_specific": "- 本 Spec 具体情形:严重级发现未处置;核查范围未覆盖变更面。",
|
|
635
|
+
"artifacts": [
|
|
636
|
+
"- 核查原始报告;发现明细与处置记录。",
|
|
637
|
+
],
|
|
638
|
+
"exceptions": [
|
|
639
|
+
"- 逐发现豁免(理由+整改期限+复核触发);期限到期未整改即转 FAIL。",
|
|
640
|
+
],
|
|
641
|
+
"activation": [
|
|
642
|
+
"- 激活时点:页面/组件交互面变更;发布前。",
|
|
643
|
+
],
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
"slug": "performance",
|
|
647
|
+
"spec_id": "SPEC.PERFORMANCE",
|
|
648
|
+
"title": "性能",
|
|
649
|
+
"one_liner": "性能证据:预算字段对照 baseline,实验室判卷面与字段判卷面双 observation 独立在座不聚合",
|
|
650
|
+
"purpose": "本 Spec 定义「性能预算被满足」这一证据的要求:实验室判卷面与字段判卷"
|
|
651
|
+
"面两类 observation 独立在座(vNext 既有 PERFORMANCE 双 runner 语义:"
|
|
652
|
+
"lighthouse=实验室判卷/web vitals=字段判卷——禁聚合为单一绿灯),逐项"
|
|
653
|
+
"对照性能预算字段判定。",
|
|
654
|
+
"subjects": [
|
|
655
|
+
"- 变更触碰页面(预算字段以项目登记的 §29 性能预算面为准)。",
|
|
656
|
+
],
|
|
657
|
+
"claims": [
|
|
658
|
+
"- 可立 claim 语句类型:「pages meet the registered performance budget」类。",
|
|
659
|
+
],
|
|
660
|
+
"observations": [
|
|
661
|
+
"- 预算字段(逐项:指标/预算/实测/口径)。",
|
|
662
|
+
"- 实验室判卷报告;字段判卷数据(样本量与采集口径在座)。",
|
|
663
|
+
],
|
|
664
|
+
"producers": [
|
|
665
|
+
"- 双 runner 各自独立执行;两类报告各自在座,禁以一类替代另一类。",
|
|
666
|
+
],
|
|
667
|
+
"tool_bindings": [
|
|
668
|
+
"- PRD §2.8 词形池:Lighthouse(实验室面);字段面按项目登记的采集通道。",
|
|
669
|
+
],
|
|
670
|
+
"pass_specific": "- 本 Spec 具体条款:预算字段逐项实测不劣于 baseline 登记(超限"
|
|
671
|
+
"逐项有例外——预算方向随指标语义:延迟类上限/吞吐类下限);双面"
|
|
672
|
+
" observation 都在座。",
|
|
673
|
+
"fail_specific": "- 本 Spec 具体情形:任一预算项超限无例外;单面缺席;样本口径"
|
|
674
|
+
"不可溯。",
|
|
675
|
+
"artifacts": [
|
|
676
|
+
"- 双 runner 原始报告(blob);预算对照表。",
|
|
677
|
+
],
|
|
678
|
+
"exceptions": [
|
|
679
|
+
"- 预算项豁免逐条登记(理由+整改计划+复核触发)。",
|
|
680
|
+
],
|
|
681
|
+
"activation": [
|
|
682
|
+
"- 激活时点:页面性能敏感面变更;发布前。",
|
|
683
|
+
],
|
|
684
|
+
},
|
|
685
|
+
{
|
|
686
|
+
"slug": "security",
|
|
687
|
+
"spec_id": "SPEC.SECURITY",
|
|
688
|
+
"title": "安全核查",
|
|
689
|
+
"one_liner": "安全证据:三独立腿(secret 泄露/依赖漏洞/静态分析)各自在座各自判定,禁合并为单一绿灯",
|
|
690
|
+
"purpose": "本 Spec 定义「安全核查通过」这一证据的要求:三条独立腿(secret 泄露"
|
|
691
|
+
"扫描/依赖漏洞审计/静态分析)各自产出发现清单并各自判定(vNext 既有 "
|
|
692
|
+
"SECURITY 门禁三腿语义:三个独立 adapter,禁止合并为单一 security ok "
|
|
693
|
+
"绿灯),未处置发现逐腿呈现。",
|
|
694
|
+
"subjects": [
|
|
695
|
+
"- 变更触碰代码与仓库面(密钥/凭据/依赖声明)。",
|
|
696
|
+
],
|
|
697
|
+
"claims": [
|
|
698
|
+
"- 可立 claim 语句类型:「three security legs each pass with zero unhandled "
|
|
699
|
+
"findings」类。",
|
|
700
|
+
],
|
|
701
|
+
"observations": [
|
|
702
|
+
"- 三腿各自:工具/范围/发现清单(逐条:类别/严重度/位置)/误报与豁免登记。",
|
|
703
|
+
"- 未处置发现汇总(逐腿)。",
|
|
704
|
+
],
|
|
705
|
+
"producers": [
|
|
706
|
+
"- 三腿各自独立工具执行(vNext 既有词形族:gitleaks/pip_audit/semgrep 类);"
|
|
707
|
+
"任一腿缺席=本证据 NOT_RUN,禁以其余腿补位。",
|
|
708
|
+
],
|
|
709
|
+
"tool_bindings": [
|
|
710
|
+
"- 三腿工具由项目登记(登记配置锚在座);腿间禁合并判定(聚合绿灯=资格不成立)。",
|
|
711
|
+
],
|
|
712
|
+
"pass_specific": "- 本 Spec 具体条款:三腿各自零未处置发现(发现=已处置或已登记"
|
|
713
|
+
"豁免)。",
|
|
714
|
+
"fail_specific": "- 本 Spec 具体情形:任一腿存在未处置发现;腿缺席冒充通过。",
|
|
715
|
+
"artifacts": [
|
|
716
|
+
"- 三腿各自原始输出;豁免登记引用。",
|
|
717
|
+
],
|
|
718
|
+
"exceptions": [
|
|
719
|
+
"- 逐发现豁免(理由+期限+复核触发),按腿登记;期限到期未复核即转 FAIL。",
|
|
720
|
+
],
|
|
721
|
+
"activation": [
|
|
722
|
+
"- 激活时点:代码/依赖变更提交前;CI 门禁放行前;发布前。",
|
|
723
|
+
],
|
|
724
|
+
},
|
|
725
|
+
{
|
|
726
|
+
"slug": "dependency-supply-chain",
|
|
727
|
+
"spec_id": "SPEC.DEPENDENCY_SUPPLY_CHAIN",
|
|
728
|
+
"title": "依赖与供应链",
|
|
729
|
+
"one_liner": "供应链证据:锁文件与声明一致,新依赖有登记审批,已知漏洞与来源可信逐项在座",
|
|
730
|
+
"purpose": "本 Spec 定义「依赖面可控」这一证据的要求:锁文件与声明一致,新增依赖"
|
|
731
|
+
"有登记与审批,已知漏洞扫描结果与来源可信面逐项在座。",
|
|
732
|
+
"subjects": [
|
|
733
|
+
"- 变更涉及的依赖闭包(新增/升级/移除的包与其传递面)。",
|
|
734
|
+
],
|
|
735
|
+
"claims": [
|
|
736
|
+
"- 可立 claim 语句类型:「dependency changes are registered, audited and "
|
|
737
|
+
"vulnerability-screened」类。",
|
|
738
|
+
],
|
|
739
|
+
"observations": [
|
|
740
|
+
"- 锁文件 diff 与依赖树变更清单(逐包:版本/来源/许可证)。",
|
|
741
|
+
"- 已知漏洞扫描结果(逐条:包/严重度/修复建议);新依赖审批记录。",
|
|
742
|
+
],
|
|
743
|
+
"producers": [
|
|
744
|
+
"- 锁文件工具与漏洞扫描工具执行;审批记录来自项目登记面(许可/例外台账)。",
|
|
745
|
+
],
|
|
746
|
+
"tool_bindings": [
|
|
747
|
+
"- 锁文件与扫描工具由项目登记(与 SPEC.SECURITY 依赖审计腿衔接——本 Spec 管"
|
|
748
|
+
"登记与溯源面,该腿管门禁判定面);来源可信口径以 baseline 登记为准。",
|
|
749
|
+
],
|
|
750
|
+
"pass_specific": "- 本 Spec 具体条款:锁文件与声明一致;新增依赖逐包有登记与审批;"
|
|
751
|
+
"已知漏洞零未处置高危。",
|
|
752
|
+
"fail_specific": "- 本 Spec 具体情形:锁漂移;未审批新增依赖;高危漏洞未处置。",
|
|
753
|
+
"artifacts": [
|
|
754
|
+
"- 锁文件 diff;依赖树快照;扫描原始输出。",
|
|
755
|
+
],
|
|
756
|
+
"exceptions": [
|
|
757
|
+
"- 逐包豁免(理由+期限+复核触发);升级受阻等运营性例外登记处置计划。",
|
|
758
|
+
],
|
|
759
|
+
"activation": [
|
|
760
|
+
"- 激活时点:依赖变更;lockfile 修订;发布前。",
|
|
761
|
+
],
|
|
762
|
+
},
|
|
763
|
+
{
|
|
764
|
+
"slug": "data-migration",
|
|
765
|
+
"spec_id": "SPEC.DATA_MIGRATION",
|
|
766
|
+
"title": "数据迁移",
|
|
767
|
+
"one_liner": "迁移证据:expand/migrate/contract 各阶段执行记录与前后 schema 快照在座,校验通过,回滚面可执行",
|
|
768
|
+
"purpose": "本 Spec 定义「数据迁移安全」这一证据的要求:迁移按登记策略(baseline/"
|
|
769
|
+
"data/migration.md 的 expand/migrate/contract/rollback)逐阶段执行,"
|
|
770
|
+
"前后 schema 快照与数据校验在座,回滚面可执行。",
|
|
771
|
+
"subjects": [
|
|
772
|
+
"- 变更触碰的 schema 对象与数据面(与 baseline/data/model.md 登记对账)。",
|
|
773
|
+
],
|
|
774
|
+
"claims": [
|
|
775
|
+
"- 可立 claim 语句类型:「migration executed per plan with verifiable rollback」类。",
|
|
776
|
+
],
|
|
777
|
+
"observations": [
|
|
778
|
+
"- 迁移脚本与其版本锚;逐阶段执行记录(阶段/范围/影响行数口径)。",
|
|
779
|
+
"- 前后 schema 快照(内容寻址);数据校验结果(校验和/抽样对账口径)。",
|
|
780
|
+
"- 回滚面:方案在座且经演练或论证(演练记录/不可演练的理由论证)。",
|
|
781
|
+
],
|
|
782
|
+
"producers": [
|
|
783
|
+
"- 迁移执行通路与校验工具;schema 快照出自数据库实际内省,禁以迁移脚本自述替代。",
|
|
784
|
+
],
|
|
785
|
+
"tool_bindings": [
|
|
786
|
+
"- 迁移工具与快照/校验手段由项目登记(baseline/data/migration.md 登记引用);"
|
|
787
|
+
"evidence-model 五类中 migration-schema 证据类的落位。",
|
|
788
|
+
],
|
|
789
|
+
"pass_specific": "- 本 Spec 具体条款:执行记录与登记策略一致;校验通过;回滚面在座"
|
|
790
|
+
"(可执行)。",
|
|
791
|
+
"fail_specific": "- 本 Spec 具体情形:阶段执行与策略漂移;校验失败;回滚面缺席。",
|
|
792
|
+
"artifacts": [
|
|
793
|
+
"- 执行记录;前后 schema 快照;校验报告;回滚演练/论证材料。",
|
|
794
|
+
],
|
|
795
|
+
"exceptions": [
|
|
796
|
+
"- 不可回滚阶段必须事前登记(理由+补偿方案);禁事后补登。",
|
|
797
|
+
],
|
|
798
|
+
"activation": [
|
|
799
|
+
"- 激活时点:schema 变更;数据订正;发布含迁移时。",
|
|
800
|
+
],
|
|
801
|
+
},
|
|
802
|
+
{
|
|
803
|
+
"slug": "business-acceptance",
|
|
804
|
+
"spec_id": "SPEC.BUSINESS_ACCEPTANCE",
|
|
805
|
+
"title": "业务验收",
|
|
806
|
+
"one_liner": "验收证据:acceptance spec 的 Expected State 逐场景被证据覆盖,业务侧确认记录在座",
|
|
807
|
+
"purpose": "本 Spec 定义「业务期望被证实」这一证据的要求:specs/acceptance/ 登记"
|
|
808
|
+
"的验收场景逐条有 Observable Expected State 的证据与业务侧确认记录。",
|
|
809
|
+
"subjects": [
|
|
810
|
+
"- 变更对应的验收场景(以 specs/acceptance/ 的 Acceptance Spec 登记为准)。",
|
|
811
|
+
],
|
|
812
|
+
"claims": [
|
|
813
|
+
"- 可立 claim 语句类型:「acceptance scenario expected state is evidenced and "
|
|
814
|
+
"confirmed」类。",
|
|
815
|
+
],
|
|
816
|
+
"observations": [
|
|
817
|
+
"- 场景执行记录(逐条:场景引用/前置/实测状态)。",
|
|
818
|
+
"- 业务侧确认记录(确认人角色/确认结论/范围);与场景 Evidence Spec References "
|
|
819
|
+
"的对账(每场景引用的本 Kit spec 已各自满足)。",
|
|
820
|
+
],
|
|
821
|
+
"producers": [
|
|
822
|
+
"- 场景执行证据出自本 Kit 其余 spec 的合格产出;业务确认记录来自 Owner/Actor "
|
|
823
|
+
"登记面(具名,禁匿名汇总)。",
|
|
824
|
+
],
|
|
825
|
+
"tool_bindings": [
|
|
826
|
+
"- 无专用工具:本 Spec 的资格锚是 acceptance spec 登记与其引用的证据 spec "
|
|
827
|
+
"判定结果;确认记录形态由项目登记。",
|
|
828
|
+
],
|
|
829
|
+
"pass_specific": "- 本 Spec 具体条款:验收场景逐条有确认记录;场景引用的证据 spec "
|
|
830
|
+
"各自判定非 FAIL/UNKNOWN/NOT_RUN(四值闭包逐项核——显式缺席"
|
|
831
|
+
"不构成验收通过)。",
|
|
832
|
+
"fail_specific": "- 本 Spec 具体情形:场景缺确认;引用证据与场景期望不一致;匿名/"
|
|
833
|
+
"转述类确认(不具名)。",
|
|
834
|
+
"artifacts": [
|
|
835
|
+
"- 确认记录;场景执行证据引用(指向本 Kit 其余 spec 的 artifact)。",
|
|
836
|
+
],
|
|
837
|
+
"exceptions": [
|
|
838
|
+
"- 场景暂缓验收逐条登记(理由+复归条件);禁整体免验。",
|
|
839
|
+
],
|
|
840
|
+
"activation": [
|
|
841
|
+
"- 激活时点:业务功能交付;发布放行;验收周期收口。",
|
|
842
|
+
],
|
|
843
|
+
},
|
|
844
|
+
{
|
|
845
|
+
"slug": "runtime-observability",
|
|
846
|
+
"spec_id": "SPEC.RUNTIME_OBSERVABILITY",
|
|
847
|
+
"title": "运行时可观测",
|
|
848
|
+
"one_liner": "运行时证据:部署锚+log/metric/trace 登记面在目标环境可取回,关联 ID 贯通",
|
|
849
|
+
"purpose": "本 Spec 定义「运行时行为可观测」这一证据的要求:部署锚与 log/metric/"
|
|
850
|
+
"trace 登记面(baseline/platform/observability.md 口径)在目标环境可取回,"
|
|
851
|
+
"关联 ID 贯通请求链路。",
|
|
852
|
+
"subjects": [
|
|
853
|
+
"- 变更部署到的运行环境与环境登记(ENV.* 面;环境差异以 baseline/platform/"
|
|
854
|
+
"environment.md 登记为准)。",
|
|
855
|
+
],
|
|
856
|
+
"claims": [
|
|
857
|
+
"- 可立 claim 语句类型:「registered observability surfaces are retrievable in "
|
|
858
|
+
"the target environment」类。",
|
|
859
|
+
],
|
|
860
|
+
"observations": [
|
|
861
|
+
"- 部署锚(部署清单/版本/实例)与目标环境登记一致。",
|
|
862
|
+
"- log/metric/trace 各面取样(按 baseline 登记口径);关联 ID 贯通证明(同一请求"
|
|
863
|
+
"跨面可串联)。",
|
|
864
|
+
"- audit 面(登记的审计事件可取回,如适用)。",
|
|
865
|
+
],
|
|
866
|
+
"producers": [
|
|
867
|
+
"- 目标环境的观测通道取样(读侧);取样必须带环境锚,禁跨环境混样。",
|
|
868
|
+
],
|
|
869
|
+
"tool_bindings": [
|
|
870
|
+
"- 观测通道由项目登记(baseline/platform/observability.md 引用);证据形态对应 "
|
|
871
|
+
"evidence-model 五类中 runtime-deployment 类。",
|
|
872
|
+
],
|
|
873
|
+
"pass_specific": "- 本 Spec 具体条款:登记 observation 面逐项可取回;关联 ID 贯通;"
|
|
874
|
+
"部署锚与环境登记一致。",
|
|
875
|
+
"fail_specific": "- 本 Spec 具体情形:登记面在目标环境不可取回;关联 ID 断链;环境"
|
|
876
|
+
"漂移未登记。",
|
|
877
|
+
"artifacts": [
|
|
878
|
+
"- 取样原始数据(blob);部署锚快照。",
|
|
879
|
+
],
|
|
880
|
+
"exceptions": [
|
|
881
|
+
"- 环境级豁免(如本地环境无 trace 后端)逐环境登记(理由+目标环境复归条件)。",
|
|
882
|
+
],
|
|
883
|
+
"activation": [
|
|
884
|
+
"- 激活时点:部署后验证;运行时缺陷排查收口;发布前演练。",
|
|
885
|
+
],
|
|
886
|
+
},
|
|
887
|
+
{
|
|
888
|
+
"slug": "release",
|
|
889
|
+
"spec_id": "SPEC.RELEASE",
|
|
890
|
+
"title": "发布",
|
|
891
|
+
"one_liner": "发布证据:制品 hash 可追溯,审批链完整,版本与回滚面对照交付登记",
|
|
892
|
+
"purpose": "本 Spec 定义「发布可信」这一证据的要求:发布制品 hash 可追溯,审批链"
|
|
893
|
+
"完整,版本词形与回滚面对照 baseline/platform/delivery.md 登记逐项在座。",
|
|
894
|
+
"subjects": [
|
|
895
|
+
"- 发布单元(以 baseline/platform/delivery.md 登记的发布单元为准)。",
|
|
896
|
+
],
|
|
897
|
+
"claims": [
|
|
898
|
+
"- 可立 claim 语句类型:「release artifact is traceable, approved and "
|
|
899
|
+
"rollback-capable」类。",
|
|
900
|
+
],
|
|
901
|
+
"observations": [
|
|
902
|
+
"- 制品清单及内容寻址 hash(与构建产物对账——SPEC.BUILD 产物引用)。",
|
|
903
|
+
"- 版本词形与来源(登记引用);审批链记录(逐节点:角色/结论)。",
|
|
904
|
+
"- 回滚面:方案在座且具备可执行性(演练记录或论证)。",
|
|
905
|
+
],
|
|
906
|
+
"producers": [
|
|
907
|
+
"- 构建通路(制品 hash);审批登记面(审批链);禁以聊天记录替代登记审批。",
|
|
908
|
+
],
|
|
909
|
+
"tool_bindings": [
|
|
910
|
+
"- 制品库与审批登记面由项目登记(baseline/platform/delivery.md 引用);hash 词形"
|
|
911
|
+
"内容寻址(PRD §3.4 同源纪律)。",
|
|
912
|
+
],
|
|
913
|
+
"pass_specific": "- 本 Spec 具体条款:制品 hash 与构建产物一致;审批链完整;版本与"
|
|
914
|
+
"回滚面登记在座。",
|
|
915
|
+
"fail_specific": "- 本 Spec 具体情形:hash 对不上;审批缺节点;回滚面缺席。",
|
|
916
|
+
"artifacts": [
|
|
917
|
+
"- 制品(内容寻址引用);审批记录;回滚演练/论证材料。",
|
|
918
|
+
],
|
|
919
|
+
"exceptions": [
|
|
920
|
+
"- 紧急发布快速通道逐次登记(理由+事后补审时限);补审逾期即登记违规。",
|
|
921
|
+
],
|
|
922
|
+
"activation": [
|
|
923
|
+
"- 激活时点:每次发布;回滚后重新发布。",
|
|
924
|
+
],
|
|
925
|
+
},
|
|
926
|
+
]
|
|
927
|
+
|
|
928
|
+
assert len(SPECS) == 19, f"evidence spec 分母漂移: {len(SPECS)}"
|
|
929
|
+
assert len({s["spec_id"] for s in SPECS}) == 19, "SPEC id 重复"
|
|
930
|
+
assert len({s["slug"] for s in SPECS}) == 19, "slug 重复"
|
|
931
|
+
|
|
932
|
+
INDEX_FILES = [f"{s['slug']}.md" for s in SPECS]
|
|
933
|
+
|
|
934
|
+
# ======================================================================
|
|
935
|
+
# 词形纪律自校验(禁词/占位词形/阈值数字/零墙钟/A1 档位词形/marker)
|
|
936
|
+
# ======================================================================
|
|
937
|
+
# 禁词表 = B6d baseline 禁词表同款(栈选型词)——vitest/playwright 豁免(PRD §2.8 词形池
|
|
938
|
+
# 逐字授权),java 豁免(PRD §13.2 逐字「允许 Java:Complexity source + JaCoCo」——语言
|
|
939
|
+
# 语境词形,非选型默认),其余工具词不在表中(jest/mocha/cypress 等非 §2.8 池词保持禁用)。
|
|
940
|
+
FORBIDDEN_TECH_PATTERN = re.compile(
|
|
941
|
+
r"\b(vue|react|angular|svelte|emberjs|nuxt|pinia|redux|mobx|rxjs"
|
|
942
|
+
r"|spring|mybatis|jpa|hibernate|struts"
|
|
943
|
+
r"|mysql|postgresql|postgres|mariadb|sqlite|mongodb|redis|memcached|etcd"
|
|
944
|
+
r"|nginx|tomcat|jetty|undertow|iis"
|
|
945
|
+
r"|kubernetes|docker|helm|terraform|ansible"
|
|
946
|
+
r"|kotlin|scala|groovy|python|django|flask|rails|laravel|php|ruby|perl"
|
|
947
|
+
r"|typescript|javascript|coffeescript"
|
|
948
|
+
r"|jest|mocha|karma|cypress|selenium|puppeteer"
|
|
949
|
+
r"|webpack|rollup|esbuild|parcel|gulp|grunt|eslint|prettier|biome"
|
|
950
|
+
r"|tailwind|bootstrap|antd|mui|chakra|primereact|devextreme|handsontable"
|
|
951
|
+
r"|tanstack|ag-grid|wcag"
|
|
952
|
+
r"|graphql|grpc|protobuf|thrift"
|
|
953
|
+
r"|kafka|rabbitmq|rocketmq|pulsar|activemq"
|
|
954
|
+
r"|elasticsearch|solr|clickhouse|doris|starrocks|minio)\b",
|
|
955
|
+
re.IGNORECASE,
|
|
956
|
+
)
|
|
957
|
+
FORBIDDEN_PLACEHOLDER_PATTERN = re.compile(r"(待填写|待补|TBD|TODO|FIXME)", re.IGNORECASE)
|
|
958
|
+
# 阈值数字默认值面——§13.2「阈值必须项目化」:Spec 面零百分比数字(阈值只住 baseline)。
|
|
959
|
+
FORBIDDEN_THRESHOLD_PATTERN = re.compile(r"\d+\s*%")
|
|
960
|
+
# 零墙钟(A4)与新状态轴/评分禁令。
|
|
961
|
+
WALLCLOCK_PATTERN = re.compile(r"\d{4}-\d{2}-\d{2}T")
|
|
962
|
+
FORBIDDEN_SEMANTIC_PATTERN = re.compile(r"(评分|打分|\bscore\s*[:=]\s*\d)", re.IGNORECASE)
|
|
963
|
+
MARKER_PATTERN = re.compile(r"GENERATED")
|
|
964
|
+
|
|
965
|
+
|
|
966
|
+
def assert_word_discipline(rel, text):
|
|
967
|
+
"""单件词形纪律 fail-closed(命中即爆——零新治理语义红线)。"""
|
|
968
|
+
hit = FORBIDDEN_TECH_PATTERN.search(text)
|
|
969
|
+
assert hit is None, f"词形纪律违例(栈选型词) {rel}: {hit.group(0) if hit else ''}"
|
|
970
|
+
hit = FORBIDDEN_PLACEHOLDER_PATTERN.search(text)
|
|
971
|
+
assert hit is None, f"词形纪律违例(占位词形) {rel}: {hit.group(0)}"
|
|
972
|
+
hit = FORBIDDEN_THRESHOLD_PATTERN.search(text)
|
|
973
|
+
assert hit is None, f"词形纪律违例(阈值数字——阈值项目化) {rel}: {hit.group(0)}"
|
|
974
|
+
assert not WALLCLOCK_PATTERN.search(text), f"零墙钟违例(A4) {rel}"
|
|
975
|
+
hit = FORBIDDEN_SEMANTIC_PATTERN.search(text)
|
|
976
|
+
assert hit is None, f"治理语义违例(评分轴禁入——零新治理语义) {rel}: {hit.group(0)}"
|
|
977
|
+
assert not MARKER_PATTERN.search(text), f"marker-free 违例 {rel}"
|
|
978
|
+
hit = re.search(r"\b(MINIMAL|LIGHT|STANDARD)\b", text, re.IGNORECASE)
|
|
979
|
+
assert hit is None, f"A1 档位词形违例 {rel}: {hit.group(0)}"
|
|
980
|
+
|
|
981
|
+
|
|
982
|
+
# ======================================================================
|
|
983
|
+
# 件构造
|
|
984
|
+
# ======================================================================
|
|
985
|
+
|
|
986
|
+
def spec_document(spec):
|
|
987
|
+
"""单份 Evidence Spec 十七段结构文档(PRD §13.1 逐字段名;纯正文无 frontmatter)。"""
|
|
988
|
+
out = [
|
|
989
|
+
f"# Evidence Spec — {spec['title']}\n",
|
|
990
|
+
"\n",
|
|
991
|
+
f"- 路径:specs/evidence/{spec['slug']}.md\n",
|
|
992
|
+
f"- 对象面词形:{spec['spec_id']}(B2 Evidence Spec 一等对象——kind=business_rule + "
|
|
993
|
+
"payload.spec_kind=evidence_spec 判别;本文件是项目可编辑要求面,对应对象由 init "
|
|
994
|
+
"步骤 4.7 预植 SPEC.* store 对象(PROPOSED 起步,裁定批 D D2);本文件为该对象 "
|
|
995
|
+
"requirements 的播种底稿,对象演进归项目运行时 applyTransaction)\n",
|
|
996
|
+
"- 语义锚:Project-Store PRD §13(Evidence Spec Kit)——要求面非证据面:持要求不持"
|
|
997
|
+
"判定,判定值只在 Verification Result(claim 四态)/Gate Result(七态)。\n",
|
|
998
|
+
"\n",
|
|
999
|
+
f"## Purpose\n",
|
|
1000
|
+
"\n",
|
|
1001
|
+
spec["purpose"] + "\n",
|
|
1002
|
+
]
|
|
1003
|
+
if "formula_block" in spec:
|
|
1004
|
+
for line in spec["formula_block"]:
|
|
1005
|
+
out.append(f"\n{text_block(line)}\n")
|
|
1006
|
+
for line in spec.get("purpose_tail", []):
|
|
1007
|
+
out.append(f"\n{line}\n")
|
|
1008
|
+
|
|
1009
|
+
out.append("\n## Subjects\n")
|
|
1010
|
+
for line in spec["subjects"]:
|
|
1011
|
+
out.append(f"\n{line}\n")
|
|
1012
|
+
out.append("\n## Claims\n")
|
|
1013
|
+
out.append("\n- claim 词形:CLM-*(07 schema 词面);claim 由运行时 record 通路登记"
|
|
1014
|
+
"(UNVERIFIED 起步,声称方禁自填 VERIFIED)——本 Spec 只定义可立 claim 的"
|
|
1015
|
+
"语句类型,不产生判定值。\n")
|
|
1016
|
+
for line in spec["claims"]:
|
|
1017
|
+
out.append(f"\n{line}\n")
|
|
1018
|
+
out.append("\n## Required Observations\n")
|
|
1019
|
+
for line in spec["observations"]:
|
|
1020
|
+
out.append(f"\n{line}\n")
|
|
1021
|
+
out.append("\n## Allowed Producers\n")
|
|
1022
|
+
for line in spec["producers"]:
|
|
1023
|
+
out.append(f"\n{line}\n")
|
|
1024
|
+
out.append("\n## Tool Bindings\n")
|
|
1025
|
+
for line in spec["tool_bindings"]:
|
|
1026
|
+
out.append(f"\n{line}\n")
|
|
1027
|
+
|
|
1028
|
+
out.append("\n## Assertions\n")
|
|
1029
|
+
for line in ASSERTIONS_PREAMBLE:
|
|
1030
|
+
out.append(f"\n{line}\n")
|
|
1031
|
+
out.append(f"\n### PASS\n\n{PASS_FRAME}\n\n{spec['pass_specific']}\n")
|
|
1032
|
+
out.append("\n- 判定值由 Verification Result / Gate Result 写——本文件不自填 PASS。\n")
|
|
1033
|
+
out.append(f"\n### FAIL\n\n{FAIL_FRAME}\n\n{spec['fail_specific']}\n")
|
|
1034
|
+
out.append(f"\n### UNKNOWN\n\n{UNKNOWN_FRAME}\n")
|
|
1035
|
+
out.append(f"\n### NOT_RUN\n\n{NOT_RUN_FRAME}\n")
|
|
1036
|
+
|
|
1037
|
+
out.append("\n## Required Artifacts\n")
|
|
1038
|
+
for line in spec["artifacts"]:
|
|
1039
|
+
out.append(f"\n{line}\n")
|
|
1040
|
+
out.append("\n## Retention\n")
|
|
1041
|
+
out.append("\n- 证据与 raw artifact 至少保留至对应 claim 关账;发布面证据按 baseline/"
|
|
1042
|
+
"platform/delivery.md 登记的保留策略;blob 面优先内容寻址(PRD §3.4)。\n")
|
|
1043
|
+
out.append("\n## Exceptions\n")
|
|
1044
|
+
for line in spec["exceptions"]:
|
|
1045
|
+
out.append(f"\n{line}\n")
|
|
1046
|
+
out.append("\n## Activation Guidance\n")
|
|
1047
|
+
for line in spec["activation"]:
|
|
1048
|
+
out.append(f"\n{line}\n")
|
|
1049
|
+
out.append("\n## Ownership\n")
|
|
1050
|
+
for line in DEFAULT_OWNERSHIP:
|
|
1051
|
+
out.append(f"\n{line}\n")
|
|
1052
|
+
out.append("\n## Change Policy\n")
|
|
1053
|
+
for line in DEFAULT_CHANGE_POLICY:
|
|
1054
|
+
out.append(f"\n{line}\n")
|
|
1055
|
+
return "".join(out)
|
|
1056
|
+
|
|
1057
|
+
|
|
1058
|
+
def text_block(line):
|
|
1059
|
+
"""PRD 逐字节词形的 text 代码块(公式等)。"""
|
|
1060
|
+
return f"```text\n{line}\n```"
|
|
1061
|
+
|
|
1062
|
+
|
|
1063
|
+
def build_index_md():
|
|
1064
|
+
"""Kit 索引:分母/十七段结构/四值词形/映射表/对象面衔接(gates 绑定 ADR 注记)。"""
|
|
1065
|
+
out = [
|
|
1066
|
+
"# Evidence Spec Kit —— 证据要求面索引\n",
|
|
1067
|
+
"\n",
|
|
1068
|
+
"- 路径:specs/evidence/index.md\n",
|
|
1069
|
+
"- 职责(PRD §13):Evidence Spec Kit 索引——19 份证据要求面 + §13.1 十七段固定结构"
|
|
1070
|
+
" + 判卷四值词形闭包 + 文件↔对象面词形映射。\n",
|
|
1071
|
+
"- 纪律:Evidence Spec 持要求不持判定(PRD §9.2/§2.5)——判定值只在 Verification "
|
|
1072
|
+
"Result(claim 四态)/Gate Result(七态);本目录全部文件是项目可编辑要求面(播种 "
|
|
1073
|
+
"marker-free,seed-once-missing-only)。\n",
|
|
1074
|
+
"\n",
|
|
1075
|
+
"## Kit 分母(19 spec + index = 20)\n",
|
|
1076
|
+
"\n",
|
|
1077
|
+
"| 文件 | 对象面词形 | 要求面一句话 |\n",
|
|
1078
|
+
"|---|---|---|\n",
|
|
1079
|
+
]
|
|
1080
|
+
for spec in SPECS:
|
|
1081
|
+
out.append(f"| {spec['slug']}.md | {spec['spec_id']} | {spec['one_liner']} |\n")
|
|
1082
|
+
out.append("\n")
|
|
1083
|
+
out.append("## 固定结构(§13.1 十七段)\n\n")
|
|
1084
|
+
out.append("顶层 13 段:Purpose / Subjects / Claims / Required Observations / "
|
|
1085
|
+
"Allowed Producers / Tool Bindings / Assertions / Required Artifacts / "
|
|
1086
|
+
"Retention / Exceptions / Activation Guidance / Ownership / Change Policy;\n")
|
|
1087
|
+
out.append("Assertions 段带四个判定词位:PASS / FAIL / UNKNOWN / NOT_RUN。\n")
|
|
1088
|
+
out.append("\n## 判卷四值词形(§13.1 闭包——禁发明第五值)\n\n")
|
|
1089
|
+
out.append("- PASS:要求条款逐条满足且证据资格成立——由 Verification Result / Gate "
|
|
1090
|
+
"Result 判定,Spec 文件不自填。\n")
|
|
1091
|
+
out.append("- FAIL:任一必需要求不满足或证据资格不成立(资格清单外/跨对象借证)。\n")
|
|
1092
|
+
out.append("- UNKNOWN:证据在座但不足以判定——诚实位,禁当 PASS。\n")
|
|
1093
|
+
out.append("- NOT_RUN:证据类型未被产出或范围显式不适用且例外已登记——显式缺席诚实位"
|
|
1094
|
+
"(证据不可得一律落本位),禁静默缺证当 PASS。\n")
|
|
1095
|
+
out.append("\n## 对象面衔接(B2 Evidence Spec 一等对象——gates 绑定登记级)\n\n")
|
|
1096
|
+
out.append("- 登记词形:SPEC.* governed id(21-evidence-spec kind profile:kind="
|
|
1097
|
+
"business_rule + payload.spec_kind=evidence_spec 判别;词形随 PR-0008 在 "
|
|
1098
|
+
"vocab-lock prefixes_v0 闭包)。\n")
|
|
1099
|
+
out.append("- 登记通路:对应 store 对象由 init 步骤 4.7 预植(裁定批 D D2——kernel "
|
|
1100
|
+
"applyTransaction upsert_object 单事务,PROPOSED 起步,seed-once);此后对象"
|
|
1101
|
+
"演进归项目运行时 applyTransaction。requirements[].claim_refs/gate_refs 是"
|
|
1102
|
+
"资格清单——closeout 按资格判卷,资格外 claim/run 不满足条款。\n")
|
|
1103
|
+
out.append("- 文件↔对象绑定 = 登记级(本索引映射表 + 各 spec 头行词形),无第二套机器"
|
|
1104
|
+
"绑定机制(无消费者不加机制——对象面 requirements 已承载资格判定)。\n")
|
|
1105
|
+
out.append("- catalog gate recipe 零引用字段位:gate recipe 判卷走 03-gate-result 七态"
|
|
1106
|
+
"词表,与本 Kit 的衔接经由对象面 requirements.gate_refs,不新增词形不动 "
|
|
1107
|
+
"catalog。\n")
|
|
1108
|
+
out.append("\n## 生产/消费平面(PRD §3)\n\n")
|
|
1109
|
+
out.append("- claims:.pomaster/evidence/claims/(claim 禁自填 PASSED——经 Verification)。\n")
|
|
1110
|
+
out.append("- runs:.pomaster/evidence/runs/(一个 Run 文件即该次 observation 的 "
|
|
1111
|
+
"normalized receipt,不另设 receipt/result 同义件)。\n")
|
|
1112
|
+
out.append("- blobs:.pomaster/evidence/blobs/(raw artifact,优先内容寻址)。\n")
|
|
1113
|
+
out.append("- binding:claim → run_ids → blob_refs → task → governed_object → git_sha"
|
|
1114
|
+
"(稳定引用完成,不建独立目录)。\n")
|
|
1115
|
+
return "".join(out)
|
|
1116
|
+
|
|
1117
|
+
|
|
1118
|
+
# ======================================================================
|
|
1119
|
+
# 构建期自校验 + manifest 合并
|
|
1120
|
+
# ======================================================================
|
|
1121
|
+
|
|
1122
|
+
def build_seed_assets():
|
|
1123
|
+
"""20 件字节 + manifest 文档(132 条原样保留 + B6E 20 条追加)。"""
|
|
1124
|
+
assets = {}
|
|
1125
|
+
assets["specs/evidence/index.md"] = build_index_md().encode("utf-8")
|
|
1126
|
+
for spec in SPECS:
|
|
1127
|
+
assets[f"specs/evidence/{spec['slug']}.md"] = spec_document(spec).encode("utf-8")
|
|
1128
|
+
|
|
1129
|
+
# ---- 构建期自校验(fail-closed)----
|
|
1130
|
+
# 1) 分母 20 = index + 19;文件名集合 == PRD §13 清单逐字。
|
|
1131
|
+
assert len(assets) == 20, f"evidence 分母漂移: {len(assets)}"
|
|
1132
|
+
expected = {"index.md"} | {f"{s}.md" for s in [
|
|
1133
|
+
"build", "typecheck-lint", "unit-component-integration", "contract", "coverage",
|
|
1134
|
+
"complexity-crap", "mutation", "architecture", "dead-code-duplicate", "browser-e2e",
|
|
1135
|
+
"visual-regression", "accessibility", "performance", "security",
|
|
1136
|
+
"dependency-supply-chain", "data-migration", "business-acceptance",
|
|
1137
|
+
"runtime-observability", "release"]}
|
|
1138
|
+
assert {p.split("/")[-1] for p in assets} == expected, "文件名集合 != PRD §13 清单"
|
|
1139
|
+
|
|
1140
|
+
# 2) 十七段结构 + 判定词位 + 头行词形(19 spec 逐份;index 另测)。
|
|
1141
|
+
for spec in SPECS:
|
|
1142
|
+
rel = f"specs/evidence/{spec['slug']}.md"
|
|
1143
|
+
text = assets[rel].decode("utf-8")
|
|
1144
|
+
headings = [ln[3:].strip() for ln in text.splitlines() if ln.startswith("## ")]
|
|
1145
|
+
assert headings == SECTION_ORDER, f"{rel} 顶层段漂移: {headings}"
|
|
1146
|
+
sub = [ln[4:].strip() for ln in text.splitlines() if ln.startswith("### ")]
|
|
1147
|
+
assert sub == VERDICTS, f"{rel} 判定词位漂移: {sub}"
|
|
1148
|
+
# 判定词位必须位于 Assertions 段之后(### 子段落位)。
|
|
1149
|
+
idx_assertions = text.index("## Assertions")
|
|
1150
|
+
idx_artifacts = text.index("## Required Artifacts")
|
|
1151
|
+
for v in VERDICTS:
|
|
1152
|
+
pos = text.index(f"### {v}")
|
|
1153
|
+
assert idx_assertions < pos < idx_artifacts, f"{rel} 判定词位落位漂移: {v}"
|
|
1154
|
+
# 头行:路径/对象面词形/语义锚;SPEC 词形逐字且全文件恰一次。
|
|
1155
|
+
assert f"- 路径:specs/evidence/{spec['slug']}.md" in text, rel
|
|
1156
|
+
assert f"- 对象面词形:{spec['spec_id']}(" in text, rel
|
|
1157
|
+
assert text.count(spec["spec_id"]) == 1, f"{rel} SPEC 词形出现次数漂移"
|
|
1158
|
+
assert "- 语义锚:Project-Store PRD §13" in text, rel
|
|
1159
|
+
# 批 G 陈旧声明清洗:D2 预植现状新词形在座 + 旧词形零残留(计数断言——批 C 同款)。
|
|
1160
|
+
assert "init 步骤 4.7 预植" in text, f"{rel} 批 G 清洗新词形缺席"
|
|
1161
|
+
assert "本文件为该对象 requirements 的播种底稿" in text, f"{rel} 播种底稿词形缺席"
|
|
1162
|
+
assert "init 播种不写 store 对象" not in text, f"{rel} 批 G 清洗旧词形残留"
|
|
1163
|
+
assert "持要求不持判定" in text, f"{rel} 要求面声明缺席"
|
|
1164
|
+
assert "Verification Result" in text and "Gate Result" in text, rel
|
|
1165
|
+
# SPEC 词形过 governed 文法(21 schema definitions.governed_id SPEC 面镜像)。
|
|
1166
|
+
assert GOVERNED_ID_SPEC.match(spec["spec_id"]), spec["spec_id"]
|
|
1167
|
+
|
|
1168
|
+
# 3) index:映射表与 19 spec 双射;衔接注记在座。
|
|
1169
|
+
idx_text = assets["specs/evidence/index.md"].decode("utf-8")
|
|
1170
|
+
for spec in SPECS:
|
|
1171
|
+
assert f"| {spec['slug']}.md | {spec['spec_id']} |" in idx_text, \
|
|
1172
|
+
f"index 缺映射行: {spec['slug']}"
|
|
1173
|
+
assert "无第二套机器绑定机制" in idx_text and "applyTransaction" in idx_text, \
|
|
1174
|
+
"gates 绑定登记级 ADR 注记缺席"
|
|
1175
|
+
assert "持要求不持判定" in idx_text
|
|
1176
|
+
# 批 G 陈旧声明清洗:index 登记通路行同批改写(新词形在座+旧词形零残留)。
|
|
1177
|
+
assert "init 步骤 4.7 预植" in idx_text, "index 批 G 清洗新词形缺席"
|
|
1178
|
+
assert "init 播种不写 store 对象" not in idx_text, "index 批 G 清洗旧词形残留"
|
|
1179
|
+
|
|
1180
|
+
# 4) 逐件词形纪律。
|
|
1181
|
+
for rel, data in sorted(assets.items()):
|
|
1182
|
+
assert_word_discipline(rel, data.decode("utf-8"))
|
|
1183
|
+
|
|
1184
|
+
# 5) PRD §13.2/§13.3 逐字词形锚(内容新著但条款词形忠实)。
|
|
1185
|
+
crap = assets["specs/evidence/complexity-crap.md"].decode("utf-8")
|
|
1186
|
+
assert "CRAP = Complexity² × (1 - Coverage)³ + Complexity" in crap, "CRAP v1 公式逐字缺席"
|
|
1187
|
+
assert "阈值必须项目化" in crap and "Istanbul/V8/c8" in crap and "JaCoCo" in crap
|
|
1188
|
+
mut = assets["specs/evidence/mutation.md"].decode("utf-8")
|
|
1189
|
+
for word in ["Stryker", "PIT / PITest", "mutation score", "survivors", "killed",
|
|
1190
|
+
"timeout", "not-covered", "affected scope"]:
|
|
1191
|
+
assert word in mut, f"mutation §13.3 词形缺席: {word}"
|
|
1192
|
+
|
|
1193
|
+
# ---- manifest 条目(自指指纹 pin)----
|
|
1194
|
+
b6e_entries = []
|
|
1195
|
+
b6e_targets = []
|
|
1196
|
+
for rel in sorted(assets):
|
|
1197
|
+
data = assets[rel]
|
|
1198
|
+
target = f".pomaster/{rel}"
|
|
1199
|
+
b6e_targets.append(target)
|
|
1200
|
+
b6e_entries.append({
|
|
1201
|
+
"target": target,
|
|
1202
|
+
"asset": rel,
|
|
1203
|
+
"seed_version": BATCH,
|
|
1204
|
+
"lane": "evidence",
|
|
1205
|
+
"authoring": "new",
|
|
1206
|
+
"source_path": DESIGN_SOURCE,
|
|
1207
|
+
"source_sha256": hashlib.sha256(data).hexdigest(),
|
|
1208
|
+
"source_bytes": len(data),
|
|
1209
|
+
"porting_notes": list(NEW_AUTHORING_NOTES),
|
|
1210
|
+
})
|
|
1211
|
+
|
|
1212
|
+
# manifest.json(132 条原样保留 + B6E 追加——单源合并分母 152)。
|
|
1213
|
+
old_doc = json.loads(open(MANIFEST_PATH, encoding="utf-8").read())
|
|
1214
|
+
assert old_doc["schema"] == MANIFEST_SCHEMA
|
|
1215
|
+
old_entries = old_doc["entries"]
|
|
1216
|
+
old_batches = old_doc.get("batches") or {}
|
|
1217
|
+
kept_names = ("B6B-1", "B6B-2", "B6C", "B6D")
|
|
1218
|
+
kept_batches = {k: list(v) for k, v in old_batches.items() if k in kept_names}
|
|
1219
|
+
assert set(kept_batches) == set(kept_names), "磁盘清单缺 B6b/B6c/B6d 批名单"
|
|
1220
|
+
kept_targets = set()
|
|
1221
|
+
for k in kept_names:
|
|
1222
|
+
kept_targets |= set(kept_batches[k])
|
|
1223
|
+
kept_entries = [e for e in old_entries if e["target"] in kept_targets]
|
|
1224
|
+
assert len(kept_entries) == 132, f"B6b/B6c/B6d 条目数漂移: {len(kept_entries)}"
|
|
1225
|
+
assert not (kept_targets & set(b6e_targets)), "B6E 目标与既有条目撞名"
|
|
1226
|
+
batch_targets = dict(kept_batches)
|
|
1227
|
+
batch_targets[BATCH] = b6e_targets
|
|
1228
|
+
manifest_doc = {
|
|
1229
|
+
"schema": MANIFEST_SCHEMA,
|
|
1230
|
+
"batch": BATCH,
|
|
1231
|
+
"batches": batch_targets,
|
|
1232
|
+
"generated_by": "catalog/tools/seed_b6e_evidence.py",
|
|
1233
|
+
"denominator": {
|
|
1234
|
+
"batch_scope": BATCH_SCOPE,
|
|
1235
|
+
"planted": len(kept_entries) + len(b6e_entries),
|
|
1236
|
+
"planted_total": PLANTED_TOTAL,
|
|
1237
|
+
"batch_new": len(b6e_entries),
|
|
1238
|
+
},
|
|
1239
|
+
"seed_semantics": "seed-once-missing-only(缺席才写 / 在座零触碰 / marker-free;"
|
|
1240
|
+
"seeds.ts 单一实现;frontmatter 为 PRD §8.2 字段位减 id——"
|
|
1241
|
+
"no-governed-id 默认,播种 spec 是项目可编辑自由文件;B6c 起 "
|
|
1242
|
+
"BE 件含 vendor frontmatter 保留字段、stacks 件落 <slug> 子"
|
|
1243
|
+
"目录——SEEDABLE_STORE_DIRS 显式 slug 登记;B6d 起 baseline "
|
|
1244
|
+
"件为新著纯正文(无 frontmatter——yaml 直接可解析/Owner 填写"
|
|
1245
|
+
"面零噪音;entry authoring=new,pin=资产自身字节指纹,装载器"
|
|
1246
|
+
"自指校验;UNKNOWN 起步,「待填写」词形零移植);B6e 起 specs/"
|
|
1247
|
+
"evidence 件同 authoring=new 纯正文通路——十七段结构照 PRD "
|
|
1248
|
+
"§13.1,要求面非证据面(持要求不持判定,判卷四值词形闭包),"
|
|
1249
|
+
"gates 绑定=登记级注记)",
|
|
1250
|
+
"authority_scope": "specs 面 mixed_required_and_advisory;baseline 面 "
|
|
1251
|
+
"project_baseline_template(UNKNOWN 起步模板,非规则面);"
|
|
1252
|
+
"specs/evidence 面 evidence_spec_requirements(要求面规范——"
|
|
1253
|
+
"持要求不持判定,判定值只在 Verification Result/Gate Result)",
|
|
1254
|
+
"entries": kept_entries + b6e_entries,
|
|
1255
|
+
}
|
|
1256
|
+
return assets, manifest_doc
|
|
1257
|
+
|
|
1258
|
+
|
|
1259
|
+
def write_if_changed(path, data):
|
|
1260
|
+
if os.path.isfile(path):
|
|
1261
|
+
if open(path, "rb").read() == data:
|
|
1262
|
+
return False
|
|
1263
|
+
os.makedirs(os.path.dirname(path), exist_ok=True)
|
|
1264
|
+
open(path, "wb").write(data)
|
|
1265
|
+
return True
|
|
1266
|
+
|
|
1267
|
+
|
|
1268
|
+
def main():
|
|
1269
|
+
built_assets, manifest_doc = build_seed_assets()
|
|
1270
|
+
outputs = {}
|
|
1271
|
+
for rel, data in built_assets.items():
|
|
1272
|
+
outputs[os.path.join(EVIDENCE_ASSET_DIR, *rel.split("/")[2:])] = data
|
|
1273
|
+
outputs[MANIFEST_PATH] = (json.dumps(manifest_doc, ensure_ascii=False, indent=2)
|
|
1274
|
+
+ "\n").encode("utf-8")
|
|
1275
|
+
|
|
1276
|
+
if "--verify" in sys.argv:
|
|
1277
|
+
drifts = []
|
|
1278
|
+
for path, data in outputs.items():
|
|
1279
|
+
if not os.path.isfile(path):
|
|
1280
|
+
drifts.append({"path": path, "error": "missing"})
|
|
1281
|
+
elif open(path, "rb").read() != data:
|
|
1282
|
+
drifts.append({"path": path, "error": "bytes_differ"})
|
|
1283
|
+
if drifts:
|
|
1284
|
+
for d in drifts:
|
|
1285
|
+
print("DRIFT:", d)
|
|
1286
|
+
sys.exit(1)
|
|
1287
|
+
print(f"[seed_b6e_evidence] verify ok: {len(built_assets)} seeds + manifest.json"
|
|
1288
|
+
f"(共 {len(manifest_doc['entries'])} 条,字节逐等)")
|
|
1289
|
+
return
|
|
1290
|
+
|
|
1291
|
+
changed = 0
|
|
1292
|
+
for path, data in sorted(outputs.items()):
|
|
1293
|
+
if write_if_changed(path, data):
|
|
1294
|
+
changed += 1
|
|
1295
|
+
print("WROTE:", os.path.relpath(path, VNEXT))
|
|
1296
|
+
print(f"[seed_b6e_evidence] ok: {len(outputs)} outputs({changed} changed / "
|
|
1297
|
+
f"{len(outputs) - changed} unchanged);evidence={len(built_assets)} "
|
|
1298
|
+
f"manifest_entries={len(manifest_doc['entries'])}"
|
|
1299
|
+
f"(B6E +{manifest_doc['denominator']['batch_new']},"
|
|
1300
|
+
f"总 {manifest_doc['denominator']['planted']})")
|
|
1301
|
+
print("下一步:corepack pnpm test(分母 152 面断言)+ 全量门禁")
|
|
1302
|
+
|
|
1303
|
+
|
|
1304
|
+
if __name__ == "__main__":
|
|
1305
|
+
main()
|