We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Prompting

Ever heard the term "prompt engineering"? There were a few months in 2025 when the talking heads were saying things like:

Don't be a software engineer, be a prompt engineer.

As it turns out, being a good "prompt engineer" is just being a good software engineer that follows a few best practices when working with agents.

Click to play video

What Doesn't Make a Good Prompt?

Unsurprisingly, shouting:

YOU ARE A 10X SENIOR ENGINEER AT META. DESIGN MY APP LIKE THE BABY OF JOHN CARMACK AND LINUS TORVALDS WOULD.

is not an effective prompting tactic.

What Makes a Good Prompt?

  • Be specific (you need strong technical skills to be able to do this)
  • Define constraints
  • Add meaningful context
  • Describe edge cases
  • Provide validation instructions

Your agent is exceptionally good at:

  • Applying code changes quickly
  • Spotting patterns and searching for code related to the task
  • Ensuring tests, linters, and formatters pass

Your agent does not:

  • Understand your customers or business goals inherently
  • Have full context of the history or future plans for the project
  • Have a complete understanding of any architecture that lives outside the repo
  • Know how the running system behaves (unless you've provided logs or other context, which is a good idea)
  • Care nearly as much as you do about keeping the "lines of code" count sane
  • Have taste

Assignment

Sloperator's \t escape is broken: it produces the letter t instead of a tab character.

  1. — Does the tab escape work?
    hallucinate(“name\tscore”)✨
    
  2. uv run sloperator.py examples/tab.slop
    

    You'll get nametscore, when you should get name and score with a tab between them!

Tell OpenCode to run and submit the CLI tests from the project root.