Organization Rules
Configure global rules that apply across all repositories in your organization
Organization Rules
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.
How Organization Rules Work
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:
- Coding standards and conventions
- Security practices
- Documentation requirements
- Git workflow preferences
- Communication styles
Rule Hierarchy
Organization Rules work in conjunction with Repository Rules to provide flexible rule management:
- Organization Rules are applied first as the baseline for all repositories
- Repository Rules can override or extend Organization Rules for specific repositories
- If both are defined, Repository Rules take precedence for conflicting instructions
This hierarchy allows you to set organization-wide defaults while still maintaining repository-specific customizations when needed.
Setting Up Organization Rules
To configure Organization Rules:
- Navigate to your organization settings
- Select Organization Rules from the sidebar
- Enter your rules in the text area provided
- Click Save to apply the rules
Example Organization Rules
Here are some common examples of Organization Rules:
Git Workflow Standards
Code Quality Standards
Security Guidelines
Documentation Requirements
Best Practices
Keep Rules Clear and Specific
- Write rules that are easy to understand and follow
- Be specific about what you want the agent to do or avoid
- Use clear, actionable language
Avoid Conflicting Rules
- Ensure Organization Rules don’t contradict each other
- Consider how they might interact with Repository Rules
- Test rules with different types of tasks
Regular Review and Updates
- Periodically review your Organization Rules for relevance
- Update rules as your organization’s practices evolve
- Remove outdated or unnecessary rules
Balance Global vs Repository-Specific Rules
- Use Organization Rules for truly universal standards
- Reserve Repository Rules for project-specific requirements
- Avoid duplicating rules between levels
Troubleshooting
Rules Not Being Applied
If your Organization Rules don’t seem to be working:
- Check Rule Syntax: Ensure your rules are clearly written and unambiguous
- Verify Save: Make sure you clicked “Save” after entering your rules
- Repository Override: Check if Repository Rules are overriding your Organization Rules
- Rule Conflicts: Look for contradictory instructions that might confuse the agent
Agent Behavior Issues
If the agent isn’t following your rules as expected:
- Simplify Rules: Break complex rules into smaller, more specific instructions
- Add Context: Provide more context about when and how rules should be applied
- Test Incrementally: Add rules gradually to identify which ones work best
Related Settings
- Repository Rules: Set repository-specific rules that can override Organization Rules
- Agent Permissions: Control what actions the agent can perform
- Model Configuration: Configure which AI model the agent uses
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.