# g26karthik/ghost-data-still-exists architecture

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

- Interactive diagram: https://gitdiagram.com/g26karthik/ghost-data-still-exists
- Repository: https://github.com/g26karthik/ghost-data-still-exists

## Overview

Ghost Data Still Exists audits deletion requests: it parses evidence, resolves historical identities, reconstructs resource state at the audit cutoff, and produces a policy-based verdict and ordered plan. The main entry point also supports an agent workflow in which a model investigates through read-only tools and submits a plan for an independent gate. The graph preserves these documented stages and major capabilities. Some implementation paths are unsampled, so links not established by excerpts or README statements are omitted or marked unverified.

Main entry points: [`main.py`](https://github.com/g26karthik/ghost-data-still-exists/blob/main/main.py) (Audit runner), [`ghost/agent.py`](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/agent.py) (Model investigator), [`ghost/identity.py`](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/identity.py) (Identity index), [`ghost/planner.py`](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/planner.py) (Verdict and plan)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_audit["Audit workflow"]
  node_main["Audit runner<br/>[main.py]"]
  node_intake["Request intake<br/>[intake.py]"]
end

subgraph group_evidence["Evidence and state"]
  node_evidence_parser["Evidence parser<br/>[evidence.py]"]
  node_vision["Screenshot transcription<br/>[vision.py]"]
  node_llm["LLM client<br/>[llm.py]"]
  node_identity["Identity index<br/>[identity.py]"]
  node_activity["Worker correlation<br/>[activity.py]"]
  node_state["Cutoff state<br/>[state.py]"]
end

subgraph group_decision["Decision and gate"]
  node_policy["Deletion policy<br/>[policy.py]"]
  node_planner["Verdict and plan<br/>[planner.py]"]
  node_validator["Output validator<br/>[validate.py]"]
end

subgraph group_agent["Agent investigation"]
  node_agent["Model investigator<br/>[agent.py]"]
  node_tools["Read-only tools and gate<br/>[agent_tools.py]"]
end

node_operator(("Audit operator"))
node_inputs["Request and evidence files"]
node_output["Validated audit output"]
node_openai(("OpenAI API"))

node_operator -->|"starts audit"| node_main
node_inputs -->|"provides dataset"| node_main
node_main -->|"parses evidence"| node_evidence_parser
node_main -->|"resolves identity"| node_identity
node_main -->|"assigns worker actions"| node_activity
node_main -->|"reconstructs cutoff state"| node_state
node_main -->|"builds plan"| node_planner
node_main -.->|"loads rules"| node_policy
node_main -.->|"runs intake"| node_intake
node_vision -->|"requests transcription"| node_llm
node_evidence_parser -->|"extracts identifier tokens"| node_identity
node_identity -->|"supplies identity links"| node_activity
node_planner -->|"applies treatment rules"| node_policy
node_main -.->|"starts agent mode"| node_agent
node_agent -->|"invokes tools"| node_tools
node_tools -->|"audits proposed plan"| node_planner
node_agent -->|"calls model API"| node_openai
node_llm -->|"calls Responses API"| node_openai
node_main -->|"validates output"| node_validator
node_validator -->|"checks contract"| node_output
node_main -.->|"writes audit results"| node_output

click node_main "https://github.com/g26karthik/ghost-data-still-exists/blob/main/main.py"
click node_intake "https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/intake.py"
click node_evidence_parser "https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/evidence.py"
click node_vision "https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/vision.py"
click node_llm "https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/llm.py"
click node_identity "https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/identity.py"
click node_activity "https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/activity.py"
click node_state "https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/state.py"
click node_policy "https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/policy.py"
click node_planner "https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/planner.py"
click node_agent "https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/agent.py"
click node_tools "https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/agent_tools.py"
click node_validator "https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/validate.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_main,node_intake toneBlue
class node_evidence_parser,node_vision,node_llm,node_identity,node_activity,node_state toneAmber
class node_policy,node_planner,node_validator,node_inputs,node_openai toneMint
class node_agent,node_tools toneRose
class node_operator,node_output toneIndigo
```

## Components

### Audit workflow

- [Audit runner](https://github.com/g26karthik/ghost-data-still-exists/blob/main/main.py): `main.py`
- [Request intake](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/intake.py): `ghost/intake.py`

### Evidence and state

- [Evidence parser](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/evidence.py): `ghost/evidence.py`
- [Screenshot transcription](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/vision.py): `ghost/vision.py`
- [LLM client](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/llm.py): `ghost/llm.py`
- [Identity index](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/identity.py): `ghost/identity.py`
- [Worker correlation](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/activity.py): `ghost/activity.py`
- [Cutoff state](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/state.py): `ghost/state.py`

### Decision and gate

- [Deletion policy](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/policy.py): `ghost/policy.py`
- [Verdict and plan](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/planner.py): `ghost/planner.py`
- [Output validator](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/validate.py): `ghost/validate.py`

### Agent investigation

- [Model investigator](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/agent.py): `ghost/agent.py`
- [Read-only tools and gate](https://github.com/g26karthik/ghost-data-still-exists/blob/main/ghost/agent_tools.py): `ghost/agent_tools.py`

### Other components

- **Audit operator**
- **Request and evidence files**
- **Validated audit output**
- **OpenAI API**

## Connections

- Audit operator → Audit runner: starts audit (evidence: `README.md`)
- Request and evidence files → Audit runner: provides dataset (evidence: `README.md`)
- Audit runner → Evidence parser: parses evidence (evidence: `main.py`)
- Audit runner → Identity index: resolves identity (evidence: `main.py`)
- Audit runner → Worker correlation: assigns worker actions (evidence: `main.py`)
- Audit runner → Cutoff state: reconstructs cutoff state (evidence: `README.md`)
- Audit runner → Verdict and plan: builds plan (evidence: `main.py`)
- Audit runner → Deletion policy: loads rules (evidence: `main.py`)
- Audit runner → Request intake: runs intake (evidence: `main.py`)
- Screenshot transcription → LLM client: requests transcription (evidence: `ghost/vision.py`)
- Evidence parser → Identity index: extracts identifier tokens (evidence: `ghost/evidence.py`)
- Identity index → Worker correlation: supplies identity links (evidence: `ghost/activity.py`)
- Verdict and plan → Deletion policy: applies treatment rules (evidence: `ghost/planner.py`)
- Audit runner → Model investigator: starts agent mode (evidence: `main.py`)
- Model investigator → Read-only tools and gate: invokes tools (evidence: `README.md`)
- Read-only tools and gate → Verdict and plan: audits proposed plan (evidence: `ghost/agent_tools.py`)
- Model investigator → OpenAI API: calls model API (evidence: `ghost/agent.py`)
- LLM client → OpenAI API: calls Responses API (evidence: `ghost/llm.py`)
- Audit runner → Output validator: validates output (evidence: `main.py`)
- Output validator → Validated audit output: checks contract (evidence: `ghost/validate.py`)
- Audit runner → Validated audit output: writes audit results
