跳到主要内容
知仓学习社ZHICANG

assign

Assign a task to a specific role on your team.

不碰外部(只输出文字)无严重或高危命中hashgraph-online/awesome-codex-plugins

它会碰到什么

扫了多少1 个文本文件,6 KB
它会碰到什么不碰外部(只输出文字)
命中总数0 处
命中统计严重 0 · 高 0 · 中 0 · 低 0

这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。

技能内容

AgenTeam Assign

Assign a task to a specific team member, independent of the pipeline.

Process

1. Auto-Init Guard

Check for .agenteam/config.yaml, .agenteam.team/config.yaml, or legacy

agenteam.yaml in the project root. If all are missing:

  • Create config dir: mkdir -p .agenteam
  • Copy the template: cp <plugin-dir>/templates/agenteam.yaml.template .agenteam/config.yaml
  • Set the team name to the project directory name
  • Generate agents: python3 <runtime>/agenteam_rt.py generate
  • Tell the user: "AgenTeam auto-initialized with default roles. Edit .agenteam/config.yaml to customize."

2. Accept Input

Get the role name and task from the user. Examples:

  • $ateam:assign architect "Review this API design"
  • $ateam:assign reviewer "Check auth logic in src/auth.py"
  • @ateam assign researcher to investigate caching strategies
  • @ateam ask pm what we should build next

If role or task is missing, ask.

3. Validate Role

python3 <runtime>/agenteam_rt.py roles show <role-name>

If the role doesn't exist, show available roles:

python3 <runtime>/agenteam_rt.py roles list

4. Check Write Policy

If the role has can_write: true, check for active write locks:

python3 <runtime>/agenteam_rt.py status

If a write lock is active and the role needs to write:

  • Inform the user: "Write lock held by <active_role>. Wait for completion or

override with confirmation."

  • Do not proceed without user approval.

5. Branch Isolation

If the role has can_write: true, isolate the work on a dedicated branch

or worktree. Assign ALWAYS applies isolation regardless of pipeline mode

(even pipeline: hotl), because assign is user-initiated and outside

HOTL's execution flow.

  1. Preflight:
   bash <plugin-dir>/scripts/git-isolate.sh preflight
  • If not-a-git-repo: skip isolation (non-git projects work without it)
  • If dirty-worktree and mode is serial or worktree: block. Tell user:

"Uncommitted changes detected. Please stash or commit before assigning

a writing task, to ensure branch isolation."

  • If detached-head: block. Tell user: "You are in detached HEAD state.

Please checkout a branch before assigning a writing task."

  1. Capture current branch (before any git mutation):
   RETURN_BRANCH=$(git rev-parse --abbrev-ref HEAD)
  1. Get branch plan:
   python3 <runtime>/agenteam_rt.py branch-plan --task "<task>" --role "<role>"
  1. Execute the plan:
  • If action: create-branch:

bash <plugin-dir>/scripts/git-isolate.sh create-branch <branch> <base>

  • If action: create-worktree:

bash <plugin-dir>/scripts/git-isolate.sh create-worktree <path> <branch> <base>

  • If action: use-current: show the warning from the plan. Continue on

current branch.

  1. Launch agent on the isolated branch/worktree (step 7 below).
  1. After agent completes:
  • If action was create-branch:

bash <plugin-dir>/scripts/git-isolate.sh return $RETURN_BRANCH

Tell user: "Work is on branch <branch>. Merge or create a PR when ready."

  • If action was create-worktree:

bash <plugin-dir>/scripts/git-isolate.sh cleanup-worktree <path>

Tell user: "Work is on branch <branch>. Worktree cleaned up (or

preserved if it has uncommitted changes)."

If the role has can_write: false, skip this step entirely.

6. Resolve Artifact Paths

python3 <runtime>/agenteam_rt.py artifact-paths

Pass the resolved output paths to the agent so it writes artifacts to

the correct location (standalone vs HOTL mode).

7. Launch Agent

Before launch, create a durable assignment checkpoint under

.agenteam/assignments/<assignment_id>.json. Record assignment_id, role,

task, isolated cwd, start time, attempt number, configured wall and idle budget,

last heartbeat, host thread ID when available, and stop reason. Update the

heartbeat while the role is active. On controller restart, verify the recorded

PID/thread before launching anything; resume the existing host thread when the

host supports it. A fresh assignment attempt requires explicit confirmation if

side effects may already have occurred.

Launch the role as a Codex subagent using the generated agent file:

  • Agent file: .codex/agents/<role-name>.toml
  • Pass the task description as the prompt
  • Pass relevant project context (current branch, recent changes, etc.)
  • Pass artifact paths from step 5

8. Collect Output

Present the agent's output to the user with the role name as context:

"[architect]: <output>"

9. Suggest Next Step

After presenting the role's output, append a handoff suggestion:

| Completing Role | Suggestion |

|----------------|------------|

| researcher | "Next step: @Architect can design a solution based on these findings, or @Pm can turn this into a prioritized strategy. Want me to assign one of them?" |

| pm | "Next step: @Architect can design the technical approach for this. Want me to assign them?" |

| architect | "Next step: @Dev can build an implementation plan and start coding from this design. Want me to assign them?" |

| dev | "Next step: @Qa can write tests for this implementation, then @Reviewer can check it. Want me to assign @Qa?" |

| qa | "Next step: @Reviewer can review the implementation and tests together. Want me to assign them?" |

| reviewer (PASS) | "Review complete -- no blocking findings. Ready to merge or continue." |

| reviewer (WARN) | "Review complete with warnings. @Dev can address the WARN findings if you'd like. Want me to assign them?" |

| reviewer (BLOCK) | "Review blocked on the findings above. @Dev should address the BLOCK items before re-review. Want me to assign them?" |

Rules:

  • Always present the suggestion as a question, never auto-dispatch.
  • If the user says "yes" or confirms, invoke $ateam:assign with the suggested role and a task summary derived from the completing role's output.
  • If the user says "no", "stop", or changes topic, drop it. Do not re-prompt.
  • If the user asks for a different role than suggested, honor their choice.
  • Include the suggestion on the same message as the role output.
  • If running headless (CI=true or no TTY), omit the handoff suggestion.

Notes

  • Assign works regardless of pipeline setting
  • Multiple read-only roles can be assigned in parallel
  • Write roles follow the configured write policy

想直接用这个技能?

本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。