Problem
base_cli.__all__ exports two symbols with no user-facing documentation anywhere in the repository:
inspection_envelope — creates a structured JSON envelope for read-only inspection commands
render_inspection_json — renders that envelope to stdout
These are backed by lib/python/base_cli/inspection.py. The inspection schema (schema_version / command / status / data / error) is distinct from the success/error envelopes documented in docs/json-contracts.md.
docs/api-stability.md states:
The supported Python facade is import base_cli. The names in base_cli.__all__ are the public facade; documented names in the explicitly exported modules are public as well.
The key word is documented. These two symbols are in __all__ and therefore carry a stability commitment, but they have no documentation — not in json-contracts.md, not in output-contracts.md, not in the README, not in any doc file. This directly contradicts the stability contract.
Concrete impact
A consumer who discovers inspection_envelope from IDE autocomplete or dir(base_cli) has no way to know:
- What an "inspection command" is vs. a regular command
- What the envelope schema looks like
- When to use it vs.
success_envelope / error_envelope
- What version guarantees apply to the schema
Fix
Add a dedicated section to docs/json-contracts.md documenting:
- What an inspection command is (read-only, state-querying, idempotent)
- The envelope schema with a concrete example
- When to use
inspection_envelope vs. success_envelope
- The
schema_version value and stability guarantee
If these symbols are not yet ready for a stability commitment, move them to base_cli.experimental and remove from __all__ until they are documented.
Problem
base_cli.__all__exports two symbols with no user-facing documentation anywhere in the repository:inspection_envelope— creates a structured JSON envelope for read-only inspection commandsrender_inspection_json— renders that envelope to stdoutThese are backed by
lib/python/base_cli/inspection.py. The inspection schema (schema_version/command/status/data/error) is distinct from the success/error envelopes documented indocs/json-contracts.md.docs/api-stability.mdstates:The key word is documented. These two symbols are in
__all__and therefore carry a stability commitment, but they have no documentation — not injson-contracts.md, not inoutput-contracts.md, not in the README, not in any doc file. This directly contradicts the stability contract.Concrete impact
A consumer who discovers
inspection_envelopefrom IDE autocomplete ordir(base_cli)has no way to know:success_envelope/error_envelopeFix
Add a dedicated section to
docs/json-contracts.mddocumenting:inspection_envelopevs.success_envelopeschema_versionvalue and stability guaranteeIf these symbols are not yet ready for a stability commitment, move them to
base_cli.experimentaland remove from__all__until they are documented.