Add carmack.rust.md agent-specific language prompt
Rust-specific readability guidance for the carmack agent including: - let...else example for shallow control flow - Async: don't block the runtime (tokio::fs, spawn_blocking, Send) - Visibility: prefer pub(crate), private fields with accessors - Generics: impl Trait over explicit params, avoid complex where clauses - Improved iterator guidance: if you need a comment, use a loop - UTF-8 string slicing warnings - Ownership/lifetime pragmatism - Anti-patterns: no macros/typestate/proc-macros unless already in repo Also adds Rust detection to LANGUAGE_PROMPTS (empty base prompt, agent-specific prompts handle the guidance).
This commit is contained in:
@@ -11,6 +11,11 @@ use std::path::Path;
|
||||
/// The key should match common file extensions or language identifiers.
|
||||
static LANGUAGE_PROMPTS: &[(&str, &[&str], &str)] = &[
|
||||
// (language_name, file_extensions, prompt_content)
|
||||
(
|
||||
"rust",
|
||||
&[".rs"],
|
||||
"", // No base Rust prompt; agent-specific prompts handle this
|
||||
),
|
||||
(
|
||||
"racket",
|
||||
&[".rkt", ".rktl", ".rktd", ".scrbl"],
|
||||
@@ -23,6 +28,7 @@ static LANGUAGE_PROMPTS: &[(&str, &[&str], &str)] = &[
|
||||
static AGENT_LANGUAGE_PROMPTS: &[(&str, &str, &str)] = &[
|
||||
// (agent_name, language_name, prompt_content)
|
||||
("carmack", "racket", include_str!("../../../prompts/langs/carmack.racket.md")),
|
||||
("carmack", "rust", include_str!("../../../prompts/langs/carmack.rust.md")),
|
||||
];
|
||||
|
||||
/// Detect languages present in the workspace by scanning for file extensions.
|
||||
|
||||
Reference in New Issue
Block a user