Skip to main content

resources/
lib.rs

1//! System prompt and resource assembly, ported from packages/coding-agent/src/core/{system-prompt,skills,
2//! resource-loader}.ts and src/ultron/rlm/prompt.ts.
3
4pub mod context_files;
5pub mod frontmatter;
6pub mod ignore;
7pub mod keep_going;
8pub mod model_notes;
9pub mod paths;
10pub mod persona;
11pub mod prompt_files;
12pub mod prompt_templates;
13pub mod runtime_guide;
14pub mod skills;
15pub mod system_prompt;
16
17/// A non-fatal problem found while loading resources (`ResourceDiagnostic`).
18#[derive(Clone, Debug, PartialEq, Eq)]
19pub struct Diagnostic {
20    /// "warning" or "collision".
21    pub kind: &'static str,
22    pub message: String,
23    pub path: Option<String>,
24    /// For collisions: (winner path, loser path).
25    pub collision: Option<(String, String)>,
26}
27
28impl Diagnostic {
29    pub(crate) fn warning(message: impl Into<String>, path: Option<&str>) -> Self {
30        Self {
31            kind: "warning",
32            message: message.into(),
33            path: path.map(str::to_string),
34            collision: None,
35        }
36    }
37}