Files
cline-multi-mirror/docs/features/tasks/understanding-tasks.mdx
T
Juan Pablo FloresandCopilot 8f8c4561a6 Docs upgrade (#6907)
* style(docs): update background color scheme to neutral tones

Update documentation background colors from purple-tinted theme to neutral gray tones. Changed light mode from lavender (#F0E6FF) to off-white (#fafaf9) and dark mode from pure black (#000000) to dark gray (#0f0f0f) for improved visual consistency.

* refactor(docs): remove gradient decoration from theme config

Remove the "decoration": "gradient" property from the documentation
theme configuration. This simplifies the theme settings by removing
the gradient decoration option from the color configuration object.

* docs: change documentation font family to Geist Mono

Replace Roboto with Geist Mono as the default font family in the documentation configuration. This updates the visual styling of the documentation to use a monospace font, which may improve readability for code-heavy content.

* docs: update branding and restructure navigation

- Replace robot panel logos with new Cline brand logos
- Add icons to navbar links (Docs, GitHub, Discord)
- Restructure navigation from groups to tabs format
- Add icons to navigation items for improved UX
- Include new Docs link in navbar with book icon

This update modernizes the documentation appearance and improves navigation hierarchy for better user experience.

* docs: restructure navigation with hierarchical groups and pages

Restructured documentation navigation from flat menu to organized groups:
- Removed redundant "Docs" link from navbar
- Migrated from "menu" to "groups/pages" structure
- Added comprehensive page organization with nested groups:
  * Introduction, Getting Started, Features
  * Prompting Skills, Cline's Tools, Enterprise Solutions
  * MCP Servers, Provider Configuration
- Organized features into logical subgroups (@ Mentions, Commands,
  Customization, Slash Commands)
- Improved documentation discoverability and hierarchy

This change provides better content organization and easier navigation
for users exploring different aspects of Cline documentation.

* docs: remove contextual options from documentation config

Remove the contextual configuration section containing the "copy" option from docs.json. This simplifies the documentation configuration by removing unused contextual menu options.

* docs(multiroot): improve workspace documentation with limitations and technical details

- Add important note about experimental limitations affecting Cline rules and checkpoints
- Add "How it works" section explaining automatic workspace detection and tracking
- Reorganize technical behavior section with detailed subsections for workspace detection, path resolution, and command execution
- Document workspace hint syntax for explicit file references (@workspaceName:path)
- Standardize heading capitalization to sentence case for consistency
- Improve overall content organization and clarity for better user understanding

This update provides users with clearer information about the multiroot feature's current state, its limitations, and how to effectively use workspace hints when working with multiple project folders.

* docs: restructure overview page with enhanced visual layout

- Convert plain markdown sections to CardGroup and Card components with icons
- Add tabbed interface for Plan & Act Mode explanation
- Update description from "development assistant" to "coding agent"
- Reorganize content for improved readability and visual hierarchy
- Enhance feature presentations with icon-based cards

Improves user experience by transforming the overview documentation into a more visually appealing and scannable format using modern documentation components.

* docs: improve installation guide with enhanced structure and UX

Restructure the Cline installation documentation to improve readability and user experience:

- Add prominent note highlighting 2-minute installation time
- Convert prerequisites into visual card components for better clarity
- Transform installation steps into structured Step components for easier following
- Add manual installation instructions for JetBrains IDEs
- Include feature compatibility accordion for JetBrains users
- Enhance visual hierarchy with improved component usage (CardGroup, Steps, Accordion)
- Simplify language and improve descriptions throughout

This makes the installation process clearer for new users and reduces friction during onboarding.

* style(docs): remove text opacity reduction for better readability

* docs: refactor model selection guide with visual step-by-step instructions

- Replace tab-based layout with linear step-by-step flow
- Add screenshots for each configuration step (config, provider, API, model)
- Reorganize content structure for improved clarity and user experience
- Add quickstart options and streamlined provider recommendations
- Improve navigation with visual aids to help users configure Cline faster

* docs: add installation screenshots and context management guide

* docs: flatten provider config structure in documentation

Remove the "Alternative Providers" grouping and move all provider configuration pages (OpenRouter, Cerebras, DeepSeek, Groq, xAI Grok, Mistral AI, Doubao, Fireworks, and ZAI) to the main provider configuration list. This simplifies the documentation navigation by treating all providers equally rather than categorizing some as alternatives.

* docs: restructure context management docs and improve content clarity

**Changes:**
- Reorganized documentation structure by moving context management from
  `/best-practices` to `/prompting` section for better categorization
- Added URL redirect to maintain backward compatibility for old links
- Updated navigation references in welcome page to point to new location
- Improved readability of context management explanations with more
  narrative, conversational prose
- Enhanced context window documentation by adding cache tokens indicator
  and using emoji-based formatting for better visual clarity
- Streamlined Cline Memory Bank setup instructions from 4 to 3 steps
- Updated context bar screenshot to use newer image asset

**Why:**
Better documentation organization and improved user experience through
clearer explanations of how Cline builds and manages context during tasks.

* docs(context-management): convert Quick Reference to Info component

Replace blockquote formatting with Info component for the Quick Reference
section in the context management documentation. This improves visual
presentation and maintains consistency with documentation standards.

Also removes trailing whitespace at the end of the file for cleaner
formatting.

* docs: add Cline Enterprise overview and restructure enterprise section

- Add comprehensive enterprise overview documentation covering security,
  governance, observability, and developer experience features
- Rename "Enterprise & Security" navigation group to "Enterprise"
- Consolidate enterprise documentation by replacing 4 pages with 2:
  new overview page and security concerns
- Document BYOI (Bring Your Own Inference), SSO authentication, and
  role-based access control capabilities

This restructuring provides a clearer entry point for enterprise users
and consolidates previously scattered enterprise information into a
cohesive overview document.

* docs(enterprise): streamline enterprise overview and update font

- Change documentation font from Geist Mono to Geist Sans
- Add enterprise website link card for detailed information
- Remove Developer Experience, Proven at Scale, and Pricing sections
- Consolidate Flexible Inference section content
- Simplify enterprise overview to focus on core capabilities

These changes reduce redundancy by directing users to the enterprise
website for pricing and detailed features while keeping the docs
focused on technical implementation and core capabilities.

* clean-images

* Update docs/getting-started/installing-cline.mdx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/styles.css

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* docs(cline-cli): add platform availability warning to overview

Add a prominent warning callout indicating that Cline CLI is currently in preview and only supports macOS and Linux, with Windows support coming soon. This sets clear expectations for users about platform compatibility.

Also remove redundant introductory text in the "What you can build with this" section to improve content clarity.

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-16 11:51:20 -07:00

133 lines
5.7 KiB
Plaintext

---
title: "Understanding Tasks"
description: "Learn what tasks are in Cline, how they work, and how to create effective prompts for better results."
---
## What are Tasks?
Most users interact with Cline through **tasks** - the fundamental unit of work that drives every coding session. Whether you're building a new feature, fixing a bug, refactoring code, or exploring a codebase, every interaction with Cline happens within the context of a task. A task represents a complete conversation and work session between you and the AI agent, created through **prompts** - the instructions you provide to tell Cline what you want to accomplish. Tasks serve as self-contained work sessions that capture your entire conversation with Cline, including all the code changes, command executions, and decisions made along the way.
This approach ensures that your work is organized, traceable, and resumable. Each task maintains its own isolated context, allowing you to work on multiple projects simultaneously without confusion. The beauty of Cline's task system lies in its flexibility and persistence, providing a collaborative coding session where you provide the direction through prompts, and Cline executes your vision with precision.
### Key Characteristics
Each task in Cline:
- **Has a unique identifier**: Every task gets its own ID and dedicated storage directory
- **Contains the full conversation**: All messages, tool uses, and results are preserved
- **Tracks resources used**: Token usage, API costs, and execution time are monitored
- **Can be interrupted and resumed**: Tasks maintain their state across VSCode sessions
- **Creates checkpoints**: File changes are tracked through Git-based snapshots
- **Enables documentation**: Tasks can be exported as markdown for team documentation
- **Provides cost management**: Resource tracking helps monitor API usage and costs
These features make Cline not just a coding tool, but a comprehensive development agent that understands the full lifecycle of your work.
## Creating Tasks with Prompts
Tasks begin with prompts - your instructions to Cline. The quality of your results depends heavily on how you describe what you want.
### Prompt Components
A well-structured prompt typically includes:
- **Goal**: What you want to accomplish
- **Context**: Background information and constraints
- **Requirements**: Specific features or functionality needed
- **Preferences**: Technology choices, coding style, etc.
- **Examples**: References to guide the implementation
<Note>
**Want to master the art of prompting?**
Deep dive into **Module 1: "Prompting"** in [Cline Learn](https://clinelearn.com) to become an expert at creating effective prompts. The module covers:
- Structured prompting techniques
- Context optimization strategies
- Common prompting patterns
- Advanced prompt engineering
- Real-world examples and exercises
Good prompting skills lead to faster task completion, more accurate results, fewer iterations needed, and better code quality.
</Note>
## Task Execution Modes
Cline operates in two distinct modes that help structure your workflow:
- **Plan Mode**: For information gathering, discussing approaches, and creating strategies without making changes
- **Act Mode**: For actual implementation where Cline executes file modifications, runs commands, and uses tools
→ **[Learn more about Plan and Act modes](/features/plan-and-act)** to understand when and how to use each mode effectively.
## Task Resources
Each task consumes resources that are tracked:
- **Tokens**: The amount of text processed (input and output)
- **API Costs**: Monetary cost based on the model and token usage
- **Time**: Duration from start to completion
- **Checkpoints**: Number of file state snapshots created
## Common Task Patterns
### Code Generation
```
Create a TypeScript function that validates email addresses using regex.
Include unit tests using Jest and handle edge cases like international domains.
```
### Bug Fixing
```
@terminal The app crashes when clicking the submit button.
Fix the error and ensure proper error handling is in place.
```
### Refactoring
```
Refactor the authentication logic in @auth.ts to use async/await
instead of callbacks. Maintain all existing functionality.
```
### Feature Implementation
```
Add a dark mode toggle to the settings page. Use the existing theme
context and persist the preference to localStorage.
```
## Task Resumption
One of Cline's powerful features is the ability to resume interrupted tasks:
### When Tasks Get Interrupted
- You stop a long-running task
- An error occurs that needs intervention
- You need to switch to another task
### Resuming a Task
1. Open the task from history
2. Cline loads the complete conversation
3. File states are checked against checkpoints
4. The task continues with awareness of the interruption
5. You can provide additional context if needed
## Understanding Task Context
Tasks maintain context throughout their lifecycle:
- **Conversation History**: All previous messages and responses
- **File Changes**: Tracked modifications and their order
- **Tool Results**: Output from commands and operations
- **Checkpoint States**: Snapshots of file states at key points
This context allows Cline to:
- Understand what has been done
- Maintain consistency in approach
- Resume work intelligently
- Learn from previous attempts
→ **[Learn more about Context Management](/getting-started/understanding-context-management)** to understand how Cline manages and optimizes context across tasks.
Understanding how tasks work is fundamental to using Cline effectively. With well-crafted prompts and an understanding of the task lifecycle, you can leverage Cline's full potential to accelerate your development workflow.