# grapeot/devin.cursorrules architecture

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

- Interactive diagram: https://gitdiagram.com/grapeot/devin.cursorrules
- Repository: https://github.com/grapeot/devin.cursorrules

## Overview

This repository equips Cursor, Windsurf, and GitHub Copilot with agent instructions and standalone Python tools. The intended workflow is an IDE assistant planning a task, using web/search/LLM capabilities as needed, and learning from user corrections. The README also describes experimental planner–executor collaboration and screenshot verification. Tool implementations are sampled, but the instruction files and their wiring into IDEs are not; those relationships are shown only where documented.

Main entry points: [`.cursorrules`](https://github.com/grapeot/devin.cursorrules/blob/master/.cursorrules) (Cursor Rules), [`.windsurfrules`](https://github.com/grapeot/devin.cursorrules/blob/master/.windsurfrules) (Windsurf Rules), [`.github/copilot-instructions.md`](https://github.com/grapeot/devin.cursorrules/blob/master/.github/copilot-instructions.md) (Copilot Instructions), [`scratchpad.md`](https://github.com/grapeot/devin.cursorrules/blob/master/scratchpad.md) (Working Scratchpad)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent["Agent Instructions"]
  node_cursor_rules["Cursor Rules<br/>[.cursorrules]"]
  node_windsurf_rules["Windsurf Rules<br/>[.windsurfrules]"]
  node_copilot_rules["Copilot Instructions"]
  node_scratchpad["Working Scratchpad<br/>[scratchpad.md]"]
  node_planner["Task Planner"]
  node_executor["Task Executor"]
end

subgraph group_tools["Research Tools"]
  node_scraper["Web Scraper<br/>[web_scraper.py]"]
  node_search["Web Search<br/>[search_engine.py]"]
end

subgraph group_analysis["LLM and Verification"]
  node_llm["LLM Analysis<br/>[llm_api.py]"]
  node_screenshot["Screenshot Capture"]
end

node_user(("User"))
node_ide(("IDE Assistant"))
node_correction(("User Corrections"))

node_user -->|"assigns task"| node_ide
node_ide -->|"uses instructions"| node_cursor_rules
node_ide -->|"uses instructions"| node_windsurf_rules
node_ide -->|"uses instructions"| node_copilot_rules
node_ide -->|"uses scratchpad"| node_scratchpad
node_ide -.->|"plans task"| node_planner
node_planner -.->|"coordinates execution"| node_executor
node_ide -->|"chooses tool"| node_scraper
node_ide -->|"chooses tool"| node_search
node_ide -->|"chooses tool"| node_llm
node_ide -.->|"verifies visually"| node_screenshot
node_correction -->|"adds lessons"| node_cursor_rules

click node_cursor_rules "https://github.com/grapeot/devin.cursorrules/blob/master/.cursorrules"
click node_windsurf_rules "https://github.com/grapeot/devin.cursorrules/blob/master/.windsurfrules"
click node_copilot_rules "https://github.com/grapeot/devin.cursorrules/blob/master/.github/copilot-instructions.md"
click node_scratchpad "https://github.com/grapeot/devin.cursorrules/blob/master/scratchpad.md"
click node_scraper "https://github.com/grapeot/devin.cursorrules/blob/master/tools/web_scraper.py"
click node_search "https://github.com/grapeot/devin.cursorrules/blob/master/tools/search_engine.py"
click node_llm "https://github.com/grapeot/devin.cursorrules/blob/master/tools/llm_api.py"
click node_screenshot "https://github.com/grapeot/devin.cursorrules/blob/master/tools/screenshot_utils.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_cursor_rules,node_windsurf_rules,node_copilot_rules,node_scratchpad,node_planner,node_executor,node_user,node_correction toneBlue
class node_scraper,node_search toneAmber
class node_llm,node_screenshot toneMint
class node_ide toneIndigo
```

## Components

### Agent Instructions

- [Cursor Rules](https://github.com/grapeot/devin.cursorrules/blob/master/.cursorrules): `.cursorrules`
- [Windsurf Rules](https://github.com/grapeot/devin.cursorrules/blob/master/.windsurfrules): `.windsurfrules`
- [Copilot Instructions](https://github.com/grapeot/devin.cursorrules/blob/master/.github/copilot-instructions.md): `.github/copilot-instructions.md`
- [Working Scratchpad](https://github.com/grapeot/devin.cursorrules/blob/master/scratchpad.md): `scratchpad.md`
- **Task Planner**
- **Task Executor**

### Research Tools

- [Web Scraper](https://github.com/grapeot/devin.cursorrules/blob/master/tools/web_scraper.py): `tools/web_scraper.py`
- [Web Search](https://github.com/grapeot/devin.cursorrules/blob/master/tools/search_engine.py): `tools/search_engine.py`

### LLM and Verification

- [LLM Analysis](https://github.com/grapeot/devin.cursorrules/blob/master/tools/llm_api.py): `tools/llm_api.py`
- [Screenshot Capture](https://github.com/grapeot/devin.cursorrules/blob/master/tools/screenshot_utils.py): `tools/screenshot_utils.py`

### Other components

- **User**
- **IDE Assistant**
- **User Corrections**

## Connections

- User → IDE Assistant: assigns task (evidence: `README.md`)
- IDE Assistant → Cursor Rules: uses instructions (evidence: `README.md`)
- IDE Assistant → Windsurf Rules: uses instructions (evidence: `README.md`)
- IDE Assistant → Copilot Instructions: uses instructions (evidence: `README.md`)
- IDE Assistant → Working Scratchpad: uses scratchpad (evidence: `README.md`)
- IDE Assistant → Task Planner: plans task (evidence: `README.md`)
- Task Planner → Task Executor: coordinates execution (evidence: `README.md`)
- IDE Assistant → Web Scraper: chooses tool (evidence: `README.md`)
- IDE Assistant → Web Search: chooses tool (evidence: `README.md`)
- IDE Assistant → LLM Analysis: chooses tool (evidence: `README.md`)
- IDE Assistant → Screenshot Capture: verifies visually (evidence: `README.md`)
- User Corrections → Cursor Rules: adds lessons (evidence: `README.md`)
