Repository navigation
chore(hook): retire enforce_gh_review_approval (autonomous issue/PR policy) - #403
Merged
Merged
Conversation
…olicy) Issues and PRs are now created and merged by agents once TDD + CI (ci-passed) are green; only a release tag still needs the maintainer's explicit consent. The transcript-approval gate from issue #34 therefore no longer applies. - Remove .agents/hook/enforce_gh_review_approval.sh and its PreToolUse Bash registration in .claude/settings.json. - Remove test/unit/hook/enforce_gh_review_approval_spec.bats. - test/unit/tool_hook_conformance_spec.bats: add a RETIRED_HOOKS ledger with two meta-tests asserting a retired hook is neither on disk nor registered in settings.json (RED before removal, GREEN after). - .agents/rules/{common,zh}/development-workflow.md: replace the review- approval section with a short "Autonomous issue / PR policy" section. - CHANGELOG: entry under [Unreleased] / Removed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01NX5H2vuMTv4mBmjpPYoS3s
ycpss91255
enabled auto-merge (squash)
September 19, 2026 09:44
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
Retire the
enforce_gh_review_approval.shPreToolUse hook (issue #34's transcript-approval gate forgh issue|pr create|edit)..agents/hook/enforce_gh_review_approval.sh(the.claude/hook/path is a directory symlink into.agents/hook/, so nothing else to unlink) and its.claude/settings.jsonPreToolUse Bash registration.test/unit/hook/enforce_gh_review_approval_spec.bats.test/unit/tool_hook_conformance_spec.batsgains aRETIRED_HOOKSledger with two meta-tests asserting a retired hook is neither on disk under.agents/hook/nor registered in.claude/settings.json, so it cannot creep back through a merge or a reflexive restore..agents/rules/{common,zh}/development-workflow.md: the "GitHub Issue / PR Review Approval (mandatory beforegh ... create)" section is replaced by a short "Autonomous issue / PR policy" section (zh file kept in Chinese).[Unreleased]/### Removed.No ADR documents this hook (
doc/adr/has no reference to it or to #34), so there is nothing to mark superseded; the retirement is recorded in the CHANGELOG and the rules docs.Why
Maintainer policy (2026-09-16/19): issues and PRs no longer wait for a per-item human draft approval. Agents create and merge them autonomously once TDD + CI (
ci-passed) are green; only a release tag still needs the maintainer's explicit consent. The transcript-approval gate (approve issue/approve pr/skip reviewphrases,ECC_ALLOW_GH_REVIEW=1bypass) therefore no longer applies and only blocks the autonomous flow.The English-only hook (
enforce_gh_english.sh),--body-filediscipline, and the issue-template hook are unchanged and still apply. Scoping the English-only hook to this repository is a separate PR.Test plan
TDD: the two
RETIRED_HOOKSmeta-tests were added first and run in Docker against the untouched tree (RED), then the hook, its registration, and its spec were removed (GREEN).RED (before removal):
GREEN (after removal):
Gates (Docker):
just -f justfile.ci lintjust -f justfile.ci test-unitjust -f justfile.ci linttail:just -f justfile.ci test-unittail (full unit tree, 1..7465, nonot ok):Verified
grep -rn enforce_gh_review_approval --exclude-dir=.git .finds no remaining reference outside the CHANGELOG history and the new retired-hooks ledger.