docs(claude): wire railguard rules into global CLAUDE.md - #45
Merged
Conversation
rules/common/railguard.md existed but was never @-imported, so the working-under-railguard guidance never reached the agent. Import it from CLAUDE.md (above the auto-managed guardrails block) and expand it to enumerate the rules Railguard enforces here — no force-push, no sudo, no bulk git add, reset --hard/clean -f gating, the path fence and its allowed/denied roots, the "never retry a blocked command" evasion rule, and cwd-drift behavior. Add railguard.md to the README rules tree. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Railguard now anchors the path fence to the session project root captured at SessionStart, so per-call cwd no longer re-anchors it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
rules/common/railguard.mdexisted but was never@-imported byCLAUDE.md, so the working-under-Railguard guidance never reached the agent. This wires it in and expands it.CLAUDE.md— add@rules/common/railguard.mdto the imports (above the auto-managed<!-- railguard:start/end -->block, so re-running install won't clobber it).rules/common/railguard.md— expand from path-fence-only to the full picture: how to read allow/ask/block responses, the rules enforced here (no force-push, nosudo, no bulkgit add,reset --hard/clean -fgating, path fence allowed/denied roots), the "never retry a blocked command" evasion rule, and cwd-drift behavior.README.md— addrailguard.mdto the rules tree.The global
~/.claude/CLAUDE.mdsymlinks to this file, so this is the live global config.🤖 Generated with Claude Code