export {
  findRunsDir,
  ensureRunsDir,
  readCurrentSession,
  writeCurrentSession,
  clearCurrentSession,
  readIndex,
  writeIndex,
  updateIndexEntry,
  findInProgressSessions,
  INDEX_SCHEMA_VERSION,
  GITIGNORE_CONTENT,
} from './runs-dir.js';
export type { IndexEntry, IndexFile } from './runs-dir.js';

export {
  generateSessionId,
  isoNow,
  createSession,
  getSessionDir,
  getActiveSession,
  readSession,
  updateSession,
  endSession,
  appendToTrail,
  readTrail,
  recoverContext,
  checkUnfinishedSessions,
  generateSessionSummary,
} from './session-manager.js';
export type { SessionJson, RecoverySummary } from './session-manager.js';

export {
  createCorrection,
  findCorrections,
  checkCorrectionConflict,
} from './corrections.js';
export type { UserCorrectionRecord } from './corrections.js';

export {
  GuidelineDocumentStore,
} from './guideline-store.js';
export type {
  GuidelineId,
  GuidelineContent,
  Guideline,
  Criticality,
  GuidelineUpdateParams,
  GuidelineDocument,
} from './guideline-store.js';

export {
  JourneyStore,
} from './journey-store.js';
export type {
  JourneyId,
  JourneyNodeId,
  JourneyEdgeId,
  Journey,
  JourneyNode,
  JourneyEdge,
} from './journey-store.js';

export {
  projectJourneyToGuidelines,
  detectJourneyBacktrack,
} from './journey-projection.js';
export type { ProjectedGuideline, BacktrackCheck } from './journey-projection.js';
