# Phase 165.2-02 Summary

Status: implemented in working tree

## Goal

Create a literature-intake fast path under `explore -> literature` so a paper
can be registered, distilled through the L1 vault, and staged into L2 without
going through the full formal-theory audit / promotion pipeline first.

## What Landed

- literature submode detection, writeback contract, and context refocus landed
  in:
  - `research/knowledge-hub/knowledge_hub/mode_envelope_support.py`
  - `research/knowledge-hub/knowledge_hub/runtime_bundle_support.py`
- schema-backed L1 -> L2 staging bridge landed in:
  - `research/knowledge-hub/knowledge_hub/literature_intake_support.py`
  - `research/knowledge-hub/schemas/l2-staging-entry.schema.json`
  - `research/knowledge-hub/knowledge_hub/l2_graph.py`
  - `research/knowledge-hub/knowledge_hub/l2_staging.py`
- auto-action queue shaping and execution now append and run
  `literature_intake_stage` when the runtime bundle is in literature submode:
  - `research/knowledge-hub/knowledge_hub/aitp_service.py`
  - `research/knowledge-hub/knowledge_hub/auto_action_support.py`
  - `research/knowledge-hub/runtime/scripts/orchestrate_topic.py`
  - `research/knowledge-hub/runtime/scripts/decide_next_action.py`
  - `research/knowledge-hub/runtime/scripts/orchestrator_contract_support.py`
- isolated end-to-end acceptance for the mode envelope plus literature fast
  path landed in:
  - `research/knowledge-hub/runtime/scripts/run_mode_enforcement_acceptance.py`

## Verification

- `python -m pytest research/knowledge-hub/tests/test_literature_mode_envelope.py -q`
- `python -m pytest research/knowledge-hub/tests/test_runtime_scripts.py -q`
- `python -m pytest research/knowledge-hub/tests/test_aitp_service.py -q -k "test_execute_auto_actions_appends_and_runs_literature_intake_stage or test_execute_auto_actions_skips_literature_intake_stage_outside_literature_submode"`
- `python research/knowledge-hub/runtime/scripts/run_mode_enforcement_acceptance.py --json`

## Outcome

Plan `165.2-02` is closed as a bounded fast-path slice.

- `register_arxiv_source.py` can feed a literature topic into an explore-mode
  runtime bundle that activates `active_submode = literature`
- the literature bundle now foregrounds L1 vault wiki pages, staging manifest,
  and canonical index while deferring validation/promotion surfaces
- staged entries are written to `canonical/staging/entries/` with
  `provenance.literature_intake_fast_path = true`
- `consult-l2 --include-staging` can now see those staged literature units
  without prematurely moving them into canonical `index.jsonl`
