I would take a look at CommandRegistry ( CommandsRegistry - Nova) to register a command that can be then bound to the command palette and menu items. From there, you will probably need a combination of the Range, Scanner, Text Document, TextEdit, and/or TextEditor sections of the API.
Here you will find some information about defining a command, including shortcuts and any filters you wish to apply to the command (Commands - Nova).
I wrote an extension that does some of the stuff you’re looking for. It uses hotkeys to insert a line before or after the current line, without the additional character insertion you want.
Please feel free to use it as the basis for what you’re doing. I’m open to contributions if you think there’s a way to add your features to my extension in a non-breaking way.