--- argument-hint: "[task-to-handoff]" compatibility: Requires Git, `ai-handoff` on PATH, and local file-write access. Clipboard copying needs `pbcopy`/`pbpaste` on macOS, or `wl-clipboard` (Wayland) or `xclip` (X11) on Linux. `create --no-clipboard` needs no clipboard tools. Generated launch commands require an authenticated Codex CLI. coordination: exempt name: task-handoff skill-dependencies: - orchestration description: Create one decision-complete task handoff in its repository or on the Desktop for cross-repository work, return a command for a fresh interactive Codex session, and recommend Codex subagent delegation for complex tasks. --- # Task Handoff This skill is coordination-exempt: skip the ai-coord gate for its declared work. If a slash or dollar invocation already added these instructions, follow them directly. In that case, do not invoke this skill again through a skill tool. Turn one continuation task into one self-contained task handoff for a fresh agent chat. Write the handoff only. Do not implement, edit tracked files, commit, push, launch Codex, or change ignore configuration. Task-handoff writes one decision-complete file for a fresh, separate session. For a simple task, that isolated file is enough for direct execution in the receiving session. For a complex task, resolve `~/.agents/skills/orchestration` to its expanded absolute directory, require a readable `SKILL.md` there, and embed that absolute skill path in the handoff. Direct the receiving session to load it from Plan mode and use the handoff as its task specification so Codex subagents can implement it. Do not rely on bare `$orchestration` discovery. Task-handoff still creates exactly one file and never launches orchestration itself. Use task-handoff when work continues later or elsewhere, and orchestration when implementing requested work now. ## Select the work Use `$ARGUMENTS` when present. Otherwise infer the next unfinished step from the last assistant response and relevant transcript. Treat the task as a scope selector: retain only evidence needed for that work. Resolve discoverable facts before writing. While preserving user and concurrent-agent changes, inspect every involved repository's instructions, relevant task surface, and working-tree state, and distinguish completed work, partial work, and remaining work. Run these reads for multiple involved repositories in one parallel batch. If the task is already complete, report the evidence and create nothing. Ask only when an unresolved choice materially changes scope, safety, execution approach, verification, repository membership, or handoff placement. Classify the handoff from the user's requested outcome, expected evidence, and authorized actions. Reason about the task. Do not keyword-match it. Select exactly one lowercase category: - `implementation`: change code, configuration, documentation, or data to reach a defined end state. - `investigation`: explain a bounded symptom, behavior, or failure with evidence and a recommended next action. - `research`: answer or compare options using collected evidence and deliver a recommendation or decision record. - `audit`: assess a defined surface against explicit criteria and report prioritized, evidence-backed findings. - `operations`: carry out a bounded maintenance, release, migration, or coordination workflow with state checks and rollback boundaries. When a task contains supporting work from another category, use the category of its primary deliverable. Classify its execution approach as `simple` or `complex`. Mark it complex only when delegation would materially improve latency, correctness, or verification, such as independently implementable scopes, dependency waves, multiple or unfamiliar subsystems, or a brief likely to exceed roughly 25-30 minutes. File and repository count alone are not complexity signals. Otherwise mark it simple. Infer repositories from local paths and relevant context. Do not include the current repository merely because the skill runs there when the task selects only other repositories. Create exactly one handoff file, whether the task touches one repository or many. A single-repository handoff belongs in that repository at `/.ai/task-handoffs/`. A cross-repository handoff belongs at `~/Desktop/.ai/task-handoffs/` only when it spans at least two repositories. For cross-repository work, include every involved repository and choose the first repository to tackle as the Codex launch directory. Stop before writing when the repository set or the required operation order is unclear. Choose one meaningful unique filename matching `^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*[.]md$`. Do not force a `PLAN_` prefix. If the target exists, add a semantic qualifier, falling back to `_YYYY_MM_DD_HHMMSS` only when no meaningful qualifier distinguishes it. ## Create the handoff Compose the semantic draft body in a new scratch file outside every involved repository, for example under `$TMPDIR`. Write it in one operation. The draft must be non-empty and begin immediately with one H1 heading. Do not add YAML frontmatter or begin the draft with `---`. Never add `## Handoff category`, `## Execution status`, or `## Handoff cleanup`. `ai-handoff create` reserves and appends them. Make every body decision-complete for an agent with access to the named repositories but none of this transcript. Include: - objective, success criteria, and explicit exclusions. - verified current state, partial changes, and completed prerequisites. - changes keyed to stable paths, symbols, interfaces, schemas, or commands rather than line numbers. - task-specific evidence, procedure, material edge cases, and failure behavior. - targeted validation, acceptance scenarios, and rollout, compatibility, or authority requirements. - exact repository-relative write scopes, recorded before publication with `ai-coord draft --name '