agit 1.3.0

AI-native Git wrapper for capturing context alongside code
Documentation
//! AI tool instruction file templates.
//!
//! These templates are generated by `agit init` to automatically
//! configure AI coding assistants to log their thoughts to AGIT.

mod claude;
mod cursor;

pub use claude::{generate_claude_md_template, CLAUDE_MD_TEMPLATE};
pub use cursor::{generate_cursorrules_template, CURSORRULES_TEMPLATE};

/// The current AGIT version from Cargo.toml.
pub const AGIT_VERSION: &str = env!("CARGO_PKG_VERSION");

/// The system protocol content (without header).
/// This is the content that gets replaced during `agit init --update`.
pub const SYSTEM_PROTOCOL_CONTENT: &str = include_str!("protocol_content.txt");

/// All template files that should be generated by `agit init`.
pub const TEMPLATE_FILES: &[(&str, &str)] = &[
    ("CLAUDE.md", CLAUDE_MD_TEMPLATE),
    (".cursorrules", CURSORRULES_TEMPLATE),
];

/// Generate the system protocol block with version stamp.
pub fn generate_versioned_protocol() -> String {
    format!(
        r#"<system_protocol version="{}">
{}
</system_protocol>"#,
        AGIT_VERSION, SYSTEM_PROTOCOL_CONTENT
    )
}