[Bug]: PowerShell common.ps1 uses wrong base path for specs directory
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 88/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- powershell
- Domaine
- tooling
Piste de recherche
Commencez dans .specify/scripts/powershell/common.ps1, en vous concentrant sur Get-CurrentBranch et Get-FeatureDir. Exécutez .specify/scripts/powershell/setup-plan.ps1 -Json sur une branche de fonctionnalité et inspectez les chemins générés. Le travail est terminé lorsque les fichiers sont placés sous .specify/specs/ sans répertoire feature/ supplémentaire, tout en continuant à faire fonctionner les workflows existants.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Bug Description
The PowerShell common functions in .specify/scripts/powershell/common.ps1 use incorrect paths, causing spec files to be created in specs/ at the repository root instead of .specify/specs/ as documented and expected by the framework.
Steps to Reproduce
- Clone a spec-kit project
- Check out a feature branch (e.g.,
feature/US123-my-feature) - Run
.specify/scripts/powershell/setup-plan.ps1 -Json - Observe files are created in
specs/feature/US123-my-feature/instead of.specify/specs/US123-my-feature/
Expected Behavior
All spec files should be created under the .specify/specs/ directory as documented throughout the framework and in .specify/specs/README.md.
Actual Behavior
- Files are created in
specs/at the repository root (wrong location) - When using feature branches like
feature/something, an extra nestedfeature/directory is created:specs/feature/something/ - This violates the documented
.specify/prefix convention - Requires manual cleanup after every planning operation
Specify CLI Version
0.2.1
AI Agent
GitHub Copilot
Operating System
Windows 10.0.26200 AMD64
Python Version
3.12.4
Error Logs
Additional Context
Component
Scripts (.specify/scripts/)
AI Agent (if applicable)
Affects all agents that use /speckit.plan, /speckit.tasks, and related commands
Additional Context
-
This affects all PowerShell-based workflows
-
The bash version (
common.sh) likely has similar issues if it exists -
Working fix tested in production: https://ghe.coxautoinc.com/deCipher/TestingbyRallyCards/commit/abc54be
-
Root Cause
File: .specify/scripts/powershell/common.ps1
Line 38 (in Get-CurrentBranch function):
$specsDir = Join-Path $repoRoot "specs"
Should be:
$specsDir = Join-Path $repoRoot ".specify/specs"
Line 98 (in Get-FeatureDir function):
Join-Path $repoRoot "specs/$Branch"
Should be:
$dirName = $Branch -replace '^feature/', '' # Strip branch prefix
Join-Path $repoRoot ".specify/specs/$dirName"
Proposed Fix
function Get-FeatureDir {
param([string]$RepoRoot, [string]$Branch)
# Strip feature/ prefix if present for specs directory naming
$dirName = $Branch -replace '^feature/', ''
Join-Path $RepoRoot ".specify/specs/$dirName"
}
Also update line 38 in Get-CurrentBranch:
$specsDir = Join-Path $repoRoot ".specify/specs"
- Langage dominant
- Python
- Étoiles
- 138k
- Forks
- 12.4k
- Merge moyen
- 3 j 6 h
- PR mergées (30 j)
- 136
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de github/spec-kit
-
triage-can-wait
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
enhancement needs-triage triage-can-wait
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
-
bundle-submission needs-info triage-can-wait validation-failed
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
-
author-awaiting enhancement needs-triage preset-submission triage-can-wait validation-failed
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
author-awaiting enhancement extension-submission needs-triage triage-can-wait validation-failed
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
Toutes les issues de github/spec-kit
Issues similaires
-
documentation help wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 90/100
simonw/sqlite-utils#872 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 88/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
-
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100