Best practices
Follow these guidelines to get the most out of your experience with Bob.
Understanding and using modes
Bob's modes are task-specific personas that shape it's behavior. Selecting the appropriate mode helps you get the best results.
Built-in modes
Bob comes with several built-in modes, each designed for specific purposes:
| Mode | Purpose | When to use |
|---|---|---|
| Code | Writing and modifying code | For implementing features, fixing bugs, or making code improvements |
| Advanced | Complex development tasks | When you need full access to all tools, including MCP and browser capabilities |
| Plan | Planning and designing | Before implementation, when you need to plan architecture or create technical specifications |
| Ask | Getting information | When you need explanations or information without modifying files |
| Orchestrator | Multi-step project coordination | For complex projects requiring coordination across different specialties |
Mode selection strategy
For the most effective workflow:
Start with Plan mode for new projects or complex features to create a detailed implementation plan before writing any code. Read the plan carefully to confirm it aligns with your goal.
Use Orchestrator mode for complex, multi-step projects that require coordination across different specialties.
Switch to Code mode for most day-to-day development tasks when you are ready to implement.
Use Ask mode when you need explanations or information without modifying files.
Switch to Advanced mode when you need access to additional tools like browser automation or MCP servers.
For more details on modes and how to switch between them, see Modes.
Custom modes
You can create specialized modes for specific tasks or workflows:
- Create modes for specialized tasks like security reviews or documentation writing.
- Configure custom modes with specific tool access permissions and role definitions.
- Share modes with your team to standardize workflows.
Learn more about creating and configuring custom modes in the Custom modes documentation.
Workflow optimization
Plan before coding
Always start complex projects or features in Plan mode to:
- Generate a detailed implementation plan.
- Break down complex problems into manageable steps.
- Identify potential challenges before they arise.
- Create a roadmap for implementation.
This approach prevents breaking changes and provides a clear direction for development.
Use checkpoints effectively
Checkpoints automatically version your workspace files during Bob tasks, enabling:
- Safe experimentation with AI-suggested changes.
- Easy recovery from undesired modifications.
- Comparison of different implementation approaches.
If Bob starts producing subpar work, use the "Restore Files & Task" checkpoint option to roll back to a previous state. This is more effective than trying to correct flawed output with new instructions.
To restore your work to a previous state:
Scroll up in your chat interface to locate a checkpoint you want to restore from.
Click the "Restore Checkpoint" button.
Click "Restore Files and Task".
Click "Confirm".
Integrate with version control
Regularly commit and push changes to your version control system:
- Create frequent, small commits with clear messages.
- Push changes to remote repositories regularly.
- Use branches for experimental features.
Git provides an essential safety net to prevent accidental, permanent deletion of code.
Communication strategies
Write effective prompts
The quality of your prompts directly affects the quality of Bob's responses:
- Be specific and clear: Vague prompts lead to vague outputs. Detail what Bob should and should not do.
- Provide examples: When possible, include examples of the desired output format or style.
- Use the Enhance Prompt feature: Click the enhance button to automatically improve your query with additional context and structure.
Learn more about the Enhance Prompt feature in the Enhance prompt documentation.
Use context mentions
Context mentions let you reference specific elements of your project directly in your conversations with Bob:
- Use
@/path/to/file.jsto include specific file contents. - Use
@/path/to/folderto include all files in a directory. - Use
@problemsto include Bob Findings panel diagnostics. - Use
@terminalto include recent terminal output. - Highlight text and use the keyboard shortcut ⌘ + L to add it to the chat.
This approach is more efficient than copying and pasting code or describing file locations.
Learn more about context mentions in the Context mentions documentation.
Manage the context window
To prevent Bob from mixing up your goals:
- Start new tasks regularly with specific aims.
- Avoid giving Bob your entire codebase at once.
- Use direct file references to provide targeted context.
- Break complex tasks into smaller, focused subtasks.
Security and control
Configure auto-approval settings
Bob allows you to control which actions require your approval:
- Manual approval: Review and approve every action Bob takes (safest setting).
- Auto-approve: Grant Bob the ability to run specific tasks without interruption.
- Hybrid approach: Auto-approve low-risk actions while requiring confirmation for riskier tasks.
Configure these settings based on your comfort level and the sensitivity of your project.
Learn more about auto-approval settings in the Auto-approving actions documentation.
Use .bobignore
The .bobignore file lets you specify files and directories that Bob should not access or modify:
Create a .bobignore file in your project root.
Add patterns for sensitive files, build artifacts, and large assets.
Use the same syntax as .gitignore.
This helps protect sensitive information and prevent accidental changes to generated files.
Learn more about controlling file access in the Using .bobignore documentation.
For more detailed information on security guidelines, see Security guidelines.
Set up rules
Bob allows you to specify rules to control how Bob performs tasks:
- Define rules globally or per project in the
.bobdirectory. - Create mode-specific rules in
.bob/rules-{mode-slug}/directories. - Use rules to enforce coding standards, documentation requirements, or other workflow constraints.
For more information on custom modes and rules, see the Custom modes documentation.
Installing
Follow these steps to install IBM Bob. The setup takes about five minutes.
Quickstart
Learn to use IBM Bob for application modernization by upgrading a Node.js Express API from version 16 to 22. Try AI-assisted development with modes, approvals, and literate coding in this hands-on tutorial.