Skip to content
mentoor

Maintainability of AI-written code

For engineers

Keeping AI-written code easy to change: duplication, dead code, over-engineering, codebase consistency and safe cleanup

See where you stand

110 questions across four stages: Understand, Apply, Solve and Judge.

Try 5 questions

Practice items, not counted towards your mastery. No account needed.

Check yourself · 1 of 5

An agent adds a new function that formats prices. What is the best first review step?

Choose one answer

Check yourself · 2 of 5

In a diff you find a helper function that nothing calls. What is the usual right call?

Choose one answer

Check yourself · 3 of 5

An agent adds an interface, a factory and a config object to send one email. What is the best question to ask?

Choose one answer

Check yourself · 4 of 5

An agent uses a different HTTP library than the rest of your project. Which fix lasts longest?

Choose one answer

Check yourself · 5 of 5

A docstring says a function returns None when the id is missing, but the code raises an error. What is the first thing to decide?

Choose one answer

Topics

  1. Duplicated logic from generated code4 min read · Agents re-implement helpers that already exist; finding the copies and pointing the agent at shared code
  2. Dead code and leftover scaffolding4 min read · Unused functions, unreachable branches, debug logs, TODO stubs and fallback paths that never run
  3. Over-engineering and needless abstraction4 min read · Factories, config layers, defensive checks and wrappers nobody asked for, and how to ask for the simplest version
  4. Consistency with codebase conventions5 min read · Naming, error handling, layering and library choices that drift from the codebase, and the memory files and lint rules that prevent it
  5. Misleading comments and stale docstrings4 min read · Comments that narrate the obvious, describe an earlier version of the code, or promise behaviour the code lacks
  6. Refactoring AI code safely5 min read · Characterization tests first, small behaviour-preserving steps, and letting an agent refactor under a test harness

Start here

Helps to know first

110 questions · last verified 2026-12