# ariannamethod/subliteratus architecture

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

- Interactive diagram: https://gitdiagram.com/ariannamethod/subliteratus
- Repository: https://github.com/ariannamethod/subliteratus

## Overview

SUBLITERATUS is a research engine for studying machine-native self-description and judgment through model interventions. Its main workflow extracts contrastive activation directions, applies interventions, and records changes in answers and task performance. The README also describes self-inquiry as a development direction, alongside feedback and independent readout studies. The graph includes the central C runtime and major research runners named in the source index; unsampled runner internals and their detailed runtime wiring are not inferred.

Main entry points: [`src/main.c`](https://github.com/ariannamethod/subliteratus/blob/main/src/main.c) (Model runtime CLI), [`research/validation/run_self_inquiry_action_readout.py`](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_self_inquiry_action_readout.py) (Action readout), [`research/validation/run_smollm2_size_checkpointed.py`](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_smollm2_size_checkpointed.py) (Checkpointed comparison), [`research/validation/run_feedback.py`](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_feedback.py) (Feedback experiment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_engine["Intervention engine"]
  node_runtime["Model runtime CLI<br/>[main.c]"]
  node_direction_export["GGUF bias export<br/>[export.c]"]
end

subgraph group_experiments["Experiment runners"]
  node_feedback_runner["Feedback experiment<br/>[run_feedback.py]"]
  node_smollm_runner["SmolLM2 experiment<br/>[run_smollm2.py]"]
  node_size_runner["Size comparison"]
  node_checkpoint_runner["Checkpointed comparison"]
  node_action_readout["Action readout"]
  node_behavioral_runner["Behavioral experiment"]
  node_forecast_runner["Forecast outcomes"]
  node_wording_runner["Wording study"]
end

subgraph group_inquiry["Self-inquiry"]
  node_action_environment["Action environment"]
  node_action_native["Native action readout"]
  node_event_controller["Event controller"]
  node_event_controller_v2["Event controller v2"]
end

subgraph group_analysis["Analysis and evaluation"]
  node_null_annotation["Blind annotation"]
  node_feedback_summary["Feedback summary"]
  node_behavioral_readings["Behavioral readings"]
end

node_researcher(("Researcher"))

node_researcher -->|"runs experiments"| node_runtime
node_runtime -.->|"supports feedback studies"| node_feedback_runner
node_runtime -.->|"supports model experiments"| node_smollm_runner
node_runtime -.->|"supports intervention studies"| node_action_readout
node_runtime -.->|"exports bias"| node_direction_export
node_feedback_runner -.->|"summarizes results"| node_feedback_summary
node_smollm_runner -.->|"extends comparison"| node_size_runner
node_size_runner -->|"resumes comparisons"| node_checkpoint_runner
node_checkpoint_runner -->|"reuses runner logic"| node_smollm_runner
node_checkpoint_runner -->|"reuses runner logic"| node_feedback_runner
node_null_annotation -->|"checks producer records"| node_checkpoint_runner
node_action_readout -.->|"uses environment"| node_action_environment
node_action_readout -.->|"uses native readout"| node_action_native
node_action_readout -.->|"coordinates events"| node_event_controller_v2
node_behavioral_runner -.->|"coordinates events"| node_event_controller
node_behavioral_runner -.->|"evaluates behavior"| node_behavioral_readings
node_researcher -->|"studies outcomes"| node_forecast_runner
node_researcher -->|"studies self-description"| node_wording_runner

click node_runtime "https://github.com/ariannamethod/subliteratus/blob/main/src/main.c"
click node_direction_export "https://github.com/ariannamethod/subliteratus/blob/main/src/export.c"
click node_feedback_runner "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_feedback.py"
click node_smollm_runner "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_smollm2.py"
click node_size_runner "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_smollm2_size.py"
click node_checkpoint_runner "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_smollm2_size_checkpointed.py"
click node_null_annotation "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/annotate_smollm2_null.py"
click node_feedback_summary "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/summarize_feedback.py"
click node_action_readout "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_self_inquiry_action_readout.py"
click node_action_environment "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/self_inquiry_action_readout_environment.py"
click node_action_native "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/self_inquiry_action_readout_native.py"
click node_behavioral_runner "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_self_inquiry_behavioral.py"
click node_behavioral_readings "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/self_inquiry_behavioral_readings.py"
click node_forecast_runner "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_self_inquiry_forecast_outcome.py"
click node_wording_runner "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_self_inquiry_wording_check.py"
click node_event_controller "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/self_inquiry_event_controller.h"
click node_event_controller_v2 "https://github.com/ariannamethod/subliteratus/blob/main/research/validation/self_inquiry_event_controller_v2.h"

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_runtime,node_direction_export toneBlue
class node_feedback_runner,node_smollm_runner,node_size_runner,node_checkpoint_runner,node_action_readout,node_behavioral_runner,node_forecast_runner,node_wording_runner toneAmber
class node_action_environment,node_action_native,node_event_controller,node_event_controller_v2 toneMint
class node_null_annotation,node_feedback_summary,node_behavioral_readings toneRose
class node_researcher toneIndigo
```

## Components

### Intervention engine

- [Model runtime CLI](https://github.com/ariannamethod/subliteratus/blob/main/src/main.c): `src/main.c`
- [GGUF bias export](https://github.com/ariannamethod/subliteratus/blob/main/src/export.c): `src/export.c`

### Experiment runners

- [Feedback experiment](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_feedback.py): `research/validation/run_feedback.py`
- [SmolLM2 experiment](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_smollm2.py): `research/validation/run_smollm2.py`
- [Size comparison](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_smollm2_size.py): `research/validation/run_smollm2_size.py`
- [Checkpointed comparison](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_smollm2_size_checkpointed.py): `research/validation/run_smollm2_size_checkpointed.py`
- [Action readout](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_self_inquiry_action_readout.py): `research/validation/run_self_inquiry_action_readout.py`
- [Behavioral experiment](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_self_inquiry_behavioral.py): `research/validation/run_self_inquiry_behavioral.py`
- [Forecast outcomes](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_self_inquiry_forecast_outcome.py): `research/validation/run_self_inquiry_forecast_outcome.py`
- [Wording study](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/run_self_inquiry_wording_check.py): `research/validation/run_self_inquiry_wording_check.py`

### Self-inquiry

- [Action environment](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/self_inquiry_action_readout_environment.py): `research/validation/self_inquiry_action_readout_environment.py`
- [Native action readout](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/self_inquiry_action_readout_native.py): `research/validation/self_inquiry_action_readout_native.py`
- [Event controller](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/self_inquiry_event_controller.h): `research/validation/self_inquiry_event_controller.h`
- [Event controller v2](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/self_inquiry_event_controller_v2.h): `research/validation/self_inquiry_event_controller_v2.h`

### Analysis and evaluation

- [Blind annotation](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/annotate_smollm2_null.py): `research/validation/annotate_smollm2_null.py`
- [Feedback summary](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/summarize_feedback.py): `research/validation/summarize_feedback.py`
- [Behavioral readings](https://github.com/ariannamethod/subliteratus/blob/main/research/validation/self_inquiry_behavioral_readings.py): `research/validation/self_inquiry_behavioral_readings.py`

### Other components

- **Researcher**

## Connections

- Researcher → Model runtime CLI: runs experiments
- Model runtime CLI → Feedback experiment: supports feedback studies
- Model runtime CLI → SmolLM2 experiment: supports model experiments
- Model runtime CLI → Action readout: supports intervention studies
- Model runtime CLI → GGUF bias export: exports bias
- Feedback experiment → Feedback summary: summarizes results
- SmolLM2 experiment → Size comparison: extends comparison (evidence: `research/validation/run_smollm2_size.py`)
- Size comparison → Checkpointed comparison: resumes comparisons (evidence: `research/validation/run_smollm2_size_checkpointed.py`)
- Checkpointed comparison → SmolLM2 experiment: reuses runner logic (evidence: `research/validation/run_smollm2_size_checkpointed.py`)
- Checkpointed comparison → Feedback experiment: reuses runner logic (evidence: `research/validation/run_smollm2_size_checkpointed.py`)
- Blind annotation → Checkpointed comparison: checks producer records (evidence: `research/validation/annotate_smollm2_null.py`)
- Action readout → Action environment: uses environment
- Action readout → Native action readout: uses native readout
- Action readout → Event controller v2: coordinates events
- Behavioral experiment → Event controller: coordinates events
- Behavioral experiment → Behavioral readings: evaluates behavior
- Researcher → Forecast outcomes: studies outcomes
- Researcher → Wording study: studies self-description
