Commit ab52d78
authored
feat(prompt-harness): centralize all system prompts (#531)
Add a new prompts module to cortex-prompt-harness that provides a single source
of truth for all system prompts used throughout Cortex CLI. This improves
visibility and maintainability of the prompt harness.
## New modules:
- prompts/core.rs: Core agent prompts (main Cortex prompt, TUI prompt)
- prompts/agents.rs: Built-in agent prompts (explore, general, research, etc.)
- prompts/tasks.rs: Task-related prompts (summarization, compaction, titles)
- prompts/review.rs: Code review prompts
- prompts/tools.rs: Tool-specific prompts (subagent executor, mentions)
- prompts/generation.rs: Agent generation prompts
## Key features:
- All prompts are now documented with rustdoc comments
- Helper functions for common operations (build_review_prompt, has_summary_output)
- Type-safe review target enum for different review scenarios
- Comprehensive tests for all prompt modules
- Re-exports for commonly used prompts at module level1 parent f2e496e commit ab52d78
8 files changed
+1850
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
31 | 53 | | |
32 | 54 | | |
33 | 55 | | |
| |||
55 | 77 | | |
56 | 78 | | |
57 | 79 | | |
| 80 | + | |
58 | 81 | | |
59 | 82 | | |
60 | 83 | | |
| |||
0 commit comments