diff options
| author | Franck Cuny <59291+fcuny@users.noreply.github.com> | 2025-02-28 19:19:53 -0800 |
|---|---|---|
| committer | Franck Cuny <59291+fcuny@users.noreply.github.com> | 2025-02-28 19:19:53 -0800 |
| commit | b9b5aaea288ad81de679cae9eacacbac73e87cff (patch) | |
| tree | 5e32d667d05182f98eff54665b1f48f5d6c025c2 /nix | |
| parent | 🤖 Add LLM tooling and prompts for Git workflow automation (diff) | |
| download | infra-b9b5aaea288ad81de679cae9eacacbac73e87cff.tar.gz | |
🚀 Refactor LLM config: Move to standardized templates and improve setup
- 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. 🧰
Diffstat (limited to 'nix')
| -rw-r--r-- | nix/users/fcuny/llm.nix | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/nix/users/fcuny/llm.nix b/nix/users/fcuny/llm.nix index 48604c3..407cead 100644 --- a/nix/users/fcuny/llm.nix +++ b/nix/users/fcuny/llm.nix @@ -1,16 +1,22 @@ { ... }: { - home.file.".config/prompts/pr-prompt.txt".text = - builtins.readFile ../../../configs/prompts/pr-prompt.txt; + # we need this path to be created. + home.file.".configs/llm/templates/.keep".text = "# Managed by Home Manager"; + home.file.".config/llm/templates/pr-prompt.yaml".text = + builtins.readFile ../../../configs/llm/templates/pr-prompt.yaml; - home.file.".config/prompts/commit-system-prompt.txt".text = - builtins.readFile ../../../configs/prompts/commit-system-prompt.txt; + home.file.".config/llm/templates/commit-prompt.yaml".text = + builtins.readFile ../../../configs/llm/templates/commit-prompt.yaml; programs.fish = { shellAliases = { - commit-msg = "git diff HEAD | llm -m claude-3.5-sonnet -s (cat ~/.config/prompts/commit-system-prompt.txt |psub)"; - pr-msg = "git diff HEAD | llm -m claude-3.5-sonnet -s (cat ~/.config/prompts/pr-prompt.txt |psub)"; + commit-msg = "git diff --cached | llm -t commit-prompt"; + pr-msg = "git diff HEAD | llm -t pr-prompt"; }; }; + + home.sessionVariables = { + LLM_USER_PATH = "$HOME/.config/llm"; + }; } |
