Skip to content

feat: 挙動ガード hook を整理(console-log-guard / git-push-review 廃止ほか)(#113、v0.63.0)#128

Merged
okash1n merged 1 commit into
mainfrom
issue/113-hook-cleanup
Jun 12, 2026
Merged

feat: 挙動ガード hook を整理(console-log-guard / git-push-review 廃止ほか)(#113、v0.63.0)#128
okash1n merged 1 commit into
mainfrom
issue/113-hook-cleanup

Conversation

@okash1n

@okash1n okash1n commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

概要

LLM 性能監査計画 #121 の P2-07(#113)。残る挙動ガード hook 4 つを整理する。

変更内容

廃止(2 feature)

  • console-log-guard: exit 0 の stderr 警告はモデルに届かず矯正効果がなく、正当な console.log(CLI ツール等)にも無差別警告していた。rules/coding-style.md と linter(ESLint no-console / biome)へ委譲
  • git-push-review: 毎 push の定型 1 行リマインダーは情報量ゼロで、実効ガードは permissions.json の force-push deny が担当。lib/deploy.sh の __EDITOR_CMD__ 置換特例(hooks.json にトークンが無いデッドコード)と editor_command()(呼び出し元ゼロ)も削除。_FEATURE_SCRIPT_ORDER_FEATURE_ORDER と同一に。エディタ選択ステップは記録用として存続(README / i18n / docs の文言を実態に合わせて修正)
  • 両者を _RETIRED_HOOK_FEATURES に追加(settings.json エントリの update 時除去)。スクリプトは retired 掃除で削除。ENABLE_* はレガシーキー化(保存済み config の読み込みは壊れない)
  • 設計判断: Issue 推奨のオプション「git push を permissions ask へ」は採用しない — push のたびに確認が入るのは現行モデルの標準行動(push 前の diff/log 確認)に対する過剰ガードで、force-push deny で十分

再設計(2 feature)

  • doc-size-guard: 誤検知率ほぼ 100%(当リポジトリ CLAUDE.md で 59/59 件誤検知)のパス参照チェックを削除。ERROR / exit 1 を廃止し常に非ブロック WARNING のみ。閾値を CLAUDE.md 150→250 / AGENTS.md 60→150 に緩和。feature.json standard: true と profiles の false の矛盾を解消(false に統一)
  • no-flicker: standard / full 既定 false(opt-in 化)。現行 CLI には第一級の tui: "fullscreen" があり、かつ tmux 等で fullscreen を自動無効化する安全側判定を env 注入が強制オーバーライドするため。description の「experimental」を削除。tui キーへの hooks.json 切替は対応最小バージョン確認後に別途(env var は現役のオーバーライド経路のため即時削除はしない)

検証

  • shellcheck green / unit 342/342 / scenarios 44 Pass + 1 Skip
  • HOOK_KEYS / HOOK_TOKENS / HOOK_LABELS は 3 配列 11 要素で整合
  • no-flicker / doc-size-guard の既存ユーザー明示的有効化は保存 config 経由で維持(_fill_noninteractive_defaults は空値のみ補完)
  • 内部レビュー(code-reviewer agent): high 1 件(wizard-config-mapping の EDITOR_CHOICE 旧記述)+ medium 1 件(CLAUDE.md のゴースト例示)+ low 1 件(テストの残留変数)→ すべて修正済み

Closes #113

…e-guard 警告専用化、no-flicker opt-in 化(#113、v0.63.0)

- console-log-guard: rules/coding-style + linter へ委譲して撤去
- git-push-review: 定型リマインダーを撤去(実効ガードは permissions の deny 側)。__EDITOR_CMD__ デッドコードと editor_command() も削除
- doc-size-guard: 誤検知だらけの path 参照チェック削除、ERROR/exit 1 廃止、閾値緩和(CLAUDE 250 / AGENTS 150)、feature.json と profiles の矛盾解消
- no-flicker: 既定 OFF(tui: fullscreen が第一級設定として存在)、experimental 表記削除
- 両廃止 feature を _RETIRED_HOOK_FEATURES に追加、レガシーキー化、docs/README/i18n/テスト追随

Closes #113
Copilot AI review requested due to automatic review settings June 12, 2026 02:07
@okash1n okash1n merged commit 2720a13 into main Jun 12, 2026
12 checks passed
@okash1n okash1n deleted the issue/113-hook-cleanup branch June 12, 2026 02:10

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes and simplifies “behavior guard” hook features as part of the LLM performance audit work, retiring low-signal hooks and making remaining guards non-blocking / opt-in to reduce noise and stale assumptions in the starter kit.

Changes:

  • Retires console-log-guard and git-push-review, and adds them to the update-path retired-hook cleanup.
  • Redesigns doc-size-guard to be warning-only (non-blocking) with relaxed thresholds and removed false-positive path checks.
  • Makes no-flicker opt-in by default and updates docs/tests/configs to match the new feature set.

Reviewed changes

Copilot reviewed 32 out of 32 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
wizard/wizard.sh Marks retired hook flags as legacy/read-only env compatibility.
wizard/registry.sh Moves retired flags into legacy keys; removes them from hook registries.
wizard/defaults.conf Drops defaults for retired hook flags.
tests/unit/test-web-content-extraction.sh Removes retired flags from test reset list.
tests/unit/test-runtime-hooks.sh Removes retired features from runtime hook script tests.
tests/unit/test-retired-files.sh Updates retired-files regression tests to target a remaining scripted feature.
tests/unit/test-hook-fixtures.sh Removes fixture coverage for retired hook scripts/audits.
README.md Updates Japanese docs to reflect editor step and retired hooks.
README.en.md Updates English docs to reflect retired hooks and editor step behavior.
profiles/standard.conf Removes retired hook defaults; makes no-flicker opt-in.
profiles/minimal.conf Removes retired hook defaults.
profiles/full.conf Removes retired hook defaults; makes no-flicker opt-in.
lib/update.sh Adds retired hook features to update stripping of settings.json hook entries.
lib/features.sh Removes retired features from registries and unifies script order with feature order.
lib/deploy.sh Removes git-push-review special casing and the unused editor command helper.
i18n/ja/strings.sh Updates editor step label and removes retired hook labels.
i18n/en/strings.sh Updates editor step label and removes retired hook labels.
features/no-flicker/feature.json Updates no-flicker description and profile defaults (opt-in).
features/git-push-review/scripts/remind.sh Removed (feature retired).
features/git-push-review/hooks.json Removed (feature retired).
features/git-push-review/feature.json Removed (feature retired).
features/doc-size-guard/scripts/check-doc-size.sh Converts to warning-only, removes path checks, relaxes thresholds.
features/doc-size-guard/feature.json Aligns description and profile defaults with non-blocking behavior.
features/console-log-guard/scripts/check-file.sh Removed (feature retired).
features/console-log-guard/scripts/audit-session.sh Removed (feature retired).
features/console-log-guard/hooks.json Removed (feature retired).
features/console-log-guard/feature.json Removed (feature retired).
docs/wizard-config-mapping.md Updates mapping/docs to reflect editor step and retired flags.
docs/wizard-config-mapping.en.md Updates mapping/docs to reflect editor step and retired flags.
docs/GUIDES/hooks-reference.md Removes retired hooks from reference tables.
CLAUDE.md Updates contributor checklist guidance for script deployment registries.
CHANGELOG.md Adds v0.63.0 entry describing the retirements and redesigns.

Comment thread README.md
> **エディタの質問について**: ステップ 5 で「どのエディタを使っていますか?」と聞かれます。
> これは git push レビューフック(push 実行前にレビューを促すリマインダーを表示する機能)を有効にするかどうかの設定です
> これは使用しているエディタを記録するための設定です(現在この選択で挙動が変わる機能はありません)
> エディタの起動や差分表示は行いません。「なし」を選ぶとこのフックは追加されません。
Comment thread CHANGELOG.md

### Removed
- **console-log-guard を廃止(#113)**: JS/TS 編集ごとの console.log 警告と SessionEnd 全体監査を撤去。exit 0 の stderr 警告はモデルの行動を変えられず、CLI ツール等の正当な console.log にも無差別警告していた。rules/coding-style.md の「stray debug output」ルールと linter(ESLint no-console / biome)への委譲で代替
- **git-push-review を廃止(#113)**: git push 前の定型リマインダー(情報量ゼロの stderr 1 行)を撤去。実効的なガードは permissions.json の force-push deny 側が担っている。lib/deploy.sh の `__EDITOR_CMD__` 置換特例(デッドコード)と `editor_command()`(呼び出し元ゼロ)も削除。エディタ選択ステップは設定記録用として存続(文言を修正)
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.

[P2-07] 残り挙動ガード hook の整理(console-log-guard / git-push-review / doc-size-guard / no-flicker)

2 participants