In order to add the debug commands as you have described, you can refer to the following sections of the ConfD 6.2 User Guide regarding how to add CLI commands:
Chapter 16.21.2: Adding new commands
Chapter 16.24: User defined commands in C using C-API
Chapter 16.25: User defined commands as shell scripts
In addition, you can also refer to the cli_command and c_cli examples in the cli folder of the examples.confd directory that is available in the ConfD Premium release.