Firing the check exactly at resets_at risks hitting the API before the
quota has fully cleared. Adding a 600s buffer ensures the window has
settled before BAD re-checks and resumes.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The ambiguous "stop at first file / skip bad-statusline.sh" wording caused
the scan to halt at priority 2 when bad-statusline.sh was already installed,
never reaching the original chain command (e.g. cship) at priority 4.
Rewrite Step 1 as explicit skip-and-continue vs stop-and-capture branches.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Store bad-session-state.json next to the statusline script in .claude/
so it persists reliably outside the sandbox-restricted temp directory.
Gate-pre-continuation now reads from .claude/bad-session-state.json
(relative to project root) — no setup-time path substitution required.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Mark pre-continuation checks as mandatory (never skip, even with parallel
stories) in the Phase 2 after-each-step note and as explicit Rule #12
- gate-pre-continuation.md now warns when bad-session-state.json is missing
or rate_limits data is absent, instead of silently skipping — prevents
usage thresholds being bypassed when the session-state hook isn't installed
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add 📣 Notify callout after each Phase 2 step completes, replacing the
single end-of-pipeline notify — coordinator now sends a status update
for every step (Steps 1–7) of every story as it progresses
- Fix [M] option in pattern-timer.md Telegram message: <minutes> rendered
as <minutes> in Telegram due to HTML parsing; changed to {minutes}
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add STALE_TIMEOUT_MINUTES to SKILL.md config table (was in README/docs but missing from skill)
- Fix Rules section: rule 11 was out of order between 6 and 7; resequenced 7–11 monotonically
- Fix duplicate Step 4 in module-setup.md (Core Config was also labeled Step 4); renumber Steps 5–9 and fix all internal cross-references
- Fix pattern-notify.md contradiction: restructure so terminal print is always-first and Telegram is additive; remove conflicting "always both" closing line
- Clarify gate-pre-continuation.md: note /reload-plugins is a built-in CLI command, not a Skill tool call
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Steps 3 & 4: separate AskUserQuestion calls per hook (state hook,
activity hook), each waiting for its answer before installing
- Step 4 (core config): AskUserQuestion for name + language if not set
- Step 5: print all config as text then single AskUserQuestion —
accept all defaults or type KEY=VALUE overrides via Other field
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Use "call the `AskUserQuestion` tool" phrasing so the coordinator
identifies it as a tool invocation rather than a prose description.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaced free-text Y/n prompts (buried inside the Step 5 config block)
with explicit AskUserQuestion calls so each hook decision is a proper
interactive turn. Headless / accept-all-defaults path unchanged.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Step 4 was silently skipped when Step 3 (statusLine) resolved as
already-configured, because the LLM incorrectly inferred both hooks
were done. Added an explicit always-run directive and a pre-check that
detects an existing hook and reinstalls without prompting, mirroring
the conditional logic pattern used by setup-statusline-hook.md.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Setup now scans settings files highest→lowest precedence, finds the
effective statusLine command, chains it stdin-safely into bad-statusline.sh,
and writes only to settings.local.json — no other files touched.
Detailed logic extracted to references/coordinator/setup-statusline-hook.md.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When AUTO_PR_MERGE=true, Phase 3 merges all batch PRs before Phase 4
runs. The PR-merge Monitor receives an empty BATCH_PRS list, so ALL_DONE
stays true and ALL_MERGED fires on the first tick — skipping the pause
entirely. Fix by routing AUTO_PR_MERGE=true directly to the Timer path
so the WAIT_TIMER_SECONDS cooldown still fires before the next batch.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Steps 1,2,4,5 / Step 3 were stale from the 5-step pipeline. Now correctly
reflects the 7-step pipeline: MODEL_STANDARD for Steps 1,2,3,4,6,7 and
MODEL_QUALITY for Step 5 (code review).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds three new test architecture steps to the BAD pipeline:
- Epic-Start Test Design (Phase 1, blocking): runs /bmad-testarch-test-design
at the start of each new epic before any story pipelines begin
- Step 2 ATDD: runs /bmad-testarch-atdd after story creation, before development;
sets new `atdd-done` sprint-status to prevent re-runs on restart
- Step 4 Test Review: runs /bmad-testarch-test-review after development, before
code review
Renumbers pipeline from 5 to 7 steps. Updates skip table, task lists, Phase 3
PR collection reference, and Phase 4 batch summary table accordingly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The coordinator's rate-limit and context-window checks were always
gracefully skipping because they had no way to read session state data.
Claude Code exposes context_window and rate_limits via the statusLine
script mechanism (JSON piped to the script on every API response).
- Add assets/bad-statusline.sh: captures session JSON to
$TMPDIR/bad-session-state.json on every API response
- Add module-setup.md Step 2b: copies and chmod+x the script, wires it
as the statusLine in .claude/settings.json; warns and defers if a
statusLine already exists
- Update gate-pre-continuation.md: replace vague "read from stdin"
instruction with a concrete Bash tool call to read the temp file;
graceful skip still applies if file is absent (non-CC harnesses)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Monitor tool runs in a stripped shell where PATH doesn't include
/opt/homebrew/bin (or distro equivalents), so `gh` was silently not found.
Combined with 2>/dev/null this produced empty output on every poll cycle,
causing the merge check to never fire.
Fix: resolve gh's full path with `command -v gh` (POSIX-portable, OS-agnostic)
at the top of both poll scripts — CI poller and PR-merge watcher — before the
Monitor shell takes over. Add common-mistake note to the PR-merge watcher docs.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- gate-pre-continuation.md: run /reload-plugins at the top of every gate
check when a channel is configured — no-op when already connected,
silently restores a dropped Telegram (or other) MCP server
- pattern-notify.md: on channel tool failure, reload-plugins and retry once
before falling back to terminal; set NOTIFY_SOURCE="terminal" if still
failing to avoid repeated reload attempts
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The Phase 4 assessment subagent was equating sprint-status `done` with
"merged PR", causing the retrospective to fire immediately after Step 5
completes — even when all PRs were still open (AUTO_PR_MERGE=false).
sprint-status `done` is written by the Step 5 subagent after code review,
not after the PR lands on main. Add dependency-graph.md to the assessment
reads and explicitly require PR Status = `merged` (from the dependency
graph's authoritative GitHub-sourced column) for current_epic_merged and
all_epics_complete.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix task deletion referencing '& continuation' vs creation using '+ continuation' (leftover from prior & → + fix)
- Broaden gate-pre-continuation.md description: checks run between Phase 2 steps, after Phase 3 merges, and after retrospective — not only before Phase 0
- Fix wrong config path in docs and module-setup.md: _bmad/bad/config.yaml → bad: section of _bmad/config.yaml
- Fix '4-step pipeline' → '5-step pipeline' in README and docs/index.md (Steps 1–5 were always listed)
- Add missing API threshold variables to README config table
- Add Claude Code sandbox requirement (enableWeakerNetworkIsolation) to gh CLI setup steps
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Adds pattern-gh-curl-fallback.md with curl equivalents for all gh read
operations (pr list, pr view, pr checks, issue list, run view), wired
into SKILL.md, phase0-graph, and phase3-merge so subagents self-recover
when gh fails due to sandbox restrictions or TLS errors.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Rename reference files into semantic subdirectories:
- coordinator/: gate-pre-continuation, pattern-monitor, pattern-notify, pattern-timer
- subagents/: phase0-graph, phase0-prompt, phase3-merge
Extract Phase 0 subagent prompt into phase0-prompt.md; SKILL.md now
delegates to it with a single-line read instruction. Update all internal
cross-references to reflect new paths.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
TaskCreate HTML-encodes & to & which renders as literal text in the
terminal UI. Using + avoids the encoding issue in Phase 2 Step 4 and
Phase 4 task labels.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Fix epic completion check: split current_epic_complete into
current_epic_merged (all PRs landed) and current_epic_prs_open
(PRs exist but unmerged) so retrospective only fires after PRs
are actually merged, not just open
- Add [X] Stop BAD option to retrospective timer so user can halt
the pipeline entirely without having to skip retro first
- Update timer-pattern.md to support optional [X] label/action
(backwards-compatible — omitted when caller doesn't supply it)
- Fix Branch B status line messaging to distinguish epic-pending-merge
from batch-complete states
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tasks render in creation order, so Phase 3/4 (created at startup) were
appearing before story-specific Phase 2 tasks (added after Phase 0).
Now all seven generic startup tasks are deleted and re-added in correct
execution order: Phase 2 story tasks → Phase 3 → Phase 4.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Document that BAD should be started with --dangerously-skip-permissions for
the full autonomous experience (no per-subagent permission prompts). Update
both README.md and docs/index.md Usage sections. Also clarify in SKILL.md
that the coordinator spawns subagents via the Agent tool explicitly.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Add Step 5 (PR code review) to the pipeline description in both README.md
and docs/index.md, reflecting the split from the old Step 4. Add
MONITOR_SUPPORT, CONTEXT_COMPACTION_THRESHOLD, and TIMER_SUPPORT to the
README config table (already present in docs/index.md); add MONITOR_SUPPORT
to docs/index.md.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Phase 0 now creates GitHub issues for all backlog stories (when gh
auth is available), writes GH issue numbers back to epics.md, and
skips gracefully in local-only mode
- Step 4 (PR & CI) now reads the GH issue number from epics.md and
includes it in the PR title and description
- Extracted nested code review subagent from Step 4 into a dedicated
Step 5 (PR Code Review), eliminating nested fenced code blocks and
giving PR review first-class visibility in the task list
- Fixed Phase 3 heading backtick rendering issue
- Fixed stale _bmad/bad/config.yaml reference (now _bmad/config.yaml)
- TaskCreate now runs before Phase 0 spawns for live progress visibility
- CI branch conditions clarified as if/else-if/else
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Create Phase 0 task as in_progress before spawning the subagent,
giving live progress visibility from the start of the pipeline
- Expand remaining tasks after Phase 0 reports back instead of
creating the full list after the fact
- Clarify CI branch as if/else-if/else so RUN_CI_LOCALLY correctly
gates the Monitor and manual polling paths
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Add MONITOR_SUPPORT config flag (true for Claude Code, false for Bedrock/Vertex/Foundry)
- Replace manual CI polling loop in Step 4 with Monitor tool when supported
- Replace blind WAIT_TIMER sleep in Phase 4 Branch B with Monitor PR-merge watcher + CronCreate fallback
- Extract Notify, Timer, and Monitor patterns into dedicated reference files for progressive disclosure
- Add sprint task list (TaskCreate) after Phase 0 for live progress tracking in UI
- Update module-setup.md and marketplace.json to register monitor_support alongside timer_support
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Clarify SU description to list what gets configured (parallelism, models, worktree paths, timers)
- Add 'install' to SU args to match all trigger keywords in module-setup.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Standalone BMad module that orchestrates fully autonomous parallel
multi-agent pipelines through the full story lifecycle (create → dev →
review → PR), driven by the sprint backlog and dependency graph.
- Every step runs in a dedicated subagent with a fresh context window
- Harness-agnostic: detects Claude Code, Cursor, Copilot, etc. at setup
- Configurable models, timers, CI, and merge behaviour per harness
- Self-registering via assets/module-setup.md
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>