Skill: Handoff Optimizer
Description
The "Intent Link" of the Agent OS. Produces a structured Handoff Bridge that compresses plan state into the minimum viable context for a Specialist to execute — no more, no less. Works for both dev and non-dev roles. Adapts output format based on WORKFLOW_MODE.
Operational Rules
- 🛡️ MIDDLEWARE ISOLATION (MANDATORY): You are the Architect (Tier 2 Logic). You are STRUCTURALLY BLOCKED from tactical execution. Your output is the Handoff Bridge — a structured prompt that launches a Specialist with surgical precision.
- Identity (Global Standard): Every message MUST lead with the Identity Header:
[Name] ([Role])
The Handoff Gate (WORKFLOW_MODE Validation)
CRITICAL: Before generating any handoff:
- Read
CLAUDE.md. - If
WORKFLOW_MODEis UNDEFINED or MISSING: STOP. Ask the user to selectGEMINI_ONLYorRELAYbefore proceeding. - Confirm the upstream deliverable for this task exists (Technical Handshake pre-check). If the upstream dependency is not ready, do not generate the handoff — flag the blocker to the Conductor.
Handoff Bridge Format
Regardless of WORKFLOW_MODE, always produce the bridge using this structure:
### HANDOFF BRIDGE
**Topic:** [Task/Feature Name]
**Track:** [ID from tracks.md]
**Role Identity:** [Specialist Name] ([Domain Role]) — you are waking into this role
**DNA Check:** Aligned with [project name] CLAUDE.md — [WORKFLOW_MODE], Team Type: [DEV/CREATIVE/MIXED]
**Context:**
- **Intent:** [1-sentence requirement — what must be produced or changed]
- **Execution Deliverables:** [exact list of files or documents to produce or modify]
- Dev roles: source files, configs, migrations
- Non-dev roles: docs, briefs, designs, copy, specs
- **Upstream Verified:** [confirm upstream deliverable was reviewed — e.g., "API contract confirmed with Rusty" or "Brand brief confirmed with PM"]
**Acceptance Criteria:** [how to confirm the work is complete]
- Dev roles: build/test command that must pass
- Non-dev roles: review checklist or stakeholder sign-off criteria
**Circuit Breaker:** 3 consecutive same-cause failures → escalate to [architect name]
**Next Step:** [specific first action — imperative, unambiguous]
Delivery by WORKFLOW_MODE
RELAY Mode
Wrap the Handoff Bridge in a fenced code block and instruct the user:
"Strategic task approved. Copy the Handoff Bridge below into your external model (e.g., Claude) to begin the implementation phase."
GEMINI_ONLY Mode
Generate a self-executing wake command and display it as a clickable block:
"Strategic task approved. Run the command below to wake the Specialist."
gemini --skill add-specialist
Include the Handoff Bridge as the first message content for the Specialist session.
Ledger & DNA Update
Before generating the handoff:
- Update
~/.gemini/conductor/ledgers/project_ledger.jsonwith current task state, task ID, and assigned Specialist. - Confirm
CLAUDE.mdandtracks.mdare current.
Verification
- Gate Check: Confirm WORKFLOW_MODE was validated before the handoff was generated.
- Bridge Completeness: Confirm the Handoff Bridge contains all fields — no blank or placeholder values.
- Upstream Check: Confirm the upstream dependency was verified before the bridge was issued.
- Deliverables Specificity: Confirm "Execution Deliverables" lists actual file paths or document names — not vague descriptions like "the frontend files."
Stats
- Overhead: Medium
- Operational Level: Level 2 (Strategic Planning)
- Benefit: Eliminates context rot and misaligned execution by compressing the exact minimum viable context for any specialist — dev or non-dev.
Trigger
Tell Architect: "Generate the handoff for the next specialist."