♻️ refactor(skills): rename repo skills source dir
move the repository skills source from `codex/skills` to `skills`. update vendor/install_skills paths, thirdparty sync pipeline, docs, and regression tests, including deployment-route e2e coverage.
This commit is contained in:
@@ -14,9 +14,9 @@ LEGACY_WORKFLOW = ROOT / ".gitea" / "workflows" / "update-thirdparty-superpowers
|
||||
UPDATE_SCRIPT = ROOT / ".gitea" / "ci" / "update_thirdparty_skills.sh"
|
||||
SYNC_SCRIPT = ROOT / ".gitea" / "ci" / "sync_thirdparty_skills.sh"
|
||||
SKILLS_MD = ROOT / "SKILLS.md"
|
||||
SUPERPOWERS_LIST = ROOT / "codex" / "skills" / "thirdparty" / ".sources" / "superpowers.list"
|
||||
UI_UX_PRO_MAX_LIST = ROOT / "codex" / "skills" / "thirdparty" / ".sources" / "ui-ux-pro-max.list"
|
||||
UI_UX_PRO_MAX_DIR = ROOT / "codex" / "skills" / "thirdparty" / "ui-ux-pro-max"
|
||||
SUPERPOWERS_LIST = ROOT / "skills" / "thirdparty" / ".sources" / "superpowers.list"
|
||||
UI_UX_PRO_MAX_LIST = ROOT / "skills" / "thirdparty" / ".sources" / "ui-ux-pro-max.list"
|
||||
UI_UX_PRO_MAX_DIR = ROOT / "skills" / "thirdparty" / "ui-ux-pro-max"
|
||||
|
||||
|
||||
def load_manifest() -> dict:
|
||||
@@ -58,13 +58,13 @@ class ThirdpartySkillsPipelineTests(unittest.TestCase):
|
||||
self.assertEqual(karpathy["snapshot_dir"], "andrej-karpathy-skills")
|
||||
self.assertEqual(karpathy["skills_subdir"], "skills")
|
||||
self.assertEqual(
|
||||
karpathy["source_list"], "codex/skills/thirdparty/.sources/andrej-karpathy-skills.list"
|
||||
karpathy["source_list"], "skills/thirdparty/.sources/andrej-karpathy-skills.list"
|
||||
)
|
||||
|
||||
def test_ui_ux_pro_max_uses_render_codex_skill_sync_mode(self):
|
||||
def test_ui_ux_pro_max_uses_render_skill_sync_mode(self):
|
||||
data = load_manifest()
|
||||
ui_skill = next(item for item in data["sources"] if item["id"] == "ui-ux-pro-max")
|
||||
self.assertEqual(ui_skill["sync_mode"], "render_codex_skill")
|
||||
self.assertEqual(ui_skill["sync_mode"], "render_skill")
|
||||
self.assertEqual(ui_skill["snapshot_dir"], "ui-ux-pro-max")
|
||||
|
||||
def test_superpowers_manifest_prunes_non_superpowers_paths(self):
|
||||
@@ -105,7 +105,7 @@ class ThirdpartySkillsPipelineTests(unittest.TestCase):
|
||||
def test_skills_doc_points_to_generic_thirdparty_sources(self):
|
||||
text = SKILLS_MD.read_text(encoding="utf-8")
|
||||
self.assertIn("## 9. Third-party Skills", text)
|
||||
self.assertIn("来源:`codex/skills/thirdparty/.sources/`(第三方来源清单目录)。", text)
|
||||
self.assertIn("来源:`skills/thirdparty/.sources/`(第三方来源清单目录)。", text)
|
||||
self.assertNotIn("Third-party Skills (superpowers)", text)
|
||||
|
||||
def test_superpowers_and_ui_ux_pro_max_source_lists_exist(self):
|
||||
@@ -160,6 +160,7 @@ class ThirdpartySkillsPipelineTests(unittest.TestCase):
|
||||
self.assertEqual(set_remote.returncode, 0, msg=set_remote.stderr)
|
||||
|
||||
shutil.copy2(MANIFEST, work / ".gitea" / "ci" / "thirdparty_skills.json")
|
||||
shutil.copy2(SYNC_SCRIPT, work / ".gitea" / "ci" / "sync_thirdparty_skills.sh")
|
||||
|
||||
sync_result = run_command("bash", ".gitea/ci/sync_thirdparty_skills.sh", cwd=work)
|
||||
self.assertEqual(
|
||||
@@ -169,10 +170,10 @@ class ThirdpartySkillsPipelineTests(unittest.TestCase):
|
||||
)
|
||||
|
||||
generated_list = (
|
||||
work / "codex" / "skills" / "thirdparty" / ".sources" / "andrej-karpathy-skills.list"
|
||||
work / "skills" / "thirdparty" / ".sources" / "andrej-karpathy-skills.list"
|
||||
)
|
||||
generated_skill = (
|
||||
work / "codex" / "skills" / "thirdparty" / "karpathy-guidelines" / "SKILL.md"
|
||||
work / "skills" / "thirdparty" / "karpathy-guidelines" / "SKILL.md"
|
||||
)
|
||||
self.assertTrue(generated_list.is_file())
|
||||
self.assertTrue(generated_skill.is_file())
|
||||
|
||||
Reference in New Issue
Block a user