Add language-specific prompt injection for toolchain guidance

- Add language_prompts module that auto-detects programming languages in workspace
- Scan for language files with depth limit (2) to inject relevant toolchain prompts
- Add prompts/langs/ directory for language-specific markdown files
- Include Racket/raco toolchain guidance as first language prompt
- Update combine_project_content() to accept language_content parameter
- Integrate language detection into main CLI flow and agent mode
- Update project memory with new feature documentation
This commit is contained in:
Dhanji R. Prasanna
2026-01-14 21:00:52 +05:30
parent 716d598bd8
commit afec65fd50
6 changed files with 230 additions and 6 deletions

View File

@@ -5,6 +5,7 @@ pub mod metrics;
pub mod project_files;
pub mod streaming_markdown;
pub mod embedded_agents;
pub mod language_prompts;
mod accumulative;
mod agent_mode;
@@ -98,6 +99,7 @@ pub async fn run() -> Result<()> {
let agents_content = read_agents_config(&workspace_dir);
let readme_content = read_project_readme(&workspace_dir);
let memory_content = read_project_memory(&workspace_dir);
let language_content = language_prompts::get_language_prompts_for_workspace(&workspace_dir);
// Create project model
let project = create_project(&cli, &workspace_dir)?;
@@ -110,7 +112,7 @@ pub async fn run() -> Result<()> {
let config = load_config_with_cli_overrides(&cli)?;
// Combine AGENTS.md, README, and memory content
let combined_content = combine_project_content(agents_content, readme_content, memory_content, &workspace_dir);
let combined_content = combine_project_content(agents_content, readme_content, memory_content, language_content, &workspace_dir);
run_console_mode(cli, config, project, combined_content, workspace_dir).await
}