feat(ai): 30 skills integres et prompts enrichis
This commit is contained in:
+27
-4
@@ -33,20 +33,43 @@ USER = {"username": "alice"}
|
||||
class TestBuiltinSkills:
|
||||
def test_expected_skills_present(self):
|
||||
ids = {s["id"] for s in BUILTIN_SKILLS}
|
||||
for expected in [
|
||||
expected = {
|
||||
# Base
|
||||
"research", "create-new-skill", "resume", "actions", "reformuler",
|
||||
"correction", "brainstorm", "plan", "ask", "meeting-note", "livrable",
|
||||
]:
|
||||
assert expected in ids
|
||||
# Extraction & structuration
|
||||
"extract", "timeline", "glossary", "tag",
|
||||
# Transformation & adaptation
|
||||
"translate", "adapt", "clean", "summary-progressive",
|
||||
# Analyse critique & décision
|
||||
"critique", "compare", "prioritize", "swot", "debate",
|
||||
# Apprentissage & mémorisation
|
||||
"quiz", "reading-note", "qa-generator",
|
||||
# Méta-gestion & confidentialité
|
||||
"link", "anonymize", "estimate",
|
||||
}
|
||||
assert expected <= ids
|
||||
|
||||
def test_ids_unique_and_valid(self):
|
||||
ids = [s["id"] for s in BUILTIN_SKILLS]
|
||||
assert len(ids) == len(set(ids))
|
||||
for skill_id in ids:
|
||||
assert skills_mod._SKILL_ID_RE.match(skill_id), skill_id
|
||||
|
||||
def test_every_skill_has_label_and_description(self):
|
||||
for skill in BUILTIN_SKILLS:
|
||||
assert skill["label"]
|
||||
assert skill["description"]
|
||||
assert skill.get("icon")
|
||||
|
||||
def test_every_skill_has_prompt_with_common_rules(self):
|
||||
for skill in BUILTIN_SKILLS:
|
||||
assert skill.get("prompt"), skill["id"]
|
||||
assert skills_mod.COMMON_RULES in skill["prompt"], skill["id"]
|
||||
|
||||
def test_builtin_prompt_resolves(self, skill_store):
|
||||
prompt = get_skill_prompt("research", USER)
|
||||
assert prompt and "RECHERCHE" in prompt
|
||||
assert prompt and "analyste de recherche documentaire" in prompt
|
||||
|
||||
def test_unknown_skill_returns_none(self, skill_store):
|
||||
assert get_skill_prompt("does-not-exist", USER) is None
|
||||
|
||||
Reference in New Issue
Block a user