# ohlesl1e/doo architecture

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

- Interactive diagram: https://gitdiagram.com/ohlesl1e/doo
- Repository: https://github.com/ohlesl1e/doo

## Overview

DoO is a black-box web application security-testing copilot. Its principal workflow stages passive HAR intake, extraction and graph construction, read-only coverage analysis, test proposal and human review, then policy-gated dispatch, interpretation, and finding review. The graph preserves these documented stages and major capabilities, including identity resolution, boundary coverage, and token rotation. Relationships are grounded in the README and shown source/index references; unsampled modules are represented at their existing paths, and uncertain links are omitted.

Main entry points: [`src/doo/planner/service.py`](https://github.com/ohlesl1e/doo/blob/main/src/doo/planner/service.py) (Proposal orchestration), [`src/doo/ingestion/l2_worker.py`](https://github.com/ohlesl1e/doo/blob/main/src/doo/ingestion/l2_worker.py) (L2 extraction), [`src/doo/dispatch/run.py`](https://github.com/ohlesl1e/doo/blob/main/src/doo/dispatch/run.py) (Dispatch orchestration), [`src/doo/cli_worker.py`](https://github.com/ohlesl1e/doo/blob/main/src/doo/cli_worker.py) (Pipeline worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingest["Ingestion and graph"]
  node_ingest_cli["HAR intake CLI<br/>[cli_ingest.py]"]
  node_intake["Intake staging<br/>[intake.py]"]
  node_worker["Pipeline worker<br/>[cli_worker.py]"]
  node_extract["L2 extraction<br/>[l2_worker.py]"]
  node_har_parser["HAR parser<br/>[har.py]"]
  node_ontology_worker["L3 commit worker<br/>[l3_worker.py]"]
  node_ontology_commit["Graph commit<br/>[commit.py]"]
  node_identity["Identity resolution"]
end

subgraph group_analysis["Coverage and planning"]
  node_coverage["Coverage analysis<br/>[queries.py]"]
  node_planner["Proposal orchestration<br/>[service.py]"]
  node_generators["Candidate generation<br/>[generators.py]"]
  node_llm["Structured proposer<br/>[llm.py]"]
  node_validator["Proposal validation<br/>[validator.py]"]
  node_review["Human review queue<br/>[review.py]"]
end

subgraph group_action["Bounded execution"]
  node_dispatch_run["Dispatch orchestration<br/>[run.py]"]
  node_dispatcher["Dispatch gate<br/>[dispatcher.py]"]
  node_executor["Request executor<br/>[constructors.py]"]
  node_interpreter["Result interpreter<br/>[loop.py]"]
  node_finding["Finding review<br/>[finding.py]"]
  node_auth_helper["Token rotation<br/>[auth_helper.py]"]
end

subgraph group_foundation["Shared foundation"]
  node_blob_store[("Blob storage<br/>[blobs.py]")]
  node_ingest_stream["Redis streams<br/>[streams.py]"]
  node_events["Layer contracts<br/>[observation.py]"]
  node_graph[("Engagement graph<br/>[neo4j_driver.py]")]
  node_scope["Scope policy<br/>[scope.py]"]
  node_config["Engagement config<br/>[config.py]"]
  node_observability["Correlation logging<br/>[logging.py]"]
end

node_operator(("Security tester"))
node_har["HAR capture"]
node_opa{{"OPA policy service"}}
node_target(("Test target"))
node_model_service{{"LLM service"}}

node_operator -->|"uploads capture"| node_ingest_cli
node_har -->|"supplies HAR"| node_ingest_cli
node_ingest_cli -->|"calls intake"| node_intake
node_intake -->|"stores capture"| node_blob_store
node_intake -->|"publishes envelope"| node_ingest_stream
node_operator -->|"runs workers"| node_worker
node_worker -->|"runs L2"| node_extract
node_extract -->|"fetches capture"| node_blob_store
node_extract -->|"consumes and publishes"| node_ingest_stream
node_extract -->|"dispatches parser"| node_har_parser
node_har_parser -->|"emits observations"| node_events
node_worker -->|"runs L3"| node_ontology_worker
node_ontology_worker -->|"consumes events"| node_ingest_stream
node_ontology_worker -->|"commits events"| node_ontology_commit
node_ontology_commit -.->|"writes graph"| node_graph
node_identity -.->|"resolves entities"| node_graph
node_operator -->|"queries coverage"| node_coverage
node_coverage -->|"reads graph"| node_graph
node_coverage -->|"checks scope"| node_scope
node_operator -->|"proposes tests"| node_planner
node_planner -->|"reads gaps"| node_coverage
node_planner -->|"generates candidates"| node_generators
node_planner -->|"requests proposal"| node_llm
node_llm -.->|"requests completion"| node_model_service
node_planner -->|"validates proposals"| node_validator
node_planner -->|"commits proposals"| node_review
node_operator -->|"reviews proposals"| node_review
node_operator -->|"arms run"| node_dispatch_run
node_dispatch_run -.->|"routes tests"| node_dispatcher
node_dispatcher -->|"checks policy"| node_opa
node_dispatcher -.->|"authorizes sending"| node_executor
node_executor -.->|"sends request"| node_target
node_dispatch_run -.->|"judges results"| node_interpreter
node_dispatch_run -.->|"commits vulnerable finding"| node_finding
node_operator -->|"reviews finding"| node_finding
node_operator -->|"rotates tokens"| node_auth_helper
node_config -.->|"configures engagement"| node_planner
node_observability -.->|"correlates logs"| node_worker

click node_ingest_cli "https://github.com/ohlesl1e/doo/blob/main/src/doo/ingestion/cli_ingest.py"
click node_intake "https://github.com/ohlesl1e/doo/blob/main/src/doo/ingestion/intake.py"
click node_blob_store "https://github.com/ohlesl1e/doo/blob/main/src/doo/infra/blobs.py"
click node_ingest_stream "https://github.com/ohlesl1e/doo/blob/main/src/doo/infra/streams.py"
click node_worker "https://github.com/ohlesl1e/doo/blob/main/src/doo/cli_worker.py"
click node_extract "https://github.com/ohlesl1e/doo/blob/main/src/doo/ingestion/l2_worker.py"
click node_har_parser "https://github.com/ohlesl1e/doo/blob/main/src/doo/extraction/har.py"
click node_events "https://github.com/ohlesl1e/doo/blob/main/src/doo/events/observation.py"
click node_ontology_worker "https://github.com/ohlesl1e/doo/blob/main/src/doo/ontology/l3_worker.py"
click node_ontology_commit "https://github.com/ohlesl1e/doo/blob/main/src/doo/ontology/commit.py"
click node_identity "https://github.com/ohlesl1e/doo/blob/main/src/doo/ontology/identity_reconcile.py"
click node_graph "https://github.com/ohlesl1e/doo/blob/main/src/doo/infra/neo4j_driver.py"
click node_coverage "https://github.com/ohlesl1e/doo/blob/main/src/doo/coverage/queries.py"
click node_scope "https://github.com/ohlesl1e/doo/blob/main/src/doo/policy/scope.py"
click node_planner "https://github.com/ohlesl1e/doo/blob/main/src/doo/planner/service.py"
click node_generators "https://github.com/ohlesl1e/doo/blob/main/src/doo/planner/generators.py"
click node_llm "https://github.com/ohlesl1e/doo/blob/main/src/doo/planner/llm.py"
click node_validator "https://github.com/ohlesl1e/doo/blob/main/src/doo/planner/validator.py"
click node_review "https://github.com/ohlesl1e/doo/blob/main/src/doo/planner/review.py"
click node_dispatch_run "https://github.com/ohlesl1e/doo/blob/main/src/doo/dispatch/run.py"
click node_dispatcher "https://github.com/ohlesl1e/doo/blob/main/src/doo/dispatch/executor/dispatcher.py"
click node_executor "https://github.com/ohlesl1e/doo/blob/main/src/doo/dispatch/executor/constructors.py"
click node_interpreter "https://github.com/ohlesl1e/doo/blob/main/src/doo/dispatch/interpreter/loop.py"
click node_finding "https://github.com/ohlesl1e/doo/blob/main/src/doo/dispatch/finding.py"
click node_auth_helper "https://github.com/ohlesl1e/doo/blob/main/src/doo/dispatch/auth_helper.py"
click node_config "https://github.com/ohlesl1e/doo/blob/main/src/doo/setup/config.py"
click node_observability "https://github.com/ohlesl1e/doo/blob/main/src/doo/observability/logging.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_ingest_cli,node_intake,node_worker,node_extract,node_har_parser,node_ontology_worker,node_ontology_commit,node_identity toneBlue
class node_coverage,node_planner,node_generators,node_llm,node_validator,node_review toneAmber
class node_dispatch_run,node_dispatcher,node_executor,node_interpreter,node_finding,node_auth_helper toneMint
class node_blob_store,node_ingest_stream,node_events,node_graph,node_scope,node_config,node_observability toneRose
class node_operator,node_har,node_opa,node_target,node_model_service toneIndigo
```

## Components

### Ingestion and graph

- [HAR intake CLI](https://github.com/ohlesl1e/doo/blob/main/src/doo/ingestion/cli_ingest.py): `src/doo/ingestion/cli_ingest.py`
- [Intake staging](https://github.com/ohlesl1e/doo/blob/main/src/doo/ingestion/intake.py): `src/doo/ingestion/intake.py`
- [Pipeline worker](https://github.com/ohlesl1e/doo/blob/main/src/doo/cli_worker.py): `src/doo/cli_worker.py`
- [L2 extraction](https://github.com/ohlesl1e/doo/blob/main/src/doo/ingestion/l2_worker.py): `src/doo/ingestion/l2_worker.py`
- [HAR parser](https://github.com/ohlesl1e/doo/blob/main/src/doo/extraction/har.py): `src/doo/extraction/har.py`
- [L3 commit worker](https://github.com/ohlesl1e/doo/blob/main/src/doo/ontology/l3_worker.py): `src/doo/ontology/l3_worker.py`
- [Graph commit](https://github.com/ohlesl1e/doo/blob/main/src/doo/ontology/commit.py): `src/doo/ontology/commit.py`
- [Identity resolution](https://github.com/ohlesl1e/doo/blob/main/src/doo/ontology/identity_reconcile.py): `src/doo/ontology/identity_reconcile.py`

### Coverage and planning

- [Coverage analysis](https://github.com/ohlesl1e/doo/blob/main/src/doo/coverage/queries.py): `src/doo/coverage/queries.py`
- [Proposal orchestration](https://github.com/ohlesl1e/doo/blob/main/src/doo/planner/service.py): `src/doo/planner/service.py`
- [Candidate generation](https://github.com/ohlesl1e/doo/blob/main/src/doo/planner/generators.py): `src/doo/planner/generators.py`
- [Structured proposer](https://github.com/ohlesl1e/doo/blob/main/src/doo/planner/llm.py): `src/doo/planner/llm.py`
- [Proposal validation](https://github.com/ohlesl1e/doo/blob/main/src/doo/planner/validator.py): `src/doo/planner/validator.py`
- [Human review queue](https://github.com/ohlesl1e/doo/blob/main/src/doo/planner/review.py): `src/doo/planner/review.py`

### Bounded execution

- [Dispatch orchestration](https://github.com/ohlesl1e/doo/blob/main/src/doo/dispatch/run.py): `src/doo/dispatch/run.py`
- [Dispatch gate](https://github.com/ohlesl1e/doo/blob/main/src/doo/dispatch/executor/dispatcher.py): `src/doo/dispatch/executor/dispatcher.py`
- [Request executor](https://github.com/ohlesl1e/doo/blob/main/src/doo/dispatch/executor/constructors.py): `src/doo/dispatch/executor/constructors.py`
- [Result interpreter](https://github.com/ohlesl1e/doo/blob/main/src/doo/dispatch/interpreter/loop.py): `src/doo/dispatch/interpreter/loop.py`
- [Finding review](https://github.com/ohlesl1e/doo/blob/main/src/doo/dispatch/finding.py): `src/doo/dispatch/finding.py`
- [Token rotation](https://github.com/ohlesl1e/doo/blob/main/src/doo/dispatch/auth_helper.py): `src/doo/dispatch/auth_helper.py`

### Shared foundation

- [Blob storage](https://github.com/ohlesl1e/doo/blob/main/src/doo/infra/blobs.py): `src/doo/infra/blobs.py`
- [Redis streams](https://github.com/ohlesl1e/doo/blob/main/src/doo/infra/streams.py): `src/doo/infra/streams.py`
- [Layer contracts](https://github.com/ohlesl1e/doo/blob/main/src/doo/events/observation.py): `src/doo/events/observation.py`
- [Engagement graph](https://github.com/ohlesl1e/doo/blob/main/src/doo/infra/neo4j_driver.py): `src/doo/infra/neo4j_driver.py`
- [Scope policy](https://github.com/ohlesl1e/doo/blob/main/src/doo/policy/scope.py): `src/doo/policy/scope.py`
- [Engagement config](https://github.com/ohlesl1e/doo/blob/main/src/doo/setup/config.py): `src/doo/setup/config.py`
- [Correlation logging](https://github.com/ohlesl1e/doo/blob/main/src/doo/observability/logging.py): `src/doo/observability/logging.py`

### Other components

- **Security tester**
- **HAR capture**
- **OPA policy service**
- **Test target**
- **LLM service**

## Connections

- Security tester → HAR intake CLI: uploads capture (evidence: `README.md`)
- HAR capture → HAR intake CLI: supplies HAR (evidence: `README.md`)
- HAR intake CLI → Intake staging: calls intake (evidence: `src/doo/ingestion/cli_ingest.py`)
- Intake staging → Blob storage: stores capture (evidence: `src/doo/ingestion/cli_ingest.py`)
- Intake staging → Redis streams: publishes envelope (evidence: `src/doo/ingestion/cli_ingest.py`)
- Security tester → Pipeline worker: runs workers (evidence: `README.md`)
- Pipeline worker → L2 extraction: runs L2 (evidence: `src/doo/cli_worker.py`)
- L2 extraction → Blob storage: fetches capture (evidence: `src/doo/ingestion/l2_worker.py`)
- L2 extraction → Redis streams: consumes and publishes (evidence: `src/doo/ingestion/l2_worker.py`)
- L2 extraction → HAR parser: dispatches parser (evidence: `src/doo/ingestion/l2_worker.py`)
- HAR parser → Layer contracts: emits observations (evidence: `src/doo/extraction/har.py`)
- Pipeline worker → L3 commit worker: runs L3 (evidence: `src/doo/cli_worker.py`)
- L3 commit worker → Redis streams: consumes events (evidence: `src/doo/ontology/l3_worker.py`)
- L3 commit worker → Graph commit: commits events (evidence: `src/doo/ontology/l3_worker.py`)
- Graph commit → Engagement graph: writes graph (evidence: `README.md`)
- Identity resolution → Engagement graph: resolves entities (evidence: `README.md`)
- Security tester → Coverage analysis: queries coverage (evidence: `README.md`)
- Coverage analysis → Engagement graph: reads graph (evidence: `src/doo/coverage/queries.py`)
- Coverage analysis → Scope policy: checks scope (evidence: `src/doo/coverage/queries.py`)
- Security tester → Proposal orchestration: proposes tests (evidence: `README.md`)
- Proposal orchestration → Coverage analysis: reads gaps (evidence: `src/doo/planner/service.py`)
- Proposal orchestration → Candidate generation: generates candidates (evidence: `src/doo/planner/service.py`)
- Proposal orchestration → Structured proposer: requests proposal (evidence: `src/doo/planner/service.py`)
- Structured proposer → LLM service: requests completion
- Proposal orchestration → Proposal validation: validates proposals (evidence: `src/doo/planner/service.py`)
- Proposal orchestration → Human review queue: commits proposals (evidence: `src/doo/planner/service.py`)
- Security tester → Human review queue: reviews proposals (evidence: `README.md`)
- Security tester → Dispatch orchestration: arms run (evidence: `README.md`)
- Dispatch orchestration → Dispatch gate: routes tests (evidence: `README.md`)
- Dispatch gate → OPA policy service: checks policy
- Dispatch gate → Request executor: authorizes sending (evidence: `README.md`)
- Request executor → Test target: sends request (evidence: `README.md`)
- Dispatch orchestration → Result interpreter: judges results (evidence: `README.md`)
- Dispatch orchestration → Finding review: commits vulnerable finding (evidence: `README.md`)
- Security tester → Finding review: reviews finding (evidence: `README.md`)
- Security tester → Token rotation: rotates tokens (evidence: `README.md`)
- Engagement config → Proposal orchestration: configures engagement
- Correlation logging → Pipeline worker: correlates logs (evidence: `src/doo/cli_worker.py`)
