-// prompt returns the system prompt of the agent name with the instructions of
-// the user at its end. Without instructions it has neither them nor the clause
-// that points to them. Turns and compactions send the same prompt and tools, so
-// compactions read the prompt cache of the turns.
-func prompt(name, instructions string) string {
- return promptWithInstructions(promptText, promptTaskSentence, promptInstructionsClause, name, instructions)
+// prompt returns the system prompt of the reference with one added paragraph on
+// the user's instructions file at instructionsPath. It uses the agent name and
+// ends with the user's instructions. Without instructions it has neither them
+// nor the clause that points to them, but keeps the file paragraph. Turns and
+// compactions send the same prompt and tools, so compactions read the prompt
+// cache of the turns.
+func prompt(name, instructionsPath, instructions string) string {
+ text := strings.NewReplacer(promptName, name, promptInstructionsPath, instructionsPath).Replace(promptText)
+
+ return promptWithInstructions(text, promptTaskSentence, promptInstructionsClause, instructions)