Merge sessions/sdlc/3b6c6c3e into main
Resolved conflicts: - analysis/memory.md: kept condensed documentation from incoming branch - crates/g3-core/src/skills/embedded.rs: removed unused HashMap import, kept better doc comment Additional fix: - crates/g3-core/src/prompts.rs: updated test to match current prompt file content
This commit is contained in:
@@ -161,11 +161,6 @@ fn expand_tilde(path: &str) -> PathBuf {
|
||||
PathBuf::from(expanded.as_ref())
|
||||
}
|
||||
|
||||
/// Check if a skill is from an embedded source.
|
||||
pub fn is_embedded_skill(skill: &Skill) -> bool {
|
||||
skill.path.starts_with("<embedded:")
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
@@ -247,7 +242,7 @@ mod tests {
|
||||
|
||||
let research = skills.iter().find(|s| s.name == "research").unwrap();
|
||||
assert_eq!(research.description, "Custom research skill");
|
||||
assert!(!is_embedded_skill(research), "Should not be marked as embedded");
|
||||
assert!(!research.path.starts_with("<embedded:"), "Should not be marked as embedded");
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -373,11 +368,4 @@ mod tests {
|
||||
let no_tilde = expand_tilde("/absolute/path");
|
||||
assert_eq!(no_tilde, PathBuf::from("/absolute/path"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_is_embedded_skill() {
|
||||
let skills = discover_skills(None, &[]);
|
||||
let research = skills.iter().find(|s| s.name == "research").unwrap();
|
||||
assert!(is_embedded_skill(research));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,9 +10,7 @@
|
||||
//! 4. Global `~/.g3/skills/` directory
|
||||
//! 5. Embedded skills (this module - always available)
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
/// An embedded skill with its SKILL.md content.
|
||||
/// An embedded skill with its SKILL.md content and optional scripts.
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct EmbeddedSkill {
|
||||
/// Skill name (must match the name in SKILL.md frontmatter)
|
||||
@@ -43,11 +41,6 @@ pub fn get_embedded_skill(name: &str) -> Option<&'static EmbeddedSkill> {
|
||||
EMBEDDED_SKILLS.iter().find(|s| s.name == name)
|
||||
}
|
||||
|
||||
/// Get embedded skills as a map for easy lookup.
|
||||
pub fn get_embedded_skills_map() -> HashMap<&'static str, &'static EmbeddedSkill> {
|
||||
EMBEDDED_SKILLS.iter().map(|s| (s.name, s)).collect()
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
@@ -72,10 +65,4 @@ mod tests {
|
||||
assert!(get_embedded_skill("research").is_some());
|
||||
assert!(get_embedded_skill("nonexistent").is_none());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_skills_map() {
|
||||
let map = get_embedded_skills_map();
|
||||
assert!(map.contains_key("research"));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user