# analyticsengineering/ae-toolkit architecture

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

- Interactive diagram: https://gitdiagram.com/analyticsengineering/ae-toolkit
- Repository: https://github.com/analyticsengineering/ae-toolkit

## Overview

AE Toolkit is a local agent plugin and Agent Skills collection for analytics engineering work in dbt, SQL, semantic-layer, and BI repositories. The documented workflow is to understand repository context and conventions, perform the requested work with relevant skills, and guard risky changes or warehouse checks. The graph preserves the major documented capabilities and the central validation and hook modules. Source excerpts and the SOURCE INDEX support some internal links; other capability links are documented in the README, and unsampled skill implementations are not assumed to have been inspected.

Main entry points: [`scripts/plan_dbt_validation.py`](https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/plan_dbt_validation.py) (Validation planner), [`scripts/project_context.py`](https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/project_context.py) (Project context), [`skills`](https://github.com/analyticsengineering/ae-toolkit/tree/main/skills) (Agent Skills), [`scripts/inspect_dbt.py`](https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/inspect_dbt.py) (dbt inspection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Agent workflow"]
  node_agent["Coding agent"]
  node_skills["Agent Skills"]
end

subgraph group_context["Repository context"]
  node_context_resolver["Project context<br/>[project_context.py]"]
  node_dbt_inspector["dbt inspection<br/>[inspect_dbt.py]"]
  node_git_inspector["Git inspection<br/>[inspect_git.py]"]
  node_conventions["Convention inference"]
  node_profile["Dataset profiling<br/>[profile_dataset.py]"]
end

subgraph group_engineering["Analytics engineering"]
  node_engineering_skills["Modeling and review skills"]
  node_validation_skill["dbt validation skill"]
  node_validation_plan["Validation planner"]
  node_artifact_inventory["Artifact inventory"]
  node_dbt_capabilities["dbt capabilities"]
  node_git_scope["Git change scope<br/>[git_scope.py]"]
  node_resource_identity["Resource identity"]
end

subgraph group_safety["Safety and validation"]
  node_safety_gate["Shell safety gate<br/>[safety_gate.py]"]
  node_cloud_gate["Warehouse approval gate<br/>[cloud_data_gate.py]"]
  node_published_guard["Published model guard"]
  node_host_contract["Host contract adapter<br/>[host_contract.py]"]
end

node_engineer(("Engineer"))

node_engineer -->|"requests work"| node_agent
node_agent -->|"uses skills"| node_skills
node_skills -->|"offers capabilities"| node_engineering_skills
node_skills -->|"includes validation"| node_validation_skill
node_agent -->|"profiles project"| node_context_resolver
node_agent -->|"learns conventions"| node_conventions
node_agent -->|"inspects dbt"| node_dbt_inspector
node_agent -->|"inspects changes"| node_git_inspector
node_agent -->|"profiles data"| node_profile
node_validation_skill -->|"plans checks"| node_validation_plan
node_validation_plan -->|"imports"| node_artifact_inventory
node_validation_plan -->|"imports"| node_dbt_capabilities
node_validation_plan -->|"imports"| node_git_scope
node_validation_plan -->|"imports"| node_conventions
node_validation_plan -->|"imports"| node_dbt_inspector
node_validation_plan -->|"imports"| node_git_inspector
node_validation_plan -->|"imports"| node_context_resolver
node_validation_plan -->|"imports"| node_resource_identity
node_context_resolver -->|"imports"| node_dbt_inspector
node_context_resolver -->|"imports"| node_conventions
node_context_resolver -->|"imports"| node_git_inspector
node_safety_gate -->|"translates replies"| node_host_contract
node_cloud_gate -->|"translates replies"| node_host_contract
node_published_guard -->|"extracts tool input"| node_host_contract
node_agent -->|"checks shell calls"| node_safety_gate
node_agent -->|"gates warehouse calls"| node_cloud_gate
node_agent -->|"guards published edits"| node_published_guard

click node_skills "https://github.com/analyticsengineering/ae-toolkit/tree/main/skills"
click node_context_resolver "https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/project_context.py"
click node_dbt_inspector "https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/inspect_dbt.py"
click node_git_inspector "https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/inspect_git.py"
click node_conventions "https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/infer_conventions.py"
click node_profile "https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/profile_dataset.py"
click node_engineering_skills "https://github.com/analyticsengineering/ae-toolkit/tree/main/skills"
click node_validation_skill "https://github.com/analyticsengineering/ae-toolkit/tree/main/skills/validate-dbt"
click node_validation_plan "https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/plan_dbt_validation.py"
click node_artifact_inventory "https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/artifact_inventory.py"
click node_dbt_capabilities "https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/dbt_capabilities.py"
click node_git_scope "https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/git_scope.py"
click node_resource_identity "https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/resource_identity.py"
click node_safety_gate "https://github.com/analyticsengineering/ae-toolkit/blob/main/hooks/safety_gate.py"
click node_cloud_gate "https://github.com/analyticsengineering/ae-toolkit/blob/main/hooks/cloud_data_gate.py"
click node_published_guard "https://github.com/analyticsengineering/ae-toolkit/blob/main/hooks/published_model_guard.py"
click node_host_contract "https://github.com/analyticsengineering/ae-toolkit/blob/main/hooks/host_contract.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_agent,node_skills toneBlue
class node_context_resolver,node_dbt_inspector,node_git_inspector,node_conventions,node_profile toneAmber
class node_engineering_skills,node_validation_skill,node_validation_plan,node_artifact_inventory,node_dbt_capabilities,node_git_scope,node_resource_identity toneMint
class node_safety_gate,node_cloud_gate,node_published_guard,node_host_contract toneRose
class node_engineer toneIndigo
```

## Components

### Agent workflow

- **Coding agent**
- [Agent Skills](https://github.com/analyticsengineering/ae-toolkit/tree/main/skills): `skills`

### Repository context

- [Project context](https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/project_context.py): `scripts/project_context.py`
- [dbt inspection](https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/inspect_dbt.py): `scripts/inspect_dbt.py`
- [Git inspection](https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/inspect_git.py): `scripts/inspect_git.py`
- [Convention inference](https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/infer_conventions.py): `scripts/infer_conventions.py`
- [Dataset profiling](https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/profile_dataset.py): `scripts/profile_dataset.py`

### Analytics engineering

- [Modeling and review skills](https://github.com/analyticsengineering/ae-toolkit/tree/main/skills): `skills`
- [dbt validation skill](https://github.com/analyticsengineering/ae-toolkit/tree/main/skills/validate-dbt): `skills/validate-dbt`
- [Validation planner](https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/plan_dbt_validation.py): `scripts/plan_dbt_validation.py`
- [Artifact inventory](https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/artifact_inventory.py): `scripts/artifact_inventory.py`
- [dbt capabilities](https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/dbt_capabilities.py): `scripts/dbt_capabilities.py`
- [Git change scope](https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/git_scope.py): `scripts/git_scope.py`
- [Resource identity](https://github.com/analyticsengineering/ae-toolkit/blob/main/scripts/resource_identity.py): `scripts/resource_identity.py`

### Safety and validation

- [Shell safety gate](https://github.com/analyticsengineering/ae-toolkit/blob/main/hooks/safety_gate.py): `hooks/safety_gate.py`
- [Warehouse approval gate](https://github.com/analyticsengineering/ae-toolkit/blob/main/hooks/cloud_data_gate.py): `hooks/cloud_data_gate.py`
- [Published model guard](https://github.com/analyticsengineering/ae-toolkit/blob/main/hooks/published_model_guard.py): `hooks/published_model_guard.py`
- [Host contract adapter](https://github.com/analyticsengineering/ae-toolkit/blob/main/hooks/host_contract.py): `hooks/host_contract.py`

### Other components

- **Engineer**

## Connections

- Engineer → Coding agent: requests work (evidence: `README.md`)
- Coding agent → Agent Skills: uses skills (evidence: `README.md`)
- Agent Skills → Modeling and review skills: offers capabilities (evidence: `README.md`)
- Agent Skills → dbt validation skill: includes validation (evidence: `README.md`)
- Coding agent → Project context: profiles project (evidence: `README.md`)
- Coding agent → Convention inference: learns conventions (evidence: `README.md`)
- Coding agent → dbt inspection: inspects dbt (evidence: `README.md`)
- Coding agent → Git inspection: inspects changes (evidence: `README.md`)
- Coding agent → Dataset profiling: profiles data (evidence: `README.md`)
- dbt validation skill → Validation planner: plans checks (evidence: `README.md`)
- Validation planner → Artifact inventory: imports (evidence: `scripts/plan_dbt_validation.py`)
- Validation planner → dbt capabilities: imports (evidence: `scripts/plan_dbt_validation.py`)
- Validation planner → Git change scope: imports (evidence: `scripts/plan_dbt_validation.py`)
- Validation planner → Convention inference: imports (evidence: `scripts/plan_dbt_validation.py`)
- Validation planner → dbt inspection: imports (evidence: `scripts/plan_dbt_validation.py`)
- Validation planner → Git inspection: imports (evidence: `scripts/plan_dbt_validation.py`)
- Validation planner → Project context: imports (evidence: `scripts/plan_dbt_validation.py`)
- Validation planner → Resource identity: imports (evidence: `scripts/plan_dbt_validation.py`)
- Project context → dbt inspection: imports (evidence: `scripts/project_context.py`)
- Project context → Convention inference: imports (evidence: `scripts/project_context.py`)
- Project context → Git inspection: imports (evidence: `scripts/project_context.py`)
- Shell safety gate → Host contract adapter: translates replies (evidence: `hooks/safety_gate.py`)
- Warehouse approval gate → Host contract adapter: translates replies (evidence: `hooks/cloud_data_gate.py`)
- Published model guard → Host contract adapter: extracts tool input (evidence: `hooks/published_model_guard.py`)
- Coding agent → Shell safety gate: checks shell calls (evidence: `README.md`)
- Coding agent → Warehouse approval gate: gates warehouse calls (evidence: `README.md`)
- Coding agent → Published model guard: guards published edits (evidence: `README.md`)
