feat: configurable auto-safe policy with global + per-project settings#229
Open
iabdousd wants to merge 16 commits into
Open
feat: configurable auto-safe policy with global + per-project settings#229iabdousd wants to merge 16 commits into
iabdousd wants to merge 16 commits into
Conversation
Design for a new global Auto-safe settings tab plus per-project override section. Replaces hardcoded policy.rs decisions with structured controls per category (Read scope, Write scope, WebSearch, WebFetch domains, MCP servers) and an editable Bash deny-pattern list. Per-project overrides take precedence per-category and per-pattern; worktree-protection hard blocks remain non-disable-able.
Backend rename + DB migration to convert existing 'normal' rows to 'auto_safe'. Numeric encoding unchanged (AutoSafe = 0).
…cher evaluate() now consumes auto_safe::EffectivePolicy, with read scope, write scope, web search/fetch modes, MCP server allowlist, and a user-configurable Bash deny pattern matcher. Hard blocks unchanged. Removed the old hardcoded check_git/check_gh/check_rm helpers and the internal-only tests that exercised them; user-pattern tests + integration tests via evaluate() cover the same surface.
Also fix pre-existing doctests in claude_jsonl::classify_envelope that broke compilation because the doc examples contained raw HTML-style envelope tags.
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
Spec: `docs/superpowers/specs/2026-05-02-auto-safe-policy-settings-design.md`
Plan: `docs/superpowers/plans/2026-05-02-auto-safe-policy-settings.md`
Test plan