# oneredoak/claude-code-workflows architecture

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

- Interactive diagram: https://gitdiagram.com/oneredoak/claude-code-workflows
- Repository: https://github.com/oneredoak/claude-code-workflows

## Overview

##### Project type and purpose
- This is an open‐source collection of AI‐driven “workflows” (code review, security review, design review) built on top of GitHub Actions and Claude Code agents.
- Its goal is to automate routine checks (syntax, style, security, UI/UX) via slash‐commands and CI pipelines, freeing engineers for higher‐level tasks.

##### File structure
- Top‐level directories:
- code‐review/
- security‐review/
- design‐review/
- Each workflow folder contains:
- README.md (workflow overview & usage)
- YAML files for GitHub Actions and slash‐command definitions
- No “src” code library—this repo is configuration‐centric.
- Key integration points: GitHub Actions, slash‐commands (e.g., /pragmatic-code-review), external AI services.

##### Extract architectural insights from the README
- Dual‐loop architecture in code reviews (coarse + fine passes).
- Security workflow aligns with OWASP Top 10.
- Design workflow uses Playwright for visual checks.
- All workflows support on‐demand (slash) and automated (PR event) triggers.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer Interaction
    Dev["Developer\n(IDE/CLI)"]:::dev
    Dev -->|push / PR event| GitHubRepo
    Dev -->|slash command| SlashRouter

    %% GitHub Repository
    GitHubRepo["GitHub Repository\n(Configuration-Centric"]:::github
    GitHubRepo -->|hosts workflows| CodeReviewModule
    GitHubRepo -->|hosts workflows| SecurityModule
    GitHubRepo -->|hosts workflows| DesignModule

    %% Slash Command Router
    SlashRouter["Slash-Command Interface\n(GitHub UI/CLI/ChatOps)"]:::dev
    SlashRouter -->|/pragmatic-code-review| CR_Slash
    SlashRouter -->|/security-review| SR_Slash
    SlashRouter -->|/design-review| DR_Slash

    %% Code Review Workflow
    subgraph "Code Review Workflow" 
        direction TB
        CR_Slash["/pragmatic-code-review\n(Slash Command)"]:::dev
        CR_Checkout["Checkout Code"]:::github
        CR_GHAction["Run code-review Workflows"]:::github
        CR_DualLoop["Dual-Loop Review\n(Coarse + Fine)"]:::compute
        CR_AI["Claude Code Agent\n(Anthropic API)"]:::ai
        CR_Results["PR Comments & GitHub Checks"]:::github
    end
    SlashRouter --> CR_Slash
    CR_Slash --> CR_Checkout
    GitHubRepo --> CR_Checkout
    CR_Checkout --> CR_GHAction
    CR_GHAction --> CR_DualLoop
    CR_DualLoop --> CR_AI
    CR_AI --> CR_Results

    %% Security Review Workflow
    subgraph "Security Review Workflow"
        direction TB
        SR_Slash["/security-review\n(Slash Command)"]:::dev
        SR_Checkout["Checkout Code"]:::github
        SR_GHAction["Run security.yml\n(OWASP Top 10)"]:::github
        SR_DualLoop["Dual-Loop Security\n(Coarse + Fine)"]:::compute
        SR_AI["Claude Code Agent\n(Anthropic API)"]:::ai
        SR_Results["PR Comments & GitHub Checks"]:::github
    end
    SlashRouter --> SR_Slash
    SR_Slash --> SR_Checkout
    GitHubRepo --> SR_Checkout
    SR_Checkout --> SR_GHAction
    SR_GHAction --> SR_DualLoop
    SR_DualLoop --> SR_AI
    SR_AI --> SR_Results

    %% Design Review Workflow
    subgraph "Design Review Workflow"
        direction TB
        DR_Slash["/design-review\n(Slash Command)"]:::dev
        DR_Checkout["Checkout Code"]:::github
        DR_GHAction["Run design-review Workflows"]:::github
        DR_Playwright["Playwright MCP\n(Headless Browser)"]:::compute
        DR_Screenshots["Screenshots\n(Artifacts)"]:::db
        DR_AI["Claude Code Agent\n(Anthropic API)"]:::ai
        DR_Results["PR Comments & GitHub Checks"]:::github
    end
    SlashRouter --> DR_Slash
    DR_Slash --> DR_Checkout
    GitHubRepo --> DR_Checkout
    DR_Checkout --> DR_GHAction
    DR_GHAction --> DR_Playwright
    DR_Playwright --> DR_Screenshots
    DR_Screenshots --> DR_AI
    DR_AI --> DR_Results

    %% Click Events for Code Review
    click CR_GHAction "https://github.com/oneredoak/claude-code-workflows/blob/main/code-review/claude-code-review.yml"
    click CR_Slash "https://github.com/oneredoak/claude-code-workflows/blob/main/code-review/pragmatic-code-review-slash-command.md"
    click CR_AI "https://github.com/oneredoak/claude-code-workflows/blob/main/code-review/pragmatic-code-review-subagent.md"
    click CR_GHAction "https://github.com/oneredoak/claude-code-workflows/blob/main/code-review/claude-code-review-custom.yml"
    click CodeReviewModule "https://github.com/oneredoak/claude-code-workflows/tree/main/code-review/"

    %% Click Events for Security Review
    click SR_GHAction "https://github.com/oneredoak/claude-code-workflows/blob/main/security-review/security.yml"
    click SR_Slash "https://github.com/oneredoak/claude-code-workflows/blob/main/security-review/security-review-slash-command.md"
    click SecurityModule "https://github.com/oneredoak/claude-code-workflows/tree/main/security-review/"

    %% Click Events for Design Review
    click DR_AI "https://github.com/oneredoak/claude-code-workflows/blob/main/design-review/design-review-agent.md"
    click DR_AI "https://github.com/oneredoak/claude-code-workflows/blob/main/design-review/design-review-claude-md-snippet.md"
    click DR_Slash "https://github.com/oneredoak/claude-code-workflows/blob/main/design-review/design-review-slash-command.md"
    click DR_Playwright "https://github.com/oneredoak/claude-code-workflows/blob/main/design-review/design-principles-example.md"
    click DesignModule "https://github.com/oneredoak/claude-code-workflows/tree/main/design-review/"

    %% Click Events for Repo Files
    click GitHubRepo "https://github.com/oneredoak/claude-code-workflows/blob/main/README.md"
    click GitHubRepo "https://github.com/oneredoak/claude-code-workflows/tree/main/LICENSE"

    %% Styles
    classDef dev fill:#FFDD99,stroke:#E69A00,stroke-width:1px
    classDef github fill:#99CCFF,stroke:#1F6FEB,stroke-width:1px
    classDef ai fill:#99FF99,stroke:#33AA33,stroke-width:1px
    classDef compute fill:#FFCC99,stroke:#CC6600,stroke-width:1px
    classDef db fill:#DDA0DD,stroke:#800080,stroke-width:1px
```
