From 4cd931798ceaf6a371654f8dbc58811ab13e6a64 Mon Sep 17 00:00:00 2001 From: Continue Agent Date: Mon, 29 Sep 2025 21:41:17 +0000 Subject: [PATCH 1/2] Improve rules guidance in docs - Add clear Hub vs Local rules integration explanation - Document rules loading order and synchronization behavior - Add troubleshooting section for common rules issues - Reference Linear issue CON-3084 for link accuracy problem - Clarify Hub/VSCode workflow with step-by-step instructions Addresses user confusion about rules created in different locations not syncing and provides clear guidance on workflows. Generated with Continue(https://continue.dev) Co-Authored-By: Continue --- docs/customization/rules.mdx | 22 ++++++ docs/customize/deep-dives/rules.mdx | 112 +++++++++++++++++++++++++++- 2 files changed, 131 insertions(+), 3 deletions(-) diff --git a/docs/customization/rules.mdx b/docs/customization/rules.mdx index 75dbfc81120..d5f30ce3bce 100644 --- a/docs/customization/rules.mdx +++ b/docs/customization/rules.mdx @@ -15,4 +15,26 @@ By implementing rules, you transform the AI from a generic coding agent into a k Your agent detects rules and applies the specified rules while in [Agent](/features/agent/quick-start), [Chat](/features/chat/quick-start), and [Edit](/features/edit/quick-start) modes. +## Where to Manage Rules + + + +- Create files in `.continue/rules` folder +- Automatically appear with Hub assistants +- Edit directly in your file system +- Best for project-specific rules + + + +- Manage on [Continue Hub](https://hub.continue.dev) +- Reference in config.yaml with `uses:` +- Share with team and community +- Best for reusable, organization rules + + + + +**Quick Setup**: Start with local rules for immediate use, then promote commonly used rules to the Hub for sharing and reuse. + + Learn more in the [rules deep dive](/customize/deep-dives/rules), and view [`rules`](/reference#rules) in the YAML Reference for more details. \ No newline at end of file diff --git a/docs/customize/deep-dives/rules.mdx b/docs/customize/deep-dives/rules.mdx index 93631f3abbe..449fc272dac 100644 --- a/docs/customize/deep-dives/rules.mdx +++ b/docs/customize/deep-dives/rules.mdx @@ -20,6 +20,42 @@ You can view the current rules by clicking the pen icon above the main toolbar: To form the system message, rules are joined with new lines, in the order they appear in the toolbar. This includes the base chat system message ([see below](#how-to-customize-chat-system-message)). +## Understanding Hub vs Local Rules Integration + + +**Important:** Rules created in different locations behave differently and have different synchronization patterns. + + +Continue supports two types of rules with different behaviors: + + + +- **Location**: `.continue/rules` folder in your workspace +- **Visibility**: Automatically visible when using Hub assistants +- **Creation**: Add rules button in VSCode or manual file creation +- **File Management**: Creates actual `.md` files you can edit directly + + + +- **Location**: Stored on Continue Hub, referenced in config.yaml +- **Visibility**: Only appear when referenced in assistant configuration +- **Creation**: Created directly on Hub or copied from local rules +- **File Management**: No local files created, managed through Hub interface + + + +### How Rules Are Applied + +When using Continue, rules are loaded in this order: +1. **Hub assistant rules** (if using a Hub-based assistant) +2. **Referenced Hub rules** (via `uses:` in config.yaml) +3. **Local workspace rules** (from `.continue/rules` folder) +4. **Global rules** (from `~/.continue/rules` folder) + + +**TL;DR**: Local rules show up automatically when using Hub assistants. Hub rules show up automatically when referenced in your config. + + ## Quick Start: How to Create Your First Rule File Below is a quick example of setting up a new rule file: @@ -42,6 +78,8 @@ Now test your rules by asking a question about a file in chat. ## How to Create Rules Blocks +### Creating Local Rules + Rules can be added locally using the "Add Rules" button while viewing the Local Agent's rules. ![add local rules button](/images/add-local-rules.png) @@ -50,12 +88,44 @@ Rules can be added locally using the "Add Rules" button while viewing the Local **Automatically create local rule blocks**: When in Agent mode, you can prompt the agent to create a rule for you using the `create_rule_block` tool if enabled. For example, you can say "Create a rule for this", and a rule will be created for you in `.continue/rules` based on your conversation. - -Rules can also be added to an Agent on the Continue Hub. +### Creating Hub Rules + +Rules can also be created and managed on the Continue Hub: + +1. **Browse existing rules**: [Explore available rules](https://hub.continue.dev) +2. **Create new rules**: [Create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub +3. **Copy from local rules**: Copy/paste content from your `.continue/rules` files to create Hub rules -Explore available rules [here](https://hub.continue.dev), or [create your own](https://hub.continue.dev/new?type=block&blockType=rules) in the Hub. +### Working Between Hub and Local Rules + + + +To use Hub rules in your local setup: + +1. Reference them in your `config.yaml`: + ```yaml + rules: + - uses: username/my-hub-rule + ``` +2. The rule will automatically appear in your rules toolbar +3. **Note**: No local file is created - the rule exists only on the Hub + + + +To move local rules to the Hub: + +1. Copy the content from your `.continue/rules/rule-name.md` file +2. Go to [Create new rule](https://hub.continue.dev/new?type=block&blockType=rules) +3. Paste the content and configure the rule +4. Optionally, remove the local file and reference the Hub rule in your config + + +**Current Limitation**: There's no automatic sync from local to Hub. You must manually copy/paste rule content. + + + ### How to Configure Rule Properties and Syntax @@ -150,6 +220,42 @@ globs: ["**/*.ts", "**/*.tsx"] - modularize components into smaller, reusable pieces ``` +## Troubleshooting Rules + +### Issue: Rules Created in Different Places Don't Sync + +**Problem**: You created rules in the Hub but don't see them in VSCode, or vice versa. + +**Solution**: +- **Hub rules** only appear when referenced in your config.yaml using the `uses:` syntax +- **Local rules** automatically appear when using Hub assistants +- There's currently no automatic bidirectional sync + +### Issue: "Edit" Links Point to Wrong Location + +**Problem**: When you click "Edit" on a rule in VSCode, it tries to open the Hub even though the rule is local, or shows an incorrect URL. + +**Root Cause**: This happens when you have a mix of local and Hub rules, and Continue can't properly determine where each rule originates. + +**Workaround**: +1. **For local rules**: Navigate directly to `.continue/rules/` folder and edit the `.md` file +2. **For Hub rules**: Go directly to your assistant page on [Continue Hub](https://hub.continue.dev) and edit from there +3. Keep track of which rules are local vs Hub-based to avoid confusion + + +**Known Issue**: This link accuracy problem is tracked in [Linear issue CON-3084](https://linear.app/continue/issue/CON-3084) and will be fixed in a future update. + + +### Issue: Rules Don't Appear in Assistant + +**Problem**: Your rules exist but don't show up in the rules toolbar. + +**Check These**: +1. **File location**: Ensure local rules are in `.continue/rules/` (not `.continue/rule/`) +2. **File format**: Rules should be `.md` files with proper YAML frontmatter +3. **Config reference**: Hub rules must be referenced in `config.yaml` +4. **Assistant type**: Ensure you're using the correct assistant (local vs Hub) + ### How to Customize Chat System Message Continue includes a simple default system message for [Agent](../../features/agent/quick-start) and [Chat](../../features/chat/quick-start) requests, to help the model provide reliable codeblock formats in its output. From e1749c7f1e8467d02c0ae63b29e74790a204d289 Mon Sep 17 00:00:00 2001 From: Brian 'bdougie' Douglas Date: Thu, 2 Oct 2025 16:43:16 -0700 Subject: [PATCH 2/2] docs: Address Patrick's feedback on rules documentation - Add version control benefit for local rules - Highlight multi-agent reusability for Hub rules - Include concrete examples for both rule types Generated with [Continue](https://continue.dev) Co-Authored-By: Continue --- docs/customization/rules.mdx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/customization/rules.mdx b/docs/customization/rules.mdx index d5f30ce3bce..e685e830319 100644 --- a/docs/customization/rules.mdx +++ b/docs/customization/rules.mdx @@ -22,14 +22,16 @@ Your agent detects rules and applies the specified rules while in [Agent](/featu - Create files in `.continue/rules` folder - Automatically appear with Hub assistants - Edit directly in your file system -- Best for project-specific rules +- Version controlled alongside your code +- Best for project-specific rules (e.g., "remember to generate migrations after modifying the db") - Manage on [Continue Hub](https://hub.continue.dev) - Reference in config.yaml with `uses:` - Share with team and community -- Best for reusable, organization rules +- Easy to include in multiple agents +- Best for organization-wide rules (e.g., "always use X library for Y task")