microsoft / microsoft/amplifier
[tool-slash-command] Git URL with #subdirectory= fragment not parsed correctly
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.1k
- Forks
- 261
- Avg merge
- 3h 28m
- Merged PRs (30d)
- 13
Description
Summary
The tool-slash-command module does not correctly parse git URLs that include a #subdirectory= fragment in the config.commands list.
Reproduction
In a bundle's behavior YAML:
tools:
- module: tool-slash-command
source: git+https://github.com/microsoft/amplifier-module-tool-slash-command@main
config:
commands:
- git+https://github.com/microsoft/amplifier-bundle-issues@main#subdirectory=commands
Expected Behavior
The module should:
1 Parse git+https://github.com/microsoft/amplifier-bundle-issues@main as the repo URL
2 Extract commands from the #subdirectory= fragment
3 Clone the repo and look for commands in the commands/ subdirectory
Actual Behavior
The module treats main#subdirectory=commands as a branch name:
warning: Could not find remote branch main#subdirectory=commands to clone.
fatal: Remote branch main#subdirectory=commands not found in upstream origin
Impact
Bundles cannot ship slash commands in a subdirectory and have them automatically discovered. Users must manually copy commands to
~/.amplifier/commands/ as a workaround.
Suggested Fix
Parse the git URL to extract the #subdirectory= fragment before passing to git clone, similar to how uv and other tools handle this pattern.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in the tool-slash-command module at the config.commands parsing and git clone flow, using the behavior YAML reproduction from the issue. Verify that the repository URL stops before #subdirectory=, the fragment identifies commands/, and command discovery succeeds from that subdirectory; done means the listed bundle loads its slash commands without treating the fragment as part of the branch name.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 52/100