Skip to content

World's first open-source, agentic video production system. 12 production pipelines, 100+ tools, 700+ agent skill and production-knowledge files. Turn your AI coding assistant into a full video production studio.

fix(tools): make every agent_skills pointer resolve

[email protected]bb59e1a4c110
diff --git a/tests/contracts/test_agent_skill_pointers.py b/tests/contracts/test_agent_skill_pointers.py
new file mode 100644
index 00000000..5a4dcdc7
--- /dev/null
+++ b/tests/contracts/test_agent_skill_pointers.py
@@ -0,0 +1,70 @@
+"""Every `agent_skills` pointer a tool advertises must resolve to a real skill.
+
+AGENT_GUIDE.md makes Layer 3 mandatory:
+
+ Every generation tool has an `agent_skills` field listing its Layer 3
+ skills. [...] Read them before writing prompts. Layer 3 is not optional.
+
+A pointer that resolves to nothing cannot be read, so the mandated step is
+silently skipped — and `tts_selector` republishes the list to its caller as
+`required_agent_skills`, propagating the dead name.
+
+The registry is iterated rather than named so a newly added tool is covered
+the moment it is discovered.
+"""
+
+from pathlib import Path
+
+import pytest
+
+from tools.tool_registry import registry
+
+REPO_ROOT = Path(__file__).resolve().parents[2]
+SKILLS_ROOT = REPO_ROOT / ".agents" / "skills"
+
+
+def _discovered_tools() -> list[tuple[str, list[str]]]:
+ registry.discover()
+ pairs: list[tuple[str, list[str]]] = []
+ for name, tool in sorted(registry._tools.items()):
+ try:
+ info = tool.get_info()
+ except Exception: # a tool that cannot introspect is another test's problem
+ continue
+ pairs.append((name, list(info.get("agent_skills") or [])))
+ return pairs
+
+
+TOOLS = _discovered_tools()
+POINTERS = [(name, skill) for name, skills in TOOLS for skill in skills]
+
+
+def _resolves(skill: str) -> bool:
+ return (SKILLS_ROOT / skill / "SKILL.md").exists() or (
+ SKILLS_ROOT / f"{skill}.md"
+ ).exists()
+
+
+def test_registry_actually_discovered_tools() -> None:
+ assert TOOLS, "registry.discover() found no tools"
+
+
+def test_some_tools_declare_layer_three_skills() -> None:
+ """Guard against the parametrized test below silently covering nothing."""
+ assert POINTERS
+
+
[email protected](("tool", "skill"), POINTERS, ids=lambda v: str(v))
+def test_agent_skill_pointer_resolves(tool: str, skill: str) -> None:
+ """Regression: four pointers named skills that do not exist.
+
+ - hyperframes_compose -> `website-to-hyperframes`, renamed upstream to
+ `website-to-video` (recorded in .agents/skills/hyperframes/PROVENANCE.md)
+ - openai_tts, tts_selector -> `openai-docs`, never vendored
+ - screen_capture_selector -> `screen-demo`, which names the Layer 2
+ pipeline directory rather than a Layer 3 skill
+ """
+ assert _resolves(skill), (
+ f"{tool} advertises agent_skill {skill!r}, but neither "
+ f".agents/skills/{skill}/SKILL.md nor .agents/skills/{skill}.md exists"
+ )
diff --git a/tools/audio/openai_tts.py b/tools/audio/openai_tts.py
index 52d4259c..4d2b1c5e 100644
--- a/tools/audio/openai_tts.py
+++ b/tools/audio/openai_tts.py
@@ -40,7 +40,10 @@ class OpenAITTS(BaseTool):
)
fallback = "piper_tts"
fallback_tools = ["piper_tts"]
- agent_skills = ["openai-docs"]
+ # No Layer 3 skill is vendored for the OpenAI speech API. The nearest
+ # candidate, `text-to-speech`, documents HeyGen's Starfish endpoints and
+ # would send the agent at the wrong provider, so this stays empty rather
+ # than pointing somewhere misleading.
capabilities = [
"text_to_speech",
diff --git a/tools/audio/tts_selector.py b/tools/audio/tts_selector.py
index 5c20cd57..9c8806b2 100644
--- a/tools/audio/tts_selector.py
+++ b/tools/audio/tts_selector.py
@@ -20,7 +20,7 @@ class TTSSelector(BaseTool):
provider = "selector"
stability = ToolStability.BETA
runtime = ToolRuntime.HYBRID
- agent_skills = ["text-to-speech", "elevenlabs", "openai-docs"]
+ agent_skills = ["text-to-speech", "elevenlabs"]
capabilities = [
"text_to_speech",
diff --git a/tools/capture/screen_capture_selector.py b/tools/capture/screen_capture_selector.py
index 0d7edea1..acff1ad8 100644
--- a/tools/capture/screen_capture_selector.py
+++ b/tools/capture/screen_capture_selector.py
@@ -35,7 +35,11 @@ class ScreenCaptureSelector(BaseTool):
determinism = Determinism.DETERMINISTIC
runtime = ToolRuntime.HYBRID
- agent_skills = ["screen-demo"]
+ # `screen-demo` named the Layer 2 pipeline directory, not a Layer 3 skill,
+ # so it never resolved. No Layer 3 skill covers OS screen capture — the
+ # capture guidance this selector needs lives in the pipeline manifest's
+ # per-stage `skill:` entries (skills/pipelines/screen-demo/), which the
+ # agent already reads.
capabilities = [
"screen_recording",
diff --git a/tools/video/hyperframes_compose.py b/tools/video/hyperframes_compose.py
index 7511b686..4e0c1a85 100644
--- a/tools/video/hyperframes_compose.py
+++ b/tools/video/hyperframes_compose.py
@@ -72,7 +72,7 @@ class HyperFramesCompose(BaseTool):
"hyperframes",
"hyperframes-cli",
"hyperframes-registry",
- "website-to-hyperframes",
+ "website-to-video",
"gsap-core",
"gsap-timeline",
]