Merge branch 'github:main' into q-agent

This commit is contained in:
Brian Anderson
2025-10-01 02:33:10 -06:00
committed by GitHub
2 changed files with 7 additions and 7 deletions

View File

@@ -55,8 +55,8 @@ Our research and experimentation focus on:
## Contributing ## 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 ## 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.

View File

@@ -125,7 +125,7 @@ function Extract-PlanField {
if (-not (Test-Path $PlanFile)) { return '' } if (-not (Test-Path $PlanFile)) { return '' }
# Lines like **Language/Version**: Python 3.12 # Lines like **Language/Version**: Python 3.12
$regex = "^\*\*$([Regex]::Escape($FieldPattern))\*\*: (.+)$" $regex = "^\*\*$([Regex]::Escape($FieldPattern))\*\*: (.+)$"
Get-Content -LiteralPath $PlanFile | ForEach-Object { Get-Content -LiteralPath $PlanFile -Encoding utf8 | ForEach-Object {
if ($_ -match $regex) { if ($_ -match $regex) {
$val = $Matches[1].Trim() $val = $Matches[1].Trim()
if ($val -notin @('NEEDS CLARIFICATION','N/A')) { return $val } if ($val -notin @('NEEDS CLARIFICATION','N/A')) { return $val }
@@ -216,7 +216,7 @@ function New-AgentFile {
$escaped_framework = $NEW_FRAMEWORK $escaped_framework = $NEW_FRAMEWORK
$escaped_branch = $CURRENT_BRANCH $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 '\[PROJECT NAME\]',$ProjectName
$content = $content -replace '\[DATE\]',$Date.ToString('yyyy-MM-dd') $content = $content -replace '\[DATE\]',$Date.ToString('yyyy-MM-dd')
@@ -254,7 +254,7 @@ function New-AgentFile {
$parent = Split-Path -Parent $TargetFile $parent = Split-Path -Parent $TargetFile
if (-not (Test-Path $parent)) { New-Item -ItemType Directory -Path $parent | Out-Null } 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 Remove-Item $temp -Force
return $true return $true
} }
@@ -286,7 +286,7 @@ function Update-ExistingAgentFile {
if ($techStack) { $newChangeEntry = "- ${CURRENT_BRANCH}: Added ${techStack}" } if ($techStack) { $newChangeEntry = "- ${CURRENT_BRANCH}: Added ${techStack}" }
elseif ($NEW_DB -and $NEW_DB -notin @('N/A','NEEDS CLARIFICATION')) { $newChangeEntry = "- ${CURRENT_BRANCH}: Added ${NEW_DB}" } 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] $output = New-Object System.Collections.Generic.List[string]
$inTech = $false; $inChanges = $false; $techAdded = $false; $changeAdded = $false; $existingChanges = 0 $inTech = $false; $inChanges = $false; $techAdded = $false; $changeAdded = $false; $existingChanges = 0
@@ -328,7 +328,7 @@ function Update-ExistingAgentFile {
$newTechEntries | ForEach-Object { $output.Add($_) } $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 return $true
} }