forked from bchanot/claude
feat(memory): check --staged refuses a new entry that skips or reuses an ID
A new ## entry must carry the next free ID, replayed in line order the way add allocates it. The rule runs only on a v2 HEAD with entries, so upgrade, first commits and template imports pass.
This commit is contained in:
1 parent
411d22ff92
commit
e0311f4d4f
3 files changed
+130
-5
No files matched your search
@@ -80,8 +80,16 @@ never a shell argument.
|
||||
committed, nothing left staged. Causes,
|
||||
named on stderr: a line removed inside an
|
||||
existing v2 entry (only appends pass), a NEW
|
||||
culprit (duplicate ID, heading shape), or a
|
||||
HEAD or staged blob git cannot read; an open
|
||||
culprit (duplicate ID, heading shape), a new
|
||||
entry whose ID is not the next free ID
|
||||
(stderr names the expected one; a committed
|
||||
ID is never renamed: fix only the uncommitted
|
||||
new heading and every uncommitted mention of
|
||||
its ID, the `superseded by` line `add
|
||||
--supersedes` wrote, the journal line, or
|
||||
drop the new entry and that line and re-add
|
||||
it with memory.sh add), or a HEAD or staged
|
||||
blob git cannot read; an open
|
||||
code fence counts even when it predates the
|
||||
commit. A path staged apart from its working
|
||||
tree loses that stage: stderr names it with
|
||||
|
||||
Reference in new issue
Block a user