diff --git a/.takt/facets/instructions/aggregate-weekly.md b/.takt/facets/instructions/aggregate-weekly.md index 7c07bb4e..fd44d6ac 100644 --- a/.takt/facets/instructions/aggregate-weekly.md +++ b/.takt/facets/instructions/aggregate-weekly.md @@ -23,7 +23,8 @@ ADR-031 § Findings スキーマ + § 採否フロー の input source として - `simplicity-whole-review.md` — review-simplicity-whole facet の出力 - `security-whole-review.md` — review-security-whole facet の出力 - `architecture-whole-review.md` — review-architecture-whole facet の出力 -- `file-length-watchlist.md` — file-length-watchlist facet の出力 (PR-W0、deterministic 800 行超 file scan)。本 watchlist は LLM 判断による findings ではなく機械的観測のため、Phase 1 統合では findings には含めず、Phase 2 の "file_length watchlist" 専用 section として weekly report に転載する +- `review-todo-whole.md` — review-todo-whole facet の出力 (観点⑤ Todo 妥当性、順位154)。docs/todo*.md corpus の dead pattern / cross-file 重複 / preamble drift。**findings として Phase 1 統合に含める** +- `file-length-watchlist.md` — file-length-watchlist facet の出力 (PR-W0 拡張、順位154。deterministic な `.rs` 800 行 + `docs/todo*.md` 50KB scan)。本 watchlist は LLM 判断による findings ではなく機械的観測のため、Phase 1 統合では findings には含めず、Phase 2 の "file size watchlist" 専用 section として weekly report に転載する ### Context @@ -72,6 +73,9 @@ simplicity / security / architecture facets が emit する category を以下 - `cumulative-complexity` — 累積複雑度 - `dead-code` — 未参照コード - `overspec` — overspec'd abstraction +- `todo-dead-entry` — todo corpus の完了済/陳腐化 entry (削除漏れ) +- `todo-duplicate` — todo*.md 跨ぎの重複 entry / 順位 table と detail の不整合 +- `todo-preamble-drift` — todo.md preamble の routing 契約と実態の乖離 - `secret-exposure` — 機密漏出パターン - `injection` / `auth-flaw` / `crypto-weak` / `unsafe-no-safety` / `path-traversal` / `prompt-injection` — security category @@ -135,8 +139,8 @@ Markdown は人間 / Claude が読む summary 層。findings table を severity ### スコープ - 対象ツリー: `src/` / `scripts/` / `.claude/` / `.takt/` / `docs/` -- レビューファセット: simplicity-whole / security-whole / architecture-whole -- 決定論的観測: file-length-watchlist (PR-W0) +- レビューファセット: simplicity-whole / security-whole / architecture-whole / todo-whole +- 決定論的観測: file-length-watchlist (`.rs` 800 行 + `todo*.md` 50KB) - 採否方針: Phase C skill `/weekly-review` で AskUserQuestion 経由 ### File Length Watchlist (機械的観測) @@ -167,6 +171,7 @@ Markdown は人間 / Claude が読む summary 層。findings table を severity - **simplicity-whole**: - **security-whole**: - **architecture-whole**: +- **review-todo-whole**: <観点⑤ todo corpus の dead pattern / 重複 / preamble drift の傾向> ### 次のアクション @@ -188,8 +193,8 @@ findings 全体がゼロの場合は以下を出力: ### スコープ - 対象ツリー: `src/` / `scripts/` / `.claude/` / `.takt/` / `docs/` -- レビューファセット: simplicity-whole / security-whole / architecture-whole -- 決定論的観測: file-length-watchlist (PR-W0) +- レビューファセット: simplicity-whole / security-whole / architecture-whole / todo-whole +- 決定論的観測: file-length-watchlist (`.rs` 800 行 + `todo*.md` 50KB) ### File Length Watchlist (機械的観測) diff --git a/.takt/facets/instructions/file-length-watchlist.md b/.takt/facets/instructions/file-length-watchlist.md index 33047eee..4615d220 100644 --- a/.takt/facets/instructions/file-length-watchlist.md +++ b/.takt/facets/instructions/file-length-watchlist.md @@ -1,97 +1,89 @@ -# File Length Watchlist (週次 800 行超 scan) +# File Size Watchlist (週次 機械 scan: `.rs` 800 行 + `todo*.md` 50KB) -決定論的 scan で 800 行超 file を全件列挙する。LLM が判断する余地はなく、shell command 出力を markdown table に整形するだけの mechanical task。 +決定論的 scan で **サイズ閾値を超えた/接近した file を全件列挙**する。2 次元を計測する: -## 背景 +- `src/**/*.rs` の **行数** (800 行閾値、観点⑦・順位 147 file length と整合) +- `docs/todo*.md` の **バイト数** (50KB=51200B 閾値 / 48KB=49152B で接近警告、観点⑦ Todo 分割 trigger) + +LLM が判断する余地はなく、shell command 出力を markdown に整形するだけの mechanical task。 -順位 147 (file_length lint、PR #202) は `hooks-post-tool-comment-lint-rust` の PostToolUse hook として実装されており、**触られた file の編集時のみ** `additionalContext` で 800 行超を警告する設計 (soft-nag、touch-trigger ratchet)。 +> **決定論性と persona について (WR-2026-07-01-C01 解消)**: 本 step は純機械 (LLM 判断ゼロ) だが、 +> takt は **全 step に persona (agent) を必須**とし persona-less な shell step 型を持たない。 +> よって workflow 上の `persona:` 指定は **takt の構造的要件**であり、データに対する LLM 判断を +> 意味しない。矛盾を避けるため本 step は「Bash が最終 markdown まで生成 → agent はそれを Report +> Directory へ書き出すだけ (整形も判断もしない)」形とし、`weekly-review.yaml` 側にも同旨コメントを +> 付す。ADR-031 の 3 層分離 (Rust/shell 機械 / takt AI / skill ask) のうち **機械層**に属する。 -このため: +## 背景 -- 未触り state の violation は警告されない -- AI / 人が警告を無視して進められる -- 結果として PR-3a (#217) 時点で 7 件の 800 行超 file が累積した経緯あり (PR #218 で計画書 `docs/file-length-enforcement-plan.md` が land、PR-W0 として本 step を追加) +順位 147 (file_length lint、PR #202) と PR-W5 (`[file_length_gate]` Stop gate、#234) は **触られた file / PR 範囲の file** を対象とする edit-time / push-time の強制で、**未触り state の全件棚卸し**は対象外。`docs/todo*.md` の 50KB 分割 trigger (PR #88 / #96 / #101 / #123 / #172 で実証) も同様に自動計測経路が無い。 -本 facet は週次 1 回 master HEAD の `src/` 全体を deterministic に scan し、800 行超 file を全件列挙して watchlist として report 化する。これにより ratchet が未発火の violation も可視化でき、aggregate-weekly が weekly report の "file_length watchlist" section として記載する。 +本 step は週次 1 回 master HEAD を deterministic に scan し、両次元の閾値超過/接近を watchlist として report 化する。aggregate-weekly が weekly report の "file size watchlist" section として転載する。 ## Phase 1: scan 実行 -以下の shell command を実行 (Bash tool): +以下の shell command を実行 (Bash tool)。出力は整形済みなので、そのまま次 Phase で転記する。 ```bash +echo "### rs-lines (>800)" find src -name '*.rs' -not -path '*/target/*' -exec wc -l {} + 2>/dev/null \ | awk '$1 > 800 && $2 != "total" { print $0 }' \ | sort -rn +echo "### todo-bytes (>=49152 = 48KB, 閾値 50KB=51200)" +find docs -maxdepth 1 -name 'todo*.md' -exec wc -c {} + 2>/dev/null \ + | awk '$1 >= 49152 && $2 != "total" { print $1, $2 }' \ + | sort -rn ``` -出力例 (PR-3a #217 land 直後の master state): - -```text -1606 src/hooks-post-tool-comment-lint-rust/src/main.rs -1432 src/cli-merge-pipeline/src/feedback.rs -1404 src/cli-pr-monitor/src/stages/poll/mod.rs - 982 src/cli-push-runner/src/stages/lint_screen.rs - 972 src/cli-pr-monitor/src/fix_commit.rs - 946 src/cli-push-runner/src/config.rs - 890 src/cli-merge-pipeline/src/main.rs -``` - -0 件のとき: command が空出力。 +各 section が空出力のとき: その次元は 0 件 (clean)。 ## Phase 2: markdown 整形 -`file-length-watchlist.md` を以下の format で Report Directory に出力する。 - -### 800 行超 file が 1 件以上ある場合 +`file-length-watchlist.md` を以下の format で Report Directory に出力する。両次元とも常に section を出す (0 件でも「clean state」と明示、aggregate が常に Read 可能)。 ```markdown -# File Length Watchlist (週次 800 行超 scan) +# File Size Watchlist (週次 機械 scan) - scan 日時: -- scan 対象: `src/**/*.rs` (`target/` 除外) -- 閾値: 800 行 (coding-style.md File Organization) -- 件数: N 件 +- 対象/閾値: `src/**/*.rs` 行数 > 800 (`target/` 除外) / `docs/todo*.md` バイト数 >= 50KB (48KB で接近) -## 800 行超 file 一覧 (上限 800 行を超過、N 件) +## `.rs` 行数 watchlist (> 800 行) + +- 件数: N 件 (0 件のときは「**0 件 (clean state)**」) | 行数 | ファイル | |---|---| -| 1606 | `src/hooks-post-tool-comment-lint-rust/src/main.rs` | -| 1432 | `src/cli-merge-pipeline/src/feedback.rs` | +| 921 | `src/cli-merge-pipeline/src/main.rs` | | ... | ... | -## 進捗参照 - -`docs/file-length-enforcement-plan.md` の Phase 1 (PR-W1 〜 W4) で各 file の分割計画が capture されている。本 watchlist は分割 PR の land 状況を週次で可視化する役割。 +## `docs/todo*.md` サイズ watchlist (>= 48KB) -完了条件 (本 watchlist の 0 件到達) を満たすと、計画書の削除条件 1/3 を満たす。 -``` +- 閾値: 50KB=51200B 到達で分割推奨、48KB=49152B で接近警告 +- 件数: N 件 (0 件のときは「**0 件 (clean state)**」) -### 0 件 (clean state) の場合 +| バイト数 | ファイル | 状態 | +|---|---|---| +| 49915 | `docs/todo-summary.md` | 接近 (48KB超) | +| ... | ... | 分割推奨 (50KB超) / 接近 (48KB超) | -```markdown -# File Length Watchlist (週次 800 行超 scan) - -- scan 日時: -- scan 対象: `src/**/*.rs` (`target/` 除外) -- 閾値: 800 行 (coding-style.md File Organization) -- 件数: **0 件 (clean state)** +## 進捗参照 -現時点で 800 行超 file は存在しない。Phase 1 (file-length-enforcement-plan.md PR-W1〜W4) は完了状態にあるか、もしくは新規 file が制約内に収まっている。 +`.rs` 側は `docs/file-length-enforcement-plan.md` / PR-W5 `[file_length_gate]`、`todo` 側は +`docs/todo.md` preamble の分割ルーティング (新規は次 file へ) と対応。 ``` ## Output contract - File: `file-length-watchlist.md` (Report Directory) - Format identifier: `file-length-watchlist` -- 0 件 case でも file を生成 (clean state 確認のため。aggregate-weekly が常に Read 可能) +- 両次元とも 0 件でも section を生成 (clean state 確認のため。aggregate-weekly が常に Read 可能) ## Completion criteria -scan 完了 + markdown 出力で `analysis complete` を articulate (他の facet と同じ条件文字列を使用、step-level rule `all("analysis complete")` と整合)。 +scan 完了 + markdown 出力で `analysis complete` を articulate (他 facet と同じ条件文字列、step-level rule `all("analysis complete")` と整合)。 ## 重要な原則 -- **読み取り専用 (`edit: false`)**。コード修正は行わない (= watchlist 報告のみ) -- **LLM 判断の余地なし**: 命令通りに Bash を実行し、出力を整形するだけ -- **件数 0 でも file を生成**: aggregate-weekly が常に Read 可能な前提を満たすため +- **読み取り専用 (`edit: false`)**。コード / todo の修正は行わない (= watchlist 報告のみ) +- **LLM 判断の余地なし**: 命令通りに Bash を実行し、出力を転記するだけ。file の中身を解釈しない +- **両次元とも件数 0 でも section を生成**: aggregate-weekly が常に Read 可能な前提を満たすため diff --git a/.takt/facets/instructions/review-todo-whole.md b/.takt/facets/instructions/review-todo-whole.md new file mode 100644 index 00000000..2b2d375b --- /dev/null +++ b/.takt/facets/instructions/review-todo-whole.md @@ -0,0 +1,73 @@ +Focus on **whole-tree todo hygiene** — the health of the planning corpus (`docs/todo.md` + `docs/todo2.md` … `docs/todo13.md` + `docs/todo-summary.md`) taken as a whole. This facet is invoked by the weekly-review workflow (ADR-031、観点⑤ Todo 妥当性) and reviews the entire todo corpus, not a diff. + +This is the **weekly batch** counterpart to the edit-time todo hooks. It exists because the deterministic layer only sees the entry being touched right now; it cannot see the corpus-wide decay that accumulates across dozens of untouched entries. + +## Determinism layer guarantees (do NOT duplicate) + +The following are enforced by deterministic hooks / CI lint at edit time and MUST NOT be re-enumerated here (raise a finding only if the layer itself has a gap): + +- **Working-copy / add-edit staleness** (順位 136 hook): flags stale-looking edits and missing progress notes **on the entry being edited**. +- **Delete-time land verification** (順位 152): on `docs/todo*.md` deletion, greps for the corresponding land commit. +- **Preamble file-count + cross-reference** (`cli-docs-lint`, push-runner quality_gate): broken relative links / anchor drift are caught at push time. +- **File-size thresholds** (file-length-watchlist step): 50KB todo files / 800-line `.rs` are measured mechanically — do NOT eyeball file sizes here. + +Your job is the **broad, cross-file, time-based decay** none of the above can see at edit time. + +## Reading the corpus + +1. `Glob docs/todo*.md` + `docs/todo-summary.md` — enumerate the whole corpus and note sizes. +2. Read `docs/todo.md` の preamble (冒頭の使い分けルール) first — it defines the routing contract (新規は todo6.md へ、編集専用は todo2-7.md、順位 table は todo-summary.md 等). +3. Sample the largest / oldest-looking files. Use `Grep` to follow task titles / 順位 numbers / `WR-` ids across files. +4. Cross-check the `docs/todo-summary.md` 順位 table against the detail entries it points to (`| N | Tier | title | todoX.md | ... |`). + +Do NOT run `jj diff` — this is a whole-corpus review. Use `jj log` / `Grep` only to verify claims (e.g. whether a referenced land commit exists). + +## Criterion 0 (MVP top priority): Dead / stale patterns + +Entries that have decayed into noise the edit-time hook never revisits: + +- **Aged-out entries**: a task entry that (a) has no related commit in recent `jj log`, AND (b) whose blocking dependencies have already landed (so it is either done-but-not-removed or obsolete), AND (c) shows no "現在地 / 詰まっている箇所" progress for a long stretch. Verify with `Grep` / `jj log` before raising — an entry that is simply *not yet started* is not dead. +- **Completed-but-not-removed**: an entry whose 完了基準 is demonstrably met by landed code/docs but which still occupies the corpus (violates 運用ルール「完了タスクは ADR か仕組みに反映後、削除する」). +- **Superseded pointers**: entries referencing an ADR / 順位 / file that has been superseded or removed (dead pointer within the planning corpus itself). + +For each finding, name the **specific file + entry title** and the evidence (which dependency landed / which commit satisfies 完了基準). No evidence → downgrade to 🤔 様子見. + +## Criterion 1: Cross-file duplicate entries + +The corpus is split across 14 files; the same task can be registered twice as it migrates: + +- The **same task** described in two `docs/todo*.md` files (e.g. a task drafted in todoN then re-drafted in todoN+1 without removing the first). +- A `docs/todo-summary.md` 順位 row whose detail entry no longer exists (or exists in a different file than the row claims). +- The reverse: a detail entry with no corresponding 順位 row (silently dropped from the execution order). + +Use `Grep` on distinctive title fragments / `WR-` ids / 順位 numbers to confirm the duplication. Point to **both** locations. + +## Criterion 2: Preamble routing drift + +The `docs/todo.md` preamble encodes a routing contract that silently rots: + +- A file the preamble calls "新規追加先" that has actually crossed 50KB (should have rolled over to the next file, per the split precedent) — cross-check against the file-length-watchlist output rather than guessing sizes. +- A file described as "編集専用・新規追加しない" that has in fact received new entries. +- Preamble file enumeration (「本ファイル + todo2.md + … の使い分け」) that omits or miscounts an existing `docs/todo*.md` file. + +## Calibration + +Resist checklist-thinking. The edit-time hooks + cli-docs-lint + file-length-watchlist already enforce the objective, per-entry, per-link, per-size rules. This facet earns its keep only on corpus-wide, time-based, cross-file decay that no single edit can surface. If you can only flag something by a mechanical rule the deterministic layer already runs, flag the *layer gap*, not the instance. + +If a finding needs natural-language judgment about task intent (「これはもう不要では?」), that is exactly what belongs here — but articulate the evidence, and default to 🤔 様子見 when the intent is ambiguous (never propose deleting a user's planning entry on a hunch). + +## Judgment procedure + +1. Glob the corpus + read the `docs/todo.md` preamble (routing contract). +2. For Criterion 0/1/2, gather evidence with `Grep` / `jj log` — never raise a corpus-decay finding without a verified pointer. +3. For each finding, articulate: what it is, where it lives (file + entry title/順位), the verifying evidence, and the proposed action (remove / merge / re-route / re-number). +4. Classify each finding by severity (`critical` / `high` / `medium` / `low`) per ADR-031 § Findings スキーマ. Todo-hygiene findings are typically `low`–`medium` (corpus noise, not production risk); reserve `high` for a duplicate that could cause conflicting work. +5. Write the report per the output contract (`review-todo-whole.md`). End with `analysis complete`. + +## Output contract + +- File: `review-todo-whole.md` (Report Directory) +- Format identifier: `review-todo-whole` +- Read-only (`edit: false`): report findings only; the `/weekly-review` skill + user decide adoption (never edit `docs/todo*.md` from this facet). +- Category hint for aggregate-weekly: use `todo-dead-entry` / `todo-duplicate` / `todo-preamble-drift` (aggregate normalizes into the ADR-031 category set). +- If nothing survives evidence-gathering, output「特筆すべき todo-hygiene の findings なし」and end with `analysis complete` (do not manufacture findings). diff --git a/.takt/workflows/weekly-review.yaml b/.takt/workflows/weekly-review.yaml index 535c781b..b9f55be9 100644 --- a/.takt/workflows/weekly-review.yaml +++ b/.takt/workflows/weekly-review.yaml @@ -4,8 +4,9 @@ description: > 既存 3 パイプライン (pre-push-review / post-pr-review / post-merge-feedback) が見ない whole-tree 観点 (累積複雑度 / 横断的 ADR 整合性 / ハーネス遵守 / test 設計) を補完する。 - 3 つの whole-tree review facet を parallel で走らせて aggregate-weekly が - findings JSON + markdown を生成する。post-merge-feedback.yaml の構造を流用。 + 4 つの whole-tree review facet (simplicity / security / architecture / todo) と + 決定論的 file-size scan を parallel で走らせて aggregate-weekly が findings JSON + + markdown を生成する。post-merge-feedback.yaml の構造を流用。 fix loop なし: コードではなく findings レポートを生成するため reviewers/fix の構造は不要。 出力: weekly-review.md + findings.json (Report Directory に保存) @@ -27,10 +28,11 @@ initial_step: reviewers steps: # --------------------------------------------------------------------------- # Step 1: reviewers (parallel) - # 3 つの whole-tree review facet を並列実行する。各 facet は独立した観点で - # ソースツリー全体を Glob/Read/Grep し、findings を articulate する。 - # Report Directory には simplicity-whole-review.md / - # security-whole-review.md / architecture-whole-review.md が並ぶ。 + # 4 つの whole-tree review facet (simplicity / security / architecture / todo) と + # 決定論的 file-size scan を並列実行する。各 review facet は独立した観点で + # ソースツリー / todo corpus を Glob/Read/Grep し、findings を articulate する。 + # Report Directory には simplicity-whole-review.md / security-whole-review.md / + # architecture-whole-review.md / review-todo-whole.md / file-length-watchlist.md が並ぶ。 # --------------------------------------------------------------------------- - name: reviewers parallel: @@ -100,12 +102,13 @@ steps: rules: - condition: analysis complete - # 観点 ⑦ file_length watchlist (PR-W0、docs/file-length-enforcement-plan.md)。 - # 順位 147 file_length lint は touch-trigger ratchet で「触られた file の - # 編集時のみ警告」設計のため、未触り state の violation を可視化できない。 - # 本 facet は週次 1 回 master HEAD を deterministic に scan して 800 行超 - # file を全件列挙、aggregate-weekly が watchlist として weekly report に - # 統合する。LLM 判断の余地なし (Bash の find/wc/awk 出力を整形するだけ)。 + # 観点 ⑦ file size watchlist (PR-W0 拡張、順位154)。edit-time の 順位147 lint / + # PR-W5 [file_length_gate] は「触られた/PR範囲の file」のみ対象で、未触り state の + # 全件棚卸しと docs/todo*.md の 50KB 分割 trigger は対象外。本 step が週次 1 回 + # master HEAD を deterministic に scan (`.rs` 800 行 + `todo*.md` 50KB) し、 + # aggregate-weekly が watchlist に統合する。 + # 純機械 (LLM 判断ゼロ、Bash 出力を転記するだけ)。takt は全 step に persona を + # 必須とするため persona 指定は構造要件であり判断を意味しない (WR-2026-07-01-C01 解消)。 - name: file-length-watchlist edit: false persona: simplicity-reviewer @@ -124,6 +127,29 @@ steps: rules: - condition: analysis complete + # 観点 ⑤ Todo 妥当性 (ADR-031 拡張、順位154)。docs/todo*.md 全 corpus の + # dead pattern / cross-file 重複 / preamble routing drift を週次 batch で棚卸し。 + # 順位136 hook (編集時 immediate) / cli-docs-lint が拾えない経年・横断的劣化を補完。 + - name: review-todo-whole + edit: false + persona: architecture-reviewer + model: haiku + policy: review + provider_options: + claude: + allowed_tools: + - Read + - Glob + - Grep + - Bash + instruction: review-todo-whole + output_contracts: + report: + - name: review-todo-whole.md + format: review-todo-whole + rules: + - condition: analysis complete + rules: - condition: all("analysis complete") next: aggregate-weekly diff --git a/docs/todo-summary.md b/docs/todo-summary.md index 32cddf95..08bb4c34 100644 --- a/docs/todo-summary.md +++ b/docs/todo-summary.md @@ -55,7 +55,6 @@ | 150 | 🔧 Tier 2 | **Magic number lint 追加 — `coding-style.md` § Magic Numbers 移管 (PR #172 仕組み化方針切替由来、ユーザー判断 2026-05-25 = source folder 限定) ★ Bundle 既存ルール仕組み化** | todo9.md | M | なし (`.claude/custom-lint-rules.toml` に `no-magic-number` rule 追加、source folder paths filter で test/config 除外、時間定数 / リトライ回数 / threshold の 3 category MVP、severity warning で reviewer 判断補助、順位 102 paths filter + 順位 118 適用範囲検討と整合、coding-style.md § Magic Numbers 削除可否は dogfood 後判断) | | 152 | 🔧 Tier 2 | **todo entry 削除時の事前 land 確認手順 — 順位 136 hook 拡張 or 独立 follow-up (PR #173 T2-1 採用、2026-05-26)** | todo9.md | XS-S | 順位 136 (working copy staleness + 既実装 grep) と同型機械強制、lifecycle 補完 = 順位 136 (add/edit 時) + 本タスク (delete 時)。PreToolUse hook で `docs/todo*.md` 削除時に対応 land commit を `jj log` で grep 検証、land 確認なら allow + 証跡出力、未確認なら warning (block しない)。順位 136 hook 統合 (~+15 行) or 独立 (~40 行) のいずれか、ADR-042 § Decision matrix 適用 (mechanizable + FP 低 + Adoption Risk None) | | 153 | 🔧 Tier 2 | **`review-harness-whole` facet 追加 — 観点 ① 独立 facet 化 (ADR-031 weekly-review 拡張、2026-05-26 ユーザー合意) ★ 週次拡張** | todo9.md | S | ADR-031 本採用後 (2026-06-01) の Phase B+1 拡張、extract 不要と判明したら close、順位 146-151 Bundle 既存ルール仕組み化の継続的発見源、architecture-whole から ① 観点を extract して context 圧迫回避 | -| 154 | 🔧 Tier 2 | **`review-todo-whole` facet + aggregate 前 file size pre-step — 観点 ⑤ ⑦ 拡張 (ADR-031 weekly-review 拡張、2026-05-26 ユーザー合意) ★ 週次拡張** | todo9.md | M | 順位 136 land + ADR-031 本採用 (2026-06-01) 後着手、cli-docs-lint (preamble) / 順位 147 (file length) と scope 整理必要 (CI 即時 vs 週次 batch)、ADR-031 3 層分離原則で file size は LLM 不要の Rust pre-step に分離 | | 157 | 🔧 Tier 2 | **Bundle 1 dogfood checklist 実行 — `__test.ps1` block + override env 確認 (PR #174 T2-#2 採用、ADR-039 bounded lifetime data point #1)** | todo11.md | XS | なし (PR #174 PR body の未消化 dogfood、Bundle 2 PR merge 前の前提条件として消化、結果は Bundle 2 PR body に記録) | | 160 | 💎 Tier 3 | **`docs-governance.md` に「ADR multi-variant pattern section 追加時の checklist」codify (PR #176 T3-#1 採用)** | todo11.md | XS | なし (PR #175 Minor + PR #176 Nitpick の 2 連続観測 = Frequency Medium で採用条件成立、ADR 拡張時の variant 網羅性 + 擬似コード vs 実コード齟齬を reviewer / Claude 視点で防止する checklist、global file `~/.claude/rules/common/docs-governance.md` 編集のため本リポジトリ外で実施、`feedback_global_config_backup` 適用) | | 161 | 🔧 Tier 2 | **Subprocess timeout+kill lifecycle 検証テスト追加 (PR #177 T2-#1 採用)** | todo11.md | M | なし (PR #177 Major #2 「jj kill on timeout 漏れ」fix の回帰テスト、`Child::is_finished` で 2 hook の `run_jj_with_timeout` lifecycle 検証、Severity High + Frequency Medium、ADR-024 shared lib 統合候補との関係明示) | diff --git a/docs/todo9.md b/docs/todo9.md index e8b69b83..4b0fed35 100644 --- a/docs/todo9.md +++ b/docs/todo9.md @@ -249,57 +249,6 @@ --- -### `review-todo-whole` facet + aggregate 前 file size pre-step — 観点 ⑤ ⑦ 拡張 (ADR-031 weekly-review 拡張、Phase B+1、2026-05-26 ユーザー合意) - -> **動機**: ADR-031 weekly-review (本採用 2026-06-01) の MVP では観点 ⑤ Todo 妥当性 は順位 136 (todo hook 2 段構え) に委譲し、観点 ⑦ ファイルサイズ も対象外とした。順位 136 hook land 後、hook が拾えない broad な観点 (全 todo entry 横断の dead pattern 検出 / cross-todo file の重複 entry / docs/todo*.md preamble drift) を週次の `review-todo-whole` facet で補完する。並行して観点 ⑦ ファイルサイズ (50KB / 800 行) は aggregate-weekly facet 直前の Rust 機械 pre-step で計測し、LLM context を浪費せず ADR-031 の 3 層分離 (Rust 機械 / takt AI / skill ask) に整合させる。 -> -> **本タスクの位置づけ**: ADR-031 weekly-review 拡張、Phase B+1。順位 136 hook land 後に着手判断 (= hook の immediate guard が機能している前提で、週次は batch 棚卸しに focus)。`feedback_pipeline_over_rules.md` 適用で、機械検査可能な観点 (file size) を LLM facet に乗せず分離する設計。 -> -> **参照**: ADR-031 (週次レビュー設計、本採用 2026-06-01、3 層分離 = Rust 機械 / takt AI / skill ask)、順位 136 entry (todo8.md、todo hook 2 段構え)、cli-docs-lint (preamble file count + cross-ref、push-runner lint group 統合済)、順位 147 (file length lint 800 行)、`feedback_pipeline_over_rules.md` -> -> **実行優先度**: 🔧 **Tier 2** — Effort M (facet 新規 + Rust pre-step ~80 行)。順位 136 land + ADR-031 本採用 (2026-06-01) 後の 2-3 週 dogfood 完了後に着手。 - -#### 設計決定 (案) - -**`review-todo-whole` facet (観点 ⑤ 補完):** - -- 配置: `.takt/facets/instructions/review-todo-whole.md` 新規 facet (allowed_tools: Read/Glob/Grep のみ) -- 観点: 全 todo*.md entry を横断走査 → dead pattern (= 半年以上 stale + 関連 commit なし + 依存 task land 済) / cross-file 重複 entry / preamble routing drift を finding として抽出 -- 順位 136 hook が拾えない範囲: 編集していない entry の経年劣化 / file 跨ぎの重複 / preamble file count drift - -**aggregate 前 Rust 機械 pre-step (観点 ⑦):** - -- 配置: takt workflow weekly-review.yaml の aggregate-weekly facet 直前に新 step 追加 (or aggregate facet 自身が呼び出す Rust binary) -- 計測対象: - - `docs/todo*.md` の file size (50KB 閾値、PR #88 / #96 / #101 / #123 / #172 で実証された分割 trigger) - - `src/**/*.rs` の line count (800 行閾値、順位 147 file length lint と整合) -- 出力: 閾値超過 / 接近 (90% 等) のファイル一覧を aggregate facet の入力として渡す -- 機械検査のため LLM context を浪費しない (ADR-031 3 層分離原則) - -#### 作業計画 - -- [ ] 順位 136 hook land 待ち -- [ ] Phase B 2-3 週 dogfood 完了 + 観点 ⑤ ⑦ の必要性再評価 (cli-docs-lint / 順位 147 land 状況も確認) -- [ ] `review-todo-whole.md` instruction 設計 (順位 136 hook が拾える範囲との境界明示) -- [ ] aggregate 前 Rust pre-step 実装 (新 binary `cli-weekly-review-prep` or aggregate facet 内 step) -- [ ] takt workflow weekly-review.yaml に facet + pre-step 追加 -- [ ] aggregate-weekly facet 拡張 (新 category) + pending JSON schema 拡張 -- [ ] dogfood + 本エントリ削除 + todo-summary.md 行削除 - -#### 完了基準 - -- 全 todo*.md entry の dead pattern / cross-file 重複 / preamble drift が週次検出される -- file size 閾値超過 / 接近が aggregate facet input として通知される -- 順位 136 hook と責務分離 (hook = 編集時 immediate / 週次 = batch 棚卸し) が機能 - -#### 詰まっている箇所 - -- 順位 136 hook 実装次第 (hook が拾える範囲が確定後に週次の補完範囲を確定) -- Phase B dogfood 結果次第 (有用な finding が出るかは運用観察) -- cli-docs-lint (preamble count、push-runner lint group 統合済) との scope 重複整理: push-runner = 機械検査即時 / 週次 pre-step = aggregate 入力、両立可能だが integration 検討 - ---- - > **2026-06-06 分割**: 順位 157, 160, 161, 162, 163, 165, 170, 171, 172, 173 は [docs/todo11.md](todo11.md) を参照。 ## 既知課題 (記録のみ、本セッションで未対応)