Health & Staleness

Gamify your documentation with Lore Score and catch outdated knowledge before it misleads your team.

Lore Score

Run lore score to see your project's memory health — a composite score from 0 to 100 based on three metrics:

$ lore score

📖 Lore Score: 72/100  (Good)
────────────────────────────────

Coverage     68/100
  ████████████████░░░░  5/8 active modules documented

Freshness    80/100
  ████████████████████░

Depth        65/100
  █████████████████░░░░

────────────────────────────────
Score history: 58 → 65 → 72 (improving)
Tip: Add invariants and gotchas — run: lore log --type invariant

Coverage (0–100)

What percentage of your actively-developed modules have at least one Lore entry? Lore identifies "active modules" by looking at recent git commit history. Modules with many commits but zero entries are flagged as highest risk.

Freshness (0–100)

How many of your entries are still up-to-date? If linked files have been modified since the entry was last updated, freshness drops. Higher freshness means your knowledge base reflects the current state of the codebase.

Depth (0–100)

Do you have a healthy mix of entry types? A project with only Decisions but no Invariants or Gotchas has shallow coverage. Depth rewards diversity across all four entry types.

Score Rating

Score Rating
90–100 Excellent
75–89 Good
60–74 Fair
40–59 Needs Work
0–39 Low

Staleness Detection

When you create a Lore entry, you can link it to specific files using --files. Lore then monitors git history — if a linked file is modified in a future commit, the entry is flagged as [Stale].

$ lore stale

⚠ Stale Entries (3)

  [Stale] "Auth tokens must be validated on every request"
    linked to: src/middleware/auth.js
    last modified: 2 days ago (3 commits since entry)

  [Stale] "Use Postgres over MongoDB"
    linked to: src/db/connection.js
    last modified: 1 week ago

How staleness works

  1. Entry links to file src/api/auth.js via --files
  2. A teammate modifies src/api/auth.js in a later commit
  3. Lore detects the linked file changed via git log analysis
  4. The entry is flagged as [Stale]
  5. Run lore stale to see all stale entries and decide if they need updating

Quick Status Check

$ lore status

📖 Lore Status
  Entries:   12 (4 decisions, 3 invariants, 3 gotchas, 2 graveyard)
  Drafts:    5 pending
  Stale:     3 entries need review