Prompt Engineering in Practice · Prompts for code
Refactoring and documentation
Prompts for code
Introduction
Use an LLM to refactor safely (behaviour preserved, tests green, API frozen) and to produce documentation that is actually maintained: docstrings, READMEs, ADRs, changelogs and onboarding guides.