|
2 | 2 |
|
3 | 3 | Roo Code is designed to understand natural language. You don't need to use any special commands or syntax to communicate with it. Just type your request in plain English, as if you were talking to a human developer. |
4 | 4 |
|
5 | | -## Best Practices |
6 | | - |
7 | | -* **Be Clear and Specific:** Clearly state what you want Roo Code to do. Avoid vague or ambiguous language. For example, instead of saying "Fix the code," say "Fix the bug in the `calculateTotal` function that causes it to return incorrect results." |
8 | | -* **Provide Context:** If your request refers to specific files, functions, or parts of your code, use [Context Mentions](./context-mentions) to provide that context. |
9 | | -* **Break Down Complex Tasks:** For large or complex tasks, break them down into smaller, more manageable steps. Roo Code works best when given focused instructions. |
10 | | -* **Use Examples:** If you want Roo Code to generate code in a specific style, provide examples. |
11 | | - |
12 | | -## Examples |
13 | | - |
14 | | -Here are some examples of well-formed requests: |
15 | | - |
16 | | -* "Create a new file named `utils.py` and add a function called `add` that takes two numbers as arguments and returns their sum." |
17 | | -* "In the file `src/components/Button.tsx`, change the color of the button to blue." |
18 | | -* "Find all instances of the variable `oldValue` in the file `/src/App.js` and replace them with `newValue`." |
19 | | -* "Run the command `npm install` in the terminal." |
20 | | -* "Explain the function `calculateTotal` in the file `/src/utils.ts`." |
21 | | -* "@problems Address all detected problems." |
22 | | - |
23 | | -## What *Not* to Do |
24 | | - |
25 | | -* **Don't be vague:** Avoid requests like "Fix the code" or "Make it better." |
26 | | -* **Don't assume Roo Code knows what you're thinking:** Provide all necessary context. |
27 | | -* **Don't use jargon unnecessarily:** Use plain English whenever possible. |
28 | | -* **Don't give multiple unrelated instructions in a single request:** Break down complex tasks into smaller steps. |
29 | | -* **Don't assume a request was successful:** Always wait for confirmation from Roo Code after each tool use. |
| 5 | +<img src="/img/typing-your-requests/typing-your-requests.png" alt="Example of typing a request in Roo Code" width="600" /> |
| 6 | + |
| 7 | +## Effective Request Strategies |
| 8 | + |
| 9 | +Clearly state what you want Roo Code to do. Avoid vague or ambiguous language. |
| 10 | + |
| 11 | +| Strategy | Implementation | |
| 12 | +|----------|----------------| |
| 13 | +| **Be specific** | "Fix the bug in `calculateTotal` that returns incorrect results" instead of "Fix the code" | |
| 14 | +| **Provide context** | Use @ [Context Mentions](./context-mentions) for file and code references | |
| 15 | +| **Break down tasks** | Submit complex tasks in smaller manageble steps | |
| 16 | +| **Include examples** | Provide sample code when you need specific formatting or style | |
| 17 | + |
| 18 | +## Example Requests |
| 19 | + |
| 20 | +``` |
| 21 | +create a new file named `utils.py` and add a function called `add` that takes two numbers as arguments and returns their sum |
| 22 | +``` |
| 23 | +``` |
| 24 | +in the file @src/components/Button.tsx, change the color of the button to blue |
| 25 | +``` |
| 26 | +``` |
| 27 | +find all instances of the variable `oldValue` in @/src/App.js and replace them with `newValue` |
| 28 | +``` |
| 29 | +``` |
| 30 | +run the command `npm install` in the terminal |
| 31 | +``` |
| 32 | +``` |
| 33 | +explain the function `calculateTotal` in @/src/utils.ts |
| 34 | +``` |
| 35 | +``` |
| 36 | +@problems address all detected problems |
| 37 | +``` |
| 38 | + |
| 39 | +## Common Pitfalls to Avoid |
| 40 | + |
| 41 | +| DON'T | DO | |
| 42 | +|-------|---------| |
| 43 | +| Vague requests | Specify exactly what needs to be done | |
| 44 | +| Assuming context | Explicitly reference files and functions | |
| 45 | +| Excessive technical jargon | Use clear, straightforward language | |
| 46 | +| Multiple unrelated tasks | Submit one focused request at a time | |
| 47 | +| Proceeding without confirmation | Check the code to make sure its complete | |
0 commit comments