Problem
In a downstream repository that has a memory-bank/ directory but no memory-bank/.lock, memory-bank-cli update stops with:
memory-bank lock not found
memory-bank-cli doctor correctly reports template.identity_missing and suggests running memory-bank-cli init, but it has no --fix / repair mode. Recovery therefore requires manually locating a clean template checkout and supplying --source, --template-version, and --source-ref.
Proposal
Add an opt-in repair mode to memory-bank-cli doctor (for example, doctor --fix) that can remediate safe, well-defined findings. Initially, support template.identity_missing by generating or restoring memory-bank/.lock through the same validated adoption path used by init.
The command should:
- remain read-only by default;
- show the complete mutation plan with
--dry-run;
- require explicit template provenance (
--source, --template-version, --source-ref) when it cannot infer it safely;
- avoid overwriting an existing lock or managed content without explicit confirmation/flags;
- report exactly what was changed and recommend committing
memory-bank/.lock.
Current workaround
memory-bank-cli init --dry-run \
--source <clean-template-checkout> \
--template-version <version> \
--source-ref <full-commit-sha>
Then rerun without --dry-run, commit memory-bank/.lock, and run update.
Context
Observed with memory-bank-cli 1.4.1 in BrandyMint/merchantly.
Problem
In a downstream repository that has a
memory-bank/directory but nomemory-bank/.lock,memory-bank-cli updatestops with:memory-bank-cli doctorcorrectly reportstemplate.identity_missingand suggests runningmemory-bank-cli init, but it has no--fix/ repair mode. Recovery therefore requires manually locating a clean template checkout and supplying--source,--template-version, and--source-ref.Proposal
Add an opt-in repair mode to
memory-bank-cli doctor(for example,doctor --fix) that can remediate safe, well-defined findings. Initially, supporttemplate.identity_missingby generating or restoringmemory-bank/.lockthrough the same validated adoption path used byinit.The command should:
--dry-run;--source,--template-version,--source-ref) when it cannot infer it safely;memory-bank/.lock.Current workaround
Then rerun without
--dry-run, commitmemory-bank/.lock, and runupdate.Context
Observed with
memory-bank-cli 1.4.1inBrandyMint/merchantly.