Skip to content

Commit 699d312

Browse files
pashpashpashCline Evaluation
andauthored
docs improvements (RooCodeInc#3659)
* docs improvements * new rule slash command no screenshot * docs * language --------- Co-authored-by: Cline Evaluation <[email protected]>
1 parent c3caec2 commit 699d312

File tree

12 files changed

+11344
-206
lines changed

12 files changed

+11344
-206
lines changed

.clinerules/workflows/extension-release.md

Lines changed: 549 additions & 0 deletions
Large diffs are not rendered by default.

docs/docs.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,22 @@
7171
"group": "Improving Your Prompting Skills",
7272
"pages": ["prompting/prompt-engineering-guide", "prompting/cline-memory-bank"]
7373
},
74+
{
75+
"group": "Features",
76+
"pages": [
77+
"features/cline-rules",
78+
"features/slash-commands/workflows",
79+
{
80+
"group": "Slash Commands",
81+
"pages": [
82+
"features/slash-commands/new-task",
83+
"features/slash-commands/new-rule",
84+
"features/slash-commands/smol",
85+
"features/slash-commands/report-bug"
86+
]
87+
}
88+
]
89+
},
7490
{
7591
"group": "Exploring Cline's Tools",
7692
"pages": [

docs/features/cline-rules.mdx

Lines changed: 162 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,162 @@
1+
Cline Rules allow you to provide Cline with system-level guidance. Think of them as a persistent way to include context and preferences for your projects or globally for every conversation.
2+
3+
## Creating a Rule
4+
5+
You can create a rule by clicking the `+` button in the Rules tab. This will open a new file in your IDE which you can use to write your rule.
6+
7+
<Frame>
8+
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/cline-rules.png" alt="Create a Rule" />
9+
</Frame>
10+
11+
Once you save the file:
12+
13+
- Your rule will be stored in the `.clinerules/` directory in your project (if it's a Workspace Rule)
14+
- Or in the `Documents/Cline/Rules` directory (if it's a Global Rule).
15+
16+
You can also have Cline create a rule for you by using the [`/newrule` slash command](/features/slash-commands/new-rule) in the chat.
17+
18+
```markdown Example Cline Rule Structure [expandable]
19+
# Project Guidelines
20+
21+
## Documentation Requirements
22+
23+
- Update relevant documentation in /docs when modifying features
24+
- Keep README.md in sync with new capabilities
25+
- Maintain changelog entries in CHANGELOG.md
26+
27+
## Architecture Decision Records
28+
29+
Create ADRs in /docs/adr for:
30+
31+
- Major dependency changes
32+
- Architectural pattern changes
33+
- New integration patterns
34+
- Database schema changes
35+
Follow template in /docs/adr/template.md
36+
37+
## Code Style & Patterns
38+
39+
- Generate API clients using OpenAPI Generator
40+
- Use TypeScript axios template
41+
- Place generated code in /src/generated
42+
- Prefer composition over inheritance
43+
- Use repository pattern for data access
44+
- Follow error handling pattern in /src/utils/errors.ts
45+
46+
## Testing Standards
47+
48+
- Unit tests required for business logic
49+
- Integration tests for API endpoints
50+
- E2E tests for critical user flows
51+
```
52+
53+
### Key Benefits
54+
55+
1. **Version Controlled**: The `.clinerules` file becomes part of your project's source code
56+
2. **Team Consistency**: Ensures consistent behavior across all team members
57+
3. **Project-Specific**: Rules and standards tailored to each project's needs
58+
4. **Institutional Knowledge**: Maintains project standards and practices in code
59+
60+
Place the `.clinerules` file in your project's root directory:
61+
62+
```
63+
your-project/
64+
├── .clinerules
65+
├── src/
66+
├── docs/
67+
└── ...
68+
```
69+
70+
Cline's system prompt, on the other hand, is not user-editable ([here's where you can find it](https://github.com/cline/cline/blob/main/src/core/prompts/system.ts)). For a broader look at prompt engineering best practices, check out [this resource](https://docs.anthropic.com/en/docs/build-with-claude/prompt-engineering/overview).
71+
72+
### Tips for Writing Effective Cline Rules
73+
74+
- Be Clear and Concise: Use simple language and avoid ambiguity.
75+
- Focus on Desired Outcomes: Describe the results you want, not the specific steps.
76+
- Test and Iterate: Experiment to find what works best for your workflow.
77+
78+
### .clinerules/ Folder System
79+
80+
```
81+
your-project/
82+
├── .clinerules/ # Folder containing active rules
83+
│ ├── 01-coding.md # Core coding standards
84+
│ ├── 02-documentation.md # Documentation requirements
85+
│ └── current-sprint.md # Rules specific to current work
86+
├── src/
87+
└── ...
88+
```
89+
90+
Cline automatically processes **all Markdown files** inside the `.clinerules/` directory, combining them into a unified set of rules. The numeric prefixes (optional) help organize files in a logical sequence.
91+
92+
#### Using a Rules Bank
93+
94+
For projects with multiple contexts or teams, maintain a rules bank directory:
95+
96+
```
97+
your-project/
98+
├── .clinerules/ # Active rules - automatically applied
99+
│ ├── 01-coding.md
100+
│ └── client-a.md
101+
102+
├── clinerules-bank/ # Repository of available but inactive rules
103+
│ ├── clients/ # Client-specific rule sets
104+
│ │ ├── client-a.md
105+
│ │ └── client-b.md
106+
│ ├── frameworks/ # Framework-specific rules
107+
│ │ ├── react.md
108+
│ │ └── vue.md
109+
│ └── project-types/ # Project type standards
110+
│ ├── api-service.md
111+
│ └── frontend-app.md
112+
└── ...
113+
```
114+
115+
#### Benefits of the Folder Approach
116+
117+
1. **Contextual Activation**: Copy only relevant rules from the bank to the active folder
118+
2. **Easier Maintenance**: Update individual rule files without affecting others
119+
3. **Team Flexibility**: Different team members can activate rules specific to their current task
120+
4. **Reduced Noise**: Keep the active ruleset focused and relevant
121+
122+
#### Usage Examples
123+
124+
Switch between client projects:
125+
126+
```bash
127+
# Switch to Client B project
128+
rm .clinerules/client-a.md
129+
cp clinerules-bank/clients/client-b.md .clinerules/
130+
```
131+
132+
Adapt to different tech stacks:
133+
134+
```bash
135+
# Frontend React project
136+
cp clinerules-bank/frameworks/react.md .clinerules/
137+
```
138+
139+
#### Implementation Tips
140+
141+
- Keep individual rule files focused on specific concerns
142+
- Use descriptive filenames that clearly indicate the rule's purpose
143+
- Consider git-ignoring the active `.clinerules/` folder while tracking the `clinerules-bank/`
144+
- Create team scripts to quickly activate common rule combinations
145+
146+
The folder system transforms your Cline rules from a static document into a dynamic knowledge system that adapts to your team's changing contexts and requirements.
147+
148+
### Managing Rules with the Toggleable Popover
149+
150+
To make managing both single `.clinerules` files and the folder system even easier, Cline v3.13 introduces a dedicated popover UI directly accessible from the chat interface.
151+
152+
Located conveniently under the chat input field, this popover allows you to:
153+
154+
- **Instantly See Active Rules:** View which global rules (from your user settings) and workspace rules (`.clinerules` file or folder contents) are currently active.
155+
- **Quickly Toggle Rules:** Enable or disable specific rule files within your workspace `.clinerules/` folder with a single click. This is perfect for activating context-specific rules (like `react-rules.md` or `memory-bank.md`) only when needed.
156+
- **Easily Add/Manage Rules:** Quickly create a workspace `.clinerules` file or folder if one doesn't exist, or add new rule files to an existing folder.
157+
158+
This UI significantly simplifies switching contexts and managing different sets of instructions without needing to manually edit files or configurations during a conversation.
159+
160+
<Frame>
161+
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/image%20(1).png" alt="Cline Logo" />
162+
</Frame>
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
title: "New Rule Command"
3+
sidebarTitle: "/newrule"
4+
---
5+
6+
`/newrule` is a slash command that lets you teach Cline your preferred way of working. It creates a markdown file in your `.clinerules` directory that acts like persistent instructions for how Cline should behave when helping with your projects.
7+
8+
Think of it as setting up house rules that Cline will always follow, so you don't have to repeat your preferences in every conversation.
9+
10+
#### Using the `/newrule` Slash Command
11+
12+
When you want Cline to consistently follow certain guidelines:
13+
14+
- Type `/newrule` in the chat
15+
- Cline will help you create a structured rule file by asking about your preferences for:
16+
- Communication style (verbose vs. concise)
17+
- Development workflows
18+
- Coding standards
19+
- Project context
20+
- Any other specific guidelines
21+
- You'll review the rule file before it's created
22+
- Once approved, Cline creates a markdown file in your `.clinerules` directory that will automatically be loaded for future conversations
23+
24+
#### Example
25+
26+
I used `/newrule` when I was fed up with repeating the same instructions on every new task. I had specific preferences for how I wanted my React components structured, which testing library to use, and even my preferred variable naming style.
27+
28+
Instead of typing these preferences each time, I just used `/newrule` and worked with Cline to create a detailed rule file. We built a markdown file that covered everything from code organization to my preference for functional components over class components.
29+
30+
Now whenever I chat with Cline about my React project, it automatically follows these guidelines without me having to remind it. The best part is that I can create different rule files for different projects, so Cline adapts to whatever codebase I'm working on.
31+
32+
#### Inspiration
33+
34+
Here's how I use `/newrule` to make my development smoother:
35+
36+
- I created a rule file for each major project with specific architectural patterns and library preferences, so Cline always generates code that matches our existing codebase.
37+
38+
- For my team's shared projects, we have a common rule file that ensures consistent code style and documentation practices regardless of who's using Cline.
39+
40+
- When working with legacy code, I made a rule file that reminds Cline about the quirks and constraints of the old system, so it never suggests modern approaches that won't integrate well.
41+
42+
- I even have a personal rule file for my side projects with all my opinionated preferences - two-space indentation, arrow functions everywhere, and my exact folder structure requirements.
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
title: "New Task Command"
3+
sidebarTitle: "/newtask"
4+
---
5+
6+
`/newtask` is a slash command that works like a perfect developer handoff. It intelligently packages what matters - the overall plan, work accomplished, relevant files, and next steps - into a fresh task with a clean context window. All while leaving behind the noise of tool calls, documentation searches, and implementation details.
7+
8+
It's exactly what you'd do when bringing a new developer onto your project: provide the essential context they need to continue the work without overwhelming them with every keystroke that came before.
9+
10+
#### Using the `/newtask` Slash Command
11+
12+
When your context window is filling up but you're not done with your project:
13+
14+
<Frame>
15+
<img
16+
src="https://storage.googleapis.com/cline_public_images/docs/assets/newtask.png"
17+
alt="Using the /newtask slash command"
18+
/>
19+
</Frame>
20+
21+
- Type `/newtask` in the chat input field
22+
- Cline will analyze your conversation and propose a distilled version of the context to carry forward
23+
- You can refine this proposed context through conversation before committing
24+
- Once satisfied, a button appears to create the new task with your refined context
25+
26+
#### Example
27+
28+
I regularly use `/newtask` when working through complex implementations with multiple steps. For instance, if I've completed 3 steps of a 10-step process and my context is already 75% full with documentation snippets, file contents, and detailed discussions.
29+
30+
Rather than losing those insights or starting from scratch, I use `/newtask` to have Cline extract what matters - the key decisions, file changes, and progress so far - without all the noise of individual tool calls and research steps.
31+
32+
I like to think of `/newtask` as a new developer joining the project. I need to give them the full understanding of the work that has been done, awareness of the relevant files, any other context that would be helpful, and where to go next.
33+
34+
#### Inspiration
35+
36+
Here are some popular ways to use `/newtask`:
37+
38+
- I research complex APIs using the Context7 MCP server, filling my context with documentation. Once I understand the concepts, I use `/newtask` to start fresh with just the essential knowledge needed for implementation.
39+
- After identifying the root cause of a tough bug through multiple debugging attempts and file explorations, I use `/newtask` to continue with a clean slate that includes the solution but discards all the failed attempts.
40+
- When a client discussion explores multiple approaches and finally settles on one direction, I use `/newtask` to focus solely on implementing the chosen solution.
41+
- For complex projects spanning multiple days, I use `/newtask` at logical stopping points to maintain a clean workspace while carrying forward my progress.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
title: "Report Bug Command"
3+
sidebarTitle: "/reportbug"
4+
---
5+
6+
`/reportbug` is an absolute lifesaver when you hit a weird issue with Cline. Instead of having to remember all the details GitHub wants for a bug report, this command turns Cline into your personal bug reporting assistant.
7+
8+
It walks you through collecting all the info needed for a proper bug report and then shoots it straight to our GitHub issues page with all the right formatting and system details included.
9+
10+
#### Using the `/reportbug` Slash Command
11+
12+
When you run into something funky that doesn't seem right:
13+
14+
- Just type `/reportbug` in the chat
15+
- Cline will guide you through all the details we need:
16+
- A quick title describing the issue
17+
- What actually happened vs. what you expected
18+
- Steps to reproduce the bug
19+
- Any relevant output or errors you saw
20+
- Additional context that might help us fix it
21+
- You'll get to review everything before it's submitted
22+
- Once you approve, it opens a perfectly formatted GitHub issue with all your info plus automatic system details
23+
24+
#### Example
25+
26+
Last week I hit a weird bug where Cline kept timing out when reading large files. Instead of trying to remember all the GitHub template fields, I just typed `/reportbug` and Cline guided me through the whole process.
27+
28+
It asked me about what I was trying to do, what happened instead, and the exact steps that led to the issue. The best part was that it automatically included my OS version, Cline version, and all the technical details our devs would need.
29+
30+
A few seconds later, I had a properly formatted GitHub issue created without having to hunt down any of that info myself.

docs/features/slash-commands/slash-commands.mdx

Whitespace-only changes.
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
---
2+
title: "Smol Command"
3+
sidebarTitle: "/smol"
4+
---
5+
6+
`/smol` (or its alias, `/compact`) is a slash command that compresses your conversation history while preserving essential context.
7+
8+
Unlike `/newtask` which creates a new task, `/smol` condenses your current conversation into a comprehensive summary, freeing up context window space while allowing you to continue working in the same task.
9+
10+
Think of it like summarizing the relevant parts of a conversation while discarding the rest.
11+
12+
#### Using the `/smol` Slash Command
13+
14+
When your context window is getting full but you want to continue in the same task:
15+
16+
<Frame>
17+
<img src="https://storage.googleapis.com/cline_public_images/docs/assets/smol.png" alt="Using the /smol slash command" />
18+
</Frame>
19+
20+
- Type `/smol` (or its alias `/compact`) in the chat input field
21+
- Cline will analyze your conversation and create a detailed summary that preserves essential information
22+
- You'll have a chance to review this summary and provide feedback if needed
23+
- Once accepted, the detailed conversation history is replaced with this condensed version
24+
25+
#### Example
26+
27+
I use `/smol` when I'm deep into a complex debugging session and need to continue in the same task. After exploring multiple approaches and examining several files, my context window gets crowded with all the back-and-forth.
28+
29+
By using `/smol`, I can condense all that exploration into a concise summary that captures what we've learned, which files we've examined, and what approaches we've tried. This frees up space to continue the debugging without losing the insights we've gained.
30+
31+
The key difference from `/newtask` is that I'm staying in the same conversation flow rather than creating a separate task. This is particularly useful when I'm in the middle of something and don't want to context switch.
32+
33+
#### Inspiration
34+
35+
Here are powerful ways I use `/smol` in my workflow:
36+
37+
- During lengthy brainstorming sessions, I use `/smol` to condense our exploration before implementing the chosen solution, all within the same task.
38+
- When debugging complex issues that involve multiple file checks and test runs, I use `/smol` to summarize what we've learned while continuing the debugging process.
39+
- For iterative development, I use `/smol` after completing each feature to compress the implementation details while keeping the key decisions and approaches accessible.
40+
- When gathering requirements from multiple sources, I use `/smol` to distill the essential needs into a concise summary before moving to the design phase.
41+
42+
#### Smol vs Newtask
43+
44+
People often ask me when to use `/smol` vs `/newtask`. Frankly, it's a matter of personal preference and what you're trying to achieve. Here are some guidelines:
45+
46+
- Use `/smol` when you're in the middle of something and want to keep going in the same task. It's perfect when you're deep in a debugging flow or brainstorming session and don't want to break your momentum. The downside? Once you compress your history, you can't get those detailed conversations back.
47+
- Use `/newtask` when you're at a logical transition point and want to start fresh. It's great for moving from planning to implementation, or when you want to preserve your full conversation history (since it creates a new task rather than overwriting your current one).

0 commit comments

Comments
 (0)