File: hooks/ponytail-mode-tracker.js
Lines: 17-32
Bug: When a user invokes /ponytail:review (colon syntax), the command string is parsed as a single token with no space, so arg is empty. The code checks conditions like cmd === '/ponytail-review' but never checks for /ponytail:review. As a result, the command falls through to getDefaultMode() instead of activating review mode.
Root cause: The regex /^[/@$]ponytail/ and the subsequent split(/\s+/) only handles space-delimited arguments. Colon-delimited subcommands (e.g., /ponytail:review, /ponytail:ponytail) are treated as a single command string with no argument.
Trace for /ponytail:review:
prompt.split(/\s+/) → ['/ponytail:review'\]
parts[0] = /ponytail:review, arg = '' (empty, no second token)
- Line 24:
cmd === '/ponytail-review' → false, cmd === '/ponytail:ponytail-review' → false
- Line 26:
cmd === '/ponytail' → false (cmd is /ponytail:review)
- Falls through to
getDefaultMode() — WRONG, user wanted review mode
Impact: Users invoking Ponytail with colon syntax get silently wrong behavior instead of an error or correct mode activation.
Reproduction:
# In Claude Code:
/ponytail:review # Should activate review mode, but falls through to default
File:
hooks/ponytail-mode-tracker.jsLines: 17-32
Bug: When a user invokes
/ponytail:review(colon syntax), the command string is parsed as a single token with no space, soargis empty. The code checks conditions likecmd === '/ponytail-review'but never checks for/ponytail:review. As a result, the command falls through togetDefaultMode()instead of activating review mode.Root cause: The regex
/^[/@$]ponytail/and the subsequentsplit(/\s+/)only handles space-delimited arguments. Colon-delimited subcommands (e.g.,/ponytail:review,/ponytail:ponytail) are treated as a single command string with no argument.Trace for
/ponytail:review:prompt.split(/\s+/)→['/ponytail:review'\]parts[0]=/ponytail:review,arg=''(empty, no second token)cmd === '/ponytail-review'→ false,cmd === '/ponytail:ponytail-review'→ falsecmd === '/ponytail'→ false (cmd is/ponytail:review)getDefaultMode()— WRONG, user wanted review modeImpact: Users invoking Ponytail with colon syntax get silently wrong behavior instead of an error or correct mode activation.
Reproduction: