From 80455e5f1bcbe96789637fb803875fa6fe15e046 Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 21 Jan 2026 01:33:24 +0000 Subject: [PATCH 1/2] Add SessionStart hook to run deepwork install Adds a Claude Code hook that runs `uv run deepwork install` on session start. This ensures the latest local code version is used for the install command, making development testing easier. --- .claude/settings.json | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.claude/settings.json b/.claude/settings.json index 6da3b2da..252c0209 100644 --- a/.claude/settings.json +++ b/.claude/settings.json @@ -98,6 +98,17 @@ ] }, "hooks": { + "SessionStart": [ + { + "matcher": "", + "hooks": [ + { + "type": "command", + "command": "uv run deepwork install" + } + ] + } + ], "UserPromptSubmit": [ { "matcher": "", From 4168c9bf3b49e6ff50745e528bf342e139bb3199 Mon Sep 17 00:00:00 2001 From: Noah Horton Date: Tue, 20 Jan 2026 18:40:31 -0700 Subject: [PATCH 2/2] One file needed updating --- .../jobs/deepwork_rules/hooks/capture_prompt_work_tree.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.deepwork/jobs/deepwork_rules/hooks/capture_prompt_work_tree.sh b/.deepwork/jobs/deepwork_rules/hooks/capture_prompt_work_tree.sh index 3f2cefad..c9cedd82 100755 --- a/.deepwork/jobs/deepwork_rules/hooks/capture_prompt_work_tree.sh +++ b/.deepwork/jobs/deepwork_rules/hooks/capture_prompt_work_tree.sh @@ -8,12 +8,20 @@ # The baseline contains ALL tracked files (not just changed files) so that # the rules_check hook can determine which files are genuinely new vs which # files existed before and were just modified. +# +# It also captures the HEAD commit ref so that committed changes can be detected +# by comparing HEAD at Stop time to the captured ref. set -e # Ensure .deepwork directory exists mkdir -p .deepwork +# Save the current HEAD commit ref for detecting committed changes +# This is used by get_changed_files_prompt() to detect files changed since prompt, +# even if those changes were committed during the agent response. +git rev-parse HEAD > .deepwork/.last_head_ref 2>/dev/null || echo "" > .deepwork/.last_head_ref + # Save ALL tracked files (not just changed files) # This is critical for created: mode rules to distinguish between: # - Newly created files (not in baseline) -> should trigger created: rules