♻️ refactor(tsl-api-reference): split lookup workflows and maintenance tooling

This commit is contained in:
csh
2026-08-20 17:47:48 +08:00
parent 9b95bf2682
commit cd0405d64b
18 changed files with 707 additions and 374 deletions
+54
View File
@@ -338,6 +338,60 @@ no_backup = true
).is_file()
)
def test_tsl_api_install_excludes_codegen_dictionary_builder(self):
self.assertTrue(
(ROOT / "tools" / "tsl-codegen" / "scripts" / "build_dictionary.py").is_file()
)
self.assertFalse(
(
ROOT
/ "skills"
/ "tsl-api-reference"
/ "scripts"
/ "build_dictionary.py"
).exists()
)
with tempfile.TemporaryDirectory() as tmp_dir:
project_root = Path(tmp_dir) / "project"
project_root.mkdir()
config = project_root / "playbook.toml"
config.write_text(
"""
[playbook]
project_root = "."
playbook_root = "custom/playbook"
install_mode = "snapshot"
[install_skills]
agents_home = ".test-agents"
mode = "list"
skills = ["tsl-api-reference"]
no_backup = true
""".lstrip(),
encoding="utf-8",
newline="\n",
)
result = run_playbook(SCRIPT, config, project_root)
self.assertEqual(0, result.returncode, result.stderr)
installed = (
project_root
/ ".test-agents"
/ "skills"
/ "tsl-api-reference"
)
self.assertTrue((installed / "scripts" / "class_lookup.py").is_file())
self.assertTrue((installed / "workflows" / "api-lookup.md").is_file())
self.assertTrue(
(installed / "workflows" / "class-and-framework.md").is_file()
)
self.assertTrue(
(installed / "workflows" / "dictionary-lookup.md").is_file()
)
self.assertFalse((installed / "scripts" / "build_dictionary.py").exists())
self.assertFalse((installed / "references" / "maintenance.md").exists())
def test_invalid_toml_is_reported_without_a_traceback(self):
with tempfile.TemporaryDirectory() as tmp_dir:
project_root = Path(tmp_dir) / "project"