# terrestrialien/aniukas_lossless_memory architecture

> Architecture diagram of the GitHub repository terrestrialien/aniukas_lossless_memory, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/terrestrialien/aniukas_lossless_memory
- Repository: https://github.com/terrestrialien/aniukas_lossless_memory

## Overview

ALM is an implementation-independent specification and portable conformance contract, not a running memory service. Its principal user-to-result path keeps working context bounded while allowing an AI system to descend from current memory through revision history to exact evidence and original source. Separate branches describe governance and cross-scope sharing. The graph reflects capabilities documented in the README and specification-oriented file tree; sampled source is validation and fixture tooling, not runtime implementation, so runtime call wiring cannot be established.

Main entry points: [`BUILD_SPEC.md`](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md) (Current State), [`docs/DATA_CONTRACTS.md`](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/docs/DATA_CONTRACTS.md) (Memory Commit), [`conformance`](https://github.com/terrestrialien/aniukas_lossless_memory/tree/main/conformance) (Conformance Cases), [`schemas`](https://github.com/terrestrialien/aniukas_lossless_memory/tree/main/schemas) (Entity Schemas)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_memory["Memory Lifecycle"]
  node_working["Working Context<br/>[BUILD_SPEC.md]"]
  node_current["Current State<br/>[BUILD_SPEC.md]"]
  node_history["Revision History<br/>[BUILD_SPEC.md]"]
  node_evidence["Exact Evidence<br/>[BUILD_SPEC.md]"]
  node_source["Original Source<br/>[BUILD_SPEC.md]"]
  node_discovery["Memory Discovery<br/>[BUILD_SPEC.md]"]
  node_identity["Stable Identity<br/>[BUILD_SPEC.md]"]
  node_epistemic["Epistemic State<br/>[BUILD_SPEC.md]"]
end

subgraph group_governance["Governance and Sharing"]
  node_proposal["Change Proposal<br/>[BUILD_SPEC.md]"]
  node_authorization["Write Authority<br/>[BUILD_SPEC.md]"]
  node_commit["Memory Commit<br/>[DATA_CONTRACTS.md]"]
  node_scope["Owned Scopes<br/>[BUILD_SPEC.md]"]
  node_inheritance["Shared Derivatives<br/>[BUILD_SPEC.md]"]
  node_audit["Audit Trail<br/>[BUILD_SPEC.md]"]
end

subgraph group_contracts["Portable Contracts"]
  node_contracts["Portable Data Contracts<br/>[DATA_CONTRACTS.md]"]
  node_schemas["Entity Schemas"]
end

subgraph group_verification["Conformance"]
  node_conformance["Conformance Cases"]
end

node_ai(("AI System"))

node_ai -->|"uses context"| node_working
node_working -->|"summarizes"| node_current
node_ai -->|"searches memory"| node_discovery
node_discovery -->|"identifies records"| node_identity
node_identity -->|"resolves state"| node_current
node_current -->|"descends through"| node_history
node_history -->|"follows citations"| node_evidence
node_evidence -->|"locates source"| node_source
node_current -->|"retains status"| node_epistemic
node_ai -->|"proposes change"| node_proposal
node_proposal -->|"requires approval"| node_authorization
node_authorization -->|"permits writes"| node_commit
node_commit -->|"writes within"| node_scope
node_scope -->|"governs sharing"| node_inheritance
node_commit -->|"records activity"| node_audit
node_contracts -->|"defines formats"| node_schemas
node_conformance -->|"checks compatibility"| node_contracts

click node_working "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md"
click node_current "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md"
click node_history "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md"
click node_evidence "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md"
click node_source "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md"
click node_discovery "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md"
click node_identity "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md"
click node_epistemic "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md"
click node_proposal "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md"
click node_authorization "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md"
click node_commit "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/docs/DATA_CONTRACTS.md"
click node_scope "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md"
click node_inheritance "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md"
click node_audit "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md"
click node_contracts "https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/docs/DATA_CONTRACTS.md"
click node_schemas "https://github.com/terrestrialien/aniukas_lossless_memory/tree/main/schemas"
click node_conformance "https://github.com/terrestrialien/aniukas_lossless_memory/tree/main/conformance"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_working,node_current,node_history,node_evidence,node_source,node_discovery,node_identity,node_epistemic toneBlue
class node_proposal,node_authorization,node_commit,node_scope,node_inheritance,node_audit toneAmber
class node_contracts,node_schemas toneMint
class node_conformance toneRose
class node_ai toneIndigo
```

## Components

### Memory Lifecycle

- [Working Context](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md): `BUILD_SPEC.md`
- [Current State](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md): `BUILD_SPEC.md`
- [Revision History](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md): `BUILD_SPEC.md`
- [Exact Evidence](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md): `BUILD_SPEC.md`
- [Original Source](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md): `BUILD_SPEC.md`
- [Memory Discovery](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md): `BUILD_SPEC.md`
- [Stable Identity](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md): `BUILD_SPEC.md`
- [Epistemic State](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md): `BUILD_SPEC.md`

### Governance and Sharing

- [Change Proposal](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md): `BUILD_SPEC.md`
- [Write Authority](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md): `BUILD_SPEC.md`
- [Memory Commit](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/docs/DATA_CONTRACTS.md): `docs/DATA_CONTRACTS.md`
- [Owned Scopes](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md): `BUILD_SPEC.md`
- [Shared Derivatives](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md): `BUILD_SPEC.md`
- [Audit Trail](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/BUILD_SPEC.md): `BUILD_SPEC.md`

### Portable Contracts

- [Portable Data Contracts](https://github.com/terrestrialien/aniukas_lossless_memory/blob/main/docs/DATA_CONTRACTS.md): `docs/DATA_CONTRACTS.md`
- [Entity Schemas](https://github.com/terrestrialien/aniukas_lossless_memory/tree/main/schemas): `schemas`

### Conformance

- [Conformance Cases](https://github.com/terrestrialien/aniukas_lossless_memory/tree/main/conformance): `conformance`

### Other components

- **AI System**

## Connections

- AI System → Working Context: uses context
- Working Context → Current State: summarizes
- AI System → Memory Discovery: searches memory
- Memory Discovery → Stable Identity: identifies records
- Stable Identity → Current State: resolves state
- Current State → Revision History: descends through
- Revision History → Exact Evidence: follows citations
- Exact Evidence → Original Source: locates source
- Current State → Epistemic State: retains status
- AI System → Change Proposal: proposes change
- Change Proposal → Write Authority: requires approval
- Write Authority → Memory Commit: permits writes
- Memory Commit → Owned Scopes: writes within
- Owned Scopes → Shared Derivatives: governs sharing
- Memory Commit → Audit Trail: records activity
- Portable Data Contracts → Entity Schemas: defines formats
- Conformance Cases → Portable Data Contracts: checks compatibility
