Unify resource commands under singular nouns - #276
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Unifies six resource command families under canonical singular noun-first routes while preserving compatibility forms.
Changes:
- Adds canonical
listandviewsubcommands with independent flag state. - Updates help, catalog metadata, documentation, and breadcrumbs.
- Adds unit and smoke parity coverage for canonical and compatibility routes.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
Reviewed changes
Copilot reviewed 31 out of 31 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
.surface |
Records additive command routes and flags. |
AGENTS.md |
Updates canonical box guidance. |
API-COVERAGE.md |
Maps endpoints to canonical commands. |
README.md |
Documents noun-first command families. |
docs/omarchy.md |
Updates plugin command examples. |
skills/hey/SKILL.md |
Updates agent triggers and guidance. |
internal/cmd/box.go |
Adds box list and box view. |
internal/cmd/boxes.go |
Builds canonical and compatibility listings. |
internal/cmd/bulk_reply.go |
Updates posting-ID guidance. |
internal/cmd/canonical_commands_test.go |
Tests routing, parity, metadata, and discovery. |
internal/cmd/clip.go |
Adds clip list. |
internal/cmd/collection.go |
Adds collection list and view. |
internal/cmd/commands.go |
Adds compatibility metadata and nested catalog output. |
internal/cmd/help.go |
Promotes canonical families in root help. |
internal/cmd/help_test.go |
Updates the root-help snapshot. |
internal/cmd/ignore.go |
Updates canonical box guidance. |
internal/cmd/label.go |
Adds label list and view. |
internal/cmd/move.go |
Updates canonical box guidance. |
internal/cmd/postings_listing.go |
Updates command references. |
internal/cmd/root.go |
Exposes compatibility metadata in agent help. |
internal/cmd/seen.go |
Updates seen/unseen guidance. |
internal/cmd/setup.go |
Promotes canonical setup examples. |
internal/cmd/setup_test.go |
Updates setup-output expectations. |
internal/cmd/share.go |
Updates topic-ID guidance. |
internal/cmd/snippet.go |
Adds snippet list. |
internal/cmd/spam.go |
Updates canonical box guidance. |
internal/cmd/stop_ignoring.go |
Updates canonical box guidance. |
internal/cmd/trash.go |
Updates canonical box guidance. |
internal/cmd/watch.go |
Updates recovery guidance. |
internal/cmd/workflow.go |
Adds workflow list and view. |
tests/smoke/canonical_commands_test.go |
Adds real-server parity coverage. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Give each HEY resource one predictable noun-first command family so people and agents can discover
list,view, and mutations the way they do ingh. Every existing plural listing and direct detail invocation remains executable; primary help, examples, breadcrumbs, and agent guidance promote only the canonical forms.Review readiness: ✅ Yes
Risk: 🟡 Medium — routing and discovery change across six public command families, with explicit compatibility paths and parity coverage preserving existing scripts.
Decision: None
✅ Change — six split command pairs now read as single noun-first families
Before
After
The same operation factories create independent Cobra commands and flag state for canonical and compatibility routes.
list/viewstay leaf-local, so mutation commands do not inherit unrelated paging flags.✅ Compatibility — old invocations remain executable and are identified, not promoted
boxes,labels,collections,workflows,clips, andsnippetsstill run and carrycompatibility_forinhey commands --json.box <name|id>,label <id>,collection <id>, andworkflow <id>still run and carrycompatibility_usageon their canonical family.--agent --helpshow only canonical families; invoking a family without an action shows its complete canonical command help.hey commands --stylednow lists the complete nested catalog and labels compatibility forms.box view listaddresses a box namedlist;box -- listpreserves the direct-form escape whilebox listremains the reserved action..surfaceonly adds commands and flags; it removes none.✅ Evidence — focused parity, full checks, race coverage, and real Haystack verification pass
GOWORK=off make checkGOWORK=off make race-testGOWORK=off go test -race -count=1 ./internal/cmdafter final review fixesGOWORK=off make coverage— 82.7%, above the 70.8% floorGOWORK=off make test-e2e— 177 checksgovulncheck ./...— no called vulnerabilitiesgitleaks detect --source . --verbose --redact— no leaksbox list/box view, and compatibility metadata.The full strict smoke suite also reached and passed the new matrix. Its unrelated shared-dev failures were attachment/contact/search 500s, cookie-only auth-token expectations, a missing seen-posting fixture, and dev-version detection; none touch the command routing changed here.
✅ Scope — CLI routing and guidance change; APIs, mutations, and the TUI remain unchanged
Included: command factories for six resources, root and agent help, complete command-catalog presentation and metadata, breadcrumbs/setup/watch guidance, README/API/Omarchy/agent-skill documentation, additive surface entries, unit parity tests, and real-server smoke parity.
Preserved: SDK calls, request and response shapes, output formats, account behavior, mutation semantics, existing scripts, plural/direct invocations, and TUI behavior.
Non-goals: removing compatibility forms, adding clip/snippet detail endpoints that the SDK does not expose, or changing unrelated command families.
➖ Delivery — no migration, configuration, deployment ordering, or cleanup
The additive command tree ships in the CLI binary. Rollback is a normal code revert; no data or external resources are involved.
✅ Review decision — no unresolved decision; focus on routing parity and discovery boundaries
Please confirm that the factory split keeps canonical and compatibility flag state independent, and that
hey commandsgives agents complete compatibility metadata without putting old forms back into primary help.✅ Review path — command construction first, then compatibility proof and guidance
internal/cmd/label.goandinternal/cmd/box.go— representative list/view factories and reserved-name routing.internal/cmd/canonical_commands_test.go— API/envelope parity, independent flags, box-name escape, catalog, and agent-help assertions.internal/cmd/commands.goandinternal/cmd/help.go— canonical discovery and compatibility metadata.tests/smoke/canonical_commands_test.go— real-Haystack canonical/compatibility parity.README.md,skills/hey/SKILL.md,API-COVERAGE.md, anddocs/omarchy.md— user, agent, API, and integration guidance..surfacerecords additive routes andinternal/cmd/help_test.gopins canonical-only root presentation.Origin and supporting links: Basecamp card
Summary by cubic
Unifies resource commands under singular, noun‑first families and promotes
list/view, and now shows curated family help when no action is given. Previously, listings used plurals and details were invoked directly; nowbox,label,collection,workflow,clip, andsnippetare canonical, and running a family with no args prints itslist/viewhelp instead of an error.hey commands --json|--styledinclude compatibility metadata viacompatibility_forandcompatibility_usage, and help hides compatibility usage.boxreserveslistandview; address a box named “list” withhey box view listor escape viahey box -- list.list/viewkeep pagination flags leaf‑local so mutations do not inherit them..surface); APIs, mutations, output formats, and the TUI are unchanged; no migration required.Written for commit df24dc8. Summary will update on new commits.