Skip to content

feat(scripts): add consolidate command for overlapping stale pages - #44

Merged
galimba merged 4 commits into
mainfrom
feat/consolidate
Jul 8, 2026
Merged

feat(scripts): add consolidate command for overlapping stale pages#44
galimba merged 4 commits into
mainfrom
feat/consolidate

Conversation

@galimba

@galimba galimba commented Jul 7, 2026

Copy link
Copy Markdown
Owner

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 (reusing resolve_stale_threshold/is_stale_exempt; archived/deprecated skipped).

vault-tools.sh consolidate writes candidates to memory/notes/consolidation-YYYY-MM-DD.md (valid type: report frontmatter) 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 .gitignore pattern — fixed here).

Closes #16

🤖 Generated with Claude Code

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>
@galimba
galimba merged commit a7031b8 into main Jul 8, 2026
7 checks passed
@galimba
galimba deleted the feat/consolidate branch July 8, 2026 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(scripts): add consolidate command to identify overlapping stale pages

1 participant