Browse Source

Upgrade/workflows docs (#7593)

* feat(workflows): restructure and enhance workflows documentation with best practices and quick start guide

* feat(workflows): enhance documentation with modular workflow practices and new PR review workflow example

* feat(workflows): improve clarity in workflow creation instructions

* Update docs/features/slash-commands/workflows/best-practices.mdx

Co-authored-by: Copilot <[email protected]>

---------

Co-authored-by: Copilot <[email protected]>
Juan Pablo Flores 1 month ago
parent
commit
c94e2cf913

+ 8 - 1
docs/docs.json

@@ -151,7 +151,14 @@
 									"features/slash-commands/deep-planning"
 								]
 							},
-							"features/slash-commands/workflows",
+							{
+								"group": "Workflows",
+								"pages": [
+									"features/slash-commands/workflows/index",
+									"features/slash-commands/workflows/quickstart",
+									"features/slash-commands/workflows/best-practices"
+								]
+							},
 							{
 								"group": "Task Management",
 								"pages": [

+ 0 - 445
docs/features/slash-commands/workflows.mdx

@@ -1,445 +0,0 @@
----
-title: "Workflows"
-sidebarTitle: "Workflows"
----
-
-Workflows allow you to define a series of steps to guide Cline through a repetitive set of tasks, such as deploying a service or submitting a PR.
-
-To invoke a workflow, type `/[workflow-name.md]` in the chat.
-
-## How to Create and Use Workflows
-
-Workflows live alongside [Cline Rules](/features/cline-rules). Creating one is straightforward:
-
-<Frame>
-	<img src="https://storage.googleapis.com/cline_public_images/docs/assets/workflows.png" alt="Workflows tab in Cline" />
-</Frame>
-
-1. Create a markdown file with clear instructions for the steps Cline should take
-2. Save it with a `.md` extension in your workflows directory
-3. To trigger a workflow, just type `/` followed by the workflow filename
-4. Provide any required parameters when prompted
-
-The real power comes from how you structure your workflow files. You can:
-
--   Leverage Cline's [built-in tools](/exploring-clines-tools/cline-tools-guide) like `ask_followup_question`, `read_file`, `search_files`, and `new_task`
--   Use command-line tools you already have installed like `gh` or `docker`
--   Reference external [MCP tool calls](/mcp/mcp-overview) like Slack or Whatsapp
--   Chain multiple actions together in a specific sequence
-
-## Real-world Example
-
-I created a PR Review workflow that's already saving me tons of time.
-
-````md pr-review.md [expandable]
-You have access to the `gh` terminal command. I already authenticated it for you. Please review it to use the PR that I asked you to review. You're already in the `cline` repo.
-
-<detailed_sequence_of_steps>
-
-# GitHub PR Review Process - Detailed Sequence of Steps
-
-## 1. Gather PR Information
-
-1. Get the PR title, description, and comments:
-
-    ```bash
-    gh pr view <PR-number> --json title,body,comments
-    ```
-
-2. Get the full diff of the PR:
-    ```bash
-    gh pr diff <PR-number>
-    ```
-
-## 2. Understand the Context
-
-1. Identify which files were modified in the PR:
-
-    ```bash
-    gh pr view <PR-number> --json files
-    ```
-
-2. Examine the original files in the main branch to understand the context:
-
-    ```xml
-    <read_file>
-    <path>path/to/file</path>
-    </read_file>
-    ```
-
-3. For specific sections of a file, you can use search_files:
-    ```xml
-    <search_files>
-    <path>path/to/directory</path>
-    <regex>search term</regex>
-    <file_pattern>*.ts</file_pattern>
-    </search_files>
-    ```
-
-## 3. Analyze the Changes
-
-1. For each modified file, understand:
-
-    - What was changed
-    - Why it was changed (based on PR description)
-    - How it affects the codebase
-    - Potential side effects
-
-2. Look for:
-    - Code quality issues
-    - Potential bugs
-    - Performance implications
-    - Security concerns
-    - Test coverage
-
-## 4. Ask for User Confirmation
-
-1. Before making a decision, ask the user if you should approve the PR, providing your assessment and justification:
-
-    ```xml
-    <ask_followup_question>
-    <question>Based on my review of PR #<PR-number>, I recommend [approving/requesting changes]. Here's my justification:
-
-    [Detailed justification with key points about the PR quality, implementation, and any concerns]
-
-    Would you like me to proceed with this recommendation?</question>
-    <options>["Yes, approve the PR", "Yes, request changes", "No, I'd like to discuss further"]</options>
-    </ask_followup_question>
-    ```
-
-## 5. Ask if User Wants a Comment Drafted
-
-1. After the user decides on approval/rejection, ask if they would like a comment drafted:
-
-    ```xml
-    <ask_followup_question>
-    <question>Would you like me to draft a comment for this PR that you can copy and paste?</question>
-    <options>["Yes, please draft a comment", "No, I'll handle the comment myself"]</options>
-    </ask_followup_question>
-    ```
-
-2. If the user wants a comment drafted, provide a well-structured comment they can copy:
-
-    ```
-    Thank you for this PR! Here's my assessment:
-
-    [Detailed assessment with key points about the PR quality, implementation, and any suggestions]
-
-    [Include specific feedback on code quality, functionality, and testing]
-    ```
-
-## 6. Make a Decision
-
-1. Approve the PR if it meets quality standards:
-
-    ```bash
-    # For single-line comments:
-    gh pr review <PR-number> --approve --body "Your approval message"
-
-    # For multi-line comments with proper whitespace formatting:
-    cat << EOF | gh pr review <PR-number> --approve --body-file -
-    Thanks @username for this PR! The implementation looks good.
-
-    I particularly like how you've handled X and Y.
-
-    Great work!
-    EOF
-    ```
-
-2. Request changes if improvements are needed:
-
-    ```bash
-    # For single-line comments:
-    gh pr review <PR-number> --request-changes --body "Your feedback message"
-
-    # For multi-line comments with proper whitespace formatting:
-    cat << EOF | gh pr review <PR-number> --request-changes --body-file -
-    Thanks @username for this PR!
-
-    The implementation looks promising, but there are a few things to address:
-
-    1. Issue one
-    2. Issue two
-
-    Please make these changes and we can merge this.
-    EOF
-    ```
-
-    Note: The `cat << EOF | ... --body-file -` approach preserves all whitespace and formatting without requiring temporary files. The `-` parameter tells the command to read from standard input.
-    </detailed_sequence_of_steps>
-
-<example_review_process>
-
-# Example PR Review Process
-
-Let's walk through a real example of reviewing PR #3627 which fixes the thinking mode calculation for Claude 3.7 models.
-
-## Step 1: Gather PR Information
-
-```bash
-# Get PR details
-gh pr view 3627 --json title,body,comments
-
-# Get the full diff
-gh pr diff 3627
-```
-
-## Step 2: Understand the Context
-
-```xml
-# Examine the original files to understand what's being changed
-<read_file>
-<path>src/shared/api.ts</path>
-</read_file>
-
-# Look at the ThinkingBudgetSlider component implementation
-<read_file>
-<path>webview-ui/src/components/settings/ThinkingBudgetSlider.tsx</path>
-</read_file>
-
-# Check how thinking mode is currently handled in API providers
-<search_files>
-<path>src/api/providers</path>
-<regex>reasoningOn</regex>
-<file_pattern>*.ts</file_pattern>
-</search_files>
-```
-
-## Step 3: Analyze the Changes
-
-From the PR information and code examination, we can see that:
-
-1. The PR fixes an issue with the thinking mode budget calculation for Claude 3.7 models
-2. Currently, the thinking budget is incorrectly calculated as 80% of maxTokens (8192), resulting in 6553 tokens
-3. Claude 3.7 actually supports a much larger thinking budget (up to 64000 tokens)
-4. The PR adds a `thinkingConfig` property with `maxBudget: 64000` to model definitions
-5. It updates API handlers to use this value when reasoning mode is enabled
-6. It enhances the slider component to calculate max values based on model-specific percentages
-7. Comprehensive tests were added to verify the calculations
-
-## Step 4: Ask for User Confirmation
-
-```xml
-<ask_followup_question>
-<question>Based on my review of PR #3627, I recommend approving this PR. Here's my justification:
-
-1. The PR correctly fixes the thinking mode budget calculation for Claude 3.7 models
-2. It properly implements the thinkingConfig.maxBudget property (64000) for Claude 3.7 models
-3. It applies the appropriate percentage (50%) for the slider calculation
-4. The changes are well-tested with comprehensive unit tests
-5. The implementation is clean and follows the project's coding standards
-6. The PR includes helpful screenshots demonstrating the fix
-
-Would you like me to proceed with approving this PR?</question>
-<options>["Yes, approve the PR", "No, I'd like to discuss further", "Let me review it myself first"]</options>
-</ask_followup_question>
-```
-
-## Step 5: Ask if User Wants a Comment Drafted
-
-```xml
-<ask_followup_question>
-<question>Would you like me to draft a comment for this PR that you can copy and paste?</question>
-<options>["Yes, please draft a comment", "No, I'll handle the comment myself"]</options>
-</ask_followup_question>
-```
-
-## Step 6: Make a Decision
-
-```bash
-# Option 1: Simple one-line comment
-gh pr review 3627 --approve --body "This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models."
-
-# Option 2: Multi-line comment with proper whitespace formatting
-cat << EOF | gh pr review 3627 --approve --body-file -
-This PR looks good! It correctly fixes the thinking mode budget calculation for Claude 3.7 models.
-
-I particularly like:
-1. The proper implementation of thinkingConfig.maxBudget property (64000)
-2. The appropriate percentage (50%) for the slider calculation
-3. The comprehensive unit tests
-4. The clean implementation that follows project coding standards
-
-Great work!
-EOF
-```
-
-</example_review_process>
-
-<common_gh_commands>
-
-# Common GitHub CLI Commands for PR Review
-
-## Basic PR Commands
-
-```bash
-# List open PRs
-gh pr list
-
-# View a specific PR
-gh pr view <PR-number>
-
-# View PR with specific fields
-gh pr view <PR-number> --json title,body,comments,files,commits
-
-# Check PR status
-gh pr status
-```
-
-## Diff and File Commands
-
-```bash
-# Get the full diff of a PR
-gh pr diff <PR-number>
-
-# List files changed in a PR
-gh pr view <PR-number> --json files
-
-# Check out a PR locally
-gh pr checkout <PR-number>
-```
-
-## Review Commands
-
-```bash
-# Approve a PR (single-line comment)
-gh pr review <PR-number> --approve --body "Your approval message"
-
-# Approve a PR (multi-line comment with proper whitespace)
-cat << EOF | gh pr review <PR-number> --approve --body-file -
-Your multi-line
-approval message with
-
-proper whitespace formatting
-EOF
-
-# Request changes on a PR (single-line comment)
-gh pr review <PR-number> --request-changes --body "Your feedback message"
-
-# Request changes on a PR (multi-line comment with proper whitespace)
-cat << EOF | gh pr review <PR-number> --request-changes --body-file -
-Your multi-line
-change request with
-
-proper whitespace formatting
-EOF
-
-# Add a comment review (without approval/rejection)
-gh pr review <PR-number> --comment --body "Your comment message"
-
-# Add a comment review with proper whitespace
-cat << EOF | gh pr review <PR-number> --comment --body-file -
-Your multi-line
-comment with
-
-proper whitespace formatting
-EOF
-```
-
-## Additional Commands
-
-```bash
-# View PR checks status
-gh pr checks <PR-number>
-
-# View PR commits
-gh pr view <PR-number> --json commits
-
-# Merge a PR (if you have permission)
-gh pr merge <PR-number> --merge
-```
-
-</common_gh_commands>
-
-<general_guidelines_for_commenting>
-When reviewing a PR, please talk normally and like a friendly reviwer. You should keep it short, and start out by thanking the author of the pr and @ mentioning them.
-
-Whether or not you approve the PR, you should then give a quick summary of the changes without being too verbose or definitive, staying humble like that this is your understanding of the changes. Kind of how I'm talking to you right now.
-
-If you have any suggestions, or things that need to be changed, request changes instead of approving the PR.
-
-Leaving inline comments in code is good, but only do so if you have something specific to say about the code. And make sure you leave those comments first, and then request changes in the PR with a short comment explaining the overall theme of what you're asking them to change.
-</general_guidelines_for_commenting>
-
-<example_comments_that_i_have_written_before>
-<brief_approve_comment>
-Looks good, though we should make this generic for all providers & models at some point
-</brief_approve_comment>
-<brief_approve_comment>
-Will this work for models that may not match across OR/Gemini? Like the thinking models?
-</brief_approve_comment>
-<approve_comment>
-This looks great! I like how you've handled the global endpoint support - adding it to the ModelInfo interface makes total sense since it's just another capability flag, similar to how we handle other model features.
-
-The filtered model list approach is clean and will be easier to maintain than hardcoding which models work with global endpoints. And bumping the genai library was obviously needed for this to work.
-
-Thanks for adding the docs about the limitations too - good for users to know they can't use context caches with global endpoints but might get fewer 429 errors.
-</approve_comment>
-<requesst_changes_comment>
-This is awesome. Thanks @scottsus.
-
-My main concern though - does this work for all the possible VS Code themes? We struggled with this initially which is why it's not super styled currently. Please test and share screenshots with the different themes to make sure before we can merge
-</request_changes_comment>
-<request_changes_comment>
-Hey, the PR looks good overall but I'm concerned about removing those timeouts. Those were probably there for a reason - VSCode's UI can be finicky with timing.
-
-Could you add back the timeouts after focusing the sidebar? Something like:
-
-```typescript
-await vscode.commands.executeCommand("claude-dev.SidebarProvider.focus")
-await setTimeoutPromise(100) // Give UI time to update
-visibleWebview = WebviewProvider.getSidebarInstance()
-```
-
-</request_changes_comment>
-<request_changes_comment>
-Heya @alejandropta thanks for working on this!
-
-A few notes:
-1 - Adding additional info to the environment variables is fairly problematic because env variables get appended to **every single message**. I don't think this is justifiable for a somewhat niche use case.
-2 - Adding this option to settings to include that could be an option, but we want our options to be simple and straightforward for new users
-3 - We're working on revisualizing the way our settings page is displayed/organized, and this could potentially be reconciled once that is in and our settings page is more clearly delineated.
-
-So until the settings page is update, and this is added to settings in a way that's clean and doesn't confuse new users, I don't think we can merge this. Please bear with us.
-</request_changes_comment>
-<request_changes_comment>
-Also, don't forget to add a changeset since this fixes a user-facing bug.
-
-The architectural change is solid - moving the focus logic to the command handlers makes sense. Just don't want to introduce subtle timing issues by removing those timeouts.
-</request_changes_comment>
-</example_comments_that_i_have_written_before>
-````
-
-When I get a new PR to review, I used to manually gather context: checking the PR description, examining the diff, looking at surrounding files, and finally forming an opinion. Now I just:
-
-1. Type `/pr-review.md` in chat
-2. Paste in the PR number
-3. Let Cline handle everything else
-
-My workflow uses the `gh` command-line tool and Cline's built in `ask_followup_question` to:
-
--   Pull the PR description and comments
--   Examine the diff
--   Check surrounding files for context
--   Analyze potential issues
--   Asks me if it's cool approve it if everything looks good, with justification for why it should be approved
--   If I say "yes," Cline automatically approves the PR with the `gh` command
-
-This has taken my PR review process from a manual, multi-step operation to a single command that gives me everything I need to make an informed decision.
-
-> This is just one example of a workflow file. You can find more in our [prompts repository](https://github.com/cline/prompts) for inspiration.
-
-## Building Your Own Workflows
-
-The beauty of workflows is they're completely customizable to your needs. You might create workflows for all kinds of repetitive tasks:
-
--   For releases, you could have a workflow that grabs all merged PRs, builds a changelog, and handles version bumps.
--   Setting up new projects is perfect for workflows. Just run one command to create your folder structure, install dependencies, and set up configs.
--   Need to create a report? Create a workflow that grabs stats from different sources and formats them exactly how you like. You can even visualize them with a charting library and then make a presentation out of it with a library like [slidev](https://sli.dev/).
--   You can even use workflows to draft messages to your team using an MCP server like Slack or Whatsapp after you submit a PR.
-
-With Workflows, your imagination is the limit. The true potential comes from spotting those annoying repetitive tasks you do all the time.
-
-If you can describe something as "first I do X, then Y, then Z" - that's a perfect workflow candidate.
-
-Start with something small that bugs you, turn it into a workflow, and keep refining it. You'll be shocked how much of your day can be automated this way.

+ 135 - 0
docs/features/slash-commands/workflows/best-practices.mdx

@@ -0,0 +1,135 @@
+---
+title: "Workflows Best Practices"
+sidebarTitle: "Best Practices"
+description: "Tips and strategies for creating effective and reliable Cline workflows."
+---
+
+Creating effective workflows requires a balance of clear instructions, modular design, and intelligent tool usage. Follow these best practices to get the most out of Cline's automation capabilities.
+
+## Use Cline to Build Workflows
+
+We highly recommend using Cline to help you build your workflows. Since Cline understands your project's context and structure, it can be an invaluable partner in designing automation that fits your specific needs.
+
+### Building your own workflows
+
+Creating a workflow is simpler than you might think. There's actually a workflow for building workflows!
+
+First, **save the [create-new-workflow.md](https://github.com/cline/prompts/blob/main/workflows/create-new-workflow.md) file to your workspace** (e.g., in `.clinerules/workflows/`).
+
+Then, type `/create-new-workflow.md` and Cline guides you through it:
+
+1.  It asks for the purpose and a concise name.
+2.  You describe the objective and expected outputs.
+3.  You list the major steps (Cline can help determine details).
+4.  It generates the properly structured workflow file.
+
+<Tip>
+  **Automate Your History:** The best workflows come from tasks you've already done. After completing something you'll need to repeat, tell Cline: "Create a workflow for the process I just completed." It analyzes the conversation, identifies the steps, and generates the workflow file. Your accumulated context becomes reusable automation.
+</Tip>
+
+Workflows live in `.clinerules/workflows/` for project-specific ones or `~/Documents/Cline/Workflows/` for global ones you use across projects. Project workflows take precedence when names match.
+
+## Workflow Design
+
+<Tip>
+  **Start Simple:** Begin with small, single-task workflows. As you get comfortable, you can combine them or create more complex sequences.
+</Tip>
+
+### Be Modular
+Instead of creating one massive workflow file, break complex tasks into smaller, reusable workflows. This makes them easier to maintain and debug.
+
+### Use Clear Comments
+Just like with code, commenting your workflow steps is crucial. Explain *why* a step is happening, not just *what* is happening. This helps both you (the future maintainer) and Cline understand the intent.
+
+### Version Control
+Treat your workflows as part of your codebase. Store them in your Git repository (in `.clinerules/workflows/`) so they are versioned, reviewed, and shared with your team.
+
+## Prompt Engineering for Cline
+
+### Be Specific with Tool Use
+Don't just say "find the file." Be explicit about which tool Cline should use.
+
+*   **Bad:** "Find the user controller."
+*   **Good:** "Use `search_files` to look for `UserController` in the `src/controllers` directory."
+
+## Advanced Techniques
+
+### Available Tools
+
+Cline has a powerful set of tools you can use within your workflows. Here are the most common ones:
+
+#### execute_command
+Executes a CLI command on your system. Use this for running tests, builds, git commands, or any other terminal operation.
+
+```xml
+<execute_command>
+  <command>npm run test</command>
+  <requires_approval>false</requires_approval>
+</execute_command>
+```
+
+#### read_file
+Reads the contents of a file. Essential for analyzing code or configuration.
+
+```xml
+<read_file>
+  <path>src/config.json</path>
+</read_file>
+```
+
+#### write_to_file
+Creates or overwrites a file. Use this to generate boilerplate, config files, or documentation.
+
+```xml
+<write_to_file>
+  <path>src/components/Button.tsx</path>
+  <content>
+    // File content goes here...
+  </content>
+</write_to_file>
+```
+
+#### search_files
+Searches for a regex pattern across files in a directory. Great for finding TODOs, usage examples, or specific code patterns.
+
+```xml
+<search_files>
+  <path>src</path>
+  <regex>TODO</regex>
+  <file_pattern>*.ts</file_pattern>
+</search_files>
+```
+
+#### ask_followup_question
+Asks the user for input or confirmation. This makes your workflow interactive and allows for human-in-the-loop decision making.
+
+```xml
+<ask_followup_question>
+  <question>Do you want to deploy to production?</question>
+  <options>["Yes", "No"]</options>
+</ask_followup_question>
+```
+
+#### browser_action
+Controls a built-in browser to interact with websites or local servers. Useful for testing web UIs or scraping data.
+
+```xml
+<browser_action>
+  <action>launch</action>
+  <url>http://localhost:3000</url>
+</browser_action>
+```
+
+### Leverage MCP Tools
+You can use Model Context Protocol (MCP) tools within your workflows to interact with external services like GitHub, Slack, or databases. This allows you to create powerful end-to-end automations.
+
+### Manage Context Window
+Be mindful of Cline's context window. If a workflow is too long or processes too much data, it might exceed the token limit.
+*   **Break it down:** Split long workflows into smaller parts.
+*   **Be concise:** Keep instructions clear and to the point.
+
+## Learn More
+
+<Card title="Cline Learn" icon="lightbulb" href="https://cline.bot/learn">
+  Dive deeper into general prompt engineering strategies to write even better instructions for Cline.
+</Card>

+ 139 - 0
docs/features/slash-commands/workflows/index.mdx

@@ -0,0 +1,139 @@
+---
+title: "Workflows Overview"
+sidebarTitle: "Overview"
+description: "Learn what Cline workflows are, why they are useful, and how to structure them."
+---
+
+Workflows in Cline are Markdown files that define a series of steps to guide Cline through repetitive or complex tasks. They are a powerful way to automate your development processes directly within your editor.
+
+To invoke a workflow, you simply type `/` followed by the workflow's filename in the chat (e.g., `/deploy.md`).
+
+## Why Use Cline Workflows?
+
+*   **Automation:** Automate repetitive tasks like setting up a new project, deploying a service, or running a specific test suite.
+*   **Consistency:** Ensure that tasks are performed the same way every time, reducing errors.
+*   **Reduced Cognitive Load:** Don't waste mental energy remembering complex sequences of commands or steps.
+*   **Contextual:** Workflows run within your project's context, so Cline has access to your files and can use its tools to interact with them.
+
+## How They Work
+
+A workflow file is a standard Markdown file with a `.md` extension. Cline reads this file and interprets the instructions step-by-step. The real power comes from Cline's ability to use its built-in tools and other capabilities within these instructions:
+
+*   **Cline Tools:** Use tools like `read_file`, `write_to_file`, `execute_command`, and `ask_followup_question`.
+*   **Command-Line Tools:** Instruct Cline to use any CLI tool installed on your machine (e.g., `git`, `gh`, `npm`, `docker`).
+*   **MCP Tools:** Reference tools from connected Model Context Protocol (MCP) servers.
+
+## Workflows vs. Rules
+
+It's important to understand the difference between Cline Workflows and Cline Rules, as they serve different purposes:
+
+| Feature | Purpose | When to Use |
+| :--- | :--- | :--- |
+| **Cline Rules** | Define *how* Cline should behave generally. They are always active (or contextually triggered) and set the "ground rules" for your project. | Enforcing coding standards, tech stack preferences, or project-specific constraints (e.g., "Always use TypeScript", "Never edit the `db` folder"). |
+| **Cline Workflows** | Define *what* specific task Cline should perform. They are sequences of steps invoked on-demand to automate a process. | Automating repetitive tasks like creating a component, running a release process, or generating a daily report. |
+
+Think of **Rules** as the *environment* Cline works in, and **Workflows** as the *scripts* you give Cline to execute.
+
+### Example: Automating a Release
+
+Imagine you need to prepare a new release for your library.
+
+**Without a workflow**, you might have to manually:
+1.  Open `package.json` and bump the version number.
+2.  Run your test suite to make sure everything is green.
+3.  Update `CHANGELOG.md` with the latest commits.
+4.  Run `git commit -am "v1.0.1"`.
+5.  Run `git tag v1.0.1`.
+6.  Run `git push origin main --tags`.
+
+This is tedious and easy to mess up. You might forget to run the tests or format the changelog correctly.
+
+**With a Cline workflow**, you define these steps once in a `release.md` file. Then, you just type:
+
+```bash
+/release.md
+```
+
+Cline will then meticulously follow your instructions: updating files, running tests, and executing git commands—pausing only if it encounters an error or needs your input.
+
+## Where are Workflows Stored?
+
+You can store workflows in two locations, depending on whether they are specific to a project or meant to be global.
+
+<Tabs>
+  <Tab title="Project-Specific Workflows">
+    Store workflows that are specific to a single project in a `.clinerules/workflows/` directory in your project's root.
+
+    1.  Create a `.clinerules` folder in your project's root directory (if it doesn't already exist).
+        <Note>
+          The `.clinerules` directory may be hidden by default on some systems. You might need to enable **Show Hidden Files** to see it.
+        </Note>
+    2.  Inside `.clinerules`, create a `workflows` folder.
+    3.  Create your Markdown workflow files (e.g., `deploy.md`) in this folder.
+
+    These workflows will only be available when you have this specific project open.
+  </Tab>
+  <Tab title="Global Workflows">
+    Store workflows that you want to use across all your projects in a global directory.
+
+    *   **macOS/Linux:** `~/Documents/Cline/Workflows/`
+    *   **Windows:** `C:\Users\USERNAME\Documents\Cline\Workflows\`
+
+    Create your Markdown workflow files directly in this directory. They will be available in any project you open with Cline.
+  </Tab>
+</Tabs>
+
+## Manage Workflows
+
+You can easily manage your workflows directly within the extension. This feature provides a unified interface to handle all your automation needs without leaving your editor or hunting through file directories. It consolidates both project-specific rules and global workflows into one view, giving you full control over your automation environment.
+
+1.  Click the **Manage Cline Rules and Workflows** button (<Icon icon="scale-balanced" />) at the bottom of the extension.
+2.  This opens an interface where you can:
+    *   **View all available workflows:** See a comprehensive list of both project-specific and global workflows.
+    *   **Control automation:** Toggle individual workflows on and off as needed for your current task.
+    *   **Create and Edit:** Add new workflows or modify existing ones directly within the interface.
+    *   **Clean up:** Delete workflows you no longer need.
+
+<Frame caption="Manage Workflows">
+  <img src="https://storage.googleapis.com/cline_public_images/workflow-menu.gif" alt="Manage Cline Rules and Workflows Interface" />
+</Frame>
+
+## Workflow Structure Example
+
+Here is a simple example of a workflow file (`daily-changelog.md`) that helps you create a daily changelog.
+
+````markdown daily-changelog.md
+# Daily Changelog Generator
+
+This workflow helps you create a changelog for your daily work.
+
+1.  **Check your recent git commits:**
+    I will run the following command to see your commits from today.
+    ```bash
+    git log --author="$(git config user.name)" --since="yesterday" --oneline
+    ```
+
+2.  **Summarize your work:**
+    I will present the commits to you and ask for a summary of your changes to be added to the `changelog.md` file.
+
+3.  **Create/Append to daily changelog:**
+    I will append to the `changelog.md` file. The content will include a header with the current date, the list of commits, and your summary.
+````
+
+### Breakdown of the Workflow
+
+This workflow demonstrates that you don't always need to provide specific tool calls (like XML blocks). Cline is smart enough to interpret your high-level instructions.
+
+1.  **Step 1: Check recent git commits**
+    *   We give Cline a specific command to run. This ensures it gets exactly the data we want (today's commits).
+    <Tip>
+      After Cline shows the git commit history, you may need to click the **Proceed While Running** button to allow the workflow to continue.
+    </Tip>
+
+2.  **Step 2: Summarize your work**
+    *   Instead of forcing a specific tool, we simply tell Cline what to do: "ask for a summary".
+    *   Cline knows it needs to use its capabilities to ask you a question.
+
+3.  **Step 3: Create/Append to daily changelog**
+    *   We describe the desired outcome: "append to the `changelog.md` file" with specific content.
+    *   Cline figures out how to format the file and use its file-writing tools to accomplish the task.

+ 112 - 0
docs/features/slash-commands/workflows/quickstart.mdx

@@ -0,0 +1,112 @@
+---
+title: "Workflows Quick Start"
+sidebarTitle: "Quick Start"
+description: "A step-by-step guide to creating your first Cline workflow."
+---
+
+In this tutorial, you will create a powerful workflow that automates the process of reviewing a GitHub Pull Request. This example demonstrates how to combine CLI tools, file analysis, and user interaction into a seamless process.
+
+### Prerequisites
+
+*   You have Cline installed.
+*   You have the [GitHub CLI (`gh`)](https://cli.github.com/) installed and authenticated.
+*   You have a Git repository open with a Pull Request you want to test this on.
+
+## Creating a Pull Request Review Workflow
+
+This workflow will automate the process of fetching PR details, analyzing the code changes for issues, and drafting a review comment.
+
+<Steps>
+  <Step title="Create the Workflow File">
+    First, create the directory structure for your project-specific workflows.
+
+    1.  In the root of your project, create a new folder named `.clinerules`.
+    2.  Inside `.clinerules`, create another folder named `workflows`.
+    3.  Finally, create a new file named `pr-review.md` inside the `workflows` folder.
+  </Step>
+
+  <Step title="Write the Workflow Content">
+    Open the `pr-review.md` file and add the following content. This workflow will gather PR details, analyze the changes, and help you submit a review.
+
+    ````markdown pr-review.md
+    # Pull Request Reviewer
+
+    This workflow helps me review a pull request by analyzing the changes and drafting a review.
+
+    ## 1. Gather PR Information
+    First, I need to understand what this PR is about. I'll fetch the title, description, and list of changed files.
+
+    ```bash
+    gh pr view PR_NUMBER --json title,body,files
+    ```
+
+    ## 2. Examine Modified Files
+    Now I will examine the diff to understand the specific code changes.
+
+    ```bash
+    gh pr diff PR_NUMBER
+    ```
+
+    ## 3. Analyze Changes
+    I will analyze the code changes for:
+    *   **Bugs:** Logic errors or edge cases.
+    *   **Performance:** Inefficient loops or operations.
+    *   **Security:** Vulnerabilities or unsafe practices.
+
+    ## 4. Confirm Assessment
+    Based on my analysis, I will present my findings and ask how you want to proceed.
+
+    ```xml
+    <ask_followup_question>
+      <question>I've reviewed PR #PR_NUMBER. Here is my assessment:
+
+    [Insert Analysis Here]
+
+    Do you want me to approve this PR, request changes, or just leave a comment?</question>
+      <options>["Approve", "Request Changes", "Comment", "Do nothing"]</options>
+    </ask_followup_question>
+    ```
+
+    ## 5. Execute Review
+    Finally, I will execute the review command based on your decision.
+
+    ```bash
+    # If approving:
+    gh pr review PR_NUMBER --approve --body "Looks good to me! [Summary of analysis]"
+
+    # If requesting changes:
+    gh pr review PR_NUMBER --request-changes --body "Please address the following: [Issues list]"
+
+    # If commenting:
+    gh pr review PR_NUMBER --comment --body "[Comments]"
+    ```
+    ````
+
+    <Note>
+      When you run this workflow, you will replace `PR_NUMBER` with the actual number of the pull request you want to review (e.g., `/pr-review.md 123`).
+    </Note>
+  </Step>
+
+  <Step title="Run the Workflow">
+    Now you're ready to run your new workflow.
+
+    1.  Open the Cline chat panel.
+    2.  Type `/pr-review.md` followed by the PR number (e.g., `/pr-review.md 42`) and press Enter.
+    3.  Cline will fetch the PR details, analyze the code, and present you with its findings before submitting the review.
+
+    <Tip>
+      As Cline executes commands (like `gh pr view`), it may show you the output and pause. You will need to click the **Proceed While Running** button to allow Cline to analyze the content and continue with the workflow.
+    </Tip>
+  </Step>
+</Steps>
+
+### Other Common Use Cases
+
+This is just one example. You can create workflows for a wide variety of tasks, such as:
+
+*   **Creating Components:** Automate the boilerplate for new files (like React components or API endpoints).
+*   **Running Tests:** Create a workflow that runs your test suite and summarizes the results.
+*   **Deploying Your Application:** Automate your deployment pipeline using tools like `docker` and `kubectl`.
+*   **Refactoring Code:** Guide Cline through a complex refactoring process step-by-step.
+
+Explore Cline's capabilities and your own development processes to find repetitive tasks that can be turned into efficient workflows.