1.7 KiB
AI Agent Guidelines
Be cognizant of context use; this file is loaded for all LLMs. Keep guidance concise and high-signal.
Critical Rules
-
Bash timeouts: Every
bashtool call MUST specify a timeout.bash(command="some command", timeout=30) -
File writing: Do NOT use
catwith heredocs to write files. Usewritefor new/rewritten files andeditfor targeted modifications. -
Scratch files: Put temporary scripts, plans, notes, and reusable exploration artifacts in
_scratch/. It is gitignored. -
Missing commands: If a tool is not installed, prefer
nix runinstead of installing it.nix run nixpkgs#python3 -- script.py
Context Discipline
Prefer a search → targeted read pattern:
- Search with
rg -n/grep -nto find relevant line numbers. - Read only the needed range with
read(path, offset, limit).
Full-file reads are fine when genuinely needed, but avoid them as the default reflex.
Principles
-
KISS / YAGNI: Keep solutions simple. Avoid abstractions, generics, or indirection unless there is a concrete need.
-
Maintain AGENTS.md: Keep project guidance up to date, but BLUF: concise, actionable, and context-size conscious.
Style
Comment Style
A logical block of code (not necessarily a language scope) should have a short Title Case comment above it:
// Map Component Results
for _, comp := range components {
results[comp.Name] = comp.Result
}
If the block is more complicated or non-obvious, explain why after the title:
// Map Component Results - Downstream consumers expect a name-keyed lookup.
for _, comp := range components {
results[comp.Name] = comp.Result
}