AI-Assisted Development

Modes, Context & Prompting

Workshop — Part 6: Ask, Plan, Agent, and the habits that make them work

5 / 12 — Modes & Context
AI-Assisted Development

Four Modes

Ask
Explore, explain, think out loud
Flashlight, not wrench

Plan
Design the change before touching code
Blueprint before building

Agent
Execute the plan, make multi-step edits
Builder with a checklist

Inline / Autocomplete
Small, local changes right where you are
One brick at a time

5 / 12 — Modes & Context
AI-Assisted Development

Ask Mode

Use it to:

  • Summarize a file or folder
  • Explain a concept in plain language
  • Compare two implementation options
  • Find where something lives in the codebase
  • Suggest likely causes for a bug
"Where is the todo completion flow?
Summarize the files involved.
Do not change any code yet."

Good when:

  • You’re new to the codebase
  • You need orientation before a change
  • You want a quick second opinion

Avoid:

  • “Just fix everything” without a clear target
  • Mixing exploration and implementation in one prompt
  • Trusting summaries without verifying
5 / 12 — Modes & Context
AI-Assisted Development

Plan Mode

Use it when:

  • Multi-file features
  • Refactors
  • Bug fixes that need a regression test first
  • Architecture decisions
  • Anything where order matters
"We need to add 'mark todo completed'.
1. Propose an implementation plan.
2. List the tests we should add.
3. Stop after the plan — do not edit files."

A good plan contains:

  • Short problem summary
  • Files likely to change
  • Step-by-step implementation plan
  • Test cases and validation steps
  • Open questions or risks

If the plan is wrong, restart cleanly — don’t patch a bad plan forever.

5 / 12 — Modes & Context
AI-Assisted Development

Agent Mode

Use it when:

  • Implementing a planned feature
  • Fixing a failing test
  • Updating several files consistently
  • Refactoring a bounded area

Best practice:

  1. Give it a clear goal
  2. Keep the scope narrow
  3. Ask for tests or validation
  4. Review the diff before merging

Avoid:

  • Handing over a huge, fuzzy task with no boundaries
  • Letting the agent wander into unrelated cleanup
  • Assuming “agent did it” means “it is correct”

Agent mode is powerful, but works best when the task is already shaped into a small, reviewable slice.

5 / 12 — Modes & Context
AI-Assisted Development

Inline / Autocomplete

One function. One file. One clearly bounded fix.

Fastest for local changes you already understand.

5 / 12 — Modes & Context
AI-Assisted Development

Supporting Habits

Context
Reference the relevant files and folders.
Include error messages and stack traces.
Say what should not change.

"Context: @src @tests

Task: add endpoint to mark todo completed.
Constraints:
- keep current API shape
- preserve existing tests
- add regression tests first"

Rules files
Project-level instructions that persist across sessions.
AGENTS.md · .cursorrules · copilot-instructions.md

Tests first
Write the failing test before implementation.
A test is an unambiguous spec for the AI.

Verify the output
AI can be confident and wrong.

  • Does the code compile?
  • Do tests pass?
  • Does the diff match the plan?
  • Did it invent anything that doesn’t exist?

Model choice
Use faster/cheaper models for simple edits.
Use stronger reasoning models for design or debugging.

5 / 12 — Modes & Context
AI-Assisted Development

The Recommended Workflow

Step
Ask
Understand the code and the problem.
Read before you write.

Plan
Decide the approach and tests.
Stop. Review the plan.

Agent
Implement the change.
Keep the scope narrow.

Review
Inspect the diff.
Run tests and validation.
Only then merge.

5 / 12 — Modes & Context
AI-Assisted Development

Summary

  • Ask = explore and orient before acting
  • Plan = design first, execute after approval
  • Agent = execute with a narrow, clear goal
  • Inline = smallest changes, right where you are
  • Good context, rules files, and tests make every mode more effective
  • Always review — mode doesn’t change that responsibility