# rudhra6467/ananta-quant-research-db architecture

> Architecture diagram of the GitHub repository rudhra6467/ananta-quant-research-db, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/rudhra6467/ananta-quant-research-db
- Repository: https://github.com/rudhra6467/ananta-quant-research-db

## Overview

Ananta’s research database is an empirical-memory system, not a backtester or execution engine. Its principal workflow turns market inputs into canonical facts, derives point-in-time features and state, records experiments and evidence, and rebuilds current summaries for read-only agent context. The README also documents event, grouping, shift, and zero-capital paper capabilities. Some subsystem connections are documented rather than verified in sampled implementation; README-backed edges identify those limits, and unsampled internals are represented only at supported paths.

Main entry points: [`research_db/ingest`](https://github.com/rudhra6467/ananta-quant-research-db/tree/main/research_db/ingest) (Ingestion), [`research_db/observe/engine.py`](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/observe/engine.py) (Feature observations), [`research_db/lifecycle/engine.py`](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lifecycle/engine.py) (Canonical facts), [`research_db/lab/engine.py`](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lab/engine.py) (Experiments and trials)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_market_data["Market data"]
  node_ingestion["Ingestion"]
  node_ingest_contract["Data contract<br/>[contract.py]"]
  node_ingest_validation["Data validation<br/>[validate.py]"]
  node_activation_charter["Ingestion charter<br/>[charter.py]"]
  node_canonical_facts["Canonical facts<br/>[engine.py]"]
  node_fixture["Deterministic fixture<br/>[fixture.py]"]
end

subgraph group_research["Research memory"]
  node_memory_store[("Empirical memory<br/>[store.py]")]
  node_features["Feature observations<br/>[engine.py]"]
  node_feature_math["Feature calculation<br/>[features.py]"]
  node_experiments["Experiments and trials<br/>[engine.py]"]
  node_evidence[("Evidence records<br/>[evidence.py]")]
  node_identifiers["Evidence identifiers<br/>[ids.py]"]
  node_rankings["Ranks and cohorts"]
  node_projections[("Current projections<br/>[engine.py]")]
  node_model_schemas["Domain schemas<br/>[base.py]"]
end

subgraph group_interpretation["Interpretation"]
  node_events["Events and windows<br/>[engine.py]"]
  node_grouping["Temporal grouping<br/>[engine.py]"]
  node_shift["Shift review<br/>[engine.py]"]
end

subgraph group_consumption["Agent and paper"]
  node_agent_context["Point-in-time context<br/>[context.py]"]
  node_paper["Paper session<br/>[session.py]"]
  node_paper_ledger[("Paper ledger<br/>[engine.py]")]
end

node_source(("Market source"))
node_ananta(("Ananta system"))

node_source -->|"supplies data"| node_ingestion
node_ingestion -->|"canonicalizes into"| node_canonical_facts
node_ingest_contract -->|"defines contract"| node_ingestion
node_ingestion -->|"validates data"| node_ingest_validation
node_activation_charter -->|"sets constraints"| node_ingestion
node_fixture -->|"provides fixture"| node_canonical_facts
node_canonical_facts -->|"appends facts"| node_memory_store
node_canonical_facts -->|"feeds features"| node_features
node_features -->|"uses RSI math"| node_feature_math
node_features -.->|"records observations"| node_memory_store
node_features -->|"supports research"| node_experiments
node_experiments -->|"records evidence"| node_evidence
node_evidence -->|"uses identifiers"| node_identifiers
node_experiments -->|"produces scores"| node_rankings
node_rankings -->|"rebuilds summaries"| node_projections
node_projections -->|"supplies facts"| node_agent_context
node_agent_context -->|"provides context"| node_ananta
node_events -.->|"annotates review"| node_shift
node_agent_context -->|"informs decision"| node_paper
node_paper -->|"records decision"| node_paper_ledger
node_model_schemas -.->|"models facts"| node_memory_store

click node_ingestion "https://github.com/rudhra6467/ananta-quant-research-db/tree/main/research_db/ingest"
click node_ingest_contract "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/ingest/contract.py"
click node_ingest_validation "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/ingest/validate.py"
click node_activation_charter "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/activation/charter.py"
click node_canonical_facts "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lifecycle/engine.py"
click node_fixture "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lifecycle/fixture.py"
click node_memory_store "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lifecycle/store.py"
click node_features "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/observe/engine.py"
click node_feature_math "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lifecycle/features.py"
click node_experiments "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lab/engine.py"
click node_evidence "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/persist/evidence.py"
click node_identifiers "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/persist/ids.py"
click node_rankings "https://github.com/rudhra6467/ananta-quant-research-db/tree/main/research_db"
click node_projections "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lifecycle/engine.py"
click node_agent_context "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/agent/context.py"
click node_events "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/events/engine.py"
click node_grouping "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/group/engine.py"
click node_shift "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/shift/engine.py"
click node_model_schemas "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/models/base.py"
click node_paper "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/paper/session.py"
click node_paper_ledger "https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/paper/engine.py"

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_ingestion,node_ingest_contract,node_ingest_validation,node_activation_charter,node_canonical_facts,node_fixture toneBlue
class node_memory_store,node_features,node_feature_math,node_experiments,node_evidence,node_identifiers,node_rankings,node_projections,node_model_schemas toneAmber
class node_events,node_grouping,node_shift toneMint
class node_agent_context,node_paper,node_paper_ledger toneRose
class node_source,node_ananta toneIndigo
```

## Components

### Market data

- [Ingestion](https://github.com/rudhra6467/ananta-quant-research-db/tree/main/research_db/ingest): `research_db/ingest`
- [Data contract](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/ingest/contract.py): `research_db/ingest/contract.py`
- [Data validation](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/ingest/validate.py): `research_db/ingest/validate.py`
- [Ingestion charter](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/activation/charter.py): `research_db/activation/charter.py`
- [Canonical facts](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lifecycle/engine.py): `research_db/lifecycle/engine.py`
- [Deterministic fixture](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lifecycle/fixture.py): `research_db/lifecycle/fixture.py`

### Research memory

- [Empirical memory](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lifecycle/store.py): `research_db/lifecycle/store.py`
- [Feature observations](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/observe/engine.py): `research_db/observe/engine.py`
- [Feature calculation](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lifecycle/features.py): `research_db/lifecycle/features.py`
- [Experiments and trials](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lab/engine.py): `research_db/lab/engine.py`
- [Evidence records](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/persist/evidence.py): `research_db/persist/evidence.py`
- [Evidence identifiers](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/persist/ids.py): `research_db/persist/ids.py`
- [Ranks and cohorts](https://github.com/rudhra6467/ananta-quant-research-db/tree/main/research_db): `research_db`
- [Current projections](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/lifecycle/engine.py): `research_db/lifecycle/engine.py`
- [Domain schemas](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/models/base.py): `research_db/models/base.py`

### Interpretation

- [Events and windows](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/events/engine.py): `research_db/events/engine.py`
- [Temporal grouping](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/group/engine.py): `research_db/group/engine.py`
- [Shift review](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/shift/engine.py): `research_db/shift/engine.py`

### Agent and paper

- [Point-in-time context](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/agent/context.py): `research_db/agent/context.py`
- [Paper session](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/paper/session.py): `research_db/paper/session.py`
- [Paper ledger](https://github.com/rudhra6467/ananta-quant-research-db/blob/main/research_db/paper/engine.py): `research_db/paper/engine.py`

### Other components

- **Market source**
- **Ananta system**

## Connections

- Market source → Ingestion: supplies data (evidence: `README.md`)
- Ingestion → Canonical facts: canonicalizes into (evidence: `README.md`)
- Data contract → Ingestion: defines contract (evidence: `research_db/ingest/orchestrator.py`)
- Ingestion → Data validation: validates data (evidence: `research_db/ingest/orchestrator.py`)
- Ingestion charter → Ingestion: sets constraints (evidence: `research_db/ingest/orchestrator.py`)
- Deterministic fixture → Canonical facts: provides fixture (evidence: `research_db/lifecycle/engine.py`)
- Canonical facts → Empirical memory: appends facts (evidence: `research_db/lifecycle/engine.py`)
- Canonical facts → Feature observations: feeds features (evidence: `README.md`)
- Feature observations → Feature calculation: uses RSI math (evidence: `research_db/observe/engine.py`)
- Feature observations → Empirical memory: records observations
- Feature observations → Experiments and trials: supports research (evidence: `README.md`)
- Experiments and trials → Evidence records: records evidence (evidence: `README.md`)
- Evidence records → Evidence identifiers: uses identifiers (evidence: `research_db/persist/evidence.py`)
- Experiments and trials → Ranks and cohorts: produces scores (evidence: `README.md`)
- Ranks and cohorts → Current projections: rebuilds summaries (evidence: `README.md`)
- Current projections → Point-in-time context: supplies facts (evidence: `README.md`)
- Point-in-time context → Ananta system: provides context (evidence: `README.md`)
- Events and windows → Shift review: annotates review (evidence: `research_db/shift/engine.py`)
- Point-in-time context → Paper session: informs decision (evidence: `research_db/paper/session.py`)
- Paper session → Paper ledger: records decision (evidence: `research_db/paper/session.py`)
- Domain schemas → Empirical memory: models facts
