# protechnocrats/algorithmic-intelligence architecture

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

- Interactive diagram: https://gitdiagram.com/protechnocrats/algorithmic-intelligence
- Repository: https://github.com/protechnocrats/algorithmic-intelligence

## Overview

Algorithmic Intelligence is an agent skill for performance work: an agent loads its instructions, analyzes a codebase, proposes and implements an approved optimization, verifies behavior, then measures performance. Its knowledge base supplies technique and language-specific guidance. Optional plugins add decision guardrails and exact benchmark, growth-fit, and differential-test helpers. The README documents the workflow and plugin capabilities; sampled source confirms MCP calculations and hook behavior, but does not show all runtime wiring, so unsampled connections are omitted.

Main entry points: [`plugin/mcp/server.py`](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/mcp/server.py) (MCP server), [`skills/algorithmic-intelligence/SKILL.md`](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md) (Skill instructions), [`skills/algorithmic-intelligence/references`](https://github.com/protechnocrats/algorithmic-intelligence/tree/main/skills/algorithmic-intelligence/references) (Technique references), [`skills/algorithmic-intelligence/references/languages`](https://github.com/protechnocrats/algorithmic-intelligence/tree/main/skills/algorithmic-intelligence/references/languages) (Language guides)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Optimization workflow"]
  node_skill["Skill instructions<br/>[SKILL.md]"]
  node_understand["Understand problem<br/>[SKILL.md]"]
  node_analyze["Analyze solution<br/>[SKILL.md]"]
  node_explore["Explore alternatives<br/>[SKILL.md]"]
  node_engineer["Engineer solution<br/>[SKILL.md]"]
  node_verify["Verify correctness<br/>[SKILL.md]"]
  node_measure["Measure performance<br/>[SKILL.md]"]
end

subgraph group_knowledge["Reference knowledge"]
  node_references["Technique references"]
  node_language_guides["Language guides"]
  node_technique_guides["Technique guides"]
end

subgraph group_plugin["Optional guard plugin"]
  node_guard["Command guard<br/>[guard.py]"]
  node_edit_gate["Edit gate<br/>[edit_gate.py]"]
  node_coverage["Coverage hook<br/>[coverage_check.py]"]
  node_summary["Summary hook<br/>[summary_check.py]"]
end

subgraph group_mcp["MCP helpers"]
  node_mcp_server["MCP server<br/>[server.py]"]
  node_benchmark["Benchmark comparison<br/>[server.py]"]
  node_growth_fit["Growth fit<br/>[server.py]"]
  node_diff_tools["Differential checks<br/>[server.py]"]
end

node_agent(("Coding agent"))
node_refs_checker["Reference checker<br/>[check_refs.py]"]

node_agent -->|"loads"| node_skill
node_skill -->|"guides"| node_understand
node_understand -->|"then analyze"| node_analyze
node_analyze -->|"then explore"| node_explore
node_explore -->|"then engineer"| node_engineer
node_engineer -->|"then verify"| node_verify
node_verify -->|"then measure"| node_measure
node_skill -->|"loads as needed"| node_references
node_references -->|"includes"| node_language_guides
node_references -->|"includes"| node_technique_guides
node_agent -.->|"requests guarded actions"| node_guard
node_agent -.->|"requests code edits"| node_edit_gate
node_agent -.->|"ends session"| node_coverage
node_agent -.->|"submits summary"| node_summary
node_agent -.->|"calls tools"| node_mcp_server
node_mcp_server -->|"dispatches"| node_benchmark
node_mcp_server -->|"dispatches"| node_growth_fit
node_mcp_server -->|"dispatches"| node_diff_tools
node_agent -.->|"checks references"| node_refs_checker

click node_skill "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md"
click node_understand "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md"
click node_analyze "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md"
click node_explore "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md"
click node_engineer "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md"
click node_verify "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md"
click node_measure "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md"
click node_references "https://github.com/protechnocrats/algorithmic-intelligence/tree/main/skills/algorithmic-intelligence/references"
click node_language_guides "https://github.com/protechnocrats/algorithmic-intelligence/tree/main/skills/algorithmic-intelligence/references/languages"
click node_technique_guides "https://github.com/protechnocrats/algorithmic-intelligence/tree/main/skills/algorithmic-intelligence/references/techniques"
click node_guard "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/scripts/guard.py"
click node_edit_gate "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/scripts/edit_gate.py"
click node_coverage "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/scripts/coverage_check.py"
click node_summary "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/scripts/summary_check.py"
click node_mcp_server "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/mcp/server.py"
click node_benchmark "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/mcp/server.py"
click node_growth_fit "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/mcp/server.py"
click node_diff_tools "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/mcp/server.py"
click node_refs_checker "https://github.com/protechnocrats/algorithmic-intelligence/blob/main/tools/check_refs.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_skill,node_understand,node_analyze,node_explore,node_engineer,node_verify,node_measure toneBlue
class node_references,node_language_guides,node_technique_guides toneAmber
class node_guard,node_edit_gate,node_coverage,node_summary toneMint
class node_mcp_server,node_benchmark,node_growth_fit,node_diff_tools toneRose
class node_agent toneIndigo
class node_refs_checker toneTeal
```

## Components

### Optimization workflow

- [Skill instructions](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md): `skills/algorithmic-intelligence/SKILL.md`
- [Understand problem](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md): `skills/algorithmic-intelligence/SKILL.md`
- [Analyze solution](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md): `skills/algorithmic-intelligence/SKILL.md`
- [Explore alternatives](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md): `skills/algorithmic-intelligence/SKILL.md`
- [Engineer solution](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md): `skills/algorithmic-intelligence/SKILL.md`
- [Verify correctness](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md): `skills/algorithmic-intelligence/SKILL.md`
- [Measure performance](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/skills/algorithmic-intelligence/SKILL.md): `skills/algorithmic-intelligence/SKILL.md`

### Reference knowledge

- [Technique references](https://github.com/protechnocrats/algorithmic-intelligence/tree/main/skills/algorithmic-intelligence/references): `skills/algorithmic-intelligence/references`
- [Language guides](https://github.com/protechnocrats/algorithmic-intelligence/tree/main/skills/algorithmic-intelligence/references/languages): `skills/algorithmic-intelligence/references/languages`
- [Technique guides](https://github.com/protechnocrats/algorithmic-intelligence/tree/main/skills/algorithmic-intelligence/references/techniques): `skills/algorithmic-intelligence/references/techniques`

### Optional guard plugin

- [Command guard](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/scripts/guard.py): `plugin/scripts/guard.py`
- [Edit gate](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/scripts/edit_gate.py): `plugin/scripts/edit_gate.py`
- [Coverage hook](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/scripts/coverage_check.py): `plugin/scripts/coverage_check.py`
- [Summary hook](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/scripts/summary_check.py): `plugin/scripts/summary_check.py`

### MCP helpers

- [MCP server](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/mcp/server.py): `plugin/mcp/server.py`
- [Benchmark comparison](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/mcp/server.py): `plugin/mcp/server.py`
- [Growth fit](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/mcp/server.py): `plugin/mcp/server.py`
- [Differential checks](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/plugin/mcp/server.py): `plugin/mcp/server.py`

### Other components

- **Coding agent**
- [Reference checker](https://github.com/protechnocrats/algorithmic-intelligence/blob/main/tools/check_refs.py): `tools/check_refs.py`

## Connections

- Coding agent → Skill instructions: loads (evidence: `README.md`)
- Skill instructions → Understand problem: guides (evidence: `README.md`)
- Understand problem → Analyze solution: then analyze (evidence: `README.md`)
- Analyze solution → Explore alternatives: then explore (evidence: `README.md`)
- Explore alternatives → Engineer solution: then engineer (evidence: `README.md`)
- Engineer solution → Verify correctness: then verify (evidence: `README.md`)
- Verify correctness → Measure performance: then measure (evidence: `README.md`)
- Skill instructions → Technique references: loads as needed (evidence: `README.md`)
- Technique references → Language guides: includes (evidence: `README.md`)
- Technique references → Technique guides: includes (evidence: `README.md`)
- Coding agent → Command guard: requests guarded actions (evidence: `README.md`)
- Coding agent → Edit gate: requests code edits (evidence: `plugin/scripts/edit_gate.py`)
- Coding agent → Coverage hook: ends session (evidence: `plugin/scripts/coverage_check.py`)
- Coding agent → Summary hook: submits summary (evidence: `plugin/scripts/summary_check.py`)
- Coding agent → MCP server: calls tools (evidence: `README.md`)
- MCP server → Benchmark comparison: dispatches (evidence: `plugin/mcp/server.py`)
- MCP server → Growth fit: dispatches (evidence: `plugin/mcp/server.py`)
- MCP server → Differential checks: dispatches (evidence: `plugin/mcp/server.py`)
- Coding agent → Reference checker: checks references
