Skip to content

refactor: move approval to auto mode; stop only at session completion - #228

Merged
st0nefish-ci[bot] merged 4 commits into
masterfrom
refactor/drop-git-pr-guards
Oct 15, 2026
Merged

st0nefish-ci[bot] merged 4 commits into
masterfrom
refactor/drop-git-pr-guards

Conversation

@St0nefish

Copy link
Copy Markdown
Owner

Summary

Moves approval out of plugin machinery and into Claude Code auto mode, and makes the session/ship flow stop only to confirm that a whole session is complete, not after every PR.

Four commits, grouped by theme:

  1. Remove the permission-manager plugin (Claude + Copilot variants, tests, marketplace entries, sync manifest line).
  2. Remove approve-own-scripts and unused hook helpers. That PreToolUse hook auto-approved plugin scripts and also asked before gh|tea pr create|merge. It matched command text anywhere, so a grep/sed mentioning pr merge prompted too, and hooks' ask outranks allow rules, so nothing in settings could override it. Real hooks (format-on-save, notify-on-stop, statusline) are kept. Includes the plugin patch bumps.
  3. Rework stop points in session / git-tools / kb-capture / history-analyze / freecad. Plan approval now authorizes the whole stated Scope: through merge; the one deliberate stop is session-end's "confirm before we call this entire session complete". ship no longer waits for merge approval (Gitea merges first, then waits; GitHub waits only if a bot will merge), caps fix-forward at two attempts, and defines "own PR branch" for --force-with-lease.
  4. Docs for the above.

Force push, --no-verify, hook/CI bypass, release creation, and the destructive homelab ops are now gated by auto-mode soft_deny prose in the managed settings (outside this repo), unlockable by naming the exact action.

Notes for review

  • Intermediate commits are not each individually green on sync.sh --check/CI; the PR head is. Merge-commit merge keeps the grouping visible via git log --first-parent.
  • Installed clients only pick this up after the plugin versions update.
  • Behavior change to confirm: session-issue with exactly one open issue now proceeds without a confirmation prompt.

Test plan

  • bash .github/scripts/validate-all.sh (ci parity, plugin tests, structure, frontmatter, markdown lint, shell lint) passes
  • utils/sync.sh --check shows no drift
  • No remaining references to permission-manager, approve-own-scripts, hook_ask/hook_deny/hook_allow
  • After merge, update plugins and confirm gh pr create / gh pr merge and grep 'pr merge' no longer prompt

🤖 Generated with Claude Code

https://claude.ai/code/session_01EgYQhRvtxUaYZ1WcRpNg9R

St0nefish and others added 4 commits October 15, 2026 18:20
Approval now lives in Claude Code auto-mode config (managed settings),
so the first-token Bash classifier, its Copilot variant, tests, marketplace
entries and sync.sh manifest line are removed.

- delete plugins-claude/permission-manager and plugins-copilot/permission-manager
- delete tests/permission-manager and the test-permission-manager command
- drop both marketplace.json entries and the command-permissions .gitignore negation
- drop the 'Permission-manager users' note from the elevated-edit skill

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EgYQhRvtxUaYZ1WcRpNg9R
The PreToolUse hook that auto-approved a plugin's own scripts (and, until
now, asked before `gh|tea pr create|merge`) is redundant under auto mode,
and the PR guard matched command text anywhere, so a grep or sed mentioning
`pr merge` prompted too.

- delete utils/approve-own-scripts.sh, all vendored copies and its tests
- delete the hooks.json files that only invoked it (Claude and Copilot)
- keep real hooks (format-on-save, notify-on-stop, statusline) and fix their descriptions
- remove hook_ask/hook_allow/hook_deny from hook-compat.sh and stop vendoring
  it into plugins that no longer source it (only format-on-save and
  notify-on-stop keep it)
- drop the 'Script auto-approval' check from validate-plugins.sh and the
  matching NEEDS tokens in sync.sh
- drop the 'Hook auto-approval' section from the jar-explore skill
- patch-bump the affected plugins (Claude and Copilot plugin.json)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EgYQhRvtxUaYZ1WcRpNg9R
…mplete

Plan approval now authorizes the entire stated Scope through merge instead
of stopping after every unit. The one deliberate stop moves to the end of
session-end: confirm with the user before the session is called complete.

- session: plans end with a Scope: line; spine Phase 4 reports, ships units
  before the last via ship, then hands the last unit to session-end, which
  ships it once and confirms completion; start/issue/orchestrate and the
  Copilot mirrors follow
- git-tools ship: drop the explicit-approval merge gate (Gitea merges first,
  then waits; GitHub waits only if a bot will merge), cap fix-forward at two
  attempts, define 'own PR branch' for --force-with-lease
- kb-capture, history-analyze, freecad live: remove routine confirm prompts

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EgYQhRvtxUaYZ1WcRpNg9R
Drop permission-manager and approve-own-scripts from the plugin table,
tree, install examples, shared-scripts list and validation notes, and
refresh the sync.sh examples.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EgYQhRvtxUaYZ1WcRpNg9R
@st0nefish-ci
st0nefish-ci Bot enabled auto-merge October 15, 2026 22:21
@st0nefish-ci
st0nefish-ci Bot merged commit 57fa7e8 into master Oct 15, 2026
8 checks passed
@st0nefish-ci
st0nefish-ci Bot deleted the refactor/drop-git-pr-guards branch October 15, 2026 22:24
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