Bug fix + recovery command for the 2.3.0 migrate-incident target-path issue.
In 2.3.0, hewtd migrate-incident wrote folders OUTSIDE <vault-root>/incidents/, which the incidents/INDEX.md generator silently missed. Discovered in real-world use — 4 legacy postmortems in investorhub required manual mv to populate the index.
What's fixed
migrate-incidentnow writes to the canonical<vault-root>/incidents/<slug>/(no manualmvrequired).- Idempotency check covers both the canonical and 2.3.0-legacy locations; surfaces the legacy case explicitly.
- New
--forceflag overrides the idempotency guard.
What's new
hewtd fix-legacy-layout— relocates 2.3.0-buggy folders into<vault>/incidents/, rewritesprovenance:refs in fact files (handles both qualified and bare-slug refs). Idempotent.--dry-runsupported.
Migration for consumers stuck on 2.3.0 layout
npx --no @theglitchking/hit-em-with-the-docs fix-legacy-layout --dry-run
npx --no @theglitchking/hit-em-with-the-docs fix-legacy-layout
npx --no @theglitchking/hit-em-with-the-docs maintainNo breaking changes to the public API (src/index.ts exports unchanged).
See CHANGELOG.md for the full entry.
Stats: 241/241 tests passing (was 230 at 2.3.0; +11 new). PR #6.