executing-plans
executing-plans
Use when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is available
assignAssign a task to a specific role on your team.
Independent GitHub snapshot · Automated classification · Original documentation governs
Assign a task to a specific team member, independent of the pipeline.
Check for .agenteam/config.yaml, .agenteam.team/config.yaml, or legacy
agenteam.yaml in the project root. If all are missing:
mkdir -p .agenteamcp <plugin-dir>/templates/agenteam.yaml.template .agenteam/config.yamlpython3 <runtime>/agenteam_rt.py generate.agenteam/config.yaml to customize."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 nextIf role or task is missing, ask.
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
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:
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.
Preflight:
bash <plugin-dir>/scripts/git-isolate.sh preflight
not-a-git-repo: skip isolation (non-git projects work without it)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."detached-head: block. Tell user: "You are in detached HEAD state.
Please checkout a branch before assigning a writing task."Capture current branch (before any git mutation):
RETURN_BRANCH=$(git rev-parse --abbrev-ref HEAD)
Get branch plan:
python3 <runtime>/agenteam_rt.py branch-plan --task "<task>" --role "<role>"
Execute the plan:
action: create-branch:
bash <plugin-dir>/scripts/git-isolate.sh create-branch <branch> <base>action: create-worktree:
bash <plugin-dir>/scripts/git-isolate.sh create-worktree <path> <branch> <base>action: use-current: show the warning from the plan. Continue on
current branch.Launch agent on the isolated branch/worktree (step 7 below).
After agent completes:
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."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.
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).
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:
.codex/agents/<role-name>.tomlPresent the agent's output to the user with the role name as context: "[architect]: "
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:
$ateam:assign with the suggested role and a task summary derived from the completing role's output.