{
  "version": "p8_adaptation_planning_fresh_execution.v1",
  "created_at": "2026-05-30T23:45:49.096732Z",
  "phase": "P8_adaptation_planning_fresh_execution_contract",
  "project_root": ".",
  "output_run_dir": "outputs/p8_adaptation_planning_fresh_execution_20260531_074542",
  "source_artifacts": {
    "p8_contract": {
      "path": "docs/p8_adaptation_planning_fresh_execution_contract_20260531.md",
      "sha256": "cd1e701c15806d03d2556c904f777c38bd203a02dc593c665091225753023eb2",
      "size_bytes": 7655,
      "exists": true
    },
    "p7_closeout_retrospective": {
      "path": "docs/p7_closeout_retrospective_20260531.md",
      "sha256": "8bdacffce7223b42f0116a718a1537a9572cf58f1b5e1f0d3e0fe2f37699df63",
      "size_bytes": 12027,
      "exists": true
    },
    "p7_gate": {
      "artifact": "P7_adaptation_screenplay_reentry_gate.json",
      "path": "outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_gate.json",
      "exists": true,
      "size_bytes": 10186,
      "sha256": "d106eb6661a2a98c6f200ef6e2699bb943e5834faff9b8b8eff54f55b17b07fc"
    },
    "p7_validator": {
      "artifact": "P7_adaptation_screenplay_reentry_validator_report.json",
      "path": "outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_validator_report.json",
      "exists": true,
      "size_bytes": 5693,
      "sha256": "5249598fb754945c7605513896d3f387c24d063df7ffc460dd638752d905f182"
    },
    "p7_matrix": {
      "path": "outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_matrix.jsonl",
      "exists": true,
      "sha256": "e90902f1773d26a0b4984455e4538635f5fe4ca029be8f4977c216605c8e890f",
      "size_bytes": 15969
    },
    "p7_queue": {
      "path": "outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_queue.jsonl",
      "exists": true,
      "sha256": "ccec64d921913e7108e17b2bd0cf9fbb1d104413c2ba0b14e3f0f6cb2c441e4d",
      "size_bytes": 5769
    },
    "p7_manifest": {
      "artifact": "manifest.json",
      "path": "outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/manifest.json",
      "exists": true,
      "size_bytes": 5059,
      "sha256": "290706f31af85b3b375f28ae92025eb6ffea058ec4d5ef2a263de78b598844c4"
    },
    "p7_program_validation": {
      "artifact": "P7_adaptation_screenplay_reentry_program_validation.json",
      "path": "outputs/p7_adaptation_screenplay_reentry_deepseek_audit_20260531_070922/P7_adaptation_screenplay_reentry_program_validation.json",
      "exists": true,
      "size_bytes": 5545,
      "sha256": "5b56589dcd829c1394cf8e721628a523d37a8c4d70b9cf70a3859e155586e6a8"
    },
    "p7_deepseek_gate": {
      "artifact": "P7_adaptation_screenplay_reentry_deepseek_audit_gate.json",
      "path": "outputs/p7_adaptation_screenplay_reentry_deepseek_audit_20260531_070922/P7_adaptation_screenplay_reentry_deepseek_audit_gate.json",
      "exists": true,
      "size_bytes": 4612,
      "sha256": "35de78d3078c670ae348e9d47f9c1d0847a4c46c87f9cdff50d1049bf16a767b"
    },
    "p7_deepseek_raw": {
      "path": "outputs/p7_adaptation_screenplay_reentry_deepseek_audit_20260531_070922/P7_adaptation_screenplay_reentry_deepseek_audit_raw.json",
      "exists": true,
      "sha256": "c345c6827c60a4f80b98aff03dec8e04d7dccfe192d800ca5ef31c585ececedb",
      "size_bytes": 82505
    },
    "p5e_scenes": {
      "artifact": "P5E_scenes.json",
      "path": "outputs/p5e_scene_segmentation_fresh_rebuild_execution_20260530_135944/P5E_scenes.json",
      "exists": true,
      "size_bytes": 80211011,
      "sha256": "5cbf59a643dabeb6f9d8d2a0c072df64d5b83ceb399deed160e1d100a717a2a5"
    },
    "p6_chronology": {
      "artifact": "P6_chronology.json",
      "path": "outputs/p6_chronology_and_narrative_time_fresh_rebuild_20260530_141544/P6_chronology.json",
      "exists": true,
      "size_bytes": 20418478,
      "sha256": "e402fdd980f144a701191489b413046b573bc26b77c03568d4f18dcb342fc78a"
    },
    "p6_join_validation": {
      "artifact": "P6_scene_chronology_join_validation.json",
      "path": "outputs/p6_chronology_and_narrative_time_fresh_rebuild_20260530_141544/P6_scene_chronology_join_validation.json",
      "exists": true,
      "size_bytes": 741,
      "sha256": "e40c02119ded577536969d1d48f074b489efa06f4fd0d1a5de02b6d8528b8804"
    },
    "execution_state": {
      "artifact": "execution_state.json",
      "path": "execution_state.json",
      "exists": true,
      "size_bytes": 57461,
      "sha256": "ba66c3e9f7baa2b540c9da5854eeb91b76eb601ea30ada2e6d20aeccf2640396"
    }
  },
  "contract_checks": {
    "p8_contract_present": true,
    "p8_contract_adaptation_planning_only": true,
    "p8_contract_p5e_p6_p7_authorities": true,
    "p8_contract_required_outputs": true,
    "p8_contract_validator_matrix_bound": true,
    "p8_contract_screenplay_blocked": true,
    "p8_contract_no_provider_media": true,
    "p8_contract_no_kg_overlay_replay": true,
    "p8_contract_old_b7_reference_only": true,
    "p8_contract_runtime_hardcoding_ban": true
  },
  "p8_contract_excerpt": "# P8 Adaptation Planning Fresh Execution Contract\n\n更新时间：`2026-05-31T07:20:00+08:00`\n\n本文冻结 P计划 `P8_adaptation_planning_fresh_execution_contract` 的执行细则。P8 基于 P5E fresh scenes、P6 fresh chronology 和 P7 reentry planning，执行 adaptation planning only，不执行 AI-executable screenplay、shooting_script、shot context、prompt packet、adapter render、provider job、media generation、KG/overlay/replay，也不改写 `outputs/index.json` / `outputs/index-lite.json`。\n\n## Contract ID\n\n`P8_adaptation_planning_fresh_execution_contract`\n\n## Objective\n\nP8 的目标是在 P7 closeout 之后，执行 fresh adaptation planning：\n\n- consume P7 planning run, P7 program validation/advisory gate, and P7 closeout retrospective by explicit path。\n- consume P5E scenes and P6 chronology as the only active scene/chronology authorities。\n- execute adaptation planning only: generate adaptation readiness matrix, adaptation units, dependency queue, validator report, gate, report/html, and manifest。\n- preserve source scene ids, chronology group/order refs, source refs, continuity constraints, and dependency ids。\n- classify rows by structural fields only: scene id, chronology group id, adaptation unit id, validator id, gate id, dependency id, source refs。\n- identify the first later screenplay execution planning/execution candidate, but keep screenplay execution blocked in P8。\n- keep old B7 adaptation/screenplay outputs as paused reference / diagnostic comparison only。\n- require P8 program validation, DeepSeek v4 pro thinking/max advisory, closeout retrospective, and control-plane sync before any screenplay stage opens。\n\n## Required Inputs\n\n- `docs/p8_adaptation_planning_fresh_execution_contract_20260531.md`\n- `docs/p7_closeout_retrospective_20260531.md`\n- `outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_gate.json`\n- `outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_validator_report.json`\n- `outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_matrix.jsonl`\n- `outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_queue.jsonl`\n- `outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/manifest.json`\n- `outputs/p7_adaptation_screenplay_reentry_deepseek_audit_20260531_070922/P7_adaptation_screenplay_reentry_program_validation.json`\n- `outputs/p7_adaptation_screenplay_reentry_deepseek_audit_20260531_070922/P7_adaptation_screenplay_reentry_deepseek_audit_gate.json`\n- `outputs/p7_adaptation_screenplay_reentry_deepseek_audit_20260531_070922/P7_adaptation_screenplay_reentry_deepseek_audit_raw.json`\n- `outputs/p5e_scene_segmentation_fresh_rebuild_execution_20260530_135944/P5E_scenes.json`\n- `outputs/p6_chronology_and_narrative_time_fresh_rebuild_20260530_141544/P6_chronology.json`\n- `outputs/p6_chronology_and_narrative_time_fresh_rebuild_20260530_141544/P6_scene_chronology_join_validation.json`\n- `execution_state.json`\n\nP8 must not discover P5E/P6/P7 through generated indexes. Use explicit paths unless a later deterministic index-refresh stage is opened.\n\n## Execution Boundary\n\nP8 may execute adaptation planning only:\n\n- allowed: reading fresh scene/chronology inputs, deriving adaptation readiness rows, grouping/ordering adaptation units, recording source and chronology refs, generating dependency queue, validators, gate/report/html。\n- not allowed: executing AI-executable screenplay, shooting_script, shot context, prompt packet, 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 P8 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\nP8 must write a fresh output run dir such as:\n\n`outputs/p8_adaptation_planning_fresh_execution_<timestamp>`\n\nRequired files:\n\n- `P8_adaptation_planning_execution_input.json`\n- `P8_adaptation_scene_readiness_matrix.jsonl`\n- `P8_adaptation_units.jsonl`\n- `P8_adaptation_dependency_queue.jsonl`\n- `P8_adaptation_validator_report.json`\n- `P8_adaptation_gate.json`\n- `P8_adaptation_report.md`\n- `P8_adaptation.html`\n- `manifest.json`\n\n## P8 Validator Matrix\n\n| Validator | Required check | Blocks pass when |\n| --- | --- | --- |\n| `p7_authority` | P8 consumes explicit P7 planning/advisory/retrospective paths and verifies pass gates | P7 gate/advisory missing, not pass, or P7 retrospective missing |\n| `scene_chronology_authority` | P5E scenes and P6 chronology parse and join coverage is complete | scene/chronology count mismatch, missing source refs, join failure |\n| `adaptation_unit_traceability` | every adaptation unit maps to source scene ids, chronology refs, source refs, and dependency ids | orphan adaptation unit, missing scene ref, missing chronology ref, missing source ref |\n| `adaptation_scope_guard` | P8 generates adaptation planning artifacts only | screenplay/shooting_script/prompt/provider/media output generated in P8 |\n| `dependency_queue_ordering` | queue opens only the next screenplay contract candidate after P8 advisory | screenplay execution marked allowed before P8 closeout |\n| `continuity_policy_guard` | adaptation units retain continuity constraints and chronology mode/conflict information | chronology groups, conflict list, or continuity constraints dropped |\n| `downstream_leakage_guard` | shooting_script/prompt/provider/media counters remain zero | any downstream artifact is generated in P8 |\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 adaptation/screenplay 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\nP8 closeout requires DeepSeek v4 pro thinking/max advisory over:\n\n- P8 contract。\n- P7 closeout retrospective。\n- P8 adaptation planning outputs。\n- P8 validator report and gate。\n- active route boundary from `execution_state.json`。\n\nExpected pass verdict:\n\n`supports_p8_adaptation_planning_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 P8 uses P5E/P6/P7 fresh artifacts as active authorities。\n- advisory confirms adaptation planning execution is traceable and bounded。\n- advisory confirms screenplay execution remains blocked in P8。\n- advisory confirms provider/media/KG/overlay/replay/index mutation remain blocked。\n- advisory confirms old B7 remains reference-only。\n\nMissing/skipped/unavailable/unparseable advisory blocks P8 closeout or records `blocked_unavailable`; it never counts as pass.\n\n## Non-Goals\n\n- P8 does not execute AI-executable screenplay。\n- P8 does not execute shooting_script、shot context、prompt packet、adapter render、provider/media。\n- P8 does not write KG/overlay/replay。\n- P8 does not repair generated indexes。\n- P8 does not continue old B7 downstream。\n",
  "p7_retrospective_excerpt": "# P7 Closeout Retrospective\n\n更新时间：`2026-05-31T07:18:00+08:00`\n\n本文是 P计划阶段间复盘门禁下的 `P7_adaptation_screenplay_reentry_planning_contract` closeout retrospective。它在 P7 adaptation/screenplay reentry planning、程序验证和 DeepSeek advisory 通过后，任何 P8 adaptation planning execution 推进前复盘实际落地、证据基础、风险和下一阶段校准。\n\n## Retrospective Summary\n\nP7 已完成 adaptation/screenplay reentry planning：基于 P5E fresh scenes 和 P6 fresh chronology，生成 planning input、adaptation/screenplay reentry matrix、dependency queue、validator report、gate、report/html 和 manifest。\n\nP7 只做 planning。P7 没有执行 adaptation、screenplay、shooting_script、shot context、prompt packet、adapter render、provider/media、KG/overlay/replay，没有删除/冷归档 outputs run，也没有改写 `outputs/index.json` / `outputs/index-lite.json`。DeepSeek v4 pro thinking/max advisory 支持 P7 closeout，finding/blocker/high=0/0/0。\n\n## Actual Landed\n\n- P7 contract：`docs/p7_adaptation_screenplay_reentry_planning_contract_20260530.md`\n- P7 implementation：\n  - `src/novel2video/p7_adaptation_screenplay_reentry_planning.py`\n  - `scripts/run_p7_adaptation_screenplay_reentry_planning.py`\n  - `scripts/run_p7_adaptation_screenplay_reentry_deepseek_audit.py`\n  - `tests/test_p7_adaptation_screenplay_reentry_planning.py`\n- Core backup before P7 `src/` / `scripts` edits：`backups/20260531_070007_p7_adaptation_screenplay_reentry_planning`\n- P7 focused tests：6 passed。\n- P7 planning run：`outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856`\n  - gate=`pass`\n  - gate_status=`p7_adaptation_screenplay_reentry_planning_pass`\n  - P5E scenes / P6 chronology rows=6989 / 6989\n  - P6 chronology groups=5158\n  - P6 chronology edges=8951\n  - P6 chronology conflicts=0\n  - P6 scene-chronology join validation failures=0\n  - planning matrix rows=8\n  - dependency queue items=8\n  - future executable after P7 closeout candidates=1\n  - validator failures=0\n- P7 advisory run：`outputs/p7_adaptation_screenplay_reentry_deepseek_audit_20260531_070922`\n  - program validation status=`pass`\n  - program validation failure_count=0\n  - gate=`pass`\n  - gate_status=`deepseek_advisory_supports_p7_adaptation_screenplay_reentry_planning`\n  - verdict=`supports_p7_adaptation_screenplay_reentry_planning`\n  - finding/blocker/high=0/0/0\n  - false_required_confirmation_count=0\n  - recommended next=`P7_closeout_retrospective_then_P8_adaptation_planning_fresh_execution_contract`\n\n## Program Validation Summary\n\n- P7 required output files exist and parse。\n- P7 gate status=`pass`。\n- P7 validator status=`pass`。\n- P5E scene count=6989。\n- P6 chronology scene count=6989。\n- P6 scene-chronology join validation failure_count=0。\n- planning matrix rows=8。\n- dependency queue items=8。\n- single future executable after P7 closeout=1。\n- `execution_state.json.next_entrypoint.id` remains `platform_neutral_prompt_readiness_manual_execution_log_contract`。\n- adaptation planning execution、adaptation execution、screenplay execution、shooting_script、prompt packet、adapter render、provider/media、KG/overlay/replay、output deletion/archive/index mutation counters all 0。\n\n## Not Landed\n\n- adaptation planning execution 未执行。\n- adaptation/screenplay execution 未执行。\n- shooting_script、shot context、prompt packet、adapter render、provider/media 未执行。\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/p7_adaptation_screenplay_reentry_planning_contract_20260530.md`\n- `docs/p6_closeout_retrospective_20260530.md`\n- `outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_planning_input.json`\n- `outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_matrix.jsonl`\n- `outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_queue.jsonl`\n- `outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_validator_report.json`\n- `outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_gate.json`\n- `outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856/P7_adaptation_screenplay_reentry_report.md`\n- `outputs/p7_adaptation_screenplay_reentry_deepseek_audit_20260531_070922/P7_adaptation_screenplay_reentry_program_validation.json`\n- `outputs/p7_adaptation_screenplay_reentry_deepseek_audit_20260531_070922/P7_adaptation_screenplay_reentry_deepseek_audit_input.json`\n- `outputs/p7_adaptation_screenplay_reentry_deepseek_audit_20260531_070922/P7_adaptation_screenplay_reentry_deepseek_audit_raw.json`\n- `outputs/p7_adaptation_screenplay_reentry_deepseek_audit_20260531_070922/P7_adaptation_screenplay_reentry_deepseek_audit.json`\n- `outputs/p7_adaptation_screenplay_reentry_deepseek_audit_20260531_070922/P7_adaptation_screenplay_reentry_deepseek_audit_gate.json`\n- `outputs/p5e_scene_segmentation_fresh_rebuild_execution_20260530_135944/P5E_scenes.json`\n- `outputs/p6_chronology_and_narrative_time_fresh_rebuild_20260530_141544/P6_chronology.json`\n- `outputs/p6_chronology_and_narrative_time_fresh_rebuild_20260530_141544/P6_scene_chronology_join_validation.json`\n- `outputs/p6_chronology_and_narrative_time_deepseek_audit_20260530_141602/P6_chronology_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_p7_adaptation_screenplay_reentry_planning`\n- recommended_next_candidate=`P7_closeout_retrospective_then_P8_adaptation_planning_fresh_execution_contract`\n- finding/blocker/high=0/0/0\n- false_required_confirmation_count=0\n\nDeepSeek confirmed all required checks:\n\n- P7 contract artifact-backed。\n- program validation passed。\n- P5E fresh scenes used。\n- P6 fresh chronology used。\n- scene-chronology join passed。\n- planning matrix complete。\n- dependency queue ordered。\n- single next executable after P7。\n- adaptation/screenplay execution not performed。\n- shooting_script/prompt/provider/media not performed。\n- KG/overlay/replay blocked。\n- old B7 reference-only。\n- next_entrypoint unchanged。\n- runtime branching by names absent。\n- P8 requires separate contract。\n\n## Conclusive Output Review\n\nP7 is a conclusive adaptation/screenplay reentry planning output. It satisfies P计划 parallel review requirement:\n\n- P7 contract is present。\n- P7 deterministic planning gate pass。\n- P7 program validation pass。\n- Focused tests pass。\n- DeepSeek v4 pro thinking/max advisory available and parsed。\n- DeepSeek verdict supports P7。\n- finding/blocker/high=0/0/0。\n- provider/media/KG/overlay/replay/downstream execution/output deletion/output archive/index mutation counters all 0。\n\n## Risk And Debt\n\n- P7 plans the reentry order but does not prove adaptation quality. P8 must still validate adaptation units against P5E scene refs, P6 chronology refs, source refs, and continuity constraints。\n- P6 chronology is deterministic and suitable as a planning baseline. P8 must not treat it as final creative truth when adaptation compression, merging, or episode boundaries require explicit policy。\n- P7 matrix intentionally keeps only one later execution candidate. Screenplay, shooting_script, prompt, adapter, provider/media, feedback/replay remain blocked until their predecessor stages close。\n- P5E/P6/P7 runs are not added to generated indexes. Continue using explicit control-plane paths unless a deterministic index-refresh stage is opened。\n- Old B7 adaptation/screenplay outputs remain diagnostic only and must not be used as active source authority for P8。\n\n## Project Goal Alignment\n\nP7 advances the pipeline rebuild goal by turning fresh scene/chronology authorities into a controlled downstream reentry plan:\n\n- adaptation and screenplay work now has explicit dependencies instead of inheriting old B7 outputs；\n- every future downstream layer must trace back to P5E scene ids, P6 chronology refs, source",
  "p7_gate_status": {
    "status": "pass",
    "gate_status": "p7_adaptation_screenplay_reentry_planning_pass"
  },
  "p7_gate_summary": {
    "p5e_scene_count": 6989,
    "p6_chronology_scene_count": 6989,
    "p6_chronology_group_count": 5158,
    "p6_chronology_edge_count": 8951,
    "p6_chronology_conflict_count": 0,
    "p6_join_validation_failure_count": 0,
    "planning_matrix_row_count": 8,
    "dependency_queue_item_count": 8,
    "future_executable_after_p7_closeout_count": 1,
    "required_layer_count": 6,
    "validator_failure_count": 0,
    "active_route_next_entrypoint_id": "platform_neutral_prompt_readiness_manual_execution_log_contract",
    "p6_deepseek_overall_verdict": "supports_p6_chronology_and_narrative_time_fresh_rebuild",
    "old_b7_reference_only": true,
    "p7_planning_run_count": 1,
    "adaptation_planning_execution_count": 0,
    "adaptation_execution_count": 0,
    "screenplay_execution_count": 0,
    "shooting_script_execution_count": 0,
    "shot_context_generation_count": 0,
    "prompt_packet_generation_count": 0,
    "adapter_render_count": 0,
    "provider_job_execution_count": 0,
    "media_generation_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
  },
  "p7_validator_summary": {
    "p5e_scene_count": 6989,
    "p6_chronology_scene_count": 6989,
    "p6_chronology_group_count": 5158,
    "p6_chronology_edge_count": 8951,
    "p6_chronology_conflict_count": 0,
    "p6_join_validation_failure_count": 0,
    "planning_matrix_row_count": 8,
    "dependency_queue_item_count": 8,
    "future_executable_after_p7_closeout_count": 1,
    "required_layer_count": 6,
    "validator_failure_count": 0,
    "active_route_next_entrypoint_id": "platform_neutral_prompt_readiness_manual_execution_log_contract",
    "p6_deepseek_overall_verdict": "supports_p6_chronology_and_narrative_time_fresh_rebuild",
    "old_b7_reference_only": true,
    "p7_planning_run_count": 1,
    "adaptation_planning_execution_count": 0,
    "adaptation_execution_count": 0,
    "screenplay_execution_count": 0,
    "shooting_script_execution_count": 0,
    "shot_context_generation_count": 0,
    "prompt_packet_generation_count": 0,
    "adapter_render_count": 0,
    "provider_job_execution_count": 0,
    "media_generation_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
  },
  "p7_manifest_summary": {
    "stage": "P7_adaptation_screenplay_reentry_planning_contract",
    "fresh_run_policy": {
      "new_output_run_dir": "outputs/p7_adaptation_screenplay_reentry_planning_20260531_070856",
      "no_overwrite": true
    }
  },
  "p7_program_validation": {
    "status": "pass",
    "failure_count": 0,
    "summary": {
      "p5e_scene_count": 6989,
      "p6_chronology_scene_count": 6989,
      "p6_chronology_group_count": 5158,
      "p6_chronology_edge_count": 8951,
      "p6_chronology_conflict_count": 0,
      "p6_join_validation_failure_count": 0,
      "planning_matrix_row_count": 8,
      "dependency_queue_item_count": 8,
      "future_executable_after_p7_closeout_count": 1,
      "required_layer_count": 6,
      "validator_failure_count": 0,
      "active_route_next_entrypoint_id": "platform_neutral_prompt_readiness_manual_execution_log_contract",
      "p6_deepseek_overall_verdict": "supports_p6_chronology_and_narrative_time_fresh_rebuild",
      "old_b7_reference_only": true,
      "p7_planning_run_count": 1,
      "adaptation_planning_execution_count": 0,
      "adaptation_execution_count": 0,
      "screenplay_execution_count": 0,
      "shooting_script_execution_count": 0,
      "shot_context_generation_count": 0,
      "prompt_packet_generation_count": 0,
      "adapter_render_count": 0,
      "provider_job_execution_count": 0,
      "media_generation_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
    }
  },
  "p7_deepseek_gate": {
    "status": "pass",
    "gate_status": "deepseek_advisory_supports_p7_adaptation_screenplay_reentry_planning",
    "summary": {
      "program_validation_status": "pass",
      "program_validation_failure_count": 0,
      "deepseek_call_status": "success",
      "deepseek_parse_status": "pass",
      "deepseek_overall_verdict": "supports_p7_adaptation_screenplay_reentry_planning",
      "recommended_next_candidate": "P7_closeout_retrospective_then_P8_adaptation_planning_fresh_execution_contract",
      "pipeline_finding_count": 0,
      "pipeline_blocker_count": 0,
      "pipeline_high_count": 0,
      "false_required_confirmation_count": 0,
      "p5e_scene_count": 6989,
      "p6_chronology_scene_count": 6989,
      "p6_chronology_group_count": 5158,
      "p6_chronology_edge_count": 8951,
      "p6_chronology_conflict_count": 0,
      "p6_join_validation_failure_count": 0,
      "planning_matrix_row_count": 8,
      "dependency_queue_item_count": 8,
      "future_executable_after_p7_closeout_count": 1,
      "required_layer_count": 6,
      "validator_failure_count": 0,
      "active_route_next_entrypoint_id": "platform_neutral_prompt_readiness_manual_execution_log_contract",
      "p6_deepseek_overall_verdict": "supports_p6_chronology_and_narrative_time_fresh_rebuild",
      "old_b7_reference_only": true,
      "p7_planning_run_count": 1,
      "adaptation_planning_execution_count": 0,
      "adaptation_execution_count": 0,
      "screenplay_execution_count": 0,
      "shooting_script_execution_count": 0,
      "shot_context_generation_count": 0,
      "prompt_packet_generation_count": 0,
      "adapter_render_count": 0,
      "provider_job_execution_count": 0,
      "media_generation_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
    }
  },
  "p7_planning_surface": {
    "matrix_row_count": 8,
    "queue_item_count": 8,
    "future_executable_after_p7_closeout_count": 1,
    "first_future_execution_contract_candidate": "P8_adaptation_planning_fresh_execution_contract"
  },
  "p5e_scene_stats": {
    "scene_count": 6989,
    "declared_scene_count": 6989,
    "first_scene_id": "P5ESCENE000001",
    "last_scene_id": "P5ESCENE006989",
    "duplicate_scene_id_count": 0,
    "missing_source_ref_count": 0,
    "source_chunk_count": 1222,
    "scene_with_entity_ref_count": 6739,
    "entity_ref_count": 31530,
    "diagnostics": {
      "duplicate_scene_ids": [],
      "missing_source_ref_scene_ids": []
    }
  },
  "p6_chronology_stats": {
    "chronology_scene_count": 6989,
    "chronology_meta_scene_count": 6989,
    "chronology_group_count": 5158,
    "chronology_edge_count": 8951,
    "chronology_conflict_count": 0,
    "chronology_meta_conflict_count": 0,
    "mode_counts": {
      "unknown": 1,
      "mainline": 4248,
      "flashback": 1648,
      "dream": 123,
      "parallel": 315,
      "rumor": 391,
      "insertion": 263
    },
    "duplicate_chronology_scene_id_count": 0,
    "chronology_missing_source_ref_count": 0,
    "join_validation_status": "pass",
    "join_validation_failure_count": 0,
    "join_validation_summary": {
      "p5e_scene_count": 6989,
      "chronology_scene_count": 6989,
      "duplicate_p5e_scene_id_count": 0,
      "duplicate_chronology_scene_id_count": 0,
      "missing_chronology_scene_count": 0,
      "orphan_chronology_scene_count": 0,
      "source_ref_mismatch_count": 0,
      "narrative_order_mismatch_count": 0
    },
    "diagnostics": {
      "duplicate_chronology_scene_ids": [],
      "chronology_missing_source_ref_scene_ids": []
    }
  },
  "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": "p7_authority",
      "purpose": "P8 consumes explicit P7 planning/advisory/retrospective paths and verifies pass gates",
      "blocks_p8_pass": true
    },
    {
      "validator_id": "scene_chronology_authority",
      "purpose": "P5E scenes and P6 chronology parse and join coverage is complete",
      "blocks_p8_pass": true
    },
    {
      "validator_id": "adaptation_unit_traceability",
      "purpose": "Every adaptation unit maps to source scene ids, chronology refs, source refs, and dependency ids",
      "blocks_p8_pass": true
    },
    {
      "validator_id": "adaptation_scope_guard",
      "purpose": "P8 generates adaptation planning artifacts only",
      "blocks_p8_pass": true
    },
    {
      "validator_id": "dependency_queue_ordering",
      "purpose": "Queue opens only the next screenplay contract candidate after P8 advisory and retrospective",
      "blocks_p8_pass": true
    },
    {
      "validator_id": "continuity_policy_guard",
      "purpose": "Adaptation units retain continuity constraints and chronology mode/conflict information",
      "blocks_p8_pass": true
    },
    {
      "validator_id": "downstream_leakage_guard",
      "purpose": "Shooting_script/prompt/provider/media counters remain zero",
      "blocks_p8_pass": true
    },
    {
      "validator_id": "kg_overlay_replay_guard",
      "purpose": "KG/overlay/replay counters remain zero",
      "blocks_p8_pass": true
    },
    {
      "validator_id": "old_b7_exclusion",
      "purpose": "Old B7 remains reference-only and is not active authority",
      "blocks_p8_pass": true
    },
    {
      "validator_id": "active_route_guard",
      "purpose": "execution_state.next_entrypoint remains Now-32",
      "blocks_p8_pass": true
    }
  ],
  "policy": {
    "stage": "P8_adaptation_planning_fresh_execution_contract",
    "fresh_run_required": true,
    "adaptation_planning_execution_allowed_in_p8": true,
    "deterministic_adaptation_builder": true,
    "llm_enrichment_allowed_in_p8": false,
    "deepseek_v4_pro_thinking_audit_required": true,
    "advisory_only": true,
    "screenplay_execution_allowed_in_p8": false,
    "shooting_script_execution_allowed_in_p8": false,
    "shot_context_execution_allowed_in_p8": false,
    "prompt_packet_execution_allowed_in_p8": false,
    "adapter_render_allowed_in_p8": false,
    "provider_job_execution_allowed": false,
    "media_generation_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": "38d68226bde0666747bd48d1d63a5aa5a221eb570bc7b3ad0698e64e10ba86cd"
}