Use AI safely

Complete your first AI workflow

Apply the whole course to one small coding task, and keep the prompt, context, checks, and safety decisions as a workflow you can repeat.

Time to put the course to work. Pick one small behavior in a project you can run and test locally.

The example I’ll use is server-side display-name validation:

  • accept names from 1 to 50 characters
  • reject empty and 51-character names
  • keep the current database schema and success response
  • don’t rely on browser validation
  • keep the change inside the profile update flow

Use your own task if it has boundaries this clear.

1. Write the task contract

Write down the outcome, the current behavior, the scope, the constraints, and the acceptance criteria. Another developer should be able to decide whether the task is done without asking you.

Don’t prescribe implementation details you don’t know yet. Ask the agent to inspect first.

2. Ask for an inspection note

Have the agent find the entry point, the data flow, the tests, and the contract that must survive. Require file paths. Require a separation between observed facts and inferences.

Read the note before any edit happens. You’re looking for one wrong assumption while it’s still cheap to fix.

3. Work through checkpoints

One behavior and one check per step:

  1. Add a failing boundary test.
  2. Implement the server validation.
  3. Run the focused test and the nearby tests.
  4. Review the diff and the scope.
  5. Run the production build if the change touches integration.

Approve only the tools and targets the current step needs. Stop if the agent asks for a credential, a destructive action, or a scope expansion you didn’t authorize.

4. Write the receipt

Save this with the result:

Outcome:
Files inspected:
Files changed:
Checks run:
Failure or abuse case tried:
Data and permission decisions:
Unsupported assumption caught:
What remains unverified:
One workflow improvement for next time:

Note the provider and the exact model identifier when repeatability matters. Save the final prompt and the most useful context. Don’t save secrets or private customer data.

What success looks like

Success is not the AI finished fast. Success means the requested behavior has evidence behind it, the change stayed in scope, sensitive data stayed protected, and what’s uncertain is written down.

If you caught and corrected a model mistake along the way, that’s a successful workflow. Verification did its job.

What to remember from this course

If you keep four things from these lessons, keep these:

  1. Models are pattern engines trained on a huge amount of code. They produce what fits, not what’s proven.
  2. Different models suit different tasks. Choose by cost, power, and speed for the job in front of you, and expect the names to change.
  3. AI needs three things from you: rules for how to behave, a prompt for what to do now, and context for what it needs to know.
  4. Agents use tools in a loop. Give them small steps, narrow permissions, and tests, and check the evidence yourself.

Getting good at this takes practice. Every task is a chance to notice one thing that would have gone better with a clearer prompt, a smaller step, or a stronger check. Keep the receipts. After a month you’ll have a workflow that’s yours.

Lesson completed