Skip to content

th-7f1da8: Presence glow-up + CLI spec — branded help, ai explainer, --json conformance - #491

Merged
brentrager merged 2 commits into
mainfrom
th-cli-glow-up
Aug 20, 2026
Merged

th-7f1da8: Presence glow-up + CLI spec — branded help, ai explainer, --json conformance#491
brentrager merged 2 commits into
mainfrom
th-cli-glow-up

Conversation

@brentrager

Copy link
Copy Markdown
Contributor

The th --help wall of white text becomes a branded map, the interface contract gets codified and test-enforced, and every command grows an AI-ready explainer.

What changed

  • Branded top-level help: bare th --help renders the wordmark (teal→blue gradient, reserved per Presence) + 7 grouped sections with teal command literals and dimmed blurbs. A two-way sync test pins the curated groups to the clap tree — add a command without adding it to a section and CI fails. th --help-full keeps the native flat tree; all per-command help themed via clap styles (bold headers, teal literals). Pipe and NO_COLOR output verified escape-free.
  • The ai explainer: append ai to any command path — smoo org ai, th pearls ai, bare th ai — for generated markdown (about, subcommands incl. aliases, flags, curated examples, house conventions). Generated from the clap tree, so new commands appear automatically; only the examples table is curated.
  • docs/Engineering/CLI-Spec.md: the codified contract — noun-verb shape, standard verbs (list/show/create/update/rm/search), standard flags (--json on every read, --org-id/--org, --confirm for send/spend/destroy), output rules (empty = confirmed answer, truncation reported, two-line errors, results-on-stdout), Presence color rules, and the add-a-surface checklist.
  • Conformance test + backfill: spec_every_platform_list_has_json walks the smoo tree and fails on any list without --json. It found 19 violations, all backfilled — plus a real bug it flushed out: smoo api jobs list --org-id sent organization_id where the API wants organizationId, 400ing every filtered call.

Verification

760 tests green (sync test, ai-explainer resolution incl. aliases, conformance, parse tests per backfilled module), clippy 0 errors, TTY render captured via tmux, NO_COLOR/piped output byte-checked for escapes, three backfilled verbs live-smoked as valid JSON against the real org.

🤖 Generated with Claude Code

…--json conformance

Bare 'th --help' now renders a branded grouped map (wordmark gradient,
7 sections, teal literals, dimmed blurbs) with a two-way sync test
pinning it to the clap tree; --help-full keeps the native view and all
per-command help is themed via clap styles. Pipe/NO_COLOR = plain text.

Append 'ai' to any command path (smoo org ai, th ai) for a generated
markdown guide: about, subcommands, flags, curated examples, and the
house conventions — built for humans and AI agents, zero per-module
maintenance.

docs/Engineering/CLI-Spec.md codifies the interface contract (noun-verb,
standard verbs/flags, output rules, Presence color rules, preview-first
writes). New conformance test enforces --json on every platform list
verb — found 19 violations, all backfilled (lane w7), including a real
bug: jobs list sent organization_id where the API wants organizationId,
so the org filter always 400'd.

Gates: 760 tests green, clippy 0 errors, fmt clean. Rendered live on a
TTY (tmux capture) + verified NO_COLOR/piped output is escape-free.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@brentrager
brentrager enabled auto-merge (squash) August 20, 2026 17:09
@changeset-bot

changeset-bot Bot commented Aug 20, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 376bf66

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@smooai/smooth Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@brentrager
brentrager merged commit 8f09b67 into main Aug 20, 2026
3 checks passed
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