feat(orchestrate): consent-gated permission-rule installer + onboarding flow — v1.6.0 - #71
Merged
Merged
Conversation
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.
Follows up #70. That PR documented the coordinator permission requirement; this one automates the fix at onboarding — consent-gated, never silent (a plugin silently widening user permissions is the supply-chain escalation pattern guardrails exists to stop).
What
skills/orchestrate/scripts/install-permission-rules.sh(new) — merges the three worker-managementpermissions.allowpath rules + oneautoMode.allowclassifier-context rule into a Claude Code settings.json. Idempotent (already-present → no-op, no backup);--checkread-only probe (0 present / 4 absent / 3 malformed); refuses a malformed target untouched (a broken settings.json silently disables all its settings); backs up before modifying; atomic tmp+mv with post-write jq validation; seedsautoMode.allowas["$defaults", rule]fresh but append-only on an existing list (a user who removed$defaultsdid so deliberately); embeds the real$HOME(permission rules don't expand~); cache glob covers any marketplace/version.safe-cleanup.shdeliberately excluded.--check→ on absent, ask the user once (showing exactly what would be added) → on explicit yes run the installer → on no or classifier-block, fall back to the pasteable snippet and continue. A later DENY re-offers and stops — never works around the block.plugin.json+marketplace.json→ 1.6.0 (the updater keys on the version string; shipping under an unchanged version is never pulled).Verification
tests/install-permission-rules.bats: 12 tests (fresh install, merge-preserving, idempotency, autoMode append-only, malformed refusal, backup,--check×3, missing jq, usage, default target). Mutation-proofed (seeding change → red → restored).~/.claude/settings.json); its one non-blocking gap (default-target path) closed with test 12.