tpcw-dev

vault-status

0
0
# Install this skill:
npx skills add tpcw-dev/pi-tpcw --skill "vault-status"

Install specific skill from multi-skill repository

# Description

Vault health check and status dashboard โ€” scans the entire vault and reports statistics, staleness, orphaned links, pending proposals, and suggests maintenance actions. Fully read-only. Triggers on "vault status", "vault health", "check vault", "vault dashboard", "how is the vault".

# SKILL.md


name: vault-status
description: Vault health check and status dashboard โ€” scans the entire vault and reports statistics, staleness, orphaned links, pending proposals, and suggests maintenance actions. Fully read-only. Triggers on "vault status", "vault health", "check vault", "vault dashboard", "how is the vault".


Vault Status โ€” Health Dashboard

Scan the entire vault and produce a health dashboard with statistics, staleness detection, orphan analysis, and actionable suggestions. Strictly read-only โ€” never writes to the vault.

Prerequisites

  • Vault must be initialized (_system/_master-index.md exists)

Inputs

Field Required Default Description
project_filter No all Status for specific project only
verbose No false Show all entries, not just issues
staleness_threshold No 30 Days before an entry is considered stale

Phase 1: Scan Vault Structure

Scan the entire vault directory using MCP tools:

mcp({ tool: "vault_list_directory", args: '{"path": ""}' })

Enumerate all top-level directories, then recurse into each key area:

Directory Purpose
projects/ Per-project knowledge bases
_system/ Vault configuration and metadata
_global/ Cross-project shared knowledge
_proposals/ Pending proposals awaiting review

For each project in projects/, list contents recursively. Record file paths, counts, and directory structure.

Build a complete manifest with per-area file counts and total.


Phase 2: Compute Statistics

Read frontmatter from every vault entry. Compute breakdowns across six dimensions:

By Type

Type Count
decision, lesson, idea, todo, pattern, unknown {n} each

By Project

Count per project, sorted by entry count descending.

By Confidence

๐ŸŸข high | ๐ŸŸก medium | ๐Ÿ”ด low | โšช unset

By Age (from created date)

Bucket Range
๐ŸŸข Fresh < 7 days
๐ŸŸก Recent 7โ€“29 days
๐ŸŸ  Aging 30โ€“89 days
๐Ÿ”ด Old โ‰ฅ 90 days
โšช No date missing created

By Status

โœ… active | ๐Ÿ“ฆ archived | ๐Ÿ”„ superseded | โšช unset

Todos by Stage

๐Ÿ“‹ backlog | ๐Ÿ”จ in-progress | ๐Ÿ‘€ review | โœ… done | โšช unset

Skip non-entry files (indexes, templates, system config). Track parse failures separately.


Phase 3: Detect Staleness

For each active entry, compute staleness using last-validated date (fallback to created).

Staleness Categories

Category Condition (default 30d threshold)
๐Ÿ”ด Critically stale > 60 days (2ร— threshold)
๐ŸŸ  Stale > 30 days (1ร— threshold)
๐ŸŸก Approaching > 22 days (0.75ร— threshold)
๐ŸŸข Fresh โ‰ค 22 days
โšช No date missing both dates

Skip archived and superseded entries โ€” they're intentionally old.
Skip files in _proposals/ and _system/.

Sort all evaluated entries by days_since descending (most stale first).

List critically stale and stale entries with path, type, project, days, and date source.


Phase 4: Find Orphans

Extract all [[wikilinks]] from every entry's content. Check each resolves to an existing file (case-insensitive filename match). Ignore links inside code blocks.

List broken links with source file and broken target.

Unreferenced Entries

Find entries with zero incoming links (never linked TO by any other file).

Exclude from check: system files, index files, proposals, archived items, root-level files.

Highlight fully isolated entries (zero incoming AND zero outgoing links).

Empty Directories

Find directories containing zero files within projects/ and _global/. Exclude proposals, archived, system dirs.

  • Entries with outgoing links: {count} ({%})
  • Entries with incoming links: {count} ({%})
  • Average links per entry: {avg}

Phase 5: Check Proposals

Scan _proposals/ (excluding _archived/) for pending proposals.

Count and categorize by type, project, and age. Find the oldest proposal. Track incomplete proposals (missing required frontmatter).

Zero proposals is a healthy state โ€” not an error.


Phase 6: Health Dashboard

Calculate Health Score

Start at 100, apply deductions:

Condition Deduction
Each critically stale entry โˆ’5
Each stale entry โˆ’2
Each broken wikilink โˆ’3
Each fully isolated entry โˆ’2
Pending proposals > 10 โˆ’1 per excess
Any type with zero entries โˆ’1 per missing type

Score ranges: ๐Ÿ’š 90-100 Excellent | ๐Ÿ’› 70-89 Good | ๐ŸŸ  50-69 Fair | ๐Ÿ”ด 30-49 Poor | ๐Ÿšจ 0-29 Critical

Present Dashboard

๐Ÿ”ฎ Vault Health Report
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

Health Score: {score}/100 {emoji}

๐Ÿ“Š Overview
  Total entries: {count} | Projects: {count} | Global: {count}

๐Ÿ“ˆ Entry Statistics
  By type:    decisions: {n} | lessons: {n} | ideas: {n} | todos: {n} | patterns: {n}
  By confidence: high: {n} | medium: {n} | low: {n}
  By age:     <7d: {n} | <30d: {n} | <90d: {n} | older: {n}
  Todos:      backlog: {n} | in-progress: {n} | review: {n} | done: {n}

โฐ Staleness ({threshold}d threshold)
  ๐Ÿ”ด Critical: {n} | ๐ŸŸ  Stale: {n} | ๐ŸŸก Approaching: {n}
  {list most stale entries if any}

๐Ÿ”— Link Integrity
  Broken links: {n} | Unreferenced: {n} | Isolated: {n} | Empty dirs: {n}
  {list broken links if any}

๐Ÿ“‹ Pending Proposals: {n}
  {breakdown if any}

โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•

๐Ÿ’ก Suggested Actions
  {1-5 actionable suggestions based on findings}

Suggested Actions

Generate 1-5 suggestions based on actual findings:

Condition Suggestion
Critical entries "๐Ÿ”ด Validate {n} critically stale entries"
Stale entries "๐ŸŸ  Review {n} stale entries for accuracy"
Pending proposals "๐Ÿ“‹ Process {n} pending proposals โ€” run vault-review"
Broken links "๐Ÿ”— Fix {n} broken wikilinks"
Isolated entries "๐Ÿ“ญ Connect {n} isolated entries โ€” add links or archive"
Score โ‰ฅ 90 "โœ… Vault is in excellent shape!"

Rules

  • NEVER write to the vault โ€” this is strictly read-only
  • ALWAYS present data in structured formats, not raw dumps
  • ALWAYS calculate health score from actual findings
  • ALWAYS provide actionable suggestions
  • ALWAYS skip archived/superseded entries from staleness checks

# Supported AI Coding Agents

This skill is compatible with the SKILL.md standard and works with all major AI coding agents:

Learn more about the SKILL.md standard and how to use these skills with your preferred AI coding agent.