@@ -26,6 +26,38 @@ def test_installer_and_readmes_use_the_release_version(self) -> None:
2626 self .assertIn (expected_path , english )
2727 self .assertIn (expected_path , korean )
2828
29+ def test_all_readmes_offer_a_safe_ai_assisted_windows_install_prompt (self ) -> None :
30+ prompt = """Install WikiBrain on this Windows machine from https://github.com/hungrytech/wikibrain.
31+ Read the repository's Native Windows instructions first. Before changing anything,
32+ tell me whether native Windows or WSL is the correct path for where my agents and
33+ repositories run. Use the version-pinned installer from the README. Download it,
34+ show me the full PowerShell script, explain the settings changed by initialization,
35+ then stop and wait for my explicit approval before running the script or initializing
36+ WikiBrain. After I approve, install it and finish by running brainctl doctor.
37+ Do not bypass Codex hook trust."""
38+ fenced_prompt = f"```text\n { prompt } \n ```"
39+ pinned_installer = (
40+ f"/wikibrain/v{ __version__ } /scripts/install-windows.ps1"
41+ )
42+
43+ for readme_name in (
44+ "README.md" ,
45+ "README.ko.md" ,
46+ "README.ja.md" ,
47+ "README.zh-CN.md" ,
48+ ):
49+ readme = (ROOT / readme_name ).read_text (encoding = "utf-8" )
50+ native_start = readme .index ('<a id="native-windows"></a>' )
51+ native_end = readme .index ("<details>" , native_start )
52+ native_section = readme [native_start :native_end ]
53+ with self .subTest (readme = readme_name ):
54+ self .assertIn (fenced_prompt , native_section )
55+ self .assertIn (pinned_installer , native_section )
56+ self .assertLess (
57+ native_section .index (fenced_prompt ),
58+ native_section .index ("```powershell" ),
59+ )
60+
2961 def test_windows_installer_is_review_first_and_does_not_use_iex (self ) -> None :
3062 installer = (ROOT / "scripts" / "install-windows.ps1" ).read_text (
3163 encoding = "utf-8"
0 commit comments