---
phase: 35-seeded-l2-graph-mvp
plan: 01
type: execute
wave: 1
depends_on:
  - 34-01
files_modified:
  - research/knowledge-hub/knowledge_hub/aitp_service.py
  - research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json
  - research/knowledge-hub/tests/test_runtime_profiles_and_projections.py
  - research/knowledge-hub/tests/test_schema_contracts.py
autonomous: true
requirements:
  - REQ-L2-01
  - REQ-L2-04
user_setup: []
must_haves:
  truths:
    - Runtime must distinguish an actually populated canonical graph from an empty consultation shell.
    - The new graph-activation surface must describe canonical `L2`, not collaborator memory.
    - Phase `35` should improve AITP's honesty about memory strength before pretending deeper consultation maturity.
  artifacts:
    - path: research/knowledge-hub/knowledge_hub/aitp_service.py
      provides: Runtime-visible canonical graph activation summary inside `l2_memory`
      contains: "graph_surface"
    - path: research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json
      provides: Schema contract for runtime L2 graph activation visibility
      contains: "\"graph_surface\""
  key_links:
    - from: research/knowledge-hub/knowledge_hub/l2_graph.py
      to: research/knowledge-hub/knowledge_hub/aitp_service.py
      via: runtime L2 memory activation summary
      pattern: "index.jsonl|edges.jsonl"
---

<objective>
Expose canonical `L2` graph activation state in runtime `l2_memory` so AITP
and the human operator can tell whether Layer 2 contains substantive reusable
graph memory or only light consultation/writeback scaffolding.

Purpose: make `L2` activation honest and usable for the next consultation
maturity phase.
Output: `graph_surface` in runtime `l2_memory` plus schema and regression
coverage.
</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/PROJECT.md
@.planning/ROADMAP.md
@.planning/STATE.md
@.planning/phases/35-seeded-l2-graph-mvp/35-CONTEXT.md
@research/knowledge-hub/knowledge_hub/l2_graph.py
@research/knowledge-hub/knowledge_hub/aitp_service.py
@research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json
@research/knowledge-hub/tests/test_runtime_profiles_and_projections.py
@research/knowledge-hub/tests/test_schema_contracts.py
</context>

<tasks>

<task type="auto">
  <name>Task 1: Add failing runtime tests for canonical graph activation visibility</name>
  <files>research/knowledge-hub/tests/test_runtime_profiles_and_projections.py, research/knowledge-hub/tests/test_schema_contracts.py</files>
  <read_first>research/knowledge-hub/tests/test_runtime_profiles_and_projections.py, research/knowledge-hub/tests/test_schema_contracts.py, .planning/phases/35-seeded-l2-graph-mvp/35-CONTEXT.md</read_first>
  <action>Add focused failing tests that expect `bundle["l2_memory"]["graph_surface"]` and the matching runtime schema contract. Cover both the quiet baseline and the seeded-graph case so the runtime must distinguish empty versus populated canonical graph state.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_schema_contracts.py research/knowledge-hub/tests/test_runtime_profiles_and_projections.py -q</verify>
  <acceptance_criteria>
    - tests fail before service/schema implementation
    - schema tests require `graph_surface` in the `l2_projection` contract
  </acceptance_criteria>
  <done>There is a real failing contract for graph activation visibility.</done>
</task>

<task type="auto">
  <name>Task 2: Implement runtime L2 graph activation summary</name>
  <files>research/knowledge-hub/knowledge_hub/aitp_service.py, research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json</files>
  <read_first>research/knowledge-hub/knowledge_hub/aitp_service.py, research/knowledge-hub/knowledge_hub/l2_graph.py, research/knowledge-hub/runtime/schemas/progressive-disclosure-runtime-bundle.schema.json</read_first>
  <action>Extend the `l2_memory` runtime projection with a `graph_surface` that reports canonical index/edge paths, unit count, edge count, available unit types, and an activation summary/status derived from the current canonical graph files. Keep this separate from consultation and writeback surfaces.</action>
  <verify>python -m pytest research/knowledge-hub/tests/test_schema_contracts.py research/knowledge-hub/tests/test_runtime_profiles_and_projections.py -q</verify>
  <acceptance_criteria>
    - `l2_memory.graph_surface` exists in the runtime bundle
    - quiet and seeded graph states are distinguishable
    - the runtime schema validates the new field
  </acceptance_criteria>
  <done>The runtime bundle can honestly say whether canonical `L2` is actually populated.</done>
</task>

<task type="auto">
  <name>Task 3: Re-run the current integrated regression slice</name>
  <files>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_runtime_profiles_and_projections.py, research/knowledge-hub/tests/test_schema_contracts.py, research/knowledge-hub/tests/test_l2_graph_activation.py, research/knowledge-hub/tests/test_topic_start_regressions.py</files>
  <read_first>.planning/phases/34-runtime-schema-and-memory-closure/34-01-SUMMARY.md</read_first>
  <action>Re-run the same integrated regression slice used at the Phase `34` closure point so the new graph-activation visibility does not quietly break runtime or consultation behavior.</action>
  <verify>python -m pytest 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_runtime_profiles_and_projections.py research/knowledge-hub/tests/test_schema_contracts.py research/knowledge-hub/tests/test_l2_graph_activation.py research/knowledge-hub/tests/test_topic_start_regressions.py -q</verify>
  <acceptance_criteria>
    - the integrated regression slice exits 0
    - `test_l2_graph_activation.py` remains green
  </acceptance_criteria>
  <done>Phase `35` lands without regressing the Phase `34` green baseline.</done>
</task>

</tasks>

<verification>
Before declaring plan complete:
- [ ] `python -m pytest research/knowledge-hub/tests/test_schema_contracts.py research/knowledge-hub/tests/test_runtime_profiles_and_projections.py -q`
- [ ] `python -m pytest 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_runtime_profiles_and_projections.py research/knowledge-hub/tests/test_schema_contracts.py research/knowledge-hub/tests/test_l2_graph_activation.py research/knowledge-hub/tests/test_topic_start_regressions.py -q`
</verification>

<success_criteria>

- All tasks completed
- Runtime `l2_memory` can state canonical graph activation honestly
- The new surface remains clearly separate from collaborator memory and writeback state

</success_criteria>

<output>
After completion, create `.planning/phases/35-seeded-l2-graph-mvp/35-01-SUMMARY.md`
</output>
