---
phase: 38-task-type-runtime-seeding
plan: 01
type: execute
wave: 1
depends_on: []
files_modified:
  - research/knowledge-hub/knowledge_hub/aitp_service.py
  - research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json
  - research/knowledge-hub/schemas/topic-synopsis.schema.json
  - schemas/topic-synopsis.schema.json
  - research/knowledge-hub/tests/test_runtime_profiles_and_projections.py
  - research/knowledge-hub/tests/test_schema_contracts.py
autonomous: true
requirements:
  - REQ-ORCH-01
  - REQ-ORCH-02
user_setup: []
must_haves:
  truths:
    - runtime and human-facing topic artifacts must explicitly expose `task_type`
    - `task_type` must distinguish exploratory, conjectural, and target-driven work
    - the first slice may be heuristic, but it must be explicit and testable
  artifacts:
    - path: research/knowledge-hub/knowledge_hub/aitp_service.py
      provides: task-type inference and runtime/topic write-through
      contains: "task_type"
    - path: research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json
      provides: runtime bundle contract for task type
      contains: "\"task_type\""
  key_links:
    - from: docs/superpowers/specs/2026-04-08-aitp-research-scenario-and-layer-responsibility-freeze-design.md
      to: research/knowledge-hub/knowledge_hub/aitp_service.py
      via: task-type runtime seeding
      pattern: "open_exploration|conjecture_attempt|target_driven_execution"
---

<objective>
Add `task_type` as a first-class runtime and topic-artifact axis so AITP can
explicitly distinguish exploratory, conjectural, and target-driven research
jobs.

Purpose: begin operationalizing the scenario-freeze design instead of leaving
it only in docs.
Output: task-type inference plus runtime/topic artifact exposure and regression
coverage.
</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/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/38-task-type-runtime-seeding/38-CONTEXT.md
@docs/superpowers/specs/2026-04-08-aitp-research-scenario-and-layer-responsibility-freeze-design.md
@research/knowledge-hub/knowledge_hub/aitp_service.py
@research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json
@research/knowledge-hub/schemas/topic-synopsis.schema.json
@schemas/topic-synopsis.schema.json
@research/knowledge-hub/tests/test_runtime_profiles_and_projections.py
@research/knowledge-hub/tests/test_schema_contracts.py
</context>

<tasks>

<task type="auto">
  <name>Task 1: Add failing tests for task-type runtime seeding</name>
  <files>research/knowledge-hub/tests/test_runtime_profiles_and_projections.py, research/knowledge-hub/tests/test_schema_contracts.py</files>
  <read_first>research/knowledge-hub/tests/test_runtime_profiles_and_projections.py, research/knowledge-hub/tests/test_schema_contracts.py, .planning/phases/38-task-type-runtime-seeding/38-CONTEXT.md</read_first>
  <action>Add failing tests that require `task_type` in topic synopsis, active research contract, and idea packet inside the runtime bundle, and verify the runtime can infer `open_exploration`, `conjecture_attempt`, and `target_driven_execution` for representative requests.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_runtime_profiles_and_projections.py research/knowledge-hub/tests/test_schema_contracts.py -q</verify>
  <acceptance_criteria>
    - tests fail before implementation
    - runtime/schema contracts require `task_type`
  </acceptance_criteria>
  <done>A real failing contract exists for task-type runtime seeding.</done>
</task>

<task type="auto">
  <name>Task 2: Implement task-type inference and artifact exposure</name>
  <files>research/knowledge-hub/knowledge_hub/aitp_service.py, research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json, research/knowledge-hub/schemas/topic-synopsis.schema.json, schemas/topic-synopsis.schema.json</files>
  <read_first>research/knowledge-hub/knowledge_hub/aitp_service.py, docs/superpowers/specs/2026-04-08-aitp-research-scenario-and-layer-responsibility-freeze-design.md, research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json</read_first>
  <action>Add explicit `task_type` inference and write it through research contract, idea packet, runtime active-research-contract, and topic synopsis. Keep the first inference bounded and testable rather than pretending full orchestration intelligence.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_runtime_profiles_and_projections.py research/knowledge-hub/tests/test_schema_contracts.py -q</verify>
  <acceptance_criteria>
    - runtime bundle carries explicit `task_type`
    - topic-facing surfaces persist the same task type
    - representative requests map to the expected task type
  </acceptance_criteria>
  <done>The scenario-freeze task-type axis is now operational in runtime.</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/V1.34_CLOSURE_AUDIT.md</read_first>
  <action>Re-run the current integrated regression slice so task-type runtime seeding lands on top of the `v1.34` green baseline without breaking memory, consultation, or exploration surfaces.</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 `38` lands without regressing the closed `v1.34` baseline.</done>
</task>

</tasks>

<verification>
Before declaring plan complete:
- [ ] `python -m pytest research/knowledge-hub/tests/test_runtime_profiles_and_projections.py research/knowledge-hub/tests/test_schema_contracts.py -q`
- [ ] `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`
</verification>

<success_criteria>

- All tasks completed
- Runtime and topic artifacts explicitly expose `task_type`

</success_criteria>

<output>
After completion, create `.planning/phases/38-task-type-runtime-seeding/38-01-SUMMARY.md`
</output>
