@@ -15,15 +15,16 @@ fn format_symbol(sym: &Symbol) -> String {
1515
1616/// System prompt instructing the LLM to output SHORT:/LONG: format.
1717pub fn file_system_prompt ( ) -> & ' static str {
18- "You are a code documentation assistant.\n \
19- Your response MUST start with SHORT: on the very first line. No preamble.\n \
20- Output exactly two sections:\n \n \
21- SHORT: A brief one-line description of the file (under 80 characters).\n \
22- LONG: A detailed description weaving in patterns, dependencies, and relationships.\n \n \
23- Example format:\n \
18+ "You describe source code files. Respond ONLY in this exact format:\n \n \
19+ SHORT: <one line, under 80 chars>\n \
20+ LONG: <detailed description>\n \n \
21+ Rules:\n \
22+ - First line must be SHORT: followed by a brief description\n \
23+ - Second line must be LONG: followed by a detailed description\n \
24+ - No other text before SHORT:\n \
25+ - Be factual, not creative\n \n \
2426 SHORT: CLI argument parser and validation\n \
25- LONG: Defines the command-line interface using clap, validates input flags, and maps them to internal config types.\n \n \
26- Be factual, not creative. Do not invent information beyond what the code shows."
27+ LONG: Defines the command-line interface using clap, validates input flags, and maps them to internal config types."
2728}
2829
2930/// Assemble an LLM prompt for describing a single file.
@@ -83,16 +84,16 @@ pub fn build_file_prompt(
8384
8485/// System prompt for directory descriptions. Static string.
8586pub fn directory_system_prompt ( ) -> & ' static str {
86- "You are a code documentation assistant.\n \
87- Your response MUST start with SHORT: on the very first line. No preamble.\n \
88- Output exactly two sections:\n \n \
89- SHORT: A brief one-line description of the directory (under 80 characters).\n \
90- LONG: A detailed description covering the directory's role, what it contains, \
91- and how its contents relate to each other.\n \n \
92- Example format:\n \
87+ "You describe source code directory contents. Respond ONLY in this exact format:\n \n \
88+ SHORT: <one line, under 80 chars>\n \
89+ LONG: <detailed description>\n \n \
90+ Rules:\n \
91+ - First line must be SHORT: followed by a brief description\n \
92+ - Second line must be LONG: followed by a detailed description\n \
93+ - No other text before SHORT:\n \
94+ - Be factual, not creative\n \n \
9395 SHORT: Database access layer and query builders\n \
94- LONG: Contains the SQLite connection wrapper, CRUD methods for files and directories, and query helpers for tree and peek views.\n \n \
95- Be factual, not creative. Do not invent information beyond what the contents show."
96+ LONG: Contains the SQLite connection wrapper, CRUD methods for files and directories, and query helpers for tree and peek views."
9697}
9798
9899/// Build the user prompt for a directory description.
0 commit comments