feat: Centralize all prompts in prompts/ directory

New structure:
- prompts/standard_prompts.yaml: Default prompts (committed to Git)
- prompts/local/: Your improved prompts (NOT in Git!)
- prompts/README.md: Documentation
- rdagent/components/loader.py: Prompt loader with priority

Features:
- Loader checks prompts/local/ first (your better prompts)
- Falls back to standard_prompts.yaml if no local version
- Supports sections (system/user)
- Lists available prompts
- Test function included

.gitignore updated:
- prompts/local/ excluded (your proprietary prompts)
- *.local.yaml excluded
- *_private.yaml excluded

Usage:
  from rdagent.components.loader import load_prompt
  prompt = load_prompt('factor_discovery')  # Auto-loads your better version!
This commit is contained in:
TPTBusiness
2026-04-02 22:29:31 +02:00
parent b9a3fde6f6
commit 18416da2c9
5 changed files with 650 additions and 5 deletions
+5 -5
View File
@@ -5,11 +5,11 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/png" href="./src/assets/images/rd_icon.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.16.10/dist/katex.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/11.11.1/styles/vs.min.css" />
<title>R&D-Agent</title>
</head>
<!-- Security fix: Add SRI (Subresource Integrity) hashes to prevent tampering -->
<!-- snap.svg - SRI hash from https://www.srihash.org/ -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js"
integrity="sha512-Od9GAbPv+qjS3GvPv368l6l39d6
<body>
<div id="app"></div>