fix(setup-windows): use AGENTS.md pointer marker for CLAUDE/GEMINI verify#47
Merged
Merged
Conversation
…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).
This was referenced May 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
"CORE PRINCIPLE"verify pattern (lines 142, 466) with'First, read \AGENTS.md`'using-SimpleMatch`.setup-linux.shalready uses this marker for all three AI configs at lines 297/335/514).tests/setup-windows.batsas regression guard.Why
After AI-013 refactored
CLAUDE.md/GEMINI.md/copilot-instructions.mdto pointer-style files delegating to the canonicalAGENTS.md, the legacyCORE PRINCIPLEstring no longer exists in any deployed file.setup-windows.ps1was emitting two spurious[ERROR]lines on every run despite the actualCopy-Itemsucceeding — the verify post-check was lying.Found empirically on 2026-05-18 during the WIN-003 SessionStart hook self-heal validation (#21).
Test plan
grep -qF(red bar pre-fix, green bar post-fix)Select-String -Pattern 'First, read \AGENTS.md`' -SimpleMatchmatches both deployed files; legacyCORE PRINCIPLE` matches neithersetup-windows.ps1(Severity Error+Warning)tests/setup-windows.bats+ PSScriptAnalyzer job greenpwsh -NoProfile -ExecutionPolicy Bypass -File setup-windows.ps1on the affected machine, confirm two[ERROR]lines disappear from output