Repository navigation
Description
Summary
The --watch watcher correctly detects doc/paper/image file changes and writes a graphify-out/needs_update flag. However, it stops there — it does not trigger semantic re-extraction. This means a corpus with active doc additions (e.g. research notes, scout findings, weekly reports) can sit stale for hours while the watcher is alive and healthy.
The watcher log says:
Non-code files changed — semantic re-extraction requires LLM. Run `/graphify --update` in Claude Code to update the graph.
This is correct by design (semantic extraction requires LLM tokens), but it creates a gap: the user cannot configure automatic semantic refresh without manually triggering /graphify --update themselves.
Current behavior
--watchwatcher detects non-code file changes ✅- Writes
graphify-out/needs_updateflag ✅ - Logs that the user should run
--updatemanually ✅ - Does NOT trigger semantic re-extraction (by design — LLM call needed)
- Does NOT provide any mechanism for automated semantic refresh
Result: in an active session where doc files accumulate over hours (e.g. a research scout drops new markdown files every 30 minutes), the semantic graph never auto-updates. The watcher is ALIVE but the corpus is STALE.
Proposed fix: graphify check-update command
Add a lightweight CLI entry point that is safe to invoke from a system cron or task scheduler:
graphify check-update ~/my-corpusBehavior:
- Check if
graphify-out/needs_updateflag exists. - If not: exit 0 silently (nothing to do).
- If yes: run the incremental
--updatepipeline (detect_incremental → semantic extraction → merge → cluster → report → remove flag). - Exit 0 on success, exit 1 on error.
This is designed to be idempotent and cron-safe:
*/30 * * * * graphify check-update ~/my-corpus >> ~/.graphify-cron.log 2>&1
Alternative: --watch --auto-update flag
graphify ~/my-corpus --watch --auto-updateBehavior: when non-code changes are detected, instead of writing the flag and stopping, trigger the --update pipeline inline. The watcher already has all the infrastructure for incremental detection — it just needs to call run_update() instead of writing a flag.
Users who want LLM calls from the watcher opt in explicitly with --auto-update. Default remains flag-only (no surprise token spend).
Workaround (documented for other users)
Until this is shipped, the workaround is a periodic Claude Code cron that checks for the flag and triggers /graphify --update:
*/30 * * * * — if graphify-out/needs_update exists, run /graphify --update
This requires a live Claude Code session and active REPL. A proper graphify check-update CLI command would be system-independent (could be invoked by launchd, systemd timer, or cron without Claude running).
Environment
- graphifyy v0.4.23
--watchdaemon running 7+ hours, healthy- Corpus: 21,625 nodes / 68,276 edges (Catalyst autonomous trading platform)
- Doc additions: research scout markdown files written to
research-findings/every 30-60 minutes - Semantic graph was stale for ~7 hours despite watcher being alive and
needs_updateflag set
Activity
feat(watch): add check-update subcommand for cron-safe incremental gr…
safishamsi commentedon Apr 22, 2026
Fixed in v0.4.31: added
graphify check-update <path>CLI subcommand. It checks for thegraphify-out/needs_updateflag and prints a reminder to run/graphify --updateif pending changes exist. Notification-only (always returns True, never clears the flag — that's the LLM's job).