feat(scripts): add consolidate command for overlapping stale pages - #44
Merged
Conversation
New audit module audits/audit-consolidate.sh: vault-tools.sh consolidate finds groups of 3+ pages that are all past their staleness threshold and topically overlapping — pages pair when they share two or more approved tags plus a related: link, groups are the connected components of that graph. Writes candidates to memory/notes/consolidation-YYYY-MM-DD.md (valid type: report frontmatter) with members, shared tags, link evidence, and suggested action. Report-only: never merges, deletes, or modifies wiki pages. Consolidation reports join lint reports in .gitignore. Adds tests/test-consolidate.sh. Closes #16 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
# Conflicts: # CHANGELOG.md
# Conflicts: # CHANGELOG.md
# Conflicts: # .vault/scripts/vault-tools.sh # CHANGELOG.md
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
Implements #16 with the deterministic grouping rule settled in triage (no tuning knobs): two pages pair when they share ≥2 approved tags AND a
related:link connects them; candidate groups are connected components of ≥3 pages where every member is past its staleness threshold (reusingresolve_stale_threshold/is_stale_exempt; archived/deprecated skipped).vault-tools.sh consolidatewrites candidates tomemory/notes/consolidation-YYYY-MM-DD.md(validtype: reportfrontmatter) with members, shared tags, link evidence, last-updated dates, and a suggested action. Report-only — never merges, deletes, or modifies wiki pages. Consolidation reports join lint reports in.gitignore.Verification
test-consolidate.sh: 3 mutually-related stale pages group together, a fresh page with identical tags stays out, report frontmatter valid — passes. Full suite passes; shellcheck/markdownlint clean; adversarial review: pass (one minor — the.gitignorepattern — fixed here).Closes #16
🤖 Generated with Claude Code