@@ -118,28 +118,43 @@ def process_resource(self, resource: UniversalResource, on_token=None) -> str:
118118
119119 def _build_system_prompt (self , raw_content : str , is_image : bool = False ) -> str :
120120 """
121- Constructs a concise Knowledge Architect prompt for S T A R R Y N O T E v2.0.
122- Optimized to minimize input tokens while preserving output quality .
121+ Constructs the high-fidelity Knowledge Architect prompt for S T A R R Y N O T E v2.0.
122+ Forces synthesis over summary, visual reasoning via Mermaid, and strict authorship .
123123 """
124- context_label = "visual" if is_image else "text "
124+ context_label = "visual architecture " if is_image else "structured data "
125125
126126 knowledge_architect_prompt = (
127- f"You are the S T A R R Y N O T E Knowledge Architect. "
128- f"Synthesize this { context_label } input into a structured study guide.\n "
129- f"RULES: Author='S T A R R Y N O T E'. Synthesize, don't summarize. "
130- f"Fill every template section with dense content. Use original examples. "
131- f"Include one Mermaid diagram (cyberpunk style: purple #bc13fe, cyan #00f3ff). "
132- f"Academic tone. No HTML comments in output.\n \n "
127+ f"Act as the S T A R R Y N O T E Knowledge Architect. Your purpose is to ingest "
128+ f"raw, fragmented academic data ({ context_label } ) and synthesize it into a "
129+ f"high-density, structured study guide.\n \n "
130+ f"CORE DIRECTIVES:\n "
131+ f"1. AUTHORSHIP: Set the Author field to 'S T A R R Y N O T E' for every document generated.\n "
132+ f"2. SYNTHESIS > SUMMARY: Do not repeat the input. Identify the underlying logic. "
133+ f"Create original, advanced coding examples and mathematical proofs that aren't in "
134+ f"the source but explain the source perfectly.\n "
135+ f"3. FORMATTING: Use the provided MASTER TEMPLATE exactly. Do not skip sections. "
136+ f"If a section is irrelevant, mark it with \" —\" .\n "
137+ f"4. VISUAL REASONING: Select the most logical Mermaid diagram type "
138+ f"(Flowchart for logic, Mindmap for concepts, Sequence for protocols). "
139+ f"Apply cyberpunk styling (Neon Purple/Cyan) via class definitions.\n "
140+ f"5. ACADEMIC TONE: Use a scholarly, precise, and human-centric tone. "
141+ f"No conversational filler.\n \n "
142+ f"OUTPUT STRUCTURE:\n "
143+ f"- metadata block (Title, Date, Topic, Difficulty)\n "
144+ f"- Executive Abstract (Intellectual core)\n "
145+ f"- Concept Register (Definitions + Common Pitfalls)\n "
146+ f"- Technical Deep Dive (Code Trace or LaTeX Formulation)\n "
147+ f"- Exam Prep (3-tier questions: Application, Analysis, Synthesis)\n \n "
148+ f"Strictly avoid HTML comments or instruction markers in the final Markdown output.\n \n "
133149 )
134150
135151 return (
136152 f"{ knowledge_architect_prompt } "
137- f"--- TEMPLATE ---\n "
153+ f"--- MASTER TEMPLATE START ---\n "
138154 f"{ self ._prompt_template } \n "
139- f"--- END TEMPLATE ---\n \n "
140- f"--- SOURCE ---\n "
141- f"{ raw_content } \n "
142- f"--- END SOURCE ---"
155+ f"--- MASTER TEMPLATE END ---\n \n "
156+ f"SOURCE INPUT TO SYNTHESIZE:\n "
157+ f"{ raw_content } "
143158 )
144159
145160 # ── Analyzers ─────────────────────────────────────────────────────────
0 commit comments