Sign in
Explore
Add-ons · HookEveryday codingGit & pull requestsReviewed

gsd-graphify-update.sh

PostToolUse hook that rebuilds the project knowledge graph after HEAD advances on the default branch.

The source repository is archived by its owner, so it gets no more updates.

Kind
Hook
Works with
Claude Code, Gemini / Antigravity
Languages
Shell
Source
gsd-build/get-shit-done @ bdcaab2c752d
Path
hooks/gsd-graphify-update.sh
Jobs
Automation
Topics
Git & pull requests

Credit

Made by
gsd-build
Original
github.com/gsd-build/get-shit-done/blob/bdcaab2c752d9a33a1a1c…
License
MIT

Listed by Skill Manifest; not made by us.

InstallCopy it from the source repository, or sign in and let the assistant adapt it for your project.
Install factsScanned 3 Nov 2026
Adds
  • Entries under `hooks` in .claude/settings.json
Runs scripts
Yes
  • gsd-graphify-update.sh
  • the component is a script
Uses the network
None found
Needs secrets
None found
Reads environment variables
  • INPUT
  • TOOL_INFO
  • TOOL_NAME
  • COMMAND
  • DEFAULT_BRANCH
  • CURRENT_BRANCH
Reads outside the project
  • /usr/bin/env (gsd-graphify-update.sh)
Source revision
bdcaab2c752d
Licence
MIT
Last activity
Archived by its owner
  • Last push 31 May 2026
Review
Reviewed

Found by a static scan of the stored text; nothing is run. “None found” is not a guarantee, so read what you install before you run it.

#!/usr/bin/env bash
# gsd-hook-version: {{GSD_VERSION}}
# gsd-graphify-update.sh — PostToolUse hook (Bash matcher) that auto-rebuilds
# the project knowledge graph after main HEAD advances on the default branch.
#
# OPT-IN (issue #3347 AC): no-op unless .planning/config.json has BOTH
#   graphify.enabled: true
#   graphify.auto_update: true
# graphify.auto_update defaults to false so existing users see no behavior change.
#
# Gates (in fast-fail order — each shaves work off the common non-dispatch path):
#   1. Stdin payload present and tool_name == "Bash"
#   2. tool_input.command matches a HEAD-advancing git op (shell-direct or
#      the exact `gsd-sdk query commit` command shape; the SDK command invokes
#      git internally, so the literal "git commit" substring never appears —
#      see #3653)
#   3. $CI is unset/empty
#   4. Inside a git repo
#   5. Current branch == default branch (git.base_branch override, else main/master/trunk)
#   6. .planning/config.json sets graphify.enabled=true AND graphify.auto_update=true
#   7. graphify binary on PATH
#   8. No rebuild already in flight (PID lock — kill -0 check, stale-tolerant)
#
# When all gates pass:
…