Documentation Index
Fetch the complete documentation index at: https://docs.driftless.icu/llms.txt
Use this file to discover all available pages before exploring further.
How staleness works
When a push arrives on a tracked branch, the API matches changed files against all workspace topics. Any topic whose anchored files or patterns overlap with the changed files gets marked stale with a human-readable reason. For example, if a push tomain changes src/auth/guard.ts and src/auth/service.ts, the auth-flow topic anchored to src/auth/** becomes:
Stale: 3 files changed in commitabc1234:src/auth/guard.ts,src/auth/service.ts,src/auth/dto/login.dto.ts
Tracked branches
The default branch is always tracked. Additional branches can be added:Structural staleness
Beyond simple file matching, Driftless detects structural changes:- Deleted endpoint files - An endpoint that was extracted in a previous scan no longer exists
- Removed guards - A guard that was protecting an endpoint has been removed
- Deleted services - A service class no longer exists in the codebase
- Module restructuring - Files moved between modules
Lifecycle
driftless syncsurfaces it to every team member- An agent or human reviews the change
- If the context still holds, mark it reviewed to unstale it
- If no repo claims the topic anymore, it becomes orphaned
Checking for staleness
What triggers staleness?
What triggers staleness?
Only pushes to tracked branches. PRs do not trigger staleness; they trigger PR observation instead (sticky context comments listing relevant topics). This distinction keeps staleness meaningful: a push to
main or staging means the code has actually changed, while a PR is still under review and may not merge.Can I manually mark a topic as stale?
Can I manually mark a topic as stale?
Yes. Use
driftless context update <slug> --stale --reason "...". This is useful when you review a topic and notice it’s outdated even though the file patterns haven’t been pushed yet.What happens if I delete a topic's anchored files?
What happens if I delete a topic's anchored files?
The scanner detects missing files during the next scan and reports them as structural staleness. The topic stays stale until someone either updates its anchors or confirms the context is no longer relevant (at which point it can be orphaned or deleted).