# vudovn/ag-kit architecture

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

- Interactive diagram: https://gitdiagram.com/vudovn/ag-kit
- Repository: https://github.com/vudovn/ag-kit

## Overview

AG Kit combines a project-installation CLI, a public landing/documentation site, and an Antigravity-oriented agent workspace contract. The main user workflow is to install or update the managed workspace, preserving local changes and backups, then use its agents, skills, rules, workflows, memory, MCP guidance, orchestration, and safety hook in Antigravity. The supplied tree contains the CLI and web application but not the documented `.agents/` implementation, so those workspace capabilities are represented from the README; their internal connections are not inferred.

Main entry points: [`cli/bin/index.js`](https://github.com/vudovn/ag-kit/blob/main/cli/bin/index.js) (CLI commands), [`web/src/components/layout`](https://github.com/vudovn/ag-kit/tree/main/web/src/components/layout) (Docs experience), [`web/src/app/page.tsx`](https://github.com/vudovn/ag-kit/blob/main/web/src/app/page.tsx) (Landing page), [`cli/lib/managed-tree.js`](https://github.com/vudovn/ag-kit/blob/main/cli/lib/managed-tree.js) (Managed updates)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Workspace CLI"]
  node_cli_commands["CLI commands<br/>[index.js]"]
  node_template_download["Template download<br/>[index.js]"]
  node_managed_updates["Managed updates<br/>[managed-tree.js]"]
  node_backup_restore["Backup and restore<br/>[managed-tree.js]"]
end

subgraph group_web["Web experience"]
  node_landing_page["Landing page<br/>[page.tsx]"]
  node_landing_content["Landing content"]
  node_docs_experience["Docs experience"]
  node_mdx_components["MDX components"]
  node_search["Docs search<br/>[search-dialog.tsx]"]
  node_localization["Localization<br/>[dictionaries.ts]"]
end

subgraph group_kit["Agent workspace"]
  node_workspace_contract["Workspace contract"]
  node_agents_skills["Agents and skills"]
  node_rules_workflows["Rules and workflows"]
  node_memory["Persistent memory"]
  node_mcp_guidance["MCP guidance"]
  node_orchestration["Orchestration"]
  node_safety_hook["Safety hook"]
end

node_developer(("Developer"))
node_workspace[("Project workspace")]
node_antigravity(("Google Antigravity"))

node_developer -->|"runs commands"| node_cli_commands
node_cli_commands -->|"downloads template"| node_template_download
node_template_download -->|"provides files"| node_managed_updates
node_cli_commands -->|"plans and installs"| node_managed_updates
node_cli_commands -->|"lists and restores"| node_backup_restore
node_managed_updates -.->|"writes managed tree"| node_workspace
node_backup_restore -->|"backs up and restores"| node_workspace
node_developer -.->|"visits"| node_landing_page
node_landing_page -->|"renders"| node_landing_content
node_developer -.->|"reads documentation"| node_docs_experience
node_docs_experience -.->|"offers search"| node_search
node_docs_experience -.->|"renders MDX"| node_mdx_components
node_landing_page -.->|"uses translations"| node_localization
node_docs_experience -.->|"uses translations"| node_localization
node_workspace_contract -->|"includes"| node_agents_skills
node_workspace_contract -->|"includes"| node_rules_workflows
node_workspace_contract -->|"includes"| node_memory
node_workspace_contract -->|"includes"| node_mcp_guidance
node_workspace_contract -->|"includes"| node_orchestration
node_workspace_contract -->|"includes"| node_safety_hook
node_antigravity -->|"loads workspace"| node_workspace_contract

click node_cli_commands "https://github.com/vudovn/ag-kit/blob/main/cli/bin/index.js"
click node_template_download "https://github.com/vudovn/ag-kit/blob/main/cli/bin/index.js"
click node_managed_updates "https://github.com/vudovn/ag-kit/blob/main/cli/lib/managed-tree.js"
click node_backup_restore "https://github.com/vudovn/ag-kit/blob/main/cli/lib/managed-tree.js"
click node_landing_page "https://github.com/vudovn/ag-kit/blob/main/web/src/app/page.tsx"
click node_landing_content "https://github.com/vudovn/ag-kit/tree/main/web/src/components/landing"
click node_docs_experience "https://github.com/vudovn/ag-kit/tree/main/web/src/components/layout"
click node_mdx_components "https://github.com/vudovn/ag-kit/tree/main/web/src/components/mdx"
click node_search "https://github.com/vudovn/ag-kit/blob/main/web/src/components/layout/header/components/search-dialog.tsx"
click node_localization "https://github.com/vudovn/ag-kit/blob/main/web/src/i18n/dictionaries.ts"

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_cli_commands,node_template_download,node_managed_updates,node_backup_restore toneBlue
class node_landing_page,node_landing_content,node_docs_experience,node_mdx_components,node_search,node_localization,node_workspace toneAmber
class node_workspace_contract,node_agents_skills,node_rules_workflows,node_memory,node_mcp_guidance,node_orchestration,node_safety_hook toneMint
class node_developer,node_antigravity toneIndigo
```

## Components

### Workspace CLI

- [CLI commands](https://github.com/vudovn/ag-kit/blob/main/cli/bin/index.js): `cli/bin/index.js`
- [Template download](https://github.com/vudovn/ag-kit/blob/main/cli/bin/index.js): `cli/bin/index.js`
- [Managed updates](https://github.com/vudovn/ag-kit/blob/main/cli/lib/managed-tree.js): `cli/lib/managed-tree.js`
- [Backup and restore](https://github.com/vudovn/ag-kit/blob/main/cli/lib/managed-tree.js): `cli/lib/managed-tree.js`

### Web experience

- [Landing page](https://github.com/vudovn/ag-kit/blob/main/web/src/app/page.tsx): `web/src/app/page.tsx`
- [Landing content](https://github.com/vudovn/ag-kit/tree/main/web/src/components/landing): `web/src/components/landing`
- [Docs experience](https://github.com/vudovn/ag-kit/tree/main/web/src/components/layout): `web/src/components/layout`
- [MDX components](https://github.com/vudovn/ag-kit/tree/main/web/src/components/mdx): `web/src/components/mdx`
- [Docs search](https://github.com/vudovn/ag-kit/blob/main/web/src/components/layout/header/components/search-dialog.tsx): `web/src/components/layout/header/components/search-dialog.tsx`
- [Localization](https://github.com/vudovn/ag-kit/blob/main/web/src/i18n/dictionaries.ts): `web/src/i18n/dictionaries.ts`

### Agent workspace

- **Workspace contract**
- **Agents and skills**
- **Rules and workflows**
- **Persistent memory**
- **MCP guidance**
- **Orchestration**
- **Safety hook**

### Other components

- **Developer**
- **Project workspace**
- **Google Antigravity**

## Connections

- Developer → CLI commands: runs commands (evidence: `README.md`)
- CLI commands → Template download: downloads template (evidence: `cli/bin/index.js`)
- Template download → Managed updates: provides files (evidence: `cli/bin/index.js`)
- CLI commands → Managed updates: plans and installs (evidence: `cli/bin/index.js`)
- CLI commands → Backup and restore: lists and restores (evidence: `cli/bin/index.js`)
- Managed updates → Project workspace: writes managed tree
- Backup and restore → Project workspace: backs up and restores (evidence: `cli/lib/managed-tree.js`)
- Developer → Landing page: visits
- Landing page → Landing content: renders (evidence: `web/src/app/page.tsx`)
- Developer → Docs experience: reads documentation
- Docs experience → Docs search: offers search
- Docs experience → MDX components: renders MDX
- Landing page → Localization: uses translations
- Docs experience → Localization: uses translations
- Workspace contract → Agents and skills: includes (evidence: `README.md`)
- Workspace contract → Rules and workflows: includes (evidence: `README.md`)
- Workspace contract → Persistent memory: includes (evidence: `README.md`)
- Workspace contract → MCP guidance: includes (evidence: `README.md`)
- Workspace contract → Orchestration: includes (evidence: `README.md`)
- Workspace contract → Safety hook: includes (evidence: `README.md`)
- Google Antigravity → Workspace contract: loads workspace (evidence: `README.md`)
