From b2f749ef413659aa4395eaa532e0216ccb4f2520 Mon Sep 17 00:00:00 2001 From: stenyin Date: Wed, 24 Sep 2025 21:44:34 +0800 Subject: [PATCH 1/2] fix: add UTF-8 encoding to file read/write operations in update-agent-context.ps1 --- scripts/powershell/update-agent-context.ps1 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/powershell/update-agent-context.ps1 b/scripts/powershell/update-agent-context.ps1 index 8f4830a..8f727f8 100644 --- a/scripts/powershell/update-agent-context.ps1 +++ b/scripts/powershell/update-agent-context.ps1 @@ -124,7 +124,7 @@ function Extract-PlanField { if (-not (Test-Path $PlanFile)) { return '' } # Lines like **Language/Version**: Python 3.12 $regex = "^\*\*$([Regex]::Escape($FieldPattern))\*\*: (.+)$" - Get-Content -LiteralPath $PlanFile | ForEach-Object { + Get-Content -LiteralPath $PlanFile -Encoding utf8 | ForEach-Object { if ($_ -match $regex) { $val = $Matches[1].Trim() if ($val -notin @('NEEDS CLARIFICATION','N/A')) { return $val } @@ -215,7 +215,7 @@ function New-AgentFile { $escaped_framework = $NEW_FRAMEWORK $escaped_branch = $CURRENT_BRANCH - $content = Get-Content -LiteralPath $temp -Raw + $content = Get-Content -LiteralPath $temp -Raw -Encoding utf8 $content = $content -replace '\[PROJECT NAME\]',$ProjectName $content = $content -replace '\[DATE\]',$Date.ToString('yyyy-MM-dd') @@ -253,7 +253,7 @@ function New-AgentFile { $parent = Split-Path -Parent $TargetFile if (-not (Test-Path $parent)) { New-Item -ItemType Directory -Path $parent | Out-Null } - Set-Content -LiteralPath $TargetFile -Value $content -NoNewline + Set-Content -LiteralPath $TargetFile -Value $content -NoNewline -Encoding utf8 Remove-Item $temp -Force return $true } @@ -285,7 +285,7 @@ function Update-ExistingAgentFile { if ($techStack) { $newChangeEntry = "- ${CURRENT_BRANCH}: Added ${techStack}" } elseif ($NEW_DB -and $NEW_DB -notin @('N/A','NEEDS CLARIFICATION')) { $newChangeEntry = "- ${CURRENT_BRANCH}: Added ${NEW_DB}" } - $lines = Get-Content -LiteralPath $TargetFile + $lines = Get-Content -LiteralPath $TargetFile -Encoding utf8 $output = New-Object System.Collections.Generic.List[string] $inTech = $false; $inChanges = $false; $techAdded = $false; $changeAdded = $false; $existingChanges = 0 @@ -327,7 +327,7 @@ function Update-ExistingAgentFile { $newTechEntries | ForEach-Object { $output.Add($_) } } - Set-Content -LiteralPath $TargetFile -Value ($output -join [Environment]::NewLine) + Set-Content -LiteralPath $TargetFile -Value ($output -join [Environment]::NewLine) -Encoding utf8 return $true } From cc75a22e455ab5da9c95b97e62fe866cb85010f1 Mon Sep 17 00:00:00 2001 From: Maxi Ferreira Date: Tue, 30 Sep 2025 11:11:41 -0700 Subject: [PATCH 2/2] Update URLs to Contributing and Support Guides in Docs ## Problem The links to the contributing and support guides at the bottom of [the docs site home page](https://github.github.com/spec-kit/index.html) currently take you to a 404 page. ## Solution Update the links to the correct URLs, pointing to the guides that are currently in the repo's root directory rather than within the `docs` folder. --- docs/index.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/index.md b/docs/index.md index 34da702..9a10e7c 100644 --- a/docs/index.md +++ b/docs/index.md @@ -55,8 +55,8 @@ Our research and experimentation focus on: ## Contributing -Please see our [Contributing Guide](CONTRIBUTING.md) for information on how to contribute to this project. +Please see our [Contributing Guide](https://github.com/github/spec-kit/blob/main/CONTRIBUTING.md) for information on how to contribute to this project. ## Support -For support, please check our [Support Guide](SUPPORT.md) or open an issue on GitHub. +For support, please check our [Support Guide](https://github.com/github/spec-kit/blob/main/SUPPORT.md) or open an issue on GitHub.