Skip to content

✨ Annotate commands with version metadata#21

Merged
bdsoha merged 1 commit into
mainfrom
feature/ws-cli-command-annotations
Jul 2, 2026
Merged

✨ Annotate commands with version metadata#21
bdsoha merged 1 commit into
mainfrom
feature/ws-cli-command-annotations

Conversation

@bdsoha

@bdsoha bdsoha commented Jul 2, 2026

Copy link
Copy Markdown
Member

Bring ws-cli commands to per-item version-annotation parity with env vars, so the ws-docs command reference renders "Since v…" / "Deprecated v…" badges per command — now that ws-cli is versionless (q3-2) and commands are versioned by the workspace release.

Changes

  • internals/docs/serialize.go — add a Deprecated field beside Since (both from cobra Annotations, omitempty); blank Since when Deprecated is set so commands.yaml carries a single version marker (deprecated supersedes since at the data level).
  • cmd/**/*.go — backfill a since annotation on every command (no cobra inheritance, leaves included): released groups floor to 0.2.0; the unreleased seed and editor groups use next, which the workspace release codemod resolves to the cut version.
  • commands.yaml — regenerated via tools/gen-commands.
  • Tests — serialize since/deprecated/supersede matrix; TestEveryCommandCarriesVersion guard (every command carries since or deprecated, walked over the emitted tree) so a future command added without an annotation fails CI.

Notes

  • Additive metadata only — no command names, flags, or show env --check surface touched.
  • Companion ws-docs render change (deprecated badge in generate-commands.mjs) lands separately; the badge is dormant until a real deprecation + distribution.

Add a Deprecated field to the docs serializer beside Since (both from cobra
Annotations, omitempty) and backfill a since annotation on every command so
ws-docs renders per-command version badges, matching env vars. Released groups
floor to 0.2.0; the unreleased seed and editor groups use next, which the
workspace release codemod resolves to the cut version. Regenerate commands.yaml
and add a guard test asserting every command carries a since annotation.
@bdsoha bdsoha merged commit ca02aac into main Jul 2, 2026
3 checks passed
@bdsoha bdsoha deleted the feature/ws-cli-command-annotations branch July 2, 2026 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant