3 minute read

The catalog is the audit trail. It connects every architectural artifact to every other artifact — diagrams to ADRs, ADRs to design documents, design documents to code, code to diagrams. If something is missing, the catalog shows it. If something contradicts, the catalog reveals it.

Diagram Inventory

Every Mermaid diagram in the architecture pages. Step 0.5 will extract each into _diagrams/ with a designated source ID. Until then, this table is the index.

ID Type Title Source Page

CTX-0001

C4 Context

System Context — Total Recall in its environment

Context

HEX-0001

Ports & Adapters

Hexagonal — ports, adapters, actor model

Hexagonal

BC-0001

Context Map

Bounded Contexts — six actors and message flow

Bounded Contexts

MSG-0001

Sequence

Store Memory flow

Message Catalog

MSG-0002

Sequence

Search Memory flow

Message Catalog

MSG-0003

Sequence

Claim Memory flow

Message Catalog

MSG-0004

Sequence

Decay Sweep flow

Message Catalog

MSG-0005

Sequence

Session Lifecycle flow

Message Catalog

MSG-0006

Sequence

Reflect (Dreaming) flow

Message Catalog

MSG-0007

Sequence

Total Recall — unsolicited deep recollection

Message Catalog

HP-0001

Bounded Context

Hippocampus — commands, events, persistence

Design E1: Hippocampus

SL-0001

Bounded Context

Salience — sources, scoring, consumers

Design E2: Salience

SY-0001

Bounded Context

Synapse — associations, storage, traversal

Design E3: Synapse

RC-0001

Bounded Context

Recall — assembly sources, consumers

Design E4: Recall

CX-0001

Bounded Context

Cortex — translation, routing, dispatch

Design E5: Cortex

SB-0001

Bounded Context

Subconscious — timers, sweeps, shutdown

Design E6: Subconscious

Architecture Decision Records

ADR Title References

0001

Use Architecture Decision Records

Template for all ADRs

0002

Hexagonal Architecture

Hexagonal page, ports and adapters diagram

0003

stdio as Primary Transport

Context page, hexagonal page (inbound adapters)

0004

Resilient Storage Array

Hexagonal page (outbound ports), BackingServicePort

0005

Memory as Aggregate Root

Bounded contexts page (Hippocampus)

0006

Events and Commands as Message Types

Message catalog page (all message tables)

0007

Biological Memory as Reference Model

Message catalog (claiming intelligence), bounded contexts (Salience)

Bounded Contexts to Code

Mapping from architectural bounded contexts to Kotlin source artifacts.

Context Responsibility Code Artifacts Status

Hippocampus

Aggregate root. CRUD for memories across four tiers. Claiming.

Memory.kt, Tier.kt, MemoryPort

Interfaces defined

Synapse

Typed relationships between memories. Graph traversal.

Association.kt, AssociationType.kt, AssociationDirection.kt

Model defined

Salience

Scoring and decay. Tier promotion/demotion.

SalienceScore.kt

Model defined

Recall

Search and recall. Salience-weighted, association-activated.

(no dedicated source — reads from Hippocampus, Salience, Synapse)

CQRS read side

Cortex

Per-instance working state. Entry point for all requests.

LifecyclePort, TotalRecall.kt (tool handlers), WorkingMode.kt, SessionEndReason.kt

Stubs

Subconscious

Background maintenance. Timers. Graceful shutdown.

(no dedicated source yet)

Not started

Messages to Code

Category Documented Count Implemented Count File

Commands

7

7

Command.kt

Queries

2

2

Query.kt

Events

17

17

Event.kt

Notifications

3

3

Notification.kt

Note
Event count 17 includes HeartbeatReceived (added in C-Audit-7). Notification count 3 includes TotalRecallNotification. All counts match code.

Ports to Code

Port Direction Documented Operations Code Operations

MemoryPort

Inbound

store, search, claim, associate, reclassify, reflect

storeMemory, searchMemory, claimMemory, associateMemories, reclassifyMemory, reflect

LifecyclePort

Inbound

session_start, session_end, state_transition, heartbeat

sessionStart, sessionEnd, stateTransition, heartbeat

BackingServicePort

Outbound

save, findById, search, delete, update

save, findById, search, delete, update

NotificationPort

Outbound

send

send

RelayPort

Outbound

relay

relay

Note
Outbound port operations aligned with code in D-Audit-1, D-Audit-2, D-Audit-3. Documentation and code now match.

Known Inconsistencies

Audit findings tracked in INDEX.md.

Resolved

  • 10 documentation mismatches (D-Audit-1 through 10) — all resolved. Port names aligned, event counts corrected, routing fixed, actor count fixed.

  • 8 of 9 code issues (C-Audit-1 through 8) — dead code removed, events documented, packages fixed, schemas aligned, enums created, Duration types, HeartbeatReceived added, SalienceScored wrapping.

  • 3 test gaps (T-Audit-1 through 3) — all resolved. Server tests expanded (10 tests), self-referential assertion fixed, full message coverage (17 tests).

Open

  • C-Audit-9 — TotalRecall.kt refactoring pass. Deferred to rdd13r.

  • F-Audit-6 — MemoryRetrieved/SalienceScored/AssociationsFound identity crisis (events or response payloads?). Resolves with TransactionContext usage patterns.

Design Documents

Documents will be added as each bounded context is examined.

Document Scope Status

0000

About Detailed Design — why we front-load design

Done

A

What is a Port?

Done

B

What is an Adapter? (Active Structure)

Done

C

What is an ACL? (Adapter + Port + Adapter)

Done

D

Hexagon Sides

Done

E1

Hippocampus — the Aggregate Root

Done

E2

Salience (Focus) — the Scoring Engine

Done

E3

Synapse (Matrix) — the Relationship Layer

Done

E4

Recall (Stream) — the Read-Only Assembler

Done

E5

Cortex (Inception) — the Entry Point

Done

E6

Subconscious (Dream) — the Background Caretaker

Done

F

TransactionContext (Chain of Custody) — the envelope every message carries

Done