# shiv669/wizard architecture

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

- Interactive diagram: https://gitdiagram.com/shiv669/wizard
- Repository: https://github.com/shiv669/wizard

## Overview

Wizard is an architecture-stage tool for investigating software repositories and producing evidence-backed verification reports. The documented workflow begins with CLI commands, scans a target, forms goals, gathers and verifies evidence through a plan-driven investigation, then reports results. Its architecture separates the CLI, Runtime Engine, Investigation Planner, and n8n Agent System; the Runtime Engine owns the investigation and knowledge graphs. The repository contains architecture documentation rather than implementation source, so paths below identify the relevant documentation. Relationships reflect README statements only.

Main entry points: [`docs/main/runtime-engine.md`](https://github.com/shiv669/wizard/blob/main/docs/main/runtime-engine.md) (Investigation runtime), [`docs/main/investigation-planner.md`](https://github.com/shiv669/wizard/blob/main/docs/main/investigation-planner.md) (Dynamic planner), [`docs/main/agent-system.md`](https://github.com/shiv669/wizard/blob/main/docs/main/agent-system.md) (Reasoning agents), [`docs/main/cli.md`](https://github.com/shiv669/wizard/blob/main/docs/main/cli.md) (Command families)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI"]
  node_cli_commands["Command families<br/>[cli.md]"]
end

subgraph group_runtime["Runtime Engine"]
  node_runtime["Investigation runtime<br/>[runtime-engine.md]"]
  node_scanner["Repository scan<br/>[runtime-engine.md]"]
  node_goals["Verification goals<br/>[runtime-engine.md]"]
  node_observations["Structured observations<br/>[runtime-engine.md]"]
  node_knowledge[("Knowledge graph")]
  node_trust["Evidence trust"]
  node_investigation_graph[("Investigation graph")]
  node_report["Verification report"]
end

subgraph group_planner["Investigation Planner"]
  node_planner["Dynamic planner"]
  node_context["Progressive context"]
end

subgraph group_agents["Agent System"]
  node_agent["Reasoning agents<br/>[agent-system.md]"]
end

node_user(("CLI user"))
node_llm(("LLM provider"))
node_n8n["n8n"]
node_target["Target repository"]

node_user -->|"issues commands"| node_cli_commands
node_cli_commands -->|"starts investigation"| node_runtime
node_runtime -->|"scans target"| node_scanner
node_scanner -->|"inspects"| node_target
node_runtime -->|"creates goals"| node_goals
node_runtime -->|"requests plans"| node_planner
node_planner -->|"generates plans"| node_llm
node_planner -->|"loads progressively"| node_context
node_runtime -->|"dispatches exploration"| node_agent
node_agent -->|"runs on"| node_n8n
node_agent -->|"gathers evidence"| node_observations
node_runtime -->|"structures findings"| node_observations
node_runtime -->|"builds graph"| node_knowledge
node_runtime -->|"scores knowledge"| node_trust
node_runtime -->|"updates goals"| node_goals
node_runtime -->|"tracks progress"| node_investigation_graph
node_runtime -->|"generates report"| node_report

click node_cli_commands "https://github.com/shiv669/wizard/blob/main/docs/main/cli.md"
click node_runtime "https://github.com/shiv669/wizard/blob/main/docs/main/runtime-engine.md"
click node_scanner "https://github.com/shiv669/wizard/blob/main/docs/main/runtime-engine.md"
click node_goals "https://github.com/shiv669/wizard/blob/main/docs/main/runtime-engine.md"
click node_observations "https://github.com/shiv669/wizard/blob/main/docs/main/runtime-engine.md"
click node_knowledge "https://github.com/shiv669/wizard/blob/main/docs/main/knowledge-system.md"
click node_trust "https://github.com/shiv669/wizard/blob/main/docs/main/knowledge-system.md"
click node_investigation_graph "https://github.com/shiv669/wizard/blob/main/docs/main/investigation-lifecycle.md"
click node_report "https://github.com/shiv669/wizard/blob/main/docs/main/verification-report.md"
click node_planner "https://github.com/shiv669/wizard/blob/main/docs/main/investigation-planner.md"
click node_context "https://github.com/shiv669/wizard/blob/main/docs/main/investigation-planner.md"
click node_agent "https://github.com/shiv669/wizard/blob/main/docs/main/agent-system.md"

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_commands,node_user toneBlue
class node_runtime,node_scanner,node_goals,node_observations,node_knowledge,node_trust,node_investigation_graph,node_report toneAmber
class node_planner,node_context toneMint
class node_agent toneRose
class node_llm,node_n8n,node_target toneIndigo
```

## Components

### CLI

- [Command families](https://github.com/shiv669/wizard/blob/main/docs/main/cli.md): `docs/main/cli.md`

### Runtime Engine

- [Investigation runtime](https://github.com/shiv669/wizard/blob/main/docs/main/runtime-engine.md): `docs/main/runtime-engine.md`
- [Repository scan](https://github.com/shiv669/wizard/blob/main/docs/main/runtime-engine.md): `docs/main/runtime-engine.md`
- [Verification goals](https://github.com/shiv669/wizard/blob/main/docs/main/runtime-engine.md): `docs/main/runtime-engine.md`
- [Structured observations](https://github.com/shiv669/wizard/blob/main/docs/main/runtime-engine.md): `docs/main/runtime-engine.md`
- [Knowledge graph](https://github.com/shiv669/wizard/blob/main/docs/main/knowledge-system.md): `docs/main/knowledge-system.md`
- [Evidence trust](https://github.com/shiv669/wizard/blob/main/docs/main/knowledge-system.md): `docs/main/knowledge-system.md`
- [Investigation graph](https://github.com/shiv669/wizard/blob/main/docs/main/investigation-lifecycle.md): `docs/main/investigation-lifecycle.md`
- [Verification report](https://github.com/shiv669/wizard/blob/main/docs/main/verification-report.md): `docs/main/verification-report.md`

### Investigation Planner

- [Dynamic planner](https://github.com/shiv669/wizard/blob/main/docs/main/investigation-planner.md): `docs/main/investigation-planner.md`
- [Progressive context](https://github.com/shiv669/wizard/blob/main/docs/main/investigation-planner.md): `docs/main/investigation-planner.md`

### Agent System

- [Reasoning agents](https://github.com/shiv669/wizard/blob/main/docs/main/agent-system.md): `docs/main/agent-system.md`

### Other components

- **CLI user**
- **LLM provider**
- **n8n**
- **Target repository**

## Connections

- CLI user → Command families: issues commands (evidence: `README.md`)
- Command families → Investigation runtime: starts investigation (evidence: `README.md`)
- Investigation runtime → Repository scan: scans target (evidence: `README.md`)
- Repository scan → Target repository: inspects (evidence: `README.md`)
- Investigation runtime → Verification goals: creates goals (evidence: `README.md`)
- Investigation runtime → Dynamic planner: requests plans (evidence: `README.md`)
- Dynamic planner → LLM provider: generates plans (evidence: `README.md`)
- Dynamic planner → Progressive context: loads progressively (evidence: `README.md`)
- Investigation runtime → Reasoning agents: dispatches exploration (evidence: `README.md`)
- Reasoning agents → n8n: runs on (evidence: `README.md`)
- Reasoning agents → Structured observations: gathers evidence (evidence: `README.md`)
- Investigation runtime → Structured observations: structures findings (evidence: `README.md`)
- Investigation runtime → Knowledge graph: builds graph (evidence: `README.md`)
- Investigation runtime → Evidence trust: scores knowledge (evidence: `README.md`)
- Investigation runtime → Verification goals: updates goals (evidence: `README.md`)
- Investigation runtime → Investigation graph: tracks progress (evidence: `README.md`)
- Investigation runtime → Verification report: generates report (evidence: `README.md`)
