fix: Claude 5 公式プロンプトガイド準拠のプロンプト是正 (6 plugin) - #336
Merged
Conversation
Anthropic 公式ガイド (claude-prompting-best-practices / prompting-claude-{fable,opus,sonnet}-5 /
context engineering blog) に照らした監査で確定した 6 plugin のプロンプト是正を、
実行可能仕様として tests/test_claude5_prompt_guideline_fixes.py に固定する。
- agent-discipline: 3-way 分業規律間の共有 canonical 文の存在 (同一メッセージ並列委任・
検証系カテゴリ・fork の正の代替・WebSearch 例・目的背景の限定・TMPDIR 例) と
環境値 (xhigh) ハードコード不在、always-fable の AskUserQuestion scope caveat、
subagent-rules のパイプ許容規定
- git-guardrails: rebase-workflow のコマンド置換一括例の不在と origin/HEAD stale 対策
- pre-push-review: Opus 5 reviewer report の長さ較正
- codex-advisor: advisor-rules と consult/SKILL の checkpoint 重複の参照化 (安全必須項は維持)
- ui-discipline: 完了前チェックリストの位置づけ緩和
- natsuume-writing: draft 一括生成の分量較正
Generated with [Claude Code](https://claude.com/claude-code)
pre-push 3 レビュー (code / codex) の指摘を採用し、Phase B 仕様としての 検査強度を上げる: - rebase-workflow: fetch --prune → set-head --auto → symbolic-ref の最初の 出現位置の相対順序を固定 (存在検査のみでは後段出現でも green になるため)。 DEFAULT_BRANCH は定義行だけでなく変数名トークン全体を禁止し、消費側の 残骸 (undefined 変数参照) を塞ぐ - codex-advisor: checkpoint 重複は 1 bullet のサンプル検査ではなく 4 項目 すべての不在を検査。async_launched 回収手順の逐語重複の不在と、正本識別子 (`/codex-advisor:consult`) 付き参照の存在も追加 - effort 環境値: 文単位ではなく値トークン (xhigh) の不在検査に変更し、 言い換えで値だけ残る経路を塞ぐ 見送り (may-defer 採否記録): 「その他の存在検査 (パイプ許容・チェックリスト・ 分量較正) にも rule block アンカーを付ける」は、対象フレーズが固有で誤 green の実現可能性が低く限界効用が小さいため今回は採用しない (code review P3 / confidence low)。 Generated with [Claude Code](https://claude.com/claude-code)
2 巡目の pre-push 3 レビュー指摘を反映する: - [must-fix 採用] advisor-rules の async 回収手順の参照化は、consult skill を 経由しない直接 runner 起動経路で義務が context から消えるため、常時注入側に 「terminal report が返るまで」の残余文を必ず残す契約に変更 (除去のみの assertion から、除去 + 残余存在のペア assertion へ) - [codex P2 採用] consult/SKILL.md 正本側の positive assertion を追加: checkpoint テンプレート全 5 フィールドと async 回収手順 (TaskOutput / terminal report) の維持を固定し、参照先ごと縮退する事故を塞ぐ - [codex P2 採用] rebase-workflow のコマンド置換検出を変数名依存から構造的 検出 ($(git) との併用に強化 - [code P3 採用] reviewer 長さ較正の assertion を意図特定可能な長いフレーズに 変更し、subTest を撤去して runner 差異による false green を排除 Generated with [Claude Code](https://claude.com/claude-code)
Anthropic 公式ガイド (claude-prompting-best-practices / prompting-claude-{fable,opus,sonnet}-5 /
context engineering blog) 監査で確定した是正を 6 plugin に適用し、Phase A の契約テストを
全 green にする。
- agent-discipline 0.22.1: 3-way 分業規律間 drift 修復 (fable 版へ同一メッセージ並列委任・
検証系カテゴリ・fork の正の代替・TMPDIR 例を補完、opus 版へ WebSearch 例・目的背景の
限定文を補完、fable/sonnet 版の「この環境では xhigh」環境値ハードコード除去)、
always-fable へ AskUserQuestion scope caveat 補完、subagent-rules へ単一論理操作
パイプ許容規定を追加
- git-guardrails 0.6.1: rebase-workflow の一括コマンド例 (コマンド置換 + 変数連結、
bash-decompose 規律違反) を削除し、origin/HEAD stale 対策 (fetch --prune →
set-head --auto の先行) を手順 1 に統合
- pre-push-review 5.1.1: Opus 5 固定 reviewer 2 体の report contract に長さ較正
(自由記述フィールド 1 文制限) を追加
- codex-advisor 2.0.1: advisor-rules (8K 注入予算) の checkpoint 4 項目と async 回収
手順を consult/SKILL.md 正本への参照に置換 (terminal report までの残余義務と
model/run_in_background の安全必須項は常時注入側に維持)
- ui-discipline 0.4.1: ui-patterns の完了前チェックリストを「見落としやすい項目の
再確認 (触れたルールのみ)」に位置づけ変更 (Opus 5 過剰検証対策)
- natsuume-writing 0.6.1: draft skill の一括生成に分量較正を追加
併せて 3 巡目レビューの may-defer 採用分としてテストの pipe 許容 assertion を
polarity 込みの長フレーズ検査に強化。may-defer 見送り分 (assertion の空白・markdown
装飾・リスト記号の正規化耐性、順序検査の literal 依存) は PR 説明に記録。
検証: 契約テスト 15 件 pass / 既存スイート pass (既知の環境依存 1 件を除く) /
lint-prompt-sync 全チェック OK / check_plugin_versions OK / 注入プロンプト全ファイル
8,000 UTF-16 units 未満。
Generated with [Claude Code](https://claude.com/claude-code)
natsuume
marked this pull request as ready for review
July 26, 2026 05:55
This was referenced Jul 26, 2026
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.
概要
Anthropic 公式の Claude 5 世代プロンプトガイド 5 本 (claude-prompting-best-practices / prompting-claude-fable-5 / prompting-claude-opus-5 / prompting-claude-sonnet-5 / context engineering blog) に照らして全 13 plugin・約 50 プロンプトファイルを監査し、確定した是正 (Tier 1: 実害のある drift 修復 + Tier 2: 公式推奨準拠の改善) を適用する。
背景 (監査結果の要点)
変更内容
Tier 1 (drift 修復・矛盾是正)
Tier 2 (公式推奨準拠)
model: "sonnet"/run_in_background: falseの安全必須項は常時注入側に維持バージョン
いずれも patch bump (bug fix 相当の是正):
設計判断 (ユーザ確認済み)
レビュー経過
Phase A (契約テスト) に対し pre-push 3 レビューを 3 巡実施。must-fix 2 件 (rebase 順序固定の欠如、advisor 残余義務の未固定) は採用済み。may-defer のうち正本側 positive assertion・構造的検出・subTest 除去・アンカー付き較正文を採用。以下は記録付き見送り:
残課題 (スコープ外)
🤖 Generated with Claude Code