# avivl/claude-007-agents architecture

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

- Interactive diagram: https://gitdiagram.com/avivl/claude-007-agents
- Repository: https://github.com/avivl/claude-007-agents

## Overview

1. **What this repository is**
This is not a conventional application runtime; it is a packaged **Claude Code agent system**. The repo’s primary product is a large catalog of agent definitions plus the tooling needed to bootstrap, select, and coordinate them for arbitrary projects.

2. **Core asset layer: agent definitions**
The main architectural surface is `.claude/agents/`, which contains the actual agent specs. These are grouped by concern: backend, frontend, infrastructure, security, testing, orchestration, business, data, design, and universal. Most files are Markdown prompts; a few are YAML personalities and shell scripts. This directory is the canonical “knowledge and behavior” layer.

3. **Agent registry and naming boundary**
`agents.json` and `.claude/agents/agents.json` act as registration/lookup metadata so Claude Code can discover and reference agents by name. The repo therefore separates **agent behavior** (the markdown/yaml files) from **agent cataloging** (the JSON registry).

4. **Orchestration subsystem**
The `.claude/agents/orchestration/`, `orchestrators/`, `context-orchestrators/`, `performance-optimizers/`, and `safety-specialists/` folders define the coordination model. These agents do not implement product features; they route work, preserve context, manage parallelism, validate risk, and decide which specialists should be activated.

5. **Bootstrap subsystem**
`src/bootstrap/bootstrap-engine.js` is the setup engine for applying this system to another project. Its job is to inspect a target repo, infer stack and complexity, then write or update project-local Claude configuration such as `CLAUDE.md` and related agent settings. The README positions this as the required first step for each project.

6. **Task Master integration layer**
`src/bridge-agents/` contains bridge agents specifically for Task Master workflows: `task-orchestrator-bridge.js` and `task-executor-bridge.js`. This is an integration boundary between Claude agents and Task Master’s codebase-aware task management, letting orchestration and execution happen through specialized adapter agents rather than directly in generic prompts.

7. **Codebase analysis package**
`src/codebase-analysis/` is a separate Node-based package focused on analyzing projects, optimizing task generation, and supporting deployment/testing flows. It contains its own CLI entrypoints (`bin/task-master-cli.js`, `bin/tm-deploy`), analyzers, optimization engines, deployment helpers, benchmark/test scripts, and reports. Architecturally, this is the “intelligence and analysis” layer that feeds recommendations back into the agent system.

8. **Community templates and generated artifacts**
Within `src/codebase-analysis/community-templates/` and `community-docs/`, the repo ships reusable templates for project types, task types, team structures, and workflow patterns. These are content assets used by the analysis/bootstrap flow to generate project-specific configuration and documentation.

9. **Documentation as part of the system**
The `docs/` tree is extensive and functionally important: it explains installation, orchestration, workflows, MCP integration, personality rules, Task Master integration, and review flows. In architecture terms, docs are not peripheral—they are the operating manual for how the agent system is intended to be assembled and used.

10. **External runtime dependencies**
The system is designed around **Claude Code CLI** plus optional MCP services such as Task Master, Basic Memory, Context7, Sequential Thinking, GitHub MCP, and others described in the README. These are external service boundaries: Claude Code invokes the local agent definitions, while MCP services provide live memory, documentation, reasoning, and repository interaction.

11. **Packaging and distribution**
`package.json` at the root plus nested package files in `src/bridge-agents/` and `src/codebase-analysis/` indicate a multi-package Node.js distribution. The repository is meant to be cloned, copied, or symlinked into other projects rather than deployed as a single server or web app.

12. **Validation and delivery pipeline**
`.github/workflows/validate-system.yml` provides CI validation for the agent system itself. That implies a repository-level quality gate around the correctness of agent definitions, scripts, and integrations, rather than around application business logic.

13. **Data and control flow**
Typical flow is: a developer invokes Claude Code → Claude selects a bootstrap/orchestration agent → the bootstrap engine analyzes the target repo → configuration and agent selection are written into the project → Task Master bridge agents optionally coordinate task planning/execution → codebase-analysis tools and MCP integrations provide deeper project awareness and validation.

14. **How to diagram it**
The main diagram should center on three boundaries: **agent content** (`.claude/agents`), **bootstrap/integration tooling** (`src/bootstrap`, `src/bridge-agents`), and **analysis/templating tooling** (`src/codebase-analysis`). Around those, show the external execution environment: Claude Code CLI, target projects, GitHub Actions CI, and optional MCP-backed services.

Main entry points: [`.claude/agents/orchestration`](https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/orchestration) (Orchestration Core), [`src/bootstrap/bootstrap-engine.js`](https://github.com/avivl/claude-007-agents/blob/main/src/bootstrap/bootstrap-engine.js) (Bootstrap Engine), [`src/codebase-analysis`](https://github.com/avivl/claude-007-agents/tree/main/src/codebase-analysis) (Codebase Analysis), [`.claude/agents`](https://github.com/avivl/claude-007-agents/blob/main/.claude/agents) (Agent Specs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_g_agents["Agent Catalog"]
  node_n_agents_json_root["Agent Index<br/>registry<br/>[agents.json]"]
  node_n_agents_tree_json["Agent Catalog<br/>registry<br/>[agents.json]"]
  node_n_agent_specs["Agent Specs<br/>prompts<br/>[agents]"]
  node_n_personalities["Personalities<br/>profiles<br/>[personalities]"]
end

subgraph group_g_coord["Coordination"]
  node_n_orchestration_core{{"Orchestration Core<br/>coordination<br/>[orchestration]"}}
  node_n_context_orchestrators["Context Orchestrators<br/>coordination"]
  node_n_performance_optimizers["Performance Optimizers<br/>coordination"]
  node_n_safety_specialists["Safety Specialists<br/>validation<br/>[safety-specialists]"]
  node_n_task_orchestrator["Task Orchestrator<br/>task coordination"]
  node_n_task_executor["Task Executor<br/>task execution<br/>[task-executor.md]"]
end

subgraph group_g_tooling["Tooling"]
  node_n_bootstrap_engine["Bootstrap Engine<br/>setup engine"]
  node_n_bridge_agents["Bridge Agents<br/>adapter layer"]
  node_n_codebase_analysis["Codebase Analysis<br/>analysis package"]
  node_n_templates["Templates<br/>content assets"]
  node_n_package_root["Root Package<br/>npm package<br/>[package.json]"]
  node_n_package_analysis["Analysis Package<br/>npm package<br/>[package.json]"]
end

subgraph group_g_docs["Docs & CI"]
  node_n_docs["Docs<br/>documentation"]
  node_n_ci["System CI<br/>validation"]
end

subgraph group_g_external["External Runtime"]
  node_n_claude_code(("Claude Code<br/>runtime"))
  node_n_target_repo["Target Repo<br/>workspace"]
  node_n_mcp_services[("MCP Services<br/>external services")]
end

node_n_claude_code -->|"loads"| node_n_agents_json_root
node_n_claude_code -->|"loads"| node_n_agents_tree_json
node_n_agents_json_root -->|"indexes"| node_n_agent_specs
node_n_agents_tree_json -->|"indexes"| node_n_agent_specs
node_n_agent_specs -->|"includes"| node_n_personalities
node_n_orchestration_core -->|"coordinates"| node_n_context_orchestrators
node_n_orchestration_core -->|"optimizes"| node_n_performance_optimizers
node_n_orchestration_core -->|"checks"| node_n_safety_specialists
node_n_orchestration_core -->|"routes"| node_n_task_orchestrator
node_n_orchestration_core -->|"routes"| node_n_task_executor
node_n_bootstrap_engine -->|"analyzes"| node_n_target_repo
node_n_bootstrap_engine -->|"writes config from"| node_n_docs
node_n_bootstrap_engine -->|"selects"| node_n_agent_specs
node_n_bootstrap_engine -->|"configures"| node_n_claude_code
node_n_bridge_agents -->|"adapts"| node_n_task_orchestrator
node_n_bridge_agents -->|"adapts"| node_n_task_executor
node_n_codebase_analysis -->|"uses"| node_n_templates
node_n_codebase_analysis -->|"analyzes"| node_n_target_repo
node_n_codebase_analysis -.->|"integrates"| node_n_mcp_services
node_n_docs -->|"documents"| node_n_mcp_services
node_n_ci -->|"validates"| node_n_agent_specs
node_n_package_root -->|"packages"| node_n_bootstrap_engine
node_n_package_root -->|"packages"| node_n_bridge_agents
node_n_package_root -->|"packages"| node_n_codebase_analysis
node_n_package_analysis -->|"defines"| node_n_codebase_analysis

click node_n_agents_json_root "https://github.com/avivl/claude-007-agents/blob/main/agents.json"
click node_n_agents_tree_json "https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/agents.json"
click node_n_agent_specs "https://github.com/avivl/claude-007-agents/blob/main/.claude/agents"
click node_n_personalities "https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/personalities"
click node_n_orchestration_core "https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/orchestration"
click node_n_context_orchestrators "https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/context-orchestrators"
click node_n_performance_optimizers "https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/performance-optimizers"
click node_n_safety_specialists "https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/safety-specialists"
click node_n_task_orchestrator "https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/task-orchestrator.md"
click node_n_task_executor "https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/task-executor.md"
click node_n_bootstrap_engine "https://github.com/avivl/claude-007-agents/blob/main/src/bootstrap/bootstrap-engine.js"
click node_n_bridge_agents "https://github.com/avivl/claude-007-agents/tree/main/src/bridge-agents"
click node_n_codebase_analysis "https://github.com/avivl/claude-007-agents/tree/main/src/codebase-analysis"
click node_n_templates "https://github.com/avivl/claude-007-agents/tree/main/src/codebase-analysis/community-templates"
click node_n_docs "https://github.com/avivl/claude-007-agents/tree/main/docs"
click node_n_ci "https://github.com/avivl/claude-007-agents/blob/main/.github/workflows/validate-system.yml"
click node_n_package_root "https://github.com/avivl/claude-007-agents/blob/main/package.json"
click node_n_package_analysis "https://github.com/avivl/claude-007-agents/blob/main/src/codebase-analysis/package.json"

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_n_agents_json_root,node_n_agents_tree_json,node_n_agent_specs,node_n_personalities toneBlue
class node_n_orchestration_core,node_n_context_orchestrators,node_n_performance_optimizers,node_n_safety_specialists,node_n_task_orchestrator,node_n_task_executor toneAmber
class node_n_bootstrap_engine,node_n_bridge_agents,node_n_codebase_analysis,node_n_templates,node_n_package_root,node_n_package_analysis toneMint
class node_n_docs,node_n_ci toneRose
class node_n_claude_code,node_n_target_repo,node_n_mcp_services toneIndigo
```

## Components

### Agent Catalog

Canonical Claude Code agent definitions and registry metadata.

- [Agent Index](https://github.com/avivl/claude-007-agents/blob/main/agents.json): registry · Top-level agent discovery metadata for Claude Code. · `agents.json`
- [Agent Catalog](https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/agents.json): registry · Canonical registry for the .claude agent set. · `.claude/agents/agents.json`
- [Agent Specs](https://github.com/avivl/claude-007-agents/blob/main/.claude/agents): prompts · Markdown and YAML agent definitions covering all major concerns. · `.claude/agents`
- [Personalities](https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/personalities): profiles · Behavior profiles that tune style, quality, and persona. · `.claude/agents/personalities`

### Coordination

Orchestration, routing, safety, and execution specialists.

- [Orchestration Core](https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/orchestration): coordination · Activation, selection, workflow, and communication logic. · `.claude/agents/orchestration`
- [Context Orchestrators](https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/context-orchestrators): coordination · Session and planning agents that manage context and execution depth. · `.claude/agents/context-orchestrators`
- [Performance Optimizers](https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/performance-optimizers): coordination · Parallelization and batching agents for faster tool use. · `.claude/agents/performance-optimizers`
- [Safety Specialists](https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/safety-specialists): validation · Risk, permission, and verification focused agents. · `.claude/agents/safety-specialists`
- [Task Orchestrator](https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/task-orchestrator.md): task coordination · High-level task routing and orchestration entry point. · `.claude/agents/task-orchestrator.md`
- [Task Executor](https://github.com/avivl/claude-007-agents/blob/main/.claude/agents/task-executor.md): task execution · Agent for carrying out task-level work. · `.claude/agents/task-executor.md`

### Tooling

Bootstrap, bridge adapters, and codebase analysis package.

- [Bootstrap Engine](https://github.com/avivl/claude-007-agents/blob/main/src/bootstrap/bootstrap-engine.js): setup engine · Inspects a target repo and writes Claude project configuration. · `src/bootstrap/bootstrap-engine.js`
- [Bridge Agents](https://github.com/avivl/claude-007-agents/tree/main/src/bridge-agents): adapter layer · Task Master integration boundary for orchestration and execution. · `src/bridge-agents`
- [Codebase Analysis](https://github.com/avivl/claude-007-agents/tree/main/src/codebase-analysis): analysis package · Node package for project analysis, optimization, deployment, and reporting. · `src/codebase-analysis`
- [Templates](https://github.com/avivl/claude-007-agents/tree/main/src/codebase-analysis/community-templates): content assets · Reusable project, task, team, and workflow templates. · `src/codebase-analysis/community-templates`
- [Root Package](https://github.com/avivl/claude-007-agents/blob/main/package.json): npm package · Top-level Node package and distribution entry point. · `package.json`
- [Analysis Package](https://github.com/avivl/claude-007-agents/blob/main/src/codebase-analysis/package.json): npm package · Nested package for the analysis and task-master tooling. · `src/codebase-analysis/package.json`

### Docs & CI

Operational documentation and validation pipeline.

- [Docs](https://github.com/avivl/claude-007-agents/tree/main/docs): documentation · Operational guides for installation, orchestration, MCP, and workflows. · `docs`
- [System CI](https://github.com/avivl/claude-007-agents/blob/main/.github/workflows/validate-system.yml): validation · Repository validation workflow for the agent system. · `.github/workflows/validate-system.yml`

### External Runtime

Claude Code and optional MCP/task services used by the system.

- **Claude Code**: runtime · Primary execution environment that loads and invokes the agent system.
- **Target Repo**: workspace · Project being inspected, configured, and operated on by the bootstrap flow.
- **MCP Services**: external services · Optional live services such as memory, docs, reasoning, and repository integrations.

## Connections

- Claude Code → Agent Index: loads · Claude Code discovers the top-level agent catalog.
- Claude Code → Agent Catalog: loads · Claude Code resolves the canonical .claude agent registry.
- Agent Index → Agent Specs: indexes · Registry points to the agent specification corpus.
- Agent Catalog → Agent Specs: indexes · Catalog maps names to behavior definitions.
- Agent Specs → Personalities: includes · Some agents are implemented as personality profiles.
- Orchestration Core → Context Orchestrators: coordinates · Core orchestration activates context managers when needed.
- Orchestration Core → Performance Optimizers: optimizes · Core orchestration delegates batching and parallelism.
- Orchestration Core → Safety Specialists: checks · Core orchestration invokes safety and verification agents.
- Orchestration Core → Task Orchestrator: routes · Task orchestration is one of the primary coordination paths.
- Orchestration Core → Task Executor: routes · Execution work is delegated to the task executor.
- Bootstrap Engine → Target Repo: analyzes · Bootstrap inspects the project being onboarded.
- Bootstrap Engine → Docs: writes config from · Bootstrap uses repository guidance and conventions.
- Bootstrap Engine → Agent Specs: selects · Bootstrap chooses agents appropriate for the target stack.
- Bootstrap Engine → Claude Code: configures · Bootstrap prepares the project for Claude Code use.
- Bridge Agents → Task Orchestrator: adapts · Bridge layer exposes task orchestration through Task Master.
- Bridge Agents → Task Executor: adapts · Bridge layer exposes task execution through Task Master.
- Codebase Analysis → Templates: uses · Analysis package consumes reusable templates and generated content.
- Codebase Analysis → Target Repo: analyzes · It inspects repositories to generate recommendations and tasks.
- Codebase Analysis → MCP Services: integrates · Analysis can be extended by external MCP-backed capabilities.
- Docs → MCP Services: documents · Docs describe optional external service integrations.
- System CI → Agent Specs: validates · CI checks the correctness of the agent system assets.
- Root Package → Bootstrap Engine: packages · Root package ships the bootstrap tooling.
- Root Package → Bridge Agents: packages · Root package includes adapter modules.
- Root Package → Codebase Analysis: packages · Root package includes the analysis subsystem.
- Analysis Package → Codebase Analysis: defines · Nested package defines the analysis runtime entrypoints.
