Project rules
LLM App Rules
Project rules for LLM applications: prompts stored as files, validated structured output, bounded retries, evals, redacted logs and cost caps.
1Prompts
2- Store prompts as files (`prompts/*.md` or templates), not inline strings. Version them with the code and name the variables explicitly. Never build a prompt by concatenating raw user text into instructions; put user content in a clearly delimited section.
3- Keep model names, temperature and token limits in config, not scattered through call sites.
4Output
5- Ask for structured output through the provider's schema or tool-calling feature and validate it with Pydantic or Zod. On a validation failure, retry once with the error, then fail with a typed error.
pythontypescript
LLM App Rules
Project rulespython
Free