| name | VirtueWebAgent-kb-audit |
| description | Knowledge Base Audit — read-only health check of knowledge/ (index accuracy, frontmatter completeness, stale entries, coverage gaps, ledger and profile health) |
Knowledge Base Audit
You are running a read-only health check on the knowledge base. Do not modify any files. Report only — all findings are for human review.
Step 1 — Index accuracy
Read knowledge/INDEX.md and all category INDEX.md files. For each linked file:
- Check it exists on disk
- Report any broken links (linked but missing)
Walk all .md files under knowledge/ (excluding _staging/, _templates/, _ledger/):
- Report any files NOT referenced in any INDEX.md (orphaned files)
- For each file, resolve every path in its
related: frontmatter and every inline [text](path.md) body link. Report any that point to a non-existent file (broken cross-references). Also report any related: path that is not knowledge-root-relative (file-relative ../ paths violate the GUIDE.md convention).
Step 2 — Frontmatter completeness
For every technique file (non-INDEX, non-GUIDE, non-README), check:
technique_id field present and non-empty
status field is active or deprecated
confidence field is low, medium, or high
applies_when field is non-empty
last_updated is a valid date
Report files missing any of these fields.
Step 3 — Stale entries
For every technique file with last_updated more than 12 months ago, report it as potentially stale. Flag files where framework_versions references a version that is 2 or more major versions behind current (e.g., Angular 11 when Angular 18 is current).
Step 4 — Coverage gaps
List every Phase 3 vuln/exploit category slug:
authentication, authorization, rest, graphql, websocket, xss, sqli, ssrf, rce, secrets, frameworks, business-logic, spa-routes, debug-features, feature-flags, service-workers, postmessage, soap, url-redirection, path-traversal, oauth, csrf, cors
For each slug, check whether any technique file in knowledge/ has a tag or technique_id prefix matching it. Report slugs with NO matching technique file as coverage gaps.
Step 5 — Ledger health
Read knowledge/_ledger/effectiveness.jsonl if it exists. Check:
- Each line is valid JSON
- Each line has
technique_id, engagement_id, outcome fields
- All
technique_id values in the ledger correspond to a file in knowledge/ with a matching technique_id frontmatter field (ledger orphans = IDs in ledger with no matching KB file)
Read knowledge/_ledger/effectiveness-rollup.json if it exists. Report whether it is in sync with effectiveness.jsonl (same set of technique_ids).
Step 6 — Profile health
Read knowledge/tech-stack-profiles/INDEX.md and all profile YAML files. For each technique_id referenced in a profile's recommended_techniques:
- Check that a matching KB file exists with that
technique_id in its frontmatter
- Report broken profile references
Step 7 — Report
Output a structured report:
## KB Audit Report
### Broken index links
<list or "none">
### Broken cross-references (related: / inline links)
<list: file — broken or non-root-relative target, or "none">
### Orphaned files (not in any index)
<list or "none">
### Frontmatter completeness issues
<list: file — missing field(s)>
### Potentially stale files (>12 months)
<list or "none">
### Coverage gaps (no technique for slug)
<list or "none">
### Ledger orphans (technique_id in ledger, no KB file)
<list or "none">
### Broken profile references
<list or "none">
### Summary
X files checked, Y issues found.