[Bug]: PowerShell common.ps1 uses wrong base path for specs directory
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 88/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- powershell
- 領域
- tooling
調査の方向性
.specify/scripts/powershell/common.ps1 から始め、Get-CurrentBranch と Get-FeatureDir に焦点を当てます。機能ブランチ上で .specify/scripts/powershell/setup-plan.ps1 -Json を実行し、生成されたパスを確認します。完了条件は、追加の feature/ ディレクトリなしでファイルが .specify/specs/ 配下に配置され、既存のワークフローが引き続き動作することです。
索引モデルが issue の本文から書いたものです。
説明
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"
- 主要言語
- Python
- スター
- 138k
- フォーク
- 12.4k
- 平均マージ
- 3日 6時間
- マージ済み PR(30日)
- 136
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
github/spec-kit のほかの issue
-
triage-can-wait
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
enhancement needs-triage triage-can-wait
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
bundle-submission needs-info triage-can-wait validation-failed
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
author-awaiting enhancement needs-triage preset-submission triage-can-wait validation-failed
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
-
author-awaiting enhancement extension-submission needs-triage triage-can-wait validation-failed
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
github/spec-kit の issue をすべて見る
似ている issue
-
triage/confirmed
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
agentscope-ai/agentscope#2775 ·
-
comp/desktop P3 type/bug
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
NousResearch/hermes-agent#118866 ·
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
apache/cloudstack#14222 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100