knowledge-prune

Detects and retires duplicate, stale, and contradictory governance rules across instructions, specs, skills, hooks, and memory files.

5|9|Updated Mar 25, 2026
One-click install
npx skills add https://github.com/ajenchen/design-system --skill knowledge-prune-ajenchen
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: knowledge-prune
Source: https://github.com/ajenchen/design-system/tree/main/.agents/skills/knowledge-prune
Command: npx skills add https://github.com/ajenchen/design-system --skill knowledge-prune-ajenchen

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Governance documentation grows uncontrollably over time: duplicate rules appear across multiple files, hooks stop firing but remain active, memory entries go stale, and specs contradict each other. This Skill systematically finds and retires that sprawl while protecting every real invariant from accidental deletion. ## Core Features & Use Cases - Multi-dimension redundancy scan: Runs parallel detection across duplicates (Rule-of-3), dead hooks via fire telemetry, stale memories, over-concrete case studies, cross-home contradictions, spec-vs-code drift, and citation debt. - Authority-aware triage: Classifies findings into auto-fixable expression-level changes versus human-only product/UX decisions, with grep verification required before any retirement. - Quantified retire reporting: Computes a quarterly retire rate against total governance items and records metric snapshots for trend analysis. - Use Case: Run quarterly when bootstrap instructions exceed 800 lines or MEMORY.md exceeds 20 entries to consolidate duplicate rules into single sources of truth and retire dead hooks. ## Quick Start Run the knowledge-prune skill to scan all governance files for duplicates, dead hooks, and stale memories, then produce a triaged retire plan with a quantified report.

Frequently Asked Questions about knowledge-prune

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce duplicate rules across AI agent instruction files?

Run a Rule-of-3 duplicate scan that finds the same concept written fully in three or more homes, then consolidate to a single source of truth with pointers elsewhere. Always grep the repository first to confirm no references break before retiring duplicates.

How to detect dead hooks that never fire?

Read per-hook fire telemetry from hook-fires-per-hook.jsonl and flag any hook with zero fires over six months as a retire candidate. Also check for hot hooks firing over 50 times per day and toggle patterns indicating unstable hook design.

When should I run a governance prune on my repository?

Run it quarterly, when bootstrap instructions exceed 800 lines, when MEMORY.md exceeds 20 index entries, or when a single spec file exceeds 500 lines. It also chains automatically from a deep design-system audit phase.

Does pruning governance files risk deleting important rules?

No deletion happens without grep verification that the protection is covered elsewhere or has zero references. The skill explicitly forbids sacrificing quality for line-count targets, and a retire rate under 5% is acceptable when the system is mature.

What are the limitations of automated governance pruning?

It never touches application code, never rewrites spec substance, and never retires rules still referenced by hooks or skills. Decisions that change product, UI, or UX source-of-truth with real tradeoffs are escalated to humans rather than auto-resolved.