Skip to content

fix(setup-windows): use AGENTS.md pointer marker for CLAUDE/GEMINI verify#47

Merged
mlorentedev merged 1 commit into
mainfrom
fix/setup-windows-verify-strings-parity
May 18, 2026
Merged

fix(setup-windows): use AGENTS.md pointer marker for CLAUDE/GEMINI verify#47
mlorentedev merged 1 commit into
mainfrom
fix/setup-windows-verify-strings-parity

Conversation

@mlorentedev
Copy link
Copy Markdown
Owner

Summary

  • Replace stale "CORE PRINCIPLE" verify pattern (lines 142, 466) with 'First, read \AGENTS.md`'using-SimpleMatch`.
  • Mirrors the fix already applied to Copilot verification in fix(BUG-001): correct Copilot verification + gate on extension presence #40 (BUG-001) — closes the cross-OS parity gap (setup-linux.sh already uses this marker for all three AI configs at lines 297/335/514).
  • Adds three bats parity asserts in tests/setup-windows.bats as regression guard.

Why

After AI-013 refactored CLAUDE.md/GEMINI.md/copilot-instructions.md to pointer-style files delegating to the canonical AGENTS.md, the legacy CORE PRINCIPLE string no longer exists in any deployed file. setup-windows.ps1 was emitting two spurious [ERROR] lines on every run despite the actual Copy-Item succeeding — the verify post-check was lying.

Found empirically on 2026-05-18 during the WIN-003 SessionStart hook self-heal validation (#21).

Test plan

  • Three new bats asserts simulated manually with grep -qF (red bar pre-fix, green bar post-fix)
  • PowerShell smoke: Select-String -Pattern 'First, read \AGENTS.md`' -SimpleMatchmatches both deployed files; legacyCORE PRINCIPLE` matches neither
  • PSScriptAnalyzer clean on setup-windows.ps1 (Severity Error+Warning)
  • CI: tests/setup-windows.bats + PSScriptAnalyzer job green
  • Optional: re-run pwsh -NoProfile -ExecutionPolicy Bypass -File setup-windows.ps1 on the affected machine, confirm two [ERROR] lines disappear from output

…rify

The post-deploy verification for CLAUDE.md and GEMINI.md was still grepping
for the legacy 'CORE PRINCIPLE' string. After AI-013 refactored both files
to pointer-style (delegating to AGENTS.md as canonical SSOT), that string
no longer exists in either deployed file, so every setup-windows.ps1 run
emitted two spurious [ERROR] lines despite the actual copy succeeding.

Mirror the fix already applied to the Copilot verification in PR #40
(BUG-001): use 'First, read `AGENTS.md`' as the pointer marker, with
-SimpleMatch to treat the backtick-bearing pattern as a literal string.
setup-linux.sh already uses this convention for all three AI configs
(lines 297/335/514) -- this closes the cross-platform parity gap.

Regression guard: three new bats parity asserts in tests/setup-windows.bats
locking in the marker, plus a negative assert that catches any future
'CORE PRINCIPLE' Select-String pattern from sneaking back in.

Found during empirical re-run of setup-windows.ps1 on 2026-05-18 while
validating the WIN-003 SessionStart hook self-heal (PR #21).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant