Quality, safety and people · lesson 6 of 8
Ideas in this lesson
AAI assistanta tool that suggests code or text from a prompt
BHallucinated packagea suggested library that doesn’t exist, or isn’t what it seems

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:

AI tools in Pila’s life cycle
PhaseUsed forWatch out for
RequirementsDrafting user stories from interview notesInvented needs nobody said; notes containing personal data
DesignSuggesting options, explaining trade-offsConfident answers that ignore your constraints
BuildWriting functions, explaining unfamiliar codeSubtle bugs, made-up libraries, insecure patterns
TestSuggesting test casesTests that check what the code does, not what it should
MaintainSummarising logs, drafting post-mortemsPasting 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.
What is the most careful conclusion from these studies?

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.

pila/reminders.py
tests/test_reminders.py

The team’s rules

Bea writes down how Pila's team uses AI tools:

  1. You own what you commit. If you can't explain a line, it doesn't go in.
  2. Same review, same tests. AI-written code goes through the same pull requests and CI as any other.
  3. Check every new dependency exists, is the right one, and is maintained.
  4. No personal data, no secrets in prompts: no patient names, phone numbers, health details, logs that contain them, or keys. Use made-up examples.
  5. Use only tools the barangay has approved, whose terms say how prompts are stored and used.
  6. Say when AI helped, in the pull request, so reviewers know to look closely.
Why does rule 4 matter especially for Pila?

Spot the trap: patient records in a chatbot

Spot the trapJun

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

What did METR’s 2025 trial find about experienced developers in their own projects?
An AI assistant suggests importing a package you’ve never heard of. What should you do?
Who is responsible for AI-written code that’s committed to Pila?

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.

All sources for Simple Software Development