feat(skills): add memory-tidy, the judgment half of the memory plane#280
Merged
Conversation
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.
What
Adds
skills/memory-tidy: the judgment half of the kit's memory plane. The mechanical half already lives here (lib/statsmemory-sweep, SPEC-136: read-only dead-ref + index scanner). This skill consumes that scanner's output and is the only path that edits a.claude/memory/store: evidence-required per-note verdicts (KEEP / MERGE / STALE / UNSURE) via agent fan-out, danger check for notes whose advice contradicts current policy, index rebuild with parity checks, all confined to a worktree branch and shipped as a PR (the operator's approval gate).Why
The scanner (kit) and the judgment (previously a personal dotfiles skill) split one concern across two repos, against the one-engine-one-truth rule. Generated-data curation (memory notes feeding promotion/backlog flows) belongs with the machinery that already scans it.
Test
Written per writing-skills RED/GREEN: against a fixture store with 4 planted defects (dead-ref note, duplicate pair, unindexed note, ghost index entry), the no-skill baseline deleted notes directly on the current branch and kept the dead-ref note unexamined; with the skill, the agent branched in a worktree, caught the dead ref with
git log --allevidence, merged the duplicate pair quoting the overlap, rebuilt the index to parity, and stopped at the PR gate. First production use: tieubao/ops-toolkit#972 (118-note audit, manual run of the same process).Consumer side (scheduler, biweekly launchd, vps-mon heartbeat) stays in ops-toolkit
tools/memory-tidy/(tieubao/ops-toolkit#975). After this merges: refresh the plugin snapshot and remove the interim dotfiles copy of the skill.Second commit registers the component per the ask:
[features].memory_tidy[consumer]toggle in kit.toml (single control surface; cadence stays consumer-side, default off), README Skill-roster row + tree line de-rostered to stop churn, docs/CHANGELOG.md [Unreleased] entry, and a new CONTRIBUTING "Introducing a component" section (naming, description discipline, registration, RED/GREEN evidence) so future skills/commands/agents cannot land as unregistered file drops.