Plugin
agent-discipline
Claude Code の振る舞い規律を統合配送する system prompt plugin + gh issue/pr 物理層検知。 SessionStart で常時適用ルール (物理層 = Bash コマンド分解 / before 系 = 設計事前壁打ち + issue 詳細化 + sub-issue + #N 相互参照 + PR closing keyword 規約 / during 系 = 自律作業中の判断境界 / 排他系 = 連続 issue 解決時の claim comment + branch push 二段排他制御) を 1 回 inject。 auto mode 時のみ UserPromptSubmit で after 系 (commit→push→PR→merge 自走 + マージ前提条件 hard gate) を per-turn inject。 v0.4.0 で PreToolUse type:agent hook を追加し、 gh issue|pr create|edit の body content (--body inline / --body-file PATH 両対応) をセクション 2.1 / 3.1 の禁止表現規範で semantic 検証 → 違反時 block。 model はメイン session と同じ claude-opus-4-7 に pin し、 旧 llm-default-branch-push-poc 型の非対称 SPOF (session 生存中に hook 用 haiku のみ落ちる経路) を構造的に排除。 各 hook に `if: "Bash(gh <cmd>:*)"` filter を付与した 4 entries (gh issue create / edit / pr create / edit) 構成で、 非該当 Bash 呼び出しでは agent subagent を起動しない真の narrow scope を確保 (= prompt 内 early return では subagent は起動済みのため narrow scope が成立しないという codex review P1 指摘への対処)。 加えて各 prompt 冒頭に defense-in-depth command guard (Step 0) を置き、 複雑な command で `if` が fail-permissive で fall through した場合の偽 trigger を二段目で catch (= codex P2 指摘への対処)。 v0.3.0 でセクション 2 / 3 を「思考は自由、 成果物への固定化は要承認」 非対称ルールへ強化