powershell.exe
pwsh.exe
-ExecutionPolicy Bypass
CLAUDE.md
Select-String
rg
Get-Content -Encoding utf8
$OutputEncoding
[Console]::OutputEncoding
PYTHONUTF8=1
PYTHONIOENCODING=utf-8
.ps1
docs/04-local-development-and-verification.md
rg -e
python -
foreach
if
$()
@()
-g/--glob
Get-ChildItem
.FullName
AGENTS.md
docs/00-project-profile.md
dev_scripts/harness.py
python dev_scripts/harness.py check --strict
python -m unittest discover -s tests -v
python dev_scripts/harness.py sync --check
rg -g
docs/04
PowerShel1
powershel1.exe
4bbacf4
已推送到 origin/main。
origin/main
a7f6ef9e0788065e5a81cfef5753a12b0f0bebc8
当前阶段:待验收。工单保持开启,等待用户明确验收。
用户在原待验收范围上补充 Windows/pwsh7 命令约束并确认采用优化版本。#28 恢复为“进行中”。
新增范围:Bash 与 PowerShell 语法隔离、正则引号、多行 Python here-string、语句块管道、ripgrep glob,以及在 Project-Profile 记录当前 Windows 10 / pwsh7 环境。
两项原规则已修正:
Get-ChildItem -Filter
rg -g/--glob
本地已确认当前 PowerShell 为 7.3.12、ripgrep 为 15.2.0;裸 foreach (...) { ... } | ... 会产生 ParserError,使用 @(...) 可进入管道。
foreach (...) { ... } | ...
@(...)
本评论取代此前仅覆盖 UTF-8/ExecutionPolicy 的待验收证据,包含 2026-09-02 新增的 Windows 命令语法范围。
40b99387adc184274c43fda5f7efb3746642e27a
pwsh
foreach (...) { ... } | Measure-Object
@(foreach (...)) | Measure-Object
rg -g '*.md'
54598b0fed91a852385386bd6fd920245f5dc1dd
a94b4eaa509f351b77274f007ae882e9e696fc8b
40b9938
工单恢复为待验收并保持开启。
验收闭环完成,关闭工单。
No dependencies set.
The note is not visible to the blocked user.
基本信息
目标
非目标
powershell.exe或pwsh.exe嵌套调用。-ExecutionPolicy Bypass。CLAUDE.md或 README;项目档案只记录当前 Windows 10 / pwsh7 环境。Select-String替代为默认搜索工具;仍遵循现有图工具和rg优先级。已确认方案
pwsh.exe。Get-Content -Encoding utf8。$OutputEncoding和[Console]::OutputEncoding。PYTHONUTF8=1和PYTHONIOENCODING=utf-8。-ExecutionPolicy Bypass;只有可信.ps1确实被策略阻止时才使用并记录原因。docs/04-local-development-and-verification.md。rg -e或语义等价的简单查询,不强制拆成多次搜索。python -,并明确定界符换行规则。foreach、if等语句块进入管道前使用$()、@()或变量;普通命令无需包装。rg使用真实目录配合-g/--glob;只有需要实体路径列表时才用Get-ChildItem和.FullName。影响范围
AGENTS.mddocs/04-local-development-and-verification.md、docs/00-project-profile.mddev_scripts/harness.py与相关测试风险与回退
验证
python dev_scripts/harness.py check --strictpython -m unittest discover -s tests -vpython dev_scripts/harness.py sync --checkrg -g、UTF-8 输出和可信脚本受策略阻止。文档影响
docs/04镜像。验收标准
PowerShel1或powershel1.exe拼写。-ExecutionPolicy Bypass。rg -g有可复制示例。最终实施证据(待验收)
完成内容
AGENTS.md增加简短强制规则:Windows 优先当前 PowerShell,可选时优先 PowerShell 7,不为编码重复启动 shell。-ExecutionPolicy Bypass;仅可信.ps1确实被策略阻止且无更小方案时允许单次使用并记录原因。rg搜索优先级,不把Select-String设为默认。CLAUDE.md、README、项目档案或产品代码,未新增包装脚本。提交
4bbacf4— 规范 PowerShell UTF-8 与执行策略。已推送到
origin/main。验证
python dev_scripts/harness.py check --strict:通过。python -m unittest discover -s tests -v:46/46 通过。python dev_scripts/harness.py sync --check:15 个核心镜像一致。PowerShel1、powershel1.exe错误拼写;无强制每条命令嵌套 PowerShell;无默认 Bypass 规则。Wiki 证据
a7f6ef9e0788065e5a81cfef5753a12b0f0bebc8文档和快照
docs/04-local-development-and-verification.md。当前阶段:待验收。工单保持开启,等待用户明确验收。
需求变化(2026-09-02)
用户在原待验收范围上补充 Windows/pwsh7 命令约束并确认采用优化版本。#28 恢复为“进行中”。
新增范围:Bash 与 PowerShell 语法隔离、正则引号、多行 Python here-string、语句块管道、ripgrep glob,以及在 Project-Profile 记录当前 Windows 10 / pwsh7 环境。
两项原规则已修正:
rg,避免改变查询语义和重复扫描;Get-ChildItem -Filter,优先真实目录配合rg -g/--glob。本地已确认当前 PowerShell 为 7.3.12、ripgrep 为 15.2.0;裸
foreach (...) { ... } | ...会产生 ParserError,使用@(...)可进入管道。补充实施最终证据(待验收)
本评论取代此前仅覆盖 UTF-8/ExecutionPolicy 的待验收证据,包含 2026-09-02 新增的 Windows 命令语法范围。
40b99387adc184274c43fda5f7efb3746642e27a,已推送到origin/main。4bbacf4;两次提交共同构成 #28 当前验收版本。rg -e,不强制拆成改变语义的多次搜索;foreach、if等语句块进入管道前使用$()、@()或变量;-g/--glob,不强制Get-ChildItem -Filter;pwsh(本地验证 7.3.12)记录到 Project-Profile,不作为所有项目的硬编码前提。foreach (...) { ... } | Measure-Object返回 ParserError;@(foreach (...)) | Measure-Object成功;python -;rg -g '*.md'可按 glob 搜索。python dev_scripts/harness.py check --strict:通过。python dev_scripts/harness.py sync --check:15 个核心页面一致。54598b0fed91a852385386bd6fd920245f5dc1dda94b4eaa509f351b77274f007ae882e9e696fc8b40b9938。工单恢复为待验收并保持开启。
验收结论
4bbacf4与补充提交40b99387adc184274c43fda5f7efb3746642e27a,均已推送到origin/main。54598b0fed91a852385386bd6fd920245f5dc1dd;Local-Development-and-Verificationa94b4eaa509f351b77274f007ae882e9e696fc8b。验收闭环完成,关闭工单。