---
phase: 168.1
plan: 01
type: execute
wave: 1
depends_on:
  - 168
files_modified:
  - research/knowledge-hub/knowledge_hub/validation_review_service.py
  - research/knowledge-hub/knowledge_hub/topic_shell_support.py
  - research/knowledge-hub/knowledge_hub/runtime_bundle_support.py
  - research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json
  - research/knowledge-hub/runtime/scripts/run_analytical_cross_check_surface_acceptance.py
  - research/knowledge-hub/tests/test_aitp_service.py
  - research/knowledge-hub/tests/test_runtime_scripts.py
  - research/knowledge-hub/tests/test_schema_contracts.py
autonomous: false
requirements:
  - REQ-ANX-03
  - REQ-VERIFY-01
must_haves:
  truths:
    - status, runtime protocol, and the primary analytical review bundle must expose the same bounded analytical cross-check surface
    - the richer runtime surface must be structured and machine-readable, not only prose
    - the milestone must close with one dedicated analytical cross-check proof lane while keeping the older analytical judgment lane compatible
---

<objective>
Surface the richer analytical cross-check contract across runtime/read-path
surfaces and close the milestone with one dedicated bounded analytical proof
lane.
</objective>

<execution_context>
@D:/BaiduSyncdisk/Theoretical-Physics/.codex-home/get-shit-done/workflows/execute-plan.md
@D:/BaiduSyncdisk/Theoretical-Physics/.codex-home/get-shit-done/templates/summary.md
</execution_context>

<context>
@.planning/phases/168.1-analytical-runtime-surface-and-proof-lane/168.1-CONTEXT.md
@.planning/phases/168.1-analytical-runtime-surface-and-proof-lane/168.1-RESEARCH.md
@.planning/phases/168.1-analytical-runtime-surface-and-proof-lane/168.1-VALIDATION.md
@research/knowledge-hub/knowledge_hub/validation_review_service.py
@research/knowledge-hub/knowledge_hub/topic_shell_support.py
@research/knowledge-hub/knowledge_hub/runtime_bundle_support.py
@research/knowledge-hub/runtime/scripts/run_analytical_judgment_surface_acceptance.py
</context>

<tasks>

<task type="auto">
  <name>Task 1: Add red tests for the structured analytical runtime surface</name>
  <files>research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_schema_contracts.py</files>
  <read_first>research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_schema_contracts.py, .planning/phases/168.1-analytical-runtime-surface-and-proof-lane/168.1-CONTEXT.md</read_first>
  <action>Add failing tests that require `validation_review_bundle` to expose one structured analytical cross-check surface when `primary_review_kind` is `analytical_review`. At minimum the machine payload must include overall analytical status, candidate id, counts, and row-level check entries with kind, status, source anchors, assumption refs, regime note, reading depth, and notes. Extend schema tests so the runtime-bundle contract knows this structured surface exists.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_aitp_service.py::AITPServiceTests::test_prepare_verification_analytical_uses_analytical_review_as_primary_bundle research/knowledge-hub/tests/test_schema_contracts.py -q</verify>
  <acceptance_criteria>
    - service tests fail until the analytical surface is present in the bundle payload
    - schema tests fail until `validation_review_bundle` declares the analytical runtime surface
  </acceptance_criteria>
  <done>A red contract exists for the runtime analytical cross-check surface.</done>
</task>

<task type="auto">
  <name>Task 2: Implement validation-review bundle and markdown parity for analytical cross-checks</name>
  <files>research/knowledge-hub/knowledge_hub/validation_review_service.py, research/knowledge-hub/knowledge_hub/topic_shell_support.py, research/knowledge-hub/knowledge_hub/runtime_bundle_support.py, research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json, research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_schema_contracts.py</files>
  <read_first>research/knowledge-hub/knowledge_hub/validation_review_service.py, research/knowledge-hub/knowledge_hub/topic_shell_support.py, research/knowledge-hub/knowledge_hub/runtime_bundle_support.py, research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json, .planning/phases/168.1-analytical-runtime-surface-and-proof-lane/168.1-CONTEXT.md</read_first>
  <action>Extend `validation_review_bundle` with one structured analytical cross-check surface derived from the active `analytical_review` artifact. Keep the surface nested inside the existing bundle contract so `status --json` and `runtime_protocol.generated.json` inherit it automatically. Render the same surface on `validation_review_bundle.active.md`, and echo it on existing runtime-facing markdown consumers where the validation review bundle already appears. Keep the older summary and specialist artifact list intact as compatibility surfaces.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_aitp_service.py::AITPServiceTests::test_prepare_verification_analytical_uses_analytical_review_as_primary_bundle research/knowledge-hub/tests/test_schema_contracts.py -q</verify>
  <acceptance_criteria>
    - `validation_review_bundle.active.json` contains one structured analytical cross-check surface when analytical review is present
    - `status --json` and `runtime_protocol.generated.json` expose that same machine surface through the bundle
    - `validation_review_bundle.active.md` renders an explicit analytical cross-check section instead of only thin summary text
  </acceptance_criteria>
  <done>The richer analytical contract becomes visible on the runtime/read path instead of staying trapped in raw review JSON.</done>
</task>

<task type="auto">
  <name>Task 3: Add the dedicated analytical cross-check proof lane</name>
  <files>research/knowledge-hub/runtime/scripts/run_analytical_cross_check_surface_acceptance.py, research/knowledge-hub/tests/test_runtime_scripts.py</files>
  <read_first>research/knowledge-hub/runtime/scripts/run_analytical_judgment_surface_acceptance.py, research/knowledge-hub/tests/test_runtime_scripts.py, .planning/phases/168.1-analytical-runtime-surface-and-proof-lane/168.1-CONTEXT.md</read_first>
  <action>Create a dedicated isolated acceptance script that seeds one analytical-review candidate, materializes the richer analytical runtime surface, and proves it survives through status, the primary review bundle, and runtime protocol read paths. Add runtime-script coverage so the new proof lane is callable. Keep `run_analytical_judgment_surface_acceptance.py` green as the compatibility baseline.</action>
  <verify>python research/knowledge-hub/runtime/scripts/run_analytical_cross_check_surface_acceptance.py --json</verify>
  <acceptance_criteria>
    - the new analytical cross-check acceptance script exits 0
    - runtime-script tests can invoke both the new proof lane and the older analytical judgment lane
    - the dedicated proof checks machine and human read surfaces, not just raw review JSON
  </acceptance_criteria>
  <done>The milestone has one dedicated analytical cross-check proof lane.</done>
</task>

<task type="auto">
  <name>Task 4: Run the targeted runtime-surface regression slice</name>
  <files>research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_runtime_scripts.py, research/knowledge-hub/tests/test_schema_contracts.py</files>
  <read_first>.planning/phases/168.1-analytical-runtime-surface-and-proof-lane/168.1-VALIDATION.md</read_first>
  <action>Run the phase validation commands declared in `168.1-VALIDATION.md`: the focused service and schema slice, the runtime-script invocation slice, the dedicated analytical cross-check proof script, and the older analytical judgment compatibility script. If a regression appears, fix only files already in scope for this plan and rerun until the declared phase slice is green.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_aitp_service.py::AITPServiceTests::test_prepare_verification_analytical_uses_analytical_review_as_primary_bundle research/knowledge-hub/tests/test_schema_contracts.py research/knowledge-hub/tests/test_runtime_scripts.py -k "analytical_cross_check_surface_acceptance or analytical_judgment_surface_acceptance" -q</verify>
  <acceptance_criteria>
    - the focused service/schema slice exits 0
    - the runtime-script invocation slice exits 0
    - `python research/knowledge-hub/runtime/scripts/run_analytical_cross_check_surface_acceptance.py --json` returns `success`
    - `python research/knowledge-hub/runtime/scripts/run_analytical_judgment_surface_acceptance.py --json` still returns `success`
  </acceptance_criteria>
  <done>The runtime analytical surface and dedicated proof lane land on a green targeted baseline.</done>
</task>

</tasks>
