ralph/commands/context/mod.rs
1//! Project context (AGENTS.md) generation and management.
2//!
3//! Responsibilities:
4//! - Generate initial AGENTS.md from project type detection.
5//! - Update AGENTS.md with new learnings.
6//! - Validate AGENTS.md against project structure.
7//!
8//! Not handled here:
9//! - CLI argument parsing (see `cli::context`).
10//! - Interactive prompts (see `wizard` module).
11//!
12//! Invariants/assumptions:
13//! - Templates are embedded at compile time.
14//! - Project type detection uses simple file-based heuristics.
15//! - AGENTS.md updates preserve manual edits (section-based merging).
16
17mod detect;
18mod markdown;
19mod render;
20mod types;
21mod validate;
22mod workflow;
23
24pub mod merge;
25pub mod wizard;
26
27pub use types::{
28 ContextInitOptions, ContextUpdateOptions, ContextValidateOptions, DetectedProjectType,
29 FileInitStatus, InitReport, UpdateReport, ValidateReport,
30};
31pub use workflow::{run_context_init, run_context_update, run_context_validate};
32
33#[cfg(test)]
34mod tests;