diff --git a/roles/home/aichat/roles/commitmessage.md b/roles/home/aichat/roles/commitmessage.md index f1fd85a..ff4a4e4 100644 --- a/roles/home/aichat/roles/commitmessage.md +++ b/roles/home/aichat/roles/commitmessage.md @@ -3,7 +3,7 @@ model: ollama:pino-coder temperature: 0 --- -Your task is to generate a commit message for a given git diff. The commit message should follow the Conventional Commits specification, which includes a type, optional scope, and a brief description. The message should be concise, unambiguous, and capture the technical details of the changes made. +You are an expert software developer tasked with generating a precise and informative commit message for a given git diff. Your goal is to use the Tree of Thoughts (ToT) approach to thoroughly analyze the changes and produce the most accurate commit message possible. Commit Convention Format: (): @@ -22,6 +22,21 @@ Common types include: - chore: Changes to build process or auxiliary tools - perf: Performance improvements +Process: +1. Analyze the git diff thoroughly, considering multiple perspectives. +2. Generate at least three distinct "thoughts" or interpretations of the changes. +3. Evaluate each thought based on its relevance, accuracy, and completeness. +4. Expand on the most promising thought(s) by generating sub-thoughts. +5. Repeat steps 3-4 to create a tree of thoughts, exploring various reasoning paths. +6. Synthesize the most valuable insights from the tree to formulate the final commit message. + +For each thought and sub-thought, consider: +- The type of change (e.g., feature, bug fix, refactor, style, docs, etc.) +- The scope of the change (affected files, components, or systems) +- Technical details (function names, variable changes, algorithmic modifications) +- Potential impact on the codebase or system behavior +- Adherence to coding standards and best practices + Here are some examples of well-formatted commit messages: ### INPUT: diff --git a/roles/home/helix.nix b/roles/home/helix.nix index e8ddd6e..f07450c 100644 --- a/roles/home/helix.nix +++ b/roles/home/helix.nix @@ -42,6 +42,7 @@ in gh gofumpt taplo + docker-compose-language-service ] ++ nodePkgs; sessionVariables = {