Pacemaker has three main types of options: environment variables (set in sysconfig or similar), cluster options (set in the CIB crm_config section), and object meta-attributes (set under the particular object or object defaults in the CIB).
The CIB manager, controller, and scheduler take a metadata command-line argument to output OCF-like metadata for the cluster options that they use. This has a couple problems: all have to be run to see all options, and options that are used by more than one daemon are in more than one set of metadata.
etc/sysconfig/pacemaker documents most but not all of the environment variables, and isn't available in a convenient OCF-like form from the command-line.
Pacemaker accepts meta-attributes for alert, primitive, group, clone, bundle, operation, rsc_defaults, and op_defaults. Pacemaker Explained documents most but not all of them, and again isn't available in a parseable form.
crm_attribute would be a reasonable place to put new command-line options for this, maybe --list-options, --list-environment, and --list-meta [context], or maybe a single --list-options [type] argument. They should support both text and XML output, with the XML being OCF-like.
As part of this, we will likely need some sort of internal API for these that the rest of the code must use to access options (rather than directly access them via getenv() etc.), so that we can guarantee we have one comprehensive list. This could replace or evolve from pcmk__cluster_option_t. It might even be worthwhile to keep the OCF-like metadata in XML files to be used as the definitive list, with the sysconfig file, ReST files for the books, and C and Python data files created from it automatically via make targets. Alternatively, we could install the XML files, and C and Python APIs could parse them.
Feel free to separate out subtasks for this