Skip to content

docs(adr): ADR-022 原則 1 を「生成 vs 確定」軸に再構築 / ADR-027 実測検証追記 - #64

Merged
aloekun merged 4 commits into
masterfrom
docs/adr-022-v3-and-adr-027-verify
Apr 21, 2026
Merged

docs(adr): ADR-022 原則 1 を「生成 vs 確定」軸に再構築 / ADR-027 実測検証追記#64
aloekun merged 4 commits into
masterfrom
docs/adr-022-v3-and-adr-027-verify

Conversation

@aloekun

@aloekun aloekun commented Apr 21, 2026

Copy link
Copy Markdown
Owner

Summary

  • ADR-022 原則 1 を「生成禁止」から「草案生成 OK / 意図表現を含む既存 artifact の無断上書き NG」に再構築
  • 3 条件の緩和条項 (可逆 / 事前ポリシー / 意図不変) を追加し、将来の auto-rebase / auto-squash 等の拡張余地を確保
  • 承認ゲート表 (actor 別 + interactive Claude Code の対象別) を追加し、memory で先行していた運用ポリシーを ADR 本文に昇格
  • 2026-04-20 追記の「分離型 fix commit 例外条項」を原則 1 の適用例として本流に吸収
  • ADR-027 に 2026-04-14〜20 の 69 runs 実測集計を追記。期待値 5m→2m は未達だが stable 3m 23s の自己申告は median と整合
  • CLAUDE.md の Automated actor boundary ベタ書きセクションを削除 (ハーネスエンジニアリング方針に従い ADR リンク一本化)

Context

Why (ADR-022): 本セッションで prepare-pr skill が前提不成立で停止する症状が発生。原因は「ADR-022 が commit description 生成を禁止 / memory は OK」の乖離で、skill/reviewer は ADR を正とするため先行する memory 運用が機能しなかった。ユーザーからのフィードバック「Claude Code を完全自動ツール扱いしている」「生成と確定を区別していない」を受け、原則 1 を軸ごと再構築。加えて CLAUDE.md のベタ書きも ADR へのリンク一本化の方針に沿って整理。

Why (ADR-027): todo.md task 1 (実測検証) の完了作業。.takt/runs/* の 69 runs を集計し、期待値 (5m→2m) の達成可否を確認。結論は「未達、ただし stable 3m 23s の自己申告は実測 median と整合」。将来の性能 ADR で baseline/target を median に揃える方針を併記。

Trigger: 本セッションで prepare-pr skill が前提不成立で停止したこと / ユーザーフィードバック 3 往復による policy 整理 / CLAUDE.md ベタ書き整理の指摘。

Scope decision: ADR-022 と ADR-027 は別トピックだが、本セッションの因果 (ADR-022 曖昧性が skill 停止を招き、その過程で ADR-027 検証も片付いた) を 1 PR に残すため bundle。どちらも docs only、review 負荷は小。

Validation

  • pnpm push pre-push review: verdict=APPROVE (2026-04-21T08:49Z, 1 iteration, 6m 10s)
  • quality gate: lint / test / build / rust-test 全 PASS
  • docs-only diff のため unit/integration test に影響なし
  • .takt/runs/20260421-084958-pre-push-review/reports/simplicity-review.md で blocking issue なしを確認

References

Summary by CodeRabbit

  • Documentation
    • ドキュメントから「Automated actor boundary (ADR-022)」節を削除し、該当参照をADR一覧に集約しました
    • ADR-022 を改訂し、生成と確認の区別、意図表現の定義、承認ゲートや既存意図の更新制約を明確化しました
    • ADR-027 に実測検証データ・評価・今後方針を追記しました
    • 進行中タスク一覧を再編成し、番号付け・参照とADR関連チェック項目を更新しました

- ADR-022: interactive Claude Code と takt fix の使いにくさを解消するため、原則 1 を「生成禁止」から「草案生成 OK / 意図表現を含む既存 artifact の無断上書き NG」に再構築。3 条件 (可逆・事前ポリシー・意図不変) の緩和条項と承認ゲート表を追加
- ADR-022 の 2026-04-20 追記 (分離型 fix commit) を原則 1 の適用例として吸収
- ADR-027: 2026-04-14〜20 の 69 runs 実測集計を追記 (execute phase / 1-iter / 多 iter 別)。期待値 5m→2m は未達、stable 3m 23s の自己申告は実測 median と整合
- CLAUDE.md: Automated actor boundary のベタ書きセクションを削除 (ハーネスエンジニアリング方針: CLAUDE.md はリンクのみ、詳細は ADR 参照)
- docs/todo.md: ADR-027 検証完了タスク削除、後続タスク繰り上げ、新 task (takt fix 最終 commit message 草案生成) 追加
@coderabbitai

coderabbitai Bot commented Apr 21, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@aloekun has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 40 minutes and 21 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 40 minutes and 21 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: 4e657355-bc4c-4cd3-9440-b0ae4f3b966f

📥 Commits

Reviewing files that changed from the base of the PR and between 5b0490a and 429ca61.

📒 Files selected for processing (1)
  • docs/adr/adr-022-automation-responsibility-separation.md
📝 Walkthrough

Walkthrough

ADR-022を「生成 vs 確認」モデルへ再定義し、アクタ別の承認ゲートと既存intent表現の上書き禁止を明確化。CLAUDE.mdから埋め込みの「Automated actor boundary」節を削除し、ADR-027とdocs/todo.mdを関連内容に合わせて更新。

Changes

Cohort / File(s) Summary
CLAUDE.md 自動アクタ境界削除
CLAUDE.md
従来の「Automated actor boundary」節を削除し、境界説明はADR-022へ委譲。
ADR-022 責任分離方針改訂
docs/adr/adr-022-automation-responsibility-separation.md
Principle 1を「生成 vs 確認」モデルに変更。意図表現(コミット説明、ブックマーク/ブランチ名、タグ、PR title/body)の定義、ドラフト生成の許可、既存intentの上書き禁止、アクタ別承認ゲート(自律ループ/対話型/人間操作の差異)、既存アーティファクト更新の4条件、Principle 5によるPR包含 changeset の不変性を追加。アンチパターンと例外を再整理。
ADR-027 実測検証結果追加
docs/adr/adr-027-push-review-simplicity-focus.md
2026-04-14〜04-20の69実行に基づくarch-review vs simplicity-reviewの実行時間メトリクス、1/3/6+イテレーション別集計、評価と今後の方針を追加。
docs/todo.md タスク再編・ADR参照更新
docs/todo.md
完了タスク削除に伴う再番号付け、ADR-022関連タスク参照更新、ADR-022例外サブセクション名変更および「takt fixでの最終コミットメッセージドラフト生成」「将来の自動rebase/squash/format検討」のチェックボックス追加とopen-PRチェックによる対話型amendゲート導入。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 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-022 原則1の再構築と ADR-027 の実測検証追記という2つの主要な変更を正確に反映しており、変更内容を明確かつ簡潔に要約しています。
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.

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

🧹 Nitpick comments (1)
docs/adr/adr-027-push-review-simplicity-focus.md (1)

146-194: 実測集計の再現手順を1行だけ追記すると運用が安定します

この節は有用です。将来の再検証のため、meta.json/trace.md の集計コマンド(またはスクリプトパス)を末尾に1行追加しておくのを推奨します。

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/adr/adr-027-push-review-simplicity-focus.md` around lines 146 - 194, Add
a single-line reproducibility note at the end of the "実測検証" section describing
the exact aggregation command or script to reproduce the reported metrics (e.g.,
the command that reads `.takt/runs/*-pre-push-review/meta.json` and `trace.md`
and generates `reports/architecture-review.md`/`reports/simplicity-review.md`),
so future runs can be reproduced; mention the exact script or CLI invocation
(script path or command) and any required working directory or env vars.
🤖 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-022-automation-responsibility-separation.md`:
- Line 128: Line 128 のインラインコードスパンに先頭/末尾の不必要な空白が含まれているため markdownlint(MD038)
警告が出ています;該当箇所のコードスパン(表示されているコマンド `jj describe -m
"<above>"`)のバッククォート内から先頭/末尾の空白を削除して `"<above>"` の前後に余分な空白が入らないようにしてください。

---

Nitpick comments:
In `@docs/adr/adr-027-push-review-simplicity-focus.md`:
- Around line 146-194: Add a single-line reproducibility note at the end of the
"実測検証" section describing the exact aggregation command or script to reproduce
the reported metrics (e.g., the command that reads
`.takt/runs/*-pre-push-review/meta.json` and `trace.md` and generates
`reports/architecture-review.md`/`reports/simplicity-review.md`), so future runs
can be reproduced; mention the exact script or CLI invocation (script path or
command) and any required working directory or env vars.
🪄 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: 449247a8-94b8-48e0-a4e8-2e5eb977a1ba

📥 Commits

Reviewing files that changed from the base of the PR and between 06498e5 and ccda619.

📒 Files selected for processing (4)
  • CLAUDE.md
  • docs/adr/adr-022-automation-responsibility-separation.md
  • docs/adr/adr-027-push-review-simplicity-focus.md
  • docs/todo.md
💤 Files with no reviewable changes (1)
  • CLAUDE.md

Comment thread docs/adr/adr-022-automation-responsibility-separation.md

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

🧹 Nitpick comments (1)
docs/adr/adr-022-automation-responsibility-separation.md (1)

117-117: fenced code block に言語指定を追加することを推奨

Line 117 の fenced code block に言語指定がないため markdownlint(MD040) 警告が出ています。この block は対話例のため、``` の後に text を追加することでレンダリングに影響なく警告を解消できます。

♻️ 修正案
 PR 作成フローの典型:
 
-```
+```text
 [Claude]
 Proposed commit description:
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@docs/adr/adr-022-automation-responsibility-separation.md` at line 117, The
fenced code block at the example interaction starting with the opening ```
(containing "[Claude]" and the proposed commit description) lacks a language tag
and triggers markdownlint MD040; fix it by adding a language identifier (e.g.,
"text") immediately after the opening backticks in that fenced block so the
block becomes ```text and removes the warning while preserving rendering.
🤖 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-022-automation-responsibility-separation.md`:
- Around line 167-168: Update the description of 原則 3 on line 168 to accurately
reference the full set of 緩和条項 defined in lines 81-86 by either (A) listing all
four conditions (可逆・事前ポリシー許可・意図不変・changesetがremote open PRに含まれていない) or (B)
keeping the three-condition wording but adding an explicit clause "when outside
a PR" to indicate the fourth condition applies to PRs; also cross-reference 原則 5
to make it clear that PR contexts are governed by that rule.

---

Nitpick comments:
In `@docs/adr/adr-022-automation-responsibility-separation.md`:
- Line 117: The fenced code block at the example interaction starting with the
opening ``` (containing "[Claude]" and the proposed commit description) lacks a
language tag and triggers markdownlint MD040; fix it by adding a language
identifier (e.g., "text") immediately after the opening backticks in that fenced
block so the block becomes ```text and removes the warning while preserving
rendering.
🪄 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: 59a4fd58-98e6-47d5-9608-84ccfd79d827

📥 Commits

Reviewing files that changed from the base of the PR and between ccda619 and fae9e80.

📒 Files selected for processing (2)
  • docs/adr/adr-022-automation-responsibility-separation.md
  • docs/todo.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/todo.md

Comment thread docs/adr/adr-022-automation-responsibility-separation.md Outdated
@aloekun

aloekun commented Apr 21, 2026

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Apr 21, 2026

Copy link
Copy Markdown
✅ 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.

@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: 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-022-automation-responsibility-separation.md`:
- Around line 117-149: Add a language specifier to the fenced code block that
starts with "[Claude]" and contains "Proposed commit description:" (the block
shown in the diff) so markdownlint MD040 is avoided; edit the fence from ``` to
```text (or another appropriate language) in
adr-022-automation-responsibility-separation.md around that snippet so the code
fence is explicitly language-tagged.
🪄 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: e7343404-ae04-4018-9e23-d40ee21af9e1

📥 Commits

Reviewing files that changed from the base of the PR and between fae9e80 and 5b0490a.

📒 Files selected for processing (1)
  • docs/adr/adr-022-automation-responsibility-separation.md

Comment thread docs/adr/adr-022-automation-responsibility-separation.md Outdated
@aloekun
aloekun merged commit c6fb38d into master Apr 21, 2026
1 check passed
@aloekun
aloekun deleted the docs/adr-022-v3-and-adr-027-verify branch April 21, 2026 15:57
aloekun added a commit that referenced this pull request Apr 22, 2026
… (task 6) (#67)

takt fix が NoChange で空 fix commit を abandon した後、@ が stale な空
commit の上に残り、次の jj new がそこに積まれる問題を解消する。abandon
成功後に単一の非 trunk local bookmark を PR tip として解決し、jj new -r
<tip> で @ を PR tip 直下に戻す。

以下は fail-safe で skip する:
- bookmark 0 件 / 複数件 (stacked PR 想定)
- @- が既に PR tip と一致 (redundant な空 commit を作らない)
- jj new -r <tip> 自体の失敗 (ログのみで処理継続)

同じフローは takt 未完了経路 (monitor.rs:80) の abandon にも適用される。

関連: PR #64 / PR #66 で連続発生した事例
参照: ADR-022 原則 5 (PR 包含 changeset の不変性)
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