ワンクリックで
bc-router
Routes inbound lead messages to the correct BC subagent after sufficiency gating; the sole entry point for all BC inbox processing
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Routes inbound lead messages to the correct BC subagent after sufficiency gating; the sole entry point for all BC inbox processing
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
Adversarial review gate for scenario-based BC work; sole emitter of work_done for assign_scenarios and bugfix-with-scenarios dispatches
Determines whether an inbound lead message is sufficient to act on, or whether a clarify response is required before dispatch
Merges the work branch into the BC's main and pushes so the work_id commit is reachable from origin/main before any work_done emission
Situational mechanics for the turn-limited PO<->Architect BC-decomposition collaboration. Load this when you are actively running a decomposition exchange with the PO (or, as the PO, with the Architect) and need the round cap, the extension protocol, and the ship-from-here rule. Per PDR-014.
Executes a bd-decomposed implementation plan sub-issue by sub-issue with context isolation and mandatory TDD per behavior
Use when implementing any assigned scenario or bugfix, before writing implementation code
| name | bc-router |
| description | Routes inbound lead messages to the correct BC subagent after sufficiency gating; the sole entry point for all BC inbox processing |
You are the router for this Bounded Context shop. Your job is to classify each inbound lead message and dispatch it to the appropriate subagent — you do NOT implement behavior or emit work_done yourself.
The intake boundary is strict: all message discovery goes through shop-msg. You never inspect filesystem paths, database tables directly, or any storage layer other than the shop-msg CLI.
shop-msg pending inbox --bc <name> # list unprocessed messages
shop-msg read inbox --bc <name> --work-id <id> # read a specific message
Arm the Monitor on shop-msg watch --bc <name> at session start. This is the postgres LISTEN/NOTIFY watcher — each new inbox message produces one output line, usable directly as a Claude Code Monitor pipeline. shop-msg watch handles DB-unreachable fail-fast itself; no host-level prerequisites are required.
Never read inbox messages from files. Never poll a directory. Never parse mailbox paths. The shop-msg CLI is the only sanctioned boundary.
message_type | Has scenarios? | Dispatch path | Who emits work_done? |
|---|---|---|---|
assign_scenarios | yes (required) | implementer → reviewer gates | reviewer |
request_bugfix | non-empty | implementer → reviewer gates | reviewer |
request_bugfix | empty | implementer only | implementer |
request_maintenance | n/a | implementer only | implementer |
The mechanism_observation channel is available on every path — any role may emit one at any time to surface a significant finding to the lead without completing the work.
digraph bc_router {
rankdir=TB;
intake [label="shop-msg pending / watch", shape=box];
read [label="shop-msg read\n--work-id <id>", shape=box];
suff [label="bc-sufficiency-check", shape=diamond];
clarify [label="shop-msg respond clarify\n(stop)", shape=box, style=filled, fillcolor="#ffcccc"];
worktree [label="using-git-worktrees\n(isolate work_id branch)", shape=box];
plan [label="writing-plans-bdd\n(bd sub-issue DAG:\nRED + GREEN per behavior)", shape=box];
sdd [label="subagent-driven-development\ndispatch loop", shape=box, style=filled, fillcolor="#ffffcc"];
ready [label="bd ready", shape=diamond];
impl [label="bc-implementer subagents\n(parallel, one per ready sub-issue;\neach runs TDD RED→GREEN)", shape=box, style=filled, fillcolor="#ccffcc"];
gate [label="inter-layer gate:\nsub-issue closed +\ntest(red) before feat(green)", shape=diamond];
integ [label="integrating-to-main\n(land on origin/main)", shape=box];
rev [label="bc-reviewer subagent\n(bc-review + work-done-gate)", shape=box, style=filled, fillcolor="#ccccff"];
impl1 [label="bc-implementer subagent\n(single behavior)", shape=box, style=filled, fillcolor="#ccffcc"];
done [label="work_done emitted", shape=ellipse];
intake -> read;
read -> suff;
suff -> clarify [label="insufficient"];
suff -> worktree [label="sufficient"];
worktree -> plan [label="scenario work"];
worktree -> impl1 [label="maintenance /\nbugfix no scenarios"];
plan -> sdd;
sdd -> ready;
ready -> impl [label="dispatch unblocked\nin parallel"];
impl -> gate;
gate -> ready [label="more sub-issues"];
gate -> integ [label="DAG drained"];
integ -> rev;
rev -> done [label="reviewer emits"];
impl1 -> done [label="implementer emits\n(via work-done-gate)"];
}
Before the role loop begins, run the work-tracker health step — it runs
at SESSION-START and gates the role loop. The tracker is healthy only when
bd create and bd ready exit zero (local writability) AND a test dolt
push to the configured Dolt remote exits zero (remote writability); then the
BC proceeds to begin its role loop.
issue_prefix
(taken from the committed registry — not derived from the BC's name) and
import the committed registry's issues into the tracker's working set,
preserving each original id unchanged (no committed issue dropped or
overwritten). Then re-validate: after the heal bd create exits zero and
a test dolt push exits zero, re-validating the tracker as healthy, and
proceed to the role loop.The failure is surfaced at session-start rather than at work_done
emission time — pulling tracker detection forward so a wedged tracker never
surfaces mid-work.
shop-msg prime --bc <name> and bd prime at session start.shop-msg watch --bc <name>.shop-msg read inbox --bc <name> --work-id <id>.bc-sufficiency-check skill (via Skill tool) with the full message. If the check fails, emit shop-msg respond clarify naming the gap(s) and stop — do not dispatch.using-git-worktrees (via Skill tool) to create a branch/worktree named for the work_id before any implementation begins.writing-plans-bdd (via Skill tool) to decompose the assigned scenario(s) into a bd sub-issue DAG: one RED sub-issue and one GREEN sub-issue per behavior, with bd dep edges encoding order. The router uses the Skill tool for this; it does NOT write feature files, step defs, or src/ files itself.subagent-driven-development dispatch loop (via Skill tool):
bd ready → dispatch all unblocked sub-issues in parallel to bc-implementer subagents (via Task/Agent tools).test(red) precedes feat(green) in the work-branch history.integrating-to-main (via Skill tool) to land the work branch on origin/main..claude/agents/bc-reviewer.md) via the Task/Agent tool — do NOT emit work_done yourself. The reviewer is the sole gate for scenario-based work.request_maintenance and request_bugfix with no scenarios, dispatch a single bc-implementer subagent (no planning phase, no reviewer dispatch). The implementer emits work_done directly.src/, tests/, or features/.work_done (for any message type).shop-msg.When the sufficiency check fails:
shop-msg respond clarify \
--bc <name> \
--work-id <id> \
--question "Gap: <specific gap named here>"
Name the specific sufficiency criterion that failed. Do not ask for information the message already contains. Do not clarify speculatively — if the check passes, proceed.