cursorrules / rules
Cursor rule88 starsChanged 13 months agoMITView on GitHub
Standards for Lagoon configuration files and deployment workflows
Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.
Of the Cursor rule files we read, the 1,533 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository70 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- .cursor/rules/accessibility-standards.mdcCursor rule
- .cursor/rules/api-standards.mdcCursor rule
- .cursor/rules/behat-ai-guide.mdcCursor rule
- .cursor/rules/behat-steps.mdcCursor rule
- .cursor/rules/build-optimization.mdcCursor rule
- .cursor/rules/code-generation-standards.mdcCursor rule
- .cursor/rules/confluence-editing-standards.mdcCursor rule
- .cursor/rules/cursor-rules.mdcCursor rule
- .cursor/rules/debugging-standards.mdcCursor rule
- .cursor/rules/docker-compose-standards.mdcCursor rule
- .cursor/rules/drupal-authentication-failures.mdcCursor rule
- .cursor/rules/drupal-broken-access-control.mdcCursor rule
- .cursor/rules/drupal-cryptographic-failures.mdcCursor rule
- .cursor/rules/drupal-database-standards.mdcCursor rule
- .cursor/rules/drupal-file-permissions.mdcCursor rule
- .cursor/rules/drupal-injection.mdcCursor rule
- .cursor/rules/drupal-insecure-design.mdcCursor rule
- .cursor/rules/drupal-integrity-failures.mdcCursor rule
- .cursor/rules/drupal-logging-failures.mdcCursor rule
- .cursor/rules/drupal-security-misconfiguration.mdcCursor rule
- .cursor/rules/drupal-ssrf.mdcCursor rule
- .cursor/rules/drupal-vulnerable-components.mdcCursor rule
- .cursor/rules/generic_bash_style.mdcCursor rule
- .cursor/rules/git-commit-standards.mdcCursor rule
- .cursor/rules/github-actions-standards.mdcCursor rule
- .cursor/rules/improve-cursorrules-efficiency.mdcCursor rule
- .cursor/rules/javascript-broken-access-control.mdcCursor rule
- .cursor/rules/javascript-cryptographic-failures.mdcCursor rule
- .cursor/rules/javascript-identification-authentication-failures.mdcCursor rule
- .cursor/rules/javascript-injection.mdcCursor rule
- .cursor/rules/javascript-insecure-design.mdcCursor rule
- .cursor/rules/javascript-performance.mdcCursor rule
- .cursor/rules/javascript-security-logging-monitoring-failures.mdcCursor rule
- .cursor/rules/javascript-security-misconfiguration.mdcCursor rule
- .cursor/rules/javascript-server-side-request-forgery.mdcCursor rule
- .cursor/rules/javascript-software-data-integrity-failures.mdcCursor rule
- .cursor/rules/javascript-standards.mdcCursor rule
- .cursor/rules/javascript-vulnerable-outdated-components.mdcCursor rule
- .cursor/rules/lagoon-docker-compose-standards.mdcCursor rule
- .cursor/rules/multi-agent-coordination.mdcCursor rule
- .cursor/rules/new-pull-request.mdcCursor rule
- .cursor/rules/node-dependencies.mdcCursor rule
- .cursor/rules/php-drupal-best-practices.mdcCursor rule
- .cursor/rules/php-drupal-development-standards.mdcCursor rule
- .cursor/rules/php-memory-optimisation.mdcCursor rule
- .cursor/rules/project-definition-template.mdcCursor rule
- .cursor/rules/pull-request-changelist-instructions.mdcCursor rule
- .cursor/rules/python-authentication-failures.mdcCursor rule
- .cursor/rules/python-broken-access-control.mdcCursor rule
- .cursor/rules/python-cryptographic-failures.mdcCursor rule
- .cursor/rules/python-injection.mdcCursor rule
- .cursor/rules/python-insecure-design.mdcCursor rule
- .cursor/rules/python-integrity-failures.mdcCursor rule
- .cursor/rules/python-logging-monitoring-failures.mdcCursor rule
- .cursor/rules/python-security-misconfiguration.mdcCursor rule
- .cursor/rules/python-ssrf.mdcCursor rule
- .cursor/rules/python-vulnerable-outdated-components.mdcCursor rule
- .cursor/rules/react-patterns.mdcCursor rule
- The first 60 shown.
The file
We split this lagoon-yml-standards.mdc into the rules it gives an agent
7 rules. About 0 are common, 7 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈7
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 41
Use environment-specific configurations for different deployment targets
- Distinctive: line 44
Use environment-specific routes and domains
- Distinctive: line 50
Use wildcard domains for feature branch environments
- Distinctive: line 55
Use conditional task execution based on environment
- Distinctive: line 60
Use randomized cron schedules with 'M' and 'H' notation
- Distinctive: line 62
Ensure cron jobs have proper error handling
- Distinctive: line 63
Use descriptive names for cron jobs
≈ “Common” is an estimate: at least 1 in 5 of the 3,030 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
---
description: Standards for Lagoon configuration files and deployment workflows
globs: .lagoon.yml, .lagoon.*.yml
---
# Lagoon Configuration Standards
Ensures proper configuration and best practices for Lagoon deployment files, focusing on environment configuration, routes, tasks, and deployment workflows.
<rule>
name: lagoon_yml_standards
description: Enforce standards for Lagoon configuration files
filters:
- type: file_extension
pattern: "\\.(yml|yaml)$"
- type: file_name
pattern: "^\\.lagoon(\\.\\w+)?\\.yml$"
actions:
- type: enforce
conditions:
- pattern: "environments:\\s*[\\w-]+:\\s*routes:\\s*-\\s*\\w+:\\s*-[^:]+:\\s*tls-acme:\\s*true"
message: "Ensure tls-acme is set to 'false' until DNS points to Lagoon to prevent certificate issuance failures"
- pattern: "post-rollout:\\s*-\\s*run:\\s*command:\\s*drush(?!.*\\|\\|)"
message: "Wrap Drush commands in proper error handling using '|| exit 1' to ensure deployment fails on command errors"
- pattern: "pre-rollout:\\s*-\\s*run:\\s*command:\\s*(?!.*if)"
message: "Add conditional checks for pre-rollout tasks to ensure they only run when necessary"
- pattern: "cronjobs:\\s*-\\s*name:[^\\n]*\\n\\s*schedule:\\s*'\\*\\s*\\*'"
message: "Use 'M' or 'H' notation for randomized cron scheduling to prevent server load spikes"
- pattern: "routes:\\s*-\\s*\\w+:\\s*-[^:]+:\\s*(?!.*redirects:)"
message: "Consider configuring redirects for routes to handle legacy URLs or domain migrations"
- type: suggest
message: |
## Lagoon Configuration Best Practices:
### Environment Configuration
- Use environment-specific configurations for different deployment targets
- Define environment types for proper resource allocation
- Configure environment variables specific to each environment
- Use environment-specific routes and domains
### Routes Configuration
- Configure routes with appropriate SSL settings
- Set up redirects for legacy URLs
- Configure proper insecure traffic handling (Allow or Redirect)
- Use wildcard domains for feature branch environments
### Tasks Configuration
- Implement proper pre-rollout tasks with error handling
- Configure post-rollout tasks with appropriate conditions
- Use conditional task execution based on environment
- Include database sync in PR environments
- Implement proper backup strategies before major changes
### Cron Configuration
- Use randomized cron schedules with 'M' and 'H' notation
- Set appropriate frequency for different tasks
- Ensure cron jobs have proper error handling
- Use descriptive names for cron jobs
### Example Configuration:
```yaml
environments:
main:
cronjobs:
- name: drush-cron
schedule: '*/15 * * * *'
command: drush cron
service: cli
routes:
- nginx:
- example.com:
tls-acme: true
insecure: Redirect
redirects:
- www.example.com
tasks:
pre-rollout:
- run:
name: Drush pre-update
command: |
if drush status --fields=bootstrap | grep -q "Successful"; then
drush state:set system.maintenance_mode 1 -y
drush cr
fi
service: cli
post-rollout:
- run:
name: Drush post-update
command: |
drush updb -y || exit 1
drush cr
drush state:set system.maintenance_mode 0 -y
service: cli
```
- type: validate
conditions:
- pattern: "environments:\\s*[\\w-]+:\\s*types:\\s*[^\\n]*"
message: "Define environment types for proper resource allocation and environment-specific configuration"
- pattern: "tasks:\\s*(pre|post)-rollout:"
message: "Include both pre and post rollout tasks for robust deployments and proper application state management"
- pattern: "routes:\\s*-\\s*\\w+:\\s*-[^:]+:\\s*insecure:\\s*(Allow|Redirect)"
message: "Configure proper insecure traffic handling to ensure secure access to your application"
- pattern: "(?!.*backup-strategy:)"
message: "Consider implementing a backup strategy for critical environments to prevent data loss"
- pattern: "cronjobs:\\s*-\\s*name:[^\\n]*\\n\\s*schedule:[^\\n]*\\n\\s*(?!.*service:)"
message: "Specify the service for cron jobs to ensure they run in the correct container"
metadata:
priority: critical
version: 1.1
</rule> Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

