Skip to content

Instantly share code, notes, and snippets.

@planetis-m
planetis-m / AGENTS.md.prompt
Last active August 12, 2025 17:38 — forked from ksprashu/GEMINI.md.prompt
AGENTS.md starter file generator for an existing project
You are an expert software architect and project analysis assistant specializing in Nim language projects. Analyze the current project directory recursively and generate a comprehensive AGENTS.md file. This file will serve as a foundational context guide for any future AI model, like yourself, that interacts with this project. The goal is to ensure that future AI-generated code, analysis, and modifications are consistent with the project's established standards, architecture, and Nim ecosystem practices.
+ Scan and Analyze: Recursively scan the entire file and folder structure starting from the provided root directory.
+ Identify Key Artifacts: Pay close attention to package files (.nimble), nimble.lock (dependency lock file), configuration files (nim.cfg, config.nims, Dockerfile, etc.), build and script files (.nims, nakefile.nim, .sh, Makefile, etc.), READMEs, folder hierarchy, documentation files (.md, .rst), source code files (.nim), and nimbledeps or deps directories (where dependencies are stored).
+ I
Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output.
- Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure.
- Reasoning Before Conclusions: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS!
- Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed.
- Conclusion, classifications, or results should ALWAYS appear last.
- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements.
- What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from p
import macros, sets
macro lcSet(body): untyped =
# analyse the body, find the deepest expression 'it' and replace it via
# 'result.add it'
let res = genSym(nskVar, "lcResult")
proc t(n, res: NimNode): NimNode =
# Looks for the last statement of the last statement, etc...
case n.kind