{
  "version": "p13_shot_context_fresh_execution.v1",
  "created_at": "2026-06-01T02:00:20.697574Z",
  "phase": "P13_shot_context_fresh_execution_contract",
  "project_root": ".",
  "output_run_dir": "outputs/p13_shot_context_fresh_execution_20260601_100019",
  "source_artifacts": {
    "p13_contract": {
      "path": "docs/p13_shot_context_fresh_execution_contract_20260601.md",
      "sha256": "5fd9d8e4ddbb67b4993be0b7424d4a698b6a0f9138b9a0f9f9640eda84867144",
      "size_bytes": 8340,
      "exists": true
    },
    "p12_closeout_retrospective": {
      "path": "docs/p12_closeout_retrospective_20260601.md",
      "sha256": "eed47ffa729aea94bc51dce076857054cde6952a808fed40954e9e816ed2d6a8",
      "size_bytes": 10467,
      "exists": true
    },
    "p12_gate": {
      "artifact": "P12_shot_context_reentry_gate.json",
      "path": "outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_reentry_gate.json",
      "exists": true,
      "size_bytes": 10586,
      "sha256": "5d9e2f50385c1db74f5bec848372c4405435cbf5b4387e81ca232d2b944a49f6"
    },
    "p12_validator": {
      "artifact": "P12_shot_context_reentry_validator_report.json",
      "path": "outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_reentry_validator_report.json",
      "exists": true,
      "size_bytes": 5939,
      "sha256": "d6e7297a88412666507514faf143dc3d33ee63cd717866cb3b25d114ce16cc74"
    },
    "p12_execution_input": {
      "artifact": "P12_shot_context_reentry_input.json",
      "path": "outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_reentry_input.json",
      "exists": true,
      "size_bytes": 36693,
      "sha256": "de4eeb8d5788b6eacb1c6d711bccdcad64a0329c2ee7d5942144d40e9a10e41f"
    },
    "p12_readiness_matrix": {
      "path": "outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_readiness_matrix.jsonl",
      "exists": true,
      "sha256": "0ec3bd342aee3c787b5ebc6b90c9fda7fca0201cbf535635d4c3c44da33a9841",
      "size_bytes": 39922022
    },
    "p12_queue": {
      "path": "outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_dependency_queue.jsonl",
      "exists": true,
      "sha256": "769d7e0b0895a8e2867ae5546d3b820e1bb9c9c3e850b3a7fa226cf1e31c9ecd",
      "size_bytes": 4805
    },
    "p12_manifest": {
      "artifact": "manifest.json",
      "path": "outputs/p12_shot_context_reentry_planning_20260601_061609/manifest.json",
      "exists": true,
      "size_bytes": 5208,
      "sha256": "b797348ad877f6d820b1e21bcee58e2a49205e14ca80c867d24af6e504939e7f"
    },
    "p12_program_validation": {
      "artifact": "P12_shot_context_program_validation.json",
      "path": "outputs/p12_shot_context_deepseek_audit_20260601_061625/P12_shot_context_program_validation.json",
      "exists": true,
      "size_bytes": 5626,
      "sha256": "4c715b1c4987f8b8659e94599ebccc1216128ee81226647b53914c2db3b96fe2"
    },
    "p12_deepseek_gate": {
      "artifact": "P12_shot_context_deepseek_audit_gate.json",
      "path": "outputs/p12_shot_context_deepseek_audit_20260601_061625/P12_shot_context_deepseek_audit_gate.json",
      "exists": true,
      "size_bytes": 4710,
      "sha256": "23ceca5ba7ba224b1128f42284692eebc7f5fd1cb188b2595f719fee30acbb38"
    },
    "p12_deepseek_raw": {
      "artifact": "P12_shot_context_deepseek_audit_raw.json",
      "path": "outputs/p12_shot_context_deepseek_audit_20260601_061625/P12_shot_context_deepseek_audit_raw.json",
      "exists": true,
      "size_bytes": 236922,
      "sha256": "e182f5fe522dfd007edc3e3d62142aa3184dd95815603936a8959de04856bc17"
    },
    "execution_state": {
      "artifact": "execution_state.json",
      "path": "execution_state.json",
      "exists": true,
      "size_bytes": 63006,
      "sha256": "56281cba12e0b6ac5d9a049f8425cb96aada9d02816e503c78f282cbfa04d2fa"
    }
  },
  "contract_checks": {
    "p13_contract_present": true,
    "p13_contract_shot_context_only": true,
    "p13_contract_p12_explicit_authority": true,
    "p13_contract_required_outputs": true,
    "p13_contract_validator_matrix_bound": true,
    "p13_contract_prompt_provider_blocked": true,
    "p13_contract_no_kg_overlay_replay": true,
    "p13_contract_old_b7_reference_only": true,
    "p13_contract_runtime_hardcoding_ban": true
  },
  "p13_contract_excerpt": "# P13 Shot Context Fresh Execution Contract\n\n更新时间：`2026-06-01T06:20:00+08:00`\n\n本文冻结 P计划 `P13_shot_context_fresh_execution_contract` 的执行细则。P13 基于 P12 shot context readiness matrix，执行 provider-neutral shot context fresh execution only，不执行 prompt packet、adapter render、provider job、media generation、feedback/replay、KG/overlay/replay，也不改写 `outputs/index.json` / `outputs/index-lite.json`。\n\n## Contract ID\n\n`P13_shot_context_fresh_execution_contract`\n\n## Objective\n\nP13 的目标是在 P12 closeout 之后，生成 provider-neutral shot context rows：\n\n- consume P12 execution run, P12 program validation/advisory gate, and P12 closeout retrospective by explicit path。\n- consume P12 shot context readiness matrix and dependency queue as the only active shot context reentry authorities。\n- consume P11/P10/P9/P8/P6/P5E refs only through explicit P12/P11 refs, not generated indexes or old B7。\n- produce shot context rows that are traceable to P11 shot ids, shot numbers, P10 readiness row ids, P9 screenplay unit ids, P8 adaptation unit ids, P5E source scene ids, P6 chronology refs, source refs, transition refs, continuity refs, and merge/drop provenance。\n- provide context payload slots for entity/location/chronology/continuity/transition/asset binding, while keeping provider prompt text and provider adapter payloads out of P13。\n- identify the first later prompt packet reentry planning contract candidate, but keep prompt execution blocked in P13。\n- keep adapter render, provider/media, feedback/replay, KG/overlay/replay blocked。\n- keep old B7 downstream outputs as paused reference / diagnostic comparison only。\n- require P13 program validation, DeepSeek v4 pro thinking/max advisory, closeout retrospective, and control-plane sync before any prompt packet planning or execution stage opens。\n\nP13 shot context output is provider-neutral control data. It must not generate provider prompt syntax, adapter payloads, media jobs, real provider evidence, KG/overlay/replay writes, or accepted operator decisions.\n\n## Required Inputs\n\n- `docs/p13_shot_context_fresh_execution_contract_20260601.md`\n- `docs/p12_closeout_retrospective_20260601.md`\n- `outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_reentry_gate.json`\n- `outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_reentry_validator_report.json`\n- `outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_reentry_input.json`\n- `outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_readiness_matrix.jsonl`\n- `outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_dependency_queue.jsonl`\n- `outputs/p12_shot_context_reentry_planning_20260601_061609/manifest.json`\n- `outputs/p12_shot_context_deepseek_audit_20260601_061625/P12_shot_context_program_validation.json`\n- `outputs/p12_shot_context_deepseek_audit_20260601_061625/P12_shot_context_deepseek_audit_gate.json`\n- `outputs/p12_shot_context_deepseek_audit_20260601_061625/P12_shot_context_deepseek_audit_raw.json`\n- `execution_state.json`\n\nP13 must not discover P12 through generated indexes. Use explicit paths unless a later deterministic index-refresh stage is opened.\n\n## Execution Boundary\n\nP13 may execute provider-neutral shot context rows only:\n\n- allowed: reading P12 readiness rows and dependency queue by explicit path, verifying shot-level traceability, deriving shot context rows, generating sequence/dependency queue, validators, gate/report/html, and manifest。\n- allowed: deterministic context payload slots and refs for entity/location/chronology/continuity/transition/asset binding, if they remain provider-neutral and traceable。\n- not allowed: prompt packet generation, adapter render, provider/media, feedback intake, KG writeback, raw KG writeback, accepted/operator overlay writeback, replay, output deletion, output cold archive, generated index mutation。\n- DeepSeek advisory is required after P13 execution, but remains advisory-only and cannot become accepted operator evidence, accepted overlay, KG fact, replay action, provider evidence, or runtime routing logic。\n- Runtime branching by entity name, work title, block title, or sample text is prohibited. Entity names, work titles, block titles, and source excerpts may appear only as evidence/display text.\n\n## Required Outputs\n\nP13 must write a fresh output run dir such as:\n\n`outputs/p13_shot_context_fresh_execution_<timestamp>`\n\nRequired files:\n\n- `P13_shot_context_execution_input.json`\n- `P13_shot_context_rows.jsonl`\n- `P13_shot_context_sequence_index.jsonl`\n- `P13_shot_context_dependency_queue.jsonl`\n- `P13_shot_context_validator_report.json`\n- `P13_shot_context_gate.json`\n- `P13_shot_context_report.md`\n- `P13_shot_context.html`\n- `manifest.json`\n\n## P13 Validator Matrix\n\n| Validator | Required check | Blocks pass when |\n| --- | --- | --- |\n| `p12_authority` | P13 consumes explicit P12 execution/advisory/retrospective paths and verifies pass gates | P12 gate/advisory missing, not pass, or P12 retrospective missing |\n| `shot_context_traceability` | every shot context row maps to a P12 readiness row, P11 shot id/shot number, and source P10/P9 refs | orphan context row, missing shot id, missing upstream refs |\n| `shot_context_schema` | shot context rows expose entity/location/chronology/continuity/transition/asset slots without prompt/provider payloads | required context slot missing or prompt/provider payload generated |\n| `source_provenance_guard` | source scene ids, adaptation ids, chronology refs, transition refs, continuity refs, and merge/drop provenance remain visible | source/adaptation/chronology/transition/continuity/merge/drop refs disappear |\n| `shot_context_scope_guard` | P13 generates provider-neutral shot context artifacts only | prompt packet, adapter payload, provider job, or media fields generated in P13 |\n| `dependency_queue_ordering` | queue opens only the next prompt packet reentry planning contract candidate after P13 advisory/retrospective | prompt packet execution marked allowed before P13 closeout |\n| `downstream_leakage_guard` | prompt/provider/media counters remain zero | any prompt/provider/media artifact is generated in P13 |\n| `kg_overlay_replay_guard` | KG/overlay/replay counters remain zero | canonical/raw KG, accepted/operator overlay, or replay writeback appears |\n| `old_b7_exclusion` | old B7 remains reference-only | old B7 output is used as active authority |\n| `active_route_guard` | `execution_state.json.next_entrypoint.id` remains `platform_neutral_prompt_readiness_manual_execution_log_contract` | active route changes |\n\n## DeepSeek Advisory Requirements\n\nP13 closeout requires DeepSeek v4 pro thinking/max advisory over:\n\n- P13 contract。\n- P12 closeout retrospective。\n- P13 shot context outputs。\n- P13 validator report and gate。\n- active route boundary from `execution_state.json`。\n\nExpected pass verdict:\n\n`supports_p13_shot_context_fresh_execution`\n\nPass requires:\n\n- DeepSeek call status=`success`。\n- parse status=`pass`。\n- finding/blocker/high=0/0/0。\n- advisory confirms P13 uses P12 fresh artifacts as active authorities。\n- advisory confirms shot context rows are traceable and provider-neutral。\n- advisory confirms prompt/provider/media remain blocked in P13。\n- advisory confirms KG/overlay/replay/index mutation remain blocked。\n- advisory confirms old B7 remains reference-only。\n\nMissing/skipped/unavailable/unparseable advisory blocks P13 closeout or records `blocked_unavailable`; it never counts as pass.\n\n## Non-Goals\n\n- P13 does not generate prompt packet。\n- P13 does not generate adapter render、provider/media。\n- P13 does not write KG/overlay/replay。\n- P13 does not repair generated indexes。\n- P13 does not continue old B7 downstream。\n- P13 does not silently perform unlogged LLM enrichment。\n\n## Acceptance Criteria\n\n- P13 focused tests pass。\n- P13 fresh execution gate pass。\n- P13 program validation pass。\n- DeepSeek v4 pro thinking/max advisory pass with verdict=`supports_p13_shot_context_fresh_execution`。\n- P13 closeout retrospective is written before any P14/prompt packet reentry stage opens。\n- Control plane is synchronized while `execution_state.json.next_entrypoint` remains unchanged。\n",
  "p12_retrospective_excerpt": "# P12 Closeout Retrospective\n\n更新时间：`2026-06-01T06:20:00+08:00`\n\n本文是 P计划阶段间复盘门禁下的 `P12_shot_context_reentry_planning_contract` closeout retrospective。它在 P12 shot context reentry planning、程序验证和 DeepSeek advisory 通过后，任何 P13 shot context fresh execution 推进前复盘实际落地、证据基础、风险和下一阶段校准。\n\n## Retrospective Summary\n\nP12 已完成 shot context reentry planning：基于 P11 provider-neutral shooting_script outputs，生成 P12 execution input、shot context readiness matrix、dependency queue、validator report、gate、report/html 和 manifest。\n\nP12 只执行 shot context reentry planning。P12 没有执行 shot context rows、prompt packet、adapter render、provider/media、feedback/replay、KG/overlay/replay，没有删除/冷归档 outputs run，也没有改写 `outputs/index.json` / `outputs/index-lite.json`。DeepSeek v4 pro thinking/max advisory 支持 P12 closeout，finding/blocker/high=0/0/0。\n\n## Actual Landed\n\n- P12 contract：`docs/p12_shot_context_reentry_planning_contract_20260531.md`\n- P12 implementation：\n  - `src/novel2video/p12_shot_context_reentry_planning.py`\n  - `scripts/run_p12_shot_context_reentry_planning.py`\n  - `scripts/run_p12_shot_context_deepseek_audit.py`\n  - `tests/test_p12_shot_context_reentry_planning.py`\n- Core backup before P12 `src/` / `scripts` edits：`backups/20260601_060755_p12_shot_context_reentry_planning`\n- P12 focused tests：6 passed。\n- P12 fresh planning run：`outputs/p12_shot_context_reentry_planning_20260601_061609`\n  - gate=`pass`\n  - gate_status=`p12_shot_context_reentry_planning_pass`\n  - P11 shooting_script rows / sequence rows=5002 / 5002\n  - shot context readiness rows=5002\n  - shot ids / shot numbers traced=5002 / 5002\n  - P10 readiness row refs / P9 screenplay unit refs=5002 / 5002\n  - adaptation refs / source scene refs / chronology refs preserved=6989 / 6989 / 6989\n  - transition refs / continuity refs / merge-drop refs=5002 / 5002 / 5002\n  - drop-from-script refs preserved=1518 / 1518\n  - dependency queue items=7\n  - future executable after P12 closeout candidates=1\n  - validator failures=0\n- P12 advisory run：`outputs/p12_shot_context_deepseek_audit_20260601_061625`\n  - program validation status=`pass`\n  - program validation failure_count=0\n  - gate=`pass`\n  - gate_status=`deepseek_advisory_supports_p12_shot_context_reentry_planning`\n  - verdict=`supports_p12_shot_context_reentry_planning`\n  - finding/blocker/high=0/0/0\n  - false_required_confirmation_count=0\n  - recommended next=`P12_closeout_retrospective_then_P13_shot_context_fresh_execution_contract`\n  - DeepSeek raw meta model=`deepseek-v4-pro`\n  - prompt_tokens=63394\n  - completion_tokens=1800\n  - reasoning_tokens=1509\n  - reasoning_content_present=true\n\n## Program Validation Summary\n\n- P12 required output files exist and parse。\n- P12 gate status=`pass`。\n- P12 validator status=`pass`。\n- P11 execution/advisory/retrospective paths were consumed explicitly。\n- P11 gate and P11 program validation pass。\n- P11 DeepSeek verdict=`supports_p11_shooting_script_fresh_execution`。\n- P12 readiness rows=5002。\n- P11 shot ids and shot numbers are fully traced: 5002 / 5002。\n- P10 readiness row refs and P9 screenplay unit refs are fully traced: 5002 / 5002。\n- source/adaptation/chronology refs are fully preserved: 6989 / 6989 / 6989。\n- transition/continuity/merge-drop refs are present: 5002 / 5002 / 5002。\n- drop/merge provenance remains visible: 1518 dropped refs retained。\n- `execution_state.json.next_entrypoint.id` remains `platform_neutral_prompt_readiness_manual_execution_log_contract`。\n- shot context execution、prompt packet、adapter render、provider/media、feedback、KG/overlay/replay、output deletion/archive/index mutation counters all 0。\n\n## Not Landed\n\n- shot context rows 未执行。\n- prompt packet、adapter render、provider/media 未执行。\n- feedback intake / repair / replay 未执行。\n- KG/accepted overlay/operator overlay/raw KG/canonical KG/replay 未写入。\n- outputs run deletion/cold archive 未执行。\n- `outputs/index.json` / `outputs/index-lite.json` 未改写。\n- 旧 B7 paused reference 未恢复为 active mainline。\n\n## Evidence Basis\n\n- `docs/p12_shot_context_reentry_planning_contract_20260531.md`\n- `docs/p11_closeout_retrospective_20260531.md`\n- `outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_reentry_input.json`\n- `outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_readiness_matrix.jsonl`\n- `outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_dependency_queue.jsonl`\n- `outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_reentry_validator_report.json`\n- `outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_reentry_gate.json`\n- `outputs/p12_shot_context_reentry_planning_20260601_061609/P12_shot_context_reentry_report.md`\n- `outputs/p12_shot_context_deepseek_audit_20260601_061625/P12_shot_context_program_validation.json`\n- `outputs/p12_shot_context_deepseek_audit_20260601_061625/P12_shot_context_deepseek_audit_input.json`\n- `outputs/p12_shot_context_deepseek_audit_20260601_061625/P12_shot_context_deepseek_audit_raw.json`\n- `outputs/p12_shot_context_deepseek_audit_20260601_061625/P12_shot_context_deepseek_audit.json`\n- `outputs/p12_shot_context_deepseek_audit_20260601_061625/P12_shot_context_deepseek_audit_gate.json`\n- `execution_state.json`\n\n## DeepSeek Advisory Summary\n\n- call_status=`success`\n- parse_status=`pass`\n- model=`deepseek-v4-pro`\n- thinking/reasoning content present\n- verdict=`supports_p12_shot_context_reentry_planning`\n- recommended_next_candidate=`P12_closeout_retrospective_then_P13_shot_context_fresh_execution_contract`\n- finding/blocker/high=0/0/0\n- false_required_confirmation_count=0\n\nDeepSeek confirmed all required checks:\n\n- P12 contract artifact-backed。\n- program validation passed。\n- P11 authority passed。\n- P11 fresh artifacts used。\n- readiness rows traceable。\n- readiness rows provider-neutral。\n- source provenance preserved。\n- shot context execution not performed。\n- prompt/provider/media not performed。\n- KG/overlay/replay blocked。\n- outputs index unchanged。\n- old B7 reference-only。\n- next_entrypoint unchanged。\n- runtime branching by names absent。\n- P13 requires a separate contract。\n\n## Conclusive Output Review\n\nP12 is a conclusive provider-neutral shot context reentry planning output. It satisfies P计划 parallel review requirement:\n\n- P12 contract is present。\n- P12 deterministic planning gate pass。\n- P12 program validation pass。\n- Focused tests pass。\n- DeepSeek v4 pro thinking/max advisory available and parsed。\n- DeepSeek verdict supports P12。\n- finding/blocker/high=0/0/0。\n- shot context execution/prompt/provider/media/KG/overlay/replay/downstream execution/output deletion/output archive/index mutation counters all 0。\n\n## Fragility Or Debt\n\n- P12 readiness rows are planning artifacts, not executable shot context rows. They identify prerequisites and future payload slots, but do not yet resolve entity/location/asset context payloads.\n- P13 is the first stage that may generate actual shot context rows. It must keep prompt/provider/media blocked because shot context rows are still upstream control data, not provider prompt packets.\n- `outputs/index.json` / `outputs/index-lite.json` remain intentionally unchanged after P2E. P13 must use explicit P12 paths unless a separate deterministic index-refresh stage is opened.\n- Old B7 downstream outputs remain useful diagnostic references but cannot be used as current shot context authority.\n\n## Next Stage Recalibration\n\nP12 closeout supports opening P13 as a separate contract:\n\n`P13_shot_context_fresh_execution_contract`\n\nP13 should execute shot context rows from P12 readiness matrix only. P13 must:\n\n- consume P12 execution/advisory/retrospective paths by explicit path。\n- use P12 readiness rows as the only active shot context reentry authority。\n- produce provider-neutral shot context rows traceable to P11 shot ids, P10/P9/P8/P5E/P6 refs, transition refs, continuity refs, and merge/drop provenance。\n- keep prompt packet generation, adapter render, provider/media, feedback/replay, KG/overlay/replay, output deletion/archive, generated inde",
  "p12_gate_status": {
    "status": "pass",
    "gate_status": "p12_shot_context_reentry_planning_pass"
  },
  "p12_gate_summary": {
    "p11_shooting_script_row_count": 5002,
    "p11_sequence_row_count": 5002,
    "p11_dependency_queue_item_count": 7,
    "shot_context_readiness_row_count": 5002,
    "shot_id_trace_count": 5002,
    "shot_number_trace_count": 5002,
    "p10_readiness_row_ref_count": 5002,
    "p9_screenplay_unit_ref_count": 5002,
    "adaptation_unit_refs_in_readiness_count": 6989,
    "source_scene_refs_in_readiness_count": 6989,
    "chronology_refs_in_readiness_count": 6989,
    "transition_refs_in_readiness_count": 5002,
    "continuity_refs_in_readiness_count": 5002,
    "merge_drop_refs_in_readiness_count": 5002,
    "drop_from_script_scene_refs_preserved": 1518,
    "p11_drop_from_script_scene_count": 1518,
    "dependency_queue_item_count": 7,
    "future_executable_after_p12_closeout_count": 1,
    "validator_failure_count": 0,
    "active_route_next_entrypoint_id": "platform_neutral_prompt_readiness_manual_execution_log_contract",
    "p11_deepseek_overall_verdict": "supports_p11_shooting_script_fresh_execution",
    "old_b7_reference_only": true,
    "old_b7_active_source_ref_count": 0,
    "shot_context_reentry_planning_count": 1,
    "shot_context_execution_count": 0,
    "prompt_packet_generation_count": 0,
    "adapter_render_count": 0,
    "provider_job_execution_count": 0,
    "media_generation_count": 0,
    "feedback_intake_count": 0,
    "accepted_overlay_write_count": 0,
    "operator_overlay_write_count": 0,
    "canonical_kg_writeback_count": 0,
    "raw_kg_writeback_count": 0,
    "replay_action_count": 0,
    "outputs_index_mutation_count": 0,
    "outputs_run_deletion_count": 0,
    "outputs_run_cold_archive_count": 0,
    "runtime_branching_by_entity_name_rule_count": 0,
    "runtime_branching_by_work_title_rule_count": 0,
    "runtime_branching_by_block_title_rule_count": 0,
    "runtime_branching_by_sample_text_rule_count": 0
  },
  "p12_validator_summary": {
    "p11_shooting_script_row_count": 5002,
    "p11_sequence_row_count": 5002,
    "p11_dependency_queue_item_count": 7,
    "shot_context_readiness_row_count": 5002,
    "shot_id_trace_count": 5002,
    "shot_number_trace_count": 5002,
    "p10_readiness_row_ref_count": 5002,
    "p9_screenplay_unit_ref_count": 5002,
    "adaptation_unit_refs_in_readiness_count": 6989,
    "source_scene_refs_in_readiness_count": 6989,
    "chronology_refs_in_readiness_count": 6989,
    "transition_refs_in_readiness_count": 5002,
    "continuity_refs_in_readiness_count": 5002,
    "merge_drop_refs_in_readiness_count": 5002,
    "drop_from_script_scene_refs_preserved": 1518,
    "p11_drop_from_script_scene_count": 1518,
    "dependency_queue_item_count": 7,
    "future_executable_after_p12_closeout_count": 1,
    "validator_failure_count": 0,
    "active_route_next_entrypoint_id": "platform_neutral_prompt_readiness_manual_execution_log_contract",
    "p11_deepseek_overall_verdict": "supports_p11_shooting_script_fresh_execution",
    "old_b7_reference_only": true,
    "old_b7_active_source_ref_count": 0,
    "shot_context_reentry_planning_count": 1,
    "shot_context_execution_count": 0,
    "prompt_packet_generation_count": 0,
    "adapter_render_count": 0,
    "provider_job_execution_count": 0,
    "media_generation_count": 0,
    "feedback_intake_count": 0,
    "accepted_overlay_write_count": 0,
    "operator_overlay_write_count": 0,
    "canonical_kg_writeback_count": 0,
    "raw_kg_writeback_count": 0,
    "replay_action_count": 0,
    "outputs_index_mutation_count": 0,
    "outputs_run_deletion_count": 0,
    "outputs_run_cold_archive_count": 0,
    "runtime_branching_by_entity_name_rule_count": 0,
    "runtime_branching_by_work_title_rule_count": 0,
    "runtime_branching_by_block_title_rule_count": 0,
    "runtime_branching_by_sample_text_rule_count": 0
  },
  "p12_manifest_summary": {
    "stage": "P12_shot_context_reentry_planning_contract",
    "fresh_run_policy": {
      "new_output_run_dir": "outputs/p12_shot_context_reentry_planning_20260601_061609",
      "no_overwrite": true
    }
  },
  "p12_program_validation": {
    "status": "pass",
    "failure_count": 0,
    "summary": {
      "p11_shooting_script_row_count": 5002,
      "p11_sequence_row_count": 5002,
      "p11_dependency_queue_item_count": 7,
      "shot_context_readiness_row_count": 5002,
      "shot_id_trace_count": 5002,
      "shot_number_trace_count": 5002,
      "p10_readiness_row_ref_count": 5002,
      "p9_screenplay_unit_ref_count": 5002,
      "adaptation_unit_refs_in_readiness_count": 6989,
      "source_scene_refs_in_readiness_count": 6989,
      "chronology_refs_in_readiness_count": 6989,
      "transition_refs_in_readiness_count": 5002,
      "continuity_refs_in_readiness_count": 5002,
      "merge_drop_refs_in_readiness_count": 5002,
      "drop_from_script_scene_refs_preserved": 1518,
      "p11_drop_from_script_scene_count": 1518,
      "dependency_queue_item_count": 7,
      "future_executable_after_p12_closeout_count": 1,
      "validator_failure_count": 0,
      "active_route_next_entrypoint_id": "platform_neutral_prompt_readiness_manual_execution_log_contract",
      "p11_deepseek_overall_verdict": "supports_p11_shooting_script_fresh_execution",
      "old_b7_reference_only": true,
      "old_b7_active_source_ref_count": 0,
      "shot_context_reentry_planning_count": 1,
      "shot_context_execution_count": 0,
      "prompt_packet_generation_count": 0,
      "adapter_render_count": 0,
      "provider_job_execution_count": 0,
      "media_generation_count": 0,
      "feedback_intake_count": 0,
      "accepted_overlay_write_count": 0,
      "operator_overlay_write_count": 0,
      "canonical_kg_writeback_count": 0,
      "raw_kg_writeback_count": 0,
      "replay_action_count": 0,
      "outputs_index_mutation_count": 0,
      "outputs_run_deletion_count": 0,
      "outputs_run_cold_archive_count": 0,
      "runtime_branching_by_entity_name_rule_count": 0,
      "runtime_branching_by_work_title_rule_count": 0,
      "runtime_branching_by_block_title_rule_count": 0,
      "runtime_branching_by_sample_text_rule_count": 0
    }
  },
  "p12_deepseek_gate": {
    "status": "pass",
    "gate_status": "deepseek_advisory_supports_p12_shot_context_reentry_planning",
    "summary": {
      "program_validation_status": "pass",
      "program_validation_failure_count": 0,
      "deepseek_call_status": "success",
      "deepseek_parse_status": "pass",
      "deepseek_overall_verdict": "supports_p12_shot_context_reentry_planning",
      "recommended_next_candidate": "P12_closeout_retrospective_then_P13_shot_context_fresh_execution_contract",
      "pipeline_finding_count": 0,
      "pipeline_blocker_count": 0,
      "pipeline_high_count": 0,
      "false_required_confirmation_count": 0,
      "p11_shooting_script_row_count": 5002,
      "p11_sequence_row_count": 5002,
      "p11_dependency_queue_item_count": 7,
      "shot_context_readiness_row_count": 5002,
      "shot_id_trace_count": 5002,
      "shot_number_trace_count": 5002,
      "p10_readiness_row_ref_count": 5002,
      "p9_screenplay_unit_ref_count": 5002,
      "adaptation_unit_refs_in_readiness_count": 6989,
      "source_scene_refs_in_readiness_count": 6989,
      "chronology_refs_in_readiness_count": 6989,
      "transition_refs_in_readiness_count": 5002,
      "continuity_refs_in_readiness_count": 5002,
      "merge_drop_refs_in_readiness_count": 5002,
      "drop_from_script_scene_refs_preserved": 1518,
      "p11_drop_from_script_scene_count": 1518,
      "dependency_queue_item_count": 7,
      "future_executable_after_p12_closeout_count": 1,
      "validator_failure_count": 0,
      "active_route_next_entrypoint_id": "platform_neutral_prompt_readiness_manual_execution_log_contract",
      "p11_deepseek_overall_verdict": "supports_p11_shooting_script_fresh_execution",
      "old_b7_reference_only": true,
      "old_b7_active_source_ref_count": 0,
      "shot_context_reentry_planning_count": 1,
      "shot_context_execution_count": 0,
      "prompt_packet_generation_count": 0,
      "adapter_render_count": 0,
      "provider_job_execution_count": 0,
      "media_generation_count": 0,
      "feedback_intake_count": 0,
      "accepted_overlay_write_count": 0,
      "operator_overlay_write_count": 0,
      "canonical_kg_writeback_count": 0,
      "raw_kg_writeback_count": 0,
      "replay_action_count": 0,
      "outputs_index_mutation_count": 0,
      "outputs_run_deletion_count": 0,
      "outputs_run_cold_archive_count": 0,
      "runtime_branching_by_entity_name_rule_count": 0,
      "runtime_branching_by_work_title_rule_count": 0,
      "runtime_branching_by_block_title_rule_count": 0,
      "runtime_branching_by_sample_text_rule_count": 0
    }
  },
  "p12_deepseek_raw_meta": {
    "id": "5c70bc7c-1bfd-45a4-b59a-1524ac64bd9f",
    "object": "chat.completion",
    "model": "deepseek-v4-pro",
    "usage": {
      "prompt_tokens": 63394,
      "completion_tokens": 1800,
      "total_tokens": 65194,
      "prompt_tokens_details": {
        "cached_tokens": 0
      },
      "completion_tokens_details": {
        "reasoning_tokens": 1509
      },
      "prompt_cache_hit_tokens": 0,
      "prompt_cache_miss_tokens": 63394
    },
    "finish_reason": "stop",
    "content_chars": 966,
    "reasoning_content_present": true,
    "reasoning_content_chars": 6147
  },
  "p12_readiness_surface": {
    "readiness_row_count": 5002,
    "ready_row_count": 5002,
    "dependency_queue_item_count": 7,
    "future_executable_after_p12_closeout_count": 1,
    "first_future_execution_contract_candidate": "P13_shot_context_fresh_execution_contract"
  },
  "active_route": {
    "current_stage": "Now-32",
    "current_substage": "Prompt-Readiness-Manual-Execution-Log-Contract",
    "next_entrypoint_id": "platform_neutral_prompt_readiness_manual_execution_log_contract"
  },
  "old_b7_policy": {
    "reference_only": true,
    "active_authority": false,
    "old_b7_active_source_ref_count": 0
  },
  "validator_matrix": [
    {
      "validator_id": "p12_authority",
      "purpose": "P13 consumes explicit P12 execution/advisory/retrospective paths and verifies pass gates",
      "blocks_p13_pass": true
    },
    {
      "validator_id": "shot_context_traceability",
      "purpose": "Every shot context row maps to a P12 readiness row, P11 shot id/number, P10 row, and P9 unit",
      "blocks_p13_pass": true
    },
    {
      "validator_id": "shot_context_schema",
      "purpose": "Shot context rows expose provider-neutral context slots without prompt/provider payloads",
      "blocks_p13_pass": true
    },
    {
      "validator_id": "source_provenance_guard",
      "purpose": "Source scene ids, adaptation ids, chronology refs, transition refs, continuity refs, and merge/drop provenance remain visible",
      "blocks_p13_pass": true
    },
    {
      "validator_id": "shot_context_scope_guard",
      "purpose": "P13 generates provider-neutral shot context artifacts only",
      "blocks_p13_pass": true
    },
    {
      "validator_id": "dependency_queue_ordering",
      "purpose": "Queue opens only the next prompt packet reentry planning contract candidate after P13 advisory/retrospective",
      "blocks_p13_pass": true
    },
    {
      "validator_id": "downstream_leakage_guard",
      "purpose": "Prompt/provider/media counters remain zero",
      "blocks_p13_pass": true
    },
    {
      "validator_id": "kg_overlay_replay_guard",
      "purpose": "KG/overlay/replay counters remain zero",
      "blocks_p13_pass": true
    },
    {
      "validator_id": "old_b7_exclusion",
      "purpose": "Old B7 remains reference-only and is not active authority",
      "blocks_p13_pass": true
    },
    {
      "validator_id": "active_route_guard",
      "purpose": "execution_state.next_entrypoint remains Now-32",
      "blocks_p13_pass": true
    }
  ],
  "policy": {
    "stage": "P13_shot_context_fresh_execution_contract",
    "fresh_run_required": true,
    "shot_context_execution_allowed_in_p13": true,
    "provider_neutral_only": true,
    "deepseek_v4_pro_thinking_audit_required": true,
    "advisory_only": true,
    "prompt_packet_generation_allowed": false,
    "adapter_render_allowed": false,
    "provider_job_execution_allowed": false,
    "media_generation_allowed": false,
    "feedback_intake_allowed": false,
    "accepted_overlay_writeback_allowed": false,
    "operator_overlay_writeback_allowed": false,
    "canonical_kg_writeback_allowed": false,
    "raw_kg_writeback_allowed": false,
    "replay_execution_allowed": false,
    "outputs_index_mutation_allowed": false,
    "outputs_run_deletion_allowed": false,
    "outputs_run_cold_archive_allowed": false,
    "old_b7_reference_only": true,
    "execution_state_next_entrypoint_unchanged": true,
    "runtime_branching_by_entity_name_allowed": false,
    "runtime_branching_by_work_title_allowed": false,
    "runtime_branching_by_block_title_allowed": false,
    "runtime_branching_by_sample_text_allowed": false
  },
  "input_fingerprint": "c6a9ab8e4adeb675920db3bdd01a59f94c6f7373a18a65ad300f2af983ef1496"
}