# s-smits/agentic-cursorrules architecture

> Architecture diagram of the GitHub repository s-smits/agentic-cursorrules, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-01-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/s-smits/agentic-cursorrules
- Repository: https://github.com/s-smits/agentic-cursorrules

## Overview

##### Main Components

a) Core System Components:
- Configuration Manager (handling config.yaml)
- File Tree Parser
- Agent Rule Generator
- Domain Partitioner
- Markdown Generator

b) External Interfaces:
- IDE Integration Layer (Cursor, Windsurf)
- File System Interface
- Version Control System Interface

**┌─ IDE Integration Layer ─┐**
- Cursor │ Windsurf │ Others

**┌─ Core Processing Layer ──────────────┐**
- ┌─────────────┐    ┌──────────────┐ │
- Domain    │←→  │    Agent     │ │
- Partitioner │    │   Generator  │ │
- ┘    └──────────────┘ │
- ↑                   ↑         │
- ┌─────────────┐    ┌──────────────┐ │
- File Tree  │←→  │   Markdown   │ │
- Parser    │    │  Generator   │ │
- ┘    └──────────────┘ │
- ┘

**┌─ Configuration Layer ─┐**
- config.yaml       │
- ┘

##### Key Elements to Highlight

- Blue rectangles: Core processing components
- Green ovals: External interfaces
- Yellow diamonds: Configuration elements

##### Important Relationships

- Configuration flow from config.yaml to Domain Partitioner
- Bidirectional communication between File Tree Parser and Domain Partitioner
- Output flow from Markdown Generator to IDE Integration Layer
- Domain boundary enforcement paths

**┌─ Domain Partitioning Example ─┐**
- Project Root                  │
- app (Agent 1)           │
- api (Agent 2)           │
- db  (Agent 3)           │
- ┘

##### Additional Notes

- Use clear labels for each component
- Version control integration points
- Recurring update loop if --recurring flag is used
- File extension filtering process

##### Technical Details

- YAML configuration processing flow
- Markdown generation pipeline
- Agent rule application process
- IDE integration points
- File system monitoring for recurring updates

This system design should clearly communicate how the tool prevents conflicts and maintains codebase coherence through its domain partitioning and agent rule generation mechanisms.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph IDE
        IDE1[Cursor]
        IDE2[Windsurf]
        IDE3[Other IDEs]
    end

    subgraph Core
        FTP[File Tree Parser]
        AG[Agent Rule Generator]
        DP[Domain Partitioner]
        MG[Markdown Generator]
    end

    subgraph Config
        CM["Configuration Manager"]
    end

    subgraph "Domain Partitioning"
        PR[Project Root]
        APP[app - Agent 1]
        API[api - Agent 2]
        DB[db - Agent 3]
        
        PR --> APP
        PR --> API
        PR --> DB
    end

    %% Relationships
    CM --> FTP
    CM --> DP
    CM --> AG
    
    FTP <--> DP
    DP <--> AG
    AG --> MG
    
    MG --> IDE1
    MG --> IDE2
    MG --> IDE3

    %% Click events
    click CM "https://github.com/s-smits/agentic-cursorrules/blob/main/config.yaml"
    click IDE1 "https://github.com/s-smits/agentic-cursorrules/blob/main/.cursorrules.example"
    click FTP "https://github.com/s-smits/agentic-cursorrules/blob/main/main.py"
    click AG "https://github.com/s-smits/agentic-cursorrules/blob/main/main.py"
    click DP "https://github.com/s-smits/agentic-cursorrules/blob/main/main.py"
    click MG "https://github.com/s-smits/agentic-cursorrules/blob/main/main.py"

    %% Styling
    classDef core fill:#a8d1ff,stroke:#333,stroke-width:2px
    classDef ide fill:#90EE90,stroke:#333,stroke-width:2px
    classDef config fill:#FFD700,stroke:#333,stroke-width:2px
    classDef domain fill:#FFB6C1,stroke:#333,stroke-width:2px

    class FTP,AG,DP,MG core
    class IDE1,IDE2,IDE3 ide
    class CM config
    class PR,APP,API,DB domain

    %% Legend
    subgraph Legend
        L1[Core Components]:::core
        L2[IDE Integration]:::ide
        L3[Configuration]:::config
        L4[Domain Elements]:::domain
    end
```
