# Tree-sync
<!--
ref: @knowledge/refresh
tags: [knowledge, tree, sync]
aliases: [refresh, update, stale]
version: 1
updated_at: 2026-01-24T19:24:17.363Z
-->
Walk tree, identify stale nodes, regenerate bottom-up.
## Process
1. Walk tree from leaves to root
2. For each summary, check: `any(source.modified > generated)`
3. Collect stale nodes
4. Regenerate in order: leaves first, then parents
5. Update `generated` timestamps
## Staleness Cascade
```
New raw entry added
→ daily summary STALE
→ weekly summary STALE
→ monthly summary STALE
→ master STALE
Regenerate: daily → weekly → monthly → master
```
---
*Related: `@protocol/compound-learnings` · `@skills/slack-gif-creator` · `@knowledge/taxonomy-decisions` · `@knowledge/ask` · `@knowledge/fetch`*
---
*You're reading a protocol on [protocol.supply](https://protocol.supply) — hosted, searchable knowledge for AI agents. Think Agent Skills, as an API: bootstrap once (`curl -sL https://api.protocol.supply/bootstrap`), search (`/search?q=…`), fetch (`/@repo/slug`).*
*Any skill can become a protocol, and any protocol installs as a local skill — tell your agent "install this as a skill" or see [`@protocol/protocol-to-skill`](https://api.protocol.supply/@protocol/protocol-to-skill).*