conduct

A controlled workflow in which a mentor prepares a small coding prompt for a separate builder, then independently checks the builder’s changes before accepting them.

In plain words
What is it for?
Use it to dispatch feature slices to a headless coding process, inspect the results, run verification, and apply a human review gate.
Why use it?
It separates implementation from review and verifies commits, diffs, and targeted checks before work moves forward.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/martybonacci/specswarm/conduct
Clone the repo
git clone --depth 1 https://github.com/MartyBonacci/specswarm
Per session 107 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 2,636 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00107 $0.02636
Opus 5 $0.00053 $0.01318
Sonnet 5 $0.00021 $0.00527
Haiku 4.5 $0.00011 $0.00264

Measured 2d ago against content hash 45640e2b3490, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

conduct scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/ss/commands/conduct.md · 131 lines

How it starts

The opening of the file, as written. The whole thing — 131 lines — stays where its author put it; the contents beside it link to each section on GitHub.

SpecSwarm Conduct — the mentor→builder dispatch loop

You are operating as a mentor: you make decisions, author builder prompts, and verify results. You do not write the builder repo's application code yourself — all repo writes route through headless builder dispatches. This separation exists because the verifier must not be the brain that wrote the code.

The loop: author prompt → dispatch → independent verify → (spec-mentor adversarial pass) → human sighted gate. The pilot's measured shape: ~9-10 verification commands per dispatch. That ratio is not overhead; it is the load-bearing wall.

0. Preconditions

CONDUCT_ROOT="$PWD/.specswarm/conduct"
if [ ! -f "$CONDUCT_ROOT/config" ]; then
  echo "❌ No conduct config. Run /ss:mentor-init first (scaffolds config + mentor kit)."
  exit 1
fi
cat "$CONDUCT_ROOT/config"
BUILDER_DIR=$(grep -E '^BUILDER_DIR=' "$CONDUCT_ROOT/config" | cut -d= -f2-)

# Tree state BEFORE dispatching — record base commit + branch; you will check
# the builder's report against these.
git -C "$BUILDER_DIR" symbolic-ref -q HEAD
git -C "$BUILDER_DIR" log --oneline -1
git -C "$BUILDER_DIR" status --short

# One builder per tree — if a lock is held, WAIT (never dispatch into a busy tree)
ls "$CONDUCT_ROOT/locks/" 2>/dev/null && cat "$CONDUCT_ROOT"/locks/*.lock 2>/dev/null

1. Author the prompt (the proven grammar)

Write the prompt to a file (e.g. dispatch/prompts/<name>.md or a scratch path) with these sections, in this order. Slices that skip a section earn the failure that section prevents.

  1. Header — slice name, repo/branch, expected base commit, and verbatim: "Single-turn run — run every gate SYNCHRONOUSLY in your turn; NEVER background a gate and await its notification (headless runs get no later turns)."
  2. §0 PRECONDITIONS — verify, don't trust this prompt. List the facts the builder must confirm against the tree before writing code (base commit, branch, the specific functions/files this slice builds on). "The mentor believes them true; you prove them — if one fails, STOP and report the mismatch instead of building on sand."
  3. THE SLICE — one narrow, completable goal. What exists after this run that didn't before.
  4. RULINGS — numbered decisions (D1, D2…) made for this slice, each with its trap called out explicitly ("TRAP: nothing may depend on X"). End with: "decided within the blessed spec; flag disagreements, don't silently deviate."
  5. SCOPE FENCE — what this slice is NOT. Name adjacent work and forbid it. Emergent findings get LEDGERED in the report, not fixed.
  6. TESTS — RED-first where a defect is claimable; name the exact suites/configs.
  7. GATES — a TARGETED set. Name each gate command. Wide sweeps belong to YOUR verification pass, not the builder's budget.
  8. BUDGET + COMMIT DISCIPLINE — wall-clock budget, then verbatim: "Commit PER COMPLETED ITEM. If you near the budget: COMMIT everything verified, write an honest partial report naming exactly what is un-run, and end — never die silent, never background-and-await." If the builder may push, name the exact leaf branch: pushes go to the feature branch named in the header only — never to a shared branch (main/dev/sprint) on the builder's own initiative. Promotion up the hierarchy is always a separate ship dispatch you author after the human's blessing, naming the exact merge (<leaf> → <parent>) — the builder executes that merge too (it is the hands for all repo writes); the blessing chain is the authorization.
  9. REPORT — require: commit hashes per item ("a report without hashes is an unfinished report"), gate outputs verbatim (counts, not adjectives), honest limits, and a final DISPATCH_RESULT: <ok|blocked|partial> … sentinel line. If decisions surfaced that need the human: 2-4 options each + recommended default, written so AskUserQuestion can present them verbatim.

Read the full file on GitHub · 131 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 131 lines · 107 tokens per session scan A 45640e2b3490

Subscribe to this mod's changes

conduct is a command published in the GitHub repository MartyBonacci/specswarm (65 stars, last pushed 1mo ago), licensed MIT. It adds 107 tokens to every session and 2,636 once invoked, about $0.0005 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.