Windsurf Track
Module 27
Windsurf Track -- Module 27
Right Tool for Each ShopMate Task: Not every ShopMate change needs a full Flow. Adding a field to the product schema -- /fix. Understanding how the multi-tenant system prompt injection works -- Chat. Migrating all ShopMate routes to a new auth pattern -- Flow. This module maps ShopMate development tasks to the right Windsurf mode.

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.

ScenarioBest ModeWhy
Implement a new feature across 5 filesFlowNeeds planning + multi-file coordination
Fix a specific known bug/fix or FlowEither works; /fix faster for a single function
Understand unfamiliar inherited codeChatQ+A with codebase context, no edits needed
Write a function you know the shape ofInline completionPattern is clear, no planning needed
Add JSDoc to all exported functionsFlowRepetitive multi-file task -- automate it
Explain what a regex does/explainSingle-item, no file edits needed
Migrate tests from Jest to VitestFlowMulti-file, systematic change
Write tests for one specific function/testBounded to one function, no broader context needed

ShopMate -- Which Mode to Use

Text -- ShopMate Task-to-Mode Reference
## 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