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

30
prompts/langs/racket.md Normal file
View File

@@ -0,0 +1,30 @@
RACKET LANGUAGE CODE EXPLORATION + RACO TOOLING
- Core `raco` commands to rely on:
- Documentation & discovery:
- `raco docs <id>` to open docs for identifiers, modules, or packages.
- Compilation & checks:
- `raco make <file.rkt>` to force compilation and surface errors early.
- Testing:
- `raco test <path>` to run `module+ test` blocks and test files.
- Packages & dependencies:
- `raco pkg show` to inspect installed packages and their locations.
- `raco pkg show <pkg>` to inspect package metadata and versions.
- Profiling & performance:
- `raco profile <file.rkt>` for CPU hot spots.
- Debugging & stack traces:
- `racket -l errortrace <file.rkt>` (or enabling errortrace) for readable stack traces.
- Structural analysis tools (use when reasoning about non-trivial codebases):
- `raco dependency-graph <path>`:
- Use to visualize or reason about module dependencies and layering.
- Identify cycles, high fan-in “core” modules, and accidental coupling.
- `raco modgraph`:
- Use for quick textual inspection of module graphs when visualization isnt needed.
- Treat dependency graphs as architectural signals, not just diagrams.
- `racket -e`-driven exploration:
- Use the one-shot script execution to:
- `require` modules incrementally and inspect exports.
- Probe functions with small concrete examples.
- Validate assumptions about data shapes and return values.