Wiki bookkeep

From stevehuang0115/crewly · View interactive version

Wiki bookkeep is an AI agent skill from the GitHub repository stevehuang0115/crewly. Vault health report — md counts, duplicate clusters, queue snapshot, consolidation recommendations. Returns signals; your LLM decides what to merge or archive.

How to use this skill

Skill file

Wiki Bookkeep

Periodic vault health check. Returns a structured report (md counts, recent activity, duplicate clusters by filename similarity, stale-page count, queue snapshot, recommendations). The skill does not write to the vault. Your LLM reads the report and decides next actions.

When to use

Inputs

| Flag | Required | Default | Description |

|---|---|---|---|

| --vault <path> | yes | — | Absolute vault path. |

| --window-days <n> | no | 7 | "Recent activity" window for recentMdCount. |

| --threshold <n> | no | 10 | shouldFire triggers when recentMdCount >= threshold OR there are duplicate clusters. |

What you do with the report

  1. Drain pending queue first — if queue.pending > 0, run wiki-process-queue until empty before doing anything else.
  2. Consolidate duplicate clusters — for each cluster in duplicateCandidates, read the member pages, ask your LLM whether they should merge, and if yes:
  1. Hot-folder rollups — if countsByFolder shows >20 pages in one bucket without a recent index page, generate one. Pattern: llm-curated/<folder>/index.md linking + summarizing each page.
  2. Stale-page flag — if staleCount > 0, mention to the user — they decide which to keep.

Output

{
  "success": true,
  "report": {
    "vault": {"scope": "project", "id": "crewly", "path": "..."},
    "generatedAt": "2026-05-23T03:00:00Z",
    "windowDays": 7,
    "threshold": 10,
    "shouldFire": true,
    "totalMdCount": 47,
    "recentMdCount": 12,
    "countsByFolder": {"llm-curated/decisions": 8, "llm-curated/customers": 3, ...},
    "duplicateCandidates": [
      {"basis": "llm-curated/customers/anthropic-pricing", "pages": ["...-v1.md", "...-v2.md"]}
    ],
    "staleCount": 4,
    "queue": {"pending": 2, "claimed": 0, "processed": 11, "skipped": 1, "total": 14},
    "recommendations": [
      "Window has 12 new md(s) — at or above threshold (10). Consider a consolidation pass.",
      "1 likely-duplicate cluster(s) detected. ...",
      ...
    ]
  }
}

Failure modes

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.