---
phase: 134-runtime-parity-contract-and-shared-acceptance-harness
plan: 01
type: execute
wave: 1
depends_on: []
files_modified:
  - research/knowledge-hub/knowledge_hub/runtime_support_matrix.py
  - research/knowledge-hub/knowledge_hub/frontdoor_support.py
  - research/knowledge-hub/knowledge_hub/cli_compat_handler.py
  - research/knowledge-hub/runtime/scripts/run_runtime_parity_acceptance.py
  - research/knowledge-hub/runtime/README.md
  - research/knowledge-hub/runtime/AITP_TEST_RUNBOOK.md
  - research/knowledge-hub/tests/test_aitp_service.py
  - research/knowledge-hub/tests/test_aitp_cli.py
autonomous: true
requirements:
  - REQ-PARITY-01
  - REQ-PARITY-02
must_haves:
  truths:
    - install/front-door readiness must stay distinct from deep-execution parity
    - Codex remains the execution baseline for this milestone
    - the shared parity harness must use real bounded runtime artifacts rather than mocks
---

<objective>
Define the deep-execution parity contract and land one shared acceptance harness
that future Claude Code and OpenCode probes can reuse.
</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/134-runtime-parity-contract-and-shared-acceptance-harness/134-CONTEXT.md
@.planning/REQUIREMENTS.md
@research/knowledge-hub/knowledge_hub/runtime_support_matrix.py
@research/knowledge-hub/knowledge_hub/frontdoor_support.py
@research/knowledge-hub/runtime/scripts/run_first_run_topic_acceptance.py
@research/knowledge-hub/runtime/scripts/run_public_install_smoke.py
</context>

<tasks>

<task type="auto">
  <name>Task 1: Add failing tests for deep-execution parity separation</name>
  <files>research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_aitp_cli.py</files>
  <read_first>research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_aitp_cli.py, research/knowledge-hub/knowledge_hub/runtime_support_matrix.py, research/knowledge-hub/knowledge_hub/frontdoor_support.py</read_first>
  <action>Add red tests that require `runtime_support_matrix` and `aitp doctor` output to distinguish front-door readiness from deep-execution readiness, and require Codex to remain the explicit baseline for the new deep-execution parity surface.</action>
  <verify>python -m unittest research/knowledge-hub/tests/test_aitp_service.py research/knowledge-hub/tests/test_aitp_cli.py</verify>
  <acceptance_criteria>
    - tests fail before implementation
    - failures prove deep-execution parity is currently conflated with install/front-door readiness or absent entirely
  </acceptance_criteria>
  <done>A red contract exists for Phase `134`.</done>
</task>

<task type="auto">
  <name>Task 2: Implement the shared deep-execution parity contract</name>
  <files>research/knowledge-hub/knowledge_hub/runtime_support_matrix.py, research/knowledge-hub/knowledge_hub/frontdoor_support.py, research/knowledge-hub/knowledge_hub/cli_compat_handler.py</files>
  <read_first>research/knowledge-hub/knowledge_hub/runtime_support_matrix.py, research/knowledge-hub/knowledge_hub/frontdoor_support.py, research/knowledge-hub/knowledge_hub/cli_compat_handler.py, research/knowledge-hub/tests/test_aitp_service.py</read_first>
  <action>Add a dedicated deep-execution parity section that records, for each runtime, a deep-execution status, the Codex baseline relationship, the acceptance command, expected artifact surfaces, and current blockers without changing the existing front-door install-status semantics.</action>
  <verify>python -m unittest research/knowledge-hub/tests/test_aitp_service.py research/knowledge-hub/tests/test_aitp_cli.py</verify>
  <acceptance_criteria>
    - `runtime_support_matrix` exposes explicit deep-execution parity metadata for Codex, Claude Code, and OpenCode
    - Codex is marked as the baseline for deep execution
    - human-readable doctor output can name the difference between install readiness and deep-execution readiness
  </acceptance_criteria>
  <done>The runtime truth surface can talk honestly about deep-execution parity.</done>
</task>

<task type="auto">
  <name>Task 3: Add a shared runtime parity acceptance harness</name>
  <files>research/knowledge-hub/runtime/scripts/run_runtime_parity_acceptance.py</files>
  <read_first>research/knowledge-hub/runtime/scripts/run_first_run_topic_acceptance.py, research/knowledge-hub/runtime/scripts/run_public_install_smoke.py, research/knowledge-hub/runtime/scripts/run_scrpa_control_plane_acceptance.py, research/knowledge-hub/knowledge_hub/aitp_cli.py</read_first>
  <action>Create `research/knowledge-hub/runtime/scripts/run_runtime_parity_acceptance.py` as a bounded real-topic parity harness that can run the Codex baseline now, emits a structured parity report, and defines the reusable artifact checks that later Claude Code and OpenCode probes must satisfy.</action>
  <verify>python -m unittest research/knowledge-hub/tests/test_aitp_service.py research/knowledge-hub/tests/test_aitp_cli.py research/knowledge-hub/tests/test_agent_bootstrap_assets.py; python research/knowledge-hub/runtime/scripts/run_runtime_parity_acceptance.py --runtime codex --json</verify>
  <acceptance_criteria>
    - the harness exits 0 for the Codex baseline path
    - the emitted report names runtime id, baseline runtime, acceptance command, checked artifacts, and blockers
    - the harness relies on real bounded runtime artifacts rather than mocked success records
  </acceptance_criteria>
  <done>Phase `134` has one reusable parity acceptance entrypoint.</done>
</task>

<task type="auto">
  <name>Task 4: Document the new parity contract and harness</name>
  <files>research/knowledge-hub/runtime/README.md, research/knowledge-hub/runtime/AITP_TEST_RUNBOOK.md, research/knowledge-hub/tests/test_agent_bootstrap_assets.py</files>
  <read_first>research/knowledge-hub/runtime/README.md, research/knowledge-hub/runtime/AITP_TEST_RUNBOOK.md, research/knowledge-hub/tests/test_agent_bootstrap_assets.py, docs/INSTALL_CODEX.md, docs/INSTALL_CLAUDE_CODE.md, docs/INSTALL_OPENCODE.md</read_first>
  <action>Update runtime-facing docs and regression checks so operators can see that install readiness and deep-execution parity are different surfaces, and so the shared parity harness is discoverable before runtime-specific probe phases begin.</action>
  <verify>python -m unittest discover -s research/knowledge-hub/tests -p "test_agent_bootstrap_assets.py"</verify>
  <acceptance_criteria>
    - runtime README names the shared parity harness explicitly
    - the test runbook names the shared parity harness explicitly
    - docs/tests no longer imply that a green install row is equivalent to deep-execution parity
  </acceptance_criteria>
  <done>Docs and runtime truth stay aligned for the new parity vocabulary.</done>
</task>

<task type="auto">
  <name>Task 5: Re-run the parity slice on a green baseline</name>
  <files>research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_aitp_cli.py, research/knowledge-hub/tests/test_agent_bootstrap_assets.py</files>
  <read_first>.planning/REQUIREMENTS.md</read_first>
  <action>Re-run the targeted doctor/parity/doc slice plus the new Codex baseline parity harness so Phase `134` lands on a verified baseline before Claude Code and OpenCode-specific probe work begins.</action>
  <verify>python research/knowledge-hub/runtime/scripts/run_runtime_parity_acceptance.py --runtime codex --json</verify>
  <acceptance_criteria>
    - targeted tests exit 0
    - the shared Codex baseline parity harness exits 0
    - no requirement under `REQ-PARITY-01` or `REQ-PARITY-02` remains unexercised
  </acceptance_criteria>
  <done>Phase `134` is ready to hand off into runtime-specific parity probes.</done>
</task>

</tasks>
