Skip to content

feat(pi-automode): add command rules and reviewed reusable permissions - #87

Merged
GaganSD merged 13 commits into
mainfrom
automode/rules-rework
Nov 13, 2026
Merged

GaganSD merged 13 commits into
mainfrom
automode/rules-rework

Conversation

@GaganSD

@GaganSD GaganSD commented Oct 23, 2026 •

Copy link
Copy Markdown
Owner
  • Replace message rules with indexed command/tool-path allowlists and blocklists supporting exact, glob, and restricted regex matching.
  • Add consent-bound model review and explicitly confirmed reusable permissions, with audit and save-authority checks.
  • Expand offline and real-Pi tests and document verification limits.
  • Support opt-in six-hour subagent deadlines while retaining the thirty-minute default.

- Rules are now strict commands or glob patterns matched against the full
  bash command text: '*' is the only wildcard and matches any run of
  characters; every other byte is literal. Message rules are removed;
  legacy files carrying them are rejected with an explicit migration
  error, legacy type: "command" entries are accepted and normalized.
- Matching scales with rule count: rules compile once per settings
  snapshot (memoized by list identity) into an exact-match hash map plus
  anchored regexes bucketed by first literal byte, so a lookup is one
  hash probe plus at most a small bucket of regex tests.
- UI vocabulary is allowlist/blocklist throughout; the add-rule flow
  offers Allowlist command / Blocklist command only.
- The decision-model envelope now asks a single typed safety question
  (safe / unsafe / uncertain) and carries the exact bash command under
  review; operator rules never leave the machine. Receipts drop the
  shadow marker; the gate's activation lands separately.
Always Allow now requires the current registry model and
checkDisclosureConsent bindings, not a version-only flag.
@GaganSD
GaganSD marked this pull request as ready for review November 13, 2026 21:19
@GaganSD
GaganSD merged commit ebc679e into main Nov 13, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant