# lloredia/everything-claude-code architecture

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

- Interactive diagram: https://gitdiagram.com/lloredia/everything-claude-code
- Repository: https://github.com/lloredia/everything-claude-code

## Overview

Everything Claude Code is an AI-agent harness performance system: its user-facing workflow loads project and prior-session context at session start, applies hook-based checks during work, and persists session summaries and reusable learning afterward. The README also describes agents, skills, commands, rules, security scanning, and cross-harness support, but those directories are absent from the supplied tree, so they are represented only as documented capabilities—not as implementation flows. The graph focuses on the visible runtime scripts; edges are limited to relationships supported by excerpts or the SOURCE INDEX.

Main entry points: [`scripts/hooks/session-start.js`](https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/session-start.js) (Session start), [`scripts/hooks/session-end.js`](https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/session-end.js) (Session end), [`scripts/lib/utils.js`](https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/utils.js) (Hook utilities), [`scripts/lib/resolve-formatter.js`](https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/resolve-formatter.js) (Formatter resolution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_session["Session lifecycle"]
  node_session_start["Session start<br/>[session-start.js]"]
  node_session_end["Session end<br/>[session-end.js]"]
  node_session_manager["Session records<br/>[session-manager.js]"]
  node_session_aliases["Session aliases<br/>[session-aliases.js]"]
  node_session_store[("Session files")]
end

subgraph group_hooks["Runtime hooks"]
  node_hook_flags["Hook runtime controls<br/>[hook-flags.js]"]
  node_hook_runner["Hook flag runner<br/>[run-with-flags.js]"]
  node_format_hooks["Format and quality checks<br/>[quality-gate.js]"]
  node_dev_guard["Dev server guard"]
end

subgraph group_support["Runtime support"]
  node_formatter["Formatter resolution"]
  node_shell_split["Shell command parser<br/>[shell-split.js]"]
  node_package_manager["Package manager selection<br/>[package-manager.js]"]
  node_project_detect["Project detection<br/>[project-detect.js]"]
  node_shared_utils["Hook utilities<br/>[utils.js]"]
  node_claw["Harness management<br/>[claw.js]"]
end

subgraph group_learning["Learning and security"]
  node_learning_eval["Session learning evaluator"]
  node_instinct_cli["Instinct learning tools<br/>[instinct-cli.py]"]
  node_security_monitor["Security monitor"]
  node_security_wrapper["Security wrapper"]
  node_videodb_listener["VideoDB listener<br/>[ws_listener.py]"]
end

node_user(("Agent user"))

node_user -->|"starts session"| node_session_start
node_session_start -->|"loads recent context"| node_session_store
node_session_start -->|"lists aliases"| node_session_aliases
node_session_start -->|"detects preference"| node_package_manager
node_session_start -->|"detects project"| node_project_detect
node_session_start -->|"uses file helpers"| node_shared_utils
node_user -->|"ends session"| node_session_end
node_session_end -->|"writes summary"| node_session_store
node_session_end -->|"uses file helpers"| node_shared_utils
node_session_manager -->|"reads and writes"| node_session_store
node_hook_runner -->|"checks runtime flags"| node_hook_flags
node_format_hooks -->|"resolves formatter"| node_formatter
node_formatter -->|"selects runner"| node_package_manager
node_dev_guard -->|"splits commands"| node_shell_split
node_learning_eval -->|"uses file helpers"| node_shared_utils
node_user -.->|"triggers evaluation"| node_learning_eval
node_user -.->|"manages instincts"| node_instinct_cli
node_user -.->|"runs security scan"| node_security_wrapper
node_security_wrapper -.->|"invokes monitor"| node_security_monitor
node_user -.->|"manages harness"| node_claw

click node_session_start "https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/session-start.js"
click node_session_end "https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/session-end.js"
click node_session_manager "https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/session-manager.js"
click node_session_aliases "https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/session-aliases.js"
click node_hook_flags "https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/hook-flags.js"
click node_hook_runner "https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/run-with-flags.js"
click node_format_hooks "https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/quality-gate.js"
click node_formatter "https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/resolve-formatter.js"
click node_dev_guard "https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/pre-bash-dev-server-block.js"
click node_shell_split "https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/shell-split.js"
click node_package_manager "https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/package-manager.js"
click node_project_detect "https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/project-detect.js"
click node_shared_utils "https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/utils.js"
click node_learning_eval "https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/evaluate-session.js"
click node_instinct_cli "https://github.com/lloredia/everything-claude-code/blob/main/skills/continuous-learning-v2/scripts/instinct-cli.py"
click node_security_monitor "https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/insaits-security-monitor.py"
click node_security_wrapper "https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/insaits-security-wrapper.js"
click node_claw "https://github.com/lloredia/everything-claude-code/blob/main/scripts/claw.js"
click node_videodb_listener "https://github.com/lloredia/everything-claude-code/blob/main/skills/videodb/scripts/ws_listener.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_session_start,node_session_end,node_session_manager,node_session_aliases,node_session_store,node_user toneBlue
class node_hook_flags,node_hook_runner,node_format_hooks,node_dev_guard toneAmber
class node_formatter,node_shell_split,node_package_manager,node_project_detect,node_shared_utils,node_claw toneMint
class node_learning_eval,node_instinct_cli,node_security_monitor,node_security_wrapper,node_videodb_listener toneRose
```

## Components

### Session lifecycle

- [Session start](https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/session-start.js): `scripts/hooks/session-start.js`
- [Session end](https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/session-end.js): `scripts/hooks/session-end.js`
- [Session records](https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/session-manager.js): `scripts/lib/session-manager.js`
- [Session aliases](https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/session-aliases.js): `scripts/lib/session-aliases.js`
- **Session files**

### Runtime hooks

- [Hook runtime controls](https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/hook-flags.js): `scripts/lib/hook-flags.js`
- [Hook flag runner](https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/run-with-flags.js): `scripts/hooks/run-with-flags.js`
- [Format and quality checks](https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/quality-gate.js): `scripts/hooks/quality-gate.js`
- [Dev server guard](https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/pre-bash-dev-server-block.js): `scripts/hooks/pre-bash-dev-server-block.js`

### Runtime support

- [Formatter resolution](https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/resolve-formatter.js): `scripts/lib/resolve-formatter.js`
- [Shell command parser](https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/shell-split.js): `scripts/lib/shell-split.js`
- [Package manager selection](https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/package-manager.js): `scripts/lib/package-manager.js`
- [Project detection](https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/project-detect.js): `scripts/lib/project-detect.js`
- [Hook utilities](https://github.com/lloredia/everything-claude-code/blob/main/scripts/lib/utils.js): `scripts/lib/utils.js`
- [Harness management](https://github.com/lloredia/everything-claude-code/blob/main/scripts/claw.js): `scripts/claw.js`

### Learning and security

- [Session learning evaluator](https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/evaluate-session.js): `scripts/hooks/evaluate-session.js`
- [Instinct learning tools](https://github.com/lloredia/everything-claude-code/blob/main/skills/continuous-learning-v2/scripts/instinct-cli.py): `skills/continuous-learning-v2/scripts/instinct-cli.py`
- [Security monitor](https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/insaits-security-monitor.py): `scripts/hooks/insaits-security-monitor.py`
- [Security wrapper](https://github.com/lloredia/everything-claude-code/blob/main/scripts/hooks/insaits-security-wrapper.js): `scripts/hooks/insaits-security-wrapper.js`
- [VideoDB listener](https://github.com/lloredia/everything-claude-code/blob/main/skills/videodb/scripts/ws_listener.py): `skills/videodb/scripts/ws_listener.py`

### Other components

- **Agent user**

## Connections

- Agent user → Session start: starts session (evidence: `scripts/hooks/session-start.js`)
- Session start → Session files: loads recent context (evidence: `scripts/hooks/session-start.js`)
- Session start → Session aliases: lists aliases (evidence: `scripts/hooks/session-start.js`)
- Session start → Package manager selection: detects preference (evidence: `scripts/hooks/session-start.js`)
- Session start → Project detection: detects project (evidence: `scripts/hooks/session-start.js`)
- Session start → Hook utilities: uses file helpers (evidence: `scripts/hooks/session-start.js`)
- Agent user → Session end: ends session (evidence: `scripts/hooks/session-end.js`)
- Session end → Session files: writes summary (evidence: `scripts/hooks/session-end.js`)
- Session end → Hook utilities: uses file helpers (evidence: `scripts/hooks/session-end.js`)
- Session records → Session files: reads and writes (evidence: `scripts/lib/session-manager.js`)
- Hook flag runner → Hook runtime controls: checks runtime flags (evidence: `scripts/hooks/run-with-flags.js`)
- Format and quality checks → Formatter resolution: resolves formatter (evidence: `scripts/hooks/quality-gate.js`)
- Formatter resolution → Package manager selection: selects runner (evidence: `scripts/lib/resolve-formatter.js`)
- Dev server guard → Shell command parser: splits commands (evidence: `scripts/hooks/pre-bash-dev-server-block.js`)
- Session learning evaluator → Hook utilities: uses file helpers (evidence: `scripts/hooks/evaluate-session.js`)
- Agent user → Session learning evaluator: triggers evaluation
- Agent user → Instinct learning tools: manages instincts
- Agent user → Security wrapper: runs security scan
- Security wrapper → Security monitor: invokes monitor
- Agent user → Harness management: manages harness
