---
phase: 137-closure-and-cross-runtime-audit
plan: 01
type: execute
wave: 1
depends_on:
  - 134-01
  - 135-01
  - 136-01
files_modified:
  - research/knowledge-hub/runtime/scripts/run_runtime_parity_audit.py
  - research/knowledge-hub/runtime/README.md
  - research/knowledge-hub/runtime/AITP_TEST_RUNBOOK.md
  - README.md
  - research/knowledge-hub/tests/test_runtime_parity_audit.py
  - research/knowledge-hub/tests/test_agent_bootstrap_assets.py
  - .planning/ROADMAP.md
  - .planning/REQUIREMENTS.md
  - .planning/STATE.md
autonomous: true
requirements:
  - REQ-VERIFY-01
must_haves:
  truths:
    - closure must summarize both matched surfaces and still-open gaps
    - the audit must reuse the bounded runtime probes rather than inventing contradictory status
    - milestone closure must stay honest even if full parity is not achieved
---

<objective>
Add one shared cross-runtime parity audit/report surface, rerun the bounded
verification slice for Codex/Claude/OpenCode, and close the milestone phase
with explicit equivalent surfaces, degraded surfaces, and still-open gaps.
</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/137-closure-and-cross-runtime-audit/137-CONTEXT.md
@.planning/REQUIREMENTS.md
@research/knowledge-hub/runtime/scripts/run_runtime_parity_acceptance.py
@research/knowledge-hub/knowledge_hub/runtime_support_matrix.py
@research/knowledge-hub/runtime/README.md
</context>

<tasks>

<task type="auto">
  <name>Task 1: Add a shared cross-runtime parity audit surface</name>
  <files>research/knowledge-hub/runtime/scripts/run_runtime_parity_audit.py</files>
  <read_first>research/knowledge-hub/runtime/scripts/run_runtime_parity_acceptance.py</read_first>
  <action>Create one aggregate audit script that runs the Codex, Claude Code, and OpenCode bounded probes, then emits a closure report naming equivalent surfaces, degraded surfaces, and still-open gaps.</action>
  <verify>python research/knowledge-hub/runtime/scripts/run_runtime_parity_audit.py --json</verify>
  <acceptance_criteria>
    - the audit exits 0
    - the audit includes all three runtime reports
    - the audit explicitly names equivalent surfaces, degraded surfaces, and open gaps
  </acceptance_criteria>
  <done>The milestone has one shared audit/report surface.</done>
</task>

<task type="auto">
  <name>Task 2: Add targeted regression coverage for the closure report</name>
  <files>research/knowledge-hub/tests/test_runtime_parity_audit.py</files>
  <read_first>research/knowledge-hub/runtime/scripts/run_runtime_parity_audit.py</read_first>
  <action>Add a focused unit test for the audit summarization logic so closure wording and status semantics stay stable.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_runtime_parity_audit.py -q</verify>
  <acceptance_criteria>
    - the new test covers equivalent surfaces, degraded surfaces, and open gaps
    - the audit status semantics are regression-protected
  </acceptance_criteria>
  <done>The closure report has a contract test.</done>
</task>

<task type="auto">
  <name>Task 3: Document the shared audit surface</name>
  <files>research/knowledge-hub/runtime/README.md, research/knowledge-hub/runtime/AITP_TEST_RUNBOOK.md, README.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, README.md, research/knowledge-hub/tests/test_agent_bootstrap_assets.py</read_first>
  <action>Document the new closure audit command and update doc-contract tests so operators can discover the final parity summary surface.</action>
  <verify>python -m unittest discover -s research/knowledge-hub/tests -p "test_agent_bootstrap_assets.py"</verify>
  <acceptance_criteria>
    - runtime docs mention the closure audit explicitly
    - public README mentions the shared audit/report surface
    - doc-contract tests stay aligned
  </acceptance_criteria>
  <done>The closure audit is operator-visible.</done>
</task>

<task type="auto">
  <name>Task 4: Re-run the final bounded verification slice</name>
  <files>research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_runtime_parity_audit.py, research/knowledge-hub/tests/test_agent_bootstrap_assets.py</files>
  <read_first>.planning/REQUIREMENTS.md</read_first>
  <action>Re-run the narrow service/doc/audit slice so `REQ-VERIFY-01` lands on one clean evidence set.</action>
  <verify>python research/knowledge-hub/runtime/scripts/run_runtime_parity_audit.py --json</verify>
  <acceptance_criteria>
    - targeted tests exit 0
    - the audit exits 0
    - the milestone has bounded acceptance evidence for Codex, Claude Code, and OpenCode
  </acceptance_criteria>
  <done>Phase `137` is ready to summarize and hand off to milestone completion.</done>
</task>

</tasks>
