bmalph
CLAUDE.md406 starsChanged 8 months agoMITView on GitHub
Integration layer between BMAD-METHOD and Ralph. bmalph bundles and installs two AI development systems: The instructions file depends on the configured platform — see src/platform/ for the mapping. npm run ci runs (in order): Ralph's shell scripts and platform drivers are tested with BATS: npm run update-bundled syncs bmad/ from the upstream BMAD-METHOD repo (tracked as a git checkout in .refs/bmad/). It pulls latest from main (or a specific ref with -- --bmad-ref <ref>), copies bmm/ and core/ into bmad/,…
The file
We split this CLAUDE.md into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 53
When a test fails, analyse the root cause before changing anything.
- Very specific: line 58
Always run npm run ci locally before committing to catch formatting, lint, type, and test failures early
- Very specific: line 72
Test files: tests/bash/*.bats + tests/bash/drivers/*.bats
≈ “Common” is an estimate: at least 1 in 5 of the 12,729 CLAUDE.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
bmalph
Integration layer between BMAD-METHOD and Ralph.
What is bmalph?
bmalph bundles and installs two AI development systems:
- BMAD-METHOD — Planning agents and workflows (Phases 1-3)
- Ralph — Autonomous implementation loop (Phase 4)
Architecture
Phases 1-3 (Planning): BMAD agents + workflows (interactive, command-driven)
Phase 4 (Implementation): Ralph loop (autonomous, bash-driven)
bmalph: CLI + transition logicDirectory structure after bmalph init
project-root/
├── _bmad/ # BMAD agents, workflows, core, lite workflows
├── .ralph/ # Ralph runtime (loop, libs, specs, logs, drivers)
│ ├── drivers/ # Platform driver scripts (claude-code, codex, opencode, copilot, cursor)
│ ├── lib/ # Shell libraries (circuit breaker, response analysis, etc.)
│ └── templates/ # Prompt, agent, fix plan, review, and ralphrc templates
├── bmalph/ # bmalph state (config.json with platform, state/)
└── <instructions file> # Varies by platform (CLAUDE.md, AGENTS.md, etc.)The instructions file depends on the configured platform — see src/platform/ for the mapping.
CLI Commands
| Command | Action |
bmalph init | Install BMAD + Ralph, configure project |
bmalph upgrade | Update bundled assets to current version |
bmalph doctor | Check installation health |
bmalph check-updates | Check for upstream updates |
bmalph status | Show project installation status |
bmalph implement | Transition BMAD artifacts to Ralph format |
bmalph run | Start Ralph loop with live dashboard |
bmalph run --swarm N | Run N parallel workers in git worktrees (default: 2, max: 6) |
bmalph reset | Remove all bmalph files from the project |
bmalph watch | (deprecated) Use bmalph run instead |
Dev Workflow
- TDD: write tests first, then implement
- When a test fails, analyse the root cause before changing anything. Do not take the easy route of just making the test pass — understand why it fails and fix the actual problem. A failing test is a signal, not an obstacle.
- Tests live in
tests/<module>/(mirrorssrc/structure), not colocated - Conventional Commits with SemVer
- Application language: English
- Node 20+ LTS
- Always run
npm run cilocally before committing to catch formatting, lint, type, and test failures early
npm run ci runs (in order):
type-check—tsc --noEmitlint— ESLintfmt:check— Prettier (check only)build— compile TypeScripttest:all— unit + e2e + bash tests
Bash tests (BATS)
Ralph's shell scripts and platform drivers are tested with BATS:
- Test files:
tests/bash/*.bats+tests/bash/drivers/*.bats - Fixtures:
tests/bash/fixtures/ - Helpers:
tests/bash/test_helper/(bats-assert, bats-support, common-setup.bash) - Runner:
npm run test:bash(viascripts/run-bash-tests.mjs) - First-time setup:
scripts/setup-bats.sh(installs BATS dependencies)
Updating bundled BMAD assets
npm run update-bundled syncs bmad/ from the upstream BMAD-METHOD repo (tracked as a git checkout in .refs/bmad/). It pulls latest from main (or a specific ref with -- --bmad-ref <ref>), copies bmm/ and core/ into bmad/, and updates bundled-versions.json with the commit SHA. After running, build + test + review diffs before committing.
Note: bmad/lite/ is bmalph-owned content (not synced from upstream).
CI Pipeline
- Triggers: push to
main, PRs targetingmain - Lint job (ubuntu, Node 22): type-check, lint, fmt:check
- Test matrix (3 jobs): ubuntu/Node 22, ubuntu/Node 20, windows/Node 22
- Test steps: build, unit tests, e2e tests, bash tests (ubuntu only), coverage,
npm pack --dry-run - Coverage: Codecov upload on Node 22 + ubuntu only
- Gate job:
ci-successaggregates all jobs — single required check for branch protection
Release Process
- release-please manages changelogs, version bumps, and release PRs
- On release creation: publish job runs build + test +
npm publishto npm - Version bumps follow Conventional Commits:
feat= MINOR,fix= PATCH,BREAKING CHANGE= MAJOR - Visible changelog sections: Features, Bug Fixes, Performance, Code Quality
- Hidden changelog sections: docs, tests, chores, CI, build, style
Dependency Management
- Dependabot opens weekly grouped PRs for minor/patch updates
- Two groups: npm (production + development) and GitHub Actions
- Minor/patch PRs are auto-approved and auto-merged (squash)
- Major updates require manual review
- PR limits: 10 npm, 5 GitHub Actions
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

