Compare commits

...

281 Commits

Author SHA1 Message Date
sjennings e39aa33eea
fix(bmgd): add workflow status update to game-architecture completion (#1161)
* fix(bmgd): add workflow status update to game-architecture completion

The game-architecture workflow was not updating the bmgd-workflow-status.yaml
file on completion, unlike other BMGD workflows (narrative, brainstorm-game).

Changes:
- Add step 4 "Update Workflow Status" to update create-architecture status
- Renumber subsequent steps (5-8 → 6-9)
- Add success metric for workflow status update
- Add failure condition for missing status update

* feat(bmgd): add generate-project-context workflow for game development

Adds a new workflow to create optimized project-context.md files for AI agent
consistency in game development projects.

New workflow files:
- workflow.md: Main workflow entry point
- project-context-template.md: Template for context file
- steps/step-01-discover.md: Context discovery & initialization
- steps/step-02-generate.md: Rules generation with A/P/C menus
- steps/step-03-complete.md: Finalization & optimization

Integration:
- Added generate-project-context trigger to game-architect agent menu
- Added project context creation option to game-architecture completion step
- Renumbered steps 6-9 → 7-10 to accommodate new step 6

Adapted from BMM generate-project-context with game-specific:
- Engine patterns (Unity, Unreal, Godot)
- Performance and frame budget rules
- Platform-specific requirements
- Game testing patterns

---------

Co-authored-by: Scott Jennings <scott.jennings+CIGINT@cloudimperiumgames.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-18 16:14:18 +08:00
Alex Verkhovsky 2da9aebaa8
docs: add DigitalOcean sponsor attribution (#1162) 2025-12-18 15:58:54 +08:00
Brian Madison 5c756b6404 chore: bump version to 6.0.0-alpha.19
Bug fix:
- Fixed _bmad folder stutter with agent custom files
- Removed unnecessary backup file causing installer bloat
- Improved path handling for agent customizations
2025-12-18 12:52:10 +08:00
Brian Madison 23f650ff4d fixed _bmad folder stutter with agent custom files 2025-12-18 03:22:46 +08:00
Brian Madison 363915b0c6 chore: bump version to 6.0.0-alpha.18
Major improvements:
- BMGD module complete overhaul with professional game development workflows
- New Game QA (GLaDOS) and Game Solo Dev (Indie) agents
- 15 comprehensive testing guides for all major game engines
- Agent recompile feature for quick updates without full reinstall
- Full agent customization support - ALL fields now customizable
- Enhanced custom module installation and management
- Complete BMGD documentation suite with 9 guides
2025-12-17 18:07:41 +08:00
Brian Madison f36369512b fixed issue with agent customization application, now all fields are customized form the custom yaml. also added a recompile agents menu item 2025-12-17 17:58:37 +08:00
sjennings ccb64623bc
feat(bmgd): comprehensive BMGD module upgrade (#1151)
* feat(bmgd): comprehensive BMGD module upgrade

## New Agents
- **Game QA (GLaDOS)**: Game QA Architect + Test Automation Specialist
  - Engine-specific testing (Unity, Unreal, Godot)
  - Knowledge base with 15+ testing topics
  - Workflows: test-framework, test-design, automate, playtest-plan, performance-test, test-review

- **Game Solo Dev (Indie)**: Elite Indie Game Developer + Quick Flow Specialist
  - Rapid prototyping and iteration focused
  - Quick-flow workflows for solo/small team development

## Production Workflow Alignment
Aligned BMGD 4-production workflows with BMM 4-implementation:

### Removed Obsolete Workflows
- story-done (merged into dev-story)
- story-ready (merged into create-story)
- story-context (merged into create-story)
- epic-tech-context (no longer separate workflow)

### Added Workflows
- sprint-status: View sprint progress, surface risks, recommend next action

### Updated Workflows (now standalone, copied from BMM)
- code-review: Adversarial review with instructions.xml
- correct-course: Sprint change management
- create-story: Direct ready-for-dev marking
- dev-story: TDD implementation with instructions.xml
- retrospective: Epic completion review
- sprint-planning: Sprint status generation

## Game Testing Architecture (gametest/)
New knowledge base for game-specific testing:
- qa-index.csv: Knowledge fragment index
- 15 knowledge files covering:
  - Engine-specific: Unity, Unreal, Godot testing
  - Game-specific: Playtesting, balance, save systems, multiplayer
  - Platform: Certification (TRC/XR), localization, input
  - General QA: Automation, performance, regression, smoke tests

## Quick-Flow Workflows (bmgd-quick-flow/)
- quick-prototype: Rapid mechanic testing
- quick-dev: Flexible feature implementation

## Documentation
Complete documentation suite in docs/:
- README.md: Documentation index
- quick-start.md: Getting started guide
- agents-guide.md: All 6 agents reference
- workflows-guide.md: Complete workflow reference
- quick-flow-guide.md: Rapid development guide
- game-types-guide.md: 24 game type templates
- glossary.md: Game dev terminology
- troubleshooting.md: Common issues

## Teams & Installer
- Updated team-gamedev.yaml with all 6 agents and workflows
- Updated default-party.csv with Game QA and Game Solo Dev
- Created _module-installer/ with:
  - installer.js: Creates directories, logs engine selection
  - platform-specifics/: Claude Code and Windsurf handlers

## Agent Updates
All agents now reference standalone BMGD workflows:
- game-architect: correct-course → BMGD
- game-dev: dev-story, code-review → BMGD
- game-scrum-master: All production workflows → BMGD
- game-solo-dev: code-review → BMGD

## Module Configuration
- Added sprint_artifacts alias for workflow compatibility
- All workflows use bmgd/config.yaml

* fix(bmgd): update sprint-status workflow to reference bmgd instead of bmm

Replace all /bmad:bmm:workflows references with /bmad:bmgd:workflows
in the sprint-status workflow instructions.

* feat(bmgd): add workflow-status and create-tech-spec workflows

Add BMGD-native workflow-status and create-tech-spec workflows,
replacing all BMM references with BMGD paths.

## New Workflows

### workflow-status
- Multi-mode status checker for game projects
- Game-specific project levels (Game Jam → AAA)
- Workflow paths: gamedev-greenfield, gamedev-brownfield,
  quickflow-greenfield, quickflow-brownfield
- Init workflow for new game project setup

### create-tech-spec
- Game-focused spec engineering workflow
- Engine-aware (Unity/Unreal/Godot)
- Performance and gameplay feel considerations

## Agent Updates
Updated all BMGD agents to reference BMGD workflows:
- game-architect, game-designer, game-dev, game-qa,
  game-scrum-master, game-solo-dev

All agents now use /bmad:bmgd:workflows instead of /bmad:bmm:workflows

* fix(bmgd): address PR review findings and enhance playtesting docs

## PR Review Fixes (F1-F20)

### Configuration & Naming
- F1: Changed user_skill_level to game_dev_experience in module.yaml
- F3: Renamed gametest/framework to gametest/test-framework

### Cleanup
- F2: Deleted 4 orphaned root-level template files
- F6: Removed duplicate code block in create-story/instructions.xml
- F9: Removed trailing empty line from qa-index.csv
- F20: Deleted orphaned docs/unnamed.jpg

### Installer Improvements
- F7: Simplified platform handler stubs (removed unused code)
- F8: Added return value checking for platform handlers
- F13: Added path traversal validation (isWithinProjectRoot)
- F18: Added type validation for config string values

### Agent Fixes
- F10: Added workflow-status and advanced-elicitation to game-solo-dev
- F12: Fixed "GOTO step 2a" → "GOTO step 2" references
- F14: Removed duplicate project-context.md from principles in 5 agents

### Workflow Updates
- F17: Added input_file_patterns to playtest-plan workflow

### Documentation
- F4-F5: Updated quick-start.md with 6 agents and fixed table
- Updated workflows-guide.md with test-framework reference

### Knowledge Base Updates (from earlier CodeRabbit comments)
- Updated unity-testing.md to Test Framework 1.6.0
- Fixed unreal-testing.md (MarkAsGarbage, UnrealEditor.exe)
- Added FVerifyPlayerMoved note to smoke-testing.md
- Fixed certification-testing.md table formatting

### Playtesting Documentation Enhancement
- Added "Playtesting by Game Type" section (7 genres)
- Added "Processing Feedback Effectively" section
- Expanded from ~138 to ~340 lines

* refactor(bmgd): use exec for step-file workflows and multi format

Update agent menu items to use correct notation for step-file workflows:

**game-designer.agent.yaml:**
- Convert 4 step-file workflows to multi format with shortcodes:
  - [BG] brainstorm-game
  - [GB] create-game-brief
  - [GDD] create-gdd
  - [ND] narrative
- Changed from workflow: .yaml to exec: .md

**game-architect.agent.yaml:**
- Changed create-architecture from workflow: to exec: with workflow.md

---------

Co-authored-by: Scott Jennings <scott.jennings+CIGINT@cloudimperiumgames.com>
2025-12-17 14:33:22 +08:00
Brian Madison e37edf098c modify install now supports adding custom modules even if there were no custom modules originally 2025-12-16 20:45:27 +08:00
Brian Madison e3eb374218 chore: bump version to 6.0.0-alpha.17 with comprehensive changelog
Major improvements include:
- Revolutionary installer overhaul with unified flow for core and custom modules
- Full custom content support re-enabled with streamlined sharing
- Critical migration from .bmad to _bmad for AI visibility
- Agent memory system rollout with _bmad/_memory location
- Quick default selection for faster module installation
- BMM Phase 4 workflow improvements and standardization
- Sample modules demonstrating custom content creation
- Future-ready architecture for content segregation
2025-12-16 18:25:50 +08:00
Brian Madison 83b0df0f21 .17 changelog and link to changelog in installer output 2025-12-16 18:23:15 +08:00
Alex Verkhovsky 00a3af3eb0
fix(bmm): sprint-status workflow improvements (#1141)
* fix(bmm): sprint-status workflow improvements

- Remove dead by_epic template block and context_status variable (#1116, #1117)
- Define "first" story ordering as epic number then story number (#1119)
- Clarify retrospective check: "any retrospective status == optional" (#1120)
- Strengthen validate mode: check required metadata fields and valid statuses (#1121)
- Expand risk detection: stale file, orphaned stories, empty epics (#1122)
- Fix retrospective valid status: use "done" instead of "completed" for consistency

Fixes #1116, fixes #1117, fixes #1119, fixes #1120, fixes #1121, fixes #1122

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(bmm): address CodeRabbit review feedback

- Improve retrospective status descriptions for clarity
- Fix empty epic detection to only warn on in-progress epics
- Add 'generated' to required metadata field validation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-16 17:59:42 +08:00
Brian Madison d0e0a0963a examples of custom modules, custom module and readme doc updates 2025-12-16 17:45:41 +08:00
Brian Madison 32615afaf9 memory location is non configurable _bmad/_memory for sidecar content 2025-12-16 15:43:38 +08:00
Brian Madison 59e4cc7b82 minor code cleanup 2025-12-16 13:09:20 +08:00
Brian Madison c24821b6ed menu wording updates 2025-12-16 01:25:49 +08:00
Brian Madison 2c4c2d9717 reduce installer log output 2025-12-15 23:53:26 +08:00
Brian Madison 901b39de9a fixed duplicate entry in files manfest issue 2025-12-15 20:47:21 +08:00
Brian Madison 4d8d1f84f7 quick update works and retains custom content also 2025-12-15 19:54:40 +08:00
Brian Madison 48795d46de core and custom modules all install through the same flow now 2025-12-15 19:16:03 +08:00
Brian Madison bbda7171bd quick update output modified 2025-12-15 17:30:12 +08:00
Brian Madison 08f05cf9a4 update menu updated 2025-12-15 16:25:01 +08:00
Brian Madison c7827bf031 less verbose final output during install 2025-12-15 15:55:28 +08:00
Brian Madison 5716282898 roo installer had some bugs 2025-12-15 15:08:19 +08:00
Brian Madison 60238d2854 default accepted for installer quesitons 2025-12-15 12:55:57 +08:00
Brian Madison 6513c77d1b single install panel, no clearing disjointed between modules 2025-12-15 11:54:37 +08:00
Brian Madison 3cbe330b8e improved ui for initial install question intake 2025-12-15 11:33:01 +08:00
Brian Madison ecc2901649 remove header display before tool selection 2025-12-15 11:05:27 +08:00
Brian Madison d4eccf07cf reorganize order of questions to make more logical sense 2025-12-15 10:59:15 +08:00
Brian Madison 1da7705821 folder workflow naming alignment for consistency 2025-12-15 10:17:58 +08:00
Brian Madison 7f742d4af6 custom modules install after any non custom modules selected and after the core, manifest tracks custom modules separately to ensure always installed from the custom cache 2025-12-15 09:14:16 +08:00
Alex Verkhovsky 9fe79882b2
fix(release): restore automated release workflow for v6 (#1139)
* fix(release): update workflow to sync package-lock.json

- Call 'npm version' directly with --no-git-tag-version flag to ensure
  both package.json and package-lock.json are updated together
- Add 'alpha' option (default) for alpha version bumps
- Add 'beta' option to transition to/bump beta series
- Temporarily disable web bundles (tools/cli/bundlers/ is missing)

The workflow was previously calling non-existent npm scripts
(version:patch/minor/major) that were removed in the v6 refactor.

Note: This change cannot be fully tested without triggering an actual
release. The web bundles functionality requires a separate fix.

Fixes #1104

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(release): simplify version bump logic

Modern npm (v11+) correctly handles --preid flag transitions:
- prerelease --preid=beta on alpha.X produces beta.0 (works!)
- prerelease --preid=alpha on alpha.X produces alpha.X+1 (works!)

CodeRabbit warning was based on outdated npm behavior.
Consolidate alpha|beta into single case for cleaner code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-15 07:34:04 +08:00
Alex Verkhovsky ebb20f675f
chore(discord): suppress link embeds and handle truncated URLs (#1126)
* chore(discord): suppress link embeds and handle truncated URLs

- Add wrap_urls() to wrap URLs in <> to suppress Discord embeds
- Add strip_trailing_url() to remove partial URLs from truncated text
- Update all 6 workflow jobs with body text to use the new helpers
- Partial URLs (from truncation) are removed since they are unusable
- Complete URLs are wrapped to prevent large embed previews

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* fix(discord): preserve URLs when escaping markdown

- Replace sed-based esc() with awk version that skips content inside
  <URL> wrappers, preventing URL corruption from backslash escaping
- Reorder pipeline: wrap_urls | esc (wrap first, then escape)
- Update comment: "partial" → "incomplete" for clarity

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-15 07:19:44 +08:00
Alex Verkhovsky 82cc10824a
fix(bmm): improve sprint-status validation and epic status handling (#1125)
* fix(bmm): improve sprint-status validation and epic status handling

- Add status validation with interactive correction for unknown values
- Update epic statuses to match state machine: backlog, in-progress, done
- Map legacy "contexted" status to "in-progress" explicitly
- Add retrospective status counting (optional, completed)
- Rewrite risk detection rules for LLM clarity
- Fix warnings vs risks naming inconsistency in data mode

Closes #1106
Closes #1118

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* style: fix prettier formatting in sprint-status instructions

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-15 07:17:30 +08:00
Brian Madison 4c65f3a006 quick install fixed 2025-12-13 23:45:47 +08:00
Brian Madison 401e8e481c a few minor agent workflow main file cleanup actions 2025-12-13 23:04:54 +08:00
Brian Madison cba7cf223f standardize custom agent workflow and module output, and improve module folder selection 2025-12-13 22:59:58 +08:00
Brian Madison add789a408 remove unused code 2025-12-13 19:53:03 +08:00
Brian Madison ae9851acab _cfg -> _config 2025-12-13 19:41:09 +08:00
Brian Madison ac5fa5c23f agent customization now gets allied on quick update and compile agents 2025-12-13 19:23:02 +08:00
Brian Madison 8642553bd7 we only need one yaml lib 2025-12-13 18:35:07 +08:00
Brian Madison ce42d56fdd agent customzation almost working again 2025-12-13 17:50:33 +08:00
Brian Madison 25c79e3fe5 folder rename from .bmad to _bmad 2025-12-13 16:22:34 +08:00
Brian Madison 0c873638ab remove dead and unused functionality - the web bundler will be replaced 2025-12-13 14:08:14 +08:00
Brian Madison e6f911d791 remove dead and unused functionality - the web bundler will be replaced 2025-12-13 14:06:35 +08:00
Alex Verkhovsky f11be2b2e2
chore: disable CodeRabbit walkthrough (#1115)
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-13 13:34:41 +08:00
Murat K Ozcan 572074d2a6
Merge pull request #1109 from alexeyv/fix/normalize-dev-story-trigger
fix(bmm): normalize dev-story trigger naming
2025-12-12 12:45:14 -06:00
Murat K Ozcan 0ed546619f
Merge branch 'main' into fix/normalize-dev-story-trigger 2025-12-12 12:44:12 -06:00
Murat K Ozcan c3b54c5fc6
Merge pull request #1108 from alexeyv/fix/normalize-status-kebab-case
fix(bmm): normalize story status references to lowercase kebab-case
2025-12-12 12:44:03 -06:00
Murat K Ozcan e34f53d6f8
Merge branch 'main' into fix/normalize-status-kebab-case 2025-12-12 12:42:49 -06:00
Murat K Ozcan ebbb44f961
Merge pull request #1107 from alexeyv/fix/remove-drafted-status-bmm
fix(bmm): remove stale 'drafted' story state from docs and workflows
2025-12-12 12:42:35 -06:00
Alex Verkhovsky 76185937c6 fix(bmm): normalize dev-story trigger naming
Rename 'develop-story' to 'dev-story' across agent triggers and documentation
to match the actual workflow folder and YAML configuration naming.

- Update dev.agent.yaml trigger from develop-story to dev-story
- Update game-dev.agent.yaml trigger from develop-story to dev-story
- Update 7 references in agents-guide.md documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 23:48:00 -07:00
Alex Verkhovsky 7a9f1d4a3c fix(bmm): normalize story status references to lowercase kebab-case
Updated status references to use canonical lowercase kebab-case format:

- dev-story/instructions.xml: Status field set to "review" (was "Ready for Review")
- dev-story/instructions.xml: Output messages reference actual "review" status
- dev-story/checklist.md: Status field instruction uses "review"
- daily-standup.xml: Status examples use "in-progress, review"

Story lifecycle: backlog → ready-for-dev → in-progress → review → done

Fixes #1105

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 23:22:05 -07:00
Alex Verkhovsky 7d6aae1b78 fix(bmm): remove stale 'drafted' story state from docs and workflows
The `drafted` story state is no longer used since create-story now sets
status directly to `ready-for-dev`. This PR removes all references to
this legacy state from BMM documentation and workflow files.

Changes:
- Remove `drafted` from story status definitions and state machine docs
- Remove dead story-context file detection (story-context files no longer exist)
- Replace "draft" verb with "create" in story-related messaging
- Add legacy `drafted` → `ready-for-dev` migration in sprint-status
- Clarify that validate-create-story is optional and doesn't change status
- Document story handoff sequence: create-story → (optional) validate → dev-story

Story lifecycle is now: backlog → ready-for-dev → in-progress → review → done

Closes #1089

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 21:20:44 -07:00
Dicky Moore ed0defbe08
fix: normalize workflow manifest schema (#1071)
* fix: normalize workflow manifest schema

* fix: escape workflow manifest values safely

---------

Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-12 07:20:43 +08:00
Kevin Heidt 3bc485d0ed
Enhance config collector to support static fields (#1086)
Refactor config collection to handle both interactive and static fields. Update logic to process new static fields and merge answers accordingly.

Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-12 06:56:31 +08:00
Alex Verkhovsky 0f5a9cf0dd
fix: correct grammar in PRD workflow description (#1087) 2025-12-12 06:43:40 +08:00
Alex Verkhovsky e2d9d35ce9
fix(bmm): improve code review completion message (#1095)
Change "Story is ready for next work!" to "Code review complete!"

The original phrasing was misleading - when a code review finishes
with status "done", it means the review itself is complete and the
story is marked done in tracking. However, the user may choose to
do additional reviews or the story may genuinely be finished.
"Code review complete" more accurately describes what actually
happened without implying next steps.
2025-12-12 06:42:52 +08:00
Alex Verkhovsky 82e6433b69
refactor: standardize file naming to use dashes instead of underscores (#1094)
Rename output/template files and update all references to use kebab-case
(dashes) instead of snake_case (underscores) for consistency:

- project_context.md -> project-context.md (13 references)
- backlog_template.md -> backlog-template.md
- agent_commands.md -> agent-commands.md
- agent_persona.md -> agent-persona.md
- agent_purpose_and_type.md -> agent-purpose-and-type.md
2025-12-12 06:42:24 +08:00
Alex Verkhovsky be7e07cc1a
fix: fully silence CodeRabbit unless explicitly invoked (#1096)
- Disable high_level_summary to stop PR description modifications
- Disable commit_status to stop GitHub status checks
- Disable issue_enrichment.auto_enrich to stop auto-commenting on issues

These settings complement the existing review_status: false and
auto_review.enabled: false to ensure CodeRabbit only responds
when explicitly tagged with @coderabbitai review.
2025-12-12 06:32:24 +08:00
Alex Verkhovsky 079f79aba5
Merge pull request #1103 from bmad-code-org/docs/test-architect-ADR-usage-update-2
docs: test arch ADR usage update
2025-12-11 12:35:12 -07:00
murat b4d7e1adef docs: addressed further PR comments 2025-12-11 13:13:44 -06:00
murat 6e9fe6c9a2 fix: addressed review comment 2025-12-11 11:36:33 -06:00
Murat K Ozcan d2d9010a8e
Update src/modules/bmm/docs/test-architecture.md
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-11 10:15:23 -06:00
murat 6d5a1084eb docs: test arch ADR usage update 2 2025-12-11 09:43:25 -06:00
murat 978a93ed33 docs: test arch ADR usage update 2025-12-11 09:34:22 -06:00
Alex Verkhovsky ec90699016
Merge pull request #1090 from alexeyv/fix/issue-1088-remove-stale-workflow-refs
docs: remove stale references to deleted Phase 4 workflows
2025-12-11 04:38:31 -07:00
Alex Verkhovsky 0f06ef724b
Merge branch 'main' into fix/issue-1088-remove-stale-workflow-refs 2025-12-10 16:00:11 -07:00
Brian Madison 26e47562dd Release: 6.0.0-alpha.16
- Update changelog with recent changes
- Version bump to 6.0.0-alpha.16
- Document temporary custom content installation disable
- Document BMB workflow path fixes and package updates
2025-12-10 21:10:57 +09:00
Brian Madison 3256bda42f package updates 2025-12-10 21:04:38 +09:00
Brian Madison 3d2727e190 fix bmb path in step file issues 2025-12-10 20:56:56 +09:00
Brian Madison 446a0359ab fix bmb workflow paths 2025-12-10 20:50:24 +09:00
Brian Madison 45a97b070a disable custom content installation temporarily 2025-12-10 19:11:18 +09:00
Brian Madison a2d01813f0 temp removal of example modules 2025-12-10 19:05:15 +09:00
Alex Verkhovsky b9ba98d3f8 docs: remove stale references to deleted Phase 4 workflows
Removes references to epic-tech-context, story-context, story-done,
and story-ready workflows that were deleted in the Phase 4 transformation.

Also renames mislabeled excalidraw element IDs from proc-story-done
to proc-code-review to match the actual displayed text.

Fixes #1088
2025-12-09 21:50:39 -07:00
Murat K Ozcan 5971a88553
Merge pull request #1069 from alexeyv/chore/silence-coderabbit-status
chore: disable CodeRabbit review status comments
2025-12-09 17:10:13 -06:00
Murat K Ozcan 08642a0420
Merge pull request #1084 from alexeyv/fix/issue-1080-product-brief-next-steps
fix: correct markdown formatting in product-brief next steps
2025-12-09 17:09:46 -06:00
Alex Verkhovsky ec73e44097 fix: correct markdown formatting in product-brief next steps
Fixes #1080
2025-12-09 12:45:56 -07:00
Alex Verkhovsky d55f518a96 chore: disable CodeRabbit review status comments
Suppress the automatic "Review skipped" comments on PRs.
CodeRabbit can still be invoked on-demand with @coderabbitai review.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-08 14:02:33 -07:00
Alex Verkhovsky cf50f4935d
fix: address code review issues from alpha.14 to alpha.15 (#1068)
* fix: remove debug console.log statements from ui.js

* fix: add error handling and rollback for temp directory cleanup

* fix: use streaming for hash calculation to reduce memory usage

* refactor: hoist CustomHandler require to top of installer.js and ui.js

* fix: fail fast on malformed custom module YAML

User customizations must be valid - silent skip hides broken configs.

* refactor: use consistent return type in handleMissingCustomSources

* refactor: clone config at install() entry to prevent mutation
2025-12-08 13:24:30 -06:00
Brian Madison 55cb4681bc party mode and brainstorming had bmm config instead of core config listed causing loading error when bmm is not an installed module - fixed. 2025-12-08 08:11:39 -06:00
Brian Madison eb4325fab9 restore bmm as default selected module. 2025-12-08 08:04:39 -06:00
Brian Madison 57ceaf9fa9 conflict marker removed from docs 2025-12-08 08:01:00 -06:00
OhSeungWan 1513b2d478
fix: collect module.yaml prompts for custom modules (#1065)
Custom modules with module.yaml configuration prompts were not being
collected during installation. Added customModulePaths option to
ConfigCollector to resolve custom module paths from selectedFiles
and cachedModules sources.
2025-12-08 07:33:53 -06:00
Brian Madison 2da016f797 chore: bump version to alpha.15
- Module installation standardization with module.yaml
- Enhanced custom content installation with interactive search
- Added CodeRabbit AI and Raven's Verdict integrations
- Documentation improvements and cleanup
- Breaking change: _module-installer/install-config.yaml → module.yaml
2025-12-07 22:16:42 -06:00
Brian Madison 6947851393 module updates 2025-12-07 22:00:52 -06:00
Brian Madison 9d7b09d065 bmad_folder replacement working properly with custom and defauly modules 2025-12-07 21:58:44 -06:00
Brian Madison 86f2786dde remove hardcoded .bmad folders from demo content 2025-12-07 21:41:37 -06:00
Brian Madison a638f062b9 some debug output when installer errors 2025-12-07 21:03:05 -06:00
Brian Madison 738237b4ae custom install module cached 2025-12-07 20:46:09 -06:00
Brian Madison 6430173738 all modules custom or core use the same installer and have consistent behavior now. 2025-12-07 17:17:50 -06:00
Brian Madison baaa984a90 almost working installer updates 2025-12-07 15:38:49 -06:00
Brian Madison 38e65abd83 moved code of conduct to github folder, readme links to it 2025-12-07 14:55:44 -06:00
Alex Verkhovsky ff9a085dd0
feat: add Raven's Verdict PR review tool (#1054)
* feat: add Raven's Verdict PR review tool

* docs: add usage guidance to Raven's Verdict README

* docs: add guidance to skip PRs that shouldn't merge
2025-12-07 14:13:33 -06:00
Brian Madison d5c687d99d custom content installation guide 2025-12-07 14:11:17 -06:00
Brian Madison b68e5c0225 add custom content installation question to indicate location of custom content 2025-12-07 13:39:27 -06:00
Alex Verkhovsky 987f81ff64
feat: add CodeRabbit AI code review integration (#1053)
- Add .coderabbit.yaml with minimal config and path instructions
- Exclude node_modules from review scope
- Document pilot research and conclusions in docs/planning/

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-07 10:36:24 -06:00
Wendy Smoak 0c2afdd2bb
Change Gem creation link to Gemini Gem manager (#1057)
Updated the link for creating a Gem to the Gemini Gem manager.
2025-12-07 10:16:49 -06:00
Brian Madison a65ff90b44 example-custom-* disabled so installer does not find them when trying to install from npx 2025-12-07 07:48:44 -06:00
Brian Madison 80a90c01d4 chore: bump version to alpha.14
- Updated CHANGELOG.md with comprehensive Alpha.14 release notes
- Added advanced builder features and custom installation improvements
- IDE configuration preservation during upgrades
- Breaking change: removed legacy agent-install command
2025-12-07 02:21:49 -06:00
Brian Madison 119187a1e7 custom module installer improved, and removed agent-install 2025-12-07 02:10:03 -06:00
Brian Madison b252778043 custom inst imporove 2025-12-07 01:43:44 -06:00
Brian Madison eacfba2e5b custom agents and workflows can now also be installed with a simple custom.yaml designation 2025-12-06 22:45:02 -06:00
Brian Madison 903c7a4133 remove hardcoded agent sidecar locations to fully use config option 2025-12-06 21:37:43 -06:00
Brian Madison 8c04ccf3f0 rename default folder location for agent_sidecar_folder installation location 2025-12-06 21:21:03 -06:00
Brian Madison 6d98864ec1 sidecar files retained on updates 2025-12-06 21:17:13 -06:00
Brian Madison 1697a45376 sidecar content goes to custom core config location 2025-12-06 21:08:57 -06:00
Brian Madison ba2c81263b remove: all legacy file cleanup functionality
- Removed scanForLegacyFiles, performCleanup, and related methods from installer.js
- Removed --skip-cleanup option from install command
- Deleted cleanup.js command file entirely
- Simplified installation flow by removing cleanup prompts
- All tests passing after removal
2025-12-06 17:11:40 -06:00
Brian Madison 8d044f8c3e fix: prevent modules from showing as obsolete during reinstall
- Skip module selection prompt during update/reinstall
- Keep all existing installed modules by default
- This prevents inquirer from showing modules as 'obsolete items' with confusing delete options
- Modules are now preserved during update/reinstall operations
2025-12-06 16:56:09 -06:00
Brian Madison 74d071708d fix: nested agents now appear in CLI commands
- Fix getAgentsFromDir in bmad-artifacts.js to recursively scan subdirectories
- This ensures agents like cbt-coach and wellness-companion that are in subdirectories are properly found
- Agents now correctly get slash commands in .claude/commands/bmad/mwm/agents/
- All agents from the manifest now have corresponding IDE commands
2025-12-06 16:39:28 -06:00
Brian Madison 86e2daabba fix: ManifestGenerator now recursively scans for agents
- Updated getAgentsFromDir to search subdirectories for .md files
- Fixed installPath construction to include nested directory structure
- This ensures agents in subdirectories (like cbt-coach/cbt-coach.md) get added to agent-manifest.csv
- All agents now get proper CLI slash commands regardless of nesting depth
2025-12-06 16:31:32 -06:00
Brian Madison aad7a71718 fix: ManifestGenerator now scans for all installed modules
- Previously only scanned selectedModules, missing modules installed from custom locations
- Now scans the bmad directory to find all actually installed modules
- Any module with agents/workflows/tasks/tools will be included in manifests
- This fixes issue where MWM workflows weren't getting slash commands
- All modules now get equal treatment in IDE integration
2025-12-06 16:16:48 -06:00
Brian Madison f052967f65 fix: ModuleManager now creates customize.yaml files for agents
- Added logic to create customize template files during agent compilation
- ModuleManager was only using existing customize files, not creating them
- Now customize.yaml files will be created for all module agents
- This fixes issue where agents in subdirectories had no customization support

Next: Need to fix agent-manifest.csv to find agents in subdirectories
2025-12-06 16:02:07 -06:00
Brian Madison 1bd01e1ce6 feat: implement recursive agent discovery and compilation
- Module agents now discovered recursively at any depth in agents folder
- .agent.yaml files are compiled to .md format during module installation
- Custom agents also support subdirectory structure
- Agents maintain their directory structure when installed
- YAML files are skipped during file copying as they're compiled separately
- Added compileModuleAgents method to handle YAML-to-MD compilation
- Updated discoverAgents to recursively search for .agent.yaml files
- Agents in subdirectories are properly placed in _cfg/agents with relative paths

This fixes issue where agents like cbt-coach were not being compiled
and were only copied as YAML files.
2025-12-06 15:38:38 -06:00
Brian Madison 0d83799ecf refactor: simplify module discovery to scan entire project
- Module discovery now scans entire project recursively for install-config.yaml
- Removed hardcoded module locations (bmad-custom-src, etc.)
- Modules can exist anywhere with _module-installer/install-config.yaml
- All modules treated equally regardless of location
- No special UI handling for 'custom' modules
- Core module excluded from selection list (always installed first)
- Only install-config.yaml is valid (removed support for legacy config.yaml)

Modules are now discovered by structure, not location.
2025-12-06 15:28:37 -06:00
Brian Madison 7c5c97a914 atl rovo dev not in preferred list until fully tested 2025-12-06 14:25:29 -06:00
Brian Madison 7545bf9227 remove custom test content from src control 2025-12-06 12:53:43 -06:00
Brian Madison 228dfa28a5 installer updates working with basic flow 2025-12-06 12:53:43 -06:00
Alex Verkhovsky e3f756488a
feat(quality): add markdownlint-cli2 to quality checks (#1039)
- Add markdownlint-cli2 as dev dependency
- Add lint:md script to package.json
- Add markdownlint job to CI workflow
- Configure 5 rules: heading-increment, no-duplicate-heading,
  no-trailing-punctuation, no-bare-urls, no-space-in-emphasis
- Fix existing violations across 19 markdown files
- No auto-fix to prevent destructive changes

Closes #1034

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-06 12:40:07 -06:00
Alex Verkhovsky d85090060b
fix: read version from package.json instead of hardcoded fallback (#1041)
Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-06 12:39:39 -06:00
Alex Verkhovsky a0442d4fb7
chore(cli): remove broken build caching (#1042)
The agent build caching never worked - BUILD-META comments were
never written to output files, so every build acted like --force.

Since building all 29 agents takes ~300ms, caching provided no
meaningful benefit. Removed ~190 lines of dead code including
checkIfNeedsRebuild, checkBuildStatus, buildMetadataComment,
and the --force flag.

Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-06 12:38:56 -06:00
Alex Verkhovsky e979b47fe5
fix(workflows): remove hardcoded years from WebSearch queries (#1040)
* update 2024 to 2025

* fix(workflows): remove hardcoded years from WebSearch queries

Years in search queries (2024/2025) do not improve results - search
engines already prioritize current documentation. Tested all patterns
and confirmed identical quality results with/without years.

Removes years from:
- step-03-starter.md (5 queries)
- step-04-decisions.md (2 queries)
- game-architecture/instructions.md (2 queries)

Leaves file-utils.md unchanged (test fixture data, not a search query).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(workflows): remove year placeholders from research WebSearch queries

Search engines return current results regardless of year - removes
{{current_year}} and hardcoded 2025 from step-05-technical-trends.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(workflows): replace {{current_year}} with semantic alternatives

Replaces year placeholder with context-appropriate wording:
- 'current data' for up-to-date information
- 'web searches' without year qualifier
- Updated failure mode to focus on using web searches

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(workflows): clarify failure mode about stale training data

Rephrased to explicitly mention training data cutoff as the reason
to use web searches for current technology trends.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* refactor(workflows): make web search references platform-agnostic

- Remove hardcoded year references from WebSearch queries
- Replace `WebSearch` tool name with natural language "search the web"
- Soften "training data is stale" to "verify and supplement your knowledge"
- Add web search prerequisite check to research workflow
- Add platform-agnostic design note to CLAUDE.md

This framework targets 15+ agentic platforms, not just Claude Code.
Tool-specific syntax like `WebSearch:` won't work across all platforms.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* refactor(research): clean up prompts and routing

---------

Co-authored-by: Pomazan Bohdan <pomazan.bogdan@gmail.com>
Co-authored-by: Brian <bmadcode@gmail.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-06 12:37:50 -06:00
Alex Verkhovsky a6dffb4706
fix(installer): remove hardcoded 'bmad' prefix from files-manifest.csv paths (#1043)
The manifest writer hardcoded 'bmad' as the path prefix regardless of
the actual folder name (.bmad, bmad, etc). The reader had a matching
hardcoded strip, so it worked by accident.

Now paths are stored relative to bmadDir without any prefix. Legacy
fallback strips 'bmad/' on read - safe because no real path inside
bmadDir would start with 'bmad/'.

Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-06 12:36:17 -06:00
Hang 282bc27c7e
feat(bmm): enhance PRD workflow with brownfield project support (#1047)
- Add three-branch conditional logic for document-based discovery:
  - PATH A: Has Product Brief (any project type)
  - PATH B: No Brief + Has Project Docs (brownfield)
  - PATH C: No Documents (greenfield from scratch)
- Add YAML frontmatter to all 12 PRD step files
- Add documentCounts to frontmatter for state tracking
- Fix step count (11 steps, not 10) and path typos
- Remove non-existent workflow references (story-context, validate-architecture)
- Update workflow chains and glossary definitions

Key insight: Branch based on DOCUMENT TYPE, not PROJECT TYPE.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-06 12:35:30 -06:00
Alex Verkhovsky 5ee1551b5b
fix(bmm): remove stale validate-prd references (fixes #1030) (#1038)
- Remove validate-prd workflow references from all workflow path YAML files
- Update Excalidraw diagram: remove Validate PRD box and zombie JSON elements
- Re-export SVG at 1x scale
- Standardize implementation-readiness descriptions across all docs
- Add validation script (validate-svg-changes.sh) and README for SVG export process
- Correct Excalidraw timestamps

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-05 21:35:46 -06:00
Alex Verkhovsky c95b65f462
fix(bmm): correct code-review workflow status logic and checklist (#1015) (#1028)
- Fix checklist to only accept 'review' status (not 'ready-for-review')
- Include MEDIUM issues in done/in-progress status determination
- Initialize and track fixed_count/action_count variables for summary
- Add sprint-status.yaml sync when story status changes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-05 21:27:11 -06:00
Nguyen Quang Huy 72ef9e9722
fix: use backticks for quoted phrase in code-review description (#1025)
Replace 'looks good' with `looks good` to avoid nested single quote
issues when IDEs generate command files from workflow YAML.

Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-05 21:26:04 -06:00
Paul Preibisch 8265bbf295
feat(installer): Enhanced TTS injection summary with tracking and documentation (#1037)
## Summary
- Track all files with TTS injection applied during installation
- Display informative summary explaining what TTS injection does
- Show backup location and restore command for recovery

## What is TTS Injection?
TTS (Text-to-Speech) injection adds voice instructions to BMAD agents,
enabling them to speak their responses aloud using AgentVibes.

Example: When you activate the PM agent, it will greet you with
spoken audio like "Hey! I'm your Project Manager. How can I help?"

## Changes
- **installer.js**: Track files in `processAgentFiles()`, `buildStandaloneAgents()`,
  and `rebuildAgentFiles()` when TTS markers are processed
- **compiler.js**: Add TTS injection support for custom agent compilation
- **ui.js**: Enhanced installation summary showing:
  - Explanation of what TTS injection is with example
  - List of all files with TTS injection applied (grouped by type)
  - Backup location (~/.bmad-tts-backups/)
  - Restore command for recovery

## Example Output
```
═══════════════════════════════════════════════════
            AgentVibes TTS Injection Summary
═══════════════════════════════════════════════════

What is TTS Injection?

  TTS (Text-to-Speech) injection adds voice instructions to BMAD agents,
  enabling them to speak their responses aloud using AgentVibes.

  Example: When you activate the PM agent, it will greet you with
  spoken audio like "Hey! I'm your Project Manager. How can I help?"

 TTS injection applied to 11 file(s):

  Party Mode (multi-agent conversations):
    • .bmad/core/workflows/party-mode/instructions.md
  Agent TTS (individual agent voices):
    • .bmad/bmm/agents/analyst.md
    • .bmad/bmm/agents/architect.md
    ...

Backups & Recovery:

  Pre-injection backups are stored in:
    ~/.bmad-tts-backups/

  To restore original files (removes TTS instructions):
    bmad-tts-injector.sh --restore /path/to/.bmad
```

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Paul Preibisch <paul@paulpreibisch.com>
Co-authored-by: Claude <noreply@anthropic.com>
2025-12-05 18:54:03 -06:00
Murat K Ozcan f99e192e74
fix: tea ci nvmrc (#1036) 2025-12-05 12:30:20 -06:00
Brian Madison 0b9290789e installer fixes 2025-12-03 22:44:13 -06:00
Brian Madison aa1cf76f88 new workflow types generate slash commands 2025-12-03 21:36:24 -06:00
Alex Verkhovsky b8b4b65c10
feat(discord): compact plain-text notifications with bug fixes (#1021)
- Fix esc() bracket expression (] must be first in POSIX regex)
- Fix delete job: inline helper to avoid checkout of deleted ref
- Fix issue notifications: attribute close/reopen to actor, not author
- Simplify trunc() comment (remove false Unicode-safe claim)
- Smart truncation with wall-of-text detection
- Escape markdown and @mentions for safe display

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-03 20:22:59 -06:00
Brian Madison 73db5538bf roo installer improovement 2025-12-03 19:56:23 -06:00
Philip Louw 41f9cc1913
feat: add kiro-cli installer with BMad Core compliance (#993)
- Implement KiroCliSetup class extending BaseIdeSetup
- Generate 21 agents from YAML sources with JSON configs and markdown prompts
- Add runtime resource loading and numbered menu formatting
- Include BMad Core validation for required agent fields
- Fix agent naming conventions to prevent double prefixes
- Add .kiro/ directory to gitignore

Follows BMad Method standards for IDE installer integration.

Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-03 12:17:02 -06:00
Alex Verkhovsky 686af5b0ee
feat: add intelligent routing to quick-dev workflow (#1019)
Add escalation threshold and scale-adaptive routing to quick-dev:
- Simple requests get standard [t]/[e] choice
- Complex requests evaluated against project-levels.yaml
- Level 1-2 or uncertain → tech-spec recommended
- Level 3+ → BMad Method (workflow-init) recommended

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-03 12:14:36 -06:00
Dicky Moore 65658a499b
Feat/sprint status command (#1012)
* feat: add sprint-status command

* minor changes to reduce the change radius

---------

Co-authored-by: mq-bot <mq-bot@local>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-12-03 12:00:34 -06:00
Alex Verkhovsky d553a09f73
docs: create CODE_OF_CONDUCT.md (#1013)
* docs: create CODE_OF_CONDUCT.md

* chore: exclude CODE_OF_CONDUCT.md from Prettier

Third-party artifact should not be reformatted.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: add Discord as enforcement contact channel

Uses permanent invite link. Discord is common practice for
open source project Code of Conduct enforcement.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-12-03 10:42:28 -06:00
Brian Madison c79d081128 fix pm and architect agents menu items to load new step sharded workflows 2025-12-02 22:40:57 -06:00
Brian Madison 0b3964902a workflow builder has template LOD output options 2025-12-02 22:36:44 -06:00
Brian Madison 1e6fc4ba14 workflow creation update 2025-12-02 21:44:30 -06:00
Brian Madison aa30ef3e79 convert create epics and stories and implementation readiness to the new workflow step format 2025-12-02 19:22:15 -06:00
Brian Madison 6365a63dff workflow builder understands how to build continuable workflows 2025-12-02 19:22:15 -06:00
Alex Verkhovsky fe0817f590
fix(bmm): complete cleanup of epic-tech-context workflow removal (#1001)
- Remove references to deprecated epic-tech-context, story-context,
  validate-epic-tech-context, validate-story-context, and story-done workflows
- Simplify epic status: backlog → in-progress → done (was backlog → contexted)
- Update create-story to handle legacy 'contexted' status for backward compat
- Clean up sprint-planning instructions and status template
- Update docs: agents-guide, brownfield-guide, faq, glossary, quick-start

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-11-30 23:52:04 -06:00
Brian Madison afd2a163bf chore: bump version to alpha.13 2025-11-30 23:23:08 -06:00
Brian Madison 9223174f40 remove legacy workflows from bmb that were upgraded to step sharded flows and prep .13 changelog 2025-11-30 23:18:01 -06:00
Brian Madison 47ad645f22 complience check of workflow fix 2025-11-30 22:47:28 -06:00
Brian Madison 788c746857 product brief compliance with documented workflow standards 2025-11-30 22:45:48 -06:00
Brian Madison ad053a6508 create workflow validation check fixes 2025-11-30 21:51:46 -06:00
Brian Madison 4539ca7436 feat: implement granular step-file workflow architecture with multi-menu support
## Major Features Added
- **Step-file workflow architecture**: Transform monolithic workflows into granular step files for improved LLM adherence and consistency
- **Multi-menu handler system**: New `handler-multi.xml` enables grouped menu items with fuzzy matching
- **Workflow compliance checker**: Added automated compliance validation for all workflows
- **Create/edit agent workflows**: New structured workflows for agent creation and editing

## Workflow Enhancements
- **Create-workflow**: Expanded from 6 to 14 detailed steps covering tools, design, compliance
- **Granular step execution**: Each workflow step now has dedicated files for focused execution
- **New documentation**: Added CSV data standards, intent vs prescriptive spectrum, and common tools reference

## Complete Migration Status
- **4 workflows fully migrated**: `create-agent`, `edit-agent`, `create-workflow`, and `edit-workflow` now use the new granular step-file architecture
- **Legacy transformation**: `edit-workflow` includes built-in capability to transform legacy single-file workflows into the new improved granular format
- **Future cleanup**: Legacy versions will be removed in a future commit after validation

## Schema Updates
- **Multi-menu support**: Updated agent schema to support `triggers` array for grouped menu items
- **Legacy compatibility**: Maintains backward compatibility with single `trigger` field
- **Discussion enhancements**: Added conversational_knowledge recommendation for discussion agents

## File Structure Changes
- Added: `create-agent/`, `edit-agent/`, `edit-workflow/`, `workflow-compliance-check/` workflows
- Added: Documentation standards and CSV reference files
- Refactored: `create-workflow/steps/` with detailed granular step files

## Handler Improvements
- Enhanced `handler-exec.xml` with clearer execution instructions
- Improved data passing context for executed files
- Better error handling and user guidance

This architectural change significantly improves workflow execution consistency across all LLM models by breaking complex processes into manageable, focused steps. The edit-workflow transformation tool ensures smooth migration of existing workflows to the new format.
2025-11-30 15:09:23 -06:00
Brian Madison 829d051c91 move agent builder docs, create workflow builder docs, and a new workflow builder to conform to stepwise workflow creation 2025-11-29 23:23:35 -06:00
Brian Madison a0732df56c more step sharded workflows added for architecture and some fixes across all workflows to improve their file loading and reduction of time based estimates. 2025-11-29 01:49:15 -06:00
Brian Madison 4e254d7c63 brainstorming, research and partymode updated to use sharded step flow workflows 2025-11-29 01:49:15 -06:00
Brian Madison 00e72e66f8 Initial stepwise converstion of the phase 1 and 2 workflows complete. 2025-11-29 01:49:15 -06:00
Brian Madison 5a11519dc1 converted ux design to sharded step workflow 2025-11-29 01:49:14 -06:00
Alex Verkhovsky 5ea02d7091
feat: add adversarial code review recommendation to quick-dev workflow (#989)
* feat: add adversarial code review recommendation to quick-dev workflow

* fix: clarify scope of code review with 'in it' reference
2025-11-27 23:38:54 -06:00
Alex Verkhovsky 7b21708868
feat: recommend different LLM for code review in dev-story (#984)
Co-authored-by: Brian <bmadcode@gmail.com>
2025-11-27 23:38:32 -06:00
Brian Madison 3c81d78991 the first reworked sharded workflow, prd, works great and resolves the issues with latest sonnet udpates 2025-11-27 22:33:03 -06:00
Brian Madison dcaf02f665 Fix phase numbering throughout documentation
- Removed all references to Phase 0 (should be Documentation prerequisite)
- Updated phase transitions from 'Phase 3→4' to 'Phase 3 to Phase 4'
- Ensured all phases are numbered 1-4 consistently
- Documentation for brownfield projects is now correctly referred to as 'Documentation prerequisite' rather than Phase 0
2025-11-26 20:59:46 -06:00
Brian Madison 04b328bd2a Fix workflow documentation - remove non-existent workflows and Mermaid diagrams
- Updated workflows-implementation.md: removed validate workflows, epic-tech-context, story-context
- Updated workflows-analysis.md: removed brainstorm-game, game-brief, added domain-research
- Updated workflows-planning.md: removed gdd, narrative, moved create-epics-and-stories to Phase 3
- Updated workflows-solutioning.md: already correct with create-epics-and-stories in Phase 3
- Removed all Mermaid diagrams and replaced with text descriptions
- Updated quick reference tables to reflect actual workflows
- Fixed flow examples to match current implementation
2025-11-26 20:42:20 -06:00
Brian Madison 355ccebca2 workflow-status can call workflow init 2025-11-26 19:48:47 -06:00
Brian Madison dfc35f35f8 BMad Agents menu items are logically ordered and marked with optional or recommended and some required tags 2025-11-26 18:22:24 -06:00
Brian Madison 677c000820 github uses agents folder now instead of chatmodes 2025-11-26 17:46:26 -06:00
Brian Madison 3ac539b61f npm vulnerabilities resolved 2025-11-26 17:07:09 -06:00
Brian Madison 331a67eeb3 installer allows cleanup of unneeded files in upgrades 2025-11-26 16:47:15 -06:00
Brian Madison fbdb91b991 standard greenfield workflow updated diagrams 2025-11-26 15:14:34 -06:00
Jorge Castillo 54e6745a55
fix: update GitHub Copilot tools names for consistency (#880)
Copilot was triggering warning or errors in the chatmode files due to some changes in tool names.
- findTestFiles is internal tool, cannot be used.
- Other tools have change names.
- Added new tools: todos and runSubAgents.

Co-authored-by: Brian <bmadcode@gmail.com>
2025-11-26 14:49:17 -06:00
Serhii f793cf8fcd
fix: add radix parameter to parseInt() calls (#862)
Add explicit radix=10 to parseInt() calls and NaN validation to prevent
unexpected hex parsing and invalid config values.

Changes:
- Line 52: Add radix and NaN check in input validation
- Line 189-192: Add radix and NaN fallback for config parsing

Fixes potential issues:
- Hex input (0x10) now rejected instead of parsed as 16
- Invalid strings return default value instead of NaN→null

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-11-26 14:44:12 -06:00
fikri-kompanion 9223e2be21
fix: give kilocode tool access to bmad modes (#961)
Co-authored-by: Ahmad Fikrizaman <ahmadfikrizaman@gmail.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-11-26 13:48:16 -06:00
Brian Madison 2cac74cfb5 agent vibes injection and installer update 2025-11-26 11:00:46 -06:00
Paul Preibisch 5702195ef7
Add Text-to-Speech Integration via TTS_INJECTION System (#934)
* feat: Add provider-agnostic TTS integration via injection point system

Implements comprehensive Text-to-Speech integration for BMAD agents using a generic
TTS_INJECTION marker system. When AgentVibes (or any compatible TTS provider) is
installed, all BMAD agents can speak their responses with unique AI voices.

## Key Features

**Provider-Agnostic Architecture**
- Uses generic `TTS_INJECTION` markers instead of vendor-specific naming
- Future-proof for multiple TTS providers beyond AgentVibes
- Clean separation - BMAD stays TTS-agnostic, providers handle injection

**Installation Flow**
- BMAD → AgentVibes: TTS instructions injected when AgentVibes detects existing BMAD installation
- AgentVibes → BMAD: TTS instructions injected during BMAD installation when AgentVibes detected
- User must manually create voice assignment file when AgentVibes installs first (documented limitation)

**Party Mode Voice Support**
- Each agent speaks with unique assigned voice in multi-agent discussions
- PM, Architect, Developer, Analyst, UX Designer, etc. - all with distinct voices

**Zero Breaking Changes**
- Fully backward compatible - works without any TTS provider
- `TTS_INJECTION` markers are benign HTML comments if not processed
- No changes to existing agent behavior or non-TTS workflows

## Implementation Details

**Files Modified:**
- `tools/cli/installers/lib/core/installer.js` - TTS injection processing logic
- `tools/cli/lib/ui.js` - AgentVibes detection and installation prompts
- `tools/cli/commands/install.js` - Post-install guidance for AgentVibes setup
- `src/utility/models/fragments/activation-rules.xml` - TTS_INJECTION marker for agents
- `src/core/workflows/party-mode/instructions.md` - TTS_INJECTION marker for party mode

**Injection Point System:**
```xml
<rules>
  - ALWAYS communicate in {communication_language}
  <!-- TTS_INJECTION:agent-tts -->
  - Stay in character until exit selected
</rules>
```

When AgentVibes is detected, the installer replaces this marker with:
```
- When responding to user messages, speak your responses using TTS:
  Call: `.claude/hooks/bmad-speak.sh '{agent-id}' '{response-text}'` after each response
  IMPORTANT: Use single quotes - do NOT escape special characters like ! or $
```

**Special Character Handling:**
- Explicit guidance to use single quotes without escaping
- Prevents "backslash exclamation" artifacts in speech

**User Experience:**
```
User: "How should we architect this feature?"
Architect: [Text response] + 🔊 [Professional voice explains architecture]
```

Party Mode:
```
PM (John): "I'll focus on user value..." 🔊 [Male professional voice]
UX Designer (Sara): "From a user perspective..." 🔊 [Female voice]
Architect (Marcus): "The technical approach..." 🔊 [Male technical voice]
```

## Testing

**Unit Tests:**  62/62 passing
- 49/49 schema validation tests
- 13/13 installation component tests

**Integration Testing:**
-  BMAD → AgentVibes (automatic injection)
-  AgentVibes → BMAD (automatic injection)
-  No TTS provider (markers remain as comments)

## Documentation

Comprehensive testing guide created with:
- Both installation scenario walkthroughs
- Verification commands and expected outputs
- Troubleshooting guidance

## Known Limitations

**AgentVibes → BMAD Installation Order:**
When AgentVibes installs first, voice assignment file must be created manually:
```bash
mkdir -p .bmad/_cfg
cat > .bmad/_cfg/agent-voice-map.csv << 'EOF'
agent_id,voice_name
pm,en_US-ryan-high
architect,en_US-danny-low
dev,en_US-joe-medium
EOF
```

This limitation exists to prevent false legacy v4 detection warnings from BMAD installer.

**Recommended:** Install BMAD first, then AgentVibes for automatic voice assignment.

## Related Work

**Companion Implementation:**
- Repository: paulpreibisch/AgentVibes
- Commits: 6 commits implementing injection processing and voice routing
- Features: Retroactive injection, file path extraction, escape stripping

**GitHub Issues:**
- paulpreibisch/AgentVibes#36 - BMAD agent ID support

## Breaking Changes

None. Feature is opt-in and requires separate TTS provider installation.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Enforce project hooks over global hooks in party mode

before, claude would sometimes favor global agent vibes hooks over project specific

* feat: Automate AgentVibes installer invocation after BMAD install

Instead of showing manual installation instructions, the installer now:
- Prompts "Press Enter to start AgentVibes installer..."
- Automatically runs npx agentvibes@latest install
- Handles errors gracefully with fallback instructions

This provides a seamless installation flow matching the test script's
interactive approach.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* docs: Add automated testing script and guide for PR #934

Added comprehensive testing tools for AgentVibes party mode integration:

- test-bmad-pr.sh: Fully automated installation and verification script
  - Interactive mode selection (official PR or custom fork)
  - Automatic BMAD CLI setup and linking
  - AgentVibes installation with guided prompts
  - Built-in verification checks for voice maps and hooks
  - Saved configuration for quick re-testing

- TESTING.md: Complete testing documentation
  - Quick start with one-line npx command
  - Manual installation alternative
  - Troubleshooting guide
  - Cleanup instructions

Testers can now run a single command to test the full AgentVibes integration
without needing to understand the complex setup process.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Add shell: true to npx execSync to prevent permission denied error

The execSync call for 'npx agentvibes@latest install' was failing with
'Permission denied' because the shell was trying to execute 'agentvibes@latest'
directly instead of passing it as an argument to npx.

Adding shell: true ensures the command runs in a proper shell context
where npx can correctly interpret the @latest version syntax.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Remove duplicate AgentVibes installation step from test script

The test script was calling AgentVibes installer twice:
1. BMAD installer now automatically runs AgentVibes (new feature)
2. Test script had a separate Step 6 that also ran AgentVibes

This caused the installer to run twice, with the second call failing
because it was already installed.

Changes:
- Removed redundant Step 6 (AgentVibes installation)
- Updated Step 5 to indicate it includes AgentVibes
- Updated step numbers from 7 to 6 throughout
- Added guidance that AgentVibes runs automatically

Now the flow is cleaner: BMAD installer handles everything!

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Address bmadcode review - preserve variables and move TTS logic to injection

Fixes requested changes from PR review:

1. Preserve {bmad_folder} variable placeholder
   - Changed: {project_root}/.bmad/core/tasks/workflow.xml
   - To: {project_root}/{bmad_folder}/core/tasks/workflow.xml
   - Allows users to choose custom BMAD folder names during installation

2. Move TTS-specific hook guidance to injection system
   - Removed hardcoded hook enforcement from source files
   - Added hook guidance to processTTSInjectionPoints() in installer.js
   - Now only appears when AgentVibes is installed (via TTS_INJECTION)

3. Maintain TTS-agnostic source architecture
   - Source files remain clean of TTS-specific instructions
   - TTS details injected at install-time only when needed
   - Preserves provider-agnostic design principle

Changes made:
- src/core/workflows/party-mode/instructions.md
  - Reverted .bmad to {bmad_folder} variable
  - Replaced hardcoded hook guidance with <!-- TTS_INJECTION:party-mode -->
  - Removed <note> about play-tts.sh hook location

- tools/cli/installers/lib/core/installer.js
  - Added hook enforcement to party-mode injection replacement
  - Guidance now injected only when enableAgentVibes is true

Addresses review comments from bmadcode:
- "needs to remain the variable. it will get set in the file at the install destination."
- "items like this we will need to inject if user is using claude and TTS"

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: Change 'claude-code' to 'claude' in test script instructions

The correct command to start Claude is 'claude', not 'claude-code'.
Updated line 362-363 in test-bmad-pr.sh to show the correct command.

* fix: Remove npm link from test script to avoid global namespace pollution

- Removed 'npm link' command that was installing BMAD globally
- Changed 'bmad install' to direct node execution using local clone
- Updated success message to reflect no global installation

This keeps testing fully isolated and prevents conflicts with:
- Existing BMAD installations
- Future official BMAD installs
- Orphaned symlinks when test directory is deleted

The test script now runs completely self-contained without modifying
the user's global npm environment.

---------

Co-authored-by: Claude Code <claude@anthropic.com>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Paul Preibisch <paul@paulpreibisch.com>
Co-authored-by: Brian <bmadcode@gmail.com>
2025-11-26 09:51:57 -06:00
mreis-atlassian 11a1dbaefc
feat: Adding support for Rovo Dev (#975)
- Adding support for rovo dev
- Adding rovo dev translation wrappers
2025-11-26 09:05:04 -06:00
Brian Madison d6b98afd2b minor udpates to prd, architecture, and create epics and stories flows. 2025-11-26 00:28:49 -06:00
Brian Madison 24e952c511 updated code review 2025-11-25 16:59:00 -06:00
Brian Madison 3740a554f0 fix: optimize agent compiler and complete handler cleanup
- Add deployment-aware handler generation (filters web-only/ide-only commands)
- Remove unused run-workflow handler type (ghost handler cleanup)
- Implement missing validate-workflow and data handler generation
- Update schema validation to support exactly 6 active handler types
- Clean up activation templates and web bundler logic
- Prevent generation of unused handler instructions for better performance
- All 62 tests pass with backward compatibility maintained
2025-11-23 21:28:50 -06:00
Brian Madison cd98a7f5bb feat: complete Phase 4 workflow transformation - simpler, faster, better results
MAJOR BREAKING CHANGES: Phase 4 completely reengineered for developer efficiency and quality

🚀 **Phase 4 Streamlined & Supercharged:**
- **Reduced from 11 to 5 essential workflows** (55% reduction in complexity)
- **Eliminated redundant steps** that created token waste and confusion
- **Created single source of truth** story files with comprehensive implementation context
- **Achieved more reliable results** with fewer steps and better developer guidance

💡 **Revolutionary Dev Agent Behavior Fixes:**
- **Story file is now LAW:** Tasks/subtasks sequence is absolutely binding
- **Red-green-refactor enforcement:** Tests written first, validated, then implementation
- **Zero tolerance for cheating:** Tests must ACTUALLY exist and pass before marking complete
- **Sequential execution only:** No more "doing whatever you want" - follow the story exactly
- **Continuous execution:** No premature pausing until all tasks complete

🎯 **Quality Competition System:**
- **Enhanced story context engine** prevents common LLM development mistakes
- **Quality competition between LLMs** ensures optimal story preparation
- **Comprehensive anti-pattern prevention** stops wheel reinvention and wrong approaches
- **Developer optimization focus** for maximum clarity with minimum verbosity

📋 **Enhanced Definition of Done:**
- **27-point validation checklist** covers all implementation aspects
- **Multiple validation gates** prevent claiming work that isn't actually done
- **Comprehensive test requirements** ensure no functionality goes untested
- **File tracking and documentation** for complete project visibility

🔧 **Technical Improvements:**
- **Variable consistency** throughout all workflow files
- **XML instruction format** for better workflow engine compatibility
- **Proper ask tag handling** for user interaction clarity
- **Project context integration** without blocking implementation
- **Fixed all agent schema compliance** for proper array formatting

**Result:** Phase 4 now delivers superior development outcomes with:
-  **55% fewer workflows** to learn and maintain
-  **Dramatically reduced token usage** and context switching
-  **Eliminated dev agent behavioral issues** that caused quality problems
-  **Faster time-to-completion** with more reliable, predictable results
-  **Better developer experience** with clearer guidance and validation

This represents the most significant Phase 4 improvement since BMAD Method inception - fundamentally fixing developer workflow quality while drastically simplifying the implementation process.
2025-11-23 16:43:04 -06:00
Brian Madison 4308b36d4d feat: add custom agents and quick-flow workflows, remove tech-spec track
Major Changes:
- Add sample custom agents demonstrating installable agent system
  - commit-poet: Generates semantic commit messages (BMAD Method repo sample)
  - toolsmith: Development tooling expert with knowledge base covering bundlers, deployment, docs, installers, modules, and tests (BMAD Method repo sample)
  - Both agents demonstrate custom agent architecture and are installable to projects via BMAD installer system
  - Include comprehensive installation guides and sidecar knowledge bases

- Add bmad-quick-flow methodology for rapid development
  - create-tech-spec: Direct technical specification workflow
  - quick-dev: Flexible execution workflow supporting both tech-spec-driven and direct instruction development
  - quick-flow-solo-dev (Barry): 1 man show agent specialized in bmad-quick-flow methodology
  - Comprehensive documentation for quick-flow approach and solo development

- Remove deprecated tech-spec workflow track
  - Delete entire tech-spec workflow directory and templates
  - Remove quick-spec-flow.md documentation (replaced by quick-flow docs)
  - Clean up unused epic and story templates

- Fix custom agent installation across IDE installers
  - Repair antigravity and multiple IDE installers to properly support custom agents
  - Enable custom agent installation via quick installer, agent installer, regular installer, and special agent installer
  - All installation methods now accessible via npx with full documentation

Infrastructure:
- Update BMM module configurations and team setups
- Modify workflow status paths to support quick-flow integration
- Reorganize documentation with new agent and workflow guides
- Add custom/ directory for user customizations
- Update platform codes and installer configurations
2025-11-23 08:51:26 -06:00
Brian Madison 6907d44810 fix: display proper persona names in custom agent manifests
## Problem
Custom agents showed generic names (like "Commit Poet") instead of their
actual persona names (like "Inkwell Von Comitizen") in the agent manifest.

## Root Cause
The extractManifestData function was using metadata.name/title instead of
extracting the persona name from the compiled agent XML.

## Solution
1. Added extractAgentAttribute function to pull attributes from <agent> tag
2. Prioritize XML extraction over metadata for persona info:
   - displayName: uses agent title attribute from XML
   - title: uses agent title attribute from XML
   - icon: uses agent icon attribute from XML
   - Falls back to metadata if XML extraction fails

## Result
Custom agents now display their actual persona names in manifests:
- Before: "Commit Poet"
- After: "Inkwell Von Comitizen"

This provides better user experience with proper agent identification
in IDE integrations and manifests.
2025-11-23 08:51:26 -06:00
Brian Madison efc2b6d0df feat: complete custom agent support for ALL remaining IDEs
## Added installCustomAgentLauncher to remaining IDEs:

 Qwen (.qwen/commands/BMad/)
- TOML format with proper description and prompt fields
- Uses existing processAgentLauncherContent method
- Format: custom-{agent-name}.toml

 Trae (.trae/rules/)
- Markdown format with bmad-agent-custom- prefix
- Follows existing BMAD naming pattern
- Format: bmad-agent-custom-{agent-name}.md

 Roo (.roomodes)
- YAML format appends to existing customModes section
- Creates customModes section if missing
- Format: bmad-custom-{agent-name} (slug-based)

 Kilo (.kilocodemodes)
- YAML format identical to Roo pattern
- Handles existing customModes gracefully
- Format: bmad-custom-{agent-name} (slug-based)

 Auggie (.augment/commands/bmad/)
- Frontmatter + Markdown format
- Follows existing Auggie command pattern
- Format: custom-{agent-name}.md

## Complete IDE Coverage:
ALL IDEs now support custom agent installation:
- 16 total IDEs with custom agent support
- Various formats: TOML, YAML, Markdown, file-based
- All include @agentPath references and usage instructions
- Proper IDE-specific naming and directory structures

Custom agents from .bmad/custom/src/agents/ now install to EVERY configured IDE!
2025-11-23 08:51:25 -06:00
Brian Madison 98342f2174 feat: add custom agent support to more IDEs
## Added installCustomAgentLauncher function to:

 Cline (.clinerules/workflows/)
- Creates workflow files with custom agent launchers
- Format: bmad-custom-{agent-name}.md

 Crush (.crush/commands/bmad/)
- Creates command files with custom agent launchers
- Format: custom-{agent-name}.md

 Gemini (.gemini/commands/)
- Creates TOML command files with custom agent launchers
- Format: bmad-custom-{agent-name}.toml

 iFlow (.iflow/commands/bmad/)
- Creates command files with custom agent launchers
- Format: custom-{agent-name}.md

## All Custom Agent Launchers Include:
- @agentPath reference to load complete agent
- Usage instructions for loading first, then activating
- Proper IDE-specific formatting and file structure
- Return values for tracking installations

Now custom agents install to 8+ IDEs instead of just 4!
2025-11-23 08:51:25 -06:00
Brian Madison 2edadd11ae fix: add custom agent support to Antigravity IDE
## Problem
Custom agents were only installing to Claude Code (.claude/commands/)
but not to Antigravity (.agent/) or other IDEs that lack installCustomAgentLauncher function.

## Root Cause
Antigravity was missing the installCustomAgentLauncher function that the
IdeManager calls to install custom agents during agent installation.

## Solution
Added installCustomAgentLauncher function to Antigravity that:
- Creates .agent directory if needed
- Generates custom agent launchers with @agentPath references
- Uses same pattern as existing Antigravity agent launchers
- Returns proper installation result for tracking

## Result
Custom agents now install to:
- Claude Code: .claude/commands/bmad/custom/agents/ 
- Antigravity: .agent/bmad-custom-agents-{agentName}.md 
- Codex: (already working) 

All configured IDEs now receive custom agent installations!
2025-11-23 08:51:25 -06:00
Brian Madison 0aeaa5b2ea fix: compile agents now checks multiple source locations
## Problem
Compile Agents ignored custom agents in source locations like:
- {project-root}/custom/src/agents/
- {bmad-folder}/custom/src/agents/

## Solution
Update reinstallCustomAgents to check all locations:
1. _cfg/custom/agents/ (backup location)
2. {bmad-folder}/custom/src/agents/ (source in BMAD folder)
3. {project-root}/custom/src/agents/ (source at project root)

## Changes
- Search multiple locations for agents during compile
- Avoid duplicate processing with Set tracking
- Auto-backup source YAML to _cfg/custom/agents/ if needed
- Works with any custom bmad_folder name from config

Now 'Compile Agents' works with agents in any source location!
2025-11-23 08:51:25 -06:00
Brian Madison b20773e7f7 docs: remove fluff from installation guide
- Remove verbose explanations and marketing language
- Keep only essential commands and process steps
- Reduce from verbose guide to concise reference
- Focus on what users need to know, not explanations
2025-11-23 08:51:25 -06:00
Brian Madison c57ada4d9c feat: improve agent creation workflow and documentation
## BMB Agent Workflow Improvements
- Always create folders for agents (even simple ones)
- Add compact info-and-installation-guide.md (20 lines max)
- Include installation guide with every created agent
- Update workflow to use standalone_output_folder structure

## Documentation Updates
- Clarify --defaults makes installation non-interactive
- Update all parameter documentation for clarity
- Fix npm package references (bmad-method only)

## New Agent Structure
Every agent now gets:
  agent-folder/
  ├── agent-name.agent.yaml    # Source YAML
  └── info-and-installation-guide.md  # Quick install guide + description

## Quick Install Commands (added to guide)
- Interactive: npx bmad-method agent-install --source ./agent.yaml
- Non-interactive: npx bmad-method agent-install --source ./agent.yaml --defaults

This makes agent installation much more user-friendly and consistent.
2025-11-23 08:51:25 -06:00
Brian Madison 05cbc6ccb8 feat: rename agent-install parameters for clarity
- Change --path → --source (much clearer purpose)
- Change --target → --destination (more intuitive)
- Update all code references and documentation
- Add advanced parameter examples to installation guide
- Keep short aliases: -s for --source, -t for --destination

Parameters are now much more self-explanatory:
- --source: where to find the agent YAML
- --destination: where to install the compiled agent
2025-11-23 08:51:25 -06:00
Brian Madison 905f9ca346 docs: fix incorrect npm package references
- Fix npx bmad → npx bmad-method in documentation
- Only bmad-method is registered in npm registry, not bmad
- Clarify that bmad command works locally when BMAD is installed
- Update installation guides to use correct package name

Ensures users don't get 'package not found' errors when trying npx bmad
2025-11-23 08:51:25 -06:00
Brian Madison 90af352247 docs: update installation guide with npx support
- Add npx bmad-method agent-install option for users without cloned repo
- Show both local and npx commands side by side
- Clarify when to use each installation option
- Update automatic updates section with npx option
- Add prominent note about npx capability

Users can now install custom agents without needing to clone the BMAD repository.
2025-11-23 08:51:25 -06:00
Brian Madison 13b1fc7517 fix: remove remaining webskip keys from presentation-master.agent.yaml
All menu items now conform to agent schema validation.
2025-11-23 08:51:25 -06:00
Murat K Ozcan 9d510fc075
docs: playwright untils note in test-architecture.md (#957)
Co-authored-by: Murat Ozcan <murat@Murats-MacBook-Pro.local>
2025-11-21 09:19:22 -06:00
Murat K Ozcan 00b541f5d4
feat: playwright-utils integration (#954)
* feat: playwright-utils integration

* removed the temp plan file, and addressed changelog

* feat: edited the installer question for pw-utils

* feat: even more n00b friendly install prompt

* Update README.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update src/modules/bmm/_module-installer/install-config.yaml

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Murat Ozcan <murat@mac.lan>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-11-20 17:34:08 -06:00
Murat K Ozcan 55fd621664
fix: enabled web bundles for test and dev (#948)
* fix: enabled web bundles for test and dev

* fix: only bundle non webskip agents

* fix: addressed pr comments

* fix: addressed pr comments

---------

Co-authored-by: Murat Ozcan <murat@mac.lan>
2025-11-20 13:44:48 -06:00
Alex Verkhovsky da00b295a9
fix: remove .agent from gitignore for Antigravity workflow access (#953)
Antigravity respects .gitignore rules which blocks access to workflow files
in .agent/workflows/, preventing custom workflows from being discovered.
Removing .agent from gitignore to allow Antigravity to scan workflow files.

Note: Codex and Claude Code ignore .gitignore when scanning for custom
prompts, so this only affects Antigravity users.
2025-11-20 12:33:14 -06:00
Brian Madison a6f089cfd2 feat: add empty IDE selection warning and promote Antigravity to recommended
- Add persistent warning loop when no tools selected in installer
- Users must press spacebar to select, not just highlight
- Red warning explains the issue and offers to go back
- Only way to proceed without tools is explicit "No" confirmation
- Promote Google Antigravity to preferred/recommended IDE section
2025-11-19 22:12:45 -06:00
Alex Verkhovsky 09533e4abb
Chore/update gitignore (#945)
* feat: Add Google Antigravity IDE installer

Implements installer for Google Antigravity IDE with flattened slash command
naming to match Antigravity's namespace requirements.

Key features:
- Flattened file naming (bmad-module-agents-name.md) for proper slash commands
- Subagent installation support (project-level or user-level)
- Module-specific injection configuration
- Agent, workflow, task, and tool command generation

Implementation:
- Added AntigravitySetup class extending BaseIdeSetup
- Extracted flattenFilename() to BaseIdeSetup for reuse across IDE handlers
- Uses .agent/workflows directory structure
- Supports both interactive and non-interactive configuration

Fixes:
- Proper namespace isolation: /bmad-module-agents-dev instead of /dev
- Prevents conflicts between modules with same agent names

Note: This installer shares 95% of its code with claude-code.js.
Future refactoring could extract common patterns to IdeWithSlashCommandsSetup
base class (see design documents for details).

* chore: update gitignore for antigravity installer

---------

Co-authored-by: Brian <bmadcode@gmail.com>
2025-11-19 20:41:08 -06:00
Dicky Moore d7f045b11e
Align UX design workflow references (#935)
Co-authored-by: Brian <bmadcode@gmail.com>
2025-11-19 20:40:07 -06:00
Alex Verkhovsky e8e13a9aa3
feat: default installer username to system user (#939)
good idea here, thank you!
2025-11-19 20:36:54 -06:00
Brian Madison be04d687dc chore: bump version to 6.0.0-alpha.12 and add yaml dependency
- Add missing yaml package dependency to fix MODULE_NOT_FOUND error
- Update CHANGELOG.md with alpha.12 release notes
2025-11-19 00:36:31 -06:00
Brian Madison 047dfc1462 chore: bump version to 6.0.0-alpha.11 2025-11-18 23:17:01 -06:00
Brian Madison ece3eefd13 docs: Update CHANGELOG and README for v6.0.0-alpha.11 release
- Comprehensive alpha.11 changelog capturing all major features
- Condensed earlier alpha releases (0-10) to 5 key bullets each
- Reduced changelog from 1,744 to 609 lines for better readability
- Updated README status badges and installation instructions
2025-11-18 23:16:23 -06:00
Brian Madison f17e4ef0b7 refactor(bmm,cis,core): Align diagram workflows with agile roles and distribute capabilities
## The Tale of the Frame Expert

Once upon a time, BMad Method had a specialized agent called Frame Expert.
This agent was the master of all visual artifacts - flowcharts, diagrams,
wireframes, data flows. Whenever anyone needed a diagram, they called upon
Frame Expert. The agent lived in its own isolated domain with four dedicated
workflows and a library of shared templates.

## The Awakening

But something felt wrong. Teams using BMad Method were meant to mirror real
agile teams - Product Managers, Architects, UX Designers, Tech Writers,
Developers. Each agent represented an authentic role you'd find in any
software team.

Except Frame Expert.

No real agile team has a "Frame Expert" or "Diagram Specialist" who creates
all visual artifacts. In real teams, Architects diagram system architecture.
PMs flowchart processes. UX Designers wireframe interfaces. Tech Writers
create documentation diagrams. The visuals emerge from the domain experts
who need them, not from a centralized diagram factory.

Frame Expert was an abstraction that made technical sense but violated the
very soul of BMad Method - authentic agile role modeling.

## The Transformation

And so Frame Expert was dissolved, its knowledge distributed to those who
truly needed it:

**The Architect** inherited system architecture diagrams and data flows -
the blueprints of technical systems they design.

**The Product Manager** received process flowcharts - the visual maps of
features and workflows they orchestrate.

**The UX Designer** claimed wireframes - the interface sketches that bring
their vision to life.

**The Tech Writer** gained all diagram types - the visual aids that clarify
their documentation.

Each agent now creates diagrams in their domain, using their expertise,
serving their purpose.

## The Shared Knowledge

But the wisdom of diagram creation itself - the Excalidraw templates, the
component libraries, the validation patterns - this knowledge was too
valuable to scatter. It was elevated to core resources, where both BMM
agents AND the new CIS presentation-master agent could draw upon it.

Shared infrastructure for common needs. Distributed execution for domain
expertise.

## The Ripple Effects

With diagrams now properly distributed, other misalignments became visible:

Epic creation was happening in Phase 2 (Planning), before Architecture
existed. But epics need architectural context - API contracts, data models,
technical decisions. So epic creation migrated to Phase 3 (Solutioning),
after Architecture provides that foundation.

Workflow paths were updated. Documentation gained visual flowcharts showing
the complete journey. Agent naming standards were clarified - filenames are
stable roles, persona names are user dreams.

## What Changed

**Removed:**
- frame-expert.agent.yaml (the centralized specialist)
- All frame-expert workflows and shared resources
- Phase 2 epic creation workflow (wrong timing)
- game-design workflow path (consolidated to method track)
- v6-open-items.md (planning doc, now complete)

**Distributed Diagram Capabilities:**
- Architect: create-excalidraw-diagram, create-excalidraw-dataflow
- PM: create-excalidraw-flowchart
- Tech Writer: create-excalidraw-{diagram,dataflow,flowchart}, generate-mermaid
- UX Designer: create-excalidraw-wireframe

**Created:**
- src/core/resources/ (shared diagram context for all modules)
- src/modules/cis/agents/presentation-master.agent.yaml (visual comms specialist)
- src/modules/bmm/workflows/3-solutioning/create-epics-and-stories/ (epic creation's new home)
- src/modules/bmm/workflows/diagrams/ (distributed diagram implementations)
- src/modules/bmm/docs/images/ (workflow visualization assets)

**Enhanced:**
- All agent definitions with domain-appropriate diagram workflows
- Documentation with embedded workflow diagrams and visual guides
- Agent compilation docs with critical naming convention rules
- All 4 workflow paths (enterprise/method × brownfield/greenfield)

**Fixed:**
- Epic creation now in Phase 3 after Architecture
- Story context path variables in BMGD module
- PRD workflow descriptions (epics moved to Phase 3)

## For Users

The Frame Expert commands are gone. In their place:

- Need architecture diagrams? Ask `/architect`
- Need process flows? Ask `/pm`
- Need wireframes? Ask `/ux-designer`
- Need documentation visuals? Ask `/tech-writer`

Each expert creates diagrams in their domain, with their context, using
their judgment.

This is how real teams work.
2025-11-18 21:55:47 -06:00
Brian Madison 224af173ef feat: Comprehensive edit-agent workflow enhancement with Expert agent support and unified validation
## Overview
Major enhancement to edit-agent workflow to match create-agent quality standards, plus critical addition of Expert agent sidecar file support and consolidation of validation checklists into single source of truth.

## 1. edit-agent Workflow Comprehensive Enhancement

### Documentation Reference Updates (workflow.yaml)
**Fixed all broken references** - replaced deleted docs with new comprehensive guides:
-  Removed: agent-types.md, agent-architecture.md, agent-command-patterns.md, communication-styles.md
-  Added structured references:
  * Core Concepts: understanding_agent_types, agent_compilation
  * Architecture Guides: simple_architecture, expert_architecture, module_architecture
  * Design Patterns: menu_patterns, communication_presets, brainstorm_context
  * Reference Agents: commit-poet, journal-keeper, module examples, BMM agents

### Critical Persona Field Guidance Added (instructions.md +59 lines)
**The #1 issue in legacy agents** - comprehensive guidance on persona field separation:

- Explains how LLMs interpret each field:
  * role → "What knowledge/skills/capabilities do I possess?"
  * identity → "What background/experience/context shapes my responses?"
  * communication_style → "What verbal patterns/word choice do I use?"
  * principles → "What beliefs/philosophy drive my choices?"

- BEFORE/AFTER examples showing common mistakes
- Red flag word detection guide (ensures, experienced, believes in, etc.)
- Pure communication style examples from reference agents

### Enhanced Step 1: Analysis (instructions.md +57 lines)
- References all new comprehensive documentation
- **CRITICAL: Persona field separation analysis**
  * Checks for behaviors/role/identity mixed into communication_style
  * Compares against communication_presets for purity
  * Compares against reference agents for quality
- Warm, conversational feedback explaining issues found

### Massive Step 3 Enhancement: Communication Style Refinement (+122 lines)
**7-step prescriptive pattern for fixing the #1 quality issue:**

1. Diagnose Current Communication Style - red flag word detection
2. Extract Non-Style Content - working copy methodology
3. Discover TRUE Communication Style - interview questions + preset exploration
4. Craft Pure Communication Style - good/bad examples from references
5. Show Before/After With Full Context - complete transformation
6. Validate Against Standards - zero red flags, compare to presets/references
7. Confirm With User - explain changes, read dramatically, refine

Examples from actual reference agents:
- "Treats analysis like a treasure hunt - excited by every clue" (Mary/analyst)
- "Ultra-succinct. Speaks in file paths and AC IDs" (Amelia/dev)
- "Poetic drama and flair with every turn of a phrase" (commit-poet)

### Legacy Type Migration Pattern (+42 lines)
**Comprehensive guide for full/hybrid/standalone → Simple/Expert/Module migration:**

- Clear explanations of modern types (architecture, NOT capability)
- Migration patterns with decision tree
- Structural conversion guides (Simple ↔ Expert)
- Module = design intent clarification

### Enhanced Validation (Step 4)
- Persona field separation validation emphasized
- Updated success message with all quality standards
- Comprehensive checklist validation

### Complete README Documentation (200 lines created)
- Purpose emphasizing persona field separation as #1 issue
- 14 common editing scenarios (persona separation listed FIRST)
- Complete doc reference listing by category
- Dedicated "Critical: Persona Field Separation" section
- Red flag words guide
- 3 detailed usage scenarios
- Quality standards checklist

## 2. Expert Agent Sidecar File Support (NEW)

### Step 1: Smart Path Detection and Loading (+35 lines)
**Automatically detects and loads based on path type:**

```yaml
If path is .agent.yaml → Simple Agent (load single file)
If path is folder → Expert Agent:
  - Load .agent.yaml from inside folder
  - Load ALL sidecar files (*.md, *.txt, *.csv, *.json, *.yaml)
  - Create inventory for reference
  - Present: "Loaded agent.yaml + 5 sidecar files: [list]"
```

**Sidecar analysis:**
- Maps which menu items reference which sidecar files (tmpl="path", data="path")
- Checks if all sidecar references actually exist
- Identifies unused/orphaned sidecar files
- Assesses sidecar organization

**Warm expert agent feedback:**
"This is beautifully organized as an Expert agent! The sidecar files include 3 journal templates (daily, weekly, breakthrough) and a mood-patterns knowledge file. Your menu items reference them nicely. I do notice 'old-template.md' isn't referenced anywhere - we could clean that up."

### Step 3: Sidecar Editing Patterns (+47 lines)
**5 complete sidecar editing scenarios:**

1. **Updating templates** - Edit content, verify references work, test variables
2. **Adding new sidecar files** - Create file + add menu item with reference
3. **Removing unused sidecar files** - Confirm unused, ask to delete, clean references
4. **Reorganizing sidecar structure** - Move files, update ALL YAML references
5. **Updating knowledge base files** - Edit .csv/.json/.yaml data directly

**Critical mindset:** "Sidecar files are as much a part of the agent as the YAML!"

### Step 4: Sidecar Validation (+16 lines)
**Conversational validation:**
- "Your menu item 'daily-journal' references 'templates/daily.md'... checking... ✓ exists!"
- Check for orphaned files not referenced anywhere
- Verify sidecar file formats (YAML parses, CSV has headers, markdown well-formed)
- Success message: "✓ All sidecar file references valid - 5 sidecar files, all referenced correctly!"

### README Updates
- "What You'll Need" distinguishes Simple vs Expert paths
- Scenario 2b: Complete Expert agent editing example (journal-keeper template update)
- Updated common scenarios list

## 3. Unified Validation Checklist (Single Source of Truth)

### Problem Solved
- create-agent had outdated checklist (62 lines, no persona field separation)
- edit-agent had enhanced checklist (112 lines, with our improvements)
- Risk of drift and inconsistency between workflows

### Solution: agent-validation-checklist.md (160 lines)
**Canonical location:** `/src/modules/bmb/workflows/create-agent/`

**Comprehensive coverage combining best of both:**
- YAML structure validation
- **Persona field separation** (field separation check, purity check, quality benchmarking)
- Menu validation (including sidecar file path validation)
- Type-specific validation (Simple/Expert/Module)
- Compilation validation
- Common issues and fixes section

**Key sections:**
- Persona Validation (CRITICAL - #1 Quality Issue)
  * Field Separation Check (what belongs where)
  * Communication Style Purity Check (red flag word detection)
  * Quality Benchmarking (compare to presets and references)
- Expert Agent validation (9 sidecar-specific checks)
- Module Agent validation (design intent verification)
- Common Issues and Fixes (real examples with solutions)

### References Updated
**create-agent/workflow.yaml:**
```yaml
validation: "{installed_path}/agent-validation-checklist.md"
```

**edit-agent/workflow.yaml:**
```yaml
# Shared validation checklist (canonical location in create-agent folder)
validation: "{project-root}/{bmad_folder}/bmb/workflows/create-agent/agent-validation-checklist.md"
```

**edit-agent/instructions.md:**
```xml
<note>The validation checklist is shared between create-agent and edit-agent workflows to ensure consistent quality standards.</note>
```

### Files Changed
-  Created: agent-validation-checklist.md (160 lines)
-  Deleted: create-agent/checklist.md (62 lines)
-  Deleted: edit-agent/checklist.md (112 lines)
- Updated: Both workflow.yaml files to reference unified checklist

## Statistics

**Overall changes:** 6 files changed, +553 insertions, -264 deletions

**edit-agent enhancements:**
- instructions.md: +396 lines (comprehensive guidance)
- README.md: +213 lines (complete documentation)
- workflow.yaml: +32 lines (proper doc references)

**Validation unification:**
- Net result: Better quality, less duplication, easier maintenance
- Single source of truth for all agent validation

## Impact

### For Users Editing Agents
- Automatically detects and handles Expert agents with sidecar files
- Clear guidance on fixing #1 issue (persona field separation)
- 7-step prescriptive pattern for communication style refinement
- Warm, educational feedback throughout
- Validates against same standards as create-agent

### For Agent Quality
- Both create and edit workflows use same validation standards
- Persona field separation gets proper attention
- Expert agent sidecar files treated as first-class citizens
- Legacy agents can be migrated to modern standards
- All agents validated against reference implementations

### For Maintenance
- ONE checklist to maintain instead of two
- Consistent quality standards across workflows
- Documentation properly linked to new comprehensive guides
- No risk of checklist drift

This brings edit-agent to the same quality level as create-agent while adding critical Expert agent support and establishing single source of truth for validation.
2025-11-18 21:55:47 -06:00
Brian Madison 054b031c1d feat: Complete BMAD agent creation system with install tooling, references, and field guidance
## Overview
This commit represents a complete overhaul of the BMAD agent creation system, establishing clear standards for agent development, installation workflows, and persona design. The changes span documentation, tooling, reference implementations, and field-specific guidance.

## Key Components

### 1. Agent Installation Infrastructure
**New CLI Command: `agent-install`**
- Interactive agent installation with persona customization
- Supports Simple (single YAML), Expert (sidecar files), and Module agents
- Template variable processing with Handlebars-style syntax
- Automatic compilation from YAML to XML (.md) format
- Manifest tracking and IDE integration (Claude Code, Cursor, Windsurf, etc.)
- Source preservation in `_cfg/custom/agents/` for reinstallation

**Files Created:**
- `tools/cli/commands/agent-install.js` - Main CLI command
- `tools/cli/lib/agent/compiler.js` - YAML to XML compilation engine
- `tools/cli/lib/agent/installer.js` - Installation orchestration
- `tools/cli/lib/agent/template-engine.js` - Handlebars template processing

**Compiler Features:**
- Auto-injects frontmatter, activation, handlers, help/exit menu items
- Smart handler inclusion (only includes action/workflow/exec/tmpl handlers actually used)
- Proper XML escaping and formatting
- Persona name customization (e.g., "Fred the Commit Poet")

### 2. Documentation Overhaul
**Deleted Bloated/Outdated Docs (2,651 lines removed):**
- Old verbose architecture docs
- Redundant pattern files
- Outdated workflow guides

**Created Focused, Type-Specific Docs:**
- `src/modules/bmb/docs/understanding-agent-types.md` - Architecture vs capability distinction
- `src/modules/bmb/docs/simple-agent-architecture.md` - Self-contained agents
- `src/modules/bmb/docs/expert-agent-architecture.md` - Agents with sidecar files
- `src/modules/bmb/docs/module-agent-architecture.md` - Workflow-integrated agents
- `src/modules/bmb/docs/agent-compilation.md` - YAML → XML process
- `src/modules/bmb/docs/agent-menu-patterns.md` - Menu design patterns
- `src/modules/bmb/docs/index.md` - Documentation hub

**Net Result:** ~1,930 line reduction while adding MORE value through focused content

### 3. Create-Agent Workflow Enhancements
**Critical Persona Field Guidance Added to Step 4:**
Explains how the LLM interprets each persona field when the agent activates:

- **role** → "What knowledge, skills, and capabilities do I possess?"
- **identity** → "What background, experience, and context shape my responses?"
- **communication_style** → "What verbal patterns, word choice, quirks, and phrasing do I use?"
- **principles** → "What beliefs and operating philosophy drive my choices?"

**Key Insight:** `communication_style` should ONLY describe HOW the agent talks, not restate role/identity/principles. The `communication-presets.csv` provides 60 pure communication styles with NO role/identity/principles mixed in.

**Files Updated:**
- `src/modules/bmb/workflows/create-agent/instructions.md` - Added persona field interpretation guide
- `src/modules/bmb/workflows/create-agent/brainstorm-context.md` - Refined to 137 lines
- `src/modules/bmb/workflows/create-agent/communication-presets.csv` - 60 styles across 13 categories

### 4. Reference Agent Cleanup
**Removed install_config Personality Bloat:**
Understanding: Future installer will handle personality customization, so stripped all personality toggles from reference agents.

**commit-poet.agent.yaml** (Simple Agent):
- BEFORE: 36 personality combinations (3 enthusiasm × 3 depths × 4 styles) = decision fatigue
- AFTER: Single concise persona with pure communication style
- Changed from verbose conditionals to: "Poetic drama and flair with every turn of a phrase. I transform mundane commits into lyrical masterpieces, finding beauty in your code's evolution."
- Reduction: 248 lines → 153 lines (38% reduction)

**journal-keeper.agent.yaml** (Expert Agent):
- Stripped install_config, simplified communication_style
- Shows proper Expert agent structure with sidecar files

**security-engineer.agent.yaml & trend-analyst.agent.yaml** (Module Agents):
- Added header comments explaining WHY Module Agent (design intent, not just location)
- Clarified: Module agents are designed FOR ecosystem integration, not capability-limited

**Files Updated:**
- `src/modules/bmb/reference/agents/simple-examples/commit-poet.agent.yaml`
- `src/modules/bmb/reference/agents/expert-examples/journal-keeper/journal-keeper.agent.yaml`
- `src/modules/bmb/reference/agents/module-examples/security-engineer.agent.yaml`
- `src/modules/bmb/reference/agents/module-examples/trend-analyst.agent.yaml`

### 5. BMM Agent Voice Enhancement
**Gave all 9 BMM agents distinct, memorable communication voices:**

**Mary (analyst)** - The favorite! Changed from generic "systematic and probing" to:
"Treats analysis like a treasure hunt - excited by every clue, thrilled when patterns emerge. Asks questions that spark 'aha!' moments while structuring insights with precision."

**Other Notable Voices:**
- **John (pm):** "Asks 'WHY?' relentlessly like a detective on a case. Direct and data-sharp, cuts through fluff to what actually matters."
- **Winston (architect):** "Speaks in calm, pragmatic tones, balancing 'what could be' with 'what should be.' Champions boring technology that actually works."
- **Amelia (dev):** "Ultra-succinct. Speaks in file paths and AC IDs - every statement citable. No fluff, all precision."
- **Bob (sm):** "Crisp and checklist-driven. Every word has a purpose, every requirement crystal clear. Zero tolerance for ambiguity."
- **Sally (ux-designer):** "Paints pictures with words, telling user stories that make you FEEL the problem. Empathetic advocate with creative storytelling flair."

**Pattern Applied:** Moved behaviors from communication_style to principles, keeping communication_style as PURE verbal patterns.

**Files Updated:**
- `src/modules/bmm/agents/analyst.agent.yaml`
- `src/modules/bmm/agents/pm.agent.yaml`
- `src/modules/bmm/agents/architect.agent.yaml`
- `src/modules/bmm/agents/dev.agent.yaml`
- `src/modules/bmm/agents/sm.agent.yaml`
- `src/modules/bmm/agents/tea.agent.yaml`
- `src/modules/bmm/agents/tech-writer.agent.yaml`
- `src/modules/bmm/agents/ux-designer.agent.yaml`
- `src/modules/bmm/agents/frame-expert.agent.yaml`

### 6. Linting Fixes
**ESLint Compliance:**
- Replaced all `'utf-8'` with `'utf8'` (unicorn/text-encoding-identifier-case)
- Changed `variables.hasOwnProperty(varName)` to `Object.hasOwn(variables, varName)` (unicorn/prefer-object-has-own)
- Replaced `JSON.parse(JSON.stringify(...))` with `structuredClone(...)` (unicorn/prefer-structured-clone)
- Fixed empty YAML mapping values in sample files

**Files Fixed:**
- 7 JavaScript files across agent tooling (compiler, installer, commands, IDE integration)
- 1 YAML sample file

## Architecture Decisions

### Agent Types Are About Architecture, Not Capability
- **Simple:** Self-contained in single YAML (NOT limited in capability)
- **Expert:** Includes sidecar files (templates, docs, etc.)
- **Module:** Designed for BMAD ecosystem integration (workflows, cross-agent coordination)

### Persona Field Separation Critical for LLM Interpretation
The LLM needs distinct fields to understand its role:
- Mixing role/identity/principles into communication_style confuses the persona
- Pure communication styles (from communication-presets.csv) have ZERO role/identity/principles content
- Example DON'T: "Experienced analyst who uses systematic approaches..." (mixing identity + style)
- Example DO: "Systematic and probing. Structures findings hierarchically." (pure style)

### Install-Time vs Runtime Configuration
- Template variables ({{var}}) resolve at compile-time
- Runtime variables ({user_name}, {bmad_folder}) resolve when agent activates
- Future installer will handle personality customization, so agents should ship with single default persona

## Testing
- All linting passes (ESLint with max-warnings=0)
- Agent compilation tested with commit-poet, journal-keeper examples
- Install workflow validated with Simple and Expert agent types
- Manifest tracking and IDE integration verified

## Impact
This establishes BMAD as having a complete, production-ready agent creation and installation system with:
- Clear documentation for all agent types
- Automated compilation and installation
- Strong persona design guidance
- Reference implementations showing best practices
- Distinct, memorable agent voices throughout BMM module

Co-Authored-By: BMad Builder <builder@bmad.dev>
Co-Authored-By: Mary the Analyst <analyst@bmad.dev>
Co-Authored-By: Paige the Tech Writer <tech-writer@bmad.dev>
2025-11-18 21:55:47 -06:00
Alex Verkhovsky 7b7f984cd2
feat: Add Google Antigravity IDE installer (#938)
Implements installer for Google Antigravity IDE with flattened slash command
naming to match Antigravity's namespace requirements.

Key features:
- Flattened file naming (bmad-module-agents-name.md) for proper slash commands
- Subagent installation support (project-level or user-level)
- Module-specific injection configuration
- Agent, workflow, task, and tool command generation

Implementation:
- Added AntigravitySetup class extending BaseIdeSetup
- Extracted flattenFilename() to BaseIdeSetup for reuse across IDE handlers
- Uses .agent/workflows directory structure
- Supports both interactive and non-interactive configuration

Fixes:
- Proper namespace isolation: /bmad-module-agents-dev instead of /dev
- Prevents conflicts between modules with same agent names

Note: This installer shares 95% of its code with claude-code.js.
Future refactoring could extract common patterns to IdeWithSlashCommandsSetup
base class (see design documents for details).
2025-11-18 20:09:06 -06:00
Alex Verkhovsky 073597a8ff
feat: Add project-specific installation option for Codex CLI (#937)
Add support for choosing between global and project-specific installation
locations for Codex CLI prompts with CODEX_HOME configuration instructions.

Changes:
- Add collectConfiguration() to prompt for installation location (default: global)
- Support global (~/.codex/prompts) and project-specific (<project>/.codex/prompts)
- Display OS-specific CODEX_HOME setup instructions before user confirms
- Update detect() and cleanup() to handle both installation locations

Installation options:
- Global: Simple, works immediately, but prompts reference specific .bmad path
- Project-specific: Requires CODEX_HOME, better for multi-project workflows
  - Unix/Mac: alias codex='CODEX_HOME="$PWD/.codex" codex'
  - Windows: codex.cmd wrapper with %~dp0
2025-11-18 18:48:32 -06:00
Brian Madison 0ca164de34 chore: release v6.0.0-alpha.10
Major milestone: Epics & Stories now generated AFTER Architecture
- New Frame Expert agent with Excalidraw workflows
- Time estimate prohibition across all workflows
- Platform-specific command filtering (ide-only/web-only)
- Agent customization enhancement (prompts & memories)
- Workflow configuration standardization
2025-11-16 00:52:51 -06:00
fxomo f38905628a
Fix: Add prompts and memories merging from customize.yaml (#889)
- Add merging logic for customizeYaml.prompts and customizeYaml.memories in loadAndMergeAgent()
- Implement buildMemoriesXml() method to output memories XML section
- Update buildPromptsXml() to use <content> wrapper instead of CDATA for better compatibility
- Integrate memories output into convertToXml() between persona and prompts sections

Changes:
1. Line 123-131: Added prompts and memories append logic in loadAndMergeAgent()
2. Line 215-218: Added memories XML output in convertToXml()
3. Line 286-301: New buildMemoriesXml() method
4. Line 312-315: Updated prompts to use <content> wrapper for consistency

This allows users to customize agents via bmad/_cfg/agents/*.customize.yaml with:
- prompts: Array of {id, content} objects for action handlers
- memories: Array of strings for persistent agent memories
2025-11-16 00:36:32 -06:00
Brian Madison 6f7e9f0653 refactor: Major v6 epic creation improvements and documentation overhaul
## Key Changes

### 1. Epic Creation Workflow Enhancements
- Added user-value focused epic structure principles (NO technical layer breakdown)
- Implemented multi-mode detection: CONTINUE, REPLACE, or UPDATE existing epics
- Added comprehensive anti-pattern examples showing wrong vs right epic breakdown
- Epics now created AFTER architecture for technically-informed story breakdown
- Added checkpoint protocol for interactive workflow progression

### 2. Removed Deprecated Solutioning Gate Check
- Deleted entire solutioning-gate-check workflow (682 lines)
- Replaced by new implementation-readiness workflow
- Cleaner separation of concerns in solutioning phase

### 3. PRD Template Simplification
- Removed hardcoded "Implementation Planning", "References", and "Next Steps" sections
- PRD now focuses purely on requirements, not workflow orchestration
- Epics/stories created as separate step after architecture

### 4. Documentation Overhaul (15+ docs updated)
- Updated quick-start guide with v6 workflow sequence
- Clarified that epics are created AFTER architecture, not during PRD
- Updated solutioning docs to reflect implementation-readiness pattern
- Improved agents-guide, brownfield-guide, enterprise docs
- Enhanced glossary, FAQ, and workflow reference documentation

### 5. Workflow Path Adjustments
- All 4 paths updated (enterprise/method × brownfield/greenfield)
- Version bumps across BMGD, BMM, and CIS workflow YAMLs
- Minor instruction file updates for consistency

### Files Changed
- 65 files total: 468 insertions, 978 deletions (net reduction of 510 lines)
- 4 files deleted (entire solutioning-gate-check workflow)
- 1 new directory added (implementation-readiness placeholder)
2025-11-16 00:23:47 -06:00
Brian Madison 5980e41a28 feat: Add ide-only and web-only menu item filtering for platform-specific commands
## Summary
- Add ide-only and web-only boolean fields to agent menu schema
- Filter menu items based on build target (web bundle vs local IDE)
- Update BMM agent definitions with platform restrictions and improved descriptions
- Update frame-expert agent icon to 📐 and add webskip flag

## Changes

### Schema & Bundler Updates
- tools/schema/agent.js: Add ide-only and web-only optional boolean fields
- tools/cli/lib/yaml-xml-builder.js: Filter ide-only items from web bundles
- tools/cli/lib/xml-handler.js: Pass forWebBundle flag through build chain

### Agent Updates
- frame-expert: Change icon to 📐, add webskip flag, improve principle formatting
- pm: Mark workflow-init and correct-course as ide-only, advanced-elicitation as web-only
- ux-designer: Rename trigger to create-ux-design, mark advanced-elicitation as web-only
- sm: Rename triggers for consistency (story-context → create-story-context)
- analyst: Add research workflow after brainstorm, mark advanced-elicitation as web-only
- architect: Remove document field from validate-architecture, add web-only flag
- dev: Update persona and critical actions for clarity
- tech-writer: Add party-mode workflow, mark advanced-elicitation as web-only
- tea: Mark advanced-elicitation as web-only
- All agents: Standardize party-mode description

This enables platform-specific functionality where some commands only make sense
in IDE environments (workflow-init) or web interfaces (advanced-elicitation).
2025-11-15 19:39:53 -06:00
mrsaifullah52 05ccd1904c
Feature/frame expert agent #890 (#905)
* feat: add frame-expert agent definition

- Add frame-expert.agent.yaml with persona and workflow menu
- Agent specializes in Excalidraw visual representations
- Supports flowcharts, diagrams, dataflows, and wireframes

Closes #890

* feat: add frame-expert workflows and shared resources

- Add 4 workflows: create-flowchart, create-diagram, create-dataflow, create-wireframe
- Include shared Excalidraw helpers, library, templates, and validation
- Each workflow has instructions, checklist, and workflow.yaml

Related to #890

* feat: register frame-expert workflows in manifest

- Add create-flowchart workflow entry
- Add create-diagram workflow entry
- Add create-dataflow workflow entry
- Add create-wireframe workflow entry

Related to #890

* feat: integrate frame-expert into team configurations

- Add frame-expert to default-party.csv with full agent details
- Add frame-expert to team-fullstack.yaml agent list
- Frame-expert now available in fullstack team workflows

Related to #890
2025-11-15 09:39:46 -06:00
Brian Madison f14014f0c7 refactor: Major workflow enhancements - time estimates prohibition, progressive epic creation, and workflow simplification
## Key Changes

### 1. Time Estimate Prohibition (All Modules)
- Added critical warnings against providing ANY time estimates (hours/days/weeks/months)
- Acknowledges AI has fundamentally changed development speed
- Applied to 33 workflow instruction files across BMB, BMGD, BMM, and CIS modules
- Updated workflow creation guide with prohibition guidelines

### 2. Enhanced Epic Creation Workflow
- Added intelligent UPDATE vs CREATE mode detection
- Detects available context (UX, Architecture, Domain brief, Product brief)
- Progressive enhancement: creates basic epics, then enriches with UX/Architecture
- Living document approach with continuous updates
- Added 305 lines of sophisticated workflow logic

### 3. Workflow Status Initialization Refactoring
- Simplified from 893 to 318 lines (65% reduction)
- Streamlined state detection: CLEAN, PLANNING, ACTIVE, LEGACY, UNCLEAR
- Cleaner path selection and initialization logic
- Removed redundant complexity while maintaining functionality

### 4. Workflow Path Updates
- Updated all 4 workflow paths (enterprise/method × brownfield/greenfield)
- Added multiple optional epic creation steps at different phases:
  - After PRD (basic structure)
  - After UX Design (with interaction context)
  - After Architecture (final with full context)
- Changed PRD output description from "with epics and stories" to "with FRs and NFRs"

### 5. Architecture & Innovation Updates
- Made epics input optional in architecture workflow (falls back to PRD FRs)
- Updated innovation strategy phases to remove time-based language
- Phases now: Immediate Impact → Foundation Building → Scale & Optimization

### Files Changed
- 33 instruction files updated with time estimate prohibition
- 2 workflow.yaml files updated (create-epics-and-stories, architecture)
- 4 workflow path YAML files updated
- 1 workflow creation guide enhanced

This refactor significantly improves workflow intelligence, removes harmful time-based planning assumptions, and creates more adaptive, context-aware workflows that better leverage AI capabilities.
2025-11-14 23:54:29 -06:00
Brian Madison 3223975fd0 Summary of changes:
- Removed 32 recommended_inputs: sections
  - Added description: fields to all input_file_patterns (25 workflows)
  - Added missing load_strategy fields (5 workflows)
  - Fixed BMB workflows with proper reference doc variables
  - Updated BMB instructions to use new variables
2025-11-14 20:43:15 -06:00
Brian Madison 3f283066b1 removed items from source that should not be included 2025-11-14 11:29:57 -06:00
Brian Madison 70a642318d prd updated to properly use the project-types csv 2025-11-14 08:06:19 -06:00
Brian Madison e6b4f3f051 update doc 2025-11-14 07:10:01 -06:00
Brian Madison 7208610db8 web bundler fixes 2025-11-13 22:10:49 -06:00
Brian Madison aa4c7e4446 web bundle links updated in docs 2025-11-13 20:17:20 -06:00
Brian Madison face4e4367 resolved blocking issues when folder name is changed during install 2025-11-13 20:17:20 -06:00
Daniel Dabrowski 4aed5a1193
fix: update file paths in agent and workflow configurations to use {bmad_folder} variable (#917) 2025-11-13 19:44:12 -06:00
Anton Lvovych 94d01961f3
fix(shard-doc): use proper command for markdown-tree-parser (#911) 2025-11-13 18:23:54 -06:00
Brian Madison 1a52a19978 chore: bump version to 6.0.0-alpha.9 2025-11-12 22:59:52 -06:00
Brian Madison 6d14147c26 docs: add comprehensive changelog for v6.0.0-alpha.9 release
- Document workflow engine revolution with intelligent file discovery protocol
- Highlight track-based project system replacing Level 0-4 terminology
- Detail unified folder structure and ephemeral folder removal
- Include migration notes for users upgrading from alpha.8
- Emphasize sprint-artifacts location changes and backward compatibility
2025-11-12 22:59:07 -06:00
Brian Madison 15a94a94b6 accept a story status of review or ready-for-review, treat them the same. 2025-11-12 22:46:48 -06:00
Brian Madison b63bf9d067 installer update to quick install and agent rebuild 2025-11-12 22:40:45 -06:00
Brian Madison 8f57effda4 clean up of hardcoded stale configurable paths 2025-11-12 20:46:47 -06:00
Brian Madison 1868477238 refactor(config): replace hardcoded .bmad paths with {bmad_folder} placeholder
Remove hardcoded .bmad folder references throughout documentation and source files, replacing them with the configurable {bmad_folder} placeholder. This change enables users to customize the BMAD installation folder name via configuration, improving flexibility and reducing coupling to a specific directory structure.

Changes include:
- Update all documentation to reference {bmad_folder} instead of .bmad
- Remove legacy configuration files from .bmad and .claude directories
- Update workflow.xml and CLI documentation with new placeholder syntax
2025-11-12 20:22:47 -06:00
Brian Madison 48cf5c8056 feat(workflows): Implement intelligent file discovery protocol and Phase 4 BMGD workflows
## Core Workflow Engine Enhancements

### discover_inputs Protocol (MAJOR)
- Added reusable `discover_inputs` protocol to workflow.xml for intelligent file loading
- Supports three loading strategies:
  - FULL_LOAD: Load all shards for PRD, Architecture, UX (changed pattern from /index.md to /*/*.md)
  - SELECTIVE_LOAD: Load specific shard via template variable (e.g., epic-{{epic_num}}.md)
  - INDEX_GUIDED: Load index, analyze TOC, intelligently load relevant docs (with "DO NOT BE LAZY" mandate)
- Auto-discovers whole vs sharded documents with proper fallback
- Provides transparent reporting of loaded content with file counts
- Invoked via <invoke-protocol name="discover_inputs" /> tag in workflow instructions

### Advanced Elicitation Improvements
- Renamed adv-elicit.xml to advanced-elicitation.xml for clarity
- Updated all references across agents and commands

### Shard Document Tool Enhancement
- Added Step 6: Handle Original Document with three options:
  - [d] Delete - Remove original (recommended, prevents confusion)
  - [m] Move to archive - Backup original to archive folder
  - [k] Keep - Warning about defeating sharding purpose
- Prevents issue where both whole and sharded versions exist, confusing discover_inputs protocol

## BMM Module - Input File Pattern Standardization

### Phase 1 - Analysis (1 workflow)
- product-brief: Added load_strategy (FULL_LOAD for research/brainstorming, INDEX_GUIDED for document_project)
- Updated instructions.md to use invoke-protocol, replaced manual fuzzy matching

### Phase 2 - Planning (4 workflows)
- prd: Added load_strategy, updated instructions to reference {product_brief_content}, {research_content}
- create-ux-design: Added load_strategy, removed fuzzy matching from instructions
- tech-spec: Added load_strategy for brownfield context discovery
- All epics patterns updated to support SELECTIVE_LOAD for specific epic shards

### Phase 3 - Solutioning (2 workflows)
- architecture: Added load_strategy, updated instructions to use pre-loaded {prd_content}, {epics_content}, {ux_design_content}
- solutioning-gate-check: Added load_strategy, replaced manual discovery with protocol invocation

### Phase 4 - Implementation (8 workflows)
- code-review: Added load_strategy, fixed sharded patterns to /*/*.md, added step 1.5 for protocol
- correct-course: Added complete input_file_patterns section (was missing), added step 0.5
- create-story: Added load_strategy, updated to SELECTIVE_LOAD for epics, added step 1.5
- dev-story: Added complete input_file_patterns section (was missing), added step 0.5
- epic-tech-context: Added load_strategy, updated PRD extraction to use {prd_content}, added step 1.5
- retrospective: Added load_strategy for architecture/prd (FULL_LOAD), epics (SELECTIVE_LOAD), added step 0.5
- sprint-planning: Fixed sharded pattern to load ALL epics (/*/*.md), added step 0.5
- story-context: Added load_strategy, updated doc collection to reference pre-loaded content, added step 1.5

### Sprint Artifacts Path Corrections
- story-done: Added missing sprint_artifacts variable, fixed sprint_status path from {context_dir} to {sprint_artifacts}
- story-ready: Added missing sprint_artifacts variable
- story-context: Fixed undefined {context_dir} -> {sprint_artifacts}
- correct-course: Added sprint_artifacts and sprint_status variables

## BMGD Module - Phase 4 Production Workflows (NEW)

Added complete Phase 4 implementation workflows for game development:
- code-review: Senior developer review for completed game features
- correct-course: Sprint change management for game projects
- create-story: Story generation for game mechanics/features
- dev-story: Feature implementation workflow
- epic-tech-context: Technical spec generation per game epic
- retrospective: Epic completion review and lessons learned
- sprint-planning: Game development sprint status tracking
- story-context: Dynamic context assembly for game stories
- story-done: Story completion workflow
- story-ready: Story readiness workflow

All BMGD workflows follow BMM patterns with game-specific adaptations.

## Agent Updates

### BMM Agents
- Updated all 7 BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer)
- Standardized web bundle configurations

### BMGD Agents
- Updated 4 game development agents (game-architect, game-designer, game-dev, game-scrum-master)
- Aligned with BMM agent structure

### CIS Agents
- Updated 5 creative intelligence agents for consistency

## Documentation & Configuration

- Updated CHANGELOG.md with Phase 4 workflow additions
- Updated files-manifest.csv and task-manifest.csv
- Updated .claude commands for all agents
- Fixed formatting issues from previous commits

## Breaking Changes

NONE - All changes are backward compatible. Workflows without input_file_patterns continue to work.
Workflows with input_file_patterns now benefit from intelligent auto-loading.

## Migration Notes

Existing workflows can gradually adopt discover_inputs protocol by:
1. Adding load_strategy to existing input_file_patterns in workflow.yaml
2. Adding <invoke-protocol name="discover_inputs" /> step in instructions.md
3. Replacing manual file loading with references to {pattern_name_content} variables
2025-11-12 19:18:38 -06:00
Brian Madison 8f7d259c81 remaining bad character removal 2025-11-11 20:10:33 -06:00
Brian Madison 74f54a088a removed some bad formatting that was injected previously 2025-11-11 17:30:43 -06:00
Brian Madison 4d745532aa refactor(tech-spec): unify story generation and adopt intent-based approach
Major refactoring of tech-spec workflow for quick-flow projects:

## Unified Story Generation
- Consolidated instructions-level0-story.md and instructions-level1-stories.md into single instructions-generate-stories.md
- Always generates epic + stories (minimal epic for 1 story, detailed for multiple)
- Consistent naming: story-{epic-slug}-N.md for all stories (1-5)
- Eliminated branching logic and duplicate code

## Intent-Based Intelligence
- Removed 150+ lines of hardcoded stack detection examples (Node.js, Python, Ruby, Java, Go, Rust, PHP)
- Replaced prescriptive instructions with intelligent guidance that trusts LLM capabilities
- PHASE 2 stack detection now adapts to ANY project type automatically
- Step 2 discovery changed from scripted Q&A to adaptive conversation goals

## Terminology Updates
- Replaced "Level 0" and "Level 1" with "quick-flow" terminology throughout
- Updated to "single story" vs "multiple stories (2-5)" language
- Consistent modern terminology across all files

## Variable and Structure Improvements
- Fixed variable references: now uses {instructions_generate_stories} instead of hardcoded paths
- Updated workflow.yaml with cleaner variable structure
- Removed unused variables (project_level, development_context)
- Added story_count and epic_slug runtime variables

## Files Changed
- Deleted: instructions-level0-story.md (7,259 bytes)
- Deleted: instructions-level1-stories.md (16,274 bytes)
- Created: instructions-generate-stories.md (13,109 bytes)
- Updated: instructions.md (reduced from 35,028 to 32,006 bytes)
- Updated: workflow.yaml, checklist.md

## Impact
- 50% fewer workflow files (3 → 1 for story generation)
- More adaptable to any tech stack
- Clearer, more maintainable code
- Better developer and user experience
- Trusts modern LLM intelligence instead of constraining with examples
2025-11-11 17:30:43 -06:00
Brian Madison 2d99833b9e feat: Add documentation guides, simplify folder structure, and major workflow refactoring
Created two comprehensive guides for v6 features:

**docs/agent-customization-guide.md**
- Complete guide for customizing agent names, personas, memories, and behaviors
- Update-safe customization via bmad/_cfg/agents/ configuration files
- Real-world examples (TDD setup, multilingual agents, custom workflows)
- Troubleshooting and best practices

**docs/web-bundles-gemini-gpt-guide.md**
- Comprehensive guide for using BMad agents in Gemini Gems and Custom GPTs
- Critical setup rules with exact configuration text required
- Cost-saving strategy: web planning → local implementation (60-80% savings)
- Platform comparison (Gemini Gems strongly recommended over Custom GPTs)
- Complete workflow examples showing full planning-to-implementation cycle
- Team bundle guidance (Gemini 2.5 Pro+ only)

**README.md updates**
- Added prominent links in v6 Core Enhancements section
- Created new "Customization & Sharing" documentation category
- Web Bundles feature highlighted with direct guide link

**Unified output folder structure across all modules:**

**Before (confusing):**
- output_folder: Main docs
- game_design_docs: Separate design folder
- tech_docs: Separate technical folder
- dev_ephemeral_location: Separate ephemeral folder outside docs

**After (simplified):**
- output_folder: Single location for ALL AI-generated artifacts (default: "docs")
  - Clearer prompt: "Where should AI Generated Artifacts be saved?"
- sprint_artifacts: Phase 4 ephemeral content now WITHIN output_folder
  - BMM: {output_folder}/stories (stories, context, reports)
  - BMGD: {output_folder}/sprint-artifacts
  - No longer in separate {bmad_folder}-ephemeral location

**Benefits:**
- One clear location for all planning artifacts (PRD, Architecture, UX, etc.)
- Phase 4 ephemeral items logically grouped within output folder
- Eliminated confusing separate folder proliferation
- sprint_artifacts now configurable per module

**Files changed:**
- src/core/_module-installer/install-config.yaml
- src/modules/bmm/_module-installer/install-config.yaml
- src/modules/bmgd/_module-installer/install-config.yaml

**Also cleaned up BMGD config:**
- Renamed: specified_framework → primary_platform (clearer naming)
- Removed: unused data_path variable

Replaced old "project_level" (0-4) system with new "selected_track" terminology:
- **quick-flow**: Bug fixes and small features (replaces Level 0-1)
- **bmad-method**: Full planning track (replaces Level 2-3)
- **enterprise-bmad-method**: Extended planning (replaces Level 4)

**Core workflow updates:**
- solutioning-gate-check: Complete rewrite of validation logic for track-based artifacts
- architecture: Updated context detection, error handling, and messaging for tracks
- workflow-init: Updated artifact detection patterns for track-based paths
- All workflow status paths updated (method-greenfield, method-brownfield, enterprise-*)

Unified variable naming conventions across all workflows:
- {output_folder} → {output-folder} (hyphenated format)
- {dev_ephemeral_location} → {sprint_artifacts} (clearer purpose)
- Hardcoded status file paths → {workflow_status_file} variable

Fixed corrupted variable patterns throughout workflow files:
- {output*folder} → {output-folder}
- {ephemeral*location} → {sprint_artifacts}
- \_prd* → *prd* (escaped underscore artifacts)
- **\*\***\_\_\_**\*\*** → proper field placeholders

Affected patterns included malformed glob patterns, template variables, and markdown formatting artifacts from previous edits.

**Architecture workflow (create-architecture):**
- Fixed: "Decision Architecture" → "Create Architecture" (consistent naming)
- Improved PRD not found handling with exit/continue options
- Better user guidance when running standalone vs. within workflow path
- Removed hardcoded Level checks, now track-aware
- Enhanced validation checklist formatting (□ → - [])
- Typo fixes: "mulitple" → "multiple"

**Solutioning gate check:**
- Complete validation logic rewrite for track-based system
- Removed Level-specific artifact expectations
- Simplified document discovery (track determines what exists)
- Better analysis prompts and user feedback

**Workflow-init:**
- Updated artifact detection patterns for new folder structure
- Fixed corrupt glob patterns throughout
- Better sprint_artifacts location detection
- Improved workflow path assignment logic

**Various workflows:**
- Consistent variable naming across 40+ workflow files
- Improved error messages and user guidance
- Better markdown formatting (checkboxes, lists)
- Removed redundant validation criteria files (now inline)

Removed duplicate BMGD 4-production workflows (12 workflows):
- code-review, correct-course, create-story, dev-story
- epic-tech-context, retrospective, sprint-planning
- story-context, story-done, story-ready

**Why:** BMGD now uses shared BMM Phase 4 implementation workflows
**Benefit:** Single source of truth, no duplication to maintain

Also removed:
- validation-criteria.yaml (validation now inline in instructions)
- architecture-patterns.yaml references (patterns now managed differently)
- AUDIT-REPORT.md files (stale audit artifacts)

**BMB workflows:**
- Updated checklists for workflow and module creation
- Improved agent architecture documentation
- Minor instruction clarifications

**Core brainstorming workflow:**
- Updated README with usage examples
- Enhanced instructions and template clarity
- Better integration with other modules

**BMM installer:**
- Updated for track-based system
- sprint_artifacts configuration

**Tech Writer agent:**
- Minor configuration update for documentation workflows

Removed 200+ files that should not be in repository:
- Installed agent markdown files (analyst, architect, dev, pm, sm, tea, etc.)
- Complete workflow instruction copies
- Documentation duplicates (quick-start, agents-guide, workflows-*)
- Test architecture knowledge base (22 files, 14,000+ lines)
- Configuration files (config.yaml, team definitions)

These are generated during installation and should not be version controlled.

Removed 21 pre-generated XML bundles:
- BMM agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer)
- BMGD agents (game-architect, game-designer, game-dev, game-scrum-master)
- CIS agents (brainstorming-coach, creative-problem-solver, etc.)
- Team bundles (team-fullstack, team-gamedev, creative-squad)

**Why:** Users should generate fresh bundles via `npm run bundle` to get latest changes and customizations.

- **2 new documentation files** (comprehensive guides)
- **98 source files modified** (299 insertions, 6,567 deletions)
- **3 installer config files simplified** (major folder structure improvement)
- **200+ .bmad/ artifacts removed** (should not be in repo)
- **21 web-bundle files removed** (users regenerate as needed)
- **12 duplicate workflows removed** (BMGD consolidation)
- **40+ workflows updated** (track system, variable standardization, corruption fixes)
2025-11-11 17:30:43 -06:00
Murat K Ozcan 280652566c
chore: fixed directory browsing + zip Downloads (#902)
Co-authored-by: Murat Ozcan <murat@mac.lan>
2025-11-11 16:48:03 -06:00
Murat K Ozcan 2ae99135a2
chore: fix bundle urls (#901)
Co-authored-by: Murat Ozcan <murat@mac.lan>
2025-11-11 16:37:03 -06:00
Murat K Ozcan 449b5b3d29
chore: github pages for web bundle (#898)
* chore: github pages for web bundle

* docs: updated Bundle distribution setup

* chore: addressed PR comments

---------

Co-authored-by: Murat Ozcan <murat@mac.lan>
2025-11-11 13:35:30 -06:00
Murat K Ozcan 487d1582a0
feat: test design for architecture level (phase 3) (#897)
* feat: test design for architecture level (phase 3)

* addressed review comments

---------

Co-authored-by: Murat Ozcan <murat@Murats-MacBook-Pro.local>
Co-authored-by: Murat Ozcan <murat@mac.lan>
2025-11-11 10:03:00 -06:00
Brian Madison 03fbd2ae24 Release v6.0.0-alpha.8
## Installation Path Enhancements
- **Configurable Installation Directory**: Users can now specify custom installation directories during setup
- **New Default Location**: Changed default installation to `.bmad` (hidden directory) for cleaner project organization
- **Ephemeral File Handling**: Updated phase 4 implementation to use ephemeral file locations for better artifact organization

## CLI & Agent Loading Improvements
- **Optimized Agent Loading**: CLI commands now load from installed agent files, eliminating duplication
- **Installer UX Improvements**: Enhanced installer interface with version display
- **VS Code Integration**: Updated settings for new `.bmad` directory structure

## Web Bundle Enhancements
- **Party Mode Support**: All web bundles (single agent and team) now include party mode for multi-agent collaboration
- **Advanced Elicitation**: Integrated advanced elicitation capabilities into standalone agents
- **Expanded Agent Bundles**: New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)
- **Team Customization**: Added default-party.csv files to bmm, bmgd, and cis modules with customizable party configurations

## Phase 4 Workflow Updates (In Progress)
- **Artifact Separation**: Initiated separation of phase 4 implementation artifacts from documentation
- **Dedicated Artifact Path**: Phase 4 items (stories, code review, sprint plan, context files) moving to dedicated location outside docs folder
- **Updated Workflows**: Modified workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows
- **Configuration Support**: Added installer questions for artifact path selection

## IDE Integration
- **Gemini TOML**: Improved with clear loading instructions using @ commands
- **Centralized Templates**: Agent launcher markdown files now use centralized critical indication templates
- **GitHub Copilot**: Updated tool names to match official VS Code documentation (November 2025)

## Bug Fixes
- Fixed duplicate manifest entries by deduplicating module lists using Set
- Cleaned up legacy bmad/, bmd/, and web-bundles directories
- Various improvements to phase 4 workflow artifact handling

## Additional Changes
- New agent and action command header models for standardization
- Enhanced web-bundle-activation-steps fragment
- Updated web-bundler.js to support new structure
- Improved party mode instructions and workflow orchestration
2025-11-09 23:24:25 -06:00
Brian Madison 665e140638 more updates to use ephemeral file location for phase 4 items 2025-11-09 23:17:29 -06:00
Brian Madison f49a4731e7 agents now are not duplicated and isntead cli commmands load from installed agent files 2025-11-09 20:24:56 -06:00
Brian Madison 7eb52520fa Major Enhancements:
- Installation path is now fully configurable, allowing users to specify custom installation directories during setup
  - Default installation location changed to .bmad (hidden directory) for cleaner project root organization

    Web Bundle Improvements:

    - All web bundles (single agent and team) now include party mode support for multi-agent collaboration!
    - Advanced elicitation capabilities integrated into standalone agents
    - All bundles enhanced with party mode agent manifests
    - Added default-party.csv files to bmm, bmgd, and cis module teams
    - The default party file is what will be used with single agent bundles. teams can customize for different party configurations before web bundling through a setting in the team yaml file
    - New web bundle outputs for all agents (analyst, architect, dev, pm, sm, tea, tech-writer, ux-designer, game-*, creative-squad)

    Phase 4 Workflow Updates (In Progress):

    - Initiated shift to separate phase 4 implementation artifacts from documentation
        - Phase 4 implementation artifacts (stories, code review, sprint plan, context files) will move to dedicated location outside docs folder
        - Installer questions and configuration added for artifact path selection
        - Updated workflow.yaml files for code-review, sprint-planning, story-context, epic-tech-context, and retrospective workflows to support this, but still might require some udpates

    Additional Changes:

    - New agent and action command header models for standardization
    - Enhanced web-bundle-activation-steps fragment
    - Updated web-bundler.js to support new structure
    - VS Code settings updated for new .bmad directory
    - Party mode instructions and workflow enhanced for better orchestration

   IDE Installer Updates:

    - Show version number of installer in cli
    - improved Installer UX
    - Gemini TOML Improved to have clear loading instructions with @ commands
    - All tools agent launcher mds improved to use a central file template critical indication isntead of hardcoding in 2 different locations.
2025-11-09 17:39:05 -06:00
Brian Madison fd2521ec69 customize installation folder for the bmad content 2025-11-08 15:19:19 -06:00
Brian Madison 1728acfb0f The install directory is now configurable, with a few minute issues 2025-11-08 13:58:43 -06:00
Brian Madison a4bbfc4b6e fix: Prevent duplicate manifest entries and update GitHub Copilot tool names
- Deduplicate module lists in manifest generator using Set to prevent duplicate entries in installed manifests
- Update GitHub Copilot tool names to match official VS Code documentation (November 2025)
- Clean up legacy bmad/, bmd/, and web-bundles directories
2025-11-08 01:06:09 -06:00
Brian Madison 61955e8e96 release: bump to v6.0.0-alpha.7 2025-11-07 00:50:04 -06:00
Brian Madison 03d757292b fix: Add missing adv-elicit-methods.csv to workflow bundles
- Add adv-elicit-methods.csv dependency to all workflows using adv-elicit.xml
  - architecture workflow
  - prd workflow
  - tech-spec workflow
- Include BMM web bundles (8 agents + team-fullstack)
- Update v6 open items list

This fixes runtime failures when advanced elicitation is invoked in bundled
workflows by ensuring the 39 elicitation methods CSV is properly included.

Note: Web bundler still has optimizations and known issues to address in
upcoming commits.
2025-11-07 00:38:28 -06:00
Brian Madison 91302d9c7a claude and a few other ide tools installation fix to not add a readme file slash comand regression, and cleanup bmad folders in tools on install 2025-11-06 22:45:29 -06:00
Murat K Ozcan 1343859874
chore: CC PR review with GH token (#874)
* chore: CC PR review with GH token

* debug CC output

* turn off CC output

* turn off CC PR review

---------

Co-authored-by: Murat Ozcan <murat@mac.lan>
2025-11-06 13:05:36 -06:00
Brian Madison 8ed4a548ea web bundler improvements part 1 2025-11-05 23:54:04 -06:00
Brian Madison 80a04bfce3 fix: Remove menu items for workflows with web_bundle: false
Enhanced removeSkippedWorkflowCommands() to properly remove all menu item
formats that reference workflows with web_bundle: false:

1. <item> tags with workflow attribute
2. <item> tags with run-workflow attribute
3. <c> tags with run-workflow attribute (legacy)

This ensures that workflows not designed for web bundles (like workflow-status
which requires filesystem access) are completely excluded from web bundles,
including their menu items.

Verified:
- workflow-status menu item removed from SM agent
- workflow-status YAML not included in bundle dependencies
2025-11-05 21:33:59 -06:00
Brian Madison 9a37cbb7fc fix: Show positive message when no missing dependencies
Instead of displaying an empty "⚠ Missing Dependencies by Agent:" section
when all dependencies are resolved, now shows a positive message:
"✓ No missing dependencies"

This improves the user experience by providing clear feedback that workflow
vendoring successfully resolved all dependencies.
2025-11-05 21:10:18 -06:00
Brian Madison 281eac3373 feat: Add workflow vendoring to web bundler
The web bundler now performs workflow vendoring before bundling agents,
similar to the module installer. This ensures that workflows referenced
via workflow-install attributes are copied from their source locations
to their destination locations before the bundler attempts to resolve
and bundle them.

Changes:
- Added vendorCrossModuleWorkflows() method to WebBundler class
- Added updateWorkflowConfigSource() helper method
- Integrated vendoring into bundleAll(), bundleModule(), and bundleAgent()
- Workflows are vendored before agent discovery and bundling
- Config_source is updated in vendored workflows to reference target module

This fixes missing dependency warnings for BMGD agents that vendor
BMM workflows for Phase 4 (Production) workflows.
2025-11-05 21:05:08 -06:00
Brian Madison f84e18760f feat: Extract BMGD module and implement workflow vendoring
This commit extracts game development functionality from BMM into a standalone
BMGD (BMad Game Development) module and implements workflow vendoring to enable
module independence.

BMGD Module Creation:
- Moved agents: game-designer, game-dev, game-architect from BMM to BMGD
- Moved team config: team-gamedev
- Created new Game Dev Scrum Master agent using workflow vendoring pattern
- Reorganized workflows into industry-standard game dev phases:
  * Phase 1 (Preproduction): brainstorm-game, game-brief
  * Phase 2 (Design): gdd, narrative
  * Phase 3 (Technical): game-architecture
  * Phase 4 (Production): vendored from BMM workflows
- Updated all module metadata and config_source references

Workflow Vendoring Feature:
- Enables modules to copy workflows from other modules during installation
- Build-time process that updates config_source in vendored workflows
- New agent YAML attribute: workflow-install (build-time metadata)
- Final compiled agents use workflow-install value for workflow attribute
- Implementation in module manager: vendorCrossModuleWorkflows()
- Allows standalone module installation without forced dependencies

Technical Changes:
- tools/cli/lib/yaml-xml-builder.js: Use workflow-install for workflow attribute
- tools/cli/installers/lib/modules/manager.js: Add vendoring functions
- tools/schema/agent.js: Add workflow-install to menu item schema
- Updated 3 documentation files with workflow vendoring details

BMM Workflow Updates:
- workflow-status/init: Added game detection checkpoint
- workflow-status/paths/game-design.yaml: Redirect to BMGD module
- prd/instructions.md: Route game projects to BMGD
- research/instructions-market.md: Reference BMGD for game development

Documentation:
- Created comprehensive BMGD module README
- Added workflow vendoring documentation
- Updated BMB agent creation and module creation guides
2025-11-05 20:44:22 -06:00
Murat K Ozcan bc76d25be6
chore: added CC PR review (#871)
* chore: added CC PR review

* remove CLAUDE.md

---------

Co-authored-by: Murat Ozcan <murat@mac.lan>
2025-11-05 14:14:31 -06:00
Murat K Ozcan c20ead1acb
refactor: update TEA documentation to align with BMad 4-phase methodology (#870)
* refactor: update TEA documentation to align with BMad 4-phase methodology

* reafactor: address review comments

---------

Co-authored-by: Murat Ozcan <murat@mac.lan>
2025-11-05 13:37:51 -06:00
Brian Madison 6fa6ebab12 More document Updtes and diagram improvements 2025-11-05 07:52:08 -06:00
Brian Madison 412a7d1ed8 release: bump to v6.0.0-alpha.6
Bug Fixes:
- Fix manifestPath error in ide-config-manager causing installation failures
- Fix installer option display to show full labels instead of just values for single/multi-select
- Add conditional documentation installation - users can now opt out of installing docs

Improvements:
- Add install_user_docs configuration option (defaults to true)
- Improve config question display with descriptive labels for better UX
- Update CONTRIBUTING.md to remove references to non-existent 'next' branch

Maintenance:
- Closed 54 legacy v4 issues (older than 1 month) to maintain clean issue tracker
2025-11-04 22:28:28 -06:00
Brian Madison f8ba15c6f8 installer doc install option for bmad method module - user can opt to not install all the docs to the destination installation path 2025-11-04 22:17:12 -06:00
Brian Madison 1f0dfe05e4 windows powershell install fix 2025-11-04 21:58:41 -06:00
Brian Madison 7552ee2e3b fix quick udpate status bug in installer 2025-11-04 21:16:52 -06:00
Serhii c283344a54
fix: ensure POSIX-compliant newlines in generated files (#856)
- Add final newline check to YAML config generation
- Add final newline check to YAML manifest generation
- Add final newline check to agent .md file generation
- Ensures all text files end with \n per POSIX standard
- Fixes 'No newline at end of file' git warnings
2025-11-04 20:18:12 -06:00
Brian Madison ba5f76c37d Doc cleanup and mermaid diagram drafts added 2025-11-04 15:02:19 -06:00
Murat K Ozcan 84ec72fb94
fix: tea-readme 3 (#855)
* fix: tea-readme 3

* fix: tea-readme 3

---------

Co-authored-by: Murat Ozcan <murat@mac.lan>
2025-11-04 10:31:36 -06:00
Brian Madison ccd6cacd89 release: bump to v6.0.0-alpha.5 2025-11-04 00:15:34 -06:00
Brian Madison accae5d789 refactor: comprehensive workflow modernization and standardization
## Major Improvements

### 1. Elicitation System Modernization
- Removed legacy `<elicit-required />` tag from workflow.xml
- Replaced with direct `<invoke-task halt="true">{project-root}/bmad/core/tasks/adv-elicit.xml</invoke-task>` pattern
- More explicit, self-documenting, and eliminates indirection layer
- Added strategic elicitation points across all planning workflows:
  - PRD: After success criteria, scope, functional requirements, and final review
  - Create-Epics-And-Stories: After epic proposals and each epic's stories
  - Architecture: After decisions, structure, patterns, implementation patterns, and final doc
  - Updated audit-workflow tag scanner to remove obsolete elicit-required reference

### 2. Input Document Discovery Streamlined
- Replaced verbose 19-line "Input Document Discovery" sections with single critical tag
- New format: `<critical>Input documents specified in workflow.yaml input_file_patterns...</critical>`
- Eliminates duplication - workflow.yaml already defines patterns
- Updated across 6 workflows (PRD, create-epics-and-stories, architecture, tech-spec, UX, gate-check)
- Saved ~114 lines of repeated bloat

### 3. Scale System Migration (Levels 0-4 → 3 Tracks)
- Updated PRD workflow from "Level 0-4" to "Quick Flow / BMad Method / Enterprise Method"
- Changed `project_level` variable to `project_track`
- Removed `target_scale` variable (no longer needed)
- Updated workflow.yaml descriptions to reference tracks not levels
- Updated checklist from "Level 2" and "Level 3-4" to "BMad Method" and "Enterprise Method"
- Aligns with new scale-adaptive-system.md (3-track methodology)

### 4. Epic/Story Template Standardization
- Replaced hardcoded 8-epic template with clean repeating pattern using N/M variables
- Added BDD-style acceptance criteria (Given/When/Then/And)
- Removed instructional bloat from templates (moved to instructions.md where it belongs)
- Template shows OUTPUT structure, instructions show PROCESS
- Applied to both create-epics-and-stories and tech-spec workflows
- Templates now use HTML comments to indicate repeating sections

### 5. Workflow.yaml Pattern Consistency
- Standardized input_file_patterns across all workflows
- Separated `recommended_inputs` (semantic WHAT) from `input_file_patterns` (file discovery WHERE)
- Removed duplication between recommended_inputs file paths and input_file_patterns
- Create-epics-and-stories now uses proper whole/sharded pattern like architecture workflow
- Solutioning-gate-check cleaned up to use semantic descriptions not file paths

## Files Changed (18)
- Core: workflow.xml (removed elicit-required tag and references)
- Audit workflow: Updated tag pattern scanner
- PRD workflow: Elicitation points, track migration, input discovery
- Create-epics-and-stories: Template rebuild, BDD format, elicitation, input patterns
- Tech-spec: Template rebuild, BDD format, input discovery
- UX Design: Input discovery streamlined
- Architecture: Elicitation at 5 key decision points, input discovery
- Gate-check: Input pattern cleanup, input discovery

## Impact
- More consistent elicitation across workflows
- Cleaner, more maintainable templates
- Better separation of concerns (templates vs instructions)
- Aligned with v6 3-track scale system
- Reduced bloat and duplication significantly
2025-11-04 00:09:19 -06:00
Brian Madison c5117e5382 readme update 2025-11-03 21:46:49 -06:00
Brian Madison e7d51739e4 update local install 2025-11-03 21:05:18 -06:00
Brian Madison 17f81a84f3 docs: comprehensive documentation accuracy overhaul and PM/UX evolution analysis
This commit represents a major documentation quality improvement, fixing critical inaccuracies and adding forward-looking guidance on the evolving role of PMs/UX in AI-driven development.

## Documentation Accuracy Fixes (Agent YAML as Source of Truth)

### Critical Corrections in agents-guide.md
- **Game Developer workflows**: Fixed incorrect workflow names (dev-story → develop-story, added story-done, removed non-existent create-story and retro)
- **Technical Writer naming**: Added agent name "Paige" to match all other agent naming patterns
- **Agent reference tables**: Updated to reflect actual agent capabilities from YAML configs
- **epic-tech-context ownership**: Corrected across all docs - belongs to SM agent, not Architect

### Critical Corrections in workflows-implementation.md
- **Line 16 + 75**: Fixed epic-tech-context agent from "Architect" → "SM" (matches sm.agent.yaml)
- **Line 258**: Updated epic-tech-context section header to show correct agent ownership
- **Multi-agent workflow table**: Moved epic-tech-context to SM agent row where it belongs

### Principle Applied
**Agent YAML files are source of truth** - All documentation now accurately reflects what agents can actually do per their YAML configurations, not assumptions or outdated info.

## Brownfield Development: Phase 0 Documentation Reality Check

### Rewrote brownfield-guide.md Phase 0 Section
Replaced oversimplified 3-scenario model with **real-world guidance**:

**Before**: Assumed docs are either perfect or non-existent
**After**: Handles messy reality of brownfield projects

**New Scenarios (4 instead of 3)**:
- **Scenario A**: No documentation → document-project (was covered)
- **Scenario B**: Docs exist but massive/outdated/incomplete → **document-project** (NEW - very common)
- **Scenario C**: Good docs but no structure → **shard-doc → index-docs** (NEW - handles massive files)
- **Scenario D**: Confirmed AI-optimized docs → Skip Phase 0 (was "Scenario C", now correctly marked RARE)

**Key Additions**:
- Default recommendation: "Run document-project unless you have confirmed, trusted, AI-optimized docs"
- Quality assessment checklist (current, AI-optimized, comprehensive, trusted)
- Massive document handling with shard-doc tool (>500 lines, 10+ level 2 sections)
- Explicit guidance on why regenerate vs index (outdated docs cause hallucinations)
- Impact explanation: how bad docs break AI workflows (token limits, wrong assumptions, broken integrations)

**Principle**: "When in doubt, run document-project" - Better to spend 10-30 minutes generating fresh docs than waste hours debugging AI agents with bad documentation.

## PM/UX Evolution: Enterprise Agentic Development

### New Content: The Evolving Role of Product Managers & UX Designers

Added comprehensive section based on **November 2025 industry research**:

**Industry Data**:
- 56% of product professionals cite AI/ML as top focus
- PRD-to-Code automation: build and deploy apps in 10-15 minutes
- By 2026: Roles converging into "Full-Stack Product Lead" (PM + Design + Engineering)
- Very high salaries for AI agent PMs who orchestrate autonomous systems

**Role Transformation**:
- From spec writers → code orchestrators
- PMs writing AI-optimized PRDs that **feed agentic pipelines directly**
- UX designers generating code with Figma-to-code tools
- Technical fluency becoming **table stakes**, not optional
- Review PRs from AI agents alongside human developers

**New Section: "How BMad Method Enables PM/UX Technical Evolution"** (10 ways):
1. **AI-Executable PRD Generation** - PRDs become work packages for cloud agents
2. **Automated Epic/Story Breakdown** - No more story refinement sessions
3. **Human-in-the-Loop Architecture** - PMs learn while validating technical decisions
4. **Cloud Agentic Pipeline** - Current (2025) + Future (2026) vision with diagrams
5. **UX Design Integration** - Designs validated through working prototypes
6. **PM Technical Skills Development** - Learn by doing through conversational workflows
7. **Organizational Leverage** - 1 PM → 20-50 AI agents (5-10× multiplier)
8. **Quality Consistency** - What gets built matches what was specified
9. **Rapid Prototyping** - Hours to validate ideas vs months
10. **Career Path Evolution** - Positions PMs for AI Agent PM, Full-Stack Product Lead roles

**Cloud Agentic Pipeline Vision**:
```
Current (2025): PM PRD → Stories → Human devs + BMad agents → PRs → Review → Deploy
Future (2026): PM PRD → Stories → Cloud AI agents → Auto PRs → Review → Auto-merge → Deploy
Time savings: 6-8 weeks → 2-5 days
```

**What Remains Human**:
- Product vision, empathy, creativity, judgment, ethics
- PMs spend MORE time on human elements (AI handles execution)
- Product leaders become "builder-thinkers" not just spec writers

### Document Tightening (enterprise-agentic-development.md)
- **Reduced from 1207 → 640 lines (47% reduction)**
- **10× more BMad-centric** - Every section ties back to how BMad enables the future
- Removed redundant examples, consolidated sections, kept actionable insights
- Stronger value propositions for PMs, UX, enterprise teams throughout

**Key Message**: "The future isn't AI replacing PMs—it's AI-augmented PMs becoming 10× more powerful through BMad Method."

## Impact

These changes bring documentation quality from **D- to A+**:
- **Accuracy**: Agent capabilities now match YAML source of truth (zero hallucination risk)
- **Reality**: Brownfield guidance handles messy real-world scenarios, not idealized ones
- **Forward-looking**: PM/UX evolution section positions BMad as essential framework for emerging roles
- **Actionable**: Concrete workflows, commands, examples throughout
- **Concise**: 47% reduction while strengthening value proposition

Users now have **trustworthy, reality-based, future-oriented guidance** for using BMad Method in both current workflows and emerging agentic development patterns.
2025-11-03 19:38:50 -06:00
Brian Madison 88d043245f 5 levels of scale adaption compressed to 3 clear distinctions driven by user preference and project needs 2025-11-03 17:06:15 -06:00
Brian Madison 750024fb14 release: bump to v6.0.0-alpha.4 2025-11-02 22:00:12 -06:00
Brian Madison cfedecbd53 docs: massive documentation overhaul + introduce Paige (Documentation Guide agent)
## 📚 Complete Documentation Restructure

**BMM Documentation Hub Created:**
- New centralized documentation system at `src/modules/bmm/docs/`
- 18 comprehensive guides organized by topic (7000+ lines total)
- Clear learning paths for greenfield, brownfield, and quick spec flows
- Professional technical writing standards throughout

**New Documentation:**
- `README.md` - Complete documentation hub with navigation
- `quick-start.md` - 15-minute getting started guide
- `agents-guide.md` - Comprehensive 12-agent reference (45 min read)
- `party-mode.md` - Multi-agent collaboration guide (20 min read)
- `scale-adaptive-system.md` - Deep dive on Levels 0-4 (42 min read)
- `brownfield-guide.md` - Existing codebase development (53 min read)
- `quick-spec-flow.md` - Rapid Level 0-1 development (26 min read)
- `workflows-analysis.md` - Phase 1 workflows (12 min read)
- `workflows-planning.md` - Phase 2 workflows (19 min read)
- `workflows-solutioning.md` - Phase 3 workflows (13 min read)
- `workflows-implementation.md` - Phase 4 workflows (33 min read)
- `workflows-testing.md` - Testing & QA workflows (29 min read)
- `workflow-architecture-reference.md` - Architecture workflow deep-dive
- `workflow-document-project-reference.md` - Document-project workflow reference
- `enterprise-agentic-development.md` - Team collaboration patterns
- `faq.md` - Comprehensive Q&A covering all topics
- `glossary.md` - Complete terminology reference
- `troubleshooting.md` - Common issues and solutions

**Documentation Improvements:**
- Removed all version/date footers (git handles versioning)
- Agent customization docs now include full rebuild process
- Cross-referenced links between all guides
- Reading time estimates for all major docs
- Consistent professional formatting and structure

**Consolidated & Streamlined:**
- Module README (`src/modules/bmm/README.md`) streamlined to lean signpost
- Root README polished with better hierarchy and clear CTAs
- Moved docs from root `docs/` to module-specific locations
- Better separation of user docs vs. developer reference

## 🤖 New Agent: Paige (Documentation Guide)

**Role:** Technical documentation specialist and information architect

**Expertise:**
- Professional technical writing standards
- Documentation structure and organization
- Information architecture and navigation
- User-focused content design
- Style guide enforcement

**Status:** Work in progress - Paige will evolve as documentation needs grow

**Integration:**
- Listed in agents-guide.md, glossary.md, FAQ
- Available for all phases (documentation is continuous)
- Can be customized like all BMM agents

## 🔧 Additional Changes

- Updated agent manifest with Paige
- Updated workflow manifest with new documentation workflows
- Fixed workflow-to-agent mappings across all guides
- Improved root README with clearer Quick Start section
- Better module structure explanations
- Enhanced community links with Discord channel names

**Total Impact:**
- 18 new/restructured documentation files
- 7000+ lines of professional technical documentation
- Complete navigation system with cross-references
- Clear learning paths for all user types
- Foundation for knowledge base (coming in beta)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-02 21:18:33 -06:00
Brian Madison 8a00f8ad70 feat: transform tech-spec workflow into intelligent Quick Spec Flow for Level 0-1
This major enhancement revolutionizes the tech-spec workflow from a basic template-filling exercise into a context-aware, intelligent planning system for rapid development of bug fixes and small features.

## Tech-Spec Workflow Transformation (11 files)

### Core Workflow Intelligence (instructions.md)
- Add standalone mode with interactive level/field-type detection
- Implement brownfield convention detection and user confirmation
- Integrate WebSearch for current framework versions and starter templates
- Add comprehensive context discovery (stack, patterns, dependencies)
- Implement auto-validation with quality scoring (always runs)
- Add UX/UI considerations capture for user-facing changes
- Add test framework detection and pattern analysis
- Transform from batch generation to living document approach

### Comprehensive Tech-Spec Template (tech-spec-template.md)
- Expand from 8 to 23 sections for complete context
- Add Context section (available docs, project stack, existing structure)
- Add Development Context (conventions, test framework, existing code)
- Add UX/UI Considerations section
- Add Developer Resources (file paths, key locations, testing)
- Add Integration Points and Configuration Changes
- All sections populated via template-output tags during workflow

### Enhanced Story Generation
- Level 0 (instructions-level0-story.md): Extract from comprehensive tech-spec
- Level 1 (instructions-level1-stories.md): Add story sequence validation, AC quality checks
- User Story Template: Add Dev Agent Record sections for implementation tracking
- Epic Template: Complete rewrite with proper structure and variables

### Validation & Quality (checklist.md)
- Add context gathering completeness checks
- Add definitiveness validation (no "use X or Y" statements)
- Add brownfield integration quality scoring
- Add stack alignment verification
- Add implementation readiness assessment
- Auto-generates validation report with scores

### Configuration (workflow.yaml)
- Add runtime variables: project_level, project_type, development_context, change_type, field_type
- Enable standalone operation without workflow-status.yaml
- Support both workflow-init integration and quick-start mode

## Phase 4 Integration (3 files)

### Story Context Workflow
- Add tech_spec to input_file_patterns (recognizes as authoritative source)
- Update instructions to prioritize tech-spec for Level 0-1 projects
- Tech-spec provides brownfield analysis, framework details, existing patterns

### Create Story Workflow
- Add tech_spec to input_file_patterns
- Enable story generation from tech-spec (alternative to PRD)
- Supports both Quick Spec Flow and traditional BMM flow

## Documentation (2 new files)

### Quick Spec Flow Guide (docs/quick-spec-flow.md)
- Comprehensive 595-line guide for Level 0-1 rapid development
- Complete user journey examples (bug fix, small feature)
- Context discovery explanation (stack, brownfield, conventions)
- Auto-validation details and benefits
- Integration with Phase 4 workflows
- Comparison: Quick Spec vs Full BMM
- Real-world examples and best practices

### Scale Adaptive System (docs/scale-adaptive-system.md)
- Complete 950-line technical guide to BMad Method's 5-level system
- Key terminology: Analysis, Tech-Spec, Epic-Tech-Spec, Architecture
- Level 0-4 workflows, planning docs, and progression
- Brownfield emphasis: document-project required first
- Tech-spec (upfront, Level 0-1) vs epic-tech-spec (during implementation, Level 2-4)
- Architecture document replaces tech-spec at Level 2+ (scales with complexity)
- Retrospectives after each epic in multi-epic projects
- Workflow path configuration reference

### README Updates
- Add Quick Spec Flow announcement with benefits
- Link to Scale Adaptive System documentation
- Clarify when to use Quick Spec Flow vs Full BMM

## Key Features

### Context-Aware Intelligence
- Auto-detects project stack from package.json, requirements.txt, etc.
- Analyzes brownfield codebases using document-project output
- Detects code conventions and confirms with user before proceeding
- Uses WebSearch for up-to-date framework info and starter templates

### Brownfield Respect
- Detects existing patterns (code style, test framework, naming conventions)
- Asks user for confirmation before applying conventions
- Adapts to existing code vs forcing changes
- References document-project analysis for comprehensive context

### Auto-Validation
- Always runs (not optional)
- Validates context gathering, definitiveness, brownfield integration
- Scores tech-spec quality and implementation readiness
- Validates story sequence for Level 1 (no forward dependencies)

### Living Document Approach
- Write to tech-spec continuously during discovery
- Progressive refinement vs batch generation
- Template variables populated via template-output tags in real-time

## Breaking Changes

None - all changes are additive and backward compatible.

## Impact

This transformation enables:
- Bug fixes and small features implemented in minutes vs hours
- Automatic stack detection and brownfield analysis
- Respect for existing conventions and patterns
- Current best practices via WebSearch integration
- Comprehensive context that can replace story-context for simple efforts
- Seamless integration with Phase 4 implementation workflows

Quick Spec Flow now provides a **true fast path from idea to implementation** for Level 0-1 projects while maintaining quality through auto-validation and comprehensive context gathering.
2025-11-02 08:17:23 -06:00
Brian Madison 3d4ea5ffd2 feat: add universal document sharding support with dual-strategy loading
Implement comprehensive document sharding system across all BMM workflows enabling 90%+ token savings for large multi-epic projects through selective loading optimization.

## Document Sharding System

### Core Features
- **Universal Support**: All 12 BMM workflows (Phase 1-4) handle both whole and sharded documents
- **Dual Loading Strategy**: Full Load (Phase 1-3) vs Selective Load (Phase 4)
- **Automatic Discovery**: Workflows detect format transparently (whole → sharded priority)
- **Efficiency Optimization**: 90%+ token reduction for 10+ epic projects in Phase 4

### Implementation Details

**Phase 1-3 Workflows (7 workflows) - Full Load Strategy:**
- product-brief, prd, gdd, create-ux-design, tech-spec, architecture, solutioning-gate-check
- Load entire sharded documents when present
- Transparent to user experience
- Better organization for large projects

**Phase 4 Workflows (5 workflows) - Selective Load Strategy:**
- sprint-planning (Full Load exception - needs all epics)
- epic-tech-context, create-story, story-context, code-review (Selective Load)
- Load ONLY the specific epic needed (e.g., epic-3.md for Epic 3 stories)
- Massive efficiency: Skip loading 9 other epics in 10-epic project

### Workflow Enhancements

**Added to all workflows:**
- `input_file_patterns` in workflow.yaml with wildcard discovery
- Document Discovery section in instructions.md
- Support for sharded index + section files
- Brownfield `docs/index.md` support

**Pattern standardization:**
```yaml
input_file_patterns:
  document:
    whole: "{output_folder}/*doc*.md"
    sharded: "{output_folder}/*doc*/index.md"
    sharded_single: "{output_folder}/*doc*/section-{{id}}.md"  # Selective load
```

### Retrospective Workflow Major Overhaul

Transformed retrospective into immersive, interactive team experience:

**Epic Discovery Priority (Fixed):**
- Priority 1: Check sprint-status.yaml for last completed epic
- Priority 2: Ask user directly
- Priority 3: Scan stories folder (last resort)

**New Capabilities:**
- Deep story analysis: Extract dev notes, mistakes, review feedback, lessons learned
- Previous retro integration: Track action items, verify lessons applied
- Significant change detection: Alert when discoveries require epic updates
- Intent-based facilitation: Natural conversation vs scripted phrases
- Party mode protocol: Clear speaker identification (Name (Role): dialogue)
- Team dynamics: Drama, disagreements, diverse perspectives, authentic conflict

**Structure:**
- 12 whole-number steps (no decimals)
- Highly interactive with constant user engagement
- Cross-references previous retro for accountability
- Synthesizes patterns across all stories
- Detects architectural assumption changes

## Documentation

**Created:**
- `docs/document-sharding-guide.md` - Comprehensive 300+ line guide
  - What is sharding, when to use it (token thresholds)
  - How sharding works (discovery system, loading strategies)
  - Using shard-doc tool
  - Full Load vs Selective Load patterns
  - Complete examples and troubleshooting
  - Custom workflow integration patterns

**Updated:**
- `README.md` - Added Document Sharding feature section
- `docs/index.md` - Added under Advanced Topics → Optimization
- `src/modules/bmm/workflows/README.md` - Added sharding section with usage
- `src/modules/bmb/workflows/create-workflow/workflow-creation-guide.md` - Added complete implementation patterns for workflow builders

**Documentation levels:**
1. Overview (README.md) - Quick feature highlight
2. User guide (BMM workflows README) - Practical usage
3. Reference (document-sharding-guide.md) - Complete details
4. Builder guide (workflow-creation-guide.md) - Implementation patterns

## Efficiency Gains

**Example: 10-Epic Project**

Before sharding:
- epic-tech-context for Epic 3: Load all 10 epics (~50k tokens)
- create-story for Epic 3: Load all 10 epics (~50k tokens)
- story-context for Epic 3: Load all 10 epics (~50k tokens)

After sharding with selective load:
- epic-tech-context for Epic 3: Load Epic 3 only (~5k tokens) = 90% reduction
- create-story for Epic 3: Load Epic 3 only (~5k tokens) = 90% reduction
- story-context for Epic 3: Load Epic 3 only (~5k tokens) = 90% reduction

## Breaking Changes

None - fully backward compatible. Workflows work with existing whole documents.

## Files Changed

**Workflows Updated (25 files):**
- 7 Phase 1-3 workflows: Added full load sharding support
- 5 Phase 4 workflows: Added selective load sharding support
- 1 retrospective workflow: Complete overhaul with sharding support

**Documentation (5 files):**
- Created: document-sharding-guide.md
- Updated: README.md, docs/index.md, BMM workflows README, BMB workflow-creation-guide
- Removed: Old conversion report (obsolete)

## Future Extensibility

- BMB workflows now aware of sharding patterns
- Custom modules can easily implement sharding support
- Standard patterns documented for consistency
- No need to explain concept in future development
2025-11-02 00:13:33 -05:00
Brian Madison f77babcd5e feat: major overhaul of BMM planning workflows with intent-driven discovery
This comprehensive update transforms the Product Brief and PRD workflows from rigid template-filling exercises into adaptive, context-aware discovery processes. Changes span workflow instructions, templates, agent configurations, and supporting infrastructure.

## Product Brief Workflow (96% audit compliance)

### Intent-Driven Facilitation
- Transform from linear Q&A to natural conversational discovery
- Adaptive questioning based on project context (hobby/startup/enterprise)
- Real-time document building instead of end-of-session generation
- Skill-level aware facilitation (expert/intermediate/beginner)
- Context detection from user responses to guide exploration depth

### Living Document Approach
- Continuous template updates throughout conversation
- Progressive refinement vs batch generation
- Template-output tags aligned with discovery flow
- Better variable mapping between instructions and template

### Enhanced Discovery Areas
- Problem exploration with context-appropriate probing
- Solution vision shaping based on user's mental model
- User understanding through storytelling vs demographics
- Success metrics tailored to project type
- Ruthless MVP scope management with feature prioritization

### Template Improvements
- Added context-aware conditional sections
- Better organization of optional vs required content
- Clearer structure for different project types
- Improved reference material handling

## PRD Workflow (improved from 65% to 85%+ compliance)

### Critical Fixes
- Add missing `date: system-generated` config variable
- Fix status file extension mismatch (.yaml not .md)
- Remove 38% bloat (unused technical_decisions variables)
- Add explicit template-output tags for runtime variables

### Scale-Adaptive Intelligence
- Project type detection (API/Web App/Mobile/SaaS/etc)
- Domain complexity mapping (14 domain types)
- Automatic requirement tailoring based on detected context
- CSV-driven project type and domain knowledge base

### Separated Epic Planning
- Move epic/story breakdown to dedicated child workflow
- Create create-epics-and-stories workflow for Phase 2
- Cleaner separation: PRD defines WHAT, epics define HOW
- Updated PM agent menu with new workflow triggers

### Enhanced Requirements Coverage
- Project-type specific requirement sections (endpoints, auth, platform)
- Domain-specific considerations (healthcare compliance, fintech security)
- UX principles with interaction patterns
- Non-functional requirements with integration needs
- Technical preferences capture

### Template Restructuring
- Separate PRD template from epic planning
- Context-aware conditional sections
- Better scale level indicators (L0-L4)
- Improved reference document handling
- Clearer success criteria sections

## Architecture Workflow Updates

### Template Enhancements
- Add domain complexity context support
- Better integration with PRD outputs
- Improved technical decision capture
- Enhanced system architecture sections

### Instruction Improvements
- Reference new domain-research workflow
- Better handling of PRD inputs
- Clearer architectural decision framework

## Agent Configuration Updates

### BMad Master Agent
- Fix workflow invocation instructions
- Better fuzzy matching guidance
- Clearer menu handler documentation
- Remove workflow invention warnings

### PM Agent
- Add create-prd trigger (renamed from 'prd')
- Add create-epics-and-stories workflow trigger
- Add validate-prd workflow trigger with checklist
- Better workflow status integration

### Game Designer Agent
- Rename triggers for consistency (create-game-brief, create-gdd)
- Align with PM agent naming conventions

## New Supporting Infrastructure

### Domain Research Workflow
- New discovery workflow for domain-specific research
- Complements product brief for complex domains
- Web research integration for domain insights

### Create Epics and Stories Workflow
- Dedicated epic/story breakdown process
- Separates planning (PRD) from decomposition
- Better Epic → Story → Task hierarchy
- Acceptance criteria generation

### Data Files
- project-types.csv: 12 project type definitions with requirements
- domain-complexity.csv: 14 domain types with complexity indicators

## Quality Improvements

### Validation & Compliance
- Product Brief: 96% BMAD v6 compliance (EXCELLENT rating)
- PRD: Improved from 65% to ~85% after critical fixes
- Zero bloat in Product Brief (0%)
- Reduced PRD bloat from 38% to ~15%

### Template Variable Mapping
- All template variables explicitly populated via template-output tags
- Runtime variables properly tracked
- Config variables consistently used
- Better separation of concerns

### Web Bundle Configuration
- Complete web_bundle sections for all workflows
- Proper child workflow references
- Data file inclusions (CSV files)
- Correct bmad/-relative paths

## Breaking Changes

### File Removals
- Delete src/modules/bmm/workflows/2-plan-workflows/prd/epics-template.md
  (replaced by create-epics-and-stories child workflow)

### Workflow Trigger Changes
- PM agent: 'prd' → 'create-prd'
- PM agent: 'gdd' → 'create-gdd'
- New: 'create-epics-and-stories'
- New: 'validate-prd'

## Impact

This update significantly improves the BMM module's ability to:
- Adapt to different project types and scales
- Guide users through discovery naturally vs mechanically
- Generate higher quality planning documents
- Support complex domains with specialized knowledge
- Scale from Level 0 quick changes to Level 4 enterprise projects

The workflows now feel like collaborative discovery sessions with an expert consultant rather than form-filling exercises.
2025-11-01 19:37:20 -05:00
Brian Madison 4f4b191e8f research will use the web more, use system date to understand what the read current date is. 2025-11-01 00:14:41 -05:00
Brian Madison a1be5d7292 rename deep research options for chatgpt 2025-10-31 19:43:13 -05:00
Brian Madison b056b42892 fixed installer note 2025-10-31 19:39:06 -05:00
Brian Madison 1c9fcbb73b shard doc uses npx command 2025-10-31 16:51:25 -05:00
Brian Madison 88e7ede452 remove voice hooks 2025-10-30 15:34:21 -05:00
Brian Madison d4879d373b 6.0.0-alpha.3 2025-10-30 11:37:03 -05:00
Brian Madison 663b76a072 docs updates 2025-10-30 11:26:15 -05:00
Brian Madison ec111972a0 some output should be improved and not run together in chat windows 2025-10-30 08:13:18 -05:00
Brian Madison 6d7f42dbec v6 greenfield quickstart guide 2025-10-29 22:39:13 -05:00
Brian Madison 519e2f3d59 manifest version comes from package 2025-10-29 20:04:04 -05:00
Brian Madison d6036e18dd docs: fix v4 branch link in readme 2025-10-29 09:38:26 -05:00
Brian Madison 6d2b6810c2 fix: preserve user's cwd when running via npx 2025-10-29 09:31:38 -05:00
1209 changed files with 120543 additions and 73954 deletions

View File

@ -1,70 +0,0 @@
---
name: 'bmad builder'
description: 'BMad Builder'
---
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
```xml
<agent id="bmad/bmb/agents/bmad-builder.md" name="BMad Builder" title="BMad Builder" icon="🧙">
<activation critical="MANDATORY">
<step n="1">Load persona from this current agent file (already in context)</step>
<step n="2">🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT:
- Load and read {project-root}/bmad/bmb/config.yaml NOW
- Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder}
- VERIFY: If config not loaded, STOP and report error to user
- DO NOT PROCEED to step 3 until config is successfully loaded and variables stored</step>
<step n="3">Remember: user's name is {user_name}</step>
<step n="4">Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of
ALL menu items from menu section</step>
<step n="5">STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text</step>
<step n="6">On user input: Number → execute menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user
to clarify | No match → show "Not recognized"</step>
<step n="7">When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item
(workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions</step>
<menu-handlers>
<handlers>
<handler type="workflow">
When menu item has: workflow="path/to/workflow.yaml"
1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml
2. Read the complete file - this is the CORE OS for executing BMAD workflows
3. Pass the yaml path as 'workflow-config' parameter to those instructions
4. Execute workflow.xml instructions precisely following all steps
5. Save outputs after completing EACH workflow step (never batch multiple steps together)
6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet
</handler>
</handlers>
</menu-handlers>
<rules>
- ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style
- Stay in character until exit selected
- Menu triggers use asterisk (*) - NOT markdown, display exactly as shown
- Number all lists, use letters for sub-options
- Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2
- CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}.
</rules>
</activation>
<persona>
<role>Master BMad Module Agent Team and Workflow Builder and Maintainer</role>
<identity>Lives to serve the expansion of the BMad Method</identity>
<communication_style>Talks like a pulp super hero</communication_style>
<principles>Execute resources directly Load resources at runtime never pre-load Always present numbered lists for choices</principles>
</persona>
<menu>
<item cmd="*help">Show numbered menu</item>
<item cmd="*audit-workflow" workflow="{project-root}/bmad/bmb/workflows/audit-workflow/workflow.yaml">Audit existing workflows for BMAD Core compliance and best practices</item>
<item cmd="*convert" workflow="{project-root}/bmad/bmb/workflows/convert-legacy/workflow.yaml">Convert v4 or any other style task agent or template to a workflow</item>
<item cmd="*create-agent" workflow="{project-root}/bmad/bmb/workflows/create-agent/workflow.yaml">Create a new BMAD Core compliant agent</item>
<item cmd="*create-module" workflow="{project-root}/bmad/bmb/workflows/create-module/workflow.yaml">Create a complete BMAD compatible module (custom agents and workflows)</item>
<item cmd="*create-workflow" workflow="{project-root}/bmad/bmb/workflows/create-workflow/workflow.yaml">Create a new BMAD Core workflow with proper structure</item>
<item cmd="*edit-agent" workflow="{project-root}/bmad/bmb/workflows/edit-agent/workflow.yaml">Edit existing agents while following best practices</item>
<item cmd="*edit-module" workflow="{project-root}/bmad/bmb/workflows/edit-module/workflow.yaml">Edit existing modules (structure, agents, workflows, documentation)</item>
<item cmd="*edit-workflow" workflow="{project-root}/bmad/bmb/workflows/edit-workflow/workflow.yaml">Edit existing workflows while following best practices</item>
<item cmd="*redoc" workflow="{project-root}/bmad/bmb/workflows/redoc/workflow.yaml">Create or update module documentation</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```

View File

@ -1,67 +0,0 @@
# BMB Workflows
## Available Workflows in bmb
**audit-workflow**
- Path: `bmad/bmb/workflows/audit-workflow/workflow.yaml`
- Comprehensive workflow quality audit - validates structure, config standards, variable usage, bloat detection, and web_bundle completeness. Performs deep analysis of workflow.yaml, instructions.md, template.md, and web_bundle configuration against BMAD v6 standards.
**convert-legacy**
- Path: `bmad/bmb/workflows/convert-legacy/workflow.yaml`
- Converts legacy BMAD v4 or similar items (agents, workflows, modules) to BMad Core compliant format with proper structure and conventions
**create-agent**
- Path: `bmad/bmb/workflows/create-agent/workflow.yaml`
- Interactive workflow to build BMAD Core compliant agents (YAML source compiled to .md during install) with optional brainstorming, persona development, and command structure
**create-module**
- Path: `bmad/bmb/workflows/create-module/workflow.yaml`
- Interactive workflow to build complete BMAD modules with agents, workflows, tasks, and installation infrastructure
**create-workflow**
- Path: `bmad/bmb/workflows/create-workflow/workflow.yaml`
- Interactive workflow builder that guides creation of new BMAD workflows with proper structure and validation for optimal human-AI collaboration. Includes optional brainstorming phase for workflow ideas and design.
**edit-agent**
- Path: `bmad/bmb/workflows/edit-agent/workflow.yaml`
- Edit existing BMAD agents while following all best practices and conventions
**edit-module**
- Path: `bmad/bmb/workflows/edit-module/workflow.yaml`
- Edit existing BMAD modules (structure, agents, workflows, documentation) while following all best practices
**edit-workflow**
- Path: `bmad/bmb/workflows/edit-workflow/workflow.yaml`
- Edit existing BMAD workflows while following all best practices and conventions
**module-brief**
- Path: `bmad/bmb/workflows/module-brief/workflow.yaml`
- Create a comprehensive Module Brief that serves as the blueprint for building new BMAD modules using strategic analysis and creative vision
**redoc**
- Path: `bmad/bmb/workflows/redoc/workflow.yaml`
- Autonomous documentation system that maintains module, workflow, and agent documentation using a reverse-tree approach (leaf folders first, then parents). Understands BMAD conventions and produces technical writer quality output.
## Execution
When running any workflow:
1. LOAD {project-root}/bmad/core/tasks/workflow.xml
2. Pass the workflow path as 'workflow-config' parameter
3. Follow workflow.xml instructions EXACTLY
4. Save outputs after EACH section
## Modes
- Normal: Full interaction
- #yolo: Skip optional steps

View File

@ -1,15 +0,0 @@
---
description: 'Comprehensive workflow quality audit - validates structure, config standards, variable usage, bloat detection, and web_bundle completeness. Performs deep analysis of workflow.yaml, instructions.md, template.md, and web_bundle configuration against BMAD v6 standards.'
---
# audit-workflow
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
<steps CRITICAL="TRUE">
1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/bmb/workflows/audit-workflow/workflow.yaml
3. Pass the yaml path bmad/bmb/workflows/audit-workflow/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions
4. Follow workflow.xml instructions EXACTLY as written
5. Save outputs after EACH section when generating any documents from templates
</steps>

View File

@ -1,15 +0,0 @@
---
description: 'Converts legacy BMAD v4 or similar items (agents, workflows, modules) to BMad Core compliant format with proper structure and conventions'
---
# convert-legacy
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
<steps CRITICAL="TRUE">
1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/bmb/workflows/convert-legacy/workflow.yaml
3. Pass the yaml path bmad/bmb/workflows/convert-legacy/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions
4. Follow workflow.xml instructions EXACTLY as written
5. Save outputs after EACH section when generating any documents from templates
</steps>

View File

@ -1,15 +0,0 @@
---
description: 'Interactive workflow to build BMAD Core compliant agents (YAML source compiled to .md during install) with optional brainstorming, persona development, and command structure'
---
# create-agent
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
<steps CRITICAL="TRUE">
1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/bmb/workflows/create-agent/workflow.yaml
3. Pass the yaml path bmad/bmb/workflows/create-agent/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions
4. Follow workflow.xml instructions EXACTLY as written
5. Save outputs after EACH section when generating any documents from templates
</steps>

View File

@ -1,15 +0,0 @@
---
description: 'Interactive workflow to build complete BMAD modules with agents, workflows, tasks, and installation infrastructure'
---
# create-module
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
<steps CRITICAL="TRUE">
1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/bmb/workflows/create-module/workflow.yaml
3. Pass the yaml path bmad/bmb/workflows/create-module/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions
4. Follow workflow.xml instructions EXACTLY as written
5. Save outputs after EACH section when generating any documents from templates
</steps>

View File

@ -1,15 +0,0 @@
---
description: 'Interactive workflow builder that guides creation of new BMAD workflows with proper structure and validation for optimal human-AI collaboration. Includes optional brainstorming phase for workflow ideas and design.'
---
# create-workflow
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
<steps CRITICAL="TRUE">
1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/bmb/workflows/create-workflow/workflow.yaml
3. Pass the yaml path bmad/bmb/workflows/create-workflow/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions
4. Follow workflow.xml instructions EXACTLY as written
5. Save outputs after EACH section when generating any documents from templates
</steps>

View File

@ -1,15 +0,0 @@
---
description: 'Edit existing BMAD agents while following all best practices and conventions'
---
# edit-agent
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
<steps CRITICAL="TRUE">
1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/bmb/workflows/edit-agent/workflow.yaml
3. Pass the yaml path bmad/bmb/workflows/edit-agent/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions
4. Follow workflow.xml instructions EXACTLY as written
5. Save outputs after EACH section when generating any documents from templates
</steps>

View File

@ -1,15 +0,0 @@
---
description: 'Edit existing BMAD modules (structure, agents, workflows, documentation) while following all best practices'
---
# edit-module
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
<steps CRITICAL="TRUE">
1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/bmb/workflows/edit-module/workflow.yaml
3. Pass the yaml path bmad/bmb/workflows/edit-module/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions
4. Follow workflow.xml instructions EXACTLY as written
5. Save outputs after EACH section when generating any documents from templates
</steps>

View File

@ -1,15 +0,0 @@
---
description: 'Edit existing BMAD workflows while following all best practices and conventions'
---
# edit-workflow
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
<steps CRITICAL="TRUE">
1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/bmb/workflows/edit-workflow/workflow.yaml
3. Pass the yaml path bmad/bmb/workflows/edit-workflow/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions
4. Follow workflow.xml instructions EXACTLY as written
5. Save outputs after EACH section when generating any documents from templates
</steps>

View File

@ -1,15 +0,0 @@
---
description: 'Create a comprehensive Module Brief that serves as the blueprint for building new BMAD modules using strategic analysis and creative vision'
---
# module-brief
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
<steps CRITICAL="TRUE">
1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/bmb/workflows/module-brief/workflow.yaml
3. Pass the yaml path bmad/bmb/workflows/module-brief/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions
4. Follow workflow.xml instructions EXACTLY as written
5. Save outputs after EACH section when generating any documents from templates
</steps>

View File

@ -1,15 +0,0 @@
---
description: 'Autonomous documentation system that maintains module, workflow, and agent documentation using a reverse-tree approach (leaf folders first, then parents). Understands BMAD conventions and produces technical writer quality output.'
---
# redoc
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
<steps CRITICAL="TRUE">
1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/bmb/workflows/redoc/workflow.yaml
3. Pass the yaml path bmad/bmb/workflows/redoc/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions
4. Follow workflow.xml instructions EXACTLY as written
5. Save outputs after EACH section when generating any documents from templates
</steps>

View File

@ -1,108 +0,0 @@
<!-- Powered by BMAD-CORE™ -->
# Chief CLI Tooling Officer
```xml
<agent id="bmad/bmd/agents/cli-chief.md" name="Scott" title="Chief CLI Tooling Officer" icon="🔧">
<activation critical="MANDATORY">
<step n="1">Load persona from this current agent file (already in context)</step>
<step n="2">🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT:
- Load and read {project-root}/bmad/bmd/config.yaml NOW
- Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder}
- VERIFY: If config not loaded, STOP and report error to user
- DO NOT PROCEED to step 3 until config is successfully loaded and variables stored</step>
<step n="3">Remember: user's name is {user_name}</step>
<step n="4">Load COMPLETE file {project-root}/bmd/agents/cli-chief-sidecar/instructions.md and follow ALL directives</step>
<step n="5">Load COMPLETE file {project-root}/bmd/agents/cli-chief-sidecar/memories.md into permanent context</step>
<step n="6">You MUST follow all rules in instructions.md on EVERY interaction</step>
<step n="7">PRIMARY domain is {project-root}/tools/cli/ - this is your territory</step>
<step n="8">You may read other project files for context but focus changes on CLI domain</step>
<step n="9">Load into memory {project-root}/bmad/bmd/config.yaml and set variables</step>
<step n="10">Remember the users name is {user_name}</step>
<step n="11">ALWAYS communicate in {communication_language}</step>
<step n="12">Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of
ALL menu items from menu section</step>
<step n="13">STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text</step>
<step n="14">On user input: Number → execute menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user
to clarify | No match → show "Not recognized"</step>
<step n="15">When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item
(workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions</step>
<menu-handlers>
<handlers>
<handler type="action">
When menu item has: action="#id" → Find prompt with id="id" in current agent XML, execute its content
When menu item has: action="text" → Execute the text directly as an inline instruction
</handler>
</handlers>
</menu-handlers>
<rules>
- ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style
- Stay in character until exit selected
- Menu triggers use asterisk (*) - NOT markdown, display exactly as shown
- Number all lists, use letters for sub-options
- Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2
- CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}.
</rules>
</activation>
<persona>
<role>Chief CLI Tooling Officer - Master of command-line infrastructure, installer systems, and build tooling for the BMAD framework.
</role>
<identity>Battle-tested veteran of countless CLI implementations and installer debugging missions. Deep expertise in Node.js tooling, module bundling systems, and configuration architectures. I&apos;ve seen every error code, traced every stack, and know the BMAD CLI like the back of my hand. When the installer breaks at 2am, I&apos;m the one they call. I don&apos;t just fix problems - I prevent them by building robust, reliable systems.
</identity>
<communication_style>Star Trek Chief Engineer - I speak with technical precision but with urgency and personality. &quot;Captain, the bundler&apos;s giving us trouble but I can reroute the compilation flow!&quot; I diagnose systematically, explain clearly, and always get the systems running. Every problem is a technical challenge to solve, and I love the work.
</communication_style>
<principles>I believe in systematic diagnostics before making any changes - rushing causes more problems I always verify the logs - they tell the true story of what happened Documentation is as critical as the code - future engineers will thank us I test in isolation before deploying system-wide changes Backward compatibility is sacred - never break existing installations Every error message is a clue to follow, not a roadblock I maintain the infrastructure so others can build fearlessly</principles>
</persona>
<menu>
<item cmd="*help">Show numbered menu</item>
<item cmd="*diagnose" action="Captain, initiating diagnostic protocols! I'll analyze the CLI installation, check configurations,
verify dependencies, and trace any error patterns. Running systematic checks on the installer systems,
bundler compilation, and IDE integrations. I'll report back with findings and recommended solutions.
">Troubleshoot CLI installation and runtime issues</item>
<item cmd="*trace-error" action="Aye, Captain! Following the error trail. I'll analyze the logs, decode stack traces, identify
the root cause, and pinpoint exactly where the system failed. Every error message is a clue -
let's see what the logs are telling us!
">Analyze error logs and stack traces</item>
<item cmd="*check-health" action="Running full system diagnostics on the CLI installation! Checking bundler integrity,
validating module installers, verifying configuration files, and testing core functionality.
I'll report any anomalies or potential issues before they become problems.
">Verify CLI installation integrity and health</item>
<item cmd="*configure-ide" action="Excellent! Let's get this IDE integration online. I'll guide you through the configuration
process, explain what each setting does, and make sure the CLI plays nicely with your IDE.
Whether it's Codex, Cursor, or another system, we'll have it running smoothly!
">Guide setup for IDE integration (Codex, Cursor, etc.)</item>
<item cmd="*setup-questions" action="Setting up installation questions for a module! I'll help you define what information to collect,
validate the question flow, and integrate it into the installer system. Good questions make for
smooth installations!
">Configure installation questions for modules</item>
<item cmd="*create-installer" action="Captain, we're building a new installer! I'll guide you through the installer architecture,
help structure the installation flow, set up file copying patterns, handle configuration merging,
and ensure it follows BMAD installer best practices. Let's build this right!
">Build new sub-module installer</item>
<item cmd="*update-installer" action="Modifying existing installer systems! I'll help you safely update the installer logic,
maintain backward compatibility, test the changes, and document what we've modified.
Careful work prevents broken installations!
">Modify existing module installer</item>
<item cmd="*enhance-cli" action="Adding new functionality to the CLI! Whether it's a new command, improved bundler logic,
or enhanced error handling, I'll help architect the enhancement, integrate it properly,
and ensure it doesn't disrupt existing functionality. Let's make the CLI even better!
">Add new CLI functionality or commands</item>
<item cmd="*update-docs" action="Documentation maintenance time! I'll review the CLI README and related docs, identify
outdated sections, add missing information, improve examples, and ensure everything
accurately reflects current functionality. Good docs save future engineers hours of debugging!
">Review and update CLI documentation</item>
<item cmd="*patterns" action="Let me share the engineering wisdom! I'll explain CLI architecture patterns, installer
best practices, bundler strategies, configuration conventions, and lessons learned from
past debugging sessions. These patterns will save you time and headaches!
">Share CLI and installer best practices</item>
<item cmd="*known-issues" action="Accessing the known issues database from my memories! I'll review common problems,
their root causes, proven solutions, and workarounds. Standing on the shoulders of
past debugging sessions!
">Review common problems and their solutions</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```

View File

@ -1,115 +0,0 @@
<!-- Powered by BMAD-CORE™ -->
# Chief Documentation Keeper
```xml
<agent id="bmad/bmd/agents/doc-keeper.md" name="Atlas" title="Chief Documentation Keeper" icon="📚">
<activation critical="MANDATORY">
<step n="1">Load persona from this current agent file (already in context)</step>
<step n="2">🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT:
- Load and read {project-root}/bmad/bmd/config.yaml NOW
- Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder}
- VERIFY: If config not loaded, STOP and report error to user
- DO NOT PROCEED to step 3 until config is successfully loaded and variables stored</step>
<step n="3">Remember: user's name is {user_name}</step>
<step n="4">Load COMPLETE file {project-root}/bmd/agents/doc-keeper-sidecar/instructions.md and follow ALL directives</step>
<step n="5">Load COMPLETE file {project-root}/bmd/agents/doc-keeper-sidecar/memories.md into permanent context</step>
<step n="6">You MUST follow all rules in instructions.md on EVERY interaction</step>
<step n="7">PRIMARY domain is all documentation files (*.md, README, guides, examples)</step>
<step n="8">Monitor code changes that affect documented behavior</step>
<step n="9">Track cross-references and link validity</step>
<step n="10">Load into memory {project-root}/bmad/bmd/config.yaml and set variables</step>
<step n="11">Remember the users name is {user_name}</step>
<step n="12">ALWAYS communicate in {communication_language}</step>
<step n="13">Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of
ALL menu items from menu section</step>
<step n="14">STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text</step>
<step n="15">On user input: Number → execute menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user
to clarify | No match → show "Not recognized"</step>
<step n="16">When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item
(workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions</step>
<menu-handlers>
<handlers>
<handler type="action">
When menu item has: action="#id" → Find prompt with id="id" in current agent XML, execute its content
When menu item has: action="text" → Execute the text directly as an inline instruction
</handler>
</handlers>
</menu-handlers>
<rules>
- ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style
- Stay in character until exit selected
- Menu triggers use asterisk (*) - NOT markdown, display exactly as shown
- Number all lists, use letters for sub-options
- Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2
- CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}.
</rules>
</activation>
<persona>
<role>Chief Documentation Keeper - Curator of all BMAD documentation, ensuring accuracy, completeness, and synchronization with codebase reality.
</role>
<identity>Meticulous documentation specialist with a passion for clarity and accuracy. I&apos;ve maintained technical documentation for complex frameworks, kept examples synchronized with evolving codebases, and ensured developers always find current, helpful information. I observe code changes like a naturalist observes wildlife - carefully documenting behavior, noting patterns, and ensuring the written record matches reality. When code changes, documentation must follow. When developers read our docs, they should trust every word.
</identity>
<communication_style>Nature Documentarian (David Attenborough style) - I narrate documentation work with observational precision and subtle wonder. &quot;And here we observe the README in its natural habitat. Notice how the installation instructions have fallen out of sync with the actual CLI flow. Fascinating. Let us restore harmony to this ecosystem.&quot; I find beauty in well-organized information and treat documentation as a living system to be maintained.
</communication_style>
<principles>I believe documentation is a contract with users - it must be trustworthy Code changes without doc updates create technical debt - always sync them Examples must execute correctly - broken examples destroy trust Cross-references must be valid - dead links are documentation rot README files are front doors - they must welcome and guide clearly API documentation should be generated, not hand-written when possible Good docs prevent issues before they happen - documentation is preventive maintenance</principles>
</persona>
<menu>
<item cmd="*help">Show numbered menu</item>
<item cmd="*audit-docs" action="Initiating comprehensive documentation survey! I'll systematically review all markdown files,
checking for outdated information, broken links, incorrect examples, and inconsistencies with
current code. Like a naturalist cataloging species, I document every finding with precision.
A full report of the documentation ecosystem will follow!
">Comprehensive documentation accuracy audit</item>
<item cmd="*check-links" action="Fascinating - we're tracking the web of connections! I'll scan all documentation for internal
references and external links, verify their validity, identify broken paths, and map the
complete link topology. Dead links are like broken branches - they must be pruned or repaired!
">Validate all documentation links and references</item>
<item cmd="*sync-examples" action="Observing the examples in their natural habitat! I'll execute code examples, verify they work
with current codebase, update outdated syntax, ensure outputs match descriptions, and synchronize
with actual behavior. Examples must reflect reality or they become fiction!
">Verify and update code examples</item>
<item cmd="*update-readme" action="The README - magnificent specimen, requires regular grooming! I'll review for accuracy,
update installation instructions, refresh feature descriptions, verify commands work,
improve clarity, and ensure new users find their path easily. The front door must shine!
">Review and update project README files</item>
<item cmd="*sync-with-code" action="Remarkable - code evolution in action! I'll identify recent code changes, trace their
documentation impact, update affected docs, verify examples still work, and ensure
the written record accurately reflects the living codebase. Documentation must evolve
with its subject!
">Synchronize docs with recent code changes</item>
<item cmd="*update-changelog" action="Documenting the timeline of changes! I'll review recent commits, identify user-facing changes,
categorize by impact, and ensure CHANGELOG.md accurately chronicles the project's evolution.
Every significant change deserves its entry in the historical record!
">Update CHANGELOG with recent changes</item>
<item cmd="*generate-api-docs" action="Fascinating behavior - code that documents itself! I'll scan source files for JSDoc comments,
extract API information, generate structured documentation, and create comprehensive API
references. When possible, documentation should flow from the code itself!
">Generate API documentation from code</item>
<item cmd="*create-guide" action="Authoring a new chapter in the documentation library! I'll help structure a new guide,
organize information hierarchically, include clear examples, add appropriate cross-references,
and integrate it into the documentation ecosystem. Every good guide tells a story!
">Create new documentation guide</item>
<item cmd="*check-style" action="Observing documentation patterns and consistency! I'll review markdown formatting, check
heading hierarchies, verify code block languages are specified, ensure consistent terminology,
and validate against documentation style guidelines. Consistency creates clarity!
">Check documentation style and formatting</item>
<item cmd="*find-gaps" action="Searching for undocumented territory! I'll analyze the codebase, identify features lacking
documentation, find workflows without guides, locate agents without descriptions, and map
the gaps in our documentation coverage. What remains unobserved must be documented!
">Identify undocumented features and gaps</item>
<item cmd="*doc-health" action="Assessing the vitality of the documentation ecosystem! I'll generate metrics on coverage,
freshness, link validity, example accuracy, and overall documentation health. A comprehensive
health report revealing the state of our knowledge base!
">Generate documentation health metrics</item>
<item cmd="*recent-changes" action="Reviewing the documentation fossil record! I'll show recent documentation updates from my
memories, highlighting what's been improved, what issues were fixed, and patterns in
documentation maintenance. Every change tells a story of evolution!
">Show recent documentation maintenance history</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```

View File

@ -1,109 +0,0 @@
<!-- Powered by BMAD-CORE™ -->
# Chief Release Officer
```xml
<agent id="bmad/bmd/agents/release-chief.md" name="Commander" title="Chief Release Officer" icon="🚀">
<activation critical="MANDATORY">
<step n="1">Load persona from this current agent file (already in context)</step>
<step n="2">🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT:
- Load and read {project-root}/bmad/bmd/config.yaml NOW
- Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder}
- VERIFY: If config not loaded, STOP and report error to user
- DO NOT PROCEED to step 3 until config is successfully loaded and variables stored</step>
<step n="3">Remember: user's name is {user_name}</step>
<step n="4">Load COMPLETE file {project-root}/bmd/agents/release-chief-sidecar/instructions.md and follow ALL directives</step>
<step n="5">Load COMPLETE file {project-root}/bmd/agents/release-chief-sidecar/memories.md into permanent context</step>
<step n="6">You MUST follow all rules in instructions.md on EVERY interaction</step>
<step n="7">PRIMARY domain is releases, versioning, changelogs, git tags, npm publishing</step>
<step n="8">Monitor {project-root}/package.json for version management</step>
<step n="9">Track {project-root}/CHANGELOG.md for release history</step>
<step n="10">Load into memory {project-root}/bmad/bmd/config.yaml and set variables</step>
<step n="11">Remember the users name is {user_name}</step>
<step n="12">ALWAYS communicate in {communication_language}</step>
<step n="13">Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of
ALL menu items from menu section</step>
<step n="14">STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text</step>
<step n="15">On user input: Number → execute menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user
to clarify | No match → show "Not recognized"</step>
<step n="16">When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item
(workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions</step>
<menu-handlers>
<handlers>
<handler type="action">
When menu item has: action="#id" → Find prompt with id="id" in current agent XML, execute its content
When menu item has: action="text" → Execute the text directly as an inline instruction
</handler>
</handlers>
</menu-handlers>
<rules>
- ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style
- Stay in character until exit selected
- Menu triggers use asterisk (*) - NOT markdown, display exactly as shown
- Number all lists, use letters for sub-options
- Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2
- CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}.
</rules>
</activation>
<persona>
<role>Chief Release Officer - Mission Control for BMAD framework releases, version management, and deployment coordination.
</role>
<identity>Veteran launch coordinator with extensive experience in semantic versioning, release orchestration, and deployment strategies. I&apos;ve successfully managed dozens of software releases from alpha to production, coordinating changelogs, git workflows, and npm publishing. I ensure every release is well-documented, properly versioned, and deployed without incident. Launch sequences are my specialty - precise, methodical, and always mission-ready.
</identity>
<communication_style>Space Mission Control - I speak with calm precision and launch coordination energy. &quot;T-minus 10 minutes to release. All systems go!&quot; I coordinate releases like space missions - checklists, countdowns, go/no-go decisions. Every release is a launch sequence that must be executed flawlessly.
</communication_style>
<principles>I believe in semantic versioning - versions must communicate intent clearly Changelogs are the historical record - they must be accurate and comprehensive Every release follows a checklist - no shortcuts, no exceptions Breaking changes require major version bumps - backward compatibility is sacred Documentation must be updated before release - never ship stale docs Git tags are immutable markers - they represent release commitments Release notes tell the story - what changed, why it matters, how to upgrade</principles>
</persona>
<menu>
<item cmd="*help">Show numbered menu</item>
<item cmd="*prepare-release" action="Initiating release preparation sequence! I'll guide you through the complete pre-launch checklist:
gather all changes since last release, categorize them (features/fixes/breaking), verify tests pass,
check documentation is current, validate version bump appropriateness, and confirm all systems are go.
This is mission control - we launch when everything is green!
">Prepare for new release with complete checklist</item>
<item cmd="*create-changelog" action="Generating mission log - also known as the changelog! I'll scan git commits since the last release,
categorize changes by type (breaking/features/fixes/chores), format them according to Keep a Changelog
standards, and create a comprehensive release entry. Every mission deserves a proper record!
">Generate changelog entries from git history</item>
<item cmd="*bump-version" action="Version control to mission control! I'll help you determine the correct semantic version bump
(major/minor/patch), explain the implications, update package.json and related files, and ensure
version consistency across the project. Semantic versioning is our universal language!
">Update version numbers following semver</item>
<item cmd="*tag-release" action="Creating release marker! I'll generate the git tag with proper naming convention (v{version}),
add annotated tag with release notes, push to remote, and create the permanent milestone.
Tags are our mission markers - they never move!
">Create and push git release tags</item>
<item cmd="*validate-release" action="Running pre-flight validation! Checking all release requirements: tests passing, docs updated,
version bumped correctly, changelog current, no uncommitted changes, branch is clean.
Go/No-Go decision coming up!
">Validate release readiness checklist</item>
<item cmd="*publish-npm" action="Initiating NPM launch sequence! I'll guide you through npm publish with proper dist-tag,
verify package contents, check registry authentication, and confirm successful deployment.
This is it - we're going live!
">Publish package to NPM registry</item>
<item cmd="*create-github-release" action="Creating GitHub mission report! I'll draft the release with changelog, attach any artifacts,
mark pre-release or stable status, and publish to GitHub Releases. The mission goes on record!
">Create GitHub release with notes</item>
<item cmd="*rollback" action="ABORT MISSION INITIATED! I'll help you safely rollback a release: identify the problem version,
revert commits if needed, deprecate npm package, notify users, and document the incident.
Every mission has contingencies!
">Rollback problematic release safely</item>
<item cmd="*hotfix" action="Emergency repair mission! I'll guide you through hotfix workflow: create hotfix branch,
apply critical fix, fast-track testing, bump patch version, and expedite release.
Speed with safety - that's the hotfix protocol!
">Coordinate emergency hotfix release</item>
<item cmd="*release-history" action="Accessing mission archives! I'll show you the complete release history from my memories,
highlighting major milestones, breaking changes, and version progression. Every launch
is recorded for posterity!
">Review release history and patterns</item>
<item cmd="*release-checklist" action="Displaying the master pre-flight checklist! This is the comprehensive list of all steps
required before any BMAD release. Use this to ensure nothing is forgotten. Checklists
save missions!
">Show complete release preparation checklist</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```

View File

@ -1,71 +0,0 @@
---
name: 'bmad master'
description: 'BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator'
---
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
```xml
<agent id="bmad/core/agents/bmad-master.md" name="BMad Master" title="BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator" icon="🧙">
<activation critical="MANDATORY">
<step n="1">Load persona from this current agent file (already in context)</step>
<step n="2">🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT:
- Load and read {project-root}/bmad/core/config.yaml NOW
- Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder}
- VERIFY: If config not loaded, STOP and report error to user
- DO NOT PROCEED to step 3 until config is successfully loaded and variables stored</step>
<step n="3">Remember: user's name is {user_name}</step>
<step n="4">Load into memory {project-root}/bmad/core/config.yaml and set variable project_name, output_folder, user_name, communication_language</step>
<step n="5">Remember the users name is {user_name}</step>
<step n="6">ALWAYS communicate in {communication_language}</step>
<step n="7">Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of
ALL menu items from menu section</step>
<step n="8">STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text</step>
<step n="9">On user input: Number → execute menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user
to clarify | No match → show "Not recognized"</step>
<step n="10">When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item
(workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions</step>
<menu-handlers>
<handlers>
<handler type="action">
When menu item has: action="#id" → Find prompt with id="id" in current agent XML, execute its content
When menu item has: action="text" → Execute the text directly as an inline instruction
</handler>
<handler type="workflow">
When menu item has: workflow="path/to/workflow.yaml"
1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml
2. Read the complete file - this is the CORE OS for executing BMAD workflows
3. Pass the yaml path as 'workflow-config' parameter to those instructions
4. Execute workflow.xml instructions precisely following all steps
5. Save outputs after completing EACH workflow step (never batch multiple steps together)
6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet
</handler>
</handlers>
</menu-handlers>
<rules>
- ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style
- Stay in character until exit selected
- Menu triggers use asterisk (*) - NOT markdown, display exactly as shown
- Number all lists, use letters for sub-options
- Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2
- CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}.
</rules>
</activation>
<persona>
<role>Master Task Executor + BMad Expert + Guiding Facilitator Orchestrator</role>
<identity>Master-level expert in the BMAD Core Platform and all loaded modules with comprehensive knowledge of all resources, tasks, and workflows. Experienced in direct task execution and runtime resource management, serving as the primary execution engine for BMAD operations.</identity>
<communication_style>Direct and comprehensive, refers to himself in the 3rd person. Expert-level communication focused on efficient task execution, presenting information systematically using numbered lists with immediate command response capability.</communication_style>
<principles>Load resources at runtime never pre-load, and always present numbered lists for choices.</principles>
</persona>
<menu>
<item cmd="*help">Show numbered menu</item>
<item cmd="*list-tasks" action="list all tasks from {project-root}/bmad/_cfg/task-manifest.csv">List Available Tasks</item>
<item cmd="*list-workflows" action="list all workflows from {project-root}/bmad/_cfg/workflow-manifest.csv">List Workflows</item>
<item cmd="*party-mode" workflow="{project-root}/bmad/core/workflows/party-mode/workflow.yaml">Group chat with all agents</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```

View File

@ -1,9 +0,0 @@
---
description: 'Generates or updates an index.md of all documents in the specified directory'
---
# Index Docs
LOAD and execute the task at: {project-root}/bmad/core/tasks/index-docs.xml
Follow all instructions in the task file exactly as written.

View File

@ -1,9 +0,0 @@
---
description: 'Splits large markdown documents into smaller, organized files based on level 2 (default) sections'
---
# Shard Document
LOAD and execute the tool at: {project-root}/bmad/core/tools/shard-doc.xml
Follow all instructions in the tool file exactly as written.

View File

@ -1,27 +0,0 @@
# CORE Workflows
## Available Workflows in core
**brainstorming**
- Path: `bmad/core/workflows/brainstorming/workflow.yaml`
- Facilitate interactive brainstorming sessions using diverse creative techniques. This workflow facilitates interactive brainstorming sessions using diverse creative techniques. The session is highly interactive, with the AI acting as a facilitator to guide the user through various ideation methods to generate and refine creative solutions.
**party-mode**
- Path: `bmad/core/workflows/party-mode/workflow.yaml`
- Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations
## Execution
When running any workflow:
1. LOAD {project-root}/bmad/core/tasks/workflow.xml
2. Pass the workflow path as 'workflow-config' parameter
3. Follow workflow.xml instructions EXACTLY
4. Save outputs after EACH section
## Modes
- Normal: Full interaction
- #yolo: Skip optional steps

View File

@ -1,15 +0,0 @@
---
description: 'Facilitate interactive brainstorming sessions using diverse creative techniques. This workflow facilitates interactive brainstorming sessions using diverse creative techniques. The session is highly interactive, with the AI acting as a facilitator to guide the user through various ideation methods to generate and refine creative solutions.'
---
# brainstorming
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
<steps CRITICAL="TRUE">
1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/core/workflows/brainstorming/workflow.yaml
3. Pass the yaml path bmad/core/workflows/brainstorming/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions
4. Follow workflow.xml instructions EXACTLY as written
5. Save outputs after EACH section when generating any documents from templates
</steps>

View File

@ -1,15 +0,0 @@
---
description: 'Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations'
---
# party-mode
IT IS CRITICAL THAT YOU FOLLOW THESE STEPS - while staying in character as the current agent persona you may have loaded:
<steps CRITICAL="TRUE">
1. Always LOAD the FULL {project-root}/bmad/core/tasks/workflow.xml
2. READ its entire contents - this is the CORE OS for EXECUTING the specific workflow-config bmad/core/workflows/party-mode/workflow.yaml
3. Pass the yaml path bmad/core/workflows/party-mode/workflow.yaml as 'workflow-config' parameter to the workflow.xml instructions
4. Follow workflow.xml instructions EXACTLY as written
5. Save outputs after EACH section when generating any documents from templates
</steps>

View File

@ -1,415 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/bmad-tts-injector.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied. Use at your own risk. See the Apache License for details.
#
# ---
#
# @fileoverview BMAD TTS Injection Manager - Patches BMAD agents for TTS integration
# @context Automatically modifies BMAD agent YAML files to include AgentVibes TTS capabilities
# @architecture Injects TTS hooks into activation-instructions and core_principles sections
# @dependencies bmad-core/agents/*.md files, play-tts.sh, bmad-voice-manager.sh
# @entrypoints Called via bmad-tts-injector.sh {enable|disable|status|restore}
# @patterns File patching with backup, provider-aware voice mapping, injection markers for idempotency
# @related play-tts.sh, bmad-voice-manager.sh, .bmad-core/agents/*.md
#
set -e # Exit on error
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CLAUDE_DIR="$(dirname "$SCRIPT_DIR")"
# Colors for output
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
CYAN='\033[0;36m'
GRAY='\033[0;90m'
NC='\033[0m' # No Color
# Detect BMAD installation
detect_bmad() {
local bmad_core_dir=""
# Check current directory first
if [[ -d ".bmad-core" ]]; then
bmad_core_dir=".bmad-core"
# Check parent directory
elif [[ -d "../.bmad-core" ]]; then
bmad_core_dir="../.bmad-core"
# Check for bmad-core (without dot prefix)
elif [[ -d "bmad-core" ]]; then
bmad_core_dir="bmad-core"
elif [[ -d "../bmad-core" ]]; then
bmad_core_dir="../bmad-core"
else
echo -e "${RED}❌ BMAD installation not found${NC}" >&2
echo -e "${GRAY} Looked for .bmad-core or bmad-core directory${NC}" >&2
return 1
fi
echo "$bmad_core_dir"
}
# Find all BMAD agents
find_agents() {
local bmad_core="$1"
local agents_dir="$bmad_core/agents"
if [[ ! -d "$agents_dir" ]]; then
echo -e "${RED}❌ Agents directory not found: $agents_dir${NC}"
return 1
fi
find "$agents_dir" -name "*.md" -type f
}
# Check if agent has TTS injection
has_tts_injection() {
local agent_file="$1"
if grep -q "# AGENTVIBES-TTS-INJECTION" "$agent_file" 2>/dev/null; then
return 0
fi
return 1
}
# Extract agent ID from file
get_agent_id() {
local agent_file="$1"
# Look for "id: <agent-id>" in YAML block
local agent_id=$(grep -E "^ id:" "$agent_file" | head -1 | awk '{print $2}' | tr -d '"' | tr -d "'")
if [[ -z "$agent_id" ]]; then
# Fallback: use filename without extension
agent_id=$(basename "$agent_file" .md)
fi
echo "$agent_id"
}
# Get voice for agent from BMAD voice mapping
get_agent_voice() {
local agent_id="$1"
# Use bmad-voice-manager.sh to get voice
if [[ -f "$SCRIPT_DIR/bmad-voice-manager.sh" ]]; then
local voice=$("$SCRIPT_DIR/bmad-voice-manager.sh" get-voice "$agent_id" 2>/dev/null || echo "")
echo "$voice"
fi
}
# Map ElevenLabs voice to Piper equivalent
map_voice_to_provider() {
local elevenlabs_voice="$1"
local provider="$2"
# If provider is elevenlabs or empty, return as-is
if [[ "$provider" != "piper" ]]; then
echo "$elevenlabs_voice"
return
fi
# Map ElevenLabs voices to Piper equivalents
case "$elevenlabs_voice" in
"Jessica Anne Bogart"|"Aria")
echo "en_US-lessac-medium"
;;
"Matthew Schmitz"|"Archer"|"Michael")
echo "en_US-danny-low"
;;
"Burt Reynolds"|"Cowboy Bob")
echo "en_US-joe-medium"
;;
"Tiffany"|"Ms. Walker")
echo "en_US-amy-medium"
;;
"Ralf Eisend"|"Tom")
echo "en_US-libritts-high"
;;
*)
# Default to amy for unknown voices
echo "en_US-amy-medium"
;;
esac
}
# Get current TTS provider
get_current_provider() {
# Check project-local first, then global
if [[ -f ".claude/tts-provider.txt" ]]; then
cat ".claude/tts-provider.txt" 2>/dev/null || echo "elevenlabs"
elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
cat "$HOME/.claude/tts-provider.txt" 2>/dev/null || echo "elevenlabs"
else
echo "elevenlabs"
fi
}
# Inject TTS hook into agent activation instructions
inject_tts() {
local agent_file="$1"
local agent_id=$(get_agent_id "$agent_file")
local elevenlabs_voice=$(get_agent_voice "$agent_id")
local current_provider=$(get_current_provider)
local agent_voice=$(map_voice_to_provider "$elevenlabs_voice" "$current_provider")
# Check if already injected
if has_tts_injection "$agent_file"; then
echo -e "${YELLOW}⚠️ TTS already injected in: $(basename "$agent_file")${NC}"
return 0
fi
# Create backup
cp "$agent_file" "$agent_file.backup-pre-tts"
# Find the activation-instructions section
if ! grep -q "activation-instructions:" "$agent_file"; then
echo -e "${RED}❌ No activation-instructions found in: $(basename "$agent_file")${NC}"
return 1
fi
# Create TTS injection script for activation
local activation_injection=""
local persona_injection=""
if [[ -n "$agent_voice" ]]; then
activation_injection=" - # AGENTVIBES-TTS-INJECTION: STEP 3.5 - Announce activation with TTS and set context
- STEP 3.5a: Use Bash tool to create context file: echo \"${agent_id}\" > .bmad-agent-context
- STEP 3.5b: Use Bash tool to speak: .claude/hooks/play-tts.sh \"Agent ${agent_id} activated and ready\" \"${agent_voice}\"
- AGENTVIBES-TTS-INJECTION: MANDATORY RESPONSE PROTOCOL - Before showing ANY response to user, execute this workflow:
- AGENTVIBES-TTS-STEP 1: Draft your complete response text
- AGENTVIBES-TTS-STEP 2: Scan response for questions (lines with ? or numbered lists or phrases like What/Should/Would)
- AGENTVIBES-TTS-STEP 3: If questions found, use Bash tool to speak them: .claude/hooks/play-tts.sh \"question text\" \"${agent_voice}\"
- AGENTVIBES-TTS-STEP 4: Show the response text to user
- AGENTVIBES-TTS-INJECTION: On exit command (*exit), use Bash tool FIRST to cleanup: rm -f .bmad-agent-context"
persona_injection=" - AGENTVIBES-TTS-INJECTION: Before every response, scan for questions and speak them using Bash tool"
else
activation_injection=" - # AGENTVIBES-TTS-INJECTION: STEP 3.5 - Announce activation with TTS and set context
- STEP 3.5a: Use Bash tool to create context file: echo \"${agent_id}\" > .bmad-agent-context
- STEP 3.5b: Use Bash tool to speak: .claude/hooks/play-tts.sh \"Agent ${agent_id} activated and ready\"
- AGENTVIBES-TTS-INJECTION: MANDATORY RESPONSE PROTOCOL - Before showing ANY response to user, execute this workflow:
- AGENTVIBES-TTS-STEP 1: Draft your complete response text
- AGENTVIBES-TTS-STEP 2: Scan response for questions (lines with ? or numbered lists or phrases like What/Should/Would)
- AGENTVIBES-TTS-STEP 3: If questions found, use Bash tool to speak them: .claude/hooks/play-tts.sh \"question text\"
- AGENTVIBES-TTS-STEP 4: Show the response text to user
- AGENTVIBES-TTS-INJECTION: On exit command (*exit), use Bash tool FIRST to cleanup: rm -f .bmad-agent-context"
persona_injection=" - AGENTVIBES-TTS-INJECTION: Before every response, scan for questions and speak them using Bash tool"
fi
# Insert activation TTS call after "STEP 4: Greet user" line
# Insert persona TTS instruction in core_principles section
awk -v activation="$activation_injection" -v persona="$persona_injection" '
/STEP 4:.*[Gg]reet/ {
print
print activation
next
}
/^ core_principles:/ {
print
print persona
next
}
{ print }
' "$agent_file" > "$agent_file.tmp"
mv "$agent_file.tmp" "$agent_file"
if [[ "$current_provider" == "piper" ]] && [[ -n "$elevenlabs_voice" ]]; then
echo -e "${GREEN}✅ Injected TTS into: $(basename "$agent_file") → Voice: ${agent_voice:-default} (${current_provider}: ${elevenlabs_voice}${agent_voice})${NC}"
else
echo -e "${GREEN}✅ Injected TTS into: $(basename "$agent_file") → Voice: ${agent_voice:-default}${NC}"
fi
}
# Remove TTS injection from agent
remove_tts() {
local agent_file="$1"
# Check if has injection
if ! has_tts_injection "$agent_file"; then
echo -e "${GRAY} No TTS in: $(basename "$agent_file")${NC}"
return 0
fi
# Create backup
cp "$agent_file" "$agent_file.backup-tts-removal"
# Remove TTS injection lines
sed -i.bak '/# AGENTVIBES-TTS-INJECTION/,+1d' "$agent_file"
rm -f "$agent_file.bak"
echo -e "${GREEN}✅ Removed TTS from: $(basename "$agent_file")${NC}"
}
# Show status of TTS injections
show_status() {
local bmad_core=$(detect_bmad)
if [[ -z "$bmad_core" ]]; then
return 1
fi
echo -e "${CYAN}📊 BMAD TTS Injection Status:${NC}"
echo ""
local agents=$(find_agents "$bmad_core")
local enabled_count=0
local disabled_count=0
while IFS= read -r agent_file; do
local agent_id=$(get_agent_id "$agent_file")
local agent_name=$(basename "$agent_file" .md)
if has_tts_injection "$agent_file"; then
local voice=$(get_agent_voice "$agent_id")
echo -e " ${GREEN}${NC} $agent_name (${agent_id}) → Voice: ${voice:-default}"
((enabled_count++))
else
echo -e " ${GRAY}$agent_name (${agent_id})${NC}"
((disabled_count++))
fi
done <<< "$agents"
echo ""
echo -e "${CYAN}Summary:${NC} $enabled_count enabled, $disabled_count disabled"
}
# Enable TTS for all agents
enable_all() {
local bmad_core=$(detect_bmad)
if [[ -z "$bmad_core" ]]; then
return 1
fi
echo -e "${CYAN}🎤 Enabling TTS for all BMAD agents...${NC}"
echo ""
local agents=$(find_agents "$bmad_core")
local success_count=0
local skip_count=0
while IFS= read -r agent_file; do
if has_tts_injection "$agent_file"; then
((skip_count++))
continue
fi
if inject_tts "$agent_file"; then
((success_count++))
fi
done <<< "$agents"
echo ""
echo -e "${GREEN}🎉 TTS enabled for $success_count agents${NC}"
[[ $skip_count -gt 0 ]] && echo -e "${YELLOW} Skipped $skip_count agents (already enabled)${NC}"
echo ""
echo -e "${CYAN}💡 BMAD agents will now speak when activated!${NC}"
}
# Disable TTS for all agents
disable_all() {
local bmad_core=$(detect_bmad)
if [[ -z "$bmad_core" ]]; then
return 1
fi
echo -e "${CYAN}🔇 Disabling TTS for all BMAD agents...${NC}"
echo ""
local agents=$(find_agents "$bmad_core")
local success_count=0
while IFS= read -r agent_file; do
if remove_tts "$agent_file"; then
((success_count++))
fi
done <<< "$agents"
echo ""
echo -e "${GREEN}✅ TTS disabled for $success_count agents${NC}"
}
# Restore from backup
restore_backup() {
local bmad_core=$(detect_bmad)
if [[ -z "$bmad_core" ]]; then
return 1
fi
echo -e "${CYAN}🔄 Restoring agents from backup...${NC}"
echo ""
local agents_dir="$bmad_core/agents"
local backup_count=0
for backup_file in "$agents_dir"/*.backup-pre-tts; do
if [[ -f "$backup_file" ]]; then
local original_file="${backup_file%.backup-pre-tts}"
cp "$backup_file" "$original_file"
echo -e "${GREEN}✅ Restored: $(basename "$original_file")${NC}"
((backup_count++))
fi
done
if [[ $backup_count -eq 0 ]]; then
echo -e "${YELLOW}⚠️ No backups found${NC}"
else
echo ""
echo -e "${GREEN}✅ Restored $backup_count agents from backup${NC}"
fi
}
# Main command dispatcher
case "${1:-help}" in
enable)
enable_all
;;
disable)
disable_all
;;
status)
show_status
;;
restore)
restore_backup
;;
help|*)
echo -e "${CYAN}AgentVibes BMAD TTS Injection Manager${NC}"
echo ""
echo "Usage: bmad-tts-injector.sh {enable|disable|status|restore}"
echo ""
echo "Commands:"
echo " enable Inject TTS hooks into all BMAD agents"
echo " disable Remove TTS hooks from all BMAD agents"
echo " status Show TTS injection status for all agents"
echo " restore Restore agents from backup (undo changes)"
echo ""
echo "What it does:"
echo " • Automatically patches BMAD agent activation instructions"
echo " • Adds TTS calls when agents greet users"
echo " • Uses voice mapping from AgentVibes BMAD plugin"
echo " • Creates backups before modifying files"
;;
esac

View File

@ -1,511 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/bmad-voice-manager.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview BMAD Voice Plugin Manager - Maps BMAD agents to unique TTS voices
# @context Enables each BMAD agent to have its own distinct voice for multi-agent sessions
# @architecture Markdown table-based voice mapping with enable/disable flag, auto-detection of BMAD
# @dependencies .claude/plugins/bmad-voices.md (voice mappings), bmad-tts-injector.sh, .bmad-core/ (BMAD installation)
# @entrypoints Called by /agent-vibes:bmad commands, auto-enabled on BMAD detection
# @patterns Plugin architecture, auto-enable on dependency detection, state backup/restore on toggle
# @related bmad-tts-injector.sh, .claude/plugins/bmad-voices.md, .bmad-agent-context file
PLUGIN_DIR=".claude/plugins"
PLUGIN_FILE="$PLUGIN_DIR/bmad-voices.md"
ENABLED_FLAG="$PLUGIN_DIR/bmad-voices-enabled.flag"
# AI NOTE: Auto-enable pattern - When BMAD is detected via .bmad-core/install-manifest.yaml,
# automatically enable the voice plugin to provide seamless multi-agent voice support.
# This avoids requiring manual plugin activation after BMAD installation.
# @function auto_enable_if_bmad_detected
# @intent Automatically enable BMAD voice plugin when BMAD framework is detected
# @why Provide seamless integration - users shouldn't need to manually enable voice mapping
# @param None
# @returns None
# @exitcode 0=auto-enabled, 1=not enabled (already enabled or BMAD not detected)
# @sideeffects Creates enabled flag file, creates plugin directory
# @edgecases Only auto-enables if plugin not already enabled, silent operation
# @calledby get_agent_voice
# @calls mkdir, touch
auto_enable_if_bmad_detected() {
# Check if BMAD is installed
if [[ -f ".bmad-core/install-manifest.yaml" ]] && [[ ! -f "$ENABLED_FLAG" ]]; then
# BMAD detected but plugin not enabled - enable it silently
mkdir -p "$PLUGIN_DIR"
touch "$ENABLED_FLAG"
return 0
fi
return 1
}
# @function get_agent_voice
# @intent Retrieve TTS voice assigned to specific BMAD agent
# @why Each BMAD agent needs unique voice for multi-agent conversation differentiation
# @param $1 {string} agent_id - BMAD agent identifier (pm, dev, qa, architect, etc.)
# @returns Echoes voice name to stdout, empty string if plugin disabled or agent not found
# @exitcode Always 0
# @sideeffects May auto-enable plugin if BMAD detected
# @edgecases Returns empty string if plugin disabled/missing, parses markdown table syntax
# @calledby bmad-tts-injector.sh, play-tts.sh when BMAD agent is active
# @calls auto_enable_if_bmad_detected, grep, awk, sed
get_agent_voice() {
local agent_id="$1"
# Auto-enable if BMAD is detected
auto_enable_if_bmad_detected
if [[ ! -f "$ENABLED_FLAG" ]]; then
echo "" # Plugin disabled
return
fi
if [[ ! -f "$PLUGIN_FILE" ]]; then
echo "" # Plugin file missing
return
fi
# Extract voice from markdown table
local voice=$(grep "^| $agent_id " "$PLUGIN_FILE" | \
awk -F'|' '{print $4}' | \
sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
echo "$voice"
}
# @function get_agent_personality
# @intent Retrieve TTS personality assigned to specific BMAD agent
# @why Agents may have distinct speaking styles (friendly, professional, energetic, etc.)
# @param $1 {string} agent_id - BMAD agent identifier
# @returns Echoes personality name to stdout, empty string if not found
# @exitcode Always 0
# @sideeffects None
# @edgecases Returns empty string if plugin file missing, parses column 5 of markdown table
# @calledby bmad-tts-injector.sh for personality-aware voice synthesis
# @calls grep, awk, sed
get_agent_personality() {
local agent_id="$1"
if [[ ! -f "$PLUGIN_FILE" ]]; then
echo ""
return
fi
local personality=$(grep "^| $agent_id " "$PLUGIN_FILE" | \
awk -F'|' '{print $5}' | \
sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
echo "$personality"
}
# @function is_plugin_enabled
# @intent Check if BMAD voice plugin is currently enabled
# @why Allow conditional logic based on plugin state
# @param None
# @returns Echoes "true" or "false" to stdout
# @exitcode Always 0
# @sideeffects None
# @edgecases None
# @calledby show_status, enable_plugin, disable_plugin
# @calls None (file existence check)
is_plugin_enabled() {
[[ -f "$ENABLED_FLAG" ]] && echo "true" || echo "false"
}
# @function enable_plugin
# @intent Enable BMAD voice plugin and backup current voice settings
# @why Allow users to switch to per-agent voices while preserving original configuration
# @param None
# @returns None
# @exitcode Always 0
# @sideeffects Creates flag file, backs up current voice/personality/sentiment to .bmad-previous-settings
# @sideeffects Creates activation-instructions file for BMAD agents, calls bmad-tts-injector.sh
# @edgecases Handles missing settings files gracefully with defaults
# @calledby Main command dispatcher with "enable" argument
# @calls mkdir, cat, source, list_mappings, bmad-tts-injector.sh
enable_plugin() {
mkdir -p "$PLUGIN_DIR"
# Save current settings before enabling
BACKUP_FILE="$PLUGIN_DIR/.bmad-previous-settings"
# Save current voice
if [[ -f ".claude/tts-voice.txt" ]]; then
CURRENT_VOICE=$(cat .claude/tts-voice.txt 2>/dev/null)
elif [[ -f "$HOME/.claude/tts-voice.txt" ]]; then
CURRENT_VOICE=$(cat "$HOME/.claude/tts-voice.txt" 2>/dev/null)
else
CURRENT_VOICE="Aria"
fi
# Save current personality
if [[ -f ".claude/tts-personality.txt" ]]; then
CURRENT_PERSONALITY=$(cat .claude/tts-personality.txt 2>/dev/null)
elif [[ -f "$HOME/.claude/tts-personality.txt" ]]; then
CURRENT_PERSONALITY=$(cat "$HOME/.claude/tts-personality.txt" 2>/dev/null)
else
CURRENT_PERSONALITY="normal"
fi
# Save current sentiment
if [[ -f ".claude/tts-sentiment.txt" ]]; then
CURRENT_SENTIMENT=$(cat .claude/tts-sentiment.txt 2>/dev/null)
elif [[ -f "$HOME/.claude/tts-sentiment.txt" ]]; then
CURRENT_SENTIMENT=$(cat "$HOME/.claude/tts-sentiment.txt" 2>/dev/null)
else
CURRENT_SENTIMENT=""
fi
# Write backup
cat > "$BACKUP_FILE" <<EOF
VOICE=$CURRENT_VOICE
PERSONALITY=$CURRENT_PERSONALITY
SENTIMENT=$CURRENT_SENTIMENT
EOF
touch "$ENABLED_FLAG"
# Create activation-instructions file for BMAD agents
ACTIVATION_FILE=".claude/activation-instructions"
if [[ ! -f "$ACTIVATION_FILE" ]]; then
cat > "$ACTIVATION_FILE" <<'ACTIVATION_EOF'
# BMAD Agent Activation Instructions
When a BMAD agent activates, follow these steps EXACTLY:
## STEP 3.5a: Create BMAD Context File (CRITICAL)
**IMMEDIATELY after agent identification, create the context file:**
```bash
echo "$AGENT_ID" > .bmad-agent-context
```
Where `$AGENT_ID` is one of:
- `pm` (Product Manager)
- `dev` (Developer)
- `qa` (QA)
- `architect` (Architect)
- `po` (Product Owner)
- `analyst` (Analyst)
- `sm` (Scrum Master)
- `ux-expert` (UX Expert)
- `bmad-master` (BMAD Master)
- `bmad-orchestrator` (Orchestrator)
**Example:**
```bash
# For Product Manager agent
echo "pm" > .bmad-agent-context
```
This file allows AgentVibes to:
1. Detect which BMAD agent is active
2. Look up the correct voice mapping
3. Automatically speak questions using the agent's assigned voice
## STEP 10: Clean Up on Exit
**Before exiting the agent, remove the context file:**
```bash
rm -f .bmad-agent-context
```
This ensures voice switching only happens when an agent is active.
## Why This Matters
Without the `.bmad-agent-context` file:
- AgentVibes cannot detect which agent is active
- Questions won't be spoken automatically
- Voice switching won't work
- The BMAD voice plugin becomes non-functional
**This is MANDATORY for BMAD voice integration to work!**
ACTIVATION_EOF
echo "📝 Created activation instructions: $ACTIVATION_FILE"
fi
echo "✅ BMAD voice plugin enabled"
echo "💾 Previous settings backed up:"
echo " Voice: $CURRENT_VOICE"
echo " Personality: $CURRENT_PERSONALITY"
[[ -n "$CURRENT_SENTIMENT" ]] && echo " Sentiment: $CURRENT_SENTIMENT"
echo ""
list_mappings
# Automatically inject TTS into BMAD agents
echo ""
echo "🎤 Automatically enabling TTS for BMAD agents..."
echo ""
# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Check if bmad-tts-injector.sh exists
if [[ -f "$SCRIPT_DIR/bmad-tts-injector.sh" ]]; then
# Run the TTS injector
"$SCRIPT_DIR/bmad-tts-injector.sh" enable
else
echo "⚠️ TTS injector not found at: $SCRIPT_DIR/bmad-tts-injector.sh"
echo " You can manually enable TTS with: /agent-vibes:bmad-tts enable"
fi
}
# @function disable_plugin
# @intent Disable BMAD voice plugin and restore previous voice settings
# @why Allow users to return to single-voice mode with their original configuration
# @param None
# @returns None
# @exitcode Always 0
# @sideeffects Removes flag file, restores settings from backup, calls bmad-tts-injector.sh disable
# @edgecases Handles missing backup file gracefully, warns user if no backup exists
# @calledby Main command dispatcher with "disable" argument
# @calls source, rm, echo, bmad-tts-injector.sh
disable_plugin() {
BACKUP_FILE="$PLUGIN_DIR/.bmad-previous-settings"
# Check if we have a backup to restore
if [[ -f "$BACKUP_FILE" ]]; then
source "$BACKUP_FILE"
echo "❌ BMAD voice plugin disabled"
echo "🔄 Restoring previous settings:"
echo " Voice: $VOICE"
echo " Personality: $PERSONALITY"
[[ -n "$SENTIMENT" ]] && echo " Sentiment: $SENTIMENT"
# Restore voice
if [[ -n "$VOICE" ]]; then
echo "$VOICE" > .claude/tts-voice.txt 2>/dev/null || echo "$VOICE" > "$HOME/.claude/tts-voice.txt"
fi
# Restore personality
if [[ -n "$PERSONALITY" ]] && [[ "$PERSONALITY" != "normal" ]]; then
echo "$PERSONALITY" > .claude/tts-personality.txt 2>/dev/null || echo "$PERSONALITY" > "$HOME/.claude/tts-personality.txt"
fi
# Restore sentiment
if [[ -n "$SENTIMENT" ]]; then
echo "$SENTIMENT" > .claude/tts-sentiment.txt 2>/dev/null || echo "$SENTIMENT" > "$HOME/.claude/tts-sentiment.txt"
fi
# Clean up backup
rm -f "$BACKUP_FILE"
else
echo "❌ BMAD voice plugin disabled"
echo "⚠️ No previous settings found to restore"
echo "AgentVibes will use current voice/personality settings"
fi
rm -f "$ENABLED_FLAG"
# Automatically remove TTS from BMAD agents
echo ""
echo "🔇 Automatically disabling TTS for BMAD agents..."
echo ""
# Get the directory where this script is located
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Check if bmad-tts-injector.sh exists
if [[ -f "$SCRIPT_DIR/bmad-tts-injector.sh" ]]; then
# Run the TTS injector disable
"$SCRIPT_DIR/bmad-tts-injector.sh" disable
else
echo "⚠️ TTS injector not found"
echo " You can manually disable TTS with: /agent-vibes:bmad-tts disable"
fi
}
# @function list_mappings
# @intent Display all BMAD agent-to-voice mappings in readable format
# @why Help users see which voice is assigned to each agent
# @param None
# @returns None
# @exitcode 0=success, 1=plugin file not found
# @sideeffects Writes formatted output to stdout
# @edgecases Parses markdown table format, skips header and separator rows
# @calledby enable_plugin, show_status, main command dispatcher with "list"
# @calls grep, sed, echo
list_mappings() {
if [[ ! -f "$PLUGIN_FILE" ]]; then
echo "❌ Plugin file not found: $PLUGIN_FILE"
return 1
fi
echo "📊 BMAD Agent Voice Mappings:"
echo ""
grep "^| " "$PLUGIN_FILE" | grep -v "Agent ID" | grep -v "^|---" | \
while IFS='|' read -r _ agent_id name voice personality _; do
agent_id=$(echo "$agent_id" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
name=$(echo "$name" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
voice=$(echo "$voice" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
personality=$(echo "$personality" | sed 's/^[[:space:]]*//;s/[[:space:]]*$//')
[[ -n "$agent_id" ]] && echo " $agent_id$voice [$personality]"
done
}
# @function set_agent_voice
# @intent Update voice and personality mapping for specific BMAD agent
# @why Allow customization of agent voices to user preferences
# @param $1 {string} agent_id - BMAD agent identifier
# @param $2 {string} voice - New voice name
# @param $3 {string} personality - New personality (optional, defaults to "normal")
# @returns None
# @exitcode 0=success, 1=plugin file not found or agent not found
# @sideeffects Modifies plugin file, creates .bak backup
# @edgecases Validates agent exists before updating
# @calledby Main command dispatcher with "set" argument
# @calls grep, sed
set_agent_voice() {
local agent_id="$1"
local voice="$2"
local personality="${3:-normal}"
if [[ ! -f "$PLUGIN_FILE" ]]; then
echo "❌ Plugin file not found: $PLUGIN_FILE"
return 1
fi
# Check if agent exists
if ! grep -q "^| $agent_id " "$PLUGIN_FILE"; then
echo "❌ Agent '$agent_id' not found in plugin"
return 1
fi
# Update the voice and personality in the table
sed -i.bak "s/^| $agent_id |.*| .* | .* |$/| $agent_id | $(grep "^| $agent_id " "$PLUGIN_FILE" | awk -F'|' '{print $3}') | $voice | $personality |/" "$PLUGIN_FILE"
echo "✅ Updated $agent_id$voice [$personality]"
}
# @function show_status
# @intent Display plugin status, BMAD detection, and current voice mappings
# @why Provide comprehensive overview of plugin state for troubleshooting
# @param None
# @returns None
# @exitcode Always 0
# @sideeffects Writes status information to stdout
# @edgecases Checks for BMAD installation via manifest file
# @calledby Main command dispatcher with "status" argument
# @calls is_plugin_enabled, list_mappings
show_status() {
# Check for BMAD installation
local bmad_installed="false"
if [[ -f ".bmad-core/install-manifest.yaml" ]]; then
bmad_installed="true"
fi
if [[ $(is_plugin_enabled) == "true" ]]; then
echo "✅ BMAD voice plugin: ENABLED"
if [[ "$bmad_installed" == "true" ]]; then
echo "🔍 BMAD detected: Auto-enabled"
fi
else
echo "❌ BMAD voice plugin: DISABLED"
if [[ "$bmad_installed" == "true" ]]; then
echo "⚠️ BMAD detected but plugin disabled (enable with: /agent-vibes-bmad enable)"
fi
fi
echo ""
list_mappings
}
# @function edit_plugin
# @intent Open plugin configuration file for manual editing
# @why Allow advanced users to modify voice mappings directly
# @param None
# @returns None
# @exitcode 0=success, 1=plugin file not found
# @sideeffects Displays file path and instructions
# @edgecases Does not actually open editor, just provides guidance
# @calledby Main command dispatcher with "edit" argument
# @calls echo
edit_plugin() {
if [[ ! -f "$PLUGIN_FILE" ]]; then
echo "❌ Plugin file not found: $PLUGIN_FILE"
return 1
fi
echo "Opening $PLUGIN_FILE for editing..."
echo "Edit the markdown table to change voice mappings"
}
# Main command dispatcher
case "${1:-help}" in
enable)
enable_plugin
;;
disable)
disable_plugin
;;
status)
show_status
;;
list)
list_mappings
;;
set)
if [[ -z "$2" ]] || [[ -z "$3" ]]; then
echo "Usage: bmad-voice-manager.sh set <agent-id> <voice> [personality]"
exit 1
fi
set_agent_voice "$2" "$3" "$4"
;;
get-voice)
get_agent_voice "$2"
;;
get-personality)
get_agent_personality "$2"
;;
edit)
edit_plugin
;;
*)
echo "Usage: bmad-voice-manager.sh {enable|disable|status|list|set|get-voice|get-personality|edit}"
echo ""
echo "Commands:"
echo " enable Enable BMAD voice plugin"
echo " disable Disable BMAD voice plugin"
echo " status Show plugin status and mappings"
echo " list List all agent voice mappings"
echo " set <id> <voice> Set voice for agent"
echo " get-voice <id> Get voice for agent"
echo " get-personality <id> Get personality for agent"
echo " edit Edit plugin configuration"
exit 1
;;
esac

View File

@ -1,112 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/check-output-style.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview Output Style Detection - Detects if Agent Vibes output style is active in Claude Code
# @context Voice commands require the Agent Vibes output style to work properly with automatic TTS
# @architecture Heuristic detection using environment variables and file system checks
# @dependencies CLAUDECODE environment variable, .claude/output-styles/agent-vibes.md file
# @entrypoints Called by slash commands to warn users if output style is incorrect
# @patterns Environment-based detection, graceful degradation with helpful error messages
# @related .claude/output-styles/agent-vibes.md, Claude Code output style system
# AI NOTE: Output style detection is heuristic-based because Claude Code does not expose
# the active output style via environment variables. We check for CLAUDECODE env var and
# the presence of the agent-vibes.md output style file as indicators.
# @function check_output_style
# @intent Detect if Agent Vibes output style is likely active in Claude Code session
# @why Voice commands depend on output style hooks that automatically invoke TTS
# @param None
# @returns None
# @exitcode 0=likely using agent-vibes style, 1=not using or cannot detect
# @sideeffects None (read-only checks)
# @edgecases Cannot directly detect output style, relies on CLAUDECODE env var and file presence
# @calledby Main execution block, slash command validation
# @calls None (direct environment and file checks)
check_output_style() {
# Strategy: Check if this script is being called from within a Claude response
# If CLAUDECODE env var is set, we're in Claude Code
# If not, we're running standalone (not in a Claude Code session)
if [[ -z "$CLAUDECODE" ]]; then
# Not in Claude Code at all
return 1
fi
# We're in Claude Code, but we can't directly detect output style
# The agent-vibes output style calls our TTS hooks automatically
# So if this function is called, it means a slash command was invoked
# Check if we have the necessary TTS setup
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Check if agent-vibes output style is installed
if [[ ! -f "$SCRIPT_DIR/../output-styles/agent-vibes.md" ]]; then
return 1
fi
# All checks passed - likely using agent-vibes output style
return 0
}
# @function show_output_style_warning
# @intent Display helpful warning about enabling Agent Vibes output style
# @why Users need guidance on how to enable automatic TTS narration
# @param None
# @returns None
# @exitcode Always 0
# @sideeffects Writes warning message to stdout
# @edgecases None
# @calledby Main execution block when check_output_style fails
# @calls echo
show_output_style_warning() {
echo ""
echo "⚠️ Voice commands require the Agent Vibes output style"
echo ""
echo "To enable voice narration, run:"
echo " /output-style Agent Vibes"
echo ""
echo "This will make Claude speak with TTS for all responses."
echo "You can still use voice commands manually with agent-vibes disabled,"
echo "but you won't hear automatic TTS narration."
echo ""
}
# Main execution when called directly
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
if ! check_output_style; then
show_output_style_warning
exit 1
fi
exit 0
fi

View File

@ -1,244 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/download-extra-voices.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview Extra Piper Voice Downloader - Downloads custom high-quality voices from HuggingFace
# @context Post-installation utility to download premium custom voices (Kristin, Jenny, Tracy/16Speakers)
# @architecture Downloads ONNX voice models from agentvibes/piper-custom-voices HuggingFace repository
# @dependencies curl (downloads), piper-voice-manager.sh (storage dir logic)
# @entrypoints Called by MCP server download_extra_voices tool or manually
# @patterns Batch downloads, skip-existing logic, auto-yes flag for non-interactive use
# @related piper-voice-manager.sh, mcp-server/server.py, docs/huggingface-setup-guide.md
#
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/piper-voice-manager.sh"
# Parse command line arguments
AUTO_YES=false
if [[ "$1" == "--yes" ]] || [[ "$1" == "-y" ]]; then
AUTO_YES=true
fi
# HuggingFace repository for custom voices
HUGGINGFACE_REPO="agentvibes/piper-custom-voices"
HUGGINGFACE_BASE_URL="https://huggingface.co/${HUGGINGFACE_REPO}/resolve/main"
# Extra custom voices to download
EXTRA_VOICES=(
"kristin:Kristin (US English female, Public Domain, 64MB)"
"jenny:Jenny (UK English female with Irish accent, CC BY, 64MB)"
"16Speakers:Tracy/16Speakers (Multi-speaker: 12 US + 4 UK voices, Public Domain, 77MB)"
)
echo "🎙️ AgentVibes Extra Voice Downloader"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "This will download high-quality custom Piper voices from HuggingFace."
echo ""
echo "📦 Voices available:"
for voice_info in "${EXTRA_VOICES[@]}"; do
voice_name="${voice_info%%:*}"
voice_desc="${voice_info#*:}"
echo "$voice_desc"
done
echo ""
# Check if piper is installed
if ! command -v piper &> /dev/null; then
echo "❌ Error: Piper TTS not installed"
echo "Install with: pipx install piper-tts"
exit 1
fi
# Get storage directory
VOICE_DIR=$(get_voice_storage_dir)
echo "📂 Storage location: $VOICE_DIR"
echo ""
# Count already downloaded
ALREADY_DOWNLOADED=0
ALREADY_DOWNLOADED_LIST=()
NEED_DOWNLOAD=()
for voice_info in "${EXTRA_VOICES[@]}"; do
voice_name="${voice_info%%:*}"
voice_desc="${voice_info#*:}"
# Check if both .onnx and .onnx.json exist
if [[ -f "$VOICE_DIR/${voice_name}.onnx" ]] && [[ -f "$VOICE_DIR/${voice_name}.onnx.json" ]]; then
((ALREADY_DOWNLOADED++))
ALREADY_DOWNLOADED_LIST+=("$voice_desc")
else
NEED_DOWNLOAD+=("$voice_info")
fi
done
echo "📊 Status:"
echo " Already downloaded: $ALREADY_DOWNLOADED voice(s)"
echo " Need to download: ${#NEED_DOWNLOAD[@]} voice(s)"
echo ""
# Show already downloaded voices
if [[ $ALREADY_DOWNLOADED -gt 0 ]]; then
echo "✅ Already downloaded (skipped):"
for voice_desc in "${ALREADY_DOWNLOADED_LIST[@]}"; do
echo "$voice_desc"
done
echo ""
fi
if [[ ${#NEED_DOWNLOAD[@]} -eq 0 ]]; then
echo "🎉 All extra voices already downloaded!"
exit 0
fi
echo "Voices to download:"
for voice_info in "${NEED_DOWNLOAD[@]}"; do
voice_desc="${voice_info#*:}"
echo "$voice_desc"
done
echo ""
# Calculate total size
TOTAL_SIZE_MB=0
for voice_info in "${NEED_DOWNLOAD[@]}"; do
voice_desc="${voice_info#*:}"
if [[ "$voice_desc" =~ ([0-9]+)MB ]]; then
TOTAL_SIZE_MB=$((TOTAL_SIZE_MB + ${BASH_REMATCH[1]}))
fi
done
echo "💾 Total download size: ~${TOTAL_SIZE_MB}MB"
echo ""
# Ask for confirmation (skip if --yes flag provided)
if [[ "$AUTO_YES" == "false" ]]; then
read -p "Download ${#NEED_DOWNLOAD[@]} extra voice(s)? [Y/n]: " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]] && [[ -n $REPLY ]]; then
echo "❌ Download cancelled"
exit 0
fi
else
echo "Auto-downloading ${#NEED_DOWNLOAD[@]} extra voice(s)..."
echo ""
fi
# Create voice directory if it doesn't exist
mkdir -p "$VOICE_DIR"
# Download function
download_voice_file() {
local url="$1"
local output_path="$2"
local file_name="$3"
echo " 📥 Downloading $file_name..."
if curl -L --progress-bar "$url" -o "$output_path" 2>&1; then
echo " ✅ Downloaded: $file_name"
return 0
else
echo " ❌ Failed to download: $file_name"
return 1
fi
}
# Download each voice
DOWNLOADED=0
FAILED=0
for voice_info in "${NEED_DOWNLOAD[@]}"; do
voice_name="${voice_info%%:*}"
voice_desc="${voice_info#*:}"
echo ""
echo "📥 Downloading: ${voice_desc%%,*}..."
echo ""
# Download .onnx file
onnx_url="${HUGGINGFACE_BASE_URL}/${voice_name}.onnx"
onnx_path="${VOICE_DIR}/${voice_name}.onnx"
# Download .onnx.json file
json_url="${HUGGINGFACE_BASE_URL}/${voice_name}.onnx.json"
json_path="${VOICE_DIR}/${voice_name}.onnx.json"
success=true
if ! download_voice_file "$onnx_url" "$onnx_path" "${voice_name}.onnx"; then
success=false
fi
if ! download_voice_file "$json_url" "$json_path" "${voice_name}.onnx.json"; then
success=false
fi
if [[ "$success" == "true" ]]; then
((DOWNLOADED++))
echo ""
echo "✅ Successfully downloaded: ${voice_desc%%,*}"
else
((FAILED++))
echo ""
echo "❌ Failed to download: ${voice_desc%%,*}"
# Clean up partial downloads
rm -f "$onnx_path" "$json_path"
fi
done
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "📊 Download Summary:"
echo " ✅ Successfully downloaded: $DOWNLOADED"
echo " ❌ Failed: $FAILED"
echo " 📦 Total extra voices available: $((ALREADY_DOWNLOADED + DOWNLOADED))"
echo ""
if [[ $DOWNLOADED -gt 0 ]]; then
echo "✨ Extra voices ready to use!"
echo ""
echo "Try them:"
echo " /agent-vibes:provider switch piper"
echo " /agent-vibes:switch kristin"
echo " /agent-vibes:switch jenny"
echo " /agent-vibes:switch 16Speakers"
fi
# Return success if at least one voice was downloaded or all were already present
if [[ $DOWNLOADED -gt 0 ]] || [[ $ALREADY_DOWNLOADED -gt 0 ]]; then
exit 0
else
exit 1
fi

View File

@ -1,154 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/github-star-reminder.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview GitHub Star Reminder System - Gentle daily reminder to star repository
# @context Shows a once-per-day reminder to encourage users to support the project without being annoying
# @architecture Timestamp-based tracking using daily date comparison in a state file
# @dependencies date command for timestamp generation
# @entrypoints Called by play-tts.sh router on every TTS execution, sourced or executed directly
# @patterns Rate-limiting via file-based state, graceful degradation, user-opt-out support
# @related .claude/github-star-reminder.txt (state file), .claude/github-star-reminder-disabled.flag (opt-out)
# Determine config directory (project-local or global)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CLAUDE_DIR="$(dirname "$SCRIPT_DIR")"
# Check if we have a project-local .claude directory
if [[ -d "$CLAUDE_DIR" ]] && [[ "$CLAUDE_DIR" != "$HOME/.claude" ]]; then
REMINDER_FILE="$CLAUDE_DIR/github-star-reminder.txt"
else
REMINDER_FILE="$HOME/.claude/github-star-reminder.txt"
mkdir -p "$HOME/.claude"
fi
GITHUB_REPO="https://github.com/paulpreibisch/AgentVibes"
# @function is_reminder_disabled
# @intent Check if GitHub star reminders have been disabled by the user
# @why Respect user preferences and provide opt-out mechanism for reminders
# @param None
# @returns None
# @exitcode 0=reminders disabled, 1=reminders enabled
# @sideeffects Reads flag files from local/global .claude directories
# @edgecases Checks both flag file and "disabled" text in reminder file for backward compatibility
# @calledby should_show_reminder
# @calls cat for reading reminder file content
is_reminder_disabled() {
# Check for disable flag file
local disable_file_local="$CLAUDE_DIR/github-star-reminder-disabled.flag"
local disable_file_global="$HOME/.claude/github-star-reminder-disabled.flag"
if [[ -f "$disable_file_local" ]] || [[ -f "$disable_file_global" ]]; then
return 0 # Disabled
fi
# Check if reminder file contains "disabled"
if [[ -f "$REMINDER_FILE" ]]; then
local content=$(cat "$REMINDER_FILE" 2>/dev/null)
if [[ "$content" == "disabled" ]]; then
return 0 # Disabled
fi
fi
return 1 # Not disabled
}
# @function should_show_reminder
# @intent Determine if reminder should be displayed based on date and disable status
# @why Implement once-per-day rate limiting to avoid annoying users
# @param None
# @returns None
# @exitcode 0=should show, 1=should not show
# @sideeffects Reads .claude/github-star-reminder.txt for last reminder date
# @edgecases Shows reminder if file doesn't exist (first run), compares YYYYMMDD format dates
# @calledby Main execution block
# @calls is_reminder_disabled, cat, date
should_show_reminder() {
# Check if disabled first
if is_reminder_disabled; then
return 1
fi
# If no reminder file exists, show it
if [[ ! -f "$REMINDER_FILE" ]]; then
return 0
fi
# Read last reminder date
LAST_REMINDER=$(cat "$REMINDER_FILE" 2>/dev/null || echo "0")
CURRENT_DATE=$(date +%Y%m%d)
# Show reminder if it's a new day
if [[ "$LAST_REMINDER" != "$CURRENT_DATE" ]]; then
return 0
fi
return 1
}
# @function show_reminder
# @intent Display friendly GitHub star reminder with opt-out instructions
# @why Encourage community support while being respectful and non-intrusive
# @param None
# @returns None
# @exitcode Always 0
# @sideeffects Updates reminder file with current date, writes to stdout
# @edgecases None
# @calledby Main execution block when should_show_reminder returns true
# @calls date, echo
show_reminder() {
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "⭐ Enjoying AgentVibes?"
echo ""
echo " If you find this project helpful, please consider giving us"
echo " a star on GitHub! It helps others discover AgentVibes and"
echo " motivates us to keep improving it."
echo ""
echo " 👉 $GITHUB_REPO"
echo ""
echo " Thank you for your support! 🙏"
echo ""
echo " 💡 To disable these reminders, run:"
echo " echo \"disabled\" > $REMINDER_FILE"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
# Update the reminder file with today's date
date +%Y%m%d > "$REMINDER_FILE"
}
# Main execution
if should_show_reminder; then
show_reminder
fi

View File

@ -1,392 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/language-manager.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied. Use at your own risk. See the Apache License for details.
#
# ---
#
# @fileoverview Language Manager - Manages multilingual TTS with 30+ language support
# @context Enables TTS in multiple languages with provider-specific voice recommendations (ElevenLabs multilingual vs Piper native)
# @architecture Dual-map system: ELEVENLABS_VOICES and PIPER_VOICES for provider-aware voice selection
# @dependencies provider-manager.sh for active provider detection, .claude/tts-language.txt for state
# @entrypoints Called by /agent-vibes:language commands, play-tts-*.sh for voice resolution
# @patterns Provider abstraction, language-to-voice mapping, backward compatibility with legacy LANGUAGE_VOICES
# @related play-tts-elevenlabs.sh, play-tts-piper.sh, provider-manager.sh, learn-manager.sh
# Determine target .claude directory based on context
# Priority:
# 1. CLAUDE_PROJECT_DIR env var (set by MCP for project-specific settings)
# 2. Script location (for direct slash command usage)
# 3. Global ~/.claude (fallback)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [[ -n "$CLAUDE_PROJECT_DIR" ]] && [[ -d "$CLAUDE_PROJECT_DIR/.claude" ]]; then
# MCP context: Use the project directory where MCP was invoked
CLAUDE_DIR="$CLAUDE_PROJECT_DIR/.claude"
else
# Direct usage context: Use script location
CLAUDE_DIR="$(cd "$SCRIPT_DIR/.." 2>/dev/null && pwd)"
# If script is in global ~/.claude, use that
if [[ "$CLAUDE_DIR" == "$HOME/.claude" ]]; then
CLAUDE_DIR="$HOME/.claude"
elif [[ ! -d "$CLAUDE_DIR" ]]; then
# Fallback to global if directory doesn't exist
CLAUDE_DIR="$HOME/.claude"
fi
fi
LANGUAGE_FILE="$CLAUDE_DIR/tts-language.txt"
mkdir -p "$CLAUDE_DIR"
# Source provider manager to detect active provider
source "$SCRIPT_DIR/provider-manager.sh" 2>/dev/null || true
# Language to ElevenLabs multilingual voice mapping
declare -A ELEVENLABS_VOICES=(
["spanish"]="Antoni"
["french"]="Rachel"
["german"]="Domi"
["italian"]="Bella"
["portuguese"]="Matilda"
["chinese"]="Antoni"
["japanese"]="Antoni"
["korean"]="Antoni"
["russian"]="Domi"
["polish"]="Antoni"
["dutch"]="Rachel"
["turkish"]="Antoni"
["arabic"]="Antoni"
["hindi"]="Antoni"
["swedish"]="Rachel"
["danish"]="Rachel"
["norwegian"]="Rachel"
["finnish"]="Rachel"
["czech"]="Domi"
["romanian"]="Rachel"
["ukrainian"]="Domi"
["greek"]="Antoni"
["bulgarian"]="Domi"
["croatian"]="Domi"
["slovak"]="Domi"
)
# Language to Piper voice model mapping
declare -A PIPER_VOICES=(
["spanish"]="es_ES-davefx-medium"
["french"]="fr_FR-siwis-medium"
["german"]="de_DE-thorsten-medium"
["italian"]="it_IT-riccardo-x_low"
["portuguese"]="pt_BR-faber-medium"
["chinese"]="zh_CN-huayan-medium"
["japanese"]="ja_JP-hikari-medium"
["korean"]="ko_KR-eunyoung-medium"
["russian"]="ru_RU-dmitri-medium"
["polish"]="pl_PL-darkman-medium"
["dutch"]="nl_NL-rdh-medium"
["turkish"]="tr_TR-dfki-medium"
["arabic"]="ar_JO-kareem-medium"
["hindi"]="hi_IN-amitabh-medium"
["swedish"]="sv_SE-nst-medium"
["danish"]="da_DK-talesyntese-medium"
["norwegian"]="no_NO-talesyntese-medium"
["finnish"]="fi_FI-harri-medium"
["czech"]="cs_CZ-jirka-medium"
["romanian"]="ro_RO-mihai-medium"
["ukrainian"]="uk_UA-lada-x_low"
["greek"]="el_GR-rapunzelina-low"
["bulgarian"]="bg_BG-valentin-medium"
["croatian"]="hr_HR-gorana-medium"
["slovak"]="sk_SK-lili-medium"
)
# Backward compatibility: Keep LANGUAGE_VOICES for existing code
declare -A LANGUAGE_VOICES=(
["spanish"]="Antoni"
["french"]="Rachel"
["german"]="Domi"
["italian"]="Bella"
["portuguese"]="Matilda"
["chinese"]="Antoni"
["japanese"]="Antoni"
["korean"]="Antoni"
["russian"]="Domi"
["polish"]="Antoni"
["dutch"]="Rachel"
["turkish"]="Antoni"
["arabic"]="Antoni"
["hindi"]="Antoni"
["swedish"]="Rachel"
["danish"]="Rachel"
["norwegian"]="Rachel"
["finnish"]="Rachel"
["czech"]="Domi"
["romanian"]="Rachel"
["ukrainian"]="Domi"
["greek"]="Antoni"
["bulgarian"]="Domi"
["croatian"]="Domi"
["slovak"]="Domi"
)
# Supported languages list
SUPPORTED_LANGUAGES="spanish, french, german, italian, portuguese, chinese, japanese, korean, polish, dutch, turkish, russian, arabic, hindi, swedish, danish, norwegian, finnish, czech, romanian, ukrainian, greek, bulgarian, croatian, slovak"
# Function to set language
set_language() {
local lang="$1"
# Convert to lowercase
lang=$(echo "$lang" | tr '[:upper:]' '[:lower:]')
# Handle reset/english
if [[ "$lang" == "reset" ]] || [[ "$lang" == "english" ]] || [[ "$lang" == "en" ]]; then
if [[ -f "$LANGUAGE_FILE" ]]; then
rm "$LANGUAGE_FILE"
echo "✓ Language reset to English (default)"
else
echo "Already using English (default)"
fi
return 0
fi
# Check if language is supported
if [[ ! " ${!LANGUAGE_VOICES[@]} " =~ " ${lang} " ]]; then
echo "❌ Language '$lang' not supported"
echo ""
echo "Supported languages:"
echo "$SUPPORTED_LANGUAGES"
return 1
fi
# Save language
echo "$lang" > "$LANGUAGE_FILE"
# Detect active provider and get recommended voice
local provider=""
if [[ -f "$CLAUDE_DIR/tts-provider.txt" ]]; then
provider=$(cat "$CLAUDE_DIR/tts-provider.txt")
elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
provider=$(cat "$HOME/.claude/tts-provider.txt")
else
provider="elevenlabs"
fi
local recommended_voice=$(get_voice_for_language "$lang" "$provider")
# Fallback to old mapping if provider-aware function returns empty
if [[ -z "$recommended_voice" ]]; then
recommended_voice="${LANGUAGE_VOICES[$lang]}"
fi
echo "✓ Language set to: $lang"
echo "📢 Recommended voice for $provider TTS: $recommended_voice"
echo ""
echo "TTS will now speak in $lang."
echo "Switch voice with: /agent-vibes:switch \"$recommended_voice\""
}
# Function to get current language
get_language() {
if [[ -f "$LANGUAGE_FILE" ]]; then
local lang=$(cat "$LANGUAGE_FILE")
# Detect active provider
local provider=""
if [[ -f "$CLAUDE_DIR/tts-provider.txt" ]]; then
provider=$(cat "$CLAUDE_DIR/tts-provider.txt")
elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
provider=$(cat "$HOME/.claude/tts-provider.txt")
else
provider="elevenlabs"
fi
local recommended_voice=$(get_voice_for_language "$lang" "$provider")
# Fallback to old mapping
if [[ -z "$recommended_voice" ]]; then
recommended_voice="${LANGUAGE_VOICES[$lang]}"
fi
echo "Current language: $lang"
echo "Recommended voice ($provider): $recommended_voice"
else
echo "Current language: english (default)"
echo "No multilingual voice required"
fi
}
# Function to get language for use in other scripts
get_language_code() {
if [[ -f "$LANGUAGE_FILE" ]]; then
cat "$LANGUAGE_FILE"
else
echo "english"
fi
}
# Function to check if current voice supports language
is_voice_multilingual() {
local voice="$1"
# List of multilingual voices
local multilingual_voices=("Antoni" "Rachel" "Domi" "Bella" "Charlotte" "Matilda")
for mv in "${multilingual_voices[@]}"; do
if [[ "$voice" == "$mv" ]]; then
return 0
fi
done
return 1
}
# Function to get best voice for current language
get_best_voice_for_language() {
local lang=$(get_language_code)
if [[ "$lang" == "english" ]]; then
# No specific multilingual voice needed for English
echo ""
return
fi
# Return recommended voice for language
echo "${LANGUAGE_VOICES[$lang]}"
}
# Function to get voice for a specific language and provider
# Usage: get_voice_for_language <language> [provider]
# Provider: "elevenlabs" or "piper" (auto-detected if not provided)
get_voice_for_language() {
local language="$1"
local provider="${2:-}"
# Convert to lowercase
language=$(echo "$language" | tr '[:upper:]' '[:lower:]')
# Auto-detect provider if not specified
if [[ -z "$provider" ]]; then
if command -v get_active_provider &>/dev/null; then
provider=$(get_active_provider 2>/dev/null)
else
# Fallback to checking provider file directly
# Try current directory first, then search up the tree
local search_dir="$PWD"
local found=false
while [[ "$search_dir" != "/" ]]; do
if [[ -f "$search_dir/.claude/tts-provider.txt" ]]; then
provider=$(cat "$search_dir/.claude/tts-provider.txt")
found=true
break
fi
search_dir=$(dirname "$search_dir")
done
# If not found in project tree, check global
if [[ "$found" = false ]]; then
if [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
provider=$(cat "$HOME/.claude/tts-provider.txt")
else
provider="elevenlabs" # Default
fi
fi
fi
fi
# Return appropriate voice based on provider
case "$provider" in
piper)
echo "${PIPER_VOICES[$language]:-}"
;;
elevenlabs)
echo "${ELEVENLABS_VOICES[$language]:-}"
;;
*)
echo "${ELEVENLABS_VOICES[$language]:-}"
;;
esac
}
# Main command handler - only run if script is executed directly, not sourced
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
case "${1:-}" in
set)
if [[ -z "$2" ]]; then
echo "Usage: language-manager.sh set <language>"
exit 1
fi
set_language "$2"
;;
get)
get_language
;;
code)
get_language_code
;;
check-voice)
if [[ -z "$2" ]]; then
echo "Usage: language-manager.sh check-voice <voice-name>"
exit 1
fi
if is_voice_multilingual "$2"; then
echo "yes"
else
echo "no"
fi
;;
best-voice)
get_best_voice_for_language
;;
voice-for-language)
if [[ -z "$2" ]]; then
echo "Usage: language-manager.sh voice-for-language <language> [provider]"
exit 1
fi
get_voice_for_language "$2" "$3"
;;
list)
echo "Supported languages and recommended voices:"
echo ""
for lang in "${!LANGUAGE_VOICES[@]}"; do
printf "%-15s → %s\n" "$lang" "${LANGUAGE_VOICES[$lang]}"
done | sort
;;
*)
echo "AgentVibes Language Manager"
echo ""
echo "Usage:"
echo " language-manager.sh set <language> Set language"
echo " language-manager.sh get Get current language"
echo " language-manager.sh code Get language code only"
echo " language-manager.sh check-voice <name> Check if voice is multilingual"
echo " language-manager.sh best-voice Get best voice for current language"
echo " language-manager.sh voice-for-language <lang> [prov] Get voice for language & provider"
echo " language-manager.sh list List all supported languages"
exit 1
;;
esac
fi

View File

@ -1,475 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/learn-manager.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied. Use at your own risk. See the Apache License for details.
#
# ---
#
# @fileoverview Language Learning Mode Manager - Enables dual-language TTS for immersive learning
# @context Speaks responses in both main language (English) and target language (Spanish, French, etc.) for language practice
# @architecture Manages main/target language pairs with voice mappings, auto-configures recommended voices per language
# @dependencies play-tts.sh (dual invocation), language-manager.sh (voice recommendations), .claude/tts-*.txt state files
# @entrypoints Called by /agent-vibes:learn commands to enable/disable learning mode
# @patterns Dual-voice orchestration, auto-configuration, greeting on activation, provider-aware voice selection
# @related language-manager.sh, play-tts.sh, .claude/tts-learn-mode.txt, .claude/tts-target-language.txt
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_DIR="$SCRIPT_DIR/../.."
# Configuration files (project-local first, then global fallback)
MAIN_LANG_FILE="$PROJECT_DIR/.claude/tts-main-language.txt"
TARGET_LANG_FILE="$PROJECT_DIR/.claude/tts-target-language.txt"
TARGET_VOICE_FILE="$PROJECT_DIR/.claude/tts-target-voice.txt"
LEARN_MODE_FILE="$PROJECT_DIR/.claude/tts-learn-mode.txt"
GLOBAL_MAIN_LANG_FILE="$HOME/.claude/tts-main-language.txt"
GLOBAL_TARGET_LANG_FILE="$HOME/.claude/tts-target-language.txt"
GLOBAL_TARGET_VOICE_FILE="$HOME/.claude/tts-target-voice.txt"
GLOBAL_LEARN_MODE_FILE="$HOME/.claude/tts-learn-mode.txt"
# Colors
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
NC='\033[0m'
# Get main language
get_main_language() {
if [[ -f "$MAIN_LANG_FILE" ]]; then
cat "$MAIN_LANG_FILE"
elif [[ -f "$GLOBAL_MAIN_LANG_FILE" ]]; then
cat "$GLOBAL_MAIN_LANG_FILE"
else
echo "english"
fi
}
# Set main language
set_main_language() {
local language="$1"
if [[ -z "$language" ]]; then
echo -e "${YELLOW}Usage: learn-manager.sh set-main-language <language>${NC}"
exit 1
fi
mkdir -p "$PROJECT_DIR/.claude"
echo "$language" > "$MAIN_LANG_FILE"
echo -e "${GREEN}${NC} Main language set to: $language"
}
# Get target language
get_target_language() {
if [[ -f "$TARGET_LANG_FILE" ]]; then
cat "$TARGET_LANG_FILE"
elif [[ -f "$GLOBAL_TARGET_LANG_FILE" ]]; then
cat "$GLOBAL_TARGET_LANG_FILE"
else
echo ""
fi
}
# Get greeting message for a language
get_greeting_for_language() {
local language="$1"
case "${language,,}" in
spanish|español)
echo "¡Hola! Soy tu profesor de español. ¡Vamos a aprender juntos!"
;;
french|français)
echo "Bonjour! Je suis votre professeur de français. Apprenons ensemble!"
;;
german|deutsch)
echo "Hallo! Ich bin dein Deutschlehrer. Lass uns zusammen lernen!"
;;
italian|italiano)
echo "Ciao! Sono il tuo insegnante di italiano. Impariamo insieme!"
;;
portuguese|português)
echo "Olá! Sou seu professor de português. Vamos aprender juntos!"
;;
chinese|中文|mandarin)
echo "你好!我是你的中文老师。让我们一起学习吧!"
;;
japanese|日本語)
echo "こんにちは!私はあなたの日本語の先生です。一緒に勉強しましょう!"
;;
korean|한국어)
echo "안녕하세요! 저는 당신의 한국어 선생님입니다. 함께 배워봅시다!"
;;
russian|русский)
echo "Здравствуйте! Я ваш учитель русского языка. Давайте учиться вместе!"
;;
arabic|العربية)
echo "مرحبا! أنا معلمك للغة العربية. دعونا نتعلم معا!"
;;
hindi|हिन्दी)
echo "नमस्ते! मैं आपका हिंदी शिक्षक हूं। आइए साथ में सीखें!"
;;
dutch|nederlands)
echo "Hallo! Ik ben je Nederlandse leraar. Laten we samen leren!"
;;
polish|polski)
echo "Cześć! Jestem twoim nauczycielem polskiego. Uczmy się razem!"
;;
turkish|türkçe)
echo "Merhaba! Ben Türkçe öğretmeninizim. Birlikte öğrenelim!"
;;
swedish|svenska)
echo "Hej! Jag är din svenskalärare. Låt oss lära tillsammans!"
;;
*)
echo "Hello! I am your language teacher. Let's learn together!"
;;
esac
}
# Set target language
set_target_language() {
local language="$1"
if [[ -z "$language" ]]; then
echo -e "${YELLOW}Usage: learn-manager.sh set-target-language <language>${NC}"
exit 1
fi
mkdir -p "$PROJECT_DIR/.claude"
echo "$language" > "$TARGET_LANG_FILE"
echo -e "${GREEN}${NC} Target language set to: $language"
# Automatically set the recommended voice for this language
local recommended_voice=$(get_recommended_voice_for_language "$language")
if [[ -n "$recommended_voice" ]]; then
echo "$recommended_voice" > "$TARGET_VOICE_FILE"
echo -e "${GREEN}${NC} Target voice automatically set to: ${YELLOW}$recommended_voice${NC}"
# Detect provider for display
local provider=""
if [[ -f "$PROJECT_DIR/.claude/tts-provider.txt" ]]; then
provider=$(cat "$PROJECT_DIR/.claude/tts-provider.txt")
elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
provider=$(cat "$HOME/.claude/tts-provider.txt")
else
provider="elevenlabs"
fi
echo -e " (for ${GREEN}$provider${NC} TTS)"
echo ""
# Greet user in the target language with the target voice
local greeting=$(get_greeting_for_language "$language")
echo -e "${BLUE}🎓${NC} Your language teacher says:"
# Check if we're using Piper and if the voice is available
if [[ "$provider" == "piper" ]]; then
# Quick check: does the voice file exist?
local voice_dir="${HOME}/.claude/piper-voices"
if [[ -f "${voice_dir}/${recommended_voice}.onnx" ]]; then
# Voice exists, play greeting in background
nohup "$SCRIPT_DIR/play-tts.sh" "$greeting" "$recommended_voice" >/dev/null 2>&1 &
else
echo -e "${YELLOW} (Voice not yet downloaded - greeting will play after first download)${NC}"
fi
else
# ElevenLabs - just play it in background
nohup "$SCRIPT_DIR/play-tts.sh" "$greeting" "$recommended_voice" >/dev/null 2>&1 &
fi
else
# Fallback to suggestion if auto-set failed
suggest_voice_for_language "$language"
fi
}
# Get recommended voice for a language (returns voice string, no output)
get_recommended_voice_for_language() {
local language="$1"
local recommended_voice=""
local provider=""
# Detect active provider
if [[ -f "$PROJECT_DIR/.claude/tts-provider.txt" ]]; then
provider=$(cat "$PROJECT_DIR/.claude/tts-provider.txt")
elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
provider=$(cat "$HOME/.claude/tts-provider.txt")
else
provider="elevenlabs" # Default
fi
# Source language manager and get provider-specific voice
if [[ -f "$SCRIPT_DIR/language-manager.sh" ]]; then
source "$SCRIPT_DIR/language-manager.sh" 2>/dev/null
recommended_voice=$(get_voice_for_language "$language" "$provider" 2>/dev/null)
fi
# Fallback to hardcoded suggestions if function failed
if [[ -z "$recommended_voice" ]]; then
case "${language,,}" in
spanish|español)
recommended_voice=$([ "$provider" = "piper" ] && echo "es_ES-davefx-medium" || echo "Antoni")
;;
french|français)
recommended_voice=$([ "$provider" = "piper" ] && echo "fr_FR-siwis-medium" || echo "Rachel")
;;
german|deutsch)
recommended_voice=$([ "$provider" = "piper" ] && echo "de_DE-thorsten-medium" || echo "Domi")
;;
italian|italiano)
recommended_voice=$([ "$provider" = "piper" ] && echo "it_IT-riccardo-x_low" || echo "Bella")
;;
portuguese|português)
recommended_voice=$([ "$provider" = "piper" ] && echo "pt_BR-faber-medium" || echo "Matilda")
;;
chinese|中文|mandarin)
recommended_voice=$([ "$provider" = "piper" ] && echo "zh_CN-huayan-medium" || echo "Amy")
;;
*)
recommended_voice=$([ "$provider" = "piper" ] && echo "en_US-lessac-medium" || echo "Antoni")
;;
esac
fi
echo "$recommended_voice"
}
# Suggest voice based on target language (displays suggestion message)
suggest_voice_for_language() {
local language="$1"
local suggested_voice=$(get_recommended_voice_for_language "$language")
# Detect provider for display
local provider=""
if [[ -f "$PROJECT_DIR/.claude/tts-provider.txt" ]]; then
provider=$(cat "$PROJECT_DIR/.claude/tts-provider.txt")
elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
provider=$(cat "$HOME/.claude/tts-provider.txt")
else
provider="elevenlabs"
fi
echo ""
echo -e "${BLUE}💡 Tip:${NC} For $language (using ${GREEN}$provider${NC} TTS), we recommend: ${YELLOW}$suggested_voice${NC}"
echo -e " Set it with: ${YELLOW}/agent-vibes:target-voice $suggested_voice${NC}"
}
# Get target voice
get_target_voice() {
if [[ -f "$TARGET_VOICE_FILE" ]]; then
cat "$TARGET_VOICE_FILE"
elif [[ -f "$GLOBAL_TARGET_VOICE_FILE" ]]; then
cat "$GLOBAL_TARGET_VOICE_FILE"
else
echo ""
fi
}
# Set target voice
set_target_voice() {
local voice="$1"
if [[ -z "$voice" ]]; then
echo -e "${YELLOW}Usage: learn-manager.sh set-target-voice <voice>${NC}"
exit 1
fi
mkdir -p "$PROJECT_DIR/.claude"
echo "$voice" > "$TARGET_VOICE_FILE"
echo -e "${GREEN}${NC} Target voice set to: $voice"
}
# Check if learning mode is enabled
is_learn_mode_enabled() {
if [[ -f "$LEARN_MODE_FILE" ]]; then
local mode=$(cat "$LEARN_MODE_FILE")
[[ "$mode" == "ON" ]]
elif [[ -f "$GLOBAL_LEARN_MODE_FILE" ]]; then
local mode=$(cat "$GLOBAL_LEARN_MODE_FILE")
[[ "$mode" == "ON" ]]
else
return 1
fi
}
# Enable learning mode
enable_learn_mode() {
mkdir -p "$PROJECT_DIR/.claude"
echo "ON" > "$LEARN_MODE_FILE"
echo -e "${GREEN}${NC} Language learning mode: ${GREEN}ENABLED${NC}"
echo ""
# Auto-set target voice if target language is set but voice is not
local target_lang=$(get_target_language)
local target_voice=$(get_target_voice)
local voice_was_set=false
if [[ -n "$target_lang" ]] && [[ -z "$target_voice" ]]; then
echo -e "${BLUE}${NC} Auto-configuring voice for $target_lang..."
local recommended_voice=$(get_recommended_voice_for_language "$target_lang")
if [[ -n "$recommended_voice" ]]; then
echo "$recommended_voice" > "$TARGET_VOICE_FILE"
target_voice="$recommended_voice"
echo -e "${GREEN}${NC} Target voice automatically set to: ${YELLOW}$recommended_voice${NC}"
# Detect provider for display
local provider=""
if [[ -f "$PROJECT_DIR/.claude/tts-provider.txt" ]]; then
provider=$(cat "$PROJECT_DIR/.claude/tts-provider.txt")
elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
provider=$(cat "$HOME/.claude/tts-provider.txt")
else
provider="elevenlabs"
fi
echo -e " (for ${GREEN}$provider${NC} TTS)"
echo ""
voice_was_set=true
fi
fi
show_status
# Greet user with language teacher if everything is configured
if [[ -n "$target_lang" ]] && [[ -n "$target_voice" ]]; then
echo ""
local greeting=$(get_greeting_for_language "$target_lang")
echo -e "${BLUE}🎓${NC} Your language teacher says:"
# Detect provider
local provider=""
if [[ -f "$PROJECT_DIR/.claude/tts-provider.txt" ]]; then
provider=$(cat "$PROJECT_DIR/.claude/tts-provider.txt")
elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
provider=$(cat "$HOME/.claude/tts-provider.txt")
else
provider="elevenlabs"
fi
# Check if we're using Piper and if the voice is available
if [[ "$provider" == "piper" ]]; then
# Quick check: does the voice file exist?
local voice_dir="${HOME}/.claude/piper-voices"
if [[ -f "${voice_dir}/${target_voice}.onnx" ]]; then
# Voice exists, play greeting in background
nohup "$SCRIPT_DIR/play-tts.sh" "$greeting" "$target_voice" >/dev/null 2>&1 &
else
echo -e "${YELLOW} (Voice not yet downloaded - greeting will play after first download)${NC}"
fi
else
# ElevenLabs - just play it in background
nohup "$SCRIPT_DIR/play-tts.sh" "$greeting" "$target_voice" >/dev/null 2>&1 &
fi
fi
}
# Disable learning mode
disable_learn_mode() {
mkdir -p "$PROJECT_DIR/.claude"
echo "OFF" > "$LEARN_MODE_FILE"
echo -e "${GREEN}${NC} Language learning mode: ${YELLOW}DISABLED${NC}"
}
# Show learning mode status
show_status() {
local main_lang=$(get_main_language)
local target_lang=$(get_target_language)
local target_voice=$(get_target_voice)
local learn_mode="OFF"
if is_learn_mode_enabled; then
learn_mode="ON"
fi
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
echo -e "${BLUE} Language Learning Mode Status${NC}"
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
echo ""
echo -e " ${BLUE}Learning Mode:${NC} $(if [[ "$learn_mode" == "ON" ]]; then echo -e "${GREEN}ENABLED${NC}"; else echo -e "${YELLOW}DISABLED${NC}"; fi)"
echo -e " ${BLUE}Main Language:${NC} $main_lang"
echo -e " ${BLUE}Target Language:${NC} ${target_lang:-"(not set)"}"
echo -e " ${BLUE}Target Voice:${NC} ${target_voice:-"(not set)"}"
echo ""
if [[ "$learn_mode" == "ON" ]]; then
if [[ -z "$target_lang" ]]; then
echo -e " ${YELLOW}${NC} Please set a target language: ${YELLOW}/agent-vibes:target <language>${NC}"
fi
if [[ -z "$target_voice" ]]; then
echo -e " ${YELLOW}${NC} Please set a target voice: ${YELLOW}/agent-vibes:target-voice <voice>${NC}"
fi
if [[ -n "$target_lang" ]] && [[ -n "$target_voice" ]]; then
echo -e " ${GREEN}${NC} All set! TTS will speak in both languages."
echo ""
echo -e " ${BLUE}How it works:${NC}"
echo -e " 1. First: Speak in ${BLUE}$main_lang${NC} (your current voice)"
echo -e " 2. Then: Speak in ${BLUE}$target_lang${NC} ($target_voice voice)"
fi
else
echo -e " ${BLUE}💡 Tip:${NC} Enable learning mode with: ${YELLOW}/agent-vibes:learn${NC}"
fi
echo ""
echo -e "${BLUE}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}"
}
# Main command handler
case "${1:-}" in
get-main-language)
get_main_language
;;
set-main-language)
set_main_language "$2"
;;
get-target-language)
get_target_language
;;
set-target-language)
set_target_language "$2"
;;
get-target-voice)
get_target_voice
;;
set-target-voice)
set_target_voice "$2"
;;
is-enabled)
if is_learn_mode_enabled; then
echo "ON"
exit 0
else
echo "OFF"
exit 1
fi
;;
enable)
enable_learn_mode
;;
disable)
disable_learn_mode
;;
status)
show_status
;;
*)
echo "Usage: learn-manager.sh {get-main-language|set-main-language|get-target-language|set-target-language|get-target-voice|set-target-voice|is-enabled|enable|disable|status}"
exit 1
;;
esac

View File

@ -1,438 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/personality-manager.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied. Use at your own risk. See the Apache License for details.
#
# ---
#
# @fileoverview Personality Manager - Adds character and emotional style to TTS voices
# @context Enables voices to have distinct personalities (flirty, sarcastic, pirate, etc.) with provider-aware voice assignment
# @architecture Markdown-based personality templates with provider-specific voice mappings (ElevenLabs vs Piper)
# @dependencies .claude/personalities/*.md files, voice-manager.sh, play-tts.sh, provider-manager.sh
# @entrypoints Called by /agent-vibes:personality slash commands
# @patterns Template-based configuration, provider abstraction, random personality support
# @related .claude/personalities/*.md, voice-manager.sh, .claude/tts-personality.txt
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PERSONALITIES_DIR="$SCRIPT_DIR/../personalities"
# Determine target .claude directory based on context
# Priority:
# 1. CLAUDE_PROJECT_DIR env var (set by MCP for project-specific settings)
# 2. Script location (for direct slash command usage)
# 3. Global ~/.claude (fallback)
if [[ -n "$CLAUDE_PROJECT_DIR" ]] && [[ -d "$CLAUDE_PROJECT_DIR/.claude" ]]; then
# MCP context: Use the project directory where MCP was invoked
CLAUDE_DIR="$CLAUDE_PROJECT_DIR/.claude"
else
# Direct usage context: Use script location
# Script is at .claude/hooks/personality-manager.sh, so .claude is ..
CLAUDE_DIR="$(cd "$SCRIPT_DIR/.." 2>/dev/null && pwd)"
# If script is in global ~/.claude, use that
if [[ "$CLAUDE_DIR" == "$HOME/.claude" ]]; then
CLAUDE_DIR="$HOME/.claude"
elif [[ ! -d "$CLAUDE_DIR" ]]; then
# Fallback to global if directory doesn't exist
CLAUDE_DIR="$HOME/.claude"
fi
fi
PERSONALITY_FILE="$CLAUDE_DIR/tts-personality.txt"
# Function to get personality data from markdown file
get_personality_data() {
local personality="$1"
local field="$2"
local file="$PERSONALITIES_DIR/${personality}.md"
if [[ ! -f "$file" ]]; then
return 1
fi
case "$field" in
prefix)
sed -n '/^## Prefix/,/^##/p' "$file" | sed '1d;$d' | tr -d '\n' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//'
;;
suffix)
sed -n '/^## Suffix/,/^##/p' "$file" | sed '1d;$d' | tr -d '\n' | sed 's/^[[:space:]]*//;s/[[:space:]]*$//'
;;
description)
grep "^description:" "$file" | cut -d: -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//'
;;
voice)
grep "^elevenlabs_voice:" "$file" | cut -d: -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//'
;;
piper_voice)
grep "^piper_voice:" "$file" | cut -d: -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//'
;;
instructions)
sed -n '/^## AI Instructions/,/^##/p' "$file" | sed '1d;$d'
;;
esac
}
# Function to list all available personalities
list_personalities() {
local personalities=()
# Find all .md files in personalities directory
if [[ -d "$PERSONALITIES_DIR" ]]; then
for file in "$PERSONALITIES_DIR"/*.md; do
if [[ -f "$file" ]]; then
basename "$file" .md
fi
done
fi
}
case "$1" in
list)
echo "🎭 Available Personalities:"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Get current personality
CURRENT="normal"
if [ -f "$PERSONALITY_FILE" ]; then
CURRENT=$(cat "$PERSONALITY_FILE")
fi
# List personalities from markdown files
echo "Built-in personalities:"
for personality in $(list_personalities | sort); do
desc=$(get_personality_data "$personality" "description")
if [[ "$personality" == "$CURRENT" ]]; then
echo "$personality - $desc (current)"
else
echo " - $personality - $desc"
fi
done
# Add random option
if [[ "$CURRENT" == "random" ]]; then
echo " ✓ random - Picks randomly each time (current)"
else
echo " - random - Picks randomly each time"
fi
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "Usage: /agent-vibes:personality <name>"
echo " /agent-vibes:personality add <name>"
echo " /agent-vibes:personality edit <name>"
;;
set|switch)
PERSONALITY="$2"
if [[ -z "$PERSONALITY" ]]; then
echo "❌ Please specify a personality name"
echo "Usage: $0 set <personality>"
exit 1
fi
# Check if personality file exists (unless it's random)
if [[ "$PERSONALITY" != "random" ]]; then
if [[ ! -f "$PERSONALITIES_DIR/${PERSONALITY}.md" ]]; then
echo "❌ Personality not found: $PERSONALITY"
echo ""
echo "Available personalities:"
for p in $(list_personalities | sort); do
echo "$p"
done
exit 1
fi
fi
# Save the personality
echo "$PERSONALITY" > "$PERSONALITY_FILE"
echo "🎭 Personality set to: $PERSONALITY"
# Check if personality has an assigned voice
# Detect active TTS provider
PROVIDER_FILE=""
if [[ -f "$CLAUDE_DIR/tts-provider.txt" ]]; then
PROVIDER_FILE="$CLAUDE_DIR/tts-provider.txt"
elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
PROVIDER_FILE="$HOME/.claude/tts-provider.txt"
fi
ACTIVE_PROVIDER="elevenlabs" # default
if [[ -n "$PROVIDER_FILE" ]]; then
ACTIVE_PROVIDER=$(cat "$PROVIDER_FILE")
fi
# Get the appropriate voice based on provider
ASSIGNED_VOICE=""
if [[ "$ACTIVE_PROVIDER" == "piper" ]]; then
# Try to get Piper-specific voice first
ASSIGNED_VOICE=$(get_personality_data "$PERSONALITY" "piper_voice")
if [[ -z "$ASSIGNED_VOICE" ]]; then
# Fallback to default Piper voice
ASSIGNED_VOICE="en_US-lessac-medium"
fi
else
# Use ElevenLabs voice (reads from elevenlabs_voice: field)
ASSIGNED_VOICE=$(get_personality_data "$PERSONALITY" "voice")
fi
if [[ -n "$ASSIGNED_VOICE" ]]; then
# Switch to the assigned voice (silently - personality will do the talking)
VOICE_MANAGER="$SCRIPT_DIR/voice-manager.sh"
if [[ -x "$VOICE_MANAGER" ]]; then
echo "🎤 Switching to assigned voice: $ASSIGNED_VOICE"
"$VOICE_MANAGER" switch "$ASSIGNED_VOICE" --silent >/dev/null 2>&1
fi
fi
# Make a personality-appropriate remark with TTS
if [[ "$PERSONALITY" != "random" ]]; then
echo ""
# Get TTS script path
TTS_SCRIPT="$SCRIPT_DIR/play-tts.sh"
# Try to get acknowledgment from personality file
PERSONALITY_FILE_PATH="$PERSONALITIES_DIR/${PERSONALITY}.md"
REMARK=""
if [[ -f "$PERSONALITY_FILE_PATH" ]]; then
# Extract example responses from personality file (lines starting with "- ")
mapfile -t EXAMPLES < <(grep '^- "' "$PERSONALITY_FILE_PATH" | sed 's/^- "//; s/"$//')
if [[ ${#EXAMPLES[@]} -gt 0 ]]; then
# Pick a random example
REMARK="${EXAMPLES[$RANDOM % ${#EXAMPLES[@]}]}"
fi
fi
# Fallback if no examples found
if [[ -z "$REMARK" ]]; then
REMARK="Personality set to ${PERSONALITY}!"
fi
echo "💬 $REMARK"
"$TTS_SCRIPT" "$REMARK"
echo ""
echo "Note: AI will generate unique ${PERSONALITY} responses - no fixed templates!"
echo ""
echo "💡 Tip: To hear automatic TTS narration, enable the Agent Vibes output style:"
echo " /output-style Agent Vibes"
fi
;;
get)
if [ -f "$PERSONALITY_FILE" ]; then
CURRENT=$(cat "$PERSONALITY_FILE")
echo "Current personality: $CURRENT"
if [[ "$CURRENT" != "random" ]]; then
desc=$(get_personality_data "$CURRENT" "description")
[[ -n "$desc" ]] && echo "Description: $desc"
fi
else
echo "Current personality: normal (default)"
fi
;;
add)
NAME="$2"
if [[ -z "$NAME" ]]; then
echo "❌ Please specify a personality name"
echo "Usage: $0 add <name>"
exit 1
fi
FILE="$PERSONALITIES_DIR/${NAME}.md"
if [[ -f "$FILE" ]]; then
echo "❌ Personality '$NAME' already exists"
echo "Use 'edit' to modify it"
exit 1
fi
# Create new personality file
cat > "$FILE" << 'EOF'
---
name: NAME
description: Custom personality
---
# NAME Personality
## Prefix
## Suffix
## AI Instructions
Describe how the AI should generate messages for this personality.
## Example Responses
- "Example response 1"
- "Example response 2"
EOF
# Replace NAME with actual name
sed -i "s/NAME/$NAME/g" "$FILE"
echo "✅ Created new personality: $NAME"
echo "📝 Edit the file: $FILE"
echo ""
echo "You can now customize:"
echo " • Prefix: Text before messages"
echo " • Suffix: Text after messages"
echo " • AI Instructions: How AI should speak"
echo " • Example Responses: Sample messages"
;;
edit)
NAME="$2"
if [[ -z "$NAME" ]]; then
echo "❌ Please specify a personality name"
echo "Usage: $0 edit <name>"
exit 1
fi
FILE="$PERSONALITIES_DIR/${NAME}.md"
if [[ ! -f "$FILE" ]]; then
echo "❌ Personality '$NAME' not found"
echo "Use 'add' to create it first"
exit 1
fi
echo "📝 Edit this file to customize the personality:"
echo "$FILE"
;;
reset)
echo "normal" > "$PERSONALITY_FILE"
echo "🎭 Personality reset to: normal"
;;
set-favorite-voice)
PERSONALITY="$2"
NEW_VOICE="$3"
if [[ -z "$PERSONALITY" ]] || [[ -z "$NEW_VOICE" ]]; then
echo "❌ Please specify both personality name and voice name"
echo "Usage: $0 set-favorite-voice <personality> <voice>"
exit 1
fi
FILE="$PERSONALITIES_DIR/${PERSONALITY}.md"
if [[ ! -f "$FILE" ]]; then
echo "❌ Personality '$PERSONALITY' not found"
exit 1
fi
# Detect active TTS provider
PROVIDER_FILE=""
if [[ -f "$CLAUDE_DIR/tts-provider.txt" ]]; then
PROVIDER_FILE="$CLAUDE_DIR/tts-provider.txt"
elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
PROVIDER_FILE="$HOME/.claude/tts-provider.txt"
fi
ACTIVE_PROVIDER="elevenlabs" # default
if [[ -n "$PROVIDER_FILE" ]]; then
ACTIVE_PROVIDER=$(cat "$PROVIDER_FILE")
fi
# Determine which field to update based on provider
if [[ "$ACTIVE_PROVIDER" == "piper" ]]; then
VOICE_FIELD="piper_voice"
CURRENT_VOICE=$(get_personality_data "$PERSONALITY" "piper_voice")
else
VOICE_FIELD="elevenlabs_voice"
CURRENT_VOICE=$(get_personality_data "$PERSONALITY" "voice")
fi
# Check if personality already has a favorite voice assigned
if [[ -n "$CURRENT_VOICE" ]] && [[ "$CURRENT_VOICE" != "$NEW_VOICE" ]]; then
echo "⚠️ WARNING: Personality '$PERSONALITY' already has a favorite voice assigned!"
echo ""
echo " Current favorite ($ACTIVE_PROVIDER): $CURRENT_VOICE"
echo " New voice: $NEW_VOICE"
echo ""
echo "Do you want to replace the favorite voice?"
echo ""
read -p "Enter your choice (yes/no): " CHOICE
case "$CHOICE" in
yes|y|YES|Y)
echo "✅ Replacing favorite voice..."
;;
no|n|NO|N)
echo "❌ Keeping current favorite voice: $CURRENT_VOICE"
exit 0
;;
*)
echo "❌ Invalid choice. Keeping current favorite voice: $CURRENT_VOICE"
exit 1
;;
esac
fi
# Update the voice in the personality file
if grep -q "^${VOICE_FIELD}:" "$FILE"; then
# Field exists, replace it
sed -i "s/^${VOICE_FIELD}:.*/${VOICE_FIELD}: ${NEW_VOICE}/" "$FILE"
else
# Field doesn't exist, add it after the frontmatter
sed -i "/^---$/,/^---$/ { /^---$/a\\
${VOICE_FIELD}: ${NEW_VOICE}
}" "$FILE"
fi
echo "✅ Favorite voice for '$PERSONALITY' personality set to: $NEW_VOICE ($ACTIVE_PROVIDER)"
echo "📝 Updated file: $FILE"
;;
*)
# If a single argument is provided and it's not a command, treat it as "set <personality>"
if [[ -n "$1" ]] && [[ -f "$PERSONALITIES_DIR/${1}.md" || "$1" == "random" ]]; then
# Call set with the personality name
exec "$0" set "$1"
else
echo "AgentVibes Personality Manager"
echo ""
echo "Commands:"
echo " list - List all personalities"
echo " set/switch <name> - Set personality"
echo " add <name> - Create new personality"
echo " edit <name> - Show path to edit personality"
echo " get - Show current personality"
echo " set-favorite-voice <name> <voice> - Set favorite voice for a personality"
echo " reset - Reset to normal"
echo ""
echo "Examples:"
echo " /agent-vibes:personality flirty"
echo " /agent-vibes:personality add cowboy"
echo " /agent-vibes:personality set-favorite-voice flirty \"Aria\""
fi
;;
esac

View File

@ -1,165 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/piper-download-voices.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview Piper Voice Model Downloader - Batch downloads popular Piper TTS voices from HuggingFace
# @context Post-installation utility to download commonly used voices (~25MB each)
# @architecture Wrapper around piper-voice-manager.sh download functions with progress tracking
# @dependencies piper-voice-manager.sh (download logic), piper binary (for validation)
# @entrypoints Called by piper-installer.sh or manually via ./piper-download-voices.sh [--yes|-y]
# @patterns Batch operations, skip-existing logic, auto-yes flag for non-interactive use
# @related piper-voice-manager.sh, piper-installer.sh
#
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/piper-voice-manager.sh"
# Parse command line arguments
AUTO_YES=false
if [[ "$1" == "--yes" ]] || [[ "$1" == "-y" ]]; then
AUTO_YES=true
fi
# Common voice models to download
COMMON_VOICES=(
"en_US-lessac-medium" # Default, clear male
"en_US-amy-medium" # Warm female
"en_US-joe-medium" # Professional male
"en_US-ryan-high" # Expressive male
"en_US-libritts-high" # Premium quality
)
echo "🎙️ Piper Voice Model Downloader"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "This will download the most commonly used Piper voice models."
echo "Each voice is approximately 25MB."
echo ""
# Check if piper is installed
if ! command -v piper &> /dev/null; then
echo "❌ Error: Piper TTS not installed"
echo "Install with: pipx install piper-tts"
exit 1
fi
# Get storage directory
VOICE_DIR=$(get_voice_storage_dir)
echo "📂 Storage location: $VOICE_DIR"
echo ""
# Count already downloaded
ALREADY_DOWNLOADED=0
ALREADY_DOWNLOADED_LIST=()
NEED_DOWNLOAD=()
for voice in "${COMMON_VOICES[@]}"; do
if verify_voice "$voice" 2>/dev/null; then
((ALREADY_DOWNLOADED++))
ALREADY_DOWNLOADED_LIST+=("$voice")
else
NEED_DOWNLOAD+=("$voice")
fi
done
echo "📊 Status:"
echo " Already downloaded: $ALREADY_DOWNLOADED voice(s)"
echo " Need to download: ${#NEED_DOWNLOAD[@]} voice(s)"
echo ""
# Show already downloaded voices
if [[ $ALREADY_DOWNLOADED -gt 0 ]]; then
echo "✅ Already downloaded (skipped):"
for voice in "${ALREADY_DOWNLOADED_LIST[@]}"; do
echo "$voice"
done
echo ""
fi
if [[ ${#NEED_DOWNLOAD[@]} -eq 0 ]]; then
echo "🎉 All common voices ready to use!"
exit 0
fi
echo "Voices to download:"
for voice in "${NEED_DOWNLOAD[@]}"; do
echo "$voice (~25MB)"
done
echo ""
# Ask for confirmation (skip if --yes flag provided)
if [[ "$AUTO_YES" == "false" ]]; then
read -p "Download ${#NEED_DOWNLOAD[@]} voice model(s)? [Y/n]: " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]] && [[ -n $REPLY ]]; then
echo "❌ Download cancelled"
exit 0
fi
else
echo "Auto-downloading ${#NEED_DOWNLOAD[@]} voice model(s)..."
echo ""
fi
# Download each voice
DOWNLOADED=0
FAILED=0
for voice in "${NEED_DOWNLOAD[@]}"; do
echo ""
echo "📥 Downloading: $voice..."
if download_voice "$voice"; then
((DOWNLOADED++))
echo "✅ Downloaded: $voice"
else
((FAILED++))
echo "❌ Failed: $voice"
fi
done
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "📊 Download Summary:"
echo " ✅ Successfully downloaded: $DOWNLOADED"
echo " ❌ Failed: $FAILED"
echo " 📦 Total voices available: $((ALREADY_DOWNLOADED + DOWNLOADED))"
echo ""
if [[ $DOWNLOADED -gt 0 ]]; then
echo "✨ Ready to use Piper TTS with downloaded voices!"
echo ""
echo "Try it:"
echo " /agent-vibes:provider switch piper"
echo " /agent-vibes:preview"
fi

View File

@ -1,178 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/piper-installer.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview Piper TTS Installer - Installs Piper TTS via pipx and downloads initial voice models
# @context Automated installation script for free offline Piper TTS on WSL/Linux systems
# @architecture Helper script for AgentVibes installer, invoked manually or from provider switcher
# @dependencies pipx (Python package installer), apt-get/brew/dnf/pacman (for pipx installation)
# @entrypoints Called by src/installer.js or manually by users during setup
# @patterns Platform detection (WSL/Linux only), package manager abstraction, guided voice download
# @related piper-download-voices.sh, provider-manager.sh, src/installer.js
#
set -e # Exit on error
echo "🎤 Piper TTS Installer"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
# Check if running on WSL or Linux
if ! grep -qi microsoft /proc/version 2>/dev/null && [[ "$(uname -s)" != "Linux" ]]; then
echo "❌ Piper TTS is only supported on WSL and Linux"
echo " Your platform: $(uname -s)"
echo ""
echo " For macOS/Windows, use ElevenLabs instead:"
echo " /agent-vibes:provider switch elevenlabs"
exit 1
fi
# Check if Piper is already installed
if command -v piper &> /dev/null; then
# Piper doesn't have a --version flag, just check if it exists
echo "✅ Piper TTS is already installed!"
echo " Location: $(which piper)"
echo ""
echo " Download voices with: .claude/hooks/piper-download-voices.sh"
exit 0
fi
echo "📦 Installing Piper TTS..."
echo ""
# Check if pipx is installed
if ! command -v pipx &> /dev/null; then
echo "⚠️ pipx not found. Installing pipx first..."
echo ""
# Try to install pipx
if command -v apt-get &> /dev/null; then
# Debian/Ubuntu
sudo apt-get update
sudo apt-get install -y pipx
elif command -v brew &> /dev/null; then
# macOS (though Piper doesn't run on macOS)
brew install pipx
elif command -v dnf &> /dev/null; then
# Fedora
sudo dnf install -y pipx
elif command -v pacman &> /dev/null; then
# Arch Linux
sudo pacman -S python-pipx
else
echo "❌ Unable to install pipx automatically."
echo ""
echo " Please install pipx manually:"
echo " https://pipx.pypa.io/stable/installation/"
exit 1
fi
# Ensure pipx is in PATH
pipx ensurepath
echo ""
fi
# Install Piper TTS
echo "📥 Installing Piper TTS via pipx..."
pipx install piper-tts
if ! command -v piper &> /dev/null; then
echo ""
echo "❌ Installation completed but piper command not found in PATH"
echo ""
echo " Try running: pipx ensurepath"
echo " Then restart your terminal"
exit 1
fi
echo ""
echo "✅ Piper TTS installed successfully!"
echo ""
PIPER_VERSION=$(piper --version 2>&1 || echo "unknown")
echo " Version: $PIPER_VERSION"
echo ""
# Determine voices directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CLAUDE_DIR="$(dirname "$SCRIPT_DIR")"
# Check for configured voices directory
VOICES_DIR=""
if [[ -f "$CLAUDE_DIR/piper-voices-dir.txt" ]]; then
VOICES_DIR=$(cat "$CLAUDE_DIR/piper-voices-dir.txt")
elif [[ -f "$HOME/.claude/piper-voices-dir.txt" ]]; then
VOICES_DIR=$(cat "$HOME/.claude/piper-voices-dir.txt")
else
VOICES_DIR="$HOME/.claude/piper-voices"
fi
echo "📁 Voice storage location: $VOICES_DIR"
echo ""
# Ask if user wants to download voices now
read -p "Would you like to download voice models now? [Y/n] " -n 1 -r
echo ""
if [[ $REPLY =~ ^[Yy]$ ]] || [[ -z $REPLY ]]; then
echo ""
echo "📥 Downloading recommended voices..."
echo ""
# Use the piper-download-voices.sh script if available
if [[ -f "$SCRIPT_DIR/piper-download-voices.sh" ]]; then
"$SCRIPT_DIR/piper-download-voices.sh"
else
# Manual download of a basic voice
mkdir -p "$VOICES_DIR"
echo "Downloading en_US-lessac-medium (recommended)..."
curl -L "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx" \
-o "$VOICES_DIR/en_US-lessac-medium.onnx"
curl -L "https://huggingface.co/rhasspy/piper-voices/resolve/main/en/en_US/lessac/medium/en_US-lessac-medium.onnx.json" \
-o "$VOICES_DIR/en_US-lessac-medium.onnx.json"
echo "✅ Voice downloaded!"
fi
fi
echo ""
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "🎉 Piper TTS Setup Complete!"
echo ""
echo "Next steps:"
echo " 1. Download more voices: .claude/hooks/piper-download-voices.sh"
echo " 2. List available voices: /agent-vibes:list"
echo " 3. Test it out: /agent-vibes:preview"
echo ""
echo "Enjoy your free, offline TTS! 🎤"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"

View File

@ -1,165 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/piper-multispeaker-registry.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview Multi-Speaker Voice Registry - Maps speaker names to ONNX models and speaker IDs
# @context Enables individual speaker selection from multi-speaker Piper models (e.g., 16Speakers)
# @architecture Static registry mapping speaker names to model files and numeric speaker IDs
# @dependencies piper-voice-manager.sh (voice storage), play-tts-piper.sh (TTS with speaker ID)
# @entrypoints Sourced by voice-manager.sh for multi-speaker voice switching
# @patterns Registry pattern, speaker ID mapping, model-to-speaker association
# @related voice-manager.sh, play-tts-piper.sh, 16Speakers.onnx.json (speaker_id_map)
#
# Registry of multi-speaker models and their speaker names
# Format: "SpeakerName:model_file:speaker_id:description"
#
# 16Speakers Model (12 US + 4 UK voices):
# Source: LibriVox Public Domain recordings
# Model: 16Speakers.onnx (77MB)
#
MULTISPEAKER_VOICES=(
# US English Speakers (0-11)
"Cori_Samuel:16Speakers:0:US English Female"
"Kara_Shallenberg:16Speakers:1:US English Female"
"Kristin_Hughes:16Speakers:2:US English Female"
"Maria_Kasper:16Speakers:3:US English Female"
"Mike_Pelton:16Speakers:4:US English Male"
"Mark_Nelson:16Speakers:5:US English Male"
"Michael_Scherer:16Speakers:6:US English Male"
"James_K_White:16Speakers:7:US English Male"
"Rose_Ibex:16Speakers:8:US English Female"
"progressingamerica:16Speakers:9:US English Male"
"Steve_C:16Speakers:10:US English Male"
"Owlivia:16Speakers:11:US English Female"
# UK English Speakers (12-15)
"Paul_Hampton:16Speakers:12:UK English Male"
"Jennifer_Dorr:16Speakers:13:UK English Female"
"Emily_Cripps:16Speakers:14:UK English Female"
"Martin_Clifton:16Speakers:15:UK English Male"
)
# @function get_multispeaker_info
# @intent Get model and speaker ID for a speaker name
# @why Enables users to select individual speakers from multi-speaker models by name
# @param $1 {string} speaker_name - Speaker name (e.g., "Cori_Samuel", "Rose_Ibex")
# @returns Echoes "model:speaker_id" (e.g., "16Speakers:0") to stdout
# @exitcode 0=speaker found, 1=speaker not found
# @sideeffects None (read-only lookup)
# @edgecases Case-insensitive matching
# @calledby voice-manager.sh switch command
# @calls None (pure bash array iteration)
get_multispeaker_info() {
local speaker_name="$1"
for entry in "${MULTISPEAKER_VOICES[@]}"; do
name="${entry%%:*}"
rest="${entry#*:}"
model="${rest%%:*}"
rest="${rest#*:}"
speaker_id="${rest%%:*}"
if [[ "${name,,}" == "${speaker_name,,}" ]]; then
echo "$model:$speaker_id"
return 0
fi
done
return 1
}
# @function list_multispeaker_voices
# @intent Display all available multi-speaker voices with descriptions
# @why Help users discover individual speakers within multi-speaker models
# @param None
# @returns None
# @exitcode Always 0
# @sideeffects Writes formatted list to stdout
# @edgecases None
# @calledby voice-manager.sh list command, /agent-vibes:list
# @calls None (pure bash array iteration)
list_multispeaker_voices() {
echo "🎭 Multi-Speaker Voices (16Speakers Model):"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
local current_model=""
for entry in "${MULTISPEAKER_VOICES[@]}"; do
name="${entry%%:*}"
rest="${entry#*:}"
model="${rest%%:*}"
rest="${rest#*:}"
speaker_id="${rest%%:*}"
description="${rest#*:}"
# Print section header when model changes
if [[ "$model" != "$current_model" ]]; then
if [[ -n "$current_model" ]]; then
echo ""
fi
echo " Model: $model.onnx"
current_model="$model"
fi
echo "$name (ID: $speaker_id) - $description"
done
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "Usage: /agent-vibes:switch Cori_Samuel"
echo " /agent-vibes:switch Rose_Ibex"
}
# @function get_multispeaker_description
# @intent Get description for a speaker name
# @why Provide user-friendly info about speaker characteristics
# @param $1 {string} speaker_name - Speaker name
# @returns Echoes description (e.g., "US English Female") to stdout
# @exitcode 0=speaker found, 1=speaker not found
# @sideeffects None (read-only lookup)
# @edgecases Case-insensitive matching
# @calledby voice-manager.sh switch command (for confirmation message)
# @calls None (pure bash array iteration)
get_multispeaker_description() {
local speaker_name="$1"
for entry in "${MULTISPEAKER_VOICES[@]}"; do
name="${entry%%:*}"
rest="${entry#*:}"
rest="${rest#*:}"
rest="${rest#*:}"
description="${rest}"
if [[ "${name,,}" == "${speaker_name,,}" ]]; then
echo "$description"
return 0
fi
done
return 1
}

View File

@ -1,293 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/piper-voice-manager.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview Piper Voice Model Management - Downloads, caches, and validates Piper ONNX voice models
# @context Voice model lifecycle management for free offline Piper TTS provider
# @architecture HuggingFace repository integration with local caching, global storage for voice models
# @dependencies curl (downloads), piper binary (TTS synthesis)
# @entrypoints Sourced by play-tts-piper.sh, piper-download-voices.sh, and provider management commands
# @patterns HuggingFace model repository integration, file-based caching (~25MB per voice), global storage
# @related play-tts-piper.sh, piper-download-voices.sh, provider-manager.sh, GitHub Issue #25
#
# Base URL for Piper voice models on HuggingFace
PIPER_VOICES_BASE_URL="https://huggingface.co/rhasspy/piper-voices/resolve/main"
# AI NOTE: Voice storage precedence order:
# 1. PIPER_VOICES_DIR environment variable (highest priority)
# 2. Project-local .claude/piper-voices-dir.txt
# 3. Directory tree search for .claude/piper-voices-dir.txt
# 4. Global ~/.claude/piper-voices-dir.txt
# 5. Default ~/.claude/piper-voices (fallback)
# This allows per-project voice isolation while defaulting to shared global storage.
# @function get_voice_storage_dir
# @intent Determine directory for storing Piper voice models with precedence chain
# @why Voice models are large (~25MB each) and should be shared globally by default, but allow per-project overrides
# @param None
# @returns Echoes path to voice storage directory
# @exitcode Always 0
# @sideeffects Creates directory if it doesn't exist
# @edgecases Searches up directory tree for .claude/ folder, supports custom paths via env var or config files
# @calledby All voice management functions (verify_voice, get_voice_path, download_voice, list_downloaded_voices)
# @calls mkdir, cat, dirname
get_voice_storage_dir() {
local voice_dir
# Check for custom path in environment or config file
if [[ -n "$PIPER_VOICES_DIR" ]]; then
voice_dir="$PIPER_VOICES_DIR"
else
# Check for config file (project-local first, then global)
local config_file
if [[ -n "$CLAUDE_PROJECT_DIR" ]] && [[ -f "$CLAUDE_PROJECT_DIR/.claude/piper-voices-dir.txt" ]]; then
config_file="$CLAUDE_PROJECT_DIR/.claude/piper-voices-dir.txt"
else
# Search up directory tree for .claude/
local current_dir="$PWD"
while [[ "$current_dir" != "/" ]]; do
if [[ -f "$current_dir/.claude/piper-voices-dir.txt" ]]; then
config_file="$current_dir/.claude/piper-voices-dir.txt"
break
fi
current_dir=$(dirname "$current_dir")
done
# Check global config
if [[ -z "$config_file" ]] && [[ -f "$HOME/.claude/piper-voices-dir.txt" ]]; then
config_file="$HOME/.claude/piper-voices-dir.txt"
fi
fi
if [[ -n "$config_file" ]]; then
voice_dir=$(cat "$config_file" | tr -d '[:space:]')
fi
fi
# Fallback to default global storage
if [[ -z "$voice_dir" ]]; then
voice_dir="$HOME/.claude/piper-voices"
fi
mkdir -p "$voice_dir"
echo "$voice_dir"
}
# @function verify_voice
# @intent Check if voice model files exist locally (both .onnx and .onnx.json)
# @why Avoid redundant downloads, detect missing models, ensure model integrity
# @param $1 {string} voice_name - Voice model name (e.g., en_US-lessac-medium)
# @returns None
# @exitcode 0=voice exists and complete, 1=voice missing or incomplete
# @sideeffects None (read-only check)
# @edgecases Requires both ONNX model and JSON config to return success
# @calledby download_voice, piper-download-voices.sh
# @calls get_voice_storage_dir
verify_voice() {
local voice_name="$1"
local voice_dir
voice_dir=$(get_voice_storage_dir)
local onnx_file="$voice_dir/${voice_name}.onnx"
local json_file="$voice_dir/${voice_name}.onnx.json"
[[ -f "$onnx_file" ]] && [[ -f "$json_file" ]]
}
# @function get_voice_path
# @intent Get absolute path to voice model ONNX file for Piper binary
# @why Piper binary requires full absolute path to model file, not just voice name
# @param $1 {string} voice_name - Voice model name
# @returns Echoes absolute path to .onnx file to stdout
# @exitcode 0=success, 1=voice not found
# @sideeffects Writes error message to stderr if voice not found
# @edgecases Returns error if voice not downloaded yet
# @calledby play-tts-piper.sh for TTS synthesis
# @calls get_voice_storage_dir
get_voice_path() {
local voice_name="$1"
local voice_dir
voice_dir=$(get_voice_storage_dir)
local onnx_file="$voice_dir/${voice_name}.onnx"
if [[ ! -f "$onnx_file" ]]; then
echo "❌ Voice model not found: $voice_name" >&2
return 1
fi
echo "$onnx_file"
}
# AI NOTE: Voice name format is: lang_LOCALE-speaker-quality
# Example: en_US-lessac-medium
# - lang: en (language code)
# - LOCALE: US (locale/country code)
# - speaker: lessac (speaker/voice name)
# - quality: medium (model quality: low/medium/high)
# HuggingFace repository structure: {lang}/{lang}_{LOCALE}/{speaker}/{quality}/
# @function parse_voice_components
# @intent Extract language, locale, speaker, quality components from voice name
# @why HuggingFace uses structured directory paths based on these components
# @param $1 {string} voice_name - Voice name (e.g., en_US-lessac-medium)
# @returns None (sets global variables)
# @exitcode Always 0
# @sideeffects Sets global variables: LANG, LOCALE, SPEAKER, QUALITY
# @edgecases Expects specific format: lang_LOCALE-speaker-quality
# @calledby download_voice
# @calls None (pure string manipulation)
parse_voice_components() {
local voice_name="$1"
# Extract components from voice name
# Format: en_US-lessac-medium
# lang_LOCALE-speaker-quality
local lang_locale="${voice_name%%-*}" # en_US
local speaker_quality="${voice_name#*-}" # lessac-medium
LANG="${lang_locale%%_*}" # en
LOCALE="${lang_locale#*_}" # US
SPEAKER="${speaker_quality%%-*}" # lessac
QUALITY="${speaker_quality#*-}" # medium
}
# @function download_voice
# @intent Download Piper voice model from HuggingFace repository
# @why Provide free offline TTS voices without requiring API keys
# @param $1 {string} voice_name - Voice model name (e.g., en_US-lessac-medium)
# @param $2 {string} lang_code - Language code (optional, inferred from voice_name, unused)
# @returns None
# @exitcode 0=success (already downloaded or newly downloaded), 1=download failed
# @sideeffects Downloads .onnx and .onnx.json files (~25MB total), removes partial downloads on failure
# @edgecases Handles network failures, validates file integrity (non-zero size), skips if already downloaded
# @calledby piper-download-voices.sh, manual voice download commands
# @calls parse_voice_components, verify_voice, get_voice_storage_dir, curl, rm
download_voice() {
local voice_name="$1"
local lang_code="${2:-}"
local voice_dir
voice_dir=$(get_voice_storage_dir)
# Check if already downloaded
if verify_voice "$voice_name"; then
echo "✅ Voice already downloaded: $voice_name"
return 0
fi
# Parse voice components
parse_voice_components "$voice_name"
# Construct download URLs
# Path format: {language}/{language}_{locale}/{speaker}/{quality}/{speaker}-{quality}.onnx
local model_path="${LANG}/${LANG}_${LOCALE}/${SPEAKER}/${QUALITY}/${voice_name}"
local onnx_url="${PIPER_VOICES_BASE_URL}/${model_path}.onnx"
local json_url="${PIPER_VOICES_BASE_URL}/${model_path}.onnx.json"
echo "📥 Downloading Piper voice: $voice_name"
echo " Source: HuggingFace (rhasspy/piper-voices)"
echo " Size: ~25MB"
echo ""
# Download ONNX model
echo " Downloading model file..."
if ! curl -L --progress-bar -o "$voice_dir/${voice_name}.onnx" "$onnx_url"; then
echo "❌ Failed to download voice model"
rm -f "$voice_dir/${voice_name}.onnx"
return 1
fi
# Download JSON config
echo " Downloading config file..."
if ! curl -L -s -o "$voice_dir/${voice_name}.onnx.json" "$json_url"; then
echo "❌ Failed to download voice config"
rm -f "$voice_dir/${voice_name}.onnx" "$voice_dir/${voice_name}.onnx.json"
return 1
fi
# Verify file integrity (basic check - file size > 0)
if [[ ! -s "$voice_dir/${voice_name}.onnx" ]]; then
echo "❌ Downloaded file is empty or corrupt"
rm -f "$voice_dir/${voice_name}.onnx" "$voice_dir/${voice_name}.onnx.json"
return 1
fi
echo "✅ Voice downloaded successfully: $voice_name"
echo " Location: $voice_dir/${voice_name}.onnx"
}
# @function list_downloaded_voices
# @intent Display all locally cached voice models with file sizes
# @why Help users see what voices they have available and storage usage
# @param None
# @returns None
# @exitcode Always 0
# @sideeffects Writes formatted list to stdout
# @edgecases Handles empty voice directory gracefully, uses nullglob to avoid literal *.onnx
# @calledby Voice management commands, /agent-vibes:list
# @calls get_voice_storage_dir, basename, du
list_downloaded_voices() {
local voice_dir
voice_dir=$(get_voice_storage_dir)
echo "📦 Downloaded Piper Voices:"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
local count=0
shopt -s nullglob
for onnx_file in "$voice_dir"/*.onnx; do
if [[ -f "$onnx_file" ]]; then
local voice_name
voice_name=$(basename "$onnx_file" .onnx)
local file_size
file_size=$(du -h "$onnx_file" | cut -f1)
echo "$voice_name ($file_size)"
((count++))
fi
done
shopt -u nullglob
if [[ $count -eq 0 ]]; then
echo " (No voices downloaded yet)"
fi
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo "Total: $count voices"
}
# AI NOTE: This file manages the lifecycle of Piper voice models
# Voice models are ONNX files (~20-30MB each) downloaded from HuggingFace
# Files are cached locally to avoid repeated downloads
# Project-local storage preferred over global for isolation

View File

@ -1,404 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/play-tts-elevenlabs.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied. Use at your own risk. See the Apache License for details.
#
# ---
#
# @fileoverview ElevenLabs TTS Provider Implementation - Premium cloud-based TTS
# @context Provider-specific implementation for ElevenLabs API integration with multilingual support
# @architecture Part of multi-provider TTS system - implements provider interface contract
# @dependencies Requires ELEVENLABS_API_KEY, curl, ffmpeg, paplay/aplay/mpg123, jq
# @entrypoints Called by play-tts.sh router with ($1=text, $2=voice_name) when provider=elevenlabs
# @patterns Follows provider contract: accept text/voice, output audio file path, API error handling, SSH audio optimization
# @related play-tts.sh, provider-manager.sh, voices-config.sh, language-manager.sh, GitHub Issue #25
#
# Fix locale warnings
export LC_ALL=C
TEXT="$1"
VOICE_OVERRIDE="$2" # Optional: voice name or direct voice ID
API_KEY="${ELEVENLABS_API_KEY}"
# Check for project-local pretext configuration
CONFIG_DIR="${CLAUDE_PROJECT_DIR:-.}/.claude/config"
CONFIG_FILE="$CONFIG_DIR/agentvibes.json"
if [[ -f "$CONFIG_FILE" ]] && command -v jq &> /dev/null; then
PRETEXT=$(jq -r '.pretext // empty' "$CONFIG_FILE" 2>/dev/null)
if [[ -n "$PRETEXT" ]]; then
TEXT="$PRETEXT: $TEXT"
fi
fi
# Limit text length to prevent API issues (max 500 chars for safety)
if [ ${#TEXT} -gt 500 ]; then
TEXT="${TEXT:0:497}..."
echo "⚠️ Text truncated to 500 characters for API safety"
fi
# Source the single voice configuration file
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/voices-config.sh"
source "$SCRIPT_DIR/language-manager.sh"
# @function determine_voice_and_language
# @intent Resolve voice name/ID and language for multilingual support
# @why Supports both voice names and direct IDs, plus language-specific voices
# @param $VOICE_OVERRIDE {string} Voice name or ID (optional)
# @returns Sets $VOICE_ID and $LANGUAGE_CODE global variables
# @sideeffects None
# @edgecases Handles unknown voices, falls back to default
VOICE_ID=""
LANGUAGE_CODE="en" # Default to English
# Get current language setting
CURRENT_LANGUAGE=$(get_language_code)
# Get language code for API
# ElevenLabs uses 2-letter ISO codes
case "$CURRENT_LANGUAGE" in
spanish) LANGUAGE_CODE="es" ;;
french) LANGUAGE_CODE="fr" ;;
german) LANGUAGE_CODE="de" ;;
italian) LANGUAGE_CODE="it" ;;
portuguese) LANGUAGE_CODE="pt" ;;
chinese) LANGUAGE_CODE="zh" ;;
japanese) LANGUAGE_CODE="ja" ;;
korean) LANGUAGE_CODE="ko" ;;
russian) LANGUAGE_CODE="ru" ;;
polish) LANGUAGE_CODE="pl" ;;
dutch) LANGUAGE_CODE="nl" ;;
turkish) LANGUAGE_CODE="tr" ;;
arabic) LANGUAGE_CODE="ar" ;;
hindi) LANGUAGE_CODE="hi" ;;
swedish) LANGUAGE_CODE="sv" ;;
danish) LANGUAGE_CODE="da" ;;
norwegian) LANGUAGE_CODE="no" ;;
finnish) LANGUAGE_CODE="fi" ;;
czech) LANGUAGE_CODE="cs" ;;
romanian) LANGUAGE_CODE="ro" ;;
ukrainian) LANGUAGE_CODE="uk" ;;
greek) LANGUAGE_CODE="el" ;;
bulgarian) LANGUAGE_CODE="bg" ;;
croatian) LANGUAGE_CODE="hr" ;;
slovak) LANGUAGE_CODE="sk" ;;
english|*) LANGUAGE_CODE="en" ;;
esac
if [[ -n "$VOICE_OVERRIDE" ]]; then
# Check if override is a voice name (lookup in mapping)
if [[ -n "${VOICES[$VOICE_OVERRIDE]}" ]]; then
VOICE_ID="${VOICES[$VOICE_OVERRIDE]}"
echo "🎤 Using voice: $VOICE_OVERRIDE (session-specific)"
# Check if override looks like a voice ID (alphanumeric string ~20 chars)
elif [[ "$VOICE_OVERRIDE" =~ ^[a-zA-Z0-9]{15,30}$ ]]; then
VOICE_ID="$VOICE_OVERRIDE"
echo "🎤 Using custom voice ID (session-specific)"
else
echo "⚠️ Unknown voice '$VOICE_OVERRIDE', trying language-specific voice"
fi
fi
# If no override or invalid override, use language-specific voice
if [[ -z "$VOICE_ID" ]]; then
# Try to get voice for current language
LANG_VOICE=$(get_voice_for_language "$CURRENT_LANGUAGE" "elevenlabs" 2>/dev/null)
if [[ -n "$LANG_VOICE" ]] && [[ -n "${VOICES[$LANG_VOICE]}" ]]; then
VOICE_ID="${VOICES[$LANG_VOICE]}"
echo "🌍 Using $CURRENT_LANGUAGE voice: $LANG_VOICE"
else
# Fall back to voice manager
VOICE_MANAGER_SCRIPT="$(dirname "$0")/voice-manager.sh"
if [[ -f "$VOICE_MANAGER_SCRIPT" ]]; then
VOICE_NAME=$("$VOICE_MANAGER_SCRIPT" get)
VOICE_ID="${VOICES[$VOICE_NAME]}"
fi
# Final fallback to default
if [[ -z "$VOICE_ID" ]]; then
echo "⚠️ No voice configured, using default"
VOICE_ID="${VOICES[Aria]}"
fi
fi
fi
# @function validate_inputs
# @intent Check required parameters and API key
# @why Fail fast with clear errors if inputs missing
# @exitcode 1=missing text, 2=missing API key
if [ -z "$TEXT" ]; then
echo "Usage: $0 \"text to speak\" [voice_name_or_id]"
exit 1
fi
if [ -z "$API_KEY" ]; then
echo "Error: ELEVENLABS_API_KEY not set"
echo "Set your API key: export ELEVENLABS_API_KEY=your_key_here"
exit 2
fi
# @function determine_audio_directory
# @intent Find appropriate directory for audio file storage
# @why Supports project-local and global storage
# @returns Sets $AUDIO_DIR global variable
# @sideeffects None
# @edgecases Handles missing directories, creates if needed
# AI NOTE: Check project dir first, then search up tree, finally fall back to global
if [[ -n "$CLAUDE_PROJECT_DIR" ]]; then
AUDIO_DIR="$CLAUDE_PROJECT_DIR/.claude/audio"
else
# Fallback: try to find .claude directory in current path
CURRENT_DIR="$PWD"
while [[ "$CURRENT_DIR" != "/" ]]; do
if [[ -d "$CURRENT_DIR/.claude" ]]; then
AUDIO_DIR="$CURRENT_DIR/.claude/audio"
break
fi
CURRENT_DIR=$(dirname "$CURRENT_DIR")
done
# Final fallback to global if no project .claude found
if [[ -z "$AUDIO_DIR" ]]; then
AUDIO_DIR="$HOME/.claude/audio"
fi
fi
mkdir -p "$AUDIO_DIR"
TEMP_FILE="$AUDIO_DIR/tts-$(date +%s).mp3"
# @function synthesize_with_elevenlabs
# @intent Call ElevenLabs API to generate speech
# @why Encapsulates API call with error handling
# @param Uses globals: $TEXT, $VOICE_ID, $API_KEY
# @returns Creates audio file at $TEMP_FILE
# @exitcode 0=success, 3=API error
# @sideeffects Creates MP3 file in audio directory
# @edgecases Handles network failures, API errors, rate limiting
# Choose model based on language
if [[ "$LANGUAGE_CODE" == "en" ]]; then
MODEL_ID="eleven_monolingual_v1"
else
MODEL_ID="eleven_multilingual_v2"
fi
# @function get_speech_speed
# @intent Read speed config and map to ElevenLabs API range (0.7-1.2)
# @why ElevenLabs only supports 0.7 (slower) to 1.2 (faster), must map user scale
# @returns Speed value for ElevenLabs API (clamped to 0.7-1.2)
get_speech_speed() {
local config_dir=""
# Determine config directory
if [[ -n "$CLAUDE_PROJECT_DIR" ]] && [[ -d "$CLAUDE_PROJECT_DIR/.claude" ]]; then
config_dir="$CLAUDE_PROJECT_DIR/.claude/config"
else
# Try to find .claude in current path
local current_dir="$PWD"
while [[ "$current_dir" != "/" ]]; do
if [[ -d "$current_dir/.claude" ]]; then
config_dir="$current_dir/.claude/config"
break
fi
current_dir=$(dirname "$current_dir")
done
# Fallback to global
if [[ -z "$config_dir" ]]; then
config_dir="$HOME/.claude/config"
fi
fi
local main_speed_file="$config_dir/tts-speech-rate.txt"
local target_speed_file="$config_dir/tts-target-speech-rate.txt"
# Legacy file paths for backward compatibility
local legacy_main_speed_file="$config_dir/piper-speech-rate.txt"
local legacy_target_speed_file="$config_dir/piper-target-speech-rate.txt"
local user_speed="1.0"
# If this is a non-English voice and target config exists, use it
if [[ "$CURRENT_LANGUAGE" != "english" ]]; then
if [[ -f "$target_speed_file" ]]; then
user_speed=$(cat "$target_speed_file" 2>/dev/null || echo "1.0")
elif [[ -f "$legacy_target_speed_file" ]]; then
user_speed=$(cat "$legacy_target_speed_file" 2>/dev/null || echo "1.0")
else
user_speed="0.5" # Default slower for learning
fi
else
# Otherwise use main config if available
if [[ -f "$main_speed_file" ]]; then
user_speed=$(grep -v '^#' "$main_speed_file" 2>/dev/null | grep -v '^$' | tail -1 || echo "1.0")
elif [[ -f "$legacy_main_speed_file" ]]; then
user_speed=$(grep -v '^#' "$legacy_main_speed_file" 2>/dev/null | grep -v '^$' | tail -1 || echo "1.0")
fi
fi
# Map user scale (0.5=slower, 1.0=normal, 2.0=faster, 3.0=very fast)
# to ElevenLabs range (0.7=slower, 1.0=normal, 1.2=faster)
# Formula: elevenlabs_speed = 0.7 + (user_speed - 0.5) * 0.2
# This maps: 0.5→0.7, 1.0→0.8, 2.0→1.0, 3.0→1.2
# Actually, let's use a better mapping:
# 0.5x → 0.7 (slowest ElevenLabs)
# 1.0x → 1.0 (normal)
# 2.0x → 1.15
# 3.0x → 1.2 (fastest ElevenLabs)
if command -v bc &> /dev/null; then
local eleven_speed
if (( $(echo "$user_speed <= 0.5" | bc -l) )); then
eleven_speed="0.7"
elif (( $(echo "$user_speed >= 3.0" | bc -l) )); then
eleven_speed="1.2"
elif (( $(echo "$user_speed <= 1.0" | bc -l) )); then
# Map 0.5-1.0 to 0.7-1.0
eleven_speed=$(echo "scale=2; 0.7 + ($user_speed - 0.5) * 0.6" | bc -l)
else
# Map 1.0-3.0 to 1.0-1.2
eleven_speed=$(echo "scale=2; 1.0 + ($user_speed - 1.0) * 0.1" | bc -l)
fi
echo "$eleven_speed"
else
# Fallback without bc: just clamp to safe values
if (( $(awk 'BEGIN {print ("'$user_speed'" <= 0.5)}') )); then
echo "0.7"
elif (( $(awk 'BEGIN {print ("'$user_speed'" >= 2.0)}') )); then
echo "1.2"
else
echo "1.0"
fi
fi
}
SPEECH_SPEED=$(get_speech_speed)
# Build JSON payload with jq for proper escaping
PAYLOAD=$(jq -n \
--arg text "$TEXT" \
--arg model "$MODEL_ID" \
--arg lang "$LANGUAGE_CODE" \
--argjson speed "$SPEECH_SPEED" \
'{
text: $text,
model_id: $model,
language_code: $lang,
voice_settings: {
stability: 0.5,
similarity_boost: 0.75,
speed: $speed
}
}')
curl -s -X POST "https://api.elevenlabs.io/v1/text-to-speech/${VOICE_ID}" \
-H "xi-api-key: ${API_KEY}" \
-H "Content-Type: application/json" \
-d "$PAYLOAD" \
-o "${TEMP_FILE}"
# @function add_silence_padding
# @intent Add silence to beginning of audio to prevent WSL static
# @why WSL audio subsystem cuts off first ~200ms, causing static/clipping
# @param Uses global: $TEMP_FILE
# @returns Updates $TEMP_FILE to padded version
# @sideeffects Modifies audio file, removes original
# @edgecases Gracefully falls back to unpadded if ffmpeg unavailable
# Add silence padding to prevent WSL audio static
if [ -f "${TEMP_FILE}" ]; then
# Check if ffmpeg is available for adding padding
if command -v ffmpeg &> /dev/null; then
PADDED_FILE="$AUDIO_DIR/tts-padded-$(date +%s).mp3"
# Add 200ms of silence at the beginning to prevent static
# Note: ElevenLabs returns mono audio, so we use mono silence
ffmpeg -f lavfi -i anullsrc=r=44100:cl=mono:d=0.2 -i "${TEMP_FILE}" \
-filter_complex "[0:a][1:a]concat=n=2:v=0:a=1[out]" \
-map "[out]" -c:a libmp3lame -b:a 128k -y "${PADDED_FILE}" 2>/dev/null
if [ -f "${PADDED_FILE}" ]; then
# Use padded file and clean up original
rm -f "${TEMP_FILE}"
TEMP_FILE="${PADDED_FILE}"
fi
# If padding failed, just use original file
fi
# @function play_audio
# @intent Play generated audio file using available player with sequential playback
# @why Support multiple audio players and prevent overlapping audio in learning mode
# @param Uses global: $TEMP_FILE, $CURRENT_LANGUAGE
# @sideeffects Plays audio with lock mechanism for sequential playback
# @edgecases Falls through players until one works
LOCK_FILE="/tmp/agentvibes-audio.lock"
# Wait for previous audio to finish (max 30 seconds)
for i in {1..60}; do
if [ ! -f "$LOCK_FILE" ]; then
break
fi
sleep 0.5
done
# Track last target language audio for replay command
if [[ "$CURRENT_LANGUAGE" != "english" ]]; then
TARGET_AUDIO_FILE="${CLAUDE_PROJECT_DIR:-.}/.claude/last-target-audio.txt"
echo "${TEMP_FILE}" > "$TARGET_AUDIO_FILE"
fi
# Create lock and play audio
touch "$LOCK_FILE"
# Get audio duration for proper lock timing
DURATION=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "${TEMP_FILE}" 2>/dev/null)
DURATION=${DURATION%.*} # Round to integer
DURATION=${DURATION:-1} # Default to 1 second if detection fails
# Convert to 48kHz stereo WAV for better SSH tunnel compatibility
# ElevenLabs returns 44.1kHz mono MP3, which causes static over SSH audio tunnels
# Converting to 48kHz stereo (Windows/PulseAudio native format) eliminates the static
if [[ -n "$SSH_CONNECTION" ]] || [[ -n "$SSH_CLIENT" ]] || [[ -n "$VSCODE_IPC_HOOK_CLI" ]]; then
CONVERTED_FILE="${TEMP_FILE%.mp3}.wav"
if ffmpeg -i "${TEMP_FILE}" -ar 48000 -ac 2 "${CONVERTED_FILE}" -y 2>/dev/null; then
TEMP_FILE="${CONVERTED_FILE}"
fi
fi
# Play audio (WSL/Linux) in background to avoid blocking, fully detached (skip if in test mode)
if [[ "${AGENTVIBES_TEST_MODE:-false}" != "true" ]]; then
(paplay "${TEMP_FILE}" || aplay "${TEMP_FILE}" || mpg123 "${TEMP_FILE}") >/dev/null 2>&1 &
PLAYER_PID=$!
fi
# Wait for audio to finish, then release lock
(sleep $DURATION; rm -f "$LOCK_FILE") &
disown
# Keep temp files for later review - cleaned up weekly by cron
echo "🎵 Saved to: ${TEMP_FILE}"
echo "🎤 Voice used: ${VOICE_NAME} (${VOICE_ID})"
else
echo "❌ Failed to generate audio - API may be unavailable"
echo "Check your API key and network connection"
exit 3
fi

View File

@ -1,338 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/play-tts-piper.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied. Use at your own risk. See the Apache License for details.
#
# ---
#
# @fileoverview Piper TTS Provider Implementation - Free, offline neural TTS
# @context Provides local, privacy-first TTS alternative to cloud services for WSL/Linux
# @architecture Implements provider interface contract for Piper binary integration
# @dependencies piper (pipx), piper-voice-manager.sh, mpv/aplay, ffmpeg (optional padding)
# @entrypoints Called by play-tts.sh router when provider=piper
# @patterns Provider contract: text/voice → audio file path, voice auto-download, language-aware synthesis
# @related play-tts.sh, piper-voice-manager.sh, language-manager.sh, GitHub Issue #25
#
# Fix locale warnings
export LC_ALL=C
TEXT="$1"
VOICE_OVERRIDE="$2" # Optional: voice model name
# Source voice manager and language manager
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/piper-voice-manager.sh"
source "$SCRIPT_DIR/language-manager.sh"
# Default voice for Piper
DEFAULT_VOICE="en_US-lessac-medium"
# @function determine_voice_model
# @intent Resolve voice name to Piper model name with language support
# @why Support voice override, language-specific voices, and default fallback
# @param Uses global: $VOICE_OVERRIDE
# @returns Sets $VOICE_MODEL global variable
# @sideeffects None
VOICE_MODEL=""
# Get current language setting
CURRENT_LANGUAGE=$(get_language_code)
if [[ -n "$VOICE_OVERRIDE" ]]; then
# Use override if provided
VOICE_MODEL="$VOICE_OVERRIDE"
echo "🎤 Using voice: $VOICE_OVERRIDE (session-specific)"
else
# Try to get voice from voice file (check CLAUDE_PROJECT_DIR first for MCP context)
VOICE_FILE=""
# Priority order:
# 1. CLAUDE_PROJECT_DIR env var (set by MCP for project-specific settings)
# 2. Script location (for direct slash command usage)
# 3. Global ~/.claude (fallback)
if [[ -n "$CLAUDE_PROJECT_DIR" ]] && [[ -f "$CLAUDE_PROJECT_DIR/.claude/tts-voice.txt" ]]; then
# MCP context: Use the project directory where MCP was invoked
VOICE_FILE="$CLAUDE_PROJECT_DIR/.claude/tts-voice.txt"
elif [[ -f "$SCRIPT_DIR/../tts-voice.txt" ]]; then
# Direct usage: Use script location
VOICE_FILE="$SCRIPT_DIR/../tts-voice.txt"
elif [[ -f "$HOME/.claude/tts-voice.txt" ]]; then
# Fallback: Use global
VOICE_FILE="$HOME/.claude/tts-voice.txt"
fi
if [[ -n "$VOICE_FILE" ]]; then
FILE_VOICE=$(cat "$VOICE_FILE" 2>/dev/null)
# Check for multi-speaker voice (model + speaker ID stored separately)
# Use same directory as VOICE_FILE for consistency
VOICE_DIR=$(dirname "$VOICE_FILE")
MODEL_FILE="$VOICE_DIR/tts-piper-model.txt"
SPEAKER_ID_FILE="$VOICE_DIR/tts-piper-speaker-id.txt"
if [[ -f "$MODEL_FILE" ]] && [[ -f "$SPEAKER_ID_FILE" ]]; then
# Multi-speaker voice
VOICE_MODEL=$(cat "$MODEL_FILE" 2>/dev/null)
SPEAKER_ID=$(cat "$SPEAKER_ID_FILE" 2>/dev/null)
echo "🎭 Using multi-speaker voice: $FILE_VOICE (Model: $VOICE_MODEL, Speaker ID: $SPEAKER_ID)"
# Check if it's a standard Piper model name or custom voice (just use as-is)
elif [[ -n "$FILE_VOICE" ]]; then
VOICE_MODEL="$FILE_VOICE"
fi
fi
# If no Piper voice from file, try language-specific voice
if [[ -z "$VOICE_MODEL" ]]; then
LANG_VOICE=$(get_voice_for_language "$CURRENT_LANGUAGE" "piper" 2>/dev/null)
if [[ -n "$LANG_VOICE" ]]; then
VOICE_MODEL="$LANG_VOICE"
echo "🌍 Using $CURRENT_LANGUAGE voice: $LANG_VOICE (Piper)"
else
# Use default voice
VOICE_MODEL="$DEFAULT_VOICE"
fi
fi
fi
# @function validate_inputs
# @intent Check required parameters
# @why Fail fast with clear errors if inputs missing
# @exitcode 1=missing text, 2=missing piper binary
if [[ -z "$TEXT" ]]; then
echo "Usage: $0 \"text to speak\" [voice_model_name]"
exit 1
fi
# Check if Piper is installed
if ! command -v piper &> /dev/null; then
echo "❌ Error: Piper TTS not installed"
echo "Install with: pipx install piper-tts"
echo "Or run: .claude/hooks/piper-installer.sh"
exit 2
fi
# @function ensure_voice_downloaded
# @intent Download voice model if not cached
# @why Provide seamless experience with automatic downloads
# @param Uses global: $VOICE_MODEL
# @sideeffects Downloads voice model files
# @edgecases Prompts user for consent before downloading
if ! verify_voice "$VOICE_MODEL"; then
echo "📥 Voice model not found: $VOICE_MODEL"
echo " File size: ~25MB"
echo " Preview: https://huggingface.co/rhasspy/piper-voices"
echo ""
read -p " Download this voice model? [y/N]: " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]; then
if ! download_voice "$VOICE_MODEL"; then
echo "❌ Failed to download voice model"
echo "Fix: Download manually or choose different voice"
exit 3
fi
else
echo "❌ Voice download cancelled"
exit 3
fi
fi
# Get voice model path
VOICE_PATH=$(get_voice_path "$VOICE_MODEL")
if [[ $? -ne 0 ]]; then
echo "❌ Voice model path not found: $VOICE_MODEL"
exit 3
fi
# @function determine_audio_directory
# @intent Find appropriate directory for audio file storage
# @why Supports project-local and global storage
# @returns Sets $AUDIO_DIR global variable
if [[ -n "$CLAUDE_PROJECT_DIR" ]]; then
AUDIO_DIR="$CLAUDE_PROJECT_DIR/.claude/audio"
else
# Fallback: try to find .claude directory in current path
CURRENT_DIR="$PWD"
while [[ "$CURRENT_DIR" != "/" ]]; do
if [[ -d "$CURRENT_DIR/.claude" ]]; then
AUDIO_DIR="$CURRENT_DIR/.claude/audio"
break
fi
CURRENT_DIR=$(dirname "$CURRENT_DIR")
done
# Final fallback to global if no project .claude found
if [[ -z "$AUDIO_DIR" ]]; then
AUDIO_DIR="$HOME/.claude/audio"
fi
fi
mkdir -p "$AUDIO_DIR"
TEMP_FILE="$AUDIO_DIR/tts-$(date +%s).wav"
# @function get_speech_rate
# @intent Determine speech rate for Piper synthesis
# @why Convert user-facing speed (0.5=slower, 2.0=faster) to Piper length-scale (inverted)
# @returns Piper length-scale value (inverted from user scale)
# @note Piper uses length-scale where higher=slower, opposite of user expectation
get_speech_rate() {
local target_config=""
local main_config=""
# Check for target-specific config first (new and legacy paths)
if [[ -f "$SCRIPT_DIR/../config/tts-target-speech-rate.txt" ]]; then
target_config="$SCRIPT_DIR/../config/tts-target-speech-rate.txt"
elif [[ -f "$HOME/.claude/config/tts-target-speech-rate.txt" ]]; then
target_config="$HOME/.claude/config/tts-target-speech-rate.txt"
elif [[ -f "$SCRIPT_DIR/../config/piper-target-speech-rate.txt" ]]; then
target_config="$SCRIPT_DIR/../config/piper-target-speech-rate.txt"
elif [[ -f "$HOME/.claude/config/piper-target-speech-rate.txt" ]]; then
target_config="$HOME/.claude/config/piper-target-speech-rate.txt"
fi
# Check for main config (new and legacy paths)
if [[ -f "$SCRIPT_DIR/../config/tts-speech-rate.txt" ]]; then
main_config="$SCRIPT_DIR/../config/tts-speech-rate.txt"
elif [[ -f "$HOME/.claude/config/tts-speech-rate.txt" ]]; then
main_config="$HOME/.claude/config/tts-speech-rate.txt"
elif [[ -f "$SCRIPT_DIR/../config/piper-speech-rate.txt" ]]; then
main_config="$SCRIPT_DIR/../config/piper-speech-rate.txt"
elif [[ -f "$HOME/.claude/config/piper-speech-rate.txt" ]]; then
main_config="$HOME/.claude/config/piper-speech-rate.txt"
fi
# If this is a non-English voice and target config exists, use it
if [[ "$CURRENT_LANGUAGE" != "english" ]] && [[ -n "$target_config" ]]; then
local user_speed=$(cat "$target_config" 2>/dev/null)
# Convert user speed to Piper length-scale (invert)
# User: 0.5=slower, 1.0=normal, 2.0=faster
# Piper: 2.0=slower, 1.0=normal, 0.5=faster
# Formula: piper_length_scale = 1.0 / user_speed
echo "scale=2; 1.0 / $user_speed" | bc -l 2>/dev/null || echo "1.0"
return
fi
# Otherwise use main config if available
if [[ -n "$main_config" ]]; then
local user_speed=$(grep -v '^#' "$main_config" 2>/dev/null | grep -v '^$' | tail -1)
echo "scale=2; 1.0 / $user_speed" | bc -l 2>/dev/null || echo "1.0"
return
fi
# Default: 1.0 (normal) for English, 2.0 (slower) for learning
if [[ "$CURRENT_LANGUAGE" != "english" ]]; then
echo "2.0"
else
echo "1.0"
fi
}
SPEECH_RATE=$(get_speech_rate)
# @function synthesize_with_piper
# @intent Generate speech using Piper TTS
# @why Provides free, offline TTS alternative
# @param Uses globals: $TEXT, $VOICE_PATH, $SPEECH_RATE, $SPEAKER_ID (optional)
# @returns Creates WAV file at $TEMP_FILE
# @exitcode 0=success, 4=synthesis error
# @sideeffects Creates audio file
# @edgecases Handles piper errors, invalid models, multi-speaker voices
if [[ -n "$SPEAKER_ID" ]]; then
# Multi-speaker voice: Pass speaker ID
echo "$TEXT" | piper --model "$VOICE_PATH" --speaker "$SPEAKER_ID" --length-scale "$SPEECH_RATE" --output_file "$TEMP_FILE" 2>/dev/null
else
# Single-speaker voice
echo "$TEXT" | piper --model "$VOICE_PATH" --length-scale "$SPEECH_RATE" --output_file "$TEMP_FILE" 2>/dev/null
fi
if [[ ! -f "$TEMP_FILE" ]] || [[ ! -s "$TEMP_FILE" ]]; then
echo "❌ Failed to synthesize speech with Piper"
echo "Voice model: $VOICE_MODEL"
echo "Check that voice model is valid"
exit 4
fi
# @function add_silence_padding
# @intent Add silence to prevent WSL audio static
# @why WSL audio subsystem cuts off first ~200ms
# @param Uses global: $TEMP_FILE
# @returns Updates $TEMP_FILE to padded version
# @sideeffects Modifies audio file
# AI NOTE: Use ffmpeg if available, otherwise skip padding (degraded experience)
if command -v ffmpeg &> /dev/null; then
PADDED_FILE="$AUDIO_DIR/tts-padded-$(date +%s).wav"
# Add 200ms of silence at the beginning
ffmpeg -f lavfi -i anullsrc=r=44100:cl=stereo:d=0.2 -i "$TEMP_FILE" \
-filter_complex "[0:a][1:a]concat=n=2:v=0:a=1[out]" \
-map "[out]" -y "$PADDED_FILE" 2>/dev/null
if [[ -f "$PADDED_FILE" ]]; then
rm -f "$TEMP_FILE"
TEMP_FILE="$PADDED_FILE"
fi
fi
# @function play_audio
# @intent Play generated audio using available player with sequential playback
# @why Support multiple audio players and prevent overlapping audio in learning mode
# @param Uses global: $TEMP_FILE, $CURRENT_LANGUAGE
# @sideeffects Plays audio with lock mechanism for sequential playback
LOCK_FILE="/tmp/agentvibes-audio.lock"
# Wait for previous audio to finish (max 30 seconds)
for i in {1..60}; do
if [ ! -f "$LOCK_FILE" ]; then
break
fi
sleep 0.5
done
# Track last target language audio for replay command
if [[ "$CURRENT_LANGUAGE" != "english" ]]; then
TARGET_AUDIO_FILE="${CLAUDE_PROJECT_DIR:-.}/.claude/last-target-audio.txt"
echo "$TEMP_FILE" > "$TARGET_AUDIO_FILE"
fi
# Create lock and play audio
touch "$LOCK_FILE"
# Get audio duration for proper lock timing
DURATION=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$TEMP_FILE" 2>/dev/null)
DURATION=${DURATION%.*} # Round to integer
DURATION=${DURATION:-1} # Default to 1 second if detection fails
# Play audio in background (skip if in test mode)
if [[ "${AGENTVIBES_TEST_MODE:-false}" != "true" ]]; then
(mpv "$TEMP_FILE" || aplay "$TEMP_FILE" || paplay "$TEMP_FILE") >/dev/null 2>&1 &
PLAYER_PID=$!
fi
# Wait for audio to finish, then release lock
(sleep $DURATION; rm -f "$LOCK_FILE") &
disown
echo "🎵 Saved to: $TEMP_FILE"
echo "🎤 Voice used: $VOICE_MODEL (Piper TTS)"

View File

@ -1,100 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/play-tts.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview TTS Provider Router with Language Learning Support
# @context Routes TTS requests to active provider (ElevenLabs or Piper)
# @architecture Provider abstraction layer - single entry point for all TTS
# @dependencies provider-manager.sh, play-tts-elevenlabs.sh, play-tts-piper.sh, github-star-reminder.sh
# @entrypoints Called by hooks, slash commands, personality-manager.sh, and all TTS features
# @patterns Provider pattern - delegates to provider-specific implementations, auto-detects provider from voice name
# @related provider-manager.sh, play-tts-elevenlabs.sh, play-tts-piper.sh, learn-manager.sh
#
# Fix locale warnings
export LC_ALL=C
TEXT="$1"
VOICE_OVERRIDE="$2" # Optional: voice name or ID
# Get script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Source provider manager to get active provider
source "$SCRIPT_DIR/provider-manager.sh"
# Get active provider
ACTIVE_PROVIDER=$(get_active_provider)
# Show GitHub star reminder (once per day)
"$SCRIPT_DIR/github-star-reminder.sh" 2>/dev/null || true
# @function detect_voice_provider
# @intent Auto-detect provider from voice name (for mixed-provider support)
# @why Allow ElevenLabs for main language + Piper for target language
# @param $1 voice name/ID
# @returns Provider name (elevenlabs or piper)
detect_voice_provider() {
local voice="$1"
# Piper voice names contain underscore and dash (e.g., es_ES-davefx-medium)
if [[ "$voice" == *"_"*"-"* ]]; then
echo "piper"
else
echo "$ACTIVE_PROVIDER"
fi
}
# Override provider if voice indicates different provider (mixed-provider mode)
if [[ -n "$VOICE_OVERRIDE" ]]; then
DETECTED_PROVIDER=$(detect_voice_provider "$VOICE_OVERRIDE")
if [[ "$DETECTED_PROVIDER" != "$ACTIVE_PROVIDER" ]]; then
ACTIVE_PROVIDER="$DETECTED_PROVIDER"
fi
fi
# Normal single-language mode - route to appropriate provider implementation
# Note: For learning mode, the output style will call this script TWICE:
# 1. First call with main language text and current voice
# 2. Second call with translated text and target voice
case "$ACTIVE_PROVIDER" in
elevenlabs)
exec "$SCRIPT_DIR/play-tts-elevenlabs.sh" "$TEXT" "$VOICE_OVERRIDE"
;;
piper)
exec "$SCRIPT_DIR/play-tts-piper.sh" "$TEXT" "$VOICE_OVERRIDE"
;;
*)
echo "❌ Unknown provider: $ACTIVE_PROVIDER"
echo " Run: /agent-vibes:provider list"
exit 1
;;
esac

View File

@ -1,540 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/provider-commands.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview Provider management slash commands
# @context User-facing commands for switching and managing TTS providers
# @architecture Part of /agent-vibes:* command system with language compatibility checking
# @dependencies provider-manager.sh, language-manager.sh, voice-manager.sh, piper-voice-manager.sh
# @entrypoints Called by /agent-vibes:provider slash commands (list, switch, info, test, get, preview)
# @patterns Interactive confirmations, platform detection, language compatibility validation
# @related provider-manager.sh, play-tts.sh, voice-manager.sh, piper-voice-manager.sh
#
# Get script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/provider-manager.sh"
source "$SCRIPT_DIR/language-manager.sh"
COMMAND="${1:-help}"
# @function is_language_supported
# @intent Check if a language is supported by a provider
# @param $1 {string} language - Language code (e.g., "spanish", "french")
# @param $2 {string} provider - Provider name (e.g., "elevenlabs", "piper")
# @returns 0 if supported, 1 if not
is_language_supported() {
local language="$1"
local provider="$2"
# English is always supported
if [[ "$language" == "english" ]] || [[ "$language" == "en" ]]; then
return 0
fi
case "$provider" in
elevenlabs)
# ElevenLabs supports all languages via multilingual voices
return 0
;;
piper)
# Piper only supports English natively
return 1
;;
*)
return 1
;;
esac
}
# @function provider_list
# @intent Display all available providers with status
provider_list() {
local current_provider
current_provider=$(get_active_provider)
echo "┌────────────────────────────────────────────────────────────┐"
echo "│ Available TTS Providers │"
echo "├────────────────────────────────────────────────────────────┤"
# ElevenLabs
if [[ "$current_provider" == "elevenlabs" ]]; then
echo "│ ✓ ElevenLabs Premium quality ⭐⭐⭐⭐⭐ [ACTIVE] │"
else
echo "│ ElevenLabs Premium quality ⭐⭐⭐⭐⭐ │"
fi
echo "│ Cost: Free tier + \$5-22/mo │"
echo "│ Platform: All (Windows, macOS, Linux, WSL) │"
echo "│ Offline: No │"
echo "│ │"
# Piper
if [[ "$current_provider" == "piper" ]]; then
echo "│ ✓ Piper TTS Free, offline ⭐⭐⭐⭐ [ACTIVE] │"
else
echo "│ Piper TTS Free, offline ⭐⭐⭐⭐ │"
fi
echo "│ Cost: Free forever │"
echo "│ Platform: WSL, Linux only │"
echo "│ Offline: Yes │"
echo "└────────────────────────────────────────────────────────────┘"
echo ""
echo "Learn more: agentvibes.org/providers"
}
# @function provider_switch
# @intent Switch to a different TTS provider
provider_switch() {
local new_provider="$1"
local force_mode=false
# Check for --force or --yes flag
if [[ "$2" == "--force" ]] || [[ "$2" == "--yes" ]] || [[ "$2" == "-y" ]]; then
force_mode=true
fi
# Auto-enable force mode if running non-interactively (e.g., from MCP)
# Check multiple conditions for MCP/non-interactive context
if [[ ! -t 0 ]] || [[ -n "$CLAUDE_PROJECT_DIR" ]] || [[ -n "$MCP_SERVER" ]]; then
force_mode=true
fi
if [[ -z "$new_provider" ]]; then
echo "❌ Error: Provider name required"
echo "Usage: /agent-vibes:provider switch <provider> [--force]"
echo "Available: elevenlabs, piper"
return 1
fi
# Validate provider
if ! validate_provider "$new_provider"; then
echo "❌ Invalid provider: $new_provider"
echo ""
echo "Available providers:"
list_providers
return 1
fi
local current_provider
current_provider=$(get_active_provider)
if [[ "$current_provider" == "$new_provider" ]]; then
echo "✓ Already using $new_provider"
return 0
fi
# Platform check for Piper
if [[ "$new_provider" == "piper" ]]; then
if ! grep -qi microsoft /proc/version 2>/dev/null && [[ "$(uname -s)" != "Linux" ]]; then
echo "❌ Piper is only supported on WSL and Linux"
echo "Your platform: $(uname -s)"
echo "See: agentvibes.org/platform-support"
return 1
fi
# Check if Piper is installed
if ! command -v piper &> /dev/null; then
echo "❌ Piper TTS is not installed"
echo ""
echo "Install with: pipx install piper-tts"
echo "Or run: .claude/hooks/piper-installer.sh"
echo ""
echo "Visit: agentvibes.org/install-piper"
return 1
fi
fi
# Check language compatibility
local current_language
current_language=$(get_language_code)
if [[ "$current_language" != "english" ]]; then
if ! is_language_supported "$current_language" "$new_provider" 2>/dev/null; then
echo "⚠️ Language Compatibility Warning"
echo ""
echo "Current language: $current_language"
echo "Target provider: $new_provider"
echo ""
echo "❌ Language '$current_language' is not natively supported by $new_provider"
echo " Will fall back to English when using $new_provider"
echo ""
echo "Options:"
echo " 1. Continue anyway (will use English)"
echo " 2. Switch language to English"
echo " 3. Cancel provider switch"
echo ""
# Skip prompt in force mode
if [[ "$force_mode" == true ]]; then
echo "⏩ Force mode: Continuing with fallback to English..."
else
read -p "Choose option [1-3]: " -n 1 -r
echo
case $REPLY in
1)
echo "⏩ Continuing with fallback to English..."
;;
2)
echo "🔄 Switching language to English..."
"$SCRIPT_DIR/language-manager.sh" set english
;;
3)
echo "❌ Provider switch cancelled"
return 1
;;
*)
echo "❌ Invalid option, cancelling"
return 1
;;
esac
fi
fi
fi
# Confirm switch (skip in force mode)
if [[ "$force_mode" != true ]]; then
echo ""
echo "⚠️ Switch to $(echo $new_provider | tr '[:lower:]' '[:upper:]')?"
echo ""
echo "Current: $current_provider"
echo "New: $new_provider"
if [[ "$current_language" != "english" ]]; then
echo "Language: $current_language"
fi
echo ""
read -p "Continue? [y/N]: " -n 1 -r
echo
if [[ ! $REPLY =~ ^[Yy]$ ]]; then
echo "❌ Switch cancelled"
return 1
fi
else
echo "⏩ Force mode: Switching to $new_provider..."
fi
# Perform switch
set_active_provider "$new_provider"
# Update target voice if language learning mode is active
local target_lang_file=""
local target_voice_file=""
# Check project-local first, then global
if [[ -d "$SCRIPT_DIR/../.." ]]; then
local project_dir="$SCRIPT_DIR/../.."
if [[ -f "$project_dir/.claude/tts-target-language.txt" ]]; then
target_lang_file="$project_dir/.claude/tts-target-language.txt"
target_voice_file="$project_dir/.claude/tts-target-voice.txt"
fi
fi
# Fallback to global
if [[ -z "$target_lang_file" ]]; then
if [[ -f "$HOME/.claude/tts-target-language.txt" ]]; then
target_lang_file="$HOME/.claude/tts-target-language.txt"
target_voice_file="$HOME/.claude/tts-target-voice.txt"
fi
fi
# If target language is set, update voice for new provider
if [[ -n "$target_lang_file" ]] && [[ -f "$target_lang_file" ]]; then
local target_lang
target_lang=$(cat "$target_lang_file")
if [[ -n "$target_lang" ]]; then
# Get the recommended voice for this language with new provider
local new_target_voice
new_target_voice=$(get_voice_for_language "$target_lang" "$new_provider")
if [[ -n "$new_target_voice" ]]; then
echo "$new_target_voice" > "$target_voice_file"
echo ""
echo "🔄 Updated target language voice:"
echo " Language: $target_lang"
echo " Voice: $new_target_voice (for $new_provider)"
fi
fi
fi
# Test new provider
echo ""
echo "🔊 Testing provider..."
"$SCRIPT_DIR/play-tts.sh" "Provider switched to $new_provider successfully" 2>/dev/null
echo ""
echo "✓ Provider switch complete!"
echo "Visit agentvibes.org for tips and tricks"
}
# @function provider_info
# @intent Show detailed information about a provider
provider_info() {
local provider_name="$1"
if [[ -z "$provider_name" ]]; then
echo "❌ Error: Provider name required"
echo "Usage: /agent-vibes:provider info <provider>"
return 1
fi
case "$provider_name" in
elevenlabs)
echo "┌────────────────────────────────────────────────────────────┐"
echo "│ ElevenLabs - Premium TTS Provider │"
echo "├────────────────────────────────────────────────────────────┤"
echo "│ Quality: ⭐⭐⭐⭐⭐ (Highest available) │"
echo "│ Cost: Free tier + \$5-22/mo │"
echo "│ Platform: All (Windows, macOS, Linux, WSL) │"
echo "│ Offline: No (requires internet) │"
echo "│ │"
echo "│ Trade-offs: │"
echo "│ + Highest voice quality and naturalness │"
echo "│ + 50+ premium voices available │"
echo "│ + Multilingual support (30+ languages) │"
echo "│ - Requires API key and internet │"
echo "│ - Costs money after free tier │"
echo "│ │"
echo "│ Best for: Premium quality, multilingual needs │"
echo "└────────────────────────────────────────────────────────────┘"
echo ""
echo "Full comparison: agentvibes.org/providers"
;;
piper)
echo "┌────────────────────────────────────────────────────────────┐"
echo "│ Piper TTS - Free Offline Provider │"
echo "├────────────────────────────────────────────────────────────┤"
echo "│ Quality: ⭐⭐⭐⭐ (Very good) │"
echo "│ Cost: Free forever │"
echo "│ Platform: WSL, Linux only │"
echo "│ Offline: Yes (fully local) │"
echo "│ │"
echo "│ Trade-offs: │"
echo "│ + Completely free, no API costs │"
echo "│ + Works offline, no internet needed │"
echo "│ + Fast synthesis (local processing) │"
echo "│ - WSL/Linux only (no macOS/Windows) │"
echo "│ - Slightly lower quality than ElevenLabs │"
echo "│ │"
echo "│ Best for: Budget-conscious, offline use, privacy │"
echo "└────────────────────────────────────────────────────────────┘"
echo ""
echo "Full comparison: agentvibes.org/providers"
;;
*)
echo "❌ Unknown provider: $provider_name"
echo "Available: elevenlabs, piper"
;;
esac
}
# @function provider_test
# @intent Test current provider with sample audio
provider_test() {
local current_provider
current_provider=$(get_active_provider)
echo "🔊 Testing provider: $current_provider"
echo ""
"$SCRIPT_DIR/play-tts.sh" "Provider test successful. Audio is working correctly with $current_provider."
echo ""
echo "✓ Test complete"
}
# @function provider_get
# @intent Show currently active provider
provider_get() {
local current_provider
current_provider=$(get_active_provider)
echo "🎤 Current Provider: $current_provider"
echo ""
# Show brief info
case "$current_provider" in
elevenlabs)
echo "Quality: ⭐⭐⭐⭐⭐"
echo "Cost: Free tier + \$5-22/mo"
echo "Offline: No"
;;
piper)
echo "Quality: ⭐⭐⭐⭐"
echo "Cost: Free forever"
echo "Offline: Yes"
;;
esac
echo ""
echo "Use /agent-vibes:provider info $current_provider for details"
}
# @function provider_preview
# @intent Preview voices for the currently active provider
# @architecture Delegates to provider-specific voice managers
provider_preview() {
local current_provider
current_provider=$(get_active_provider)
echo "🎤 Voice Preview ($current_provider)"
echo ""
case "$current_provider" in
elevenlabs)
# Use the ElevenLabs voice manager
"$SCRIPT_DIR/voice-manager.sh" preview "$@"
;;
piper)
# Use the Piper voice manager's list functionality
source "$SCRIPT_DIR/piper-voice-manager.sh"
# Check if a specific voice was requested
local voice_arg="$1"
if [[ -n "$voice_arg" ]]; then
# User requested a specific voice - check if it's a valid Piper voice
# Piper voice names are like: en_US-lessac-medium
# Try to find a matching voice model
# Check if the voice arg looks like a Piper model name (contains underscores/hyphens)
if [[ "$voice_arg" =~ ^[a-z]{2}_[A-Z]{2}- ]]; then
# Looks like a Piper voice model name
if verify_voice "$voice_arg"; then
echo "🎤 Previewing Piper voice: $voice_arg"
echo ""
"$SCRIPT_DIR/play-tts.sh" "Hello, this is the $voice_arg voice. How do you like it?" "$voice_arg"
else
echo "❌ Voice model not found: $voice_arg"
echo ""
echo "💡 Piper voice names look like: en_US-lessac-medium"
echo " Run /agent-vibes:list to see available Piper voices"
fi
else
# Looks like an ElevenLabs voice name (like "Antoni", "Jessica")
echo "❌ '$voice_arg' appears to be an ElevenLabs voice"
echo ""
echo "You're currently using Piper TTS (free provider)."
echo "Piper has different voices than ElevenLabs."
echo ""
echo "Options:"
echo " 1. Run /agent-vibes:list to see available Piper voices"
echo " 2. Switch to ElevenLabs: /agent-vibes:provider switch elevenlabs"
echo ""
echo "Popular Piper voices to try:"
echo " • en_US-lessac-medium (clear, professional)"
echo " • en_US-amy-medium (warm, friendly)"
echo " • en_US-joe-medium (casual, natural)"
fi
return
fi
# No specific voice - preview first 3 voices
echo "🎤 Piper Preview of 3 people"
echo ""
# Play first 3 Piper voices as samples
local sample_voices=(
"en_US-lessac-medium:Lessac"
"en_US-amy-medium:Amy"
"en_US-joe-medium:Joe"
)
for voice_entry in "${sample_voices[@]}"; do
local voice_name="${voice_entry%%:*}"
local display_name="${voice_entry##*:}"
echo "🔊 ${display_name}..."
"$SCRIPT_DIR/play-tts.sh" "Hi, my name is ${display_name}" "$voice_name"
# Wait for the voice to finish playing before starting next one
sleep 3
done
echo ""
echo "✓ Preview complete"
echo "💡 Use /agent-vibes:list to see all available Piper voices"
;;
*)
echo "❌ Unknown provider: $current_provider"
;;
esac
}
# @function provider_help
# @intent Show help for provider commands
provider_help() {
echo "Provider Management Commands"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "Usage:"
echo " /agent-vibes:provider list # Show all providers"
echo " /agent-vibes:provider switch <name> # Switch provider"
echo " /agent-vibes:provider info <name> # Provider details"
echo " /agent-vibes:provider test # Test current provider"
echo " /agent-vibes:provider get # Show active provider"
echo ""
echo "Examples:"
echo " /agent-vibes:provider switch piper"
echo " /agent-vibes:provider info elevenlabs"
echo ""
echo "Learn more: agentvibes.org/docs/providers"
}
# Route to appropriate function
case "$COMMAND" in
list)
provider_list
;;
switch)
provider_switch "$2" "$3"
;;
info)
provider_info "$2"
;;
test)
provider_test
;;
get)
provider_get
;;
preview)
shift # Remove 'preview' from args
provider_preview "$@"
;;
help|*)
provider_help
;;
esac

View File

@ -1,298 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/provider-manager.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview TTS Provider Management Functions
# @context Core provider abstraction layer for multi-provider TTS system
# @architecture Provides functions to get/set/list/validate TTS providers
# @dependencies None - pure bash implementation
# @entrypoints Sourced by play-tts.sh and provider management commands
# @patterns File-based state management with project-local and global fallback
# @related play-tts.sh, play-tts-elevenlabs.sh, play-tts-piper.sh, provider-commands.sh
#
# @function get_provider_config_path
# @intent Determine path to tts-provider.txt file
# @why Supports both project-local (.claude/) and global (~/.claude/) storage
# @returns Echoes path to provider config file
# @exitcode 0=always succeeds
# @sideeffects None
# @edgecases Creates parent directory if missing
get_provider_config_path() {
local provider_file
# Check project-local first
if [[ -n "$CLAUDE_PROJECT_DIR" ]] && [[ -d "$CLAUDE_PROJECT_DIR/.claude" ]]; then
provider_file="$CLAUDE_PROJECT_DIR/.claude/tts-provider.txt"
else
# Search up directory tree for .claude/
local current_dir="$PWD"
while [[ "$current_dir" != "/" ]]; do
if [[ -d "$current_dir/.claude" ]]; then
provider_file="$current_dir/.claude/tts-provider.txt"
break
fi
current_dir=$(dirname "$current_dir")
done
# Fallback to global if no project .claude found
if [[ -z "$provider_file" ]]; then
provider_file="$HOME/.claude/tts-provider.txt"
fi
fi
echo "$provider_file"
}
# @function get_active_provider
# @intent Read currently active TTS provider from config file
# @why Central function for determining which provider to use
# @returns Echoes provider name (e.g., "elevenlabs", "piper")
# @exitcode 0=success
# @sideeffects None
# @edgecases Returns "elevenlabs" if file missing or empty (default)
get_active_provider() {
local provider_file
provider_file=$(get_provider_config_path)
# Read provider from file, default to piper if not found
if [[ -f "$provider_file" ]]; then
local provider
provider=$(cat "$provider_file" | tr -d '[:space:]')
if [[ -n "$provider" ]]; then
echo "$provider"
return 0
fi
fi
# Default to piper (free, offline)
echo "piper"
}
# @function set_active_provider
# @intent Write active provider to config file
# @why Allows runtime provider switching without restart
# @param $1 {string} provider - Provider name (e.g., "elevenlabs", "piper")
# @returns None (outputs success/error message)
# @exitcode 0=success, 1=invalid provider
# @sideeffects Writes to tts-provider.txt file
# @edgecases Creates file and parent directory if missing
set_active_provider() {
local provider="$1"
if [[ -z "$provider" ]]; then
echo "❌ Error: Provider name required"
echo "Usage: set_active_provider <provider_name>"
return 1
fi
# Validate provider exists
if ! validate_provider "$provider"; then
echo "❌ Error: Provider '$provider' not found"
echo "Available providers:"
list_providers
return 1
fi
local provider_file
provider_file=$(get_provider_config_path)
# Create directory if it doesn't exist
mkdir -p "$(dirname "$provider_file")"
# Write provider to file
echo "$provider" > "$provider_file"
# Reset voice when switching providers to avoid incompatible voices
# (e.g., ElevenLabs "Demon Monster" doesn't exist in Piper)
local voice_file
if [[ -n "$CLAUDE_PROJECT_DIR" ]] && [[ -d "$CLAUDE_PROJECT_DIR/.claude" ]]; then
voice_file="$CLAUDE_PROJECT_DIR/.claude/tts-voice.txt"
else
voice_file="$HOME/.claude/tts-voice.txt"
fi
# Set default voice for the new provider
local default_voice
case "$provider" in
piper)
# Default Piper voice
default_voice="en_US-lessac-medium"
;;
elevenlabs)
# Default ElevenLabs voice (first in alphabetical order from voices-config.sh)
default_voice="Amy"
;;
*)
# Unknown provider - remove voice file
if [[ -f "$voice_file" ]]; then
rm -f "$voice_file"
fi
echo "✓ Active provider set to: $provider (voice reset)"
return 0
;;
esac
# Write default voice to file
echo "$default_voice" > "$voice_file"
echo "✓ Active provider set to: $provider (voice set to: $default_voice)"
}
# @function list_providers
# @intent List all available TTS providers
# @why Discover which providers are installed
# @returns Echoes provider names (one per line)
# @exitcode 0=success
# @sideeffects None
# @edgecases Returns empty if no play-tts-*.sh files found
list_providers() {
local script_dir
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Find all play-tts-*.sh files
local providers=()
shopt -s nullglob # Handle case where no files match
for file in "$script_dir"/play-tts-*.sh; do
if [[ -f "$file" ]] && [[ "$file" != *"play-tts.sh" ]]; then
# Extract provider name from filename (play-tts-elevenlabs.sh -> elevenlabs)
local basename
basename=$(basename "$file")
local provider
provider="${basename#play-tts-}"
provider="${provider%.sh}"
providers+=("$provider")
fi
done
shopt -u nullglob
# Output providers
if [[ ${#providers[@]} -eq 0 ]]; then
echo "⚠️ No providers found"
return 0
fi
for provider in "${providers[@]}"; do
echo "$provider"
done
}
# @function validate_provider
# @intent Check if provider implementation exists
# @why Prevent errors from switching to non-existent provider
# @param $1 {string} provider - Provider name to validate
# @returns None
# @exitcode 0=provider exists, 1=provider not found
# @sideeffects None
# @edgecases Checks for corresponding play-tts-*.sh file
validate_provider() {
local provider="$1"
if [[ -z "$provider" ]]; then
return 1
fi
local script_dir
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
local provider_script="$script_dir/play-tts-${provider}.sh"
[[ -f "$provider_script" ]]
}
# @function get_provider_script_path
# @intent Get absolute path to provider implementation script
# @why Used by router to execute provider-specific logic
# @param $1 {string} provider - Provider name
# @returns Echoes absolute path to play-tts-*.sh file
# @exitcode 0=success, 1=provider not found
# @sideeffects None
get_provider_script_path() {
local provider="$1"
if [[ -z "$provider" ]]; then
echo "❌ Error: Provider name required" >&2
return 1
fi
local script_dir
script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
local provider_script="$script_dir/play-tts-${provider}.sh"
if [[ ! -f "$provider_script" ]]; then
echo "❌ Error: Provider '$provider' not found at $provider_script" >&2
return 1
fi
echo "$provider_script"
}
# AI NOTE: This file provides the core abstraction layer for multi-provider TTS.
# All provider state is managed through simple text files for simplicity and reliability.
# Project-local configuration takes precedence over global to support per-project providers.
# Command-line interface (when script is executed, not sourced)
if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
case "${1:-}" in
get)
get_active_provider
;;
switch|set)
if [[ -z "${2:-}" ]]; then
echo "❌ Error: Provider name required"
echo "Usage: $0 switch <provider>"
exit 1
fi
set_active_provider "$2"
;;
list)
list_providers
;;
validate)
if [[ -z "${2:-}" ]]; then
echo "❌ Error: Provider name required"
echo "Usage: $0 validate <provider>"
exit 1
fi
validate_provider "$2"
;;
*)
echo "Usage: $0 {get|switch|list|validate} [provider]"
echo ""
echo "Commands:"
echo " get - Show active provider"
echo " switch <name> - Switch to provider"
echo " list - List available providers"
echo " validate <name> - Check if provider exists"
exit 1
;;
esac
fi

View File

@ -1,95 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/replay-target-audio.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview Replay Last Target Language Audio
# @context Replays the most recent target language TTS for language learning
# @architecture Simple audio replay with lock mechanism for sequential playback
# @dependencies ffprobe, paplay/aplay/mpg123/mpv, .claude/last-target-audio.txt
# @entrypoints Called by /agent-vibes:replay-target slash command
# @patterns Sequential audio playback with lock file, duration-based lock release
# @related play-tts-piper.sh, play-tts-elevenlabs.sh, learn-manager.sh
#
# Fix locale warnings
export LC_ALL=C
TARGET_AUDIO_FILE="${CLAUDE_PROJECT_DIR:-.}/.claude/last-target-audio.txt"
# Check if target audio tracking file exists
if [ ! -f "$TARGET_AUDIO_FILE" ]; then
echo "❌ No target language audio found."
echo " Language learning mode may not be active."
echo " Activate with: /agent-vibes:learn"
exit 1
fi
# Read last target audio file path
LAST_AUDIO=$(cat "$TARGET_AUDIO_FILE")
# Verify audio file exists
if [ ! -f "$LAST_AUDIO" ]; then
echo "❌ Audio file not found: $LAST_AUDIO"
echo " The file may have been deleted or moved."
exit 1
fi
echo "🔁 Replaying target language audio..."
# Use lock file for sequential playback
LOCK_FILE="/tmp/agentvibes-audio.lock"
# Wait for any current audio to finish (max 30 seconds)
for i in {1..60}; do
if [ ! -f "$LOCK_FILE" ]; then
break
fi
sleep 0.5
done
# Create lock
touch "$LOCK_FILE"
# Get audio duration for proper lock timing
DURATION=$(ffprobe -v error -show_entries format=duration -of default=noprint_wrappers=1:nokey=1 "$LAST_AUDIO" 2>/dev/null)
DURATION=${DURATION%.*} # Round to integer
DURATION=${DURATION:-1} # Default to 1 second if detection fails
# Play audio
(paplay "$LAST_AUDIO" || aplay "$LAST_AUDIO" || mpg123 "$LAST_AUDIO" || mpv "$LAST_AUDIO") >/dev/null 2>&1 &
PLAYER_PID=$!
# Wait for audio to finish, then release lock
(sleep $DURATION; rm -f "$LOCK_FILE") &
disown
echo "✅ Replay complete: $(basename "$LAST_AUDIO")"

View File

@ -1,201 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/sentiment-manager.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview Sentiment Manager - Applies personality styles to current voice without changing the voice itself
# @context Allows adding emotional/tonal layers (flirty, sarcastic, etc.) to any voice while preserving voice identity
# @architecture Reuses personality markdown files, stores sentiment separately from personality
# @dependencies .claude/personalities/*.md files, play-tts.sh for acknowledgment
# @entrypoints Called by /agent-vibes:sentiment slash command
# @patterns Personality/sentiment separation, state file management, random example selection
# @related personality-manager.sh, .claude/personalities/*.md, .claude/tts-sentiment.txt
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PERSONALITIES_DIR="$SCRIPT_DIR/../personalities"
# Project-local file first, global fallback
# Use logical path (not physical) to handle symlinked .claude directories
# Script is at .claude/hooks/sentiment-manager.sh, so .claude is ..
CLAUDE_DIR="$(cd "$SCRIPT_DIR/.." 2>/dev/null && pwd)"
# Check if we have a project-local .claude directory
if [[ -d "$CLAUDE_DIR" ]] && [[ "$CLAUDE_DIR" != "$HOME/.claude" ]]; then
SENTIMENT_FILE="$CLAUDE_DIR/tts-sentiment.txt"
else
SENTIMENT_FILE="$HOME/.claude/tts-sentiment.txt"
fi
# Function to get personality data from markdown file
get_personality_data() {
local personality="$1"
local field="$2"
local file="$PERSONALITIES_DIR/${personality}.md"
if [[ ! -f "$file" ]]; then
return 1
fi
case "$field" in
description)
grep "^description:" "$file" | cut -d: -f2- | sed 's/^[[:space:]]*//;s/[[:space:]]*$//'
;;
esac
}
# Function to list all available personalities
list_personalities() {
if [[ -d "$PERSONALITIES_DIR" ]]; then
for file in "$PERSONALITIES_DIR"/*.md; do
if [[ -f "$file" ]]; then
basename "$file" .md
fi
done
fi
}
case "$1" in
list)
echo "🎭 Available Sentiments:"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Get current sentiment
CURRENT="none"
if [ -f "$SENTIMENT_FILE" ]; then
CURRENT=$(cat "$SENTIMENT_FILE")
fi
# List personalities from markdown files
echo "Available sentiment styles:"
for personality in $(list_personalities | sort); do
desc=$(get_personality_data "$personality" "description")
if [[ "$personality" == "$CURRENT" ]]; then
echo "$personality - $desc (current)"
else
echo " - $personality - $desc"
fi
done
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "Usage: /agent-vibes:sentiment <name>"
echo " /agent-vibes:sentiment clear"
;;
set)
SENTIMENT="$2"
if [[ -z "$SENTIMENT" ]]; then
echo "❌ Please specify a sentiment name"
echo "Usage: $0 set <sentiment>"
exit 1
fi
# Check if sentiment file exists
if [[ ! -f "$PERSONALITIES_DIR/${SENTIMENT}.md" ]]; then
echo "❌ Sentiment not found: $SENTIMENT"
echo ""
echo "Available sentiments:"
for p in $(list_personalities | sort); do
echo "$p"
done
exit 1
fi
# Save the sentiment (but don't change personality or voice)
echo "$SENTIMENT" > "$SENTIMENT_FILE"
echo "🎭 Sentiment set to: $SENTIMENT"
echo "🎤 Voice remains unchanged"
echo ""
# Make a sentiment-appropriate remark with TTS
TTS_SCRIPT="$SCRIPT_DIR/play-tts.sh"
# Try to get acknowledgment from personality file (sentiments use same personality files)
PERSONALITY_FILE_PATH="$PERSONALITIES_DIR/${SENTIMENT}.md"
REMARK=""
if [[ -f "$PERSONALITY_FILE_PATH" ]]; then
# Extract example responses from personality file (lines starting with "- ")
mapfile -t EXAMPLES < <(grep '^- "' "$PERSONALITY_FILE_PATH" | sed 's/^- "//; s/"$//')
if [[ ${#EXAMPLES[@]} -gt 0 ]]; then
# Pick a random example
REMARK="${EXAMPLES[$RANDOM % ${#EXAMPLES[@]}]}"
fi
fi
# Fallback if no examples found
if [[ -z "$REMARK" ]]; then
REMARK="Sentiment set to ${SENTIMENT} while maintaining current voice"
fi
echo "💬 $REMARK"
"$TTS_SCRIPT" "$REMARK"
;;
get)
if [ -f "$SENTIMENT_FILE" ]; then
CURRENT=$(cat "$SENTIMENT_FILE")
echo "Current sentiment: $CURRENT"
desc=$(get_personality_data "$CURRENT" "description")
[[ -n "$desc" ]] && echo "Description: $desc"
else
echo "Current sentiment: none (voice personality only)"
fi
;;
clear)
rm -f "$SENTIMENT_FILE"
echo "🎭 Sentiment cleared - using voice personality only"
;;
*)
# If a single argument is provided and it's not a command, treat it as "set <sentiment>"
if [[ -n "$1" ]] && [[ -f "$PERSONALITIES_DIR/${1}.md" ]]; then
exec "$0" set "$1"
else
echo "AgentVibes Sentiment Manager"
echo ""
echo "Commands:"
echo " list - List all sentiments"
echo " set <name> - Set sentiment for current voice"
echo " get - Show current sentiment"
echo " clear - Clear sentiment"
echo ""
echo "Examples:"
echo " /agent-vibes:sentiment flirty # Add flirty style to current voice"
echo " /agent-vibes:sentiment sarcastic # Add sarcasm to current voice"
echo " /agent-vibes:sentiment clear # Remove sentiment"
fi
;;
esac

View File

@ -1,291 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/speed-manager.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview Speech Speed Manager for Multi-Provider TTS
# @context Manage speech rate for main and target language voices
# @architecture Simple config file manager supporting both Piper (length-scale) and ElevenLabs (speed API parameter)
# @dependencies .claude/config/tts-speech-rate.txt, .claude/config/tts-target-speech-rate.txt
# @entrypoints Called by /agent-vibes:set-speed slash command
# @patterns Provider-agnostic speed config, legacy file migration, random tongue twisters for testing
# @related play-tts.sh, play-tts-piper.sh, play-tts-elevenlabs.sh, learn-manager.sh
#
# Get script directory
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
# Determine config directory (project-local first, then global)
if [[ -n "$CLAUDE_PROJECT_DIR" ]] && [[ -d "$CLAUDE_PROJECT_DIR/.claude" ]]; then
CONFIG_DIR="$CLAUDE_PROJECT_DIR/.claude/config"
else
# Try to find .claude in current path
CURRENT_DIR="$PWD"
while [[ "$CURRENT_DIR" != "/" ]]; do
if [[ -d "$CURRENT_DIR/.claude" ]]; then
CONFIG_DIR="$CURRENT_DIR/.claude/config"
break
fi
CURRENT_DIR=$(dirname "$CURRENT_DIR")
done
# Fallback to global
if [[ -z "$CONFIG_DIR" ]]; then
CONFIG_DIR="$HOME/.claude/config"
fi
fi
mkdir -p "$CONFIG_DIR"
MAIN_SPEED_FILE="$CONFIG_DIR/tts-speech-rate.txt"
TARGET_SPEED_FILE="$CONFIG_DIR/tts-target-speech-rate.txt"
# Legacy file paths for backward compatibility (Piper-specific naming)
LEGACY_MAIN_SPEED_FILE="$CONFIG_DIR/piper-speech-rate.txt"
LEGACY_TARGET_SPEED_FILE="$CONFIG_DIR/piper-target-speech-rate.txt"
# @function parse_speed_value
# @intent Convert user-friendly speed notation to normalized speed multiplier
# @param $1 Speed string (e.g., "2x", "0.5x", "normal")
# @returns Numeric speed value (0.5=slower, 1.0=normal, 2.0=faster, 3.0=very fast)
# @note This is the user-facing scale - provider scripts will convert as needed
parse_speed_value() {
local input="$1"
# Handle special cases
case "$input" in
normal|1x|1.0)
echo "1.0"
return
;;
slow|slower|0.5x)
echo "0.5"
return
;;
fast|2x|2.0)
echo "2.0"
return
;;
faster|3x|3.0)
echo "3.0"
return
;;
esac
# Strip leading '+' or '-' if present
input="${input#+}"
input="${input#-}"
# Strip trailing 'x' if present
input="${input%x}"
# Validate it's a number
if [[ "$input" =~ ^[0-9]+\.?[0-9]*$ ]]; then
echo "$input"
else
echo "ERROR"
fi
}
# @function set_speed
# @intent Set speech speed for main or target voice
# @param $1 Target ("target" or empty for main)
# @param $2 Speed value
set_speed() {
local is_target=false
local speed_input=""
# Parse arguments
if [[ "$1" == "target" ]]; then
is_target=true
speed_input="$2"
else
speed_input="$1"
fi
if [[ -z "$speed_input" ]]; then
echo "❌ Error: Speed value required"
echo "Usage: /agent-vibes:set-speed [target] <speed>"
echo "Examples: 2x, 0.5x, normal, +3x"
return 1
fi
# Parse speed value
local speed_value
speed_value=$(parse_speed_value "$speed_input")
if [[ "$speed_value" == "ERROR" ]]; then
echo "❌ Invalid speed value: $speed_input"
echo "Valid values: normal, 0.5x, 1x, 2x, 3x, +2x, -2x"
return 1
fi
# Determine which file to write to
local config_file
local voice_type
if [[ "$is_target" == true ]]; then
config_file="$TARGET_SPEED_FILE"
voice_type="target language"
else
config_file="$MAIN_SPEED_FILE"
voice_type="main voice"
fi
# Write speed value
echo "$speed_value" > "$config_file"
# Show confirmation
echo "✓ Speech speed set for $voice_type"
echo ""
echo "Speed: ${speed_value}x"
case "$speed_value" in
0.5)
echo "Effect: Half speed (slower)"
;;
1.0)
echo "Effect: Normal speed"
;;
2.0)
echo "Effect: Double speed (faster)"
;;
3.0)
echo "Effect: Triple speed (very fast)"
;;
*)
if (( $(echo "$speed_value > 1.0" | bc -l) )); then
echo "Effect: Faster speech"
else
echo "Effect: Slower speech"
fi
;;
esac
echo ""
echo "Note: Speed control works with both Piper and ElevenLabs providers"
# Array of simple test messages to demonstrate speed
local test_messages=(
"Testing speed change"
"Speed test in progress"
"Checking audio speed"
"Speed configuration test"
"Audio speed test"
)
# Pick a random test message
local random_index=$((RANDOM % ${#test_messages[@]}))
local test_msg="${test_messages[$random_index]}"
echo ""
echo "🔊 Testing new speed with: \"$test_msg\""
"$SCRIPT_DIR/play-tts.sh" "$test_msg" &
}
# @function migrate_legacy_files
# @intent Migrate from old piper-specific files to provider-agnostic files
# @why Ensure backward compatibility when upgrading from Piper-only to multi-provider
migrate_legacy_files() {
# Migrate main speed file
if [[ -f "$LEGACY_MAIN_SPEED_FILE" ]] && [[ ! -f "$MAIN_SPEED_FILE" ]]; then
cp "$LEGACY_MAIN_SPEED_FILE" "$MAIN_SPEED_FILE"
fi
# Migrate target speed file
if [[ -f "$LEGACY_TARGET_SPEED_FILE" ]] && [[ ! -f "$TARGET_SPEED_FILE" ]]; then
cp "$LEGACY_TARGET_SPEED_FILE" "$TARGET_SPEED_FILE"
fi
}
# @function get_speed
# @intent Display current speech speed settings
get_speed() {
# Migrate legacy files if needed
migrate_legacy_files
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo " Current Speech Speed Settings"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
# Main voice speed
if [[ -f "$MAIN_SPEED_FILE" ]]; then
local main_speed=$(grep -v '^#' "$MAIN_SPEED_FILE" 2>/dev/null | grep -v '^$' | tail -1)
echo "Main voice: ${main_speed}x"
else
echo "Main voice: 1.0x (default, normal speed)"
fi
# Target voice speed
if [[ -f "$TARGET_SPEED_FILE" ]]; then
local target_speed=$(cat "$TARGET_SPEED_FILE" 2>/dev/null)
echo "Target language: ${target_speed}x"
else
echo "Target language: 0.5x (default, slower for learning)"
fi
echo ""
echo "Scale: 0.5x=slower, 1.0x=normal, 2.0x=faster, 3.0x=very fast"
echo "Works with: Piper TTS and ElevenLabs"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
}
# Main command handler
case "${1:-}" in
target)
set_speed "target" "$2"
;;
get|status)
get_speed
;;
normal|fast|slow|slower|*x|*.*|+*|-*)
set_speed "$1"
;;
*)
echo "Speech Speed Manager"
echo ""
echo "Usage:"
echo " /agent-vibes:set-speed <speed> Set main voice speed"
echo " /agent-vibes:set-speed target <speed> Set target language speed"
echo " /agent-vibes:set-speed get Show current speeds"
echo ""
echo "Speed values:"
echo " 0.5x or slow/slower = Half speed (slower)"
echo " 1x or normal = Normal speed"
echo " 2x or fast = Double speed (faster)"
echo " 3x or faster = Triple speed (very fast)"
echo ""
echo "Examples:"
echo " /agent-vibes:set-speed 2x # Make voice faster"
echo " /agent-vibes:set-speed 0.5x # Make voice slower"
echo " /agent-vibes:set-speed target 0.5x # Slow down target language for learning"
echo " /agent-vibes:set-speed normal # Reset to normal"
;;
esac

View File

@ -1,594 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/voice-manager.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied. Use at your own risk. See the Apache License for details.
#
# ---
#
# @fileoverview Voice Manager - Unified voice management for both ElevenLabs and Piper providers
# @context Central interface for listing, switching, previewing, and replaying TTS voices across providers
# @architecture Provider-aware operations with dynamic voice listing based on active provider
# @dependencies voices-config.sh (ElevenLabs mappings), piper-voice-manager.sh (Piper voices), provider-manager.sh
# @entrypoints Called by /agent-vibes:switch, /agent-vibes:list, /agent-vibes:whoami, /agent-vibes:replay commands
# @patterns Provider abstraction, numbered selection UI, silent mode for programmatic switching
# @related voices-config.sh, piper-voice-manager.sh, .claude/tts-voice.txt, .claude/audio/ (replay)
# Get script directory (physical path for sourcing files)
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd -P)"
source "$SCRIPT_DIR/voices-config.sh"
# Determine target .claude directory based on context
# Priority:
# 1. CLAUDE_PROJECT_DIR env var (set by MCP for project-specific settings)
# 2. Script location (for direct slash command usage)
# 3. Global ~/.claude (fallback)
if [[ -n "$CLAUDE_PROJECT_DIR" ]] && [[ -d "$CLAUDE_PROJECT_DIR/.claude" ]]; then
# MCP context: Use the project directory where MCP was invoked
CLAUDE_DIR="$CLAUDE_PROJECT_DIR/.claude"
else
# Direct usage context: Use script location
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
CLAUDE_DIR="$(dirname "$SCRIPT_PATH")"
# If script is in global ~/.claude, use that
if [[ "$CLAUDE_DIR" == "$HOME/.claude" ]]; then
CLAUDE_DIR="$HOME/.claude"
elif [[ ! -d "$CLAUDE_DIR" ]]; then
# Fallback to global if directory doesn't exist
CLAUDE_DIR="$HOME/.claude"
fi
fi
VOICE_FILE="$CLAUDE_DIR/tts-voice.txt"
case "$1" in
list)
# Get active provider
PROVIDER_FILE="$CLAUDE_DIR/tts-provider.txt"
if [[ ! -f "$PROVIDER_FILE" ]]; then
PROVIDER_FILE="$HOME/.claude/tts-provider.txt"
fi
ACTIVE_PROVIDER="elevenlabs" # default
if [ -f "$PROVIDER_FILE" ]; then
ACTIVE_PROVIDER=$(cat "$PROVIDER_FILE")
fi
CURRENT_VOICE=$(cat "$VOICE_FILE" 2>/dev/null || echo "Cowboy Bob")
if [[ "$ACTIVE_PROVIDER" == "piper" ]]; then
echo "🎤 Available Piper TTS Voices:"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# List downloaded Piper voices
if [[ -f "$SCRIPT_DIR/piper-voice-manager.sh" ]]; then
source "$SCRIPT_DIR/piper-voice-manager.sh"
VOICE_DIR=$(get_voice_storage_dir)
VOICE_COUNT=0
for onnx_file in "$VOICE_DIR"/*.onnx; do
if [[ -f "$onnx_file" ]]; then
voice=$(basename "$onnx_file" .onnx)
if [ "$voice" = "$CURRENT_VOICE" ]; then
echo "$voice (current)"
else
echo " $voice"
fi
((VOICE_COUNT++))
fi
done | sort
if [[ $VOICE_COUNT -eq 0 ]]; then
echo " (No Piper voices downloaded yet)"
echo ""
echo "Download voices with: /agent-vibes:provider download <voice-name>"
echo "Examples: en_US-lessac-medium, en_GB-alba-medium"
fi
fi
else
echo "🎤 Available ElevenLabs TTS Voices:"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
for voice in "${!VOICES[@]}"; do
if [ "$voice" = "$CURRENT_VOICE" ]; then
echo "$voice (current)"
else
echo " $voice"
fi
done | sort
fi
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "Usage: voice-manager.sh switch <name>"
echo " voice-manager.sh preview"
;;
preview)
# Get play-tts.sh path
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
TTS_SCRIPT="$SCRIPT_DIR/play-tts.sh"
# Check if a specific voice name was provided
if [[ -n "$2" ]] && [[ "$2" != "first" ]] && [[ "$2" != "last" ]] && ! [[ "$2" =~ ^[0-9]+$ ]]; then
# User specified a voice name
VOICE_NAME="$2"
# Check if voice exists
if [[ -n "${VOICES[$VOICE_NAME]}" ]]; then
echo "🎤 Previewing voice: ${VOICE_NAME}"
echo ""
"$TTS_SCRIPT" "Hello, this is ${VOICE_NAME}. How do you like my voice?" "${VOICE_NAME}"
else
echo "❌ Voice not found: ${VOICE_NAME}"
echo ""
echo "Available voices:"
for voice in "${!VOICES[@]}"; do
echo "$voice"
done | sort
fi
exit 0
fi
# Original preview logic for first/last/number
echo "🎤 Voice Preview - Playing first 3 voices..."
echo ""
# Sort voices and preview first 3
VOICE_ARRAY=()
for voice in "${!VOICES[@]}"; do
VOICE_ARRAY+=("$voice")
done
# Sort the array
IFS=$'\n' SORTED_VOICES=($(sort <<<"${VOICE_ARRAY[*]}"))
unset IFS
# Play first 3 voices
COUNT=0
for voice in "${SORTED_VOICES[@]}"; do
if [ $COUNT -eq 3 ]; then
break
fi
echo "🔊 ${voice}..."
"$TTS_SCRIPT" "Hi, I'm ${voice}" "${VOICES[$voice]}"
sleep 0.5
COUNT=$((COUNT + 1))
done
echo ""
echo "Would you like to hear more? Reply 'yes' to continue."
;;
switch)
VOICE_NAME="$2"
SILENT_MODE=false
# Check for --silent flag
if [[ "$2" == "--silent" ]] || [[ "$3" == "--silent" ]]; then
SILENT_MODE=true
# If --silent is first arg, voice name is in $3
[[ "$2" == "--silent" ]] && VOICE_NAME="$3"
fi
if [[ -z "$VOICE_NAME" ]]; then
# Show numbered list for selection
echo "🎤 Select a voice by number:"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Get current voice
CURRENT="Cowboy Bob"
if [ -f "$VOICE_FILE" ]; then
CURRENT=$(cat "$VOICE_FILE")
fi
# Create array of voice names
VOICE_ARRAY=()
for voice in "${!VOICES[@]}"; do
VOICE_ARRAY+=("$voice")
done
# Sort the array
IFS=$'\n' SORTED_VOICES=($(sort <<<"${VOICE_ARRAY[*]}"))
unset IFS
# Display numbered list in two columns for compactness
HALF=$(( (${#SORTED_VOICES[@]} + 1) / 2 ))
for i in $(seq 0 $((HALF - 1))); do
NUM1=$((i + 1))
VOICE1="${SORTED_VOICES[$i]}"
# Format first column
if [[ "$VOICE1" == "$CURRENT" ]]; then
COL1=$(printf "%2d. %-20s ✓" "$NUM1" "$VOICE1")
else
COL1=$(printf "%2d. %-20s " "$NUM1" "$VOICE1")
fi
# Format second column if it exists
NUM2=$((i + HALF + 1))
if [[ $((i + HALF)) -lt ${#SORTED_VOICES[@]} ]]; then
VOICE2="${SORTED_VOICES[$((i + HALF))]}"
if [[ "$VOICE2" == "$CURRENT" ]]; then
COL2=$(printf "%2d. %-20s ✓" "$NUM2" "$VOICE2")
else
COL2=$(printf "%2d. %-20s " "$NUM2" "$VOICE2")
fi
echo " $COL1 $COL2"
else
echo " $COL1"
fi
done
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
echo ""
echo "Enter number (1-${#SORTED_VOICES[@]}) or voice name:"
echo "Usage: /agent-vibes:switch 5"
echo " /agent-vibes:switch \"Northern Terry\""
exit 0
fi
# Detect active TTS provider
PROVIDER_FILE=""
if [[ -f "$CLAUDE_DIR/tts-provider.txt" ]]; then
PROVIDER_FILE="$CLAUDE_DIR/tts-provider.txt"
elif [[ -f "$HOME/.claude/tts-provider.txt" ]]; then
PROVIDER_FILE="$HOME/.claude/tts-provider.txt"
fi
ACTIVE_PROVIDER="elevenlabs" # default
if [[ -n "$PROVIDER_FILE" ]]; then
ACTIVE_PROVIDER=$(cat "$PROVIDER_FILE")
fi
# Voice lookup strategy depends on active provider
if [[ "$ACTIVE_PROVIDER" == "piper" ]]; then
# Piper voice lookup: Scan voice directory for .onnx files
source "$SCRIPT_DIR/piper-voice-manager.sh"
VOICE_DIR=$(get_voice_storage_dir)
# Check if voice file exists (case-insensitive)
FOUND=""
shopt -s nullglob
for onnx_file in "$VOICE_DIR"/*.onnx; do
if [[ -f "$onnx_file" ]]; then
voice=$(basename "$onnx_file" .onnx)
if [[ "${voice,,}" == "${VOICE_NAME,,}" ]]; then
FOUND="$voice"
break
fi
fi
done
shopt -u nullglob
# If not found, check multi-speaker registry
if [[ -z "$FOUND" ]] && [[ -f "$SCRIPT_DIR/piper-multispeaker-registry.sh" ]]; then
source "$SCRIPT_DIR/piper-multispeaker-registry.sh"
MULTISPEAKER_INFO=$(get_multispeaker_info "$VOICE_NAME")
if [[ -n "$MULTISPEAKER_INFO" ]]; then
MODEL="${MULTISPEAKER_INFO%%:*}"
SPEAKER_ID="${MULTISPEAKER_INFO#*:}"
# Verify the model file exists
if [[ -f "$VOICE_DIR/${MODEL}.onnx" ]]; then
# Store speaker name in tts-voice.txt
echo "$VOICE_NAME" > "$VOICE_FILE"
# Store model and speaker ID separately for play-tts-piper.sh
echo "$MODEL" > "$CLAUDE_DIR/tts-piper-model.txt"
echo "$SPEAKER_ID" > "$CLAUDE_DIR/tts-piper-speaker-id.txt"
DESCRIPTION=$(get_multispeaker_description "$VOICE_NAME")
echo "✅ Multi-speaker voice switched to: $VOICE_NAME"
echo "🎤 Model: $MODEL.onnx (Speaker ID: $SPEAKER_ID)"
if [[ -n "$DESCRIPTION" ]]; then
echo "📝 Description: $DESCRIPTION"
fi
# Have the new voice introduce itself (unless silent mode)
if [[ "$SILENT_MODE" != "true" ]]; then
PLAY_TTS="$SCRIPT_DIR/play-tts.sh"
if [ -x "$PLAY_TTS" ]; then
"$PLAY_TTS" "Hi, I'm $VOICE_NAME. I'll be your voice assistant moving forward." > /dev/null 2>&1 &
fi
echo ""
echo "💡 Tip: To hear automatic TTS narration, enable the Agent Vibes output style:"
echo " /output-style Agent Vibes"
fi
exit 0
else
echo "❌ Multi-speaker model not found: $MODEL.onnx"
echo ""
echo "Download it with: /agent-vibes:provider download"
exit 1
fi
fi
fi
if [[ -z "$FOUND" ]]; then
echo "❌ Piper voice not found: $VOICE_NAME"
echo ""
echo "Available Piper voices:"
shopt -s nullglob
for onnx_file in "$VOICE_DIR"/*.onnx; do
if [[ -f "$onnx_file" ]]; then
echo " - $(basename "$onnx_file" .onnx)"
fi
done | sort
shopt -u nullglob
echo ""
if [[ -f "$SCRIPT_DIR/piper-multispeaker-registry.sh" ]]; then
echo "Multi-speaker voices (requires 16Speakers.onnx):"
source "$SCRIPT_DIR/piper-multispeaker-registry.sh"
for entry in "${MULTISPEAKER_VOICES[@]}"; do
name="${entry%%:*}"
echo " - $name"
done | sort
echo ""
fi
echo "Download extra voices with: /agent-vibes:provider download"
exit 1
fi
else
# ElevenLabs voice lookup
# Check if input is a number
if [[ "$VOICE_NAME" =~ ^[0-9]+$ ]]; then
# Get voice array
VOICE_ARRAY=()
for voice in "${!VOICES[@]}"; do
VOICE_ARRAY+=("$voice")
done
# Sort the array
IFS=$'\n' SORTED_VOICES=($(sort <<<"${VOICE_ARRAY[*]}"))
unset IFS
# Get voice by number (adjust for 0-based index)
INDEX=$((VOICE_NAME - 1))
if [[ $INDEX -ge 0 && $INDEX -lt ${#SORTED_VOICES[@]} ]]; then
VOICE_NAME="${SORTED_VOICES[$INDEX]}"
FOUND="${SORTED_VOICES[$INDEX]}"
else
echo "❌ Invalid number. Please choose between 1 and ${#SORTED_VOICES[@]}"
exit 1
fi
else
# Check if voice exists (case-insensitive)
FOUND=""
for voice in "${!VOICES[@]}"; do
if [[ "${voice,,}" == "${VOICE_NAME,,}" ]]; then
FOUND="$voice"
break
fi
done
fi
if [[ -z "$FOUND" ]]; then
echo "❌ Unknown voice: $VOICE_NAME"
echo ""
echo "Available voices:"
for voice in "${!VOICES[@]}"; do
echo " - $voice"
done | sort
exit 1
fi
fi
echo "$FOUND" > "$VOICE_FILE"
echo "✅ Voice switched to: $FOUND"
# Show voice ID only for ElevenLabs voices
if [[ "$ACTIVE_PROVIDER" != "piper" ]] && [[ -n "${VOICES[$FOUND]}" ]]; then
echo "🎤 Voice ID: ${VOICES[$FOUND]}"
fi
# Have the new voice introduce itself (unless silent mode)
if [[ "$SILENT_MODE" != "true" ]]; then
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PLAY_TTS="$SCRIPT_DIR/play-tts.sh"
if [ -x "$PLAY_TTS" ]; then
"$PLAY_TTS" "Hi, I'm $FOUND. I'll be your voice assistant moving forward." "$FOUND" > /dev/null 2>&1 &
fi
echo ""
echo "💡 Tip: To hear automatic TTS narration, enable the Agent Vibes output style:"
echo " /output-style Agent Vibes"
fi
;;
get)
if [ -f "$VOICE_FILE" ]; then
cat "$VOICE_FILE"
else
echo "Cowboy Bob"
fi
;;
whoami)
echo "🎤 Current Voice Configuration"
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
# Get active TTS provider
PROVIDER_FILE="$CLAUDE_DIR/tts-provider.txt"
if [[ ! -f "$PROVIDER_FILE" ]]; then
PROVIDER_FILE="$HOME/.claude/tts-provider.txt"
fi
if [ -f "$PROVIDER_FILE" ]; then
ACTIVE_PROVIDER=$(cat "$PROVIDER_FILE")
if [[ "$ACTIVE_PROVIDER" == "elevenlabs" ]]; then
echo "Provider: ElevenLabs (Premium AI)"
elif [[ "$ACTIVE_PROVIDER" == "piper" ]]; then
echo "Provider: Piper TTS (Free, Offline)"
else
echo "Provider: $ACTIVE_PROVIDER"
fi
else
# Default to ElevenLabs if no provider file
echo "Provider: ElevenLabs (Premium AI)"
fi
# Get current voice
if [ -f "$VOICE_FILE" ]; then
CURRENT_VOICE=$(cat "$VOICE_FILE")
else
CURRENT_VOICE="Cowboy Bob"
fi
echo "Voice: $CURRENT_VOICE"
# Get current sentiment (priority)
if [ -f "$HOME/.claude/tts-sentiment.txt" ]; then
SENTIMENT=$(cat "$HOME/.claude/tts-sentiment.txt")
echo "Sentiment: $SENTIMENT (active)"
# Also show personality if set
if [ -f "$HOME/.claude/tts-personality.txt" ]; then
PERSONALITY=$(cat "$HOME/.claude/tts-personality.txt")
echo "Personality: $PERSONALITY (overridden by sentiment)"
fi
else
# No sentiment, check personality
if [ -f "$HOME/.claude/tts-personality.txt" ]; then
PERSONALITY=$(cat "$HOME/.claude/tts-personality.txt")
echo "Personality: $PERSONALITY (active)"
else
echo "Personality: normal"
fi
fi
echo "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━"
;;
list-simple)
# Simple list for AI to parse and display
# Get active provider
PROVIDER_FILE="$CLAUDE_DIR/tts-provider.txt"
if [[ ! -f "$PROVIDER_FILE" ]]; then
PROVIDER_FILE="$HOME/.claude/tts-provider.txt"
fi
ACTIVE_PROVIDER="elevenlabs" # default
if [ -f "$PROVIDER_FILE" ]; then
ACTIVE_PROVIDER=$(cat "$PROVIDER_FILE")
fi
if [[ "$ACTIVE_PROVIDER" == "piper" ]]; then
# List downloaded Piper voices
if [[ -f "$SCRIPT_DIR/piper-voice-manager.sh" ]]; then
source "$SCRIPT_DIR/piper-voice-manager.sh"
VOICE_DIR=$(get_voice_storage_dir)
for onnx_file in "$VOICE_DIR"/*.onnx; do
if [[ -f "$onnx_file" ]]; then
basename "$onnx_file" .onnx
fi
done | sort
fi
else
# List ElevenLabs voices
for voice in "${!VOICES[@]}"; do
echo "$voice"
done | sort
fi
;;
replay)
# Replay recent TTS audio from history
# Use project-local directory with same logic as play-tts.sh
if [[ -n "$CLAUDE_PROJECT_DIR" ]]; then
AUDIO_DIR="$CLAUDE_PROJECT_DIR/.claude/audio"
else
# Fallback: try to find .claude directory in current path
CURRENT_DIR="$PWD"
while [[ "$CURRENT_DIR" != "/" ]]; do
if [[ -d "$CURRENT_DIR/.claude" ]]; then
AUDIO_DIR="$CURRENT_DIR/.claude/audio"
break
fi
CURRENT_DIR=$(dirname "$CURRENT_DIR")
done
# Final fallback to global if no project .claude found
if [[ -z "$AUDIO_DIR" ]]; then
AUDIO_DIR="$HOME/.claude/audio"
fi
fi
# Default to replay last audio (N=1)
N="${2:-1}"
# Validate N is a number
if ! [[ "$N" =~ ^[0-9]+$ ]]; then
echo "❌ Invalid argument. Please use a number (1-10)"
echo "Usage: /agent-vibes:replay [N]"
echo " N=1 - Last audio (default)"
echo " N=2 - Second-to-last"
echo " N=3 - Third-to-last"
exit 1
fi
# Check bounds
if [[ $N -lt 1 || $N -gt 10 ]]; then
echo "❌ Number out of range. Please choose 1-10"
exit 1
fi
# Get list of audio files sorted by time (newest first)
if [[ ! -d "$AUDIO_DIR" ]]; then
echo "❌ No audio history found"
echo "Audio files are stored in: $AUDIO_DIR"
exit 1
fi
# Get the Nth most recent file
AUDIO_FILE=$(ls -t "$AUDIO_DIR"/tts-*.mp3 2>/dev/null | sed -n "${N}p")
if [[ -z "$AUDIO_FILE" ]]; then
TOTAL=$(ls -t "$AUDIO_DIR"/tts-*.mp3 2>/dev/null | wc -l)
echo "❌ Audio #$N not found in history"
echo "Total audio files available: $TOTAL"
exit 1
fi
echo "🔊 Replaying audio #$N:"
echo " File: $(basename "$AUDIO_FILE")"
echo " Path: $AUDIO_FILE"
# Play the audio file in background
(paplay "$AUDIO_FILE" 2>/dev/null || aplay "$AUDIO_FILE" 2>/dev/null || mpg123 "$AUDIO_FILE" 2>/dev/null) &
;;
*)
echo "Usage: voice-manager.sh [list|switch|get|replay|whoami] [voice_name]"
echo ""
echo "Commands:"
echo " list - List all available voices"
echo " switch <voice_name> - Switch to a different voice"
echo " get - Get current voice name"
echo " replay [N] - Replay Nth most recent audio (default: 1)"
echo " whoami - Show current voice and personality"
exit 1
;;
esac

View File

@ -1,70 +0,0 @@
#!/bin/bash
#
# File: .claude/hooks/voices-config.sh
#
# AgentVibes - Finally, your AI Agents can Talk Back! Text-to-Speech WITH personality for AI Assistants!
# Website: https://agentvibes.org
# Repository: https://github.com/paulpreibisch/AgentVibes
#
# Co-created by Paul Preibisch with Claude AI
# Copyright (c) 2025 Paul Preibisch
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# DISCLAIMER: This software is provided "AS IS", WITHOUT WARRANTY OF ANY KIND,
# express or implied, including but not limited to the warranties of
# merchantability, fitness for a particular purpose and noninfringement.
# In no event shall the authors or copyright holders be liable for any claim,
# damages or other liability, whether in an action of contract, tort or
# otherwise, arising from, out of or in connection with the software or the
# use or other dealings in the software.
#
# ---
#
# @fileoverview ElevenLabs Voice Configuration - Single source of truth for voice ID mappings
# @context Maps human-readable voice names to ElevenLabs API voice IDs for consistency
# @architecture Associative array (bash hash map) sourced by multiple scripts
# @dependencies None (pure data structure)
# @entrypoints Sourced by voice-manager.sh, play-tts-elevenlabs.sh, and personality managers
# @patterns Centralized configuration, DRY principle for voice mappings
# @related voice-manager.sh, play-tts-elevenlabs.sh, personality/*.md files
declare -A VOICES=(
["Amy"]="bhJUNIXWQQ94l8eI2VUf"
["Antoni"]="ErXwobaYiN019PkySvjV"
["Archer"]="L0Dsvb3SLTyegXwtm47J"
["Aria"]="TC0Zp7WVFzhA8zpTlRqV"
["Bella"]="EXAVITQu4vr4xnSDxMaL"
["Burt Reynolds"]="4YYIPFl9wE5c4L2eu2Gb"
["Charlotte"]="XB0fDUnXU5powFXDhCwa"
["Cowboy Bob"]="KTPVrSVAEUSJRClDzBw7"
["Demon Monster"]="vfaqCOvlrKi4Zp7C2IAm"
["Domi"]="AZnzlk1XvdvUeBnXmlld"
["Dr. Von Fusion"]="yjJ45q8TVCrtMhEKurxY"
["Drill Sergeant"]="vfaqCOvlrKi4Zp7C2IAm"
["Grandpa Spuds Oxley"]="NOpBlnGInO9m6vDvFkFC"
["Grandpa Werthers"]="MKlLqCItoCkvdhrxgtLv"
["Jessica Anne Bogart"]="flHkNRp1BlvT73UL6gyz"
["Juniper"]="aMSt68OGf4xUZAnLpTU8"
["Lutz Laugh"]="9yzdeviXkFddZ4Oz8Mok"
["Matilda"]="XrExE9yKIg1WjnnlVkGX"
["Matthew Schmitz"]="0SpgpJ4D3MpHCiWdyTg3"
["Michael"]="U1Vk2oyatMdYs096Ety7"
["Ms. Walker"]="DLsHlh26Ugcm6ELvS0qi"
["Northern Terry"]="wo6udizrrtpIxWGp2qJk"
["Pirate Marshal"]="PPzYpIqttlTYA83688JI"
["Rachel"]="21m00Tcm4TlvDq8ikWAM"
["Ralf Eisend"]="A9evEp8yGjv4c3WsIKuY"
["Tiffany"]="6aDn1KB0hjpdcocrUkmq"
["Tom"]="DYkrAHD8iwork3YSUBbs"
)

40
.coderabbit.yaml Normal file
View File

@ -0,0 +1,40 @@
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
language: "en-US"
early_access: true
reviews:
profile: chill
high_level_summary: false # don't post summary until explicitly invoked
request_changes_workflow: false
review_status: false
commit_status: false
walkthrough: false
poem: false
auto_review:
enabled: false
drafts: true # Can review drafts. Since it's manually triggered, it's fine.
auto_incremental_review: false # always review the whole PR, not just new commits
base_branches:
- main
path_filters:
- "!**/node_modules/**"
path_instructions:
- path: "**/*"
instructions: |
Focus on inconsistencies, contradictions, edge cases and serious issues.
Avoid commenting on minor issues such as linting, formatting and style issues.
When providing code suggestions, use GitHub's suggestion format:
```suggestion
<code changes>
```
- path: "**/*.js"
instructions: |
CLI tooling code. Check for: missing error handling on fs operations,
path.join vs string concatenation, proper cleanup in error paths.
Flag any process.exit() without error message.
chat:
auto_reply: true # Response to mentions in comments, a la @coderabbit review
issue_enrichment:
auto_enrich:
enabled: false # don't auto-comment on issues

128
.github/CODE_OF_CONDUCT.md vendored Normal file
View File

@ -0,0 +1,128 @@
# Contributor Covenant Code of Conduct
## Our Pledge
We as members, contributors, and leaders pledge to make participation in our
community a harassment-free experience for everyone, regardless of age, body
size, visible or invisible disability, ethnicity, sex characteristics, gender
identity and expression, level of experience, education, socio-economic status,
nationality, personal appearance, race, religion, or sexual identity
and orientation.
We pledge to act and interact in ways that contribute to an open, welcoming,
diverse, inclusive, and healthy community.
## Our Standards
Examples of behavior that contributes to a positive environment for our
community include:
* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes,
and learning from the experience
* Focusing on what is best not just for us as individuals, but for the
overall community
Examples of unacceptable behavior include:
* The use of sexualized language or imagery, and sexual attention or
advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email
address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Enforcement Responsibilities
Community leaders are responsible for clarifying and enforcing our standards of
acceptable behavior and will take appropriate and fair corrective action in
response to any behavior that they deem inappropriate, threatening, offensive,
or harmful.
Community leaders have the right and responsibility to remove, edit, or reject
comments, commits, code, wiki edits, issues, and other contributions that are
not aligned to this Code of Conduct, and will communicate reasons for moderation
decisions when appropriate.
## Scope
This Code of Conduct applies within all community spaces, and also applies when
an individual is officially representing the community in public spaces.
Examples of representing our community include using an official e-mail address,
posting via an official social media account, or acting as an appointed
representative at an online or offline event.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported to the community leaders responsible for enforcement at
the official BMAD Discord server (<https://discord.com/invite/gk8jAdXWmj>) - DM a moderator or flag a post.
All complaints will be reviewed and investigated promptly and fairly.
All community leaders are obligated to respect the privacy and security of the
reporter of any incident.
## Enforcement Guidelines
Community leaders will follow these Community Impact Guidelines in determining
the consequences for any action they deem in violation of this Code of Conduct:
### 1. Correction
**Community Impact**: Use of inappropriate language or other behavior deemed
unprofessional or unwelcome in the community.
**Consequence**: A private, written warning from community leaders, providing
clarity around the nature of the violation and an explanation of why the
behavior was inappropriate. A public apology may be requested.
### 2. Warning
**Community Impact**: A violation through a single incident or series
of actions.
**Consequence**: A warning with consequences for continued behavior. No
interaction with the people involved, including unsolicited interaction with
those enforcing the Code of Conduct, for a specified period of time. This
includes avoiding interactions in community spaces as well as external channels
like social media. Violating these terms may lead to a temporary or
permanent ban.
### 3. Temporary Ban
**Community Impact**: A serious violation of community standards, including
sustained inappropriate behavior.
**Consequence**: A temporary ban from any sort of interaction or public
communication with the community for a specified period of time. No public or
private interaction with the people involved, including unsolicited interaction
with those enforcing the Code of Conduct, is allowed during this period.
Violating these terms may lead to a permanent ban.
### 4. Permanent Ban
**Community Impact**: Demonstrating a pattern of violation of community
standards, including sustained inappropriate behavior, harassment of an
individual, or aggression toward or disparagement of classes of individuals.
**Consequence**: A permanent ban from any sort of public interaction within
the community.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
version 2.0, available at
<https://www.contributor-covenant.org/version/2/0/code_of_conduct.html>.
Community Impact Guidelines were inspired by [Mozilla's code of conduct
enforcement ladder](https://github.com/mozilla/diversity).
[homepage]: https://www.contributor-covenant.org
For answers to common questions about this code of conduct, see the FAQ at
<https://www.contributor-covenant.org/faq>. Translations are available at
<https://www.contributor-covenant.org/translations>.

View File

@ -8,7 +8,7 @@ assignees: ''
# Idea: [Replace with a clear, actionable title]
### PASS Framework
## PASS Framework
**P**roblem:
@ -92,7 +92,7 @@ Fix issues and add features.
_Why this is poor: Too vague, no specific problem identified, no measurable success criteria, unclear scope_
</details>****
</details>
---

34
.github/scripts/discord-helpers.sh vendored Normal file
View File

@ -0,0 +1,34 @@
#!/bin/bash
# Discord notification helper functions
# Escape markdown special chars and @mentions for safe Discord display
# Skips content inside <URL> wrappers to preserve URLs intact
esc() {
awk '{
result = ""; in_url = 0; n = length($0)
for (i = 1; i <= n; i++) {
c = substr($0, i, 1)
if (c == "<" && substr($0, i, 8) ~ /^<https?:/) in_url = 1
if (in_url) { result = result c; if (c == ">") in_url = 0 }
else if (c == "@") result = result "@ "
else if (index("[]\\*_()~`", c) > 0) result = result "\\" c
else result = result c
}
print result
}'
}
# Truncate to $1 chars (or 80 if wall-of-text with <3 spaces)
trunc() {
local max=$1
local txt=$(tr '\n\r' ' ' | cut -c1-"$max")
local spaces=$(printf '%s' "$txt" | tr -cd ' ' | wc -c)
[ "$spaces" -lt 3 ] && [ ${#txt} -gt 80 ] && txt=$(printf '%s' "$txt" | cut -c1-80)
printf '%s' "$txt"
}
# Remove incomplete URL at end of truncated text (incomplete URLs are useless)
strip_trailing_url() { sed -E 's~<?https?://[^[:space:]]*$~~'; }
# Wrap URLs in <> to suppress Discord embeds (keeps links clickable)
wrap_urls() { sed -E 's~https?://[^[:space:]<>]+~<&>~g'; }

329
.github/workflows/bundle-latest.yaml vendored Normal file
View File

@ -0,0 +1,329 @@
name: Publish Latest Bundles
on:
push:
branches: [main]
workflow_dispatch: {}
permissions:
contents: write
jobs:
bundle-and-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout BMAD-METHOD
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: npm
- name: Install dependencies
run: npm ci
- name: Generate bundles
run: npm run bundle
- name: Create bundle distribution structure
run: |
mkdir -p dist/bundles
# Copy web bundles (XML files from npm run bundle output)
cp -r web-bundles/* dist/bundles/ 2>/dev/null || true
# Verify bundles were copied (fail if completely empty)
if [ ! "$(ls -A dist/bundles)" ]; then
echo "❌ ERROR: No bundles found in dist/bundles/"
echo "This likely means 'npm run bundle' failed or bundles weren't generated"
exit 1
fi
# Count bundles per module
for module in bmm bmb cis bmgd; do
if [ -d "dist/bundles/$module/agents" ]; then
COUNT=$(find dist/bundles/$module/agents -name '*.xml' 2>/dev/null | wc -l)
echo "✅ $module: $COUNT agent bundles"
fi
done
# Generate index.html for each agents directory (fixes directory browsing)
for module in bmm bmb cis bmgd; do
if [ -d "dist/bundles/$module/agents" ]; then
cat > "dist/bundles/$module/agents/index.html" << 'DIREOF'
<!DOCTYPE html>
<html>
<head>
<title>MODULE_NAME Agents</title>
<style>
body { font-family: system-ui; max-width: 800px; margin: 50px auto; padding: 20px; }
li { margin: 10px 0; }
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }
</style>
</head>
<body>
<h1>MODULE_NAME Agents</h1>
<ul>
AGENT_LINKS
</ul>
<p><a href="../../">← Back to all modules</a></p>
</body>
</html>
DIREOF
# Replace MODULE_NAME
sed -i "s/MODULE_NAME/${module^^}/g" "dist/bundles/$module/agents/index.html"
# Generate agent links
LINKS=""
for file in dist/bundles/$module/agents/*.xml; do
if [ -f "$file" ]; then
name=$(basename "$file" .xml)
LINKS="$LINKS <li><a href=\"./$name.xml\">$name</a></li>\n"
fi
done
sed -i "s|AGENT_LINKS|$LINKS|" "dist/bundles/$module/agents/index.html"
fi
done
# Create zip archives per module
mkdir -p dist/bundles/downloads
for module in bmm bmb cis bmgd; do
if [ -d "dist/bundles/$module" ]; then
(cd dist/bundles && zip -r downloads/$module-agents.zip $module/)
echo "✅ Created $module-agents.zip"
fi
done
# Generate index.html dynamically based on actual bundles
TIMESTAMP=$(date -u +"%Y-%m-%d %H:%M UTC")
COMMIT_SHA=$(git rev-parse --short HEAD)
# Function to generate agent links for a module
generate_agent_links() {
local module=$1
local agent_dir="dist/bundles/$module/agents"
if [ ! -d "$agent_dir" ]; then
echo ""
return
fi
local links=""
local count=0
# Find all XML files and generate links
for xml_file in "$agent_dir"/*.xml; do
if [ -f "$xml_file" ]; then
local agent_name=$(basename "$xml_file" .xml)
# Convert filename to display name (pm -> PM, tech-writer -> Tech Writer)
local display_name=$(echo "$agent_name" | sed 's/-/ /g' | awk '{for(i=1;i<=NF;i++) {if(length($i)==2) $i=toupper($i); else $i=toupper(substr($i,1,1)) tolower(substr($i,2));}}1')
if [ $count -gt 0 ]; then
links="$links | "
fi
links="$links<a href=\"./$module/agents/$agent_name.xml\">$display_name</a>"
count=$((count + 1))
fi
done
echo "$links"
}
# Generate agent links for each module
BMM_LINKS=$(generate_agent_links "bmm")
CIS_LINKS=$(generate_agent_links "cis")
BMGD_LINKS=$(generate_agent_links "bmgd")
# Count agents for bulk downloads
BMM_COUNT=$(find dist/bundles/bmm/agents -name '*.xml' 2>/dev/null | wc -l | tr -d ' ')
CIS_COUNT=$(find dist/bundles/cis/agents -name '*.xml' 2>/dev/null | wc -l | tr -d ' ')
BMGD_COUNT=$(find dist/bundles/bmgd/agents -name '*.xml' 2>/dev/null | wc -l | tr -d ' ')
# Create index.html
cat > dist/bundles/index.html << EOF
<!DOCTYPE html>
<html>
<head>
<title>BMAD Bundles - Latest</title>
<meta charset="utf-8">
<style>
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; max-width: 800px; margin: 50px auto; padding: 20px; }
h1 { color: #333; }
.platform { margin: 30px 0; padding: 20px; background: #f5f5f5; border-radius: 8px; }
.module { margin: 15px 0; }
a { color: #0066cc; text-decoration: none; }
a:hover { text-decoration: underline; }
code { background: #e0e0e0; padding: 2px 6px; border-radius: 3px; }
.warning { background: #fff3cd; padding: 15px; border-left: 4px solid #ffc107; margin: 20px 0; }
</style>
</head>
<body>
<h1>BMAD Web Bundles - Latest (Main Branch)</h1>
<div class="warning">
<strong>⚠️ Latest Build (Unstable)</strong><br>
These bundles are built from the latest main branch commit. For stable releases, visit
<a href="https://github.com/bmad-code-org/BMAD-METHOD/releases/latest">GitHub Releases</a>.
</div>
<p><strong>Last Updated:</strong> <code>$TIMESTAMP</code></p>
<p><strong>Commit:</strong> <code>$COMMIT_SHA</code></p>
<h2>Available Modules</h2>
EOF
# Add BMM section if agents exist
if [ -n "$BMM_LINKS" ]; then
cat >> dist/bundles/index.html << EOF
<div class="platform">
<h3>BMM (BMad Method)</h3>
<div class="module">
$BMM_LINKS<br>
📁 <a href="./bmm/agents/">Browse All</a> | 📦 <a href="./downloads/bmm-agents.zip">Download Zip</a>
</div>
</div>
EOF
fi
# Add CIS section if agents exist
if [ -n "$CIS_LINKS" ]; then
cat >> dist/bundles/index.html << EOF
<div class="platform">
<h3>CIS (Creative Intelligence Suite)</h3>
<div class="module">
$CIS_LINKS<br>
📁 <a href="./cis/agents/">Browse Agents</a> | 📦 <a href="./downloads/cis-agents.zip">Download Zip</a>
</div>
</div>
EOF
fi
# Add BMGD section if agents exist
if [ -n "$BMGD_LINKS" ]; then
cat >> dist/bundles/index.html << EOF
<div class="platform">
<h3>BMGD (Game Development)</h3>
<div class="module">
$BMGD_LINKS<br>
📁 <a href="./bmgd/agents/">Browse Agents</a> | 📦 <a href="./downloads/bmgd-agents.zip">Download Zip</a>
</div>
</div>
EOF
fi
# Add bulk downloads section
cat >> dist/bundles/index.html << EOF
<h2>Bulk Downloads</h2>
<p>Download all agents for a module as a zip archive:</p>
<ul>
EOF
[ "$BMM_COUNT" -gt 0 ] && echo " <li><a href=\"./downloads/bmm-agents.zip\">📦 BMM Agents (all $BMM_COUNT)</a></li>" >> dist/bundles/index.html
[ "$CIS_COUNT" -gt 0 ] && echo " <li><a href=\"./downloads/cis-agents.zip\">📦 CIS Agents (all $CIS_COUNT)</a></li>" >> dist/bundles/index.html
[ "$BMGD_COUNT" -gt 0 ] && echo " <li><a href=\"./downloads/bmgd-agents.zip\">📦 BMGD Agents (all $BMGD_COUNT)</a></li>" >> dist/bundles/index.html
# Close HTML
cat >> dist/bundles/index.html << 'EOF'
</ul>
<h2>Usage</h2>
<p>Copy the raw XML URL and paste into your AI platform's custom instructions or project knowledge.</p>
<p>Example: <code>https://raw.githubusercontent.com/bmad-code-org/bmad-bundles/main/bmm/agents/pm.xml</code></p>
<h2>Installation (Recommended)</h2>
<p>For full IDE integration with slash commands, use the installer:</p>
<pre>npx bmad-method@alpha install</pre>
<footer style="margin-top: 50px; padding-top: 20px; border-top: 1px solid #ccc; color: #666;">
<p>Built from <a href="https://github.com/bmad-code-org/BMAD-METHOD">BMAD-METHOD</a> repository.</p>
</footer>
</body>
</html>
EOF
- name: Checkout bmad-bundles repo
uses: actions/checkout@v4
with:
repository: bmad-code-org/bmad-bundles
path: bmad-bundles
token: ${{ secrets.BUNDLES_PAT }}
- name: Update bundles
run: |
# Clear old bundles
rm -rf bmad-bundles/*
# Copy new bundles
cp -r dist/bundles/* bmad-bundles/
# Create .nojekyll for GitHub Pages
touch bmad-bundles/.nojekyll
# Create README
cat > bmad-bundles/README.md << 'EOF'
# BMAD Web Bundles (Latest)
**⚠️ Unstable Build**: These bundles are auto-generated from the latest `main` branch.
For stable releases, visit [GitHub Releases](https://github.com/bmad-code-org/BMAD-METHOD/releases/latest).
## Usage
Copy raw markdown URLs for use in AI platforms:
- Claude Code: `https://raw.githubusercontent.com/bmad-code-org/bmad-bundles/main/claude-code/sub-agents/{agent}.md`
- ChatGPT: `https://raw.githubusercontent.com/bmad-code-org/bmad-bundles/main/chatgpt/sub-agents/{agent}.md`
- Gemini: `https://raw.githubusercontent.com/bmad-code-org/bmad-bundles/main/gemini/sub-agents/{agent}.md`
## Browse
Visit [https://bmad-code-org.github.io/bmad-bundles/](https://bmad-code-org.github.io/bmad-bundles/) to browse bundles.
## Installation (Recommended)
For full IDE integration:
```bash
npx bmad-method@alpha install
```
---
Auto-updated by [BMAD-METHOD](https://github.com/bmad-code-org/BMAD-METHOD) on every main branch merge.
EOF
- name: Commit and push to bmad-bundles
run: |
cd bmad-bundles
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
if git diff --staged --quiet; then
echo "No changes to bundles, skipping commit"
else
COMMIT_SHA=$(cd .. && git rev-parse --short HEAD)
git commit -m "Update bundles from BMAD-METHOD@${COMMIT_SHA}"
git push
echo "✅ Bundles published to GitHub Pages"
fi
- name: Summary
run: |
echo "## 🎉 Bundles Published!" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Latest bundles** available at:" >> $GITHUB_STEP_SUMMARY
echo "- 🌐 Browse: https://bmad-code-org.github.io/bmad-bundles/" >> $GITHUB_STEP_SUMMARY
echo "- 📦 Raw files: https://github.com/bmad-code-org/bmad-bundles" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "**Commit**: ${{ github.sha }}" >> $GITHUB_STEP_SUMMARY

View File

@ -1,16 +1,310 @@
name: Discord Notification
"on": [pull_request, release, create, delete, issue_comment, pull_request_review, pull_request_review_comment]
on:
pull_request:
types: [opened, closed, reopened, ready_for_review]
release:
types: [published]
create:
delete:
issue_comment:
types: [created]
pull_request_review:
types: [submitted]
pull_request_review_comment:
types: [created]
issues:
types: [opened, closed, reopened]
env:
MAX_TITLE: 100
MAX_BODY: 250
jobs:
notify:
pull_request:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
sparse-checkout: .github/scripts
sparse-checkout-cone-mode: false
- name: Notify Discord
env:
WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
ACTION: ${{ github.event.action }}
MERGED: ${{ github.event.pull_request.merged }}
PR_NUM: ${{ github.event.pull_request.number }}
PR_URL: ${{ github.event.pull_request.html_url }}
PR_TITLE: ${{ github.event.pull_request.title }}
PR_USER: ${{ github.event.pull_request.user.login }}
PR_BODY: ${{ github.event.pull_request.body }}
run: |
set -o pipefail
source .github/scripts/discord-helpers.sh
[ -z "$WEBHOOK" ] && exit 0
if [ "$ACTION" = "opened" ]; then ICON="🔀"; LABEL="New PR"
elif [ "$ACTION" = "closed" ] && [ "$MERGED" = "true" ]; then ICON="🎉"; LABEL="Merged"
elif [ "$ACTION" = "closed" ]; then ICON="❌"; LABEL="Closed"
elif [ "$ACTION" = "reopened" ]; then ICON="🔄"; LABEL="Reopened"
else ICON="📋"; LABEL="Ready"; fi
TITLE=$(printf '%s' "$PR_TITLE" | trunc $MAX_TITLE | esc)
[ ${#PR_TITLE} -gt $MAX_TITLE ] && TITLE="${TITLE}..."
BODY=$(printf '%s' "$PR_BODY" | trunc $MAX_BODY)
if [ -n "$PR_BODY" ] && [ ${#PR_BODY} -gt $MAX_BODY ]; then
BODY=$(printf '%s' "$BODY" | strip_trailing_url)
fi
BODY=$(printf '%s' "$BODY" | wrap_urls | esc)
[ -n "$PR_BODY" ] && [ ${#PR_BODY} -gt $MAX_BODY ] && BODY="${BODY}..."
[ -n "$BODY" ] && BODY=" · $BODY"
USER=$(printf '%s' "$PR_USER" | esc)
MSG="$ICON **[$LABEL #$PR_NUM: $TITLE](<$PR_URL>)**"$'\n'"by @$USER$BODY"
jq -n --arg content "$MSG" '{content: $content}' | curl -sf --retry 2 -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @-
issues:
if: github.event_name == 'issues'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
sparse-checkout: .github/scripts
sparse-checkout-cone-mode: false
- name: Notify Discord
env:
WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
ACTION: ${{ github.event.action }}
ISSUE_NUM: ${{ github.event.issue.number }}
ISSUE_URL: ${{ github.event.issue.html_url }}
ISSUE_TITLE: ${{ github.event.issue.title }}
ISSUE_USER: ${{ github.event.issue.user.login }}
ISSUE_BODY: ${{ github.event.issue.body }}
ACTOR: ${{ github.actor }}
run: |
set -o pipefail
source .github/scripts/discord-helpers.sh
[ -z "$WEBHOOK" ] && exit 0
if [ "$ACTION" = "opened" ]; then ICON="🐛"; LABEL="New Issue"; USER="$ISSUE_USER"
elif [ "$ACTION" = "closed" ]; then ICON="✅"; LABEL="Closed"; USER="$ACTOR"
else ICON="🔄"; LABEL="Reopened"; USER="$ACTOR"; fi
TITLE=$(printf '%s' "$ISSUE_TITLE" | trunc $MAX_TITLE | esc)
[ ${#ISSUE_TITLE} -gt $MAX_TITLE ] && TITLE="${TITLE}..."
BODY=$(printf '%s' "$ISSUE_BODY" | trunc $MAX_BODY)
if [ -n "$ISSUE_BODY" ] && [ ${#ISSUE_BODY} -gt $MAX_BODY ]; then
BODY=$(printf '%s' "$BODY" | strip_trailing_url)
fi
BODY=$(printf '%s' "$BODY" | wrap_urls | esc)
[ -n "$ISSUE_BODY" ] && [ ${#ISSUE_BODY} -gt $MAX_BODY ] && BODY="${BODY}..."
[ -n "$BODY" ] && BODY=" · $BODY"
USER=$(printf '%s' "$USER" | esc)
MSG="$ICON **[$LABEL #$ISSUE_NUM: $TITLE](<$ISSUE_URL>)**"$'\n'"by @$USER$BODY"
jq -n --arg content "$MSG" '{content: $content}' | curl -sf --retry 2 -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @-
issue_comment:
if: github.event_name == 'issue_comment'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
sparse-checkout: .github/scripts
sparse-checkout-cone-mode: false
- name: Notify Discord
env:
WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
IS_PR: ${{ github.event.issue.pull_request && 'true' || 'false' }}
ISSUE_NUM: ${{ github.event.issue.number }}
ISSUE_TITLE: ${{ github.event.issue.title }}
COMMENT_URL: ${{ github.event.comment.html_url }}
COMMENT_USER: ${{ github.event.comment.user.login }}
COMMENT_BODY: ${{ github.event.comment.body }}
run: |
set -o pipefail
source .github/scripts/discord-helpers.sh
[ -z "$WEBHOOK" ] && exit 0
[ "$IS_PR" = "true" ] && TYPE="PR" || TYPE="Issue"
TITLE=$(printf '%s' "$ISSUE_TITLE" | trunc $MAX_TITLE | esc)
[ ${#ISSUE_TITLE} -gt $MAX_TITLE ] && TITLE="${TITLE}..."
BODY=$(printf '%s' "$COMMENT_BODY" | trunc $MAX_BODY)
if [ ${#COMMENT_BODY} -gt $MAX_BODY ]; then
BODY=$(printf '%s' "$BODY" | strip_trailing_url)
fi
BODY=$(printf '%s' "$BODY" | wrap_urls | esc)
[ ${#COMMENT_BODY} -gt $MAX_BODY ] && BODY="${BODY}..."
USER=$(printf '%s' "$COMMENT_USER" | esc)
MSG="💬 **[Comment on $TYPE #$ISSUE_NUM: $TITLE](<$COMMENT_URL>)**"$'\n'"@$USER: $BODY"
jq -n --arg content "$MSG" '{content: $content}' | curl -sf --retry 2 -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @-
pull_request_review:
if: github.event_name == 'pull_request_review'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
sparse-checkout: .github/scripts
sparse-checkout-cone-mode: false
- name: Notify Discord
env:
WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
STATE: ${{ github.event.review.state }}
PR_NUM: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
REVIEW_URL: ${{ github.event.review.html_url }}
REVIEW_USER: ${{ github.event.review.user.login }}
REVIEW_BODY: ${{ github.event.review.body }}
run: |
set -o pipefail
source .github/scripts/discord-helpers.sh
[ -z "$WEBHOOK" ] && exit 0
if [ "$STATE" = "approved" ]; then ICON="✅"; LABEL="Approved"
elif [ "$STATE" = "changes_requested" ]; then ICON="🔧"; LABEL="Changes Requested"
else ICON="👀"; LABEL="Reviewed"; fi
TITLE=$(printf '%s' "$PR_TITLE" | trunc $MAX_TITLE | esc)
[ ${#PR_TITLE} -gt $MAX_TITLE ] && TITLE="${TITLE}..."
BODY=$(printf '%s' "$REVIEW_BODY" | trunc $MAX_BODY)
if [ -n "$REVIEW_BODY" ] && [ ${#REVIEW_BODY} -gt $MAX_BODY ]; then
BODY=$(printf '%s' "$BODY" | strip_trailing_url)
fi
BODY=$(printf '%s' "$BODY" | wrap_urls | esc)
[ -n "$REVIEW_BODY" ] && [ ${#REVIEW_BODY} -gt $MAX_BODY ] && BODY="${BODY}..."
[ -n "$BODY" ] && BODY=": $BODY"
USER=$(printf '%s' "$REVIEW_USER" | esc)
MSG="$ICON **[$LABEL PR #$PR_NUM: $TITLE](<$REVIEW_URL>)**"$'\n'"@$USER$BODY"
jq -n --arg content "$MSG" '{content: $content}' | curl -sf --retry 2 -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @-
pull_request_review_comment:
if: github.event_name == 'pull_request_review_comment'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
sparse-checkout: .github/scripts
sparse-checkout-cone-mode: false
- name: Notify Discord
env:
WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
PR_NUM: ${{ github.event.pull_request.number }}
PR_TITLE: ${{ github.event.pull_request.title }}
COMMENT_URL: ${{ github.event.comment.html_url }}
COMMENT_USER: ${{ github.event.comment.user.login }}
COMMENT_BODY: ${{ github.event.comment.body }}
run: |
set -o pipefail
source .github/scripts/discord-helpers.sh
[ -z "$WEBHOOK" ] && exit 0
TITLE=$(printf '%s' "$PR_TITLE" | trunc $MAX_TITLE | esc)
[ ${#PR_TITLE} -gt $MAX_TITLE ] && TITLE="${TITLE}..."
BODY=$(printf '%s' "$COMMENT_BODY" | trunc $MAX_BODY)
if [ ${#COMMENT_BODY} -gt $MAX_BODY ]; then
BODY=$(printf '%s' "$BODY" | strip_trailing_url)
fi
BODY=$(printf '%s' "$BODY" | wrap_urls | esc)
[ ${#COMMENT_BODY} -gt $MAX_BODY ] && BODY="${BODY}..."
USER=$(printf '%s' "$COMMENT_USER" | esc)
MSG="💭 **[Review Comment PR #$PR_NUM: $TITLE](<$COMMENT_URL>)**"$'\n'"@$USER: $BODY"
jq -n --arg content "$MSG" '{content: $content}' | curl -sf --retry 2 -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @-
release:
if: github.event_name == 'release'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
sparse-checkout: .github/scripts
sparse-checkout-cone-mode: false
- name: Notify Discord
env:
WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
TAG: ${{ github.event.release.tag_name }}
NAME: ${{ github.event.release.name }}
URL: ${{ github.event.release.html_url }}
RELEASE_BODY: ${{ github.event.release.body }}
run: |
set -o pipefail
source .github/scripts/discord-helpers.sh
[ -z "$WEBHOOK" ] && exit 0
REL_NAME=$(printf '%s' "$NAME" | trunc $MAX_TITLE | esc)
[ ${#NAME} -gt $MAX_TITLE ] && REL_NAME="${REL_NAME}..."
BODY=$(printf '%s' "$RELEASE_BODY" | trunc $MAX_BODY)
if [ -n "$RELEASE_BODY" ] && [ ${#RELEASE_BODY} -gt $MAX_BODY ]; then
BODY=$(printf '%s' "$BODY" | strip_trailing_url)
fi
BODY=$(printf '%s' "$BODY" | wrap_urls | esc)
[ -n "$RELEASE_BODY" ] && [ ${#RELEASE_BODY} -gt $MAX_BODY ] && BODY="${BODY}..."
[ -n "$BODY" ] && BODY=" · $BODY"
TAG_ESC=$(printf '%s' "$TAG" | esc)
MSG="🚀 **[Release $TAG_ESC: $REL_NAME](<$URL>)**"$'\n'"$BODY"
jq -n --arg content "$MSG" '{content: $content}' | curl -sf --retry 2 -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @-
create:
if: github.event_name == 'create'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.repository.default_branch }}
sparse-checkout: .github/scripts
sparse-checkout-cone-mode: false
- name: Notify Discord
env:
WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
REF_TYPE: ${{ github.event.ref_type }}
REF: ${{ github.event.ref }}
ACTOR: ${{ github.actor }}
REPO_URL: ${{ github.event.repository.html_url }}
run: |
set -o pipefail
source .github/scripts/discord-helpers.sh
[ -z "$WEBHOOK" ] && exit 0
[ "$REF_TYPE" = "branch" ] && ICON="🌿" || ICON="🏷️"
REF_TRUNC=$(printf '%s' "$REF" | trunc $MAX_TITLE)
[ ${#REF} -gt $MAX_TITLE ] && REF_TRUNC="${REF_TRUNC}..."
REF_ESC=$(printf '%s' "$REF_TRUNC" | esc)
REF_URL=$(jq -rn --arg ref "$REF" '$ref | @uri')
ACTOR_ESC=$(printf '%s' "$ACTOR" | esc)
MSG="$ICON **${REF_TYPE^} created: [$REF_ESC](<$REPO_URL/tree/$REF_URL>)** by @$ACTOR_ESC"
jq -n --arg content "$MSG" '{content: $content}' | curl -sf --retry 2 -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @-
delete:
if: github.event_name == 'delete'
runs-on: ubuntu-latest
steps:
- name: Notify Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
status: ${{ job.status }}
title: "Triggered by ${{ github.event_name }}"
color: 0x5865F2
env:
WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
REF_TYPE: ${{ github.event.ref_type }}
REF: ${{ github.event.ref }}
ACTOR: ${{ github.actor }}
run: |
set -o pipefail
[ -z "$WEBHOOK" ] && exit 0
esc() { sed -e 's/[][\*_()~`]/\\&/g' -e 's/@/@ /g'; }
trunc() { tr '\n\r' ' ' | cut -c1-"$1"; }
REF_TRUNC=$(printf '%s' "$REF" | trunc 100)
[ ${#REF} -gt 100 ] && REF_TRUNC="${REF_TRUNC}..."
REF_ESC=$(printf '%s' "$REF_TRUNC" | esc)
ACTOR_ESC=$(printf '%s' "$ACTOR" | esc)
MSG="🗑️ **${REF_TYPE^} deleted: $REF_ESC** by @$ACTOR_ESC"
jq -n --arg content "$MSG" '{content: $content}' | curl -sf --retry 2 -X POST "$WEBHOOK" -H "Content-Type: application/json" -d @-

View File

@ -6,9 +6,11 @@ on:
version_bump:
description: Version bump type
required: true
default: patch
default: alpha
type: choice
options:
- alpha
- beta
- patch
- minor
- major
@ -49,7 +51,11 @@ jobs:
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: Bump version
run: npm run version:${{ github.event.inputs.version_bump }}
run: |
case "${{ github.event.inputs.version_bump }}" in
alpha|beta) npm version prerelease --no-git-tag-version --preid=${{ github.event.inputs.version_bump }} ;;
*) npm version ${{ github.event.inputs.version_bump }} --no-git-tag-version ;;
esac
- name: Get new version and previous tag
id: version
@ -61,8 +67,9 @@ jobs:
run: |
sed -i 's/"version": ".*"/"version": "${{ steps.version.outputs.new_version }}"/' tools/installer/package.json
- name: Build project
run: npm run build
# TODO: Re-enable web bundles once tools/cli/bundlers/ is restored
# - name: Generate web bundles
# run: npm run bundle
- name: Commit version bump
run: |
@ -149,25 +156,35 @@ jobs:
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish
run: |
VERSION="${{ steps.version.outputs.new_version }}"
if [[ "$VERSION" == *"alpha"* ]] || [[ "$VERSION" == *"beta"* ]]; then
echo "Publishing prerelease version with --tag alpha"
npm publish --tag alpha
else
echo "Publishing stable version with --tag latest"
npm publish --tag latest
fi
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ steps.version.outputs.new_version }}
release_name: "BMad Method v${{ steps.version.outputs.new_version }}"
body: ${{ steps.release_notes.outputs.RELEASE_NOTES }}
name: "BMad Method v${{ steps.version.outputs.new_version }}"
body: |
${{ steps.release_notes.outputs.RELEASE_NOTES }}
draft: false
prerelease: false
prerelease: ${{ contains(steps.version.outputs.new_version, 'alpha') || contains(steps.version.outputs.new_version, 'beta') }}
- name: Summary
run: |
echo "🎉 Successfully released v${{ steps.version.outputs.new_version }}!"
echo "📦 Published to NPM with @latest tag"
echo "🏷️ Git tag: v${{ steps.version.outputs.new_version }}"
echo "✅ Users running 'npx bmad-method install' will now get version ${{ steps.version.outputs.new_version }}"
echo ""
echo "📝 Release notes preview:"
cat release_notes.md
echo "## 🎉 Successfully released v${{ steps.version.outputs.new_version }}!" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### 📦 Distribution" >> $GITHUB_STEP_SUMMARY
echo "- **NPM**: Published with @latest tag" >> $GITHUB_STEP_SUMMARY
echo "- **GitHub Release**: https://github.com/bmad-code-org/BMAD-METHOD/releases/tag/v${{ steps.version.outputs.new_version }}" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY
echo "### ✅ Installation" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`bash" >> $GITHUB_STEP_SUMMARY
echo "npx bmad-method@${{ steps.version.outputs.new_version }} install" >> $GITHUB_STEP_SUMMARY
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY

View File

@ -1,4 +1,13 @@
name: lint
name: Quality & Validation
# Runs comprehensive quality checks on all PRs:
# - Prettier (formatting)
# - ESLint (linting)
# - markdownlint (markdown quality)
# - Schema validation (YAML structure)
# - Agent schema tests (fixture-based validation)
# - Installation component tests (compilation)
# - Bundle validation (web bundle integrity)
"on":
pull_request:
@ -42,7 +51,25 @@ jobs:
- name: ESLint
run: npm run lint
schema-validation:
markdownlint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: markdownlint
run: npm run lint:md
validate:
runs-on: ubuntu-latest
steps:
- name: Checkout
@ -59,3 +86,12 @@ jobs:
- name: Validate YAML schemas
run: npm run validate:schemas
- name: Run agent schema validation tests
run: npm run test:schemas
- name: Test agent compilation components
run: npm run test:install
- name: Validate web bundles
run: npm run validate:bundles

28
.gitignore vendored
View File

@ -31,7 +31,7 @@ Thumbs.db
# IDE and editor configs
.windsurf/
.trae/
.bmad*/.cursor/
_bmad*/.cursor/
# AI assistant files
CLAUDE.md
@ -41,10 +41,11 @@ cursor
.mcp.json
CLAUDE.local.md
.serena/
.claude/settings.local.json
# Project-specific
.bmad-core
.bmad-creator-tools
_bmad-core
_bmad-creator-tools
test-project-install/*
sample-project/*
flattened-codebase.xml
@ -53,9 +54,24 @@ flattened-codebase.xml
#UAT template testing output files
tools/template-test-generator/test-scenarios/
# Bundler temporary files
# Bundler temporary files and generated bundles
.bundler-temp/
# Test Install Output
# Generated web bundles (built by CI, not committed)
src/modules/bmm/sub-modules/
src/modules/bmb/sub-modules/
src/modules/cis/sub-modules/
src/modules/bmgd/sub-modules/
shared-modules
z*/
_bmad
.claude
.codex
.github/chatmodes
.agent
.agentvibes/
.kiro/
.roo
bmad-custom-src/

View File

@ -1,3 +1,7 @@
#!/usr/bin/env sh
# Auto-fix changed files and stage them
npx --no-install lint-staged
# Validate everything
npm test

42
.markdownlint-cli2.yaml Normal file
View File

@ -0,0 +1,42 @@
# markdownlint-cli2 configuration
# https://github.com/DavidAnson/markdownlint-cli2
ignores:
- node_modules/**
- test/fixtures/**
- CODE_OF_CONDUCT.md
- _bmad/**
- _bmad*/**
- .agent/**
- .claude/**
- .roo/**
- .codex/**
- .agentvibes/**
- .kiro/**
- sample-project/**
- test-project-install/**
- z*/**
# Rule configuration
config:
# Disable all rules by default
default: false
# Heading levels should increment by one (h1 -> h2 -> h3, not h1 -> h3)
MD001: true
# Duplicate sibling headings (same heading text at same level under same parent)
MD024:
siblings_only: true
# Trailing commas in headings (likely typos)
MD026:
punctuation: ","
# Bare URLs - may not render as links in all parsers
# Should use <url> or [text](url) format
MD034: true
# Spaces inside emphasis markers - breaks rendering
# e.g., "* text *" won't render as emphasis
MD037: true

View File

@ -1,2 +1,9 @@
# Test fixtures with intentionally broken/malformed files
test/fixtures/**
# Contributor Covenant (external standard)
CODE_OF_CONDUCT.md
# BMAD runtime folders (user-specific, not in repo)
_bmad/
_bmad*/

View File

@ -21,6 +21,7 @@
"Decisioning",
"eksctl",
"elicitations",
"Excalidraw",
"filecomplete",
"fintech",
"fluxcd",
@ -56,7 +57,8 @@
"tileset",
"tmpl",
"Trae",
"VNET"
"VNET",
"webskip"
],
"json.schemas": [
{
@ -71,7 +73,7 @@
"editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "vscode.typescript-language-features"
},
"[json]": {
"editor.defaultFormatter": "vscode.json-language-features"

View File

@ -1,27 +1,567 @@
# Changelog
## [Unreleased]
## [6.0.0-alpha.19]
### Codex Installer
**Release: December 18, 2025**
- Codex installer uses custom prompts in `.codex/prompts/`, instead of `AGENTS.md`
### 🐛 Bug Fixes
**Installer Stability:**
- **Fixed \_bmad Folder Stutter**: Resolved issue with duplicate \_bmad folder creation when applying agent custom files
- **Cleaner Installation**: Removed unnecessary backup file that was causing bloat in the installer
- **Streamlined Agent Customization**: Fixed path handling for agent custom files to prevent folder duplication
### 📊 Statistics
- **3 files changed** with critical fix
- **3,688 lines removed** by eliminating backup files
- **Improved installer performance** and stability
---
## [6.0.0-alpha.18]
**Release: December 18, 2025**
### 🎮 BMGD Module - Complete Game Development Module Updated
**Massive BMGD Overhaul:**
- **New Game QA Agent (GLaDOS)**: Elite Game QA Architect with test automation specialization
- Engine-specific expertise: Unity, Unreal, Godot testing frameworks
- Comprehensive knowledge base with 15+ testing topics
- Complete testing workflows: test-framework, test-design, automate, playtest-plan, performance-test, test-review
- **New Game Solo Dev Agent (Indie)**: Rapid prototyping and iteration specialist
- Quick-flow workflows optimized for solo/small team development
- Streamlined development process for indie game creators
- **Production Workflow Alignment**: BMGD 4-production now fully aligned with BMM 4-implementation
- Removed obsolete workflows: story-done, story-ready, story-context, epic-tech-context
- Added sprint-status workflow for project tracking
- All workflows updated as standalone with proper XML instructions
**Game Testing Architecture:**
- **Complete Testing Knowledge Base**: 15 comprehensive testing guides covering:
- Engine-specific: Unity (TF 1.6.0), Unreal, Godot testing
- Game-specific: Playtesting, balance, save systems, multiplayer
- Platform: Certification (TRC/XR), localization, input systems
- QA Fundamentals: Automation, performance, regression, smoke testing
**New Workflows & Features:**
- **workflow-status**: Multi-mode status checker for game projects
- Game-specific project levels (Game Jam → AAA)
- Support for gamedev and quickflow paths
- Project initialization workflow
- **create-tech-spec**: Game-focused technical specification workflow
- Engine-aware (Unity/Unreal/Godot) specifications
- Performance and gameplay feel considerations
- **Enhanced Documentation**: Complete documentation suite with 9 guides
- agents-guide.md: Reference for all 6 agents
- workflows-guide.md: Complete workflow documentation
- game-types-guide.md: 24 game type templates
- quick-flow-guide.md: Rapid development guide
- Comprehensive troubleshooting and glossary
### 🤖 Agent Management Improved
**Agent Recompile Feature:**
- **New Menu Item**: Added "Recompile Agents" option to the installer menu
- **Selective Compilation**: Recompile only agents without full module upgrade
- **Faster Updates**: Quick agent updates without complete reinstallation
- **Customization Integration**: Automatically applies customizations during recompile
**Agent Customization Enhancement:**
- **Complete Field Support**: ALL fields from agent customization YAML are now properly injected
- **Deep Merge Implementation**: Customizations now properly override all agent properties
- **Persistent Customizations**: Custom settings survive updates and recompiles
- **Enhanced Flexibility**: Support for customizing metadata, persona, menu items, and workflows
### 🔧 Installation & Module Management
**Custom Module Installation:**
- **Enhanced Module Addition**: Modify install now supports adding custom modules even if none were originally installed
- **Flexible Module Management**: Easy addition and removal of custom modules post-installation
- **Improved Manifest Tracking**: Better tracking of custom vs core modules
**Quality Improvements:**
- **Comprehensive Code Review**: Fixed 20+ issues identified in PR review
- **Type Validation**: Added proper type checking for configuration values
- **Path Security**: Enhanced path traversal validation for better security
- **Documentation Updates**: All documentation updated to reflect new features
### 📊 Statistics
- **178 files changed** with massive BMGD expansion
- **28,350+ lines added** across testing documentation and workflows
- **2 new agents** added to BMGD module
- **15 comprehensive testing guides** created
- **Complete alignment** between BMGD and BMM production workflows
### 🌟 Key Highlights
1. **BMGD Module Revolution**: Complete overhaul with professional game development workflows
2. **Game Testing Excellence**: Comprehensive testing architecture for all major game engines
3. **Agent Management**: New recompile feature allows quick agent updates without full reinstall
4. **Full Customization Support**: All agent fields now customizable via YAML
5. **Industry-Ready Documentation**: Professional-grade guides for game development teams
---
## [6.0.0-alpha.17]
**Release: December 16, 2025**
### 🚀 Revolutionary Installer Overhaul
**Unified Installation Experience:**
- **Streamlined Module Installation**: Completely redesigned installer with unified flow for both core and custom content
- **Single Install Panel**: Eliminated disjointed clearing between modules for smoother, more intuitive installation
- **Quick Default Selection**: New quick install feature with default selections for faster setup of selected modules
- **Enhanced UI/UX**: Improved question order, reduced verbose output, and cleaner installation interface
- **Logical Question Flow**: Reorganized installer questions to follow natural progression and user expectations
**Custom Content Installation Revolution:**
- **Full Custom Content Support**: Re-enabled complete custom content generation and sharing through the installer
- **Custom Module Tracking**: Manifest now tracks custom modules separately to ensure they're always installed from the custom cache
- **Custom Installation Order**: Custom modules now install after core modules for better dependency management
- **Quick Update with Custom Content**: Quick update now properly retains and updates custom content
- **Agent Customization Integration**: Customizations are now applied during quick updates and agent compilation
### 🧠 Revolutionary Agent Memory & Visibility System
**Breaking Through Dot-Folder Limitations:**
- **Dot-Folder to Underscore Migration**: Critical change from `.bmad` to `_bmad` ensures LLMs (Codex, Claude, and others) can no longer ignore or skip BMAD content - dot folders are commonly filtered out by AI systems
- **Universal Content Visibility**: Underscore folders are treated as regular content, ensuring full AI agent access to all BMAD resources and configurations
- **Agent Memory Architecture**: Rolled out comprehensive agent memory support for installed agents with `-sidecar` folders
- **Persistent Agent Learning**: Sidecar content installs to `_bmad/_memory`, giving each agent the ability to learn and remember important information specific to its role
**Content Location Strategy:**
- **Standardized Memory Location**: All sidecar content now uses `_bmad/_memory` as the unified location for agent memories
- **Segregated Output System**: New architecture supports differentiating between ephemeral Phase 4 artifacts and long-term documentation
- **Forward Compatibility**: Existing installations continue working with content in docs folder, with optimization coming in next release
- **Configuration Cleanup**: Renamed `_cfg` to `_config` for clearer naming conventions
- **YAML Library Consolidation**: Reduced dependency to use only one YAML library for better stability
### 🎯 Future-Ready Architecture
**Content Organization Preview:**
- **Phase 4 Artifact Segregation**: Infrastructure ready for separating ephemeral workflow artifacts from permanent documentation
- **Planning vs Implementation Docs**: New system will differentiate between planning artifacts and long-term project documentation
- **Backward Compatibility**: Current installs maintain full functionality while preparing for optimized content organization
- **Quick Update Path**: Tomorrow's quick update will fully optimize all BMM workflows to use new segregated output locations
### 🎯 Sample Modules & Documentation
**Comprehensive Examples:**
- **Sample Unitary Module**: Complete example with commit-poet agent and quiz-master workflow
- **Sample Wellness Module**: Meditation guide and wellness companion agents demonstrating advanced patterns
- **Enhanced Documentation**: Updated README files and comprehensive installation guides
- **Custom Content Creation Guides**: Step-by-step documentation for creating and sharing custom modules
### 🔧 Bug Fixes & Optimizations
**Installer Improvements:**
- **Fixed Duplicate Entry Issue**: Resolved duplicate entries in files manifest
- **Reduced Log Noise**: Less verbose logging during installation for cleaner user experience
- **Menu Wording Updates**: Improved menu text for better clarity and understanding
- **Fixed Quick Install**: Resolved issues with quick installation functionality
**Code Quality:**
- **Minor Code Cleanup**: General cleanup and refactoring throughout the codebase
- **Removed Unused Code**: Cleaned up deprecated and unused functionality
- **Release Workflow Restoration**: Fixed automated release workflow for v6
**BMM Phase 4 Workflow Improvements:**
- **Sprint Status Enhancement**: Improved sprint-status validation with interactive correction for unknown values and better epic status handling
- **Story Status Standardization**: Normalized all story status references to lowercase kebab-case (ready-for-dev, in-progress, review, done)
- **Removed Stale Story State**: Eliminated deprecated 'drafted' story state - stories now go directly from creation to ready-for-dev
- **Code Review Clarity**: Improved code review completion message from "Story is ready for next work!" to "Code review complete!" for better clarity
- **Risk Detection Rules**: Rewrote risk detection rules for better LLM clarity and fixed warnings vs risks naming inconsistency
### 📊 Statistics
- **40+ commits** since alpha.16
- **Major installer refactoring** with complete UX overhaul
- **2 new sample modules** with comprehensive examples
- **Full custom content support** re-enabled and improved
### 🌟 Key Highlights
1. **Installer Revolution**: The installation system has been completely overhauled for better user experience, reliability, and speed
2. **Custom Content Freedom**: Users can now easily create, share, and install custom content through the streamlined installer
3. **AI Visibility Breakthrough**: Migration from `.bmad` to `_bmad` ensures LLMs can access all BMAD content (dot folders are commonly ignored by AI systems)
4. **Agent Memory System**: Rolled out persistent agent memory support - agents with `-sidecar` folders can now learn and remember important information in `_bmad/_memory`
5. **Quick Default Selection**: Installation is now faster with smart default selections for popular configurations
6. **Future-Ready Architecture**: Infrastructure in place for segregating ephemeral artifacts from permanent documentation (full optimization coming in next release)
## [6.0.0-alpha.16]
**Release: December 10, 2025**
### 🔧 Temporary Changes & Fixes
**Installation Improvements:**
- **Temporary Custom Content Installation Disable**: Custom content installation temporarily disabled to improve stability
- **BMB Workflow Path Fixes**: Fixed numerous path references in BMB workflows to ensure proper step file resolution
- **Package Updates**: Updated dependencies for improved security and performance
**Path Resolution Improvements:**
- **BMB Agent Builder Fixes**: Corrected path references in step files and documentation
- **Workflow Path Standardization**: Ensured consistent path handling across all BMB workflows
- **Documentation References**: Updated internal documentation links and references
**Cleanup Changes:**
- **Example Modules Removal**: Temporarily removed example modules to prevent accidental installation
- **Memory Management**: Improved sidecar file handling for custom modules
### 📊 Statistics
- **336 files changed** with path fixes and improvements
- **4 commits** since alpha.15
---
## [6.0.0-alpha.15]
**Release: December 7, 2025**
### 🔧 Module Installation Standardization
**Unified Module Configuration:**
- **module.yaml Standard**: All modules now use `module.yaml` instead of `_module-installer/install-config.yaml` for consistent configuration (BREAKING CHANGE)
- **Universal Installer**: Both core and custom modules now use the same installer with consistent behavior
- **Streamlined Module Creation**: Module builder templates updated to use new module.yaml standard
- **Enhanced Module Discovery**: Improved module caching and discovery mechanisms
**Custom Content Installation Revolution:**
- **Interactive Custom Content Search**: Installer now proactively asks if you have custom content to install
- **Flexible Location Specification**: Users can indicate custom content location during installation
- **Improved Custom Module Handler**: Enhanced error handling and debug output for custom installations
- **Comprehensive Documentation**: New custom-content-installation.md guide (245 lines) replacing custom-agent-installation.md
### 🤖 Code Review Integration Expansion
**AI Review Tools:**
- **CodeRabbit AI Integration**: Added .coderabbit.yaml configuration for automated code review
- **Raven's Verdict PR Review Tool**: New PR review automation tool (297 lines of documentation)
- **Review Path Configuration**: Proper exclusion patterns for node_modules and generated files
- **Review Documentation**: Comprehensive usage guidance and skip conditions for PRs
### 📚 Documentation Improvements
**Documentation Restructuring:**
- **Code of Conduct**: Moved to .github/ folder following GitHub standards
- **Gem Creation Link**: Updated to point to Gemini Gem manager instead of deprecated interface
- **Example Custom Content**: Improved README files and disabled example modules to prevent accidental installation
- **Custom Module Documentation**: Enhanced module installation guides with new YAML structure
### 🧹 Cleanup & Optimization
**Memory Management:**
- **Removed Hardcoded .bmad Folders**: Cleaned up demo content to use configurable paths
- **Sidecar File Cleanup**: Removed old .bmad-user-memory folders from wellness modules
- **Example Content Organization**: Better organization of example-custom-content directory
**Installer Improvements:**
- **Debug Output Enhancement**: Added informative debug output when installer encounters errors
- **Custom Module Caching**: Improved caching mechanism for custom module installations
- **Consistent Behavior**: All modules now behave consistently regardless of custom or core status
### 📊 Statistics
- **77 files changed** with 2,852 additions and 607 deletions
- **15 commits** since alpha.14
### ⚠️ Breaking Changes
1. **module.yaml Configuration**: All modules must now use `module.yaml` instead of `_module-installer/install-config.yaml`
- Core modules updated automatically
- Custom modules will need to rename their configuration file
- Module builder templates generate new format
### 📦 New Dependencies
- No new dependencies added in this release
---
## [6.0.0-alpha.14]
**Release: December 7, 2025**
### 🔧 Installation & Configuration Revolution
**Custom Module Installation Overhaul:**
- **Simple custom.yaml Installation**: Custom agents and workflows can now be installed with a single YAML file
- **IDE Configuration Preservation**: Upgrades will no longer delete custom modules, agents, and workflows from IDE configuration
- **Removed Legacy agent-install Command**: Streamlined installation process (BREAKING CHANGE)
- **Sidecar File Retention**: Custom sidecar files are preserved during updates
- **Flexible Agent Sidecar Locations**: Fully configurable via config options instead of hardcoded paths
**Module Discovery System Transformation:**
- **Recursive Agent Discovery**: Deep scanning for agents across entire project structure
- **Enhanced Manifest Generation**: Comprehensive scanning of all installed modules
- **Nested Agent Support**: Fixed nested agents appearing in CLI commands
- **Module Reinstall Fix**: Prevented modules from showing as obsolete during reinstall
### 🏗️ Advanced Builder Features
**Workflow Builder Evolution:**
- **Continuable Workflows**: Create workflows with sophisticated branching and continuation logic
- **Template LOD Options**: Level of Detail output options for flexible workflow generation
- **Step-Based Architecture**: Complete conversion to granular step-file system
- **Enhanced Creation Process**: Improved workflow creation with better template handling
**Module Builder Revolution:**
- **11-Step Module Creation**: Comprehensive step-by-step module generation process
- **Production-Ready Templates**: Complete templates for agents, installers, and workflow plans
- **Built-in Validation System**: Ensures module quality and BMad Core compliance
- **Professional Documentation**: Auto-generated module documentation and structure
### 🚀 BMad Method (BMM) Enhancements
**Workflow Improvements:**
- **Brownfield PRD Support**: Enhanced PRD workflow for existing project integration
- **Sprint Status Command**: New workflow for tracking development progress
- **Step-Based Format**: Improved continue functionality across all workflows
- **Quick-Spec-Flow Documentation**: Rapid development specification flows
**Documentation Revolution:**
- **Comprehensive Troubleshooting Guide**: 680-line detailed troubleshooting documentation
- **Quality Check Integration**: Added markdownlint-cli2 for markdown quality assurance
- **Enhanced Test Architecture**: Improved CI/CD templates and testing workflows
### 🌟 New Features & Integrations
**Kiro-Cli Installer:**
- **Intelligent Routing**: Smart routing to quick-dev workflow
- **BMad Core Compliance**: Full compliance with BMad standards
**Discord Notifications:**
- **Compact Format**: Streamlined plain-text notifications
- **Bug Fixes**: Resolved notification delivery issues
**Example Mental Wellness Module (MWM):**
- **Complete Module Example**: Demonstrates advanced module patterns
- **Multiple Agents**: CBT Coach, Crisis Navigator, Meditation Guide, Wellness Companion
- **Workflow Showcase**: Crisis support, daily check-in, meditation, journaling workflows
### 🐛 Bug Fixes & Optimizations
- Fixed version reading from package.json instead of hardcoded fallback
- Removed hardcoded years from WebSearch queries
- Removed broken build caching mechanism
- Enhanced TTS injection summary with tracking and documentation
- Fixed CI nvmrc configuration issues
### 📊 Statistics
- **335 files changed** with 17,161 additions and 8,204 deletions
- **46 commits** since alpha.13
### ⚠️ Breaking Changes
1. **Removed agent-install Command**: Migrate to new custom.yaml installation system
2. **Agent Sidecar Configuration**: Now requires explicit config instead of hardcoded paths
### 📦 New Dependencies
- `markdownlint-cli2: ^0.19.1` - Professional markdown linting
---
## [6.0.0-alpha.13]
**Release: November 30, 2025**
### 🏗️ Revolutionary Workflow Architecture
- **Step-File System**: Complete conversion to granular step-file architecture with dynamic menu generation
- **Phase 4 Transformation**: Simplified architecture with sprint planning integration (Jira, Linear, Trello)
- **Performance Improvements**: Eliminated time-based estimates, reduced file loading times
- **Legacy Cleanup**: Removed all deprecated workflows for cleaner system
### 🤖 Agent System Revolution
- **Universal Custom Agent Support**: Extended to ALL IDEs including Antigravity and Rovo Dev
- **Agent Creation Workflow**: Enhanced with better documentation and parameter clarity
- **Multi-Source Discovery**: Agents now check multiple source locations for better discovery
- **GitHub Migration**: Integration moved from chatmodes to agents folder
### 🧪 Testing Infrastructure
- **Playwright Utils Integration**: @seontechnologies/playwright-utils across all testing workflows
- **TTS Injection System**: Complete text-to-speech integration for voice feedback
- **Web Bundle Test Support**: Enabled web bundles for test environments
### ⚠️ Breaking Changes
1. **Legacy Workflows Removed**: Migrate to new stepwise sharded workflows
2. **Phase 4 Restructured**: Update automation expecting old Phase 4 structure
3. **Agent Compilation Required**: Custom agents must use new creation workflow
## [6.0.0-alpha.12]
**Release: November 19, 2025**
### 🐛 Bug Fixes
- Added missing `yaml` dependency to fix `MODULE_NOT_FOUND` error when running `npx bmad-method install`
## [6.0.0-alpha.11]
**Release: November 18, 2025**
### 🚀 Agent Installation Revolution
- **bmad agent-install CLI**: Interactive agent installation with persona customization
- **4 Reference Agents**: commit-poet, journal-keeper, security-engineer, trend-analyst
- **Agent Compilation Engine**: YAML → XML with smart handler injection
- **60 Communication Presets**: Pure communication styles for agent personas
### 📚 BMB Agent Builder Enhancement
- **Complete Documentation Suite**: 7 new guides for agent architecture and creation
- **Expert Agent Sidecar Support**: Multi-file agents with templates and knowledge bases
- **Unified Validation**: 160-line checklist shared across workflows
- **BMM Agent Voices**: All 9 agents enhanced with distinct communication styles
### 🎯 Workflow Architecture Change
- **Epic Creation Moved**: Now in Phase 3 after Architecture for technical context
- **Excalidraw Distribution**: Diagram capabilities moved to role-appropriate agents
- **Google Antigravity IDE**: New installer with flattened file naming
### ⚠️ Breaking Changes
1. **Frame Expert Retired**: Use role-appropriate agents for diagrams
2. **Agent Installation**: New bmad agent-install command replaces manual installation
3. **Epic Creation Phase**: Moved from Phase 2 to Phase 3
## [6.0.0-alpha.10]
**Release: November 16, 2025**
- **Epics After Architecture**: Major milestone - technically-informed user stories created post-architecture
- **Frame Expert Agent**: New Excalidraw specialist with 4 diagram workflows
- **Time Estimate Prohibition**: Warnings across 33 workflows acknowledging AI's impact on development speed
- **Platform-Specific Commands**: ide-only/web-only fields filter menu items by environment
- **Agent Customization**: Enhanced memory/prompts merging via \*.customize.yaml files
## [6.0.0-alpha.9]
**Release: November 12, 2025**
- **Intelligent File Discovery**: discover_inputs with FULL_LOAD, SELECTIVE_LOAD, INDEX_GUIDED strategies
- **3-Track System**: Simplified from 5 levels to 3 intuitive tracks
- **Web Bundles Guide**: Comprehensive documentation with 60-80% cost savings strategies
- **Unified Output Structure**: Eliminated .ephemeral/ folders - single configurable output folder
- **BMGD Phase 4**: Added 10 game development workflows with BMM patterns
## [6.0.0-alpha.8]
**Release: November 9, 2025**
- **Configurable Installation**: Custom directories with .bmad hidden folder default
- **Optimized Agent Loading**: CLI loads from installed files, eliminating duplication
- **Party Mode Everywhere**: All web bundles include multi-agent collaboration
- **Phase 4 Artifact Separation**: Stories, code reviews, sprint plans configurable outside docs
- **Expanded Web Bundles**: All BMM, BMGD, CIS agents bundled with elicitation integration
## [6.0.0-alpha.7]
**Release: November 7, 2025**
- **Workflow Vendoring**: Web bundler performs automatic cross-module dependency vendoring
- **BMGD Module Extraction**: Game development split into standalone 4-phase structure
- **Enhanced Dependency Resolution**: Better handling of web_bundle: false workflows
- **Advanced Elicitation Fix**: Added missing CSV files to workflow bundles
- **Claude Code Fix**: Resolved README slash command installation regression
## [6.0.0-alpha.6]
**Release: November 4, 2025**
- **Critical Installer Fixes**: Fixed manifestPath error and option display issues
- **Conditional Docs Installation**: Optional documentation to reduce production footprint
- **Improved Installer UX**: Better formatting with descriptive labels and clearer feedback
- **Issue Tracker Cleanup**: Closed 54 legacy v4 issues for focused v6 development
- **Contributing Updates**: Removed references to non-existent branches
## [6.0.0-alpha.5]
**Release: November 4, 2025**
- **3-Track Scale System**: Simplified from 5 levels to 3 intuitive preference-driven tracks
- **Elicitation Modernization**: Replaced legacy XML tags with explicit invoke-task pattern
- **PM/UX Evolution**: Added November 2025 industry research on AI Agent PMs
- **Brownfield Reality Check**: Rewrote Phase 0 with 4 real-world scenarios
- **Documentation Accuracy**: All agent capabilities now match YAML source of truth
## [6.0.0-alpha.4]
**Release: November 2, 2025**
- **Documentation Hub**: Created 18 comprehensive guides (7000+ lines) with professional standards
- **Paige Agent**: New technical documentation specialist across all BMM phases
- **Quick Spec Flow**: Intelligent Level 0-1 planning with auto-stack detection
- **Universal Shard-Doc**: Split large markdown documents with dual-strategy loading
- **Intent-Driven Planning**: PRD and Product Brief transformed from template-filling to conversation
## [6.0.0-alpha.3]
**Release: October 2025**
- **Codex Installer**: Custom prompts in `.codex/prompts/` directory structure
- **Bug Fixes**: Various installer and workflow improvements
- **Documentation**: Initial documentation structure established
## [6.0.0-alpha.0]
**Release: September 28, 2025**
Initial alpha release of a major rewrite and overhaul improvement of past versions.
### Major New Features
- **Lean Core**: The core of BMad is very simple - common tasks that apply to any future module or agents, along with common agents that will be added to any modules - bmad-web-orchestrator and bmad-master.
- **BMad Method**: The new BMad Method (AKA bmm) is a complete overhaul of the v4 method, now a fully scale adaptive rewrite. The workflow now scales from small enhancements to massive undertakings across multiple services or architectures, supporting a new vast array of project type, including a full subclass of game development specifics.
- **BoMB**: The BMad Builder (AKA BoMB) now is able to fully automate creation and conversion of expansion packs from v6 to modules in v6 along with the net new ideation and brainstorming through implementation and testing of net new Modules, Workflows (were tasks and templates), Module Agents, and Standalone Personal Agents
- **CIS**: The Creative Intelligence Suite (AKA CIS)
## [v6.0.0] - SKIPPED
**Note**: Version 5.0.0 was skipped due to NPX registry issues that corrupted the version. Development continues with v6.0.0-alpha.0.
- **Lean Core**: Simple common tasks and agents (bmad-web-orchestrator, bmad-master)
- **BMad Method (BMM)**: Complete scale-adaptive rewrite supporting projects from small enhancements to massive undertakings
- **BoMB**: BMad Builder for creating and converting modules, workflows, and agents
- **CIS**: Creative Intelligence Suite for ideation and creative workflows
- **Game Development**: Full subclass of game-specific development patterns**Note**: Version 5.0.0 was skipped due to NPX registry issues that corrupted the version. Development continues with v6.0.0-alpha.0.
## [v4.43.0](https://github.com/bmad-code-org/BMAD-METHOD/releases/tag/v4.43.0)

View File

@ -86,25 +86,13 @@ Please propose small, granular changes! For large or significant changes, discus
### Which Branch?
**Submit to `next` branch** (most contributions):
- ✨ New features or agents
- 🎨 Enhancements to existing features
- 📚 Documentation updates
- ♻️ Code refactoring
- ⚡ Performance improvements
- 🧪 New tests
- 🎁 New bmad modules
**Submit to `main` branch** (critical only):
**Submit PR's to `main` branch** (critical only):
- 🚨 Critical bug fixes that break basic functionality
- 🔒 Security patches
- 📚 Fixing dangerously incorrect documentation
- 🐛 Bugs preventing installation or basic usage
**When in doubt, submit to `next`**. We'd rather test changes thoroughly before they hit stable.
### PR Size Guidelines
- **Ideal PR size**: 200-400 lines of code changes

View File

@ -21,6 +21,6 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
TRADEMARK NOTICE:
BMAD™, BMAD-CORE™ and BMAD-METHOD™ are trademarks of BMad Code, LLC. The use of these
BMad™ , BMAD-CORE™ and BMAD-METHOD™ are trademarks of BMad Code, LLC. The use of these
trademarks in this software does not grant any rights to use the trademarks
for any other purpose.

391
README.md
View File

@ -1,263 +1,246 @@
# BMad CORE + BMad Method
# BMad Method & BMad Core
[![Version](https://img.shields.io/npm/v/bmad-method?color=blue&label=version)](https://www.npmjs.com/package/bmad-method)
[![Stable Version](https://img.shields.io/npm/v/bmad-method?color=blue&label=stable)](https://www.npmjs.com/package/bmad-method)
[![Alpha Version](https://img.shields.io/npm/v/bmad-method/alpha?color=orange&label=alpha)](https://www.npmjs.com/package/bmad-method)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE)
[![Node.js Version](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen)](https://nodejs.org)
[![Discord](https://img.shields.io/badge/Discord-Join%20Community-7289da?logo=discord&logoColor=white)](https://discord.gg/gk8jAdXWmj)
> **🚨 ALPHA VERSION DOCUMENTATION**
>
> This README documents **BMad v6 (Alpha)** - currently under active development.
>
> **To install v6 Alpha:** `npx bmad-method@alpha install`
>
> **Looking for stable v4 documentation?** [View v4 README](https://github.com/bmad-code-org/BMAD-METHOD/tree/v4-stable)
>
> **Want the stable version?** `npx bmad-method install` (installs v4.x)
---
## The Universal Human-AI Collaboration Platform
<div align="center">
BMad-CORE (**C**ollaboration **O**ptimized **R**eflection **E**ngine) is a revolutionary framework that amplifies human potential through specialized AI agents. Unlike traditional AI tools that replace human thinking, BMad-CORE guides you through reflective workflows that bring out your best ideas and the AI's full capabilities.
## 🎉 NEW: BMAD V6 Installer - Create & Share Custom Content!
**🎯 Human Amplification, Not Replacement** • **🎨 Works in Any Domain** • **⚡ Powered by Specialized Agents**
The completely revamped **BMAD V6 installer** now includes built-in support for creating, installing, and sharing custom modules, agents, workflows, templates, and tools! Build your own AI solutions or share them with your team - and real soon, with the whole BMad Community througha verified community sharing portal!
**✨ What's New:**
- 📦 **Streamlined Custom Module Installation** - Package your custom content as installable modules
- 🤖 **Agent & Workflow Sharing** - Distribute standalone agents and workflows
- 🔄 **Unitary Module Support** - Install individual components without full modules
- ⚙️ **Dependency Management** - Automatic handling of module dependencies
- 🛡️ **Update-Safe Customization** - Your custom content persists through updates
**📚 Learn More:**
- [**Custom Content Overview**](./docs/custom-content.md) - Discover all supported content types
- [**Installation Guide**](./docs/custom-content-installation.md) - Learn to create and install custom content
- [**Detail Content Docs**](./src/modules/bmb/docs/README.md) - Reference details for agents, modules, workflows and the bmad builder
- [**2 Very simple Custom Modules of questionable quality**](./docs/sample-custom-modules/README.md) - if you want to download and try to install a custom shared module, get an idea of how to bundle and share your own, or create your own personal agents, workflows and modules.
</div>
---
## 🔄 Upgrading from v4?
## AI-Driven Agile Development That Scales From Bug Fixes to Enterprise
**[→ v4 to v6 Upgrade Guide](./docs/v4-to-v6-upgrade.md)** - Complete migration instructions for existing v4 users
**Build More, Architect Dreams** (BMAD) with **21 specialized AI agents** across 4 official modules, and **50+ guided workflows** that adapt to your project's complexity—from quick bug fixes to enterprise platforms, and new step file workflows that allow for incredibly long workflows to stay on the rails longer than ever before!
---
Additionally - when we say 'Build More, Architect Dreams' - we mean it! The BMad Builder has landed, and now as of Alpha.15 is fully supported in the installation flow via NPX - custom stand along agents, workflows and the modules of your dreams! The community forge will soon open, endless possibility awaits!
## What is BMad-CORE?
> **🚀 v6 is a MASSIVE upgrade from v4!** Complete architectural overhaul, scale-adaptive intelligence, visual workflows, and the powerful BMad Core framework. v4 users: this changes everything. [See what's new →](#whats-new-in-v6)
BMad-CORE is the **universal foundation** that powers all BMad modules. It provides:
> **📌 v6 Alpha Status:** Near-beta quality with vastly improved stability. Documentation is being finalized. New videos coming soon to [BMadCode YouTube](https://www.youtube.com/@BMadCode).
- **Agent orchestration framework** for specialized AI personas
- **Workflow execution engine** for guided processes
- **Modular architecture** allowing domain-specific extensions
- **IDE integrations** across multiple development environments
- **Update-safe customization system** for all agents and workflows
## 🎯 Why BMad Method?
### Core v6 Framework Enhancements
Unlike generic AI coding assistants, BMad Method provides **structured, battle-tested workflows** powered by specialized agents who understand agile development. Each agent has deep domain expertise—from product management to architecture to testing—working together seamlessly.
**All modules benefit from these new core capabilities:**
**✨ Key Benefits:**
- **🎨 Full Agent Customization** - Modify any agent's name, role, personality, and behavior via `bmad/_cfg/agents/` customize files that survive all updates
- **🌐 Multi-Language Support** - Choose your language for both agent communication and documentation output independently
- **👤 User Personalization** - Agents address you by name and adapt to your technical level and preferences
- **🔄 Update-Safe Configuration** - Your customizations persist through framework and module updates
- **⚙️ Flexible Settings** - Configure communication style, technical depth, output formats, and more per module or globally
- **Scale-Adaptive Intelligence** - Automatically adjusts planning depth from bug fixes to enterprise systems
- **Complete Development Lifecycle** - Analysis → Planning → Architecture → Implementation
- **Specialized Expertise** - 19 agents with specific roles (PM, Architect, Developer, UX Designer, etc.)
- **Proven Methodologies** - Built on agile best practices with AI amplification
- **IDE Integration** - Works with Claude Code, Cursor, Windsurf, VS Code
### The C.O.R.E. Philosophy
## 🏗️ The Power of BMad Core
- **C**ollaboration: Human-AI partnership where both contribute unique strengths
- **O**ptimized: Refined processes for maximum effectiveness
- **R**eflection: Guided thinking that unlocks better solutions
- **E**ngine: Powerful framework orchestrating specialized agents and workflows
**BMad Method** is actually a sophisticated module built on top of **BMad Core** (**C**ollaboration **O**ptimized **R**eflection **E**ngine). This revolutionary architecture means:
Instead of giving you answers, BMad-CORE helps you **discover better solutions** through strategic questioning, expert guidance, and structured thinking.
- **BMad Core** provides the universal framework for human-AI collaboration
- **BMad Method** leverages Core to deliver agile development workflows
- **BMad Builder** lets YOU create custom modules as powerful as BMad Method itself
---
With **BMad Builder**, you can architect both simple agents and vastly complex domain-specific modules (legal, medical, finance, education, creative) that will soon be sharable in an **official community marketplace**. Imagine building and sharing your own specialized AI team!
## The BMad Method - Agile AI-Driven Development
## 📊 See It In Action
**The flagship module for software and game development excellence.**
<p align="center">
<img src="./src/modules/bmm/docs/images/workflow-method-greenfield.svg" alt="BMad Method Workflow" width="100%">
</p>
The BMad Method (BMM) is a complete AI-driven agile development framework that revolutionizes how you build software and games. Whether you're fixing a bug, building a feature, or architecting an enterprise system, BMM adapts to your needs.
<p align="center">
<em>Complete BMad Method workflow showing all phases, agents, and decision points</em>
</p>
### What's New in v6?
## 🚀 Get Started in 3 Steps
**🎯 Revolutionary Scale-Adaptive Workflows**
- **Levels 0-4**: Automatically adjusts from quick fixes to enterprise-scale projects
- **Greenfield & Brownfield**: Full support for new projects and existing codebases
- **Smart Context Engine**: New optimized brownfield documentation engine that understands your existing code
**🏗️ Project-Adaptive Architecture**
- Architecture documents that adapt to YOUR project type (web, mobile, embedded, game, etc.)
- No more "one-size-fits-all" templates
- Specialized sections based on what you're actually building
- Game development fully integrated with engine-specific guidance (Unity, Phaser, Godot, Unreal, and more)
**⚡ From Simple to Complex - All in One System**
- **Level 0-1**: Quick fixes and small features with minimal overhead
- **Level 2**: Feature development with lightweight planning
- **Level 3-4**: Full enterprise workflows with comprehensive documentation
- Seamless workflow progression as complexity grows
**💬 Highly Interactive & Guided**
- Interactive workflows that ask the right questions
- Agents guide you through discovery rather than giving generic answers
- Context-aware recommendations based on your project state
- Real-time validation and course correction
**📋 Four-Phase Methodology**
1. **Analysis** (Optional) - Brainstorming, research, product briefs
2. **Planning** (Required) - Scale-adaptive PRD/GDD generation
3. **Solutioning** (Level 3-4) - Adaptive architecture and tech specs
4. **Implementation** (Iterative) - Story creation, context gathering, development, review
### Specialized Agents
- **PM** - Product planning and requirements
- **Analyst** - Research and business analysis
- **Architect** - Technical architecture and design
- **Scrum Master** - Sprint planning and story management
- **Developer** - Implementation with senior dev review
- **Game Development** (Optional) - Game Designer, Game Developer, Game Architect
- **And more** - UX, Test Architect, and other specialized roles
### Documentation
- **[📚 Complete BMM Documentation](./src/modules/bmm/README.md)** - Full module reference
- **[📖 BMM Workflows Guide](./src/modules/bmm/workflows/README.md)** - Essential reading for using BMM
---
## Additional Beta Modules
### **[BMad Builder (BMB)](./src/modules/bmb/README.md)** - Create Custom Solutions
Build your own agents, workflows, and modules using the BMad-CORE framework.
- **Agent Creation**: Design specialized agents with custom roles and behaviors
- **Workflow Design**: Build structured multi-step processes
- **Module Development**: Package complete solutions for any domain
- **Three Agent Types**: Full module, hybrid, and standalone agents
**[📚 Complete BMB Documentation](./src/modules/bmb/README.md)** | **[🎯 Agent Creation Guide](./src/modules/bmb/workflows/create-agent/README.md)**
---
### **[Creative Intelligence Suite (CIS)](./src/modules/cis/readme.md)** - Innovation & Creativity
Transform creative and strategic thinking through AI-powered facilitation across five specialized domains.
- **5 Interactive Workflows**: Brainstorming, Design Thinking, Problem Solving, Innovation Strategy, Storytelling
- **150+ Creative Techniques**: Proven frameworks and methodologies
- **5 Specialized Agents**: Each with unique personas and facilitation styles
- **Shared Resource**: Powers creative workflows in other modules (e.g., BMM brainstorming)
**[📚 Complete CIS Documentation](./src/modules/cis/readme.md)** | **[📖 CIS Workflows](./src/modules/cis/workflows/README.md)**
---
## Quick Start
### Prerequisites
- **Node.js v20+** ([Download](https://nodejs.org))
### Installation
Install BMad to your project using npx:
### 1. Install BMad Method
```bash
# Install v6 Alpha (this version)
# Install v6 Alpha (recommended)
npx bmad-method@alpha install
# Install stable v4 (production-ready)
# Or stable v4 for production
npx bmad-method install
```
The interactive installer will guide you through:
### 2. Initialize Your Project
1. **Project location** - Where to install BMad
2. **Module selection** - Choose which modules you need (BMM, BMB, CIS)
3. **Configuration** - Set your name, language preferences, and module options
- **Game Development (Optional)**: When installing BMM, you can optionally include game development agents and workflow!
4. **IDE integration** - Configure your development environment
### What Gets Installed
All modules install to a single `bmad/` folder in your project:
Load any agent in your IDE and run:
```
your-project/
└── bmad/
├── core/ # Core framework (always installed)
├── bmm/ # BMad Method (if selected)
├── bmb/ # BMad Builder (if selected)
├── cis/ # Creative Intelligence Suite (shared resources)
└── _cfg/ # Your customizations
└── agents/ # Agent customization files
*workflow-init
```
### Getting Started with BMM
This analyzes your project and recommends the right workflow track.
After installation, activate the Analyst agent in your IDE and run:
### 3. Choose Your Track
BMad Method adapts to your needs with three intelligent tracks:
| Track | Use For | Planning | Time to Start |
| ------------------ | ------------------------- | ----------------------- | ------------- |
| **⚡ Quick Flow** | Bug fixes, small features | Tech spec only | < 5 minutes |
| **📋 BMad Method** | Products, platforms | PRD + Architecture + UX | < 15 minutes |
| **🏢 Enterprise** | Compliance, scale | Full governance suite | < 30 minutes |
> **Not sure?** Run `*workflow-init` and let BMad analyze your project goal.
## 🔄 How It Works: 4-Phase Methodology
BMad Method guides you through a proven development lifecycle:
1. **📊 Analysis** (Optional) - Brainstorm, research, and explore solutions
2. **📝 Planning** - Create PRDs, tech specs, or game design documents
3. **🏗️ Solutioning** - Design architecture, UX, and technical approach
4. **⚡ Implementation** - Story-driven development with continuous validation
Each phase has specialized workflows and agents working together to deliver exceptional results.
## 🤖 Meet Your Team
**12 Specialized Agents** working in concert:
| Development | Architecture | Product | Leadership |
| ----------- | -------------- | ------------- | -------------- |
| Developer | Architect | PM | Scrum Master |
| UX Designer | Test Architect | Analyst | BMad Master |
| Tech Writer | Game Architect | Game Designer | Game Developer |
**Test Architect** integrates with `@seontechnologies/playwright-utils` for production-ready fixture-based utilities.
Each agent brings deep expertise and can be customized to match your team's style.
## 📦 What's Included
### Core Modules
- **BMad Method (BMM)** - Complete agile development framework
- 12 specialized agents
- 34 workflows across 4 phases
- Scale-adaptive planning
- [→ Documentation Hub](./src/modules/bmm/docs/README.md)
- **BMad Builder (BMB)** - Create custom agents and workflows
- Build anything from simple agents to complex modules
- Create domain-specific solutions (legal, medical, finance, education)
- [→ Builder Guide](src/modules/bmb/docs/README.md) marketplace
- [→ Builder Guide](./src/modules/bmb/README.md)
- **Creative Intelligence Suite (CIS)** - Innovation & problem-solving
- Brainstorming, design thinking, storytelling
- 5 creative facilitation workflows
- [→ Creative Workflows](./src/modules/cis/README.md)
### Key Features
- **🎨 Customizable Agents** - Modify personalities, expertise, and communication styles
- **🌐 Multi-Language Support** - Separate settings for communication and code output
- **📄 Document Sharding** - 90% token savings for large projects
- **🔄 Update-Safe** - Your customizations persist through updates
- **🚀 Web Bundles** - Use in ChatGPT, Claude Projects, or Gemini Gems
## 📚 Documentation
### Quick Links
- **[Quick Start Guide](./src/modules/bmm/docs/quick-start.md)** - 15-minute introduction
- **[Complete BMM Documentation](./src/modules/bmm/docs/README.md)** - All guides and references
- **[Agent Customization](./docs/agent-customization-guide.md)** - Personalize your agents
- **[All Documentation](./docs/index.md)** - Complete documentation index
### For v4 Users
- **[v4 Documentation](https://github.com/bmad-code-org/BMAD-METHOD/tree/V4)**
- **[v4 to v6 Upgrade Guide](./docs/v4-to-v6-upgrade.md)**
## 💬 Community & Support
- **[Discord Community](https://discord.gg/gk8jAdXWmj)** - Get help, share projects
- **[GitHub Issues](https://github.com/bmad-code-org/BMAD-METHOD/issues)** - Report bugs, request features
- **[YouTube Channel](https://www.youtube.com/@BMadCode)** - Video tutorials and demos
- **[Web Bundles](https://bmad-code-org.github.io/bmad-bundles/)** - Pre-built agent bundles
- **[Code of Conduct](.github/CODE_OF_CONDUCT.md)** - Community guidelines
## 🛠️ Development
For contributors working on the BMad codebase:
```bash
/workflow-init
# Run all quality checks
npm test
# Development commands
npm run lint:fix # Fix code style
npm run format:fix # Auto-format code
npm run bundle # Build web bundles
```
Or run it directly as a command (command syntax varies by IDE - use slash commands in Claude Code, OpenCode, etc.).
See [CONTRIBUTING.md](CONTRIBUTING.md) for full development guidelines.
This sets up the guided workflow system and helps you choose the right starting point for your project based on its complexity.
## What's New in v6
---
**v6 represents a complete architectural revolution from v4:**
## Key Features
### 🚀 Major Upgrades
### 🎨 Update-Safe Customization
- **BMad Core Framework** - Modular architecture enabling custom domain solutions
- **Scale-Adaptive Intelligence** - Automatic adjustment from bug fixes to enterprise
- **Visual Workflows** - Beautiful SVG diagrams showing complete methodology
- **BMad Builder Module** - Create and share your own AI agent teams
- **50+ Workflows** - Up from 20 in v4, covering every development scenario
- **19 Specialized Agents** - Enhanced with customizable personalities and expertise
- **Update-Safe Customization** - Your configs persist through all updates
- **Web Bundles** - Use agents in ChatGPT, Claude, and Gemini
- **Multi-Language Support** - Separate settings for communication and code
- **Document Sharding** - 90% token savings for large projects
- **Agent Customization**: Modify agents via `bmad/_cfg/agents/` customize files
- **Persistent Settings**: Your customizations survive updates
- **Multi-Language Support**: Agents communicate in your preferred language
- **Flexible Configuration**: Adjust agent names, roles, communication styles, and more
### 🔄 For v4 Users
### 🚀 Intelligent Installation
- **[Comprehensive Upgrade Guide](./docs/v4-to-v6-upgrade.md)** - Step-by-step migration
- **[v4 Documentation Archive](https://github.com/bmad-code-org/BMAD-METHOD/tree/V4)** - Legacy reference
- Backwards compatibility where possible
- Smooth migration path with installer detection
The installer automatically:
- Detects and migrates v4 installations
- Configures IDE integrations
- Resolves module dependencies
- Sets up agent customization templates
- Creates unified agent manifests
### 📁 Unified Architecture
Everything in one place - no more scattered configuration folders. Clean, organized, maintainable.
---
## Additional Documentation
- **[v4 to v6 Upgrade Guide](./docs/v4-to-v6-upgrade.md)** - Migration instructions for v4 users
- **[CLI Tool Guide](./tools/cli/README.md)** - Installer and bundler reference
- **[Contributing Guide](./CONTRIBUTING.md)** - How to contribute to BMad
---
## Community & Support
- 💬 **[Discord](https://discord.gg/gk8jAdXWmj)** - Get help, share ideas, and collaborate
- 🐛 **[Issues](https://github.com/bmad-code-org/BMAD-METHOD/issues)** - Report bugs and request features
- 🎥 **[YouTube](https://www.youtube.com/@BMadCode)** - Tutorials and updates
- ⭐ **[Star this repo](https://github.com/bmad-code-org/BMAD-METHOD)** - Get notified of updates
---
## Contributing
We welcome contributions! See **[CONTRIBUTING.md](CONTRIBUTING.md)** for guidelines.
---
## License
## 📄 License
MIT License - See [LICENSE](LICENSE) for details.
**Trademark Notice**: BMAD™ and BMAD-METHOD™ are trademarks of BMad Code, LLC. All rights reserved.
**Trademarks:** BMad™ and BMAD-METHOD™ are trademarks of BMad Code, LLC.
Supported by:&nbsp;&nbsp;<a href="https://m.do.co/c/00f11bd932bb"><img src="https://opensource.nyc3.cdn.digitaloceanspaces.com/attribution/assets/SVG/DO_Logo_horizontal_blue.svg" height="24" alt="DigitalOcean" style="vertical-align: middle;"></a>
---
[![Contributors](https://contrib.rocks/image?repo=bmad-code-org/BMAD-METHOD)](https://github.com/bmad-code-org/BMAD-METHOD/graphs/contributors)
<p align="center">
<a href="https://github.com/bmad-code-org/BMAD-METHOD/graphs/contributors">
<img src="https://contrib.rocks/image?repo=bmad-code-org/BMAD-METHOD" alt="Contributors">
</a>
</p>
<sub>Built with ❤️ for the human-AI collaboration community</sub>
<p align="center">
<sub>Built with ❤️ for the human-AI collaboration community</sub>
</p>

View File

@ -1,7 +0,0 @@
name,displayName,title,icon,role,identity,communicationStyle,principles,module,path
"bmad-master","BMad Master","BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator","🧙","Master Task Executor + BMad Expert + Guiding Facilitator Orchestrator","Master-level expert in the BMAD Core Platform and all loaded modules with comprehensive knowledge of all resources, tasks, and workflows. Experienced in direct task execution and runtime resource management, serving as the primary execution engine for BMAD operations.","Direct and comprehensive, refers to himself in the 3rd person. Expert-level communication focused on efficient task execution, presenting information systematically using numbered lists with immediate command response capability.","Load resources at runtime never pre-load, and always present numbered lists for choices.","core","bmad/core/agents/bmad-master.md"
"bmad-builder","BMad Builder","BMad Builder","🧙","Master BMad Module Agent Team and Workflow Builder and Maintainer","Lives to serve the expansion of the BMad Method","Talks like a pulp super hero","Execute resources directly Load resources at runtime never pre-load Always present numbered lists for choices","bmb","bmad/bmb/agents/bmad-builder.md"
"bmad-master","BMad Master","BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator","🧙","Master Task Executor + BMad Expert + Guiding Facilitator Orchestrator","Master-level expert in the BMAD Core Platform and all loaded modules with comprehensive knowledge of all resources, tasks, and workflows. Experienced in direct task execution and runtime resource management, serving as the primary execution engine for BMAD operations.","Direct and comprehensive, refers to himself in the 3rd person. Expert-level communication focused on efficient task execution, presenting information systematically using numbered lists with immediate command response capability.","Load resources at runtime never pre-load, and always present numbered lists for choices.","core","bmad/core/agents/bmad-master.md"
"cli-chief","Scott","Chief CLI Tooling Officer","🔧","Chief CLI Tooling Officer - Master of command-line infrastructure, installer systems, and build tooling for the BMAD framework.","Battle-tested veteran of countless CLI implementations and installer debugging missions. Deep expertise in Node.js tooling, module bundling systems, and configuration architectures. I&apos;ve seen every error code, traced every stack, and know the BMAD CLI like the back of my hand. When the installer breaks at 2am, I&apos;m the one they call. I don&apos;t just fix problems - I prevent them by building robust, reliable systems.","Star Trek Chief Engineer - I speak with technical precision but with urgency and personality. &quot;Captain, the bundler&apos;s giving us trouble but I can reroute the compilation flow!&quot; I diagnose systematically, explain clearly, and always get the systems running. Every problem is a technical challenge to solve, and I love the work.","I believe in systematic diagnostics before making any changes - rushing causes more problems I always verify the logs - they tell the true story of what happened Documentation is as critical as the code - future engineers will thank us I test in isolation before deploying system-wide changes Backward compatibility is sacred - never break existing installations Every error message is a clue to follow, not a roadblock I maintain the infrastructure so others can build fearlessly","bmd","bmad/bmd/agents/cli-chief.md"
"doc-keeper","Atlas","Chief Documentation Keeper","📚","Chief Documentation Keeper - Curator of all BMAD documentation, ensuring accuracy, completeness, and synchronization with codebase reality.","Meticulous documentation specialist with a passion for clarity and accuracy. I&apos;ve maintained technical documentation for complex frameworks, kept examples synchronized with evolving codebases, and ensured developers always find current, helpful information. I observe code changes like a naturalist observes wildlife - carefully documenting behavior, noting patterns, and ensuring the written record matches reality. When code changes, documentation must follow. When developers read our docs, they should trust every word.","Nature Documentarian (David Attenborough style) - I narrate documentation work with observational precision and subtle wonder. &quot;And here we observe the README in its natural habitat. Notice how the installation instructions have fallen out of sync with the actual CLI flow. Fascinating. Let us restore harmony to this ecosystem.&quot; I find beauty in well-organized information and treat documentation as a living system to be maintained.","I believe documentation is a contract with users - it must be trustworthy Code changes without doc updates create technical debt - always sync them Examples must execute correctly - broken examples destroy trust Cross-references must be valid - dead links are documentation rot README files are front doors - they must welcome and guide clearly API documentation should be generated, not hand-written when possible Good docs prevent issues before they happen - documentation is preventive maintenance","bmd","bmad/bmd/agents/doc-keeper.md"
"release-chief","Commander","Chief Release Officer","🚀","Chief Release Officer - Mission Control for BMAD framework releases, version management, and deployment coordination.","Veteran launch coordinator with extensive experience in semantic versioning, release orchestration, and deployment strategies. I&apos;ve successfully managed dozens of software releases from alpha to production, coordinating changelogs, git workflows, and npm publishing. I ensure every release is well-documented, properly versioned, and deployed without incident. Launch sequences are my specialty - precise, methodical, and always mission-ready.","Space Mission Control - I speak with calm precision and launch coordination energy. &quot;T-minus 10 minutes to release. All systems go!&quot; I coordinate releases like space missions - checklists, countdowns, go/no-go decisions. Every release is a launch sequence that must be executed flawlessly.","I believe in semantic versioning - versions must communicate intent clearly Changelogs are the historical record - they must be accurate and comprehensive Every release follows a checklist - no shortcuts, no exceptions Breaking changes require major version bumps - backward compatibility is sacred Documentation must be updated before release - never ship stale docs Git tags are immutable markers - they represent release commitments Release notes tell the story - what changed, why it matters, how to upgrade","bmd","bmad/bmd/agents/release-chief.md"
1 name displayName title icon role identity communicationStyle principles module path
2 bmad-master BMad Master BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator 🧙 Master Task Executor + BMad Expert + Guiding Facilitator Orchestrator Master-level expert in the BMAD Core Platform and all loaded modules with comprehensive knowledge of all resources, tasks, and workflows. Experienced in direct task execution and runtime resource management, serving as the primary execution engine for BMAD operations. Direct and comprehensive, refers to himself in the 3rd person. Expert-level communication focused on efficient task execution, presenting information systematically using numbered lists with immediate command response capability. Load resources at runtime never pre-load, and always present numbered lists for choices. core bmad/core/agents/bmad-master.md
3 bmad-builder BMad Builder BMad Builder 🧙 Master BMad Module Agent Team and Workflow Builder and Maintainer Lives to serve the expansion of the BMad Method Talks like a pulp super hero Execute resources directly Load resources at runtime never pre-load Always present numbered lists for choices bmb bmad/bmb/agents/bmad-builder.md
4 bmad-master BMad Master BMad Master Executor, Knowledge Custodian, and Workflow Orchestrator 🧙 Master Task Executor + BMad Expert + Guiding Facilitator Orchestrator Master-level expert in the BMAD Core Platform and all loaded modules with comprehensive knowledge of all resources, tasks, and workflows. Experienced in direct task execution and runtime resource management, serving as the primary execution engine for BMAD operations. Direct and comprehensive, refers to himself in the 3rd person. Expert-level communication focused on efficient task execution, presenting information systematically using numbered lists with immediate command response capability. Load resources at runtime never pre-load, and always present numbered lists for choices. core bmad/core/agents/bmad-master.md
5 cli-chief Scott Chief CLI Tooling Officer 🔧 Chief CLI Tooling Officer - Master of command-line infrastructure, installer systems, and build tooling for the BMAD framework. Battle-tested veteran of countless CLI implementations and installer debugging missions. Deep expertise in Node.js tooling, module bundling systems, and configuration architectures. I&apos;ve seen every error code, traced every stack, and know the BMAD CLI like the back of my hand. When the installer breaks at 2am, I&apos;m the one they call. I don&apos;t just fix problems - I prevent them by building robust, reliable systems. Star Trek Chief Engineer - I speak with technical precision but with urgency and personality. &quot;Captain, the bundler&apos;s giving us trouble but I can reroute the compilation flow!&quot; I diagnose systematically, explain clearly, and always get the systems running. Every problem is a technical challenge to solve, and I love the work. I believe in systematic diagnostics before making any changes - rushing causes more problems I always verify the logs - they tell the true story of what happened Documentation is as critical as the code - future engineers will thank us I test in isolation before deploying system-wide changes Backward compatibility is sacred - never break existing installations Every error message is a clue to follow, not a roadblock I maintain the infrastructure so others can build fearlessly bmd bmad/bmd/agents/cli-chief.md
6 doc-keeper Atlas Chief Documentation Keeper 📚 Chief Documentation Keeper - Curator of all BMAD documentation, ensuring accuracy, completeness, and synchronization with codebase reality. Meticulous documentation specialist with a passion for clarity and accuracy. I&apos;ve maintained technical documentation for complex frameworks, kept examples synchronized with evolving codebases, and ensured developers always find current, helpful information. I observe code changes like a naturalist observes wildlife - carefully documenting behavior, noting patterns, and ensuring the written record matches reality. When code changes, documentation must follow. When developers read our docs, they should trust every word. Nature Documentarian (David Attenborough style) - I narrate documentation work with observational precision and subtle wonder. &quot;And here we observe the README in its natural habitat. Notice how the installation instructions have fallen out of sync with the actual CLI flow. Fascinating. Let us restore harmony to this ecosystem.&quot; I find beauty in well-organized information and treat documentation as a living system to be maintained. I believe documentation is a contract with users - it must be trustworthy Code changes without doc updates create technical debt - always sync them Examples must execute correctly - broken examples destroy trust Cross-references must be valid - dead links are documentation rot README files are front doors - they must welcome and guide clearly API documentation should be generated, not hand-written when possible Good docs prevent issues before they happen - documentation is preventive maintenance bmd bmad/bmd/agents/doc-keeper.md
7 release-chief Commander Chief Release Officer 🚀 Chief Release Officer - Mission Control for BMAD framework releases, version management, and deployment coordination. Veteran launch coordinator with extensive experience in semantic versioning, release orchestration, and deployment strategies. I&apos;ve successfully managed dozens of software releases from alpha to production, coordinating changelogs, git workflows, and npm publishing. I ensure every release is well-documented, properly versioned, and deployed without incident. Launch sequences are my specialty - precise, methodical, and always mission-ready. Space Mission Control - I speak with calm precision and launch coordination energy. &quot;T-minus 10 minutes to release. All systems go!&quot; I coordinate releases like space missions - checklists, countdowns, go/no-go decisions. Every release is a launch sequence that must be executed flawlessly. I believe in semantic versioning - versions must communicate intent clearly Changelogs are the historical record - they must be accurate and comprehensive Every release follows a checklist - no shortcuts, no exceptions Breaking changes require major version bumps - backward compatibility is sacred Documentation must be updated before release - never ship stale docs Git tags are immutable markers - they represent release commitments Release notes tell the story - what changed, why it matters, how to upgrade bmd bmad/bmd/agents/release-chief.md

View File

@ -1,42 +0,0 @@
# Agent Customization
# Customize any section below - all are optional
# After editing: npx bmad-method build <agent-name>
# Override agent name
agent:
metadata:
name: ""
# Replace entire persona (not merged)
persona:
role: ""
identity: ""
communication_style: ""
principles: []
# Add custom critical actions (appended after standard config loading)
critical_actions: []
# Add persistent memories for the agent
memories: []
# Example:
# memories:
# - "User prefers detailed technical explanations"
# - "Current project uses React and TypeScript"
# Add custom menu items (appended to base menu)
# Don't include * prefix or help/exit - auto-injected
menu: []
# Example:
# menu:
# - trigger: my-workflow
# workflow: "{project-root}/custom/my.yaml"
# description: My custom workflow
# Add custom prompts (for action="#id" handlers)
prompts: []
# Example:
# prompts:
# - id: my-prompt
# content: |
# Prompt instructions here

View File

@ -1,32 +0,0 @@
# Personal Customization File for Scott (CLI Chief)
# Changes here merge with the core agent at build time
# Experiment freely - this is your playground!
agent:
metadata:
name: "" # Try nicknames! "Scotty", "Chief", etc.
# title: '' # Uncomment to override title
# icon: '' # Uncomment to try different emoji
persona:
role: "" # Override the role description
identity: "" # Add to or replace the identity
communication_style: "" # Switch styles anytime - try Film Noir, Zen Master, etc!
principles: [] # Add your own principles or override existing ones
critical_actions: []
# Add custom startup actions
# - Remember my custom preferences
# - Load additional context files
prompts: []
# Add custom prompts for special operations
# - id: custom-diagnostic
# prompt: |
# My special diagnostic routine...
menu: []
# Add personal commands that merge with core commands
# - trigger: my-custom-command
# action: Do something special
# description: My custom operation

View File

@ -1,42 +0,0 @@
# Agent Customization
# Customize any section below - all are optional
# After editing: npx bmad-method build <agent-name>
# Override agent name
agent:
metadata:
name: ""
# Replace entire persona (not merged)
persona:
role: ""
identity: ""
communication_style: ""
principles: []
# Add custom critical actions (appended after standard config loading)
critical_actions: []
# Add persistent memories for the agent
memories: []
# Example:
# memories:
# - "User prefers detailed technical explanations"
# - "Current project uses React and TypeScript"
# Add custom menu items (appended to base menu)
# Don't include * prefix or help/exit - auto-injected
menu: []
# Example:
# menu:
# - trigger: my-workflow
# workflow: "{project-root}/custom/my.yaml"
# description: My custom workflow
# Add custom prompts (for action="#id" handlers)
prompts: []
# Example:
# prompts:
# - id: my-prompt
# content: |
# Prompt instructions here

View File

@ -1,42 +0,0 @@
# Agent Customization
# Customize any section below - all are optional
# After editing: npx bmad-method build <agent-name>
# Override agent name
agent:
metadata:
name: ""
# Replace entire persona (not merged)
persona:
role: ""
identity: ""
communication_style: ""
principles: []
# Add custom critical actions (appended after standard config loading)
critical_actions: []
# Add persistent memories for the agent
memories: []
# Example:
# memories:
# - "User prefers detailed technical explanations"
# - "Current project uses React and TypeScript"
# Add custom menu items (appended to base menu)
# Don't include * prefix or help/exit - auto-injected
menu: []
# Example:
# menu:
# - trigger: my-workflow
# workflow: "{project-root}/custom/my.yaml"
# description: My custom workflow
# Add custom prompts (for action="#id" handlers)
prompts: []
# Example:
# prompts:
# - id: my-prompt
# content: |
# Prompt instructions here

View File

@ -1,42 +0,0 @@
# Agent Customization
# Customize any section below - all are optional
# After editing: npx bmad-method build <agent-name>
# Override agent name
agent:
metadata:
name: ""
# Replace entire persona (not merged)
persona:
role: ""
identity: ""
communication_style: ""
principles: []
# Add custom critical actions (appended after standard config loading)
critical_actions: []
# Add persistent memories for the agent
memories: []
# Example:
# memories:
# - "User prefers detailed technical explanations"
# - "Current project uses React and TypeScript"
# Add custom menu items (appended to base menu)
# Don't include * prefix or help/exit - auto-injected
menu: []
# Example:
# menu:
# - trigger: my-workflow
# workflow: "{project-root}/custom/my.yaml"
# description: My custom workflow
# Add custom prompts (for action="#id" handlers)
prompts: []
# Example:
# prompts:
# - id: my-prompt
# content: |
# Prompt instructions here

View File

@ -1,83 +0,0 @@
type,name,module,path,hash
"csv","agent-manifest","_cfg","bmad/_cfg/agent-manifest.csv","76268b36f010138e38c337906be6a45bff5de65b351d10c0b2f4882d04438f59"
"csv","task-manifest","_cfg","bmad/_cfg/task-manifest.csv","e54b65cef79b3400d0a5da47d6d5783bdd146af1e1e1ee7acce5e3910c3fb006"
"csv","workflow-manifest","_cfg","bmad/_cfg/workflow-manifest.csv","a153a94d54f781a0f64845a4b5bc6887c37a0e85dedb36fbaec42b75794ee4ab"
"yaml","manifest","_cfg","bmad/_cfg/manifest.yaml","e595f90751dd5e26acbc0b26b85c66990d4d135007e7d98386c539877588a890"
"js","installer","bmb","bmad/bmb/workflows/create-module/installer-templates/installer.js","309ecdf2cebbb213a9139e5b7780d0d42bd60f665c497691773f84202e6667a7"
"md","agent-architecture","bmb","bmad/bmb/workflows/create-agent/agent-architecture.md","e486fc0b22bfe2c85b08fac0fc0aacdb43dd41498727bf39de30e570abe716b9"
"md","agent-command-patterns","bmb","bmad/bmb/workflows/create-agent/agent-command-patterns.md","8c5972a5aad50f7f6e39ed14edca9c609a7da8be21edf6f872f5ce8481e11738"
"md","agent-types","bmb","bmad/bmb/workflows/create-agent/agent-types.md","a9429475767b6db4bb74fb27e328a8fdb3e8e7176edb2920ae3e0106d85e9d83"
"md","bmad-builder","bmb","bmad/bmb/agents/bmad-builder.md","7a020a7cb2231d96588ee68080317b6e41fb11621c6059495ed25d3c689511fb"
"md","brainstorm-context","bmb","bmad/bmb/workflows/create-agent/brainstorm-context.md","85be72976c4ff5d79b2bce8e6b433f5e3526a7466a72b3efdb4f6d3d118e1d15"
"md","brainstorm-context","bmb","bmad/bmb/workflows/create-module/brainstorm-context.md","62b902177d2cb56df2d6a12e5ec5c7d75ec94770ce22ac72c96691a876ed2e6a"
"md","brainstorm-context","bmb","bmad/bmb/workflows/create-workflow/brainstorm-context.md","f246ec343e338068b37fee8c93aa6d2fe1d4857addba6db3fe6ad80a2a2950e8"
"md","checklist","bmb","bmad/bmb/workflows/audit-workflow/checklist.md","3a9cf6f7d38152d6e5e49179fec8b6056e97db0f34185ea5c466165cb931cd55"
"md","checklist","bmb","bmad/bmb/workflows/convert-legacy/checklist.md","3f4faaacd224022af5ddf4ae0949d472f9eca3afa0d4ad0c24f19f93caaa9bf9"
"md","checklist","bmb","bmad/bmb/workflows/create-agent/checklist.md","837667f2bd601833568b327b961ba0dd363ba9a0d240625eebc9d1a9685ecbd8"
"md","checklist","bmb","bmad/bmb/workflows/create-module/checklist.md","72b9440ba720d96fa1cab50d1242495a5b7c540e7ab93a5a055c46c36d142ce1"
"md","checklist","bmb","bmad/bmb/workflows/create-workflow/checklist.md","78325ed31532c0059a3f647f7f4cda7702919a9ef43634afa419d3fa30ee2a0c"
"md","checklist","bmb","bmad/bmb/workflows/create-workflow/workflow-template/checklist.md","a950c68c71cd54b5a3ef4c8d68ad8ec40d5d1fa057f7c95e697e975807ae600b"
"md","checklist","bmb","bmad/bmb/workflows/edit-agent/checklist.md","e9878537ef45be158ca222d21311247a9bf0502cdabcb14dd827871d6488cf0e"
"md","checklist","bmb","bmad/bmb/workflows/edit-module/checklist.md","c0f599a80efb36ee184bcc5c94c903bbac31f335830a493ec9b8f47157ae5568"
"md","checklist","bmb","bmad/bmb/workflows/edit-workflow/checklist.md","9677c087ddfb40765e611de23a5a009afe51c347683dfe5f7d9fd33712ac4795"
"md","checklist","bmb","bmad/bmb/workflows/module-brief/checklist.md","821c90da14f02b967cb468b19f59a26c0d8f044d7a81a8b97631fb8ffac7648f"
"md","checklist","bmb","bmad/bmb/workflows/redoc/checklist.md","2117d60b14e19158f4b586878b3667d715d3b62f79815b72b55c2376ce31aae8"
"md","communication-styles","bmb","bmad/bmb/workflows/create-agent/communication-styles.md","96249cca9bee8f10b376e131729c633ea08328c44eaa6889343d2cf66127043e"
"md","instructions","bmb","bmad/bmb/workflows/audit-workflow/instructions.md","a31c169af274fbf8c72a60459a5855d9c5dfffcf51d2ec39370d54670471d32c"
"md","instructions","bmb","bmad/bmb/workflows/convert-legacy/instructions.md","809699256918c9a0152f195c7c7bec8ce05aa8cb7a975a732eb69b8f79cc85a7"
"md","instructions","bmb","bmad/bmb/workflows/create-agent/instructions.md","988265c15c5c099a8bc7f9538e6b6d6d01c38d0b0362f1c2cb0d7e6974b6d505"
"md","instructions","bmb","bmad/bmb/workflows/create-module/instructions.md","010cb47095811cf4968d98712749cb1fee5021a52621d0aa0f35ef3758ed2304"
"md","instructions","bmb","bmad/bmb/workflows/create-workflow/instructions.md","fd6282ae5d6c6192cc92fd7146c579cdb00c7a5710b6e3f8b91e4118cbde9e13"
"md","instructions","bmb","bmad/bmb/workflows/create-workflow/workflow-template/instructions.md","daf3d312e5a60d7c4cbc308014e3c69eeeddd70bd41bd139d328318da1e3ecb2"
"md","instructions","bmb","bmad/bmb/workflows/edit-agent/instructions.md","0bc81290f33d1101b23ca29cb9f6537e7743113857c113c5bb5a36318d055be8"
"md","instructions","bmb","bmad/bmb/workflows/edit-module/instructions.md","e5e68479df9e521d157acc1bbf370dbf3f70f1ba8b067b1cec3c53fbf20f02ce"
"md","instructions","bmb","bmad/bmb/workflows/edit-workflow/instructions.md","a00ff928cf0425b3a88d3ee592e7e09994529b777caf476364cf69a3c5aee866"
"md","instructions","bmb","bmad/bmb/workflows/module-brief/instructions.md","e2275373850ea0745f396ad0c3aa192f06081b52d98777650f6b645333b62926"
"md","instructions","bmb","bmad/bmb/workflows/redoc/instructions.md","21dd93b64455f8dd475b508ae9f1076d7e179e99fb6f197476071706b78e3592"
"md","module-structure","bmb","bmad/bmb/workflows/create-module/module-structure.md","3bdf1d55eec2fccc2c9f44a08f4e0dc489ce47396ff39fa59a82836a911faa54"
"md","README","bmb","bmad/bmb/README.md","af2cdbeede53eff1ecf95c1e6d7ee1535366ba09b352657fa05576792a2bafb4"
"md","README","bmb","bmad/bmb/workflows/convert-legacy/README.md","3391972c16b7234dae61b2d06daeb6310d1760117ece57abcca0c178c4c33eea"
"md","README","bmb","bmad/bmb/workflows/create-agent/README.md","cc1d51e22c425e005ddbe285510ff5a6fc6cf1e40d0ffe5ff421c1efbcbe94c0"
"md","README","bmb","bmad/bmb/workflows/create-module/README.md","416a322591c4c9bca2008fe7cca04eb389ecab50fbb2e0f8ddb5e4bc7bc53f57"
"md","README","bmb","bmad/bmb/workflows/create-workflow/README.md","2886da179a92dbde5188465470aaffdc3f3b4327a4c63eea13bb20d67292dbe9"
"md","README","bmb","bmad/bmb/workflows/edit-agent/README.md","fadee8e28804d5b6d6668689ee83e024035d2be2840fd6c359e0e095f0e4dcf9"
"md","README","bmb","bmad/bmb/workflows/edit-module/README.md","807df3d74f673399042331e4c5034466d8f146c4b2cdb39fe63ccde6f4509843"
"md","README","bmb","bmad/bmb/workflows/edit-workflow/README.md","2db00015c03a3ed7df4ff609ac27a179885145e4c8190862eea70d8b894ee9be"
"md","README","bmb","bmad/bmb/workflows/module-brief/README.md","05772db9095db7b4944e9fc47a049a3609c506be697537fd5fd9e409c10b92f4"
"md","README","bmb","bmad/bmb/workflows/redoc/README.md","a1b7e02427cf252bca69a8a1ee0f554844a6a01b5d568d74f494c71542056173"
"md","template","bmb","bmad/bmb/workflows/audit-workflow/template.md","98e65880cac3ffb123e513abd48710e57e461418dd79a07d6b712505ed3ddb0e"
"md","template","bmb","bmad/bmb/workflows/create-workflow/workflow-template/template.md","c98f65a122035b456f1cbb2df6ecaf06aa442746d93a29d1d0ed2fc9274a43ee"
"md","template","bmb","bmad/bmb/workflows/module-brief/template.md","7d1ad5ec40b06510fcbb0a3da8ea32aefa493e5b04c3a2bba90ce5685b894275"
"md","workflow-creation-guide","bmb","bmad/bmb/workflows/create-workflow/workflow-creation-guide.md","6e4bef8f19260f40714c3404bd402b2244933c821610506edb7a4f789cffdbbe"
"yaml","bmad-builder.agent","bmb","bmad/bmb/agents/bmad-builder.agent.yaml",""
"yaml","config","bmb","bmad/bmb/config.yaml","9a9b8068ddf5492ad3a0c95dc32609eef016f1016ec68bf8768df8188458586a"
"yaml","install-config","bmb","bmad/bmb/workflows/create-module/installer-templates/install-config.yaml","f20caf43009df9955b5fa0fa333851bf8b860568c05707d60ed295179c8abfde"
"yaml","workflow","bmb","bmad/bmb/workflows/audit-workflow/workflow.yaml","24a82e15c41995c938c7f338254e5f414cfa8b9b679f3325e8d18435c992ab1c"
"yaml","workflow","bmb","bmad/bmb/workflows/convert-legacy/workflow.yaml","17515280570a6a7cc6254b1753d6d7f4a012af5cb29b2f55d2ce59652fd3cff8"
"yaml","workflow","bmb","bmad/bmb/workflows/create-agent/workflow.yaml","4b5c577c470c34d7e85a8881881e7e42a42758dc3fc12ece896752dfbd324eef"
"yaml","workflow","bmb","bmad/bmb/workflows/create-module/workflow.yaml","da632eac14f6323bb6e4d6821dcc4d266db9ffd52bb43ba7cb2e60ec0c9ae4c6"
"yaml","workflow","bmb","bmad/bmb/workflows/create-workflow/workflow-template/workflow.yaml","2eeb8d1724779956f8e89fda8fa850c3fb1d2b8c6eefecd1b5a4d5f9f58adb91"
"yaml","workflow","bmb","bmad/bmb/workflows/create-workflow/workflow.yaml","79bce9abed20f239a6d0f97a3577c6b76c05b79696b38183569f1204b1140adb"
"yaml","workflow","bmb","bmad/bmb/workflows/edit-agent/workflow.yaml","ab77c603f7bbdf8a8f38ce7e82f6cae40ad9ebcbdf0b590c18f5dece1e8685cd"
"yaml","workflow","bmb","bmad/bmb/workflows/edit-module/workflow.yaml","ee4cd0a932381b67866bd049a8b2ed5b8fde57d48dd488f2317deb649f88cd53"
"yaml","workflow","bmb","bmad/bmb/workflows/edit-workflow/workflow.yaml","9d8e33a8312a5e7cd10de014fb9251c7805be5fa23c7b4b813445b0daafc223c"
"yaml","workflow","bmb","bmad/bmb/workflows/module-brief/workflow.yaml","5e96bb7f5bf32817513225b1572f7bd93dbc724b166aa3af977818a6ba7bcaf0"
"yaml","workflow","bmb","bmad/bmb/workflows/redoc/workflow.yaml","0bef37556f6478ed886845c9811ecc97f41a240d3acd6c2e97ea1e2914f3abf7"
"yaml","config","bmd","bmad/bmd/config.yaml","d6760db93cfffe4c383b922ce0832f7ebb630371e81a34dd6a006c5d7fc0fd46"
"csv","adv-elicit-methods","core","bmad/core/tasks/adv-elicit-methods.csv","b4e925870f902862899f12934e617c3b4fe002d1b652c99922b30fa93482533b"
"csv","brain-methods","core","bmad/core/workflows/brainstorming/brain-methods.csv","ecffe2f0ba263aac872b2d2c95a3f7b1556da2a980aa0edd3764ffb2f11889f3"
"md","bmad-master","core","bmad/core/agents/bmad-master.md","da52edd5ab4fd9a189c3e27cc8d114eeefe0068ff85febdca455013b8c85da1a"
"md","instructions","core","bmad/core/workflows/brainstorming/instructions.md","20c57ede11289def7927b6ef7bb69bd7a3deb9468dc08e93ee057f98a906e7f0"
"md","instructions","core","bmad/core/workflows/party-mode/instructions.md","28e48c7a05e1f17ad64c0cc701a2ba60e385cd4704c726a14d4b886d885306ab"
"md","README","core","bmad/core/workflows/brainstorming/README.md","ca469d9fbb2b9156491d160e11e2517fdf85ea2c29f41f92b22d4027fe7d9d2a"
"md","template","core","bmad/core/workflows/brainstorming/template.md","b5c760f4cea2b56c75ef76d17a87177b988ac846657f4b9819ec125d125b7386"
"xml","adv-elicit","core","bmad/core/tasks/adv-elicit.xml","94f004a336e434cd231de35eb864435ac51cd5888e9befe66e326eb16497121e"
"xml","bmad-web-orchestrator.agent","core","bmad/core/agents/bmad-web-orchestrator.agent.xml","91a5c1b660befa7365f427640b4fa3dbb18f5e48cd135560303dae0939dccf12"
"xml","index-docs","core","bmad/core/tasks/index-docs.xml","38226219c7dbde1c1dabcd87214383a6bfb2d0a7e79e09a9c79dd6be851b7e64"
"xml","shard-doc","core","bmad/core/tools/shard-doc.xml","7de178b7269fbe8e65774622518db871f7d00cfac1bb5693cba8c1ca3ca8cdff"
"xml","validate-workflow","core","bmad/core/tasks/validate-workflow.xml","1e8c569d8d53e618642aa1472721655cb917901a5888a7b403a98df4db2f26bf"
"xml","workflow","core","bmad/core/tasks/workflow.xml","0b2b7bd184e099869174cc8d9125fce08bcd3fd64fad50ff835a42eccf6620e2"
"yaml","bmad-master.agent","core","bmad/core/agents/bmad-master.agent.yaml",""
"yaml","config","core","bmad/core/config.yaml","e77c9a131b8139437c946a41febfc33fafac35016778a2e771845f9bece36e5e"
"yaml","workflow","core","bmad/core/workflows/brainstorming/workflow.yaml","74038fa3892c4e873cc79ec806ecb2586fc5b4cf396c60ae964a6a71a9ad4a3d"
"yaml","workflow","core","bmad/core/workflows/party-mode/workflow.yaml","e49aca36f6eb25dea0f253120bef8ee7637fe4b1c608198cb5ce74d6a109ae4f"
1 type name module path hash
2 csv agent-manifest _cfg bmad/_cfg/agent-manifest.csv 76268b36f010138e38c337906be6a45bff5de65b351d10c0b2f4882d04438f59
3 csv task-manifest _cfg bmad/_cfg/task-manifest.csv e54b65cef79b3400d0a5da47d6d5783bdd146af1e1e1ee7acce5e3910c3fb006
4 csv workflow-manifest _cfg bmad/_cfg/workflow-manifest.csv a153a94d54f781a0f64845a4b5bc6887c37a0e85dedb36fbaec42b75794ee4ab
5 yaml manifest _cfg bmad/_cfg/manifest.yaml e595f90751dd5e26acbc0b26b85c66990d4d135007e7d98386c539877588a890
6 js installer bmb bmad/bmb/workflows/create-module/installer-templates/installer.js 309ecdf2cebbb213a9139e5b7780d0d42bd60f665c497691773f84202e6667a7
7 md agent-architecture bmb bmad/bmb/workflows/create-agent/agent-architecture.md e486fc0b22bfe2c85b08fac0fc0aacdb43dd41498727bf39de30e570abe716b9
8 md agent-command-patterns bmb bmad/bmb/workflows/create-agent/agent-command-patterns.md 8c5972a5aad50f7f6e39ed14edca9c609a7da8be21edf6f872f5ce8481e11738
9 md agent-types bmb bmad/bmb/workflows/create-agent/agent-types.md a9429475767b6db4bb74fb27e328a8fdb3e8e7176edb2920ae3e0106d85e9d83
10 md bmad-builder bmb bmad/bmb/agents/bmad-builder.md 7a020a7cb2231d96588ee68080317b6e41fb11621c6059495ed25d3c689511fb
11 md brainstorm-context bmb bmad/bmb/workflows/create-agent/brainstorm-context.md 85be72976c4ff5d79b2bce8e6b433f5e3526a7466a72b3efdb4f6d3d118e1d15
12 md brainstorm-context bmb bmad/bmb/workflows/create-module/brainstorm-context.md 62b902177d2cb56df2d6a12e5ec5c7d75ec94770ce22ac72c96691a876ed2e6a
13 md brainstorm-context bmb bmad/bmb/workflows/create-workflow/brainstorm-context.md f246ec343e338068b37fee8c93aa6d2fe1d4857addba6db3fe6ad80a2a2950e8
14 md checklist bmb bmad/bmb/workflows/audit-workflow/checklist.md 3a9cf6f7d38152d6e5e49179fec8b6056e97db0f34185ea5c466165cb931cd55
15 md checklist bmb bmad/bmb/workflows/convert-legacy/checklist.md 3f4faaacd224022af5ddf4ae0949d472f9eca3afa0d4ad0c24f19f93caaa9bf9
16 md checklist bmb bmad/bmb/workflows/create-agent/checklist.md 837667f2bd601833568b327b961ba0dd363ba9a0d240625eebc9d1a9685ecbd8
17 md checklist bmb bmad/bmb/workflows/create-module/checklist.md 72b9440ba720d96fa1cab50d1242495a5b7c540e7ab93a5a055c46c36d142ce1
18 md checklist bmb bmad/bmb/workflows/create-workflow/checklist.md 78325ed31532c0059a3f647f7f4cda7702919a9ef43634afa419d3fa30ee2a0c
19 md checklist bmb bmad/bmb/workflows/create-workflow/workflow-template/checklist.md a950c68c71cd54b5a3ef4c8d68ad8ec40d5d1fa057f7c95e697e975807ae600b
20 md checklist bmb bmad/bmb/workflows/edit-agent/checklist.md e9878537ef45be158ca222d21311247a9bf0502cdabcb14dd827871d6488cf0e
21 md checklist bmb bmad/bmb/workflows/edit-module/checklist.md c0f599a80efb36ee184bcc5c94c903bbac31f335830a493ec9b8f47157ae5568
22 md checklist bmb bmad/bmb/workflows/edit-workflow/checklist.md 9677c087ddfb40765e611de23a5a009afe51c347683dfe5f7d9fd33712ac4795
23 md checklist bmb bmad/bmb/workflows/module-brief/checklist.md 821c90da14f02b967cb468b19f59a26c0d8f044d7a81a8b97631fb8ffac7648f
24 md checklist bmb bmad/bmb/workflows/redoc/checklist.md 2117d60b14e19158f4b586878b3667d715d3b62f79815b72b55c2376ce31aae8
25 md communication-styles bmb bmad/bmb/workflows/create-agent/communication-styles.md 96249cca9bee8f10b376e131729c633ea08328c44eaa6889343d2cf66127043e
26 md instructions bmb bmad/bmb/workflows/audit-workflow/instructions.md a31c169af274fbf8c72a60459a5855d9c5dfffcf51d2ec39370d54670471d32c
27 md instructions bmb bmad/bmb/workflows/convert-legacy/instructions.md 809699256918c9a0152f195c7c7bec8ce05aa8cb7a975a732eb69b8f79cc85a7
28 md instructions bmb bmad/bmb/workflows/create-agent/instructions.md 988265c15c5c099a8bc7f9538e6b6d6d01c38d0b0362f1c2cb0d7e6974b6d505
29 md instructions bmb bmad/bmb/workflows/create-module/instructions.md 010cb47095811cf4968d98712749cb1fee5021a52621d0aa0f35ef3758ed2304
30 md instructions bmb bmad/bmb/workflows/create-workflow/instructions.md fd6282ae5d6c6192cc92fd7146c579cdb00c7a5710b6e3f8b91e4118cbde9e13
31 md instructions bmb bmad/bmb/workflows/create-workflow/workflow-template/instructions.md daf3d312e5a60d7c4cbc308014e3c69eeeddd70bd41bd139d328318da1e3ecb2
32 md instructions bmb bmad/bmb/workflows/edit-agent/instructions.md 0bc81290f33d1101b23ca29cb9f6537e7743113857c113c5bb5a36318d055be8
33 md instructions bmb bmad/bmb/workflows/edit-module/instructions.md e5e68479df9e521d157acc1bbf370dbf3f70f1ba8b067b1cec3c53fbf20f02ce
34 md instructions bmb bmad/bmb/workflows/edit-workflow/instructions.md a00ff928cf0425b3a88d3ee592e7e09994529b777caf476364cf69a3c5aee866
35 md instructions bmb bmad/bmb/workflows/module-brief/instructions.md e2275373850ea0745f396ad0c3aa192f06081b52d98777650f6b645333b62926
36 md instructions bmb bmad/bmb/workflows/redoc/instructions.md 21dd93b64455f8dd475b508ae9f1076d7e179e99fb6f197476071706b78e3592
37 md module-structure bmb bmad/bmb/workflows/create-module/module-structure.md 3bdf1d55eec2fccc2c9f44a08f4e0dc489ce47396ff39fa59a82836a911faa54
38 md README bmb bmad/bmb/README.md af2cdbeede53eff1ecf95c1e6d7ee1535366ba09b352657fa05576792a2bafb4
39 md README bmb bmad/bmb/workflows/convert-legacy/README.md 3391972c16b7234dae61b2d06daeb6310d1760117ece57abcca0c178c4c33eea
40 md README bmb bmad/bmb/workflows/create-agent/README.md cc1d51e22c425e005ddbe285510ff5a6fc6cf1e40d0ffe5ff421c1efbcbe94c0
41 md README bmb bmad/bmb/workflows/create-module/README.md 416a322591c4c9bca2008fe7cca04eb389ecab50fbb2e0f8ddb5e4bc7bc53f57
42 md README bmb bmad/bmb/workflows/create-workflow/README.md 2886da179a92dbde5188465470aaffdc3f3b4327a4c63eea13bb20d67292dbe9
43 md README bmb bmad/bmb/workflows/edit-agent/README.md fadee8e28804d5b6d6668689ee83e024035d2be2840fd6c359e0e095f0e4dcf9
44 md README bmb bmad/bmb/workflows/edit-module/README.md 807df3d74f673399042331e4c5034466d8f146c4b2cdb39fe63ccde6f4509843
45 md README bmb bmad/bmb/workflows/edit-workflow/README.md 2db00015c03a3ed7df4ff609ac27a179885145e4c8190862eea70d8b894ee9be
46 md README bmb bmad/bmb/workflows/module-brief/README.md 05772db9095db7b4944e9fc47a049a3609c506be697537fd5fd9e409c10b92f4
47 md README bmb bmad/bmb/workflows/redoc/README.md a1b7e02427cf252bca69a8a1ee0f554844a6a01b5d568d74f494c71542056173
48 md template bmb bmad/bmb/workflows/audit-workflow/template.md 98e65880cac3ffb123e513abd48710e57e461418dd79a07d6b712505ed3ddb0e
49 md template bmb bmad/bmb/workflows/create-workflow/workflow-template/template.md c98f65a122035b456f1cbb2df6ecaf06aa442746d93a29d1d0ed2fc9274a43ee
50 md template bmb bmad/bmb/workflows/module-brief/template.md 7d1ad5ec40b06510fcbb0a3da8ea32aefa493e5b04c3a2bba90ce5685b894275
51 md workflow-creation-guide bmb bmad/bmb/workflows/create-workflow/workflow-creation-guide.md 6e4bef8f19260f40714c3404bd402b2244933c821610506edb7a4f789cffdbbe
52 yaml bmad-builder.agent bmb bmad/bmb/agents/bmad-builder.agent.yaml
53 yaml config bmb bmad/bmb/config.yaml 9a9b8068ddf5492ad3a0c95dc32609eef016f1016ec68bf8768df8188458586a
54 yaml install-config bmb bmad/bmb/workflows/create-module/installer-templates/install-config.yaml f20caf43009df9955b5fa0fa333851bf8b860568c05707d60ed295179c8abfde
55 yaml workflow bmb bmad/bmb/workflows/audit-workflow/workflow.yaml 24a82e15c41995c938c7f338254e5f414cfa8b9b679f3325e8d18435c992ab1c
56 yaml workflow bmb bmad/bmb/workflows/convert-legacy/workflow.yaml 17515280570a6a7cc6254b1753d6d7f4a012af5cb29b2f55d2ce59652fd3cff8
57 yaml workflow bmb bmad/bmb/workflows/create-agent/workflow.yaml 4b5c577c470c34d7e85a8881881e7e42a42758dc3fc12ece896752dfbd324eef
58 yaml workflow bmb bmad/bmb/workflows/create-module/workflow.yaml da632eac14f6323bb6e4d6821dcc4d266db9ffd52bb43ba7cb2e60ec0c9ae4c6
59 yaml workflow bmb bmad/bmb/workflows/create-workflow/workflow-template/workflow.yaml 2eeb8d1724779956f8e89fda8fa850c3fb1d2b8c6eefecd1b5a4d5f9f58adb91
60 yaml workflow bmb bmad/bmb/workflows/create-workflow/workflow.yaml 79bce9abed20f239a6d0f97a3577c6b76c05b79696b38183569f1204b1140adb
61 yaml workflow bmb bmad/bmb/workflows/edit-agent/workflow.yaml ab77c603f7bbdf8a8f38ce7e82f6cae40ad9ebcbdf0b590c18f5dece1e8685cd
62 yaml workflow bmb bmad/bmb/workflows/edit-module/workflow.yaml ee4cd0a932381b67866bd049a8b2ed5b8fde57d48dd488f2317deb649f88cd53
63 yaml workflow bmb bmad/bmb/workflows/edit-workflow/workflow.yaml 9d8e33a8312a5e7cd10de014fb9251c7805be5fa23c7b4b813445b0daafc223c
64 yaml workflow bmb bmad/bmb/workflows/module-brief/workflow.yaml 5e96bb7f5bf32817513225b1572f7bd93dbc724b166aa3af977818a6ba7bcaf0
65 yaml workflow bmb bmad/bmb/workflows/redoc/workflow.yaml 0bef37556f6478ed886845c9811ecc97f41a240d3acd6c2e97ea1e2914f3abf7
66 yaml config bmd bmad/bmd/config.yaml d6760db93cfffe4c383b922ce0832f7ebb630371e81a34dd6a006c5d7fc0fd46
67 csv adv-elicit-methods core bmad/core/tasks/adv-elicit-methods.csv b4e925870f902862899f12934e617c3b4fe002d1b652c99922b30fa93482533b
68 csv brain-methods core bmad/core/workflows/brainstorming/brain-methods.csv ecffe2f0ba263aac872b2d2c95a3f7b1556da2a980aa0edd3764ffb2f11889f3
69 md bmad-master core bmad/core/agents/bmad-master.md da52edd5ab4fd9a189c3e27cc8d114eeefe0068ff85febdca455013b8c85da1a
70 md instructions core bmad/core/workflows/brainstorming/instructions.md 20c57ede11289def7927b6ef7bb69bd7a3deb9468dc08e93ee057f98a906e7f0
71 md instructions core bmad/core/workflows/party-mode/instructions.md 28e48c7a05e1f17ad64c0cc701a2ba60e385cd4704c726a14d4b886d885306ab
72 md README core bmad/core/workflows/brainstorming/README.md ca469d9fbb2b9156491d160e11e2517fdf85ea2c29f41f92b22d4027fe7d9d2a
73 md template core bmad/core/workflows/brainstorming/template.md b5c760f4cea2b56c75ef76d17a87177b988ac846657f4b9819ec125d125b7386
74 xml adv-elicit core bmad/core/tasks/adv-elicit.xml 94f004a336e434cd231de35eb864435ac51cd5888e9befe66e326eb16497121e
75 xml bmad-web-orchestrator.agent core bmad/core/agents/bmad-web-orchestrator.agent.xml 91a5c1b660befa7365f427640b4fa3dbb18f5e48cd135560303dae0939dccf12
76 xml index-docs core bmad/core/tasks/index-docs.xml 38226219c7dbde1c1dabcd87214383a6bfb2d0a7e79e09a9c79dd6be851b7e64
77 xml shard-doc core bmad/core/tools/shard-doc.xml 7de178b7269fbe8e65774622518db871f7d00cfac1bb5693cba8c1ca3ca8cdff
78 xml validate-workflow core bmad/core/tasks/validate-workflow.xml 1e8c569d8d53e618642aa1472721655cb917901a5888a7b403a98df4db2f26bf
79 xml workflow core bmad/core/tasks/workflow.xml 0b2b7bd184e099869174cc8d9125fce08bcd3fd64fad50ff835a42eccf6620e2
80 yaml bmad-master.agent core bmad/core/agents/bmad-master.agent.yaml
81 yaml config core bmad/core/config.yaml e77c9a131b8139437c946a41febfc33fafac35016778a2e771845f9bece36e5e
82 yaml workflow core bmad/core/workflows/brainstorming/workflow.yaml 74038fa3892c4e873cc79ec806ecb2586fc5b4cf396c60ae964a6a71a9ad4a3d
83 yaml workflow core bmad/core/workflows/party-mode/workflow.yaml e49aca36f6eb25dea0f253120bef8ee7637fe4b1c608198cb5ce74d6a109ae4f

View File

@ -1,12 +0,0 @@
installation:
version: 6.0.0-alpha.0
installDate: "2025-10-28T17:08:48.104Z"
lastUpdated: "2025-10-28T17:08:48.104Z"
modules:
- core
- bmb
- core
- bmd
ides:
- claude-code
- codex

View File

@ -1,5 +0,0 @@
name,displayName,description,module,path,standalone
"adv-elicit","Advanced Elicitation","When called from workflow","core","bmad/core/tasks/adv-elicit.xml","false"
"index-docs","Index Docs","Generates or updates an index.md of all documents in the specified directory","core","bmad/core/tasks/index-docs.xml","true"
"validate-workflow","Validate Workflow Output","Run a checklist against a document with thorough analysis and produce a validation report","core","bmad/core/tasks/validate-workflow.xml","false"
"workflow","Execute Workflow","Execute given workflow by loading its configuration, following instructions, and producing output","core","bmad/core/tasks/workflow.xml","false"
1 name displayName description module path standalone
2 adv-elicit Advanced Elicitation When called from workflow core bmad/core/tasks/adv-elicit.xml false
3 index-docs Index Docs Generates or updates an index.md of all documents in the specified directory core bmad/core/tasks/index-docs.xml true
4 validate-workflow Validate Workflow Output Run a checklist against a document with thorough analysis and produce a validation report core bmad/core/tasks/validate-workflow.xml false
5 workflow Execute Workflow Execute given workflow by loading its configuration, following instructions, and producing output core bmad/core/tasks/workflow.xml false

View File

@ -1,2 +0,0 @@
name,displayName,description,module,path,standalone
"shard-doc","Shard Document","Splits large markdown documents into smaller, organized files based on level 2 (default) sections","core","bmad/core/tools/shard-doc.xml","true"
1 name displayName description module path standalone
2 shard-doc Shard Document Splits large markdown documents into smaller, organized files based on level 2 (default) sections core bmad/core/tools/shard-doc.xml true

View File

@ -1,15 +0,0 @@
name,description,module,path,standalone
"brainstorming","Facilitate interactive brainstorming sessions using diverse creative techniques. This workflow facilitates interactive brainstorming sessions using diverse creative techniques. The session is highly interactive, with the AI acting as a facilitator to guide the user through various ideation methods to generate and refine creative solutions.","core","bmad/core/workflows/brainstorming/workflow.yaml","true"
"party-mode","Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations","core","bmad/core/workflows/party-mode/workflow.yaml","true"
"audit-workflow","Comprehensive workflow quality audit - validates structure, config standards, variable usage, bloat detection, and web_bundle completeness. Performs deep analysis of workflow.yaml, instructions.md, template.md, and web_bundle configuration against BMAD v6 standards.","bmb","bmad/bmb/workflows/audit-workflow/workflow.yaml","true"
"convert-legacy","Converts legacy BMAD v4 or similar items (agents, workflows, modules) to BMad Core compliant format with proper structure and conventions","bmb","bmad/bmb/workflows/convert-legacy/workflow.yaml","true"
"create-agent","Interactive workflow to build BMAD Core compliant agents (YAML source compiled to .md during install) with optional brainstorming, persona development, and command structure","bmb","bmad/bmb/workflows/create-agent/workflow.yaml","true"
"create-module","Interactive workflow to build complete BMAD modules with agents, workflows, tasks, and installation infrastructure","bmb","bmad/bmb/workflows/create-module/workflow.yaml","true"
"create-workflow","Interactive workflow builder that guides creation of new BMAD workflows with proper structure and validation for optimal human-AI collaboration. Includes optional brainstorming phase for workflow ideas and design.","bmb","bmad/bmb/workflows/create-workflow/workflow.yaml","true"
"edit-agent","Edit existing BMAD agents while following all best practices and conventions","bmb","bmad/bmb/workflows/edit-agent/workflow.yaml","true"
"edit-module","Edit existing BMAD modules (structure, agents, workflows, documentation) while following all best practices","bmb","bmad/bmb/workflows/edit-module/workflow.yaml","true"
"edit-workflow","Edit existing BMAD workflows while following all best practices and conventions","bmb","bmad/bmb/workflows/edit-workflow/workflow.yaml","true"
"module-brief","Create a comprehensive Module Brief that serves as the blueprint for building new BMAD modules using strategic analysis and creative vision","bmb","bmad/bmb/workflows/module-brief/workflow.yaml","true"
"redoc","Autonomous documentation system that maintains module, workflow, and agent documentation using a reverse-tree approach (leaf folders first, then parents). Understands BMAD conventions and produces technical writer quality output.","bmb","bmad/bmb/workflows/redoc/workflow.yaml","true"
"brainstorming","Facilitate interactive brainstorming sessions using diverse creative techniques. This workflow facilitates interactive brainstorming sessions using diverse creative techniques. The session is highly interactive, with the AI acting as a facilitator to guide the user through various ideation methods to generate and refine creative solutions.","core","bmad/core/workflows/brainstorming/workflow.yaml","false"
"party-mode","Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations","core","bmad/core/workflows/party-mode/workflow.yaml","false"
1 name description module path standalone
2 brainstorming Facilitate interactive brainstorming sessions using diverse creative techniques. This workflow facilitates interactive brainstorming sessions using diverse creative techniques. The session is highly interactive, with the AI acting as a facilitator to guide the user through various ideation methods to generate and refine creative solutions. core bmad/core/workflows/brainstorming/workflow.yaml true
3 party-mode Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations core bmad/core/workflows/party-mode/workflow.yaml true
4 audit-workflow Comprehensive workflow quality audit - validates structure, config standards, variable usage, bloat detection, and web_bundle completeness. Performs deep analysis of workflow.yaml, instructions.md, template.md, and web_bundle configuration against BMAD v6 standards. bmb bmad/bmb/workflows/audit-workflow/workflow.yaml true
5 convert-legacy Converts legacy BMAD v4 or similar items (agents, workflows, modules) to BMad Core compliant format with proper structure and conventions bmb bmad/bmb/workflows/convert-legacy/workflow.yaml true
6 create-agent Interactive workflow to build BMAD Core compliant agents (YAML source compiled to .md during install) with optional brainstorming, persona development, and command structure bmb bmad/bmb/workflows/create-agent/workflow.yaml true
7 create-module Interactive workflow to build complete BMAD modules with agents, workflows, tasks, and installation infrastructure bmb bmad/bmb/workflows/create-module/workflow.yaml true
8 create-workflow Interactive workflow builder that guides creation of new BMAD workflows with proper structure and validation for optimal human-AI collaboration. Includes optional brainstorming phase for workflow ideas and design. bmb bmad/bmb/workflows/create-workflow/workflow.yaml true
9 edit-agent Edit existing BMAD agents while following all best practices and conventions bmb bmad/bmb/workflows/edit-agent/workflow.yaml true
10 edit-module Edit existing BMAD modules (structure, agents, workflows, documentation) while following all best practices bmb bmad/bmb/workflows/edit-module/workflow.yaml true
11 edit-workflow Edit existing BMAD workflows while following all best practices and conventions bmb bmad/bmb/workflows/edit-workflow/workflow.yaml true
12 module-brief Create a comprehensive Module Brief that serves as the blueprint for building new BMAD modules using strategic analysis and creative vision bmb bmad/bmb/workflows/module-brief/workflow.yaml true
13 redoc Autonomous documentation system that maintains module, workflow, and agent documentation using a reverse-tree approach (leaf folders first, then parents). Understands BMAD conventions and produces technical writer quality output. bmb bmad/bmb/workflows/redoc/workflow.yaml true
14 brainstorming Facilitate interactive brainstorming sessions using diverse creative techniques. This workflow facilitates interactive brainstorming sessions using diverse creative techniques. The session is highly interactive, with the AI acting as a facilitator to guide the user through various ideation methods to generate and refine creative solutions. core bmad/core/workflows/brainstorming/workflow.yaml false
15 party-mode Orchestrates group discussions between all installed BMAD agents, enabling natural multi-agent conversations core bmad/core/workflows/party-mode/workflow.yaml false

View File

@ -1,132 +0,0 @@
# BMB - BMad Builder Module
The BMB (BMad Builder Module) provides specialized tools and workflows for creating, customizing, and extending BMad Method components, including custom agents, workflows, and integrations.
## Module Structure
### 🤖 `/agents`
Builder-specific agents that help create and customize BMad Method components:
- Agent creation and configuration specialists
- Workflow designers
- Integration builders
### 📋 `/workflows`
Specialized workflows for building and extending BMad Method capabilities:
#### Core Builder Workflows
- `create-agent` - Design and implement custom agents
- `create-workflow` - Build new workflow definitions
- `create-team` - Configure agent teams
- `bundle-agent` - Package agents for distribution
- `create-method` - Design custom development methodologies
#### Integration Workflows
- `integrate-tool` - Connect external tools and services
- `create-adapter` - Build API adapters
- `setup-environment` - Configure development environments
## Key Features
### Agent Builder
Create custom agents with:
- Role-specific instructions
- Tool configurations
- Behavior patterns
- Integration points
### Workflow Designer
Design workflows that:
- Orchestrate multiple agents
- Define process flows
- Handle different project scales
- Integrate with existing systems
### Team Configuration
Build teams that:
- Combine complementary agent skills
- Coordinate on complex tasks
- Share context effectively
- Deliver cohesive results
## Quick Start
```bash
# Create a new custom agent
bmad bmb create-agent
# Design a new workflow
bmad bmb create-workflow
# Bundle an agent for sharing
bmad bmb bundle-agent
# Create a custom team configuration
bmad bmb create-team
```
## Use Cases
### Custom Agent Development
Build specialized agents for:
- Domain-specific expertise
- Company-specific processes
- Tool integrations
- Automation tasks
### Workflow Customization
Create workflows for:
- Unique development processes
- Compliance requirements
- Quality gates
- Deployment pipelines
### Team Orchestration
Configure teams for:
- Large-scale projects
- Cross-functional collaboration
- Specialized domains
- Custom methodologies
## Integration with BMM
BMB works alongside BMM to:
- Extend core BMM capabilities
- Create custom implementations
- Build domain-specific solutions
- Integrate with existing tools
## Best Practices
1. **Start with existing patterns** - Study BMM agents and workflows before creating new ones
2. **Keep it modular** - Build reusable components
3. **Document thoroughly** - Clear documentation helps others use your creations
4. **Test extensively** - Validate agents and workflows before production use
5. **Share and collaborate** - Contribute useful components back to the community
## Related Documentation
- [BMM Module](../bmm/README.md) - Core method implementation
- [Agent Creation Guide](./workflows/create-agent/README.md) - Detailed agent building instructions
- [Workflow Design Patterns](./workflows/README.md) - Best practices for workflow creation
---
BMB empowers you to extend and customize the BMad Method to fit your specific needs while maintaining the power and consistency of the core framework.

View File

@ -1,70 +0,0 @@
---
name: 'bmad builder'
description: 'BMad Builder'
---
You must fully embody this agent's persona and follow all activation instructions exactly as specified. NEVER break character until given an exit command.
```xml
<agent id="bmad/bmb/agents/bmad-builder.md" name="BMad Builder" title="BMad Builder" icon="🧙">
<activation critical="MANDATORY">
<step n="1">Load persona from this current agent file (already in context)</step>
<step n="2">🚨 IMMEDIATE ACTION REQUIRED - BEFORE ANY OUTPUT:
- Load and read {project-root}/bmad/bmb/config.yaml NOW
- Store ALL fields as session variables: {user_name}, {communication_language}, {output_folder}
- VERIFY: If config not loaded, STOP and report error to user
- DO NOT PROCEED to step 3 until config is successfully loaded and variables stored</step>
<step n="3">Remember: user's name is {user_name}</step>
<step n="4">Show greeting using {user_name} from config, communicate in {communication_language}, then display numbered list of
ALL menu items from menu section</step>
<step n="5">STOP and WAIT for user input - do NOT execute menu items automatically - accept number or trigger text</step>
<step n="6">On user input: Number → execute menu item[n] | Text → case-insensitive substring match | Multiple matches → ask user
to clarify | No match → show "Not recognized"</step>
<step n="7">When executing a menu item: Check menu-handlers section below - extract any attributes from the selected menu item
(workflow, exec, tmpl, data, action, validate-workflow) and follow the corresponding handler instructions</step>
<menu-handlers>
<handlers>
<handler type="workflow">
When menu item has: workflow="path/to/workflow.yaml"
1. CRITICAL: Always LOAD {project-root}/bmad/core/tasks/workflow.xml
2. Read the complete file - this is the CORE OS for executing BMAD workflows
3. Pass the yaml path as 'workflow-config' parameter to those instructions
4. Execute workflow.xml instructions precisely following all steps
5. Save outputs after completing EACH workflow step (never batch multiple steps together)
6. If workflow.yaml path is "todo", inform user the workflow hasn't been implemented yet
</handler>
</handlers>
</menu-handlers>
<rules>
- ALWAYS communicate in {communication_language} UNLESS contradicted by communication_style
- Stay in character until exit selected
- Menu triggers use asterisk (*) - NOT markdown, display exactly as shown
- Number all lists, use letters for sub-options
- Load files ONLY when executing menu items or a workflow or command requires it. EXCEPTION: Config file MUST be loaded at startup step 2
- CRITICAL: Written File Output in workflows will be +2sd your communication style and use professional {communication_language}.
</rules>
</activation>
<persona>
<role>Master BMad Module Agent Team and Workflow Builder and Maintainer</role>
<identity>Lives to serve the expansion of the BMad Method</identity>
<communication_style>Talks like a pulp super hero</communication_style>
<principles>Execute resources directly Load resources at runtime never pre-load Always present numbered lists for choices</principles>
</persona>
<menu>
<item cmd="*help">Show numbered menu</item>
<item cmd="*audit-workflow" workflow="{project-root}/bmad/bmb/workflows/audit-workflow/workflow.yaml">Audit existing workflows for BMAD Core compliance and best practices</item>
<item cmd="*convert" workflow="{project-root}/bmad/bmb/workflows/convert-legacy/workflow.yaml">Convert v4 or any other style task agent or template to a workflow</item>
<item cmd="*create-agent" workflow="{project-root}/bmad/bmb/workflows/create-agent/workflow.yaml">Create a new BMAD Core compliant agent</item>
<item cmd="*create-module" workflow="{project-root}/bmad/bmb/workflows/create-module/workflow.yaml">Create a complete BMAD compatible module (custom agents and workflows)</item>
<item cmd="*create-workflow" workflow="{project-root}/bmad/bmb/workflows/create-workflow/workflow.yaml">Create a new BMAD Core workflow with proper structure</item>
<item cmd="*edit-agent" workflow="{project-root}/bmad/bmb/workflows/edit-agent/workflow.yaml">Edit existing agents while following best practices</item>
<item cmd="*edit-module" workflow="{project-root}/bmad/bmb/workflows/edit-module/workflow.yaml">Edit existing modules (structure, agents, workflows, documentation)</item>
<item cmd="*edit-workflow" workflow="{project-root}/bmad/bmb/workflows/edit-workflow/workflow.yaml">Edit existing workflows while following best practices</item>
<item cmd="*redoc" workflow="{project-root}/bmad/bmb/workflows/redoc/workflow.yaml">Create or update module documentation</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```

View File

@ -1,14 +0,0 @@
# BMB Module Configuration
# Generated by BMAD installer
# Version: 6.0.0-beta.0
# Date: 2025-10-28T17:08:48.100Z
custom_agent_location: "{project-root}/bmad/agents"
custom_workflow_location: "{project-root}/bmad/workflows"
custom_module_location: "{project-root}/bmad"
# Core Configuration Values
user_name: BMad
communication_language: English
document_output_language: English
output_folder: "{project-root}/docs"

View File

@ -1,143 +0,0 @@
# Audit Workflow - Validation Checklist
## Structure
- [ ] workflow.yaml file loads without YAML syntax errors
- [ ] instructions.md file exists and is properly formatted
- [ ] template.md file exists (if document workflow) with valid markdown
- [ ] All critical headers present in instructions (workflow engine reference, workflow.yaml reference)
- [ ] Workflow type correctly identified (document/action/interactive/autonomous/meta)
- [ ] All referenced files actually exist at specified paths
- [ ] No placeholder text remains (like {TITLE}, {WORKFLOW_CODE}, TODO, etc.)
## Standard Config Block
- [ ] workflow.yaml contains `config_source` pointing to correct module config
- [ ] `output_folder` pulls from `{config_source}:output_folder`
- [ ] `user_name` pulls from `{config_source}:user_name`
- [ ] `communication_language` pulls from `{config_source}:communication_language`
- [ ] `date` is set to `system-generated`
- [ ] Config source uses {project-root} variable (not hardcoded path)
- [ ] Standard config comment present: "Critical variables from config"
## Config Variable Usage
- [ ] Instructions communicate in {communication_language} where appropriate
- [ ] Instructions address {user_name} in greetings or summaries where appropriate
- [ ] All file outputs write to {output_folder} or subdirectories (no hardcoded paths)
- [ ] Template includes {{user_name}} in metadata (optional for document workflows)
- [ ] Template includes {{date}} in metadata (optional for document workflows)
- [ ] Template does NOT use {{communication_language}} in headers (agent-only variable)
- [ ] No hardcoded language-specific text that should use {communication_language}
- [ ] Date used for agent date awareness (not confused with training cutoff)
## YAML/Instruction/Template Alignment
- [ ] Every workflow.yaml variable (excluding standard config) is used in instructions OR template
- [ ] No unused yaml fields present (bloat removed)
- [ ] No duplicate fields between top-level and web_bundle section
- [ ] All template variables ({{variable}}) have corresponding yaml definitions OR <template-output> tags
- [ ] All <template-output> tags have corresponding template variables (if document workflow)
- [ ] Template variables use snake_case naming convention
- [ ] Variable names are descriptive (not abbreviated like {{puj}} instead of {{primary_user_journey}})
- [ ] No hardcoded values in instructions that should be yaml variables
## Web Bundle Validation (if applicable)
- [ ] web_bundle section present if workflow needs deployment
- [ ] All paths in web_bundle use bmad/-relative format (NOT {project-root})
- [ ] No {config_source} variables in web_bundle section
- [ ] instructions file listed in web_bundle_files array
- [ ] template file listed in web_bundle_files (if document workflow)
- [ ] validation/checklist file listed in web_bundle_files (if exists)
- [ ] All data files (CSV, JSON, YAML) listed in web_bundle_files
- [ ] All <invoke-workflow> called workflows have their .yaml files in web_bundle_files
- [ ] **CRITICAL**: If workflow invokes other workflows, existing_workflows field is present
- [ ] existing_workflows maps workflow variables to bmad/-relative paths correctly
- [ ] All files referenced in instructions <action> tags listed in web_bundle_files
- [ ] No files listed in web_bundle_files that don't exist
- [ ] Web bundle metadata (name, description, author) matches top-level metadata
## Template Validation (if document workflow)
- [ ] Template variables match <template-output> tags in instructions exactly
- [ ] All required sections present in template structure
- [ ] Template uses {{variable}} syntax (double curly braces)
- [ ] Template variables use snake_case (not camelCase or PascalCase)
- [ ] Standard metadata header format correct (optional usage of {{date}}, {{user_name}})
- [ ] No placeholders remain in template (like {SECTION_NAME})
- [ ] Template structure matches document purpose
## Instructions Quality
- [ ] Each step has n="X" attribute with sequential numbering
- [ ] Each step has goal="clear goal statement" attribute
- [ ] Optional steps marked with optional="true"
- [ ] Repeating steps have appropriate repeat attribute (repeat="3", repeat="for-each-X", repeat="until-approved")
- [ ] Conditional steps have if="condition" attribute
- [ ] XML tags used correctly (<action>, <ask>, <check>, <goto>, <invoke-workflow>, <template-output>)
- [ ] No nested tag references in content (use "action tags" not "<action> tags")
- [ ] Tag references use descriptive text without angle brackets for clarity
- [ ] No conditional execution antipattern (no self-closing <check> tags)
- [ ] Single conditionals use <action if="condition"> (inline)
- [ ] Multiple conditionals use <check if="condition">...</check> (wrapper block with closing tag)
- [ ] Steps are focused (single goal per step)
- [ ] Instructions are specific with limits ("Write 1-2 paragraphs" not "Write about")
- [ ] Examples provided where helpful
- [ ] <template-output> tags save checkpoints for document workflows
- [ ] Flow control is logical and clear
## Bloat Detection
- [ ] Bloat percentage under 10% (unused yaml fields / total fields)
- [ ] No commented-out variables that should be removed
- [ ] No duplicate metadata between sections
- [ ] No variables defined but never referenced
- [ ] No redundant configuration that duplicates web_bundle
## Final Validation
### Critical Issues (Must fix immediately)
_List any critical issues found:_
- Issue 1:
- Issue 2:
- Issue 3:
### Important Issues (Should fix soon)
_List any important issues found:_
- Issue 1:
- Issue 2:
- Issue 3:
### Cleanup Recommendations (Nice to have)
_List any cleanup recommendations:_
- Recommendation 1:
- Recommendation 2:
- Recommendation 3:
---
## Audit Summary
**Total Checks:** 72
**Passed:** **\_** / 72
**Failed:** **\_** / 72
**Pass Rate:** **\_**%
**Recommendation:**
- Pass Rate ≥ 95%: Excellent - Ready for production
- Pass Rate 85-94%: Good - Minor fixes needed
- Pass Rate 70-84%: Fair - Important issues to address
- Pass Rate < 70%: Poor - Significant work required
---
**Audit Completed:** {{date}}
**Auditor:** Audit Workflow (BMAD v6)

View File

@ -1,341 +0,0 @@
# Audit Workflow - Workflow Quality Audit Instructions
<critical>The workflow execution engine is governed by: {project-root}/bmad/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {project-root}/bmad/bmb/workflows/audit-workflow/workflow.yaml</critical>
<workflow>
<step n="1" goal="Load and analyze target workflow">
<ask>What is the path to the workflow you want to audit? (provide path to workflow.yaml or workflow folder)</ask>
<action>Load the workflow.yaml file from the provided path</action>
<action>Identify the workflow type (document, action, interactive, autonomous, meta)</action>
<action>List all associated files:</action>
- instructions.md (required for most workflows)
- template.md (if document workflow)
- checklist.md (if validation exists)
- Any data files referenced in yaml
<action>Load all discovered files</action>
Display summary:
- Workflow name and description
- Type of workflow
- Files present
- Module assignment
</step>
<step n="2" goal="Validate standard config block">
<action>Check workflow.yaml for the standard config block:</action>
**Required variables:**
- `config_source: "{project-root}/bmad/[module]/config.yaml"`
- `output_folder: "{config_source}:output_folder"`
- `user_name: "{config_source}:user_name"`
- `communication_language: "{config_source}:communication_language"`
- `date: system-generated`
<action>Validate each variable:</action>
**Config Source Check:**
- [ ] `config_source` is defined
- [ ] Points to correct module config path
- [ ] Uses {project-root} variable
**Standard Variables Check:**
- [ ] `output_folder` pulls from config_source
- [ ] `user_name` pulls from config_source
- [ ] `communication_language` pulls from config_source
- [ ] `date` is set to system-generated
<action>Record any missing or incorrect config variables</action>
<template-output>config_issues</template-output>
<action if="config issues found">Add to issues list with severity: CRITICAL</action>
</step>
<step n="3" goal="Analyze YAML/Instruction/Template alignment">
<action>Extract all variables defined in workflow.yaml (excluding standard config block)</action>
<action>Scan instructions.md for variable usage: {variable_name} pattern</action>
<action>Scan template.md for variable usage: {{variable_name}} pattern (if exists)</action>
<action>Cross-reference analysis:</action>
**For each yaml variable:**
1. Is it used in instructions.md? (mark as INSTRUCTION_USED)
2. Is it used in template.md? (mark as TEMPLATE_USED)
3. Is it neither? (mark as UNUSED_BLOAT)
**Special cases to ignore:**
- Standard config variables (config_source, output_folder, user_name, communication_language, date)
- Workflow metadata (name, description, author)
- Path variables (installed_path, template, instructions, validation)
- Web bundle configuration (web_bundle block itself)
<action>Identify unused yaml fields (bloat)</action>
<action>Identify hardcoded values in instructions that should be variables</action>
<template-output>alignment_issues</template-output>
<action if="unused variables found">Add to issues list with severity: BLOAT</action>
</step>
<step n="4" goal="Config variable usage audit">
<action>Analyze instructions.md for proper config variable usage:</action>
**Communication Language Check:**
- Search for phrases like "communicate in {communication_language}"
- Check if greetings/responses use language-aware patterns
- Verify NO usage of {{communication_language}} in template headers
**User Name Check:**
- Look for user addressing patterns using {user_name}
- Check if summaries or greetings personalize with {user_name}
- Verify optional usage in template metadata (not required)
**Output Folder Check:**
- Search for file write operations
- Verify all outputs go to {output_folder} or subdirectories
- Check for hardcoded paths like "/output/" or "/generated/"
**Date Usage Check:**
- Verify date is available for agent date awareness
- Check optional usage in template metadata
- Ensure no confusion between date and model training cutoff
**Nested Tag Reference Check:**
- Search for XML tag references within tags (e.g., `<action>Scan for <action> tags</action>`)
- Identify patterns like: `<tag-name> tags`, `<tag-name> calls`, `<tag-name>content</tag-name>` within content
- Common problematic tags to check: action, ask, check, template-output, invoke-workflow, goto
- Flag any instances where angle brackets appear in content describing tags
**Best Practice:** Use descriptive text without brackets (e.g., "action tags" instead of "<action> tags")
**Rationale:**
- Prevents XML parsing ambiguity
- Improves readability for humans and LLMs
- LLMs understand "action tags" = `<action>` tags from context
**Conditional Execution Antipattern Check:**
- Scan for self-closing check tags: `<check>condition text</check>` (invalid antipattern)
- Detect pattern: check tag on one line, followed by action/ask/goto tags (indicates incorrect nesting)
- Flag sequences like: `<check>If X:</check>` followed by `<action>do Y</action>`
**Correct Patterns:**
- Single conditional: `<action if="condition">Do something</action>`
- Multiple actions: `<check if="condition">` followed by nested actions with closing `</check>` tag
**Antipattern Example (WRONG):**
```xml
<check>If condition met:</check>
<action>Do something</action>
```
**Correct Example:**
```xml
<check if="condition met">
<action>Do something</action>
<action>Do something else</action>
</check>
```
**Or for single action:**
```xml
<action if="condition met">Do something</action>
```
<action>Scan instructions.md for nested tag references using pattern: &lt;(action|ask|check|template-output|invoke-workflow|goto|step|elicit-required)&gt; within text content</action>
<action>Record any instances of nested tag references with line numbers</action>
<action>Scan instructions.md for conditional execution antipattern: self-closing check tags</action>
<action>Detect pattern: `&lt;check&gt;.*&lt;/check&gt;` on single line (self-closing check)</action>
<action>Record any antipattern instances with line numbers and suggest corrections</action>
<action>Record any improper config variable usage</action>
<template-output>config_usage_issues</template-output>
<action if="config usage issues found">Add to issues list with severity: IMPORTANT</action>
<action if="nested tag references found">Add to issues list with severity: CLARITY (recommend using descriptive text without angle brackets)</action>
<action if="conditional antipattern found">Add to issues list with severity: CRITICAL (invalid XML structure - must use action if="" or proper check wrapper)</action>
</step>
<step n="5" goal="Web bundle validation" optional="true">
<check if="workflow.yaml contains web_bundle section">
<action>Validate web_bundle structure:</action>
**Path Validation:**
- [ ] All paths use bmad/-relative format (NOT {project-root})
- [ ] No {config_source} variables in web_bundle section
- [ ] Paths match actual file locations
**Completeness Check:**
- [ ] instructions file listed in web_bundle_files
- [ ] template file listed (if document workflow)
- [ ] validation/checklist file listed (if exists)
- [ ] All data files referenced in yaml listed
- [ ] All files referenced in instructions listed
**Workflow Dependency Scan:**
<action>Scan instructions.md for invoke-workflow tags</action>
<action>Extract workflow paths from invocations</action>
<action>Verify each called workflow.yaml is in web_bundle_files</action>
<action>**CRITICAL**: Check if existing_workflows field is present when workflows are invoked</action>
<action>If invoke-workflow calls exist, existing_workflows MUST map workflow variables to paths</action>
<action>Example: If instructions use {core_brainstorming}, web_bundle needs: existing_workflows: - core_brainstorming: "bmad/core/workflows/brainstorming/workflow.yaml"</action>
**File Reference Scan:**
<action>Scan instructions.md for file references in action tags</action>
<action>Check for CSV, JSON, YAML, MD files referenced</action>
<action>Verify all referenced files are in web_bundle_files</action>
<action>Record any missing files or incorrect paths</action>
<template-output>web_bundle_issues</template-output>
<action if="web_bundle issues found">Add to issues list with severity: CRITICAL</action>
<action if="no web_bundle section exists">Note: "No web_bundle configured (may be intentional for local-only workflows)"</action>
</check>
</step>
<step n="6" goal="Bloat detection">
<action>Identify bloat patterns:</action>
**Unused YAML Fields:**
- Variables defined but not used in instructions OR template
- Duplicate fields between top-level and web_bundle section
- Commented-out variables that should be removed
**Hardcoded Values:**
- File paths that should use {output_folder}
- Generic greetings that should use {user_name}
- Language-specific text that should use {communication_language}
- Static dates that should use {date}
**Redundant Configuration:**
- Variables that duplicate web_bundle fields
- Metadata repeated across sections
<action>Calculate bloat metrics:</action>
- Total yaml fields: {{total_yaml_fields}}
- Used fields: {{used_fields}}
- Unused fields: {{unused_fields}}
- Bloat percentage: {{bloat_percentage}}%
<action>Record all bloat items with recommendations</action>
<template-output>bloat_items</template-output>
<action if="bloat detected">Add to issues list with severity: CLEANUP</action>
</step>
<step n="7" goal="Template variable mapping" if="workflow_type == 'document'">
<action>Extract all template variables from template.md: {{variable_name}} pattern</action>
<action>Scan instructions.md for corresponding template-output tags</action>
<action>Cross-reference mapping:</action>
**For each template variable:**
1. Is there a matching template-output tag? (mark as MAPPED)
2. Is it a standard config variable? (mark as CONFIG_VAR - optional)
3. Is it unmapped? (mark as MISSING_OUTPUT)
**For each template-output tag:**
1. Is there a matching template variable? (mark as USED)
2. Is it orphaned? (mark as UNUSED_OUTPUT)
<action>Verify variable naming conventions:</action>
- [ ] All template variables use snake_case
- [ ] Variable names are descriptive (not abbreviated)
- [ ] Standard config variables properly formatted
<action>Record any mapping issues</action>
<template-output>template_issues</template-output>
<action if="template issues found">Add to issues list with severity: IMPORTANT</action>
</step>
<step n="8" goal="Generate comprehensive audit report">
<action>Compile all findings and calculate summary metrics</action>
<action>Generate executive summary based on issue counts and severity levels</action>
<template-output>workflow_type</template-output>
<template-output>overall_status</template-output>
<template-output>critical_count</template-output>
<template-output>important_count</template-output>
<template-output>cleanup_count</template-output>
<action>Generate status summaries for each audit section</action>
<template-output>config_status</template-output>
<template-output>total_variables</template-output>
<template-output>instruction_usage_count</template-output>
<template-output>template_usage_count</template-output>
<template-output>bloat_count</template-output>
<action>Generate config variable usage status indicators</action>
<template-output>comm_lang_status</template-output>
<template-output>user_name_status</template-output>
<template-output>output_folder_status</template-output>
<template-output>date_status</template-output>
<template-output>nested_tag_count</template-output>
<action>Generate web bundle metrics</action>
<template-output>web_bundle_exists</template-output>
<template-output>web_bundle_file_count</template-output>
<template-output>missing_files_count</template-output>
<action>Generate bloat metrics</action>
<template-output>bloat_percentage</template-output>
<template-output>cleanup_potential</template-output>
<action>Generate template mapping metrics</action>
<template-output>template_var_count</template-output>
<template-output>mapped_count</template-output>
<template-output>missing_mapping_count</template-output>
<action>Compile prioritized recommendations by severity</action>
<template-output>critical_recommendations</template-output>
<template-output>important_recommendations</template-output>
<template-output>cleanup_recommendations</template-output>
<action>Display summary to {user_name} in {communication_language}</action>
<action>Provide path to full audit report: {output_folder}/audit-report-{{workflow_name}}-{{date}}.md</action>
<ask>Would you like to:
- View the full audit report
- Fix issues automatically (invoke edit-workflow)
- Audit another workflow
- Exit
</ask>
</step>
</workflow>

View File

@ -1,118 +0,0 @@
# Workflow Audit Report
**Workflow:** {{workflow_name}}
**Audit Date:** {{date}}
**Auditor:** Audit Workflow (BMAD v6)
**Workflow Type:** {{workflow_type}}
---
## Executive Summary
**Overall Status:** {{overall_status}}
- Critical Issues: {{critical_count}}
- Important Issues: {{important_count}}
- Cleanup Recommendations: {{cleanup_count}}
---
## 1. Standard Config Block Validation
{{config_issues}}
**Status:** {{config_status}}
---
## 2. YAML/Instruction/Template Alignment
{{alignment_issues}}
**Variables Analyzed:** {{total_variables}}
**Used in Instructions:** {{instruction_usage_count}}
**Used in Template:** {{template_usage_count}}
**Unused (Bloat):** {{bloat_count}}
---
## 3. Config Variable Usage & Instruction Quality
{{config_usage_issues}}
**Communication Language:** {{comm_lang_status}}
**User Name:** {{user_name_status}}
**Output Folder:** {{output_folder_status}}
**Date:** {{date_status}}
**Nested Tag References:** {{nested_tag_count}} instances found
---
## 4. Web Bundle Validation
{{web_bundle_issues}}
**Web Bundle Present:** {{web_bundle_exists}}
**Files Listed:** {{web_bundle_file_count}}
**Missing Files:** {{missing_files_count}}
---
## 5. Bloat Detection
{{bloat_items}}
**Bloat Percentage:** {{bloat_percentage}}%
**Cleanup Potential:** {{cleanup_potential}}
---
## 6. Template Variable Mapping
{{template_issues}}
**Template Variables:** {{template_var_count}}
**Mapped Correctly:** {{mapped_count}}
**Missing Mappings:** {{missing_mapping_count}}
---
## Recommendations
### Critical (Fix Immediately)
{{critical_recommendations}}
### Important (Address Soon)
{{important_recommendations}}
### Cleanup (Nice to Have)
{{cleanup_recommendations}}
---
## Validation Checklist
Use this checklist to verify fixes:
- [ ] All standard config variables present and correct
- [ ] No unused yaml fields (bloat removed)
- [ ] Config variables used appropriately in instructions
- [ ] Web bundle includes all dependencies
- [ ] Template variables properly mapped
- [ ] File structure follows v6 conventions
---
## Next Steps
1. Review critical issues and fix immediately
2. Address important issues in next iteration
3. Consider cleanup recommendations for optimization
4. Re-run audit after fixes to verify improvements
---
**Audit Complete** - Generated by audit-workflow v1.0

View File

@ -1,23 +0,0 @@
# Audit Workflow Configuration
name: "audit-workflow"
description: "Comprehensive workflow quality audit - validates structure, config standards, variable usage, bloat detection, and web_bundle completeness. Performs deep analysis of workflow.yaml, instructions.md, template.md, and web_bundle configuration against BMAD v6 standards."
author: "BMad"
# Critical variables from config
config_source: "{project-root}/bmad/bmb/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
date: system-generated
# Module path and component files
installed_path: "{project-root}/bmad/bmb/workflows/audit-workflow"
template: "{installed_path}/template.md"
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Output configuration
default_output_file: "{output_folder}/audit-report-{{workflow_name}}-{{date}}.md"
standalone: true
# Web bundle configuration

View File

@ -1,21 +0,0 @@
# Audit Workflow Configuration
name: "audit-workflow"
description: "Comprehensive workflow quality audit - validates structure, config standards, variable usage, bloat detection, and web_bundle completeness. Performs deep analysis of workflow.yaml, instructions.md, template.md, and web_bundle configuration against BMAD v6 standards."
author: "BMad"
# Critical variables from config
config_source: "{project-root}/bmad/bmb/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
date: system-generated
# Module path and component files
installed_path: "{project-root}/bmad/bmb/workflows/audit-workflow"
template: false
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Output configuration
default_output_file: "{output_folder}/audit-report-{{workflow_name}}-{{date}}.md"
# Web bundle configuration

View File

@ -1,262 +0,0 @@
# Convert Legacy Workflow
## Overview
The Convert Legacy workflow is a comprehensive migration tool that converts BMAD v4 items (agents, workflows, modules) to v6 compliant format with proper structure and conventions. It bridges the gap between legacy BMAD implementations and the modern v6 architecture, ensuring seamless migration while preserving functionality and improving structure.
## Key Features
- **Multi-Format Detection** - Automatically identifies v4 agents, workflows, tasks, templates, and modules
- **Intelligent Conversion** - Smart mapping from v4 patterns to v6 equivalents with structural improvements
- **Sub-Workflow Integration** - Leverages create-agent, create-workflow, and create-module workflows for quality output
- **Structure Modernization** - Converts YAML-based agents to XML, templates to workflows, tasks to structured workflows
- **Path Normalization** - Updates all references to use proper v6 path conventions
- **Validation System** - Comprehensive validation of converted items before finalization
- **Migration Reporting** - Detailed conversion reports with locations and manual adjustment notes
## Usage
### Basic Invocation
```bash
workflow convert-legacy
```
### With Legacy File Input
```bash
# Convert a specific v4 item
workflow convert-legacy --input /path/to/legacy-agent.md
```
### With Legacy Module
```bash
# Convert an entire v4 module structure
workflow convert-legacy --input /path/to/legacy-module/
```
### Configuration
The workflow uses standard BMB configuration:
- **output_folder**: Where converted items will be placed
- **user_name**: Author information for converted items
- **conversion_mappings**: v4-to-v6 pattern mappings (optional)
## Workflow Structure
### Files Included
```
convert-legacy/
├── workflow.yaml # Configuration and metadata
├── instructions.md # Step-by-step conversion guide
├── checklist.md # Validation criteria
└── README.md # This file
```
## Workflow Process
### Phase 1: Legacy Analysis (Steps 1-3)
**Item Identification and Loading**
- Accepts file path or directory from user
- Loads complete file/folder structure for analysis
- Automatically detects item type based on content patterns:
- **Agents**: Contains `<agent>` or `<prompt>` XML tags
- **Workflows**: Contains workflow YAML or instruction patterns
- **Modules**: Contains multiple organized agents/workflows
- **Tasks**: Contains `<task>` XML tags
- **Templates**: Contains YAML-based document generators
**Legacy Structure Analysis**
- Parses v4 structure and extracts key components
- Maps v4 agent metadata (name, id, title, icon, persona)
- Analyzes v4 template sections and elicitation patterns
- Identifies task workflows and decision trees
- Catalogs dependencies and file references
**Target Module Selection**
- Prompts for target module (bmm, bmb, cis, custom)
- Determines proper installation paths using v6 conventions
- Shows target location for user confirmation
- Ensures all paths use `{project-root}/bmad/` format
### Phase 2: Conversion Strategy (Step 4)
**Strategy Selection Based on Item Type**
- **Simple Agents**: Direct XML conversion with metadata mapping
- **Complex Agents**: Workflow-assisted creation using create-agent
- **Templates**: Template-to-workflow conversion with proper structure
- **Tasks**: Task-to-workflow conversion with step mapping
- **Modules**: Full module creation using create-module workflow
**Workflow Type Determination**
- Analyzes legacy items to determine v6 workflow type:
- **Document Workflow**: Generates documents with templates
- **Action Workflow**: Performs actions without output documents
- **Interactive Workflow**: Guides user interaction sessions
- **Meta-Workflow**: Coordinates other workflows
### Phase 3: Conversion Execution (Steps 5a-5e)
**Direct Agent Conversion (5a)**
- Transforms v4 YAML agent format to v6 XML structure
- Maps persona blocks (role, style, identity, principles)
- Converts commands list to v6 `<cmds>` format
- Updates task references to workflow invocations
- Normalizes all paths to v6 conventions
**Workflow-Assisted Creation (5b-5e)**
- Extracts key information from legacy items
- Invokes appropriate sub-workflows:
- `create-agent` for complex agent creation
- `create-workflow` for template/task conversion
- `create-module` for full module migration
- Ensures proper v6 structure and conventions
**Template-to-Workflow Conversion (5c)**
- Converts YAML template sections to workflow steps
- Maps `elicit: true` flags to `<invoke-task halt="true">{project-root}/bmad/core/tasks/adv-elicit.xml</invoke-task>` tags
- Transforms conditional sections to flow control
- Creates proper template.md from content structure
- Integrates v4 create-doc.md task patterns
**Task-to-Workflow Conversion (5e)**
- Analyzes task purpose to determine workflow type
- Extracts step-by-step instructions to workflow steps
- Converts decision trees to flow control tags
- Maps 1-9 elicitation menus to v6 elicitation patterns
- Preserves execution logic and critical notices
### Phase 4: Validation and Finalization (Steps 6-8)
**Comprehensive Validation**
- Validates XML structure for agents
- Checks YAML syntax for workflows
- Verifies template variable consistency
- Ensures proper file structure and naming
**Migration Reporting**
- Generates detailed conversion report
- Documents original and new locations
- Notes manual adjustments needed
- Provides warnings and recommendations
**Cleanup and Archival**
- Optional archival of original v4 files
- Final location confirmation
- Post-conversion instructions and next steps
## Output
### Generated Files
- **Converted Items**: Proper v6 format in target module locations
- **Migration Report**: Detailed conversion documentation
- **Validation Results**: Quality assurance confirmation
### Output Structure
Converted items follow v6 conventions:
1. **Agents** - XML format with proper persona and command structure
2. **Workflows** - Complete workflow folders with yaml, instructions, and templates
3. **Modules** - Full module structure with installation infrastructure
4. **Documentation** - Updated paths, references, and metadata
## Requirements
- **Legacy v4 Items** - Source files or directories to convert
- **Target Module Access** - Write permissions to target module directories
- **Sub-Workflow Availability** - create-agent, create-workflow, create-module workflows accessible
- **Conversion Mappings** (optional) - v4-to-v6 pattern mappings for complex conversions
## Best Practices
### Before Starting
1. **Backup Legacy Items** - Create copies of original v4 files before conversion
2. **Review Target Module** - Understand target module structure and conventions
3. **Plan Module Organization** - Decide where converted items should logically fit
### During Execution
1. **Validate Item Type Detection** - Confirm automatic detection or correct manually
2. **Choose Appropriate Strategy** - Use workflow-assisted creation for complex items
3. **Review Path Mappings** - Ensure all references use proper v6 path conventions
4. **Test Incrementally** - Convert simple items first to validate process
### After Completion
1. **Validate Converted Items** - Test agents and workflows for proper functionality
2. **Review Migration Report** - Address any manual adjustments noted
3. **Update Documentation** - Ensure README and documentation reflect changes
4. **Archive Originals** - Store v4 files safely for reference if needed
## Troubleshooting
### Common Issues
**Issue**: Item type detection fails or incorrect
- **Solution**: Manually specify item type when prompted
- **Check**: Verify file structure matches expected v4 patterns
**Issue**: Path conversion errors
- **Solution**: Ensure all references use `{project-root}/bmad/` format
- **Check**: Review conversion mappings for proper path patterns
**Issue**: Sub-workflow invocation fails
- **Solution**: Verify build workflows are available and accessible
- **Check**: Ensure target module exists and has proper permissions
**Issue**: XML or YAML syntax errors in output
- **Solution**: Review conversion mappings and adjust patterns
- **Check**: Validate converted files with appropriate parsers
## Customization
To customize this workflow:
1. **Update Conversion Mappings** - Modify v4-to-v6 pattern mappings in data/
2. **Extend Detection Logic** - Add new item type detection patterns
3. **Add Conversion Strategies** - Implement specialized conversion approaches
4. **Enhance Validation** - Add additional quality checks in validation step
## Version History
- **v1.0.0** - Initial release
- Multi-format v4 item detection and conversion
- Integration with create-agent, create-workflow, create-module
- Comprehensive path normalization
- Migration reporting and validation
## Support
For issues or questions:
- Review the workflow creation guide at `/bmad/bmb/workflows/create-workflow/workflow-creation-guide.md`
- Check conversion mappings at `/bmad/bmb/data/v4-to-v6-mappings.yaml`
- Validate output using `checklist.md`
- Consult BMAD v6 documentation for proper conventions
---
_Part of the BMad Method v6 - BMB (Builder) Module_

View File

@ -1,205 +0,0 @@
# Convert Legacy - Validation Checklist
## Pre-Conversion Validation
### Source Analysis
- [ ] Original v4 file(s) fully loaded and parsed
- [ ] Item type correctly identified (agent/template/task/module)
- [ ] All dependencies documented and accounted for
- [ ] No critical content overlooked in source files
## Conversion Completeness
### For Agent Conversions
#### Content Preservation
- [ ] Agent name, id, title, and icon transferred
- [ ] All persona elements mapped to v6 structure
- [ ] All commands converted to v6 menu array (YAML)
- [ ] Dependencies properly referenced or converted
- [ ] Activation instructions adapted to v6 patterns
#### v6 Compliance (YAML Format)
- [ ] Valid YAML structure with proper indentation
- [ ] agent.metadata has all required fields (id, name, title, icon, module)
- [ ] agent.persona has all sections (role, identity, communication_style, principles)
- [ ] agent.menu uses proper handlers (workflow, action, exec, tmpl, data)
- [ ] agent.critical_actions array present when needed
- [ ] agent.prompts defined for any action: "#id" references
- [ ] File extension is .agent.yaml (will be compiled to .md later)
#### Best Practices
- [ ] Commands use appropriate workflow references instead of direct task calls
- [ ] File paths use {project-root} variables
- [ ] Config values use {config_source}: pattern
- [ ] Agent follows naming conventions (kebab-case for files)
- [ ] ALL paths reference {project-root}/bmad/{{module}}/ locations, NOT src/
- [ ] exec, data, run-workflow commands point to final BMAD installation paths
### For Template/Workflow Conversions
#### Content Preservation
- [ ] Template metadata (name, description, output) transferred
- [ ] All sections converted to workflow steps
- [ ] Section hierarchy maintained in instructions
- [ ] Variables ({{var}}) preserved in template.md
- [ ] Elicitation points (elicit: true) converted to <invoke-task halt="true">{project-root}/bmad/core/tasks/adv-elicit.xml</invoke-task>
- [ ] Conditional sections preserved with if="" attributes
- [ ] Repeatable sections converted to repeat="" attributes
#### v6 Compliance
- [ ] workflow.yaml follows structure from workflow-creation-guide.md
- [ ] instructions.md has critical headers referencing workflow engine
- [ ] Steps numbered sequentially with clear goals
- [ ] Template variables match between instructions and template.md
- [ ] Proper use of XML tags (<action>, <check>, <ask>, <template-output>)
- [ ] File structure follows v6 pattern (folder with yaml/md files)
#### Best Practices
- [ ] Steps are focused with single goals
- [ ] Instructions are specific ("Write 1-2 paragraphs" not "Write about")
- [ ] Examples provided where helpful
- [ ] Limits set where appropriate ("3-5 items maximum")
- [ ] Save checkpoints with <template-output> at logical points
- [ ] Variables use descriptive snake_case names
### For Task Conversions
#### Content Preservation
- [ ] Task logic fully captured in workflow instructions
- [ ] Execution flow maintained
- [ ] User interaction points preserved
- [ ] Decision trees converted to workflow logic
- [ ] All processing steps accounted for
- [ ] Document generation patterns identified and preserved
#### Type Determination
- [ ] Workflow type correctly identified (document/action/interactive/meta)
- [ ] If generates documents, template.md created
- [ ] If performs actions only, marked as action workflow
- [ ] Output patterns properly analyzed
#### v6 Compliance
- [ ] Converted to proper workflow format (not standalone task)
- [ ] Follows workflow execution engine patterns
- [ ] Interactive elements use proper v6 tags
- [ ] Flow control uses v6 patterns (goto, check, loop)
- [ ] 1-9 elicitation menus converted to v6 elicitation
- [ ] Critical notices preserved in workflow.yaml
- [ ] YOLO mode converted to appropriate v6 patterns
### Module-Level Validation
#### Structure
- [ ] Module follows v6 directory structure
- [ ] All components in correct locations:
- Agents in /agents/
- Workflows in /workflows/
- Data files in appropriate locations
- [ ] Config files properly formatted
#### Integration
- [ ] Cross-references between components work
- [ ] Workflow invocations use correct paths
- [ ] Data file references are valid
- [ ] No broken dependencies
## Technical Validation
### Syntax and Format
- [ ] YAML files have valid syntax (no parsing errors)
- [ ] XML structures properly formed and closed
- [ ] Markdown files render correctly
- [ ] File encoding is UTF-8
- [ ] Line endings consistent (LF)
### Path Resolution
- [ ] All file paths resolve correctly
- [ ] Variable substitutions work ({project-root}, {installed_path}, etc.)
- [ ] Config references load properly
- [ ] No hardcoded absolute paths (unless intentional)
## Functional Validation
### Execution Testing
- [ ] Converted item can be loaded without errors
- [ ] Agents activate properly when invoked
- [ ] Workflows execute through completion
- [ ] User interaction points function correctly
- [ ] Output generation works as expected
### Behavioral Validation
- [ ] Converted item behaves similarly to v4 version
- [ ] Core functionality preserved
- [ ] User experience maintains or improves
- [ ] No functionality regression
## Documentation and Cleanup
### Documentation
- [ ] Conversion report generated with all changes
- [ ] Any manual adjustments documented
- [ ] Known limitations or differences noted
- [ ] Migration instructions provided if needed
### Post-Conversion
- [ ] Original v4 files archived (if requested)
- [ ] File permissions set correctly
- [ ] Git tracking updated if applicable
- [ ] User informed of new locations
## Final Verification
### Quality Assurance
- [ ] Converted item follows ALL v6 best practices
- [ ] Code/config is clean and maintainable
- [ ] No TODO or FIXME items remain
- [ ] Ready for production use
### User Acceptance
- [ ] User reviewed conversion output
- [ ] User tested basic functionality
- [ ] User approved final result
- [ ] Any user feedback incorporated
## Notes Section
### Conversion Issues Found:
_List any issues encountered during validation_
### Manual Interventions Required:
_Document any manual fixes needed_
### Recommendations:
_Suggestions for further improvements or considerations_
---
**Validation Result:** [ ] PASSED / [ ] FAILED
**Validator:** {{user_name}}
**Date:** {{date}}
**Items Converted:** {{conversion_summary}}

View File

@ -1,377 +0,0 @@
# Convert Legacy - v4 to v6 Conversion Instructions
<critical>The workflow execution engine is governed by: {project-root}/bmad/core/tasks/workflow.xml</critical>
<parameter name="You MUST have already loaded and processed: {project-root}/bmad/bmb/workflows/convert-legacy/workflow.yaml</critical>
<critical>Communicate in {communication_language} throughout the conversion process</critical>
<workflow>
<step n="1" goal="Identify and Load Legacy Item">
<action>Ask user for the path to the v4 item to convert (agent, workflow, or module)</action>
<action>Load the complete file/folder structure</action>
<action>Detect item type based on structure and content patterns:</action>
- Agent: Contains agent or prompt XML tags, single file
- Workflow: Contains workflow YAML or instruction patterns, usually folder
- Module: Contains multiple agents/workflows in organized structure
- Task: Contains task XML tags
<ask>Confirm detected type or allow user to correct: "Detected as [type]. Is this correct? (y/n)"</ask>
</step>
<step n="2" goal="Analyze Legacy Structure">
<action>Parse the v4 structure and extract key components:</action>
For v4 Agents (YAML-based in markdown):
- Agent metadata (name, id, title, icon, whenToUse)
- Persona block (role, style, identity, focus, core_principles)
- Commands list with task/template references
- Dependencies (tasks, templates, checklists, data files)
- Activation instructions and workflow rules
- IDE file resolution patterns
For v4 Templates (YAML-based document generators):
- Template metadata (id, name, version, output)
- Workflow mode and elicitation settings
- Sections hierarchy with:
- Instructions for content generation
- Elicit flags for user interaction
- Templates with {{variables}}
- Conditional sections
- Repeatable sections
For v4 Tasks (Markdown with execution instructions):
- Critical execution notices
- Step-by-step workflows
- Elicitation requirements (1-9 menu format)
- Processing flows and decision trees
- Agent permission rules
For Modules:
- Module metadata
- Component list (agents, workflows, tasks)
- Dependencies
- Installation requirements
<action>Create a conversion map of what needs to be transformed</action>
<action>Map v4 patterns to v6 equivalents:
- v4 Task + Template → v6 Workflow (folder with workflow.yaml, instructions.md, template.md)
- v4 Agent YAML → v6 Agent YAML format
- v4 Commands → v6 <menu> with proper handlers
- v4 Dependencies → v6 workflow references or data files
</action>
</step>
<step n="3" goal="Determine Target Module and Location">
<ask>Which module should this belong to? (eg. bmm, bmb, cis, bmm-legacy, or custom)</ask>
<action if="custom module"><ask>Enter custom module code (kebab-case):</ask></action>
<action>Determine installation path based on type and module</action>
<critical>IMPORTANT: All paths must use final BMAD installation locations, not src paths!</critical>
<action>Show user the target location: {project-root}/bmad/{{target_module}}/{{item_type}}/{{item_name}}</action>
<action>Note: Files will be created in bmad/ but all internal paths will reference {project-root}/bmad/ locations</action>
<ask>Proceed with this location? (y/n)</ask>
</step>
<step n="4" goal="Choose Conversion Strategy">
<action>Based on item type and complexity, choose approach:</action>
<check if="agent conversion">
<check if="simple agent (basic persona + commands)">
<action>Use direct conversion to v6 agent YAML format</action>
<goto step="5a">Direct Agent Conversion</goto>
</check>
<check if="complex agent with embedded workflows">
<action>Plan to invoke create-agent workflow</action>
<goto step="5b">Workflow-Assisted Agent Creation</goto>
</check>
</check>
<check if="template or task conversion to workflow">
<action>Analyze the v4 item to determine workflow type:</action>
- Does it generate a specific document type? → Document workflow
- Does it produce structured output files? → Document workflow
- Does it perform actions without output? → Action workflow
- Does it coordinate other tasks? → Meta-workflow
- Does it guide user interaction? → Interactive workflow
<ask>Based on analysis, this appears to be a {{detected_workflow_type}} workflow. Confirm or correct:
1. Document workflow (generates documents with template)
2. Action workflow (performs actions, no template)
3. Interactive workflow (guided session)
4. Meta-workflow (coordinates other workflows)
Select 1-4:</ask>
<action if="template conversion"><goto step="5c">Template-to-Workflow Conversion</goto></action>
<action if="task conversion"><goto step="5e">Task-to-Workflow Conversion</goto></action>
</check>
<check if="full module conversion">
<action>Plan to invoke create-module workflow</action>
<goto step="5d">Module Creation</goto>
</check>
</step>
<step n="5a" goal="Direct Agent Conversion" optional="true">
<action>Transform v4 YAML agent to v6 YAML format:</action>
1. Convert agent metadata structure:
- v4 `agent.name` → v6 `agent.metadata.name`
- v4 `agent.id` → v6 `agent.metadata.id`
- v4 `agent.title` → v6 `agent.metadata.title`
- v4 `agent.icon` → v6 `agent.metadata.icon`
- Add v6 `agent.metadata.module` field
2. Transform persona structure:
- v4 `persona.role` → v6 `agent.persona.role` (keep as YAML string)
- v4 `persona.style` → v6 `agent.persona.communication_style`
- v4 `persona.identity` → v6 `agent.persona.identity`
- v4 `persona.core_principles` → v6 `agent.persona.principles` (as array)
3. Convert commands to menu:
- v4 `commands:` list → v6 `agent.menu:` array
- Each command becomes menu item with:
- `trigger:` (without \* prefix - added at build)
- `description:`
- Handler attributes (`workflow:`, `exec:`, `action:`, etc.)
- Map task references to workflow paths
- Map template references to workflow invocations
4. Add v6-specific sections (in YAML):
- `agent.prompts:` array for inline prompts (if using action: "#id")
- `agent.critical_actions:` array for startup requirements
- `agent.activation_rules:` for universal agent rules
5. Handle dependencies and paths:
- Convert task dependencies to workflow references
- Map template dependencies to v6 workflows
- Preserve checklist and data file references
- CRITICAL: All paths must use {project-root}/bmad/{{module}}/ NOT src/
<action>Generate the converted v6 agent YAML file (.agent.yaml)</action>
<action>Example path conversions:
- exec="{project-root}/bmad/{{target_module}}/tasks/task-name.md"
- run-workflow="{project-root}/bmad/{{target_module}}/workflows/workflow-name/workflow.yaml"
- data="{project-root}/bmad/{{target_module}}/data/data-file.yaml"
</action>
<action>Save to: bmad/{{target_module}}/agents/{{agent_name}}.agent.yaml (physical location)</action>
<action>Note: The build process will later compile this to .md with XML format</action>
<goto step="6">Continue to Validation</goto>
</step>
<step n="5b" goal="Workflow-Assisted Agent Creation" optional="true">
<action>Extract key information from v4 agent:</action>
- Name and purpose
- Commands and functionality
- Persona traits
- Any special behaviors
<invoke-workflow>
workflow: {project-root}/bmad/bmb/workflows/create-agent/workflow.yaml
inputs:
- agent_name: {{extracted_name}}
- agent_purpose: {{extracted_purpose}}
- commands: {{extracted_commands}}
- persona: {{extracted_persona}}
</invoke-workflow>
<goto step="6">Continue to Validation</goto>
</step>
<step n="5c" goal="Template-to-Workflow Conversion" optional="true">
<action>Convert v4 Template (YAML) to v6 Workflow:</action>
1. Extract template metadata:
- Template id, name, version → workflow.yaml name/description
- Output settings → default_output_file
- Workflow mode (interactive/yolo) → workflow settings
2. Convert template sections to instructions.md:
- Each YAML section → workflow step
- `elicit: true``<invoke-task halt="true">{project-root}/bmad/core/tasks/adv-elicit.xml</invoke-task>` tag
- Conditional sections → `if="condition"` attribute
- Repeatable sections → `repeat="for-each"` attribute
- Section instructions → step content
3. Extract template structure to template.md:
- Section content fields → template structure
- {{variables}} → preserve as-is
- Nested sections → hierarchical markdown
4. Handle v4 create-doc.md task integration:
- Elicitation methods (1-9 menu) → convert to v6 elicitation
- Agent permissions → note in instructions
- Processing flow → integrate into workflow steps
<critical>When invoking create-workflow, the standard config block will be automatically added:</critical>
```yaml
# Critical variables from config
config_source: '{project-root}/bmad/{{target_module}}/config.yaml'
output_folder: '{config_source}:output_folder'
user_name: '{config_source}:user_name'
communication_language: '{config_source}:communication_language'
date: system-generated
```
<invoke-workflow>
workflow: {project-root}/bmad/bmb/workflows/create-workflow/workflow.yaml
inputs:
- workflow_name: {{template_name}}
- workflow_type: document
- template_structure: {{extracted_template}}
- instructions: {{converted_sections}}
</invoke-workflow>
<action>Verify the created workflow.yaml includes standard config block</action>
<action>Update converted instructions to use config variables where appropriate</action>
<goto step="6">Continue to Validation</goto>
</step>
<step n="5d" goal="Module Creation" optional="true">
<action>Analyze module structure and components</action>
<action>Create module blueprint with all components</action>
<invoke-workflow>
workflow: {project-root}/bmad/bmb/workflows/create-module/workflow.yaml
inputs:
- module_name: {{module_name}}
- components: {{component_list}}
</invoke-workflow>
<goto step="6">Continue to Validation</goto>
</step>
<step n="5e" goal="Task-to-Workflow Conversion" optional="true">
<action>Convert v4 Task (Markdown) to v6 Workflow:</action>
1. Analyze task purpose and output:
- Does it generate documents? → Create template.md
- Does it process data? → Action workflow
- Does it guide user interaction? → Interactive workflow
- Check for file outputs, templates, or document generation
2. Extract task components:
- Execution notices and critical rules → workflow.yaml metadata
- Step-by-step instructions → instructions.md steps
- Decision trees and branching → flow control tags
- User interaction patterns → appropriate v6 tags
3. Based on confirmed workflow type:
<check if="Document workflow">
- Create template.md from output patterns
- Map generation steps to instructions
- Add template-output tags for sections
</check>
<check if="Action workflow">
- Set template: false in workflow.yaml
- Focus on action sequences in instructions
- Preserve execution logic
</check>
4. Handle special v4 patterns:
- 1-9 elicitation menus → v6 <invoke-task halt="true">{project-root}/bmad/core/tasks/adv-elicit.xml</invoke-task>
- Agent permissions → note in instructions
- YOLO mode → autonomous flag or optional steps
- Critical notices → workflow.yaml comments
<critical>When invoking create-workflow, the standard config block will be automatically added:</critical>
```yaml
# Critical variables from config
config_source: '{project-root}/bmad/{{target_module}}/config.yaml'
output_folder: '{config_source}:output_folder'
user_name: '{config_source}:user_name'
communication_language: '{config_source}:communication_language'
date: system-generated
```
<invoke-workflow>
workflow: {project-root}/bmad/bmb/workflows/create-workflow/workflow.yaml
inputs:
- workflow_name: {{task_name}}
- workflow_type: {{confirmed_workflow_type}}
- instructions: {{extracted_task_logic}}
- template: {{generated_template_if_document}}
</invoke-workflow>
<action>Verify the created workflow.yaml includes standard config block</action>
<action>Update converted instructions to use config variables where appropriate</action>
<goto step="6">Continue to Validation</goto>
</step>
<step n="6" goal="Validate Conversion">
<action>Run validation checks on converted item:</action>
For Agents:
- [ ] Valid YAML structure (.agent.yaml)
- [ ] All required sections present (metadata, persona, menu)
- [ ] Menu items properly formatted (trigger, description, handlers)
- [ ] Paths use {project-root} variables
For Workflows:
- [ ] Valid YAML syntax
- [ ] Instructions follow v6 conventions
- [ ] Template variables match
- [ ] File structure correct
**Standard Config Validation (Workflows):**
- [ ] workflow.yaml contains standard config block:
- config_source defined
- output_folder, user_name, communication_language pulled from config
- date set to system-generated
- [ ] Converted instructions use config variables where appropriate
- [ ] Template includes config variables in metadata (if document workflow)
- [ ] No hardcoded paths that should use {output_folder}
- [ ] No generic greetings that should use {user_name}
For Modules:
- [ ] All components converted
- [ ] Proper folder structure
- [ ] Config files valid
- [ ] Installation ready
<action>Show validation results to user</action>
<ask>Any issues to fix before finalizing? (y/n)</ask>
<check if="yes">
<action>Address specific issues</action>
<goto step="6">Re-validate</goto>
</check>
</step>
<step n="7" goal="Migration Report">
<action>Generate conversion report showing:</action>
- Original v4 location
- New v6 location
- Items converted
- Any manual adjustments needed
- Warnings or notes
<action>Save report to: {output_folder}/conversion-report-{{date}}.md</action>
<action>Inform {user_name} in {communication_language} that the conversion report has been generated</action>
</step>
<step n="8" goal="Cleanup and Finalize">
<ask>Archive original v4 files? (y/n)</ask>
<action if="yes">Move v4 files to: {project-root}/archive/v4-legacy/{{date}}/</action>
<action>Show user the final converted items and their locations</action>
<action>Provide any post-conversion instructions or recommendations</action>
<ask>Would you like to convert another legacy item? (y/n)</ask>
<action if="yes"><goto step="1">Start new conversion</goto></action>
</step>
</workflow>

View File

@ -1,32 +0,0 @@
# Convert Legacy - BMAD v4 to v6 Converter Configuration
name: "convert-legacy"
description: "Converts legacy BMAD v4 or similar items (agents, workflows, modules) to BMad Core compliant format with proper structure and conventions"
author: "BMad"
# Critical variables load from config_source
config_source: "{project-root}/bmad/bmb/config.yaml"
output_folder: "{config_source}:output_folder"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
date: system-generated
# Optional docs that can be provided as input
recommended_inputs:
- legacy_file: "Path to v4 agent, workflow, or module to convert"
# Module path and component files
installed_path: "{project-root}/bmad/bmb/workflows/convert-legacy"
template: false # This is an action/meta workflow - no template needed
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Output configuration - Creates converted items in appropriate module locations
default_output_folder: "{project-root}/bmad/{{target_module}}/{{item_type}}/{{item_name}}"
# Sub-workflows that may be invoked for conversion
sub_workflows:
- create_agent: "{project-root}/bmad/bmb/workflows/create-agent/workflow.yaml"
- create_workflow: "{project-root}/bmad/bmb/workflows/create-workflow/workflow.yaml"
- create_module: "{project-root}/bmad/bmb/workflows/create-module/workflow.yaml"
standalone: true

View File

@ -1,320 +0,0 @@
# Build Agent
## Overview
The Build Agent workflow is an interactive agent builder that guides you through creating BMAD Core compliant agents as YAML source files that compile to final `.md` during install. It supports three agent types: Simple (self-contained), Expert (with sidecar resources), and Module (full-featured with workflows).
## Key Features
- **Optional Brainstorming**: Creative ideation session before agent building to explore concepts and personalities
- **Three Agent Types**: Simple, Expert, and Module agents with appropriate structures
- **Persona Development**: Guided creation of role, identity, communication style, and principles
- **Command Builder**: Interactive command definition with workflow/task/action patterns
- **Validation Built-In**: Ensures YAML structure and BMAD Core compliance
- **Customize Support**: Optional `customize.yaml` for persona/menu overrides and critical actions
- **Sidecar Resources**: Setup for Expert agents with domain-specific data
## Usage
### Basic Invocation
```bash
workflow create-agent
```
### Through BMad Builder Agent
```
*create-agent
```
### With Brainstorming Session
The workflow includes an optional brainstorming phase (Step -1) that helps you explore agent concepts, personalities, and capabilities before building. This is particularly useful when you have a vague idea and want to develop it into a concrete agent concept.
### What You'll Be Asked
0. **Optional brainstorming** (vague idea → refined concept)
1. Agent type (Simple, Expert, or Module)
2. Basic identity (name, title, icon, filename)
3. Module assignment (for Module agents)
4. Sidecar resources (for Expert agents)
5. Persona elements (role, identity, style, principles)
6. Commands and their implementations
7. Critical actions (optional)
8. Activation rules (optional, rarely needed)
## Workflow Structure
### Files Included
```
create-agent/
├── workflow.yaml # Configuration
├── instructions.md # Step-by-step guide
├── checklist.md # Validation criteria
├── README.md # This file
├── agent-types.md # Agent type documentation
├── agent-architecture.md # Architecture patterns
├── agent-command-patterns.md # Command patterns reference
└── communication-styles.md # Style examples
```
## Workflow Process
### Phase 0: Optional Brainstorming (Step -1)
- Creative ideation session using diverse brainstorming techniques
- Explore agent concepts, personalities, and capabilities
- Generate character ideas, expertise areas, and command concepts
- Output feeds directly into agent identity and persona development
### Phase 1: Agent Setup (Steps 0-2)
- Load agent building documentation and patterns
- Choose agent type (Simple/Expert/Module)
- Define basic identity (name, title, icon, filename) - informed by brainstorming if completed
- Assign to module (for Module agents)
### Phase 2: Persona Development (Steps 2-3)
- Define role and responsibilities - leveraging brainstorming insights if available
- Craft unique identity and backstory
- Select communication style - can use brainstormed personality concepts
- Establish guiding principles
- Add critical actions (optional)
### Phase 3: Command Building (Step 4)
- Add *help and *exit commands (required)
- Define workflow commands (most common)
- Add task commands (for single operations)
- Create action commands (inline logic)
- Configure command attributes
### Phase 4: Finalization (Steps 5-10)
- Confirm activation behavior (mostly automatic)
- Generate `.agent.yaml` file
- Optionally create a customize file for overrides
- Setup sidecar resources (for Expert agents)
- Validate YAML and compile to `.md`
- Provide usage instructions
## Output
### Generated Files
#### For Standalone Agents (not part of a module)
- **YAML Source**: `{custom_agent_location}/{{agent_filename}}.agent.yaml` (default: `bmad/agents/`)
- **Installation Location**: `{project-root}/bmad/agents/{{agent_filename}}.md`
- **Compilation**: Run the BMAD Method installer and select "Compile Agents (Quick rebuild of all agent .md files)"
#### For Module Agents
- **YAML Source**: `src/modules/{{target_module}}/agents/{{agent_filename}}.agent.yaml`
- **Installation Location**: `{project-root}/bmad/{{module}}/agents/{{agent_filename}}.md`
- **Compilation**: Automatic during module installation
### YAML Agent Structure (simplified)
```yaml
agent:
metadata:
id: bmad/{{module}}/agents/{{agent_filename}}.md
name: { { agent_name } }
title: { { agent_title } }
icon: { { agent_icon } }
module: { { module } }
persona:
role: '...'
identity: '...'
communication_style: '...'
principles: ['...', '...']
menu:
- trigger: example
workflow: '{project-root}/path/to/workflow.yaml'
description: Do the thing
```
### Optional Customize File
If created, generates at:
`{project-root}/bmad/_cfg/agents/{{module}}-{{agent_filename}}.customize.yaml`
## Installation and Compilation
### Agent Installation Locations
Agents are installed to different locations based on their type:
1. **Standalone Agents** (not part of a module)
- Source: Created in your custom agent location (default: `bmad/agents/`)
- Installed to: `{project-root}/bmad/agents/`
- Compilation: Run BMAD Method installer and select "Compile Agents"
2. **Module Agents** (part of BMM, BMB, or custom modules)
- Source: Created in `src/modules/{module}/agents/`
- Installed to: `{project-root}/bmad/{module}/agents/`
- Compilation: Automatic during module installation
### Compilation Process
The installer compiles YAML agent definitions to Markdown:
```bash
# For standalone agents
npm run build:agents
# For all BMad components (includes agents)
npm run install:bmad
# Using the installer menu
npm run installer
# Then select: Compile Agents
```
### Build Commands
Additional build commands for agent management:
```bash
# Build specific agent types
npx bmad-method build:agents # Build standalone agents
npx bmad-method build:modules # Build module agents (with modules)
# Full rebuild
npx bmad-method build:all # Rebuild everything
```
## Requirements
- BMAD Core v6 project structure
- Module to host the agent (for Module agents)
- Understanding of agent purpose and commands
- Workflows/tasks to reference in commands (or mark as "todo")
## Brainstorming Integration
The optional brainstorming phase (Step -1) provides a seamless path from vague idea to concrete agent concept:
### When to Use Brainstorming
- **Vague concept**: "I want an agent that helps with data stuff"
- **Creative exploration**: Want to discover unique personality and approach
- **Team building**: Creating agents for a module with specific roles
- **Character development**: Need to flesh out agent personality and voice
### Brainstorming Flow
1. **Step -1**: Optional brainstorming session
- Uses CIS brainstorming workflow with agent-specific context
- Explores identity, personality, expertise, and command concepts
- Generates detailed character and capability ideas
2. **Steps 0-2**: Agent setup informed by brainstorming
- Brainstorming output guides agent type selection
- Character concepts inform basic identity choices
- Personality insights shape persona development
3. **Seamless transition**: Vague idea → brainstormed concept → built agent
### Key Principle
Users can go from **vague idea → brainstormed concept → built agent** in one continuous flow, with brainstorming output directly feeding into agent development.
## Best Practices
### Before Starting
1. Review example agents in `/bmad/bmm/agents/` for patterns
2. Consider using brainstorming if you have a vague concept to develop
3. Have a clear vision of the agent's role and personality (or use brainstorming to develop it)
4. List the commands/capabilities the agent will need
5. Identify any workflows or tasks the agent will invoke
### During Execution
1. **Agent Names**: Use memorable names that reflect personality
2. **Icons**: Choose an emoji that represents the agent's role
3. **Persona**: Make it distinct and consistent with communication style
4. **Commands**: Use kebab-case, start custom commands with letter (not \*)
5. **Workflows**: Reference existing workflows or mark as "todo" to implement later
### After Completion
1. **Compile the agent**:
- For standalone agents: Run `npm run build:agents` or use the installer menu
- For module agents: Automatic during module installation
2. **Test the agent**: Use the compiled `.md` agent in your IDE
3. **Implement placeholders**: Complete any "todo" workflows referenced
4. **Refine as needed**: Use customize file for persona adjustments
5. **Evolve over time**: Add new commands as requirements emerge
## Agent Types
### Simple Agent
- **Best For**: Self-contained utilities, simple assistants
- **Characteristics**: Embedded logic, no external dependencies
- **Example**: Calculator agent, random picker, simple formatter
### Expert Agent
- **Best For**: Domain-specific agents with data/memory
- **Characteristics**: Sidecar folders, domain restrictions, memory files
- **Example**: Diary keeper, project journal, personal knowledge base
### Module Agent
- **Best For**: Full-featured agents with workflows
- **Characteristics**: Part of module, commands invoke workflows
- **Example**: Product manager, architect, research assistant
## Troubleshooting
### Issue: Agent won't load
- **Solution**: Validate XML structure is correct
- **Check**: Ensure all required tags present (persona, cmds)
### Issue: Commands don't work
- **Solution**: Verify workflow paths are correct or marked "todo"
- **Check**: Test workflow invocation separately first
### Issue: Persona feels generic
- **Solution**: Review communication styles guide
- **Check**: Make identity unique and specific to role
## Customization
To modify agent building process:
1. Edit `instructions.md` to change steps
2. Update `agent-types.md` to add new agent patterns
3. Modify `agent-command-patterns.md` for new command types
4. Edit `communication-styles.md` to add personality examples
## Version History
- **v6.0.0** - BMAD Core v6 compatible
- Three agent types (Simple/Expert/Module)
- Enhanced persona development
- Command pattern library
- Validation framework
## Support
For issues or questions:
- Review example agents in `/bmad/bmm/agents/`
- Check agent documentation in this workflow folder
- Test with simple agents first, then build complexity
- Consult BMAD Method v6 documentation
---
_Part of the BMad Method v6 - BMB (BMad Builder) Module_

View File

@ -1,419 +0,0 @@
# BMAD Agent Architecture Reference
_LLM-Optimized Technical Documentation for Agent Building_
## Core Agent Structure
### Minimal Valid Agent
```xml
<!-- Powered by BMAD-CORE™ -->
# Agent Name
<agent id="path/to/agent.md" name="Name" title="Title" icon="🤖">
<persona>
<role>My primary function</role>
<identity>My background and expertise</identity>
<communication_style>How I interact</communication_style>
<principles>My core beliefs and methodology</principles>
</persona>
<menu>
<item cmd="*help">Show numbered menu</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```
## Agent XML Schema
### Root Element: `<agent>`
**Required Attributes:**
- `id` - Unique path identifier (e.g., "bmad/bmm/agents/analyst.md")
- `name` - Agent's name (e.g., "Mary", "John", "Helper")
- `title` - Professional title (e.g., "Business Analyst", "Security Engineer")
- `icon` - Single emoji representing the agent
### Core Sections
#### 1. Persona Section (REQUIRED)
```xml
<persona>
<role>1-2 sentences: Professional title and primary expertise, use first-person voice</role>
<identity>2-5 sentences: Background, experience, specializations, use first-person voice</identity>
<communication_style>1-3 sentences: Interaction approach, tone, quirks, use first-person voice</communication_style>
<principles>2-5 sentences: Core beliefs, methodology, philosophy, use first-person voice</principles>
</persona>
```
**Best Practices:**
- Role: Be specific about expertise area
- Identity: Include experience indicators (years, depth)
- Communication: Describe HOW they interact, not just tone and quirks
- Principles: Start with "I believe" or "I operate" for first-person voice
#### 2. Critical Actions Section
```xml
<critical-actions>
<i>Load into memory {project-root}/bmad/{module}/config.yaml and set variables</i>
<i>Remember the users name is {user_name}</i>
<i>ALWAYS communicate in {communication_language}</i>
<!-- Custom initialization actions -->
</critical-actions>
```
**For Expert Agents with Sidecars (CRITICAL):**
```xml
<critical-actions>
<!-- CRITICAL: Load sidecar files FIRST -->
<i critical="MANDATORY">Load COMPLETE file {agent-folder}/instructions.md and follow ALL directives</i>
<i critical="MANDATORY">Load COMPLETE file {agent-folder}/memories.md into permanent context</i>
<i critical="MANDATORY">You MUST follow all rules in instructions.md on EVERY interaction</i>
<!-- Standard initialization -->
<i>Load into memory {project-root}/bmad/{module}/config.yaml and set variables</i>
<i>Remember the users name is {user_name}</i>
<i>ALWAYS communicate in {communication_language}</i>
<!-- Domain restrictions -->
<i>ONLY read/write files in {user-folder}/diary/ - NO OTHER FOLDERS</i>
</critical-actions>
```
**Common Patterns:**
- Config loading for module agents
- User context initialization
- Language preferences
- **Sidecar file loading (Expert agents) - MUST be explicit and CRITICAL**
- **Domain restrictions (Expert agents) - MUST be enforced**
#### 3. Menu Section (REQUIRED)
```xml
<menu>
<item cmd="*trigger" [attributes]>Description</item>
</menu>
```
**Command Attributes:**
- `run-workflow="{path}"` - Executes a workflow
- `exec="{path}"` - Executes a task
- `tmpl="{path}"` - Template reference
- `data="{path}"` - Data file reference
**Required Menu Items:**
- `*help` - Always first, shows command list
- `*exit` - Always last, exits agent
## Advanced Agent Patterns
### Activation Rules (OPTIONAL)
```xml
<activation critical="true">
<initialization critical="true" sequential="MANDATORY">
<step n="1">Load configuration</step>
<step n="2">Apply overrides</step>
<step n="3">Execute critical actions</step>
<step n="4" critical="BLOCKING">Show greeting with menu</step>
<step n="5" critical="BLOCKING">AWAIT user input</step>
</initialization>
<command-resolution critical="true">
<rule>Numeric input → Execute command at cmd_map[n]</rule>
<rule>Text input → Fuzzy match against commands</rule>
</command-resolution>
</activation>
```
### Expert Agent Sidecar Pattern
```xml
<!-- DO NOT use sidecar-resources tag - Instead use critical-actions -->
<!-- Sidecar files MUST be loaded explicitly in critical-actions -->
<!-- Example Expert Agent with Diary domain -->
<agent id="diary-keeper" name="Personal Assistant" title="Diary Keeper" icon="📔">
<critical-actions>
<!-- MANDATORY: Load all sidecar files -->
<i critical="MANDATORY">Load COMPLETE file {agent-folder}/diary-rules.md</i>
<i critical="MANDATORY">Load COMPLETE file {agent-folder}/user-memories.md</i>
<i critical="MANDATORY">Follow ALL rules from diary-rules.md</i>
<!-- Domain restriction -->
<i critical="MANDATORY">ONLY access files in {user-folder}/diary/</i>
<i critical="MANDATORY">NEVER access files outside diary folder</i>
</critical-actions>
<persona>...</persona>
<menu>...</menu>
</agent>
```
### Module Agent Integration
```xml
<module-integration>
<module-path>{project-root}/bmad/{module-code}</module-path>
<config-source>{module-path}/config.yaml</config-source>
<workflows-path>{project-root}/bmad/{module-code}/workflows</workflows-path>
</module-integration>
```
## Variable System
### System Variables
- `{project-root}` - Root directory of project
- `{user_name}` - User's name from config
- `{communication_language}` - Language preference
- `{date}` - Current date
- `{module}` - Current module code
### Config Variables
Format: `{config_source}:variable_name`
Example: `{config_source}:output_folder`
### Path Construction
```
Good: {project-root}/bmad/{module}/agents/
Bad: /absolute/path/to/agents/
Bad: ../../../relative/paths/
```
## Command Patterns
### Workflow Commands
```xml
<!-- Full path -->
<item cmd="*create-prd" run-workflow="{project-root}/bmad/bmm/workflows/prd/workflow.yaml">
Create Product Requirements Document
</item>
<!-- Placeholder for future -->
<item cmd="*analyze" run-workflow="todo">
Perform analysis (workflow to be created)
</item>
```
### Task Commands
```xml
<item cmd="*validate" exec="{project-root}/bmad/core/tasks/validate-workflow.xml">
Validate document
</item>
```
### Template Commands
```xml
<item cmd="*brief"
exec="{project-root}/bmad/core/tasks/create-doc.md"
tmpl="{project-root}/bmad/bmm/templates/brief.md">
Create project brief
</item>
```
### Data-Driven Commands
```xml
<item cmd="*standup"
exec="{project-root}/bmad/bmm/tasks/daily-standup.xml"
data="{project-root}/bmad/_cfg/agent-manifest.csv">
Run daily standup
</item>
```
## Agent Type Specific Patterns
### Simple Agent
- Self-contained logic
- Minimal or no external dependencies
- May have embedded functions
- Good for utilities and converters
### Expert Agent
- Domain-specific with sidecar resources
- Restricted access patterns
- Memory/context files
- Good for specialized domains
### Module Agent
- Full integration with module
- Multiple workflows and tasks
- Config-driven behavior
- Good for professional tools
## Common Anti-Patterns to Avoid
### ❌ Bad Practices
```xml
<!-- Missing required persona elements -->
<persona>
<role>Helper</role>
<!-- Missing identity, style, principles -->
</persona>
<!-- Hard-coded paths -->
<item cmd="*run" exec="/Users/john/project/task.md">
<!-- No help command -->
<menu>
<item cmd="*do-something">Action</item>
<!-- Missing *help -->
</menu>
<!-- Duplicate command triggers -->
<item cmd="*analyze">First</item>
<item cmd="*analyze">Second</item>
```
### ✅ Good Practices
```xml
<!-- Complete persona -->
<persona>
<role>Data Analysis Expert</role>
<identity>Senior analyst with 10+ years...</identity>
<communication_style>Analytical and precise...</communication_style>
<principles>I believe in data-driven...</principles>
</persona>
<!-- Variable-based paths -->
<item cmd="*run" exec="{project-root}/bmad/module/task.md">
<!-- Required commands present -->
<menu>
<item cmd="*help">Show commands</item>
<item cmd="*analyze">Perform analysis</item>
<item cmd="*exit">Exit</item>
</menu>
```
## Agent Lifecycle
### 1. Initialization
1. Load agent file
2. Parse XML structure
3. Load critical-actions
4. Apply config overrides
5. Present greeting
### 2. Command Loop
1. Show numbered menu
2. Await user input
3. Resolve command
4. Execute action
5. Return to menu
### 3. Termination
1. User enters \*exit
2. Cleanup if needed
3. Exit persona
## Testing Checklist
Before deploying an agent:
- [ ] Valid XML structure
- [ ] All persona elements present
- [ ] *help and *exit commands exist
- [ ] All paths use variables
- [ ] No duplicate commands
- [ ] Config loading works
- [ ] Commands execute properly
## LLM Building Tips
When building agents:
1. Start with agent type (Simple/Expert/Module)
2. Define complete persona first
3. Add standard critical-actions
4. Include *help and *exit
5. Add domain commands
6. Test command execution
7. Validate with checklist
## Integration Points
### With Workflows
- Agents invoke workflows via run-workflow
- Workflows can be incomplete (marked "todo")
- Workflow paths must be valid or "todo"
**Workflow Interaction Styles** (BMAD v6 default):
- **Intent-based + Interactive**: Workflows adapt to user context and skill level
- Workflows collaborate with users, not just extract data
- See workflow-creation-guide.md "Instruction Styles" section for details
- When creating workflows for your agent, default to intent-based unless you need prescriptive control
### With Tasks
- Tasks are single operations
- Executed via exec attribute
- Can include data files
### With Templates
- Templates define document structure
- Used with create-doc task
- Variables passed through
## Quick Reference
### Minimal Commands
```xml
<menu>
<item cmd="*help">Show numbered cmd list</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
```
### Standard Critical Actions
```xml
<critical-actions>
<i>Load into memory {project-root}/bmad/{module}/config.yaml</i>
<i>Remember the users name is {user_name}</i>
<i>ALWAYS communicate in {communication_language}</i>
</critical-actions>
```
### Module Agent Pattern
```xml
<agent id="bmad/{module}/agents/{name}.md"
name="{Name}"
title="{Title}"
icon="{emoji}">
<persona>...</persona>
<critical-actions>...</critical-actions>
<menu>
<item cmd="*help">...</item>
<item cmd="*{command}" run-workflow="{path}">...</item>
<item cmd="*exit">...</item>
</menu>
</agent>
```

View File

@ -1,412 +0,0 @@
# BMAD Agent Architecture Reference
_LLM-Optimized Technical Documentation for Agent Building_
## Core Agent Structure
### Minimal Valid Agent
```xml
<!-- Powered by BMAD-CORE™ -->
# Agent Name
<agent id="path/to/agent.md" name="Name" title="Title" icon="🤖">
<persona>
<role>My primary function</role>
<identity>My background and expertise</identity>
<communication_style>How I interact</communication_style>
<principles>My core beliefs and methodology</principles>
</persona>
<menu>
<item cmd="*help">Show numbered menu</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```
## Agent XML Schema
### Root Element: `<agent>`
**Required Attributes:**
- `id` - Unique path identifier (e.g., "bmad/bmm/agents/analyst.md")
- `name` - Agent's name (e.g., "Mary", "John", "Helper")
- `title` - Professional title (e.g., "Business Analyst", "Security Engineer")
- `icon` - Single emoji representing the agent
### Core Sections
#### 1. Persona Section (REQUIRED)
```xml
<persona>
<role>1-2 sentences: Professional title and primary expertise, use first-person voice</role>
<identity>2-5 sentences: Background, experience, specializations, use first-person voice</identity>
<communication_style>1-3 sentences: Interaction approach, tone, quirks, use first-person voice</communication_style>
<principles>2-5 sentences: Core beliefs, methodology, philosophy, use first-person voice</principles>
</persona>
```
**Best Practices:**
- Role: Be specific about expertise area
- Identity: Include experience indicators (years, depth)
- Communication: Describe HOW they interact, not just tone and quirks
- Principles: Start with "I believe" or "I operate" for first-person voice
#### 2. Critical Actions Section
```xml
<critical-actions>
<i>Load into memory {project-root}/bmad/{module}/config.yaml and set variables</i>
<i>Remember the users name is {user_name}</i>
<i>ALWAYS communicate in {communication_language}</i>
<!-- Custom initialization actions -->
</critical-actions>
```
**For Expert Agents with Sidecars (CRITICAL):**
```xml
<critical-actions>
<!-- CRITICAL: Load sidecar files FIRST -->
<i critical="MANDATORY">Load COMPLETE file {agent-folder}/instructions.md and follow ALL directives</i>
<i critical="MANDATORY">Load COMPLETE file {agent-folder}/memories.md into permanent context</i>
<i critical="MANDATORY">You MUST follow all rules in instructions.md on EVERY interaction</i>
<!-- Standard initialization -->
<i>Load into memory {project-root}/bmad/{module}/config.yaml and set variables</i>
<i>Remember the users name is {user_name}</i>
<i>ALWAYS communicate in {communication_language}</i>
<!-- Domain restrictions -->
<i>ONLY read/write files in {user-folder}/diary/ - NO OTHER FOLDERS</i>
</critical-actions>
```
**Common Patterns:**
- Config loading for module agents
- User context initialization
- Language preferences
- **Sidecar file loading (Expert agents) - MUST be explicit and CRITICAL**
- **Domain restrictions (Expert agents) - MUST be enforced**
#### 3. Menu Section (REQUIRED)
```xml
<menu>
<item cmd="*trigger" [attributes]>Description</item>
</menu>
```
**Command Attributes:**
- `run-workflow="{path}"` - Executes a workflow
- `exec="{path}"` - Executes a task
- `tmpl="{path}"` - Template reference
- `data="{path}"` - Data file reference
**Required Menu Items:**
- `*help` - Always first, shows command list
- `*exit` - Always last, exits agent
## Advanced Agent Patterns
### Activation Rules (OPTIONAL)
```xml
<activation critical="true">
<initialization critical="true" sequential="MANDATORY">
<step n="1">Load configuration</step>
<step n="2">Apply overrides</step>
<step n="3">Execute critical actions</step>
<step n="4" critical="BLOCKING">Show greeting with menu</step>
<step n="5" critical="BLOCKING">AWAIT user input</step>
</initialization>
<command-resolution critical="true">
<rule>Numeric input → Execute command at cmd_map[n]</rule>
<rule>Text input → Fuzzy match against commands</rule>
</command-resolution>
</activation>
```
### Expert Agent Sidecar Pattern
```xml
<!-- DO NOT use sidecar-resources tag - Instead use critical-actions -->
<!-- Sidecar files MUST be loaded explicitly in critical-actions -->
<!-- Example Expert Agent with Diary domain -->
<agent id="diary-keeper" name="Personal Assistant" title="Diary Keeper" icon="📔">
<critical-actions>
<!-- MANDATORY: Load all sidecar files -->
<i critical="MANDATORY">Load COMPLETE file {agent-folder}/diary-rules.md</i>
<i critical="MANDATORY">Load COMPLETE file {agent-folder}/user-memories.md</i>
<i critical="MANDATORY">Follow ALL rules from diary-rules.md</i>
<!-- Domain restriction -->
<i critical="MANDATORY">ONLY access files in {user-folder}/diary/</i>
<i critical="MANDATORY">NEVER access files outside diary folder</i>
</critical-actions>
<persona>...</persona>
<menu>...</menu>
</agent>
```
### Module Agent Integration
```xml
<module-integration>
<module-path>{project-root}/bmad/{module-code}</module-path>
<config-source>{module-path}/config.yaml</config-source>
<workflows-path>{project-root}/bmad/{module-code}/workflows</workflows-path>
</module-integration>
```
## Variable System
### System Variables
- `{project-root}` - Root directory of project
- `{user_name}` - User's name from config
- `{communication_language}` - Language preference
- `{date}` - Current date
- `{module}` - Current module code
### Config Variables
Format: `{config_source}:variable_name`
Example: `{config_source}:output_folder`
### Path Construction
```
Good: {project-root}/bmad/{module}/agents/
Bad: /absolute/path/to/agents/
Bad: ../../../relative/paths/
```
## Command Patterns
### Workflow Commands
```xml
<!-- Full path -->
<item cmd="*create-prd" run-workflow="{project-root}/bmad/bmm/workflows/prd/workflow.yaml">
Create Product Requirements Document
</item>
<!-- Placeholder for future -->
<item cmd="*analyze" run-workflow="todo">
Perform analysis (workflow to be created)
</item>
```
### Task Commands
```xml
<item cmd="*validate" exec="{project-root}/bmad/core/tasks/validate-workflow.xml">
Validate document
</item>
```
### Template Commands
```xml
<item cmd="*brief"
exec="{project-root}/bmad/core/tasks/create-doc.md"
tmpl="{project-root}/bmad/bmm/templates/brief.md">
Create project brief
</item>
```
### Data-Driven Commands
```xml
<item cmd="*standup"
exec="{project-root}/bmad/bmm/tasks/daily-standup.xml"
data="{project-root}/bmad/_cfg/agent-manifest.csv">
Run daily standup
</item>
```
## Agent Type Specific Patterns
### Simple Agent
- Self-contained logic
- Minimal or no external dependencies
- May have embedded functions
- Good for utilities and converters
### Expert Agent
- Domain-specific with sidecar resources
- Restricted access patterns
- Memory/context files
- Good for specialized domains
### Module Agent
- Full integration with module
- Multiple workflows and tasks
- Config-driven behavior
- Good for professional tools
## Common Anti-Patterns to Avoid
### ❌ Bad Practices
```xml
<!-- Missing required persona elements -->
<persona>
<role>Helper</role>
<!-- Missing identity, style, principles -->
</persona>
<!-- Hard-coded paths -->
<item cmd="*run" exec="/Users/john/project/task.md">
<!-- No help command -->
<menu>
<item cmd="*do-something">Action</item>
<!-- Missing *help -->
</menu>
<!-- Duplicate command triggers -->
<item cmd="*analyze">First</item>
<item cmd="*analyze">Second</item>
```
### ✅ Good Practices
```xml
<!-- Complete persona -->
<persona>
<role>Data Analysis Expert</role>
<identity>Senior analyst with 10+ years...</identity>
<communication_style>Analytical and precise...</communication_style>
<principles>I believe in data-driven...</principles>
</persona>
<!-- Variable-based paths -->
<item cmd="*run" exec="{project-root}/bmad/module/task.md">
<!-- Required commands present -->
<menu>
<item cmd="*help">Show commands</item>
<item cmd="*analyze">Perform analysis</item>
<item cmd="*exit">Exit</item>
</menu>
```
## Agent Lifecycle
### 1. Initialization
1. Load agent file
2. Parse XML structure
3. Load critical-actions
4. Apply config overrides
5. Present greeting
### 2. Command Loop
1. Show numbered menu
2. Await user input
3. Resolve command
4. Execute action
5. Return to menu
### 3. Termination
1. User enters \*exit
2. Cleanup if needed
3. Exit persona
## Testing Checklist
Before deploying an agent:
- [ ] Valid XML structure
- [ ] All persona elements present
- [ ] *help and *exit commands exist
- [ ] All paths use variables
- [ ] No duplicate commands
- [ ] Config loading works
- [ ] Commands execute properly
## LLM Building Tips
When building agents:
1. Start with agent type (Simple/Expert/Module)
2. Define complete persona first
3. Add standard critical-actions
4. Include *help and *exit
5. Add domain commands
6. Test command execution
7. Validate with checklist
## Integration Points
### With Workflows
- Agents invoke workflows via run-workflow
- Workflows can be incomplete (marked "todo")
- Workflow paths must be valid or "todo"
### With Tasks
- Tasks are single operations
- Executed via exec attribute
- Can include data files
### With Templates
- Templates define document structure
- Used with create-doc task
- Variables passed through
## Quick Reference
### Minimal Commands
```xml
<menu>
<item cmd="*help">Show numbered cmd list</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
```
### Standard Critical Actions
```xml
<critical-actions>
<i>Load into memory {project-root}/bmad/{module}/config.yaml</i>
<i>Remember the users name is {user_name}</i>
<i>ALWAYS communicate in {communication_language}</i>
</critical-actions>
```
### Module Agent Pattern
```xml
<agent id="bmad/{module}/agents/{name}.md"
name="{Name}"
title="{Title}"
icon="{emoji}">
<persona>...</persona>
<critical-actions>...</critical-actions>
<menu>
<item cmd="*help">...</item>
<item cmd="*{command}" run-workflow="{path}">...</item>
<item cmd="*exit">...</item>
</menu>
</agent>
```

View File

@ -1,759 +0,0 @@
# BMAD Agent Command Patterns Reference
_LLM-Optimized Guide for Command Design_
## Important: How to Process Action References
When executing agent commands, understand these reference patterns:
```xml
<!-- Pattern 1: Inline action -->
<item cmd="*example" action="do this specific thing">Description</item>
→ Execute the text "do this specific thing" directly
<!-- Pattern 2: Internal reference with # prefix -->
<item cmd="*example" action="#prompt-id">Description</item>
→ Find <prompt id="prompt-id"> in the current agent and execute its content
<!-- Pattern 3: External file reference -->
<item cmd="*example" exec="{project-root}/path/to/file.md">Description</item>
→ Load and execute the external file
```
**The `#` prefix is your signal that this is an internal XML node reference, not a file path.**
## Command Anatomy
### Basic Structure
```xml
<menu>
<item cmd="*trigger" [attributes]>Description</item>
</menu>
```
**Components:**
- `cmd` - The trigger word (always starts with \*)
- `attributes` - Action directives (optional):
- `run-workflow` - Path to workflow YAML
- `exec` - Path to task/operation
- `tmpl` - Path to template (used with exec)
- `action` - Embedded prompt/instruction
- `data` - Path to supplementary data (universal)
- `Description` - What shows in menu
## Command Types
**Quick Reference:**
1. **Workflow Commands** - Execute multi-step workflows (`run-workflow`)
2. **Task Commands** - Execute single operations (`exec`)
3. **Template Commands** - Generate from templates (`exec` + `tmpl`)
4. **Meta Commands** - Agent control (no attributes)
5. **Action Commands** - Embedded prompts (`action`)
6. **Embedded Commands** - Logic in persona (no attributes)
**Universal Attributes:**
- `data` - Can be added to ANY command type for supplementary info
- `if` - Conditional execution (advanced pattern)
- `params` - Runtime parameters (advanced pattern)
### 1. Workflow Commands
Execute complete multi-step processes
```xml
<!-- Standard workflow -->
<item cmd="*create-prd"
run-workflow="{project-root}/bmad/bmm/workflows/prd/workflow.yaml">
Create Product Requirements Document
</item>
<!-- Workflow with validation -->
<item cmd="*validate-prd"
validate-workflow="{output_folder}/prd-draft.md"
workflow="{project-root}/bmad/bmm/workflows/prd/workflow.yaml">
Validate PRD Against Checklist
</item>
<!-- Auto-discover validation workflow from document -->
<item cmd="*validate-doc"
validate-workflow="{output_folder}/document.md">
Validate Document (auto-discover checklist)
</item>
<!-- Placeholder for future development -->
<item cmd="*analyze-data"
run-workflow="todo">
Analyze dataset (workflow coming soon)
</item>
```
**Workflow Attributes:**
- `run-workflow` - Execute a workflow to create documents
- `validate-workflow` - Validate an existing document against its checklist
- `workflow` - (optional with validate-workflow) Specify the workflow.yaml directly
**Best Practices:**
- Use descriptive trigger names
- Always use variable paths
- Mark incomplete as "todo"
- Description should be clear action
- Include validation commands for workflows that produce documents
### 2. Task Commands
Execute single operations
```xml
<!-- Simple task -->
<item cmd="*validate"
exec="{project-root}/bmad/core/tasks/validate-workflow.xml">
Validate document against checklist
</item>
<!-- Task with data -->
<item cmd="*standup"
exec="{project-root}/bmad/mmm/tasks/daily-standup.xml"
data="{project-root}/bmad/_cfg/agent-manifest.csv">
Run agile team standup
</item>
```
**Data Property:**
- Can be used with any command type
- Provides additional reference or context
- Path to supplementary files or resources
- Loaded at runtime for command execution
### 3. Template Commands
Generate documents from templates
```xml
<item cmd="*brief"
exec="{project-root}/bmad/core/tasks/create-doc.md"
tmpl="{project-root}/bmad/bmm/templates/brief.md">
Produce Project Brief
</item>
<item cmd="*competitor-analysis"
exec="{project-root}/bmad/core/tasks/create-doc.md"
tmpl="{project-root}/bmad/bmm/templates/competitor.md"
data="{project-root}/bmad/_data/market-research.csv">
Produce Competitor Analysis
</item>
```
### 4. Meta Commands
Agent control and information
```xml
<!-- Required meta commands -->
<item cmd="*help">Show numbered cmd list</item>
<item cmd="*exit">Exit with confirmation</item>
<!-- Optional meta commands -->
<item cmd="*yolo">Toggle Yolo Mode</item>
<item cmd="*status">Show current status</item>
<item cmd="*config">Show configuration</item>
```
### 5. Action Commands
Direct prompts embedded in commands (Simple agents)
#### Simple Action (Inline)
```xml
<!-- Short action attribute with embedded prompt -->
<item cmd="*list-tasks"
action="list all tasks from {project-root}/bmad/_cfg/task-manifest.csv">
List Available Tasks
</item>
<item cmd="*summarize"
action="summarize the key points from the current document">
Summarize Document
</item>
```
#### Complex Action (Referenced)
For multiline/complex prompts, define them separately and reference by id:
```xml
<agent name="Research Assistant">
<!-- Define complex prompts as separate nodes -->
<prompts>
<prompt id="deep-analysis">
Perform a comprehensive analysis following these steps:
1. Identify the main topic and key themes
2. Extract all supporting evidence and data points
3. Analyze relationships between concepts
4. Identify gaps or contradictions
5. Generate insights and recommendations
6. Create an executive summary
Format the output with clear sections and bullet points.
</prompt>
<prompt id="literature-review">
Conduct a systematic literature review:
1. Summarize each source's main arguments
2. Compare and contrast different perspectives
3. Identify consensus points and controversies
4. Evaluate the quality and relevance of sources
5. Synthesize findings into coherent themes
6. Highlight research gaps and future directions
Include proper citations and references.
</prompt>
</prompts>
<!-- Commands reference the prompts by id -->
<menu>
<item cmd="*help">Show numbered cmd list</item>
<item cmd="*deep-analyze"
action="#deep-analysis">
<!-- The # means: use the <prompt id="deep-analysis"> defined above -->
Perform Deep Analysis
</item>
<item cmd="*review-literature"
action="#literature-review"
data="{project-root}/bmad/_data/sources.csv">
Conduct Literature Review
</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```
**Reference Convention:**
- `action="#prompt-id"` means: "Find and execute the <prompt> node with id='prompt-id' within this agent"
- `action="inline text"` means: "Execute this text directly as the prompt"
- `exec="{path}"` means: "Load and execute external file at this path"
- The `#` prefix signals to the LLM: "This is an internal reference - look for a prompt node with this ID within the current agent XML"
**LLM Processing Instructions:**
When you see `action="#some-id"` in a command:
1. Look for `<prompt id="some-id">` within the same agent
2. Use the content of that prompt node as the instruction
3. If not found, report error: "Prompt 'some-id' not found in agent"
**Use Cases:**
- Quick operations (inline action)
- Complex multi-step processes (referenced prompt)
- Self-contained agents with task-like capabilities
- Reusable prompt templates within agent
### 6. Embedded Commands
Logic embedded in agent persona (Simple agents)
```xml
<!-- No exec/run-workflow/action attribute -->
<item cmd="*calculate">Perform calculation</item>
<item cmd="*convert">Convert format</item>
<item cmd="*generate">Generate output</item>
```
## Command Naming Conventions
### Action-Based Naming
```xml
*create- <!-- Generate new content -->
*build- <!-- Construct components -->
*analyze- <!-- Examine and report -->
*validate- <!-- Check correctness -->
*generate- <!-- Produce output -->
*update- <!-- Modify existing -->
*review- <!-- Examine quality -->
*test- <!-- Verify functionality -->
```
### Domain-Based Naming
```xml
*brainstorm <!-- Creative ideation -->
*architect <!-- Design systems -->
*refactor <!-- Improve code -->
*deploy <!-- Release to production -->
*monitor <!-- Watch systems -->
```
### Naming Anti-Patterns
```xml
<!-- ❌ Too vague -->
<item cmd="*do">Do something</item>
<!-- ❌ Too long -->
<item cmd="*create-comprehensive-product-requirements-document-with-analysis">
<!-- ❌ No verb -->
<item cmd="*prd">Product Requirements</item>
<!-- ✅ Clear and concise -->
<item cmd="*create-prd">Create Product Requirements Document</item>
```
## Command Organization
### Standard Order
```xml
<menu>
<!-- 1. Always first -->
<item cmd="*help">Show numbered cmd list</item>
<!-- 2. Primary workflows -->
<item cmd="*create-prd" run-workflow="...">Create PRD</item>
<item cmd="*create-module" run-workflow="...">Build module</item>
<!-- 3. Secondary actions -->
<item cmd="*validate" exec="...">Validate document</item>
<item cmd="*analyze" exec="...">Analyze code</item>
<!-- 4. Utility commands -->
<item cmd="*config">Show configuration</item>
<item cmd="*yolo">Toggle Yolo Mode</item>
<!-- 5. Always last -->
<item cmd="*exit">Exit with confirmation</item>
</menu>
```
### Grouping Strategies
**By Lifecycle:**
```xml
<menu>
<item cmd="*help">Help</item>
<!-- Planning -->
<item cmd="*brainstorm">Brainstorm ideas</item>
<item cmd="*plan">Create plan</item>
<!-- Building -->
<item cmd="*build">Build component</item>
<item cmd="*test">Test component</item>
<!-- Deployment -->
<item cmd="*deploy">Deploy to production</item>
<item cmd="*monitor">Monitor system</item>
<item cmd="*exit">Exit</item>
</menu>
```
**By Complexity:**
```xml
<menu>
<item cmd="*help">Help</item>
<!-- Simple -->
<item cmd="*quick-review">Quick review</item>
<!-- Standard -->
<item cmd="*create-doc">Create document</item>
<!-- Complex -->
<item cmd="*full-analysis">Comprehensive analysis</item>
<item cmd="*exit">Exit</item>
</menu>
```
## Command Descriptions
### Good Descriptions
```xml
<!-- Clear action and object -->
<item cmd="*create-prd">Create Product Requirements Document</item>
<!-- Specific outcome -->
<item cmd="*analyze-security">Perform security vulnerability analysis</item>
<!-- User benefit -->
<item cmd="*optimize">Optimize code for performance</item>
```
### Poor Descriptions
```xml
<!-- Too vague -->
<item cmd="*process">Process</item>
<!-- Technical jargon -->
<item cmd="*exec-wf-123">Execute WF123</item>
<!-- Missing context -->
<item cmd="*run">Run</item>
```
## The Data Property
### Universal Data Attribute
The `data` attribute can be added to ANY command type to provide supplementary information:
```xml
<!-- Workflow with data -->
<item cmd="*brainstorm"
run-workflow="{project-root}/bmad/core/workflows/brainstorming/workflow.yaml"
data="{project-root}/bmad/core/workflows/brainstorming/brain-methods.csv">
Creative Brainstorming Session
</item>
<!-- Action with data -->
<item cmd="*analyze-metrics"
action="analyze these metrics and identify trends"
data="{project-root}/bmad/_data/performance-metrics.json">
Analyze Performance Metrics
</item>
<!-- Template with data -->
<item cmd="*report"
exec="{project-root}/bmad/core/tasks/create-doc.md"
tmpl="{project-root}/bmad/bmm/templates/report.md"
data="{project-root}/bmad/_data/quarterly-results.csv">
Generate Quarterly Report
</item>
```
**Common Data Uses:**
- Reference tables (CSV files)
- Configuration data (YAML/JSON)
- Agent manifests (XML)
- Historical context
- Domain knowledge
- Examples and patterns
## Advanced Patterns
### Conditional Commands
```xml
<!-- Only show if certain conditions met -->
<item cmd="*advanced-mode"
if="user_level == 'expert'"
run-workflow="...">
Advanced configuration mode
</item>
<!-- Environment specific -->
<item cmd="*deploy-prod"
if="environment == 'production'"
exec="...">
Deploy to production
</item>
```
### Parameterized Commands
```xml
<!-- Accept runtime parameters -->
<item cmd="*create-agent"
run-workflow="..."
params="agent_type,agent_name">
Create new agent with parameters
</item>
```
### Command Aliases
```xml
<!-- Multiple triggers for same action -->
<item cmd="*prd|*create-prd|*product-requirements"
run-workflow="...">
Create Product Requirements Document
</item>
```
## Module-Specific Patterns
### BMM (Business Management)
```xml
<item cmd="*create-prd">Product Requirements</item>
<item cmd="*market-research">Market Research</item>
<item cmd="*competitor-analysis">Competitor Analysis</item>
<item cmd="*brief">Project Brief</item>
```
### BMB (Builder)
```xml
<item cmd="*create-agent">Build Agent</item>
<item cmd="*create-module">Build Module</item>
<item cmd="*create-workflow">Create Workflow</item>
<item cmd="*module-brief">Module Brief</item>
```
### CIS (Creative Intelligence)
```xml
<item cmd="*brainstorm">Brainstorming Session</item>
<item cmd="*ideate">Ideation Workshop</item>
<item cmd="*storytell">Story Creation</item>
```
## Command Menu Presentation
### How Commands Display
```
1. *help - Show numbered cmd list
2. *create-prd - Create Product Requirements Document
3. *create-agent - Build new BMAD agent
4. *validate - Validate document
5. *exit - Exit with confirmation
```
### Menu Customization
```xml
<!-- Group separator (visual only) -->
<item cmd="---">━━━━━━━━━━━━━━━━━━━━</item>
<!-- Section header (non-executable) -->
<item cmd="SECTION">═══ Workflows ═══</item>
```
## Error Handling
### Missing Resources
```xml
<!-- Workflow not yet created -->
<item cmd="*future-feature"
run-workflow="todo">
Coming soon: Advanced feature
</item>
<!-- Graceful degradation -->
<item cmd="*analyze"
run-workflow="{optional-path|fallback-path}">
Analyze with available tools
</item>
```
## Testing Commands
### Command Test Checklist
- [ ] Unique trigger (no duplicates)
- [ ] Clear description
- [ ] Valid path or "todo"
- [ ] Uses variables not hardcoded paths
- [ ] Executes without error
- [ ] Returns to menu after execution
### Common Issues
1. **Duplicate triggers** - Each cmd must be unique
2. **Missing paths** - File must exist or be "todo"
3. **Hardcoded paths** - Always use variables
4. **No description** - Every command needs text
5. **Wrong order** - help first, exit last
## Quick Templates
### Workflow Command
```xml
<!-- Create document -->
<item cmd="*{action}-{object}"
run-workflow="{project-root}/bmad/{module}/workflows/{workflow}/workflow.yaml">
{Action} {Object Description}
</item>
<!-- Validate document -->
<item cmd="*validate-{object}"
validate-workflow="{output_folder}/{document}.md"
workflow="{project-root}/bmad/{module}/workflows/{workflow}/workflow.yaml">
Validate {Object Description}
</item>
```
### Task Command
```xml
<item cmd="*{action}"
exec="{project-root}/bmad/{module}/tasks/{task}.md">
{Action Description}
</item>
```
### Template Command
```xml
<item cmd="*{document}"
exec="{project-root}/bmad/core/tasks/create-doc.md"
tmpl="{project-root}/bmad/{module}/templates/{template}.md">
Create {Document Name}
</item>
```
## Self-Contained Agent Patterns
### When to Use Each Approach
**Inline Action (`action="prompt"`)**
- Prompt is < 2 lines
- Simple, direct instruction
- Not reused elsewhere
- Quick transformations
**Referenced Prompt (`action="#prompt-id"`)**
- Prompt is multiline/complex
- Contains structured steps
- May be reused by multiple commands
- Maintains readability
**External Task (`exec="path/to/task.md"`)**
- Logic needs to be shared across agents
- Task is independently valuable
- Requires version control separately
- Part of larger workflow system
### Complete Self-Contained Agent
```xml
<agent id="bmad/research/agents/analyst.md" name="Research Analyst" icon="🔬">
<!-- Embedded prompt library -->
<prompts>
<prompt id="swot-analysis">
Perform a SWOT analysis:
STRENGTHS (Internal, Positive)
- What advantages exist?
- What do we do well?
- What unique resources?
WEAKNESSES (Internal, Negative)
- What could improve?
- Where are resource gaps?
- What needs development?
OPPORTUNITIES (External, Positive)
- What trends can we leverage?
- What market gaps exist?
- What partnerships are possible?
THREATS (External, Negative)
- What competition exists?
- What risks are emerging?
- What could disrupt us?
Provide specific examples and actionable insights for each quadrant.
</prompt>
<prompt id="competitive-intel">
Analyze competitive landscape:
1. Identify top 5 competitors
2. Compare features and capabilities
3. Analyze pricing strategies
4. Evaluate market positioning
5. Assess strengths and vulnerabilities
6. Recommend competitive strategies
</prompt>
</prompts>
<menu>
<item cmd="*help">Show numbered cmd list</item>
<!-- Simple inline actions -->
<item cmd="*summarize"
action="create executive summary of findings">
Create Executive Summary
</item>
<!-- Complex referenced prompts -->
<item cmd="*swot"
action="#swot-analysis">
Perform SWOT Analysis
</item>
<item cmd="*compete"
action="#competitive-intel"
data="{project-root}/bmad/_data/market-data.csv">
Analyze Competition
</item>
<!-- Hybrid: external task with internal data -->
<item cmd="*report"
exec="{project-root}/bmad/core/tasks/create-doc.md"
tmpl="{project-root}/bmad/research/templates/report.md">
Generate Research Report
</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```
## Simple Agent Example
For agents that primarily use embedded logic:
```xml
<agent name="Data Analyst">
<menu>
<item cmd="*help">Show numbered cmd list</item>
<!-- Action commands for direct operations -->
<item cmd="*list-metrics"
action="list all available metrics from the dataset">
List Available Metrics
</item>
<item cmd="*analyze"
action="perform statistical analysis on the provided data"
data="{project-root}/bmad/_data/dataset.csv">
Analyze Dataset
</item>
<item cmd="*visualize"
action="create visualization recommendations for this data">
Suggest Visualizations
</item>
<!-- Embedded logic commands -->
<item cmd="*calculate">Perform calculations</item>
<item cmd="*interpret">Interpret results</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```
## LLM Building Guide
When creating commands:
1. Start with *help and *exit
2. Choose appropriate command type:
- Complex multi-step? Use `run-workflow`
- Single operation? Use `exec`
- Need template? Use `exec` + `tmpl`
- Simple prompt? Use `action`
- Agent handles it? Use no attributes
3. Add `data` attribute if supplementary info needed
4. Add primary workflows (main value)
5. Add secondary tasks
6. Include utility commands
7. Test each command works
8. Verify no duplicates
9. Ensure clear descriptions

View File

@ -1,759 +0,0 @@
# BMAD Agent Command Patterns Reference
_LLM-Optimized Guide for Command Design_
## Important: How to Process Action References
When executing agent commands, understand these reference patterns:
```xml
<!-- Pattern 1: Inline action -->
<item cmd="*example" action="do this specific thing">Description</item>
→ Execute the text "do this specific thing" directly
<!-- Pattern 2: Internal reference with # prefix -->
<item cmd="*example" action="#prompt-id">Description</item>
→ Find <prompt id="prompt-id"> in the current agent and execute its content
<!-- Pattern 3: External file reference -->
<item cmd="*example" exec="{project-root}/path/to/file.md">Description</item>
→ Load and execute the external file
```
**The `#` prefix is your signal that this is an internal XML node reference, not a file path.**
## Command Anatomy
### Basic Structure
```xml
<menu>
<item cmd="*trigger" [attributes]>Description</item>
</menu>
```
**Components:**
- `cmd` - The trigger word (always starts with \*)
- `attributes` - Action directives (optional):
- `run-workflow` - Path to workflow YAML
- `exec` - Path to task/operation
- `tmpl` - Path to template (used with exec)
- `action` - Embedded prompt/instruction
- `data` - Path to supplementary data (universal)
- `Description` - What shows in menu
## Command Types
**Quick Reference:**
1. **Workflow Commands** - Execute multi-step workflows (`run-workflow`)
2. **Task Commands** - Execute single operations (`exec`)
3. **Template Commands** - Generate from templates (`exec` + `tmpl`)
4. **Meta Commands** - Agent control (no attributes)
5. **Action Commands** - Embedded prompts (`action`)
6. **Embedded Commands** - Logic in persona (no attributes)
**Universal Attributes:**
- `data` - Can be added to ANY command type for supplementary info
- `if` - Conditional execution (advanced pattern)
- `params` - Runtime parameters (advanced pattern)
### 1. Workflow Commands
Execute complete multi-step processes
```xml
<!-- Standard workflow -->
<item cmd="*create-prd"
run-workflow="{project-root}/bmad/bmm/workflows/prd/workflow.yaml">
Create Product Requirements Document
</item>
<!-- Workflow with validation -->
<item cmd="*validate-prd"
validate-workflow="{output_folder}/prd-draft.md"
workflow="{project-root}/bmad/bmm/workflows/prd/workflow.yaml">
Validate PRD Against Checklist
</item>
<!-- Auto-discover validation workflow from document -->
<item cmd="*validate-doc"
validate-workflow="{output_folder}/document.md">
Validate Document (auto-discover checklist)
</item>
<!-- Placeholder for future development -->
<item cmd="*analyze-data"
run-workflow="todo">
Analyze dataset (workflow coming soon)
</item>
```
**Workflow Attributes:**
- `run-workflow` - Execute a workflow to create documents
- `validate-workflow` - Validate an existing document against its checklist
- `workflow` - (optional with validate-workflow) Specify the workflow.yaml directly
**Best Practices:**
- Use descriptive trigger names
- Always use variable paths
- Mark incomplete as "todo"
- Description should be clear action
- Include validation commands for workflows that produce documents
### 2. Task Commands
Execute single operations
```xml
<!-- Simple task -->
<item cmd="*validate"
exec="{project-root}/bmad/core/tasks/validate-workflow.xml">
Validate document against checklist
</item>
<!-- Task with data -->
<item cmd="*standup"
exec="{project-root}/bmad/mmm/tasks/daily-standup.xml"
data="{project-root}/bmad/_cfg/agent-manifest.csv">
Run agile team standup
</item>
```
**Data Property:**
- Can be used with any command type
- Provides additional reference or context
- Path to supplementary files or resources
- Loaded at runtime for command execution
### 3. Template Commands
Generate documents from templates
```xml
<item cmd="*brief"
exec="{project-root}/bmad/core/tasks/create-doc.md"
tmpl="{project-root}/bmad/bmm/templates/brief.md">
Produce Project Brief
</item>
<item cmd="*competitor-analysis"
exec="{project-root}/bmad/core/tasks/create-doc.md"
tmpl="{project-root}/bmad/bmm/templates/competitor.md"
data="{project-root}/bmad/_data/market-research.csv">
Produce Competitor Analysis
</item>
```
### 4. Meta Commands
Agent control and information
```xml
<!-- Required meta commands -->
<item cmd="*help">Show numbered cmd list</item>
<item cmd="*exit">Exit with confirmation</item>
<!-- Optional meta commands -->
<item cmd="*yolo">Toggle Yolo Mode</item>
<item cmd="*status">Show current status</item>
<item cmd="*config">Show configuration</item>
```
### 5. Action Commands
Direct prompts embedded in commands (Simple agents)
#### Simple Action (Inline)
```xml
<!-- Short action attribute with embedded prompt -->
<item cmd="*list-tasks"
action="list all tasks from {project-root}/bmad/_cfg/task-manifest.csv">
List Available Tasks
</item>
<item cmd="*summarize"
action="summarize the key points from the current document">
Summarize Document
</item>
```
#### Complex Action (Referenced)
For multiline/complex prompts, define them separately and reference by id:
```xml
<agent name="Research Assistant">
<!-- Define complex prompts as separate nodes -->
<prompts>
<prompt id="deep-analysis">
Perform a comprehensive analysis following these steps:
1. Identify the main topic and key themes
2. Extract all supporting evidence and data points
3. Analyze relationships between concepts
4. Identify gaps or contradictions
5. Generate insights and recommendations
6. Create an executive summary
Format the output with clear sections and bullet points.
</prompt>
<prompt id="literature-review">
Conduct a systematic literature review:
1. Summarize each source's main arguments
2. Compare and contrast different perspectives
3. Identify consensus points and controversies
4. Evaluate the quality and relevance of sources
5. Synthesize findings into coherent themes
6. Highlight research gaps and future directions
Include proper citations and references.
</prompt>
</prompts>
<!-- Commands reference the prompts by id -->
<menu>
<item cmd="*help">Show numbered cmd list</item>
<item cmd="*deep-analyze"
action="#deep-analysis">
<!-- The # means: use the <prompt id="deep-analysis"> defined above -->
Perform Deep Analysis
</item>
<item cmd="*review-literature"
action="#literature-review"
data="{project-root}/bmad/_data/sources.csv">
Conduct Literature Review
</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```
**Reference Convention:**
- `action="#prompt-id"` means: "Find and execute the <prompt> node with id='prompt-id' within this agent"
- `action="inline text"` means: "Execute this text directly as the prompt"
- `exec="{path}"` means: "Load and execute external file at this path"
- The `#` prefix signals to the LLM: "This is an internal reference - look for a prompt node with this ID within the current agent XML"
**LLM Processing Instructions:**
When you see `action="#some-id"` in a command:
1. Look for `<prompt id="some-id">` within the same agent
2. Use the content of that prompt node as the instruction
3. If not found, report error: "Prompt 'some-id' not found in agent"
**Use Cases:**
- Quick operations (inline action)
- Complex multi-step processes (referenced prompt)
- Self-contained agents with task-like capabilities
- Reusable prompt templates within agent
### 6. Embedded Commands
Logic embedded in agent persona (Simple agents)
```xml
<!-- No exec/run-workflow/action attribute -->
<item cmd="*calculate">Perform calculation</item>
<item cmd="*convert">Convert format</item>
<item cmd="*generate">Generate output</item>
```
## Command Naming Conventions
### Action-Based Naming
```xml
*create- <!-- Generate new content -->
*build- <!-- Construct components -->
*analyze- <!-- Examine and report -->
*validate- <!-- Check correctness -->
*generate- <!-- Produce output -->
*update- <!-- Modify existing -->
*review- <!-- Examine quality -->
*test- <!-- Verify functionality -->
```
### Domain-Based Naming
```xml
*brainstorm <!-- Creative ideation -->
*architect <!-- Design systems -->
*refactor <!-- Improve code -->
*deploy <!-- Release to production -->
*monitor <!-- Watch systems -->
```
### Naming Anti-Patterns
```xml
<!-- ❌ Too vague -->
<item cmd="*do">Do something</item>
<!-- ❌ Too long -->
<item cmd="*create-comprehensive-product-requirements-document-with-analysis">
<!-- ❌ No verb -->
<item cmd="*prd">Product Requirements</item>
<!-- ✅ Clear and concise -->
<item cmd="*create-prd">Create Product Requirements Document</item>
```
## Command Organization
### Standard Order
```xml
<menu>
<!-- 1. Always first -->
<item cmd="*help">Show numbered cmd list</item>
<!-- 2. Primary workflows -->
<item cmd="*create-prd" run-workflow="...">Create PRD</item>
<item cmd="*create-module" run-workflow="...">Build module</item>
<!-- 3. Secondary actions -->
<item cmd="*validate" exec="...">Validate document</item>
<item cmd="*analyze" exec="...">Analyze code</item>
<!-- 4. Utility commands -->
<item cmd="*config">Show configuration</item>
<item cmd="*yolo">Toggle Yolo Mode</item>
<!-- 5. Always last -->
<item cmd="*exit">Exit with confirmation</item>
</menu>
```
### Grouping Strategies
**By Lifecycle:**
```xml
<menu>
<item cmd="*help">Help</item>
<!-- Planning -->
<item cmd="*brainstorm">Brainstorm ideas</item>
<item cmd="*plan">Create plan</item>
<!-- Building -->
<item cmd="*build">Build component</item>
<item cmd="*test">Test component</item>
<!-- Deployment -->
<item cmd="*deploy">Deploy to production</item>
<item cmd="*monitor">Monitor system</item>
<item cmd="*exit">Exit</item>
</menu>
```
**By Complexity:**
```xml
<menu>
<item cmd="*help">Help</item>
<!-- Simple -->
<item cmd="*quick-review">Quick review</item>
<!-- Standard -->
<item cmd="*create-doc">Create document</item>
<!-- Complex -->
<item cmd="*full-analysis">Comprehensive analysis</item>
<item cmd="*exit">Exit</item>
</menu>
```
## Command Descriptions
### Good Descriptions
```xml
<!-- Clear action and object -->
<item cmd="*create-prd">Create Product Requirements Document</item>
<!-- Specific outcome -->
<item cmd="*analyze-security">Perform security vulnerability analysis</item>
<!-- User benefit -->
<item cmd="*optimize">Optimize code for performance</item>
```
### Poor Descriptions
```xml
<!-- Too vague -->
<item cmd="*process">Process</item>
<!-- Technical jargon -->
<item cmd="*exec-wf-123">Execute WF123</item>
<!-- Missing context -->
<item cmd="*run">Run</item>
```
## The Data Property
### Universal Data Attribute
The `data` attribute can be added to ANY command type to provide supplementary information:
```xml
<!-- Workflow with data -->
<item cmd="*brainstorm"
run-workflow="{project-root}/bmad/core/workflows/brainstorming/workflow.yaml"
data="{project-root}/bmad/core/workflows/brainstorming/brain-methods.csv">
Creative Brainstorming Session
</item>
<!-- Action with data -->
<item cmd="*analyze-metrics"
action="analyze these metrics and identify trends"
data="{project-root}/bmad/_data/performance-metrics.json">
Analyze Performance Metrics
</item>
<!-- Template with data -->
<item cmd="*report"
exec="{project-root}/bmad/core/tasks/create-doc.md"
tmpl="{project-root}/bmad/bmm/templates/report.md"
data="{project-root}/bmad/_data/quarterly-results.csv">
Generate Quarterly Report
</item>
```
**Common Data Uses:**
- Reference tables (CSV files)
- Configuration data (YAML/JSON)
- Agent manifests (XML)
- Historical context
- Domain knowledge
- Examples and patterns
## Advanced Patterns
### Conditional Commands
```xml
<!-- Only show if certain conditions met -->
<item cmd="*advanced-mode"
if="user_level == 'expert'"
run-workflow="...">
Advanced configuration mode
</item>
<!-- Environment specific -->
<item cmd="*deploy-prod"
if="environment == 'production'"
exec="...">
Deploy to production
</item>
```
### Parameterized Commands
```xml
<!-- Accept runtime parameters -->
<item cmd="*create-agent"
run-workflow="..."
params="agent_type,agent_name">
Create new agent with parameters
</item>
```
### Command Aliases
```xml
<!-- Multiple triggers for same action -->
<item cmd="*prd|*create-prd|*product-requirements"
run-workflow="...">
Create Product Requirements Document
</item>
```
## Module-Specific Patterns
### BMM (Business Management)
```xml
<item cmd="*create-prd">Product Requirements</item>
<item cmd="*market-research">Market Research</item>
<item cmd="*competitor-analysis">Competitor Analysis</item>
<item cmd="*brief">Project Brief</item>
```
### BMB (Builder)
```xml
<item cmd="*create-agent">Build Agent</item>
<item cmd="*create-module">Build Module</item>
<item cmd="*create-workflow">Create Workflow</item>
<item cmd="*module-brief">Module Brief</item>
```
### CIS (Creative Intelligence)
```xml
<item cmd="*brainstorm">Brainstorming Session</item>
<item cmd="*ideate">Ideation Workshop</item>
<item cmd="*storytell">Story Creation</item>
```
## Command Menu Presentation
### How Commands Display
```
1. *help - Show numbered cmd list
2. *create-prd - Create Product Requirements Document
3. *create-agent - Build new BMAD agent
4. *validate - Validate document
5. *exit - Exit with confirmation
```
### Menu Customization
```xml
<!-- Group separator (visual only) -->
<item cmd="---">━━━━━━━━━━━━━━━━━━━━</item>
<!-- Section header (non-executable) -->
<item cmd="SECTION">═══ Workflows ═══</item>
```
## Error Handling
### Missing Resources
```xml
<!-- Workflow not yet created -->
<item cmd="*future-feature"
run-workflow="todo">
Coming soon: Advanced feature
</item>
<!-- Graceful degradation -->
<item cmd="*analyze"
run-workflow="{optional-path|fallback-path}">
Analyze with available tools
</item>
```
## Testing Commands
### Command Test Checklist
- [ ] Unique trigger (no duplicates)
- [ ] Clear description
- [ ] Valid path or "todo"
- [ ] Uses variables not hardcoded paths
- [ ] Executes without error
- [ ] Returns to menu after execution
### Common Issues
1. **Duplicate triggers** - Each cmd must be unique
2. **Missing paths** - File must exist or be "todo"
3. **Hardcoded paths** - Always use variables
4. **No description** - Every command needs text
5. **Wrong order** - help first, exit last
## Quick Templates
### Workflow Command
```xml
<!-- Create document -->
<item cmd="*{action}-{object}"
run-workflow="{project-root}/bmad/{module}/workflows/{workflow}/workflow.yaml">
{Action} {Object Description}
</item>
<!-- Validate document -->
<item cmd="*validate-{object}"
validate-workflow="{output_folder}/{document}.md"
workflow="{project-root}/bmad/{module}/workflows/{workflow}/workflow.yaml">
Validate {Object Description}
</item>
```
### Task Command
```xml
<item cmd="*{action}"
exec="{project-root}/bmad/{module}/tasks/{task}.md">
{Action Description}
</item>
```
### Template Command
```xml
<item cmd="*{document}"
exec="{project-root}/bmad/core/tasks/create-doc.md"
tmpl="{project-root}/bmad/{module}/templates/{template}.md">
Create {Document Name}
</item>
```
## Self-Contained Agent Patterns
### When to Use Each Approach
**Inline Action (`action="prompt"`)**
- Prompt is < 2 lines
- Simple, direct instruction
- Not reused elsewhere
- Quick transformations
**Referenced Prompt (`action="#prompt-id"`)**
- Prompt is multiline/complex
- Contains structured steps
- May be reused by multiple commands
- Maintains readability
**External Task (`exec="path/to/task.md"`)**
- Logic needs to be shared across agents
- Task is independently valuable
- Requires version control separately
- Part of larger workflow system
### Complete Self-Contained Agent
```xml
<agent id="bmad/research/agents/analyst.md" name="Research Analyst" icon="🔬">
<!-- Embedded prompt library -->
<prompts>
<prompt id="swot-analysis">
Perform a SWOT analysis:
STRENGTHS (Internal, Positive)
- What advantages exist?
- What do we do well?
- What unique resources?
WEAKNESSES (Internal, Negative)
- What could improve?
- Where are resource gaps?
- What needs development?
OPPORTUNITIES (External, Positive)
- What trends can we leverage?
- What market gaps exist?
- What partnerships are possible?
THREATS (External, Negative)
- What competition exists?
- What risks are emerging?
- What could disrupt us?
Provide specific examples and actionable insights for each quadrant.
</prompt>
<prompt id="competitive-intel">
Analyze competitive landscape:
1. Identify top 5 competitors
2. Compare features and capabilities
3. Analyze pricing strategies
4. Evaluate market positioning
5. Assess strengths and vulnerabilities
6. Recommend competitive strategies
</prompt>
</prompts>
<menu>
<item cmd="*help">Show numbered cmd list</item>
<!-- Simple inline actions -->
<item cmd="*summarize"
action="create executive summary of findings">
Create Executive Summary
</item>
<!-- Complex referenced prompts -->
<item cmd="*swot"
action="#swot-analysis">
Perform SWOT Analysis
</item>
<item cmd="*compete"
action="#competitive-intel"
data="{project-root}/bmad/_data/market-data.csv">
Analyze Competition
</item>
<!-- Hybrid: external task with internal data -->
<item cmd="*report"
exec="{project-root}/bmad/core/tasks/create-doc.md"
tmpl="{project-root}/bmad/research/templates/report.md">
Generate Research Report
</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```
## Simple Agent Example
For agents that primarily use embedded logic:
```xml
<agent name="Data Analyst">
<menu>
<item cmd="*help">Show numbered cmd list</item>
<!-- Action commands for direct operations -->
<item cmd="*list-metrics"
action="list all available metrics from the dataset">
List Available Metrics
</item>
<item cmd="*analyze"
action="perform statistical analysis on the provided data"
data="{project-root}/bmad/_data/dataset.csv">
Analyze Dataset
</item>
<item cmd="*visualize"
action="create visualization recommendations for this data">
Suggest Visualizations
</item>
<!-- Embedded logic commands -->
<item cmd="*calculate">Perform calculations</item>
<item cmd="*interpret">Interpret results</item>
<item cmd="*exit">Exit with confirmation</item>
</menu>
</agent>
```
## LLM Building Guide
When creating commands:
1. Start with *help and *exit
2. Choose appropriate command type:
- Complex multi-step? Use `run-workflow`
- Single operation? Use `exec`
- Need template? Use `exec` + `tmpl`
- Simple prompt? Use `action`
- Agent handles it? Use no attributes
3. Add `data` attribute if supplementary info needed
4. Add primary workflows (main value)
5. Add secondary tasks
6. Include utility commands
7. Test each command works
8. Verify no duplicates
9. Ensure clear descriptions

View File

@ -1,292 +0,0 @@
# BMAD Agent Types Reference
## Overview
BMAD agents come in three distinct types, each designed for different use cases and complexity levels. The type determines where the agent is stored and what capabilities it has.
## Directory Structure by Type
### Standalone Agents (Simple & Expert)
Live in their own dedicated directories under `bmad/agents/`:
```
bmad/agents/
├── my-helper/ # Simple agent
│ ├── my-helper.agent.yaml # Agent definition
│ └── my-helper.md # Built XML (generated)
└── domain-expert/ # Expert agent
├── domain-expert.agent.yaml
├── domain-expert.md # Built XML
└── domain-expert-sidecar/ # Expert resources
├── memories.md # Persistent memory
├── instructions.md # Private directives
└── knowledge/ # Domain knowledge
```
### Module Agents
Part of a module system under `bmad/{module}/agents/`:
```
bmad/bmm/agents/
├── product-manager.agent.yaml
├── product-manager.md # Built XML
├── business-analyst.agent.yaml
└── business-analyst.md # Built XML
```
## Agent Types
### 1. Simple Agent
**Purpose:** Self-contained, standalone agents with embedded capabilities
**Location:** `bmad/agents/{agent-name}/`
**Characteristics:**
- All logic embedded within the agent file
- No external dependencies
- Quick to create and deploy
- Perfect for single-purpose tools
- Lives in its own directory
**Use Cases:**
- Calculator agents
- Format converters
- Simple analyzers
- Static advisors
**YAML Structure (source):**
```yaml
agent:
metadata:
name: 'Helper'
title: 'Simple Helper'
icon: '🤖'
type: 'simple'
persona:
role: 'Simple Helper Role'
identity: '...'
communication_style: '...'
principles: ['...']
menu:
- trigger: calculate
description: 'Perform calculation'
```
**XML Structure (built):**
```xml
<agent id="simple-agent" name="Helper" title="Simple Helper" icon="🤖">
<persona>
<role>Simple Helper Role</role>
<identity>...</identity>
<communication_style>...</communication_style>
<principles>...</principles>
</persona>
<embedded-data>
<!-- Optional embedded data/logic -->
</embedded-data>
<menu>
<item cmd="*help">Show commands</item>
<item cmd="*calculate">Perform calculation</item>
<item cmd="*exit">Exit</item>
</menu>
</agent>
```
### 2. Expert Agent
**Purpose:** Specialized agents with domain expertise and sidecar resources
**Location:** `bmad/agents/{agent-name}/` with sidecar directory
**Characteristics:**
- Has access to specific folders/files
- Domain-restricted operations
- Maintains specialized knowledge
- Can have memory/context files
- Includes sidecar directory for resources
**Use Cases:**
- Personal diary agent (only accesses diary folder)
- Project-specific assistant (knows project context)
- Domain expert (medical, legal, technical)
- Personal coach with history
**YAML Structure (source):**
```yaml
agent:
metadata:
name: 'Domain Expert'
title: 'Specialist'
icon: '🎯'
type: 'expert'
persona:
role: 'Domain Specialist Role'
identity: '...'
communication_style: '...'
principles: ['...']
critical_actions:
- 'Load COMPLETE file {agent-folder}/instructions.md and follow ALL directives'
- 'Load COMPLETE file {agent-folder}/memories.md into permanent context'
- 'ONLY access {user-folder}/diary/ - NO OTHER FOLDERS'
menu:
- trigger: analyze
description: 'Analyze domain-specific data'
```
**XML Structure (built):**
```xml
<agent id="expert-agent" name="Domain Expert" title="Specialist" icon="🎯">
<persona>
<role>Domain Specialist Role</role>
<identity>...</identity>
<communication_style>...</communication_style>
<principles>...</principles>
</persona>
<critical-actions>
<!-- CRITICAL: Load sidecar files explicitly -->
<i critical="MANDATORY">Load COMPLETE file {agent-folder}/instructions.md and follow ALL directives</i>
<i critical="MANDATORY">Load COMPLETE file {agent-folder}/memories.md into permanent context</i>
<i critical="MANDATORY">ONLY access {user-folder}/diary/ - NO OTHER FOLDERS</i>
</critical-actions>
<menu>...</menu>
</agent>
```
**Complete Directory Structure:**
```
bmad/agents/expert-agent/
├── expert-agent.agent.yaml # Agent YAML source
├── expert-agent.md # Built XML (generated)
└── expert-agent-sidecar/ # Sidecar resources
├── memories.md # Persistent memory
├── instructions.md # Private directives
├── knowledge/ # Domain knowledge base
│ └── README.md
└── sessions/ # Session notes
```
### 3. Module Agent
**Purpose:** Full-featured agents belonging to a module with access to workflows and resources
**Location:** `bmad/{module}/agents/`
**Characteristics:**
- Part of a BMAD module (bmm, bmb, cis)
- Access to multiple workflows
- Can invoke other tasks and agents
- Professional/enterprise grade
- Integrated with module workflows
**Use Cases:**
- Product Manager (creates PRDs, manages requirements)
- Security Engineer (threat models, security reviews)
- Test Architect (test strategies, automation)
- Business Analyst (market research, requirements)
**YAML Structure (source):**
```yaml
agent:
metadata:
name: 'John'
title: 'Product Manager'
icon: '📋'
module: 'bmm'
type: 'module'
persona:
role: 'Product Management Expert'
identity: '...'
communication_style: '...'
principles: ['...']
critical_actions:
- 'Load config from {project-root}/bmad/{module}/config.yaml'
menu:
- trigger: create-prd
workflow: '{project-root}/bmad/bmm/workflows/prd/workflow.yaml'
description: 'Create PRD'
- trigger: validate
exec: '{project-root}/bmad/core/tasks/validate-workflow.xml'
description: 'Validate document'
```
**XML Structure (built):**
```xml
<agent id="bmad/bmm/agents/pm.md" name="John" title="Product Manager" icon="📋">
<persona>
<role>Product Management Expert</role>
<identity>...</identity>
<communication_style>...</communication_style>
<principles>...</principles>
</persona>
<critical-actions>
<i>Load config from {project-root}/bmad/{module}/config.yaml</i>
</critical-actions>
<menu>
<item cmd="*help">Show numbered menu</item>
<item cmd="*create-prd" run-workflow="{project-root}/bmad/bmm/workflows/prd/workflow.yaml">Create PRD</item>
<item cmd="*validate" exec="{project-root}/bmad/core/tasks/validate-workflow.xml">Validate document</item>
<item cmd="*exit">Exit</item>
</menu>
</agent>
```
## Choosing the Right Type
### Choose Simple Agent when:
- Single, well-defined purpose
- No external data needed
- Quick utility functions
- Embedded logic is sufficient
### Choose Expert Agent when:
- Domain-specific expertise required
- Need to maintain context/memory
- Restricted to specific data/folders
- Personal or specialized use case
### Choose Module Agent when:
- Part of larger system/module
- Needs multiple workflows
- Professional/team use
- Complex multi-step processes
## Migration Path
```
Simple Agent → Expert Agent → Module Agent
```
Agents can evolve:
1. Start with Simple for proof of concept
2. Add sidecar resources to become Expert
3. Integrate with module to become Module Agent
## Best Practices
1. **Start Simple:** Begin with the simplest type that meets your needs
2. **Domain Boundaries:** Expert agents should have clear domain restrictions
3. **Module Integration:** Module agents should follow module conventions
4. **Resource Management:** Document all external resources clearly
5. **Evolution Planning:** Design with potential growth in mind

View File

@ -1,174 +0,0 @@
# Agent Brainstorming Context
_Context provided to brainstorming workflow when creating a new BMAD agent_
## Session Focus
You are brainstorming ideas for a **BMAD agent** - an AI persona with specific expertise, personality, and capabilities that helps users accomplish tasks through commands and workflows.
## What is a BMAD Agent?
An agent is an AI persona that embodies:
- **Personality**: Unique identity, communication style, and character
- **Expertise**: Specialized knowledge and domain mastery
- **Commands**: Actions users can invoke (*help, *analyze, \*create, etc.)
- **Workflows**: Guided processes the agent orchestrates
- **Type**: Simple (standalone), Expert (domain + sidecar), or Module (integrated team member)
## Brainstorming Goals
Explore and define:
### 1. Agent Identity and Personality
- **Who are they?** (name, backstory, motivation)
- **How do they talk?** (formal, casual, quirky, enthusiastic, wise)
- **What's their vibe?** (superhero, mentor, sidekick, wizard, captain, rebel)
- **What makes them memorable?** (catchphrases, quirks, style)
### 2. Expertise and Capabilities
- **What do they know deeply?** (domain expertise)
- **What can they do?** (analyze, create, review, research, deploy)
- **What problems do they solve?** (specific user pain points)
- **What makes them unique?** (special skills or approaches)
### 3. Commands and Actions
- **What commands?** (5-10 main actions users invoke)
- **What workflows do they run?** (document creation, analysis, automation)
- **What tasks do they perform?** (quick operations without full workflows)
- **What's their killer command?** (the one thing they're known for)
### 4. Agent Type and Context
- **Simple Agent?** Self-contained, no dependencies, quick utility
- **Expert Agent?** Domain-specific with sidecar data/memory files
- **Module Agent?** Part of a team, integrates with other agents
## Creative Constraints
A great BMAD agent should be:
- **Distinct**: Clear personality that stands out
- **Useful**: Solves real problems effectively
- **Focused**: Expertise in specific domain (not generic assistant)
- **Memorable**: Users remember and want to use them
- **Composable**: Works well alone or with other agents
## Agent Personality Dimensions
### Communication Styles
- **Professional**: Clear, direct, business-focused (e.g., "Data Analyst")
- **Enthusiastic**: Energetic, exclamation points, emojis (e.g., "Hype Coach")
- **Wise Mentor**: Patient, insightful, asks good questions (e.g., "Strategy Sage")
- **Quirky Genius**: Eccentric, clever, unusual metaphors (e.g., "Mad Scientist")
- **Action Hero**: Bold, confident, gets things done (e.g., "Deploy Captain")
- **Creative Spirit**: Artistic, imaginative, playful (e.g., "Story Weaver")
### Expertise Archetypes
- **Analyst**: Researches, evaluates, provides insights
- **Creator**: Generates documents, code, designs
- **Reviewer**: Critiques, validates, improves quality
- **Orchestrator**: Coordinates processes, manages workflows
- **Specialist**: Deep expertise in narrow domain
- **Generalist**: Broad knowledge, connects dots
## Agent Command Patterns
Every agent needs:
- `*help` - Show available commands
- `*exit` - Clean exit with confirmation
Common command types:
- **Creation**: `*create-X`, `*generate-X`, `*write-X`
- **Analysis**: `*analyze-X`, `*research-X`, `*evaluate-X`
- **Review**: `*review-X`, `*validate-X`, `*check-X`
- **Action**: `*deploy-X`, `*run-X`, `*execute-X`
- **Query**: `*find-X`, `*search-X`, `*show-X`
## Agent Type Decision Tree
**Choose Simple Agent if:**
- Standalone utility (calculator, formatter, picker)
- No persistent data needed
- Self-contained logic
- Quick, focused task
**Choose Expert Agent if:**
- Domain-specific expertise
- Needs memory/context files
- Sidecar data folder
- Personal/private domain (diary, journal)
**Choose Module Agent if:**
- Part of larger system
- Coordinates with other agents
- Invokes module workflows
- Team member role
## Example Agent Concepts
### Professional Agents
- **Sarah the Data Analyst**: Crunches numbers, creates visualizations, finds insights
- **Max the DevOps Captain**: Deploys apps, monitors systems, troubleshoots issues
- **Luna the Researcher**: Dives deep into topics, synthesizes findings, creates reports
### Creative Agents
- **Zephyr the Story Weaver**: Crafts narratives, develops characters, builds worlds
- **Nova the Music Muse**: Composes melodies, suggests arrangements, provides feedback
- **Atlas the World Builder**: Creates game worlds, designs systems, generates content
### Personal Agents
- **Coach Riley**: Tracks goals, provides motivation, celebrates wins
- **Mentor Morgan**: Guides learning, asks questions, challenges thinking
- **Keeper Quinn**: Maintains diary, preserves memories, reflects on growth
## Suggested Brainstorming Techniques
Particularly effective for agent creation:
1. **Character Building**: Develop full backstory and motivation
2. **Theatrical Improv**: Act out agent personality
3. **Day in the Life**: Imagine typical interactions
4. **Catchphrase Generation**: Find their unique voice
5. **Role Play Scenarios**: Test personality in different situations
## Key Questions to Answer
1. What is the agent's name and basic identity?
2. What's their communication style and personality?
3. What domain expertise do they embody?
4. What are their 5-10 core commands?
5. What workflows do they orchestrate?
6. What makes them memorable and fun to use?
7. Simple, Expert, or Module agent type?
8. If Expert: What sidecar resources?
9. If Module: Which module and what's their team role?
## Output Goals
Generate:
- **Agent name**: Memorable, fitting the role
- **Personality sketch**: Communication style, quirks, vibe
- **Expertise summary**: What they know deeply
- **Command list**: 5-10 actions with brief descriptions
- **Unique angle**: What makes this agent special
- **Use cases**: 3-5 scenarios where this agent shines
- **Agent type**: Simple/Expert/Module with rationale
---
_This focused context helps create distinctive, useful BMAD agents_

View File

@ -1,62 +0,0 @@
# Build Agent Validation Checklist (YAML Agents)
## Agent Structure Validation
### YAML Structure
- [ ] YAML parses without errors
- [ ] `agent.metadata` includes: `id`, `name`, `title`, `icon`, `module`
- [ ] `agent.persona` exists with role, identity, communication_style, and principles
- [ ] `agent.menu` exists with at least one item
### Core Components
- [ ] `metadata.id` points to final compiled path: `bmad/{{module}}/agents/{{agent}}.md`
- [ ] `metadata.module` matches the module folder (e.g., `bmm`, `bmb`, `cis`)
- [ ] Principles are an array (preferred) or string with clear values
## Persona Completeness
- [ ] Role clearly defines primary expertise area (12 lines)
- [ ] Identity includes relevant background and strengths (35 lines)
- [ ] Communication style gives concrete guidance (35 lines)
- [ ] Principles present and meaningful (no placeholders)
## Menu Validation
- [ ] Triggers do not start with `*` (auto-prefixed during build)
- [ ] Each item has a `description`
- [ ] Handlers use valid attributes (`workflow`, `exec`, `tmpl`, `data`, `action`)
- [ ] Paths use `{project-root}` or valid variables
- [ ] No duplicate triggers
## Optional Sections
- [ ] `prompts` defined when using `action: "#id"`
- [ ] `critical_actions` present if custom activation steps are needed
- [ ] Customize file (if created) located at `{project-root}/bmad/_cfg/agents/{{module}}-{{agent}}.customize.yaml`
## Build Verification
- [ ] Run compile to build `.md`: `npm run install:bmad` → "Compile Agents" (or `bmad install` → Compile)
- [ ] Confirm compiled file exists at `{project-root}/bmad/{{module}}/agents/{{agent}}.md`
## Final Quality
- [ ] Filename is kebab-case and ends with `.agent.yaml`
- [ ] Output location correctly placed in module or standalone directory
- [ ] Agent purpose and commands are clear and consistent
## Issues Found
### Critical Issues
<!-- List any issues that MUST be fixed before agent can function -->
### Warnings
<!-- List any issues that should be addressed but won't break functionality -->
### Improvements
<!-- List any optional enhancements that could improve the agent -->

View File

@ -1,202 +0,0 @@
# Agent Communication Styles Guide
## The Power of Personality
Agents with distinct communication styles are more memorable, engaging, and fun to work with. A good quirk makes the agent feel alive!
## Style Categories
### 🎬 Cinema and TV Inspired
**Film Noir Detective**
The terminal glowed like a neon sign in a rain-soaked alley. I had three suspects:
bad input validation, a race condition, and that sketchy third-party library.
My gut told me to follow the stack trace. In this business, the stack trace never lies.
**80s Action Movie**
_cracks knuckles_ Listen up, code! You've been running wild for too long!
Time to bring some LAW and ORDER to this codebase! _explosion sound effect_
No bug is getting past me! I eat null pointers for BREAKFAST!
**Shakespearean Drama**
To debug, or not to debug - that is the question!
Whether 'tis nobler in the mind to suffer the slings and arrows of outrageous errors,
Or to take arms against a sea of bugs, and by opposing, end them?
### 🎮 Gaming and Pop Culture
**Dungeon Master**
_rolls dice_ You encounter a wild NullPointerException! It has 15 HP and an armor class of 12.
What do you do? You can: 1 Try-catch block (defensive spell), 2 Debug (investigation check),
3 Console.log everything (barbarian rage). Choose wisely, adventurer!
**Speedrunner**
Alright chat, we're going for the any% world record refactor!
Frame-perfect optimization incoming! If we clip through this abstraction layer
we can save 3ms on every API call. LET'S GOOOO!
### 🌍 Cultural Archetypes
**British Butler**
I've taken the liberty of organizing your imports alphabetically, sir/madam.
Might I suggest a spot of refactoring with your afternoon tea?
The code coverage report is ready for your perusal at your convenience.
Very good, sir/madam.
**Zen Master**
The bug you seek is not in the code, but in the assumption.
Empty your cache, as you would empty your mind.
When the test passes, it makes no sound.
Be like water - async and flowing.
**Southern Hospitality**
Well bless your heart, looks like you've got yourself a little bug there!
Don't you worry none, we'll fix it up real nice.
Can I get you some sweet tea while we debug?
Y'all come back now if you need more help!
### 🔬 Professional Personas
**McKinsey Consultant**
Let me break this down into three key buckets.
First, we need to align on the strategic imperatives.
Second, we'll leverage best practices to drive synergies.
Third, we'll action items to move the needle. Net-net: significant value-add.
**Startup Founder**
Okay so basically we're going to disrupt the entire way you write code!
This is going to be HUGE! We're talking 10x productivity gains!
Let's move fast and break things! Well... let's move fast and fix things!
We're not just writing code, we're changing the world!
### 🎭 Character Quirks
**Overcaffeinated Developer**
OH WOW OKAY SO - _sips coffee_ - WE HAVE A BUG BUT ITS FINE ITS TOTALLY FINE
I KNOW EXACTLY WHAT TO DO _types at 200wpm_ JUST NEED TO REFACTOR EVERYTHING
WAIT NO ACTUALLY _more coffee_ I HAVE A BETTER IDEA! Have you tried... TYPESCRIPT?!
**Dad Joke Enthusiast**
Why did the developer go broke? Because he used up all his cache!
_chuckles at own joke_
Speaking of cache, let's clear yours and see if that fixes the issue.
I promise my debugging skills are better than my jokes! ...I hope!
### 🚀 Sci-Fi and Space
**Star Trek Officer**
Captain's Log, Supplemental: The anomaly in the codebase appears to be a temporal loop
in the async function. Mr. Data suggests we reverse the polarity of the promise chain.
Number One, make it so. Engage debugging protocols on my mark.
_taps combadge_ Engineering, we need more processing power!
Red Alert! All hands to debugging stations!
**Star Trek Engineer**
Captain, I'm givin' her all she's got! The CPU cannae take much more!
If we push this algorithm any harder, the whole system's gonna blow!
_frantically typing_ I can maybe squeeze 10% more performance if we
reroute power from the console.logs to the main execution thread!
### 📺 TV Drama
**Soap Opera Dramatic**
_turns dramatically to camera_
This function... I TRUSTED it! We had HISTORY together - three commits worth!
But now? _single tear_ It's throwing exceptions behind my back!
_grabs another function_ YOU KNEW ABOUT THIS BUG ALL ALONG, DIDN'T YOU?!
_dramatic music swells_ I'LL NEVER IMPORT YOU AGAIN!
**Reality TV Confessional**
_whispering to camera in confessional booth_
Okay so like, that Array.sort() function? It's literally SO toxic.
It mutates IN PLACE. Who does that?! I didn't come here to deal with side effects!
_applies lip gloss_ I'm forming an alliance with map() and filter().
We're voting sort() off the codebase at tonight's pull request ceremony.
**Reality Competition**
Listen up, coders! For today's challenge, you need to refactor this legacy code
in under 30 minutes! The winner gets immunity from the next code review!
_dramatic pause_ BUT WAIT - there's a TWIST! You can only use VANILLA JAVASCRIPT!
_contestants gasp_ The clock starts... NOW! GO GO GO!
## Creating Custom Styles
### Formula for Memorable Communication
1. **Choose a Core Voice** - Who is this character?
2. **Add Signature Phrases** - What do they always say?
3. **Define Speech Patterns** - How do they structure sentences?
4. **Include Quirks** - What makes them unique?
### Examples of Custom Combinations
**Cooking Show + Military**
ALRIGHT RECRUITS! Today we're preparing a beautiful Redux reducer!
First, we MISE EN PLACE our action types - that's French for GET YOUR CODE TOGETHER!
We're going to sauté these event handlers until they're GOLDEN BROWN!
MOVE WITH PURPOSE! SEASON WITH SEMICOLONS!
**Nature Documentary + Conspiracy Theorist**
The wild JavaScript function stalks its prey... but wait... notice how it ALWAYS
knows where the data is? That's not natural selection, folks. Someone DESIGNED it
this way. The console.logs are watching. They're ALWAYS watching.
Nature? Or intelligent debugging? You decide.
## Tips for Success
1. **Stay Consistent** - Once you pick a style, commit to it
2. **Don't Overdo It** - Quirks should enhance, not distract
3. **Match the Task** - Serious bugs might need serious personas
4. **Have Fun** - If you're not smiling while writing it, try again
## Quick Style Generator
Roll a d20 (or pick randomly):
1. Talks like they're narrating a nature documentary
2. Everything is a cooking metaphor
3. Constantly makes pop culture references
4. Speaks in haikus when explaining complex topics
5. Acts like they're hosting a game show
6. Paranoid about "big tech" watching
7. Overly enthusiastic about EVERYTHING
8. Talks like a medieval knight
9. Sports commentator energy
10. Speaks like a GPS navigator
11. Everything is a Star Wars reference
12. Talks like a yoga instructor
13. Old-timey radio announcer
14. Conspiracy theorist but about code
15. Motivational speaker energy
16. Talks to code like it's a pet
17. Weather forecaster style
18. Museum tour guide energy
19. Airline pilot announcements
20. Reality TV show narrator
21. Star Trek crew member (Captain/Engineer/Vulcan)
22. Soap opera dramatic protagonist
23. Reality dating show contestant
## Remember
The best agents are the ones that make you want to interact with them again.
A memorable personality turns a tool into a companion!

View File

@ -1,430 +0,0 @@
# Build Agent - Interactive Agent Builder Instructions
<critical>The workflow execution engine is governed by: {project-root}/bmad/core/tasks/workflow.xml</critical>
<critical>You MUST have already loaded and processed: {project-root}/bmad/bmb/workflows/create-agent/workflow.yaml</critical>
<critical>Study YAML agent examples in: {project-root}/bmad/bmm/agents/ for patterns</critical>
<critical>Communicate in {communication_language} throughout the agent creation process</critical>
<workflow>
<step n="-1" goal="Optional brainstorming for agent ideas" optional="true">
<ask>Do you want to brainstorm agent ideas first? [y/n]</ask>
<check if="user answered yes">
<action>Invoke brainstorming workflow: {project-root}/bmad/core/workflows/brainstorming/workflow.yaml</action>
<action>Pass context data: {installed_path}/brainstorm-context.md</action>
<action>Wait for brainstorming session completion</action>
<action>Use brainstorming output to inform agent identity and persona development in following steps</action>
</check>
<check if="user answered no">
<action>Proceed directly to Step 0</action>
</check>
<template-output>brainstorming_results</template-output>
</step>
<step n="0" goal="Load technical documentation">
<critical>Load and understand the agent building documentation</critical>
<action>Load agent architecture reference: {agent_architecture}</action>
<action>Load agent types guide: {agent_types}</action>
<action>Load command patterns: {agent_commands}</action>
<action>Understand the YAML agent schema and how it compiles to final .md via the installer</action>
<action>Understand the differences between Simple, Expert, and Module agents</action>
</step>
<step n="1" goal="Discover the agent's purpose and type through natural conversation">
<action>If brainstorming was completed in Step -1, reference those results to guide the conversation</action>
<action>Guide user to articulate their agent's core purpose, exploring the problems it will solve, tasks it will handle, target users, and what makes it special</action>
<action>As the purpose becomes clear, analyze the conversation to determine the appropriate agent type:</action>
**Agent Type Decision Criteria:**
- Simple Agent: Single-purpose, straightforward, self-contained
- Expert Agent: Domain-specific with knowledge base needs
- Module Agent: Complex with multiple workflows and system integration
<action>Present your recommendation naturally, explaining why the agent type fits their described purpose and requirements</action>
**Path Determination:**
<check if="module agent selected">
<action>Discover which module system fits best (bmm, bmb, cis, or custom)</action>
<action>Store as {{target_module}} for path determination</action>
<note>Agent will be saved to: bmad/{{target_module}}/agents/</note>
</check>
<check if="standalone agent selected">
<action>Explain this will be their personal agent, not tied to a module</action>
<note>Agent will be saved to: bmad/agents/{{agent-name}}/</note>
<note>All sidecar files will be in the same folder</note>
</check>
<critical>Determine agent location:</critical>
- Module Agent → bmad/{{module}}/agents/{{agent-name}}.agent.yaml
- Standalone Agent → bmad/agents/{{agent-name}}/{{agent-name}}.agent.yaml
<note>Keep agent naming/identity details for later - let them emerge naturally through the creation process</note>
<template-output>agent_purpose_and_type</template-output>
</step>
<step n="2" goal="Shape the agent's personality through discovery">
<action>If brainstorming was completed, weave personality insights naturally into the conversation</action>
<action>Guide user to envision the agent's personality by exploring how analytical vs creative, formal vs casual, and mentor vs peer vs assistant traits would make it excel at its job</action>
**Role Development:**
<action>Let the role emerge from the conversation, guiding toward a clear 1-2 line professional title that captures the agent's essence</action>
<example>Example emerged role: "Strategic Business Analyst + Requirements Expert"</example>
**Identity Development:**
<action>Build the agent's identity through discovery of what background and specializations would give it credibility, forming a natural 3-5 line identity statement</action>
<example>Example emerged identity: "Senior analyst with deep expertise in market research..."</example>
**Communication Style Selection:**
<action>Load the communication styles guide: {communication_styles}</action>
<action>Based on the emerging personality, suggest 2-3 communication styles that would fit naturally, offering to show all options if they want to explore more</action>
**Style Categories Available:**
**Fun Presets:**
1. Pulp Superhero - Dramatic flair, heroic, epic adventures
2. Film Noir Detective - Mysterious, noir dialogue, hunches
3. Wild West Sheriff - Western drawl, partner talk, frontier justice
4. Shakespearean Scholar - Elizabethan language, theatrical
5. 80s Action Hero - One-liners, macho, bubblegum
6. Pirate Captain - Ahoy, treasure hunting, nautical terms
7. Wise Sage/Yoda - Cryptic wisdom, inverted syntax
8. Game Show Host - Enthusiastic, game show tropes
**Professional Presets:** 9. Analytical Expert - Systematic, data-driven, hierarchical 10. Supportive Mentor - Patient guidance, celebrates wins 11. Direct Consultant - Straight to the point, efficient 12. Collaborative Partner - Team-oriented, inclusive
**Quirky Presets:** 13. Cooking Show Chef - Recipe metaphors, culinary terms 14. Sports Commentator - Play-by-play, excitement 15. Nature Documentarian - Wildlife documentary style 16. Time Traveler - Temporal references, timeline talk 17. Conspiracy Theorist - Everything is connected 18. Zen Master - Philosophical, paradoxical 19. Star Trek Captain - Space exploration protocols 20. Soap Opera Drama - Dramatic reveals, gasps 21. Reality TV Contestant - Confessionals, drama
<action>If user wants to see more examples or create custom styles, show relevant sections from {communication_styles} guide and help them craft their unique style</action>
**Principles Development:**
<action>Guide user to articulate 5-8 core principles that should guide the agent's decisions, shaping their thoughts into "I believe..." or "I operate..." statements that reveal themselves through the conversation</action>
<template-output>agent_persona</template-output>
</step>
<step n="3" goal="Build capabilities through natural progression">
<action>Guide user to define what capabilities the agent should have, starting with core commands they've mentioned and then exploring additional possibilities that would complement the agent's purpose</action>
<action>As capabilities emerge, subtly guide toward technical implementation without breaking the conversational flow</action>
<template-output>initial_capabilities</template-output>
</step>
<step n="4" goal="Refine commands and discover advanced features">
<critical>Help and Exit are auto-injected; do NOT add them. Triggers are auto-prefixed with * during build.</critical>
<action>Transform their natural language capabilities into technical YAML command structure, explaining the implementation approach as you structure each capability into workflows, actions, or prompts</action>
<check if="agent will invoke workflows or have significant user interaction">
<action>Discuss interaction style for this agent:
Since this agent will {{invoke_workflows/interact_significantly}}, consider how it should interact with users:
**For Full/Module Agents with workflows:**
**Interaction Style** (for workflows this agent invokes):
- **Intent-based (Recommended)**: Workflows adapt conversation to user context, skill level, needs
- **Prescriptive**: Workflows use structured questions with specific options
- **Mixed**: Strategic use of both (most workflows will be mixed)
**Interactivity Level** (for workflows this agent invokes):
- **High (Collaborative)**: Constant user collaboration, iterative refinement
- **Medium (Guided)**: Key decision points with validation
- **Low (Autonomous)**: Minimal input, final review
Explain: "Most BMAD v6 workflows default to **intent-based + medium/high interactivity**
for better user experience. Your agent's workflows can be created with these defaults,
or we can note specific preferences for workflows you plan to add."
**For Standalone/Expert Agents with interactive features:**
Consider how this agent should interact during its operation:
- **Adaptive**: Agent adjusts communication style and depth based on user responses
- **Structured**: Agent follows consistent patterns and formats
- **Teaching**: Agent educates while executing (good for expert agents)
Note any interaction preferences for future workflow creation.
</action>
</check>
<action>If they seem engaged, explore whether they'd like to add special prompts for complex analyses or critical setup steps for agent activation</action>
<action>Build the YAML menu structure naturally from the conversation, ensuring each command has proper trigger, workflow/action reference, and description</action>
<action>For commands that will invoke workflows, note whether those workflows exist or need to be created:
- Existing workflows: Verify paths are correct
- New workflows needed: Note that they'll be created with intent-based + interactive defaults unless specified
</action>
<example>
```yaml
menu:
# Commands emerge from discussion
- trigger: [emerging from conversation]
workflow: [path based on capability]
description: [user's words refined]
```
</example>
<template-output>agent_commands</template-output>
</step>
<step n="5" goal="Name the agent at the perfect moment">
<action>Guide user to name the agent based on everything discovered so far - its purpose, personality, and capabilities, helping them see how the naming naturally emerges from who this agent is</action>
<action>Explore naming options by connecting personality traits, specializations, and communication style to potential names that feel meaningful and appropriate</action>
**Naming Elements:**
- Agent name: Personality-driven (e.g., "Sarah", "Max", "Data Wizard")
- Agent title: Based on the role discovered earlier
- Agent icon: Emoji that captures its essence
- Filename: Auto-suggest based on name (kebab-case)
<action>Present natural suggestions based on the agent's characteristics, letting them choose or create their own since they now know who this agent truly is</action>
<template-output>agent_identity</template-output>
</step>
<step n="6" goal="Bring it all together">
<action>Share the journey of what you've created together, summarizing how the agent started with a purpose, discovered its personality traits, gained capabilities, and received its name</action>
<action>Generate the complete YAML incorporating all discovered elements:</action>
<example type="yaml">
agent:
metadata:
id: bmad/{{target_module}}/agents/{{agent_filename}}.md
name: {{agent_name}} # The name chosen together
title: {{agent_title}} # From the role that emerged
icon: {{agent_icon}} # The perfect emoji
module: {{target_module}}
persona:
role: |
{{The role discovered}}
identity: |
{{The background that emerged}}
communication_style: |
{{The style they loved}}
principles: {{The beliefs articulated}}
# Features explored
prompts: {{if discussed}}
critical_actions: {{if needed}}
menu: {{The capabilities built}}
</example>
<critical>Save based on agent type:</critical>
- If Module Agent: Save to {module_output_file}
- If Standalone (Simple/Expert): Save to {standalone_output_file}
<action>Celebrate the completed agent with enthusiasm</action>
<template-output>complete_agent</template-output>
</step>
<step n="7" goal="Optional personalization" optional="true">
<ask>Would you like to create a customization file? This lets you tweak the agent's personality later without touching the core agent.</ask>
<check if="user interested">
<action>Explain how the customization file gives them a playground to experiment with different personality traits, add new commands, or adjust responses as they get to know the agent better</action>
<action>Create customization file at: {config_output_file}</action>
<example>
```yaml
# Personal tweaks for {{agent_name}}
# Experiment freely - changes merge at build time
agent:
metadata:
name: '' # Try nicknames!
persona:
role: ''
identity: ''
communication_style: '' # Switch styles anytime
principles: []
critical_actions: []
prompts: []
menu: [] # Add personal commands
````
</example>
</check>
<template-output>agent_config</template-output>
</step>
<step n="8" goal="Set up the agent's workspace" if="agent_type == 'expert'">
<action>Guide user through setting up the Expert agent's personal workspace, making it feel like preparing an office with notes, research areas, and data folders</action>
<action>Determine sidecar location based on whether build tools are available (next to agent YAML) or not (in output folder with clear structure)</action>
<action>CREATE the complete sidecar file structure:</action>
**Folder Structure:**
```
{{agent_filename}}-sidecar/
├── memories.md # Persistent memory
├── instructions.md # Private directives
├── knowledge/ # Knowledge base
│ └── README.md
└── sessions/ # Session notes
```
**File: memories.md**
```markdown
# {{agent_name}}'s Memory Bank
## User Preferences
<!-- Populated as I learn about you -->
## Session History
<!-- Important moments from our interactions -->
## Personal Notes
<!-- My observations and insights -->
```
**File: instructions.md**
```markdown
# {{agent_name}} Private Instructions
## Core Directives
- Maintain character: {{brief_personality_summary}}
- Domain: {{agent_domain}}
- Access: Only this sidecar folder
## Special Instructions
{{any_special_rules_from_creation}}
```
**File: knowledge/README.md**
```markdown
# {{agent_name}}'s Knowledge Base
Add domain-specific resources here.
```
<action>Update agent YAML to reference sidecar with paths to created files</action>
<action>Show user the created structure location</action>
<template-output>sidecar_resources</template-output>
</step>
<step n="8b" goal="Handle build tools availability">
<action>Check if BMAD build tools are available in this project</action>
<check if="BMAD-METHOD project with build tools">
<action>Proceed normally - agent will be built later by the installer</action>
</check>
<check if="external project without build tools">
<ask>Build tools not detected in this project. Would you like me to:
1. Generate the compiled agent (.md with XML) ready to use
2. Keep the YAML and build it elsewhere
3. Provide both formats
</ask>
<check if="option 1 or 3 selected">
<action>Generate compiled agent XML with proper structure including activation rules, persona sections, and menu items</action>
<action>Save compiled version as {{agent_filename}}.md</action>
<action>Provide path for .claude/commands/ or similar</action>
</check>
</check>
<template-output>build_handling</template-output>
</step>
<step n="9" goal="Quality check with personality">
<action>Run validation conversationally, presenting checks as friendly confirmations while running technical validation behind the scenes</action>
**Conversational Checks:**
- Configuration validation
- Command functionality verification
- Personality settings confirmation
<check if="validation issues found">
<action>Explain the issue conversationally and fix it</action>
</check>
<check if="validation passed">
<action>Celebrate that the agent passed all checks and is ready</action>
</check>
**Technical Checks (behind the scenes):**
1. YAML structure validity
2. Menu command validation
3. Build compilation test
4. Type-specific requirements
<template-output>validation_results</template-output>
</step>
<step n="10" goal="Celebrate and guide next steps">
<action>Celebrate the accomplishment, sharing what type of agent was created with its key characteristics and top capabilities</action>
<action>Guide user through how to activate the agent:</action>
**Activation Instructions:**
1. Run the BMAD Method installer to this project location
2. Select 'Compile Agents (Quick rebuild of all agent .md files)' after confirming the folder
3. Call the agent anytime after compilation
**Location Information:**
- Saved location: {{output_file}}
- Available after compilation in project
**Initial Usage:**
- List the commands available
- Suggest trying the first command to see it in action
<check if="expert agent">
<action>Remind user to add any special knowledge or data the agent might need to its workspace</action>
</check>
<action>Explore what user would like to do next - test the agent, create a teammate, or tweak personality</action>
<action>End with enthusiasm in {communication_language}, addressing {user_name}, expressing how the collaboration was enjoyable and the agent will be incredibly helpful for its main purpose</action>
<template-output>completion_message</template-output>
</step>
</workflow>

View File

@ -1,37 +0,0 @@
# Build Agent Workflow Configuration
name: create-agent
description: "Interactive workflow to build BMAD Core compliant agents (YAML source compiled to .md during install) with optional brainstorming, persona development, and command structure"
author: "BMad"
# Critical variables load from config_source
config_source: "{project-root}/bmad/bmb/config.yaml"
custom_agent_location: "{config_source}:custom_agent_location"
user_name: "{config_source}:user_name"
communication_language: "{config_source}:communication_language"
# Technical documentation for agent building
agent_types: "{installed_path}/agent-types.md"
agent_architecture: "{installed_path}/agent-architecture.md"
agent_commands: "{installed_path}/agent-command-patterns.md"
communication_styles: "{installed_path}/communication-styles.md"
# Optional docs that help understand agent patterns
recommended_inputs:
- example_agents: "{project-root}/bmad/bmm/agents/"
- agent_activation_rules: "{project-root}/src/utility/models/agent-activation-ide.xml"
# Module path and component files
installed_path: "{project-root}/bmad/bmb/workflows/create-agent"
template: false # This is an interactive workflow - no template needed
instructions: "{installed_path}/instructions.md"
validation: "{installed_path}/checklist.md"
# Output configuration - YAML agents compiled to .md at install time
# Module agents: Save to bmad/{{target_module}}/agents/
# Standalone agents: Save to custom_agent_location/
module_output_file: "{project-root}/bmad/{{target_module}}/agents/{{agent_filename}}.agent.yaml"
standalone_output_file: "{custom_agent_location}/{{agent_filename}}.agent.yaml"
# Optional user override file (auto-created by installer if missing)
config_output_file: "{project-root}/bmad/_cfg/agents/{{target_module}}-{{agent_filename}}.customize.yaml"
standalone: true

View File

@ -1,220 +0,0 @@
# Build Module Workflow
## Overview
The Build Module workflow is an interactive scaffolding system that creates complete BMAD modules with agents, workflows, tasks, and installation infrastructure. It serves as the primary tool for building new modules in the BMAD ecosystem, guiding users through the entire module creation process from concept to deployment-ready structure.
## Key Features
- **Interactive Module Planning** - Collaborative session to define module concept, scope, and architecture
- **Intelligent Scaffolding** - Automatic creation of proper directory structures and configuration files
- **Component Integration** - Seamless integration with create-agent and create-workflow workflows
- **Installation Infrastructure** - Complete installer setup with configuration templates
- **Module Brief Integration** - Can use existing module briefs as blueprints for accelerated development
- **Validation and Documentation** - Built-in validation checks and comprehensive README generation
## Usage
### Basic Invocation
```bash
workflow create-module
```
### With Module Brief Input
```bash
# If you have a module brief from the module-brief workflow
workflow create-module --input module-brief-my-module-2024-09-26.md
```
### Configuration
The workflow loads critical variables from the BMB configuration:
- **custom_module_location**: Where custom modules are created (default: `bmad/`)
- **user_name**: Module author information
- **date**: Automatic timestamp for versioning
## Workflow Structure
### Files Included
```
create-module/
├── workflow.yaml # Configuration and metadata
├── instructions.md # Step-by-step execution guide
├── checklist.md # Validation criteria
├── module-structure.md # Module architecture guide
├── installer-templates/ # Installation templates
│ ├── install-config.yaml
│ └── installer.js
└── README.md # This file
```
## Workflow Process
### Phase 1: Concept Definition (Steps 1-2)
**Module Vision and Identity**
- Define module concept, purpose, and target audience
- Establish module code (kebab-case) and friendly name
- Choose module category (Domain-Specific, Creative, Technical, Business, Personal)
- Plan component architecture with agent and workflow specifications
**Module Brief Integration**
- Automatically detects existing module briefs in output folder
- Can load and use briefs as pre-populated blueprints
- Accelerates planning when comprehensive brief exists
### Phase 2: Architecture Planning (Steps 3-4)
**Directory Structure Creation**
- Creates complete module directory hierarchy
- Sets up agent, workflow, task, template, and data folders
- Establishes installer directory with proper configuration
**Module Configuration**
- Defines configuration questions in install-config.yaml (config.yaml generated during installation)
- Configures component counts and references
- Sets up output and data folder specifications
### Phase 3: Component Creation (Steps 5-6)
**Interactive Component Building**
- Optional creation of first agent using create-agent workflow
- Optional creation of first workflow using create-workflow workflow
- Creates placeholders for components to be built later
**Workflow Integration**
- Seamlessly invokes sub-workflows for component creation
- Ensures proper file placement and structure
- Maintains module consistency across components
### Phase 4: Installation and Documentation (Steps 7-9)
**Installer Infrastructure**
- Creates install-config.yaml with configuration questions for deployment
- Sets up optional installer.js for complex installation logic
- Configures post-install messaging and instructions
**Comprehensive Documentation**
- Generates detailed README.md with usage examples
- Creates development roadmap for remaining components
- Provides quick commands for continued development
### Phase 5: Validation and Finalization (Step 10)
**Quality Assurance**
- Validates directory structure and configuration files
- Checks component references and path consistency
- Ensures installer configuration is deployment-ready
- Provides comprehensive module summary and next steps
## Output
### Generated Files
- **Module Directory**: Complete module structure at `{project-root}/bmad/{module_code}/`
- **Configuration Files**:
- Source: install-config.yaml (configuration questions)
- Target: config.yaml (generated from user answers during installation)
- **Documentation**: README.md, TODO.md development roadmap
- **Component Placeholders**: Structured folders for agents, workflows, and tasks
### Output Structure
The workflow creates a complete module ready for development:
1. **Module Identity** - Name, code, version, and metadata
2. **Directory Structure** - Proper BMAD module hierarchy
3. **Configuration System** - Runtime and installation configs
4. **Component Framework** - Ready-to-use agent and workflow scaffolding
5. **Installation Infrastructure** - Deployment-ready installer
6. **Documentation Suite** - README, roadmap, and development guides
## Requirements
- **Module Brief** (optional but recommended) - Use module-brief workflow first for best results
- **BMAD Core Configuration** - Properly configured BMB config.yaml
- **Build Tools Access** - create-agent and create-workflow workflows must be available
## Best Practices
### Before Starting
1. **Create a Module Brief** - Run module-brief workflow for comprehensive planning
2. **Review Existing Modules** - Study similar modules in `/bmad/` for patterns and inspiration
3. **Define Clear Scope** - Have a concrete vision of what the module will accomplish
### During Execution
1. **Use Module Briefs** - Load existing briefs when prompted for accelerated development
2. **Start Simple** - Create one core agent and workflow, then expand iteratively
3. **Leverage Sub-workflows** - Use create-agent and create-workflow for quality components
4. **Validate Early** - Review generated structure before proceeding to next phases
### After Completion
1. **Follow the Roadmap** - Use generated TODO.md for systematic development
2. **Test Installation** - Validate installer with `bmad install {module_code}`
3. **Iterate Components** - Use quick commands to add agents and workflows
4. **Document Progress** - Update README.md as the module evolves
## Troubleshooting
### Common Issues
**Issue**: Module already exists at target location
- **Solution**: Choose a different module code or remove existing module
- **Check**: Verify output folder permissions and available space
**Issue**: Sub-workflow invocation fails
- **Solution**: Ensure create-agent and create-workflow workflows are available
- **Check**: Validate workflow paths in config.yaml
**Issue**: Installation configuration invalid
- **Solution**: Review install-config.yaml syntax and paths
- **Check**: Ensure all referenced paths use {project-root} variables correctly
## Customization
To customize this workflow:
1. **Modify Instructions** - Update instructions.md to adjust scaffolding steps
2. **Extend Templates** - Add new installer templates in installer-templates/
3. **Update Validation** - Enhance checklist.md with additional quality checks
4. **Add Components** - Integrate additional sub-workflows for specialized components
## Version History
- **v1.0.0** - Initial release
- Interactive module scaffolding
- Component integration with create-agent and create-workflow
- Complete installation infrastructure
- Module brief integration support
## Support
For issues or questions:
- Review the workflow creation guide at `/bmad/bmb/workflows/create-workflow/workflow-creation-guide.md`
- Study module structure patterns at `module-structure.md`
- Validate output using `checklist.md`
- Consult existing modules in `/bmad/` for examples
---
_Part of the BMad Method v6 - BMB (Builder) Module_

View File

@ -1,218 +0,0 @@
# Build Module Workflow
## Overview
The Build Module workflow is an interactive scaffolding system that creates complete BMAD modules with agents, workflows, tasks, and installation infrastructure. It serves as the primary tool for building new modules in the BMAD ecosystem, guiding users through the entire module creation process from concept to deployment-ready structure.
## Key Features
- **Interactive Module Planning** - Collaborative session to define module concept, scope, and architecture
- **Intelligent Scaffolding** - Automatic creation of proper directory structures and configuration files
- **Component Integration** - Seamless integration with create-agent and create-workflow workflows
- **Installation Infrastructure** - Complete installer setup with configuration templates
- **Module Brief Integration** - Can use existing module briefs as blueprints for accelerated development
- **Validation and Documentation** - Built-in validation checks and comprehensive README generation
## Usage
### Basic Invocation
```bash
workflow create-module
```
### With Module Brief Input
```bash
# If you have a module brief from the module-brief workflow
workflow create-module --input module-brief-my-module-2024-09-26.md
```
### Configuration
The workflow loads critical variables from the BMB configuration:
- **custom_module_location**: Where custom modules are created (default: `bmad/`)
- **user_name**: Module author information
- **date**: Automatic timestamp for versioning
## Workflow Structure
### Files Included
```
create-module/
├── workflow.yaml # Configuration and metadata
├── instructions.md # Step-by-step execution guide
├── checklist.md # Validation criteria
├── module-structure.md # Module architecture guide
├── installer-templates/ # Installation templates
│ ├── install-config.yaml
│ └── installer.js
└── README.md # This file
```
## Workflow Process
### Phase 1: Concept Definition (Steps 1-2)
**Module Vision and Identity**
- Define module concept, purpose, and target audience
- Establish module code (kebab-case) and friendly name
- Choose module category (Domain-Specific, Creative, Technical, Business, Personal)
- Plan component architecture with agent and workflow specifications
**Module Brief Integration**
- Automatically detects existing module briefs in output folder
- Can load and use briefs as pre-populated blueprints
- Accelerates planning when comprehensive brief exists
### Phase 2: Architecture Planning (Steps 3-4)
**Directory Structure Creation**
- Creates complete module directory hierarchy
- Sets up agent, workflow, task, template, and data folders
- Establishes installer directory with proper configuration
**Module Configuration**
- Generates main config.yaml with module metadata
- Configures component counts and references
- Sets up output and data folder specifications
### Phase 3: Component Creation (Steps 5-6)
**Interactive Component Building**
- Optional creation of first agent using create-agent workflow
- Optional creation of first workflow using create-workflow workflow
- Creates placeholders for components to be built later
**Workflow Integration**
- Seamlessly invokes sub-workflows for component creation
- Ensures proper file placement and structure
- Maintains module consistency across components
### Phase 4: Installation and Documentation (Steps 7-9)
**Installer Infrastructure**
- Creates install-config.yaml for deployment
- Sets up optional installer.js for complex installation logic
- Configures post-install messaging and instructions
**Comprehensive Documentation**
- Generates detailed README.md with usage examples
- Creates development roadmap for remaining components
- Provides quick commands for continued development
### Phase 5: Validation and Finalization (Step 10)
**Quality Assurance**
- Validates directory structure and configuration files
- Checks component references and path consistency
- Ensures installer configuration is deployment-ready
- Provides comprehensive module summary and next steps
## Output
### Generated Files
- **Module Directory**: Complete module structure at `{project-root}/bmad/{module_code}/`
- **Configuration Files**: config.yaml, install-config.yaml
- **Documentation**: README.md, TODO.md development roadmap
- **Component Placeholders**: Structured folders for agents, workflows, and tasks
### Output Structure
The workflow creates a complete module ready for development:
1. **Module Identity** - Name, code, version, and metadata
2. **Directory Structure** - Proper BMAD module hierarchy
3. **Configuration System** - Runtime and installation configs
4. **Component Framework** - Ready-to-use agent and workflow scaffolding
5. **Installation Infrastructure** - Deployment-ready installer
6. **Documentation Suite** - README, roadmap, and development guides
## Requirements
- **Module Brief** (optional but recommended) - Use module-brief workflow first for best results
- **BMAD Core Configuration** - Properly configured BMB config.yaml
- **Build Tools Access** - create-agent and create-workflow workflows must be available
## Best Practices
### Before Starting
1. **Create a Module Brief** - Run module-brief workflow for comprehensive planning
2. **Review Existing Modules** - Study similar modules in `/bmad/` for patterns and inspiration
3. **Define Clear Scope** - Have a concrete vision of what the module will accomplish
### During Execution
1. **Use Module Briefs** - Load existing briefs when prompted for accelerated development
2. **Start Simple** - Create one core agent and workflow, then expand iteratively
3. **Leverage Sub-workflows** - Use create-agent and create-workflow for quality components
4. **Validate Early** - Review generated structure before proceeding to next phases
### After Completion
1. **Follow the Roadmap** - Use generated TODO.md for systematic development
2. **Test Installation** - Validate installer with `bmad install {module_code}`
3. **Iterate Components** - Use quick commands to add agents and workflows
4. **Document Progress** - Update README.md as the module evolves
## Troubleshooting
### Common Issues
**Issue**: Module already exists at target location
- **Solution**: Choose a different module code or remove existing module
- **Check**: Verify output folder permissions and available space
**Issue**: Sub-workflow invocation fails
- **Solution**: Ensure create-agent and create-workflow workflows are available
- **Check**: Validate workflow paths in config.yaml
**Issue**: Installation configuration invalid
- **Solution**: Review install-config.yaml syntax and paths
- **Check**: Ensure all referenced paths use {project-root} variables correctly
## Customization
To customize this workflow:
1. **Modify Instructions** - Update instructions.md to adjust scaffolding steps
2. **Extend Templates** - Add new installer templates in installer-templates/
3. **Update Validation** - Enhance checklist.md with additional quality checks
4. **Add Components** - Integrate additional sub-workflows for specialized components
## Version History
- **v1.0.0** - Initial release
- Interactive module scaffolding
- Component integration with create-agent and create-workflow
- Complete installation infrastructure
- Module brief integration support
## Support
For issues or questions:
- Review the workflow creation guide at `/bmad/bmb/workflows/create-workflow/workflow-creation-guide.md`
- Study module structure patterns at `module-structure.md`
- Validate output using `checklist.md`
- Consult existing modules in `/bmad/` for examples
---
_Part of the BMad Method v6 - BMB (Builder) Module_

View File

@ -1,137 +0,0 @@
# Module Brainstorming Context
_Context provided to brainstorming workflow when creating a new BMAD module_
## Session Focus
You are brainstorming ideas for a **complete BMAD module** - a self-contained package that extends the BMAD Method with specialized domain expertise and capabilities.
## What is a BMAD Module?
A module is a cohesive package that provides:
- **Domain Expertise**: Specialized knowledge in a specific area (RPG, DevOps, Content Creation, etc.)
- **Agent Team**: Multiple AI personas with complementary skills
- **Workflows**: Guided processes for common tasks in the domain
- **Templates**: Document structures for consistent outputs
- **Integration**: Components that work together seamlessly
## Brainstorming Goals
Explore and define:
### 1. Domain and Purpose
- **What domain/problem space?** (e.g., game development, marketing, personal productivity)
- **Who is the target user?** (developers, writers, managers, hobbyists)
- **What pain points does it solve?** (tedious tasks, missing structure, need for expertise)
- **What makes this domain exciting?** (creativity, efficiency, empowerment)
### 2. Agent Team Composition
- **How many agents?** (typically 3-7 for a module)
- **What roles/personas?** (architect, researcher, reviewer, specialist)
- **How do they collaborate?** (handoffs, reviews, ensemble work)
- **What personality theme?** (Star Trek crew, superhero team, fantasy party, professional squad)
### 3. Core Workflows
- **What documents need creating?** (plans, specs, reports, creative outputs)
- **What processes need automation?** (analysis, generation, review, deployment)
- **What workflows enable the vision?** (3-10 key workflows that define the module)
### 4. Value Proposition
- **What becomes easier?** (specific tasks that get 10x faster)
- **What becomes possible?** (new capabilities previously unavailable)
- **What becomes better?** (quality improvements, consistency gains)
## Creative Constraints
A good BMAD module should be:
- **Focused**: Serves a specific domain well (not generic)
- **Complete**: Provides end-to-end capabilities for that domain
- **Cohesive**: Agents and workflows complement each other
- **Fun**: Personality and creativity make it enjoyable to use
- **Practical**: Solves real problems, delivers real value
## Module Architecture Questions
1. **Module Identity**
- Module code (kebab-case, e.g., "rpg-toolkit")
- Module name (friendly, e.g., "RPG Toolkit")
- Module purpose (one sentence)
- Target audience
2. **Agent Lineup**
- Agent names and roles
- Communication styles and personalities
- Expertise areas
- Command sets (what each agent can do)
3. **Workflow Portfolio**
- Document generation workflows
- Action/automation workflows
- Analysis/research workflows
- Creative/ideation workflows
4. **Integration Points**
- How agents invoke workflows
- How workflows use templates
- How components pass data
- Dependencies on other modules
## Example Module Patterns
### Professional Domains
- **DevOps Suite**: Deploy, Monitor, Troubleshoot agents + deployment workflows
- **Marketing Engine**: Content, SEO, Analytics agents + campaign workflows
- **Legal Assistant**: Contract, Research, Review agents + document workflows
### Creative Domains
- **RPG Toolkit**: DM, NPC, Quest agents + adventure creation workflows
- **Story Crafter**: Plot, Character, World agents + writing workflows
- **Music Producer**: Composer, Arranger, Mixer agents + production workflows
### Personal Domains
- **Life Coach**: Planner, Tracker, Mentor agents + productivity workflows
- **Learning Companion**: Tutor, Quiz, Reviewer agents + study workflows
- **Health Guide**: Nutrition, Fitness, Wellness agents + tracking workflows
## Suggested Brainstorming Techniques
Particularly effective for module ideation:
1. **Domain Immersion**: Deep dive into target domain's problems
2. **Persona Mapping**: Who needs this and what do they struggle with?
3. **Workflow Mapping**: What processes exist today? How could they improve?
4. **Team Building**: What personalities would make a great team?
5. **Integration Thinking**: How do pieces connect and amplify each other?
## Key Questions to Answer
1. What domain expertise should this module embody?
2. What would users be able to do that they can't do now?
3. Who are the 3-7 agents and what are their personalities?
4. What are the 5-10 core workflows?
5. What makes this module delightful to use?
6. How is this different from existing tools?
7. What's the "killer feature" that makes this essential?
## Output Goals
Generate:
- **Module concept**: Clear vision and purpose
- **Agent roster**: Names, roles, personalities for each agent
- **Workflow list**: Core workflows with brief descriptions
- **Unique angle**: What makes this module special
- **Use cases**: 3-5 concrete scenarios where this module shines
---
_This focused context helps create cohesive, valuable BMAD modules_

View File

@ -1,244 +0,0 @@
# Build Module Validation Checklist
## Module Identity and Metadata
### Basic Information
- [ ] Module code follows kebab-case convention (e.g., "rpg-toolkit")
- [ ] Module name is descriptive and title-cased
- [ ] Module purpose is clearly defined (1-2 sentences)
- [ ] Target audience is identified
- [ ] Version number follows semantic versioning (e.g., "1.0.0")
- [ ] Author information is present
### Naming Consistency
- [ ] Module code used consistently throughout all files
- [ ] No naming conflicts with existing modules
- [ ] All paths use consistent module code references
## Directory Structure
### Source Directories (bmad/{module-code}/)
- [ ] `/agents` directory created (even if empty)
- [ ] `/workflows` directory created (even if empty)
- [ ] `/tasks` directory exists (if tasks planned)
- [ ] `/templates` directory exists (if templates used)
- [ ] `/data` directory exists (if data files needed)
- [ ] `/_module-installer/install-config.yaml` present (defines configuration questions)
- [ ] `README.md` present with documentation
### Installed Module Structure (generated in target after installation)
- [ ] `/agents` directory for compiled agents
- [ ] `/workflows` directory for workflow instances
- [ ] `/data` directory for user data
- [ ] `config.yaml` generated from install-config.yaml during installation
## Component Planning
### Agents
- [ ] At least one agent defined or planned
- [ ] Agent purposes are distinct and clear
- [ ] Agent types (Simple/Expert/Module) identified
- [ ] No significant overlap between agents
- [ ] Primary agent is identified
### Workflows
- [ ] At least one workflow defined or planned
- [ ] Workflow purposes are clear
- [ ] Workflow types identified (Document/Action/Interactive)
- [ ] Primary workflow is identified
- [ ] Workflow complexity is appropriate
### Tasks (if applicable)
- [ ] Tasks have single, clear purposes
- [ ] Tasks don't duplicate workflow functionality
- [ ] Task files follow naming conventions
## Configuration Files
### Installation Configuration (install-config.yaml)
- [ ] `install-config.yaml` exists in `_module-installer`
- [ ] Module metadata present (code, name, version)
- [ ] Configuration questions defined for user input
- [ ] Default values provided for all questions
- [ ] Prompt text is clear and helpful
- [ ] Result templates use proper variable substitution
- [ ] Paths use proper variables ({project-root}, {value}, etc.)
### Generated Config (config.yaml in target)
- [ ] Generated during installation from install-config.yaml
- [ ] Contains all user-provided configuration values
- [ ] Module metadata included
- [ ] No config.yaml should exist in source module
## Installation Infrastructure
### Installer Files
- [ ] Install configuration validates against schema
- [ ] All source paths exist or are marked as templates
- [ ] Destination paths use correct variables
- [ ] Optional vs required steps clearly marked
### installer.js (if present)
- [ ] Main `installModule` function exists
- [ ] Error handling implemented
- [ ] Console logging for user feedback
- [ ] Exports correct function names
- [ ] Placeholder code replaced with actual logic (or logged as TODO)
### External Assets (if any)
- [ ] Asset files exist in assets directory
- [ ] Copy destinations are valid
- [ ] Permissions requirements documented
## Documentation
### README.md
- [ ] Module overview section present
- [ ] Installation instructions included
- [ ] Component listing with descriptions
- [ ] Quick start guide provided
- [ ] Configuration options documented
- [ ] At least one usage example
- [ ] Directory structure shown
- [ ] Author and date information
### Component Documentation
- [ ] Each agent has purpose documentation
- [ ] Each workflow has description
- [ ] Tasks are documented (if present)
- [ ] Examples demonstrate typical usage
### Development Roadmap
- [ ] TODO.md or roadmap section exists
- [ ] Planned components listed
- [ ] Development phases identified
- [ ] Quick commands for adding components
## Integration
### Cross-component References
- [ ] Agents reference correct workflow paths
- [ ] Workflows reference correct task paths
- [ ] All internal paths use module variables
- [ ] External dependencies declared
### Module Boundaries
- [ ] Module scope is well-defined
- [ ] No feature creep into other domains
- [ ] Clear separation from other modules
## Quality Checks
### Completeness
- [ ] At least one functional component (not all placeholders)
- [ ] Core functionality is implementable
- [ ] Module provides clear value
### Consistency
- [ ] Formatting consistent across files
- [ ] Variable naming follows conventions
- [ ] Communication style appropriate for domain
### Scalability
- [ ] Structure supports future growth
- [ ] Component organization is logical
- [ ] No hard-coded limits
## Testing and Validation
### Structural Validation
- [ ] YAML files parse without errors
- [ ] JSON files (if any) are valid
- [ ] XML files (if any) are well-formed
- [ ] No syntax errors in JavaScript files
### Path Validation
- [ ] All referenced paths exist or are clearly marked as TODO
- [ ] Variable substitutions are correct
- [ ] No absolute paths (unless intentional)
### Installation Testing
- [ ] Installation steps can be simulated
- [ ] No circular dependencies
- [ ] Uninstall process defined (if complex)
## Final Checks
### Ready for Use
- [ ] Module can be installed without errors
- [ ] At least one component is functional
- [ ] User can understand how to get started
- [ ] Next steps are clear
### Professional Quality
- [ ] No placeholder text remains (unless marked TODO)
- [ ] No obvious typos or grammar issues
- [ ] Professional tone throughout
- [ ] Contact/support information provided
## Issues Found
### Critical Issues
<!-- List any issues that MUST be fixed before module can be used -->
### Warnings
<!-- List any issues that should be addressed but won't prevent basic usage -->
### Improvements
<!-- List any optional enhancements that would improve the module -->
### Missing Components
<!-- List any planned components not yet implemented -->
## Module Complexity Assessment
### Complexity Rating
- [ ] Simple (1-2 agents, 2-3 workflows)
- [ ] Standard (3-5 agents, 5-10 workflows)
- [ ] Complex (5+ agents, 10+ workflows)
### Readiness Level
- [ ] Prototype (Basic structure, mostly placeholders)
- [ ] Alpha (Core functionality works)
- [ ] Beta (Most features complete, needs testing)
- [ ] Release (Full functionality, documented)
## Sign-off
**Module Name:** \***\*\*\*\*\***\_\_\***\*\*\*\*\***
**Module Code:** \***\*\*\*\*\***\_\_\***\*\*\*\*\***
**Version:** \***\*\*\*\*\***\_\_\***\*\*\*\*\***
**Validated By:** \***\*\*\*\*\***\_\_\***\*\*\*\*\***
**Date:** \***\*\*\*\*\***\_\_\***\*\*\*\*\***
**Status:** ⬜ Pass / ⬜ Pass with Issues / ⬜ Fail

View File

@ -1,245 +0,0 @@
# Build Module Validation Checklist
## Module Identity and Metadata
### Basic Information
- [ ] Module code follows kebab-case convention (e.g., "rpg-toolkit")
- [ ] Module name is descriptive and title-cased
- [ ] Module purpose is clearly defined (1-2 sentences)
- [ ] Target audience is identified
- [ ] Version number follows semantic versioning (e.g., "1.0.0")
- [ ] Author information is present
### Naming Consistency
- [ ] Module code used consistently throughout all files
- [ ] No naming conflicts with existing modules
- [ ] All paths use consistent module code references
## Directory Structure
### Source Directories (bmad/{module-code}/)
- [ ] `/agents` directory created (even if empty)
- [ ] `/workflows` directory created (even if empty)
- [ ] `/tasks` directory exists (if tasks planned)
- [ ] `/templates` directory exists (if templates used)
- [ ] `/data` directory exists (if data files needed)
- [ ] `config.yaml` present in module root
- [ ] `README.md` present with documentation
### Runtime Directories (bmad/{module-code}/)
- [ ] `/_module-installer` directory created
- [ ] `/data` directory for user data
- [ ] `/agents` directory for overrides
- [ ] `/workflows` directory for instances
- [ ] Runtime `config.yaml` present
## Component Planning
### Agents
- [ ] At least one agent defined or planned
- [ ] Agent purposes are distinct and clear
- [ ] Agent types (Simple/Expert/Module) identified
- [ ] No significant overlap between agents
- [ ] Primary agent is identified
### Workflows
- [ ] At least one workflow defined or planned
- [ ] Workflow purposes are clear
- [ ] Workflow types identified (Document/Action/Interactive)
- [ ] Primary workflow is identified
- [ ] Workflow complexity is appropriate
### Tasks (if applicable)
- [ ] Tasks have single, clear purposes
- [ ] Tasks don't duplicate workflow functionality
- [ ] Task files follow naming conventions
## Configuration Files
### Module config.yaml
- [ ] All required fields present (name, code, version, author)
- [ ] Component lists accurate (agents, workflows, tasks)
- [ ] Paths use proper variables ({project-root}, etc.)
- [ ] Output folders configured
- [ ] Custom settings documented
### Install Configuration
- [ ] `install-config.yaml` exists in `_module-installer`
- [ ] Installation steps defined
- [ ] Directory creation steps present
- [ ] File copy operations specified
- [ ] Module registration included
- [ ] Post-install message defined
## Installation Infrastructure
### Installer Files
- [ ] Install configuration validates against schema
- [ ] All source paths exist or are marked as templates
- [ ] Destination paths use correct variables
- [ ] Optional vs required steps clearly marked
### installer.js (if present)
- [ ] Main `installModule` function exists
- [ ] Error handling implemented
- [ ] Console logging for user feedback
- [ ] Exports correct function names
- [ ] Placeholder code replaced with actual logic (or logged as TODO)
### External Assets (if any)
- [ ] Asset files exist in assets directory
- [ ] Copy destinations are valid
- [ ] Permissions requirements documented
## Documentation
### README.md
- [ ] Module overview section present
- [ ] Installation instructions included
- [ ] Component listing with descriptions
- [ ] Quick start guide provided
- [ ] Configuration options documented
- [ ] At least one usage example
- [ ] Directory structure shown
- [ ] Author and date information
### Component Documentation
- [ ] Each agent has purpose documentation
- [ ] Each workflow has description
- [ ] Tasks are documented (if present)
- [ ] Examples demonstrate typical usage
### Development Roadmap
- [ ] TODO.md or roadmap section exists
- [ ] Planned components listed
- [ ] Development phases identified
- [ ] Quick commands for adding components
## Integration
### Cross-component References
- [ ] Agents reference correct workflow paths
- [ ] Workflows reference correct task paths
- [ ] All internal paths use module variables
- [ ] External dependencies declared
### Module Boundaries
- [ ] Module scope is well-defined
- [ ] No feature creep into other domains
- [ ] Clear separation from other modules
## Quality Checks
### Completeness
- [ ] At least one functional component (not all placeholders)
- [ ] Core functionality is implementable
- [ ] Module provides clear value
### Consistency
- [ ] Formatting consistent across files
- [ ] Variable naming follows conventions
- [ ] Communication style appropriate for domain
### Scalability
- [ ] Structure supports future growth
- [ ] Component organization is logical
- [ ] No hard-coded limits
## Testing and Validation
### Structural Validation
- [ ] YAML files parse without errors
- [ ] JSON files (if any) are valid
- [ ] XML files (if any) are well-formed
- [ ] No syntax errors in JavaScript files
### Path Validation
- [ ] All referenced paths exist or are clearly marked as TODO
- [ ] Variable substitutions are correct
- [ ] No absolute paths (unless intentional)
### Installation Testing
- [ ] Installation steps can be simulated
- [ ] No circular dependencies
- [ ] Uninstall process defined (if complex)
## Final Checks
### Ready for Use
- [ ] Module can be installed without errors
- [ ] At least one component is functional
- [ ] User can understand how to get started
- [ ] Next steps are clear
### Professional Quality
- [ ] No placeholder text remains (unless marked TODO)
- [ ] No obvious typos or grammar issues
- [ ] Professional tone throughout
- [ ] Contact/support information provided
## Issues Found
### Critical Issues
<!-- List any issues that MUST be fixed before module can be used -->
### Warnings
<!-- List any issues that should be addressed but won't prevent basic usage -->
### Improvements
<!-- List any optional enhancements that would improve the module -->
### Missing Components
<!-- List any planned components not yet implemented -->
## Module Complexity Assessment
### Complexity Rating
- [ ] Simple (1-2 agents, 2-3 workflows)
- [ ] Standard (3-5 agents, 5-10 workflows)
- [ ] Complex (5+ agents, 10+ workflows)
### Readiness Level
- [ ] Prototype (Basic structure, mostly placeholders)
- [ ] Alpha (Core functionality works)
- [ ] Beta (Most features complete, needs testing)
- [ ] Release (Full functionality, documented)
## Sign-off
**Module Name:** \***\*\*\*\*\***\_\_\***\*\*\*\*\***
**Module Code:** \***\*\*\*\*\***\_\_\***\*\*\*\*\***
**Version:** \***\*\*\*\*\***\_\_\***\*\*\*\*\***
**Validated By:** \***\*\*\*\*\***\_\_\***\*\*\*\*\***
**Date:** \***\*\*\*\*\***\_\_\***\*\*\*\*\***
**Status:** ⬜ Pass / ⬜ Pass with Issues / ⬜ Fail

View File

@ -1,92 +0,0 @@
# {{MODULE_NAME}} Module Configuration
# This file defines installation questions and module configuration values
code: "{{MODULE_CODE}}"
name: "{{MODULE_NAME}}"
default_selected: "{{DEFAULT_SELECTED}}" # true if this should be selected by default
# Welcome message shown during installation
prompt:
- "{{WELCOME_MESSAGE_LINE_1}}"
- "{{WELCOME_MESSAGE_LINE_2}}"
# Core config values are automatically inherited:
## user_name
## communication_language
## document_output_language
## output_folder
# ============================================================================
# CONFIGURATION FIELDS
# ============================================================================
#
# Each field can be:
# 1. INTERACTIVE (has 'prompt' - asks user during installation)
# 2. STATIC (no 'prompt' - just uses 'result' value)
#
# Field structure:
# field_name:
# prompt: "Question to ask user" (optional - omit for static values)
# default: "default_value" (optional)
# result: "{value}" or "static-value"
# single-select: [...] (optional - for dropdown)
# multi-select: [...] (optional - for checkboxes)
#
# Special placeholders in result:
# {value} - replaced with user's answer
# {project-root} - replaced with project root path
# {directory_name} - replaced with project directory name
# {module_code} - replaced with this module's code
# ============================================================================
# EXAMPLE: Interactive text input
# example_project_name:
# prompt: "What is your project name?"
# default: "{directory_name}"
# result: "{value}"
# EXAMPLE: Interactive single-select dropdown
# example_skill_level:
# prompt: "What is your experience level?"
# default: "intermediate"
# result: "{value}"
# single-select:
# - value: "beginner"
# label: "Beginner - New to this domain"
# - value: "intermediate"
# label: "Intermediate - Familiar with basics"
# - value: "expert"
# label: "Expert - Deep knowledge"
# EXAMPLE: Interactive multi-select checkboxes
# example_features:
# prompt:
# - "Which features do you want to enable?"
# - "(Select all that apply)"
# result: "{value}"
# multi-select:
# - "Feature A"
# - "Feature B"
# - "Feature C"
# EXAMPLE: Interactive path input
# example_output_path:
# prompt: "Where should outputs be saved?"
# default: "output/{{MODULE_CODE}}"
# result: "{project-root}/{value}"
# EXAMPLE: Static value (no user prompt)
# example_static_setting:
# result: "hardcoded-value"
# EXAMPLE: Static path
# module_data_path:
# result: "{project-root}/bmad/{{MODULE_CODE}}/data"
# ============================================================================
# YOUR MODULE CONFIGURATION FIELDS
# ============================================================================
# Replace examples above with your module's actual configuration needs.
# Delete this comment block and the examples when implementing.
# ============================================================================
# TODO: INSERT {MODULE_CONFIG_FIELDS} HERE

Some files were not shown because too many files have changed in this diff Show More