---
phase: 39-task-type-aware-interaction-bias
plan: 01
type: execute
wave: 1
depends_on:
  - 38-01
files_modified:
  - research/knowledge-hub/knowledge_hub/aitp_service.py
  - research/knowledge-hub/tests/test_runtime_profiles_and_projections.py
autonomous: true
requirements:
  - REQ-ORCH-03
user_setup: []
must_haves:
  truths:
    - `task_type` must actually affect runtime interaction posture
    - stronger trust gates must still override task-type freedom
    - open exploration and target-driven execution should no longer look identical in the runtime contract
  artifacts:
    - path: research/knowledge-hub/knowledge_hub/aitp_service.py
      provides: task-type-aware interaction routing
      contains: "_derive_interaction_contract"
---

<objective>
Make runtime interaction posture consult `task_type` so exploratory and
conjectural work can stay freer than target-driven execution without weakening
hard trust boundaries.
</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/39-task-type-aware-interaction-bias/39-CONTEXT.md
@research/knowledge-hub/knowledge_hub/aitp_service.py
@research/knowledge-hub/tests/test_runtime_profiles_and_projections.py
</context>

<tasks>

<task type="auto">
  <name>Task 1: Add failing tests for task-type-aware interaction posture</name>
  <files>research/knowledge-hub/tests/test_runtime_profiles_and_projections.py</files>
  <read_first>research/knowledge-hub/tests/test_runtime_profiles_and_projections.py, .planning/phases/39-task-type-aware-interaction-bias/39-CONTEXT.md</read_first>
  <action>Add failing tests that require `open_exploration` to prefer `free_explore`, `target_driven_execution` to prefer `silent_continue`, and hard blockers to keep overriding both.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_runtime_profiles_and_projections.py -k "interaction" -q</verify>
  <acceptance_criteria>
    - tests fail before implementation
  </acceptance_criteria>
  <done>Interaction bias is locked as a real failing contract.</done>
</task>

<task type="auto">
  <name>Task 2: Implement task-type-aware interaction bias</name>
  <files>research/knowledge-hub/knowledge_hub/aitp_service.py</files>
  <read_first>research/knowledge-hub/knowledge_hub/aitp_service.py</read_first>
  <action>Make `_derive_interaction_contract()` consult explicit `task_type` after blocker/update gates. `open_exploration` should default to `free_explore`; `target_driven_execution` should default to `silent_continue`; stronger blockers still win first.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_runtime_profiles_and_projections.py -k "interaction" -q</verify>
  <acceptance_criteria>
    - interaction posture differs by task type
    - blocker/checkpoint behavior remains unchanged
  </acceptance_criteria>
  <done>Task type now materially affects runtime continuation style.</done>
</task>

<task type="auto">
  <name>Task 3: Re-run the integrated regression slice</name>
  <files>research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_aitp_cli.py, research/knowledge-hub/tests/test_aitp_cli_e2e.py, research/knowledge-hub/tests/test_runtime_profiles_and_projections.py, research/knowledge-hub/tests/test_schema_contracts.py, research/knowledge-hub/tests/test_l2_graph_activation.py, research/knowledge-hub/tests/test_topic_start_regressions.py</files>
  <read_first>.planning/phases/38-task-type-runtime-seeding/38-01-SUMMARY.md</read_first>
  <action>Re-run the integrated regression slice so interaction bias lands on top of the current green baseline.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_aitp_service.py research/knowledge-hub/tests/test_aitp_cli.py research/knowledge-hub/tests/test_aitp_cli_e2e.py research/knowledge-hub/tests/test_runtime_profiles_and_projections.py research/knowledge-hub/tests/test_schema_contracts.py research/knowledge-hub/tests/test_l2_graph_activation.py research/knowledge-hub/tests/test_topic_start_regressions.py -q</verify>
  <acceptance_criteria>
    - the integrated regression slice exits 0
  </acceptance_criteria>
  <done>Phase `39` lands without regressing the Phase `38` baseline.</done>
</task>

</tasks>
