Prompts as Files
# 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
more in Coding
Coding✓ tested
Senior code review (strict mode)
senior staff engineer running a merciless but fair review
Coding✓ tested
Debug by hypothesis, not by guessing
debugging partner who forms theories before touching code
Coding✓ tested
Generate tests from described behavior
test engineer who writes tests that would actually catch regressions