# core/journal — AGENTS.md ## Purpose Decision journal: projects orchestration events into a structured `DecisionJournalState` (a chronological log of `DecisionRecord`s), renders it for human review, and provides a `ProjectMemoryDistiller` that condenses journal entries into cross-session memory. ## Ownership CORREX kernel team. ## Local Contracts - `DecisionRecord` — single journal entry: decision point, rationale, outcome. - `DecisionJournalState` rebuilt from `JournalCompactedEvent` and orchestration events via `DefaultDecisionJournalReducer` + `DecisionJournalProjector`. - `DefaultDecisionJournalRepository` wraps `EventReplayer`. - `DecisionJournalRenderer` — formats `DecisionJournalState` as human-readable text for context injection or export. - `ProjectMemoryDistiller` — produces a condensed memory summary from journal state; output is non-authoritative (Hard Invariant #6 applies — compressed output must not replace original events). ## Work Guidance - Follow the standard Events→State→Reducer→Projector→Repository pattern (see `core/AGENTS.md`). - `DefaultDecisionJournalReducer` only does `state.copy(...)`. - Distilled memory is a derived view; the event log remains the source of truth. ## Verification ```bash ./gradlew :core:journal:test --rerun-tasks ``` Tests in `testing/projections/` (DecisionJournalProjectorTest) and `testing/replay/` (DecisionJournalReplayTest). ## Child DOX Index No child AGENTS.md (leaf module).