Stage 3 · Lesson 3 of 7
Pointing at a pattern to follow
Models write generic code by default. Your project has its own style: how errors are handled, how services are structured, how tests are named. The quickest way to get code that fits is to name a file that already does something similar well and ask the tool to follow it: "add a PaymentsService with the same structure and error handling as src/services/orders.ts".
This works better than describing the style in words, and it makes the result easier for you and your reviewers to read. If there is no good example yet, write the first one yourself, then use it as the pattern for the rest.
Common trappointing at a file that is itself a bad example, so the tool faithfully copies its problems into new code.
A question to check yourself, an AI practice session and 1 cheat sheet entry come when you add the roadmap to your account. Add it
Resources for this stage
Start with· follow one of these
- CoursePaidGrokking Prompt Engineering for Software Engineers
Design Gurus · Beginner · Subscription
A structured course on prompting for engineering work: specs, context, examples and iteration
- GuideFreeAnthropic Prompt Engineering Documentation
Anthropic
Free and model-agnostic in spirit: be clear and direct, give examples, let the model think