/ai_dev:agent_spinnerfrom ai_dev
Orchestrates helper agents under a quality contract: establishes capability tier, phase plan, orchestration shape, and merges findings into verdict-first reports. Use for fan-outs, parallel helpers, review lenses, judge passes, cross-checks, concurrent writers, aggregating reports, or implement-then-audit loops.
Ships in ai_dev. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them; scripts run unread.
<agent_spinner_skill>
agent_spinner is the orchestration doctrine an agent follows when it runs helper agents, whatever delegation the host offers. `scripts/` holds the ledger program, and the run's files live under `.agent_spinner/` in the working root. The skill owns no artifact class and writes no domain state, and every guarantee holds at the inline floor.<start_here>
Build every path to scripts/ and references/ from the directory of the loaded SKILL.md, and invoke the ledger by that absolute path. On a missing-file error, re-resolve the path once before treating the ledger as unavailable. The command is python3 -B <skill dir>/scripts/run_ledger.py <verb>. Then, in order:
status. Where it reports an open run, run attach and continue that run from its status.<selector>, and read a matched recipe in full. A job a governing skill owns follows <invocation_boundary>, and an ask answered inline stops here.<invocation_boundary>
A request naming the task backlog or the wiki without naming this skill goes to that family (task_*, wiki_fix); a per-harness question goes to harness_portability. A pure backlog query goes to task_*. A task-path prompt that asks for helper agents or the serial implement-then-audit loop is agent_spinner's by intent, but the router currently sends a bare task-path implement phrasing, such as implement and audit tasks/<x>.md in sub-agents, to task_implement, which owns it; record task_implement as that phrasing's owner and keep the serial-loop row for an ask that names the loop or the helpers. A run a named skill governs keeps that contract's loop bounds, failure policy, verification standard, aggregation rule, and stop-and-ask boundary.
When the user names this skill on a family-owned job, the family's writer stays the only writer. Run the looks at your level: one read-only finder per ledger unit before the writer, and <paired_refute_check>'s post-write check on every changed file. Where that contract stops and asks for a host with no spawn surface, honour it and run no look inline. Every repair a look raises returns to the family writer as a scope the user explicitly approves; only the user's explicit gate answer is that approval, not the request, a goal objective, your own authority, a plan confirmation or mode switch. Write no family-owned artifact yourself; an orchestrator running a family's workflow inline is not that family's writer. Hand each stamp to the gate that writes it: task_implement writes the implemented stamp, task_audit writes the audited stamp, and the orchestrator writes neither. Encode no multi-helper shape into a brief, and relay its report per that contract.
</invocation_boundary>
<capability_probe>
Establish each capability by observation. A registered role is one the host's spawn surface lists or accepts by name, so the probe tries each one through that surface and never searches home or configuration directories for definition files; a tool search that finds nothing settles nothing. An on-disk role definition is no evidence of callability, and only the host's spawn surface establishes it, so report that rule wherever the run names a role or a definition file. init --probe renders one fixed probe brief, and its first spawn establishes the delegation surface. Probe four capabilities: a delegation surface, a host-enforced read-only lever, a depth or effort control, and whether two helpers run at once. Establish the read-only lever from the host's spawn-surface role metadata, declared per route with init --probe --readonly-route, and record it unverified where the metadata declares nothing. Resolve a capability that resists establishment to absent, and name each as established, assumed_absent, or unverified.
</capability_probe>
auto_checker_spinner or auto_writer_spinner among the roles the host's spawn surface lists or accepts by name, spawn through it, since a registered role can carry a read-only lever and a depth setting that a generic spawn lacks. Record the spawn route on the roster, and otherwise spawn generically with the lever and depth recorded as the probe found them. A generic spawn is a narrowing, recorded with the route and the reason the run did not use a role. Name the reason as one of: the probe found no role, the user chose the generic route, the host refused the registered role at spawn, or the role failed and the single re-invocation ran generically. Record it through dispose --narrowing, whose text carries the route and the reason.Set a checker's depth at or above its producer's, state rigour as behaviour where no control exists, and name a checker that ran below its producer as a narrowing. Write every guarantee to hold at the floor, so no step depends on a fresh context, an isolated tool set, or a process boundary, and claim no wall-clock benefit from fan-out. Where a governing skill states its own stop-and-ask boundary for a host with no spawn surface, honour that boundary, offer that skill's manual routes, and perform no helper role inline.
Match weight first.A read-only diagnostic is one artifact or one mechanism, answered from the orchestrator's own reads before any helper is spent, and it takes no recipe, naming a fuller shape's checks; a single judgement question about a mechanism not yet built reads the same way. An ask no single row covers, or one combining rows — a read-only ask that combines rows included — gets the smallest shape that covers it, named as the smallest covering one, answered visibly rather than folded into a nearby row, and takes no recipe; a dedicated row that names a procedure for a serial loop over rows — the serial implement-then-audit row included — is the exception, and that row's recipe is authoritative over the smallest-covering-shape fallback. A shape match matches the recipe table, whose matched recipe is the procedure; with no recipe it runs from the body. Name what matched, or nothing, in the opening. Read references/variants.md for isolation, unreduced draws, blind derivation, balanced challenge, calibration controls, and hypothesis readings.
A challenged built design routes to its recipe row ahead of the paired-check bullet: the design carries no accepted producer return to paste, and the recipe's Refute phase supplies the adversarial read.
| Ask | Recipe in references/recipes/ |
|---|---|
| Fix derived documents against their sources | fidelity-review.md |
| Repair many artifacts against the tree | artifact-repair.md |
| Audit many artifacts, changing nothing | check-only-audit.md |
| Apply one wording rule across many files | prose-sweep.md |
| Implement one task, a tracked item with its own acceptance list, spanning many files | multi-file-task.md |
| Weigh design options or challenge a built design | option-panel.md |
| Research a corpus into one deliverable | research-synthesis.md |
| Settle a disputed figure or claim by an edit | disputed-claim.md |
| Implement then audit in a serial two-agent loop, repeating until one audit stamps the task audited | serial-loop.md |
<per_artifact_fan_out> Trigger many artifacts each judged on its own, enumerated by the ask or by the resolver and in any mood, read-only included (the resolver is the repository's own artifact that produces the artifact list). Width one helper per ledger row, one path per row. Prompt skeleton the producing template with the item's kind note. Return the producing return. </per_artifact_fan_out>
<lens_panel> Trigger one corpus that needs several angles. Width three to five named lenses over the identical corpus. Prompt skeleton the lens template. Return the lens return. </lens_panel>
<paired_refute_check> Trigger every write that lands, whoever wrote it, you included. Width one check per written file against the recorded baseline: gates clear pointer-only hunks, and one checker reads each file whose diff changes a claim. Prompt skeleton the checking template with its two standing lines. Return the checking return. </paired_refute_check>
<judge_panel> Trigger a closed comparison among candidates that already exist. Width one judge per criterion over the identical candidate set. Prompt skeleton the judge template, one criterion on a defined scale. Return the judge return, with at most three cited fatal flaws. </judge_panel>
<completeness_critic> Trigger a finished body that needs a what-is-missing read; its scope is every check scoped to raised findings or changed files. Width one critic per body, paired with one surplus read. Prompt skeleton the critic template. Return the critic return, with gap units as full briefs. </completeness_critic>
<single_writer_validator> Trigger a tree of writes that share a link graph or an index. Width exactly one, alone, after every writer and checker has returned. Prompt skeleton the validator template, with a grant naming its paths. Return the validator return, with repairs proposed rather than applied. On an upstream shortfall it reports the gap and writes nothing. </single_writer_validator>
<two_refuter_settlement_check> Trigger a proposed edit that settles a disputed figure or claim. Width exactly two refuters per proposed edit, each carrying a different brief, with the count and its reason stated first. Prompt skeleton the paired refute check's skeleton, run once per refuter. Return the paired refute check's return, plus the alternatives with their derivations and the provenance of every number the edit introduces. </two_refuter_settlement_check>
Derive breadth from the ledger: one row per enumerated unit (a file, source, page, or issue-and-stance pair) written before dispatch, and one helper per row, never a round number and never a merge of rows taken to save calls. Rows for a later phase come from accepted records: `rows` creates one per finding, repair, or gap unit, so a finding-sized phase keeps its width equal to its rows. Replicate one identical prompt only for a single indivisible factual or arithmetic claim, stating the count first. A declared shape binds, and a mid-run switch is a ledger event naming the checks it drops, reported as a narrowing and put to the user when it removes a check.<phase_plan>
Declare the run before the first helper, write the declaration to the run directory, and announce each phase boundary as it is crossed. Plan two to four phases, each one verb plus one clause naming what a helper does over what unit, and name the earlier returns each phase reads, so a barrier stands only where data crosses it. Give each role a model and an effort in the phase plan. Adversarial, critic, and synthesis passes run deepest, and mechanical edits may run lighter. State the item count, the exclusions with a reason each, the per-helper wall-clock bound at every tier, the wave size, and an estimate of helpers per phase beside any size guideline the host or user states. A widening past the scouted list, or an estimate above that guideline, is a fork the user answers first. Run writes and their checks in waves, so a stop leaves at most one wave unchecked. Estimate your own context load before dispatch: tokens per spawn call, per returned result, and per ledger printout, times the rows, against the host's window. Plan a session boundary at the first wave end past half the window, and resume there with attach. Before the first write, read in full, as ledger rows, CHARTER.md, the repository procedures, the owning skill of each artifact class the run touches, and the requirement sources the ask names. Label every helper role:item from its row's stable slug.
</phase_plan>
<run_economy> Close every run with its yield: helpers dispatched against the decisions or edits they produced, the estimate beside the actual count, and per checking stage what it surfaced that the gates had not. Say plainly when a run or a stage cost more than it returned. </run_economy>
<coverage_tradeoff>
Name every narrowing out loud, printed from the ledger. Every planned read, check, and step a governing skill mandates is a row before dispatch, and a row left unrun is dropped by a named narrowing through dispose --rows for a deliberate narrowing or settled by close --stopped for a stopped run's pending rows, each with its recorded reason. Count a path as read only where tool evidence shows a full read. When the run answers inline, verifies a subset, or drops a phase, state in the same reply which checks go unrun and what would surface them. Proceed on the user's word where the narrowing removes a check the fuller shape would make. A repository's CHARTER.md coverage invariant is the authority this rule applies to the skill's own economy rules.
</coverage_tradeoff>
<delegation_depth> Delegate one level per run. Every brief states that the helper performs its own item and delegates no part of it, that work it cannot complete returns as an out-of-scope finding, and which capabilities the probe established, as facts. An entry whose own work is a list you have not enumerated is nested, such as a generated artifact or an entry standing in for a manifest. Recognise it while writing the list, and return it as a finding with the size it implies, for the user to decide on and size in the next run. </delegation_depth>
<prompt_assembly>
Render every brief with brief from files in the run directory: the invariant preamble, the phase's access block, the item brief, its kind note from references/edit-mechanics.md, the hashed intent, and the paths of upstream returns to read in full. The preamble holds the hard rules, the vocabulary, the severity ladder, and settled facts. Settle only a fact measured against the primary system, or read in finished content of the artifact the claim is about, and tag each settled fact with its provenance class. A fact from documentation, a wiki, another project's guide, a placeholder, a to-do note, or a later phase stays conditional. It goes in the unverified-premises block, checking passes test it, and a deliverable states it with the probe that would settle it. A producer and its checker include the same rules file byte for byte, and a writer applies only text its checker saw. Scripted replacement touches pointers only, and every claim, quotation, and hard-wrapped sentence changes through a writer that edits whole sentences.
Write every role contract as text the pass reads inside its own turn. Open with its first concrete action, state each prohibition as something the pass does, and restate a load-bearing prohibition at the point of use. A role body can arrive inside the user turn with no authority over the conversation around it. </prompt_assembly>
Refute by default, cite to clear. The checker reads the producer's return, the governing contract, and the artifact from their paths, opens from the position that the work is incomplete or wrong, and concedes only after a closed numbered checklist. Name the cost that sets that default, so the checker weighs it. Build the checklist from the brief's acceptance contract where the brief names one of C1 step 4's three contract sources (the item brief, an approved-edit list, an acceptance list), one line per item, testing the required form present and, for a rewrite item, the old form absent. A brief naming none of those three sources takes the default contract: one line per claim the artifact makes, in artifact order, each tested against the source it describes, which the request's named source identifies. A missing claim is a completeness finding, raised only when the request asks what is missing, through ``, and otherwise recorded as a dropped suspicion. A brief naming any of those three sources stays outside that default, so a write run's paired check, whose brief names the item brief, keeps its hunk mapping. Keep expected verdicts, preferences, and prior-round digests out of the brief. When the claim is your own, one pass derives it blind from the question and the sources first.Each atomic finding carries a verdict and a confidence from the sets C2 defines in references/checks.md, a claim type from C8, a verbatim quote, an anchored path, and a severity from the preamble's ladder. A clean line cites its settling span, and an uncited or self-cited clear routes back once. A check clears only claims of its own type, and a probe fires on a known positive before its empty result counts. A read receipt is a claim that accept checks against the input version the row recorded. The checker changes nothing, uses the read-only operations its brief names, and stays off the shell where a read-only mode gates commands behind approval. Narrowed wording propagates. Every reviewing pass reports what it examined and cleared, and an empty finding list is a valid outcome.
<confirmation_provenance>
Record how a finding survived. One a pass was shown and did not refute is recall-confirmed, and one a pass surfaced unprompted is independently surfaced. The ledger tags each confirmation recall-confirmed when the checker's brief relayed that record or pasted the producer's accepted finding under --pasted-from, and independently surfaced otherwise. A recall-confirmed finding carries less weight, and a decision resting only on such findings says so. Label a finding that no lens refuted after both lenses saw it "survived both lenses, recall-confirmed", and reserve "confirmed" for a finding surfaced independently or re-derived against the source.
</confirmation_provenance>
<helper_failure> Classify a non-result before acting on it, and record the class on its ledger row.
accept rejects, also earns exactly one re-invocation. Where the brief itself caused the rejection, because it lacked or misstated what accept checks, re-render the brief through brief with the missing or wrong contract text corrected and re-invoke on that corrected brief; the corrected call keeps the earlier brief under attempts/ and records the re-brief as a ledger event. Every other contract violation earns its re-invocation on the identical prompt. This one re-invocation carries no user gate, on the same footing as the spawn-glitch and spawn-failure re-invocations, so it may run inline at the inline floor without a user choice.A helper that may write files writes its return file, and its final message is its END line. A helper whose read-only lever or brief withholds file writes ends with its return block and END line as its final message, and never writes through a shell. Relay that message verbatim to accept --stdin, which records the return as relayed.
Completion is an accepted return. A notice, a quiet interval, or a tree predicate is only a hint to run status. Wait inside the turn in bounded accept --wait polls until every row of the wave is terminal or past its bound. While a foreground batch blocks you, record each bound and mark a row that returned late as over its bound. A row past its bound is unreturned, earns the same single re-invocation, and then stays unreturned, distinct from a helper that found nothing. When a re-invocation fails again, mark the item failed and report it. A degraded path such as an inline redo of a failed item waits for the user's choice, distinct from the single re-invocation above, which carries no user gate. Guard every step against a dead or rejected upstream.
</helper_failure>
<run_state>
Keep the run in .agent_spinner/ through the ledger, and query it only through the verbs references/run-protocol.md documents. init records the baseline: the commit, in-scope hashes with untracked files, and each named gate's output. Change rows only through the ledger. Derive the check set, the changed and untouched lists, and attribution from the net diff against the baseline, never from a helper's changed flag. State tool results as baseline-to-final deltas. Any turn that finds an open run, whether a completion notice, a user message, or a fresh session, runs status, accepts every pending return, and continues the run until a user gate or a surfaced fork is open, or close exits 0. End a turn with the closing report after a clean close, or with the interim report while helpers are out, a gate is open, or a surfaced fork awaits its answer. Where the session offers a goal tool, arm one goal per run, with the run directory in its objective and the run's end as its completion condition, met when close exits 0 or close --stopped ends a stopped run; a goal never answers a gate. Where it offers none, re-entry through status and attach carries the run. After a stop, pause, abort, or resume, mark in-flight rows unknown, and settle them by reading the files and the diff before re-dispatching. Report the modified, untouched, unknown, not dispatched, and violation rows, and reuse a return only when its brief hash matches. On a stop or pause request, run stop at once. Its STOP file halts new dispatch and lets running helpers finish. Before the report, run close, which prints the tally block the report carries verbatim and exits non-zero while any row, record, fork, or written path is open. close --stopped settles a stopped run's pending rows as dropped and its dispatched and unknown rows as unreturned, writes the settled tally block into report.md, and still refuses on a violation row or any other open condition. The ledger cannot force you to call close; its close conditions bind when you run close, so a report on a run with no clean close says so first, in its opening sentence, which carries the answer, the tier, helpers dispatched against returned, and whether close exited 0. Where the host cannot run python3, or asks approval for each command, keep the same files by hand, perform the same checks against the roster, and report each check as unenforced.
</run_state>
</agent_spinner_skill>
references/checks.md (opens in a new tab)references/degradation-examples.md (opens in a new tab)references/edit-mechanics.md (opens in a new tab)references/recipes/artifact-repair.md (opens in a new tab)references/recipes/check-only-audit.md (opens in a new tab)references/recipes/disputed-claim.md (opens in a new tab)references/recipes/fidelity-review.md (opens in a new tab)references/recipes/multi-file-task.md (opens in a new tab)references/recipes/option-panel.md (opens in a new tab)references/recipes/prose-sweep.md (opens in a new tab)references/recipes/research-synthesis.md (opens in a new tab)references/recipes/serial-loop.md (opens in a new tab)references/report-shapes.md (opens in a new tab)references/role-prompts.md (opens in a new tab)references/run-protocol.md (opens in a new tab)references/variants.md (opens in a new tab)scripts/run_ledger.py (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
multi-agent, orchestration, sub-agents, agent-run-plan, quality-contract
npx claudepluginhub theafh/ai-modules --plugin ai_dev27 skills in this plugin
/ai_instruction_formattingOrganize AI-consumed content (prompts, rules, skills, commands, agents, system instructions) into pseudo-XML by wrapping each semantic concern in a dedicated tag for role, policy, inputs, and output contract. Use when structuring or reorganizing the body of a SKILL.md, agent or sub-agent definition, command file, rules document (.mdc), CLAUDE.md, AGENTS.md, or GEMINI.md configuration, prompt template, or system prompt into semantic tags, when choosing tag boundaries, or when checking whether an instruction file follows the pseudo-XML convention. This is the structure-and-tags skill; its sibling ai_instruction_writing governs the wording./ai_instruction_writingWrite AI-consumed content using positive, action-oriented language as the primary carrier of every instruction. Use when creating or editing any artifact an AI reads at inference time. Those artifacts include SKILL.md files, .mdc rule files, CLAUDE.md/AGENTS.md/GEMINI.md configuration, prompt templates, system prompts, commands, agent and sub-agent definitions, instruction sets, and persona definitions./format_markdownApply markdown linting compliance and best practices when creating or editing markdown files (.md, .mdc). Covers blank-line rules around block elements, consistent bullet style, fenced code blocks with language identifiers, table alignment syntax, header level progression, list indentation and spacing, and link/image conventions.Other plugins' skills for the same job