Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
b32f101
feat: Stage 2a — CopilotIntegration with shared template primitives
mnriem Mar 31, 2026
ebb909f
feat: Stage 2b — --integration flag, routing, agent.json, shared infra
mnriem Mar 31, 2026
5cce80f
feat: Stage 2 completion — integration scripts, integration.json, sha…
mnriem Mar 31, 2026
b481c26
refactor: rename shared manifest to speckit.manifest.json
mnriem Mar 31, 2026
d9bfbdb
fix: copilot update-context scripts reflect target architecture
mnriem Mar 31, 2026
ce754a2
fix: simplify copilot scripts — dispatcher sources common functions
mnriem Mar 31, 2026
94e7d55
fix: copilot update-context scripts are self-contained implementations
mnriem Mar 31, 2026
be1c741
docs: add Stage 7 activation note to copilot update-context scripts
mnriem Mar 31, 2026
ccf0c81
test: add complete file inventory test for copilot integration
mnriem Mar 31, 2026
944aafd
test: add PowerShell file inventory test for copilot integration
mnriem Mar 31, 2026
d1842d5
refactor: split test_integrations.py into tests/integrations/ directory
mnriem Mar 31, 2026
28e85c4
refactor: move file inventory tests from test_cli to test_copilot
mnriem Mar 31, 2026
f4ea768
fix: skip JSONC merge to preserve user settings, fix docstring
mnriem Mar 31, 2026
b7d7e0e
fix: warn user when JSONC settings merge is skipped
mnriem Mar 31, 2026
fda1671
fix: show template content when JSONC merge is skipped
mnriem Mar 31, 2026
83752cf
fix: document process_template requirement, merge scripts without rmtree
mnriem Mar 31, 2026
bf1b679
fix: don't overwrite pre-existing shared scripts or templates
mnriem Mar 31, 2026
8c78da1
fix: warn user about skipped pre-existing shared files
mnriem Mar 31, 2026
93e371e
test: add test for shared infra skip behavior on pre-existing files
mnriem Mar 31, 2026
380aca5
fix: address review — containment check, deterministic prompts, manif…
mnriem Mar 31, 2026
8184244
fix: correct PS1 function names, document SPECKIT_SOURCE_ONLY prerequ…
mnriem Mar 31, 2026
02fd12b
fix: add dict type check for settings merge, simplify PS1 to subprocess
mnriem Mar 31, 2026
0ea0181
fix: skip-write on no-op merge, bash subprocess, dynamic integration …
mnriem Mar 31, 2026
7d38b0d
fix: align path rewriting with release script, add .specify/.specify/…
mnriem Mar 31, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: simplify copilot scripts — dispatcher sources common functions
Integration scripts now contain only copilot-specific logic (target
path + agent name). The dispatcher is responsible for sourcing shared
functions before calling the integration script.
  • Loading branch information
mnriem committed Mar 31, 2026
commit ce754a2c77151f7da7d89334f25e65f755c82619
22 changes: 8 additions & 14 deletions src/specify_cli/integrations/copilot/scripts/update-context.ps1
Original file line number Diff line number Diff line change
@@ -1,22 +1,16 @@
# update-context.ps1 — Copilot integration: update .github/copilot-instructions.md
#
# Sources the shared update-agent-context.ps1 (which defines Update-AgentFile
# and friends) and calls Update-AgentFile with the copilot-specific target path.
#
# In the final architecture (Stage 7) the shared dispatcher reads
# .specify/integration.json and invokes this script. Until then, the
# shared script's switch statement still works for copilot.
# Called by the shared dispatcher after it has sourced common functions
# (Update-AgentFile, etc.). This script only contains the copilot-specific
# target path and agent name.

$ErrorActionPreference = 'Stop'

$repoRoot = git rev-parse --show-toplevel 2>$null
if (-not $repoRoot) { $repoRoot = $PWD.Path }
if (-not $repoRoot) {
$repoRoot = git rev-parse --show-toplevel 2>$null
if (-not $repoRoot) { $repoRoot = $PWD.Path }
}

$copilotFile = Join-Path $repoRoot '.github/copilot-instructions.md'

# Source the shared script to get Update-AgentFile and friends.
# Use $env:SPECKIT_SOURCE_ONLY=1 to load functions without running main.
$env:SPECKIT_SOURCE_ONLY = '1'
. "$repoRoot/.specify/scripts/powershell/update-agent-context.ps1"

Update-AgentFile -TargetFile $copilotFile -AgentName 'GitHub Copilot' @args
Update-AgentFile -TargetFile $copilotFile -AgentName 'GitHub Copilot'
20 changes: 5 additions & 15 deletions src/specify_cli/integrations/copilot/scripts/update-context.sh
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
#!/usr/bin/env bash
# update-context.sh — Copilot integration: update .github/copilot-instructions.md
#
# Sources the shared update-agent-context.sh (which defines parse_plan_data,
# update_agent_file, etc.) and calls update_agent_file with the copilot-
# specific target path.
#
# In the final architecture (Stage 7) the shared dispatcher reads
# .specify/integration.json and exec's this script. Until then, the
# shared script's case statement still works for copilot.
# Called by the shared dispatcher after it has sourced common functions
# (parse_plan_data, update_agent_file, etc.). This script only contains
# the copilot-specific target path and agent name.

set -euo pipefail

REPO_ROOT="$(git rev-parse --show-toplevel 2>/dev/null || pwd)"
COPILOT_FILE="$REPO_ROOT/.github/copilot-instructions.md"

# Source the shared script to get update_agent_file and friends.
# Use SPECKIT_SOURCE_ONLY=1 to load functions without running main().
export SPECKIT_SOURCE_ONLY=1
source "$REPO_ROOT/.specify/scripts/bash/update-agent-context.sh"
REPO_ROOT="${REPO_ROOT:-$(git rev-parse --show-toplevel 2>/dev/null || pwd)}"

update_agent_file "$COPILOT_FILE" "GitHub Copilot" "$@"
update_agent_file "$REPO_ROOT/.github/copilot-instructions.md" "GitHub Copilot"