Skip to content

docs(adr): ADR-029 post-merge-feedback 自動起動 策定 + 関連 ADR 改訂 (task 1-A)#69

Merged
aloekun merged 3 commits intomasterfrom
docs/adr-029-post-merge-feedback-auto-trigger
Apr 23, 2026
Merged

docs(adr): ADR-029 post-merge-feedback 自動起動 策定 + 関連 ADR 改訂 (task 1-A)#69
aloekun merged 3 commits intomasterfrom
docs/adr-029-post-merge-feedback-auto-trigger

Conversation

@aloekun
Copy link
Copy Markdown
Owner

@aloekun aloekun commented Apr 22, 2026

Summary

  • ADR-029 新設: pending file + 現セッション起動方式で /post-merge-feedback skill を自動発火する設計を確定 (schema v1 / 状態遷移 / 競合ポリシー / 破損耐性 / additionalContext フォーマット)
  • ADR-014 改訂: 「将来の展望」に ADR-029 リンク追加、ADR-029 が選択肢 3 (skill はメイン会話内で実行) を維持していることを明記
  • ADR-013 改訂: 「将来の展望」セクション新設、[[merge_pipeline.post_steps]]type = "ai" 実装方式を ADR-029 に委譲
  • CLAUDE.md: ADR リストに ADR-029 を追加
  • docs/todo.md: 「マージ後フィードバックの定常化」を 1-A〜1-F に分割 (本 PR で 1-A 完了、1-B/1-C/1-D/1-E/1-F は後続 PR)

Context

Why: ADR-014 の /post-merge-feedback skill は明示呼び出し依存で、呼び忘れによりフィードバックが得られないケースが運用上発生していた。自動起動を追加したいが、exe から claude -p で新規 session を spawn する案 (選択肢 1) はセッション知見を失うため ADR-014 で却下済み。ADR-014 選択肢 3 (skill はメイン会話内で実行) を維持したまま自動化する具体仕様が必要だった。

Trigger: docs/todo.md「マージ後フィードバックの定常化 (post-merge-feedback 自動起動)」task 1-A。全体設計 (pending file + 現セッション起動) は事前の採用済フィードバック論点で確定済み (多重実行耐性 / atomic write / 競合ポリシー / additionalContext 構造化 / run_steps 後方互換)。

Scope decision: 本 PR は docs のみに限定 (1-A)。実装 (CLI: 1-B / hook: 1-C / 有効化: 1-D / skill: 1-E) は並行可能な別 PR に分離し、設計確定を先行させる。

Validation

  • pre-push-review: verdict=APPROVE (1 iteration, 3m 22s, 2026-04-23T04:34:54Z)
    • simplicity-review: no findings
    • security-review: APPROVE (non-blocking note: 1-B 実装時に owner_repo の文字列検証を入れると newline injection 防御で堅牢)
  • docs-only PR のため build/test は非対象
  • ADR 内リンク整合性: ADR-013/014 ↔ ADR-029 の相互参照を手動確認

References

Summary by CodeRabbit

  • Documentation
    • 新しい自動起動設計(ADR-029)を追加しました。
    • マージパイプライン(ADR-013)とポストマージフィードバック(ADR-014)の設計を更新し、自動トリガーの見通しを反映しました。
    • 実装ロードマップ(TODO)を更新し、保留ファイルベースのフローと段階的実施計画を明記しました。
    • ドキュメント索引(CLAUDE.md)に該当エントリを追加しました。

- ADR-029: pending file + 現セッション起動方式の設計書新設
  (schema v1 / 状態遷移 / 競合ポリシー / 破損耐性 / additionalContext フォーマット)
- ADR-014: 将来の展望に ADR-029 リンク追加。自動起動は選択肢 3 維持を明記
- ADR-013: 将来の展望セクション新設、ai ステップの実装方式を ADR-029 に委譲
- CLAUDE.md: ADR リストに ADR-029 追加
- docs/todo.md: 「マージ後フィードバックの定常化」を 1-A〜1-F に分割

本 PR は 1-A (docs のみ)。1-B (CLI) / 1-C (hook) / 1-D (有効化) / 1-E (skill) は後続。
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@aloekun has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 46 minutes and 24 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 46 minutes and 24 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b36a5c71-4b35-431e-a698-5081f1ab10b1

📥 Commits

Reviewing files that changed from the base of the PR and between 174c2ad and 3642e6b.

📒 Files selected for processing (1)
  • docs/todo.md
📝 Walkthrough

Walkthrough

ADR-029を新規追加し、pending-fileベースのpost-merge feedback自動トリガー機構を設計しました。cli-merge-pipelineのAI処理が.claude/post-merge-feedback-pending.jsonへのアトミック書き込みを行い、Stop hookがこのファイルを検出してadditionalContextを通じて既存スキル/post-merge-feedbackを同一会話内で起動する手順を記述しています。

Changes

Cohort / File(s) Summary
ADR-029 追加
docs/adr/adr-029-post-merge-feedback-auto-trigger.md
新規ADR。.claude/post-merge-feedback-pending.jsonによるpending-fileベース自動起動設計を定義。JSONスキーマ(v1)、状態遷移(pending→dispatched→consumed)、TTL/破損/衝突処理、アトミック書込手法、Stop-hookの振る舞い、実装タスクリストを記載。
既存ADR参照更新
docs/adr/adr-013-merge-pipeline.md, docs/adr/adr-014-post-merge-feedback.md, CLAUDE.md
ADR-029への参照追加とステータス改訂。ADR-013はpost_stepsの実装指針を「exeからAI起動」から「pending-file書込 + Stop-hook検出」へ見直す旨を追記。ADR-014はauto-start案(pending file + 現セッション起動)を追記。CLAUDE.mdは新エントリ追加。
タスク計画書更新
docs/todo.md
todoをADR-029準拠に再構成。cli-merge-pipelineのaiステップでのpending-file書込/スキップロジック、hooks-stop-feedback-dispatch実行可能フックの追加、テンプレート/設定の有効化、スキル側のconsume-on-completion対応等の段階的実装タスクに分割。

Sequence Diagram(s)

sequenceDiagram
    participant CLI as cli-merge-pipeline
    participant FS as .claude/post-merge-feedback-pending.json
    participant StopHook as hooks-stop-feedback-dispatch
    participant Claude as Claude (main conversation / skill runner)

    CLI->>FS: atomically write pending JSON (status: pending)
    Note right of FS: file: pending → dispatched → consumed
    StopHook->>FS: read pending file on Stop
    alt pending found
        StopHook->>FS: update status -> dispatched
        StopHook-->>Claude: return additionalContext to request /post-merge-feedback
        Claude->>Claude: run /post-merge-feedback skill within main session
        Claude-->>StopHook: skill completed (consume)
        StopHook->>FS: mark status -> consumed (or delete after TTL)
    else no pending / already dispatched
        StopHook-->>CLI: no-op / warn
    end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 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-029の新規策定と関連するADRの改訂という主要な変更を、簡潔で具体的に表現しており、チームメンバーがPRの歴史から主要な変更を理解できます。
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

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: 1

🤖 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-029-post-merge-feedback-auto-trigger.md`:
- Around line 142-159: The ADR currently asserts that atomic rename via
std::fs::rename holds on POSIX/Windows (line referencing
"hooks-stop-feedback-dispatch" and "std::fs::rename"), but std::fs::rename does
not universally guarantee atomic overwrite on all Windows versions; update the
ADR text to qualify this claim, reference the Windows 10 1607+/FileRenameInfoEx
vs fallback FileRenameInfo behavior, and add an action item in task 1-B to (a)
verify target Windows versions/runtime behavior at implementation time, and (b)
specify a fallback strategy (e.g., safe delete+rename fallback or use
ReplaceFile/FileRenameInfoEx via platform API) if atomic rename cannot be relied
upon.
🪄 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: 602b32b7-5449-47d4-a982-f512163b0758

📥 Commits

Reviewing files that changed from the base of the PR and between ee7f577 and ef8967a.

📒 Files selected for processing (5)
  • CLAUDE.md
  • docs/adr/adr-013-merge-pipeline.md
  • docs/adr/adr-014-post-merge-feedback.md
  • docs/adr/adr-029-post-merge-feedback-auto-trigger.md
  • docs/todo.md

Comment thread docs/adr/adr-029-post-merge-feedback-auto-trigger.md
@aloekun
Copy link
Copy Markdown
Owner Author

aloekun commented Apr 23, 2026

@coderabbitai review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 23, 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.

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: 1

🤖 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 29-43: The TODO shows "現在地: 未着手" while the PR completed task 1-A;
update the checklist in docs/todo.md so it reflects that 1-A is done by marking
the specific item related to ADR-029 / "1-A" as completed (check the bullet
under `docs/adr/adr-029-post-merge-feedback-auto-trigger.md` and change its
state from 未着手/unchecked to 完了/checked or remove the outdated "未着手" header to
match the repo's Line 3 operation rule), ensuring the ADR-029, ADR-014/013
update bullets and CLAUDE.md entry remain present and consistent.
🪄 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: ea8f02f6-c62f-4624-9342-8967810b97ab

📥 Commits

Reviewing files that changed from the base of the PR and between ef8967a and 174c2ad.

📒 Files selected for processing (2)
  • docs/adr/adr-029-post-merge-feedback-auto-trigger.md
  • docs/todo.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/adr/adr-029-post-merge-feedback-auto-trigger.md

Comment thread docs/todo.md Outdated
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