Components of a high quality prompt
- Clear objective or outcome
- What are you asking the model to produce?
- Are you asking the model for a plan? For new code? Is it a refactor?
- All relevant context to perform the task(s)
- Have you properly used @-Mentions to ensure that the proper context is included?
- Is there any context that is customer specific that may be unclear to Windsurf?
- Necessary constraints
- Are there any specific frameworks, libraries, or languages that must be utilized?
- Are there any space or time complexity constraints?
- Are there any security considerations?
Examples
Example #1:- Bad: Write unit tests for all test cases for an Order Book object.
-
Good: Using
@class:unit-testing-module
write unit tests for@func:src-order-book-add
testing for exceptions thrown when above or below stop loss
- Bad: Refactor rawDataTransform.
-
Good: Refactor
@func:rawDataTransform
by turning the while loop into a for loop and using the same data structure output as@func:otherDataTransformer
- Bad: Create a new Button for the Contact Form.
-
Good: Create a new Button component for the
@class:ContactForm
using the style guide in@repo:frontend-components
that says “Continue”