AI tools in the life cycle
Last updated
AI assistants now write code, tests, documentation and commit messages, and they're part of most developers' work. They can save time; they can also produce confident, plausible mistakes, and the studies of how much they help disagree. In this lesson you'll look at what the research actually found, review a pull request written with an AI assistant, and set the rules Pila's team will follow, including what must never be pasted into a chatbot.
By the end of this lesson you can
- Summarise what controlled studies have found about AI tools and developer speed, and their limits
- Review AI-written code for the mistakes it typically makes
- Protect personal data and secrets when using AI tools
Across the life cycle
AI assistants are used in every phase:
| Phase | Used for | Watch out for |
|---|---|---|
| Requirements | Drafting user stories from interview notes | Invented needs nobody said; notes containing personal data |
| Design | Suggesting options, explaining trade-offs | Confident answers that ignore your constraints |
| Build | Writing functions, explaining unfamiliar code | Subtle bugs, made-up libraries, insecure patterns |
| Test | Suggesting test cases | Tests that check what the code does, not what it should |
| Maintain | Summarising logs, drafting post-mortems | Pasting logs that hold personal data or secrets |
The pattern across all of them: the tool produces a first draft, and a person stays responsible for it.
What the studies found
How much faster do AI tools make developers? The careful studies disagree, partly because they measure different things:
- A controlled task (2023). Researchers gave developers one task: write a small web server in JavaScript. Those with GitHub Copilot finished about 56% faster than those without. One well-defined task, on a fresh codebase.
- Experienced developers in their own projects (2025). The research group METR ran a randomised trial with 16 experienced open-source developers working on real issues in large projects they knew well. With AI tools allowed, they took about 19% longer. Before starting, they expected AI to speed them up by about a quarter; afterwards, they still believed it had sped them up by about a fifth.
- Across many teams (2025). Google's DORA research found AI adoption linked with higher delivery throughput, but also with less stable delivery: more changes, and more that went wrong.
- Security (2025). A study at the USENIX Security Symposium generated over half a million code samples from 16 AI models, and found that about one in five of the packages they recommended didn't exist. Attackers can register those names with harmful code.
Review an AI-written pull request
Marco used an AI assistant to write the first version of the vaccination reminders. Review it as carefully as any pull request; more carefully, because AI-written code looks tidy whether or not it's right. Click the lines with problems.
Pull request · Marco wants to merge into main
Add vaccination reminders
First version of the reminders, written with an AI assistant. All tests pass.
Read the change. Click any line you would comment on, then press Finish review.
The team’s rules
Bea writes down how Pila's team uses AI tools:
- You own what you commit. If you can't explain a line, it doesn't go in.
- Same review, same tests. AI-written code goes through the same pull requests and CI as any other.
- Check every new dependency exists, is the right one, and is maintained.
- No personal data, no secrets in prompts: no patient names, phone numbers, health details, logs that contain them, or keys. Use made-up examples.
- Use only tools the barangay has approved, whose terms say how prompts are stored and used.
- Say when AI helped, in the pull request, so reviewers know to look closely.
Spot the trap: patient records in a chatbot
A bug only happens with some patients’ records. Jun copies 200 rows from the production database, with names, phone numbers and vaccines, into a free AI chatbot: “Why does Pila crash on these?”
What happens if…
Check what you learned
Sources
Every claim on this page comes from these sources: the standard, the founding text of a method, a study, or the official record of a project, from the body that publishes it. Industry reports are labelled as such.
- Peng and others: The Impact of AI on Developer Productivity: Evidence from GitHub Copilot (2023): a controlled experiment on one programming task
- METR: Measuring the Impact of Early-2025 AI on Experienced Open-Source Developer Productivity: a randomised trial in developers’ own projects; the paper is arXiv 2507.09089
- Spracklen and others: We Have a Package for You! (USENIX Security 2025): package hallucinations in AI-generated code
- DORA: State of AI-assisted Software Development 2025: AI adoption, delivery speed and stability across many teams
- National Privacy Commission: Data Privacy Act of 2012: personal data shared with outside services