Make research skill self-contained without external scripts
- Rewrite SKILL.md with inline instructions to spawn g3 --agent scout directly - Extend read_file to handle embedded skill paths (<embedded:name>/SKILL.md) - Remove scripts field from EmbeddedSkill struct (no longer needed) - Delete extraction.rs module (was only for script extraction) - Delete g3-research bash script - Remove obsolete Async Research Tool section from workspace memory Skills are now fully portable - they work when g3 is installed as a binary without access to source files. Agents can read embedded skill content via read_file with the special <embedded:...> path syntax.
This commit is contained in:
@@ -12,15 +12,13 @@
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
/// An embedded skill with its SKILL.md content and optional scripts.
|
||||
/// An embedded skill with its SKILL.md content.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct EmbeddedSkill {
|
||||
/// Skill name (must match the name in SKILL.md frontmatter)
|
||||
pub name: &'static str,
|
||||
/// Content of SKILL.md
|
||||
pub skill_md: &'static str,
|
||||
/// Scripts bundled with the skill: (filename, content)
|
||||
pub scripts: &'static [(&'static str, &'static str)],
|
||||
}
|
||||
|
||||
/// All embedded skills, compiled into the binary.
|
||||
@@ -32,9 +30,6 @@ static EMBEDDED_SKILLS: &[EmbeddedSkill] = &[
|
||||
EmbeddedSkill {
|
||||
name: "research",
|
||||
skill_md: include_str!("../../../../skills/research/SKILL.md"),
|
||||
scripts: &[
|
||||
("g3-research", include_str!("../../../../skills/research/g3-research")),
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@@ -70,7 +65,6 @@ mod tests {
|
||||
|
||||
let skill = skill.unwrap();
|
||||
assert!(skill.skill_md.contains("name: research"), "SKILL.md should have name field");
|
||||
assert!(!skill.scripts.is_empty(), "Research skill should have scripts");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
||||
Reference in New Issue
Block a user