diff options
| author | main <main@swarm.moe> | 2026-03-19 10:15:18 -0400 |
|---|---|---|
| committer | main <main@swarm.moe> | 2026-03-19 10:15:18 -0400 |
| commit | 7b9bd8b42883f82b090718175b8316296ef18236 (patch) | |
| tree | 16f2c70b0f630c7757d72a20bd90d17c2e3a8414 /crates/fidget-spinner-cli/src/bundled_skill.rs | |
| download | fidget_spinner-7b9bd8b42883f82b090718175b8316296ef18236.zip | |
Initial Fidget Spinner MVP
Diffstat (limited to 'crates/fidget-spinner-cli/src/bundled_skill.rs')
| -rw-r--r-- | crates/fidget-spinner-cli/src/bundled_skill.rs | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/crates/fidget-spinner-cli/src/bundled_skill.rs b/crates/fidget-spinner-cli/src/bundled_skill.rs new file mode 100644 index 0000000..85760bc --- /dev/null +++ b/crates/fidget-spinner-cli/src/bundled_skill.rs @@ -0,0 +1,69 @@ +use serde::Serialize; + +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +pub(crate) struct BundledSkill { + pub name: &'static str, + pub description: &'static str, + pub resource_uri: &'static str, + pub body: &'static str, +} + +#[derive(Clone, Copy, Debug, Eq, PartialEq, Serialize)] +pub(crate) struct BundledSkillSummary { + pub name: &'static str, + pub description: &'static str, + pub resource_uri: &'static str, +} + +impl BundledSkill { + #[must_use] + pub const fn summary(self) -> BundledSkillSummary { + BundledSkillSummary { + name: self.name, + description: self.description, + resource_uri: self.resource_uri, + } + } +} + +const BUNDLED_SKILLS: [BundledSkill; 2] = [ + BundledSkill { + name: "fidget-spinner", + description: "Base skill for working inside a Fidget Spinner project through the local DAG and MCP surface.", + resource_uri: "fidget-spinner://skill/fidget-spinner", + body: include_str!("../../../assets/codex-skills/fidget-spinner/SKILL.md"), + }, + BundledSkill { + name: "frontier-loop", + description: "Aggressive autonomous frontier-push specialization for Fidget Spinner.", + resource_uri: "fidget-spinner://skill/frontier-loop", + body: include_str!("../../../assets/codex-skills/frontier-loop/SKILL.md"), + }, +]; + +#[must_use] +pub(crate) const fn default_bundled_skill() -> BundledSkill { + BUNDLED_SKILLS[0] +} + +#[must_use] +pub(crate) const fn frontier_loop_bundled_skill() -> BundledSkill { + BUNDLED_SKILLS[1] +} + +#[must_use] +pub(crate) fn bundled_skill(name: &str) -> Option<BundledSkill> { + BUNDLED_SKILLS + .iter() + .copied() + .find(|skill| skill.name == name) +} + +#[must_use] +pub(crate) fn bundled_skill_summaries() -> Vec<BundledSkillSummary> { + BUNDLED_SKILLS + .iter() + .copied() + .map(BundledSkill::summary) + .collect() +} |