# nebulock-inc/agentic-detection-engineering-framework architecture

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

- Interactive diagram: https://gitdiagram.com/nebulock-inc/agentic-detection-engineering-framework
- Repository: https://github.com/nebulock-inc/agentic-detection-engineering-framework

## Overview

ADEF is a CLI and MCP framework that adds a read-only catalog, ATT&CK coverage, schema-grounded authoring, and durable per-detection lifecycle journals around existing detection rules. Its main workflow is to initialize a workspace, discover and catalog rules, then search/refine detections, record health measurements, and evolve them toward keep, tune, or deprecate decisions. The graph preserves documented capability branches; connections based only on the README or SOURCE INDEX are cited there, and unsampled implementation details are not inferred.

Main entry points: [`adef/commands/catalog.py`](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/commands/catalog.py) (Catalog command), [`adef/orchestration/evolve_chain.py`](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/orchestration/evolve_chain.py) (Evolve chain), [`adef/core/corpus.py`](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/corpus.py) (Detection corpus), [`adef/orchestration/refine_chain.py`](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/orchestration/refine_chain.py) (Refine chain)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_cli["CLI<br/>[cli.py]"]
  node_mcp["MCP server<br/>[server.py]"]
  node_mcp_tools["MCP tools"]
end

subgraph group_catalog["Discovery and catalog"]
  node_catalog_cmd["Catalog command<br/>[catalog.py]"]
  node_discovery["Rule discovery<br/>[rule_discovery.py]"]
  node_parser["Rule parser<br/>[rule_parser.py]"]
  node_catalog_core["Catalog records<br/>[catalog.py]"]
end

subgraph group_lifecycle["FORGE lifecycle"]
  node_refine["Refine chain<br/>[refine_chain.py]"]
  node_agents["Refine agents"]
  node_evolve["Evolve chain<br/>[evolve_chain.py]"]
  node_recommendations["Tune and retire advice"]
end

subgraph group_analysis["Analysis and authoring"]
  node_schema["Schema declaration<br/>[declaration.py]"]
  node_coverage["ATT&amp;CK coverage<br/>[coverage.py]"]
  node_attack["ATT&amp;CK data<br/>[attack.py]"]
  node_search["Search and similarity<br/>[memory.py]"]
  node_corpus["Detection corpus<br/>[corpus.py]"]
  node_corpus_text["Search text projection<br/>[corpus_text.py]"]
end

subgraph group_state["Workspace state"]
  node_journal["Detection journals<br/>[journal.py]"]
  node_health_ingest["Health ingestion<br/>[health_docs.py]"]
  node_health_store[("Health history<br/>[health_store.py]")]
  node_workspace["Workspace setup<br/>[workspace.py]"]
end

node_engineer(("Detection engineer"))

node_engineer -->|"runs commands"| node_cli
node_engineer -->|"uses tools"| node_mcp
node_cli -.->|"dispatches commands"| node_catalog_cmd
node_catalog_cmd -->|"discovers rules"| node_discovery
node_discovery -->|"parses queries"| node_parser
node_catalog_cmd -->|"writes records"| node_catalog_core
node_catalog_cmd -->|"creates journals"| node_journal
node_catalog_cmd -->|"inherits declarations"| node_schema
node_engineer -->|"requests coverage"| node_coverage
node_coverage -->|"uses ATT&amp;CK data"| node_attack
node_engineer -->|"searches detections"| node_search
node_search -->|"searches corpus"| node_corpus
node_corpus -->|"projects records"| node_corpus_text
node_corpus -->|"reads records"| node_catalog_core
node_corpus -->|"reads journals"| node_journal
node_engineer -->|"runs refinement"| node_refine
node_refine -->|"runs agent steps"| node_agents
node_refine -->|"appends findings"| node_journal
node_engineer -->|"submits measurements"| node_health_ingest
node_health_ingest -->|"stores health"| node_health_store
node_engineer -->|"runs evolution"| node_evolve
node_evolve -->|"reads measurements"| node_health_store
node_evolve -->|"requests verdicts"| node_recommendations
node_evolve -->|"records decisions"| node_journal
node_mcp -->|"registers tools"| node_mcp_tools
node_mcp_tools -->|"invokes chain"| node_refine
node_mcp_tools -->|"invokes chain"| node_evolve
node_engineer -->|"initializes workspace"| node_workspace

click node_cli "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/cli.py"
click node_mcp "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/mcp/server.py"
click node_mcp_tools "https://github.com/nebulock-inc/agentic-detection-engineering-framework/tree/main/adef/mcp/tools"
click node_catalog_cmd "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/commands/catalog.py"
click node_discovery "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/rule_discovery.py"
click node_parser "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/rule_parser.py"
click node_catalog_core "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/catalog.py"
click node_schema "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/declaration.py"
click node_coverage "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/coverage.py"
click node_attack "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/attack.py"
click node_search "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/memory.py"
click node_corpus "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/corpus.py"
click node_corpus_text "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/corpus_text.py"
click node_refine "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/orchestration/refine_chain.py"
click node_agents "https://github.com/nebulock-inc/agentic-detection-engineering-framework/tree/main/adef/agents"
click node_evolve "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/orchestration/evolve_chain.py"
click node_recommendations "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/agents/tune_recommender.py"
click node_journal "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/journal.py"
click node_health_ingest "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/health_docs.py"
click node_health_store "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/health_store.py"
click node_workspace "https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/workspace.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_cli,node_mcp,node_mcp_tools toneBlue
class node_catalog_cmd,node_discovery,node_parser,node_catalog_core toneAmber
class node_refine,node_agents,node_evolve,node_recommendations toneMint
class node_schema,node_coverage,node_attack,node_search,node_corpus,node_corpus_text toneRose
class node_journal,node_health_ingest,node_health_store,node_workspace,node_engineer toneIndigo
```

## Components

### User interfaces

- [CLI](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/cli.py): `adef/cli.py`
- [MCP server](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/mcp/server.py): `adef/mcp/server.py`
- [MCP tools](https://github.com/nebulock-inc/agentic-detection-engineering-framework/tree/main/adef/mcp/tools): `adef/mcp/tools`

### Discovery and catalog

- [Catalog command](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/commands/catalog.py): `adef/commands/catalog.py`
- [Rule discovery](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/rule_discovery.py): `adef/core/rule_discovery.py`
- [Rule parser](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/rule_parser.py): `adef/core/rule_parser.py`
- [Catalog records](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/catalog.py): `adef/core/catalog.py`

### FORGE lifecycle

- [Refine chain](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/orchestration/refine_chain.py): `adef/orchestration/refine_chain.py`
- [Refine agents](https://github.com/nebulock-inc/agentic-detection-engineering-framework/tree/main/adef/agents): `adef/agents`
- [Evolve chain](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/orchestration/evolve_chain.py): `adef/orchestration/evolve_chain.py`
- [Tune and retire advice](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/agents/tune_recommender.py): `adef/agents/tune_recommender.py`

### Analysis and authoring

- [Schema declaration](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/declaration.py): `adef/core/declaration.py`
- [ATT&CK coverage](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/coverage.py): `adef/core/coverage.py`
- [ATT&CK data](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/attack.py): `adef/core/attack.py`
- [Search and similarity](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/memory.py): `adef/core/memory.py`
- [Detection corpus](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/corpus.py): `adef/core/corpus.py`
- [Search text projection](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/corpus_text.py): `adef/core/corpus_text.py`

### Workspace state

- [Detection journals](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/journal.py): `adef/core/journal.py`
- [Health ingestion](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/health_docs.py): `adef/core/health_docs.py`
- [Health history](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/health_store.py): `adef/core/health_store.py`
- [Workspace setup](https://github.com/nebulock-inc/agentic-detection-engineering-framework/blob/main/adef/core/workspace.py): `adef/core/workspace.py`

### Other components

- **Detection engineer**

## Connections

- Detection engineer → CLI: runs commands (evidence: `README.md`)
- Detection engineer → MCP server: uses tools (evidence: `README.md`)
- CLI → Catalog command: dispatches commands
- Catalog command → Rule discovery: discovers rules (evidence: `adef/commands/catalog.py`)
- Rule discovery → Rule parser: parses queries (evidence: `adef/core/rule_discovery.py`)
- Catalog command → Catalog records: writes records (evidence: `adef/commands/catalog.py`)
- Catalog command → Detection journals: creates journals (evidence: `adef/commands/catalog.py`)
- Catalog command → Schema declaration: inherits declarations (evidence: `adef/commands/catalog.py`)
- Detection engineer → ATT&CK coverage: requests coverage (evidence: `README.md`)
- ATT&CK coverage → ATT&CK data: uses ATT&CK data (evidence: `adef/core/coverage.py`)
- Detection engineer → Search and similarity: searches detections (evidence: `README.md`)
- Search and similarity → Detection corpus: searches corpus (evidence: `adef/agents/rule_similarity.py`)
- Detection corpus → Search text projection: projects records (evidence: `adef/core/corpus.py`)
- Detection corpus → Catalog records: reads records (evidence: `adef/core/corpus.py`)
- Detection corpus → Detection journals: reads journals (evidence: `adef/core/corpus.py`)
- Detection engineer → Refine chain: runs refinement (evidence: `README.md`)
- Refine chain → Refine agents: runs agent steps (evidence: `adef/orchestration/refine_chain.py`)
- Refine chain → Detection journals: appends findings (evidence: `adef/orchestration/refine_chain.py`)
- Detection engineer → Health ingestion: submits measurements (evidence: `README.md`)
- Health ingestion → Health history: stores health (evidence: `adef/core/health_store.py`)
- Detection engineer → Evolve chain: runs evolution (evidence: `README.md`)
- Evolve chain → Health history: reads measurements (evidence: `adef/orchestration/evolve_chain.py`)
- Evolve chain → Tune and retire advice: requests verdicts (evidence: `adef/orchestration/evolve_chain.py`)
- Evolve chain → Detection journals: records decisions (evidence: `adef/orchestration/evolve_chain.py`)
- MCP server → MCP tools: registers tools
- MCP tools → Refine chain: invokes chain (evidence: `adef/mcp/tools/agent_tools.py`)
- MCP tools → Evolve chain: invokes chain (evidence: `adef/mcp/tools/agent_tools.py`)
- Detection engineer → Workspace setup: initializes workspace (evidence: `README.md`)
