Organization Rules allow you to specify global instructions that the Codegen agent will follow across all repositories in your organization. These rules act as organization-wide guidelines that ensure consistent behavior and standards across your entire codebase.
When you define Organization Rules, they are automatically applied to every agent run within your organization, regardless of which repository the agent is working on. This provides a centralized way to enforce:
Organization Rules work in conjunction with User Rules and Repository Rules to provide flexible rule management:
Repository Rules (most specific) take precedence over Organization and User Rules for that repository
Organization Rules apply across the org and override User Rules
User Rules (personal prompts) apply by default, unless overridden by Org or Repo rules
This hierarchy allows you to set organization-wide defaults while still maintaining repository-specific customizations when needed, while preserving user preferences where they don’t conflict.
Always use git add . when staging changes for commitNever use git push --force under any circumstancesAlways create descriptive commit messages following conventional commit format
Always include comprehensive error handling in new functionsFollow the existing code style and formatting conventionsAdd unit tests for any new functionalityInclude JSDoc comments for all public functions
Never commit sensitive information like API keys or passwordsAlways validate user input before processingUse environment variables for configuration values
Organization Rules provide a powerful way to maintain consistency across your entire organization while still allowing flexibility for individual repositories. Use them to establish your organization’s coding culture and ensure all agent interactions align with your standards.