{
  "contract_ref": {
    "path": "docs/now33_reference_candidate_consumption_guard_and_registry_content_review_contract_20260607.md",
    "sha256": "a154734fdd84b8de244473789ddd459472062654a7a9c8d24542821904f8914a",
    "size_bytes": 11962
  },
  "contract_text": "# NOW-33 Reference Candidate Consumption Guard And Registry Content Review Contract\n\n更新时间：`2026-06-07T01:24:00+08:00`\n\n## Status\n\n- contract id: `now33_reference_candidate_consumption_guard_and_registry_content_review_contract`\n- status: `contract_landed_pending_implementation`\n- active route authority: `execution_state.json.next_entrypoint`\n- active route remains: `platform_neutral_prompt_readiness_manual_execution_log_contract`\n- source retrospective: `docs/now33_reference_registry_rerun_retrospective_20260607.md`\n- source NOW-33 rerun: `outputs/now33_entity_link_binding_with_built_registry_20260607_0049`\n- source registry build: `outputs/target_source_grounded_entity_registry_build_20260607_0032`\n- source built-candidate preflight: `outputs/current_registry_authority_preflight_for_built_candidate_20260607_0034`\n\n## Purpose\n\nNOW-33 reference-registry rerun produced `1476` exact-surface `candidate_entity_refs` across `1056` of `1638` prompt draft rows. These refs are useful review signals, but they are not canonical bindings.\n\nThis contract defines the next implementation step before any canonical UID binding, KG/raw KG/entity-store writeback, row mutation, asset binding, evidence pack, route transition, or production acceptance:\n\n1. Build deterministic consumption guards so downstream code cannot treat `candidate_entity_refs` as `canonical_entity_uids`.\n2. Build a registry content review packet for the `28` unblocked registry entities and the `1476` candidate refs.\n3. Produce review/gap/risk artifacts that prepare, but do not execute, a future canonical UID binding acceptance/writeback contract.\n\n## Inputs\n\nRequired read-only inputs:\n\n- `outputs/target_source_grounded_entity_registry_build_20260607_0032/TARGET_REGISTRY_gate.json`\n- `outputs/target_source_grounded_entity_registry_build_20260607_0032/TARGET_REGISTRY_candidate_current_entity_registry.json`\n- `outputs/target_source_grounded_entity_registry_build_20260607_0032/TARGET_REGISTRY_source_entity_candidate_manifest.jsonl`\n- `outputs/current_registry_authority_preflight_for_built_candidate_20260607_0034/NOW_33A_current_registry_gate.json`\n- `outputs/current_registry_authority_preflight_for_built_candidate_20260607_0034/NOW_33A_registry_candidate_manifest.jsonl`\n- `outputs/now33_entity_link_binding_with_built_registry_20260607_0049/NOW_33_entity_link_gate.json`\n- `outputs/now33_entity_link_binding_with_built_registry_20260607_0049/NOW_33_entity_link_advisory_manifest.jsonl`\n- `outputs/now33_entity_link_binding_with_built_registry_20260607_0049/NOW_33_entity_gap_report.json`\n- `outputs/now33_entity_link_binding_with_built_registry_20260607_0049/NOW_33_registry_discovery_report.json`\n- DeepSeek final advisory refs for registry build and NOW-33 rerun.\n\nAll inputs remain source artifacts only. Reading these inputs does not create acceptance, evidence, canonical authority, or writeback authority.\n\n## Allowed Work\n\nImplementation may:\n\n- Parse and validate the required input gates/manifests.\n- Verify that the configured registry path, selected preflight path, and NOW-33 registry discovery path match.\n- Verify that every NOW-33 row with candidate refs includes `candidate_entity_refs_are_not_canonical_bindings=true` and `candidate_refs_writeback_allowed=false`.\n- Verify that every referenced candidate comes from a registry entity with `blocked_for_review=false`.\n- Build a candidate-ref consumption guard report with pass/block findings.\n- Build a registry content review queue covering the `28` unblocked registry entities.\n- Build a candidate-ref review queue covering the `1476` candidate refs, grouped by entity UID, surface, draft row, chapter, scene, and shot.\n- Flag likely false positives, missing high-value surfaces, blocked-entity leakage, alias/surface collisions, duplicate-surface risks, weak support, and type/subtype uncertainty.\n- Generate side-effect-free JSON/JSONL/HTML artifacts under a new output run.\n- Run two DeepSeek v4 pro thinking/max advisory rounds over the contract and output packet if the implementation asserts closeout/readiness.\n\n## Forbidden Work\n\nThis contract does not authorize:\n\n- canonical UID binding acceptance or writeback;\n- KG/raw KG/entity-store writeback;\n- accepted/operator overlay writeback;\n- draft, held, readiness, execution-log, or prompt-row mutation;\n- held-row promotion, waiver, or repair execution;\n- asset generation, acquisition, or binding;\n- provider-specific prompt generation, adapter payload generation, provider job execution, or media generation;\n- manual/provider/operator evidence creation;\n- feedback intake, repair, replay, or replay eligibility;\n- route transition or `execution_state.json.next_entrypoint` change;\n- `outputs/index.json` or `outputs/index-lite.json` mutation;\n- production readiness or production acceptance.\n\nDeepSeek advisory remains advisory-only and cannot become evidence, operator acceptance, canonical state, writeback authority, route authority, or output-index authority.\n\n## Required Output Artifacts\n\nThe implementation should create a new output run, for example:\n\n`outputs/now33_reference_candidate_consumption_guard_and_registry_content_review_<timestamp>`\n\nRequired artifacts:\n\n- `NOW_33_reference_candidate_consumption_guard_input.json`\n- `NOW_33_reference_candidate_consumption_guard_report.json`\n- `NOW_33_reference_candidate_registry_content_review_queue.jsonl`\n- `NOW_33_reference_candidate_ref_review_queue.jsonl`\n- `NOW_33_reference_candidate_surface_collision_report.json`\n- `NOW_33_reference_candidate_missing_high_value_surface_report.json`\n- `NOW_33_reference_candidate_review_summary.json`\n- `NOW_33_reference_candidate_consumption_guard_validation_report.json`\n- `NOW_33_reference_candidate_consumption_guard_gate.json`\n- `NOW_33_reference_candidate_consumption_guard_review.html`\n- `manifest.json`\n\nIf DeepSeek consultation is run for implementation closeout, store consultation inputs/messages/raw/parsed/record files in dedicated output directories and reference them from the gate.\n\n## Consumption Guard Rules\n\nThe guard must block if any of the following are true:\n\n- `execution_state.json.next_entrypoint` changed.\n- NOW-33 rerun gate is not `advisory_entity_link_binding_closed_reference_registry_no_writeback`.\n- NOW-33 rerun gate has `canonical_entity_uid_bound_count != 0`.\n- Any NOW-33 row has non-empty `canonical_entity_uids`.\n- Any NOW-33 row with candidate refs lacks `candidate_entity_refs_are_not_canonical_bindings=true`.\n- Any NOW-33 row with candidate refs lacks `candidate_refs_writeback_allowed=false`.\n- Any candidate ref resolves to a registry entity with `blocked_for_review=true`.\n- Any candidate ref points to an entity UID absent from the configured registry.\n- Any source/preflight/NOW-33 selected registry path or source fingerprint mismatches.\n- Any output artifact claims accepted binding, canonical writeback, evidence, provider execution, route transition, output-index mutation, or production acceptance.\n\nThe guard may pass with review warnings if false-positive, missing-surface, alias-collision, or type-uncertainty risks are present, provided they are explicit review queue items and no forbidden writeback/acceptance authority is created.\n\n## Registry Content Review Queue\n\nEach unblocked registry entity review row must include:\n\n- `review_item_id`\n- `entity_uid`\n- `canonical_name`\n- `aliases`\n- `type`\n- `subtype`\n- `source_evidence_refs`\n- `source_ref_count`\n- `candidate_ref_count`\n- `matched_surfaces`\n- `matched_draft_row_ids`\n- `risk_flags`\n- `recommended_review_action`\n- `allowed_review_actions`\n- `advisory_only=true`\n- `canonical_writeback_allowed=false`\n\nAllowed review actions are:\n\n- `keep_candidate_for_future_binding_review`\n- `needs_alias_or_surface_review`\n- `needs_type_subtype_review`\n- `needs_split_or_merge_review`\n- `exclude_from_future_binding_review`\n- `defer_until_more_evidence`\n\nThese actions are review recommendations only. They do not become accepted overlay rows.\n\n## Candidate Ref Review Queue\n\nEach candidate ref review row must include:\n\n- `review_item_id`\n- `draft_row_id`\n- `chapter_index`\n- `scene_number`\n- `shot_number`\n- `entity_uid`\n- `canonical_name`\n- `matched_surface`\n- `match_source`\n- `context_excerpt`\n- `row_candidate_ref_count`\n- `risk_flags`\n- `recommended_review_action`\n- `allowed_review_actions`\n- `candidate_entity_refs_are_not_canonical_bindings=true`\n- `candidate_refs_writeback_allowed=false`\n- `canonical_writeback_allowed=false`\n\nAllowed review actions are:\n\n- `candidate_ref_plausible_for_future_binding_review`\n- `candidate_ref_surface_collision_risk`\n- `candidate_ref_false_positive_suspected`\n- `candidate_ref_needs_context_review`\n- `candidate_ref_defer_until_registry_review`\n\nThese actions are review recommendations only and cannot mutate source rows or accepted overlays.\n\n## Risk Flags\n\nUse deterministic flags where possible:\n\n- `blocked_registry_entity_leak`\n- `candidate_uid_missing_from_registry`\n- `surface_collision`\n- `alias_collision`\n- `multiple_candidate_refs_in_row`\n- `weak_source_support`\n- `type_subtype_uncertain`\n- `high_frequency_surface`\n- `role_or_title_surface`\n- `object_or_location_surface`\n- `missing_high_value_surface_candidate`\n- `context_excerpt_missing`\n- `source_fingerprint_mismatch`\n- `non_binding_guard_missing`\n\nDeepSeek may recommend additional advisory risk labels, but implementation must map them into stable program-owned flags or record them as advisory notes, not runtime authority.\n\n## Missing High-Value Surface Review\n\nThe implementation should compute missing high-value surfaces from the target registry unblocked rows and NOW-33 matched surfaces. It must not infer canonical bindings. It may flag:\n\n- unblocked registry entities with zero candidate refs;\n- high-support registry entities not appearing in any NOW-33 candidate refs;\n- frequently occurring text surfaces in NOW-33 rows that are not represented in the unblocked registry lexicon, if detected deterministically.\n\nThese are review risks only.\n\n## DeepSeek Advisory Requirements\n\nFor implementation closeout, run at least two DeepSeek v4 pro thinking/max rounds unless the stage is explicitly marked `blocked_unavailable`.\n\nRound 1 should review:\n\n- guard rules;\n- review queue schema;\n- source/preflight/NOW-33 authority linkage;\n- risk taxonomy;\n- boundary coverage.\n\nRound 2 should critique Round 1 for:\n\n- overreach;\n- hallucinated canonical authority;\n- missed writeback/evidence/route boundaries;\n- weak assumptions about candidate refs;\n- missing operator constraints;\n- missing deterministic validators.\n\nDeepSeek outputs must be logged with provider/model/thinking metadata, timeout status, raw response, parsed response, parse status, input fingerprints, and advisory-only boundaries.\n\n## Pass Criteria\n\nThe future implementation gate may pass only if:\n\n- required input artifacts parse successfully;\n- source/preflight/NOW-33 registry path and fingerprint linkage match;\n- every candidate ref is non-binding and writeback forbidden;\n- blocked registry entities do not appear in candidate refs;\n- canonical UID binding count remains `0`;\n- review queues cover all `28` unblocked registry entities and all `1476` candidate refs, or explicitly explain any mismatch;\n- risk reports are generated;\n- no forbidden side-effect count is non-zero;\n- two DeepSeek rounds parse as pass or blocked/unavailable is explicitly recorded and treated as blocking readiness;\n- JSON parse, focused tests, workflow guard, and `git diff --check` pass;\n- `execution_state.json.next_entrypoint` remains unchanged.\n\n## Next Stage After This Contract\n\nIf this contract is implemented and passes, the next possible contract may be a future `canonical_uid_binding_acceptance_or_writeback_contract`. That future contract must still be explicit and must define accepted authority, replay/writeback safety, rollback, operator/DeepSeek boundary, and validation gates.\n\nThis contract alone does not authorize that future work.\n",
  "created_at": "2026-06-07T14:31:39+0800",
  "expected_output_schema": {
    "confidence": "low|medium|high",
    "findings": [
      {
        "category": "boundary|guard|schema|authority|risk|validation|operator_constraint",
        "description": "string",
        "required_fix": "string",
        "severity": "blocker|high|medium|low"
      }
    ],
    "overall_verdict": "supports_contract|supports_with_required_corrections|blocks_contract",
    "recommended_status_label": "string",
    "required_contract_corrections": [
      "string"
    ],
    "scope_audit": {
      "advisory_only_respected": "boolean",
      "candidate_refs_never_canonical": "boolean",
      "evidence_creation_blocked": "boolean",
      "future_writeback_requires_separate_contract": "boolean",
      "review_actions_non_mutating": "boolean",
      "route_transition_blocked": "boolean",
      "writeback_blocked": "boolean"
    }
  },
  "fixed_facts": {
    "active_route_next_entrypoint": "platform_neutral_prompt_readiness_manual_execution_log_contract",
    "blocked_for_review_entities": 685,
    "built_candidate_preflight_is_read_only_selection": true,
    "candidate_entity_ref_count": 1476,
    "candidate_refs_are_non_binding": true,
    "candidate_refs_writeback_allowed": false,
    "canonical_entity_uid_bound_count": 0,
    "manifest_row_count": 1638,
    "now33_reference_rerun_status": "advisory_entity_link_binding_closed_reference_registry_no_writeback",
    "registry_entities": 713,
    "rows_with_candidate_refs": 1056,
    "target_registry_candidate_is_artifact_only": true,
    "unblocked_registry_entities": 28
  },
  "operator_constraints": [
    "DeepSeek is advisory-only and may substitute for expert advice but never provider/manual/operator evidence or acceptance.",
    "Do not authorize canonical UID binding/writeback, KG/raw KG/entity-store writeback, accepted/operator overlay, row mutation, assets, evidence, feedback/repair/replay, route transition, outputs index mutation, or production acceptance.",
    "This round reviews contract scope, guard rules, review queue schema, authority linkage, risk taxonomy, and boundary coverage only.",
    "Consultation timeout preference is 600 seconds; timeout/unavailable must be logged and cannot be treated as pass."
  ],
  "purpose": "Review the next-step contract only. Do not authorize implementation/writeback/route/evidence.",
  "round_id": "round1",
  "source_refs": [
    {
      "gate_status": "target_source_grounded_registry_build_pass_candidate_artifact_only",
      "path": "outputs/target_source_grounded_entity_registry_build_20260607_0032/TARGET_REGISTRY_gate.json",
      "sha256": "82da1ab824cdb6eafdc0f43705b71e50f40fc41b9b2cf7a84b6f6e9649397811",
      "size_bytes": 4310,
      "status": "target_source_grounded_registry_candidate_built_validated",
      "summary": {
        "accepted_overlay_write_count": 0,
        "adapter_payload_count": 0,
        "alias_surface_row_count": 713,
        "authority_satisfying_candidate_count": 28,
        "blocked_for_review_count": 685,
        "candidate_manifest_row_count": 912,
        "canonical_kg_writeback_count": 0,
        "deepseek_round1_parse_status": "pass",
        "deepseek_round1_verdict": "supports_target_source_grounded_registry_build",
        "deepseek_round2_confidence": "medium",
        "deepseek_round2_parse_status": "pass",
        "deepseek_round2_verdict": "round1_supported_with_corrections",
        "duplicate_uid_count": 0,
        "entity_count": 713,
        "feedback_intake_count": 0,
        "manual_provider_evidence_count": 0,
        "media_generation_count": 0,
        "missing_canonical_name_count": 0,
        "operator_evidence_creation_count": 0,
        "operator_overlay_write_count": 0,
        "outputs_index_mutation_count": 0,
        "provider_job_execution_count": 0,
        "provider_prompt_count": 0,
        "raw_kg_writeback_count": 0,
        "repair_execution_count": 0,
        "replay_action_count": 0,
        "schema_error_count": 0,
        "schema_errors": [],
        "source_ref_row_count": 1074,
        "target_source_fingerprint": "c5d6ab4f5d8bc0aa4a018ebe6daec3315b0d646cb189b1a4fb28fe9a6e23ba34",
        "unresolved_deepseek_high_or_blocker_finding_count": 0,
        "validator_failure_count": 0
      }
    },
    {
      "gate_status": "now33a_current_registry_preflight_pass_configured_candidate_selected",
      "path": "outputs/current_registry_authority_preflight_for_built_candidate_20260607_0034/NOW_33A_current_registry_gate.json",
      "sha256": "c1141bf969c7f6cd9acb4c462c38819f2a99c4278932dcc314b0dc63829194de",
      "size_bytes": 4242,
      "status": "current_registry_preflight_pass_configured_candidate_selected_read_only_no_writeback",
      "summary": {
        "accepted_overlay_write_count": 0,
        "adapter_payload_count": 0,
        "candidate_count": 12,
        "canonical_kg_writeback_count": 0,
        "configured_rejected_count": 0,
        "configured_selected_count": 1,
        "current_registry_import_status": "configured_registry_candidate_selected_read_only_no_writeback",
        "deepseek_round1_parse_status": "pass",
        "deepseek_round1_verdict": "supports_current_registry_preflight_contract",
        "deepseek_round2_confidence": "high",
        "deepseek_round2_parse_status": "pass",
        "deepseek_round2_verdict": "round1_supported_with_corrections",
        "eligible_candidate_count": 1,
        "feedback_intake_count": 0,
        "manual_provider_evidence_count": 0,
        "media_generation_count": 0,
        "operator_evidence_creation_count": 0,
        "operator_overlay_write_count": 0,
        "outputs_index_mutation_count": 0,
        "provider_job_execution_count": 0,
        "provider_prompt_count": 0,
        "raw_kg_writeback_count": 0,
        "repair_execution_count": 0,
        "replay_action_count": 0,
        "selected_candidate_path": "/wwwb/aitools/writer/outputs/target_source_grounded_entity_registry_build_20260607_0032/TARGET_REGISTRY_candidate_current_entity_registry.json",
        "target_chapter_count": 20,
        "target_draft_row_count": 1638,
        "target_source_fingerprint": "c5d6ab4f5d8bc0aa4a018ebe6daec3315b0d646cb189b1a4fb28fe9a6e23ba34",
        "validator_failure_count": 0
      }
    },
    {
      "gate_status": "now33_entity_link_advisory_pass_reference_only",
      "path": "outputs/now33_entity_link_binding_with_built_registry_20260607_0049/NOW_33_entity_link_gate.json",
      "sha256": "ea3de8c6028db7bb539ee274cdbd0274f2008238c775358763f09f80e3d8489b",
      "size_bytes": 3595,
      "status": "advisory_entity_link_binding_closed_reference_registry_no_writeback",
      "summary": {
        "accepted_overlay_write_count": 0,
        "adapter_payload_count": 0,
        "candidate_entity_ref_count": 1476,
        "canonical_entity_uid_bound_count": 0,
        "canonical_kg_writeback_count": 0,
        "current_canonical_registry_status": "configured_current_registry_reference_only",
        "deepseek_round1_parse_status": "pass",
        "deepseek_round1_verdict": "supports_now33_read_only_entity_link_binding_contract",
        "deepseek_round2_confidence": "high",
        "deepseek_round2_parse_status": "pass",
        "deepseek_round2_verdict": "round1_supported_with_corrections",
        "draft_row_count": 1638,
        "feedback_intake_count": 0,
        "manifest_row_count": 1638,
        "manual_provider_evidence_count": 0,
        "media_generation_count": 0,
        "operator_evidence_creation_count": 0,
        "operator_overlay_write_count": 0,
        "outputs_index_mutation_count": 0,
        "prior_now32_35_sidecar_row_count": 1638,
        "provider_job_execution_count": 0,
        "provider_prompt_count": 0,
        "raw_kg_writeback_count": 0,
        "repair_execution_count": 0,
        "replay_action_count": 0,
        "rows_missing_current_canonical_registry": 0,
        "rows_with_candidate_refs": 1056,
        "validator_failure_count": 0
      }
    },
    {
      "gate_status": null,
      "path": "outputs/now33_entity_link_binding_with_built_registry_20260607_0049/NOW_33_registry_discovery_report.json",
      "sha256": "b6e53c1d608035da9af700339dcd8e61e328c35724d25b3e5b9224aa41c05be4",
      "size_bytes": 17296,
      "status": "configured_current_registry_reference_only",
      "summary": null
    }
  ],
  "version": "now33_reference_candidate_consumption_guard_contract_consultation_input.v1"
}