Skip to content

feat(weekly-review): 観点⑤ Todo妥当性 facet + file-size scan を todo 50KB に拡張 (順位154 + C01解消) - #235

Merged
aloekun merged 1 commit into
masterfrom
weekly-review-todo-facet
Jul 2, 2026
Merged

feat(weekly-review): 観点⑤ Todo妥当性 facet + file-size scan を todo 50KB に拡張 (順位154 + C01解消)#235
aloekun merged 1 commit into
masterfrom
weekly-review-todo-facet

Conversation

@aloekun

@aloekun aloekun commented Jul 2, 2026

Copy link
Copy Markdown
Owner

概要

ADR-031 週次レビューの観点空白 (⑤ Todo 妥当性 / ⑦ ファイルサイズ) を埋める拡張。順位154 の実装 + 保留中 finding C01 (WR-2026-07-01-C01) の同時解消。

変更内容

観点⑤: review-todo-whole facet (新規)

  • .takt/facets/instructions/review-todo-whole.mddocs/todo*.md corpus 全体の dead pattern / cross-file 重複 entry / preamble routing drift を週次 batch で棚卸し
  • 順位136 hook (編集時 immediate) / cli-docs-lint が拾えない 経年・横断的劣化を補完。責務分離 (hook=編集時 / 週次=batch) を instruction に明記

観点⑦ + C01解消: file-length-watchlist 拡張

  • .rs 800 行に加え docs/todo*.md 50KB (48KB で接近警告) の 2 次元機械 scan に拡張
  • C01 解消: takt は全 step に persona 必須で純 shell step 型を持たない。よって Bash が最終 markdown まで生成し agent は転記のみ (判断ゼロ) とし、persona: は takt の構造的要件で判断を意味しない旨を facet/yaml に明記 (finding 自身の提案「deterministic コメント追記」と整合)

統合

  • aggregate-weekly に todo report input + todo category (todo-dead-entry / todo-duplicate / todo-preamble-drift) を追加
  • weekly-review.yaml の parallel block を 4 → 5 review facet に拡張 (+ 決定論 file-size scan)

todo 整理

  • 順位154 を docs/todo9.md / docs/todo-summary.md から削除 (完了)

検証

  • pnpm exec takt prompt weekly-review で全 5 facet の解決を確認 (exit=1 は report 消費ステップの preview 制限で実エラーなし)
  • 品質ゲート全通過 (diff 784 行)
  • dogfood は land 後の初回 /weekly-review で観測 (ADR-031 試験運用パターン)

🤖 Generated with Claude Code

Summary by CodeRabbit

  • 新機能
    • 週次レビューに、todo 群の全体的な重複・陳腐化・前文ルーティングのずれを確認する観点が追加されました。
    • 週次の監視対象が拡張され、Rust ファイルに加えて todo 系ドキュメントのサイズも確認されるようになりました。
  • 改善
    • 週次レポートの集計項目と出力形式が整理され、確認しやすくなりました。

…B に拡張 (順位154 + C01解消)

ADR-031 週次レビューの観点空白 (⑤ Todo 妥当性 / ⑦ ファイルサイズ) を埋める。

- review-todo-whole facet (観点⑤): docs/todo*.md corpus 全体の dead pattern /
  cross-file 重複 / preamble routing drift を週次 batch で棚卸し。順位136 hook
  (編集時 immediate) が拾えない経年・横断的劣化を補完。
- file-length-watchlist を `.rs` 800行 + `docs/todo*.md` 50KB の 2 次元 scan に拡張
  (観点⑦)。あわせて C01 (WR-2026-07-01-C01) を解消: takt は全 step に persona 必須で
  純 shell step を持たないため、Bash が最終出力まで生成し agent は転記のみ (判断ゼロ) と
  する形にし、persona は takt 構造要件である旨を facet/yaml に明記。
- aggregate-weekly に todo report input + todo category を追加。
- 順位154 を docs/todo9.md / todo-summary.md から削除。

takt prompt weekly-review で全 5 facet の解決を検証済。dogfood は land 後の初回
/weekly-review で観測 (ADR-031 試験運用パターン)。

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

週次レビュー workflow に review-todo-whole facet を新規追加し、todo corpus 全体の陳腐化・重複・preamble ドリフトを検出する。file-length-watchlist を rs 行数のみの1次元から rs 行数+todo バイト数の2次元 deterministic scan に変更した。aggregate-weekly と workflow 定義を更新し、対応する todo ドキュメントの旧エントリを削除した。

Changes

review-todo-whole facet 導入と watchlist 2次元化

Layer / File(s) Summary
review-todo-whole facet 定義の新規追加
.takt/facets/instructions/review-todo-whole.md
todo 全ツリー対象の hygiene チェック(死活/陳腐パターン、重複、preamble routing drift)の判断手順・evidence 確認方法・出力規約を新規定義した。
file-length-watchlist の2次元スキャン化
.takt/facets/instructions/file-length-watchlist.md
.rs 行数(800超)に加え docs/todo*.md バイト数(48KB/50KB 閾値)を計測する2次元 scan へ変更し、両次元とも常に section を出す固定フォーマットへ統一した。
weekly-review workflow への facet 組み込み
.takt/workflows/weekly-review.yaml
whole-tree review を3観点から4観点(simplicity/security/architecture/todo)に拡張し、review-todo-whole step と file-length-watchlist の並列実行を追加した。
aggregate-weekly への統合
.takt/facets/instructions/aggregate-weekly.md
Report Directory・Category rubric・スコープ記載・findings ゼロ時テンプレートに review-todo-whole(todo-whole)を追加した。
todo ドキュメントのエントリ整理
docs/todo-summary.md, docs/todo9.md
review-todo-whole facet 追加に関する既存の未実装タスクエントリを削除した。

Estimated code review effort: 2 (Simple) | ~12 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Workflow as weekly-review.yaml
  participant TodoReviewer as review-todo-whole
  participant WatchlistScan as file-length-watchlist
  participant Aggregate as aggregate-weekly

  Workflow->>TodoReviewer: docs/todo*.md 全ツリーの棚卸し実行
  TodoReviewer-->>Workflow: review-todo-whole.md (findings)
  Workflow->>WatchlistScan: rs行数 + todoバイト数の deterministic scan
  WatchlistScan-->>Workflow: file-length-watchlist.md (両次元 section)
  Workflow->>Aggregate: 4 reports + watchlist を渡す
  Aggregate->>Aggregate: findings統合 + Category rubric適用
  Aggregate-->>Workflow: Weekly Review Report (todo-whole含む)
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Todo妥当性 facet と file-size scan の拡張という主変更を適切に要約しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (2)
.takt/facets/instructions/file-length-watchlist.md (1)

59-67: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

状態 の表現を分けてください。

48KB の接近警告と 50KB の分割推奨が同じ列に混在していて、どの閾値を踏んだのか判別しづらいです。列を分けるか、優先順位を明記したほうが downstream で扱いやすくなります。

🤖 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 @.takt/facets/instructions/file-length-watchlist.md around lines 59 - 67, The
file-length watchlist table currently mixes the 48KB warning and 50KB
split-recommendation in the same 状態 column, making the threshold unclear. Update
the markdown generated from this facet so the output distinguishes the two
states explicitly, either by splitting them into separate columns or by adding a
clear priority/labeling rule in the table. Make the change in the watchlist
rendering logic for the `docs/todo*.md` entries so downstream consumers can tell
which threshold was triggered.
.takt/facets/instructions/review-todo-whole.md (1)

18-18: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

docs/todo-summary.md の明示は重複です。

docs/todo*.md で既に拾えるので、ここを残すと summary を二重に扱う実装になりやすいです。docs/todo*.md だけに寄せるか、重複排除を前提に明記してください。

♻️ 修正案
-1. `Glob docs/todo*.md` + `docs/todo-summary.md` — enumerate the whole corpus and note sizes.
+1. `Glob docs/todo*.md` — enumerate the whole corpus and note sizes.
🤖 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 @.takt/facets/instructions/review-todo-whole.md at line 18, The TODO corpus
glob instruction is duplicating `docs/todo-summary.md`, which can cause the
summary file to be handled twice. Update the instruction set in
`review-todo-whole.md` so the `Glob docs/todo*.md` rule either stands alone or
explicitly states deduplication logic, and make sure the wording around the TODO
collection/sizing step does not separately enumerate `docs/todo-summary.md`.
🤖 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.

Nitpick comments:
In @.takt/facets/instructions/file-length-watchlist.md:
- Around line 59-67: The file-length watchlist table currently mixes the 48KB
warning and 50KB split-recommendation in the same 状態 column, making the
threshold unclear. Update the markdown generated from this facet so the output
distinguishes the two states explicitly, either by splitting them into separate
columns or by adding a clear priority/labeling rule in the table. Make the
change in the watchlist rendering logic for the `docs/todo*.md` entries so
downstream consumers can tell which threshold was triggered.

In @.takt/facets/instructions/review-todo-whole.md:
- Line 18: The TODO corpus glob instruction is duplicating
`docs/todo-summary.md`, which can cause the summary file to be handled twice.
Update the instruction set in `review-todo-whole.md` so the `Glob docs/todo*.md`
rule either stands alone or explicitly states deduplication logic, and make sure
the wording around the TODO collection/sizing step does not separately enumerate
`docs/todo-summary.md`.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 751e59cc-4aac-4909-a50b-33f64049f12e

📥 Commits

Reviewing files that changed from the base of the PR and between 64fce57 and 8d74fb6.

📒 Files selected for processing (6)
  • .takt/facets/instructions/aggregate-weekly.md
  • .takt/facets/instructions/file-length-watchlist.md
  • .takt/facets/instructions/review-todo-whole.md
  • .takt/workflows/weekly-review.yaml
  • docs/todo-summary.md
  • docs/todo9.md
💤 Files with no reviewable changes (2)
  • docs/todo-summary.md
  • docs/todo9.md

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