---
phase: 70-analytical-validation-mode-baseline
plan: 01
type: execute
wave: 1
depends_on: []
files_modified:
  - research/knowledge-hub/knowledge_hub/semantic_routing.py
  - research/knowledge-hub/knowledge_hub/aitp_cli.py
  - research/knowledge-hub/knowledge_hub/aitp_service.py
  - research/knowledge-hub/knowledge_hub/topic_shell_support.py
  - research/knowledge-hub/tests/test_semantic_routing.py
  - research/knowledge-hub/tests/test_aitp_cli.py
  - research/knowledge-hub/tests/test_aitp_service.py
autonomous: true
requirements:
  - REQ-ANV-01
  - REQ-ANV-02
must_haves:
  truths:
    - analytical validation must be a real production mode
    - theory-synthesis should not silently fall back to generic hybrid review
    - validation mode changes must propagate through runtime shell surfaces
---

<objective>
Make analytical validation into a first-class production mode and align
theory-synthesis defaults with it.
</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/70-analytical-validation-mode-baseline/70-CONTEXT.md
@.planning/REQUIREMENTS.md
@research/knowledge-hub/knowledge_hub/semantic_routing.py
@research/knowledge-hub/tests/test_semantic_routing.py
</context>

<tasks>

<task type="auto">
  <name>Task 1: Add failing tests for analytical validation mode</name>
  <files>research/knowledge-hub/tests/test_semantic_routing.py, research/knowledge-hub/tests/test_aitp_cli.py, research/knowledge-hub/tests/test_aitp_service.py</files>
  <read_first>research/knowledge-hub/tests/test_semantic_routing.py, research/knowledge-hub/knowledge_hub/aitp_service.py</read_first>
  <action>Add red tests that require analytical validation to be a real production mode and default theory-synthesis route.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_semantic_routing.py research/knowledge-hub/tests/test_aitp_cli.py research/knowledge-hub/tests/test_aitp_service.py -q</verify>
  <acceptance_criteria>
    - tests fail before implementation
    - failures prove analytical work still falls into generic hybrid review
  </acceptance_criteria>
  <done>A red contract exists for Phase `70`.</done>
</task>

<task type="auto">
  <name>Task 2: Implement analytical validation mode through production surfaces</name>
  <files>research/knowledge-hub/knowledge_hub/semantic_routing.py, research/knowledge-hub/knowledge_hub/aitp_cli.py, research/knowledge-hub/knowledge_hub/aitp_service.py, research/knowledge-hub/knowledge_hub/topic_shell_support.py</files>
  <read_first>research/knowledge-hub/knowledge_hub/semantic_routing.py, research/knowledge-hub/knowledge_hub/aitp_cli.py</read_first>
  <action>Add `analytical` verification mode, analytical required checks, and theory-synthesis default routing into the existing runtime shell path.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_semantic_routing.py research/knowledge-hub/tests/test_aitp_cli.py research/knowledge-hub/tests/test_aitp_service.py -q</verify>
  <acceptance_criteria>
    - `verify --mode analytical` is accepted
    - `prepare_verification(mode=\"analytical\")` returns analytical validation
    - theory-synthesis topics default to analytical validation
  </acceptance_criteria>
  <done>Analytical validation becomes a real production mode.</done>
</task>

<task type="auto">
  <name>Task 3: Re-run analytical-mode regressions and full suite</name>
  <files>research/knowledge-hub/tests/test_semantic_routing.py, research/knowledge-hub/tests/test_aitp_cli.py, research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_maintainability_budgets.py</files>
  <read_first>.planning/REQUIREMENTS.md</read_first>
  <action>Re-run the analytical-mode slice and the full knowledge-hub suite before moving to analytical review artifacts.</action>
  <verify>python -m pytest research/knowledge-hub/tests -q</verify>
  <acceptance_criteria>
    - analytical-mode slice exits 0
    - maintainability budgets stay green
    - no full-suite regression is introduced
  </acceptance_criteria>
  <done>Phase `70` lands on a stable verified baseline.</done>
</task>

</tasks>
