docs(adr): ADR-030 を起案 — 決定論的 post-merge-feedback (Phase A) - #75
Conversation
- ADR-014 を full supersede、ADR-029 を partial supersede - 2 層アーキテクチャ (L1 takt 同期実行 + L2 UserPromptSubmit recovery) を採用 - 4 facets (analyze-pr / analyze-session / analyze-prepush-reports / aggregate-feedback) で構成 - silent loss 問題の構造分析と選択肢比較を明文化 - todo.md Phase A チェック更新、CLAUDE.md ADR リスト追記
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughCLAUDE.md と docs/adr/ および docs/todo.md を更新し、ポストマージフィードバックを決定論的なタクト仲介同期実行と障害マーカーベースの復旧で実施する ADR-030 を追加します(内部レポート出力とソフトフェイル動作を定義、ADR-014 を完全、ADR-029 を部分的に置換)。 Changes
Sequence Diagram(s)sequenceDiagram
participant MergePipeline as Merge Pipeline
participant Takt as Takt Workflow
participant Facet1 as PR Analysis Facet
participant Facet2 as Transcript Facet
participant Facet3 as Prepush Aggregation
participant Facet4 as Final Aggregation
participant FS as Repo FS
participant Hook as UserPromptRecovery Hook
MergePipeline->>Takt: 起動(同期)
Takt->>Facet1: PR 分析(diff/reviews)
Takt->>Facet2: トランスクリプト解析(project JSONL, time-range)
Takt->>Facet3: 事前プッシュレポート集約
Takt->>Facet4: フィードバック集約
Facet4->>FS: `.claude/feedback-reports/<pr>.md`を書き込み(成功)
alt 失敗時
Facet4->>FS: `.claude/feedback-reports/<pr>.md.failed` マーカーを書き込み
FS->>Hook: フックが `*.md.failed` を検出(追加コンテキスト:pnpm feedback-retry <pr>)
Hook->>MergePipeline: ユーザに再試行指示を注入
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
docs/todo.md (1)
112-115: 環境依存の絶対パスは抽象化しておくのがおすすめです。
E:\work\...直書きだと他環境で読み手が追従しづらいので、<skills_repo>などの論理名に寄せると運用しやすくなります。Also applies to: 145-145, 174-175, 255-255
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/todo.md` around lines 112 - 115, Replace the hard-coded Windows absolute path "E:\work\..." used in the docs with a configurable logical placeholder (e.g., "<skills_repo>" or "<local_skills_path>") across the referenced documents—specifically update analyze-pr.md, analyze-session.md, analyze-prepush-reports.md and aggregate-feedback.md (and the other occurrences at the indicated ranges) so that examples and references use the abstracted placeholder instead of the environment-dependent path; ensure any explanatory text notes how to substitute the placeholder for local environments.
🤖 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-030-deterministic-post-merge-feedback.md`:
- Line 143: The ADR contains a real user-home path
"C:\Users\HIROKI\.claude\projects\e--work-claude-code-hook-test\"; replace any
real usernames with a generic placeholder (e.g. use "<USER_HOME>" or "~" instead
of "C:\Users\HIROKI") and update the example path lines such as
"~/.claude/projects/<project-id>/<session-id>.jsonl" to consistently use the
placeholder; ensure all occurrences of "HIROKI" or the explicit Windows path are
anonymized in the document.
In `@docs/todo.md`:
- Around line 34-35: Update the guarantee phrasing in the table rows for "L1
Floor" and "L2 Recovery" to match ADR-030 terminology: replace "Exactly-once" in
the L1 Floor row with ADR-030's wording (e.g., "成功時 at-most-once / 失敗時は
`.failed` により再試行可能"), and ensure any guarantee text for "L2 Recovery" also uses
ADR-030 language and semantics rather than "At-least-once" if it conflicts; keep
the existing notes about determinism and user-triggered retries but normalize
the guarantee column to ADR-030's definition across both rows.
- Line 48: The document contains a local absolute path that exposes a real
username (`C:\Users\HIROKI\.claude\projects\e--work-claude-code-hook-test\`);
replace that exact string with a non-PII placeholder like
`<USER_HOME>\.claude\projects\<PROJECT_NAME>\` (or simply `<USER_HOME>/...`)
throughout docs/todo.md to remove PII, and ensure any similar occurrences use
the placeholder format instead of real user names.
---
Nitpick comments:
In `@docs/todo.md`:
- Around line 112-115: Replace the hard-coded Windows absolute path
"E:\work\..." used in the docs with a configurable logical placeholder (e.g.,
"<skills_repo>" or "<local_skills_path>") across the referenced
documents—specifically update analyze-pr.md, analyze-session.md,
analyze-prepush-reports.md and aggregate-feedback.md (and the other occurrences
at the indicated ranges) so that examples and references use the abstracted
placeholder instead of the environment-dependent path; ensure any explanatory
text notes how to substitute the placeholder for local environments.
🪄 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: d528b864-b18a-4612-a1f4-5994494083e5
📒 Files selected for processing (3)
CLAUDE.mddocs/adr/adr-030-deterministic-post-merge-feedback.mddocs/todo.md
Resolved findings: - [Major] docs/adr/adr-030-deterministic-post-merge-feedback.md:143 ADR 内の実ユーザー名入りパスは匿名化してください。 - [Major] docs/todo.md:35 保証レベルの表現を ADR-030 と統一してください。 - [Major] docs/todo.md:48 ローカル実ユーザー名を含む絶対パスはドキュメントに残さない方がよいです。
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docs/todo.md (1)
112-116: ローカル絶対パス参照はプレースホルダ化を推奨します。
E:\work\...のような環境依存パスが複数箇所にあり、将来の移植・引き継ぎ時に読解コストが上がります。<SKILLS_REPO>などの論理名に寄せると保守しやすいです。🧹 例: 表記統一の方向性
- - **`analyze-pr.md`**: ... (`E:\work\claude-code-skills\analyze-pr\SKILL.md` を参照) + - **`analyze-pr.md`**: ... (`<SKILLS_REPO>/analyze-pr/SKILL.md` を参照) - - `E:\work\claude-code-skills\post-merge-feedback\` 削除 + - `<SKILLS_REPO>/post-merge-feedback/` 削除Also applies to: 145-146, 174-176, 255-255
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@docs/todo.md` around lines 112 - 116, Replace hard-coded local absolute paths like "E:\work\claude-code-skills\..." in docs/todo.md with a portable placeholder (e.g., "<SKILLS_REPO>") so references to analyze-pr.md, analyze-session.md, analyze-prepush-reports.md, aggregate-feedback.md and any other mentions become environment-agnostic; update the entries that mention the path inside the bullet list and any other occurrences (including the post_steps branch notes under src/cli-merge-pipeline where type="ai") to use the placeholder consistently.
🤖 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/todo.md`:
- Around line 84-90: The fenced code block in the shown snippet uses triple
backticks with no language tag (the opening "```"), causing markdownlint MD040;
update the opening fence to include a language token such as "text" (i.e. change
"```" to "```text") so the block is language-specified while keeping the block
content identical.
---
Nitpick comments:
In `@docs/todo.md`:
- Around line 112-116: Replace hard-coded local absolute paths like
"E:\work\claude-code-skills\..." in docs/todo.md with a portable placeholder
(e.g., "<SKILLS_REPO>") so references to analyze-pr.md, analyze-session.md,
analyze-prepush-reports.md, aggregate-feedback.md and any other mentions become
environment-agnostic; update the entries that mention the path inside the bullet
list and any other occurrences (including the post_steps branch notes under
src/cli-merge-pipeline where type="ai") to use the placeholder consistently.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
- ADR-030 line 143: ユーザー名入りパスを %USERPROFILE% プレースホルダに置換 - todo.md line 84: code fence に言語指定 'text' を追加 (markdownlint MD040) (takt fix が拾い切れなかった残 2 件を手動対応)
PR #75 の post-merge-feedback で得られた Tier 1 提案を実装。 custom-lint-rules.toml に新規 rule を追加: - pattern: 'C:\Users\[A-Za-z][A-Za-z0-9_-]+\|/home/[a-z][a-z0-9_-]+/' - extensions: md / txt - severity: error - placeholder (<USER_NAME>, %USERPROFILE%, ~/, $HOME) は character class ([A-Za-z] / [a-z]) で開始位置を縛り自動除外 由来: PR #75 で同種 PII 指摘が 3 箇所同時発生 (ADR-030 line 143、 todo.md line 35/48)。PR #74 でも前例あり、CodeRabbit Major 指摘の 頻出パターンとして Plankton Tier 1 (決定論的防止) で固定化する。 カスタムリンタは std::fs::read_to_string で runtime ロードのため exe rebuild 不要。既存 45 件のリンターテスト全 PASS で regex 妥当性確認済。
PR #75 の post-merge-feedback で得られた Tier 1 提案を実装。 custom-lint-rules.toml に新規 rule を追加: - pattern: 'C:\Users\[A-Za-z][A-Za-z0-9_-]+\|/home/[a-z][a-z0-9_-]+/' - extensions: md / txt - severity: error - placeholder (<USER_NAME>, %USERPROFILE%, ~/, $HOME) は character class ([A-Za-z] / [a-z]) で開始位置を縛り自動除外 由来: PR #75 で同種 PII 指摘が 3 箇所同時発生 (ADR-030 line 143、 todo.md line 35/48)。PR #74 でも前例あり、CodeRabbit Major 指摘の 頻出パターンとして Plankton Tier 1 (決定論的防止) で固定化する。 カスタムリンタは std::fs::read_to_string で runtime ロードのため exe rebuild 不要。既存 45 件のリンターテスト全 PASS で regex 妥当性確認済。
…ndle CR-RL 採用 3 件 (#183) * docs(todo): PR #182 post-merge-feedback Bundle CR-RL 採用 3 件 + 順位 165 補足追記 採用: PR #182 post-merge-feedback (2026-05-29 ユーザー承認): - 順位 167 (T1-#1): check-ci-coderabbit の RATE_LIMIT_MARKER を新フォーマット対応に更新 - 順位 168 (T2-#1): CR rate-limit detection integration test の新旧 fixture - 順位 169 (T3-#1): ADR-018 / ADR-034 に CR rate-limit format evolution 同期戦略 codify 3 件は Bundle CR-RL タグで同 PR land 推奨 (機械強制 + test 層 + 永続 ADR 層の 3 層補強)。 順位 165 補足追記: - PR #182 T2-#2 採用候補 (pnpm-create-pr-body-guard hook test) は本 165 と scope 重複のため独立 entry 化せず本 entry に集約 - supplementary fact: PR #134 で pnpm-create-pr-body-guard hook 採用判定されたが未実装の state (= stale unfulfilled adoption、feedback-reports/134.md Tier 1 #1) - 165 着手時に hook 実装済なら test 範囲を 2 層 (--body-file workaround verify + guard hook 動作 verify) に拡張 * docs(adr): 8 ADR の ephemeral todo 参照を permanent reference に置換 (A01 fix、Cross-File Reference Lifecycle 違反修正) PR #182 Phase B dogfood で検出された finding WR-2026-05-29-A01 (Severity High、Category adr-alignment) の修正。 8 永続 ADR が docs/todo*.md の section / 順位 N / Phase A-F 等の ephemeral artifact を直接参照しており、 docs-governance.md § Retirement Workflow で todo entry が削除された際に silent dead pointer 化する systemic documentation drift の構造修正。 修正方針 (analyzer 推奨 3 strategy): 1. ADR cross-references — 別 ADR に decision がある場合 2. PR # references — git log で origin が trackable な場合 3. Inlined constraints — detail が小さい場合 各 ADR の修正: - ADR-022 line 197: parenthetical pointer 削除 (operational guideline は self-contained で完結) - ADR-023 lines 54, 86: "docs/todo.md or PR description" → "PR description" (permanent artifact のみに集約) - ADR-028 line 186: "docs/todo.md #7" → "PR #59 で land、PR #62 で global skill 移管" - ADR-029 lines 191, 240, 266: task pointer 削除 + ADR-030 supersede note (本 ADR は ADR-030 partial supersede 対象、実装系譜は ADR-030 に集約) - ADR-030 line 417: Phase B-F section pointer → 各 Phase の land 済 PR # (PR #75/77/80/154) を直接列挙、 Phase E/F は priority table 参照 (specific 順位 番号は避ける) - ADR-031 line 270: Phase A-F section pointer → PR #182 + priority table (順位 8 は trackable level の言及) - ADR-033 line 111: grep procedure hardcoded list (todo.md/2/3) → glob (todo*.md) 本 ADR land 時から todo4-9 が追加されており hardcode list は既に stale - ADR-034: "todo-summary.md / todo4.md エントリ" section + "新セッションで最初に確認すべきこと" を全面再構成、4 component の land 状況を PR # primary table 化 (旧 順位 42 = PR #113 等)、 新セッション checklist を ADR-018 + memory + grep ベースに置換 修正外 (operational reference として保持): - ADR-031 lines 79, 84, 96, 121, 185, 189-191, 205, 207, 240, 242, 251, 302: workflow が todo.md に書き込む / セクション作成する behavior 記述 (pointer ではない operational description) - ADR-033 lines 1, 11, 24, 93, 100, 130, 131: ADR 本体が todo.md 管理がテーマのため intrinsic - ADR-034 lines 195-198 (Bundle b との関係 table): 順位 N と PR # / Bb-N が pair で書かれているため permanent reference (PR #) が常にあり、dead pointer リスクなし
Summary
docs/adr/adr-030-deterministic-post-merge-feedback.md) を新規作成Context
PR #74 マージ後の dogfood で、ADR-029 設計の silent loss 問題 が顕在化した。Stop hook + skill ベースの auto-trigger は Claude のターン取得次第で機能せず、決定論的実行が成立しなかった (4 層トリガーのうち層 3-4 が非決定的)。skill 機構は本質的に "ask-based" であり must-run 要件には構造的に不適合という設計上の知見が得られた。
本 PR は ADR-030 を起案し、ADR-015 / 018 で確立された「機械的 = Rust、AI = takt」原則の 3 例目 として、takt workflow による同期実行 + 失敗マーカー recovery 機構へ移行する設計を明文化する。本 PR は 設計のみ で実装は含まない (Phase B-F は別 PR)。
Validation
pnpm pushquality gate: lint / test / build / rust-test 全 PASS (15s)@-の差分が ADR/docs のみで Rust コード差分なしのため diff 空判定でスキップ (正しい挙動)takt/dogfood等の project 固有語、既存 ADR と同じ扱い)References
Summary by CodeRabbit