As largely expected, starting with ODI 12.2.1.2.6, Oracle suggests that newly developed Knowledge Modules should be component-style KMs:
Component KM is a new, improved style of KM development, which is applicable to IKMs, LKMs, XKMs. KMs for mappings have two different types of implementation styles: The legacy 11g-style and component-style. 11g-style KMs are designed to use the monolithic odiRef substitution API object and syntax in their template commands. Component-style KMs are designed to use the newer object-oriented substitution API objects and newer template flow control syntax in their template commands. Both styles of KM can be seen in the project and global KM tree, as IKMs, LKMs, and CKMs with a predefined set of component-style KMs called XKMs. All new LKMs, IKMs, and XKMs should be designed and coded using the new component KM style. Component KMs are new since ODI 12c and are first exposed in the ODI Studio from 12.2.1.2.1 release. A component KM has the same functionality as any other KM, which includes tasks and options.
Follow the link below to see how you can create a new component KM:
Injecting WHERE conditions using XKM