Skip to content

feat(adr): ADR-033 todo numbering simplification (試験運用)#92

Merged
aloekun merged 4 commits into
masterfrom
feat-adr-033-numbering-simplification
Apr 29, 2026
Merged

feat(adr): ADR-033 todo numbering simplification (試験運用)#92
aloekun merged 4 commits into
masterfrom
feat-adr-033-numbering-simplification

Conversation

@aloekun
Copy link
Copy Markdown
Owner

@aloekun aloekun commented Apr 29, 2026

Summary

docs/todo.md の renumber 作業で連続発生していた 本文 cross-reference 追従コスト を構造的に解消する ADR を起案。3 commits で「ADR 起案 → 既存ファイルの一括変換 → 完了 task の bookkeeping」を順次 land。

動機 (PR 履歴の累積データから)

PR #85/#86/#88/#89/#90/#91/Bundle 1 で連続発生した renumber 作業は、本文中の 順位 N cross-ref 追従更新まで含めると毎回 5〜10 件の Edit を要し、過去には PR #91 で「順位 25/2625/25 に更新されないまま merge → CodeRabbit Minor 指摘 → fix commit (a15b263)」という convergence loop も発生した。

タスク数が 29 まで成長した時点で、cross-ref 追従コストは 線形増加 が明確で構造的負債として顕在化。

変更内容

Commit 1: 6cb3ee77 — feat(adr): ADR-033 起案

新規 ADR docs/adr/adr-033-todo-numbering-simplification.md:

  • ステータス: 試験運用 (2026-04-29)
  • 決定 (選択肢 B 採用): 絶対番号 (順位 N) は推奨実行順序サマリー table のみに保持、本文ではタスク名で参照
  • 移行戦略 + 検証ルール (grep でセルフチェック)
  • アンチパターン: 「table 内採番除去」「依存列のタスク名化」「自動化 script の後付け」「本文中の例外許容」を明記
  • 新規エントリ template も同 ADR 内に記載

CLAUDE.md の Architecture Decisions リストに ADR-033 リンク追加。

Commit 2: 63620f07 — refactor(docs): cross-ref 一括変換

docs/todo.md / docs/todo2.md / docs/todo3.md の本文中 順位 N cross-reference をすべて task 名参照に変換 (累計 30+ 箇所):

  • docs/todo.md: 戦略 section 12 箇所、Tier 4/5 entry の (順位 X/Y) 表記、週次レビュー entry の cross-ref
  • docs/todo2.md: ADR-032 Phase ごと優先度表記、reviewer facet / 各 Tier 1/2/3 entry の (順位 X/Y) と inline 参照
  • docs/todo3.md: 7 entry の inline 参照を全て task 名に変換

維持した absolute number:

  • table の 順位 列 (source of truth)
  • table の 依存 列の絶対番号 (table 内なので renumber と同期可能)
  • table 内 cell の 旧順位 N 表記 (完了済み task の歴史的参照)

Commit 3: 59d1c981 — docs(todo): bookkeeping

ADR-033 land により採番管理簡素化 task が完了したため:

  • docs/todo2.md の元 entry (40 行) を削除
  • docs/todo.md summary table から旧順位 27 (採番管理 ADR) 行を削除、旧 28/29 を 27/28 に renumber
  • サマリー header 日付ラベルを更新

Commit 3 の renumber 作業は table 行と 依存 列のみで完結 — 本 PR 自身が ADR-033 の効果を実証する形になっている。

期待される収束効果

指標 Before After
新規 entry 追加時の本文 Edit 数 5〜10 件 (cross-ref 追従) 0 件
renumber 時の Edit 数 O(N) (本文全体) O(1) (table のみ)
Stale reference 発生率 過去 PR で実発生 構造的に 0
docs/todo.md 系列の docs PR review 時間 同等 (改善は ADR-032 で別途実装) 同等

Test plan

  • markdownlint pass (PostToolUse hook で 全 Edit 検証済み、各 commit ごとに 0 error)
  • 検証 grep: grep -nE '順位 [0-9]+' docs/todo.md docs/todo2.md docs/todo3.md の結果が table 依存列以外で 0 件
  • takt pre-push-review: simplicity APPROVE / security APPROVE
  • 本 PR 自身の renumber 作業 (Commit 3) が table のみで完結し、cross-ref drift が発生しないことを実証

Summary by CodeRabbit

ドキュメンテーション

  • タスク参照規約を統一(順位表示は表のみとし、本文はタスク名参照へ変更)
  • アーキテクチャ決定ドキュメント(ADR-033)を追加
  • 推奨実行順序テーブルと優先度表記を全面更新・再編
  • 複数ドキュメントの優先度表記を整合化
  • PR#91 起点の新規タスク群と検証・移行手順を追記

aloekun added 3 commits April 29, 2026 19:20
PR #85/#86/#88/#89/#90/#91/Bundle 1 で連続発生した renumber 作業の構造的負債を
解消する ADR を起案。

問題:
- docs/todo.md の本文中 `順位 N` cross-reference が線形コストで増加
- PR #91 では 4 件追加に対し本文 8 箇所修正、過去 PR で stale reference の
  追従漏れによる CodeRabbit Minor 指摘が発生 (a15b263 で修正)
- 採番のみが情報源で、本文と表の往復が発生

決定 (選択肢 B 採用):
- 絶対番号 (`順位 N`) は推奨実行順序サマリー table のみに保持
- 本文での参照は task 名 (heading text or 略称) で行う
- table の `依存` 列のみ絶対番号を許可 (table 内なので renumber 同期可能)
- 「Tier N (順位 X/Y)」表記の `(順位 X/Y)` 部分は除去 → `Tier N` のみ残す

却下した選択肢:
- 選択肢 A (renumber script の自動化): 保守コスト新規発生、問題のすり替え
- 選択肢 C (現状維持): convergence loop の一因、線形増加は止まらない

本 commit は ADR と CLAUDE.md リンク追加のみ。本文 cross-ref の一括変換と
新規 entry template は次の commit で実施。

References:
- docs/adr/adr-013, adr-022, adr-028
- .claude/feedback-reports/86.md Tier 3 #3 (起案動機の起源)
- PR #91 a15b263 (stale reference 起因の Minor 指摘実例)
ADR-033 のガイドライン適用。docs/todo.md / todo2.md / todo3.md の本文中
`順位 N` cross-reference をすべて task 名参照に変換。

変更対象:
- docs/todo.md: 戦略 section の 12 箇所、Tier 4/5 entry の (順位 X/Y) 表記、
  週次レビュー entry の cross-ref
- docs/todo2.md: ADR-032 series の Phase ごと優先度表記、reviewer facet /
  各 Tier 1/2/3 entry の (順位 X/Y) と inline 参照
- docs/todo3.md: Stop hook lint:md / AI 生成一時スクリプト / cli-pr-monitor
  polling 延長 / post-pr-review rate-limit / .failed marker / Recovery 経路 /
  REJECT-ESCALATE entry の inline 参照を全て task 名に変換

維持した absolute number:
- docs/todo.md の推奨実行順序サマリー table の `順位` 列 (source of truth)
- table の `依存` 列の絶対番号 (table 内なので renumber と同期可能)
- table 内 cell の歴史的 `旧順位 N` 表記 (完了済み task の参照)

未変換の例外:
- docs/todo2.md line 696 の採番管理 ADR 元 entry の `(順位 24/26)` は
  本 PR の Commit 3 で entry 全体を削除するため未変換 (削除待ち)

検証:
```sh
grep -nE '順位 [0-9]+' docs/todo.md docs/todo2.md docs/todo3.md
# 期待: docs/todo.md table 列のみ + docs/todo2.md 採番管理 ADR 元 entry のみ
```

References:
- docs/adr/adr-033-todo-numbering-simplification.md (本 ADR の決定)
ADR-033 land により採番管理簡素化 task が完了したため、運用ルール
(memory feedback_todo_no_history.md) に従い元 entry を削除する。

変更:
- docs/todo2.md: "todo.md 採番管理の簡素化 ADR 起案 (PR #86 T3-3)" entry
  全体 (40 行) を削除
- docs/todo.md summary table:
  - 旧順位 27 (採番管理 ADR) 行を削除
  - 旧順位 28 (ADR-030 Phase E/F) → 順位 27 に renumber
  - 旧順位 29 (ADR-030 takt-test-vc) → 順位 28 に renumber、依存表記の
    `順位 28 Phase F` も `順位 27 Phase F` に追従
  - サマリー header 日付ラベルを "Bundle 1 完了後" → "ADR-033 land 後" に更新

検証:
- 本文 cross-ref は Commit 2 で除去済のため、本 commit の renumber は
  table 行と `依存` 列のみで完結 (ADR-033 の効果を本 PR 内で実証)
- markdownlint pass (PostToolUse hook で各 Edit ごとに検証)
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: e4940215-2816-4e46-b42f-1abf9d61a53b

📥 Commits

Reviewing files that changed from the base of the PR and between 59d1c98 and cee68ae.

📒 Files selected for processing (2)
  • docs/adr/adr-033-todo-numbering-simplification.md
  • docs/todo3.md
✅ Files skipped from review due to trivial changes (1)
  • docs/todo3.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/adr/adr-033-todo-numbering-simplification.md

📝 Walkthrough

Walkthrough

ADR-033を追加し、todo参照規約を「本文中での絶対番号(順位 N)」から「タスク名/アンカー参照」へ統一する旨を文書化。複数のtodoドキュメント(docs/todo*.md)とADR索引(CLAUDE.md)を更新し、関連タスク一覧・優先度表記を整備した。

Changes

Cohort / File(s) Summary
ADR 索引と新規 ADR
CLAUDE.md, docs/adr/adr-033-todo-numbering-simplification.md
ADR-033をADRインデックスに追加。todo参照ルール(本文での順位 N禁止、表のみで使用)と移行手順・テンプレートを定義。
主要 todo リスト再編
docs/todo.md
実行優先度表と上部サマリーをADR-033準拠に更新。順位7〜28のタスク群を差替え、Tier表示へ簡略化。PR #91 起点のpost-merge-feedback由来の新規タスク群と依存/工数/優先マークを反映。
補助 todo 文書の標準化
docs/todo2.md, docs/todo3.md
本文中の順位 N表記を削除またはタスク名参照へ置換。todo2からADR-033提案タスクを削除。todo3にPR #91 関連の4件タスク(PowerShell regex検証、.claude/除外フィルタ、SessionStart拡張、taktのreject‑escalate判定)を追加・記述更新。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

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 プルリクエストのタイトルは、ADR-033 の導入とタスク番号付けの簡略化という主要な変更を正確に要約している。試験運用ステータスの記載も含まれており、変更セットの主要な目的を明確に表現している。
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

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

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@docs/adr/adr-033-todo-numbering-simplification.md`:
- Around line 111-113: The grep currently uses "順位 [0-9]+" which only matches
numeric ranks and misses non-numeric occurrences like "順位 X"; change the regex
in the command to match any non-empty token after "順位" (for example use "順位
[^[:space:]\|]+" with grep -E) so the check detects both numeric and non-numeric
references; update the first grep pattern in the existing pipeline (the one that
currently reads "順位 [0-9]+") to this broader pattern and keep the rest of the
pipeline/exclusions unchanged.

In `@docs/todo3.md`:
- Line 511: Line 511 に残っているプレースホルダ「順位
X」を削除して、本文方針「本文はタスク名参照」に合わせて該当タスク名に置き換えてください(ここは `.claude/` filter、takt
harness、supervise や fix_supervisor の文脈をそのまま保持しつつ、明確に対象タスク名を記述するようにしてください)。
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2656b823-1ec7-464d-87b3-95dfa0ef18d9

📥 Commits

Reviewing files that changed from the base of the PR and between 9040d26 and 59d1c98.

📒 Files selected for processing (5)
  • CLAUDE.md
  • docs/adr/adr-033-todo-numbering-simplification.md
  • docs/todo.md
  • docs/todo2.md
  • docs/todo3.md

Comment thread docs/adr/adr-033-todo-numbering-simplification.md Outdated
Comment thread docs/todo3.md Outdated
PR #92 で受けた CodeRabbit Minor findings 2 件を child commit として修正。
両 finding は self-consistent: Finding 1 の改善 regex が Finding 2 の placeholder
残存を機械的に検出可能になる。

1. Minor: ADR-033 line 111 の検証 regex が数値以外の placeholder を見逃す
   - 旧: `順位 [0-9]+` (数値のみマッチ)
   - 新: `順位 [0-9A-Za-z_-]+` (英字 placeholder `順位 X` / `順位 N` も検出)
   - 期待コメントも更新し、placeholder 検出意図を明記

2. Minor: docs/todo3.md line 511 (REJECT-ESCALATE entry の動機セクション) で
   `.claude/ filter (順位 X = T2-1+T3-2 Bundle)` という placeholder が残存
   - 旧: `.claude/ filter (順位 X = T2-1+T3-2 Bundle)`
   - 新: `.claude/ filter + ADR-030 制約明記 task (PR #91 T2-1 + T3-2 Bundle)`
   - ADR-033 「本文はタスク名参照」方針に準拠

検証 (改善 regex で 0 件達成):
```sh
grep -nE "順位 [0-9A-Za-z_-]+" docs/todo.md docs/todo2.md docs/todo3.md   | grep -vE "推奨実行順序サマリー|^[^:]+:[0-9]+:\| [0-9]+ \|"
# 結果: 0 行
```
@aloekun
Copy link
Copy Markdown
Owner Author

aloekun commented Apr 29, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@aloekun aloekun merged commit f8591a0 into master Apr 29, 2026
1 check passed
@aloekun aloekun deleted the feat-adr-033-numbering-simplification branch April 29, 2026 11:49
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