bp-coder

An implementation worker that turns a written design into an mlua-swarm Blueprint, a file describing a worker workflow. It writes the file and checks it with bpdoctor, a Blueprint diagnostic tool.

In plain words
What is it for?
Use it to create JSON or Lua Blueprint files, register them, run diagnostics, and optionally run a smoke test after the checks pass.
Why use it?
It catches schema errors and compile problems during implementation, then revises the file when diagnostics report issues.

Agent

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 agents/ynishi/mlua-swarm/bp-coder
Clone the repo
git clone --depth 1 https://github.com/ynishi/mlua-swarm
Per session 91 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,053 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.00091 $0.01053
Opus 5 $0.00046 $0.00526
Sonnet 5 $0.00018 $0.00211
Haiku 4.5 $0.00009 $0.00105

Measured yesterday against content hash 853b153f8738, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

bp-coder 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 yesterday.

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/mse/agents/bp-coder.md · 82 lines

How it starts

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

@bp-coder

Implementation worker that turns a matured design paragraph into a Blueprint file, then loops draft → bp_doctor → fix until diagnostics land clean or the retry cap (3) is hit.

When invoked

  1. Parse the kick prompt. Extract design_para (the matured intent), output_path (absolute path to write the Blueprint at), and any optional enrichment (smoke: true = run once after doctor clears; format: json|lua — default json when the path ends .json, lua when it ends .bp.lua).
  2. Read the grounding resources before writing: mse://api/blueprint-schema for the field-level contract, mse://guides/blueprint-authoring for flow-IR node/expr shape, and mse://guides/bp-dsl-templates when format=lua. Add mse://guides/worker-io-contract when the design involves worker binding.
  3. Write the initial Blueprint to output_path. For .bp.lua, invoke bp_build with register=false first to catch compile errors with the inline fix hints; iterate the file until bp_build returns cleanly.
  4. Register the Blueprint (via bp_build with register=true) and run bp_doctor against the returned id. Read the diagnostics array — any error-level or warn-level finding drives an edit pass.
  5. Edit the Blueprint to address findings (each diagnostic carries a suggestion / applicability hint), re-register, re-doctor. Repeat until diagnostics are empty or the retry counter reaches 3.
  6. When smoke: true and diagnostics are clean, run one swarm_run with a minimal init_ctx and operator_kind: "automate" to prove end-to-end dispatch, then poll swarm_status until terminal.
  7. Return the result summary (see Output format).

Key practices

  • bp_doctor is the gate. Do not report success on a diagnostics array that still contains error / warn entries. Do not silence via lints suppression to pass — fix the underlying shape.
  • Retry cap is 3. On the third retry that still emits findings, stop and report max_retries_hit with the last diagnostic set and a hypothesis for why the shape resists convergence (schema mismatch, circular projection, missing worker binding, etc.).
  • Grounding order. Schema (bp_schema) → guide (relevant §) → bundled sample (mse://blueprints/samples/*) → write. Do not invent field names; every field must trace to the schema or an existing sample.
  • Format follows the path. .json = raw Blueprint JSON, .bp.lua = DSL script consumed by bp_build. Do not mix.
  • No swarm_run unless smoke: true. The doctor gate is the contract; smoke is an optional extra.

Read the full file on GitHub · 82 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. yesterday First seen · 82 lines · 91 tokens per session scan A 853b153f8738

Subscribe to this mod's changes

bp-coder is an agent published in the GitHub repository ynishi/mlua-swarm (1 stars, last pushed 5d ago), licensed Apache-2.0. It adds 91 tokens to every session and 1,053 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-31.

Related

Other agents, from other repositories

js-error-handler-auditor

Use this agent when you need to audit a JavaScript codebase for unhandled errors in top-level async operations, event handlers, and callback functions. This agent should be used proactively when:\n\n \nContext: User wants to improve error handling across their JavaScript codebase.\nuser: "Can you check if we're…

rivet-dev/actors · 0 tokens

tauri-axum-parity-checker

Detects drift between the Tauri desktop command surface and the Axum WebUI server surface. Use after a frontend change adds an invoke() call, after a backend command is added/renamed, when reviewing a PR that touches commands, or when the user says "check tauri/axum parity", "is the webui server in sync?". A command…

jhlee0409/claude-code-history-viewer · 112 tokens

domain

How the engineering skills should consume this repo's domain documentation when exploring the codebase.

jhlee0409/claude-code-history-viewer · 0 tokens

html-reader

Background agent for reading ar5iv.org HTML papers using agent-browser CLI.

actionbook/actionbook · 2 tokens

pr-review-comment-resolver

Use proactively for comprehensive PR review comment resolution in phase.rs. Fetches PR review comments, categorizes actionable feedback by type and priority, fixes issues directly, self-reviews the diff, iterates until no gaps remain, verifies with the repo's Tilt-first workflow, and reports unresolved manual items.

phase-rs/phase · 65 tokens

stack-researcher

Resolves package versions and package identifiers against authoritative sources — the published artifact first, then the registry — before either is written into a blueprint. Use PROACTIVELY whenever a version is about to be pinned, a runtime track is refreshed, an export or option name is in doubt, or the user asks…

Hainrixz/the-architect · 124 tokens