بنقرة واحدة
delegate-task
Use for non-trivial implementation tasks that require meaningful code changes.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Use for non-trivial implementation tasks that require meaningful code changes.
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Shared mailbox transport protocol for Agent Deck workflows.
Handles a `closeout_delivered` workflow message and completes planner-side closeout.
Generates a browser-check mailbox message for runtime page validation and sends it to a browser-tester session.
Claim pending agent mail with `mailbox_recv` and immediately execute the requested workflow action.
Send an `execute_plan` workflow message to a planner that should complete one supervisor-assigned goal inside one workspace and report back to a supervisor.
Execute one supervisor-assigned goal inside one workspace, decompose it locally, drive resulting tasks to completion serially, and send one final report back to the supervisor.
| name | delegate-task |
| description | Use for non-trivial implementation tasks that require meaningful code changes. |
Create one concise, execution-ready mailbox message for another AI agent.
Workflow protocol baseline: use the agent-deck-workflow skill.
Use this skill for non-trivial implementation work.
Before drafting the delegate message:
Execution mode: strict serial; do not send the next delegated task before closeout completes.
Keep the delegate brief directly in the mailbox body. Keep it locally actionable, but include enough upstream context that coder can optimize for the parent goal instead of only the local wording.
Agent Deck mode:
agent-deck-workflow skill for shared rulesBranch-plan terms:
integration_branch is the existing non-task branch that should receive the completed task at closeouttask_branch is the branch where the delegated implementation is donetask_branch into integration_branchworker_workspace and planner_workspace are workflow roles, not a requirement that the paths differResolve by priority:
task_id: explicit -> context -> generate YYYYMMDD-HHMM-<slug>planner_session_id: explicit -> context -> bound mailbox sender context -> askplanner_workspace: explicit -> workflow context -> current workspace -> askworker_workspace: explicit -> workflow context -> planner_workspace
start_branch: explicit -> context -> askintegration_branch: explicit -> context -> if start_branch is the intended non-task landing line for this delegated change, use start_branch; otherwise infer from explicit user intent or recorded workflow context for start_branch; if confidence is low, ask rather than guessing
task/* as integration_branchstart_branch is task/*, treat it as the task branch and ask for the real integration branch unless context already records itmain/master; branch names are evidence, not truthcoder_session_ref: explicit -> context -> default coder-<task_id>coder_session_id: explicit actual id -> context actual id -> helper output after target resolution -> omit until knownreviewer_session_ref: explicit -> context -> default reviewer-<task_id>reviewer_session_id: explicit actual id -> context actual id -> omit when the reviewer is not yet createdtask_branch: explicit -> context -> if start_branch is already the intended topic branch for this delegated change, reuse start_branch; otherwise default task/<task_id> created from integration_branch
task_branch must differ from integration_branchcoder_tool_profile: explicit -> context -> omit when coder_tool is already a full command -> default current-tool continuity or resolver role default codercoder_tool_cmd: explicit full command -> context resolved command -> current AI tool when continuity is intended -> shared tool-resolution contract for role coderreviewer_tool_profile: explicit -> context -> omit when reviewer_tool is already a full command -> default resolver role default reviewerreviewer_tool_cmd: explicit full command -> context resolved command -> shared tool-resolution contract for role reviewerreviewer_session_ref distinct unless same-session reviewer assignment is explicitworkflow_policy (optional): explicit -> context -> default unattended policyper_task_review (optional): explicit -> context -> default requiredfinal_review (optional): explicit -> context -> default skipspecial_requirements (optional fallback): explicit -> context -> extract user constraints not represented by existing structured fields -> omit when emptybig_picture (required when available): explicit -> context -> infer from current user goal / active plan -> ask only when task framing would otherwise be misleadingreviewed_design_docs (required when task is based on tech_design_review_report): explicit -> architect report Reviewed Scope -> ask if unavailableescalation_triggers (optional): explicit -> context -> infer from task risk / boundary uncertainty -> omit when emptyWorkflow policy inference:
mode = "unattended" and auto_accept_if_no_must_fix = trueui_manual_confirmation = "skip"## Workflow PolicyUse this structure:
Task: <task_id>
Action: execute_delegate_task
From: planner <planner_session_id>
To: coder {{TO_SESSION_ID}}
Planner: <planner_session_id>
Round: 1
## Summary
[One-line objective summary]
## Big Picture
- Parent goal: [what larger task or outcome this delegated task serves]
- Why this task exists: [why planner split this piece out]
- Must not break: [upstream constraint, invariant, or user-facing outcome]
## Objective
[One sentence]
## Components to Address
- [component]: [responsibility] | Key question: [...]
## Critical Decisions
- [decision]: Options / trade-offs / recommendation
## Branch Plan
- Start branch: [start_branch]
- Integration branch: [integration_branch]
- Task branch: [task_branch]
- Rationale: [why dedicated task branch vs reused topic branch]
## Constraints & Risks
- [hard constraint / risk / mitigation]
## Implementation Discipline
- Optimize for the smallest conflict surface that still completes the task
- Do not perform unrelated refactors, renames, file moves, or broad cleanups
- Keep touched files and mechanical rewrites to the minimum needed for this task
- If a larger cleanup seems useful, report it back to planner instead of folding it into this task
## Review Policy
- Per-task review: [required | skip]
- Final integration review: [planner-managed | required | skip]
## Context to Acquire
- Read before starting: [...]
- Reference as needed: [...]
- Know it exists: [...]
- Reviewed design docs: [branch + commit + doc paths when this task is based on a tech-design review]
## Escalate Back To Planner
- Ask planner before proceeding if: [scope no longer matches evidence, local optimum appears to hurt the parent goal, or the task needs a material boundary/plan change]
- Keep moving without asking only when: [the remaining uncertainty is local and does not change the parent goal or branch plan]
## Acceptance Criteria
- [testable completion item]
## Required Workflow Step
- If `Per-task review: required`, run `review-request` after the delivery commit; then continue only with independent local work or stop after confirming the request was sent
- Do not wait for, inspect, or repair the reviewer in the same turn after sending `review-request`
- If `Per-task review: skip`, do not start reviewer unless planner explicitly requests it later
## Important Notes
- Coder git writes and commits for this delegated task are pre-authorized
- Coder must follow the recorded branch plan and must not invent a different working branch
## Agent Deck Context
- Planner: [planner_session_id] | Coder: {{TO_SESSION_ID}}
- Workspaces: planner=[planner_workspace] worker=[worker_workspace]
- Workspace lifecycle: [shared/existing | temp path=<path> cleanup=planner-after-closeout]
- Coder tool: profile=[coder_tool_profile or `explicit`] cmd=[coder_tool_cmd]
- Reviewer: ref=[reviewer_session_ref or `N/A`] id=[reviewer_session_id or `N/A`]
- Reviewer tool: profile=[reviewer_tool_profile or `N/A`] cmd=[reviewer_tool_cmd or `N/A`]
## Workflow Policy
[resolved workflow policy]
## Special Requirements
[only when present]
Tool-routing rule:
Preferred path: use the agent_mailbox MCP tools.
Workflow send sequence:
~/.config/ai-agent/skills/agent-deck-workflow/scripts/prepare-workspaces.sh --worker-workspace <worker_workspace> --planner-workspace <planner_workspace> --integration-branch <integration_branch> --planner-session-id <planner_session_id> before dispatch
agent_mailbox{{TO_SESSION_ID}} placeholders where the real coder session id must appearcoder_tool_profile / coder_tool_cmd using the shared tool-resolution contract for role coder
coder_tool unchanged when providedcoder_tool_cmd and record coder_tool_profile = inheritedcoder commandagent_deck_create_session
ensure_title = <coder_session_ref>ensure_cmd = <coder_tool_cmd>workdir = <worker_workspace>parent_session_id = <planner_session_id>group_path = <planner session group; empty string for root>no_parent_link = falsesession_id as the authoritative coder_session_idPer-task review: required, resolve reviewer_tool_profile / reviewer_tool_cmd using the shared tool-resolution contract for role reviewer
reviewer_tool unchanged when providedreviewer commandreviewer_session_ref, reviewer_tool_profile, and reviewer_tool_cmd so review-request can create it on demand~/.config/ai-agent/skills/agent-deck-workflow/scripts/send-delegate-with-active-task-lock.sh outside the restricted shell with:--workdir <worker_workspace>--task-id <task_id>--integration-branch <integration_branch>--planner-session-id <planner_session_id>--coder-session-id <coder_session_id>--coder-session-ref <coder_session_ref>--task-branch <task_branch>--subject "delegate: <task_id> -> coder"--body-file <delegate mailbox body file or "-">
- and pipe the body through stdin.agent-artifacts/mailbox/Recommended subject:
delegate: <task_id> -> coderRules:
agent_deck_create_session only for lifecycle allocation, and let send-delegate-with-active-task-lock.sh own delegate send and wakeupContext to Acquireintegration_branch; if the session create step reports a mismatch, stop instead of dispatching--override-workspaces only after explicit user confirmation to replace the mirrored planner-workspace.json recordscoder-<task_id> and reviewer-<task_id> as session refs until the real session ids are allocatedagent_deck_create_session with parent_session_id = <planner_session_id>, group_path = <planner session group; empty string for root>, and no_parent_link = false; do not rely on path-derived default groupingreview-request creates or reuses reviewer-<task_id> on demand with parent_session_id = <planner_session_id> and group_path = <planner session group; empty string for root><worker_workspace> passed to send-delegate-with-active-task-lock.shworker_workspace may be the same path as planner_workspace; when they are the same, treat that as an explicit shared-workspace choice, not a workflow errorsend-delegate-with-active-task-lock.sh; mailbox transport itself must stay workflow-agnosticPer-task review: required, coder should receive enough reviewer routing policy to create/reuse the reviewer later through review-request; reviewer must be planner-scoped, never coder-scopedworker_workspace == planner_workspace, planner must still avoid touching that delegated task worktree state outside the delegate/closeout workflowAfter sending:
task_branch / integration_branchcoder_session_id / reviewer_session_ref and any known reviewer_session_idcoder_tool_profile / reviewer_tool_profilecoder_tool_cmd / reviewer_tool_cmdagent-deck-workflow skill