Sandbox
@robertguss/bmad_automated

CLI for BMAD-METHOD workflows with Claude Code

bmad-automate runs BMAD-METHOD steps like create-story, dev-story, code-review, and git-commit through Claude Code. It reads story status, chooses the next workflow, streams output in the terminal, and updates `sprint-status.yaml` as it goes.

88 stars24 forksGoUpdated 8mo ago
Who it's for

Builders who want Claude Code to carry a story from backlog to done with less manual coordination.

What it delivers

You can run a story or whole epic through a repeatable workflow without re-explaining each step.

What it does

Workflow commands

Runs `create-story`, `dev-story`, `code-review`, and `git-commit` as separate CLI commands.

Full lifecycle execution

The `run` command follows story status and executes every remaining step until the story is done.

Epic and queue processing

The `epic` and `queue` commands process multiple stories in order and stop on the first failure.

Dry run mode

Shows which workflows would run without making changes.

Configurable prompts

Loads workflow prompts from `config/workflows.yaml` so you can change the Claude instructions.

Status file updates

Reads and writes `_bmad-output/implementation-artifacts/sprint-status.yaml` to track story progress.

Streaming terminal output

Shows Claude output live with styled progress feedback.

How to get it

  1. 1Run
    git clone https://github.com/yourusername/bmad-automate.git
    cd bmad-automate
    go install ./cmd/bmad-automate
  2. 2Or using just
    just install
  3. 3Run
    just build
    # Binary will be created as ./bmad-automate
  4. 4Run a story from its current status to completion
    bmad-automate run <story-key>
  5. 5Preview what workflows would run without executing them
    bmad-automate run <story-key> --dry-run
  6. 6Run the full lifecycle for all stories in an epic
    bmad-automate epic <epic-id>

README

bmad-automate

A CLI tool for automating BMAD-METHOD development workflows with Claude AI.

Overview

bmad-automate orchestrates Claude to run BMAD-METHOD development workflows including story creation, implementation, code review, and git operations. It's designed to automate repetitive development tasks by delegating them to Claude with predefined prompts.

Features

  • Workflow Automation - Run predefined workflows (create-story, dev-story, code-review, git-commit)
  • Status-Based Routing - Automatically determines next workflow based on story status
  • Full Lifecycle Execution - Run a story from current status to completion with a single command
  • Epic Processing - Process all stories in an epic in order
  • Queue Processing - Process multiple stories in batch
  • Dry Run Mode - Preview workflows without executing them
  • Configurable Prompts - Customize workflow prompts via YAML configuration
  • Streaming Output - Real-time feedback from Claude's execution
  • Styled Terminal Output - Clean, readable output with progress indicators

Installation

Prerequisites

  • Go 1.21 or later
  • Claude CLI installed and configured
  • just (optional, for running tasks)

From Source

git clone https://github.com/yourusername/bmad-automate.git
cd bmad-automate
go install ./cmd/bmad-automate

Or using just:

just install

Build Only

just build
# Binary will be created as ./bmad-automate

Usage

Single Workflow Commands

# Create a story definition
bmad-automate create-story <story-key> # eg 1-5

# Implement a story
bmad-automate dev-story <story-key>

# Run code review
bmad-automate code-review <story-key>

# Commit and push changes
bmad-automate git-commit <story-key>

Full Lifecycle

Run a story from its current status to completion:

bmad-automate run <story-key>

This executes all remaining workflows based on the story's current status:

  • backlog → create-story → dev-story → code-review → git-commit → done
  • ready-for-dev → dev-story → code-review → git-commit → done
  • in-progress → dev-story → code-review → git-commit → done
  • review → code-review → git-commit → done
  • done → skipped (story already complete)

Status is automatically updated in sprint-status.yaml after each successful workflow.

Preview what workflows would run without executing them:

bmad-automate run <story-key> --dry-run

Epic Processing

Run the full lifecycle for all stories in an epic:

bmad-automate epic <epic-id>

This finds all stories matching the pattern {epic-id}-{N}-* (where N is numeric), sorts them by story number, and runs each to completion before moving to the next.

Example:

bmad-automate epic 6
# Runs 6-1-*, 6-2-*, 6-3-*, etc. each to completion in order

The epic command stops on the first failure. Done stories are skipped.

Dry Run

Preview what workflows would run without executing them:

bmad-automate epic 6 --dry-run

Queue Processing

Run the full lifecycle for multiple stories in batch:

bmad-automate queue <story-key> [story-key...]

Each story is run to completion before moving to the next. The queue stops on the first failure. Done stories are skipped.

Example:

bmad-automate queue 6-5 6-6 6-7 6-8

Preview what workflows would run without executing them:

bmad-automate queue 6-5 6-6 6-7 --dry-run

Raw Prompts

Run an arbitrary prompt:

bmad-automate raw "List all Go files in the project"

Help

bmad-automate --help
bmad-automate <command> --help

Configuration

Config File

Create a config/workflows.yaml file to customize workflow prompts:

workflows:
  create-story:
    prompt_template: "Your custom prompt for {{.StoryKey}}"

  dev-story:
    prompt_template: "Your dev prompt for {{.StoryKey}}"

  code-review:
    prompt_template: "Your review prompt for {{.StoryKey}}"

  git-commit:
    prompt_template: "Your commit prompt for {{.StoryKey}}"

full_cycle:
  steps:
    - create-story
    - dev-story
    - code-review
    - git-commit

claude:
  output_format: stream-json
  binary_path: claude

output:
  truncate_lines: 20
  truncate_length: 60

Environment Variables

VariableDescriptionDefault
BMAD_CONFIG_PATHPath to custom config file./config/workflows.yaml
BMAD_CLAUDE_PATHPath to Claude binaryclaude

Sprint Status File

The run, queue, and epic commands read and update story status from:

_bmad-output/implementation-artifacts/sprint-status.yaml

Example format:

development_status:
  6-1-setup-project: done
  6-2-add-feature: in-progress
  6-3-fix-bug: backlog

Valid status values:

StatusDescription
backlogStory not yet started
ready-for-devStory ready for implementation
in-progressStory currently being implemented
reviewStory in code review
doneStory complete

Development

Prerequisites

Available Tasks

just              # Show all available tasks
just build        # Build the binary
just test         # Run all tests
just test-verbose # Run tests with verbose output
just test-coverage # Generate coverage report
just lint         # Run linter
just fmt          # Format code
just vet          # Run go vet
just check        # Run fmt, vet, and test
just clean        # Remove build artifacts

Project Structure

bmad-automate/
├── cmd/bmad-automate/     # Application entry point
├── config/                # Default configuration
├── internal/
│   ├── cli/               # Cobra CLI commands
│   ├── claude/            # Claude client and JSON parser
│   ├── config/            # Configuration loading (Viper)
│   ├── lifecycle/         # Story lifecycle execution
│   ├── output/            # Terminal output formatting
│   ├── router/            # Status-based workflow routing
│   ├── state/             # State machine definitions
│   ├── status/            # Sprint status file reader/writer
│   └── workflow/          # Workflow orchestration
├── justfile               # Task runner configuration
└── README.md

Testing

Run tests:

just test

Run tests with coverage:

just test-coverage
# Open coverage.html in your browser

Test a specific package:

just test-pkg ./internal/claude

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Files in the repo

Repository payload15 top-level entries
  • .planning
  • config
  • docs
  • internal
  • .editorconfig
  • .gitignore
  • .golangci.yml
  • CLAUDE.md
  • CODE_REVIEW_FINDINGS.md
  • CONTRIBUTING.md
  • go.mod
  • go.sum
  • justfile
  • LICENSE
  • README.md

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More tools

JuliusBrussee/
caveman

🪨 why use many token when few token do trick — Claude Code skill that cuts 65% of tokens by talking like caveman

105k
1 add
MemPalace/
mempalace

The best-benchmarked open-source AI memory system. And it's free.

59k
stablyai/
orca

Orca is the ADE for working with a fleet of parallel agents. Run any coding agent with your own subscription. Available on desktop, mobile and remote runtime.

66k

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

132k

Never stop coding. Free MIT AI gateway: one endpoint, 352 providers (150+ free), 1200+ models Kimi, Claude, GPT, Gemini, GLM, DeepSeek, MiniMax. Works with Claude Code, Codex, Cursor, OpenCode, Cline & Copilot. Quota-aware auto-fallback, RTK+Caveman compression saves 15-95% tokens, MCP/A2A, Desktop/PWA. Built by 550+ contributors

64k
headroomlabs-ai/
headroom

Compress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.

71k