What problem does it solve?
Deleting an Architecture Decision Record file leaves stale rows behind in the adr-patterns and adr-edges memory namespaces, because incremental indexing only adds or upserts rows and verification cannot detect orphans with no edges. This Skill reconciles the index by purging both namespaces and rebuilding them from the ADR files actually present on disk.
Core Features & Use Cases
- Namespace purge and rebuild: Hard-deletes every row in adr-patterns and adr-edges via memory purge, then re-scans and re-stores all ADRs currently on disk.
- Post-condition verification: Re-lists adr-patterns after the rebuild and asserts the count matches the number of scanned ADR files, exiting non-zero on mismatch.
- Dry-run and JSON output: Supports REINDEX_DRY_RUN=1 to preview changes and REINDEX_FORMAT=json for machine-readable reports.
- Use Case: After deleting docs/adr/0012-use-redis.md, run the reindex to drop its orphaned rows so adr-verify reports an ADR count that matches the files on disk.
Quick Start
Run the reindex script with node plugins/ruflo-adr/scripts/reindex.mjs to purge and rebuild the ADR memory namespaces from the current files on disk.