core-workflow.mdx 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. ---
  2. title: "Core Workflow"
  3. description: "The end-to-end workflow for using Cline Kanban: create tasks, run agents, review changes, and ship"
  4. ---
  5. This guide walks through the typical Kanban workflow from start to finish.
  6. ## 1. Create Tasks
  7. There are two ways to add tasks to the board:
  8. - **Manually** — click the add button and write a task description
  9. - **Via sidebar chat** — open the sidebar chat and ask the agent to break down a piece of work into tasks. The agent can create cards, link them together, and start work directly on the board.
  10. Each card on the board represents a discrete unit of work for an agent to complete.
  11. ## 2. Link Tasks
  12. Link cards together to create dependency chains:
  13. - **⌘ + click** (Mac) / **Ctrl + click** (Windows/Linux) a card to link it to another task
  14. - When a linked card completes and is moved to trash, the next linked task **automatically starts**
  15. Combined with auto-commit, this enables fully autonomous chains where one task's output feeds into the next without manual intervention.
  16. ## 3. Start Tasks
  17. Hit the **play button** on a card to start it. Here's what happens:
  18. 1. Kanban creates an **ephemeral git worktree** for the task — an isolated copy of your repo where the agent can make changes without affecting your main working directory or other tasks
  19. 2. Gitignored files like `node_modules` are **symlinked** from your main repo into the worktree, avoiding slow reinstalls for each task
  20. 3. The agent starts working in its own terminal within that worktree
  21. 4. The card displays the agent's **latest message or tool call** so you can monitor progress from the board
  22. Multiple tasks run in parallel, each in their own worktree, so agents never create merge conflicts with each other.
  23. <Warning>
  24. Symlinks work well for gitignored files that agents don't need to modify (like `node_modules`). If your workflow requires agents to modify gitignored files, be aware that changes will affect the symlink target (your main repo's copy).
  25. </Warning>
  26. ## 4. Review Changes
  27. Click a card to open the detail view, which shows:
  28. - **The agent's TUI** — the full text interface showing the agent's conversation and actions
  29. - **A diff of all changes** in that worktree compared to your base branch
  30. The diff viewer includes a **checkpoint system** — you can see diffs scoped to specific message ranges, not just the full cumulative diff. This makes it easier to understand what changed and when.
  31. ### Inline Comments
  32. Click on any line in the diff to leave a comment. Comments are sent back to the agent as feedback, letting you steer its work without rewriting the task description. This is useful for corrections like "use a different approach here" or "this edge case isn't handled."
  33. ## 5. Ship It
  34. When you're satisfied with the changes, you have two options:
  35. - **Commit** — merges the worktree changes into a commit on your base branch
  36. - **Open PR** — creates a new branch and opens a pull request
  37. In both cases, Kanban sends a dynamic prompt to the agent to handle the operation. The agent converts the worktree into the appropriate git action and **intelligently handles merge conflicts** if the base branch has moved since the worktree was created.
  38. ## 6. Clean Up
  39. After shipping, move the card to **trash** to clean up the ephemeral worktree and free disk space.
  40. <Tip>
  41. If you need to resume work on a trashed card later, Kanban provides a **resume ID** for each task. You can use this to pick up where you left off.
  42. </Tip>
  43. ## Workflow Summary
  44. | Step | Action | What Happens |
  45. |------|--------|-------------|
  46. | Create | Add card or use sidebar chat | Task card appears on the board |
  47. | Link | ⌘ + click to connect cards | Dependency chain is established |
  48. | Start | Hit play on a card | Ephemeral worktree is created, agent begins work |
  49. | Monitor | Watch card status on board | Latest agent message/tool call shown on card |
  50. | Review | Click card to see diff | Full diff with checkpoints and inline commenting |
  51. | Ship | Click Commit or Open PR | Agent handles merge into base branch or creates PR |
  52. | Clean up | Move to trash | Worktree is removed, resume ID saved |