Skip to content

docs(adr): ADR-052 自律実行境界の 2 クラス分類(WP-10、ADR-028 の 2 段化)#259

Open
aloekun wants to merge 2 commits into
masterfrom
wp-10-autonomy-boundary-adr
Open

docs(adr): ADR-052 自律実行境界の 2 クラス分類(WP-10、ADR-028 の 2 段化)#259
aloekun wants to merge 2 commits into
masterfrom
wp-10-autonomy-boundary-adr

Conversation

@aloekun

@aloekun aloekun commented Jul 11, 2026

Copy link
Copy Markdown
Owner

概要

WP-10(ハーネス改善計画 1-C)。常時稼働化する自律 actor と ADR-028 の実行ゲートの原理的衝突を、事前定義された 2 クラス分類で解消する ADR-052 を起票する。あわせて WP-09(GitHub Actions バックストップ、PR #258 マージ済)の計画書ステータスを「観測中」に更新する。

ADR-052 の骨子

  • 適用は自律 actor 限定(interactive Claude は従来どおり ADR-028 の人間ゲート。ADR-022 の actor 区分と整合)。
  • 2 クラス:
    • 自動実行可: docs-only(ADR-035 基準)/ Tier3 cleanup / claude/ prefix push / claude/ ブランチからの draft PR 作成
    • ゲート必須: PR ready 化 / マージ / master push / 非 draft PR 作成
  • 分類不能は fail-closed でゲート必須へ(ADR-043 原則 1)。
  • 2 段化の本質: ADR-028 のゲートを除去せず「commitment 点(ready 化 / マージ)へ移設」。夜間ループは「実装 → push → draft PR 作成(自動)→ 停止」、人間が draft をレビューして ready 化 / マージ。
  • 背圧・kill-switch とセット運用が前提(原則 5、常時性ガード)。
  • ADR-039 パターンで試験運用(bounded lifetime: 呼び手未実装のまま 3 か月で前提を再評価)。

スコープ判断: Rust 分類関数は今回見送り

コード調査の結果、PR 作成 / マージの事前許可は 100% harness(permissions.ask)側で強制され、Rust に自律実行経路(呼び手)が存在しない。分類関数を今実装しても dead code(YAGNI)になるため見送り。呼び手(イベント駆動バックボーン Phase B / 夜間ループ)着手時に、cli-pr-monitorgate.rsis_docs_only_summary / is_docs_only_path(ADR-035 path 基準・fail-closed)を lib 切り出しで再利用実装する方針を ADR に明記した。

変更

  • docs/adr/adr-052-autonomy-execution-boundary-classes.md(新規)
  • CLAUDE.md — ADR 一覧に ADR-052 追加
  • docs/harness-improvement-plan.md — WP-10 を実装済、WP-09 を観測中に更新(GitHub Actions バックストップの本稼働・secrets 登録済・スモークテスト成功を反映)

補足

Summary by CodeRabbit

  • ドキュメント
    • 自律実行を「自動実行可」と「人間の承認が必要」の2クラスに分類するADR-052を追加しました。
    • 分類不能な操作は承認必須とする方針、停止機構や実行量制限などの運用ルールを明文化しました。
    • ハーネス改善計画を更新し、PR監視と自律実行境界ポリシーの進捗・完了条件を反映しました。

WP-10: ADR-052 起票。自律 actor 限定で操作を 2 クラス(自動実行可 / ゲート必須)に
事前分類し、分類不能は fail-closed でゲート必須へ(ADR-043)。ADR-028 のゲートを除去
せず commitment 点(ready 化 / マージ)へ移設する 2 段化が本質。Rust 分類関数は呼び手
(自律実行経路)不在のため今回見送り、consumer 着手時に gate.rs の docs-only 判定を lib
切り出しで再利用実装する方針を明記。ADR-039 パターンで試験運用。

- CLAUDE.md の ADR 一覧に ADR-052 追加。
- harness-improvement-plan.md: WP-10 を実装済、WP-09 を観測中(GitHub Actions バック
  ストップが PR #258 でマージ・本稼働、secrets 登録済・スモークテスト成功を反映)に更新。
@coderabbitai

coderabbitai Bot commented Jul 11, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 18004fa3-26b0-42af-bfd8-a7a3ed990bb3

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

ADR-052を追加し、自律 actor の実行境界を2クラスに分類する方針を定義しました。あわせて、ADR索引とハーネス改善計画のWP-09/WP-10の進捗・運用内容を更新しています。

Changes

自律実行境界ポリシー

Layer / File(s) Summary
ADR-052の定義と索引
docs/adr/adr-052-autonomy-execution-boundary-classes.md, CLAUDE.md
自動実行可クラスとゲート必須クラス、分類不能時のfail-closed、commitment点への人間ゲート移設、backpressure・kill-switch・試験運用基準を定義し、ADR一覧へ追加。
ハーネス改善計画との整合
docs/harness-improvement-plan.md
WP-09の監視ワークフロー運用・読み取り専用条件・完了基準と、WP-10のADR-052対応状況およびRust分類関数の後続実装方針を更新。

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-052 の追加と WP-10/ADR-028 の二段化という主要変更を適切に要約しています。
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch wp-10-autonomy-boundary-adr

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/adr/adr-052-autonomy-execution-boundary-classes.md`:
- Around line 107-114: 「bounded
lifetime」の記述を、ステータス日2026-07-11から算出した具体的な期限(少なくとも2026-10-11)に置き換え、期限到来時の判定手順を追加してください。判定結果として採用・改訂・却下を明記し、延長する場合の承認条件と新たな期限、継続しない場合のretirement手順も定義してください。
- Around line 78-84:
「実装スコープ」の方針は維持したまま、原則5にkill-switchの起動経路、停止コマンドまたは設定値、影響範囲、未設定時の既定動作、停止手順を表形式で追記してください。ADR-039準拠に基づき、opt-inの既定OFFとし、背圧またはkill-switchが未接続・不明な場合はfail-closedで全自律動作を停止する契約を明記してください。
🪄 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: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 05fc7d94-8a92-4f01-911b-17f3a9ef8c06

📥 Commits

Reviewing files that changed from the base of the PR and between 8e5258d and 74c4ed0.

📒 Files selected for processing (3)
  • CLAUDE.md
  • docs/adr/adr-052-autonomy-execution-boundary-classes.md
  • docs/harness-improvement-plan.md

Comment on lines +78 to +84
### 原則 5: 背圧・kill-switch との連動

自動実行可クラス(特に draft PR 作成)を背圧なしで運用すると、未マージ draft PR の山を積む。本クラスは**常時性ガード**(未マージ draft が閾値を超えたら自律動作を停止する背圧制御、および全自律動作を止める全体 kill-switch)と**セットで**有効化する。本 ADR は「**何を**自律実行してよいか」を定め、背圧・kill-switch は「**いつ**自主減速・停止するか」を定める。両者は相補で、片方だけでは安全な常時稼働にならない。

## 実装スコープ(2026-07-11 時点)

本 ADR は**ポリシー(decision rule)の確定に閉じ、Rust 分類関数の実装は今回見送る**。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift

kill-switch の起動・停止契約を明文化してください。

ADR-039準拠を宣言していますが、kill-switchの起動経路、停止コマンドまたは設定値、影響範囲、未設定時の既定動作がありません。Rust側の呼び手が未実装でも、将来の実装者がこのポリシーだけを根拠に安全装置なしで有効化できます。opt-inのデフォルトOFF、背圧・kill-switch未接続時のfail-closed動作、停止手順を表形式で追記してください。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/adr/adr-052-autonomy-execution-boundary-classes.md` around lines 78 -
84,
「実装スコープ」の方針は維持したまま、原則5にkill-switchの起動経路、停止コマンドまたは設定値、影響範囲、未設定時の既定動作、停止手順を表形式で追記してください。ADR-039準拠に基づき、opt-inの既定OFFとし、背圧またはkill-switchが未接続・不明な場合はfail-closedで全自律動作を停止する契約を明記してください。

Comment on lines +107 to +114
## 試験運用判断基準(ADR-039)

本 ADR は試験運用とする。呼び手(自律実行経路)が実装された後、以下を観測して本採用/改訂を判断する:

- 自動実行可クラスの操作が意図せず commitment 点(ready 化 / マージ)へ到達しないこと。
- 分類不能ケースが確実にゲート必須へ倒れること(fail-closed 契約)。
- config opt-in + 全体 kill-switch で全自律動作を停止できること。
- **bounded lifetime**: 呼び手が未実装のまま陳腐化リスクを避けるため、自律実行経路の着手が無いまま一定期間(目安 3 か月)が経過したら、本 ADR の前提(2 クラスの粒度・境界)が依然妥当か再評価する。先行設計が実装時の現実と乖離していれば改訂する。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🔒 Security & Privacy | 🟠 Major | ⚡ Quick win

bounded lifetime を具体的な期限と判定手順にしてください。

「目安3か月」では試験期限が拘束されず、試験運用が無期限化します。ステータス日が2026-07-11なので、少なくとも2026-10-11などの明確な期限と、採用・改訂・却下、延長する場合の条件およびretirement手順を定義してください。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/adr/adr-052-autonomy-execution-boundary-classes.md` around lines 107 -
114, 「bounded
lifetime」の記述を、ステータス日2026-07-11から算出した具体的な期限(少なくとも2026-10-11)に置き換え、期限到来時の判定手順を追加してください。判定結果として採用・改訂・却下を明記し、延長する場合の承認条件と新たな期限、継続しない場合のretirement手順も定義してください。

…259 CodeRabbit Major 2件)

- 原則5: 自動実行可クラス有効化の前提となる kill-switch / 背圧の契約を表で明文化
  (opt-in 既定 OFF / 単一フラグ即時停止 / 未接続時 fail-closed / 停止手順)。
- 試験運用判断基準: bounded lifetime を「目安3か月」から 2026-10-11 の再評価期限 +
  採用/改訂/延長/却下の判定手順 + retirement 手順に具体化。

ADR-022 原則5 に従い PR 包含 commit を amend せず child commit として分離。
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