Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ members = [
"src/lib-ollama-client",
"src/lib-pending-file",
"src/lib-report-formatter",
"src/lib-subprocess",
]

# workspace 化に伴い [profile.*] は必ず root で定義する必要がある
Expand Down
4 changes: 3 additions & 1 deletion docs/todo-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
| 170 | 💎 Tier 3 | **`git-workflow.md § Multi-PR chaining` を「1 PR 内 multi-commit + intent 明記」パターンに拡張 (PR #183 T3-#1 採用)** | todo11.md | S | なし (PR #119/#120/#121 + #183 の 4 観測で Frequency High、commit 分割判断 + intent 記述ガイドを既存 section に追記、`~/.claude/rules/common/git-workflow.md` 編集、派生プロジェクトへ自動波及、`feedback_global_config_backup` 適用必須) |
| 171 | 💎 Tier 3 | **`docs-governance.md` に「Operational reference vs Pointer reference」区別 section を追加 (PR #183 T3-#2 採用) ★ Bundle DG-RULES** | todo11.md | S | 順位 172 と同 PR 推奨、PR #183 A01 修正で実適用した判定ロジック (operational = workflow 動作記述 = 保持可 / pointer = section 名・順位番号参照 = 置換必要) を `~/.claude/rules/common/docs-governance.md` § Cross-File Reference Lifecycle に新 sub-section として codify、ADR-031 lines 79-302 中 line 270 のみが真の pointer だった実例を inline cite、派生プロジェクトへ自動波及、`feedback_global_config_backup` 適用必須 |
| 172 | 💎 Tier 3 | **CR ephemeral artifact Nitpick の統一 skip 基準を memory に codify (PR #183 T3-#3 採用) ★ Bundle DG-RULES** | todo11.md | XS | 順位 171 と同 PR 推奨、CR が `docs/todo*.md` 系 ephemeral artifact 内の行番号参照を Nitpick 指摘した場合は skip 推奨という判断基準を新 memory `feedback_coderabbit_ephemeral_nitpick.md` に codify、既存 memory `feedback_coderabbit_no_actionable_merge_signal` の補完、本リポジトリ専用 (派生プロジェクトには波及しない)、`feedback_global_config_backup` 適用推奨 |
| 173 | 🔧 Tier 2 | **`combine_output` 5 crate 重複を `lib-runner-utils` (or 既存 lib-*)extract (PR #182 dry-run S01 採用)** | todo11.md | S-M | なし (`src/cli-pr-monitor/src/runner.rs:80-89` の `combine_output` 8 行関数が `#[allow(dead_code)]` 付与で生産未使用、同関数が 4 他 crate (cli-push-runner, cli-push-pipeline, cli-merge-pipeline, hooks-post-tool-linter) にも複製 = 5 crate 横断 systemic duplication、ADR-026 Cargo workspace + ADR-012 lib-* naming で解決、Phase B dogfood の最初の実体ベース finding (A01 と並ぶ)、A01 は PR #183 で fix 済) |
| 173 | 🔧 Tier 2 | **subprocess utils 5 crate 重複を `lib-subprocess` に extract — 173a-esub-PR 分割 (PR #182 dry-run S01 + Phase E dogfood WR-2026-06-01-S01 採用、2026-06-14 挙動保存型 sub-PR 分割)** | todo11.md | 173a: S / 173b-d: S-M each | 173a 単独着手可、173b/c/d は 173a 依存、173e (variant merge) は 173a-d 完了後 dogfood で判断。`src/cli-pr-monitor/src/runner.rs:80-89` の `combine_output` (5 crate 重複) + `drain_pipe` / `wait_with_timeout` / `run_cmd` の挙動 variant 統合、ADR-026 Cargo workspace + ADR-012 lib-* naming で解決。挙動保存型分割により各 sub-PR が pure refactor として独立 land 可能 |
| 176 | 🔧 Tier 2 | **check-ci-coderabbit format extraction 関数への variant fixture 追加 (PR #185 T2-#4 採用)** | todo12.md | M | なし (順位 167-169 Bundle CR-RL の follow-up、bold-wrapper variant (`**More reviews will be available**`) / 短形態 (secs のみ) / 複数 separator / wait time なし graceful failure の 4 fixture 追加、PR #182 + #185 の 2 PR 連続観測で CR format 多様性 systemic、`extract_old_format_wait_time` / `extract_new_format_wait_time` の coverage gap 補填、regex 拡張 vs fixture 先行の 2 アプローチを着手時判断、analyzer rationale の「Edit 集中 = test gap signal」は incidental で採用根拠から除外、true 採用根拠は format 多様性 + 防御的 variant) |
| 178 | 🔧 Tier 2 | **`state.rs` の behavioral invariant test を ADR-041 pattern で追加 (週次レビュー 2026-05-30 S02 採用)** | todo12.md | S | なし (Phase D dogfood で発見、`src/cli-pr-monitor/src/state.rs:226-510` の test が JSON round-trip のみ、`rate_limit=Some` 時 CI 更新 skip 等の behavioral invariant 未検証、ADR-041 sentinel 事前投入 + mutation 不在 assert pattern で 3-5 test 追加、memory `feedback_test_dry_antipattern` 適用、Effort S で high value catches state regression) |
| 179 | 🔧 Tier 2 | **rate-limit retry decision boundary test を rstest parameterized で追加 (週次レビュー 2026-05-30 S03 採用)** | todo12.md | S | なし (Phase D dogfood で発見、`src/cli-pr-monitor/src/config.rs:94-122` + `stages/poll.rs` の `max_retries=3` 固定 test のみで boundary (0/1/3/off-by-one) 未検証、rstest parameterized で 3-4 case 追加 ~15 行、rstest 既存使用 + Bundle CR-RL = 順位 167-169 隣接領域 follow-up、off-by-one regression が test で検出可能化) |
Expand All @@ -85,6 +85,8 @@
| 203 | 🔧 Tier 2 | **GitHub token alternation の variant test 完成 — `ghu_` / `ghr_` (PR #201 post-merge-feedback T2-1 採用)** | todo10.md | XS | なし (PR #201 で `(gho\|ghs\|ghu\|ghr)_` alternation のうち `ghu_` user-to-server / `ghr_` refresh の専用 test が欠落、3 ソース PR diff + pre-push NB-2 + CR NB-2 が独立検出、`secret_detection_blocks_github_oauth_token` / `_server_token` と同パターンで 2 test 追加 〜10 行、Frequency Medium、Bundle-201-FB-A 候補も単独 land 可) |
| 204 | 💎 Tier 3 | **ADR-007 に exception field + 専用 pattern の設計方針 codify (PR #201 post-merge-feedback T3-2 採用)** | todo10.md | XS | なし (Rust regex の negative lookahead 非対応を回避する `BlockedPattern.exception` field + 専用 pattern の 2 段判定が PR #171 順位 144 で導入 + PR #201 順位 146 で再利用 = Frequency Medium、ADR-007「正規表現層」section に新 sub-section 追加、defense in depth で除外側を専用 pattern で別途検出、順位 201 LazyLock guideline と相補) |
| 205 | 💎 Tier 3 | **`~/.claude/rules/common/git-workflow.md` に jj auto-snapshot onboarding rule 追記 (PR #201 post-merge-feedback T3-4 採用)** | todo10.md | XS | なし (PR #201 で prior session の docs commit 199-202 と本セッションの impl 146 が auto-snapshot で混入し bundle 化に収束した実観測、jj Operations section に「Auto-snapshot の理解と logical separation」sub-section 追加、`jj new -m` を **作業開始時** に実行する正しいフロー明文化、派生プロジェクトへ global 経由で自動波及、`feedback_global_config_backup` 適用必須) |
| 206 | 💎 Tier 3 | **`~/.claude/rules/common/development-workflow.md` § 1. Plan First に「todo*.md 分割時の todo-summary.md 同一 commit 更新」checklist 追加 (PR #204 post-merge-feedback T3-1 採用)** | todo10.md | S | なし (PR #133 + #153 + #204 の 3 PR 連続観測で multi-file artifact split 時の永続 index 更新漏れが Frequency Medium 閾値到達、3 step checklist (分割エントリ列挙 / sed 一括 file 列更新 / 同一 commit) を § 1. Plan First の Codification 重複確認 step 直後に配置、coding-style.md § Cross-File Reference Lifecycle の具体化事例として cite、派生プロジェクト (techbook-ledger / auto-review-fix-vc) へ global 経由で自動波及、`feedback_global_config_backup` 適用必須) |
| 207 | 💎 Tier 3 | **`~/.claude/rules/common/patterns.md` § Experimental Feature 設計時の参照必須 に「mechanical lint は ADR-039 scope 外」境界 case 追加 (PR #204 post-merge-feedback T3-2 採用)** | todo10.md | S | なし (PR #204 で project-local adr-039 § 1.b 追加した知見の global 投影、派生プロジェクトでの同型 over-application 防止、4 条件 (non-blocking / 決定論 / scope 限定 / recovery hint 明確) + 該当例 (file-length / file-size lint) と非該当例 (post-merge-feedback / weekly-review / local-llm) を境界 case として明示、順位 200/202/205 と同 pattern = project-local 知見の global codification、`feedback_global_config_backup` 適用必須) |

**戦略**: Tier 1 を 2〜3 セッションで片付け → Tier 2 で ADR-032 の前提 + rate-limit + convergence cost 削減を進める → Tier 3 で ADR-032 を land + ドキュメント整備。Tier 4-5 は cleanup / 外部展開で daily efficiency への直接効果は小さい。

Expand Down
99 changes: 99 additions & 0 deletions docs/todo10.md
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,105 @@

---

### `~/.claude/rules/common/development-workflow.md` § 1. Plan First に「todo*.md 分割時の todo-summary.md 同一 commit 更新」checklist 追加 (PR #204 post-merge-feedback T3-1 採用)

> **動機**: PR #133 (`todo.md` → `todo.md` + `todo2.md` 分割)、PR #153 (`*-analysis.md` 3-way split)、PR #204 (本 PR、`todo10.md` → `todo10.md` + `todo12.md` 分割) の **3 PR 連続観測** で「multi-file artifact split 時に `docs/todo-summary.md` の file-column pointer 更新が漏れて pre-push reviewer / CR に指摘される」事象が systemic 化 (Frequency Medium 閾値到達)。`~/.claude/rules/common/development-workflow.md` § 1. Plan First に「分割時の cross-file reference 更新手順」を 3 step checklist として追記し、後続の split 作業で reviewer iteration を構造的に削減する。
>
> **本タスクの位置づけ**: PR #204 post-merge-feedback Tier 3 #1 採用 (Severity Low / Frequency Medium / Effort S / Adoption Risk None、2026-06-12 ユーザー承認)。3 PR 連続観測で `feedback_no_unenforced_rules.md` 例外 = 既存実践 (3 PR で実証) の明文化 + guide 効果。永続 artifact (todo-summary.md) が ephemeral entries を参照する pattern は `~/.claude/rules/common/coding-style.md` § Cross-File Reference Lifecycle の具体化事例として cite 可能。
>
> **参照**: `.claude/feedback-reports/204.md` Tier 3 #1、PR #133 (todo.md split)、PR #153 (analysis.md 3-way split)、PR #204 (todo10.md split、本 PR)、`~/.claude/rules/common/development-workflow.md` § 1. Plan First、`~/.claude/rules/common/coding-style.md` § Cross-File Reference Lifecycle (相補)、memory `feedback_global_config_backup` (snapshot 必須)
>
> **実行優先度**: 💎 **Tier 3** — Effort S。`~/.claude/rules/common/development-workflow.md` への 5-10 行追記。

#### 設計決定 (案)

`~/.claude/rules/common/development-workflow.md` の "1. Plan First" sub-step (既存「Codification 重複の事前確認」step の直後) に以下を追記:

```markdown
- **Multi-file artifact split 時の cross-file reference 更新**: `docs/todo*.md` / `docs/<topic>*.md` 等を分割する場合、永続 index (`docs/todo-summary.md` 等) の file-column pointer / 番号参照を **同一 commit で必ず更新**する。3 step checklist:
1. 分割元のエントリを特定 (= 新ファイルに移動するエントリの順位 / 識別子を列挙)
2. `docs/todo-summary.md` 等の永続 index で当該行の file 列を新ファイル名に sed 一括更新
3. 両方の変更を同一 commit に含める (split + reference 更新を分離すると pre-push reviewer から outdated pointer 指摘 = iteration cost)
- 由来: PR #133 (todo.md → todo2.md)、PR #153 (analysis.md 3-way split)、PR #204 (todo10.md → todo12.md) の 3 PR で pre-push reviewer / CR 指摘 = Frequency Medium 閾値到達
```

- **適用範囲**: `docs/todo*.md` / `docs/*analysis*.md` / その他 split 対象になりうる multi-file artifact
- **派生プロジェクト波及**: `~/.claude/rules/common/` 配下のため techbook-ledger / auto-review-fix-vc に自動

#### 作業計画

- [ ] `~/.claude` snapshot 取得 (memory `feedback_global_config_backup` per)
- [ ] `~/.claude/rules/common/development-workflow.md` § 1. Plan First に上記 checklist を追記 (既存「Codification 重複の事前確認」step の直後配置)
- [ ] PR #133 / #153 / #204 を inline cite として明記
- [ ] markdownlint clean
- [ ] 本エントリ削除 + todo-summary.md 行削除

#### 完了基準

- `~/.claude/rules/common/development-workflow.md` § 1. Plan First に「Multi-file artifact split 時の cross-file reference 更新」3 step checklist が追記される
- 派生プロジェクト (techbook-ledger / auto-review-fix-vc) に global rule として自動波及
- 由来 cite (PR #133, #153, #204) で reviewer / Claude が rule 背景を理解可能

#### 詰まっている箇所

なし。Effort S、global rules への docs 追記のみ、`feedback_global_config_backup` snapshot を忘れない。

---

### `~/.claude/rules/common/patterns.md` § Experimental Feature 設計時の参照必須 に「mechanical lint は ADR-039 scope 外」境界 case 追加 (PR #204 post-merge-feedback T3-2 採用)

> **動機**: PR #204 で project-local `docs/adr/adr-039-experimental-feature-standard-pattern.md` に § 1.b (mechanical lint 例外) を追加したが、global rules (`~/.claude/rules/common/patterns.md` § Experimental Feature 設計時の参照必須) には mechanical lint 境界 case の記述がない。派生プロジェクト (techbook-ledger / auto-review-fix-vc) で同型の ADR-039 over-application (= 順位 177 file_size_check が default OFF にされた事象) が再発する構造リスク。global rules に boundary case を投影することで派生プロジェクト全体に予防効果を波及。
>
> **本タスクの位置づけ**: PR #204 post-merge-feedback Tier 3 #2 採用 (Severity Medium / Frequency Medium / Effort S / Adoption Risk None、2026-06-12 ユーザー承認)。本セッション中で順位 200 (rust/patterns.md multi-byte indexing) / 202 (testing.md multi-path fixture) / 205 (git-workflow.md jj auto-snapshot) と同 pattern = 「project-local 知見を global rules に投影して派生プロジェクトに自動波及」。
>
> **参照**: `.claude/feedback-reports/204.md` Tier 3 #2、PR #204 (project-local ADR-039 § 1.b 追加)、`~/.claude/rules/common/patterns.md` § Experimental Feature 設計時の参照必須、PR #197 (順位 177 file_size_check の誤適用観測点)、順位 200/202/205 (同 pattern の global codification 事例)、memory `feedback_global_config_backup` (snapshot 必須)
>
> **実行優先度**: 💎 **Tier 3** — Effort S。`~/.claude/rules/common/patterns.md` への 6-10 行追記。

#### 設計決定 (案)

`~/.claude/rules/common/patterns.md` § "Experimental Feature 設計時の参照必須" に以下を追記:

```markdown
### Mechanical lint は ADR-039 scope 外 (default ON 許容)

ADR-039 (Experimental Feature 標準パターン) は「behavior の妥当性が不確定な experimental feature」が適用対象で、以下 4 条件をすべて満たす **決定論的 mechanical lint** は scope 外として **default ON 配布を許容** する:

1. **失敗 mode が non-blocking** (additionalContext warning のみ、block しない)
2. **判定が決定論的** (閾値 / regex / metadata、discretionary 判断なし)
3. **影響範囲が宣言的に限定** (`paths` glob / extension match で declared)
4. **recovery hint が明確** (違反検出時の次アクションが message に含まれる)

該当例: file-length lint (Rust source 行数 max)、file-size check (50KB threshold)、todo*.md preamble drift detector。
該当しない例: post-merge-feedback / weekly-review / local-llm classification (= 挙動 dogfood で確定する experimental)。

由来: PR #197 で project-local 順位 177 file_size_check が ADR-039 § 1 機械適用で default OFF にされ、user 期待と乖離した事象を PR #204 で訂正 (project-local ADR-039 § 1.b 追加)。本 boundary case は派生プロジェクトでも反復する構造的 over-application の防止策。
```

- **適用範囲**: 派生プロジェクト全般での新規 lint / hook 追加時の判断補助
- **派生プロジェクト波及**: `~/.claude/rules/common/` 配下のため techbook-ledger / auto-review-fix-vc に自動

#### 作業計画

- [ ] `~/.claude` snapshot 取得 (memory `feedback_global_config_backup` per)
- [ ] `~/.claude/rules/common/patterns.md` § Experimental Feature 設計時の参照必須 に上記 sub-section を追記 (既存 6 点設計チェックリスト + 4 点 self-review checklist の直後配置)
- [ ] PR #197 (誤適用観測) / PR #204 (訂正 + § 1.b 追加) / 順位 147 file_length lint (同類例) を inline cite
- [ ] markdownlint clean
- [ ] 本エントリ削除 + todo-summary.md 行削除

#### 完了基準

- `~/.claude/rules/common/patterns.md` § Experimental Feature 設計時の参照必須 に「Mechanical lint は ADR-039 scope 外」sub-section が追記される
- 派生プロジェクト (techbook-ledger / auto-review-fix-vc) に global rule として自動波及
- 由来 cite (PR #197, #204) で reviewer / Claude が rule 背景を理解可能
- 順位 200/202/205 と同 pattern (project-local 知見を global rules に投影) が継続稼働

#### 詰まっている箇所

なし。Effort S、global rules への docs 追記のみ、`feedback_global_config_backup` snapshot を忘れない。

---

## 既知課題 (記録のみ、本セッションで未対応)

(現時点で本ファイルへの既知課題は無し。docs/todo9.md 末尾を参照。)
Loading