# Phase 165.5-02 Graph Analysis Summary

Status: implemented in working tree

## Goal

Close the first `999.83` slice by turning the new `L1` concept-graph surface into
deterministic graph-analysis outputs that can directly feed the existing
`literature_intake_stage` fast path for `L2` staging.

## What Landed

- new deterministic graph-analysis module:
  - `knowledge_hub/graph_analysis_tools.py`
  - `surprising_connections()` for cross-source bridge detection from shared
    graph labels/foundations
  - `suggest_questions()` for bounded graph-derived question seeds
  - `graph_diff()` for later cross-iteration comparison work
- `literature_intake_support.py` now projects concept-graph analysis into
  literature fast-path candidate units:
  - shared graph bridges -> `physical_picture`
  - graph-derived question seeds -> `workflow`
- staged `L2` entries now preserve graph-analysis provenance in the
  `l2-staging-entry` schema:
  - `graph_analysis_kind`
  - `question_type`
  - `bridge_label`
  - `source_ids`
  - `community_labels`
- runtime-side queue shaping now treats concept-graph signal as sufficient reason
  to append `literature_intake_stage`
- isolated acceptance now exists for the end-to-end graph path:
  - `runtime/scripts/run_l1_graph_analysis_staging_acceptance.py`

## Verification

- `python -m pytest research/knowledge-hub/tests/test_graph_analysis_tools.py -q`
- `python -m pytest research/knowledge-hub/tests/test_literature_intake_support.py -q`
- `python -m pytest research/knowledge-hub/tests/test_aitp_service.py -q -k "literature_intake_stage"`
- `python -m pytest research/knowledge-hub/tests/test_runtime_scripts.py -q -k "l1_graph_analysis_staging_acceptance_script_runs_on_isolated_work_root or mode_enforcement_acceptance_script_runs_on_isolated_work_root"`
- `python -m pytest research/knowledge-hub/tests/test_schema_contracts.py -q`
- `python research/knowledge-hub/runtime/scripts/run_l1_graph_analysis_staging_acceptance.py --json`

## Outcome

`999.83` is now partially live as a bounded, durable slice:

- concept-graph rows no longer stop at `L1` reporting
- cross-source graph overlap can now produce provisional `L2` staging entries
- graph-derived question seeds can now enter the same bounded staging surface as
  the older assumption/regime/method signals

## Remaining Open Work Inside 165.5-02 / 999.83

- richer graph heuristics beyond shared-label/shared-foundation bridges
- explicit cross-iteration `graph_diff()` persistence and surfacing in runtime
  artifacts
- any promotion logic that would treat graph-derived staging entries differently
  from the rest of the literature fast path
