Skip to content

[Bug]: Built-in debug-keys command is unreachable due to legacy-like classifier #340

@ben-ranford

Description

@ben-ranford

Bug Description

The built-in first-class command debug-keys is unreachable because the legacy-like syntax classifier rejects any hyphenated top-level token before command routing.

Steps to Reproduce

  1. Run ggc debug-keys
  2. Observe output:
    • Error: legacy-like syntax is not supported.
    • Use unified subcommands. See: ggc help <command>

Expected Behavior

debug-keys should execute normally (or show its command help), because it is a registered first-class command.

Screenshots

N/A

Environment

  • OS: Darwin 25.2.0
  • Go Version: go1.25.7 darwin/arm64
  • ggc Version: v1.0.0
  • git Version (run git --version): 2.39.5 (Apple Git-154)

Additional Context

debug-keys is registered in the command registry, but isLegacyLike() currently classifies any hyphenated top-level command as legacy syntax and exits before router dispatch.

Relevant locations:

  • cmd/cmd.go (legacy-like detection)
  • cmd/command/registry.go (debug-keys registration)

closes #339

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions