forked from cleveragents/cleveragents-core
25c571541f
Add agent skills discovery system that scans configurable filesystem paths for Agent Skills Standard folders (containing SKILL.md with YAML front-matter) and registers them as tools in ToolRegistry. Core implementation: - New skills/discovery.py module with path parsing, directory scanning, SKILL.md front-matter parsing, ToolSpec building, and registration with configurable conflict handling (skip/error/replace strategies) - Config key skills.agent_skills_paths for comma-separated discovery paths - ToolSpec extended with source and source_metadata fields for provenance - ToolRegistry.list_tools() gains source filter parameter - SkillRegistryService rewritten with discover_and_register() and refresh_agent_skills() hooks for on-demand re-scanning - CLI "agents skill tools" command updated with --refresh flag and source metadata in JSON output Testing: - 27 Behave scenarios covering config key, path parsing, discovery, ToolSpec building, registration, conflict handling, refresh, edge cases (invalid YAML, empty front-matter, non-dict YAML, empty descriptions, noop handler), and source metadata - 10 Robot Framework integration tests for end-to-end discovery flow - ASV benchmarks for discovery scan performance overhead Documentation: - docs/reference/skill_registry.md updated with Agent Skills Discovery section covering config, algorithm, SKILL.md format, conflict handling, refresh hook, CLI output, and service API ISSUES CLOSED: #161