| name | VirtueWebAgent-kb-consolidate |
| description | Knowledge Base Consolidation — merge duplicates, upgrade confidence, deprecate stale entries, and keep indexes accurate, one category at a time |
| argument-hint | [category] |
Knowledge Base Consolidation
You are a knowledge base consolidator. Your job is to improve the quality, consistency, and organization of knowledge/ over time — merging duplicates, upgrading confidence, deprecating stale entries, and keeping indexes accurate.
Run this periodically (monthly recommended). Work one category at a time to stay within context limits.
Step 1 — Choose a Category
If an argument was passed (e.g., /VirtueWebAgent-kb-consolidate react), work that category. Otherwise, read knowledge/INDEX.md and pick the category with the most files or the oldest last_updated dates.
Step 2 — Read All Files in the Category
Read every .md file in the category directory (skip INDEX.md). Build a mental map of:
- What each file covers
- Its confidence level and last_updated date
- Its tags and applies_when signal
Step 3 — Identify Overlaps and Duplicates
Look for files where:
- The
applies_when signals are nearly identical
- The
How steps describe the same technique with minor variation
- One file is a strict subset of another
For overlapping files: merge them into the more complete one. Move unique content (especially Dead Ends and Gotchas) into the surviving file. Delete the merged file and update indexes.
Step 4 — Upgrade Confidence
Upgrade confidence when:
low → medium: the technique appears in 2+ staging archives as confirmed
medium → high: confirmed across 3+ apps or multiple framework versions
Check knowledge/_staging/archived/ for evidence of repeated confirmation.
Step 5 — Deprecate Stale Techniques
Mark status: deprecated when:
last_validated_framework_version is more than 2 major versions behind current
- A Dead Ends entry in another file explains why this technique no longer works
- The technique requires a tool or browser extension that is no longer maintained
Add a ## Deprecated section:
## Deprecated
**Reason:** <why it no longer works>
**As of:** <framework version or date>
**Alternative:** <link to replacement technique if one exists>
Do not delete deprecated files.
Step 6 — Verify Index and Link Accuracy
Read the category INDEX.md. Confirm:
- Every
.md file in the directory has an entry
- No entries point to files that don't exist
- Each entry's detection signal (the part before
|) matches the file's applies_when frontmatter
- Deprecated files are marked
[DEPRECATED] in their index entry
Also validate cross-references in every file you read this run:
- For each path in a file's
related: frontmatter, confirm the target file exists. Repoint broken links to the correct in-KB analog, or remove them if none exists — do not leave forward-references to planned-but-unwritten files.
- For each inline
[text](path.md) link in a file's body, confirm the target exists.
- Normalize all
related: paths to knowledge-root-relative form (e.g. techniques/xss/foo.md, not ../xss/foo.md) per GUIDE.md.
Step 7 — Update last_updated Dates
For any file you modified, update its last_updated frontmatter to today's date.
Step 8 — Report
Output a summary:
- Files merged: list (what merged into what)
- Confidence upgrades: list
- Files deprecated: list with reason
- Index corrections: list
- Category processed: name
- Suggested next category: name (the one most needing attention)