{
  "version": "p14_prompt_packet_reentry_planning.v1",
  "created_at": "2026-06-01T06:46:28.216354Z",
  "phase": "P14_prompt_packet_reentry_planning_contract",
  "project_root": ".",
  "output_run_dir": "outputs/p14_prompt_packet_reentry_planning_20260601_143300",
  "source_artifacts": {
    "p14_contract": {
      "path": "docs/p14_prompt_packet_reentry_planning_contract_20260601.md",
      "sha256": "3133092c72474bbe493732e4874e2ffadb7be0bcc1ba1d3fd7800c640be304d5",
      "size_bytes": 8096,
      "exists": true
    },
    "p13_closeout_retrospective": {
      "path": "docs/p13_closeout_retrospective_20260601.md",
      "sha256": "f7c8716b132593cfb5d69166676fb124b8fc2d8f1e4565ce605c2962d82ae383",
      "size_bytes": 10606,
      "exists": true
    },
    "p13_gate": {
      "artifact": "P13_shot_context_gate.json",
      "path": "outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_gate.json",
      "exists": true,
      "size_bytes": 10585,
      "sha256": "d2bf9c13686e95a56be4e679457b92f3d670a34ea314b57ff99607f07878497b"
    },
    "p13_validator": {
      "artifact": "P13_shot_context_validator_report.json",
      "path": "outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_validator_report.json",
      "exists": true,
      "size_bytes": 5956,
      "sha256": "39a4b792082696c833ad22ca9280958879fa65a42e6209237f9d516e8aafb7ea"
    },
    "p13_execution_input": {
      "artifact": "P13_shot_context_execution_input.json",
      "path": "outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_execution_input.json",
      "exists": true,
      "size_bytes": 34617,
      "sha256": "c38a73fa83c0d199a3c843aebbc8b64409a93cfab413e40d45bedd605d1a92ba"
    },
    "p13_rows": {
      "path": "outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_rows.jsonl",
      "exists": true,
      "sha256": "01cbbfb9720375349853adca30d8be6e0e2bf3e8e601cb840d8977099baa783c",
      "size_bytes": 48472022
    },
    "p13_sequence": {
      "path": "outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_sequence_index.jsonl",
      "exists": true,
      "sha256": "08e3d70acee07158aced802bf9cbb30c4d83c71067a513fae985d264fd3dd431",
      "size_bytes": 4212260
    },
    "p13_queue": {
      "path": "outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_dependency_queue.jsonl",
      "exists": true,
      "sha256": "39732d325f7393e008bb0da215ca2bbddac09766aae2831e3bd37339b0d9539d",
      "size_bytes": 4674
    },
    "p13_manifest": {
      "artifact": "manifest.json",
      "path": "outputs/p13_shot_context_fresh_execution_20260601_100019/manifest.json",
      "exists": true,
      "size_bytes": 4556,
      "sha256": "764de320e42b2e2d58666cd68c22fb5ea6f683359eeb0ede96dbdb83f37da41a"
    },
    "p13_program_validation": {
      "artifact": "P13_shot_context_program_validation.json",
      "path": "outputs/p13_shot_context_deepseek_audit_20260601_100046/P13_shot_context_program_validation.json",
      "exists": true,
      "size_bytes": 5903,
      "sha256": "4f40aa39177211dce45289db47e2378a56b046c4b27fcfcef1ba6876080a6d99"
    },
    "p13_deepseek_gate": {
      "artifact": "P13_shot_context_deepseek_audit_gate.json",
      "path": "outputs/p13_shot_context_deepseek_audit_20260601_100046/P13_shot_context_deepseek_audit_gate.json",
      "exists": true,
      "size_bytes": 4690,
      "sha256": "ab1d0c874aa354ad76baa2efc3e86556dfeeccedefd278d692b71bbe6292a090"
    },
    "p13_deepseek_raw": {
      "artifact": "P13_shot_context_deepseek_audit_raw.json",
      "path": "outputs/p13_shot_context_deepseek_audit_20260601_100046/P13_shot_context_deepseek_audit_raw.json",
      "exists": true,
      "size_bytes": 301354,
      "sha256": "866f669a1dc3dc120c8302a6fda405a7ce31b3a1e683d40fb51cd0c32f9ecb28"
    },
    "execution_state": {
      "artifact": "execution_state.json",
      "path": "execution_state.json",
      "exists": true,
      "size_bytes": 64270,
      "sha256": "73f119b840d79035f2d11b7ffa010c897f3e050bee93470bcfdf80efc4bae294"
    }
  },
  "contract_checks": {
    "p14_contract_present": true,
    "p14_contract_planning_only": true,
    "p14_contract_p13_explicit_authority": true,
    "p14_contract_required_outputs": true,
    "p14_contract_validator_matrix_bound": true,
    "p14_contract_prompt_execution_blocked": true,
    "p14_contract_adapter_provider_blocked": true,
    "p14_contract_no_kg_overlay_replay": true,
    "p14_contract_old_b7_reference_only": true,
    "p14_contract_runtime_hardcoding_ban": true
  },
  "p14_contract_excerpt": "# P14 Prompt Packet Reentry Planning Contract\n\n更新时间：`2026-06-01T10:06:00+08:00`\n\n本文冻结 P计划 `P14_prompt_packet_reentry_planning_contract` 的执行细则。P14 基于 P13 provider-neutral shot context outputs，执行 prompt packet reentry planning only，不执行 prompt packet rows、adapter render、provider job、media generation、feedback/replay、KG/overlay/replay，也不改写 `outputs/index.json` / `outputs/index-lite.json`。\n\n## Contract ID\n\n`P14_prompt_packet_reentry_planning_contract`\n\n## Objective\n\nP14 的目标是在 P13 closeout 之后，规划 prompt packet fresh execution 的重入边界：\n\n- consume P13 execution run, P13 program validation/advisory gate, and P13 closeout retrospective by explicit path。\n- consume P13 shot context rows and sequence index as the only active shot context authorities。\n- consume P12/P11/P10/P9/P8/P6/P5E refs only through explicit P13/P12 refs, not generated indexes or old B7。\n- produce prompt packet readiness rows traceable to P13 shot context rows, P11 shot ids, 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- identify the first later prompt packet fresh execution contract candidate, but keep prompt packet execution blocked in P14。\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 P14 program validation, DeepSeek v4 pro thinking/max advisory, closeout retrospective, and control-plane sync before any prompt packet execution stage opens。\n\nP14 planning output is provider-neutral control-plane readiness 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/p14_prompt_packet_reentry_planning_contract_20260601.md`\n- `docs/p13_closeout_retrospective_20260601.md`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_gate.json`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_validator_report.json`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_execution_input.json`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_rows.jsonl`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_sequence_index.jsonl`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_dependency_queue.jsonl`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/manifest.json`\n- `outputs/p13_shot_context_deepseek_audit_20260601_100046/P13_shot_context_program_validation.json`\n- `outputs/p13_shot_context_deepseek_audit_20260601_100046/P13_shot_context_deepseek_audit_gate.json`\n- `outputs/p13_shot_context_deepseek_audit_20260601_100046/P13_shot_context_deepseek_audit_raw.json`\n- `execution_state.json`\n\nP14 must not discover P13 through generated indexes. Use explicit paths unless a later deterministic index-refresh stage is opened.\n\n## Execution Boundary\n\nP14 may execute prompt packet reentry planning only:\n\n- allowed: reading P13 shot context rows and sequence index by explicit path, verifying shot-level traceability, deriving prompt packet readiness rows, generating dependency queue, validators, gate/report/html, and manifest。\n- not allowed: prompt packet execution, 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 P14 planning, 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\nP14 must write a fresh output run dir such as:\n\n`outputs/p14_prompt_packet_reentry_planning_<timestamp>`\n\nRequired files:\n\n- `P14_prompt_packet_reentry_input.json`\n- `P14_prompt_packet_readiness_matrix.jsonl`\n- `P14_prompt_packet_dependency_queue.jsonl`\n- `P14_prompt_packet_reentry_validator_report.json`\n- `P14_prompt_packet_reentry_gate.json`\n- `P14_prompt_packet_reentry_report.md`\n- `P14_prompt_packet_reentry.html`\n- `manifest.json`\n\n## P14 Validator Matrix\n\n| Validator | Required check | Blocks pass when |\n| --- | --- | --- |\n| `p13_authority` | P14 consumes explicit P13 execution/advisory/retrospective paths and verifies pass gates | P13 gate/advisory missing, not pass, or P13 retrospective missing |\n| `shot_context_traceability` | every readiness row maps to a P13 shot context row, P11 shot id/number, and source P10/P9 refs | orphan readiness row, missing shot id, missing upstream refs |\n| `prompt_packet_readiness_schema` | readiness rows expose required future prompt packet prerequisites without generating prompt packet rows | missing future prompt fields or accidental prompt execution |\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| `prompt_packet_scope_guard` | P14 generates planning/readiness artifacts only | prompt packet rows, adapter payload, provider job, or media fields generated in P14 |\n| `dependency_queue_ordering` | queue opens only the next prompt packet execution contract candidate after P14 advisory/retrospective | prompt packet execution marked allowed before P14 closeout |\n| `downstream_leakage_guard` | adapter/provider/media counters remain zero | any adapter/provider/media artifact is generated in P14 |\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\nP14 closeout requires DeepSeek v4 pro thinking/max advisory over:\n\n- P14 contract。\n- P13 closeout retrospective。\n- P14 readiness outputs。\n- P14 validator report and gate。\n- active route boundary from `execution_state.json`。\n\nExpected pass verdict:\n\n`supports_p14_prompt_packet_reentry_planning`\n\nPass requires:\n\n- DeepSeek call status=`success`。\n- parse status=`pass`。\n- finding/blocker/high=0/0/0。\n- advisory confirms P14 uses P13 fresh artifacts as active authorities。\n- advisory confirms prompt packet readiness rows are traceable and provider-neutral。\n- advisory confirms prompt packet execution, adapter/provider/media remain blocked in P14。\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 P14 closeout or records `blocked_unavailable`; it never counts as pass.\n\n## Non-Goals\n\n- P14 does not execute prompt packet rows。\n- P14 does not generate adapter render、provider/media。\n- P14 does not write KG/overlay/replay。\n- P14 does not repair generated indexes。\n- P14 does not continue old B7 downstream。\n- P14 does not silently perform unlogged LLM enrichment。\n\n## Acceptance Criteria\n\n- P14 focused tests pass。\n- P14 fresh planning gate pass。\n- P14 program validation pass。\n- DeepSeek v4 pro thinking/max advisory pass with verdict=`supports_p14_prompt_packet_reentry_planning`。\n- P14 closeout retrospective is written before any P15/prompt packet execution stage opens。\n- Control plane is synchronized while `execution_state.json.next_entrypoint` remains unchanged。\n",
  "p13_retrospective_excerpt": "# P13 Closeout Retrospective\n\n更新时间：`2026-06-01T10:06:00+08:00`\n\n本文是 P计划阶段间复盘门禁下的 `P13_shot_context_fresh_execution_contract` closeout retrospective。它在 P13 provider-neutral shot context fresh execution、程序验证和 DeepSeek advisory 通过后，任何 P14 prompt packet reentry planning 推进前复盘实际落地、证据基础、风险和下一阶段校准。\n\n## Retrospective Summary\n\nP13 已完成 provider-neutral shot context fresh execution：基于 P12 shot context readiness matrix，生成 P13 execution input、shot context rows、sequence index、dependency queue、validator report、gate、report/html 和 manifest。\n\nP13 只执行 provider-neutral shot context rows。P13 没有执行 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 支持 P13 closeout，finding/blocker/high=0/0/0。\n\n## Actual Landed\n\n- P13 contract：`docs/p13_shot_context_fresh_execution_contract_20260601.md`\n- P13 implementation：\n  - `src/novel2video/p13_shot_context_fresh_execution.py`\n  - `scripts/run_p13_shot_context_fresh_execution.py`\n  - `scripts/run_p13_shot_context_deepseek_audit.py`\n  - `tests/test_p13_shot_context_fresh_execution.py`\n- Core backup before P13 `src/` / `scripts` edits：`backups/20260601_095136_p13_shot_context_fresh_execution`\n- P13 focused tests：6 passed。\n- P13 fresh execution run：`outputs/p13_shot_context_fresh_execution_20260601_100019`\n  - gate=`pass`\n  - gate_status=`p13_shot_context_fresh_execution_pass`\n  - P12 readiness rows / ready rows=5002 / 5002\n  - shot context rows / sequence rows=5002 / 5002\n  - shot ids / shot numbers traced=5002 / 5002\n  - P12 readiness refs / P10 readiness refs / P9 screenplay refs=5002 / 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  - context payload rows / context slot rows=5002 / 5002\n  - drop-from-script refs preserved=1518 / 1518\n  - dependency queue items=7\n  - future executable after P13 closeout candidates=1\n  - validator failures=0\n- P13 advisory run：`outputs/p13_shot_context_deepseek_audit_20260601_100046`\n  - program validation status=`pass`\n  - program validation failure_count=0\n  - gate=`pass`\n  - gate_status=`deepseek_advisory_supports_p13_shot_context_fresh_execution`\n  - verdict=`supports_p13_shot_context_fresh_execution`\n  - finding/blocker/high=0/0/0\n  - false_required_confirmation_count=0\n  - recommended next=`P13_closeout_retrospective_then_P14_prompt_packet_reentry_planning_contract`\n  - DeepSeek raw meta model=`deepseek-v4-pro`\n  - prompt_tokens=81233\n  - completion_tokens=2521\n  - reasoning_tokens=2241\n  - reasoning_content_present=true\n\n## Program Validation Summary\n\n- P13 required output files exist and parse。\n- P13 gate status=`pass`。\n- P13 validator status=`pass`。\n- P12 execution/advisory/retrospective paths were consumed explicitly。\n- P12 gate and P12 program validation pass。\n- P12 DeepSeek verdict=`supports_p12_shot_context_reentry_planning`。\n- P13 shot context rows=5002。\n- P13 sequence rows=5002。\n- P12 readiness refs, P11 shot ids, and shot numbers are fully traced。\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- provider-neutral context payload rows and context slot rows are present: 5002 / 5002。\n- `execution_state.json.next_entrypoint.id` remains `platform_neutral_prompt_readiness_manual_execution_log_contract`。\n- prompt packet、adapter render、provider/media、feedback、KG/overlay/replay、output deletion/archive/index mutation counters all 0。\n\n## Not Landed\n\n- prompt packet reentry planning 未执行。\n- prompt packet fresh execution 未执行。\n- 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/p13_shot_context_fresh_execution_contract_20260601.md`\n- `docs/p12_closeout_retrospective_20260601.md`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_execution_input.json`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_rows.jsonl`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_sequence_index.jsonl`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_dependency_queue.jsonl`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_validator_report.json`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_gate.json`\n- `outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_report.md`\n- `outputs/p13_shot_context_deepseek_audit_20260601_100046/P13_shot_context_program_validation.json`\n- `outputs/p13_shot_context_deepseek_audit_20260601_100046/P13_shot_context_deepseek_audit_input.json`\n- `outputs/p13_shot_context_deepseek_audit_20260601_100046/P13_shot_context_deepseek_audit_raw.json`\n- `outputs/p13_shot_context_deepseek_audit_20260601_100046/P13_shot_context_deepseek_audit.json`\n- `outputs/p13_shot_context_deepseek_audit_20260601_100046/P13_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_p13_shot_context_fresh_execution`\n- recommended_next_candidate=`P13_closeout_retrospective_then_P14_prompt_packet_reentry_planning_contract`\n- finding/blocker/high=0/0/0\n- false_required_confirmation_count=0\n\nDeepSeek confirmed all required checks:\n\n- P13 contract artifact-backed。\n- program validation passed。\n- P12 authority passed。\n- P12 fresh artifacts used。\n- shot context rows traceable。\n- shot context rows provider-neutral。\n- source provenance preserved。\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- P14 requires a separate contract。\n\n## Conclusive Output Review\n\nP13 is a conclusive provider-neutral shot context output. It satisfies P计划 parallel review requirement:\n\n- P13 contract is present。\n- P13 deterministic execution gate pass。\n- P13 program validation pass。\n- Focused tests pass。\n- DeepSeek v4 pro thinking/max advisory available and parsed。\n- DeepSeek verdict supports P13。\n- finding/blocker/high=0/0/0。\n- prompt/provider/media/KG/overlay/replay/downstream execution/output deletion/output archive/index mutation counters all 0。\n\n## Fragility Or Debt\n\n- P13 shot context rows contain deterministic provider-neutral context refs and slots, not final provider prompt text.\n- P14 must be planning-only because prompt packet generation is a new boundary after shot context. Prompt packet execution should not open until P14 planning, program validation, DeepSeek advisory, and P14 closeout retrospective pass.\n- `outputs/index.json` / `outputs/index-lite.json` remain intentionally unchanged after P2E. P14 must use explicit P13 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 prompt packet authority.\n\n## Next Stage Recalibration\n\nP13 closeout supports opening P14 as a separate contract:\n\n`P14_prompt_packet_reentry_planning_contract`\n\nP14 should execute prompt packet reentry planning from P13 shot context rows only. P14 must:\n\n- consume P13 execution/advisory/retrospective paths by explicit path。\n- use P13 shot context rows and sequence index as the only active shot context authorities。\n- produce prompt packet readiness rows traceable to P13 shot context rows, P11 shot ids, P10/P9/P8/P5E/P6 refs, transition refs, continuity refs, and merge/drop provenance。\n- keep prompt packet fresh execution, adapter render, provider/media, feedback/replay, KG/overlay/replay, output deletion/archive, generated index mutation, and old B7 continuation blocked。\n- run program validation, DeepSeek v4 pro thinking/max advisory, closeout retrospective, and control-plane sync before any prompt packet execution stage opens。\n\nP14 must not be treated as prompt packet execution or provider execution. Now-32 remains active route authority until `execution_state.json.next_entrypoint` is explicitly changed by a future authorized route update.\n\n## Verification Commands\n\nCommands already run for P13 closeout:\n\n```bash\nPYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src pytest -q tests/test_p13_shot_context_fresh_execution.py\nPYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python scripts/run_p13_shot_context_fresh_execution.py --project-root . --output-run-dir outputs/p13_shot_context_fresh_execution_20260601_100019\nPYTHONDONTWRITEBYTECODE=1 PYTHONPATH=src python scripts/run_p13_shot_context_deepseek_audit.py --project-root . --execution-run-dir outputs/p13_shot_context_fresh_execution_20260601_100019 --output-run-dir outputs/p13_shot_context_deepseek_audit_20260601_100046 --reasoning-effort max --max-tokens 12000 --timeout-seconds 600\n```\n\nRequired before final P13 commit:\n\n```bash\npython -m json.tool workflow.json >/dev/null\npython -m json.tool execution_state.json >/dev/null\npython -m json.tool phase_acceptance.json >/dev/null\npython -m json.tool workflow_index.json >/dev/null\npython -m json.tool outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_gate.json >/dev/null\npython -m json.tool outputs/p13_shot_context_fresh_execution_20260601_100019/P13_shot_context_validator_report.json >/dev/null\npython -m json.tool outputs/p13_shot_context_deepseek_audit_20260601_100046/P13_shot_context_program_validation.json >/dev/null\npython -m json.tool outputs/p13_shot_context_deepseek_audit_20260601_100046/P13_shot_context_deepseek_audit_gate.json >/d",
  "p13_gate_status": {
    "status": "pass",
    "gate_status": "p13_shot_context_fresh_execution_pass"
  },
  "p13_gate_summary": {
    "p12_readiness_row_count": 5002,
    "p12_ready_row_count": 5002,
    "p12_dependency_queue_item_count": 7,
    "shot_context_row_count": 5002,
    "shot_context_sequence_row_count": 5002,
    "shot_id_trace_count": 5002,
    "shot_number_trace_count": 5002,
    "p12_readiness_row_ref_count": 5002,
    "p10_readiness_row_ref_count": 5002,
    "p9_screenplay_unit_ref_count": 5002,
    "adaptation_unit_refs_in_context_count": 6989,
    "source_scene_refs_in_context_count": 6989,
    "chronology_refs_in_context_count": 6989,
    "transition_refs_in_context_count": 5002,
    "continuity_refs_in_context_count": 5002,
    "merge_drop_refs_in_context_count": 5002,
    "drop_from_script_scene_refs_preserved": 1518,
    "p12_drop_from_script_scene_count": 1518,
    "context_payload_row_count": 5002,
    "context_slot_row_count": 5002,
    "dependency_queue_item_count": 7,
    "future_executable_after_p13_closeout_count": 1,
    "validator_failure_count": 0,
    "active_route_next_entrypoint_id": "platform_neutral_prompt_readiness_manual_execution_log_contract",
    "p12_deepseek_overall_verdict": "supports_p12_shot_context_reentry_planning",
    "old_b7_reference_only": true,
    "old_b7_active_source_ref_count": 0,
    "shot_context_execution_count": 1,
    "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
  },
  "p13_validator_summary": {
    "p12_readiness_row_count": 5002,
    "p12_ready_row_count": 5002,
    "p12_dependency_queue_item_count": 7,
    "shot_context_row_count": 5002,
    "shot_context_sequence_row_count": 5002,
    "shot_id_trace_count": 5002,
    "shot_number_trace_count": 5002,
    "p12_readiness_row_ref_count": 5002,
    "p10_readiness_row_ref_count": 5002,
    "p9_screenplay_unit_ref_count": 5002,
    "adaptation_unit_refs_in_context_count": 6989,
    "source_scene_refs_in_context_count": 6989,
    "chronology_refs_in_context_count": 6989,
    "transition_refs_in_context_count": 5002,
    "continuity_refs_in_context_count": 5002,
    "merge_drop_refs_in_context_count": 5002,
    "drop_from_script_scene_refs_preserved": 1518,
    "p12_drop_from_script_scene_count": 1518,
    "context_payload_row_count": 5002,
    "context_slot_row_count": 5002,
    "dependency_queue_item_count": 7,
    "future_executable_after_p13_closeout_count": 1,
    "validator_failure_count": 0,
    "active_route_next_entrypoint_id": "platform_neutral_prompt_readiness_manual_execution_log_contract",
    "p12_deepseek_overall_verdict": "supports_p12_shot_context_reentry_planning",
    "old_b7_reference_only": true,
    "old_b7_active_source_ref_count": 0,
    "shot_context_execution_count": 1,
    "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
  },
  "p13_manifest_summary": {
    "stage": "P13_shot_context_fresh_execution_contract",
    "fresh_run_policy": {
      "new_output_run_dir": "outputs/p13_shot_context_fresh_execution_20260601_100019",
      "no_overwrite": true
    }
  },
  "p13_program_validation": {
    "status": "pass",
    "failure_count": 0,
    "summary": {
      "p12_readiness_row_count": 5002,
      "p12_ready_row_count": 5002,
      "p12_dependency_queue_item_count": 7,
      "shot_context_row_count": 5002,
      "shot_context_sequence_row_count": 5002,
      "shot_id_trace_count": 5002,
      "shot_number_trace_count": 5002,
      "p12_readiness_row_ref_count": 5002,
      "p10_readiness_row_ref_count": 5002,
      "p9_screenplay_unit_ref_count": 5002,
      "adaptation_unit_refs_in_context_count": 6989,
      "source_scene_refs_in_context_count": 6989,
      "chronology_refs_in_context_count": 6989,
      "transition_refs_in_context_count": 5002,
      "continuity_refs_in_context_count": 5002,
      "merge_drop_refs_in_context_count": 5002,
      "drop_from_script_scene_refs_preserved": 1518,
      "p12_drop_from_script_scene_count": 1518,
      "context_payload_row_count": 5002,
      "context_slot_row_count": 5002,
      "dependency_queue_item_count": 7,
      "future_executable_after_p13_closeout_count": 1,
      "validator_failure_count": 0,
      "active_route_next_entrypoint_id": "platform_neutral_prompt_readiness_manual_execution_log_contract",
      "p12_deepseek_overall_verdict": "supports_p12_shot_context_reentry_planning",
      "old_b7_reference_only": true,
      "old_b7_active_source_ref_count": 0,
      "shot_context_execution_count": 1,
      "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
    }
  },
  "p13_deepseek_gate": {
    "status": "pass",
    "gate_status": "deepseek_advisory_supports_p13_shot_context_fresh_execution",
    "summary": {
      "program_validation_status": "pass",
      "program_validation_failure_count": 0,
      "deepseek_call_status": "success",
      "deepseek_parse_status": "pass",
      "deepseek_overall_verdict": "supports_p13_shot_context_fresh_execution",
      "recommended_next_candidate": "P13_closeout_retrospective_then_P14_prompt_packet_reentry_planning_contract",
      "pipeline_finding_count": 0,
      "pipeline_blocker_count": 0,
      "pipeline_high_count": 0,
      "false_required_confirmation_count": 0,
      "p12_readiness_row_count": 5002,
      "p12_ready_row_count": 5002,
      "p12_dependency_queue_item_count": 7,
      "shot_context_row_count": 5002,
      "shot_context_sequence_row_count": 5002,
      "shot_id_trace_count": 5002,
      "shot_number_trace_count": 5002,
      "p12_readiness_row_ref_count": 5002,
      "p10_readiness_row_ref_count": 5002,
      "p9_screenplay_unit_ref_count": 5002,
      "adaptation_unit_refs_in_context_count": 6989,
      "source_scene_refs_in_context_count": 6989,
      "chronology_refs_in_context_count": 6989,
      "transition_refs_in_context_count": 5002,
      "continuity_refs_in_context_count": 5002,
      "merge_drop_refs_in_context_count": 5002,
      "drop_from_script_scene_refs_preserved": 1518,
      "p12_drop_from_script_scene_count": 1518,
      "context_payload_row_count": 5002,
      "context_slot_row_count": 5002,
      "dependency_queue_item_count": 7,
      "future_executable_after_p13_closeout_count": 1,
      "validator_failure_count": 0,
      "active_route_next_entrypoint_id": "platform_neutral_prompt_readiness_manual_execution_log_contract",
      "p12_deepseek_overall_verdict": "supports_p12_shot_context_reentry_planning",
      "old_b7_reference_only": true,
      "old_b7_active_source_ref_count": 0,
      "shot_context_execution_count": 1,
      "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
    }
  },
  "p13_deepseek_raw_meta": {
    "id": "5e58cc9d-859e-47e1-baf2-d49d118ef420",
    "object": "chat.completion",
    "model": "deepseek-v4-pro",
    "usage": {
      "prompt_tokens": 81233,
      "completion_tokens": 2521,
      "total_tokens": 83754,
      "prompt_tokens_details": {
        "cached_tokens": 0
      },
      "completion_tokens_details": {
        "reasoning_tokens": 2241
      },
      "prompt_cache_hit_tokens": 0,
      "prompt_cache_miss_tokens": 81233
    },
    "finish_reason": "stop",
    "content_chars": 917,
    "reasoning_content_present": true,
    "reasoning_content_chars": 9578
  },
  "p13_surface": {
    "shot_context_row_count": 5002,
    "sequence_row_count": 5002,
    "dependency_queue_item_count": 7,
    "future_executable_after_p13_closeout_count": 1,
    "first_future_execution_contract_candidate": "P14_prompt_packet_reentry_planning_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": "p13_authority",
      "purpose": "P14 consumes explicit P13 execution/advisory/retrospective paths and verifies pass gates",
      "blocks_p14_pass": true
    },
    {
      "validator_id": "shot_context_traceability",
      "purpose": "Every readiness row maps to a P13 shot context row, P11 shot id/number, and P10/P9 refs",
      "blocks_p14_pass": true
    },
    {
      "validator_id": "prompt_packet_readiness_schema",
      "purpose": "Rows expose future prompt packet prerequisites without generating prompt packet rows",
      "blocks_p14_pass": true
    },
    {
      "validator_id": "source_provenance_guard",
      "purpose": "Source, adaptation, chronology, transition, continuity, and merge/drop refs remain visible",
      "blocks_p14_pass": true
    },
    {
      "validator_id": "prompt_packet_scope_guard",
      "purpose": "P14 generates planning/readiness artifacts only",
      "blocks_p14_pass": true
    },
    {
      "validator_id": "dependency_queue_ordering",
      "purpose": "Queue opens only the next prompt packet execution contract candidate after P14 advisory/retrospective",
      "blocks_p14_pass": true
    },
    {
      "validator_id": "downstream_leakage_guard",
      "purpose": "Adapter/provider/media counters remain zero",
      "blocks_p14_pass": true
    },
    {
      "validator_id": "kg_overlay_replay_guard",
      "purpose": "KG/overlay/replay counters remain zero",
      "blocks_p14_pass": true
    },
    {
      "validator_id": "old_b7_exclusion",
      "purpose": "Old B7 remains reference-only and is not active authority",
      "blocks_p14_pass": true
    },
    {
      "validator_id": "active_route_guard",
      "purpose": "execution_state.next_entrypoint remains Now-32",
      "blocks_p14_pass": true
    }
  ],
  "policy": {
    "stage": "P14_prompt_packet_reentry_planning_contract",
    "fresh_run_required": true,
    "prompt_packet_reentry_planning_allowed_in_p14": true,
    "provider_neutral_readiness_only": true,
    "deepseek_v4_pro_thinking_audit_required": true,
    "advisory_only": true,
    "prompt_packet_execution_allowed": false,
    "prompt_packet_row_generation_allowed": false,
    "provider_prompt_text_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": "188832bf9b4e3464e0e486d6f2ccc5b49d00d5d41c6245cf0176fe82b99b1c48"
}