diff --git a/docs/docs.json b/docs/docs.json
index dbf41ebe2..1b1f62939 100644
--- a/docs/docs.json
+++ b/docs/docs.json
@@ -44,6 +44,10 @@
"sandboxes/environment-variables",
"sandboxes/web-preview"
]
+ },
+ {
+ "group": "Settings",
+ "pages": ["settings/repo-rules", "settings/model-configuration"]
}
]
},
diff --git a/docs/images/llm-configuration.png b/docs/images/llm-configuration.png
new file mode 100644
index 000000000..d9c9d3005
Binary files /dev/null and b/docs/images/llm-configuration.png differ
diff --git a/docs/images/repo-rules.png b/docs/images/repo-rules.png
new file mode 100644
index 000000000..ee1ea4d6c
Binary files /dev/null and b/docs/images/repo-rules.png differ
diff --git a/docs/settings/model-configuration.mdx b/docs/settings/model-configuration.mdx
new file mode 100644
index 000000000..a6e0ef771
--- /dev/null
+++ b/docs/settings/model-configuration.mdx
@@ -0,0 +1,58 @@
+---
+title: "LLM Configuration"
+sidebarTitle: "Model Config"
+icon: "brain-circuit"
+---
+
+Codegen offers flexibility in choosing the Large Language Model (LLM) that powers your agent, allowing you to select from various providers and specific models. You can also configure custom API keys and base URLs if you have specific arrangements or need to use self-hosted models.
+
+## Accessing LLM Configuration
+
+LLM Configuration settings are applied globally for your entire organization. You can access and modify these settings by navigating to:
+
+[**codegen.com/settings/model**](https://codegen.com/settings/model)
+
+This central location ensures that all agents operating under your organization adhere to the selected LLM provider and model, unless specific per-repository or per-agent overrides are explicitly configured (if supported by your plan).
+
+
+
+
+
+As shown in the UI, you can generally configure the following:
+
+- **LLM Provider:** Select the primary LLM provider you wish to use. Codegen supports major providers such as:
+ - Anthropic
+ - OpenAI
+ - Google (Gemini)
+- **LLM Model:** Once a provider is selected, you can choose a specific model from that provider's offerings (e.g., Claude 3.7, GPT-4, Gemini Pro).
+
+## Model Recommendation
+
+
+ While Codegen provides access to a variety of models for experimentation and
+ specific use cases, **we highly encourage the use of Anthropic's Claude 3.7
+ (Haiku)**. Our internal testing and prompt engineering are heavily optimized
+ for Claude 3.7, and it consistently delivers the best performance,
+ reliability, and cost-effectiveness for most software engineering tasks
+ undertaken by Codegen agents. Other models are made available primarily for
+ users who are curious or have unique, pre-existing workflows.
+
+
+## Custom API Keys and Base URLs
+
+For advanced users or those with specific enterprise agreements with LLM providers, Codegen may allow you to use your own API keys and, in some cases, custom base URLs (e.g., for Azure OpenAI deployments or other proxy/gateway services).
+
+- **Custom API Key:** If you provide your own API key, usage will be billed to your account with the respective LLM provider.
+- **Custom Base URL:** This allows Codegen to route LLM requests through a different endpoint than the provider's default API.
+
+
+ Using the default Codegen-managed LLM configuration (especially with Claude
+ 3.7) is recommended for most users to ensure optimal performance and to
+ benefit from our continuous prompt improvements.
+
+
+
+ The availability of specific models, providers, and custom configuration
+ options may vary based on your Codegen plan and the current platform
+ capabilities.
+
diff --git a/docs/settings/repo-rules.mdx b/docs/settings/repo-rules.mdx
new file mode 100644
index 000000000..ddc0156a7
--- /dev/null
+++ b/docs/settings/repo-rules.mdx
@@ -0,0 +1,63 @@
+---
+title: "Repository Rules"
+sidebarTitle: "Repo Rules"
+icon: "shield-check"
+---
+
+Repository Rules in Codegen act as a persistent set of instructions or a "system prompt" for the AI agent whenever it operates on a specific repository. These rules guide the agent's behavior by enforcing coding standards and repository-specific conventions through automated reminders to the language model (LLM) during each task.
+
+
+
+
+
+## How Repository Rules Work
+
+When an agent is assigned a task on a repository with defined rules, those rules are automatically prepended or made available to the LLM as part of its context. This means the agent "sees" these rules alongside the actual task or prompt it receives.
+
+For example, if you have a rule like "Always use tabs for indentation," the agent will be reminded of this preference before it starts writing or modifying code in that repository.
+
+## Accessing and Configuring Repository Rules
+
+You can typically find and configure Repository Rules within the settings page for each specific repository in the Codegen web UI.
+
+1. Navigate to [codegen.com/repos](https://codegen.com/repos).
+2. Select the repository for which you want to set rules.
+3. Look for a section titled "Repository rules" or similar in the repository's settings.
+
+
+
+
+
+In the text area provided (as shown in the image), you can specify any rules you want the agent to follow for this repository. Click "Save" to apply them.
+
+## Common Use Cases and Examples
+
+Repository rules are flexible and can be used for various purposes:
+
+- **Enforcing Linting/Formatting:**
+ - "Remember to run the linter with `npm run lint` before committing."
+ - "Ensure all Python code follows PEP 8 guidelines. Use `black` for formatting."
+- **Specifying Commit Message Conventions:**
+ - "All commit messages must follow the Conventional Commits specification."
+ - "Prefix commit messages with the related Linear issue ID (e.g., `ENG-123: ...`)."
+- **Highlighting Project-Specific Information:**
+ - "This repository uses TypeScript. All new backend code should be in the `/server/src` directory."
+ - "Avoid using deprecated function `old_function()`. Use `new_function()` instead."
+- **Code Style Preferences:**
+ - "Don't write super long strings, as this will break pre-commit. Do triple-quoted strings with newlines, non-indented, instead!" (As seen in your example image)
+ - "Prefer functional components over class components in React."
+- **Reminders for Testing:**
+ - "Ensure all new features have corresponding unit tests."
+ - "Run integration tests with `npm run test:integration` after significant changes."
+
+
+ Keep your repository rules concise and clear. Overly complex or numerous rules
+ might confuse the agent or lead to suboptimal performance. Focus on the most
+ critical guidelines for each repository.
+
+
+
+ Repository Rules are applied *in addition* to any global prompting strategies
+ or agent capabilities. They provide a repository-specific layer of
+ instruction.
+{" "}
diff --git a/docs/settings/repo-rules.tsx b/docs/settings/repo-rules.tsx
new file mode 100644
index 000000000..a78f4726c
--- /dev/null
+++ b/docs/settings/repo-rules.tsx
@@ -0,0 +1,57 @@
+---
+title: "Repository Rules"
+sidebarTitle: "Repo Rules"
+icon: "shield-check"
+---
+
+Repository Rules in Codegen act as a persistent set of instructions or a "system prompt" for the AI agent whenever it operates on a specific repository. These rules are shown to the language model (LLM) every time it performs a task related to that repository, ensuring that certain guidelines, preferences, or constraints are consistently followed.
+
+This feature is powerful for guiding the agent's behavior, enforcing coding standards, or reminding it of repository-specific conventions.
+
+## How Repository Rules Work
+
+When an agent is assigned a task on a repository with defined rules, those rules are automatically prepended or made available to the LLM as part of its context. This means the agent "sees" these rules alongside the actual task or prompt it receives.
+
+For example, if you have a rule like "Always use tabs for indentation," the agent will be reminded of this preference before it starts writing or modifying code in that repository.
+
+## Accessing and Configuring Repository Rules
+
+You can typically find and configure Repository Rules within the settings page for each specific repository in the Codegen web UI.
+
+1. Navigate to [codegen.com/repos](https://codegen.com/repos).
+2. Select the repository for which you want to set rules.
+3. Look for a section titled "Repository rules" or similar in the repository's settings.
+
+
+
+
+
+In the text area provided (as shown in the image), you can specify any rules you want the agent to follow for this repository. Click "Save" to apply them.
+
+## Common Use Cases and Examples
+
+Repository rules are flexible and can be used for various purposes:
+
+- **Enforcing Linting/Formatting:**
+ - "Remember to run the linter with `npm run lint` before committing."
+ - "Ensure all Python code follows PEP 8 guidelines. Use `black` for formatting."
+- **Specifying Commit Message Conventions:**
+ - "All commit messages must follow the Conventional Commits specification."
+ - "Prefix commit messages with the related Linear issue ID (e.g., `ENG-123: ...`)."
+- **Highlighting Project-Specific Information:**
+ - "This repository uses TypeScript. All new backend code should be in the `/server/src` directory."
+ - "Avoid using deprecated function `old_function()`. Use `new_function()` instead."
+- **Code Style Preferences:**
+ - "Don't write super long strings, as this will break pre-commit. Do triple-quoted strings with newlines, non-indented, instead!" (As seen in your example image)
+ - "Prefer functional components over class components in React."
+- **Reminders for Testing:**
+ - "Ensure all new features have corresponding unit tests."
+ - "Run integration tests with `npm run test:integration` after significant changes."
+
+
+ Keep your repository rules concise and clear. Overly complex or numerous rules might confuse the agent or lead to suboptimal performance. Focus on the most critical guidelines for each repository.
+
+
+
+ Repository Rules are applied *in addition* to any global prompting strategies or agent capabilities. They provide a repository-specific layer of instruction.
+