home/coding/prompts-as-files

Prompts as Files

GPTClaudeDeepSeek··1,374 copies·updated 2026-07-14
prompts-as-files.prompt
# ADR 004: Prompts as Markdown Files

## Status
Accepted

## Context
LLM prompts need to be versioned, reviewed, and iterated on independently of code changes. Embedding prompts in Python code makes them hard to review, test, and modify.

## Decision
All LLM prompts are stored as `.md` files in `backend/src/docvault/prompts/` with `{placeholder}` substitution. Never hardcode prompts in Python code.

## Rationale
- **Reviewability**: Prompts are readable markdown, easy to review in PRs
- **Separation of concerns**: Prompt engineering doesn't require code changes
- **Version control**: Full git history for prompt iterations
- **Organization**: Subdirectories mirror the codebase: `rag/`, `agent/`, `guardrails/`, `evals/`, `ingestion/`
- **Caching**: `PromptLoader` caches after first read, async file I/O

## Directory Structure

fill the variables

This prompt has 1 variable. Pro fills them into a ready-to-paste prompt for you — no manual find-and-replace.

{placeholder}
Unlock with Pro →

when to use it

Community prompt sourced from the open-source GitHub repo hericlesferraz/DocVault (MIT). A "Prompts as Files" style prompt — adapt the placeholders and specifics to your task. Imported as-is and not independently retested here, so check the output before relying on it.

tags

codingcommunitydeveloper

source

hericlesferraz/DocVault · MIT