You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Follow-up polish after #223 / PR #229 (to_gemini_tool() returns types.Tool with sanitized names). Core fix and required doc updates land in that PR; this issue tracks regression prevention and contributor guidance so Gemini snippets do not drift back.
Scope
Test coverage — extend tests/test_loader.py:
Assert finance/wallet_screening → finance_wallet_screening in to_gemini_tool() output
Assert return type is google.genai.types.Tool (not dict)
Contributor docs — short additions:
docs/usage/gemini.md — one paragraph on dispatch: match function_call.name to sanitized name (SkillLoader._sanitize_function_tool_name(manifest["name"])) or adapter-derived name
docs/usage/skill_usage_template.md — same rule for new skill catalog Gemini blocks
#229 fixes the bug and aligns examples; without guardrails, catalog pages and copy-paste snippets can regress (we already had manual types.Tool workarounds in three skill docs). A sanitization test is cheap insurance. An optional markdown lint catches the same failure mode #178 addresses for examples, but for docs/skills/ where agents copy integration code verbatim.
Update gemini.md + skill_usage_template.md with canonical dispatch one-liner.
Phase 2
Parametrize over docs/skills/*.md (exclude README); regex or simple string checks for anti-patterns listed above. Grandfather none after #229 doc pass is merged.
Feature Description
Follow-up polish after #223 / PR #229 (
to_gemini_tool()returnstypes.Toolwith sanitized names). Core fix and required doc updates land in that PR; this issue tracks regression prevention and contributor guidance so Gemini snippets do not drift back.Scope
Test coverage — extend
tests/test_loader.py:finance/wallet_screening→finance_wallet_screeninginto_gemini_tool()outputgoogle.genai.types.Tool(not dict)Contributor docs — short additions:
docs/usage/gemini.md— one paragraph on dispatch: matchfunction_call.nameto sanitized name (SkillLoader._sanitize_function_tool_name(manifest["name"])) or adapter-derived namedocs/usage/skill_usage_template.md— same rule for new skill catalog Gemini blocksCHANGELOG hygiene — if Fix: to_gemini_tool to return types.Tool object. Fixes #223 #229 only lists under
Fixed, addChangedbullet notingto_gemini_tool()return type change (dict→types.Tool) for programmatic callersGuardrail — extend
tests/test_registry_docs.pyor addtests/test_skill_docs_gemini.pyto fail whendocs/skills/*.mdGemini sections contain:tool_decl["name"]/gemini_decl["name"]mutationtypes.Tool(function_declarations=[manual wrap afterto_gemini_tool()function_call.name == bundle["manifest"]["name"]without sanitize (registry IDs with/)Out of scope
agent_loops.md,cli.md, five catalog pages)examples/*.pydispatch)Rationale
#229 fixes the bug and aligns examples; without guardrails, catalog pages and copy-paste snippets can regress (we already had manual
types.Toolworkarounds in three skill docs). A sanitization test is cheap insurance. An optional markdown lint catches the same failure mode #178 addresses for examples, but fordocs/skills/where agents copy integration code verbatim.Implementation Idea
Phase 1 (minimal — good first issue)
Add to
test_to_gemini_tool:Update
gemini.md+skill_usage_template.mdwith canonical dispatch one-liner.Phase 2
Parametrize over
docs/skills/*.md(exclude README); regex or simple string checks for anti-patterns listed above. Grandfather none after #229 doc pass is merged.Acceptance
tests/test_loader.pygemini.md+skill_usage_template.mdmention sanitized dispatchCHANGELOGChangednote if not already in Fix: to_gemini_tool to return types.Tool object. Fixes #223 #229