Hactar chooses a different system prompt based the on the model and modes. This means there are several different system prompts and several ways to modify the system prompt. The simplest is to just edit them. They are by default copied into your user config folder at ~/.config/hactar/prompts.
The second way is by modifying the variables that point to a specific prompt. Usually these are along to the lines of model-name-system-prompt. You can modify these variables with just with a user.lisp file at ~/.config/hactar/user.lisp.
Here is an example:
(in-package :hactar)(defvar *system-default-prompt-path* "system.default.md")Or you can go even futher and modify the function that retrieves a default prompt:
(defun default-system-prompt () "Generate the system prompt by combining templates, rules, context, and the active guide." (let* ((base-prompt (uiop:read-file-string (get-prompt-path "my-system.default.org"))) (context (generate-context)) (guide-content (get-active-guide-content)) (rules-text (with-output-to-string (s) (maphash (lambda (key value) (declare (ignore key)) (format s "~A~%~%" value)) *active-rules*)))) (mustache:render* base-prompt `((:language . ,(language)) (:rules . ,rules-text) (:guide . ,(or guide-content "")) (:context . ,context)))))Don't do this. It pollutes the context and actually decreases the performance of LLMs.
Go ahead! Hactar uses both git and a bunch of heuristics to prevent any changes from destroying your codebase. In most cases you shouldn't trip over Hactar. In the worst case you just have to run /undo.
Hactar is currently the sole project of K-2052.