docs(agents): 否定形の行動指示を基準付き肯定形に書き換える - #68
Merged
Merged
Conversation
Anthropic の現行プロンプトガイドの推奨 (肯定形優先・blanket rule より 条件付き指示・基準は検証可能な粒度) に沿って、モデルの生成傾向と衝突する gradient 型の否定形指示を「行為 + 発動基準」の肯定形へ書き換える。 - コメント規約: 「読めば分かるコメントを書かない」→ 制約・不変条件・ 非自明な設計理由を伝える場合に限って書く (AGENTS.md / CLAUDE.md / cpp.md) - 抽象化・共通化: 同一ロジックの重複が現に複数箇所へ現れた時点で導入する - スコープ原則: 変更は指示に直接根拠のあるものに限り、範囲外は提案として提示 - 成果物: 読者に不要な装飾は納品前に取り除く / 中間物は作業終了時に削除 - bash rules: ad-hoc script への ceremony 追加は再利用・共有時のみ git 操作を伴う行為禁止 (commit しない等) や安全系ガードレールは 二値の行為禁止であり否定形が適切なため対象外。
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.
概要
冗長コメントなどモデルの生成傾向 (prior) と衝突する否定形の行動指示を、Anthropic の現行ベストプラクティスに沿って「行為 + 発動基準」の肯定形へ書き換える。
背景
指示済みにもかかわらず Claude が冗長コメントを生成する問題の調査で、否定形指示 (「〜しない」) は生成時の習慣的傾向に対して遵守率が低いことを確認した。一次情報:
変更内容
home/dot_config/agents/AGENTS.mdhome/dot_claude/CLAUDE.mdhome/dot_claude/rules/cpp.mdhome/dot_claude/rules/bash.mdスコープ外
git 操作の禁止 (自発 commit しない等)・secret 取り扱い・安全系ガードレールは二値の行為禁止であり、否定形が適切なため書き換え対象外。
検証
mise run pre-commit全 hook Passedchezmoi applyで適用先 (~/.claude/,~/.config/agents/) への反映を grep で実測確認済み