Skip to content

docs(harness-plan): WP-17 節をスリム化し WP-18 を着手可能な状態に改訂 - #360

Merged
aloekun merged 1 commit into
masterfrom
docs/wp17-retire-wp18-ready
Aug 5, 2026
Merged

docs(harness-plan): WP-17 節をスリム化し WP-18 を着手可能な状態に改訂#360
aloekun merged 1 commit into
masterfrom
docs/wp17-retire-wp18-ready

Conversation

@aloekun

@aloekun aloekun commented Aug 5, 2026

Copy link
Copy Markdown
Owner

WP-17 完了 (2026-08-04) に伴う計画書の整理と、WP-18 着手前決定 3 件 (2026-08-05 ユーザー確認) の反映。docs-only (3 ファイル、+74 / -163)。

WP-17 節のスリム化 (151 行 → 45 行)

「設計・決定・検証記録は各 ADR が正」の原則で、役目を終えた作業用情報を削除した: 着手前レビューの前提確認 / PR 分割の詳細手順 (rebase・conflict 指針・restore 前提) / jj 資産の change_id 一覧とチェーン構造 / 2b chain 宣言全文 / 実走スモークの当初計画。

残したもの: 達成内容 1 段落、PR 一覧表 (番号 → 内容 → ADR リンク)、派生 ADR (068/069) の経緯、段 2 の知見 3 点、受け入れ基準の充足表、後続へ引き継ぐ残課題 4 件。

計画書にしか無かった情報 2 件を永続成果物へ切り出し

  • ADR-066: Actions variable の値は true (小文字ちょうど) の完全一致でなければ効かない。exe 側 (1 等も truthy) と workflow 式で受理値が異なる点も明記
  • dev-conventions: 「jj: ファイル編集を始める前に jj new する」convention を新設 (description 済みコミットが @ のままだと jj describe がメッセージを上書きし変更が混入する。WP-17 PR 2 セッションで 3 回発生)

他の候補 (PR 3 の state 継続判断 / chain 宣言初回実測 / ADR-064 検証残移し替え) は既に各 ADR に記録済みで、計画書側は重複だったため切り出し不要と判定した。

WP-18 を「次セッションが本節だけで着手できる」状態へ改訂

着手前決定 3 件 (2026-08-05 ユーザー確認):

  1. 実行主体 = GitHub Actions schedule workflow。ADR-070 の実測 (routine の jj git pushjj-push-guard に阻まれ、hook 例外新設は採用バー超え) により routine 案は劣後。Actions は Phase B と同構造で push が構造的に通る
  2. WP-19 ステップ 2 (背圧) を WP-18 PR 1 へ前倒し統合。ADR-052 原則 5 の契約と lib-autonomy-policybackpressure_connected() = DraftPr => false 固定 (構造的 deny) により、背圧なしでは draft-pr クラスを有効化できない。WP-17 の kill-switch 前倒しと同じ順序問題への同じ対処
  3. タスク台帳 = docs/claude-code-web-tasks.md (旧案の todo-summary 自律実行可列を置き換え)。ephemeral から定期更新台帳へ lifecycle を改訂し、自律実行可の判断は weekly-review と同じタイミングで定期更新する (WP-19 ステップ 3 の監査ループと接続)

PR 構成 (新規 3 本) を明記: PR 1 = 背圧実装 + ADR 起票 (GateInputs への背圧入力追加が必要 — 現状は入力の口自体が無い。SaaS 事実の最新値再確認込み)、PR 2 = タスク台帳ブラッシュアップ (docs)、PR 3 = 夜間 workflow (実走スモーク段を受け入れ基準に含め、WP-17 残課題 2 件 = Phase B 自動起動経路 / bot allowlist の実測を同梱)。

WP-19 は残りが監査ループのみになったことを一覧表とステップ欄の両方へ反映した。

🤖 Generated with Claude Code

Summary by CodeRabbit

  • ドキュメント
    • 自律機能の設定では、AUTONOMY_ENABLED に小文字の true を指定する運用を明記しました。その他の値は停止側として扱われます。
    • jj を使った安全な編集手順と、作業コミットに関する開発規約を追加しました。
    • ハーネス改善計画の進捗、完了項目、今後の作業、未検証事項を整理しました。

@coderabbitai

coderabbitai Bot commented Aug 5, 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 Plus

Run ID: 7afba9b8-7ef2-4495-944f-dd2fa75bca39

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

自律実行の停止条件と jj の作業規約を文書化し、WP-17〜19 の状態、計画、完了記録、残作業を更新した。

Changes

自律運用ドキュメント

Layer / File(s) Summary
停止条件と作業規約
docs/adr/adr-066-autonomy-global-kill-switch.md, docs/dev-conventions.md
workflow 式では AUTONOMY_ENABLED の小文字 true だけを許可することを明記した。ファイル編集前に jj new で作業コミットを作成する規約を追加した。
ハーネス改善計画の状態更新
docs/harness-improvement-plan.md
WP-17 を完了、WP-18 を着手可能、WP-19 を監査ループの残作業として整理した。WP-18 の実行主体、背圧、タスク台帳、3 PR 構成を記録した。

Estimated code review effort: 2 (Simple) | ~10 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 タイトルは、WP-17 節の整理と WP-18 を着手可能な状態への改訂という変更の主要内容を明確に示しています。
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 docs/wp17-retire-wp18-ready

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.

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Monitor 分析 (GitHub Actions バックストップ)

  • トリガー: issue_comment (created) / 実行 run
  • CI: 実行中(rust (ubuntu-latest) / rust (windows-latest) ともに IN_PROGRESS)
  • レビュー状況: CodeRabbit は解析中("Currently processing new changes..." のプレースホルダのみ、findings 未着)。人間レビュー・インライン指摘は 0 件(reviews API / comments API ともに空)
  • Verdict: approved(現時点で applicable findings 0 件のため .takt/facets/instructions/analyze-coderabbit.md Step 4 の「findings 空 → approved」規則に該当。ただし CI・CodeRabbit レビューは未完了であり暫定)

Applicable Findings (Critical / High / Major)

該当なし(レビュー指摘 0 件)

Applicable Findings (Medium 以下)

該当なし

Filtered (not applicable)

該当なし

差分概要(軽量サマリー)

docs-only PR(3 ファイル、コード変更なし)。

File 変更内容
docs/adr/adr-066-autonomy-global-kill-switch.md AUTONOMY_ENABLED の設定値が大文字小文字完全一致でなければならない旨の注記を追加(+2 行のみ)
docs/dev-conventions.md 「jj: ファイル編集を始める前に jj new する」の新規 convention 節を追加(+8 行のみ)
docs/harness-improvement-plan.md WP-17 節(旧: PR 1〜4 の詳細手順・jj change_id 一覧・実走スモーク手順を逐一記載)を「達成内容 + 索引 + 受け入れ基準 + 後続への引き継ぎ課題」の簡潔な形へ大幅圧縮(約 -99 行)。WP-18 を「未着手」→「着手可」に更新し着手前決定 3 件を明記。WP-19 の該当項目も前倒し統合を反映して更新

PR title どおり「WP-17 節のスリム化 + WP-18 着手可能化」の記帳作業であり、実装コードへの影響はない。

次のアクション

  • CI(rust ubuntu/windows)と CodeRabbit レビューの完了を待つ。両方完了後、新規の指摘が出れば再分析対象になる。
  • 現時点で人間側のアクションは不要(ブロッキング要因は mergeStateStatus: BLOCKED だが、これは CI 未完了によるものと見られ、レビュー内容起因ではない)。

@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: 3

🧹 Nitpick comments (1)
docs/harness-improvement-plan.md (1)

167-167: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

採用率の分母と保留状態を定義してください。

Line [167] は「人間がマージした割合」と 50% の閾値だけを定義しています。試験期間末に open の draft PR、却下・close された PR、重複再試行を分母へ含めるかが不明です。このままでは同じ実績から異なる採用率が計算され、継続判断が決定論的になりません。

merged / 判定済み対象 draft PR などの式と、open・却下・重複再試行の扱いを受け入れ基準へ追加してください。

As per coding guidelines, 自動化経路の品質ゲートは決定論的な判定基準を維持する必要があります。

🤖 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/harness-improvement-plan.md` at line 167, 受け入れ基準の採用率定義に、明示的な分母の式(merged
/ 判定済み対象 draft PR)を追加し、試験期間末に open の PR、却下・close された
PR、重複再試行を分母へ含めるか除外するか明記してください。重複再試行の集計単位も定義し、同じ実績から常に同じ継続判断になるよう基準を具体化してください。

Source: Coding guidelines

🤖 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/dev-conventions.md`:
- Around line 80-87: Update the jj editing convention around the description
warning so it prohibits editing an existing description-bearing commit at @, not
any description-bearing @ commit. Keep the required jj new -m workflow and its
rationale consistent with this narrowed prohibition.

In `@docs/harness-improvement-plan.md`:
- Around line 79-81: WP-17 の状態表記を、受け入れ基準と未検証項目の実態に一致させてください。WP-17
の行と関連する状態モデル・受け入れ基準記述を確認し、停止側および自動起動経路などが未検証のままなら `完了` ではなく既存の `観測中`
を使用してください。実装完了と検証中を区別する必要がある場合は、状態モデルに `実装完了・観測中` を定義し、WP-17 の関連記述を一貫して更新してください。
- Around line 161-164: PR 1 の説明を、独立した GateInputs の背圧入力を追加する方針から、判定コアの
Operation::DraftPr
に背圧判定を実装する方針へ更新してください。inputs.operation.backpressure_connected()
の既存契約に沿って、cli-autonomy-gate と計画の判定経路を単一化し、GateInputs に重複する背圧状態を追加しない内容にしてください。

---

Nitpick comments:
In `@docs/harness-improvement-plan.md`:
- Line 167: 受け入れ基準の採用率定義に、明示的な分母の式(merged / 判定済み対象 draft PR)を追加し、試験期間末に open の
PR、却下・close された
PR、重複再試行を分母へ含めるか除外するか明記してください。重複再試行の集計単位も定義し、同じ実績から常に同じ継続判断になるよう基準を具体化してください。
🪄 Autofix

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 Plus

Run ID: 8d367ff4-bb61-4234-ab5b-f50ead19276b

📥 Commits

Reviewing files that changed from the base of the PR and between b27a2c7 and e17f14a.

📒 Files selected for processing (3)
  • docs/adr/adr-066-autonomy-global-kill-switch.md
  • docs/dev-conventions.md
  • docs/harness-improvement-plan.md

Comment thread docs/dev-conventions.md
Comment on lines +80 to +87
## jj: ファイル編集を始める前に `jj new` する

**description を持つコミットが `@` の状態でファイルを編集しない。** 必ず先に `jj new -m "wip: <内容>"` で新しい作業コミットを作ってから編集を始める。

理由: jj は working copy をそのままコミットへ反映するため、description 済みコミットが `@` のままだと編集内容がそのコミットへ吸収される。その後 `jj describe` を実行すると**既存コミットのメッセージが上書きされ**、意図しない変更が既存コミットへ混入した状態で push されうる。push-runner のレビュー範囲は `master..@` なので混入自体はレビュー対象に入るが、「どのコミットの変更か」がずれた状態は後から追いにくい。

**由来** (2026-08-02 WP-17 PR 2 の実装セッション): 同一セッション中に 3 回発生した。関連して、同セッションでは `pnpm push` を timeout 600000ms + background で実行する ([ADR-016](adr/adr-016-long-running-command-strategy.md))、PR 作成・マージはユーザー承認を得る ([ADR-028](adr/adr-028-pnpm-create-pr-gate.md)) も併せて運用している。VSCode では AskUserQuestion の preview や同一ターンに出した本文が見えないことがあるため、**PR 本文の draft はツール呼び出しを伴わない単独メッセージで提示する**。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

禁止対象を「既存コミット」に限定してください。

Line [80] は、description を持つ @ の編集を禁止します。Line [82] は、jj new -m を実行してから編集するよう指定します。しかし jj new -m の直後も、新しい @ は description を持ちます。このため、規約を文字どおり実行できません。

「既存の description 済みコミット」を禁止対象にしてください。これにより、jj new -m による作業コミット作成と禁止事項が一致します。

修正例
-**description を持つコミットが `@` の状態でファイルを編集しない。**
+**既存の description 済みコミットが `@` の状態でファイルを編集しない。**
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
## jj: ファイル編集を始める前に `jj new` する
**description を持つコミットが `@` の状態でファイルを編集しない。** 必ず先に `jj new -m "wip: <内容>"` で新しい作業コミットを作ってから編集を始める。
理由: jj は working copy をそのままコミットへ反映するため、description 済みコミットが `@` のままだと編集内容がそのコミットへ吸収される。その後 `jj describe` を実行すると**既存コミットのメッセージが上書きされ**、意図しない変更が既存コミットへ混入した状態で push されうる。push-runner のレビュー範囲は `master..@` なので混入自体はレビュー対象に入るが、「どのコミットの変更か」がずれた状態は後から追いにくい。
**由来** (2026-08-02 WP-17 PR 2 の実装セッション): 同一セッション中に 3 回発生した。関連して、同セッションでは `pnpm push` を timeout 600000ms + background で実行する ([ADR-016](adr/adr-016-long-running-command-strategy.md))、PR 作成・マージはユーザー承認を得る ([ADR-028](adr/adr-028-pnpm-create-pr-gate.md)) も併せて運用している。VSCode では AskUserQuestion の preview や同一ターンに出した本文が見えないことがあるため、**PR 本文の draft はツール呼び出しを伴わない単独メッセージで提示する**
## jj: ファイル編集を始める前に `jj new` する
**既存の description 済みコミットが `@` の状態でファイルを編集しない。** 必ず先に `jj new -m "wip: <内容>"` で新しい作業コミットを作ってから編集を始める。
理由: jj は working copy をそのままコミットへ反映するため、description 済みコミットが `@` のままだと編集内容がそのコミットへ吸収される。その後 `jj describe` を実行すると**既存コミットのメッセージが上書きされ**、意図しない変更が既存コミットへ混入した状態で push されうる。push-runner のレビュー範囲は `master..@` なので混入自体はレビュー対象に入るが、「どのコミットの変更か」がずれた状態は後から追いにくい。
**由来** (2026-08-02 WP-17 PR 2 の実装セッション): 同一セッション中に 3 回発生した。関連して、同セッションでは `pnpm push` を timeout 600000ms + background で実行する ([ADR-016](adr/adr-016-long-running-command-strategy.md))、PR 作成・マージはユーザー承認を得る ([ADR-028](adr/adr-028-pnpm-create-pr-gate.md)) も併せて運用している。VSCode では AskUserQuestion の preview や同一ターンに出した本文が見えないことがあるため、**PR 本文の draft はツール呼び出しを伴わない単独メッセージで提示する**
🤖 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/dev-conventions.md` around lines 80 - 87, Update the jj editing
convention around the description warning so it prohibits editing an existing
description-bearing commit at @, not any description-bearing @ commit. Keep the
required jj new -m workflow and its rationale consistent with this narrowed
prohibition.

Comment thread docs/harness-improvement-plan.md Outdated
Comment on lines +79 to +81
| WP-17 | 4 | イベント駆動バックボーン完成(Phase B + routines 移行 + 全体 kill-switch 前倒し) | M-L | WP-09, 10, 11 | **完了(2026-08-04)** — 全 PR land 済(#347 / #350 / #351 / #352 / #353 / #354、実走バグ修正 #356 / #357 / #358、記帳 #359)。実走スモーク段 0〜2 まで完走し受け入れ基準を充足。停止側の実走 2 点と自動起動経路は残課題(→ § WP-17)。派生 ADR: [ADR-068](adr/adr-068-fix-step-authority-boundary.md) #348 / [ADR-069](adr/adr-069-pr-chain-declaration.md) #349 |
| WP-18 | 4 | 夜間 todo 消化ループ | M-L | WP-15, 17 | **着手可** — 着手前決定 3 件確定済み(2026-08-05 ユーザー確認 → § WP-18)。実行主体 = GitHub Actions schedule、背圧(WP-19 ステップ 2)を PR 1 へ前倒し統合、タスク台帳 = [claude-code-web-tasks.md](claude-code-web-tasks.md) |
| WP-19 | 4 | 常時性ガード(自主減速 / 監査ループ。全体 kill-switch は WP-17 PR 1、背圧は WP-18 PR 1 へ前倒し) | S-M | WP-18 | 未着手(残りは監査ループのみ) |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

WP-17 の状態を受け入れ基準と一致させてください。

Line [79] は WP-17 を 完了 とし、受け入れ基準を充足したと記載します。しかし Line [142]-[143] は一部基準を 部分充足 / 未検証 とし、Line [147]-[148] も停止側と自動起動経路を未検証としています。さらに Line [12] の状態モデルでは 観測中完了 より前です。

未検証項目を完了条件に含める場合は、状態を 観測中 にしてください。実装完了だけを示す場合は、実装完了・観測中 などの状態を定義してください。

🤖 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/harness-improvement-plan.md` around lines 79 - 81, WP-17
の状態表記を、受け入れ基準と未検証項目の実態に一致させてください。WP-17
の行と関連する状態モデル・受け入れ基準記述を確認し、停止側および自動起動経路などが未検証のままなら `完了` ではなく既存の `観測中`
を使用してください。実装完了と検証中を区別する必要がある場合は、状態モデルに `実装完了・観測中` を定義し、WP-17 の関連記述を一貫して更新してください。

Comment on lines +161 to +164
- **PR 構成(新規 3 本)**:
1. **PR 1: 背圧実装 + ADR 起票(M)** — `GateInputs` へ背圧入力を追加(現状は `repo_config_enabled` / `external_raw` / `operation` の 3 つだけで背圧の口が無い)、未マージ draft PR 数(`claude/` prefix)の決定論取得(workflow step の `gh api`、閾値は WP-19 ステップ 2 の「3 件以上で停止」を初期値に)、`backpressure_connected()` の flip、drill 実測。ADR 起票は [ADR-039](adr/adr-039-experimental-feature-standard-pattern.md) 3 点セット + **§ 3 の SaaS 課金・上限事実を最新値へ再確認して永続化**(本ファイル退役条件 2 の移管義務)。
2. **PR 2: タスク台帳のブラッシュアップ(docs、S)** — [claude-code-web-tasks.md](claude-code-web-tasks.md) の stale 行検証(land 済みタスクの除去)、無人実行可マークの追加(Web 実行可 = 人間が対話で補助できる、無人可 = 補助なしで完結、の 2 段階。最初は 5〜10 件だけ人間がマーク)、lifecycle を ephemeral から定期更新台帳へ改訂、weekly-review パイプラインへ台帳更新手順を接続。
3. **PR 3: 夜間 workflow(schedule、M-L)** — タスク選択(台帳の機械判定・fail-closed)→ 実装 → `cargo test` 検証 → draft PR 作成。**push / PR 作成は workflow step が gate(`cli-autonomy-gate --operation draft-pr`)経由で実行し、agent は push の主体にしない**(ADR-067 と同型)。**実走スモーク段を受け入れ基準に含める**([dev-conventions](dev-conventions.md) § LLM を含む自動化経路は実走でしか検証できない)。スモークで WP-17 残課題 2 件(Phase B 自動起動経路の実測 / `coderabbitai[bot]` allowlist 要否)も同梱観測する(ADR-067 § 検証記録に「WP-18 着手時に実測」と記帳済み)。

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

rg -n -C 8 \
  'backpressure_connected|struct GateInputs|operation:|enum Operation' \
  src/lib-autonomy-policy src/cli-autonomy-gate

Repository: aloekun/claude-code-hook-test

Length of output: 11404


🌐 Web query:

GitHub aloekun claude-code-hook-test ADR-052 backpressure Operation backpressure_connected DraftPr

💡 Result:

The terms and references provided relate to development, testing, and architectural decision-making within the Claude Code and associated agent-plugin ecosystems. 1. claude-code-hook-test: This is a repository used for testing Claude Code hooks [1]. Developers use tools like test-hook.sh to validate hook behavior—such as exit codes and JSON output—under controlled conditions [2]. 2. ADR-052: While ADR (Architecture Decision Record) numbering can vary by project, in several observed agentic development contexts (e.g., ruflo and windyroad/agent-plugins), ADR-052 is specifically associated with statusline observability systems or standardizing agent behavioral contracts [3][4][5]. It is used to ensure consistency across plugin implementations, such as defining how "pre-session" environment variables behave or how hooks report status [3]. 3. Backpressure and Operation: Backpressure in this context typically refers to handling deadlocks or flow-control issues within the agent's hook-execution lifecycle [6][7]. A known issue exists where Claude Code hooks (specifically Stop, PreToolUse, and PostToolUse) can hang indefinitely when writing large payloads to stdout, as the parent process fails to drain the pipe buffer [6]. The term "backpressure_connected" is often discussed in the context of implementing robust IPC (Inter-Process Communication) and ensuring that agent channels do not drop notifications while the main event loop is blocked by a running hook [8][7]. 4. DraftPr: This appears to be a reference to standard GitHub workflow automation, where developers use "Draft PRs" to signal work-in-progress code, particularly when implementing complex changes like backpressure contracts or new ADR-compliant hooks [9].

Citations:


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== docs/harness-improvement-plan.md relevant lines =="
nl -ba docs/harness-improvement-plan.md | sed -n '155,170p'

echo
echo "== docs ADR-052 references =="
rg -n -C 4 'ADR-052|原則 5|背圧|backpressure|backpressure_connected|Operation|DraftPr|FixPush' docs src docs/adr 2>/dev/null | head -n 220

echo
echo "== docs/adr files =="
git ls-files docs/adr | sed -n '1,200p'

Repository: aloekun/claude-code-hook-test

Length of output: 261


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "== docs/harness-improvement-plan.md relevant lines =="
awk '{printf "%6d\t%s\n", NR, $0}' docs/harness-improvement-plan.md | sed -n '155,170p'

echo
echo "== docs ADR-052 references =="
grep -RIn -C 4 'ADR-052|原則 5|背圧|backpressure|backpressure_connected|Operation|DraftPr|FixPush' docs src docs/adr 2>/dev/null | head -n 220

echo
echo "== docs/adr files =="
git ls-files docs/adr | sed -n '1,200p'

Repository: aloekun/claude-code-hook-test

Length of output: 2894


PR 1 の背圧実装対象を判定コアと合わせてください。

Operation::backpressure_connected()DraftPr ごとに backpressure を担うため、WP-18 が実装することは Operation::DraftPr の判定を更新する方針です。GateInputs の別フィールドで同じ背圧状態を持つと、cli-autonomy-gate と計画上の判定経路が二重管理され、分岐する可能性があります。現状の struct GateInputsinputs.operation.backpressure_connected() の契約に合う説明に修正してください。

🤖 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/harness-improvement-plan.md` around lines 161 - 164, PR 1 の説明を、独立した
GateInputs の背圧入力を追加する方針から、判定コアの Operation::DraftPr
に背圧判定を実装する方針へ更新してください。inputs.operation.backpressure_connected()
の既存契約に沿って、cli-autonomy-gate と計画の判定経路を単一化し、GateInputs に重複する背圧状態を追加しない内容にしてください。

@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

🤖 PR Monitor 分析 (GitHub Actions バックストップ)

  • トリガー: pull_request_review (submitted) / 実行 run
  • CI: rust (ubuntu-latest) pass / rust (windows-latest) pass / CodeRabbit review completed(pass)。本 workflow 自身の analyze job は実行中(自己参照のため対象外)
  • レビュー状況: CodeRabbit が pull_request_review (COMMENTED) を新規投稿(2026-08-05T09:01:55Z、Actionable comments 3 件 + nitpick 1 件)。人間レビューは 0 件(reviewDecision 空)
  • Verdict: needs_fix(Major 1 件を含む applicable findings あり)

Applicable Findings (Critical / High / Major)

# File (Line) Reviewer Issue Recommended Action
1 docs/harness-improvement-plan.md (79-81) CodeRabbit WP-17 の状態を「完了」と記載しているが、同ファイル内の受け入れ基準表(142-148 行付近)は一部を「部分充足」「未検証」としており矛盾。状態モデル上も 観測中完了 より前 未検証項目を残すなら状態を 観測中 に戻すか、「実装完了・観測中」等の中間状態を状態モデルへ定義して WP-17 記述と整合させる

Applicable Findings (Medium 以下)

# File (Line) Reviewer Issue Recommended Action
2 docs/dev-conventions.md (80-87) CodeRabbit (Minor) jj convention の禁止対象が「description を持つコミットが @」全般となっており、jj new -m 直後の新規コミットも description を持つため文言どおりには実行不能な自己矛盾 「既存の description 済みコミット」に限定する文言へ修正(CodeRabbit の committable suggestion をそのまま適用可)
3 docs/harness-improvement-plan.md (161-164) CodeRabbit (Minor) WP-18 PR1 の背圧実装方針を「GateInputs へ新規背圧入力を追加」と記載しているが、実コード(src/lib-autonomy-policy/src/decision.rs)では既に Operation::backpressure_connected() が判定コアの契約として存在し、DraftPr => false の fail-closed placeholder を反転させる設計(コード内コメントにも明記)。docs 記述どおりに実装すると背圧状態が二重管理になりうる(実コードで契約確認済み、false positive ではない) 記述を「Operation::DraftPrbackpressure_connected()true へ反転する」方針に修正し、GateInputs への重複フィールド追加を避ける
4 docs/harness-improvement-plan.md (167) CodeRabbit (nitpick, Trivial) WP-18 受け入れ基準の「採用率」の分母定義が未確定(試験期間末の open / 却下・close / 重複再試行を含めるか不明)で、同じ実績から異なる採用率が計算されうる 分母の式(例: merged / 判定済み対象 draft PR)と保留状態の扱いを受け入れ基準へ明記

Filtered (not applicable)

該当なし(4 件とも docs-only PR (ADR-035) におけるクロスリファレンス整合性・自己矛盾の指摘であり、除外基準(mutation/error handling/test coverage 等のコードロジック観点)に該当しない。#3 は実コード(decision.rs)で契約を確認済みで誤認ではない)

次のアクション

WP-17 完了 (2026-08-04) に伴う計画書の整理と、WP-18 着手前決定 3 件 (2026-08-05
ユーザー確認) の反映。docs-only。

## WP-17 節のスリム化 (151 行 → 45 行)

設計・決定・検証記録は各 ADR が正、という原則で作業用情報を削除した:
着手前レビューの前提確認 / PR 分割の詳細手順 (rebase・conflict 指針・restore 前提) /
jj 資産の change_id 一覧とチェーン構造 / 2b chain 宣言全文 / 実走スモークの当初計画。

残したもの: 達成内容 1 段落、PR 一覧表 (番号 → 内容 → ADR)、派生 ADR (068/069) の経緯、
段 2 の知見 3 点、受け入れ基準の充足表、後続へ引き継ぐ残課題 4 件。

## 計画書にしか無かった情報 2 件を永続成果物へ切り出し

- ADR-066: Actions variable の値は `true` (小文字ちょうど) の完全一致でなければ効かない。
  exe 側 (`1` 等も truthy) と workflow 式で受理値が異なる点も明記
- dev-conventions: 「jj: ファイル編集を始める前に `jj new` する」convention を新設
  (description 済みコミットが @ のままだと jj describe がメッセージを上書きし変更が混入。
  WP-17 PR 2 セッションで 3 回発生)

他の候補 (PR 3 の state 継続判断 / chain 宣言初回実測 / ADR-064 検証残移し替え) は
既に各 ADR に記録済みで、計画書側は重複だったため切り出し不要と判定した。

## WP-18 を「次セッションが本節だけで着手できる」状態へ改訂

着手前決定 3 件 (2026-08-05 ユーザー確認):

1. 実行主体 = GitHub Actions schedule workflow。ADR-070 の実測 (routine の jj git push は
   jj-push-guard に阻まれ、hook 例外新設は採用バー超え) により routine 案は劣後。
   Actions は Phase B と同構造で push が構造的に通る
2. WP-19 ステップ 2 (背圧) を WP-18 PR 1 へ前倒し統合。ADR-052 原則 5 の契約と
   lib-autonomy-policy の backpressure_connected() = DraftPr => false 固定 (構造的 deny)
   により、背圧なしでは draft-pr クラスを有効化できない。WP-17 の kill-switch 前倒しと
   同じ順序問題への同じ対処
3. タスク台帳 = docs/claude-code-web-tasks.md (旧案の todo-summary 自律実行可列を置き換え)。
   ephemeral から定期更新台帳へ lifecycle を改訂し、自律実行可の判断は weekly-review と
   同じタイミングで定期更新する (WP-19 ステップ 3 の監査ループと接続)

PR 構成 (新規 3 本) を明記: PR 1 = 背圧実装 + ADR 起票 (GateInputs への背圧入力追加が必要
— 現状は入力の口自体が無い。SaaS 事実の最新値再確認込み)、PR 2 = タスク台帳ブラッシュ
アップ (docs)、PR 3 = 夜間 workflow (実走スモーク段を受け入れ基準に含め、WP-17 残課題
2 件 = Phase B 自動起動経路 / bot allowlist の実測を同梱)。

WP-19 は残りが監査ループのみになったことを一覧表とステップ欄の両方へ反映した。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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