[Bug]: Cline extension and preset commands have `speckit.*.md` file names rewritten to `speckit-*-md`
维护者通常 1 天内回复
评估
调研方向
从 src/specify_cli/agents.py 中的 CommandRegistrar._hyphenate_body_refs 和 _hyphenate_frontmatter_refs 入手,然后检查扩展命令在所引用行中的注册方式。使用命令路径和斜杠命令重现示例,并检查是否有覆盖 Cline 引用重写的相关测试。当命令引用被转换为连字符形式,而文件名保留 .md 扩展名时,即为完成;为这两种情况添加或更新有针对性的测试。
由索引模型根据 Issue 内容生成。
描述
Bug Description
When an extension or preset command is registered for Cline (src/specify_cli/agents.py:718, 831-833), the command body goes through CommandRegistrar._hyphenate_body_refs (agents.py:114-120). This replaces every dot in any speckit.<a>.<b>... token with a hyphen, so that command references match Cline's hyphenated file names. The regex also matches file names, so a path such as speckit.git.commit.md becomes speckit-git-commit-md, which names no file. The frontmatter goes through the same rewrite in _hyphenate_frontmatter_refs (agents.py:96-111).
The expectation here is inferred rather than documented. The bundled extensions name their command files speckit.<ext>.<cmd>.md (extensions/git/extension.yml:21-33). The extension development guide refers to files by those names (extensions/EXTENSION-DEVELOPMENT-GUIDE.md:306-308). The method's docstring describes its purpose as hyphenating "dotted speckit references". I could not find a doc or test that says file names should be rewritten too.
Steps to Reproduce
From a fresh clone, after uv sync, save the script below and run uv run python -I repro.py from the repository root.
from specify_cli.agents import CommandRegistrar
body = "Edit `.specify/extensions/git/commands/speckit.git.commit.md`, then run /speckit.git.commit."
print("in :", body)
print("out:", CommandRegistrar._hyphenate_body_refs(body))
Expected Behavior
The command reference /speckit.git.commit should become /speckit-git-commit, and the file name speckit.git.commit.md should be left alone (or at least keep its .md extension). This is inferred from the file naming in extensions/git/extension.yml:21-33 and extensions/EXTENSION-DEVELOPMENT-GUIDE.md:306-308, as described above.
Actual Behavior
in : Edit `.specify/extensions/git/commands/speckit.git.commit.md`, then run /speckit.git.commit.
out: Edit `.specify/extensions/git/commands/speckit-git-commit-md`, then run /speckit-git-commit.
Specify CLI Version
1.2.4.dev0 (main at 27d14e2)
AI Agent
Cline
Operating System
Linux 6.18 (Ubuntu container)
Python Version
Python 3.12.3
Additional Context
This only affects Cline, and only command bodies (from extensions or presets) that mention spec-kit command file names.
Also reproduced on macOS (Darwin 25.6, arm64) with Python 3.14.4 and uv run python -I repro.py against 27d14e2; the output matches the above.
AI Disclosure
Found and reproduced with Claude Code (model: Claude Opus 4.8), run autonomously under human supervision. The human reporter re-ran every reproduction above before filing.
- 主要语言
- Python
- 星标
- 144k
- 派生
- 12.9k
- 平均合并
- 1 天 4 小时
- 30 天内合并 PR
- 181
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
github/spec-kit 的其他 Issue
-
bundle catalog add rewrites Windows drive paths as POSIX paths可能已有人在做 @chelsealong 于 2 天前认领。 未关闭triage-must-have
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
The Python branch-creation port accepts an oversized `--number` and crashes at `int()` instead of rejecting it可能已有人在做 @github-actions 于 3 天前认领。 未关闭bug-assess bug-fix fix-proposed severity-low triage-can-wait
难度 2/5 1-3 小时 新手友好度 84/100
github/spec-kit#5194 · 3 条评论 ·
维护者通常 1 天内回复
-
[Bug]: `create-new-feature.sh` rejects the feature descriptions `-n`, `-e` and `-E`, which the Python script accepts可能已有人在做 @WOLIKIMCHENG 于 7 天前认领。 未关闭triage-can-wait
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复
-
[Bug]: `bundle init <bundle>` initialises with the default integration instead of the bundle's, then aborts with a clash可能已有人在做 @chelsealong 于 9 天前认领。 未关闭triage-must-have
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
[Bug]: `specify preset set-priority` does not update agent command files that are already written可能已有人在做 @mikamikasuki 于 9 天前认领。 未关闭triage-must-have
难度 2/5 1-3 小时 新手友好度 77/100
维护者通常 1 天内回复
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
enhancement good first issue
难度 2/5 1-3 小时 新手友好度 78/100
elviskahoro/sdk-python-attio#144 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
RenyiELBO raises TypeError when model has no sample sites可能已有人在做 @alibb007 今天认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
维护者通常 1 天内回复