---
phase: 67-citation-traversal-and-source-family-reuse
plan: 01
type: execute
wave: 1
depends_on:
  - 66-global-source-catalog-and-cross-topic-dedup
files_modified:
  - research/knowledge-hub/knowledge_hub/source_catalog.py
  - research/knowledge-hub/knowledge_hub/cli_source_catalog_handler.py
  - research/knowledge-hub/knowledge_hub/aitp_service.py
  - research/knowledge-hub/tests/test_source_catalog.py
  - 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
autonomous: true
requirements:
  - REQ-SCAT-03
must_haves:
  truths:
    - source reuse must be queryable from compiled catalog identity
    - traversal must stay bounded and durable
    - source-family reuse must be visible without reopening raw topic indexes
---

<objective>
Turn the global source catalog into bounded citation traversal and source-family
reuse 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/67-citation-traversal-and-source-family-reuse/67-CONTEXT.md
@.planning/REQUIREMENTS.md
@research/knowledge-hub/knowledge_hub/source_catalog.py
@research/knowledge-hub/tests/test_source_catalog.py
</context>

<tasks>

<task type="auto">
  <name>Task 1: Add failing tests for traversal and family-reuse entrypoints</name>
  <files>research/knowledge-hub/tests/test_source_catalog.py, 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</files>
  <read_first>research/knowledge-hub/tests/test_source_catalog.py, research/knowledge-hub/knowledge_hub/source_catalog.py</read_first>
  <action>Add red tests that require bounded source citation traversal and source-family reuse surfaces through production code.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_source_catalog.py 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 -q</verify>
  <acceptance_criteria>
    - tests fail before implementation
    - failures prove source reuse is still static
  </acceptance_criteria>
  <done>A red contract exists for Phase `67`.</done>
</task>

<task type="auto">
  <name>Task 2: Implement traversal and source-family production surfaces</name>
  <files>research/knowledge-hub/knowledge_hub/source_catalog.py, research/knowledge-hub/knowledge_hub/cli_source_catalog_handler.py, research/knowledge-hub/knowledge_hub/aitp_service.py</files>
  <read_first>research/knowledge-hub/knowledge_hub/source_catalog.py, research/knowledge-hub/knowledge_hub/cli_source_catalog_handler.py</read_first>
  <action>Add one-hop source citation traversal and source-family reuse reports with real service/CLI entrypoints.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_source_catalog.py 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 -q</verify>
  <acceptance_criteria>
    - traversal exposes incoming and outgoing links for one canonical source
    - source-family report summarizes reuse for one source type
    - service and CLI can regenerate the same durable artifacts
  </acceptance_criteria>
  <done>Bounded citation traversal and source-family reuse land in production code.</done>
</task>

<task type="auto">
  <name>Task 3: Re-run traversal regressions and full suite</name>
  <files>research/knowledge-hub/tests/test_source_catalog.py, 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_maintainability_budgets.py</files>
  <read_first>.planning/REQUIREMENTS.md</read_first>
  <action>Re-run the traversal slice and the full knowledge-hub suite before moving to source fidelity surfaces.</action>
  <verify>python -m pytest research/knowledge-hub/tests -q</verify>
  <acceptance_criteria>
    - traversal slice exits 0
    - maintainability budgets stay green
    - no full-suite regression is introduced
  </acceptance_criteria>
  <done>Phase `67` lands on a stable verified baseline.</done>
</task>

</tasks>
