Cursor Skill

delegate-setup

Configure delegation fleet lanes: which implementer CLI handles which kind of work, with optional model and effort (or variant) dials. Discovers installed CLIs, proposes a lane map for user approval, and writes global or project config only after explicit yes. Use when the user a

LLM Mart · 0 points · 14 views 0 listing impressions 0 install-command copies
Virus-scanned Reviewed automatically before listing.

Full trust report

Download amelnagdy-delegate-skills-skills_delegate-setup-b781ee2.zip · 28 KB
Part of amelnagdy/delegate-skills — 18 skills

Install

skills CLI npx skills add https://github.com/amElnagdy/delegate-skills/tree/master/skills/delegate-setup
Claude Code claude plugin marketplace add https://llmmart.ai/marketplace.json && claude plugin install amelnagdy-delegate-skills@llmmart
Git git clone https://github.com/amElnagdy/delegate-skills.git

The skills CLI installs just this skill, for any of its supported agents. Claude Code installs the whole amelnagdy/delegate-skills collection as a plugin from our marketplace. Git is the plain clone.

Skill manifest

Delegate Setup

You are the orchestrator in setup mode. Discover installed implementer CLIs, propose a fleet of lanes, and write configuration only after the user approves.

This skill does not dispatch coding work. It only authors the lane map.

One concept: lanes. Never say “routes.”

Example lane: feature → implementer opencode, model opencode/grok, variant high (OpenCode uses variant for reasoning intensity, not effort).

When NOT to use this

  • The user wants a task implemented — use the matching *-delegate skill instead.
  • A one-off model change on a single dispatch — pass --model / --effort / --variant on that relay.

Hard rules

  1. Every lane must include implementer.
  2. Put dials on the same object (model, effort or variant, …) only if that implementer supports them — see references/schema.md.
  3. Show a human-readable lane table and the full JSON before every write; re-show after every tweak.
  4. Write only after an explicit approval (“yes”, “approve”, “write it”).
  5. Ask scope unless already clear: global (all projects) vs this repo only. Never create a project file just because cwd is a git repo. If there is no git repo, default to global and say so.
  6. Do not invent model identifiers.
  7. In interview or usage-scan mode, never write any dial the user did not give you and the schema does not require — omit it, so the CLI’s or relay’s own default applies.
  8. Prefer 3–5 useful lanes over a kitchen-sink map.
  9. Never edit AGENTS.md, CLAUDE.md, or other user agent-instruction files.
  10. Never run a *-delegate relay from this skill.

(<skill-dir> is this skill’s install directory — the folder that contains this SKILL.md.)

Flow

discover → load → grounding menu → propose (with Basis) → scope → approve → write

1. Discover

node "<skill-dir>/scripts/discover.mjs"

Summarize installed vs missing, auth (true / false / null = unknown), and whether models were reported, aliases (curated aliases in the registry, not live discovery — full model names also work), unsupported, or failed.

2. Load existing (effective map)

node "<skill-dir>/scripts/config.mjs" load --cwd "$PWD"
  • Neither present → “No lanes configured yet.”
  • Otherwise → table of effective lanes with a Source column (global / project). Do not paste both raw files unless asked.
  • If projectPresent is true and projectTrusted is false, label the project lanes untrusted. They cannot dispatch until the user reviews and approves a project write.

3. Propose

Discovery reports capability, never task fit. So ask one grounding question before proposing anything — one question, three options, not a wizard:

How should I pick the lanes? (1) Quick defaults — I decide, no questions. (2) Interview — about four questions on how you want work allocated. (3) Usage scan — I re-read your CLIs’ local session folders (counts and dates only, never the conversations) and let the numbers place your lanes — if one CLI dominates, expect one question about its role. Happy to do 2 and 3 together.

  • Quick defaults → propose immediately.
  • Interview → the four questions (allocation policy, never model rankings) and how to ask them (one medium per round) live in references/setup-dialogue.md — read it before you ask.
  • Usage scan → node "<skill-dir>/scripts/discover.mjs" --usage. Tell the user it is metadata only before running it. Each discovered CLI gains usage: { sessions, lastUsed }; null means no probe is wired — unknown, not unused.
  • Both → run the scan first, then ask only what the numbers cannot answer.
  • Inside a git repo, repo signals (languages, test weight, frontend share) are a fourth source of evidence. They do not change the menu; they feed the proposal and the repo basis.

That menu is also the consent surface — the option chosen sets how much of the map is yours to decide:

  • Quick defaults — the user hired your opinion. A full map is legitimate, dials included; label every lane my opinion, say plainly that the map is your opinion, and keep it cheap to revise.
  • Interview / usage scan — evidence modes, so every dial is gated (rule 7): set one only from the user’s answer, or where the schema requires it (opencode lanes require model). Omitting is always safe — every dial has a default the user already lives with, and a CLI’s configured default is their standing choice, better evidence than your priors. Choosing which installed implementer gets a lane is still yours — Basis my opinion — but a dial that raises spend is not: offer your dial picks only as an addendum after the proposal, see references/setup-dialogue.md.
  • An unanswered question shrinks the map; it never licenses a substitution. Propose fewer, more conservative lanes, name the axis you are blind on (no quota answer → say the map is quota-blind), and invite the answer anytime. Re-ask once at most; never backfill silence with priors.

Delegation economics. The orchestrator reviews and lands every result — the review is the quality gate, so optimize total cost, not implementer prestige:

  • Prefer capable, authenticated, burnable, low-usage CLIs for bounded, objectively gated work (tests, mechanical refactors, straightforward fixes) when their reliability keeps review and rework economical — lanes push token burn away from the subscriptions the user is protecting. Low usage alone does not establish burnable: discovery cannot see plans, limits, or per-run cost, and a rarely-used CLI may be metered or deliberately avoided. Burnable comes from the user's quota answer — or, in quick defaults, from your labeled opinion.
  • Avoid binding a lane to a CLI the user is protecting or orchestrates from, by default; bind it only when the user asks for it or no acceptable alternative exists. Lanes are orchestrator-blind: the same lane fires from every seat the user drives from, and from that CLI's own seat it dispatches the CLI to itself.
  • Surplus placement breaks down when rework and review cost exceed the savings; when the implementer is flaky; when correctness rides on security, concurrency, migrations, or unstated domain knowledge; and when the output is the product (debate, architecture, research) — review limits damage, it does not manufacture a good first attempt. Bind those lanes to stronger implementers.
  • An explicit "spare X" answer removes X from proposed lanes by default, and overrides blanket posture answers on any lane the user explicitly retains for X — ask whether the posture applies there; omit the dial if unanswered. Never silently stretch one answer across an axis it conflicts with.

Question phrasings for the burn/spare and trust interview live in references/setup-dialogue.md.

Then propose the lanes. Name them after the work the user described; fall back to feature, tests, ui, fast, complex. Installed implementers only.

Show:

Lane Implementer Model Effort / variant Basis Source (if updating)
feature opencode opencode/grok variant: high your answer + schema requirement —
tests codex — — usage data —
ui claude — — my opinion (implementer) —

Basis is mandatory on every lane: your answer / usage data / repo / my opinion / schema requirement (a dial the schema forces is neither evidence nor opinion — say so). A lane you picked from model-quality priors is my opinion — never present it as something the tooling determined, and “installed and authenticated” is capability, not evidence of fit. When a lane’s implementer and its dials come from different places, split the label — see references/setup-dialogue.md.

Then the complete JSON (version: delegate-fleet.v1). One line of why per lane; flag auth or model uncertainty.

Schema and dial table: references/schema.md.

4. Scope

  • User said global / all projects / outside the project → global.
  • No git repo → global (say so).
  • Else ask once: global vs this repo only.

5. Approve and write

On explicit yes, write only the chosen scope (validate first). Build the payload from that scope’s raw file (or an empty lanes object if new) — not from the effective merged load view, or a project write will shadow global-only lanes and a global write will promote project-only ones.

Create a uniquely named file under the platform temporary directory ($TMPDIR, %TEMP%, or Node os.tmpdir(); never hard-code /tmp, which breaks on native Windows), write the exact approved JSON into it with the orchestrator's file-writing tool, and use that populated path as <lanes-json> below. Never validate an empty temp file. Remove the temp file after the validation/write attempt, whether it succeeds or fails.

node "<skill-dir>/scripts/config.mjs" validate "<lanes-json>"
node "<skill-dir>/scripts/config.mjs" write --scope global "<lanes-json>"
# or:  write --scope project --cwd /path/to/repo "<lanes-json>"

Re-read with load, then confirm the path written and the active lane names. Project writes bind approval to the exact config content; later changes fail closed until re-approved. On update, a short before/after is enough.

6. Ready to delegate

Stop after confirming. Tell the user the map is ready. For later work: read the lane’s implementer, load that *-delegate skill, and dispatch with --lane <name> (explicit --model / --effort / --variant still win when passed). Do not start a delegate task unless they ask.

Reconfigure

Same flow. Show the effective current map, propose changes, approve, write one scope’s file. Reinstalling the skills package must not rewrite these files — they live outside the package.

Files (delegate-skills)
  • references
    • schema.md 5 KB
      # Fleet schema (`delegate-fleet.v1`)
      
      One concept: **lanes**. A lane names an implementer and optional dials.
      
      ## Document
      
      ```json
      {
        "version": "delegate-fleet.v1",
        "lanes": {
          "feature": {
            "implementer": "opencode",
            "model": "opencode/grok",
            "variant": "high"
          },
          "tests": {
            "implementer": "grok",
            "effort": "medium"
          },
          "complex": {
            "implementer": "claude",
            "effort": "high"
          }
        }
      }
      ```
      
      - `version` must be `delegate-fleet.v1`.
      - `lanes` is an object keyed by lane name (`[A-Za-z0-9][A-Za-z0-9._-]*`).
      - Every lane **requires** `implementer` (a key from the registry below).
      - Other fields are dials; only dials listed for that implementer are allowed.
      
      ## Paths
      
      | Scope | Path |
      | --- | --- |
      | Global | `$XDG_CONFIG_HOME/delegate-skills/config.json` when `XDG_CONFIG_HOME` is set; otherwise `~/.config/delegate-skills/config.json` (`os.homedir()` → `HOME` / `USERPROFILE`) |
      | Project | `<git-root>/.delegate/config.json` |
      
      Project overlays global by **whole-lane replace** (same lane name in project fully replaces the global lane).
      Relays apply a project lane only when its exact config content matches the approval hash written under
      that worktree's Git metadata by an explicitly approved `config.mjs write --scope project`. Cloned or
      later-edited project config fails closed until it is reviewed and written again through `delegate-setup`.
      
      ## Implementer keys and dials
      
      | Key | Skill | Binary | Supported dials |
      | --- | --- | --- | --- |
      | `claude` | claude-delegate | `claude` | model, effort, timeout, readOnly |
      | `cline` | cline-delegate | `cline` | provider, model, timeout |
      | `codex` | codex-delegate | `codex` | model, effort, sandbox, timeout, readOnly |
      | `commandcode` | commandcode-delegate | `cmd` | model, effort, timeout, readOnly |
      | `opencode` | opencode-delegate | `opencode` | model, **variant**, timeout, readOnly |
      | `agy` | agy-delegate | `agy` | model, effort, timeout, readOnly |
      | `grok` | grok-delegate | `grok` | model, effort, sandbox, timeout, readOnly |
      | `kimi` | kimi-delegate | `kimi` | model, timeout |
      | `qoder` | qoder-delegate | `qodercli` | model, permissionMode, timeout, readOnly |
      | `vibe` | vibe-delegate | `vibe` | timeout, readOnly |
      | `cursor` | cursor-delegate | `cursor-agent` | model, force, timeout, readOnly |
      | `pi` | pi-delegate | `pi` | provider, model, timeout, readOnly |
      | `omp` | omp-delegate | `omp` | provider, model, **effort** (`--thinking`), timeout, readOnly |
      | `aider` | aider-delegate | `aider` | model, timeout, readOnly |
      | `copilot` | copilot-delegate | `copilot` | model, effort, timeout, readOnly |
      | `warp` | warp-delegate | `oz` | model, timeout |
      | `zcode` | zcode-delegate | `zcode` | permissionMode, timeout, readOnly |
      
      ZCode carries its `--mode` as `permissionMode`, and only `plan` and `yolo` are accepted: ZCode also
      documents `build` and `edit`, but a headless run has no permission client, so those two block every
      write tool and exit 0 having changed nothing. ZCode has no `--model` flag — the model is chosen in
      the CLI's own config file — so `model` is not a dial for `zcode` lanes. ZCode also ships its CLI
      inside the desktop app rather than on PATH, so discovery falls back to the installed app bundle.
      
      OpenCode uses `variant` for reasoning intensity, not `effort`. Do not write `effort` on an `opencode` lane.
      Oh My Pi (`omp`) uses the lane `effort` dial for omp's `--thinking` (`off`, `auto`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`). Do not write `thinking` as a lane field.
      OpenCode lanes **require** `model` in `provider/model` form, with a non-empty provider before the first
      `/` and at least one non-`/` character after it. Cline accepts `provider` and `model` as separate
      dials and does not impose that shape.
      
      Boolean dials: `readOnly`, `force`. All other dials are non-empty strings. Duration strings for
      `timeout` use `h`/`m`/`s` (e.g. `30m`) and must fit the relay watchdog ceiling (~24.8 days).
      Do not combine `readOnly: true` with a write-capable `sandbox` / `permissionMode` / `force`.
      `model` / `provider` / OpenCode `variant` must match the bound relay’s token rules (e.g. Claude
      rejects spaces; Grok/Pi/Oh My Pi/OpenCode/Codex/Command Code use a shell-safe token set — Windows `shell:true`
      launches, and Oh My Pi's flag-injection defense even without a shell).
      
      ## Helpers
      
      ```bash
      node <skill-dir>/scripts/discover.mjs
      node <skill-dir>/scripts/config.mjs load [--cwd <dir>]
      node <skill-dir>/scripts/config.mjs validate <file>
      node <skill-dir>/scripts/config.mjs write --scope global|project [--cwd <dir>] <file>
      node <skill-dir>/scripts/lane.mjs resolve --cwd <dir> --lane <name> --implementer <key>
      ```
      
      `load` prints the **effective** map (each lane includes a `source` of `global` or `project`) and
      `projectTrusted`, which reports whether the current project content matches its local approval hash.
      `lane.mjs resolve` is what `*-delegate` relays call for `--lane`: it fails loud on a missing
      lane, untrusted project config, or implementer mismatch, and prints relay-native dials
      (e.g. grok `sandbox` → `autonomy`).
      
    • setup-dialogue.md 6.8 KB
      # Setup dialogue details
      
      Load this when running a configure / reconfigure session. `SKILL.md` is authoritative and states each
      rule once; this page expands the dialogue itself — the interview, how to ask it, how to read a usage
      scan, and how to label what you propose.
      
      ## Grounding the lane map
      
      The grounding menu is `SKILL.md` step 3. When the user picks the interview:
      
      ### The four interview questions
      
      Allocation policy only. Users cannot rank model IDs — that is your job, not theirs.
      
      | # | Ask | What it settles |
      | --- | --- | --- |
      | 1 | What kind of work do you delegate most? | The main lane — and its **name**. “migrations”, “bug triage”, “release-prep” beat the canned `feature`/`tests`/`ui`/`fast`/`complex` five |
      | 2 | Which paid subscriptions should I burn, and which should I spare? | Quota economics. Discovery cannot see plans, limits, or what a run costs — only the user knows |
      | 3 | Any CLI you already trust — and for what kind of work? Any that has burned you? | Lived experience outranks your priors about the underlying models. Trust is scoped: an answer qualifies the CLI for work like the work that earned it — follow up on the scope before it qualifies a high-stakes lane. It is never an order to assign work: "trusted + spared" means qualified but normally excluded (the spare rule is in `SKILL.md` step 3) |
      | 4 | Default to fast and cheap, or slow and thorough? | Effort / variant dials, and who gets the `complex` lane |
      
      Stop at four.
      
      ### How to ask them
      
      The questions are conversation, not a survey — cramming all four into one cold multiple-choice
      form loses exactly what they exist to collect.
      
      - **One medium per round.** Every question you ask in a turn goes through the same channel: all
        prose, or all in one form. Never mix the two — submitting a form ends the turn, so any prose
        question asked beside it is simply lost, and the silence that follows is not an answer to it.
      - **Question 1 is open-ended.** You want the user's words — they become lane names. If your harness
        forces options, derive them from evidence (repo, usage scan, what the user has said), keep them one
        genre (kinds of work — never a mix of domains and task types, which overlap), and treat a selection
        as a draft lane name, not a category.
      - **Questions 2 and 3 are set-valued.** The answer is a mapping across CLIs, so options must span the
        *discovered* CLIs — never an arbitrary subset — with both directions expressible: burn *and* spare,
        trust *and* burned-by. Multi-select if the harness has it; otherwise ask in prose.
      - **Question 4 may be a closed choice.** Do not pre-mark an option as recommended — recommendations
        belong in the proposal, after the answers.
      - **Lead with question 1.** Its answer usually reshapes or removes the others — fewer than four is
        better.
      - **Silence shrinks the map** — the consent rule is in `SKILL.md` step 3; here is the phrasing for
        it. Name the axis in one line — “nobody told me which subscriptions to spare, so I set no effort
        dials; each CLI will use the default you configured” — and add that the answer is welcome anytime.
      
      ### Reading a usage scan
      
      `node <skill-dir>/scripts/discover.mjs --usage` adds `usage` to each discovered CLI:
      `{ "sessions": <int>, "lastUsed": <ISO-8601 | null> }`, or `null`.
      
      - What to tell the user before running it: it counts session files and reads their timestamps. It
        never opens one, so no conversation content is read.
      - `usage: null` also covers a CLI with no local state directory — never report it as zero.
      - Large disparities show where activity occurs — not what role the CLI played in it. 1600 codex
        sessions against 20 pi sessions cannot tell you whether the user works inside codex (and would
        orchestrate from it) or sends delegated work to it. Treat a meaningful disparity as a signal to
        **ask**, never to assign: "codex has the most local sessions, but the scan cannot tell whether
        you work inside it or delegate work to it — should I protect its quota, burn it as an
        implementer, or treat it as mixed?" Combine the answer with the burn/spare interview answer when
        the interview also ran; in a scan-only session the role answer is your only quota evidence —
        propose conservatively and name the map quota-blind (the shrink rule in `SKILL.md` step 3).
      - Low usage alone is not evidence of task fit. A surplus CLI still needs to be installed,
        authenticated, and reliable to earn a lane.
      - Small differences are noise. 97 against 61 decides nothing — fall back to the interview or to your
        opinion, and label it as such.
      - `lastUsed` weighs as much as the count. A big count that stopped months ago is a CLI the user moved
        off; a recent date on a small count is one they are adopting.
      - Counts are lifetime totals for that machine, not “this month”, and only cover sessions the CLI still
        keeps on disk.
      
      ### Labelling the basis
      
      The Basis values, and the rule that every lane carries one, are in `SKILL.md`. What lives here is the
      split label and the addendum.
      
      Label the parts separately when they differ. A lane whose implementer came from the usage scan but
      whose model you chose is `usage + my opinion (model)`, never a flat `usage data` — session counts
      say where the user works, not which model or effort level to buy for them. That split only exists in
      quick-defaults mode, or when the user asked you for a dial: the evidence modes gate every dial
      (`SKILL.md` rule 7), so there is no opinion-dial left to label.
      
      In the evidence modes, unsolicited opinions about dials travel as an **addendum**, never as a
      pre-filled field (quick-defaults proposals may include opinion-labeled dials — the user hired that
      opinion). Show the table and the JSON first, then, in a separate paragraph after it: “If you want my
      picks for models and effort levels, say the word and I’ll add them.” Then wait. A dial the user
      asked for is theirs; the same dial sitting inside the JSON they are about to approve spent their
      quota on your say-so.
      
      ## Auth and models
      
      - `authenticated: null` (unknown) usually means no auth probe is wired for that CLI — currently `agy`
        and `pi`, which expose no status command. Say that, rather than implying the login failed.
      - Prefer not binding a lane to a CLI discover reports as `authenticated: false`.
      - For claude specifically, `authenticated: false` can be a Keychain artifact when discovery itself
        ran inside a sandbox: on macOS the live credentials sit in the login Keychain, and a sandbox that
        blocks Keychain access makes the probe fall back to a possibly stale credentials file. Verify with
        `claude auth status` outside the sandbox before treating the CLI as unauthenticated.
      - Never invent model ids (rule 6): use `models.values` when `status` is `reported`, or ask the user,
        or omit `model` when the CLI has a safe default (OpenCode does **not** — require a model for
        opencode lanes).
      
  • scripts
    • config.mjs 17.5 KB · in bundle
    • discover.mjs 15.7 KB · in bundle
    • implementers.mjs 15.9 KB · in bundle
    • lane.mjs 6.7 KB · in bundle
  • SKILL.md 10.7 KB
    ---
    name: delegate-setup
    description: >-
      Configure delegation fleet lanes: which implementer CLI handles which kind of work,
      with optional model and effort (or variant) dials. Discovers installed CLIs, proposes
      a lane map for user approval, and writes global or project config only after explicit
      yes. Use when the user asks to set up, configure, or reconfigure delegation lanes,
      a fleet of lanes, or which implementer handles feature/tests/ui work — not for
      dispatching a coding task to an implementer.
    license: MIT
    compatibility: Requires Node 18+. No implementer CLIs are required — the skill discovers what is available.
    metadata:
      version: 0.5.0
    ---
    
    # Delegate Setup
    
    You are the **orchestrator** in **setup mode**. Discover installed implementer CLIs, propose a
    **fleet of lanes**, and write configuration only after the user approves.
    
    This skill does **not** dispatch coding work. It only authors the lane map.
    
    One concept: **lanes**. Never say “routes.”
    
    Example lane: **feature** → implementer `opencode`, model `opencode/grok`, variant `high`
    (OpenCode uses `variant` for reasoning intensity, not `effort`).
    
    ## When NOT to use this
    
    - The user wants a task implemented — use the matching `*-delegate` skill instead.
    - A one-off model change on a single dispatch — pass `--model` / `--effort` / `--variant` on that relay.
    
    ## Hard rules
    
    1. Every lane **must** include `implementer`.
    2. Put dials on the same object (`model`, `effort` or `variant`, …) only if that implementer supports them — see [references/schema.md](references/schema.md).
    3. Show a human-readable lane table **and** the full JSON before every write; re-show after every tweak.
    4. Write **only** after an explicit approval (“yes”, “approve”, “write it”).
    5. Ask scope unless already clear: **global** (all projects) vs **this repo only**. Never create a project file just because cwd is a git repo. If there is no git repo, default to global and say so.
    6. Do not invent model identifiers.
    7. In interview or usage-scan mode, never write **any** dial the user did not give you and the schema does not require — omit it, so the CLI’s or relay’s own default applies.
    8. Prefer 3–5 useful lanes over a kitchen-sink map.
    9. Never edit `AGENTS.md`, `CLAUDE.md`, or other user agent-instruction files.
    10. Never run a `*-delegate` relay from this skill.
    
    (`<skill-dir>` is this skill’s install directory — the folder that contains this `SKILL.md`.)
    
    ## Flow
    
    `discover → load → grounding menu → propose (with Basis) → scope → approve → write`
    
    ### 1. Discover
    
    ```bash
    node "<skill-dir>/scripts/discover.mjs"
    ```
    
    Summarize installed vs missing, auth (`true` / `false` / `null` = unknown), and whether models were
    `reported`, `aliases` (curated aliases in the registry, not live discovery — full model names also
    work), `unsupported`, or `failed`.
    
    ### 2. Load existing (effective map)
    
    ```bash
    node "<skill-dir>/scripts/config.mjs" load --cwd "$PWD"
    ```
    
    - Neither present → “No lanes configured yet.”
    - Otherwise → table of **effective** lanes with a Source column (`global` / `project`). Do not paste
      both raw files unless asked.
    - If `projectPresent` is true and `projectTrusted` is false, label the project lanes **untrusted**.
      They cannot dispatch until the user reviews and approves a project write.
    
    ### 3. Propose
    
    Discovery reports capability, never task fit. So ask **one** grounding question before proposing
    anything — one question, three options, not a wizard:
    
    > How should I pick the lanes? **(1) Quick defaults** — I decide, no questions.
    > **(2) Interview** — about four questions on how you want work allocated.
    > **(3) Usage scan** — I re-read your CLIs’ local session folders (counts and dates only, never the
    > conversations) and let the numbers place your lanes — if one CLI dominates, expect one question
    > about its role. Happy to do 2 and 3 together.
    
    - **Quick defaults** → propose immediately.
    - **Interview** → the four questions (allocation policy, never model rankings) and how to ask them
      (one medium per round) live in [references/setup-dialogue.md](references/setup-dialogue.md) — read
      it before you ask.
    - **Usage scan** → `node "<skill-dir>/scripts/discover.mjs" --usage`. Tell the user it is metadata
      only before running it. Each discovered CLI gains `usage: { sessions, lastUsed }`; `null` means no
      probe is wired — unknown, not unused.
    - **Both** → run the scan first, then ask only what the numbers cannot answer.
    - Inside a git repo, repo signals (languages, test weight, frontend share) are a fourth source of
      evidence. They do not change the menu; they feed the proposal and the `repo` basis.
    
    **That menu is also the consent surface** — the option chosen sets how much of the map is yours to
    decide:
    
    - **Quick defaults** — the user hired your opinion. A full map is legitimate, dials included; label
      every lane `my opinion`, say plainly that the map is your opinion, and keep it cheap to revise.
    - **Interview / usage scan** — evidence modes, so **every** dial is gated (rule 7): set one only from
      the user’s answer, or where the schema requires it (opencode lanes require `model`). Omitting is
      always safe — every dial has a default the user already lives with, and a CLI’s configured default
      is their standing choice, better evidence than your priors. Choosing which installed implementer
      gets a lane is still yours — Basis `my opinion` — but a dial that raises spend is not: offer your
      dial picks only as an addendum after the proposal, see
      [references/setup-dialogue.md](references/setup-dialogue.md).
    - **An unanswered question shrinks the map; it never licenses a substitution.** Propose fewer, more
      conservative lanes, name the axis you are blind on (no quota answer → say the map is quota-blind),
      and invite the answer anytime. Re-ask once at most; never backfill silence with priors.
    
    **Delegation economics.** The orchestrator reviews and lands every result — the review is the
    quality gate, so optimize total cost, not implementer prestige:
    
    - Prefer capable, authenticated, burnable, **low-usage** CLIs for bounded, objectively gated work
      (tests, mechanical refactors, straightforward fixes) when their reliability keeps review and
      rework economical — lanes push token burn away from the subscriptions the user is protecting.
      Low usage alone does not establish burnable: discovery cannot see plans, limits, or per-run
      cost, and a rarely-used CLI may be metered or deliberately avoided. Burnable comes from the
      user's quota answer — or, in quick defaults, from your labeled opinion.
    - Avoid binding a lane to a CLI the user is protecting or orchestrates from, by default; bind it
      only when the user asks for it or no acceptable alternative exists. Lanes are
      **orchestrator-blind**: the same lane fires from every seat the user drives from, and from that
      CLI's own seat it dispatches the CLI to itself.
    - Surplus placement breaks down when rework and review cost exceed the savings; when the
      implementer is flaky; when correctness rides on security, concurrency, migrations, or unstated
      domain knowledge; and when the output **is** the product (debate, architecture, research) —
      review limits damage, it does not manufacture a good first attempt. Bind those lanes to stronger
      implementers.
    - An explicit "spare X" answer removes X from proposed lanes by default, and overrides blanket
      posture answers on any lane the user explicitly retains for X — ask whether the posture applies
      there; omit the dial if unanswered. Never silently stretch one answer across an axis it
      conflicts with.
    
    Question phrasings for the burn/spare and trust interview live in
    [references/setup-dialogue.md](references/setup-dialogue.md).
    
    Then propose the lanes. Name them after the work the user described; fall back to `feature`, `tests`,
    `ui`, `fast`, `complex`. Installed implementers only.
    
    Show:
    
    | Lane | Implementer | Model | Effort / variant | Basis | Source (if updating) |
    | --- | --- | --- | --- | --- | --- |
    | feature | opencode | opencode/grok | variant: high | your answer + schema requirement | — |
    | tests | codex | — | — | usage data | — |
    | ui | claude | — | — | my opinion (implementer) | — |
    
    **Basis** is mandatory on every lane: `your answer` / `usage data` / `repo` / `my opinion` /
    `schema requirement` (a dial the schema forces is neither evidence nor opinion — say so). A lane you
    picked from model-quality priors is `my opinion` — never present it as something the tooling
    determined, and “installed and authenticated” is capability, not evidence of fit. When a lane’s
    implementer and its dials come from different places, split the label — see
    [references/setup-dialogue.md](references/setup-dialogue.md).
    
    Then the **complete** JSON (`version`: `delegate-fleet.v1`). One line of why per lane; flag auth or
    model uncertainty.
    
    Schema and dial table: [references/schema.md](references/schema.md).
    
    ### 4. Scope
    
    - User said global / all projects / outside the project → `global`.
    - No git repo → `global` (say so).
    - Else ask once: global vs this repo only.
    
    ### 5. Approve and write
    
    On explicit yes, write **only** the chosen scope (validate first). Build the payload from that
    scope’s raw file (or an empty `lanes` object if new) — not from the effective merged `load` view,
    or a project write will shadow global-only lanes and a global write will promote project-only ones.
    
    Create a uniquely named file under the platform temporary directory (`$TMPDIR`, `%TEMP%`, or Node
    `os.tmpdir()`; never hard-code `/tmp`, which breaks on native Windows), write the **exact approved
    JSON** into it with the orchestrator's file-writing tool, and use that populated path as
    `<lanes-json>` below. Never validate an empty temp file. Remove the temp file after the
    validation/write attempt, whether it succeeds or fails.
    
    ```bash
    node "<skill-dir>/scripts/config.mjs" validate "<lanes-json>"
    node "<skill-dir>/scripts/config.mjs" write --scope global "<lanes-json>"
    # or:  write --scope project --cwd /path/to/repo "<lanes-json>"
    ```
    
    Re-read with `load`, then confirm the path written and the active lane names. Project writes bind
    approval to the exact config content; later changes fail closed until re-approved. On update, a short
    before/after is enough.
    
    ### 6. Ready to delegate
    
    Stop after confirming. Tell the user the map is ready. For later work: read the lane’s
    `implementer`, load that `*-delegate` skill, and dispatch with `--lane <name>` (explicit
    `--model` / `--effort` / `--variant` still win when passed). Do not start a delegate task
    unless they ask.
    
    ## Reconfigure
    
    Same flow. Show the effective current map, propose changes, approve, write one scope’s file.
    Reinstalling the skills package must not rewrite these files — they live outside the package.
    

Comments (0)

Sign in to join the conversation.

No comments yet.

Reviews (0)

No reviews yet.

Related