Skip to content

Commit 8184244

Browse files
committed
fix: correct PS1 function names, document SPECKIT_SOURCE_ONLY prerequisite
- Fixed Get-FeaturePaths → Get-FeaturePathsEnv, Read-PlanData → Parse-PlanData - Documented that shared scripts must guard Main with SPECKIT_SOURCE_ONLY before these integration scripts can be activated (Stage 7)
1 parent 380aca5 commit 8184244

2 files changed

Lines changed: 12 additions & 6 deletions

File tree

src/specify_cli/integrations/copilot/scripts/update-context.ps1

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,14 @@
66
#
77
# NOTE: This script is not yet active. It will be activated in Stage 7
88
# when the shared update-agent-context.ps1 replaces its switch statement
9-
# with integration.json-based dispatch.
9+
# with integration.json-based dispatch. The shared script must also be
10+
# refactored to support SPECKIT_SOURCE_ONLY (guard the Main call) before
11+
# dot-sourcing will work.
1012
#
11-
# Sources common.ps1 and the shared update-agent-context functions,
12-
# then calls Update-AgentFile with the copilot target path.
13+
# Prerequisites (Stage 7):
14+
# - update-agent-context.ps1 must guard its Main call behind
15+
# if (-not $env:SPECKIT_SOURCE_ONLY) { Main }
16+
# - Functions must be importable without side effects
1317

1418
$ErrorActionPreference = 'Stop'
1519

@@ -25,9 +29,9 @@ $env:SPECKIT_SOURCE_ONLY = '1'
2529
. "$repoRoot/.specify/scripts/powershell/update-agent-context.ps1"
2630

2731
# Gather feature paths and parse plan data
28-
$paths = Get-FeaturePaths
32+
$paths = Get-FeaturePathsEnv
2933
$implPlan = $paths.IMPL_PLAN
30-
Read-PlanData -PlanFile $implPlan
34+
Parse-PlanData -PlanFile $implPlan
3135

3236
# Create or update the copilot instructions file
3337
$copilotFile = Join-Path $repoRoot '.github/copilot-instructions.md'

src/specify_cli/integrations/copilot/scripts/update-context.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
#
88
# NOTE: This script is not yet active. It will be activated in Stage 7
99
# when the shared update-agent-context.sh replaces its case statement
10-
# with integration.json-based dispatch.
10+
# with integration.json-based dispatch. The shared script must also be
11+
# refactored to support SPECKIT_SOURCE_ONLY (guard the main logic)
12+
# before sourcing will work.
1113
#
1214
# Sources common.sh and the shared update-agent-context functions,
1315
# then calls update_agent_file with the copilot target path.

0 commit comments

Comments
 (0)