diff --git a/docs/claude-code-web-tasks.md b/docs/claude-code-web-tasks.md new file mode 100644 index 00000000..880c3ea4 --- /dev/null +++ b/docs/claude-code-web-tasks.md @@ -0,0 +1,70 @@ +# Claude Code Web 対応可能タスクリスト + +> **状態**: 試験運用 (本ドキュメントは「Claude Code Web セッションで着手するタスクのピックアップ scope」を切り出した ephemeral artifact であり、列挙された全タスクが land したら役割を終える) +> +> **作成経緯**: [docs/todo-summary.md](todo-summary.md) のタスク数増加に伴い、Linux 環境の Claude Code Web でも着手できるタスク(= Windows ベースの hooks/パイプラインへの実行依存がないドキュメント修正系)を抽出するため、2026-05-16 に作成。 +> +> **scope 境界**: リポジトリ内のファイル編集に閉じ、Rust ビルド/テスト/Windows hook 実行が成功条件にならないタスクのみを採用。 + +## 採用タスク + +判定基準: + +1. 編集対象がリポ内ファイル(`docs/` 配下 / `.claude/custom-lint-rules.toml` 内コメント / Rust ソースのコメント) +2. Rust ビルド / Windows hook / pnpm パイプラインの実行が成功条件に **ならない** +3. [docs/todo-summary.md](todo-summary.md) の表で採用判定済み(`feedback_no_unenforced_rules.md` 例外として既存実践の明文化に該当) + +| 順位 | Tier | 内容 | 編集ファイル | 工数 | +|---|---|---|---|---| +| 69 | T3 | `no-ephemeral-todo-reference` rule の `yaml`/`yml` extensions 追加理由をコメント 1-2 行で明記 (PR #110 T3-1) | [.claude/custom-lint-rules.toml](../.claude/custom-lint-rules.toml) rule⑥ コメント欄 | XS | +| 104 | T3 | ADR-007 amendment: semantic self-limitation 安全条件 + lint rule 最小テストチェックリスト (pattern detection / case-insensitive / false positive skip の 3 項目) (PR #140 T3-#1) | [docs/adr/adr-007-custom-linter-layer-boundary.md](adr/adr-007-custom-linter-layer-boundary.md) | S | +| 116 | T3 | ADR-040 `step_timeout` 説明に sublinear / KV cache locality clarification を 2-3 行追記し、reference table 600s と formula 720s の数値整合化 (PR #145 T3-#1) | [docs/adr/adr-040-local-llm-context-size.md](adr/adr-040-local-llm-context-size.md) | XS | +| 120 | T3 | `takt-workflow-persona-without-model` rule コメント拡張(field 拡張手順 4-5 行)+ ADR-007 case study 追記(enumeration-based 正規表現層、Rust regex lookahead 非対応の pragmatic 対処)(PR #150 T1-#1、実体 Tier 3) | [.claude/custom-lint-rules.toml](../.claude/custom-lint-rules.toml) ルール⑨ + [docs/adr/adr-007-custom-linter-layer-boundary.md](adr/adr-007-custom-linter-layer-boundary.md) | XS | +| 127 | T3 | extensions 拡張時の test 追加 pattern を Rust ソース内コメントで明文化 (PR #151 T3-#2、順位 124 と同 PR 推奨) | Rust ソース内コメント(test location を正確に参照) | XS | +| 134 | T3 | ADR-035 に docs-only PR 評価の適用外基準リスト追加(mutation / error handling / DRY / YAGNI / function length / test coverage / magic-number 等)(PR #156 T3 #2) | [docs/adr/adr-035-doc-evaluation-policy.md](adr/adr-035-doc-evaluation-policy.md) | S | + +### 着手フロー + +1. Claude Code Web で本ファイルを起点に対象タスクを 1 つ選ぶ +2. 該当ファイルを Read で確認し、編集内容を [docs/todo-summary.md](todo-summary.md) と該当 `docs/todoN.md` の詳細エントリに照らして固める +3. 編集後、本ファイルの該当行と [docs/todo-summary.md](todo-summary.md) の該当順位行を削除する(todo-summary.md の table 更新方針に従う) +4. 詳細エントリが置かれた `docs/todoN.md` の該当 section も削除する +5. PR を作成(commit 単位は task 単位、複数 task を 1 PR に束ねる場合は理由を PR description に明記) + +--- + +## 周辺情報 + +### 採用しなかったタスク群 (1): グローバル `~/.claude/*` 編集が必要なタスク + +[docs/todo-summary.md](todo-summary.md) で採用判定済みかつ純 docs 修正だが、編集対象が **ユーザーグローバル設定**(`~/.claude/rules/common/*.md` や `~/.claude/CLAUDE.md`)であるため、本リストには含めない。 + +**理由**: + +- ローカル PC と Claude Code Web の作業環境が異なり、`~/.claude/` ディレクトリは Web の per-repo workspace には含まれない +- グローバル `CLAUDE.md` / `~/.claude/rules/*` をバージョン管理する仕組みを本リポジトリでは用意していないため、Web 側で編集しても本リポの PR には反映できない +- ローカル PC 側で着手するのが構造的に妥当 + +該当する順位(参考、本リストでは取り扱わない): 44, 66, 79, 84, 93, 100, 105, 107, 108, 110, 111, 117, 122, 128, 133 + +### 採用しなかったタスク群 (2): 実装系 / CI/script 系 / 判断作業混在系 + +以下は本リストの対象外。Windows ローカル環境または別途調整が必要。 + +- **Rust 実装系**: 順位 1, 2, 5, 8, 11, 16, 17, 19, 39, 42–46, 49, 51, 52, 57, 81, 83, 91, 92, 97, 121, 124, 125, 130, 131, 132 等 + - Windows 上での Rust ビルド / hook 実行 / Rust test 検証が成功条件 +- **CI/script 実装系**: 順位 6, 10, 95, 96 + - `gh` CLI / GitHub Actions workflow 整備で Web からも実行可能だが、本リポ初の `.github/workflows/*` 追加など影響範囲があり、ローカル dogfood と組み合わせる方が安全 +- **判断作業混在系**: 順位 118 + - rule⑧ の paths filter 検討は ADR amendment との整合判断を含み、純 docs 修正には閉じない + +--- + +## ライフサイクル + +- 採用タスクが全て land したら本ファイルを retire する(`~/.claude/rules/common/docs-governance.md` § Retirement Workflow に従う、global path のため markdown link なし) +- retire 時の手順: + 1. 採用タスク欄が空になっていることを確認 + 2. permanent value の移管は不要(本ファイルは scope 整理のための作業表で、永続価値となる decision はない) + 3. リポ内で本ファイルを参照する箇所を `grep -rn "claude-code-web-tasks.md"` で洗い出し、参照を除去 + 4. 本ファイルを物理削除 diff --git a/docs/todo-summary.md b/docs/todo-summary.md index 036fd82f..4fe654e3 100644 --- a/docs/todo-summary.md +++ b/docs/todo-summary.md @@ -49,7 +49,7 @@ | 65 | 🚀 Tier 1 | **exe + `--help` を PreToolUse でブロックして src/ Read に誘導 (PR #109 T1-3 採用) ★ Bundle c** | todo7.md | S | なし (PR #109 SIGPIPE の直接トリガ = AI が `cli-merge-pipeline.exe --help` 実行 → exe は --help 未対応で merge 本体実行を構造的に防止、今後追加 exe にも自動適用) | | 66 | 💎 Tier 3 | **長時間 subprocess の pipe truncate 禁止ルールをグローバル明文化 (PR #109 T3-1 採用) ★ Bundle c** | todo7.md | XS | なし (順位 65 = 決定論層、本ルール = 判断ガイド層、`~/.claude/rules/common/development-workflow.md` 等に追加) | | 69 | 💎 Tier 3 | **`no-ephemeral-todo-reference` の `yaml`/`yml` extensions 追加理由をコメントで明記 (PR #110 T3-1 採用) ★ Bundle d** | todo5.md | XS | なし (rule⑥ コメント欄に 1-2 行追記、設計 doc と実装の経緯保存、git blame 不要化) | -| 78 | 💎 Tier 3 | **ADR-038 (Rust timestamp arithmetic safety) + CLAUDE.md security 拡充 (PR #115 T3-1 採用) ★ Bb-3 follow-up** | todo5.md | S | なし (config が user-editable system boundary のとき `sanitize()` 値域検証を必須化し dependent arithmetic に `// SAFETY: により上限保証` コメントを要求するパターンを ADR + CLAUDE.md に codify、Rust 固有の checked_add + MAX_SAFE capping + time-dependent test の 3 層を明文化) | +| 78 | 💎 Tier 3 | **ADR-041 (Rust timestamp arithmetic safety) + CLAUDE.md security 拡充 (PR #115 T3-1 採用) ★ Bb-3 follow-up** | todo5.md | S | なし (config が user-editable system boundary のとき `sanitize()` 値域検証を必須化し dependent arithmetic に `// SAFETY: により上限保証` コメントを要求するパターンを ADR + CLAUDE.md に codify、Rust 固有の checked_add + MAX_SAFE capping + time-dependent test の 3 層を明文化。2026-05-16 に entry 登録時の旧予約番号 ADR-038 が Local LLM finding classification で占有済と判明し ADR-041 に振り直し) | | 79 | 💎 Tier 3 | **`docs-governance.md` § Retirement Workflow に「残タスクの lifecycle 整合」要件明記 (PR #117 T3-1 採用)** | todo5.md | XS | なし (PR #117 で順位 15 を Bb-3 で吸収済として削除した際、現 Step 2「残タスクを priority table に登録」が priority table から除外するケース = 完了/deprioritize/defer を未定義だった実証。除外時の commit/PR で 3 値のいずれかを明示する要件を追加して将来の同型 ambiguity を構造的に防ぐ) | | 81 | 🚀 Tier 1 | **cli-pr-monitor: CR 投稿エラー (`Failed to post review comments`) auto-retry 拡張 (PR #120 T1-2 採用) ★ Bundle f (defer)** | todo5.md | M | 1 観測のみで systemic 性未確認 (§A-2 P-5 PR で defer 判断、ADR-018 §追記 2026-05-08 で re-trigger 条件 = 2 件以上の同型観測を規定) | | 83 | 🔧 Tier 2 | **cli-pr-monitor: 複合 AND guard の各条件を独立テストで検証 (PR #120 T2-1 採用)** | todo5.md | S | なし (PR #120 W-001、`enrich_with_classifier_skips_when_disabled` の test setup で複合条件分離不全) | @@ -83,6 +83,7 @@ | 132 | 🚀 Tier 1 | **`lint_screen.rs` magic-number 検出ルールで `similarity index NN%` を FP 除外 (PR #156 T1 #1 採用)** | todo8.md | S | 順位 130 と root cause 同一、本エントリは「実装側の前処理 filter」に確定して着手する位置づけで 順位 130 を supersede 可能。git diff metadata (similarity index / @@ / index / new file mode / rename) を LLM 入力前に sanitize、file rename 含む eval fixture 追加で regression test 担保 | | 133 | 💎 Tier 3 | **docs-governance §Retirement Workflow に「diff context 由来 false alarm 防止 = grep hit は実ファイル Read で確認」明記 (PR #156 T3 #1 採用)** | todo8.md | XS | なし (PR #156 で 5 件以上の false alarm 発生、`feedback_no_unenforced_rules.md` 例外 = 既存実践の明文化 + guide 効果、順位 122 / 127 と同じロジック、`~/.claude/` global 配下で派生プロジェクトに自動波及) | | 134 | 💎 Tier 3 | **ADR-035 に docs-only PR 評価の適用外基準リスト追加 (mutation / error handling / DRY / YAGNI / function length / test coverage / magic-number 等) (PR #156 T3 #2 採用)** | todo8.md | S | なし (Severity Medium = reviewer の criteria 誤適用による unnecessary review overhead / 開発体験劣化、ADR-035 は分類基準のみ定義済で適用外基準が未明示、`feedback_no_unenforced_rules.md` 例外 = ADR への追加で機械強制ではなく reviewer / Claude の judgment 補助) | +| 135 | 💎 Tier 3 | **todo entry の ADR 番号 hardcode 撤廃 — 「ADR-NNN (採番未確定、land 時に確定)」placeholder 採用 (順位 78 番号 conflict 2026-05-16 観測由来)** | todo8.md | XS | なし (順位 78 (旧 ADR-038 → ADR-041) で番号 conflict が顕在化、queue 滞留 entry の hardcode が後発 PR の採番と衝突する構造リスクを convention で予防、`~/.claude/rules/common/docs-governance.md` に 2-3 行追記。採番予約簿は管理コスト過剰のため見送り、land 時 PR で空き番号確定の軽量運用に統一) | **戦略**: Tier 1 を 2〜3 セッションで片付け → Tier 2 で ADR-032 の前提 + rate-limit + convergence cost 削減を進める → Tier 3 で ADR-032 を land + ドキュメント整備。Tier 4-5 は cleanup / 外部展開で daily efficiency への直接効果は小さい。 diff --git a/docs/todo5.md b/docs/todo5.md index 77e716d8..d03e9fa5 100644 --- a/docs/todo5.md +++ b/docs/todo5.md @@ -50,7 +50,7 @@ --- -### ADR-038 (Rust timestamp arithmetic safety) + CLAUDE.md security 拡充 (PR #115 T3-1 採用) ★ Bb-3 follow-up +### ADR-041 (Rust timestamp arithmetic safety) + CLAUDE.md security 拡充 (PR #115 T3-1 採用) ★ Bb-3 follow-up > **動機**: PR #115 で「config が user-editable system boundary のとき、sanitize() で値域検証 + 下流 arithmetic で安全範囲保証」というパターンが実証された (CR Major #1 + #2 が両方とも同型の「config 値→arithmetic 入力」cross-layer integrity 問題)。同型の bug class は今後も Rust + config 駆動の component で発生しうるため、組織的 learning として codify。 > @@ -62,7 +62,7 @@ #### 設計決定 (案) -- **ADR-038 (新規)**: `docs/adr/adr-038-timestamp-arithmetic-safety.md` を作成 +- **ADR-041 (新規)**: `docs/adr/adr-041-timestamp-arithmetic-safety.md` を作成 - **タイトル**: Rust timestamp arithmetic の overflow safety pattern - **Context**: PR #115 で sanitize() が `i64::MAX as u64` を valid として通したが downstream の `now_unix + wait as i64` で overflow した CR Major #2 を引用 - **Decision**: 以下 3 層で overflow を構造的に防ぐ @@ -71,12 +71,12 @@ 3. **Test layer**: `now + sanitize 後の値 < i64::MAX` invariant を `checked_add` で machine-enforce (順位 76/77 で実装) - **Consequences**: cross-module overflow を test layer で構造的に検知。`MAX_SAFE_WAIT_SECS` の根拠が future-proof (2100 年でも safe) - **CLAUDE.md `security.md` (`~/.claude/rules/common/security.md`) 拡充**: 「config は user-editable system boundary、必ず sanitize() で値域検証」+ 「Rust の `as` cast は overflow check しない、`checked_add` を併用」を追加。global rule なので全 Rust project に適用される -- **本 PR の効果**: ADR + CLAUDE.md で codified 後、将来同型 bug が発生したら「ADR-038 違反」として一発で指摘可能 +- **本 PR の効果**: ADR + CLAUDE.md で codified 後、将来同型 bug が発生したら「ADR-041 違反」として一発で指摘可能 #### 作業計画 -- [ ] `docs/adr/adr-038-timestamp-arithmetic-safety.md` を新規作成 (Context / Decision / Consequences) -- [ ] CLAUDE.md (project) Architecture Decisions リストに ADR-038 を追加 +- [ ] `docs/adr/adr-041-timestamp-arithmetic-safety.md` を新規作成 (Context / Decision / Consequences) +- [ ] CLAUDE.md (project) Architecture Decisions リストに ADR-041 を追加 - [ ] `~/.claude/rules/common/security.md` に「config sanitize + Rust arithmetic safety」セクション追加 - [ ] (任意) `~/.claude/rules/rust/coding-style.md` に `// SAFETY:` コメント pattern を補足 - [ ] 順位 76/77 が land 済の前提で「Test layer で検証する」を ADR で言及 (前後関係を明示) @@ -85,13 +85,13 @@ #### 完了基準 -- ADR-038 が land し、CLAUDE.md からリンクされる +- ADR-041 が land し、CLAUDE.md からリンクされる - `~/.claude/rules/common/security.md` に Rust arithmetic safety pattern が追加される -- 将来「config 値が arithmetic で overflow」という形の bug が出たら、ADR-038 を引用して一発で指摘できる +- 将来「config 値が arithmetic で overflow」という形の bug が出たら、ADR-041 を引用して一発で指摘できる #### 詰まっている箇所 -- 順位 76/77 land 前後の順番: ADR で test layer に言及するため、test 実装が先のほうが自然。ただし ADR を先 land して「test を ADR-038 に従って実装する」流れも可能。実装時に ROI で判断 (test PR と ADR PR を分けるか、まとめるか) +- 順位 76/77 land 前後の順番: ADR で test layer に言及するため、test 実装が先のほうが自然。ただし ADR を先 land して「test を ADR-041 に従って実装する」流れも可能。実装時に ROI で判断 (test PR と ADR PR を分けるか、まとめるか) - `~/.claude/` 配下の global rule 編集は本 repo 外への影響あり、慎重に (memory `feedback_no_unenforced_rules.md` 「強制力のないルール追加は却下」原則を踏まえる必要あり = 機械検知できないルールは却下されうる)。本 task は ADR + 既存 rule 拡充で「機械検知の根拠」を提供する形なので OK だが、CLAUDE.md security.md の追記内容が「ルールだけ増やす」と評価されないよう、順位 76/77 の test との連携を明示する --- diff --git a/docs/todo8.md b/docs/todo8.md index 152daff8..f74204a4 100644 --- a/docs/todo8.md +++ b/docs/todo8.md @@ -470,6 +470,44 @@ --- +### todo entry の ADR 番号 hardcode 撤廃 — 「ADR-NNN (採番未確定、land 時に確定)」placeholder 採用 (順位 78 番号 conflict 2026-05-16 観測由来) + +> **動機**: 順位 78 (旧 ADR-038 Rust timestamp arithmetic safety、PR #115 T3-1) は entry 登録時 (2026 年序盤) に新規 ADR として ADR-038 を予約のつもりで hardcode していたが、queue 滞留中に Bundle Z 系列の連続採用で `ADR-037 / 038 / 039 / 040` がすべて占有され、2026-05-16 セッションで番号 conflict が顕在化。順位 78 は ADR-041 への振り直しで個別対応済だが、queue 深度と滞留期間の積に比例して同型 conflict が再発する構造リスクが残る。 +> +> **本タスクの位置づけ**: 順位 78 振り直し対応の **再発防止 convention**。採番予約簿 (`docs/adr/RESERVED.md` 等) は管理コストが過剰なため見送り、entry 登録時は placeholder で済ませて land 時の PR で空き番号を確定する運用に統一する (作業着手時に採番するだけの軽量運用、ユーザー判断 2026-05-16)。 +> +> **参照**: 順位 78 entry ([docs/todo5.md](todo5.md) § ADR-041 Rust timestamp arithmetic safety + CLAUDE.md security 拡充)、`~/.claude/rules/common/docs-governance.md` +> +> **実行優先度**: 💎 **Tier 3** — Effort XS。global rule に 2-3 行追記。 + +#### 設計決定 (案) + +- **配置先**: `~/.claude/rules/common/docs-governance.md` の `## Document Lifecycle Classification` 周辺、もしくは新規 `## ADR 採番の運用` section +- **追記内容案** (2-3 行): + - todo entry / planning markdown で新規 ADR を予告する際は、番号を hardcode せず **`ADR-NNN (採番未確定、land 時に確定)`** placeholder で記述する + - land 時の PR で `docs/adr/` を確認し空き番号を確定。同時に当該 entry / markdown / table 内の placeholder を実番号に置換 + - 採番予約簿の運用は行わない (queue 滞留 entry の管理コストが回収可能性に見合わない) +- **本タスクの効果**: queue 滞留 entry が後発 PR の採番と衝突する構造リスクを convention で予防、作業着手時の軽量採番で十分運用可能 + +#### 作業計画 + +- [ ] `~/.claude/rules/common/docs-governance.md` に上記 placeholder 採用方針を 2-3 行追記 +- [ ] 既存 todo entries 内に他の hardcode された ADR 予告番号が残っていないか `grep -rn 'ADR-[0-9]\+ (新規)' docs/` 等で確認 (順位 78 振り直し後の漏れ検出) +- [ ] 派生プロジェクト deploy には影響なし (global rule のみ) +- [ ] 本エントリ削除 + todo-summary.md 行削除 + +#### 完了基準 + +- `docs-governance.md` に ADR 番号 hardcode 撤廃方針が明記される +- 将来 todo entry で新規 ADR を予告する際に placeholder 形式が convention として参照可能 +- 既存 todo に他の hardcode 予告番号が残っていないことが grep で確認される + +#### 詰まっている箇所 + +- ルール追加自体は機械検知不可だが、`feedback_no_unenforced_rules.md` 例外 = 既存実践の明文化 + 簡素な代替手順を提示。grep ベースの後付け検証も容易 (`grep -nE 'ADR-[0-9]+ \(新規\)' docs/`) + +--- + ## 既知課題 (記録のみ、本セッションで未対応) ### post-merge-feedback workflow が長時間 stale marker を残す問題 (PR #119 marker observed 2026-05-15)