AI SummaryThis file contains instructions for AI coding assistants working on the Forem codebase (the platform that powers dev.to). Follow these rules and patterns to ensure high-quality contributions. If you are modifying these agent instructions, you MUST replicate your changes across all of Forem's ecosyst
Install
Copy this and paste it into Claude Code, Cursor, or any AI assistant:
I want to add the "forem — Windsurf Rules" prompt rules to my project. Repository: https://github.com/forem/forem Please read the repo to find the rules/prompt file, then: 1. Download it to the correct location (.cursorrules, .windsurfrules, .github/prompts/, or project root — based on the file type) 2. If there's an existing rules file, merge the new rules in rather than overwriting 3. Confirm what was added
Description
For empowering community 🌱
Forem AI Context & Rules
This file contains instructions for AI coding assistants working on the Forem codebase (the platform that powers dev.to). Follow these rules and patterns to ensure high-quality contributions.
Meta: AI Instruction Synchronization
If you are modifying these agent instructions, you MUST replicate your changes across all of Forem's ecosystem AI configuration files to maintain absolute consistency. Forem utilizes multiple environments, and an update to one must happen in all: • AGENTS.md • .cursorrules • .windsurfrules • .github/copilot-instructions.md
General Philosophy
• Follow Patterns: Application consistency is key. Mimic existing patterns for controllers, services, and specs. • Smaller is Better: Prefer atomic, focused modifications over sprawling refactors. • Re-usability: Changes should strengthen Forem as a platform, avoiding DEV-specific hardcoding unless absolutely necessary. • Disruption & Clarification: Always be vigilant about not disrupting existing functionality (e.g., core auth, feed sorting, cache pipelines). If a proposal touches or runs adjacent to a major subsystem, explicitly ask clarifying questions to validate isolation and proactively determine if extra tests are needed to guarantee no side-effects occur.
Background Workers & Sidekiq
• Job Storm Prevention: When enqueuing jobs that might trigger rapidly (e.g., from reactions, comments, or article updates), carefully assess if a debounce lock is required. • Modern Configuration: Prefer include Sidekiq::Job over Sidekiq::Worker. Use sidekiq_options lock: :until_executing, on_conflict: :replace for coalescing repetitive events.
Discussion
Health Signals
My Fox Den
Community Rating
Sign in to rate this booster
Works With
Any AI assistant that accepts custom rules or system prompts