用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/gastownhall/gascity --skill gc-dispatch命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
Finding, creating, claiming, and closing work items (beads)
Project conventions for writing, editing, restructuring, or reviewing the Gas City user documentation — the Mintlify site under docs/. Use this whenever you touch anything in docs/ (pages, tutorials, guides, reference, concept pages, diagrams, navigation) or write/edit prose about Gas City, even when the request is just "fix the docs", "write a docs page", "the docs are wrong/confusing", "rename X across the docs", or an edit to a file under docs/. It defines the canonical six-primitive model, required terminology (orchestrator not controller, platform not SDK, formulas v2 as the value), the prose / emphasis / diagram conventions, the information architecture, the rule that generated docs are edited at their source, and the gates to run before docs work is done.
City lifecycle — status, start, stop, init
基于 SOC 职业分类
正在显示 SKILL.md
| name | gc-dispatch |
| description | Routing work to agents with gc sling and formulas |
gc sling routes work to session configs. Multi-session configs are valid
targets — sling to the config and any eligible session can claim the work.
You do NOT need to find or create an individual session first.
gc sling <bead-id> # Auto-target via rig's default_sling_target
gc sling <session-config> <bead-id> # Route to a specific session config
gc sling <session-config> -f <formula> # Instantiate formula, route its root (v2 → workflow)
gc sling <session-config> <bead-id> --on <formula> # Attach formula to existing bead (v2 → workflow)
The <session-config> is a qualified config name from gc session list:
mayor, hello-world/refineryhello-world/polecat — routes to the config's shared work queue1-arg shorthand: When target is omitted, sling derives it from the
bead's rig prefix. The rig's default_sling_target in city.toml determines
where work goes. Example: bead hw-42 → rig hello-world → target
hello-world/polecat.
Rig-scoped beads: gc sling automatically resolves the rig directory
for rig-scoped bead IDs (e.g. hw-abc) and runs gc bd update from there,
so the rig's .beads database is found without manual intervention.
Beads must be in the agent's rig database. Sling operates on the
target agent's rig database — formula cooking, labeling, and convoy
creation all happen there. Create the bead in a specific rig's database
with gc bd create --rig <rig>, which resolves the rig from city config
and uses its database and prefix:
gc bd create "fix the bug" --rig frontend # Creates fe-xxx in frontend's db
gc sling frontend/polecat fe-xxx # Works — bead is in the right db
If the bead is in the wrong database (e.g. gc-xxx in HQ but targeting
a frontend agent), sling's cross-rig guard will block the route.
gc sling <session-config> <bead-id> # Route a bead to a session config
gc sling <bead-id> # Use rig's default_sling_target
The agent receives the bead on its hook and runs it per GUPP.
-f, formula creates its own root bead)gc sling <agent> -f <formula> # Instantiate a formula, route its root bead
Instantiates the formula and routes its root bead to the target. What the
instantiation produces depends on the formula's compiler contract: a v2
formula (one declaring [requires] formula_compiler = ">=2.0.0") starts a
workflow; a v1 formula instantiates a wisp (an ephemeral molecule).
Use -f when the formula defines the work itself — when you already have a work
bead, use --on (below). A formula that references {{convoy_id}} or contains
a drain step cannot be launched bare with -f; route it onto a bead with --on
so a target convoy is created.
--on, formula runs against an existing bead)gc sling <agent> <bead-id> --on <formula> # Attach a formula to an existing bead
--on attaches a formula to a bead that already exists — the bead is the
work; the formula supplies the method. What gets created depends on the
formula's compiler contract:
[requires] formula_compiler = ">=2.0.0") — starts a
workflow. The sling creates a workflow-root bead and an auto-convoy,
with your bead tracked as the work member (root + convoy + work bead). The
step DAG and handoff metadata (branch, target, …) are persisted as beads,
so they survive a session recycle — a recycled agent resumes the same branch
instead of stranding it.Convoy-referencing formulas require a target convoy. A v2 formula that
references {{convoy_id}} or contains a drain step must launch onto a convoy —
routing with --on satisfies that, because the sling normalizes the target into
an input convoy, creating a one-item convoy that tracks your bead when the
target is not already a convoy. That input convoy is not optional: --no-convoy
suppresses only the ordinary routing auto-convoy, not the v2 input convoy. To run
the workflow against a convoy you already have, pass that convoy as the target
(gc formula cook <formula> --attach <convoy-id>). Launching such a formula bare
with -f is rejected.
gc formula list # List available formulas
gc formula show <name> # Show formula definition
Work formulas differ by isolation (does the agent get its own worktree and branch?) and handoff (does the agent land the change itself, or hand off to a separate merge-review step?). Reach for the lightest one that fits:
| Formula | Isolation | Lands the change | Use when |
|---|---|---|---|
mol-do-work | none — works in the CWD | agent commits, then closes the bead | demos, throwaway, or a trivial single-agent fix where isolation and review are overkill |
mol-scoped-work | worktree + explicit setup/teardown | agent-managed, no refinery — work modeled as a routable step-bead DAG | multi-step work you want decomposed into independently-routable steps under one owner, without a merge-review gate |
mol-polecat-work | worktree + feature branch | pushes the branch and reassigns to the refinery for merge review | production multi-agent work that must be reviewed before landing on a shared branch — the default for pooled polecats |
Two narrower siblings trade a stage away from mol-polecat-work:
mol-polecat-commit — worktree + quality gates, but commits directly to
the base branch (no feature branch, no refinery). For small installs where
merge review is unnecessary.mol-polecat-report — no checkout; the agent investigates and writes
findings to bead notes. For analysis/investigation beads whose output is a
report, not a code change.Rule of thumb: choose mol-polecat-work for anything that must land through
review or survive a session recycle — its workflow state and branch/target
metadata live in beads, so a recycled agent resumes the branch instead of
stranding it. Use mol-scoped-work when you want worktree isolation and
step-level routing but own the work end-to-end and need no merge-review handoff.
Drop to mol-do-work only for the trivial single-agent case.
When the refinery handoff doesn't apply. mol-polecat-work ends by pushing a
feature branch and reassigning the bead to the refinery, which merges it into the
rig's own repo. Two kinds of work break that contract — model them as plain
beads with a coordinator/mayor handoff instead of attaching this formula:
branch/target metadata points at the wrong remote. Diverge from the formula:
edit the fork clone, push, open the PR yourself, and hand the bead to the
coordinator — not the refinery (gas-city precedent: gci-7ti).submit-and-exit/finalize steps live and routable after the bead
closes — an unrelated pool agent then claims the moot step (churn + manual
cleanup). Until mol-port-review (packs#260), whose stage 3 is the mayor
publish, lands, use plain beads for mayor-rail work; interim, the mayor drains
the attached workflow at publish time.mol-do-work — Simple work lifecycle. Agent reads the bead, implements the solution in the current working directory, and closes the bead. No git branching, no worktree isolation, no refinery handoff. Good for demos and simple single-agent workflows.
gc sling <agent> <bead-id> --on mol-do-work
mol-scoped-work — Graph-first worktree lifecycle (v2 workflow). Models the work as an explicit DAG — a durable scope bead, explicit worktree setup and teardown, and first-class step beads that can be routed independently, with continuation metadata for same-session execution. The opt-in replacement for hierarchy-first single-session formulas; agent-managed, with no refinery handoff.
gc sling <agent> <bead-id> --on mol-scoped-work
mol-polecat-commit — Direct-commit variant. Creates a worktree but commits directly to base_branch with no feature branch or refinery step. Includes preflight tests, implementation, and self-review quality gates. For small installations where merge review is unnecessary.
gc sling <agent> <bead-id> --on mol-polecat-commit
mol-polecat-report — Report-only variant. No git checkout, no feature branch, no push, no PR. The agent investigates, writes findings as bead notes, and exits. Use for analysis or investigation tasks where the output is a written report, not a code change.
gc sling <agent> <bead-id> --on mol-polecat-report
mol-polecat-base — Shared base for polecat work formulas. Defines the common steps (load context, preflight, implement, self-review) that variant formulas extend. Not typically used directly — use a variant like mol-polecat-commit, mol-polecat-report, or mol-polecat-work instead.
mol-prompt-synth — Formula side of gc prompt synth --writer-agent <name>.
Reads a pre-rendered meta-prompt from disk, generates an agent prompt
template, and writes it to a destination path.
mol-review-quorum — Graph-first review quorum scaffold. Fans out two read-only reviewer lanes (lane IDs, providers, models, and dispatch targets supplied by formula variables), then routes a synthesis agent to combine their durable structured outputs.
mol-scoped-work — Graph-first worktree lifecycle; the built-in v2
workflow prototype. Models work as an explicit DAG with a durable body
scope bead, explicit worktree setup/teardown, independently routable step
beads, and continuation metadata for same-session execution. Opt-in
replacement for hierarchy-first single-session formulas.
These require the gastown pack. They extend the built-in
mol-polecat-base.
mol-polecat-work — Feature-branch variant. Creates a worktree and feature branch, implements, then pushes and reassigns to the refinery for merge review. Production default for multi-agent setups.
gc sling <agent> <bead-id> --on mol-polecat-work
The polecat cuts its branch from origin/<base_branch> and stamps
metadata.target for the refinery, so base_branch decides where the
work lands. gc sling resolves it in this order, first match wins:
metadata.target on the work bead, or on the nearest parent convoy
that carries one — the per-bead override.default_branch recorded for the bead's rig in city.toml.default_branch recorded for the agent's rig in city.toml.origin/HEAD.Tiers 2 and 3 are the knob to reach for when a repo's mainline is not
what origin/HEAD advertises. A repo whose origin/HEAD still points at
a mirror-only main while work belongs on an integration branch sets it
once, per rig:
[[rigs]]
name = "myrig"
default_branch = "develop"
Without that, resolution falls through to the tier-4 probe and every
polecat branch is cut from the mirror. gc rig add captures
default_branch from the repo at add time, so a rig registered before
its mainline moved keeps the stale value until you update it — check
gc rig list --json rather than inferring the answer from
git symbolic-ref refs/remotes/origin/HEAD, which only ever reports
tier 4.
mol-idea-to-plan — Planning workflow for a coordinator session. Turns a
rough idea into a PRD, reviewed design doc, and beads DAG using Gas City's
existing primitives: repo-local artifact files, review task beads, gc sling,
and mail. Best run from a crew worker in the target rig.
gc sling <coordinator-agent> -f mol-idea-to-plan --var problem="..." --var review_target=<rig>/polecat
mol-review-leg — Helper formula used by mol-idea-to-plan review tasks.
Persists the full report to bead notes, mails the coordinator, closes the bead,
and drains the session. Usually not slung by hand.
Patrol formulas are auto-poured by agent startup prompts — you typically don't sling these manually:
mol-digest-generate (the periodic activity digest mailed to the mayor) is
not a startup patrol pour: it is driven by an order on a schedule (the
digest-generate order — a 24h cooldown trigger). Run or inspect it through
its order (gc order run digest-generate, gc order show digest-generate), not
as a manual sling or a patrol pour.
gc convoy create <name> <bead-ids...> # Group beads into a convoy
gc convoy create <name> --owned --target integration/<slug> # Long-lived initiative convoy
gc convoy target <id> <branch> # Set/update convoy target branch
gc convoy list # List active convoys
gc convoy status <id> # Show convoy progress + metadata
gc convoy add <id> <bead-ids...> # Add beads to convoy
gc convoy close <id> # Close convoy
gc convoy check # MUTATING: scans ALL open convoys city-wide and auto-closes any where all children are resolved
gc convoy stranded # Find convoys with no progress
gc convoy autoclose <id> # Internal: invoked by bd's on_close hook to auto-close a closed bead's completed convoys
Migration note:
gc convoy target, gc sling <convoy>, or the Gastown refinery convoy flow.gc order list # List order rules
gc order show <name> # Show order definition
gc order run <name> # Manually trigger an order
gc order check # Evaluate all orders' trigger conditions and show which are due
gc order history <name> # Show order run history