Repository navigation
refactor: 実装系 skill / agent を LOOP_PROTOCOL 用に適合 (phase C-2) - #18
Merged
Merged
Conversation
PR #12 のトリアージ判定に従い、流用してきた実装系 3 ファイルを PR #17 で確立した「SubAgent = 役割、Skill = 作業手順」モデルで書き直す。 スコープ: - .claude/skills/implement-issue/SKILL.md (711 → 223 行) - .claude/agents/implementation-worker.md (110 → 35 行) - .claude/agents/test-runner.md (173 → 146 行) 主な変更: ### implement-issue (skill) - LOOP_PROTOCOL 用に再設計 (pnpm typecheck / lint / test / build) - worktree は `.claude/worktrees/issue-<番号>-<slug>/` に統一 - TDD + BDD (Vitest + GIVEN/WHEN/THEN) の実装方針を明示 - 出力契約 IMPLEMENT_RESULT_V1 を定義 - 削除した残骸: - Rules Loading Preflight (.agents/rules/ ベース、PR #15 で不採用方針) - shared-agent-skills-governance 参照 - .kiro/steering/ 参照 - wip/ ベースの worktree 配置 - just check / pytest / uv run pytest - ulimit -v 4194304 (Python memory hazard 対策、不要) - KindleAudiobookMakeSystem 絶対パスのハードコード - human-confirm 経由制御 / decision-only fallback - proposal_only / gemini-cli-headless-delegation (今回は範囲外) - KH from Issue #1215 等の他リポジトリ Issue 番号 ### implementation-worker (agent) - 薄い役割定義に (110 → 35 行) - 作業手順は implement-issue skill に委譲 - .agents/rules/ inline 注入機構 (Rules Injection) を撤去 - 「実装作業を担当する役割」として再定義 ### test-runner (agent) - LOOP_PROTOCOL 用に再設計 - 許可コマンド: pnpm typecheck/lint/test/build + grep/rg/ls/cat/test -f/gh pr view - just check / pytest / ulimit 等の Python プロジェクト前提を撤去 - TEST_VERDICT_MACHINE v1 マーカーと YAML 報告フォーマットは維持 - Mergeable 検知 (CONFLICTING/DIRTY/BLOCKED) は維持 検証: - pnpm typecheck / lint / test (5) / build すべて通過 - 残骸 grep 全件 0 件 (.agents/rules/ / shared-agent-skills-governance / KindleAudiobook / wip/ / .kiro/ / .codex/ / uiautomation / pywinauto / gpt-5 / CodexCLI / just check / pytest / github-ops- / human-confirm) Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
squne121
commented
May 19, 2026
… から削除、PR 起票を open-pr へ委譲 PR #18 のレビューコメント (3265425040, 3265459750) を反映する。 ## 局所修正 - implement-issue/SKILL.md L16: `## Use When` セクションを削除 description (frontmatter) に既に「いつ使うか」が明記されており、本文への 再記述はコンテクスト汚染 - implement-issue/SKILL.md L126: PR 起票ロジックを open-pr skill 委譲に変更 PR 本文テンプレ・publish ゲート・idempotency チェック・Closes/Refs は open-pr の責務であり、implement-issue が `gh pr create` を直接呼ぶのは 責務違反 ## 横断適用 (前回方針: 同パターンは同 PR で fix) 私が書いた skill のうち `## Use When` セクションを持っていた全 5 ファイルから 削除: - create-issue/SKILL.md - edit-issue/SKILL.md - issue-contract-review/SKILL.md - review-issue/SKILL.md - implement-issue/SKILL.md (ssot-discovery は元から `## Use When` を持たず該当なし) ## スコープ外 (各フェーズで対応) 以下 6 skill は同じ `## Use When` 重複パターンがあるが、それぞれの 適合 PR で扱う: - pr-review-judge (C-3) - adversarial-review は導入しない方針 (削除済み) - impl-review-loop (C-4) - issue-refinement-loop (C-1 で除外、C-4 で扱う) - post-merge-cleanup (C-4) - open-pr (C-4) - gemini-cli-headless-delegation (Issue #14) ## 検証 - pnpm typecheck / lint / test (5) / build すべて通過 - implement-issue: 223 → 200 行 Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Owner
Author
|
レビュー指摘 2 件を反映 + 横断パターンも同 PR で fix しました( コメント別の対応
横断適用(前回方針: 同パターンは同 PR で fix)
(ssot-discovery は元から スコープ外(各フェーズ PR で対応)以下 6 skill には同じ重複パターンがあるが、それぞれの適合 PR で扱う:
検証
差し戻し・追加修正があればお知らせください。 |
This was referenced May 19, 2026
squne121
added a commit
that referenced
this pull request
May 19, 2026
#22) * refactor: 補助系 (codebase-investigator) を LOOP_PROTOCOL 用に適合 (phase C-5) 設計記述・責務境界の長い説明を agent ファイルから削除(PR #21 の方針: 設計は docs/dev/agent-skill-boundaries.md に集約、agent / skill は作業手順に専念)。 スコープ: - .claude/agents/codebase-investigator.md (93 → 64 行) 主な変更: - 「責務境界: ローカルコード調査専念」セクション削除(設計記述) - 「役割と責務」「制約」の冗長記述削除(description と disallowedTools で表現) - web-researcher への委任フロー → gemini-cli-headless-delegation 経由 (呼び出し元の責務として簡素化) - 入力契約をコンパクトに web-researcher は保留方針 (PR #12) のため本 PR では触らない。 検証: pnpm typecheck / lint / test (5) / build すべて通過 これで Phase C (流用 skill / agent の LOOP_PROTOCOL 適合) が完了: - C-1: Issue 管理系 (PR #17 マージ済み) - C-2: 実装系 (PR #18 マージ済み) - C-3: レビュー系 (PR #19 マージ済み) - C-4a: open-pr + post-merge-cleanup (PR #20 マージ済み) - C-4b: impl-review-loop + issue-refinement-loop (PR #21 マージ済み) - C-5: 補助系 (本 PR) 次は Phase D (統合検証)。 Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * refactor: PR #22 レビュー指摘を反映 — codebase-investigator は必ず gemini-cli-headless-delegation 経由で委譲 PR #22 のレビュー指摘 r3266005474 を反映する。 > .claude/agents/codebase-investigator.md も gemini-cli-headless-delegation で必ず作業を委譲するようにして。 実調査 (Read / Grep / Glob による大規模スキャン) はすべて gemini-cli-headless-delegation skill 経由で Gemini に委譲する設計に変更。本 SubAgent 自身はリクエスト構築 + 委譲 + 結果整形に専念する。 主な変更: - tools から Grep / Glob を削除 (disallowedTools に移動して技術的にもブロック) - 残った tools: Bash (wrapper 起動) + Read (結果読み取り) - 振る舞いセクションを「実調査は Gemini に委譲」と明示 - 入力モードを 2 種類定義し、それぞれの delegation_request_v1 JSON 雛形を例示 - ローカル調査モード: tool_profile=local_asset_research, role=code_research - gh 調査モード: tool_profile=github_research, role=github_research, gh_commands で gh issue list を委譲実行 - 報告形式に「委譲メタ」(wrapper exit / model / request path) を追加 - 委譲不可時 (wrapper ok: false、preflight 失敗) は fail-close (自力代替調査しない) 検証: pnpm typecheck / lint / test (5) / build すべて通過 Co-Authored-By: Claude Sonnet 4.6 <[email protected]> --------- Co-authored-by: Claude Sonnet 4.6 <[email protected]>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
PR #12 のトリアージ判定 + PR #17 で確立した「SubAgent = 役割、Skill = 作業手順、関係は『役割が手順を使う』」モデルに従い、流用してきた実装系 3 ファイルを LOOP_PROTOCOL 用に書き直しました。
.claude/skills/implement-issue/SKILL.md.claude/agents/implementation-worker.md.claude/agents/test-runner.md差分: +226 行 / -816 行(590 行削減)
主な変更
implement-issueskillLOOP_PROTOCOL 用に Procedure を再設計:
.claude/worktrees/issue-<番号>-<slug>/)pnpm typecheck && pnpm lint && pnpm test && pnpm build)--no-verify禁止 /git add -A禁止)出力契約
IMPLEMENT_RESULT_V1を定義。implementation-workeragent「実装作業の役割」 として薄い役割定義に。手順は
implement-issueskill に委譲。test-runneragent許可コマンドを pnpm + Vitest 中心に再設計。
TEST_VERDICT_MACHINE v1マーカーと YAML 報告フォーマット、Mergeable 検知(CONFLICTING / DIRTY / BLOCKED)は維持。除去した残骸(grep 全件 0 件確認)
.agents/rules/参照(PR feat: per-directory CLAUDE.md + ssot-discovery skill 新設 #15 で不採用方針)shared-agent-skills-governance参照.kiro/steering/参照wip/ベースの worktree 配置just check/pytest/uv run pytestulimit -v 4194304(Python memory hazard 対策、不要)KindleAudiobookMakeSystem絶対パスのハードコードhuman-confirm経由制御 /decision-onlyfallbackproposal_only/gemini-cli-headless-delegation連携(スコープ外)検証
pnpm typecheck✅pnpm lint✅pnpm test✅ (4 files / 5 tests)pnpm build✅関連
レビュー観点
implement-issueskill の Procedure が LOOP_PROTOCOL の運用に過不足ないかimplementation-workeragent が「役割」として最小か(手順が漏れていないか・冗長でないか)test-runneragent の許可コマンドリストが運用上十分かIMPLEMENT_RESULT_V1/TEST_VERDICT出力契約が下流(pr-review-judge / impl-review-loop)と整合するか🤖 Generated with Claude Code