Skip to content

Commit 1c718c1

Browse files
committed
merge: integrate narrowed MCP gap closure
2 parents ee10d29 + e4becc6 commit 1c718c1

23 files changed

Lines changed: 4872 additions & 213 deletions

README.md

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,24 @@ surface** for data-heavy work. These tools run in-process alongside the plugin
8484
hooks and share the same canonical root-session identity and Redis/FalkorDB hot
8585
tier.
8686

87+
The `session_*` tools also write into the same local continuity model as the
88+
rest of the session: their bounded summaries are recorded as structured events,
89+
folded into the local snapshot, and preserved through compaction under the same
90+
`<session_memory>` envelope used for ordinary chat continuity.
91+
8792
- **Bounded execution** (`session_execute`, `session_execute_file`,
8893
`session_batch_execute`) — run commands or process files locally, store full
8994
output in the local corpus, and return only a bounded summary to the model.
95+
`session_batch_execute` supports ordered mixed steps, so one request can
96+
combine bounded command execution with local corpus search.
9097
- **Local indexing and search** (`session_index`, `session_search`,
9198
`session_fetch_and_index`) — index content into a per-session local corpus in
92-
Redis/FalkorDB and search it with bounded result sets.
99+
Redis/FalkorDB and search it with bounded result sets. The local corpus stays
100+
local-first: indexing and retrieval happen against the session's local store,
101+
while any Graphiti augmentation remains asynchronous and cache-backed.
102+
`session_index` accepts either inline `content` or a local `path`; when the
103+
same `source` and `label` are indexed again for one root session, the prior
104+
logical document is replaced instead of appended.
93105
- **Diagnostics** (`session_stats`, `session_doctor`) — inspect session state
94106
and corpus health.
95107

@@ -311,8 +323,9 @@ Events are also queued for background ingestion into long-term memory:
311323

312324
- **On idle** (`session.idle`): buffered events are sent to Graphiti and the
313325
priority-tiered snapshot is rebuilt.
314-
- **Before compaction** (`session.compacted`): all pending events are sent
315-
immediately so nothing is lost.
326+
- **After compaction** (`session.compacted`): the compaction summary and any
327+
pending continuity are scheduled for background Graphiti ingestion so nothing
328+
is lost across compaction boundaries.
316329

317330
### Compaction Preservation
318331

docs/ContextOverhaul.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,15 @@
77
- `docs/superpowers/plans/2026-03-20-context-mode-mcp-first-implementation.md`
88
(implementation)
99

10+
> **Historical-only note:** This document preserves the earlier native-routing
11+
> overhaul proposal and its original section numbering. Any implementation
12+
> phases, file-change lists, or acceptance checklists below are historical notes
13+
> only and are **not** the active backlog for the repository. For current
14+
> architecture and acceptance criteria, use the two superseding MCP-first plan
15+
> documents above together with `README.md`.
16+
1017
**Date:** 2026-03-20\
11-
**Canonical refs:** `AGENTS.md`, `README.md`, `docs/ContextOverhaulTests.md`
18+
**Historical refs:** `README.md`, `docs/ContextOverhaulTests.md`
1219

1320
---
1421

docs/ContextOverhaulTests.md

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ superseded)\
1111
> design. The active architecture is now MCP-first; see the implementation plan
1212
> linked above for the current acceptance criteria. The suites below remain as
1313
> historical reference for the original hot-path invariants.
14+
>
15+
> **Historical-only note:** Checklist items in this document are not the
16+
> authoritative Task 7 gate. Use the implementation plan above for current
17+
> MCP-first acceptance, including local-first `<session_memory>`, compaction
18+
> continuity, and Graphiti-off-the-hot-path verification.
1419
1520
---
1621

@@ -209,7 +214,7 @@ and within budget.
209214
- [ ] B-3: Total injected payload (session + persistent) does not exceed 5% of a
210215
128k-token model context (≈ 25 600 chars).
211216
- [ ] B-4: Snapshot XML conforms to the priority-tiered schema from
212-
`ContextOverhaul.md` §8.3.
217+
[`docs/ContextOverhaul.md` §8.3](ContextOverhaul.md#83-snapshot-policy).
213218
- [ ] B-5: Snapshot respects the 3 KB budget — lower-priority sections are
214219
truncated first.
215220
- [ ] B-6: Each `session_memory` always contains `last_request`; list sections
@@ -541,12 +546,13 @@ parent.
541546
542547
**Tier:** Unit + Integration
543548
544-
**Canonical design reference:** `docs/ContextOverhaul.md` §11.1
549+
**Historical design reference:**
550+
[`docs/ContextOverhaul.md` §11.1](ContextOverhaul.md#111-kept-divergence)
545551
546552
**Divergence note:** This behavior intentionally differs from official
547553
`mksglu/context-mode`, which treats subagent work as summarized tool events
548-
rather than first-class session participants. See §11.1 of the design doc for
549-
the rationale and alignment guidance.
554+
rather than first-class session participants. See the historical §11.1 design
555+
note above for the rationale and alignment guidance.
550556
551557
#### Checklist
552558

docs/superpowers/plans/2026-03-20-context-mode-mcp-first-implementation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Context-Mode-Aligned MCP-First Replacement — Implementation Task Plan
22

3-
**Status:** Planned\
3+
**Status:** Completed\
44
**Date:** 2026-03-20\
55
**Primary architecture:**
66
`docs/superpowers/plans/2026-03-20-context-mode-mcp-first.md`\

docs/superpowers/plans/2026-03-20-context-mode-mcp-first.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Context-Mode-Aligned MCP-First Replacement Plan
22

3-
**Status:** Superseding plan\
3+
**Status:** Completed\
44
**Date:** 2026-03-20\
55
**Supersedes:** `plans/ContextOverhaul.md` and any in-progress Task 1 / Task 2
66
work derived from that native-hook-first plan\

0 commit comments

Comments
 (0)