Self-Documenting System

Ze is self-documenting: every plugin, environment variable, RPC, event type, and CLI command is registered at startup and discoverable at runtime. Nothing exists unregistered -- the system enforces this with compile-time registration (init()) and runtime abort on unregistered access (env.MustRegister()).

Runtime Introspection

Command What it shows
ze schema list All registered YANG modules (65 modules)
ze schema show <module> Full YANG content for a module
ze schema methods [module] All RPCs with parameters from YANG
ze schema events All notification/event types from YANG
ze schema handlers Which handler serves which YANG module
ze schema protocol Protocol version and wire format info
ze env list All registered environment variables with types and defaults
ze env list -v Same, plus current values
ze env get <key> Details for a single environment variable
ze --plugins All registered plugins with families, capabilities, dependencies
ze help command [filter] Full command catalog, filterable, with descriptions
ze help command --json Command catalog as JSON (for wiki generation, tooling)
ze help ai Machine-readable command reference generated from live binary
ze help ai api Daemon API endpoints (ze-show:*, ze-set:*, ...) with parameters

Build-Time Verification

Make target What it does
make ze-inventory Full project inventory: plugins, YANG modules, RPCs, families, tests, packages
make ze-inventory-json Same as above, machine-readable JSON
make ze-command-list Every CLI command with wire method, help text, read-only flag, source
make ze-validate-commands Cross-check YANG command tree against registered handlers
make ze-doc-drift Detect documentation that no longer matches code

Design Principle

The self-documenting property emerges from the registration architecture:

The result: adding a plugin with a YANG schema automatically updates the CLI, web UI, tab completion, schema discovery, inventory, and environment variable listing. No manual wiring.

No other open-source BGP daemon provides runtime introspection of its own capabilities.