Kohana::find_file(). One function, maybe forty lines. If I could keep only one thing from Kohana, this is the one.
It looks for every file in order: application/, then modules, then system/. First found wins. Config, views, classes, i18n, everything goes through the same lookup.
In practice: a module ships a config file, you put a file with the same name into application/config/, change one key. The module does not know. Nothing under modules/ is touched.
Classes work the same way through transparent extension. Real code lives in Kohana_Encrypt, and Encrypt next to it is an empty stub. You put your own Encrypt extends Kohana_Encrypt into application, override one method, and the whole framework picks it up. No fork. No patch in vendor. Upgrade is a git pull in the submodule.
Compare with the usual way: fork the module, patch it, never update it again. I did this. Twice. One of those forks still runs somewhere.
The dark side. An override is invisible. A colleague opens the module, reads it, debugs it for an hour, and the real behavior sits in application/classes where nobody looked. I lost that hour myself last month. On my own override from spring.
So we have a rule now. Every override goes into a small OVERRIDES.md in the project root. One line per file, with the reason. Boring. It works.
HMVC gets the conference talks. The filesystem does the work.