docs: ハーネス改善計画をスリム化し WP-15 系決定を ADR-063/064 へ切り出し - #340
Conversation
- ADR-063 新規: Linux 可搬性レイヤ + nightly release + cloud-setup (WP-15 本体の設計決定群を永続化) - ADR-064 新規: PR 監視 success 判定の陽性証拠要求 (WP-15 追補のレート制限 silent success 排除設計を永続化) - harness-improvement-plan.md を 361 行 → 約 130 行に削減: 完了/見送り WP の詳細記録を削除し、残作業 (WP-11 enforce 昇格 / WP-15 追補 park 実観測) と未着手 WP-16〜19 のみ記載 - WP 状態更新: WP-03/09/13/14 完了 (dogfood 達成確認)、WP-06 完了 (ADR-047 却下・撤去済の反映)、WP-07/08/10 完了 (知見 ADR 移管済)、WP-12/15 完了 (ADR-062/060 の機構へ委譲) - 永続成果物 6 箇所 (ADR-005/047/048/049/055 + dev-conventions.md) の plan ファイル名参照を除去し退役条件 3 を先行達成 - CLAUDE.md の ADR index に 063/064 を追加 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughLinux 可搬性とバイナリ配布を ADR-063 に記録しました。レート制限時の監視成功判定を ADR-064 に記録しました。計画文書と既存 ADR の参照表記も整理しました。 Changes文書化と計画整理
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
🤖 PR Monitor 分析 (GitHub Actions バックストップ)
Applicable Findings (Critical / High / Major)(該当なし — レビュー指摘が 1 件も無いため) Applicable Findings (Medium 以下)(該当なし) Filtered (not applicable)(該当なし) Diff 概要 (軽量サマリー)
次のアクション
|
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/harness-improvement-plan.md (1)
127-136: 🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win退役条件と WP-18 の例外を一致させてください。
Lines 129-131 は、全 WP が
完了または見送りであることを削除条件にしています。
一方、Line 136 は WP-18 の dogfood 期間が残っていても、観測タスクを todo へ移管すれば削除できるとしています。WP-18 の状態を完了または見送りに更新する条件が明記されていないため、削除条件が矛盾します。観測タスクの移管後に WP-18 の状態を更新する条件を追加してください。
修正例
-dogfood 期間(WP-18: 2 週間)が残っている場合、実装完了後に本ファイルを即削除せず、観測タスクを todo へ移管したうえで削除してもよい。 +dogfood 期間(WP-18: 2 週間)が残っている場合、観測タスクを todo へ移管し、全体像の WP-18 を `完了` に更新したうえで、本ファイルを削除してもよい。🤖 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 127 - 136, 「完了条件と退役手順」の WP-18 例外に、観測タスクを todo へ移管した後、WP-18 の状態を `完了` または理由と移管先を記録した `見送り` に更新してから削除する条件を追加してください。既存の全 WP 状態要件と、dogfood 期間中でも削除できる例外の整合性を保ってください。
🧹 Nitpick comments (1)
docs/adr/adr-063-linux-portability-release-binaries.md (1)
58-66: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick win成果物の整合性ポリシーを明記してください。
scripts/cloud-setup.shは、.sha256を取得できない場合やsha256sumが無い場合も、検証を skip して展開を続けます。ADR は素の HTTPS と fail-closed を記録していますが、この例外を記録していません。checksum または署名を必須にするなら、欠落時に setup を失敗させてください。HTTPS のみを信頼境界とするなら、その判断を ADR に明記してください。
提示された
scripts/cloud-setup.shの取得処理を根拠にしています。🤖 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-063-linux-portability-release-binaries.md` around lines 58 - 66, ADR-063 のセットアップ方針に、成果物整合性検証の扱いを明記してください。scripts/cloud-setup.sh の実装に合わせ、.sha256 または sha256sum が欠落した場合に検証をスキップして続行する現行仕様を記録するか、checksum/署名を必須化して欠落時に setup を失敗させるよう取得処理を更新してください。
🤖 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/harness-improvement-plan.md`:
- Line 62: Update the WP-02 row in the work-plan table to include the todo
transfer destination priority number required by the Line 12 convention,
alongside its existing deferral reason and ADR-046 reference. If WP-02 has no
transfer destination, document that exception in the Line 12 convention and mark
the row accordingly.
- Line 5: Update the WP-14 documentation and retirement-condition references so
they explicitly identify its permanent migration destination and confirm that it
satisfies the allowed ADR, TODO, or ~/.claude/rules/ requirement; if the current
crate doc and commit message are insufficient, record WP-14 in an approved
persistent artifact and keep the surrounding migration summary consistent.
- Around line 33-45: Move the external SaaS limits documented in the GitHub
Actions and Claude execution-path section into permanent documentation,
following the external SaaS limits checklist in docs/dev-conventions.md.
Preserve the details for Actions pricing, Claude Max usage, routine daily caps,
webhook rate limits, authentication requirements, and relevant platform
constraints, placing each in an appropriate permanent document rather than
relying on the retiring plan.
---
Outside diff comments:
In `@docs/harness-improvement-plan.md`:
- Around line 127-136: 「完了条件と退役手順」の WP-18 例外に、観測タスクを todo へ移管した後、WP-18 の状態を `完了`
または理由と移管先を記録した `見送り` に更新してから削除する条件を追加してください。既存の全 WP 状態要件と、dogfood
期間中でも削除できる例外の整合性を保ってください。
---
Nitpick comments:
In `@docs/adr/adr-063-linux-portability-release-binaries.md`:
- Around line 58-66: ADR-063
のセットアップ方針に、成果物整合性検証の扱いを明記してください。scripts/cloud-setup.sh の実装に合わせ、.sha256 または
sha256sum が欠落した場合に検証をスキップして続行する現行仕様を記録するか、checksum/署名を必須化して欠落時に setup
を失敗させるよう取得処理を更新してください。
🪄 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 Plus
Run ID: aabd6274-d36b-4c6e-a582-f92722cfd29f
📒 Files selected for processing (10)
CLAUDE.mddocs/adr/adr-005-hooks-path-resolution-with-template.mddocs/adr/adr-047-prepush-refute-facet.mddocs/adr/adr-048-facet-findings-handoff-markdown-contract.mddocs/adr/adr-049-incident-eval-regression-suite.mddocs/adr/adr-055-firing-telemetry-collection.mddocs/adr/adr-063-linux-portability-release-binaries.mddocs/adr/adr-064-monitor-success-positive-evidence.mddocs/dev-conventions.mddocs/harness-improvement-plan.md
|
|
||
| > **位置付け**: ephemeral 計画書。本ファイルの最終目標は、記載された全 WP(作業パッケージ)を完了し、知識を永続成果物(ADR / todo / rules)へ移管したうえで、**本ファイル自身を削除すること**である。永続成果物(ADR 等)から本ファイルへリンクを張ってはならない(Cross-File Reference Lifecycle: 参照は permanent → ephemeral の方向のみ禁止対象)。削除条件と手順は末尾「完了条件と退役手順」を参照。 | ||
| > | ||
| > **2026-08-01 スリム化**: 完了・見送り WP の詳細記録は各 ADR へ移管済みのため本ファイルから削除した(WP-15 本体 → [ADR-063](adr/adr-063-linux-portability-release-binaries.md)、WP-15 追補 → [ADR-064](adr/adr-064-monitor-success-positive-evidence.md) を新規起票。その他は「全体像」表の ADR 参照先を見よ)。本ファイルには残作業のみを記載する。 |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
WP-14 の永続移管先を明記してください。
Line 5 は、完了・見送り済み WP の詳細が各 ADR へ移管済みと説明しています。
しかし Line 74 は、WP-14 に新規 ADR はなく、crate doc と commit message に記録したと説明しています。
Line 132 の退役条件は、ADR、todo、または ~/.claude/rules/ への移管を要求しています。
WP-14 の移管先が退役条件を満たすことを明記するか、許可された永続成果物へ記録してください。
修正例
-> **2026-08-01 スリム化**: 完了・見送り WP の詳細記録は各 ADR へ移管済みのため本ファイルから削除した。
+> **2026-08-01 スリム化**: 完了・見送り WP の詳細記録は永続成果物へ移管済みのため本ファイルから削除した。WP-14 の移管先は各 crate doc などの永続成果物として明記する。🤖 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 5, Update the WP-14 documentation
and retirement-condition references so they explicitly identify its permanent
migration destination and confirm that it satisfies the allowed ADR, TODO, or
~/.claude/rules/ requirement; if the current crate doc and commit message are
insufficient, record WP-14 in an approved persistent artifact and keep the
surrounding migration summary consistent.
| ### GitHub Actions 課金(GitHub 公式 docs で確認済み) | ||
|
|
||
| - **public リポジトリ + standard GitHub-hosted runner の Actions 実行は完全無料・回数無制限**。2,000 分/月(Free)の枠は private リポジトリにのみ適用される。原文: "GitHub Actions usage is free for self-hosted runners and for public repositories that use standard GitHub-hosted runners." | ||
| - 分数計算は **job 単位で分未満切り上げ**("GitHub rounds the minutes and partial minutes each job uses up to the nearest whole minute.")。private 化した場合のみ関係する。 | ||
| - runner 単価は Linux が最安(Windows 約 2 倍、macOS 約 10 倍)。 | ||
| - セルフホストランナーは分数無料だが、**public リポジトリでの利用は fork PR からの任意コード実行リスクがあり GitHub 非推奨**。private 化とセットでのみ検討。 | ||
| - **public リポジトリ + standard GitHub-hosted runner の Actions 実行は完全無料・回数無制限**。2,000 分/月(Free)の枠は private リポジトリにのみ適用される。 | ||
| - runner 単価は Linux が最安(Windows 約 2 倍、macOS 約 10 倍)。private 化した場合のみ関係する。 | ||
|
|
||
| ### Claude 側の実行経路(公式 docs で確認済み) | ||
|
|
||
| - **claude-code-action** は `CLAUDE_CODE_OAUTH_TOKEN`(ローカルで `claude setup-token` を実行して生成。Pro/Max ユーザー対応)での認証をサポート。API キー従量課金なしで **Max 枠内**で動く。 | ||
| - **cloud routines**(claude.ai/code/routines)は Anthropic 管理インフラで実行され、使用量は "Routines draw down subscription usage the same way interactive sessions do"(= Max 枠消費)。**アカウント毎の 1 日あたり run 数上限**あり。one-off run は daily cap の対象外。 | ||
| - **cloud routines**(claude.ai/code/routines)は Anthropic 管理インフラで実行され、使用量は Max 枠消費。**アカウント毎の 1 日あたり run 数上限**あり。one-off run は daily cap の対象外。 | ||
| - routines の **GitHub トリガー**は Claude GitHub App の webhook 経由で、**GitHub Actions の分数を一切消費しない**。webhook イベントには per-routine / per-account の時間あたり上限あり(超過分は破棄)。research preview のため仕様変動に注意。 | ||
| - routines の GitHub トリガーには **Claude GitHub App のインストールが必須**(`/web-setup` だけでは不足)。また `/schedule` はクラウドセッション内からは使えないため、routine の作成・編集は claude.ai/code/routines の Web UI で行う。 | ||
| - routine run の緑ステータスは「インフラエラーなし」の意味であり**タスク成功を意味しない**。transcript の確認が必要。 | ||
| - クラウドセッションのプラットフォーム制約(セットアップスクリプトの実行タイミング・fresh clone 挙動・hooks の snapshot 登録)は [ADR-060](adr/adr-060-cloud-harness-sessionstart-dispatcher.md) の実測(2026-07-25/26)が最新。本節より新しい事実はそちらを正とする。 |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
pattern='GitHub Actions|2,000|回数無制限|Max|daily cap|rate limit|webhook|無料|上限'
matches="$(
rg -n --glob '*.md' "$pattern" docs |
grep -v '^docs/harness-improvement-plan\.md:' || true
)"
if [[ -z "$matches" ]]; then
echo "永続成果物に外部 SaaS 上限の記録が見つかりません。" >&2
exit 1
fi
printf '%s\n' "$matches"Repository: aloekun/claude-code-hook-test
Length of output: 20168
🏁 Script executed:
#!/usr/bin/env bash
set -euo pipefail
echo "== docs/harness-improvement-plan.md relevant lines =="
sed -n '1,80p' docs/harness-improvement-plan.md
echo
echo "== references to ADR-063 and ADR-064 in docs (excluding harness plan if present) =="
rg -n 'ADR-?06[34]|adr-06[34]|063|064|外部 SaaS|無料枠 / 制限|無料枠 / 上限|free tier|free tier|GitHub Actions|Claude Max|daily cap|webhook rate limit|webhook rate|routine'|rg -n 'GitHub Actions|Max|daily cap|webhook rate limit|webhook rate|routine|2,000|回数無制限|無料' docs --glob '*.md' | grep -v '^docs/harness-improvement-plan\.md:' || true
echo
echo "== list candidate ADR docs =="
fd -i 'adr-06[0-9]-(.*|).md|adr-06[0-9][_a-zA-Z0-9 -].md' docs/adr -t f 2>/dev/null | sortRepository: aloekun/claude-code-hook-test
Length of output: 13459
外部 SaaS の上限調査を ADR-063 / ADR-064 以外の永続成果物へ移管してください。
この計画書は退役時に削除されます。Lines 33-45 の GitHub Actions 無料枠、Claude Max 枠、routine daily cap、webhook rate limit は、提示された ADR-063 / ADR-064 の範囲外です。docs/dev-conventions.md 外部 SaaS 無料枠 / 制限の調査チェックリストに従って、永久文書へ各上限を明文化中してください。
🤖 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 33 - 45, Move the external
SaaS limits documented in the GitHub Actions and Claude execution-path section
into permanent documentation, following the external SaaS limits checklist in
docs/dev-conventions.md. Preserve the details for Actions pricing, Claude Max
usage, routine daily caps, webhook rate limits, authentication requirements, and
relevant platform constraints, placing each in an appropriate permanent document
rather than relying on the retiring plan.
Source: Coding guidelines
| | WP-14 | 3 | PowerShell 3 本の Rust 化 | S-M ×2 | なし | 実装済(3 本すべて Rust 化: fix-metrics-check→comment-lint `--fix-metrics-check` / prepare-pr-body→cli-pr-monitor サブコマンド / analyze-takt-timings→新規 cli-takt-timings crate。cargo test カバレッジ下・実データで旧 ps1 と出力一致確認。`完了` は初回 push/PR で fix step metrics-check と prepare-pr-body 経路の実走確認後) | | ||
| | WP-15 | 3 | Linux バイナリビルド + クラウド setup script | M | WP-13, 14 | 実装済(release-binaries.yml〔master push → rolling `nightly` prerelease に単一 tarball〕+ scripts/cloud-setup.sh 新設。前提として Linux 実行時に壊れる可搬性欠陥を修正: `cmd /c` 決め打ちの唯一の shell spawn 点を `shell_command`〔Windows=cmd /c / 他=sh -c〕へ集約、taskkill のみだった timeout kill に unix 分岐、cmd.exe 構文テストの OS 中立化、config の `.exe`/backslash 依存を `{{CLAUDE_DIR}}`/`{{EXE_SUFFIX}}` 展開へ。**WSL Ubuntu 24.04 で実測**: cargo test --workspace 全 pass・ignored 含め全 pass・clippy clean・hooks 実発火・push pipeline が sh -c 経路で完走。Linux 実測により lock の同時取得レース〔8 中 6 取得〕も発見・修正。`完了` は release 実生成 + 実クラウドセッションでの cloud-setup.sh 実走確認後) | | ||
| | WP-01 | 1-A | ローカル LLM レビュアー選定スパイク | S-M | なし | 見送り([ADR-046](adr/adr-046-local-llm-review-spike.md)。GPU 再calibration → 順位 255) | | ||
| | WP-02 | 1-A | `local_review` stage 実装 | M | WP-01 | 見送り(WP-01 前提不成立、ADR-046 で却下) | |
There was a problem hiding this comment.
🗄️ Data Integrity & Integration | 🟡 Minor | ⚡ Quick win
WP-02 の todo 移管先を記録してください。
Line 12 は、見送り の WP に理由と todo 移管先の順位番号を記録する規約を定めています。
Line 62 の WP-02 には理由と ADR-046 だけがあり、順位番号がありません。
実際の移管先順位を追加してください。移管先がない場合は、その例外を 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` at line 62, Update the WP-02 row in the
work-plan table to include the todo transfer destination priority number
required by the Line 12 convention, alongside its existing deferral reason and
ADR-046 reference. If WP-02 has no transfer destination, document that exception
in the Line 12 convention and mark the row accordingly.
🤖 PR Monitor 分析 (GitHub Actions バックストップ)
Applicable Findings (Critical / High / Major)(該当なし — Critical/High/Major の指摘なし) Applicable Findings (Medium 以下)
Filtered (not applicable)(該当なし — 全 5 件が docs-only PR (ADR-035) のクロスリファレンス整合性・プロジェクト固有規約〔dev-conventions.md〕への言及であり、ADR と矛盾せず適用対象と判定) 次のアクション
|
…2 todo 移管先記録 - L5 スリム化注記: 「各 ADR へ移管済み」を「永続成果物へ移管済み」に正確化し、WP-14 の永続記録 (各 crate doc + commit message) を明記 - §2 冒頭に注記追加: 外部 SaaS の課金・上限事実は WP-17〜19 の ADR 起票時に最新値へ再確認のうえ永続化する方針を明文化 (research preview の仕様変動を踏まえ現時点では ADR 化しない。退役条件 2 が移管を必須化) - WP-02 行: todo 移管なし (再評価は順位 255 の再 calibration に従属、代替経路は WP-03 = ADR-019) を記録し、見送り行の自己規則 (理由 + 移管先) に整合 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…の todo 登録 (#341) * docs(todo): PR #340 post-merge feedback 採用 2 件を todo14 に登録 * feat(pr-monitor): scope_guard を observe から enforce へ昇格 (ADR-054 dogfood) - observe 期間 (2026-07-12〜2026-08-01) の実績: post-pr-review 30 回中 fix step 実行 5 回、violation 観測 0 件 = 誤検知ゼロを確認 - pr-monitor-config.toml の [fix.scope_guard] mode を enforce へ変更 (templates は section コメントアウト = 派生 default OFF のため変更不要) - ADR-054 に dogfood 記録を追記 (observe 実績 / 昇格日 / violation 記録が stderr のみで永続化されない観測ギャップ) - harness-improvement-plan.md の WP-11 残作業を「enforce で 3〜5 PR 誤検知ゼロ → 本採用判定」へ更新 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix: PR #341 CodeRabbit 指摘対応 — auto-push 配線の decide 分離 + todo 272/357 責務分界 - 指摘 2 (BlockedViolation 経路): run_auto_push の判定を decide_auto_push (gate 遅延評価の DI) へ分離し、BlockedViolation → run_push 不到達 + 短絡順序をテスト 4 本で machine-enforce (decide_repush と同型のパターン) - ファイル長 gate (800 行) 超過に伴い auto-push 実行層を stages/auto_push.rs へ module 分割 (run_auto_push / mark_* / should_auto_push + 既存テストを移動、挙動不変) - 指摘 1 (順位 272/357 重複): 両 entry の責務分界を明文化 — 272 = 採番重複/索引存在/番号一致、357 = ステータスタグ整合のみ。summary 行・詳細エントリ・完了基準へ相互参照付きで反映 - 検証: cargo test -p cli-pr-monitor 266 pass / clippy clean / lint:docs / lint:md クリーン Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Summary
Context
Validation
pnpm lint:docs(cross-ref / preamble / priority-inversion): OKpnpm lint:md: 119 files, 0 errorspnpm pushquality gate: lint / test / build 全 PASS (docs-only のため rust-lint-test は ADR-035/057 routing で skip)References
Summary by CodeRabbit