Drift#
faf drift checks whether the files your AI reads have moved ahead of project.faf. It compares the modification time of project.faf against CLAUDE.md, AGENTS.md, .cursorrules, and GEMINI.md.
A newer target means someone edited the context file and the .faf hasn’t caught up. Run faf sync to reconcile.
JSON#
A self-describing report — faf_version / project / source header, then one entry per target with status (newer · older · in-sync · missing), raw mtime_ms, and delta_ms. No Date.now() in the payload; the consumer formats its own “5d ago”. With no project.faf, --json returns { error, hint } and exits 2.
As a library#
The comparison is a pure function, exported from the package:
computeDrift(fafPath, dir?) takes an explicit path — it never reads process.cwd(). An editor extension calls it directly instead of shelling out.