-
Notifications
You must be signed in to change notification settings - Fork 0
Add latest program to replace shell alias with AI-assisted commits #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 2 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e801710
Add latest program to replace shell alias with AI-assisted commits
connerohnesorge 04fa62c
Update config files: stowrc ignore, conclaude cleanup, mouseless config
connerohnesorge 44bfc4d
Update mouseless config and fix CUDA shell LD_LIBRARY_PATH
connerohnesorge a828e8e
nixpkgs update
connerohnesorge 8bce9f5
fix ollama acceleration detection/setting
connerohnesorge 67b5dac
fix latex-shell
connerohnesorge d2a4103
fix poppler-utils
connerohnesorge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,79 @@ | ||
| [ | ||
| { | ||
| "BTTActionCategory": 0, | ||
| "BTTLastUpdatedAt": 1742697650.905817, | ||
| "BTTTriggerType": 102, | ||
| "BTTTriggerTypeDescriptionReadOnly": "3 Finger Swipe Up", | ||
| "BTTTriggerClass": "BTTTriggerTypeTouchpadAll", | ||
| "BTTUUID": "F021A0B9-5C64-4DAD-B68A-5F142A23D267", | ||
| "BTTPredefinedActionType": 186, | ||
| "BTTPredefinedActionName": "⌘ CMD Key Down", | ||
| "BTTGenericActionConfig2": "0", | ||
| "BTTGenericActionConfig": "1000", | ||
| "BTTEnabled": 1, | ||
| "BTTEnabled2": 1, | ||
| "BTTOrder": 5, | ||
| "BTTAdditionalActions": | ||
| [ | ||
| { | ||
| "BTTActionCategory": 0, | ||
| "BTTLastUpdatedAt": 1742630159.6423111, | ||
| "BTTTriggerParentUUID": "F021A0B9-5C64-4DAD-B68A-5F142A23D267", | ||
| "BTTIsPureAction": true, | ||
| "BTTTriggerClass": "BTTTriggerTypeTouchpadAll", | ||
| "BTTUUID": "CCD51876-61F6-4A6C-A689-815224FE4FC3", | ||
| "BTTLayoutIndependentActionChar": "t", | ||
| "BTTAdditionalActionData": { "sendCurrentModifiers": true }, | ||
| "BTTGenericActionConfig2": "onlyDown", | ||
| "BTTShortcutToSend": "17", | ||
| "BTTShortcutUpDown": "onlyDown", | ||
| "BTTEnabled": 1, | ||
| "BTTEnabled2": 1, | ||
| "BTTOrder": 0, | ||
| }, | ||
| { | ||
| "BTTActionCategory": 0, | ||
| "BTTLastUpdatedAt": 1742630105.987484, | ||
| "BTTTriggerParentUUID": "F021A0B9-5C64-4DAD-B68A-5F142A23D267", | ||
| "BTTIsPureAction": true, | ||
| "BTTTriggerClass": "BTTTriggerTypeTouchpadAll", | ||
| "BTTUUID": "DE46BF94-3076-4FC7-B79A-987C0BACBBFE", | ||
| "BTTPredefinedActionType": 129, | ||
| "BTTPredefinedActionName": "Pause Execution or Delay Next Action (blocking)", | ||
| "BTTDelayNextActionBy": "0.3", | ||
| "BTTEnabled": 1, | ||
| "BTTEnabled2": 1, | ||
| "BTTOrder": 1, | ||
| }, | ||
| { | ||
| "BTTActionCategory": 0, | ||
| "BTTLastUpdatedAt": 1742630163.6112289, | ||
| "BTTTriggerParentUUID": "F021A0B9-5C64-4DAD-B68A-5F142A23D267", | ||
| "BTTIsPureAction": true, | ||
| "BTTTriggerClass": "BTTTriggerTypeTouchpadAll", | ||
| "BTTUUID": "97383B56-1EDD-43A8-84D3-F3299CC48612", | ||
| "BTTLayoutIndependentActionChar": "t", | ||
| "BTTAdditionalActionData": { "sendCurrentModifiers": true }, | ||
| "BTTGenericActionConfig2": "onlyUp", | ||
| "BTTShortcutToSend": "17", | ||
| "BTTShortcutUpDown": "onlyUp", | ||
| "BTTEnabled": 1, | ||
| "BTTEnabled2": 1, | ||
| "BTTOrder": 2, | ||
| }, | ||
| { | ||
| "BTTActionCategory": 0, | ||
| "BTTLastUpdatedAt": 1742630105.9873719, | ||
| "BTTTriggerParentUUID": "F021A0B9-5C64-4DAD-B68A-5F142A23D267", | ||
| "BTTIsPureAction": true, | ||
| "BTTTriggerClass": "BTTTriggerTypeTouchpadAll", | ||
| "BTTUUID": "6309C11C-0063-4E9B-A962-9763F9C2624F", | ||
| "BTTPredefinedActionType": 187, | ||
| "BTTPredefinedActionName": "⌘ CMD Key Up", | ||
| "BTTEnabled": 1, | ||
| "BTTEnabled2": 1, | ||
| "BTTOrder": 3, | ||
| }, | ||
| ], | ||
| }, | ||
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -36,3 +36,4 @@ | |
| --ignore AGENTS.md | ||
| --ignore .claude | ||
| --ignore .crush | ||
| --ignore result | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| { | ||
| delib, | ||
| pkgs, | ||
| ... | ||
| }: let | ||
| inherit (delib) singleEnableOption; | ||
|
|
||
| program = pkgs.writeShellApplication { | ||
| name = "latest"; | ||
| text = builtins.readFile ./latest.sh; | ||
| }; | ||
| in | ||
| delib.module { | ||
| name = "programs.latest"; | ||
|
|
||
| options = singleEnableOption false; | ||
|
|
||
| nixos.ifEnabled = { | ||
| environment.systemPackages = [program]; | ||
| }; | ||
|
|
||
| darwin.ifEnabled = { | ||
| environment.systemPackages = [program]; | ||
| }; | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| cldk "commit and push all changes with good commit messages" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| # Change: Add `latest` program to replace shell alias | ||
|
|
||
| ## Why | ||
| The current `latest` alias in `.zshrc` (`git add . && git commit -m "latest" && git push`) creates uninformative commit messages. Replacing it with a program that invokes `cldk` to generate AI-assisted commit messages will produce more meaningful git history. | ||
|
|
||
| ## What Changes | ||
| - Create new program module `modules/programs/latest/` that calls `cldk "commit and push all changes with good commit messages"` | ||
| - Remove `latest` alias from `.zshrc` | ||
| - Enable the `latest` program in the engineer feature module for both NixOS and Darwin | ||
|
|
||
| ## Impact | ||
| - Affected specs: `shell-utilities` | ||
| - Affected code: | ||
| - `modules/programs/latest/` (new) | ||
| - `modules/features/engineer.nix` (add `latest.enable = true`) | ||
| - `.zshrc` (remove alias) |
16 changes: 16 additions & 0 deletions
16
spectr/changes/add-latest-program/specs/shell-utilities/spec.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| ## ADDED Requirements | ||
|
|
||
| ### Requirement: Latest Program | ||
| The system SHALL provide a `latest` program that commits and pushes all changes with AI-generated commit messages using the `cldk` tool. | ||
|
|
||
| #### Scenario: User runs latest in git repository | ||
| - **WHEN** user executes `latest` in a git repository with uncommitted changes | ||
| - **THEN** the program invokes `cldk "commit and push all changes with good commit messages"` to stage, commit, and push changes with meaningful AI-generated messages | ||
|
|
||
| #### Scenario: Cross-platform availability | ||
| - **WHEN** the engineer feature is enabled on NixOS or Darwin | ||
| - **THEN** the `latest` program is available in the system PATH | ||
|
|
||
| #### Scenario: Replaces shell alias | ||
| - **WHEN** user previously used the `latest` alias in `.zshrc` | ||
| - **THEN** the `latest` program provides the same entry point with improved commit message quality |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| ## 1. Implementation | ||
|
|
||
| - [x] 1.1 Create `modules/programs/latest/` directory | ||
| - [x] 1.2 Create `modules/programs/latest/latest.nix` with Denix module pattern | ||
| - [x] 1.3 Add `latest.enable = true` to `modules/features/engineer.nix` for NixOS | ||
| - [x] 1.4 Add `latest.enable = true` to `modules/features/engineer.nix` for Darwin | ||
| - [x] 1.5 Remove `latest` alias from `.zshrc` | ||
|
|
||
| ## 2. Testing | ||
|
|
||
| - [x] 2.1 Run `nix flake check` to validate module syntax | ||
| - [x] 2.2 Run `nixos-rebuild build --flake .` to verify NixOS configuration builds | ||
| - [x] 2.3 Manually test `latest` command in a test git repository | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix filename reference in documentation.
The task references
latest.nix, but the actual implementation usesdefault.nix(following the standard pattern for program modules).Apply this diff:
📝 Committable suggestion
🤖 Prompt for AI Agents