From 72bc456662060231ebcf5cb697f51c8b68dd1f4c Mon Sep 17 00:00:00 2001 From: Tom Boucher Date: Fri, 15 May 2026 11:00:12 -0400 Subject: [PATCH] chore(3347): backfill PR number in changeset Co-Authored-By: Claude Opus 4.7 (1M context) --- .changeset/3347-graphify-auto-update-hook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/3347-graphify-auto-update-hook.md b/.changeset/3347-graphify-auto-update-hook.md index 48a7e8be5..d6e96cbd0 100644 --- a/.changeset/3347-graphify-auto-update-hook.md +++ b/.changeset/3347-graphify-auto-update-hook.md @@ -1,6 +1,6 @@ --- type: Added -pr: 0 +pr: 3557 --- **Opt-in: auto-rebuild knowledge graph after main HEAD advances** — new config key `graphify.auto_update` (default `false`) and bundled PostToolUse hook `hooks/gsd-graphify-update.sh` keep the `.planning/graphs/graph.json` consumed by `gsd-planner` and `gsd-phase-researcher` current without manual `/gsd:graphify build` runs. When both `graphify.enabled` and `graphify.auto_update` are `true`, the hook fires after Bash tool calls matching HEAD-advancing git ops (`commit`, `merge`, `pull`, `rebase --continue`, `cherry-pick`) on the default branch, writes a synchronous `running` status to `.planning/graphs/.last-build-status.json`, then dispatches `graphify update .` in a detached subprocess that updates the status file to `ok` (with `duration_ms` + `head_at_build`) or `failed` (with `exit_code`). The planner and researcher's `load_graph_context` steps now surface the auto-build state alongside the existing staleness annotation — including the must-have failure-surface case from the issue review (`"auto-rebuild FAILED at {ts}; context is from the prior build"`). PID-locked against concurrent rebuilds (stale-PID tolerant via `kill -0`), CI-aware (`$CI` env suppresses), and bails silently if `graphify` is not on `PATH` or the current branch is not the default. `/gsd:settings` adds a "Graph auto-update" question gated on Graphify being enabled. Closes #3347.