From b9b5aaea288ad81de679cae9eacacbac73e87cff Mon Sep 17 00:00:00 2001 From: Franck Cuny <59291+fcuny@users.noreply.github.com> Date: Fri, 28 Feb 2025 19:19:53 -0800 Subject: =?UTF-8?q?=F0=9F=9A=80=20Refactor=20LLM=20config:=20Move=20to=20s?= =?UTF-8?q?tandardized=20templates=20and=20improve=20setup?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Migrated prompts from text files to YAML templates in `.config/llm/templates/` directory - Updated fish shell aliases to use the new template system with `-t` flag instead of reading files - Enhanced justfile's `llm` target with proper Claude model setup and 1Password integration - Added `LLM_USER_PATH` environment variable for consistent configuration path - Fixed PR prompt format to better organize content and remove issue resolution section - Updated Nix configuration to support the new file structure The changes standardize our LLM prompt system and make it more maintainable, while improving the setup experience for new users. 🧰 --- configs/llm/templates/commit-prompt.yaml | 23 +++++++++++++++++++++++ configs/llm/templates/pr-prompt.yaml | 14 ++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 configs/llm/templates/commit-prompt.yaml create mode 100644 configs/llm/templates/pr-prompt.yaml (limited to 'configs/llm/templates') diff --git a/configs/llm/templates/commit-prompt.yaml b/configs/llm/templates/commit-prompt.yaml new file mode 100644 index 0000000..780375e --- /dev/null +++ b/configs/llm/templates/commit-prompt.yaml @@ -0,0 +1,23 @@ +prompt: > + Write a concise, informative commit message for these changes: + - Review the whole context of the diff carefully to see what effect the change would have on the rest of the code and explain that. Be specific about the effect. + - Do not guess about intent. + - The goal of this commit message is that someone familiar with the codebase, but not with these changes would understand why the changes were made and what was changed. + - The first line should be a short summary of the changes + - Explain the 'why' behind changes + - Use bullet points for multiple changes + - Tone: Use some emojis, be funny, expressive, but stay professional + - If there are no changes, or the input is blank - then return a blank string + + Think carefully about what would be most helpful to someone trying to understand the intent of this commit before you write your commit message. Your commit message will be used as an example to train other team members about the content of a good commit message. + + The output format should be: + + Summary of changes + - changes + - changes + and so on + + What you write will be passed directly to git commit -m "[message]" + + Text to use for the commit message: $input diff --git a/configs/llm/templates/pr-prompt.yaml b/configs/llm/templates/pr-prompt.yaml new file mode 100644 index 0000000..4c13c0d --- /dev/null +++ b/configs/llm/templates/pr-prompt.yaml @@ -0,0 +1,14 @@ +prompt: > + Write a clear, informative pull request message in markdown: + + * Start with a summary + * Remember to mention the files that were changed, and what was changed + * Explain the 'why' behind changes + * Include a bulleted list to outline all of the changes + * If there are no changes, or the input is blank - then return a blank string + + Think carefully before you write your pull request body. + + What you write will be passed to create a github pull request + + Text to use for the pull request message: $input -- cgit v1.2.3