Files
kami d26f20c316 docs(dox): build out the DOX AGENTS.md hierarchy
Root Child DOX Index assembled, plus a per-module AGENTS.md across the tree
(core/*, infrastructure/*, apps/*, testing/*, and docs/examples/frontend/etc),
each following the DOX section shape: Purpose, Ownership, Local Contracts,
Work Guidance, Verification, Child DOX Index.
2026-06-28 20:43:27 +04:00

36 lines
1.5 KiB
Markdown

# 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<DecisionJournalState>`.
- `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).