feat: implement Agent Skills specification support
Implements the Agent Skills specification (https://agentskills.io) for portable skill packages that give the agent new capabilities. Changes: - Add skills module with SKILL.md parser (YAML frontmatter + markdown body) - Implement skill discovery from ~/.g3/skills/, config extra_paths, and .g3/skills/ - Generate <available_skills> XML for system prompt injection - Add SkillsConfig to g3-config with enabled flag and extra_paths - Wire skills discovery into CLI startup - Add 29 unit tests for parser, discovery, and prompt generation - Update README with Agent Skills documentation Skill locations (priority order): 1. ~/.g3/skills/ (global) 2. Config extra_paths 3. .g3/skills/ (workspace, highest priority) At startup, g3 scans skill directories and injects a summary into the system prompt. When the agent needs a skill, it reads the full SKILL.md using the read_file tool.
This commit is contained in:
@@ -23,6 +23,7 @@ pub mod tools;
|
||||
pub mod ui_writer;
|
||||
pub mod utils;
|
||||
pub mod webdriver_session;
|
||||
pub mod skills;
|
||||
|
||||
pub use feedback_extraction::{
|
||||
extract_coach_feedback, ExtractedFeedback, FeedbackExtractionConfig, FeedbackSource,
|
||||
@@ -42,7 +43,13 @@ pub use context_window::{ContextWindow, ThinResult, ThinScope};
|
||||
pub use pending_research::{PendingResearchManager, ResearchCompletionNotification, ResearchStatus};
|
||||
|
||||
// Export agent prompt generation for CLI use
|
||||
pub use prompts::get_agent_system_prompt;
|
||||
pub use prompts::{
|
||||
get_agent_system_prompt, get_agent_system_prompt_with_skills,
|
||||
get_system_prompt_for_native_with_skills, get_system_prompt_for_non_native_with_skills,
|
||||
};
|
||||
|
||||
// Export skills module
|
||||
pub use skills::{Skill, discover_skills, generate_skills_prompt};
|
||||
|
||||
#[cfg(test)]
|
||||
mod task_result_comprehensive_tests;
|
||||
|
||||
Reference in New Issue
Block a user