Chapter 10: Working With Agents - Prompting in the Agentic Era
Prompt Engineering Is Table Stakes Now
Prompt engineering is the old conversation. You do not get credit for writing a better prompt - that is how AI moves; yesterday's magic trick becomes today's login screen. The agents shipping in 2026 are dramatically more capable than the ones from a year ago. They hold more context, call tools better, stay on a task far longer, and reason across code, tests, docs, tickets, and architecture decisions. Yet most teams still use them like autocomplete with a hoodie. That gap is the bottleneck.
Last year, you prompted AI like a junior engineer: tight scope, explicit spec, small task, and you owned all the thinking. Now you work with agents more like senior engineers. That means three things in real agentic work.
1. Give Direction Without Over-Specifying
Lead with your thesis, not just a task.
"I think our auth coupling is slowing deployment.
Investigate the service boundaries and show me the tradeoffs."
That beats "Refactor auth." One is leadership. The other is a ticket wearing a fake mustache. Give the agent the problem and your hypothesis, and let it do real investigation.
2. Ask It to Wrestle With What Good Looks Like
Not everything fits in an eval. Architecture decisions, modernization paths, platform tradeoffs, migration sequencing, and engineering debt require judgment. So ask better questions:
What are we optimizing for?
What are we risking?
What breaks first?
What would you challenge in this plan?
Where am I wrong?
That is where the value shows up - in the agent pushing back and surfacing tradeoffs, not just emitting code.
3. Force It Across the Full Context
Do not let the agent tunnel into one file and declare victory like it found Atlantis in a helper method. Point it at the working set:
Code. Tests. Docs. Tickets. Recent changes.
Product constraints. Operational pain. Your own opinion.
Then make it reason across the whole system. This is the same pattern strong technical leaders use with senior engineers: autonomy with accountability, context before commands, room to push back, and clear ownership of the outcome.
Structure Still Helps for Discrete Tasks
For well-scoped, single-shot work, an explicit structure still improves results. Think of it as the shape of a good intent statement at the prompt level:
CONTEXT: I'm building a REST API for user management in Express.
GOAL: Add a bulk user import endpoint from CSV.
CONSTRAINTS:
- Validate CSV format before processing
- Maximum 1000 users per import
- Handle duplicate emails gracefully
- Return progress via WebSocket
EXAMPLES: Mirror the existing /api/products/bulk-import endpoint
VERIFICATION: Integration tests covering success and error cases
Prompt engineering was never really about the words. It was about intent - now best expressed as a sharp series of questions backed by enough context for the agent to do real work. Stop prompting like the agent is a chatbot. Work with it like a senior technical partner.