Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/adr/adr-022-automation-responsibility-separation.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ external reviewer が参照する対象 (PR 上の commit 履歴) は不変で

- `gh pr list --head <bookmark-name> --state open --json number` で bookmark が open PR に紐付いているか確認
- cli-pr-monitor は stage 間 state で PR 番号を保持済み (`src/cli-pr-monitor/src/stages/push.rs` 参照)
- interactive Claude Code は `jj describe` / ファイル edit 連続実行の前に上記チェックを入れる運用に切り替える (実装タスクは docs/todo.md 参照)
- interactive Claude Code は `jj describe` / ファイル edit 連続実行の前に上記チェックを入れる運用に切り替える

#### 本原則の適用開始

Expand Down
4 changes: 2 additions & 2 deletions docs/adr/adr-023-coderabbit-reject-thread-skill.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ PR #44 で 1 回実施した。ADR-019 の運用が普通に回れば、今後
- うち takt analyze が `not_applicable` として理由書きした件数
- 人間が手動で reply + resolve した件数

計測方法: 毎回の PR 作業終了時に docs/todo.md or PR description に `[CR-reject: N件]` のようなタグを残す (簡易カウント)。
計測方法: 毎回の PR 作業終了時に PR description に `[CR-reject: N件]` のようなタグを残す (簡易カウント。PR description は permanent artifact なのでカウント履歴が retire でも残る)。

### 正式採用条件 (2026-07-31 再評価)

Expand Down Expand Up @@ -83,7 +83,7 @@ PR #44 で 1 回実施した。ADR-019 の運用が普通に回れば、今後
### 試験運用中の運用

- PR #44 で確立した 2 ステップ手順を手動で継続
- 発火するたびに docs/todo.md または PR description にカウントを記録
- 発火するたびに PR description にカウントを記録 (permanent artifact なので retire でも履歴が残る)
- 2026-07-31 に再評価 PR を立てる (本 ADR の status 更新)

### 参照する他 ADR
Expand Down
2 changes: 1 addition & 1 deletion docs/adr/adr-028-pnpm-create-pr-gate.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ interactive session での PR 作成フロー:
## 次ステップ (スコープ外、PR-B 以降で対応)

- **PR-B (実装済)**: `.claude/settings.json` に `permissions.ask` 4 パターンを追加して二次防衛層を実装 + `scripts/prepare-pr-body.ps1` で PR body を一時ファイル化する helper を整備
- **PR-D (`docs/todo.md` #7)**: `prepare-pr` skill で「ドラフト提示 → 明示承認 → 実行」フローを標準化
- **PR-D (PR #59 で land、PR #62 で global skill に移管)**: `prepare-pr` skill で「ドラフト提示 → 明示承認 → 実行」フローを標準化
- **運用レビュー**: 2026-07 に二次防衛層の発火頻度を計測。毎回 prompt 応答が形骸化していないか確認

## 参照
Expand Down
6 changes: 3 additions & 3 deletions docs/adr/adr-029-post-merge-feedback-auto-trigger.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ hooks-stop-feedback-dispatch が pending file を読み取る際の分岐表:

Rust 側の実装順序は rust-lang/rust の [#131072](https://github.com/rust-lang/rust/pull/131072) / [#138133](https://github.com/rust-lang/rust/pull/138133) で 2024-2025 に変更されており、信頼性のため non-atomic を先に試行、失敗時のみ POSIX semantics 版へ fallback する挙動になっている点にも留意。

本 ADR が「atomic rename で十分、ロック不要」と結論する前提は「Windows 10 1607+ / NTFS」が成り立つ本プロジェクト環境に限る。派生プロジェクトへバックポートする際は環境を再確認すること。実装 (task 1-B) 時の action item は docs/todo.md 1-B を参照。
本 ADR が「atomic rename で十分、ロック不要」と結論する前提は「Windows 10 1607+ / NTFS」が成り立つ本プロジェクト環境に限る。派生プロジェクトへバックポートする際は環境を再確認すること。

### additionalContext 構造化フォーマット

Expand Down Expand Up @@ -237,7 +237,7 @@ commit description / bookmark 名 / PR title/body への介入は一切発生し

## 実装タスク

詳細な実装手順は `docs/todo.md` の「マージ後フィードバックの定常化」セクションを参照。本 ADR は仕様のみを規定する。
本 ADR の実装は ADR-030 (Supersedes ADR-029 partial) で再設計され、最終形は同 ADR § 実装タスクおよび cli-merge-pipeline / takt facets 関連 PR を参照。本 ADR の当初の task 内訳は以下:

- **1-B**: cli-merge-pipeline の `"ai"` 分岐を pending file 書き込みに置き換え
- **1-C**: `hooks-stop-feedback-dispatch` 新規 exe の追加 + Stop hook 登録
Expand All @@ -263,7 +263,7 @@ commit description / bookmark 名 / PR title/body への介入は一切発生し
### 将来の展望

- 取りこぼしが問題化したらディレクトリベースのキュー (`.claude/post-merge-feedback/<pr>.json`) へ移行 (schema_version bump を伴う)
- dogfood で問題なければ ADR-014 の試験運用ステータスを本採用化 (docs/todo.md の 1-F タスク)
- dogfood で問題なければ ADR-014 の試験運用ステータスを本採用化 (ADR-030 が ADR-014 を full supersede したことで本 line item は実質完了済)
- 派生プロジェクト (takt-test-vc 等) へバックポート

## References
Expand Down
13 changes: 7 additions & 6 deletions docs/adr/adr-030-deterministic-post-merge-feedback.md
Original file line number Diff line number Diff line change
Expand Up @@ -414,14 +414,15 @@ PR #91 で実証された pathological loop:

## 実装タスク

詳細な実装手順は [`docs/todo.md`](../todo.md) の「マージ後フィードバック機構の決定論化」セクション Phase B-F を参照。本 ADR は仕様のみを規定する。
本 ADR は仕様のみを規定し、各 Phase の実装は以下の PR で land 済:

- **Phase A**: 本 ADR 起案 (PR 1) — 設計のみ
- **Phase B**: takt workflow + 4 facets — L1 Floor (PR 2)
- **Phase C**: UserPromptSubmit hook — L2 Recovery (PR 3)
- **Phase A**: 本 ADR 起案 — 設計のみ (PR #75 で land)
- **Phase B**: takt workflow + 4 facets — L1 Floor (PR #77 で land)
- **Phase C**: UserPromptSubmit hook — L2 Recovery (PR #80 で land)
- **Phase D**: 廃止 (skill enrichment 不要、本 ADR 「検討した選択肢 D」参照)
- **Phase E**: 旧機構廃止 (PR 4 — Phase B/C dogfood 数回後)
- **Phase F**: dogfood 検証 (PR 4 マージ後 / 継続観察)
- **Phase D-7 (補完)**: L1 Drop guard + L2 orphan reaper + ADR-030 spec (PR #154 で land、Bundle c-1)
- **Phase E**: 旧機構廃止 (Phase B/C dogfood 数回後の判断) — 進捗は `docs/todo-summary.md` の priority table で trackable
- **Phase F**: dogfood 検証 — Phase E land 後の継続観察として priority table で trackable

## 影響

Expand Down
12 changes: 6 additions & 6 deletions docs/adr/adr-031-weekly-review-pipeline.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,13 @@ ADR-030 で確立した「機械的 = Rust / AI 並列 = takt / ask-based = skil

## 実装タスク

詳細な実装手順は [`docs/todo.md`](../todo.md) の「週次プロジェクト全体レビューパイプラインの導入」セクション Phase A-F を参照。本 ADR は仕様のみを規定する。
本 ADR は仕様のみを規定し、各 Phase の land 状況は以下:

- **Phase A**: 本 ADR 起案 (PR 1) — 設計のみ
- **Phase B**: takt workflow + 4 facets + architecture-reviewer persona (PR 2)
- **Phase C**: skill + SessionStart hook 拡張 (PR 3)
- **Phase D**: e2e 検証 (PR 3 マージ後 / PR 4 起案前)
- **Phase E**: 試験運用 dogfood (PR 4 — 1〜2 週運用 + ADR-031 ステータス更新)
- **Phase A**: 本 ADR 起案 — 設計のみ (PR #177 を起源とする bundle、ADR 本体 land)
- **Phase B**: takt workflow + 4 facets + architecture-reviewer persona (PR #182 で land、persona は既存 `persona_sessions.json` 登録分を再利用)
- **Phase C**: skill + SessionStart hook 拡張 — 未着手 (Phase B dogfood 後の判断、todo-summary 順位 8 で trackable)
- **Phase D**: e2e 検証 — Phase C land 後 (todo-summary 順位 8 entry に内包)
- **Phase E**: 試験運用 dogfood (1〜2 週運用 + ADR-031 ステータス更新) — Phase D 後
- **Phase F**: 自動化検討 (本採用後の任意 — schedule スキル経由の cron 化)

## アンチパターン
Expand Down
4 changes: 3 additions & 1 deletion docs/adr/adr-033-todo-numbering-simplification.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,13 @@ migration 完了の判定:

```sh
# 推奨実行順序サマリー table の外側で `順位 X` (数値・英字 placeholder 含む) が使われていないこと
grep -nE "順位 [0-9A-Za-z_-]+" docs/todo.md docs/todo2.md docs/todo3.md \
grep -nE "順位 [0-9A-Za-z_-]+" docs/todo*.md \
| grep -vE "推奨実行順序サマリー|^[^:]+:[0-9]+:\| [0-9]+ \|"
# 期待: 0 行 (table 列以外で `順位 X` が使われていない)
# 注: 数値だけでなく英字 placeholder (例: `順位 X`、`順位 N`) も検出対象。
# ADR の本文中で「絶対番号を示唆する placeholder を本文に書かない」方針を機械検証する。
# todo*.md は今後追加されうるため glob で全件対象 (本 ADR land 時は todo.md/2/3 のみだったが、
# todo4-9 等が後から追加されており、hardcode list は stale 化する構造的問題を回避)。
```

## priority table 運用ルール (PR #111 post-merge-feedback で追加)
Expand Down
29 changes: 17 additions & 12 deletions docs/adr/adr-034-coderabbit-auto-monitoring.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,22 +147,27 @@ PR #99 セッションで以下の運用痛が観測された:
- `project_coderabbit_rate_limit_overlay.md`: rate-limit 検出ロジックの根拠 (PR #99 で実証された walkthrough overlay 仕様)
- `project_coderabbit_auto_resolve.md`: `resolved:` reply での auto-resolve 挙動

### todo-summary.md / todo4.md エントリ
### Bundle a component の land 状況 (2026-05-29 update)

- `docs/todo-summary.md` 推奨実行順序サマリー: 順位 42-45 (Bundle a 4 component)
- `docs/todo4.md`:
- cli-pr-monitor の rate-limit auto-retry + `@coderabbitai review` auto-trigger 実装 (PR #99 T2-4)
- ADR-018 / ADR-009 の rate-limit retry ポリシー明文化 (PR #99 T3-5)
- 本 ADR で追加される #D-1 / #D-3 entry も別セッションで todo4.md に追記が必要
Bundle a の 4 component は以下のように消化された:

| component | 状態 | land 経路 |
|---|---|---|
| rate-limit auto-retry 実装 (旧 順位 42) | ✅ land 済 | **PR #113 (Bb-1)** で実装、PR #115 dogfood で実証 |
| ADR-018 / ADR-009 retry policy 明文化 (旧 順位 43) | ✅ 部分達成 | ADR-018 追記 (2026-05-06)、残作業は ADR-009 navigation 注記 |
| #D-1 (gh CLI 規則を `~/.claude/rules/common/git-workflow.md` に追記) | 別経路で完了 | 計画書消化、本 ADR 当初 entry は retire 済 |
| #D-3 (`check-ci-coderabbit --list-findings` Rust モード) | 状況依存 | todo entry 化されている場合 land 状況を確認 (本 ADR では trackable な PR # を直接保持しない方針) |

詳細な進捗 trackable な permanent reference は本 ADR § "Bundle b との関係" 表 (line 188+) を参照。`docs/todo*.md` の `順位 N` entry は ephemeral artifact であり、entry 削除時に本セクションの言及が dead-pointer 化しないよう PR # primary 引用を優先する。

### 新セッションで最初に確認すべきこと

1. `git log --oneline -5` で master の最新状態を確認 (Bundle Z Phase 2/3 land 済か等)
2. `docs/todo-summary.md` の Bundle a 関連 entry (順位 42-45) を読む
3. `docs/todo4.md` の Bundle a 詳細 entry を読む
4. 本 ADR (ADR-034) を読む
5. memory `project_coderabbit_rate_limit_overlay.md` を読む
6. **どの Sub-PR を実施するか確認**: Sub-PR 1 (#D-1 + #D-3) と Sub-PR 2 (rate-limit auto-retry + ADR-018 改訂) のどちらから着手か (推奨は Sub-PR 1 先行)
1. `git log --oneline -5` で master の最新状態を確認 (Bundle Z Phase 2/3 / Bundle b / Bundle CR-RL 等の land 済 PR を把握)
2. 本 ADR (ADR-034) を読む — 特に "Bundle b との関係" 表で Bundle a の現状を把握
3. ADR-018 (cli-pr-monitor takt 移行) を読む — rate-limit retry policy の現状実装
4. memory `project_coderabbit_rate_limit_overlay.md` を読む
5. **未着手 component** を確認: 旧 順位 46 (integration test) / 旧 順位 49 (parse_findings error-path test infra) が `docs/todo*.md` 系列に entry を持つか `grep "整合性 test\|parse_findings" docs/todo*.md` で確認
6. **どの Sub-PR を実施するか確認**: Bundle a 残作業 (Sub-PR 2 縮小版) または Bundle CR-RL (順位 167-169、本 ADR 採用ロジックと隣接領域) のどちらから着手か (Bundle CR-RL は format drift 修正の優先度が高い)

### 完了条件

Expand Down
3 changes: 3 additions & 0 deletions docs/todo-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@
| 164 | 💎 Tier 3 | **ADR-039 kill-switch standard pattern に「診断メッセージは実装の受理値を網羅」原則追記 (PR #179 T3-#1 採用)** | todo9.md | XS | なし (PR #179 で `CLI_DOCS_LINT_DISABLE` の kill-switch message が `=1` 固定で実受理値 `true`/`TRUE`/`True` を反映しなかった spec-impl drift、ADR-039 は全 experimental feature の標準参照のため systemic reach、`docs/adr/adr-039-*.md` 編集) |
| 165 | 🔧 Tier 2 | **`pnpm create-pr` PR body truncation 回避を検証する e2e/integration test 追加 (PR #181 T2-#1 採用)** | todo9.md | S | なし (PR #134 + #181 の 2 回観測で Medium frequency に昇格、memory `feedback_pnpm_create_pr_body` の `--body-file` workaround を自動 regression gate 化、shell argument truncation の境界 (行数/バイト数) を fixture で測定、silent UX 劣化の早期検出、cli-pr-monitor の argv 組み立て層を test 対象、順位 166 と相補 = test 層 vs docs 層) |
| 166 | 💎 Tier 3 | **ADR-028 に PR body 複数行時の `--body-file` 推奨 + shell argument truncation の why/how 補足追記 (PR #181 T3-#1 採用)** | todo9.md | XS | なし (順位 165 の構造的予防策として ADR-028 = pnpm create-pr gate に codify、改行が shell delimiter として処理される why と `--body-file` / `gh pr edit --body-file` の how を 2-3 段落で補足、`docs/adr/adr-028-pnpm-create-pr-gate.md` 編集、memory `feedback_pnpm_create_pr_body` との back-link 整合) |
| 167 | 🚀 Tier 1 | **`check-ci-coderabbit` の `RATE_LIMIT_MARKER` を新フォーマット対応に更新 (PR #182 T1-#1 採用) ★ Bundle CR-RL** | todo9.md | M | なし (`src/check-ci-coderabbit/src/main.rs:251` 旧 marker `Rate limit exceeded` 固定 → multi-variant array `["Rate limit exceeded", "rate limited by coderabbit.ai"]` に変更、現行 CR は HTML マーカー + `## Review limit reached` フォーマットを使用、PR #182 で 30+ 分 polling 観測の root cause、`RateLimitOutcome::Parked` 経路 (ADR-018) が silent regression で無効化されている critical bug、順位 168 + 169 と Bundle CR-RL で同 PR land 推奨) |
| 168 | 🔧 Tier 2 | **CR rate-limit detection integration test — 新旧両フォーマット対応 fixture 追加 (PR #182 T2-#1 採用) ★ Bundle CR-RL** | todo9.md | S | 順位 167 の marker 配列化と pair、`#[cfg(test)]` に新 format fixture 2-3 variant 追加 (HTML マーカー + `## Review limit reached` の minimum reproduction)、既存 6 fixture (旧 format) は維持して backward compat、silent regression を test で検出可能化 |
| 169 | 💎 Tier 3 | **ADR-018 / ADR-034 に CR rate-limit format evolution と検出ロジック同期戦略を codify (PR #182 T3-#1 採用) ★ Bundle CR-RL** | todo9.md | XS | 順位 167 + 168 と同 commit 推奨、ADR-034 に「既知 format 一覧 + 検出 logic 更新手順」を追記、ADR-018 lines 185-186 を multi-variant 参照に更新、CR の format 進化への構造的予防策、永続 layer (ADR) での format drift 防止 |

**戦略**: Tier 1 を 2〜3 セッションで片付け → Tier 2 で ADR-032 の前提 + rate-limit + convergence cost 削減を進める → Tier 3 で ADR-032 を land + ドキュメント整備。Tier 4-5 は cleanup / 外部展開で daily efficiency への直接効果は小さい。

Expand Down
Loading