Skip to main content

devboy_skills/
lib.rs

1//! Procedural skills on top of the `devboy-tools` bundle.
2//!
3//! This crate provides:
4//!
5//! - A [`SkillSource`] trait for pluggable skill backends
6//! - An [`EmbeddedSkillSource`] that ships baseline SKILL.md files
7//!   inside the binary (via `rust-embed`)
8//! - The [`Skill`] / [`Frontmatter`] types, including YAML frontmatter
9//!   parsing with a fixed required-field set and extensible unknown
10//!   fields
11//! - A [`Catalog`] for filtering / counting skill summaries
12//! - Per-location install [`Manifest`]s with SHA256-based three-state
13//!   collision detection ([`classify`])
14//! - The paired [`HistoricalHashes`] registry embedded at build time so
15//!   that upgrade flows can distinguish "unchanged", "historical-safe",
16//!   and "user-modified" files offline
17//!
18//! The design decisions are captured, at the repository root, in
19//! `docs/architecture/adr/ADR-012-skills-subsystem.md` (architecture +
20//! CLI surface), `ADR-013-skills-install-targets.md` (install target
21//! resolution), and `ADR-014-skills-lifecycle.md` (manifest,
22//! three-state upgrade).
23
24#![deny(rustdoc::broken_intra_doc_links)]
25#![deny(rustdoc::private_intra_doc_links)]
26#![deny(rustdoc::invalid_html_tags)]
27
28pub mod catalog;
29pub mod embedded;
30pub mod error;
31pub mod install;
32pub mod manifest;
33pub mod plugin_dedup;
34pub mod skill;
35pub mod source;
36pub mod trace;
37
38pub use catalog::{Catalog, canonical_skill_name};
39pub use embedded::EmbeddedSkillSource;
40pub use error::{Result, SkillError};
41pub use install::{
42    Agent, Environment, InstallOptions, InstallOutcome, InstallReport, InstallSpec, InstallTarget,
43    LegacySkill, detect_installed_agents, install_skills_to_target,
44    migrate_legacy_skills_at_target, remove_skills_from_target, resolve_targets,
45    scan_legacy_skills_at_target,
46};
47pub use manifest::{
48    HistoricalHashes, HistoricalVersion, InstallState, InstalledFile, InstalledSkill,
49    MANIFEST_FILE, MANIFEST_VERSION, Manifest, SkillHistory, classify, classify_path, sha256_hex,
50};
51pub use plugin_dedup::{
52    DEVBOY_PLUGIN, PluginId, is_claude_plugin_enabled, is_codex_plugin_enabled,
53};
54pub use skill::{Category, Frontmatter, Skill, SkillSummary};
55pub use source::SkillSource;
56pub use trace::{
57    Outcome as TraceOutcome, Phase as TracePhase, SessionMeta, SessionTracer, TraceRecord,
58    TraceTarget, append_event, create_session, finalise_session,
59};