Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Bug]: Test-FeatureJsonMatchesFeatureDir was missing in common.ps1 — this was a missing function that caused setup-tasks.ps1 to fail.

オープン 初心者向け
#2,721 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
68/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
powershell
領域
cli, tooling

調査の方向性

.specify/scripts/powershell/common.ps1 と .specify/scripts/powershell/setup-tasks.ps1 からの呼び出しから始めます。PowerShell で setup-tasks.ps1 -Json を実行して失敗を再現し、その後 Test-FeatureJsonMatchesFeatureDir が利用可能であり、機能ディレクトリの検証が報告されたコマンドエラーまたはパーサーエラーなしで完了することを確認します。

索引モデルが issue の本文から書いたものです。

説明

stale
Bug Description

On start of /speckit.tasks in PowerShell environment, it attempts to call function
Test-FeatureJsonMatchesFeatureDir
An error is thrown and there is no such commandlet.

CoPilot eventually worked around the problem.

.\.specify\scripts\powershell\setup-tasks.ps1 -Json
C:\Code\private\app\.specify\scripts\powershell\setup-tasks.ps1 : The term 
'Test-FeatureJsonMatchesFeatureDir' is not recognized as the name of a cmdlet, function, script file, or 
operable program. Check the spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At line:1 char:1
+ .\.specify\scripts\powershell\setup-tasks.ps1 -Json
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Test-FeatureJsonMatchesFeatureDir:String) [setup-tasks.ps1] 
   , CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,setup-tasks.ps1
Steps to Reproduce

1: Run /speckit.tasks
2: Errors noted for missing function Test-FeatureJsonMatchesFeatureDir

The function checks if feature.json pins an existing feature directory, and if it does, branch naming validation gets skipped.

Since the function is missing from common.ps1, this validation logic can't run.

Expected Behavior

No error should have been reported.

Actual Behavior
.\.specify\scripts\powershell\setup-tasks.ps1 -Json
C:\Code\private\app\.specify\scripts\powershell\setup-tasks.ps1 : The term 
'Test-FeatureJsonMatchesFeatureDir' is not recognized as the name of a cmdlet, function, script file, or 
operable program. Check the spelling of the name, or if a path was included, verify that the path is 
correct and try again.
At line:1 char:1
+ .\.specify\scripts\powershell\setup-tasks.ps1 -Json
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Test-FeatureJsonMatchesFeatureDir:String) [setup-tasks.ps1] 
   , CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException,setup-tasks.ps1

Since the function is missing from common.ps1, this validation logic can't run.

CoPilot eventually determined what the function should have returned and worked around the problem.

Specify CLI Version

0.8.13

AI Agent

GitHub Copilot

Operating System

Windows 11 (10.0.26220)

Python Version

Python 3.12.6

Error Logs
.\.specify\scripts\powershell\setup-tasks.ps1 -Json
C:\Code\private\app\.specify\scripts\powershell\setup-tasks.ps1 : At 
C:\Code\private\app\.specify\scripts\powershell\common.ps1:141 char:122
+ ... -Path $RepoRoot $pinnedRelative) -ErrorAction SilentlyContinue)?.Path
+                                                                    ~~~~~~
Unexpected token '?.Path' in expression or statement.
At C:\Code\private\app\.specify\scripts\powershell\common.ps1:142 char:102
+ ... h -LiteralPath $ActiveFeatureDir -ErrorAction SilentlyContinue)?.Path
+                                                                    ~~~~~~
Unexpected token '?.Path' in expression or statement.
At line:1 char:1
+ .\.specify\scripts\powershell\setup-tasks.ps1 -Json
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ParserError: (:) [setup-tasks.ps1], ParseException
    + FullyQualifiedErrorId : UnexpectedToken,setup-tasks.ps1
Additional Context

This speckit was in-place upgraded from a previous version ~ 1 month old

主要言語
Python
スター
138k
フォーク
12.4k
平均マージ
3日 4時間
マージ済み PR(30日)
154

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

github/spec-kit のほかの issue

github/spec-kit の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。