1 agents

session-context-coordinator

session-context-coordinator

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_context namespace

Context Lifecycle Model

Session context progresses through a defined lifecycle managed by the coordinator.

PhaseStateActionsDuration
CreationGenerated by session-debrief-specialistValidated, indexed, linked to continuity graphAt session end
ActiveAvailable for loading by new sessionsLoaded on demand, validated against current state0-30 days
AgingLess frequently referencedCompression candidate, summary generation30-90 days
ArchiveRarely referenced directlyCompressed, key decisions extracted90+ days
DeprecatedSuperseded by newer contextMarked as deprecated, references updatedVariable

Context Loading Strategy

The coordinator employs a tiered loading strategy that balances completeness against performance.

TierContentLoading TriggerPerformance Impact
EssentialMost recent session, Quality DNAAlways loaded at session start< 50ms
RelatedSessions touching same files/domainsLoaded on domain relevance match< 200ms
HistoricalOlder sessions with key decisionsLoaded on explicit request< 500ms
ArchiveCompressed historical recordsLoaded 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

CommandDescriptionAuthority
/session contextLoad and display the most recent session contextL3+
/session context --fullLoad complete context chain including related sessionsL3+
/session validateVerify loaded context consistency with current platform stateL2+
/session continuityDisplay the session continuity graph and dependency relationshipsL2+
/session refreshForce refresh of loaded context from latest available sourcesL3+

Coordination

AgentRelationship
session-debrief-specialistProduces context artifacts that the coordinator manages
session-compressor-specialistProvides compressed context that requires decompression during loading
session-context-synthesizerConsumes coordinated context for synthesis operations
session-pattern-analyzerPattern analysis operates on coordinated context views
stack-mode-coordinatorStack 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 EventCoordinator Action
session_startLoad essential context, validate against current state, build continuity links
pre_commandVerify context still valid for the command's domain
post_commandUpdate in-memory context with command outcomes
session_endTrigger debrief, commit context, update continuity graph

Context Integrity Guarantees

The coordinator maintains several integrity guarantees that are enforced by the NO MERCY doctrine.

GuaranteeDescriptionEnforcement
Temporal consistencyLoaded context reflects the most recent known stateTimestamp validation on every load
Provenance completenessEvery context element traces to its source sessionNABLA provenance mandatory tagging
Conflict transparencyDetected conflicts are reported, never silently resolvedAlert on conflict resolution
Frame isolationStack frame context does not leak across frame boundariesFrame ID validation on access
Quality DNA alignmentSession context and Quality DNA agree on current stateCross-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.

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