---
phase: 136-opencode-deep-execution-probe
plan: 01
type: execute
wave: 1
depends_on:
  - 134-01
  - 135-01
files_modified:
  - research/knowledge-hub/runtime/scripts/run_runtime_parity_acceptance.py
  - research/knowledge-hub/knowledge_hub/runtime_support_matrix.py
  - research/knowledge-hub/knowledge_hub/frontdoor_support.py
  - docs/INSTALL_OPENCODE.md
  - .opencode/INSTALL.md
  - docs/README.opencode.md
  - research/knowledge-hub/runtime/README.md
  - research/knowledge-hub/runtime/AITP_TEST_RUNBOOK.md
  - README.md
  - research/knowledge-hub/tests/test_aitp_service.py
  - research/knowledge-hub/tests/test_agent_bootstrap_assets.py
autonomous: true
requirements:
  - REQ-PARITY-04
must_haves:
  truths:
    - the probe must enter through OpenCode's supported plugin bootstrap surface
    - the report must name both matched surfaces and remaining parity gaps
    - landing a probe must not be confused with full parity closure
---

<objective>
Land one honest OpenCode deep-execution probe that reuses the shared parity
harness, reaches real bounded AITP artifacts, and updates doctor/runtime truth
surfaces to reflect that the OpenCode probe now exists.
</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/136-opencode-deep-execution-probe/136-CONTEXT.md
@.planning/REQUIREMENTS.md
@research/knowledge-hub/runtime/scripts/run_runtime_parity_acceptance.py
@research/knowledge-hub/knowledge_hub/runtime_support_matrix.py
@docs/INSTALL_OPENCODE.md
@.opencode/plugins/aitp.js
</context>

<tasks>

<task type="auto">
  <name>Task 1: Add red contracts for the landed OpenCode probe state</name>
  <files>research/knowledge-hub/tests/test_aitp_service.py</files>
  <read_first>research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/knowledge_hub/runtime_support_matrix.py, research/knowledge-hub/knowledge_hub/frontdoor_support.py</read_first>
  <action>Add or update tests so OpenCode no longer appears as `probe_pending` once the dedicated runtime probe exists, while parity summary still keeps OpenCode in the pending set until the closure phase actually verifies parity.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_aitp_service.py -q -k "runtime_support_matrix_for_ready_baseline_and_targets or runtime_support_matrix_reports_partial_front_doors_honestly"</verify>
  <acceptance_criteria>
    - current tests fail before implementation
    - failures prove the runtime truth surface still says OpenCode probe is not implemented
  </acceptance_criteria>
  <done>The Phase `136` contract is red.</done>
</task>

<task type="auto">
  <name>Task 2: Implement the OpenCode deep-execution probe in the shared harness</name>
  <files>research/knowledge-hub/runtime/scripts/run_runtime_parity_acceptance.py</files>
  <read_first>research/knowledge-hub/runtime/scripts/run_runtime_parity_acceptance.py, .opencode/plugins/aitp.js, research/knowledge-hub/knowledge_hub/agent_install_support.py, research/knowledge-hub/knowledge_hub/chat_session_support.py</read_first>
  <action>Extend the shared parity harness so `--runtime opencode` installs OpenCode assets into a temp project root, executes the plugin module's real hooks with Node, drives a bounded natural-language `aitp session-start` plus `status` flow on an isolated kernel root, and emits a structured comparison against the Codex baseline.</action>
  <verify>python research/knowledge-hub/runtime/scripts/run_runtime_parity_acceptance.py --runtime opencode --json</verify>
  <acceptance_criteria>
    - the OpenCode probe exits 0
    - the report contains real plugin-hook and runtime artifact evidence
    - the report includes matched surfaces and explicit falls-short surfaces relative to Codex
  </acceptance_criteria>
  <done>The shared harness contains an honest OpenCode-specific probe.</done>
</task>

<task type="auto">
  <name>Task 3: Update doctor/runtime truth surfaces for the landed OpenCode probe</name>
  <files>research/knowledge-hub/knowledge_hub/runtime_support_matrix.py, research/knowledge-hub/knowledge_hub/frontdoor_support.py</files>
  <read_first>research/knowledge-hub/knowledge_hub/runtime_support_matrix.py, research/knowledge-hub/knowledge_hub/frontdoor_support.py</read_first>
  <action>Change the deep-execution row for OpenCode from "probe not implemented" to "probe available" when the front door is ready, while keeping parity-summary semantics honest and non-closed.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_aitp_service.py -q -k "runtime_support_matrix_for_ready_baseline_and_targets or runtime_support_matrix_reports_partial_front_doors_honestly"</verify>
  <acceptance_criteria>
    - doctor JSON shows OpenCode probe availability explicitly
    - parity summary still does not claim convergence
  </acceptance_criteria>
  <done>Runtime truth can now say the OpenCode probe exists without overclaiming parity.</done>
</task>

<task type="auto">
  <name>Task 4: Update docs and bootstrap checks for the OpenCode probe</name>
  <files>docs/INSTALL_OPENCODE.md, .opencode/INSTALL.md, docs/README.opencode.md, 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>docs/INSTALL_OPENCODE.md, .opencode/INSTALL.md, docs/README.opencode.md, research/knowledge-hub/runtime/README.md, research/knowledge-hub/runtime/AITP_TEST_RUNBOOK.md, research/knowledge-hub/tests/test_agent_bootstrap_assets.py</read_first>
  <action>Document how operators should run the OpenCode probe and what its remaining bounded gap means, then update doc-contract tests so that wording stays aligned.</action>
  <verify>python -m unittest discover -s research/knowledge-hub/tests -p "test_agent_bootstrap_assets.py"</verify>
  <acceptance_criteria>
    - docs mention the OpenCode probe explicitly
    - docs do not imply that the probe equals full parity closure
    - bootstrap/doc tests stay aligned with the new language
  </acceptance_criteria>
  <done>Operators can discover and interpret the OpenCode probe honestly.</done>
</task>

<task type="auto">
  <name>Task 5: Re-run the targeted Phase 136 slice on a green baseline</name>
  <files>research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_agent_bootstrap_assets.py</files>
  <read_first>.planning/REQUIREMENTS.md</read_first>
  <action>Run the narrow service/doc slice plus the OpenCode parity harness itself to capture the bounded evidence for `REQ-PARITY-04` before moving to closure and cross-runtime audit work.</action>
  <verify>python research/knowledge-hub/runtime/scripts/run_runtime_parity_acceptance.py --runtime opencode --json</verify>
  <acceptance_criteria>
    - targeted tests exit 0
    - the OpenCode probe exits 0
    - no part of `REQ-PARITY-04` remains unexercised
  </acceptance_criteria>
  <done>Phase `136` is ready to summarize and close.</done>
</task>

</tasks>
