Prompt Engineering
Intermediate
AI Pair Programming Workflow
Use prompts to turn an LLM into a useful coding partner without surrendering engineering judgment.
30 min
3 sections
coding
pair-programming
workflow
1
2
3
01. Give the model the engineering frame
Section 1 of 3
For coding tasks, prompt the model with the repository constraints, target behavior, files in scope, testing expectations, and what not to change. This reduces broad rewrites and keeps the assistant aligned with the existing codebase.
text
You are helping in an existing Next.js codebase.
Goal:
Add keyboard navigation to the command menu.
Constraints:
- Preserve existing component APIs.
- Use the current styling system.
- Keep changes inside src/components/command-menu.
- Add or update tests for ArrowUp, ArrowDown, Enter, and Escape.
- Before editing, summarize the files you need to inspect.Back to Course