SuperAPI AI Directory

update-team

Agents & models

View repository

Updated 10-15 20:04

About this skill

Update Team

Analyze the project context, infer suitable agent roles, and align .codex/agents/ with the inference results. All operations areidempotent— agents that already exist and are still required by the inference are skipped directly.

Contract

Single responsibility: manage the current project's .codex/agents/ team based on the project analysis results.

Not allowed:

  • copy plugin baseline agents (handled by vb-init )
  • operate on ~/.codex/agents/ global agents
  • modify project.yaml 's subagents any fields other than
  • create agents without inference basis
  • delete agents without user confirmation

stop and ask when the project root directory or .vibeRig/project.yaml cannot be located.

Input

  • Project root directory — the current workspace or git root, unless specified by the user
  • --force <name> — force regeneration of the specified agent, even if it already exists
  • --only <name,...> — only analyze and process the specified agent, without doing a full run
  • --remove <name> — delete the specified agent after requiring secondary user confirmation

Workflow

1. Collect context

Source one:.vibeRig/requirements/

find .vibeRig/requirements -type f | sort

Read all documents and extract:

  • Functional modules (frontend, API, DB, CLI, infrastructure, etc.)
  • Technical keywords (frameworks, languages, third-party services)
  • Task types (new features, refactoring, performance optimization, security hardening, etc.)

Source two: Linear unexecuted issues(if the tool is available)

Query entries for the current project with status Todo / Backlog / In Progress and extract:

  • Task types and involved modules
  • Labels and priority

Skip when Linear is unavailable, and note it in the report.

Source three: project structure scan(fallback)

Identify tech stack files and directory structures such as package.json、go.mod、Cargo.toml、pyproject.toml、requirements.txt .

2. Infer required agent roles

Based on a comprehensive judgment from the above three sources, write out the inference conclusions:

  • Each recommended role must state itsbasis(which source it comes from and what task it corresponds to)
  • Example inference:
    • requirements has DB migration documents + Linear has database-related issues → recommend db_specialist
    • Linear has security-related issues → recommend security_auditor
    • The project has a frontend/ directory + requirements mentions UI → recommend ui_engineer
    • A large number of Bug-type issues → recommend debugger + qa
    • Cross-module integration tasks → recommend integrator

3. Diff the current team

ls .codex/agents/*.toml 2>/dev/null

Build three lists:

  • To create — required by inference but .codex/agents/ does not exist in
  • Skip — already exists and is still required by inference (--force then move to to-update)
  • Suggested deletion — already exists but inference determines it is no longer needed

4. Execute changes

Create/update: for each agent to create, call agent-creator, passing in:

  • Agent name and responsibilities
  • sandbox_mode
  • Project tech stack and inference basis (used to tune developer_instructions)

Suggested deletion: list the agents suggested for deletion and the reasons, and execute after waiting for user confirmation.

--remove <name>: after confirmation, delete the TOML and from project.yaml Remove the corresponding key.

5. Update project.yaml subagents section

Only modify the subagents field, add keys for created agents, and remove keys for deleted agents.

6. Output report

分析依据:
  - requirements/: 发现前端模块、API 层、DB 迁移需求
  - Linear: 8 个待执行 issue(3 个 UI、2 个 API、1 个安全)
  - 项目结构: Go 后端 + React 前端

Agent 团队变更:
  ui_engineer      → 新建(依据:Linear UI issue ×3 + requirements/ui.md)
  security_auditor → 跳过(已存在)
  db_specialist    → 新建(依据:requirements/db-migration.md)
  old_agent_xyz    → 建议删除(无对应任务,请确认 y/n)

汇总:2 个新建,1 个跳过,1 个待确认删除

Validation

# 新建的 agent TOML 存在
ls .codex/agents/

# 无不支持的自定义字段
grep -En "^\[skills\]|^recommended_skills|^scope\s*=|^inputs\s*=|^boundaries" \
  .codex/agents/*.toml && echo "INVALID FIELDS" || echo "ok"

# project.yaml subagents 已更新
grep "subagents" .vibeRig/project.yaml
  • Each newly created agent has TOML and a reasoning basis
  • No agent was silently deleted
  • project.yaml subagents Consistent with the final team
  • The report includes each agent's action and basis
  • Noted in the report when Linear is unavailable