---
phase: 75-research-trajectory-and-cross-session-continuity
plan: 01
type: execute
wave: 1
depends_on:
  - 74-collaborator-profile-and-session-continuity
files_modified:
  - research/knowledge-hub/knowledge_hub/research_trajectory_support.py
  - research/knowledge-hub/knowledge_hub/topic_shell_support.py
  - research/knowledge-hub/knowledge_hub/aitp_service.py
  - research/knowledge-hub/knowledge_hub/kernel_markdown_renderers.py
  - research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json
  - research/knowledge-hub/tests/test_aitp_service.py
  - research/knowledge-hub/tests/test_schema_contracts.py
autonomous: true
requirements:
  - REQ-TRAJ-01
  - REQ-TRAJ-02
must_haves:
  truths:
    - trajectory continuity must be durable and topic-scoped, not only raw collaborator-memory rows
    - current-topic and session-start surfaces must expose trajectory paths and summary through production code
    - watchlisted hotspot budgets must remain green
---

<objective>
Make research-trajectory continuity explicit across topic status, current-topic
memory, and session-start restart surfaces.
</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/75-research-trajectory-and-cross-session-continuity/75-CONTEXT.md
@.planning/REQUIREMENTS.md
@research/knowledge-hub/knowledge_hub/aitp_service.py
@research/knowledge-hub/tests/test_aitp_service.py
</context>

<tasks>

<task type="auto">
  <name>Task 1: Add failing trajectory continuity tests</name>
  <files>research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_schema_contracts.py</files>
  <read_first>research/knowledge-hub/knowledge_hub/collaborator_profile_support.py</read_first>
  <action>Add red tests that require research trajectory to appear in topic status, current-topic memory, session-start artifacts, and the runtime-facing schema surface.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_aitp_service.py -k "research_trajectory or build_current_topic_memory_payload_includes_research_trajectory_when_present or start_chat_session_materializes_current_topic_route" -q</verify>
  <acceptance_criteria>
    - tests fail before implementation
    - failures prove recent trajectory is still trapped in raw memory rows
  </acceptance_criteria>
  <done>A red contract exists for trajectory continuity.</done>
</task>

<task type="auto">
  <name>Task 2: Materialize research trajectory and wire continuity surfaces</name>
  <files>research/knowledge-hub/knowledge_hub/research_trajectory_support.py, research/knowledge-hub/knowledge_hub/topic_shell_support.py, research/knowledge-hub/knowledge_hub/aitp_service.py, research/knowledge-hub/knowledge_hub/kernel_markdown_renderers.py, research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json</files>
  <read_first>research/knowledge-hub/knowledge_hub/research_judgment_runtime_support.py</read_first>
  <action>Create durable trajectory artifacts and project them into current-topic memory, topic status, and session-start continuity paths through production code.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_aitp_service.py research/knowledge-hub/tests/test_schema_contracts.py -q</verify>
  <acceptance_criteria>
    - research-trajectory tests turn green
    - current-topic and session-start surfaces expose trajectory paths
    - continuity summary names recent trajectory and adjacent-topic carryover
  </acceptance_criteria>
  <done>Phase `75` has real cross-session trajectory continuity surfaces.</done>
</task>

<task type="auto">
  <name>Task 3: Re-run targeted slice, budgets, and the full suite</name>
  <files>research/knowledge-hub/tests/test_maintainability_budgets.py, research/knowledge-hub/tests</files>
  <read_first>.planning/REQUIREMENTS.md</read_first>
  <action>Re-run the continuity slice, watch budgets, and the full knowledge-hub suite to keep `v1.48` on a green baseline.</action>
  <verify>python -m pytest research/knowledge-hub/tests -q</verify>
  <acceptance_criteria>
    - targeted continuity slice exits 0
    - maintainability watch budgets stay green
    - full suite exits 0
  </acceptance_criteria>
  <done>Phase `75` is ready to hand off and Phase `76` can start from a green baseline.</done>
</task>

</tasks>
