Skip to content

refactor(claude): agent fleet を fleet/agents へ分離・右サイズ化 (12体)#36

Merged
gotomts merged 1 commit into
mainfrom
claude/japanese-request-c96XP
Jun 6, 2026
Merged

refactor(claude): agent fleet を fleet/agents へ分離・右サイズ化 (12体)#36
gotomts merged 1 commit into
mainfrom
claude/japanese-request-c96XP

Conversation

@gotomts

@gotomts gotomts commented Jun 6, 2026

Copy link
Copy Markdown
Owner

概要

DOT-45 (A2)。vault 設計 projects/ai-org/chat/agent-fleet/design-notes.md(真実源)に従い agent fleet を改修。A1 (#35) で AGENTS.md に fleet 前提を入れた後の実体化フェーズ。人間レビュー後・手動マージ(auto-merge しない)。

変更内容

roster(14 → 12 体)

  • 移動: claude/agents/claude/fleet/agents/(個人層 → AI 組織専用層・非 symlink)
  • 改名: developer-*dev-*reviewer-*rev-*pr-publisher 据え置き
  • 統合: developer-reactdeveloper-nextjsdev-react(Next.js 固有は next-* スキル)/ developer-nodejsdeveloper-nestjsdeveloper-honodev-nodejs
  • 新規: dev-react-native(Expo/RN)、dev-infra(IaC/Docker/CI/PaaS)
  • 削除: developer-ruby(実利用なし・generic フォールバック。人手確認済み)
  • model: rev-*opus に格上げ(品質ゲート強化)、dev-*sonnet 据え置き、pr-publisher 据え置き

skills: allow-list(skills-lock.json の source repo 別にマッピング)

agent skills 出所
dev-flutter 19 flutter/skills + dart-lang/skills
dev-react-native 17 expo/skills + vercel-react-native-skills
dev-react 7 next-skills + vercel react/web 系
dev-nodejs 1 yusukebe/hono-skill
dev-go / dev-rust / dev-infra / dev-generic 0 設計どおり当面なし

波及(旧名参照の追従結果)

  • nix/modules/home/claude.nix: .claude/agents symlink を除去(fleet 層は非 symlink。remote 時のみ inject-fleet.sh~/.claude/agents へ inject)。コメントも二層構造に追従
  • claude/skills/feature-team/: SKILL.md / roles/parent.md / README.md / roles/_common.md の roster 表・subagent_type 参照・図を新名/新構成へ改書
  • docs/superpowers/plans/2026-05-01-wt-cleanup.md: 旧 developer-generic 参照を追従
  • 全リポジトリ grep で旧 developer-* / reviewer-* トークンが残っていないことを確認済み

触っていないもの(ガードレール遵守)

  • claude/fleet/inject-fleet.sh・skills 本体は不変(hook は既に fleet/agents 対応済み)

前提との差異

  • secure-coding スキル: 設計では「全 dev 共通」の継続論点だが、claude/fleet/skills に未収録のため skills: に追加していない(存在しないスキル名を書かない)。公式・自作で用意され次第、別タスクで全 dev に追加するのが妥当。
  • dev-go / dev-rust / dev-infra は設計どおり当面スキルなし(組み込み知識+generic フォールバックで動作)。

完了条件の確認

  • ✅ agents が claude/fleet/agents に dev-/rev- で存在、model・skills 設定済み
  • ✅ claude.nix の旧 symlink 除去(switch 適用後に日常の ~/.claude/agents から fleet が消えて clean になる)
  • ✅ 旧名参照の追従

https://claude.ai/code/session_015R1g7uW4DpstGRaqSDgMsG


Generated by Claude Code

Summary by CodeRabbit

リリースノート

  • 新機能

    • Flutter、React Native、インフラストラクチャ向けの新しい専門化されたエージェントを追加
  • 改善

    • エージェント識別子の命名規則を統一(より簡潔で分かりやすい形式に)
    • 開発ガイドラインドキュメントを再編成・更新し、各テクノロジーの実装ベストプラクティスを明確化
    • レビュープロセスの効率化に向けた各エージェント役割の最適化

vault 設計 (projects/ai-org/chat/agent-fleet) に従い agent fleet を改修:

- 移動: claude/agents → claude/fleet/agents (AI 組織専用層・非 symlink)
- 改名: developer-* → dev-*、reviewer-* → rev-*
- 統合: react+nextjs → dev-react / nodejs+nestjs+hono → dev-nodejs
- 新規: dev-react-native、dev-infra
- 削除: developer-ruby (実利用なし・generic フォールバック)
- model: rev-* を opus に格上げ (品質ゲート強化)、dev-* は sonnet 据え置き
- skills: dev-flutter/dev-react-native/dev-react/dev-nodejs の frontmatter に
  fleet/skills の許可リストを追加 (source repo 別にマッピング)

波及:
- nix/modules/home/claude.nix: .claude/agents symlink を除去 (fleet 層は非 symlink、
  remote 時のみ inject-fleet.sh が ~/.claude/agents へ inject)
- feature-team SKILL.md/parent.md/README.md/_common.md: roster 表・subagent_type
  参照を新名・新構成へ追従
- docs プランの旧 agent 名参照を追従

DOT-45
@coderabbitai

coderabbitai Bot commented Jun 6, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

Claude エージェント fleet 全体の命名体系を developer-/reviewer- から dev-/rev- へ統一し、新規インフラ・バックエンド専門エージェントを追加。Feature-team オーケストレーション層全体で参照を更新し、reviewer モデルを sonnet から opus に切り替え。

Changes

エージェント Fleet 再編と命名統一

Layer / File(s) Summary
既存エージェント識別子・モデル更新
claude/fleet/agents/dev-flutter.mddev-generic.mddev-go.mddev-rust.mdrev-performance.mdrev-quality.mdrev-security.md
dev-flutter の name と skills を更新。dev-generic・dev-go・dev-rust の name を dev-* 系に統一。rev-performance・rev-quality・rev-security の name を rev-* に、model を opus に変更し、委譲先参照を rev-* に置換。
新規特化版エージェント定義
claude/fleet/agents/dev-infra.mddev-nodejs.mddev-react.mddev-react-native.md
dev-infra(IaC/DevOps:CI/CD・Docker・Terraform・PaaS 設定)、dev-nodejs(NestJS v11・Hono v4 バックエンド JS/TS)、dev-react(React 19+・Next.js App Router)、dev-react-native(Expo・React Native モバイル)の 4 つを新規作成。各々で専門領域・実装パターン・テスト戦略・依存管理・落とし穴・セルフチェック・報告フォーマットを定義。
Feature-team オーケストレーション & ルーティング更新
claude/skills/feature-team/README.mdSKILL.mdroles/_common.mdroles/parent.md
Subagent 起動時の subagent_type を developer-/reviewer- から dev-/rev- に統一。Developer 選定テーブルを 10 種から 7 種 + generic へ再編。Phase 3 の必須観点を rev-quality で統一。CONTEXT/ADR 候補スクリーニング委譲先を rev-quality に明記し、PR 作成を pr-publisher に専任。
環境設定・ドキュメント更新
docs/superpowers/plans/2026-05-01-wt-cleanup.mdnix/modules/home/claude.nix
Plans で Phase 4-A dispatcher 先を dev-generic に更新。Nix 設定で claude/fleet symlink・inject-fleet.sh 注入対象の説明を {skills,agents} に更新。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

  • gotomts/kissasoft-mcp#84: Agent fleet の再編(developer-/reviewer- → dev-/rev- 命名統一、claude/fleet への移行、frontmatter model/skills 更新)が PR の主要変更と一致。
  • gotomts/kissasoft-mcp#85: Feature-team ドキュメント更新(parent.md・_common.md の rev-* 名称・pr-publisher 動作)が PR で実施されている点で関連。

Poem

🐰 Fleet の名札を付け替えて、

dev と rev へ揃えました。

インフラ、Node、React、モバイル—

新しい仲間たちもようこそ!

opus の目で品質守ります ✨

🚥 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 PRタイトルは主な変更内容(agent fleet の再編、エージェント名の変更、体数の調整)を適切に要約しており、ソースコード/ドキュメント全体の変更意図と一致している。
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.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/japanese-request-c96XP

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
claude/fleet/agents/dev-nodejs.md (1)

1-214: ⚠️ Potential issue | 🟡 Minor

claude/AGENTS.md の「Repository Structure(リポジトリ構造)」更新が必要です
claude/AGENTS.md には dev-nodejs / dev-react / dev-react-native / dev-infra の記載がなく、Repository Structure(リポジトリ構造) セクション自体も見当たりません。新規エージェント(claude/fleet/agents/dev-nodejs.md など)を追加したなら、該当する「Repository Structure」セクションを作成/更新してエージェントを明示してください。

🤖 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 `@claude/fleet/agents/dev-nodejs.md` around lines 1 - 214, Add or update the
"Repository Structure" section in AGENTS.md to explicitly list the new agents
(dev-nodejs, dev-react, dev-react-native, dev-infra) and describe their roles;
include a short bullet/paragraph for each agent naming its runtime/framework
scope (e.g., dev-nodejs -> Node.js 20+ backend, NestJS/Hono support), where to
find their implementation (reference by agent name), and a one-line note about
which agent to use for Next.js or browser frontends (dev-react). Ensure the
section header is exactly "Repository Structure" and that each agent name
appears verbatim so future reviewers can discover and maintain these entries.

Source: Learnings

🤖 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 `@claude/fleet/agents/dev-infra.md`:
- Around line 1-7: Add the new agent "dev-infra" to the master agent registry
and SSOT by updating AGENTS.md and claude/AGENTS.md: insert an entry for
dev-infra that mirrors the front-matter from claude/fleet/agents/dev-infra.md
(name: dev-infra, short description, tools list, model, color) into the Agents
list and the Repository Structure/Agent responsibilities section, include the
invocation note ("Invoked from `feature-team`...") and the scope
(“infrastructure / DevOps changes — IaC, Docker, CI/CD, PaaS deploy config”),
and mark the document change as pending user approval per the original comment.

---

Outside diff comments:
In `@claude/fleet/agents/dev-nodejs.md`:
- Around line 1-214: Add or update the "Repository Structure" section in
AGENTS.md to explicitly list the new agents (dev-nodejs, dev-react,
dev-react-native, dev-infra) and describe their roles; include a short
bullet/paragraph for each agent naming its runtime/framework scope (e.g.,
dev-nodejs -> Node.js 20+ backend, NestJS/Hono support), where to find their
implementation (reference by agent name), and a one-line note about which agent
to use for Next.js or browser frontends (dev-react). Ensure the section header
is exactly "Repository Structure" and that each agent name appears verbatim so
future reviewers can discover and maintain these entries.
🪄 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: c4a6a7d1-0e19-465e-9f82-c0c257094180

📥 Commits

Reviewing files that changed from the base of the PR and between 16c1f96 and e1dc862.

📒 Files selected for processing (24)
  • claude/agents/developer-hono.md
  • claude/agents/developer-nestjs.md
  • claude/agents/developer-nextjs.md
  • claude/agents/developer-nodejs.md
  • claude/agents/developer-react.md
  • claude/agents/developer-ruby.md
  • claude/fleet/agents/dev-flutter.md
  • claude/fleet/agents/dev-generic.md
  • claude/fleet/agents/dev-go.md
  • claude/fleet/agents/dev-infra.md
  • claude/fleet/agents/dev-nodejs.md
  • claude/fleet/agents/dev-react-native.md
  • claude/fleet/agents/dev-react.md
  • claude/fleet/agents/dev-rust.md
  • claude/fleet/agents/pr-publisher.md
  • claude/fleet/agents/rev-performance.md
  • claude/fleet/agents/rev-quality.md
  • claude/fleet/agents/rev-security.md
  • claude/skills/feature-team/README.md
  • claude/skills/feature-team/SKILL.md
  • claude/skills/feature-team/roles/_common.md
  • claude/skills/feature-team/roles/parent.md
  • docs/superpowers/plans/2026-05-01-wt-cleanup.md
  • nix/modules/home/claude.nix
💤 Files with no reviewable changes (6)
  • claude/agents/developer-hono.md
  • claude/agents/developer-react.md
  • claude/agents/developer-nextjs.md
  • claude/agents/developer-nodejs.md
  • claude/agents/developer-ruby.md
  • claude/agents/developer-nestjs.md

Comment on lines +1 to +7
---
name: dev-infra
description: Use when implementing infrastructure / DevOps changes — IaC (Terraform/OpenTofu), Docker, CI/CD (GitHub Actions), and deploy config for PaaS targets (Google App Engine, Firebase, Vercel, Cloudflare). Invoked from `feature-team` for sub-issue implementation, or as a standalone single-task agent for infra work. Not for application feature code (use the language-specific dev-* agent).
tools: Bash, Edit, Write, Read, Glob, Grep, NotebookEdit, NotebookRead, TodoWrite, WebFetch, WebSearch, BashOutput, KillShell, LSP
model: sonnet
color: orange
---

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Description: AGENTS.md に dev-infra の記載があるか、また claude/fleet/agents/ ディレクトリ構造の記載があるかを確認

# AGENTS.md の存在確認と dev-infra の言及確認
if [ -f "AGENTS.md" ]; then
  echo "=== AGENTS.md exists ==="
  
  echo -e "\n=== Checking for dev-infra references ==="
  rg -n "dev-infra" AGENTS.md || echo "No dev-infra references found"
  
  echo -e "\n=== Checking for claude/fleet/agents references ==="
  rg -n "claude/fleet" AGENTS.md || echo "No claude/fleet references found"
  
  echo -e "\n=== Checking agent roster count/list ==="
  rg -nC3 "agent.*fleet|12.*agent|エージェント.*12" AGENTS.md || echo "No roster count found"
else
  echo "AGENTS.md not found in repository root"
fi

# claude/AGENTS.md の確認(claude/ 配下にある可能性)
if [ -f "claude/AGENTS.md" ]; then
  echo -e "\n=== claude/AGENTS.md exists ==="
  
  echo -e "\n=== Checking for dev-infra references ==="
  rg -n "dev-infra" claude/AGENTS.md || echo "No dev-infra references found"
  
  echo -e "\n=== Checking for fleet/agents references ==="
  rg -n "fleet/agents" claude/AGENTS.md || echo "No fleet/agents references found"
fi

Repository: gotomts/dotfiles

Length of output: 1040


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) リポジトリ内で dev-infra の参照箇所を探索
echo "=== rg 'dev-infra' (全repo) ==="
rg -n "dev-infra" . || true

# 2) AGENTS.md の Repository Structure 周辺を確認
echo
echo "=== AGENTS.md: Repository Structure 近辺 ==="
if [ -f "AGENTS.md" ]; then
  # セクション見出しっぽい行を含めて近辺だけ表示
  rg -n "Repository Structure" AGENTS.md || true
  # 可能ならその周辺を抽出
  rg -n --context 5 "Repository Structure" AGENTS.md || true
fi

# 3) agent 一覧/ロスターっぽい語を探索(AGENTS.md, claude/AGENTS.md)
for f in AGENTS.md claude/AGENTS.md; do
  if [ -f "$f" ]; then
    echo
    echo "=== $f: agent/エージェント一覧系の語 ==="
    rg -n --ignore-case "agent(s)?|エージェント|一覧|roster|fleet" "$f" || true
  fi
done

# 4) dev-infra が属する claude/fleet/agents/ の中で、名前(name:)がどこまで並んでいるか軽く確認
echo
echo "=== claude/fleet/agents/*.md の frontmatter(name) 一覧(可能なら) ==="
if [ -d "claude/fleet/agents" ]; then
  fd -e md . claude/fleet/agents | head -n 50 | sed 's#^./##' >/tmp/agent_md_files.txt || true
  # 全て出力するのではなく、frontmatter の name: のみ拾う
  while read -r p; do
    echo "--- $p ---"
    rg -n "^name:\s*" "$p" || true
  done < /tmp/agent_md_files.txt
fi

Repository: gotomts/dotfiles

Length of output: 3153


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# 1) リポジトリ内で dev-infra の参照箇所を探索
echo "=== rg 'dev-infra' (全repo) ==="
rg -n "dev-infra" . || true

# 2) AGENTS.md の Repository Structure 周辺を確認
echo
echo "=== AGENTS.md: Repository Structure 近辺 ==="
if [ -f "AGENTS.md" ]; then
  # セクション見出しっぽい行を含めて近辺だけ表示
  rg -n "Repository Structure" AGENTS.md || true
  # 可能ならその周辺を抽出
  rg -n --context 5 "Repository Structure" AGENTS.md || true
fi

# 3) agent 一覧/ロスターっぽい語を探索(AGENTS.md, claude/AGENTS.md)
for f in AGENTS.md claude/AGENTS.md; do
  if [ -f "$f" ]; then
    echo
    echo "=== $f: agent/エージェント一覧系の語 ==="
    rg -n --ignore-case "agent(s)?|エージェント|一覧|roster|fleet" "$f" || true
  fi
done

# 4) dev-infra が属する claude/fleet/agents/ の中で、名前(name:)がどこまで並んでいるか軽く確認
echo
echo "=== claude/fleet/agents/*.md の frontmatter(name) 一覧(可能なら) ==="
if [ -d "claude/fleet/agents" ]; then
  fd -e md . claude/fleet/agents | head -n 50 | sed 's#^./##' >/tmp/agent_md_files.txt || true
  # 全て出力するのではなく、frontmatter の name: のみ拾う
  while read -r p; do
    echo "--- $p ---"
    rg -n "^name:\s*" "$p" || true
  done < /tmp/agent_md_files.txt
fi

Repository: gotomts/dotfiles

Length of output: 3153


dev-infra 追加に伴う AGENTS.md/claude/AGENTS.md 記載漏れを確認

  • dev-infraclaude/fleet/agents/dev-infra.md 以外に、AGENTS.md および claude/AGENTS.md へは反映されていません。
  • 新規エージェントとして claude/AGENTS.md(SSOT)のエージェント一覧/Repository Structure 等に dev-infra と責務を追記してください(ドキュメント更新はユーザー承認前提)。
🤖 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 `@claude/fleet/agents/dev-infra.md` around lines 1 - 7, Add the new agent
"dev-infra" to the master agent registry and SSOT by updating AGENTS.md and
claude/AGENTS.md: insert an entry for dev-infra that mirrors the front-matter
from claude/fleet/agents/dev-infra.md (name: dev-infra, short description, tools
list, model, color) into the Agents list and the Repository Structure/Agent
responsibilities section, include the invocation note ("Invoked from
`feature-team`...") and the scope (“infrastructure / DevOps changes — IaC,
Docker, CI/CD, PaaS deploy config”), and mark the document change as pending
user approval per the original comment.

Source: Learnings

@gotomts gotomts merged commit be0fa06 into main Jun 6, 2026
2 checks passed
@gotomts gotomts deleted the claude/japanese-request-c96XP branch June 6, 2026 18:34
gotomts added a commit that referenced this pull request Jun 7, 2026
* feat(claude): default role で fleet 層をローカル展開 (DOT-45 改訂追従)

DOT-45 ブリーフ改訂「AI 組織開発を default のベースにする」に追従。A2 (PR #36)
は旧方針 (fleet 非 symlink・remote inject のみ) で実装・マージ済みのため、その後の
改訂を本 PR で反映する。

- nix/modules/home/claude.nix を role 対応に:
  - default role: claude/fleet/agents を ~/.claude/agents に symlink、
    claude/fleet/skills を個人層 (claude/skills) とマージして ~/.claude/skills に
    per-entry symlink で展開 (activation。2 source dir を 1 symlink で束ねられず、
    かつ eval 時に working tree を読むと CI が壊れるため activation 方式)
  - sub-1 等の別 role: 個人層スキルのみ。fleet は展開しない
  - remote の inject-fleet.sh は role 非依存・本モジュールと独立 (不変)
- AGENTS.md: リポジトリ構造 (agents は claude/fleet/agents 12 体へ移動) と
  fleet 配送モデル (default ローカル展開 / 別 role 除外 / remote inject) を改訂

DOT-45

* style(claude): claude.nix のコメントを削減・チケットキーを除去

* docs(agents): AGENTS.md からチケットキー参照を除去

---------

Co-authored-by: Claude <noreply@anthropic.com>
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.

2 participants