feat(cesar): permission modes at Claude Code parity with a destructiv… - #292
Merged
Conversation
…e-ops seatbelt The task-lease layer evaluated above the permission mode, so mode auto still prompted in ways Claude Code's bypassPermissions never does — most painfully important_task (fires when the user's own prompt text mentions auth/session/permission/migration/database/security) and dangerous_boundary for plain git push/deploy/publish. Contained edits in auto-edit could inherit those lease asks too, which acceptEdits never does. New contract (spec: .claude/specs/permission-mode-cc-parity/spec.md, nero-challenged, security-review-hardened): - auto = bypassPermissions + seatbelt: important_task never fires; plain push/deploy/publish/create-pr/mutating-curl auto-run; a DESTRUCTIVE class still asks (force push, remote branch deletion, reset --hard, clean -f, rm -rf, dropdb/drop database, migrate reset), matcher config-overridable via cesarDestructiveActionPattern; workspace escapes ask instead of silently denying; leaseless/ delegated boundaries and all deny paths unchanged. - auto-edit = acceptEdits: contained file edits never inherit lease risk asks; sensitive paths (.git/hooks/, .husky/, .env*, credentials, keys — shared matcher, cesarSensitivePathPatterns override) still ask. - ask unchanged. Security hardening from the 6-engine role review (3 verified bypasses closed): pasted content (fences, diffs, quotes) no longer counts as explicit user authority for destructive commands; the destructive matcher normalizes git global flags and long/short flag spellings (git -C dir push --force, git push -d, git clean --force, rm --recursive --force); sensitive-path matching canonicalizes through the same realpath resolver as the rule engine, killing dot-segment, double-slash and symlink aliases; and a resolver-stage ask can no longer be downgraded by lease re-derivation (mandatoryAsk threading). ⚔️ Forged by [Agon](https://github.com/KERNlang/agon) Co-Authored-By: agon (KERN) <292465531+KERN-Agon@users.noreply.github.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.
…e-ops seatbelt
The task-lease layer evaluated above the permission mode, so mode auto still prompted in ways Claude Code's bypassPermissions never does — most painfully important_task (fires when the user's own prompt text mentions auth/session/permission/migration/database/security) and dangerous_boundary for plain git push/deploy/publish. Contained edits in auto-edit could inherit those lease asks too, which acceptEdits never does.
New contract (spec: .claude/specs/permission-mode-cc-parity/spec.md, nero-challenged, security-review-hardened):
Security hardening from the 6-engine role review (3 verified bypasses closed): pasted content (fences, diffs, quotes) no longer counts as explicit user authority for destructive commands; the destructive matcher normalizes git global flags and long/short flag spellings (git -C dir push --force, git push -d, git clean --force, rm --recursive --force); sensitive-path matching canonicalizes through the same realpath resolver as the rule engine, killing dot-segment, double-slash and symlink aliases; and a resolver-stage ask can no longer be downgraded by lease re-derivation (mandatoryAsk threading).
⚔️ Forged by Agon