Skip to main content

Legacy Code Addition Techniques

Add new functionality to untested legacy code using Sprout Method, Sprout Class, Wrap Method, or Wrap Class — whichever best fits the dependency profile. Use whenever a developer needs to add a feature, log statement, validation, or any new behavior to legacy code that they can't easily test — 'I have to add this feature fast', 'no time for a big refactor', 'just need to log this', 'add a check to existing method', 'need to add behavior without breaking legacy', 'sprout method', 'sprout class', 'wrap method', 'wrap class', 'decorator for legacy'. Activates for 'quick change to legacy', 'under time pressure', 'can't test this class but need to add a feature', 'extend without editing'.

Install

1. Add marketplace
/plugin marketplace add bookforge-ai/bookforge-skills
2. Install plugin
/plugin install working-effectively-with-legacy-code@bookforge-skills
3. Use the skill
/legacy-code-addition-techniques
CC-BY-SA · Open sourceGitHub

What You'll Need

ReadEditBashGrep (optional)

Source Book

Working Effectively with Legacy Code cover

Working Effectively with Legacy Code

Michael C. Feathers