# vasilyu1983/ai-agents-public architecture

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

- Interactive diagram: https://gitdiagram.com/vasilyu1983/ai-agents-public
- Repository: https://github.com/vasilyu1983/ai-agents-public

## Overview

AI-Agents is a library of reusable agent expertise and controlled multi-agent runs for Claude Code and Codex. Users invoke a saved workflow or let an assistant load a relevant skill; specialists, team recipes, rules, and opt-in hooks provide supporting capabilities and guardrails. The repository also contains an AI context-layer reference implementation with contracts, runtime verbs, provider adapters, and evaluation metrics. Workflow stages and the broad library capabilities are documented in the README; runtime edges are limited to relationships visible in sampled source or the SOURCE INDEX.

Main entry points: [`agents/workflows/adversarial-review.js`](https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/adversarial-review.js) (Saved workflows), [`skills/universal`](https://github.com/vasilyu1983/ai-agents-public/tree/main/skills/universal) (Skills library), [`skills/universal/ai-context-layer/builds/reference_app/contracts`](https://github.com/vasilyu1983/ai-agents-public/tree/main/skills/universal/ai-context-layer/builds/reference_app/contracts) (Context contracts), [`skills/universal/ai-context-layer/builds/reference_app/runtime/composition.py`](https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/reference_app/runtime/composition.py) (Runtime composition)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_product["Agent library"]
  node_skills["Skills library"]
  node_subagents["Subagents"]
  node_teams["Team recipes"]
  node_rules["Language and domain rules"]
end

subgraph group_workflow["Saved workflows"]
  node_saved_workflows["Saved workflows"]
  node_adversarial_review["Adversarial review"]
  node_review_fix["Review-fix loop<br/>[review-fix-loop.js]"]
  node_source_check["Source check<br/>[source-check.js]"]
  node_feature_delivery["Feature delivery"]
  node_build_mvp["MVP build<br/>[build-mvp.js]"]
  node_epic_delivery["Epic delivery<br/>[epic-delivery.js]"]
  node_expert_board["Expert board<br/>[expert-board.js]"]
  node_marketing_campaign["Marketing campaign"]
end

subgraph group_guardrails["Safety hooks"]
  node_hooks["Opt-in hooks"]
  node_config_guard["Config guard<br/>[config-guard.py]"]
  node_policy["Policy loader<br/>[policy.py]"]
end

subgraph group_context["Context reference"]
  node_context_request["Assembly request and bundle<br/>[assembly.py]"]
  node_contracts["Context contracts"]
  node_composition["Runtime composition<br/>[composition.py]"]
  node_verbs["Assembly verbs<br/>[verbs.py]"]
  node_adapters["Provider adapters"]
  node_retrieval["Postgres retrieval"]
  node_embedding["Embedding client<br/>[base.py]"]
  node_postgres[("Postgres vector store")]
  node_eval_metrics["Context evaluation metrics<br/>[rot.py]"]
  node_eval_reports["Evaluation rollups<br/>[rollup.py]"]
end

node_user(("User"))

node_user -->|"invokes"| node_saved_workflows
node_saved_workflows -->|"runs review"| node_adversarial_review
node_saved_workflows -->|"runs fix loop"| node_review_fix
node_saved_workflows -->|"runs source check"| node_source_check
node_saved_workflows -->|"runs delivery"| node_feature_delivery
node_saved_workflows -->|"runs build"| node_build_mvp
node_saved_workflows -->|"runs epic"| node_epic_delivery
node_saved_workflows -->|"runs board"| node_expert_board
node_saved_workflows -->|"runs campaign"| node_marketing_campaign
node_user -->|"requests expertise"| node_skills
node_skills -.->|"can delegate"| node_subagents
node_user -->|"uses recipes"| node_teams
node_skills -.->|"uses guidance"| node_rules
node_hooks -->|"includes guard"| node_config_guard
node_config_guard -->|"loads policy"| node_policy
node_context_request -->|"defines types"| node_contracts
node_composition -->|"composes"| node_adapters
node_composition -->|"uses types"| node_contracts
node_verbs -->|"uses protocols"| node_adapters
node_verbs -->|"uses types"| node_contracts
node_retrieval -->|"embeds text"| node_embedding
node_retrieval -->|"queries and writes"| node_postgres
node_eval_reports -->|"renders results"| node_eval_metrics

click node_skills "https://github.com/vasilyu1983/ai-agents-public/tree/main/skills/universal"
click node_subagents "https://github.com/vasilyu1983/ai-agents-public/tree/main/agents/claude"
click node_teams "https://github.com/vasilyu1983/ai-agents-public/tree/main/agents/teams"
click node_rules "https://github.com/vasilyu1983/ai-agents-public/tree/main/rules"
click node_saved_workflows "https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/adversarial-review.js"
click node_adversarial_review "https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/adversarial-review.js"
click node_review_fix "https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/review-fix-loop.js"
click node_source_check "https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/source-check.js"
click node_feature_delivery "https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/feature-delivery.js"
click node_build_mvp "https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/build-mvp.js"
click node_epic_delivery "https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/epic-delivery.js"
click node_expert_board "https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/expert-board.js"
click node_marketing_campaign "https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/marketing-campaign.js"
click node_hooks "https://github.com/vasilyu1983/ai-agents-public/tree/main/hooks"
click node_config_guard "https://github.com/vasilyu1983/ai-agents-public/blob/main/hooks/config-guard.py"
click node_policy "https://github.com/vasilyu1983/ai-agents-public/blob/main/hooks/policy.py"
click node_context_request "https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/reference_app/contracts/assembly.py"
click node_contracts "https://github.com/vasilyu1983/ai-agents-public/tree/main/skills/universal/ai-context-layer/builds/reference_app/contracts"
click node_composition "https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/reference_app/runtime/composition.py"
click node_verbs "https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/reference_app/runtime/verbs.py"
click node_adapters "https://github.com/vasilyu1983/ai-agents-public/tree/main/skills/universal/ai-context-layer/builds/reference_app/adapters"
click node_retrieval "https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/reference_app/adapters/postgres_retrieval.py"
click node_embedding "https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/reference_app/adapters/base.py"
click node_eval_metrics "https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/evals/metrics/rot.py"
click node_eval_reports "https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/evals/reports/rollup.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_skills,node_subagents,node_teams,node_rules,node_user toneBlue
class node_saved_workflows,node_adversarial_review,node_review_fix,node_source_check,node_feature_delivery,node_build_mvp,node_epic_delivery,node_expert_board,node_marketing_campaign toneAmber
class node_hooks,node_config_guard,node_policy toneMint
class node_context_request,node_contracts,node_composition,node_verbs,node_adapters,node_retrieval,node_embedding,node_postgres,node_eval_metrics,node_eval_reports toneRose
```

## Components

### Agent library

- [Skills library](https://github.com/vasilyu1983/ai-agents-public/tree/main/skills/universal): `skills/universal`
- [Subagents](https://github.com/vasilyu1983/ai-agents-public/tree/main/agents/claude): `agents/claude`
- [Team recipes](https://github.com/vasilyu1983/ai-agents-public/tree/main/agents/teams): `agents/teams`
- [Language and domain rules](https://github.com/vasilyu1983/ai-agents-public/tree/main/rules): `rules`

### Saved workflows

- [Saved workflows](https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/adversarial-review.js): `agents/workflows/adversarial-review.js`
- [Adversarial review](https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/adversarial-review.js): `agents/workflows/adversarial-review.js`
- [Review-fix loop](https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/review-fix-loop.js): `agents/workflows/review-fix-loop.js`
- [Source check](https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/source-check.js): `agents/workflows/source-check.js`
- [Feature delivery](https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/feature-delivery.js): `agents/workflows/feature-delivery.js`
- [MVP build](https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/build-mvp.js): `agents/workflows/build-mvp.js`
- [Epic delivery](https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/epic-delivery.js): `agents/workflows/epic-delivery.js`
- [Expert board](https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/expert-board.js): `agents/workflows/expert-board.js`
- [Marketing campaign](https://github.com/vasilyu1983/ai-agents-public/blob/main/agents/workflows/marketing-campaign.js): `agents/workflows/marketing-campaign.js`

### Safety hooks

- [Opt-in hooks](https://github.com/vasilyu1983/ai-agents-public/tree/main/hooks): `hooks`
- [Config guard](https://github.com/vasilyu1983/ai-agents-public/blob/main/hooks/config-guard.py): `hooks/config-guard.py`
- [Policy loader](https://github.com/vasilyu1983/ai-agents-public/blob/main/hooks/policy.py): `hooks/policy.py`

### Context reference

- [Assembly request and bundle](https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/reference_app/contracts/assembly.py): `skills/universal/ai-context-layer/builds/reference_app/contracts/assembly.py`
- [Context contracts](https://github.com/vasilyu1983/ai-agents-public/tree/main/skills/universal/ai-context-layer/builds/reference_app/contracts): `skills/universal/ai-context-layer/builds/reference_app/contracts`
- [Runtime composition](https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/reference_app/runtime/composition.py): `skills/universal/ai-context-layer/builds/reference_app/runtime/composition.py`
- [Assembly verbs](https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/reference_app/runtime/verbs.py): `skills/universal/ai-context-layer/builds/reference_app/runtime/verbs.py`
- [Provider adapters](https://github.com/vasilyu1983/ai-agents-public/tree/main/skills/universal/ai-context-layer/builds/reference_app/adapters): `skills/universal/ai-context-layer/builds/reference_app/adapters`
- [Postgres retrieval](https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/reference_app/adapters/postgres_retrieval.py): `skills/universal/ai-context-layer/builds/reference_app/adapters/postgres_retrieval.py`
- [Embedding client](https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/reference_app/adapters/base.py): `skills/universal/ai-context-layer/builds/reference_app/adapters/base.py`
- **Postgres vector store**
- [Context evaluation metrics](https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/evals/metrics/rot.py): `skills/universal/ai-context-layer/builds/evals/metrics/rot.py`
- [Evaluation rollups](https://github.com/vasilyu1983/ai-agents-public/blob/main/skills/universal/ai-context-layer/builds/evals/reports/rollup.py): `skills/universal/ai-context-layer/builds/evals/reports/rollup.py`

### Other components

- **User**

## Connections

- User → Saved workflows: invokes (evidence: `README.md`)
- Saved workflows → Adversarial review: runs review (evidence: `README.md`)
- Saved workflows → Review-fix loop: runs fix loop (evidence: `README.md`)
- Saved workflows → Source check: runs source check (evidence: `README.md`)
- Saved workflows → Feature delivery: runs delivery (evidence: `README.md`)
- Saved workflows → MVP build: runs build (evidence: `README.md`)
- Saved workflows → Epic delivery: runs epic (evidence: `README.md`)
- Saved workflows → Expert board: runs board (evidence: `README.md`)
- Saved workflows → Marketing campaign: runs campaign (evidence: `README.md`)
- User → Skills library: requests expertise (evidence: `README.md`)
- Skills library → Subagents: can delegate (evidence: `README.md`)
- User → Team recipes: uses recipes (evidence: `README.md`)
- Skills library → Language and domain rules: uses guidance (evidence: `README.md`)
- Opt-in hooks → Config guard: includes guard (evidence: `README.md`)
- Config guard → Policy loader: loads policy (evidence: `hooks/config-guard.py`)
- Assembly request and bundle → Context contracts: defines types (evidence: `skills/universal/ai-context-layer/builds/reference_app/contracts/__init__.py`)
- Runtime composition → Provider adapters: composes (evidence: `skills/universal/ai-context-layer/builds/reference_app/runtime/composition.py`)
- Runtime composition → Context contracts: uses types (evidence: `skills/universal/ai-context-layer/builds/reference_app/runtime/composition.py`)
- Assembly verbs → Provider adapters: uses protocols (evidence: `skills/universal/ai-context-layer/builds/reference_app/runtime/verbs.py`)
- Assembly verbs → Context contracts: uses types (evidence: `skills/universal/ai-context-layer/builds/reference_app/runtime/verbs.py`)
- Postgres retrieval → Embedding client: embeds text (evidence: `skills/universal/ai-context-layer/builds/reference_app/adapters/postgres_retrieval.py`)
- Postgres retrieval → Postgres vector store: queries and writes (evidence: `skills/universal/ai-context-layer/builds/reference_app/adapters/postgres_retrieval.py`)
- Evaluation rollups → Context evaluation metrics: renders results (evidence: `skills/universal/ai-context-layer/builds/evals/reports/rollup.py`)
