docs(todo): 50KB 超過の todo 系ファイルを物理分割し cli-docs-lint を分割 index 対応に - #306
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthrough推奨実行順序サマリーを Changesサマリー分割と lint 対応
TODO ファイル分割
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant DocsDirectory
participant SummaryFileLister
participant TableRowParser
participant PriorityChecker
participant ViolationReporter
DocsDirectory->>SummaryFileLister: list todo-summary*.md
SummaryFileLister->>TableRowParser: parse each summary file
TableRowParser->>PriorityChecker: provide rows with source paths
PriorityChecker->>ViolationReporter: report cross-part inversion
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🤖 PR Monitor 分析 (GitHub Actions バックストップ)
Applicable Findings (Critical / High / Major)(該当なし — レビュー未完了のため指摘自体が存在しない) Applicable Findings (Medium 以下)(該当なし) Filtered (not applicable)(該当なし) diff 概要(軽量サマリー)
次のアクション
|
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/todo10.md`:
- Line 5: Update the “new entries” routing statement in the document-position
note so new tasks are directed to the post-split designated todo file, while
todo10.md remains reserved for editing or removing existing entries; preserve
the references to historical entries and the 21-file review requirement.
In `@docs/todo15.md`:
- Line 24: 各TODOの完了時に削除するサマリー先を更新してください。docs/todo15.md 24行目は todo-summary2.md
の順位248-296、docs/todo16.md 22行目は順位297-318、docs/todo17.md
43行目は順位319-332、docs/todo19.md 43行目は順位220-224を削除する指示に変更してください。
In `@docs/todo17.md`:
- Line 359: 末尾の既知課題参照を分割元に合わせて更新してください。docs/todo17.md の参照先を docs/todo13.md
に、docs/todo19.md の参照先を docs/todo10.md に変更し、不要な参照であれば両方から削除してください。
In `@docs/todo3.md`:
- Line 5: Update the preamble references in docs/todo3.md:5, docs/todo4.md:5,
docs/todo5.md:5, docs/todo6.md:5, docs/todo7.md:5, and docs/todo8.md:5 from
todo2-9.md to todo2-19.md; update docs/todo9.md:5 from todo2-8.md to
todo2-19.md, ensuring all preambles enumerate the complete TODO file range.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: f5a6c7c7-4393-42b4-ac9c-d3c5d1b894ba
📒 Files selected for processing (21)
docs/todo-summary.mddocs/todo-summary2.mddocs/todo.mddocs/todo10.mddocs/todo11.mddocs/todo13.mddocs/todo14.mddocs/todo15.mddocs/todo16.mddocs/todo17.mddocs/todo18.mddocs/todo19.mddocs/todo3.mddocs/todo4.mddocs/todo5.mddocs/todo6.mddocs/todo7.mddocs/todo8.mddocs/todo9.mdsrc/cli-docs-lint/src/preamble.rssrc/cli-docs-lint/src/priority_inversion.rs
| > **運用ルール** ([docs/todo.md](todo.md) と同一): 各タスクには **やろうとしたこと / 現在地 / 詰まっている箇所** を必ず書く。完了タスクは ADR か仕組みに反映後、このファイルから削除する。過去の経緯は git log で追跡可能。 | ||
| > | ||
| > **本ファイルの位置付け**: docs/todo9.md がファイルサイズ 50KB を超え行数 1100+ 行に到達したため、Claude Code の読み取り安定性 (50KB 超で不安定化) を考慮して新規エントリは本ファイルに記録する (PR #185 = Bundle CR-RL land 後、2026-05-29 ユーザー判断)。**新規エントリの追加先は引き続き本ファイル** (2026-06-12 PR #204 で PR #185 〜 PR #196 era の 8 エントリを [docs/todo12.md](todo12.md) に分離して file_size_check 50KB threshold 内に収めた、todo12.md は新規追加先ではない)。todo.md / todo2.md 〜 todo9.md / todo11.md / todo12.md の既存エントリは引き続き有効、相互に独立。新セッションでは十五つすべてを確認すること (todo.md / todo2-14.md / todo-summary.md)。 | ||
| > **本ファイルの位置付け**: docs/todo9.md がファイルサイズ 50KB を超え行数 1100+ 行に到達したため、Claude Code の読み取り安定性 (50KB 超で不安定化) を考慮して新規エントリは本ファイルに記録する (PR #185 = Bundle CR-RL land 後、2026-05-29 ユーザー判断)。**新規エントリの追加先は引き続き本ファイル** (2026-06-12 PR #204 で PR #185 〜 PR #196 era の 8 エントリを [docs/todo12.md](todo12.md) に分離して file_size_check 50KB threshold 内に収めた、todo12.md は新規追加先ではない)。todo.md / todo2.md 〜 todo9.md / todo11.md / todo12.md の既存エントリは引き続き有効、相互に独立。**2026-07-20 に順位 215-224 を todo18.md/todo19.md へ物理分割し、本ファイルは順位 198-214 のみ収容 (docs 50KB 超過解消、39KB 台に縮小)。**新セッションでは21つすべてを確認すること (todo.md / todo2-19.md / todo-summary.md / todo-summary2.md)。 |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
物理分割後の追加先を正しい方針に更新してください。
この行は「新規エントリを本ファイルに追加する」と記載していますが、docs/todo.md では docs/todo10.md を既存タスクの編集・完了削除専用としています。新規タスクを再び todo10.md に追加すると、分割後の routing 契約に違反します。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/todo10.md` at line 5, Update the “new entries” routing statement in the
document-position note so new tasks are directed to the post-split designated
todo file, while todo10.md remains reserved for editing or removing existing
entries; preserve the references to historical entries and the 21-file review
requirement.
|
|
||
| - [ ] Gate Function Design Checklist を `CLAUDE.md` patterns section または `docs/guides/gate-functions.md` に新設: (1) 判定不能状態は fail-closed、(2) gate 関数内で `filter_map + .ok()?` 禁止、(3) single-pass file access で TOCTOU 回避、(4) iterator chain + `Result::?` idiom で nesting depth 抑制、(5) エラーパスを明示的にテスト | ||
| - [ ] ADR-043 (順位 249) との相互リンク | ||
| - [ ] 本 entry 削除 + todo-summary.md 行削除 |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟠 Major | 🏗️ Heavy lift
分割後のサマリー行削除先を更新してください。
docs/todo-summary.md は順位 6-219、docs/todo-summary2.md は順位 220 以降を収容します。したがって、これらの Part の完了時に削除すべき行は todo-summary2.md 側です。
docs/todo15.md#L24-L24:todo-summary2.mdの順位 248-296 の行を削除する指示に変更。docs/todo16.md#L22-L22:todo-summary2.mdの順位 297-318 の行を削除する指示に変更。docs/todo17.md#L43-L43:todo-summary2.mdの順位 319-332 の行を削除する指示に変更。docs/todo19.md#L43-L43:todo-summary2.mdの順位 220-224 の行を削除する指示に変更。
📍 Affects 4 files
docs/todo15.md#L24-L24(this comment)docs/todo16.md#L22-L22docs/todo17.md#L43-L43docs/todo19.md#L43-L43
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/todo15.md` at line 24, 各TODOの完了時に削除するサマリー先を更新してください。docs/todo15.md 24行目は
todo-summary2.md の順位248-296、docs/todo16.md 22行目は順位297-318、docs/todo17.md
43行目は順位319-332、docs/todo19.md 43行目は順位220-224を削除する指示に変更してください。
|
|
||
| ## 既知課題 (記録のみ、本セッションで未対応) | ||
|
|
||
| (現時点で本ファイルへの既知課題は無し。docs/todo10.md / todo9.md 末尾を参照。) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
for f in docs/todo17.md docs/todo19.md docs/todo10.md docs/todo13.md docs/todo9.md; do
echo "===== $f ====="
if [ -f "$f" ]; then
wc -l "$f"
echo "--- tail ---"
tail -n 20 "$f" | cat -n
else
echo "MISSING"
fi
echo
done
echo "===== search: 既知課題 / 分割元 / 参照 ====="
rg -n "既知課題|分割元|todo10|todo13|todo9" docs/todo*.mdRepository: aloekun/claude-code-hook-test
Length of output: 32102
🏁 Script executed:
#!/bin/bash
set -euo pipefail
for f in docs/todo17.md docs/todo19.md docs/todo10.md docs/todo13.md docs/todo9.md; do
echo "===== $f ====="
sed -n '1,12p;$(( $(wc -l < "$f")-11 )),${p}' "$f" 2>/dev/null | cat -n
echo
doneRepository: aloekun/claude-code-hook-test
Length of output: 194
末尾の参照先を分割元に揃えてください。 docs/todo17.md は docs/todo13.md から、docs/todo19.md は docs/todo10.md から分割されていますが、末尾の「既知課題」参照がそれぞれ docs/todo10.md / todo9.md、docs/todo9.md のままです。不要なら削除し、残すなら分割元ファイルを指すように更新してください。
📍 Affects 2 files
docs/todo17.md#L359-L359(this comment)docs/todo19.md#L286-L286
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/todo17.md` at line 359, 末尾の既知課題参照を分割元に合わせて更新してください。docs/todo17.md の参照先を
docs/todo13.md に、docs/todo19.md の参照先を docs/todo10.md に変更し、不要な参照であれば両方から削除してください。
| > **運用ルール** ([docs/todo.md](todo.md) と同一): 各タスクには **やろうとしたこと / 現在地 / 詰まっている箇所** を必ず書く。完了タスクは ADR か仕組みに反映後、このファイルから削除する。過去の経緯は git log で追跡可能。 | ||
| > | ||
| > **本ファイルの位置付け**: docs/todo2.md がファイルサイズ約 50KB に到達したため、Claude Code の読み取り安定性 (50KB 超で不安定化) を考慮して PR #88 以降の新規エントリは本ファイルに記録した。本ファイルも PR #96 セッションで 50KB 接近のため、それ以降の新規エントリは [docs/todo4.md](todo4.md) へ。todo.md / todo2-9.md の既存エントリは引き続き有効、相互に独立。新セッションでは十五つすべてを確認すること (todo.md / todo2-14.md / todo-summary.md)。 | ||
| > **本ファイルの位置付け**: docs/todo2.md がファイルサイズ約 50KB に到達したため、Claude Code の読み取り安定性 (50KB 超で不安定化) を考慮して PR #88 以降の新規エントリは本ファイルに記録した。本ファイルも PR #96 セッションで 50KB 接近のため、それ以降の新規エントリは [docs/todo4.md](todo4.md) へ。todo.md / todo2-9.md の既存エントリは引き続き有効、相互に独立。新セッションでは21つすべてを確認すること (todo.md / todo2-19.md / todo-summary.md / todo-summary2.md)。 |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
分割後の全 TODO ファイルを既存エントリ範囲に含めてください。
複数の preamble が、確認対象を21ファイルと定義しながら、既存エントリの列挙を todo2-8.md または todo2-9.md で止めています。この不一致は、週次レビューや lint の利用者が todo10.md〜todo19.md のタスクを対象外と誤認する原因になります。
docs/todo3.md#L5-L5:todo2-9.mdをtodo2-19.mdに更新する。docs/todo4.md#L5-L5:todo2-9.mdをtodo2-19.mdに更新する。docs/todo5.md#L5-L5:todo2-9.mdをtodo2-19.mdに更新する。docs/todo6.md#L5-L5:todo2-9.mdをtodo2-19.mdに更新する。docs/todo7.md#L5-L5:todo2-9.mdをtodo2-19.mdに更新する。docs/todo8.md#L5-L5:todo2-9.mdをtodo2-19.mdに更新する。docs/todo9.md#L5-L5:todo2-8.mdをtodo2-19.mdに更新する。
📍 Affects 7 files
docs/todo3.md#L5-L5(this comment)docs/todo4.md#L5-L5docs/todo5.md#L5-L5docs/todo6.md#L5-L5docs/todo7.md#L5-L5docs/todo8.md#L5-L5docs/todo9.md#L5-L5
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/todo3.md` at line 5, Update the preamble references in docs/todo3.md:5,
docs/todo4.md:5, docs/todo5.md:5, docs/todo6.md:5, docs/todo7.md:5, and
docs/todo8.md:5 from todo2-9.md to todo2-19.md; update docs/todo9.md:5 from
todo2-8.md to todo2-19.md, ensuring all preambles enumerate the complete TODO
file range.
🤖 PR Monitor 分析 (GitHub Actions バックストップ)
Applicable Findings (Critical / High / Major)
Applicable Findings (Medium 以下)(該当なし) Filtered (not applicable)(該当なし — 4件すべて docs のクロスリファレンス整合性に関する指摘であり、ADR-035 の docs-only 除外基準(mutation/error handling/test coverage 等)に該当せず、ADR との設計矛盾も確認できないため applicable と判定) 次のアクション
|
docs/todo13.md (171KB) を todo13/15/16/17、docs/todo10.md (95KB) を todo10/18/19 に順位帯で物理分割し file_size_check 50KB 閾値以下に縮小。 - todo13.md=順位225-247(45KB) / todo15=248-296 / todo16=297-318 / todo17=319-332 - todo10.md=順位198-214(39KB) / todo18=215-219 / todo19=220-224 - todo-summary.md「ファイル」列を移動先へ更新、todo.md routing list に todo15-19 追加 - 全 todo preamble の数詞を 20(二十つ)/範囲を todo2-19 に追従、todo13/10/14 位置付け更新 - ### エントリ数 (todo13系 82 / todo10系 22) 完全保存、pnpm lint:md / lint:docs 通過 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
todo-summary.md (79KB) を todo-summary.md (順位6-219, 39KB) + todo-summary2.md
(順位220-335, 41KB) に物理分割し、両方 50KB 閾値以下に縮小。
- cli-docs-lint を分割 index 対応に改修 (tooling 劣化を回避):
- priority_inversion: 全 todo-summary*.md の row を統合し tier_by_rank を構築、
part をまたぐ cross-file 依存も検査。violation は出自 part (file/line) に帰属
- preamble: is_todo_summary を prefix match 化 (両 part を summary 扱いで check skip)、
summary 複数対応の count に。実ファイル数 21 に伴い数詞をアラビア「21つ」へ
- 新テスト 5 件 (cross-part inversion / list_summary_files / split count)、clippy 0 warning
- todo3-11.md preamble の数詞 20→21 + 括弧に todo-summary2.md 追加
- todo.md routing / todo-summary.md 更新方針に 2 ファイル構成を明記
- data 行 167 完全保存、pnpm lint:docs (両ファイル統合) / lint:md / cargo clippy --workspace 通過
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- ① todo10.md: 「新規追加先は引き続き本ファイル」→ 編集・完了削除専用に修正 (新規は todo14.md、PR #224 以降 edit-only) - ② 順位≥220 を収容する todo13/14/15/16/17/19 の作業計画「todo-summary.md 行削除」→ todo-summary2.md 行削除 (該当行は分割で part2 へ移動済み)。< 220 の todo10/18 は part1 のため不変 - ④ todo3-7 preamble の既存エントリ範囲 todo2-9.md → todo2-19.md (分割後の全 TODO ファイルを包含) - ③ (todo17 の CodeRabbit 検証スクリプトログ) は実指摘でないため非対応 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
a6a76bd to
7708af2
Compare
概要
docs/ 配下で Claude Code 読み取り安定性閾値 (50KB) を超えていた todo 系ファイルを物理分割し、cli-docs-lint を分割された index に対応させた。
変更内容
docs 分割 (機械的な内容移動)
todo13.md(171KB) → todo13 (順位 225-247) + todo15/16/17 (248-296 / 297-318 / 319-332)todo10.md(95KB) → todo10 (198-214) + todo18/19 (215-219 / 220-224)todo-summary.md(79KB) → todo-summary (順位 6-219) + todo-summary2 (220-335)###82+22、data 行 167 完全保存)cli-docs-lint を分割 index 対応に (tooling 劣化回避)
todo-summary*.md全 part の row を統合し tier_by_rank を構築。part 跨ぎの cross-file 依存も検査 (カバレッジ半減を回避)。violation は出自 part に帰属is_todo_summary/includes_summaryを prefix-match (todo-summary) に統一、summary 複数対応の count、数詞 21 対応追従
検証
pnpm lint:docs(両ファイル統合) /pnpm lint:md/cargo clippy --workspace --all-targets -- -D warnings/cargo test全通過補足
PR diff は大きい (~4400 行) が、実体は docs の内容移動 (削除≒追加) で新規ロジックはほぼ無し。
PR_SIZE_CHECK_OVERRIDE=1で意図的にバイパスした (機械的 refactor override ポリシー該当)。既知の minor follow-up (非ブロッキング)
**戦略**/**Bundle 履歴**footer が todo-summary2.md 末尾に移動。todo-summary.md には順位 220 以降への誘導ポインタがあり到達可能だが、footer 専用の 1 行ポインタ追加は follow-up 候補。Summary by CodeRabbit
Documentation
Bug Fixes