← ClaudeAtlas

express-intent-in-codelisted

Use on confirmed working code whose name stops at mechanism (`bbox_xhtml`) or shape (`word_coordinate_data` / `useFieldSaveState`) and whose purpose survives only in why-comments, when /review-code-quality hands off a naming / cohesion finding as needs-judgment, or when the user says 「意図が伝わる名前にして」「コメントなしで読めるコードにして」. ALSO use while WRITING new code (経路2 生成時), the moment you are about to (a) write a comment, (b) leave a bare mechanism or constraint-workaround justification in a public method body, or (c) explain a boolean / null-vs-undefined meaning in a comment. Do NOT drive-by rename outside the target nor scan a whole diff (that is /review-code-quality); this is the deep one-point transformer / generation-time recipe. The only self-run whole-diff pass is a mechanical screening for homonym collisions (e.g. auth `token` vs placeholder `token`), 段0 noise-word identifiers, and comment-heavy new/ported files (comment lines > ~25% of non-blank lines).
YasuakiOmokawa/skills · ★ 0 · Data & Documents · score 70
Install: claude install-skill YasuakiOmokawa/skills
# Express Intent In Code ## Overview 読み手が最も知りたいのは「どう動くか (how/what)」ではなく「**なぜこの名前・行・構造がここに在るのか (why = ドメイン上の目的)**」。why コメントが増殖するのは、名前が機構 (`bbox_xhtml`) や形状 (`word_coordinate_data` / `useFieldSaveState`) 止まりで目的を表明できていない、もしくはドメイン概念が primitive・分岐・暗黙の不変条件に隠れている (概念欠落) サインである。正しい修正は**コメント追加ではなく「目的名への昇格 + 概念の構造化」**。 **到達目標は段4 ドメイン抽象** (`bbox_xhtml` → `signing_positions`) — 本体を 1 行も読まず**名前だけで意図・達成したいゴール・目的が掴める**水準。段4 へは 2 経路で到達する: codebase/仕様/UI 文言から実在のドメイン語を探して**それへ snap** (経路A)、または primitive が群れて欠落型を示しているなら**型 (Whole Value) を抽出** (経路B)。段4 は辞書引きの改名ではなく、しばしば型抽出という構造変更。共有語が無いのに造語して段4 に上げてはならない (確信ありげな誤誘導名は正直な what 名より有害)。詳細は [references/domain-abstraction.md](references/domain-abstraction.md)。 このスキルは working code を 1 点受け取り、名前/型/構造/テストを why 表明形へ**深く変換する規律**: caller を平叙文化 → 機構/目的を分離 → 目的名へ昇格 → ドメイン語を探索し段4 へ昇格 (or 探索ログを残して据え置き) → 名前で担えない why を型/sum type/テストへ昇格 → コードから絶対に読めない真の why のみコメント残置。`/review-code-quality` の「広く浅い診断」とは別物 (狭く深い一点突破の変換)。境界の詳細は [references/boundary-and-scope.md](references/boundary-and-scope.md)。 **適用は2経路**: **経路1** = 確定済み working code 1 点の事後変換 (上記、Step 0〜9)。**経路2** = **生成時** — 新規コードを書いている最中、(1) コメントを書きたくなった / (2) 機構・制約対応を公開本体に書き始めた / (3) 生のデータ形状に意味説明を添えそうになった、の3つの瞬間に意図をコードへ注入する。経路2 の SSOT は [references/generation-recipe.md](references/generation-recipe.md)。経路2 は新規に書く行だけに適用し、既存行の改名はしない (既存行に及ぶ場合は経路1 の Step 0 判定へ)。参照実装 (PoC / draft PR / 旧実装) からの移植・転記行は、この blast radius では初出の行として経路2 に含める — 移植元で確定済みだったことを適用除外の理由にしない (詳細: [references/generation-recipe.md](references/ge