/rcc:migrating-agent-systemsfrom rcc
Detects a project's Claude Code agent system maturity and routes to the appropriate setup or migration workflow. Invoke when the user says 'setup agent', 'migrate agent system', 'configure claude code', or 'add agent system'.
Ships in rcc. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Migrating agent systems IS routing to the correct workflow based on project state.
Detect whether an agent system already exists, then invoke the appropriate skill chain. This skill is a thin router — all logic lives in the specialized skills.
Core principle: Detect, don't assume. Route, don't implement.
Pattern: Tree
Handoff: auto-invoke
Next: analyzing-agent-systems | brainstorming-workflows
Chain: main
Follow task initialization protocol.
Tasks:
.rcc/config.ymlAnnounce: "Created 4 tasks. Starting execution..."
Goal: Determine the project's agent system maturity level, not just presence/absence.
Check for Claude Code components:
CLAUDE.md (project root).claude/ directory.claude/rules/ directory.claude/settings.json.claude/skills/ directoryCheck for other AI tool configurations:
.cursorrules (Cursor).github/copilot-instructions.md (GitHub Copilot).windsurfrules (Windsurf).aider.conf.yml (Aider)Check for existing conventions:
.editorconfig.eslintrc*, .prettierrc*, ruff.toml, etc.).github/workflows/, .gitlab-ci.yml)Maturity classification:
| Level | Criteria | Route |
|---|---|---|
| None | No components found | → brainstorming-workflows |
| Seed | Only other AI tool configs exist (.cursorrules, etc.) — no Claude Code components | → brainstorming-workflows (import existing configs as starting context) |
| Partial | Has CLAUDE.md or rules but missing skills/hooks | → analyzing-agent-systems |
| Established | Has CLAUDE.md + rules + at least one skill or hook | → analyzing-agent-systems |
For Seed level: Record which other AI configs exist and their content summary — these become input for the brainstorming step to avoid re-discovering known conventions.
Verification: Clear maturity classification with evidence (which components found, which missing).
.rcc/config.ymlGoal: Ensure the project has a .rcc/config.yml recording migration state and key decisions. Idempotent — on re-runs, this prevents redoing work. Also migrate legacy folders if present.
Read references/config-schema.md for the full schema and field semantics.
Process:
RCC v11 moved artifact output from docs/agent-system/ + docs/validation-reports/ into .rcc/. If legacy folders exist, migrate them first.
Detect legacy folders:
test -d docs/agent-system && echo "legacy-agent-system"
test -d docs/validation-reports && echo "legacy-validation"
If either exists:
List contents to the user:
偵測到舊版路徑。RCC v11 起產出改寫到
.rcc/。建議遷移:
docs/agent-system/→.rcc/(找到 N 份檔案)docs/validation-reports/→.rcc/validation/(找到 M 份檔案)要執行遷移嗎?(預設:是)
If confirmed:
mkdir -p .rcc/validationdocs/agent-system/:
git ls-files <file> returns path) → git mv <file> .rcc/<basename>mv <file> .rcc/<basename>docs/validation-reports/:
.rcc/validation/<basename>docs/agent-system/archive/ exists, move wholesale: git mv docs/agent-system/archive .rcc/archive (or mv for untracked)rmdir docs/agent-system docs/validation-reports after emptyingdocs/ is now empty, rmdir docs/ tooIf declined: record in decisions_log that legacy folders were kept, and note this skill will not re-offer migration unless forced.
Report to user: summary of files moved with tracked/untracked counts.
.rcc/config.ymlCheck .rcc/config.yml exists.
If exists: Load it. Report to user:
偵測到
.rcc/config.yml:上次遷移{migration.last_at},使用 rcc{migration.last_rcc_version}。本次 rcc 版本為{current}。
- release automation:
{release_automation.decision}/{release_automation.tool}- safety settings:
{settings_scope.safety_bypass}
last_rcc_version < current: offer re-migration to pull newer patternsconfig_version: 1 with a models: block: delete the block and bump to config_version: 2 (component parameters are not recorded in config; see references/config-schema.md)migration.completed: true and versions match: ask if user wants to re-run anyway or proceed to specific taskIf missing: Create .rcc/ directory (if not already by 2a) and write a new config.yml. Ask the user (one round of questions):
要記錄以下決策到 .rcc/config.yml 嗎?
1. Release automation(版號自動化):release-please / semantic-release / 跳過
2. 安全規則 (safety_bypass) 要放在:
- `.claude/settings.json`(團隊共享,checked in)[預設]
- `.claude/settings.local.json`(個人,gitignored)
- `~/.claude/settings.json`(使用者全域)
(不詢問、不記錄模型或 effort——這些由元件 frontmatter 控制,預設 inherit session model。)
Write config.yml with user answers + detected state from Task 1. Populate decisions_log with each confirmed answer. If 2a migrated folders, add a log entry recording that.
Also ensure .gitignore does not exclude .rcc/ (config.yml must be tracked).
Verification: Legacy folders migrated or decline recorded. .rcc/config.yml exists, all key fields populated, user has confirmed or declined each decision.
Goal: Analyze CLAUDE.md and rules content, propose splitting into appropriate locations.
Skip condition: If maturity is None or Seed, skip this task (no existing content to refactor).
Process:
.claude/rules/*.md| Category | Criteria | Action |
|---|---|---|
| Abstract directive (what/why) | Broad, applies to all work | Keep in CLAUDE.md |
| Path-related directive | Targets specific file types or directories | Extract to path-scoped rule |
| Procedural content (how/steps) | Multi-step process, code blocks as instructions | Extract to skill |
| Outdated/duplicate | Conflicts with or duplicates other content | Delete |
## Rules Refactoring Proposal
| # | Source | Summary | Category | Action | Target |
|---|--------|---------|----------|--------|--------|
writing-rules or writing-skills for each itemVerification: User has confirmed or skipped the proposal.
Goal: Invoke the correct starting skill based on maturity level.
Language recommendation (all routes): Before routing, advise the user: "All skills, rules, CLAUDE.md, and prompt files should be written in English for best model performance. Use your native language only in CLAUDE.md communication rules (e.g., 'respond in Traditional Chinese'). Shall I proceed in English for all agent system files?"
If None:
brainstorming-workflows skillIf Seed (other AI configs found):
.cursorrules, copilot instructions, etc.)brainstorming-workflows skill, passing the config summary as pre-loaded contextIf Partial or Established:
analyzing-agent-systems skillVerification: Correct skill invoked based on maturity level, with appropriate context passed.
These thoughts mean you're rationalizing. STOP and reconsider:
All of these mean: You're about to bypass the specialized skills. Route correctly.
| Excuse | Reality |
|---|---|
| "Skip detection" | Hidden configs exist. Always check. |
| "Build without analyzing" | Existing systems have history. Analyze first. |
| "Handle here" | This skill is a router. Logic lives in specialized skills. |
| "Skip brainstorming" | Assumptions about workflows lead to misfit systems. |
| "Ignore other AI configs" | .cursorrules and copilot instructions contain validated conventions worth importing. |
| "Has CLAUDE.md = established" | Quality matters more than presence. A 3-line CLAUDE.md is seed-level at best. |
| Step | Skill | Purpose |
|---|---|---|
| 0 | analyzing-agent-systems | Scan + 11-category weakness detection (if partial/established) |
| 1 | brainstorming-workflows | Role-based workflow exploration + simplicity assessment |
| 2 | planning-agent-systems | Architecture flowchart + dependency-driven component planning |
| 3 | applying-agent-systems | Invoke writing-* skills per phase |
| 4 | refactoring-agent-systems | Review + cleanup |
.rcc/config.yml schema, field semantics, and read/write table per skillWhat SKILL.md sets; muted values are Claude Code's defaults
23 skills in this plugin
/advising-architectureValidates component-type choices for agent system work, classifying knowledge as CLAUDE.md vs rule vs skill vs agent vs hook and checking for conflicts. Use when starting any skill/agent/rule workflow to validate approach. Use when classifying knowledge type. Use when checking for component conflicts./analyzing-agent-systemsScans project structure and agent system components, runs 11-category weakness analysis, and produces actionable restructuring recommendations. Use when analyzing an existing agent system for weaknesses. Use when user says "analyze agent system", "check agent setup", "audit agent config". Use when called by migrating-agent-systems or refactoring-skills./npx claudepluginhub wayne930242/reflexive-claude-code --plugin rccOther plugins' skills for the same job