---
phase: 62-graph-traversal-and-retrieval-foundation
plan: 01
type: execute
wave: 1
depends_on:
  - 58-mvp-node-family-activation-and-physical-picture-closure
  - 59-lightweight-l2-entry-and-seed-command-family
  - 60-seeded-direction-and-bounded-retrieval-proof
files_modified:
  - research/knowledge-hub/knowledge_hub/l2_graph.py
  - research/knowledge-hub/knowledge_hub/aitp_service.py
  - research/knowledge-hub/tests/test_l2_graph_activation.py
  - research/knowledge-hub/tests/test_aitp_service.py
  - research/knowledge-hub/tests/test_aitp_cli_e2e.py
autonomous: true
requirements:
  - REQ-L2RET-01
  - REQ-L2RET-02
  - REQ-L2RET-05
  - REQ-VERIFY-01
must_haves:
  truths:
    - retrieval must expose real graph traversal rather than only flat neighbor lists
    - expansion must stay bounded and profile-aware
    - trust boundaries must remain explicit
---

<objective>
Add the first real graph-traversal maturity layer on top of the seeded MVP `L2`
memory surface.
</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/62-graph-traversal-and-retrieval-foundation/62-CONTEXT.md
@.planning/REQUIREMENTS.md
@research/knowledge-hub/knowledge_hub/l2_graph.py
@research/knowledge-hub/knowledge_hub/aitp_service.py
@research/knowledge-hub/tests/test_l2_graph_activation.py
</context>

<tasks>

<task type="auto">
  <name>Task 1: Add failing tests for bounded graph traversal output</name>
  <files>research/knowledge-hub/tests/test_l2_graph_activation.py, research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_aitp_cli_e2e.py</files>
  <read_first>research/knowledge-hub/tests/test_l2_graph_activation.py, research/knowledge-hub/knowledge_hub/l2_graph.py</read_first>
  <action>Add failing tests that require `consult_l2` to expose bounded traversal/path information explaining how expanded hits were reached.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_l2_graph_activation.py research/knowledge-hub/tests/test_aitp_service.py research/knowledge-hub/tests/test_aitp_cli_e2e.py -q</verify>
  <acceptance_criteria>
    - tests fail before implementation
    - failures prove retrieval is still too shallow
  </acceptance_criteria>
  <done>A red contract exists for Phase `62`.</done>
</task>

<task type="auto">
  <name>Task 2: Implement bounded traversal-aware retrieval</name>
  <files>research/knowledge-hub/knowledge_hub/l2_graph.py, research/knowledge-hub/knowledge_hub/aitp_service.py</files>
  <read_first>research/knowledge-hub/knowledge_hub/l2_graph.py, research/knowledge-hub/knowledge_hub/l2_compiler.py</read_first>
  <action>Add bounded traversal/path summaries to the current consult path and surface them through service retrieval wrappers.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_l2_graph_activation.py research/knowledge-hub/tests/test_aitp_service.py -q</verify>
  <acceptance_criteria>
    - expanded hits carry explicit traversal context
    - retrieval stays bounded and profile-aware
  </acceptance_criteria>
  <done>Retrieval exposes real traversal instead of opaque neighbor expansion.</done>
</task>

<task type="auto">
  <name>Task 3: Re-run the targeted graph-retrieval slice</name>
  <files>research/knowledge-hub/tests/test_l2_graph_activation.py, research/knowledge-hub/tests/test_aitp_service.py, research/knowledge-hub/tests/test_aitp_cli_e2e.py</files>
  <read_first>.planning/REQUIREMENTS.md</read_first>
  <action>Re-run the targeted slice and keep the full suite green before moving deeper into v1.45.</action>
  <verify>python -m pytest research/knowledge-hub/tests -q</verify>
  <acceptance_criteria>
    - targeted retrieval slice exits 0
    - no full-suite regression is introduced
  </acceptance_criteria>
  <done>Phase `62` lands on a stable tested baseline.</done>
</task>

</tasks>
