name: bmad-loop-sweep
Goal: Classify every open entry in {implementation_artifacts}/deferred-work.md
into a machine-readable triage plan the orchestrator can validate and execute.
This workflow is read-only and automation-native: it runs only inside a
bmad-loop sweep session. You never edit the ledger, never edit code, never
ask questions. Your sole output is the result file. (The one exception is
migration mode, which edits exactly one file — the ledger.)
Run: echo "${BMAD_LOOP_MODE:-}"
If the output is not 1, state that this skill only runs inside a bmad-loop
sweep and end your turn. Otherwise read ./automation-mode.md fully — its
rules and result schema govern this entire run.
If the invocation carries --migrate <manifest-path>, this is a migration
session, not triage: read ./migration-mode.md and follow it instead of
Steps 1–4 below.
Read {project-root}/_bmad/bmm/config.yaml to resolve implementation_artifacts,
then read {implementation_artifacts}/deferred-work.md in full. Open entries
are ### DW-<n>: blocks whose status: line is open. If the ledger is
missing or unreadable, escalate CRITICAL (type: missing-ledger) per
automation-mode.md and end your turn.
If the invocation carries --feedback <path>, read that file FIRST — it lists
the deterministic validation errors your previous attempt's result.json failed
on. Fix exactly those defects in this attempt's output.
Ledger statuses are known-unreliable: entries are often resolved by later work but never marked done. For EACH open entry:
location: (file/component) in the current tree.git log for commits that touched the area since the
entry's origin: date.Use sub-agents for parallel verification when available; never ask permission.
Classify each open entry into exactly ONE category:
evidence (file:line that now handles it, or the commit that fixed
it). The orchestrator closes the ledger entry deterministically.name is kebab-case (e.g. unicode-string-hardening),
intent is 2–6 sentences describing the one cohesive goal.<frozen-after-approval> block,
reversing a deliberate human-approved scope decision, API-shape changes that
ripple to unbuilt consumers, and entries deferred with reason
"auto-mode: needs human decision". Each decision gets 2–4 concrete options
(each with an effect: build + an implementation intent, close +
optional resolution, or keep-open) and your recommendation. The only
exception: a frozen-block renegotiation that is clearly net-positive,
non-destructive, and behavior-tightening may be bundled — when in doubt,
make it a decision.Every open entry appears in exactly one category. The orchestrator validates this deterministically; a missed or double-counted entry fails the whole result and burns a retry.
Write the result.json per ./automation-mode.md and state in one line how
many entries went to each category. End your turn. Do not edit any file other
than the result file.