devtool/recipetool support an extension mechanism, but currently this can only work within the default location in OE-Core or whatever takes its place. It would be nice if it were possible to extend it via the layer mechanism - we did this for the automated runtime test framework for example. We would need to ensure we could practically search for plugins at the right time without taking too long - you need to know the search path before you show the help text in response to --help for example, but in order to find the search path across all layers you'd need to use tinfoil to parse the configuration.
This is partially implemented (only for recipetool but not devtool at the moment) in patches on the oe-core list, but does not have unit tests in oe-selftest yet. We'll need to confirm that this implementation handles the performance appropriately per this bug description (I wrote the patch before seeing this bug), and see if we want to try to shift any of it into a common module or leave it implemented independently in both tools.
A related suggestion: I don't know if oe-selftest supports loading tests from external locations, either explicitly or via BBPATH, but it'd be nice to add that capability if not, so unit tests can be created for the new sub-commands which live outside the core.
About to submit a patch series for this which also adds the bits to oe-selftest to pull tests from layers.
Sent to the oe-core list.
This was merged to oe-core.
I wrote a test case for devtool to exercise this: 2015-10-12 13:01:37 - test_devtool_layer_plugins (oeqa.selftest.devtool.DevtoolTests) Test that devtool can use plugins from other layers. ... ok (patches on the list)
Patches sent by Ross: http://patchwork.openembedded.org/patch/105155/ http://patchwork.openembedded.org/patch/105157/