Skip to content

Docs: markdown-writing skill を第三者可読性ルールへ拡張 (NDF v4.20.0)#59

Merged
takemi-ohama merged 4 commits into
mainfrom
docs/markdown-writing-terminology-hygiene
Jul 21, 2026
Merged

Docs: markdown-writing skill を第三者可読性ルールへ拡張 (NDF v4.20.0)#59
takemi-ohama merged 4 commits into
mainfrom
docs/markdown-writing-terminology-hygiene

Conversation

@takemi-ohama

@takemi-ohama takemi-ohama commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Summary

markdown-writing skill を、体裁ルール中心の内容から第三者が読んで理解できる文章を書くためのルールへ拡張しました。適用対象に仕様書・PR 本文・調査レポート・レビューコメントを追加しています。

1. 第三者可読性のルールを追加(SKILL.md)

  • 内部識別子を説明文に持ち込まない — テーブル名・カラム名などの識別子や、会話中に作ったローカル略語を「何のために」「何をやったか」の説明に使わない。書いた側は説明した気になり、読み手には伝わらないため。
  • 検討過程の痕跡を残さない — 「案A」「Option A」等の検討中ラベルや、「以前は〜だったが変更した」という変更履歴を本文に残さない。
  • 否定的結論にはエビデンスを必須とする — 「該当なし」「存在しない」と書く場合は根拠を添える。
  • 個人情報・認証情報を文書に含めない
  • 書き終えた後の grep セルフチェックとチェックリストを整備。

2. mermaid 図の横幅ルールを追加(01-diagram-guide.md)

mermaid は図の自然幅が本文幅を超えると図全体を縮小するため、横に長い図は文字が読めなくなります。この制約を実測して明文化しました。

mermaid 11.16.0 を Chromium で実際にレンダリングし、SVG の自然幅から実効文字サイズを算出した結果(本文16px 基準):

横のノード数 自然幅 GitHub(本文890px) Notion(本文708px)
3個 611px 16px 16px
4個 826px 16px 13.7px
5個 1041px 13.7px 10.9px
6個 1255px 11.3px 9.0px
7個 1470px 9.7px 7.7px

日本語ラベル(6文字程度)のノードは1個あたり約215px を消費し、GitHub は5個から、Notion は4個から縮小が始まります。この実測に基づき 横方向の要素は3個まで(4個を超えない) を上限としました。あわせて以下を記載しています。

  • 縮小はノード数ではなくで決まる(短ラベルなら GitHub で6個まで等倍)
  • 対処法 — graph TD で縦方向にする / <br/> でラベルを改行する / 図を分割する
  • シーケンス図の participant は1個あたり約200px、GitHub で4個・Notion で3個が上限

3. その他

  • 4ランタイム(ndf-shared / ndf-claude / ndf-codex / ndf-kiro)へ scripts/build-runtime-plugins.sh で同期し、NDF プラグインを v4.20.0 に更新(plugin.json × 2 / marketplace.json / README.md / AGENTS.md
  • cross-review 関連の issue plan 2件を追加(issues/issue-33-cross-review-resume-open-threads.mdissues/issue-37-cross-review-reply-resolve-guard.md)— 本 PR では plan の追加のみで、cross-review skill 本体の実装変更は含みません
  • Serena バージョンアップに伴う .serena/*.yml の自動更新を取り込み

Test plan

  • mermaid の横幅上限を Chromium 実レンダリングで検証し、GitHub 890px / Notion 708px での実効文字サイズを計測(上記の表)
  • plugins/ndf-shared と 3ランタイム配布物の markdown-writing/ が完全一致することを diff で確認
  • runtime plugin generated files の同期チェック(pre-push hook)が通過
  • claude plugin validate が通過
  • バージョン表記(4.20.0)が marketplace.json / plugin.json × 2 / README.md / AGENTS.md で揃っていること
  • 全文をスキャンし、非日本語文字(ハングル・キリル)の混入がないことを確認

やらないこと

  • cross-review skill 本体の実装変更(issue-33 / issue-37 は plan の追加のみ)
  • 既存ドキュメント側の図の書き換え(新ルールに適合しない既存図の修正は別 PR)

takemi-ohama and others added 3 commits July 21, 2026 11:41
- 適用対象に仕様書・PR本文・調査レポート・レビューコメントを追加
- 内部識別子(テーブル名・カラム名)やローカル略語を説明文に持ち込まない
  ルールを追加
- 検討過程の痕跡(案A / Option A 等)と変更履歴を本文に残さないルールを追加
- 否定的結論にエビデンスを必須とするルール、個人情報・認証情報を含めない
  ルールを追加
- 書き終えた後の grep セルフチェックとチェックリストを整備
- 4ランタイム(shared / claude / codex / kiro)へ同期し、NDF を v4.20.0 に更新
- cross-review 関連の issue plan(issue-33 / issue-37)を追加
- Serena バージョンアップに伴う .serena/*.yml の自動更新を取り込み

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YGaN4qDNqNCVcBGqzEr1RS
mermaid は図を表示領域の幅に収めて縮小するため、横に広い図ほど文字が
小さくなり読めなくなる。この制約と対処(縦方向レイアウト、ラベル短縮、
図の分割、participant 数の上限)を 01-diagram-guide.md に明記した。

4ランタイム(shared / claude / codex / kiro)へ同期済み。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YGaN4qDNqNCVcBGqzEr1RS
mermaid 11.16.0 を chromium で実際にレンダリングし、図の自然幅と
本文幅(GitHub 890px / Notion 708px)から実効文字サイズを計測した。

日本語ラベルのノードは1個あたり約215px を消費し、GitHub では5個から、
Notion では4個から縮小が始まる。7個では GitHub で 9.7px、Notion で
7.7px まで縮み、実質読めない。

当初記載の「5〜7個まで」は過大だったため、上限を3個(4個を超えない)に
修正し、実測値の対応表とラベル長による差(短ラベルなら GitHub 6個まで
等倍)を追記した。シーケンス図の participant 上限も同様に修正。

4ランタイム(shared / claude / codex / kiro)へ同期済み。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YGaN4qDNqNCVcBGqzEr1RS

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 1 | codex | REQUEST_CHANGES

修正が必要な点を2件インラインに記載しました。

Comment thread plugins/ndf-shared/skills/markdown-writing/SKILL.md Outdated
Comment thread .serena/serena_config.yml Outdated

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 1 | gemini | COMMENT

Markdown 執筆ルールの拡充と実測値の反映を確認しました。
インラインにて、セルフチェック用コマンドの正規表現に関する微修正を 1件提案しています。

Comment thread plugins/ndf-shared/skills/markdown-writing/SKILL.md Outdated
- セルフチェックの grep 実行のため allowed-tools に Bash / Grep を追加
- 識別子検出の正規表現を [a-z]+_[a-z0-9_]{2,} に修正し user_id / plan_id 等の2文字サフィックスを検知
- .serena/serena_config.yml の trusted_project_path_patterns から '**' を削除し空に変更

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 2 | gemini | APPROVE

本PRの変更(markdown-writing skill の可読性ルール拡張)について確認しました。指摘事項はありません。

@takemi-ohama takemi-ohama left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 cross-review | round 2 | codex | APPROVE

追加の修正要求はありません。round 1 の既存指摘は現 head で対応済みとして確認しました。

@takemi-ohama
takemi-ohama merged commit 388ec45 into main Jul 21, 2026
6 checks passed
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.

1 participant