You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
gen-docs: mark which commands and flags are "basic", for the portal's CLI⇄GUI parity gate #1574
Why: the rebuilt portal (#683, PR #690) has a CLI⇄GUI parity gate.
web/portal/parity/cli-gui-matrix.json maps each basic CLI command and flag to its GUI controls.
The gate checks every row's command and flags against the generated reference in docs/gen/spawn/.
What it can't check is which commands are basic. That list is the matrix itself, so deleting a row, or adding a new basic command here, goes unnoticed. The owner wants the parity to hold both ways.
Ask: make cmd/gendocs.go emit a machine-readable disclosure level for every command and flag.
Source the level from a cobra annotation on the command or flag, e.g. Annotations[\"spore.host/level\"] = \"basic\", with advanced as the default when unannotated.
Emit it as a sidecar docs/gen/spawn/_levels.json: {command: {level, flags: {flag: level}}}. This keeps the markdown unchanged.
Add a test that fails when a command is added with no explicit level, so it's a deliberate choice.
Proposed sidecar format, coordinated across all three CLIs: lagotto ships it first in spore-host/lagotto#311 (lagotto#297). Please use the same shape here, so one portal gate can read all three.
Keys are full command paths, as the matrix's cli field spells them. Keys that start with $ are metadata.
The root entry (the bare CLI name) carries the persistent/global flags, the same set as _global-flags.md.
Every other entry lists its non-hidden local flags, the same set its markdown table shows. An empty flags is {}.
Keys are sorted and the output is pretty-printed.
Source: the cobra annotation spore.host/level, on Command.Annotations or on a flag via Flags().SetAnnotation. An unannotated flag is advanced. Every command must be annotated (a test enforces it).
Errors:gen-docs fails on an unknown level, and on a basic flag under an advanced command.
Implementation: lagotto's generator (cmd/levels.go) mirrors libs/docgen's walk and is self-contained. It can move into libs/docgen once spawn and truffle agree on the format.
Activity
scttfrdmn commentedon Nov 13, 2026
Proposed sidecar format, coordinated across all three CLIs: lagotto ships it first in spore-host/lagotto#311 (lagotto#297). Please use the same shape here, so one portal gate can read all three.
docs-gen/_levels.json, which syncs todocs/gen/<cli>/_levels.json. The sync currently drops non-.mdfiles; Nothing tracks deployed Lambda runtime versions: two are already stale (provided.al2, python3.11) and a runtime reaching EOL would be silent #716 tracks that.{"$format": "spore.host/cli-levels/v1", "<cli> <command path>": {"level": "basic"|"advanced", "flags": {"--flag": "basic"|"advanced"}}}clifield spells them. Keys that start with$are metadata._global-flags.md.flagsis{}.spore.host/level, onCommand.Annotationsor on a flag viaFlags().SetAnnotation. An unannotated flag is advanced. Every command must be annotated (a test enforces it).gen-docsfails on an unknown level, and on a basic flag under an advanced command.cmd/levels.go) mirrorslibs/docgen's walk and is self-contained. It can move intolibs/docgenonce spawn and truffle agree on the format.