# leongjinzhou/ai-company architecture

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

- Interactive diagram: https://gitdiagram.com/leongjinzhou/ai-company
- Repository: https://github.com/leongjinzhou/ai-company

## Overview

ai-company is a Claude Code working method for a founder-led software workflow, not a standalone app. The README documents the lead’s study–plan–build–check–show loop and the supporting agents, skills, rules, and checks. The sampled source also shows settings merging, machine verification, a reusable layout checker, and a private office proxy. Unexcerpted capabilities are included only where the README documents them; their internal wiring is not inferred.

Main entry points: [`claude/CLAUDE.md`](https://github.com/leongjinzhou/ai-company/blob/main/claude/CLAUDE.md) (Lead Session), [`claude/rules`](https://github.com/leongjinzhou/ai-company/tree/main/claude/rules) (Always-On Rules), [`claude/skills`](https://github.com/leongjinzhou/ai-company/tree/main/claude/skills) (Task Skills), [`settings-merge.mjs`](https://github.com/leongjinzhou/ai-company/blob/main/settings-merge.mjs) (Settings Merge)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Founder Workflow"]
  node_lead["Lead Session<br/>[CLAUDE.md]"]
  node_study["Study<br/>[CLAUDE.md]"]
  node_plan["Plan<br/>[CLAUDE.md]"]
  node_build["Build<br/>[CLAUDE.md]"]
  node_checks["Fast Checks<br/>[CLAUDE.md]"]
  node_result["Show Result<br/>[CLAUDE.md]"]
end

subgraph group_guidance["Company Guidance"]
  node_staff["Staff Agents"]
  node_skills["Task Skills"]
  node_rules["Always-On Rules"]
  node_lessons["Project Lessons"]
  node_hooks["Git Hooks"]
end

subgraph group_kit["Kit Utilities"]
  node_layout["Layout Check<br/>[layout-check.mjs]"]
  node_settings["Settings Merge<br/>[settings-merge.mjs]"]
  node_machinecheck["Machine Check<br/>[check.mjs]"]
  node_settingsfile["Claude Settings"]
end

subgraph group_access["Office Access"]
  node_officeproxy["Office Proxy<br/>[office-proxy.mjs]"]
  node_myoffice["myoffice Page"]
  node_tailscale["Tailscale"]
end

node_founder(("Founder"))

node_founder -->|"gives order"| node_lead
node_lead -->|"studies project"| node_study
node_study -->|"proposes plan"| node_plan
node_founder -->|"approves plan"| node_plan
node_lead -->|"builds product"| node_build
node_build -->|"runs checks"| node_checks
node_checks -->|"returns for fixes"| node_build
node_checks -->|"passes to show"| node_result
node_lead -->|"uses per task"| node_skills
node_lead -->|"delegates work"| node_staff
node_rules -->|"guides always"| node_lead
node_rules -->|"guides always"| node_staff
node_skills -->|"reads at start"| node_lessons
node_checks -->|"checks screens"| node_layout
node_settings -->|"reads additions"| node_settingsfile
node_machinecheck -->|"uses settings"| node_settings
node_founder -->|"installs kit"| node_hooks
node_tailscale -->|"forwards access"| node_officeproxy
node_officeproxy -->|"proxies requests"| node_myoffice

click node_lead "https://github.com/leongjinzhou/ai-company/blob/main/claude/CLAUDE.md"
click node_study "https://github.com/leongjinzhou/ai-company/blob/main/claude/CLAUDE.md"
click node_plan "https://github.com/leongjinzhou/ai-company/blob/main/claude/CLAUDE.md"
click node_build "https://github.com/leongjinzhou/ai-company/blob/main/claude/CLAUDE.md"
click node_checks "https://github.com/leongjinzhou/ai-company/blob/main/claude/CLAUDE.md"
click node_result "https://github.com/leongjinzhou/ai-company/blob/main/claude/CLAUDE.md"
click node_staff "https://github.com/leongjinzhou/ai-company/tree/main/claude/agents"
click node_skills "https://github.com/leongjinzhou/ai-company/tree/main/claude/skills"
click node_rules "https://github.com/leongjinzhou/ai-company/tree/main/claude/rules"
click node_lessons "https://github.com/leongjinzhou/ai-company/tree/main/claude/skills/lessons"
click node_layout "https://github.com/leongjinzhou/ai-company/blob/main/claude/templates/layout-check.mjs"
click node_settings "https://github.com/leongjinzhou/ai-company/blob/main/settings-merge.mjs"
click node_machinecheck "https://github.com/leongjinzhou/ai-company/blob/main/check.mjs"
click node_settingsfile "https://github.com/leongjinzhou/ai-company/blob/main/claude/settings-additions.json"
click node_hooks "https://github.com/leongjinzhou/ai-company/tree/main/claude/git-hooks"
click node_officeproxy "https://github.com/leongjinzhou/ai-company/blob/main/office-proxy.mjs"

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_lead,node_study,node_plan,node_build,node_checks,node_result toneBlue
class node_staff,node_skills,node_rules,node_lessons,node_hooks toneAmber
class node_layout,node_settings,node_machinecheck,node_settingsfile toneMint
class node_officeproxy,node_myoffice,node_tailscale toneRose
class node_founder toneIndigo
```

## Components

### Founder Workflow

- [Lead Session](https://github.com/leongjinzhou/ai-company/blob/main/claude/CLAUDE.md): `claude/CLAUDE.md`
- [Study](https://github.com/leongjinzhou/ai-company/blob/main/claude/CLAUDE.md): `claude/CLAUDE.md`
- [Plan](https://github.com/leongjinzhou/ai-company/blob/main/claude/CLAUDE.md): `claude/CLAUDE.md`
- [Build](https://github.com/leongjinzhou/ai-company/blob/main/claude/CLAUDE.md): `claude/CLAUDE.md`
- [Fast Checks](https://github.com/leongjinzhou/ai-company/blob/main/claude/CLAUDE.md): `claude/CLAUDE.md`
- [Show Result](https://github.com/leongjinzhou/ai-company/blob/main/claude/CLAUDE.md): `claude/CLAUDE.md`

### Company Guidance

- [Staff Agents](https://github.com/leongjinzhou/ai-company/tree/main/claude/agents): `claude/agents`
- [Task Skills](https://github.com/leongjinzhou/ai-company/tree/main/claude/skills): `claude/skills`
- [Always-On Rules](https://github.com/leongjinzhou/ai-company/tree/main/claude/rules): `claude/rules`
- [Project Lessons](https://github.com/leongjinzhou/ai-company/tree/main/claude/skills/lessons): `claude/skills/lessons`
- [Git Hooks](https://github.com/leongjinzhou/ai-company/tree/main/claude/git-hooks): `claude/git-hooks`

### Kit Utilities

- [Layout Check](https://github.com/leongjinzhou/ai-company/blob/main/claude/templates/layout-check.mjs): `claude/templates/layout-check.mjs`
- [Settings Merge](https://github.com/leongjinzhou/ai-company/blob/main/settings-merge.mjs): `settings-merge.mjs`
- [Machine Check](https://github.com/leongjinzhou/ai-company/blob/main/check.mjs): `check.mjs`
- [Claude Settings](https://github.com/leongjinzhou/ai-company/blob/main/claude/settings-additions.json): `claude/settings-additions.json`

### Office Access

- [Office Proxy](https://github.com/leongjinzhou/ai-company/blob/main/office-proxy.mjs): `office-proxy.mjs`
- **myoffice Page**
- **Tailscale**

### Other components

- **Founder**

## Connections

- Founder → Lead Session: gives order (evidence: `README.md`)
- Lead Session → Study: studies project (evidence: `README.md`)
- Study → Plan: proposes plan (evidence: `README.md`)
- Founder → Plan: approves plan (evidence: `README.md`)
- Lead Session → Build: builds product (evidence: `README.md`)
- Build → Fast Checks: runs checks (evidence: `README.md`)
- Fast Checks → Build: returns for fixes (evidence: `README.md`)
- Fast Checks → Show Result: passes to show (evidence: `README.md`)
- Lead Session → Task Skills: uses per task (evidence: `README.md`)
- Lead Session → Staff Agents: delegates work (evidence: `README.md`)
- Always-On Rules → Lead Session: guides always (evidence: `README.md`)
- Always-On Rules → Staff Agents: guides always (evidence: `README.md`)
- Task Skills → Project Lessons: reads at start (evidence: `README.md`)
- Fast Checks → Layout Check: checks screens (evidence: `README.md`)
- Settings Merge → Claude Settings: reads additions (evidence: `settings-merge.mjs`)
- Machine Check → Settings Merge: uses settings (evidence: `check.mjs`)
- Founder → Git Hooks: installs kit (evidence: `README.md`)
- Tailscale → Office Proxy: forwards access (evidence: `office-proxy.mjs`)
- Office Proxy → myoffice Page: proxies requests (evidence: `office-proxy.mjs`)
