Conversation
The snapshot skill now detects what changed since the last run and applies targeted edits instead of rewriting SNAPSHOT.md and OVERVIEW.md from scratch every time. This scales much better for large decision logs (70+ decisions). - Add detect-snapshot-changes.sh: uses decisions_included + git diff to identify new and modified decisions since last snapshot - Add commit_hash tracking to update-snapshot-state.sh (matches audit) - Restructure SKILL.md with full/incremental modes for both documents - SNAPSHOT.md: append new sections, remove superseded, update amended - OVERVIEW.md: update only affected sections, trust agent judgment on when a larger rewrite is needed to maintain abstraction level - Support --full flag to force full regeneration - Backward compatible with old state files lacking commit_hash - Add 12 new tests (11 for detect-changes, 1 for commit_hash tracking) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
When upgrading from an older state file that lacks snapshot.commit_hash, use git log --until=<last_run> to derive a baseline commit for detecting modified decisions. This handles the bootstrap scenario where an existing project runs the incremental snapshot skill for the first time. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a prerequisite check that commits any pending decision file changes before running detect-snapshot-changes.sh. This prevents missed modifications when /dld-implement was run without committing. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
detect-snapshot-changes.shscript that compares current state against.dld-state.yamlusingdecisions_includedandgit diffsince lastcommit_hashto identify new and modified decisionscommit_hashtracking toupdate-snapshot-state.sh(matches existing audit pattern)--fullflag to force full regeneration when neededcommit_hashMotivation
With 70+ decisions, the snapshot skill was rewriting both SNAPSHOT.md and OVERVIEW.md entirely on every run. For SNAPSHOT.md this is purely wasteful since it's a structured document where new decisions can be appended. For OVERVIEW.md, incremental section updates are preferred but the agent retains freedom to do a larger rewrite when the document's structure needs to evolve.
Test plan
detect-snapshot-changes.shcovering full/incremental detection, new decisions, modified decisions, commit ranges, and backward compatibilitycommit_hashinupdate-snapshot-state.sh🤖 Generated with Claude Code