Tips for Agentic Development

A presentation at PHPSW Lightning Talks in November 2025 in Bristol, UK by Drew McLellan

Slide 1

Slide 1

PHPSW TIPS FOR AGENTIC DEVELOPMENT @drewm

Slide 2

Slide 2

TIPS FOR USING AI CODING ASSISTANTS

Slide 3

Slide 3

TIPS FOR AGENTIC DEVELOPMENT WHAT ARE AI CODING ASSISTANTS? AI coding assistants (or agents) are tools that assist developers by generating code, finding bugs, writing documentation, and more. They act as a powerful pair programmer, helping you move faster and focus on the bigger picture. They’re really good at taking the busywork out of being a software engineer.

Slide 4

Slide 4

Slide 5

Slide 5

Slide 6

Slide 6

Slide 7

Slide 7

THE TIPS

Slide 8

Slide 8

TIP #1 BE SPECIFIC

Slide 9

Slide 9

TIPS FOR AGENTIC DEVELOPMENT REMEMBER INPUTS, PROCESSES & OUTPUTS Write a function to calculate the area of a circle. 👎

Slide 10

Slide 10

TIPS FOR AGENTIC DEVELOPMENT REMEMBER INPUTS, PROCESSES & OUTPUTS Write a PHP function called calculateArea that takes a radius and returns the area of a circle. 👍

Slide 11

Slide 11

TIPS FOR AGENTIC DEVELOPMENT REMEMBER INPUTS, PROCESSES & OUTPUTS Write a PHP function called calculateArea that takes a radius and returns the area of a circle. Make sure it has documentation and tests. 🫶

Slide 12

Slide 12

TIPS FOR AGENTIC DEVELOPMENT ANATOMY OF A GREAT PROMPT ▸ Role & Task ▸ Context & Examples ▸ Constraints & Format

Slide 13

Slide 13

TIPS FOR AGENTIC DEVELOPMENT ROLE & TASK Act as a Staff Engineer. Refactor this function to improve performance, testability and readability.

Slide 14

Slide 14

TIPS FOR AGENTIC DEVELOPMENT CONTEXT & EXAMPLES When I run x command with the -test flag I receive this error message: “Error: …” But when I run without the command completes successfully.

Slide 15

Slide 15

TIPS FOR AGENTIC DEVELOPMENT CONSTRAINTS & FORMAT Scores are showing in the UI as 0-1 values instead of percentages. We cannot modify the API endpoint. Update the frontend to show whole-integer percentages. According to corporate policy, every file we change must have an update to its test file. Check to make sure we’re complying and update tests if necessary.

Slide 16

Slide 16

TIP #2 ITERATE & REFINE

Slide 17

Slide 17

TIPS FOR AGENTIC DEVELOPMENT ITERATE & REFINE ▸ You don’t need to accept the first answer. Treat it like a conversation, not a command. ▸ Ask follow-up questions. Ask the AI to refine its code, explain its reasoning, or provide alternatives. ▸ Use planning mode to try before you buy.

Slide 18

Slide 18

TIPS FOR AGENTIC DEVELOPMENT PLANNING MODE I’d like to add rate-limiting to the API, with configurable rates per endpoint. Plan some ways that could be done and show me the options so I can choose.

Slide 19

Slide 19

TIP #3 LET IT DO THE DONKEY WORK

Slide 20

Slide 20

TIPS FOR AGENTIC DEVELOPMENT LET IT DO THE DONKEY WORK ▸ Generating boilerplate ▸ Understanding & debugging complex codebases ▸ Writing documentation

Slide 21

Slide 21

TIPS FOR AGENTIC DEVELOPMENT GENERATING BOILERPLATE Plan a full-stack project setup: Symfony 7 (API Platform) backend, React 18/Vite (TypeScript) frontend. The entire stack must be Docker Compose-enabled for local development (including PostgreSQL, Mercure, Redis). Provide the step-by-step structure, necessary Dockerfiles/YAML, and an outline for DigitalOcean deployment.

Slide 22

Slide 22

TIPS FOR AGENTIC DEVELOPMENT UNDERSTANDING & DEBUGGING COMPLEX CODEBASES Which file is responsible for rendering requests to /projects/:1234? The database query for this endpoint is performing a SELECT *. Is the frontend using all the fields or can this be optimized?

Slide 23

Slide 23

TIPS FOR AGENTIC DEVELOPMENT WRITING DOCUMENTATION Docs for this project are in /docs. Create a new doc for this change and also add a note in the Quickstart Guide with any setup changes required. Write a commit message and PR description for these changes.

Slide 24

Slide 24

TIP #4 DON’T TRUST, VERIFY

Slide 25

Slide 25

TIPS FOR AGENTIC DEVELOPMENT DON’T TRUST, VERIFY ▸ Read and Understand. AI can be confidently wrong. Always read and understand the code it generates. ▸ Test Thoroughly. Treat AI-generated code as if you wrote it. Run unit tests and integration tests to ensure it works as expected. ▸ Check for Security. Be vigilant for security vulnerabilities. Don’t assume the code is secure. Test with security tools, e.g. snyk test

Slide 26

Slide 26

TIP #5 STAY IN CHARGE

Slide 27

Slide 27

TIPS FOR AGENTIC DEVELOPMENT STAY IN CHARGE Break this task down into logical steps. Between each step I’d like to review the code and make a commit so that the commit history is progressive and easily understandable. After each step provide a suggested git commit message and then wait for me to verify before you proceed to the next step.

Slide 28

Slide 28

TIP #6 CONTEXT IS KING

Slide 29

Slide 29

TIPS FOR AGENTIC DEVELOPMENT CONTEXT IS KING ▸ As you work with an agent it builds up context about your project and your task. ▸ This all informs the decisions made with each subsequent step. ▸ Context is hard earned and easily lost (e.g. if you restart your editor)

Slide 30

Slide 30

TIPS FOR AGENTIC DEVELOPMENT AGENTS.MD ▸ An AGENTS.md file is like a README.txt but for agents. ▸ Each project can have one or more AGENTS.md files. ▸ It’s supported by all major vendors.

Slide 31

Slide 31

TIPS FOR AGENTIC DEVELOPMENT AGENTS.MD ▸ It stores project overviews, build & test commands, code style guidelines, testing instructions, security considerations. ▸ Extra instructions like commit message or pull request guidelines, deployment guidelines, anything you’d tell a new team mate. ▸ Large monorepo? You can nest AGENTS.md files for each subproject with project-specific instructions.

Slide 32

Slide 32

TIPS FOR AGENTIC DEVELOPMENT AGENTS.MD Create an AGENTS.md file for this project. Add a note to the AGENTS.md file that it should be kept up to date with any changes to the project.

Slide 33

Slide 33

TIPS FOR AGENTIC DEVELOPMENT AGENTS.MD https://agents.md

Slide 34

Slide 34

THOSE WERE THE TIPS

Slide 35

Slide 35

THANKS! @drewm https://noti.st/drewm/Kbzn7w