AGENT SKILL

bmad-loop-sweep

Triage the deferred-work ledger for the bmad-loop orchestrator: verify every open entry against the actual codebase and return a machine-readable partition (bundles, already-resolved, blocked, skip, human decisions). Also migrates legacy pre-DW-format ledgers when invoked with --migrate. Automation-only — invoked by bmad-loop sweep runs, not by humans.

License 许可
MIT
最近更新
2026-11-10
Stars
★ 0
Forks
0

01 前言 Front Matter

name
bmad-loop-sweep
description
Triage the deferred-work ledger for the bmad-loop orchestrator: verify every open entry against the actual codebase and return a machine-readable partition (bundles, already-resolved, blocked, skip, human decisions). Also migrates legacy pre-DW-format ledgers when invoked with --migrate. Automation-only — invoked by bmad-loop sweep runs, not by humans.

02 资源文件 3

03 SKILL.md 正文

Deferred-Work Sweep Triage

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.)

On Activation

Step 0: Automation Check & Mode Dispatch

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.

Step 1: Locate the ledger

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.

Step 2: Verify every open entry against the code

Ledger statuses are known-unreliable: entries are often resolved by later work but never marked done. For EACH open entry:

  1. Read its location: (file/component) in the current tree.
  2. Check whether the described issue still exists — read the code, grep for the symptom, check git log for commits that touched the area since the entry's origin: date.
  3. Record concrete evidence either way. "Probably fixed" is not evidence; a file:line or commit hash is.

Use sub-agents for parallel verification when available; never ask permission.

Step 3: Partition

Classify each open entry into exactly ONE category:

  • already_resolved — the issue no longer exists in the code. Requires concrete evidence (file:line that now handles it, or the commit that fixed it). The orchestrator closes the ledger entry deterministically.
  • bundles — buildable now: every file the fix needs already exists and no future story has to land first. Group entries that share a touchpoint (same file, same subsystem, same validator pattern) into cohesive single-goal bundles sized for one dev session; an entry that stands alone is a one-entry bundle. name is kebab-case (e.g. unicode-string-hardening), intent is 2–6 sentences describing the one cohesive goal.
  • blocked — the fix is only meaningful (or meaningfully easier) after a named future story/epic lands. Name the blocker verbatim.
  • skip — superseded, moot, or tied to a scenario the project explicitly excludes. Give the reason.
  • decisions — a human must choose. ALWAYS a decision, never a bundle: renegotiating anything inside a spec's <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.

Step 4: Write the result and end your turn

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.

04 同仓库更多 Skills

thkennedy
thkennedy/tk-studio

tk-studio-track

Tracking verbs on the bound Jira project — `block` moves a story the loop cannot progress, and each dependent story, to "Blocked - Awaiting User" with a comment that @mentions the owner (or, with `--engagement`, one engagement's questions issue, which `close` later moves to "Done"); `reply` posts the owner's answer (or "Done.") with the owner's host-only token and moves the issue to "Block Resolved"; `validate` checks that resolution and passes the issue back to work or re-blocks it with a follow-up. Use when the user says "block this story", "tk track block", "put it in the owner's inbox", "reply to the blocked issue", "validate the resolution", or a supervisor or engagement payload names this skill.

★ 0
thkennedy
thkennedy/tk-studio

tk-studio-session

Session discipline as a surface — land a boundary handoff (optionally carrying knowledge deltas) and end the session, or resume a fresh session from a run workspace alone. Use when the user says "hand off this run", "tk session", "resume the run", or a boundary/budget trigger says the session must split.

★ 0
thkennedy
thkennedy/tk-studio

tk-studio-research

Run a chartered research pass — survey the topics a charter scopes, grade every finding by evidence, land the findings in the run workspace, and emit observation events for recommendation-worthy ones. Use when the user says "run the ecosystem watch", "tk research", or a research job's invoke-skill directive names this skill.

★ 0
thkennedy
thkennedy/tk-studio

tk-studio-report

One-verb human defect report — "the skill did the wrong thing" — recorded as a report event in the local measurement ledger. Use when the user says "tk report", "report a defect", "that skill misbehaved", or "log a studio issue".

★ 0
thkennedy
thkennedy/tk-studio

tk-studio-playable-judge

The playable-verify leg's screenshot judge (Story 34.3) — reads only a playable run's report.json and its frames, answers the fixed rubric (scene loaded, player visible and framed, no magenta or error overlay, HUD reads, the named moments shown) with pass or fail and findings each naming a frame and a rubric line. Driven headless by the supervisor's host leg on the project's sandbox tier; use when the payload names a playable `media` folder, or the user says "judge the playable frames".

★ 0
thkennedy
thkennedy/tk-studio

tk-studio-plan-sync

Planning adapter — canonicalize BMad-native planning artifacts (normalize pass, sole id authority) and sync them with the bound planning backend. Use when the user says "sync the plan", "normalize planning artifacts", "tk plan sync", or after stock BMad planning flows produce or change epics/stories.

★ 0