[Bug]: Cline extension and preset commands have `speckit.*.md` file names rewritten to `speckit-*-md`

Ouverte Adaptée aux débutants
#5,097 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@kevin9327 y travaille déjà.

Depuis le 28/10/2026.

  • #5168 par @kevin9327 — ouverte

Évaluation

Difficulté
2/5
Temps estimé
1-3 heures
Accessibilité débutants
82/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
python
Domaine
cli

Piste de recherche

Commence par CommandRegistrar._hyphenate_body_refs et _hyphenate_frontmatter_refs dans src/specify_cli/agents.py, puis examine comment les commandes d’extension sont enregistrées aux lignes indiquées. Reproduis l’exemple avec le chemin de commande et la commande slash, et cherche des tests associés couvrant la réécriture des références Cline. Le travail est terminé lorsque les références aux commandes sont converties en mots séparés par des traits d’union, tandis que les noms de fichiers conservent leur extension .md ; ajoute ou mets à jour des tests ciblés pour les deux cas.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

triage-can-wait
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.

Langage dominant
Python
Étoiles
144k
Forks
12.9k
Merge moyen
1 j 4 h
PR mergées (30 j)
181

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de github/spec-kit

Toutes les issues de github/spec-kit

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.