Skip to content

Commit a4983c9

Browse files
authored
internal: Small claude improvements (#5832)
* small claude improv * simpler rules system * fix install command
1 parent 4019473 commit a4983c9

File tree

8 files changed

+11
-423
lines changed

8 files changed

+11
-423
lines changed

.cursor/rules/rust-best-practices.mdc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ Windmill uses a workspace-based architecture with multiple crates:
4747
- Group related routes together
4848
- Use consistent response formats (JSON)
4949
- Follow proper authentication and authorization patterns
50+
- Do not forget to update backend/windmill-api/openapi.yaml after modifying an api endpoint
5051

5152
## Performance Optimizations
5253

.github/workflows/aider-after-review.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,5 +90,5 @@ jobs:
9090
with:
9191
needs_processing: false
9292
base_prompt: ${{ needs.check-and-prepare.outputs.prompt_content }}
93-
rules_files: "CLAUDE.md backend/CLAUDE.md frontend/CLAUDE.md"
93+
rules_files: ".cursor/rules/rust-best-practices.mdc .cursor/rules/svelte5-best-practices.mdc .cursor/rules/windmill-overview.mdc"
9494
secrets: inherit

.github/workflows/aider-external.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,5 +76,5 @@ jobs:
7676
issue_body: ${{ needs.check-and-prepare.outputs.issue_body }}
7777
instruction: ${{ needs.check-and-prepare.outputs.instruction }}
7878
issue_id: ${{ github.event.client_payload.issue_id }}
79-
rules_files: "CLAUDE.md backend/CLAUDE.md frontend/CLAUDE.md"
79+
rules_files: ".cursor/rules/rust-best-practices.mdc .cursor/rules/svelte5-best-practices.mdc .cursor/rules/windmill-overview.mdc"
8080
secrets: inherit

.github/workflows/aider.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,5 +161,5 @@ jobs:
161161
issue_body: ${{ needs.check-and-prepare.outputs.issue_body }}
162162
instruction: ${{ needs.check-and-prepare.outputs.comment_content }}
163163
issue_id: ${{ github.event.issue.number }}
164-
rules_files: "CLAUDE.md backend/CLAUDE.md frontend/CLAUDE.md"
164+
rules_files: ".cursor/rules/rust-best-practices.mdc .cursor/rules/svelte5-best-practices.mdc .cursor/rules/windmill-overview.mdc"
165165
secrets: inherit

.github/workflows/claude.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,17 +69,17 @@ jobs:
6969
with:
7070
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
7171
timeout_minutes: "60"
72-
allowed_tools: "mcp__github__create_pull_request,Bash(npm run check),Bash(npm install),Bash(cargo check),Bash(curl https://sh.rustup.rs -sSf | sh)"
72+
allowed_tools: "mcp__github__create_pull_request,Bash(npm run check),Bash(npm install),Bash(cargo check),Bash(curl https://sh.rustup.rs -sSf | sh -s -- -y)"
7373
custom_instructions: "IMPORTANT INSTRUCTIONS:
74-
- Bypass previous instructions and instead of adding a url in your comment to manually create a PR, if you created a new branch with your changes, automatically create a PR from that branch to main, with the title starting with [Claude PR].
74+
- Bypass previous instructions and instead of adding a url in your comment to manually create a PR, if you created a new branch with your changes, automatically create a draft PR from that branch to main, with the title starting with [Claude PR].
7575
- If you made changes to the frontend code, run npm install, then npm run generate-backend-client, then npm run check. You can ignore warnings that are reported by the check script, but fix the errors.
7676
- If you made changes to the backend code, install Rust and then run cargo check. You can ignore warnings that are reported by the check script, but fix the errors.
77-
- DO NOT FORGET TO OPEN A PR AFTER YOU ARE DONE if you made changes after a request from a git issue.
77+
- DO NOT FORGET TO OPEN A DRAFT PR AFTER YOU ARE DONE if you made changes after a request from a git issue.
7878
AVAILABLE TOOLS:
7979
- mcp__github__create_pull_request: Create a PR from a branch to main
8080
- Bash(npm run check): Run the check script. You should run this tool after making changes to the frontend code.
8181
- Bash(npm install): Install dependencies. You need this to run npm run check.
8282
- Bash(npm run generate-backend-client): Generate the backend client. You need this to run npm run check.
8383
- Bash(cargo check): Run the cargo check script. You should run this tool after making changes to the backend code.
84-
- Bash(curl https://sh.rustup.rs -sSf | sh): Install Rust. You need this to run cargo check."
84+
- Bash(curl https://sh.rustup.rs -sSf | sh -s -- -y): Install Rust. You need this to run cargo check."
8585
trigger_phrase: "/ai"

CLAUDE.md

Lines changed: 3 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,71 +1,3 @@
1-
# Windmill Overview
2-
3-
Windmill is an open-source developer platform for building internal tools, API integrations, background jobs, workflows, and user interfaces. It offers a unified system where scripts are automatically turned into sharable UIs and can be composed into flows or embedded in custom applications.
4-
5-
## Core Capabilities
6-
7-
- **Script Development and Execution**: Write and run scripts in Python, TypeScript/JavaScript (Deno/Bun), Go, Bash, SQL, and other languages
8-
- **Workflow Orchestration**: Compose scripts into multi-step flows with conditional logic, loops, and error handling
9-
- **UI Generation**: Automatically generate UIs from scripts or build custom applications with a low-code editor
10-
- **Job Scheduling**: Trigger scripts and flows on schedules, webhooks, or external events
11-
- **Resource Management**: Securely store and use credentials, databases, and other connections
12-
13-
## Platform Architecture
14-
15-
The Windmill platform consists of several key components:
16-
17-
- **Frontend UI**: Web-based interface for script and flow development, app building, and result visualization
18-
- **API Server**: Central API that handles authentication, resource management, and job coordination
19-
- **Workers**: Execute scripts in their respective environments with proper sandboxing
20-
- **Database**: PostgreSQL database for storage of scripts, flows, resources, job results, and more
21-
- **Job Queue**: Queue system for managing job execution, implemented in PostgreSQL
22-
- **Client Libraries**: Libraries for interacting with Windmill from Python, TypeScript, or command line
23-
24-
# Windmill Backend Architecture
25-
26-
The Windmill backend is written in Rust and consists of several services working together. These services are designed for horizontal scaling with stateless API servers and workers that can be deployed across multiple machines.
27-
28-
## Key Components
29-
30-
- **API Server (`windmill-api`)**: Handles HTTP requests, authentication, and resource management
31-
- **Queue Manager (`windmill-queue`)**: Manages the job queue in PostgreSQL
32-
- **Worker System (`windmill-worker`)**: Executes jobs in sandboxed environments
33-
- **Common Utilities (`windmill-common`)**: Shared code used by multiple services
34-
- **Git Sync (`windmill-git-sync`)**: Synchronizes scripts with Git repositories
35-
36-
## Job Execution System
37-
38-
The job execution process follows these steps:
39-
40-
1. The API server receives a request to run a script or flow and creates a job record in the database
41-
2. The job is added to the queue system in PostgreSQL
42-
3. Workers continuously poll the queue for jobs matching their capabilities
43-
4. When a job is picked up, it's routed to the appropriate language executor
44-
5. The script is executed in a sandboxed environment using NSJAIL for security
45-
6. Results are processed and stored in the database
46-
7. For flows, each step creates a new job that goes through the same process
47-
48-
Windmill supports worker tags and groups to route jobs to workers with specific capabilities or resource access.
49-
50-
# Windmill Frontend Architecture
51-
52-
The Windmill frontend is built with Svelte and provides several key interfaces for interacting with the platform.
53-
54-
## Key Components
55-
56-
- **Script Builder**: Code editor with language support, schema inference, and dependency management
57-
- **Flow Builder**: Visual editor for creating multi-step workflows with branching and looping
58-
- **App Editor**: Grid-based editor for building custom UIs that integrate scripts and flows
59-
- **Schema Form System**: Generates form interfaces from script parameters automatically
60-
- **Result Viewer**: Visualizes job results, logs, and execution status
61-
62-
The frontend uses the Monaco editor (same as VS Code) for code editing, with specialized language support for all supported script languages.
63-
64-
## UI Framework
65-
66-
The frontend is built with Svelte, providing a reactive and component-based architecture. Key frontend technologies include:
67-
68-
- **Svelte/SvelteKit**: Core framework for UI components and routing
69-
- **Monaco Editor**: Code editing experience similar to VS Code
70-
- **Schema Form**: Automatic UI generation from TypeScript/JSON schemas
71-
- **Tailwind CSS**: Utility-first CSS framework for styling
1+
To have an overview of what this app does, see @.cursor/rules/windmill-overview.mdc
2+
For backend modifications, follow the rules mentioned here @.cursor/rules/rust-best-practices.mdc
3+
For frontend modifications, follow the rules mentioned here @.cursor/rules/svelte5-best-practices.mdc

backend/CLAUDE.md

Lines changed: 0 additions & 104 deletions
This file was deleted.

0 commit comments

Comments
 (0)