🐛 fix(playbook): address reported repo issues
normalize Windows path-like TOML config values, regenerate .agents/index.md on sync, keep the SKILLS.md superpowers section route-only, and ignore generated Python cache dirs. add regression coverage for load_config() and the standards sync behavior touched by these fixes.
This commit is contained in:
@@ -101,6 +101,46 @@ langs = ["tsl"]
|
||||
self.assertEqual(result.returncode, 0)
|
||||
self.assertTrue(agents_index.is_file())
|
||||
|
||||
def test_sync_standards_updates_agents_index_when_langs_expand(self):
|
||||
with tempfile.TemporaryDirectory() as tmp_dir:
|
||||
root = Path(tmp_dir)
|
||||
|
||||
first_config = root / "playbook-first.toml"
|
||||
first_config.write_text(
|
||||
f"""
|
||||
[playbook]
|
||||
project_root = "{tmp_dir}"
|
||||
|
||||
[sync_standards]
|
||||
langs = ["tsl"]
|
||||
no_backup = true
|
||||
""",
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
first_result = run_cli("-config", str(first_config))
|
||||
self.assertEqual(first_result.returncode, 0)
|
||||
|
||||
second_config = root / "playbook-second.toml"
|
||||
second_config.write_text(
|
||||
f"""
|
||||
[playbook]
|
||||
project_root = "{tmp_dir}"
|
||||
|
||||
[sync_standards]
|
||||
langs = ["tsl", "cpp"]
|
||||
no_backup = true
|
||||
""",
|
||||
encoding="utf-8",
|
||||
)
|
||||
|
||||
second_result = run_cli("-config", str(second_config))
|
||||
self.assertEqual(second_result.returncode, 0)
|
||||
|
||||
agents_index = (root / ".agents" / "index.md").read_text(encoding="utf-8")
|
||||
self.assertIn("`.agents/tsl/index.md`", agents_index)
|
||||
self.assertIn("`.agents/cpp/index.md`", agents_index)
|
||||
|
||||
def test_sync_standards_agents_block_has_blank_lines(self):
|
||||
with tempfile.TemporaryDirectory() as tmp_dir:
|
||||
config_body = f"""
|
||||
|
||||
Reference in New Issue
Block a user