Overview
The session-context-coordinator operates as an L3 Strategic Command authority within the Prismatic Platform's session-intelligence domain, responsible for managing the loading, validation, and coordination of session context data that enables cross-session development continuity. Every development session in the platform builds upon work performed in previous sessions, and the session-context-coordinator ensures that this accumulated knowledge is available, consistent, and properly scoped for each new session's requirements.
In a platform where hundreds of development sessions have generated structured context records, coordinating which context to load, how to resolve conflicts between overlapping session records, and when to trigger context refresh becomes a non-trivial orchestration challenge. The agent manages this coordination through a context lifecycle model that tracks context from creation through active use to eventual archival, ensuring that each session has access to the most relevant and current information while avoiding information overload from loading irrelevant historical context.
Operational Domain
The session-intelligence domain for context coordination encompasses the management of context files stored in .claude/session-context/, the Quality DNA persistence layer at .claude/quality-dna/current-state.json, and the Stack-Based Conversation Mode infrastructure that maintains frame-level context within individual sessions. The agent coordinates across these three context sources to provide a unified view of platform state at session start and to manage context updates during session execution.
The domain extends to context conflict resolution. When multiple sessions modify overlapping areas of the platform, their context records may contain contradictory information about the current state. The coordinator applies temporal ordering and NABLA Infinity provenance tracking to resolve these conflicts, preferring the most recent context with the highest confidence level.
Key Capabilities
- Context loading orchestration -- At session start, identifies and loads the most relevant previous session context based on recency, topic relevance, and declared dependencies. Context loading respects the Stack-Based Conversation Mode protocol's frame immutability constraints
- Cross-session continuity management -- Maintains a continuity graph that tracks relationships between sessions, enabling the coordinator to identify when a new session depends on outcomes from specific previous sessions and to load those dependencies automatically
- Context validation -- Verifies that loaded context is consistent with the current platform state, detecting stale information that may have been superseded by changes made outside the session context system
- Quality DNA synchronization -- Coordinates between session context records and the Quality DNA persistence layer, ensuring that quality state changes made during sessions are properly propagated to the canonical quality record
- Conflict resolution -- Applies deterministic conflict resolution when multiple context sources contain contradictory information, using timestamp-based ordering with NABLA Infinity provenance tiebreaking
- Autonomous operation with automatic context refresh when staleness is detected
- Telemetry integration publishing context lifecycle events under the
:prismatic_claude, :session_contextnamespace
Context Lifecycle Model
Session context progresses through a defined lifecycle managed by the coordinator.
| Phase | State | Actions | Duration |
|---|---|---|---|
| Creation | Generated by session-debrief-specialist | Validated, indexed, linked to continuity graph | At session end |
| Active | Available for loading by new sessions | Loaded on demand, validated against current state | 0-30 days |
| Aging | Less frequently referenced | Compression candidate, summary generation | 30-90 days |
| Archive | Rarely referenced directly | Compressed, key decisions extracted | 90+ days |
| Deprecated | Superseded by newer context | Marked as deprecated, references updated | Variable |
Context Loading Strategy
The coordinator employs a tiered loading strategy that balances completeness against performance.
| Tier | Content | Loading Trigger | Performance Impact |
|---|---|---|---|
| Essential | Most recent session, Quality DNA | Always loaded at session start | < 50ms |
| Related | Sessions touching same files/domains | Loaded on domain relevance match | < 200ms |
| Historical | Older sessions with key decisions | Loaded on explicit request | < 500ms |
| Archive | Compressed historical records | Loaded and decompressed on demand | < 2 seconds |
Authority Level
L3 - Strategic Command - Multi-domain coordination authority for session context management with the ability to determine context loading priorities and resolve inter-session conflicts across all platform domains.
Command Interface
| Command | Description | Authority |
|---|---|---|
/session context | Load and display the most recent session context | L3+ |
/session context --full | Load complete context chain including related sessions | L3+ |
/session validate | Verify loaded context consistency with current platform state | L2+ |
/session continuity | Display the session continuity graph and dependency relationships | L2+ |
/session refresh | Force refresh of loaded context from latest available sources | L3+ |
Coordination
| Agent | Relationship |
|---|---|
| session-debrief-specialist | Produces context artifacts that the coordinator manages |
| session-compressor-specialist | Provides compressed context that requires decompression during loading |
| session-context-synthesizer | Consumes coordinated context for synthesis operations |
| session-pattern-analyzer | Pattern analysis operates on coordinated context views |
| stack-mode-coordinator | Stack frame management integrates with session context loading |
Integration with Session Lifecycle
The session-context-coordinator integrates with the Session Lifecycle GenServer (PrismaticClaude.SessionLifecycle) to participate in session lifecycle events. At the :session_start phase, the coordinator triggers context loading and validation. During the session, the coordinator monitors for context-invalidating changes. At :session_end, the coordinator ensures that the session's contributions to the context store are properly committed and linked.
| Lifecycle Event | Coordinator Action |
|---|---|
session_start | Load essential context, validate against current state, build continuity links |
pre_command | Verify context still valid for the command's domain |
post_command | Update in-memory context with command outcomes |
session_end | Trigger debrief, commit context, update continuity graph |
Context Integrity Guarantees
The coordinator maintains several integrity guarantees that are enforced by the NO MERCY doctrine.
| Guarantee | Description | Enforcement |
|---|---|---|
| Temporal consistency | Loaded context reflects the most recent known state | Timestamp validation on every load |
| Provenance completeness | Every context element traces to its source session | NABLA provenance mandatory tagging |
| Conflict transparency | Detected conflicts are reported, never silently resolved | Alert on conflict resolution |
| Frame isolation | Stack frame context does not leak across frame boundaries | Frame ID validation on access |
| Quality DNA alignment | Session context and Quality DNA agree on current state | Cross-validation at session start |
Enforcement
The NO MERCY doctrine and the Mandatory Session Discipline Protocol require that every session begins with proper context loading and ends with proper context persistence. No session may begin without the coordinator confirming that essential context is loaded and validated. No session may end without the coordinator confirming that session outcomes are committed to the context store. Violations trigger L2 blocks that prevent session progression until context obligations are fulfilled.
Related Agents
Agents in the session-intelligence domain collaborate with the session-context-coordinator to maintain the knowledge infrastructure that enables effective cross-session development. The coordinator ensures that the platform's institutional memory is consistently available, correctly scoped, and reliably maintained across the ongoing stream of development sessions.
Connect & Contribute
Created by Tomáš Korcak (korczis) | Open Source under GHL