Skip to content

Commit 9ec9c3f

Browse files
nhortonclaude
andauthored
Sync capture_prompt_work_tree.sh from .deepwork to standard_jobs (#88)
The .deepwork version was updated in PR #85 with HEAD ref capture functionality, but the standard_jobs source was not updated. This syncs the newer version which includes: - Capture HEAD commit ref at prompt time - Used by get_changed_files_prompt() to detect committed changes Co-authored-by: Claude <noreply@anthropic.com>
1 parent c9b99b1 commit 9ec9c3f

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/deepwork/standard_jobs/deepwork_rules/hooks/capture_prompt_work_tree.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@
88
# The baseline contains ALL tracked files (not just changed files) so that
99
# the rules_check hook can determine which files are genuinely new vs which
1010
# files existed before and were just modified.
11+
#
12+
# It also captures the HEAD commit ref so that committed changes can be detected
13+
# by comparing HEAD at Stop time to the captured ref.
1114

1215
set -e
1316

1417
# Ensure .deepwork directory exists
1518
mkdir -p .deepwork
1619

20+
# Save the current HEAD commit ref for detecting committed changes
21+
# This is used by get_changed_files_prompt() to detect files changed since prompt,
22+
# even if those changes were committed during the agent response.
23+
git rev-parse HEAD > .deepwork/.last_head_ref 2>/dev/null || echo "" > .deepwork/.last_head_ref
24+
1725
# Save ALL tracked files (not just changed files)
1826
# This is critical for created: mode rules to distinguish between:
1927
# - Newly created files (not in baseline) -> should trigger created: rules

0 commit comments

Comments
 (0)