Input or output support?
The base flow is: Input format -> intermediate (epub) format -> Output format. An input plugin takes the input format and converts it to html/CSS. The output format takes html/CSS and turns it into the output format.
TXT is a bit complex (lots of options) but it's a good one to look at for general flow. Mainly because it is a non-html format on both ends.
You'll probably end up subclassing a lot of the epub code since you really just need to translate the non-epub tags to something similar for input. You may or may not need to write an output plugin depending on how difficult it is to find patterns in an epub to turn into the kepub.