Flows, Chat & Commands
Windsurf has four distinct interaction modes. Knowing which to use for which task is the difference between productive AI-native development and frustrating back-and-forth.
Flows (Agentic)
Multi-step tasks requiring planning and execution across files. Describe the goal; Cascade plans and executes. Best for feature implementation, large refactors, test generation, migration tasks, and anything touching more than two files.
Chat Mode
Conversational Q+A about your codebase. "How does the auth middleware work?", "What calls this function?", "Explain this regex." Cascade answers with codebase-grounded context. No file edits are made.
Inline Completions
Real-time line and block completions as you type. Context-aware -- Cascade considers the full file and semantically related files. Accept with Tab. Use for routine code where the pattern is clear and you want zero interruption.
Slash Commands
/explain, /fix, /test, /refactor, /doc -- targeted actions on selected code. Faster than writing a full Flow prompt for single-function tasks. Use for focused, bounded edits to one function or class.
| Scenario | Best Mode | Why |
|---|---|---|
| Implement a new feature across 5 files | Flow | Needs planning + multi-file coordination |
| Fix a specific known bug | /fix or Flow | Either works; /fix faster for a single function |
| Understand unfamiliar inherited code | Chat | Q+A with codebase context, no edits needed |
| Write a function you know the shape of | Inline completion | Pattern is clear, no planning needed |
| Add JSDoc to all exported functions | Flow | Repetitive multi-file task -- automate it |
| Explain what a regex does | /explain | Single-item, no file edits needed |
| Migrate tests from Jest to Vitest | Flow | Multi-file, systematic change |
| Write tests for one specific function | /test | Bounded to one function, no broader context needed |
ShopMate -- Which Mode to Use
## ShopMate Development: Right Windsurf Mode for Each Task ## FLOW (Cmd+I) -- multi-file, needs planning: "Add a new ShopMate feature: [description], following .windsurfrules" "Add a new brand to ShopMate (PetThreads) with its own voice and budget" "Migrate all ShopMate Claude calls to use the new logged_create() wrapper" "Add integration tests for the customer chat multi-turn session" "Refactor shopmate/api/main.py -- it is getting too long, split into sub-routers" ## CHAT (Cmd+L) -- understand before you build: "How does the multi-brand system work? Walk me through a describe_for_brand() call" "What would break if I changed the model in logged_create from Haiku to Sonnet?" "Why does safe_reply() sometimes return the fallback message for perfectly fine replies?" ## SLASH COMMANDS -- single function, no planning needed: /explain -- understanding a prompt template or RAG query /fix -- a specific bug: "wrong brand voice being applied" /test -- tests for a new describe_product() variant /doc -- docstring for ShopMateChat class /refactor -- simplify the multi-brand YAML loading ## INLINE COMPLETION -- pattern is obvious: Adding a new field to a Pydantic model (ProductIn, CampaignIn) Writing another tool definition following the existing pattern Adding a new brand to brands.yaml