The working tools from the Git After NASA video series: guardrails that stop AI agents from running destructive git commands, a bisect runner that finds the commit that broke your project, and a one-command setup for running agents in parallel worktrees.
The working tools from the Git After NASA video series: guardrails that stop AI agents from running destructive git commands, a bisect runner that finds the commit that broke your project, and a one-command setup for running agents in parallel worktrees.
| Tool | What it does | Episode |
|---|---|---|
guardrails/hooks/git-guard.sh | Claude Code PreToolUse hook. Blocks force pushes, reset --hard, history rewrites, working-tree wipes, stash drops, --no-verify, and shell edits to .claude/ or .git/hooks. | 2 and 5 |
guardrails/hooks/protect-config.sh | Blocks Claude Code’s Edit and Write tools from changing .claude/ or .git/. Guardrail changes stay human-only. | 5 |
guardrails/settings.json | Wires both hooks into Claude Code. | 2 and 5 |
guardrails/ci/guard-check.yml | GitHub Actions job that fails any pull request where the guards stop blocking what they should. | 5 |
bisect/bisect-smoke.sh | Oracle for git bisect run using a Playwright smoke suite. Clears framework caches, resets a disposable database, skips untestable commits. | 3 |
worktree/new-worktree.sh | Creates a worktree with its own branch, .env, database, port, and dependencies. Laravel + SQLite. | 4 |
docs/CLAUDE.md.snippet | The commit contract and git rules to paste into your project’s CLAUDE.md. | 3 |
docs/WORKFLOW.md | The feature branch workflow, rewritten for agents. | 4 |
tests/test-guards.sh | Checks every guard rule with fake tool calls. | 2 and 5 |
From inside your project:
/path/to/git-after-nasa-toolkit-1.0.0/install.sh all
Or pick components: guardrails, bisect, worktree. The installer never overwrites an existing file; anything it skips is listed so you can merge by hand. If your project already has a .claude/settings.json, merge the hooks block from guardrails/settings.json into it.
Then commit what it added. The point is that the guardrails live in the repository, so every clone and every agent gets them.
HOOK_DIR=.claude/hooks /path/to/git-after-nasa-toolkit-1.0.0/tests/test-guards.sh
Every line should pass. Turn on branch protection for main in your git host (require pull requests, require the guard-check status, block force pushes) to complete the third layer.
jq or python3. If neither is found the hooks block everything rather than failing open.playwright.smoke.config.ts), the app already running at BASE_URL (default http://localhost:8000). Works with any stack; Laravel and Craft caches are detected and cleared automatically.database/seed.sqlite. The shape carries to other stacks, but these two scripts are written for that one.cp bin/bisect-smoke.sh /tmp/ && git bisect run /tmp/bisect-smoke.sh.Three layers. CLAUDE.md is a suggestion the agent follows most of the time. The hooks are a contract that runs on every tool call. Branch protection and the CI check are the backstop that doesn’t care what happened on anyone’s laptop.
Semantic versioning. Patch releases fix patterns or bugs. Minor releases add rules or tools. Major releases change file layout, settings shape, or anything that needs you to redo an install. See CHANGELOG.md.